@templatical/editor 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CXH7l1Ar.js → AiChatSidebar-B0-U5-sb.js} +3 -3
- package/dist/{AiFeatureMenu-BKbUUc1D.js → AiFeatureMenu-DxDwLS8B.js} +1 -1
- package/dist/{CloudEditor-CB16QzKM.js → CloudEditor-DaEfipBn.js} +190 -158
- package/dist/{CollaboratorBar-ACUA7lBJ.js → CollaboratorBar-DgwjisX2.js} +1 -1
- package/dist/{CountdownBlock-C-6o19qS.js → CountdownBlock-DO9fziwf.js} +1 -1
- package/dist/{CountdownToolbar-Dol7Q0Pv.js → CountdownToolbar-BeII06yJ.js} +1 -1
- package/dist/{DesignReferenceSidebar-0dTsBW08.js → DesignReferenceSidebar-BgPDbOsl.js} +19 -31
- package/dist/{ModuleBrowserModal-Bz9hSjMS.js → ModuleBrowserModal-DsZRr87F.js} +4 -4
- package/dist/{ModulePreviewCanvas-CpaumPMS.js → ModulePreviewCanvas-Dni9kK4j.js} +19 -19
- package/dist/{NumberWithSuffix-Bp40ik4l.js → NumberWithSuffix-D3fdj0iO.js} +1 -1
- package/dist/{ParagraphEditor-BqRFV_Y-.js → ParagraphEditor-CZ-cmhX3.js} +7 -7
- package/dist/{SaveModuleDialog-DmfvH5D0.js → SaveModuleDialog-C38VqN2T.js} +2 -2
- package/dist/{SnapshotHistory-C052o-8U.js → SnapshotHistory-ByloTpwh.js} +2 -2
- package/dist/{TemplateScoringPanel-CUs8XmIi.js → TemplateScoringPanel-CUxiPtEf.js} +1 -1
- package/dist/{TestEmailModal-BIIxRWUt.js → TestEmailModal-BvZBMBad.js} +2 -2
- package/dist/{TitleEditor-FMh54Cx5.js → TitleEditor-DbNOcvhR.js} +1 -1
- package/dist/{TplModal-utMtXzSO.js → TplModal-BYb-X5Bj.js} +1 -1
- package/dist/{blockTypeIcons-C6UGDmrC.js → blockTypeIcons-CyAom3iI.js} +4 -4
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js → AiFeatureMenu-BSoy-SoF.js} +7 -7
- package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js.map → AiFeatureMenu-BSoy-SoF.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js → BlockIssueBadge-BQDUuJxy.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js.map → BlockIssueBadge-BQDUuJxy.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DSeihOan.js → CloudEditor-BZuzsQOZ.js} +231 -199
- package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js → CollaboratorBar-DUpSrtDr.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js.map → CollaboratorBar-DUpSrtDr.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js → CountdownBlock-DChGTAsH.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js.map → CountdownBlock-DChGTAsH.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BQn0Kj0X.js → CountdownToolbar-C6gX2SJr.js} +3 -3
- package/dist/cdn/chunks/CountdownToolbar-C6gX2SJr.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js → IssuesPanel-Bo1uhdSe.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js.map → IssuesPanel-Bo1uhdSe.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js → ModuleBrowserModal-a-tZRCcD.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js.map → ModuleBrowserModal-a-tZRCcD.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js → ModulePreviewCanvas-Bm6k0Op0.js} +24 -24
- package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js.map → ModulePreviewCanvas-Bm6k0Op0.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js → NumberWithSuffix-HTbuD3VJ.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js.map → NumberWithSuffix-HTbuD3VJ.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BnhnFOW1.js → ParagraphEditor-pGrfSccu.js} +13 -13
- package/dist/cdn/chunks/{ParagraphEditor-BnhnFOW1.js.map → ParagraphEditor-pGrfSccu.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js → RichTextEditorContent-D7XZix_1.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js.map → RichTextEditorContent-D7XZix_1.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js → SaveModuleDialog-C9PQ9x6j.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js.map → SaveModuleDialog-C9PQ9x6j.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CQqklX0D.js → TitleEditor-BvFbL16O.js} +7 -7
- package/dist/cdn/chunks/{TitleEditor-CQqklX0D.js.map → TitleEditor-BvFbL16O.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CpGPHppB.js → blockTypeIcons-Kd1MT0u8.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-CpGPHppB.js.map → blockTypeIcons-Kd1MT0u8.js.map} +1 -1
- package/dist/cdn/chunks/{de-BpseTWOA.js → de-C2wOXoxs.js} +3 -1
- package/dist/cdn/chunks/de-C2wOXoxs.js.map +1 -0
- package/dist/cdn/chunks/{en-VGIQ0WNq.js → en-dR7zfNC3.js} +3 -1
- package/dist/cdn/chunks/en-dR7zfNC3.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Ds9GnMcd.js → extensions-CuUjSmuA.js} +23 -23
- package/dist/cdn/chunks/{extensions-Ds9GnMcd.js.map → extensions-CuUjSmuA.js.map} +1 -1
- package/dist/cdn/chunks/{features-DxWz_Enw.js → features-DU6lA8l1.js} +471 -420
- package/dist/cdn/chunks/features-DU6lA8l1.js.map +1 -0
- package/dist/cdn/chunks/{icons-BflGUmFY.js → icons-BjHUZZyJ.js} +2 -2
- package/dist/cdn/chunks/{icons-BflGUmFY.js.map → icons-BjHUZZyJ.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-C479-QcE.js → media-library-Byelliig.js} +575 -575
- package/dist/cdn/chunks/media-library-Byelliig.js.map +1 -0
- package/dist/{pt-BR-zAqpLQbW.js → cdn/chunks/pt-BR-BZ86xqK6.js} +4 -0
- package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +1 -0
- package/dist/cdn/chunks/{quality-BL_pEvFP.js → quality-DNnYAntR.js} +83 -83
- package/dist/cdn/chunks/{quality-BL_pEvFP.js.map → quality-DNnYAntR.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-C0vdAODQ.js → renderer-CZKO-Tav.js} +19 -19
- package/dist/cdn/chunks/{renderer-C0vdAODQ.js.map → renderer-CZKO-Tav.js.map} +1 -1
- package/dist/cdn/chunks/{src-DzvOWQ9S.js → src-DsqSXXjk.js} +53 -53
- package/dist/cdn/chunks/{src-DzvOWQ9S.js.map → src-DsqSXXjk.js.map} +1 -1
- package/dist/cdn/chunks/{styles-LfeoSNRA.js → styles-DiAdtiz9.js} +856 -780
- package/dist/cdn/chunks/styles-DiAdtiz9.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +124 -122
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{de-BpseTWOA.js → de-C2wOXoxs.js} +2 -0
- package/dist/{dist-DJ9aD8yA.js → dist-Cgry6fNv.js} +53 -4
- package/dist/{en-VGIQ0WNq.js → en-dR7zfNC3.js} +2 -0
- package/dist/{cdn/chunks/pt-BR-zAqpLQbW.js → pt-BR-BZ86xqK6.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{styles-DSm9Ijxt.js → styles-D0RCAWhB.js} +857 -779
- package/dist/templatical-editor.js +94 -92
- package/dist/upload-BF7sxd1_.js +17 -0
- package/dist/{useEditorCore-D7dQFRkw.js → useEditorCore-DKYZ7aKk.js} +788 -735
- package/package.json +7 -7
- package/dist/cdn/chunks/CloudEditor-DSeihOan.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-BQn0Kj0X.js.map +0 -1
- package/dist/cdn/chunks/de-BpseTWOA.js.map +0 -1
- package/dist/cdn/chunks/en-VGIQ0WNq.js.map +0 -1
- package/dist/cdn/chunks/features-DxWz_Enw.js.map +0 -1
- package/dist/cdn/chunks/media-library-C479-QcE.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-zAqpLQbW.js.map +0 -1
- package/dist/cdn/chunks/styles-LfeoSNRA.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as e, F as t, G as n, H as r, J as i, L as a, M as o, O as s, P as c, T as l, V as u, Y as d, Z as f, b as p, c as m, ct as h, f as g, g as _, h as v, it as y, l as b, m as x, n as S, o as C, ot as w, p as T, s as E, st as D, t as
|
|
2
|
-
import { $ as
|
|
3
|
-
import { A as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { i as q, n as J, r as Y, t as
|
|
1
|
+
import { C as e, F as t, G as n, H as r, J as i, L as a, M as o, O as s, P as c, T as l, V as u, Y as d, Z as f, b as p, c as m, ct as h, f as g, g as _, h as v, it as y, l as b, m as x, n as S, o as C, ot as w, p as T, s as E, st as D, t as O, u as k, v as A, x as j, y as M, z as N } from "./draggable-Bci-fq8y.js";
|
|
2
|
+
import { $t as P, At as F, B as ee, Bt as te, Cn as I, Ct as L, Dn as R, En as ne, Et as re, F as ie, Ft as ae, G as z, Gt as oe, H as se, Ht as ce, I as le, It as B, J as ue, Jt as de, K as fe, Kt as V, L as pe, M as me, N as he, Nt as ge, O as _e, On as ve, P as ye, Pt as be, Qt as xe, R as Se, Rt as Ce, St as we, U as Te, V as Ee, Vt as De, W as Oe, Xt as ke, Yt as Ae, Zt as je, _n as Me, _t as Ne, an as Pe, at as Fe, bn as Ie, bt as Le, ct as Re, en as ze, et as Be, gn as Ve, in as He, it as Ue, j as We, jn as Ge, jt as Ke, kt as qe, on as Je, ot as Ye, pn as Xe, pt as Ze, q as Qe, qt as $e, rn as et, st as tt, tt as nt, vt as rt, xn as it, xt as at, yn as ot, yt as st } from "./features-DU6lA8l1.js";
|
|
3
|
+
import { A as ct, D as lt, F as ut, G as dt, K as ft, N as pt, O as mt, R as ht, T as gt, V as _t, W as vt, Y as yt, d as bt, g as xt, h as St, k as Ct, m as wt, p as Tt, q as Et, s as Dt, w as Ot, x as H } from "./icons-BjHUZZyJ.js";
|
|
4
|
+
import { t as kt } from "./readableTextColor-f8Kykfnh.js";
|
|
5
|
+
import { t as At } from "./CountdownBlock-DChGTAsH.js";
|
|
6
|
+
import { t as jt } from "./blockTypeIcons-Kd1MT0u8.js";
|
|
7
|
+
import { _ as Mt, c as Nt, f as U, g as Pt, h as W, l as Ft, m as G, p as K, r as It, t as Lt } from "./styleConstants-lGobwiLH.js";
|
|
8
|
+
import { i as q, n as J, r as Y, t as Rt } from "./NumberWithSuffix-HTbuD3VJ.js";
|
|
9
9
|
//#region src/utils/resolveLintOptions.ts
|
|
10
|
-
function
|
|
10
|
+
function zt(e) {
|
|
11
11
|
return {
|
|
12
12
|
...e.lint,
|
|
13
13
|
locale: e.locale
|
|
@@ -15,19 +15,19 @@ function It(e) {
|
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
-
var
|
|
18
|
+
var Bt = ["aria-label"], Vt = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
21
|
-
},
|
|
21
|
+
}, Ht = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, Ut = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, Wt = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, Gt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
24
|
-
},
|
|
24
|
+
}, Kt = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "tpl:m-0 tpl:mt-4 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
27
|
-
},
|
|
27
|
+
}, qt = { class: "tpl:relative" }, Jt = {
|
|
28
28
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
29
29
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
30
|
-
},
|
|
30
|
+
}, Yt = 96, Xt = /*#__PURE__*/ Ue(/* @__PURE__ */ j({
|
|
31
31
|
__name: "Canvas",
|
|
32
32
|
props: {
|
|
33
33
|
viewport: {},
|
|
@@ -44,21 +44,21 @@ var Lt = ["aria-label"], Rt = {
|
|
|
44
44
|
],
|
|
45
45
|
setup(e, { emit: t }) {
|
|
46
46
|
let n = {
|
|
47
|
-
section:
|
|
48
|
-
title:
|
|
47
|
+
section: le,
|
|
48
|
+
title: pe,
|
|
49
49
|
paragraph: Ee,
|
|
50
50
|
image: Te,
|
|
51
|
-
button:
|
|
52
|
-
divider:
|
|
53
|
-
spacer:
|
|
54
|
-
html:
|
|
55
|
-
social:
|
|
56
|
-
menu:
|
|
57
|
-
table:
|
|
58
|
-
video:
|
|
59
|
-
countdown:
|
|
60
|
-
custom:
|
|
61
|
-
}, i = e, s = t, { t: d } =
|
|
51
|
+
button: ge,
|
|
52
|
+
divider: Qe,
|
|
53
|
+
spacer: he,
|
|
54
|
+
html: fe,
|
|
55
|
+
social: ye,
|
|
56
|
+
menu: se,
|
|
57
|
+
table: me,
|
|
58
|
+
video: We,
|
|
59
|
+
countdown: At,
|
|
60
|
+
custom: ue
|
|
61
|
+
}, i = e, s = t, { t: d } = B(), { t: p } = nt(), m = Je(Ae, "Canvas"), b = l(oe, null), S = l(De, null), C = l(ce, {}), j = g(() => (C.plan?.hasFeature("ai_generation") ?? !1) && (C.ai?.isFeatureEnabled("chat") ?? !1)), N = g(() => (C.plan?.hasFeature("ai_generation") ?? !1) && (C.ai?.isFeatureEnabled("designToTemplate") ?? !1)), P = g({
|
|
62
62
|
get: () => i.content.blocks,
|
|
63
63
|
set: (e) => {
|
|
64
64
|
m.setContent({
|
|
@@ -66,31 +66,31 @@ var Lt = ["aria-label"], Rt = {
|
|
|
66
66
|
blocks: e
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
}),
|
|
69
|
+
}), F = g(() => {
|
|
70
70
|
switch (i.viewport) {
|
|
71
71
|
case "mobile": return 375;
|
|
72
72
|
default: return i.content.settings.width;
|
|
73
73
|
}
|
|
74
|
-
}), te = g(() =>
|
|
75
|
-
function
|
|
76
|
-
|
|
74
|
+
}), te = g(() => F.value + Yt * 2), I = g(() => ({ fontFamily: i.content.settings.fontFamily })), L = g(() => P.value.length === 0 && !i.previewMode), R = f(0), ne = g(() => L.value && R.value > 0);
|
|
75
|
+
function re() {
|
|
76
|
+
L.value && (R.value += 1);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
78
|
+
function ie() {
|
|
79
|
+
L.value && (R.value = Math.max(0, R.value - 1));
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
81
|
+
function ae() {
|
|
82
|
+
R.value = 0;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function z(e) {
|
|
85
85
|
i.previewMode || e.target === e.currentTarget && s("select-block", null);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function de(e) {
|
|
88
|
+
return ee(e, S, n);
|
|
89
89
|
}
|
|
90
90
|
function V(e) {
|
|
91
91
|
return i.lockedBlocks?.get(e) ?? null;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function _e(e, t) {
|
|
94
94
|
e.type === "custom" && m.updateBlock(e.id, {
|
|
95
95
|
fieldValues: t.fieldValues,
|
|
96
96
|
dataSourceFetched: t.dataSourceFetched
|
|
@@ -116,7 +116,7 @@ var Lt = ["aria-label"], Rt = {
|
|
|
116
116
|
"aria-label": y(d).landmarks.canvas,
|
|
117
117
|
class: "tpl-canvas-wrapper tpl:relative",
|
|
118
118
|
style: D({
|
|
119
|
-
width: `${
|
|
119
|
+
width: `${F.value}px`,
|
|
120
120
|
transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
121
121
|
})
|
|
122
122
|
}, [T("div", {
|
|
@@ -124,11 +124,11 @@ var Lt = ["aria-label"], Rt = {
|
|
|
124
124
|
"tpl-canvas--dark-mode": e.darkMode,
|
|
125
125
|
"tpl-preview-mode": e.previewMode
|
|
126
126
|
}]),
|
|
127
|
-
style: D(
|
|
128
|
-
onClick:
|
|
129
|
-
}, [
|
|
130
|
-
modelValue:
|
|
131
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
127
|
+
style: D(I.value),
|
|
128
|
+
onClick: z
|
|
129
|
+
}, [M(y(O), {
|
|
130
|
+
modelValue: P.value,
|
|
131
|
+
"onUpdate:modelValue": n[2] ||= (e) => P.value = e,
|
|
132
132
|
group: "blocks",
|
|
133
133
|
animation: 150,
|
|
134
134
|
"ghost-class": "tpl-ghost",
|
|
@@ -141,47 +141,47 @@ var Lt = ["aria-label"], Rt = {
|
|
|
141
141
|
"force-fallback": !0,
|
|
142
142
|
class: w([
|
|
143
143
|
"tpl-canvas-blocks",
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
L.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors tpl:duration-150" : "",
|
|
145
|
+
L.value && ne.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
146
|
+
L.value && !ne.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
147
147
|
]),
|
|
148
|
-
onDragenter:
|
|
149
|
-
onDragleave:
|
|
150
|
-
onDrop:
|
|
148
|
+
onDragenter: re,
|
|
149
|
+
onDragleave: ie,
|
|
150
|
+
onDrop: ae
|
|
151
151
|
}, {
|
|
152
|
-
default: u(() => [
|
|
153
|
-
T("div",
|
|
152
|
+
default: u(() => [L.value ? (o(), _("div", Vt, [
|
|
153
|
+
T("div", Ht, [M(y(Et), {
|
|
154
154
|
size: 48,
|
|
155
155
|
"stroke-width": 1
|
|
156
156
|
})]),
|
|
157
|
-
T("p",
|
|
158
|
-
T("p",
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
T("p", Ut, h(y(d).canvas.noBlocks), 1),
|
|
158
|
+
T("p", Wt, h(y(d).canvas.dragHint), 1),
|
|
159
|
+
j.value && y(p) ? (o(), _("p", Gt, [
|
|
160
|
+
A(h(y(d).canvas.aiHintChat) + " ", 1),
|
|
161
161
|
T("button", {
|
|
162
162
|
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)]",
|
|
163
163
|
onClick: n[0] ||= (e) => s("open-ai-chat")
|
|
164
|
-
}, [
|
|
164
|
+
}, [M(y(qe), {
|
|
165
165
|
size: 14,
|
|
166
166
|
"stroke-width": 2
|
|
167
|
-
}),
|
|
168
|
-
|
|
167
|
+
}), A(" " + h(y(p).aiMenu.aiAssistant), 1)]),
|
|
168
|
+
A(" " + h(y(d).canvas.aiHintChatSuffix), 1)
|
|
169
169
|
])) : v("", !0),
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
N.value && y(p) ? (o(), _("p", Kt, [
|
|
171
|
+
A(h(y(d).canvas.aiHintDesign) + " ", 1),
|
|
172
172
|
T("button", {
|
|
173
173
|
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)]",
|
|
174
174
|
onClick: n[1] ||= (e) => s("open-design-reference")
|
|
175
|
-
}, [
|
|
175
|
+
}, [M(y(st), {
|
|
176
176
|
size: 14,
|
|
177
177
|
"stroke-width": 2
|
|
178
|
-
}),
|
|
179
|
-
|
|
178
|
+
}), A(" " + h(y(p).aiMenu.designToTemplate), 1)]),
|
|
179
|
+
A(" " + h(y(d).canvas.aiHintDesignSuffix), 1)
|
|
180
180
|
])) : v("", !0)
|
|
181
|
-
])) : v("", !0), (o(!0), _(
|
|
181
|
+
])) : v("", !0), (o(!0), _(k, null, c(P.value, (t) => r((o(), _("div", {
|
|
182
182
|
key: t.id,
|
|
183
183
|
class: "tpl-block-item"
|
|
184
|
-
}, [T("div",
|
|
184
|
+
}, [T("div", qt, [V(t.id) ? (o(), _("div", {
|
|
185
185
|
key: 0,
|
|
186
186
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
187
187
|
style: D({
|
|
@@ -192,19 +192,19 @@ var Lt = ["aria-label"], Rt = {
|
|
|
192
192
|
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",
|
|
193
193
|
style: D({
|
|
194
194
|
backgroundColor: V(t.id).color,
|
|
195
|
-
color: y(
|
|
195
|
+
color: y(kt)(V(t.id).color)
|
|
196
196
|
})
|
|
197
|
-
}, [T("span",
|
|
197
|
+
}, [T("span", Jt, h(V(t.id).name.charAt(0)), 1), A(" " + h(V(t.id).name), 1)], 4)], 4)) : v("", !0), M(Se, {
|
|
198
198
|
block: t,
|
|
199
199
|
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !V(t.id),
|
|
200
200
|
viewport: e.viewport,
|
|
201
201
|
"preview-mode": e.previewMode,
|
|
202
202
|
onSelect: (n) => e.previewMode || V(t.id) ? void 0 : s("select-block", t.id)
|
|
203
203
|
}, {
|
|
204
|
-
default: u(() => [(o(), x(a(
|
|
204
|
+
default: u(() => [(o(), x(a(de(t)), {
|
|
205
205
|
block: t,
|
|
206
206
|
viewport: e.viewport,
|
|
207
|
-
onFetchData: (e) =>
|
|
207
|
+
onFetchData: (e) => _e(t, e),
|
|
208
208
|
onUpdate: (e) => y(m).updateBlock(t.id, e)
|
|
209
209
|
}, null, 40, [
|
|
210
210
|
"block",
|
|
@@ -225,12 +225,12 @@ var Lt = ["aria-label"], Rt = {
|
|
|
225
225
|
"modelValue",
|
|
226
226
|
"disabled",
|
|
227
227
|
"class"
|
|
228
|
-
])], 6)], 12,
|
|
228
|
+
])], 6)], 12, Bt)], 4));
|
|
229
229
|
}
|
|
230
|
-
}), [["__scopeId", "data-v-a9a1158b"]]),
|
|
230
|
+
}), [["__scopeId", "data-v-a9a1158b"]]), Zt = j({
|
|
231
231
|
name: "CustomBlockStylesheets",
|
|
232
232
|
setup() {
|
|
233
|
-
let t = l(
|
|
233
|
+
let t = l($e, null);
|
|
234
234
|
return () => t ? t.value.map((t, n) => e("style", {
|
|
235
235
|
key: n,
|
|
236
236
|
"data-tpl-custom-block-stylesheet": "",
|
|
@@ -240,7 +240,7 @@ var Lt = ["aria-label"], Rt = {
|
|
|
240
240
|
});
|
|
241
241
|
//#endregion
|
|
242
242
|
//#region src/utils/resolvePaletteBlocks.ts
|
|
243
|
-
function
|
|
243
|
+
function Qt(e, t) {
|
|
244
244
|
if (!t || t.length === 0) return {
|
|
245
245
|
items: e,
|
|
246
246
|
unknown: []
|
|
@@ -259,37 +259,37 @@ function Yt(e, t) {
|
|
|
259
259
|
}
|
|
260
260
|
//#endregion
|
|
261
261
|
//#region src/components/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
262
|
-
var
|
|
262
|
+
var $t = ["aria-label"], en = {
|
|
263
263
|
key: 0,
|
|
264
264
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
265
|
-
},
|
|
265
|
+
}, tn = ["aria-label"], nn = {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
268
|
-
},
|
|
268
|
+
}, rn = {
|
|
269
269
|
key: 1,
|
|
270
270
|
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)]"
|
|
271
|
-
},
|
|
271
|
+
}, an = [
|
|
272
272
|
"data-palette-type",
|
|
273
273
|
"aria-label",
|
|
274
274
|
"onClick",
|
|
275
275
|
"onKeydown"
|
|
276
|
-
],
|
|
276
|
+
], on = { 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" }, sn = {
|
|
277
277
|
key: 0,
|
|
278
278
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
279
|
-
},
|
|
279
|
+
}, cn = /* @__PURE__ */ j({
|
|
280
280
|
__name: "Sidebar",
|
|
281
281
|
setup(e) {
|
|
282
|
-
let { t, format: n } =
|
|
282
|
+
let { t, format: n } = B(), { t: r } = nt(), i = l(V, []), s = l(ze, void 0), d = l(te, void 0), p = l(Ae, null), m = l(ce, {}), b = g(() => (m.savedModules?.moduleCount.value ?? 0) > 0), S = f(!1), C = f(!1);
|
|
283
283
|
function w() {
|
|
284
284
|
C.value || (S.value = !1);
|
|
285
285
|
}
|
|
286
286
|
function E() {
|
|
287
287
|
C.value = !0;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function A() {
|
|
290
290
|
C.value = !1;
|
|
291
291
|
}
|
|
292
|
-
let
|
|
292
|
+
let j = [
|
|
293
293
|
"section",
|
|
294
294
|
"image",
|
|
295
295
|
"title",
|
|
@@ -302,38 +302,38 @@ var Xt = ["aria-label"], Zt = {
|
|
|
302
302
|
"table",
|
|
303
303
|
"spacer",
|
|
304
304
|
"html"
|
|
305
|
-
],
|
|
306
|
-
let e =
|
|
305
|
+
], P = g(() => {
|
|
306
|
+
let e = j.map((e) => ({
|
|
307
307
|
type: e,
|
|
308
|
-
label:
|
|
308
|
+
label: ae(e, t)
|
|
309
309
|
}));
|
|
310
310
|
return m.plan && e.splice(-1, 0, {
|
|
311
311
|
type: "countdown",
|
|
312
|
-
label:
|
|
312
|
+
label: ae("countdown", t)
|
|
313
313
|
}), e;
|
|
314
|
-
}),
|
|
314
|
+
}), F = g(() => i.map((e) => ({
|
|
315
315
|
type: `custom:${e.type}`,
|
|
316
316
|
label: e.name,
|
|
317
317
|
isCustom: !0,
|
|
318
318
|
icon: e.icon
|
|
319
|
-
}))),
|
|
320
|
-
|
|
321
|
-
for (let t of e)
|
|
319
|
+
}))), ee = g(() => [...P.value, ...F.value]), I = g(() => Qt(ee.value, s)), L = g(() => I.value.items), re = /* @__PURE__ */ new Set();
|
|
320
|
+
N(() => I.value.unknown, (e) => {
|
|
321
|
+
for (let t of e) re.has(t) || (re.add(t), be.warn(`config.paletteBlocks: "${t}" is not a built-in or registered custom block (use the "custom:" prefix for custom blocks) — skipping it in the palette.`));
|
|
322
322
|
}, { immediate: !0 });
|
|
323
|
-
function
|
|
323
|
+
function ie(e) {
|
|
324
324
|
if (e.isCustom) {
|
|
325
325
|
let t = e.type.replace("custom:", ""), n = i.find((e) => e.type === t);
|
|
326
|
-
if (n) return
|
|
326
|
+
if (n) return R(n);
|
|
327
327
|
}
|
|
328
|
-
return
|
|
328
|
+
return ne(e.type, d);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function z(e) {
|
|
331
331
|
if (!p) return;
|
|
332
|
-
let t =
|
|
332
|
+
let t = ie(e);
|
|
333
333
|
p.addBlock(t), p.selectBlock(t.id);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
335
|
+
function oe(e, t) {
|
|
336
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), z(t));
|
|
337
337
|
}
|
|
338
338
|
return (e, i) => (o(), _("aside", {
|
|
339
339
|
"aria-label": y(t).sidebarNav.palette,
|
|
@@ -349,61 +349,61 @@ var Xt = ["aria-label"], Zt = {
|
|
|
349
349
|
onMouseleave: w,
|
|
350
350
|
onFocusin: i[2] ||= (e) => S.value = !0,
|
|
351
351
|
onFocusout: i[3] ||= (e) => S.value = !1
|
|
352
|
-
}, [b.value && y(r) ? (o(), _("div",
|
|
352
|
+
}, [b.value && y(r) ? (o(), _("div", en, [T("button", {
|
|
353
353
|
type: "button",
|
|
354
354
|
"aria-label": y(t).sidebarNav.browseModules,
|
|
355
355
|
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)]",
|
|
356
356
|
style: D({ justifyContent: S.value ? "flex-start" : "center" }),
|
|
357
357
|
onClick: i[0] ||= (e) => y(m).savedModules?.openBrowser()
|
|
358
358
|
}, [
|
|
359
|
-
|
|
359
|
+
M(y(gt), {
|
|
360
360
|
size: 20,
|
|
361
361
|
"stroke-width": 1.5,
|
|
362
362
|
class: "tpl:shrink-0"
|
|
363
363
|
}),
|
|
364
|
-
S.value ? (o(), _("span",
|
|
365
|
-
S.value ? (o(), _("span",
|
|
366
|
-
], 12,
|
|
367
|
-
"model-value":
|
|
364
|
+
S.value ? (o(), _("span", nn, h(y(r).modules.title), 1)) : v("", !0),
|
|
365
|
+
S.value ? (o(), _("span", rn, h(y(m).savedModules?.moduleCount.value ?? 0), 1)) : v("", !0)
|
|
366
|
+
], 12, tn)])) : v("", !0), M(y(O), {
|
|
367
|
+
"model-value": L.value,
|
|
368
368
|
group: {
|
|
369
369
|
name: "blocks",
|
|
370
370
|
pull: "clone",
|
|
371
371
|
put: !1
|
|
372
372
|
},
|
|
373
|
-
clone:
|
|
373
|
+
clone: ie,
|
|
374
374
|
sort: !1,
|
|
375
375
|
animation: 150,
|
|
376
376
|
"force-fallback": !0,
|
|
377
377
|
class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:gap-0.5 tpl:overflow-y-auto tpl:p-1",
|
|
378
378
|
onChoose: E,
|
|
379
|
-
onEnd:
|
|
379
|
+
onEnd: A
|
|
380
380
|
}, {
|
|
381
|
-
default: u(() => [(o(!0), _(
|
|
381
|
+
default: u(() => [(o(!0), _(k, null, c(L.value, (e) => (o(), _("button", {
|
|
382
382
|
key: e.type,
|
|
383
383
|
type: "button",
|
|
384
384
|
"data-palette-type": e.type,
|
|
385
385
|
"aria-label": y(n)(y(t).sidebarNav.insertBlock, { block: e.label }),
|
|
386
386
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:shrink-0 tpl:cursor-grab tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] active:tpl:cursor-grabbing",
|
|
387
387
|
style: D({ justifyContent: S.value ? "flex-start" : "center" }),
|
|
388
|
-
onClick: (t) =>
|
|
389
|
-
onKeydown: (t) =>
|
|
390
|
-
}, [T("div",
|
|
388
|
+
onClick: (t) => z(e),
|
|
389
|
+
onKeydown: (t) => oe(t, e)
|
|
390
|
+
}, [T("div", on, [y(jt)[e.type] ? (o(), x(a(y(jt)[e.type]), {
|
|
391
391
|
key: 0,
|
|
392
392
|
size: 20,
|
|
393
393
|
"stroke-width": 1.5
|
|
394
|
-
})) : e.isCustom ? (o(), x(
|
|
394
|
+
})) : e.isCustom ? (o(), x(Fe, {
|
|
395
395
|
key: 1,
|
|
396
396
|
icon: e.icon,
|
|
397
397
|
size: 20
|
|
398
|
-
}, null, 8, ["icon"])) : v("", !0)]), S.value ? (o(), _("span",
|
|
398
|
+
}, null, 8, ["icon"])) : v("", !0)]), S.value ? (o(), _("span", sn, h(e.label), 1)) : v("", !0)], 44, an))), 128))]),
|
|
399
399
|
_: 1
|
|
400
|
-
}, 8, ["model-value"])], 44,
|
|
400
|
+
}, 8, ["model-value"])], 44, $t));
|
|
401
401
|
}
|
|
402
402
|
});
|
|
403
403
|
//#endregion
|
|
404
404
|
//#region src/composables/useMergeTagField.ts
|
|
405
|
-
function
|
|
406
|
-
let { modelValue: t, emit: r, elementRef: a } = e, { canRequestMergeTag: o, isRequesting: c, isMergeTagValue: l, getMergeTagLabel: u, requestMergeTag: d, syntax: p } =
|
|
405
|
+
function ln(e) {
|
|
406
|
+
let { modelValue: t, emit: r, elementRef: a } = e, { canRequestMergeTag: o, isRequesting: c, isMergeTagValue: l, getMergeTagLabel: u, requestMergeTag: d, syntax: p } = Be(), m = f(!1), h = !1, _ = !1;
|
|
407
407
|
n() && i(() => {
|
|
408
408
|
_ = !0;
|
|
409
409
|
});
|
|
@@ -421,10 +421,10 @@ function on(e) {
|
|
|
421
421
|
type: "mergeTag",
|
|
422
422
|
value: t,
|
|
423
423
|
label: u(t)
|
|
424
|
-
}) :
|
|
424
|
+
}) : I(t, p) ? n.push({
|
|
425
425
|
type: "logicMergeTag",
|
|
426
426
|
value: t,
|
|
427
|
-
keyword:
|
|
427
|
+
keyword: it(t, p)
|
|
428
428
|
}) : n.push({
|
|
429
429
|
type: "text",
|
|
430
430
|
value: t
|
|
@@ -484,10 +484,10 @@ function on(e) {
|
|
|
484
484
|
}
|
|
485
485
|
//#endregion
|
|
486
486
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
487
|
-
var
|
|
487
|
+
var un = ["aria-label", "onKeydown"], dn = ["data-tooltip"], fn = ["data-tooltip"], pn = {
|
|
488
488
|
key: 2,
|
|
489
489
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
490
|
-
},
|
|
490
|
+
}, mn = ["aria-label", "title"], hn = /* @__PURE__ */ j({
|
|
491
491
|
__name: "MergeTagSegments",
|
|
492
492
|
props: {
|
|
493
493
|
segments: {},
|
|
@@ -496,7 +496,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
496
496
|
},
|
|
497
497
|
emits: ["edit", "clear"],
|
|
498
498
|
setup(e, { emit: t }) {
|
|
499
|
-
let n = t, { t: r } =
|
|
499
|
+
let n = t, { t: r } = B();
|
|
500
500
|
function i() {
|
|
501
501
|
n("edit");
|
|
502
502
|
}
|
|
@@ -507,7 +507,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
507
507
|
class: w([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
508
508
|
onClick: i,
|
|
509
509
|
onKeydown: [m(i, ["enter"]), m(b(i, ["prevent"]), ["space"])]
|
|
510
|
-
}, [(o(!0), _(
|
|
510
|
+
}, [(o(!0), _(k, null, c(e.segments, (e, t) => (o(), _(k, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" ? (o(), _("span", {
|
|
511
511
|
key: 0,
|
|
512
512
|
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",
|
|
513
513
|
"data-tooltip": e.value,
|
|
@@ -515,7 +515,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
515
515
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
516
516
|
color: "var(--tpl-primary)"
|
|
517
517
|
}
|
|
518
|
-
}, h(e.label), 9,
|
|
518
|
+
}, h(e.label), 9, dn)) : e.type === "logicMergeTag" ? (o(), _("span", {
|
|
519
519
|
key: 1,
|
|
520
520
|
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",
|
|
521
521
|
"data-tooltip": e.value,
|
|
@@ -524,44 +524,44 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
524
524
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
525
525
|
color: "var(--tpl-primary)"
|
|
526
526
|
}
|
|
527
|
-
}, h(e.keyword), 9,
|
|
527
|
+
}, h(e.keyword), 9, fn)) : (o(), _("span", pn, h(e.value), 1))], 64))), 128)), T("button", {
|
|
528
528
|
type: "button",
|
|
529
529
|
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",
|
|
530
530
|
"aria-label": y(r).mergeTag.remove,
|
|
531
531
|
title: y(r).mergeTag.remove,
|
|
532
532
|
onClick: a[0] ||= b((e) => n("clear"), ["stop"])
|
|
533
|
-
}, [
|
|
533
|
+
}, [M(y(Ye), {
|
|
534
534
|
size: 12,
|
|
535
535
|
"stroke-width": 2.5
|
|
536
|
-
})], 8,
|
|
536
|
+
})], 8, mn)], 42, un));
|
|
537
537
|
}
|
|
538
|
-
}),
|
|
538
|
+
}), gn = [
|
|
539
539
|
"aria-label",
|
|
540
540
|
"title",
|
|
541
541
|
"disabled"
|
|
542
|
-
],
|
|
542
|
+
], _n = "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)]", vn = /* @__PURE__ */ j({
|
|
543
543
|
__name: "MergeTagInsertButton",
|
|
544
544
|
props: { disabled: { type: Boolean } },
|
|
545
545
|
emits: ["insert"],
|
|
546
546
|
setup(e) {
|
|
547
|
-
let { t } =
|
|
547
|
+
let { t } = B();
|
|
548
548
|
return (n, r) => (o(), _("button", {
|
|
549
549
|
type: "button",
|
|
550
|
-
class: w([
|
|
550
|
+
class: w([_n, "tpl:mt-1.5"]),
|
|
551
551
|
"aria-label": y(t).mergeTag.insert,
|
|
552
552
|
title: y(t).mergeTag.insert,
|
|
553
553
|
disabled: e.disabled,
|
|
554
554
|
onClick: r[0] ||= (e) => n.$emit("insert")
|
|
555
|
-
}, [
|
|
555
|
+
}, [M(y(xt), {
|
|
556
556
|
size: 12,
|
|
557
557
|
"stroke-width": 2
|
|
558
|
-
}),
|
|
558
|
+
}), A(" " + h(y(t).mergeTag.insert), 1)], 10, gn));
|
|
559
559
|
}
|
|
560
|
-
}),
|
|
560
|
+
}), yn = { key: 0 }, bn = { key: 1 }, xn = [
|
|
561
561
|
"value",
|
|
562
562
|
"placeholder",
|
|
563
563
|
"rows"
|
|
564
|
-
],
|
|
564
|
+
], Sn = "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)]", Cn = "tpl:flex tpl:w-full tpl:min-h-20 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__ */ j({
|
|
565
565
|
__name: "MergeTagTextarea",
|
|
566
566
|
props: {
|
|
567
567
|
modelValue: {},
|
|
@@ -570,46 +570,46 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
570
570
|
},
|
|
571
571
|
emits: ["update:modelValue"],
|
|
572
572
|
setup(e, { emit: t }) {
|
|
573
|
-
let n = e, r = t, i = f(null), { segments: a, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: d, stopEditing: p, handleInput: h, clearValue: g, insertMergeTag: b } =
|
|
573
|
+
let n = e, r = t, i = f(null), { segments: a, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: d, stopEditing: p, handleInput: h, clearValue: g, insertMergeTag: b } = ln({
|
|
574
574
|
modelValue: () => n.modelValue,
|
|
575
575
|
emit: (e) => r("update:modelValue", e),
|
|
576
576
|
elementRef: i
|
|
577
577
|
});
|
|
578
|
-
return (t, n) => y(s) && !y(u) ? (o(), _("div",
|
|
578
|
+
return (t, n) => y(s) && !y(u) ? (o(), _("div", yn, [M(hn, {
|
|
579
579
|
segments: y(a),
|
|
580
|
-
"display-class":
|
|
580
|
+
"display-class": Cn,
|
|
581
581
|
onEdit: y(d),
|
|
582
582
|
onClear: y(g)
|
|
583
583
|
}, null, 8, [
|
|
584
584
|
"segments",
|
|
585
585
|
"onEdit",
|
|
586
586
|
"onClear"
|
|
587
|
-
]), y(c) ? (o(), x(
|
|
587
|
+
]), y(c) ? (o(), x(vn, {
|
|
588
588
|
key: 0,
|
|
589
589
|
disabled: y(l),
|
|
590
590
|
onInsert: y(b)
|
|
591
|
-
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (o(), _("div",
|
|
591
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (o(), _("div", bn, [T("textarea", {
|
|
592
592
|
ref_key: "textareaRef",
|
|
593
593
|
ref: i,
|
|
594
|
-
class: w(
|
|
594
|
+
class: w(Sn),
|
|
595
595
|
value: e.modelValue,
|
|
596
596
|
placeholder: e.placeholder,
|
|
597
597
|
rows: e.rows,
|
|
598
598
|
onInput: n[0] ||= (...e) => y(h) && y(h)(...e),
|
|
599
599
|
onBlur: n[1] ||= (...e) => y(p) && y(p)(...e),
|
|
600
600
|
onKeydown: n[2] ||= m((...e) => y(p) && y(p)(...e), ["escape"])
|
|
601
|
-
}, null, 40,
|
|
601
|
+
}, null, 40, xn), y(c) ? (o(), x(vn, {
|
|
602
602
|
key: 0,
|
|
603
603
|
disabled: y(l),
|
|
604
604
|
onInsert: y(b)
|
|
605
605
|
}, null, 8, ["disabled", "onInsert"])) : v("", !0)]));
|
|
606
606
|
}
|
|
607
|
-
}),
|
|
607
|
+
}), Tn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, En = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, Dn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, On = { class: "tpl:mb-3.5" }, kn = { 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)]" }, An = ["onClick"], jn = { class: "tpl:flex tpl:items-stretch" }, Mn = ["value"], Nn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Pn = { class: "tpl:mb-3.5" }, Fn = ["value"], In = ["value"], Ln = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Rn = ["value"], zn = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Bn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Vn = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Hn = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Un = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, Wn = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, Gn = { 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)]" }, Kn = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, qn = { class: "tpl:mb-1 tpl:last:mb-0" }, Jn = { class: "tpl:mb-1 tpl:last:mb-0" }, Yn = { class: "tpl:mb-1 tpl:last:mb-0" }, Xn = 150, Zn = /* @__PURE__ */ j({
|
|
608
608
|
__name: "TemplateSettings",
|
|
609
609
|
props: { settings: {} },
|
|
610
610
|
emits: ["update"],
|
|
611
611
|
setup(e, { emit: t }) {
|
|
612
|
-
let n = e, r = t, { t: i } =
|
|
612
|
+
let n = e, r = t, { t: i } = B(), a = Je(ke, "TemplateSettings"), s = g(() => a.fonts.value), l = g(() => s.value.some((e) => e.value === n.settings.fontFamily) ? n.settings.fontFamily : a.defaultFont.value), u = [
|
|
613
613
|
{
|
|
614
614
|
value: 480,
|
|
615
615
|
label: "480px"
|
|
@@ -627,14 +627,14 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
627
627
|
label: "800px"
|
|
628
628
|
}
|
|
629
629
|
];
|
|
630
|
-
return (t, n) => (o(), _("aside",
|
|
631
|
-
T("div", { class: w(y(
|
|
632
|
-
T("div",
|
|
630
|
+
return (t, n) => (o(), _("aside", Tn, [T("div", En, [
|
|
631
|
+
T("div", { class: w(y(Ft)) }, [
|
|
632
|
+
T("div", Dn, [M(y(bt), {
|
|
633
633
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
634
634
|
size: 14,
|
|
635
635
|
"stroke-width": 2
|
|
636
636
|
}), T("span", null, h(y(i).templateSettings.layout), 1)]),
|
|
637
|
-
T("div",
|
|
637
|
+
T("div", On, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.widthPreset), 3), T("div", kn, [(o(), _(k, null, c(u, (t) => T("button", {
|
|
638
638
|
key: t.value,
|
|
639
639
|
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)]",
|
|
640
640
|
style: D({
|
|
@@ -643,37 +643,37 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
643
643
|
boxShadow: e.settings.width === t.value ? "var(--tpl-shadow)" : "none"
|
|
644
644
|
}),
|
|
645
645
|
onClick: (e) => r("update", { width: t.value })
|
|
646
|
-
}, h(t.label), 13,
|
|
647
|
-
T("div", null, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.customWidth), 3), T("div",
|
|
646
|
+
}, h(t.label), 13, An)), 64))])]),
|
|
647
|
+
T("div", null, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.customWidth), 3), T("div", jn, [T("input", {
|
|
648
648
|
type: "number",
|
|
649
649
|
class: w(y(K)),
|
|
650
650
|
value: e.settings.width,
|
|
651
651
|
min: "300",
|
|
652
652
|
max: "900",
|
|
653
653
|
onInput: n[0] ||= (e) => r("update", { width: Number(e.target.value) })
|
|
654
|
-
}, null, 42,
|
|
654
|
+
}, null, 42, Mn), T("span", { class: w(y(G)) }, "px", 2)])])
|
|
655
655
|
], 2),
|
|
656
|
-
T("div", { class: w(y(
|
|
657
|
-
T("div",
|
|
656
|
+
T("div", { class: w(y(Ft)) }, [
|
|
657
|
+
T("div", Nn, [M(y(_t), {
|
|
658
658
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
659
659
|
size: 14,
|
|
660
660
|
"stroke-width": 2
|
|
661
661
|
}), T("span", null, h(y(i).templateSettings.appearance), 1)]),
|
|
662
|
-
T("div",
|
|
662
|
+
T("div", Pn, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.backgroundColor), 3), M(q, {
|
|
663
663
|
"model-value": e.settings.backgroundColor,
|
|
664
|
-
placeholder: y(
|
|
664
|
+
placeholder: y(Lt),
|
|
665
665
|
"onUpdate:modelValue": n[1] ||= (e) => r("update", { backgroundColor: e })
|
|
666
666
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
667
667
|
T("div", null, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.fontFamily), 3), T("select", {
|
|
668
668
|
class: w(y(U)),
|
|
669
669
|
value: l.value,
|
|
670
670
|
onChange: n[2] ||= (e) => r("update", { fontFamily: e.target.value })
|
|
671
|
-
}, [(o(!0), _(
|
|
671
|
+
}, [(o(!0), _(k, null, c(s.value, (e) => (o(), _("option", {
|
|
672
672
|
key: e.value,
|
|
673
673
|
value: e.value
|
|
674
|
-
}, h(e.label), 9,
|
|
674
|
+
}, h(e.label), 9, In))), 128))], 42, Fn)])
|
|
675
675
|
], 2),
|
|
676
|
-
T("div", { class: w(y(
|
|
676
|
+
T("div", { class: w(y(Ft)) }, [T("div", Ln, [M(y(ht), {
|
|
677
677
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
678
678
|
size: 14,
|
|
679
679
|
"stroke-width": 2
|
|
@@ -688,34 +688,34 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
688
688
|
autocapitalize: "off",
|
|
689
689
|
autocomplete: "off",
|
|
690
690
|
onInput: n[3] ||= (e) => r("update", { locale: e.target.value.trim() || void 0 })
|
|
691
|
-
}, null, 42,
|
|
692
|
-
T("p",
|
|
691
|
+
}, null, 42, Rn),
|
|
692
|
+
T("p", zn, h(y(i).templateSettings.contentLocaleHint), 1)
|
|
693
693
|
])], 2),
|
|
694
|
-
T("div", { class: w(y(
|
|
694
|
+
T("div", { class: w(y(Ft)) }, [T("div", Bn, [M(y(Le), {
|
|
695
695
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
696
696
|
size: 14,
|
|
697
697
|
"stroke-width": 2
|
|
698
|
-
}), T("span", null, h(y(i).templateSettings.preheaderText), 1)]), T("div", null, [
|
|
698
|
+
}), T("span", null, h(y(i).templateSettings.preheaderText), 1)]), T("div", null, [M(wn, {
|
|
699
699
|
"model-value": e.settings.preheaderText ?? "",
|
|
700
700
|
placeholder: y(i).templateSettings.preheaderTextPlaceholder,
|
|
701
701
|
rows: 2,
|
|
702
702
|
"onUpdate:modelValue": n[4] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
703
|
-
}, null, 8, ["model-value", "placeholder"]), T("div",
|
|
704
|
-
T("div",
|
|
703
|
+
}, null, 8, ["model-value", "placeholder"]), T("div", Vn, [T("span", Hn, h(y(i).templateSettings.preheaderTextHint), 1), T("span", Un, h((e.settings.preheaderText ?? "").length) + "/" + h(Xn), 1)])])], 2),
|
|
704
|
+
T("div", Wn, [T("div", Gn, [M(y(Ne), {
|
|
705
705
|
size: 14,
|
|
706
706
|
"stroke-width": 2
|
|
707
|
-
}), T("span", null, h(y(i).templateSettings.tips), 1)]), T("ul",
|
|
708
|
-
T("li",
|
|
709
|
-
T("li",
|
|
710
|
-
T("li",
|
|
707
|
+
}), T("span", null, h(y(i).templateSettings.tips), 1)]), T("ul", Kn, [
|
|
708
|
+
T("li", qn, h(y(i).templateSettings.tip1), 1),
|
|
709
|
+
T("li", Jn, h(y(i).templateSettings.tip2), 1),
|
|
710
|
+
T("li", Yn, h(y(i).templateSettings.tip3), 1)
|
|
711
711
|
])])
|
|
712
712
|
])]));
|
|
713
713
|
}
|
|
714
|
-
}),
|
|
714
|
+
}), Qn = { key: 0 }, $n = { key: 1 }, er = [
|
|
715
715
|
"type",
|
|
716
716
|
"value",
|
|
717
717
|
"placeholder"
|
|
718
|
-
],
|
|
718
|
+
], tr = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", X = /*#__PURE__*/ Ue(/* @__PURE__ */ j({
|
|
719
719
|
__name: "MergeTagInput",
|
|
720
720
|
props: {
|
|
721
721
|
modelValue: {},
|
|
@@ -728,14 +728,14 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
728
728
|
},
|
|
729
729
|
emits: ["update:modelValue"],
|
|
730
730
|
setup(e, { emit: t }) {
|
|
731
|
-
let n = e, r = t, i = f(null), { segments: a, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: d, stopEditing: p, handleInput: h, clearValue: g, insertMergeTag: b } =
|
|
731
|
+
let n = e, r = t, i = f(null), { segments: a, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: d, stopEditing: p, handleInput: h, clearValue: g, insertMergeTag: b } = ln({
|
|
732
732
|
modelValue: () => n.modelValue,
|
|
733
733
|
emit: (e) => r("update:modelValue", e),
|
|
734
734
|
elementRef: i
|
|
735
735
|
});
|
|
736
|
-
return (t, n) => y(s) && !y(u) ? (o(), _("div",
|
|
736
|
+
return (t, n) => y(s) && !y(u) ? (o(), _("div", Qn, [M(hn, {
|
|
737
737
|
segments: y(a),
|
|
738
|
-
"display-class":
|
|
738
|
+
"display-class": tr,
|
|
739
739
|
pulse: e.pulse,
|
|
740
740
|
onEdit: y(d),
|
|
741
741
|
onClear: y(g)
|
|
@@ -744,11 +744,11 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
744
744
|
"pulse",
|
|
745
745
|
"onEdit",
|
|
746
746
|
"onClear"
|
|
747
|
-
]), y(c) ? (o(), x(
|
|
747
|
+
]), y(c) ? (o(), x(vn, {
|
|
748
748
|
key: 0,
|
|
749
749
|
disabled: y(l),
|
|
750
750
|
onInsert: y(b)
|
|
751
|
-
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (o(), _("div",
|
|
751
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (o(), _("div", $n, [T("input", {
|
|
752
752
|
ref_key: "inputRef",
|
|
753
753
|
ref: i,
|
|
754
754
|
type: e.type,
|
|
@@ -758,19 +758,19 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
758
758
|
onInput: n[0] ||= (...e) => y(h) && y(h)(...e),
|
|
759
759
|
onBlur: n[1] ||= (...e) => y(p) && y(p)(...e),
|
|
760
760
|
onKeydown: n[2] ||= m((...e) => y(p) && y(p)(...e), ["escape"])
|
|
761
|
-
}, null, 42,
|
|
761
|
+
}, null, 42, er), y(c) ? (o(), x(vn, {
|
|
762
762
|
key: 0,
|
|
763
763
|
disabled: y(l),
|
|
764
764
|
onInsert: y(b)
|
|
765
765
|
}, null, 8, ["disabled", "onInsert"])) : v("", !0)]));
|
|
766
766
|
}
|
|
767
|
-
}), [["__scopeId", "data-v-358207dd"]]),
|
|
767
|
+
}), [["__scopeId", "data-v-358207dd"]]), nr = { class: "tpl:mb-3.5" }, rr = ["value"], ir = { value: "" }, ar = ["value"], or = { class: "tpl:mb-3.5" }, sr = { class: "tpl:mb-3.5" }, cr = {
|
|
768
768
|
key: 0,
|
|
769
769
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
770
|
-
},
|
|
770
|
+
}, lr = ["checked"], ur = { class: "tpl:mb-3.5" }, dr = { class: "tpl:mb-3.5" }, fr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, pr = { class: "tpl:mb-3.5" }, mr = { class: "tpl:flex tpl:items-stretch" }, hr = ["value"], gr = { class: "tpl:mb-3.5" }, _r = { class: "tpl:flex tpl:items-stretch" }, vr = ["value"], yr = { class: "tpl:mb-3.5" }, br = ["value"], xr = { value: "auto" }, Sr = { value: "full" }, Cr = { value: "custom" }, wr = {
|
|
771
771
|
key: 0,
|
|
772
772
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
773
|
-
},
|
|
773
|
+
}, Tr = ["value"], Er = 200, Dr = /* @__PURE__ */ j({
|
|
774
774
|
__name: "ButtonToolbar",
|
|
775
775
|
props: {
|
|
776
776
|
block: {},
|
|
@@ -778,7 +778,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
778
778
|
},
|
|
779
779
|
emits: ["update"],
|
|
780
780
|
setup(e, { emit: t }) {
|
|
781
|
-
let n = e, r = t, { t: i } =
|
|
781
|
+
let n = e, r = t, { t: i } = B(), a = g(() => n.block.width === "full" ? "full" : typeof n.block.width == "number" ? "custom" : "auto");
|
|
782
782
|
function s(e, t) {
|
|
783
783
|
r("update", { [e]: t });
|
|
784
784
|
}
|
|
@@ -788,7 +788,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
788
788
|
return;
|
|
789
789
|
}
|
|
790
790
|
if (e === "custom") {
|
|
791
|
-
s("width", typeof n.block.width == "number" ? n.block.width :
|
|
791
|
+
s("width", typeof n.block.width == "number" ? n.block.width : Er);
|
|
792
792
|
return;
|
|
793
793
|
}
|
|
794
794
|
s("width", void 0);
|
|
@@ -797,80 +797,80 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
797
797
|
let t = Number(e);
|
|
798
798
|
!Number.isFinite(t) || t <= 0 || s("width", t);
|
|
799
799
|
}
|
|
800
|
-
return (t, n) => (o(), _(
|
|
801
|
-
T("div",
|
|
800
|
+
return (t, n) => (o(), _(k, null, [
|
|
801
|
+
T("div", nr, [T("label", { class: w(y(W)) }, h(y(i).button.fontFamily), 3), T("select", {
|
|
802
802
|
class: w(y(U)),
|
|
803
803
|
value: e.block.fontFamily || "",
|
|
804
804
|
onChange: n[0] ||= (e) => s("fontFamily", e.target.value || void 0)
|
|
805
|
-
}, [T("option",
|
|
805
|
+
}, [T("option", ir, h(y(i).button.inheritFont), 1), (o(!0), _(k, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
806
806
|
key: e.value,
|
|
807
807
|
value: e.value
|
|
808
|
-
}, h(e.label), 9,
|
|
809
|
-
T("div",
|
|
808
|
+
}, h(e.label), 9, ar))), 128))], 42, rr)]),
|
|
809
|
+
T("div", or, [T("label", { class: w(y(W)) }, h(y(i).button.text), 3), M(X, {
|
|
810
810
|
"model-value": e.block.text,
|
|
811
811
|
type: "text",
|
|
812
812
|
"onUpdate:modelValue": n[1] ||= (e) => s("text", e)
|
|
813
813
|
}, null, 8, ["model-value"])]),
|
|
814
|
-
T("div",
|
|
814
|
+
T("div", sr, [
|
|
815
815
|
T("label", { class: w(y(W)) }, h(y(i).button.url), 3),
|
|
816
|
-
|
|
816
|
+
M(X, {
|
|
817
817
|
"model-value": e.block.url,
|
|
818
818
|
type: "url",
|
|
819
819
|
placeholder: y(i).button.urlPlaceholder,
|
|
820
820
|
"onUpdate:modelValue": n[2] ||= (e) => s("url", e)
|
|
821
821
|
}, null, 8, ["model-value", "placeholder"]),
|
|
822
|
-
e.block.url ? (o(), _("label",
|
|
822
|
+
e.block.url ? (o(), _("label", cr, [T("input", {
|
|
823
823
|
type: "checkbox",
|
|
824
824
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
825
825
|
checked: e.block.openInNewTab ?? !1,
|
|
826
826
|
onChange: n[3] ||= (e) => s("openInNewTab", e.target.checked)
|
|
827
|
-
}, null, 40,
|
|
827
|
+
}, null, 40, lr), A(" " + h(y(i).button.openInNewTab), 1)])) : v("", !0)
|
|
828
828
|
]),
|
|
829
|
-
T("div",
|
|
829
|
+
T("div", ur, [T("label", { class: w(y(W)) }, h(y(i).button.background), 3), M(q, {
|
|
830
830
|
"model-value": e.block.backgroundColor,
|
|
831
831
|
"onUpdate:modelValue": n[4] ||= (e) => s("backgroundColor", e)
|
|
832
832
|
}, null, 8, ["model-value"])]),
|
|
833
|
-
T("div",
|
|
833
|
+
T("div", dr, [T("label", { class: w(y(W)) }, h(y(i).button.textColor), 3), M(q, {
|
|
834
834
|
"model-value": e.block.textColor,
|
|
835
835
|
"onUpdate:modelValue": n[5] ||= (e) => s("textColor", e)
|
|
836
836
|
}, null, 8, ["model-value"])]),
|
|
837
|
-
T("div",
|
|
837
|
+
T("div", fr, [T("div", pr, [T("label", { class: w(y(W)) }, h(y(i).button.borderRadius), 3), T("div", mr, [T("input", {
|
|
838
838
|
type: "number",
|
|
839
839
|
class: w(y(K)),
|
|
840
840
|
value: e.block.borderRadius,
|
|
841
841
|
min: "0",
|
|
842
842
|
max: "50",
|
|
843
843
|
onInput: n[6] ||= (e) => s("borderRadius", Number(e.target.value))
|
|
844
|
-
}, null, 42,
|
|
844
|
+
}, null, 42, hr), T("span", { class: w(y(G)) }, "px", 2)])]), T("div", gr, [T("label", { class: w(y(W)) }, h(y(i).button.fontSize), 3), T("div", _r, [T("input", {
|
|
845
845
|
type: "number",
|
|
846
846
|
class: w(y(K)),
|
|
847
847
|
value: e.block.fontSize,
|
|
848
848
|
min: "10",
|
|
849
849
|
max: "36",
|
|
850
850
|
onInput: n[7] ||= (e) => s("fontSize", Number(e.target.value))
|
|
851
|
-
}, null, 42,
|
|
852
|
-
T("div",
|
|
851
|
+
}, null, 42, vr), T("span", { class: w(y(G)) }, "px", 2)])])]),
|
|
852
|
+
T("div", yr, [
|
|
853
853
|
T("label", { class: w(y(W)) }, h(y(i).button.width), 3),
|
|
854
854
|
T("select", {
|
|
855
855
|
class: w(y(U)),
|
|
856
856
|
value: a.value,
|
|
857
857
|
onChange: n[8] ||= (e) => l(e.target.value)
|
|
858
858
|
}, [
|
|
859
|
-
T("option",
|
|
860
|
-
T("option",
|
|
861
|
-
T("option",
|
|
862
|
-
], 42,
|
|
863
|
-
a.value === "custom" ? (o(), _("div",
|
|
859
|
+
T("option", xr, h(y(i).button.widthAuto), 1),
|
|
860
|
+
T("option", Sr, h(y(i).button.fullWidth), 1),
|
|
861
|
+
T("option", Cr, h(y(i).button.widthCustom), 1)
|
|
862
|
+
], 42, br),
|
|
863
|
+
a.value === "custom" ? (o(), _("div", wr, [T("input", {
|
|
864
864
|
type: "number",
|
|
865
865
|
class: w(y(K)),
|
|
866
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
866
|
+
value: typeof e.block.width == "number" ? e.block.width : Er,
|
|
867
867
|
min: "20",
|
|
868
868
|
onInput: n[9] ||= (e) => u(e.target.value)
|
|
869
|
-
}, null, 42,
|
|
869
|
+
}, null, 42, Tr), T("span", { class: w(y(G)) }, "px", 2)])) : v("", !0)
|
|
870
870
|
])
|
|
871
871
|
], 64));
|
|
872
872
|
}
|
|
873
|
-
}),
|
|
873
|
+
}), Or = { class: "spacing-control" }, kr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ar = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, jr = { class: "tpl:flex tpl:items-center" }, Mr = ["aria-label"], Nr = ["value", "aria-label"], Pr = ["aria-label"], Fr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ir = { class: "tpl:flex tpl:items-center" }, Lr = ["aria-label"], Rr = ["value", "aria-label"], zr = ["aria-label"], Br = ["aria-label", "title"], Vr = { class: "tpl:flex tpl:items-center" }, Hr = ["aria-label"], Ur = ["value", "aria-label"], Wr = ["aria-label"], Gr = { class: "tpl:flex tpl:items-center" }, Kr = ["aria-label"], qr = ["value", "aria-label"], Jr = ["aria-label"], Z = "tpl:flex tpl:items-center tpl:justify-center tpl:w-8 tpl:h-8 tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:cursor-pointer tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)] active:tpl:bg-[var(--tpl-bg-active)]", Yr = "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)]", Xr = /*#__PURE__*/ Ue(/* @__PURE__ */ j({
|
|
874
874
|
__name: "SpacingControl",
|
|
875
875
|
props: {
|
|
876
876
|
modelValue: {},
|
|
@@ -878,8 +878,8 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
878
878
|
},
|
|
879
879
|
emits: ["update:modelValue"],
|
|
880
880
|
setup(e, { emit: t }) {
|
|
881
|
-
let n = e, r = t, { t: i } =
|
|
882
|
-
|
|
881
|
+
let n = e, r = t, { t: i } = B(), a = g(() => n.modelValue.top === n.modelValue.right && n.modelValue.right === n.modelValue.bottom && n.modelValue.bottom === n.modelValue.left), s = f(a.value);
|
|
882
|
+
N(a, (e) => {
|
|
883
883
|
!e && s.value && (s.value = !1);
|
|
884
884
|
});
|
|
885
885
|
function c(e, t) {
|
|
@@ -917,130 +917,130 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
|
-
return (t, n) => (o(), _("div",
|
|
921
|
-
T("div",
|
|
920
|
+
return (t, n) => (o(), _("div", Or, [T("label", kr, h(e.label), 1), T("div", Ar, [
|
|
921
|
+
T("div", jr, [
|
|
922
922
|
T("button", {
|
|
923
923
|
"aria-label": y(i).spacingControl.decreaseTop,
|
|
924
924
|
class: w([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
925
925
|
onClick: n[0] ||= (e) => c("top", -1)
|
|
926
|
-
}, [
|
|
926
|
+
}, [M(y(Ct), {
|
|
927
927
|
size: 12,
|
|
928
928
|
"stroke-width": 2
|
|
929
|
-
})], 10,
|
|
929
|
+
})], 10, Mr),
|
|
930
930
|
T("input", {
|
|
931
931
|
type: "number",
|
|
932
|
-
class: w(
|
|
932
|
+
class: w(Yr),
|
|
933
933
|
value: e.modelValue.top,
|
|
934
934
|
"aria-label": y(i).spacingControl.top,
|
|
935
935
|
min: "0",
|
|
936
936
|
onInput: n[1] ||= (e) => l("top", Number(e.target.value))
|
|
937
|
-
}, null, 40,
|
|
937
|
+
}, null, 40, Nr),
|
|
938
938
|
T("button", {
|
|
939
939
|
"aria-label": y(i).spacingControl.increaseTop,
|
|
940
940
|
class: w([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
941
941
|
onClick: n[2] ||= (e) => c("top", 1)
|
|
942
|
-
}, [
|
|
942
|
+
}, [M(y(H), {
|
|
943
943
|
size: 12,
|
|
944
944
|
"stroke-width": 2
|
|
945
|
-
})], 10,
|
|
945
|
+
})], 10, Pr)
|
|
946
946
|
]),
|
|
947
|
-
T("div",
|
|
948
|
-
T("div",
|
|
947
|
+
T("div", Fr, [
|
|
948
|
+
T("div", Ir, [
|
|
949
949
|
T("button", {
|
|
950
950
|
"aria-label": y(i).spacingControl.decreaseLeft,
|
|
951
951
|
class: w([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
952
952
|
onClick: n[3] ||= (e) => c("left", -1)
|
|
953
|
-
}, [
|
|
953
|
+
}, [M(y(Ct), {
|
|
954
954
|
size: 12,
|
|
955
955
|
"stroke-width": 2
|
|
956
|
-
})], 10,
|
|
956
|
+
})], 10, Lr),
|
|
957
957
|
T("input", {
|
|
958
958
|
type: "number",
|
|
959
|
-
class: w(
|
|
959
|
+
class: w(Yr),
|
|
960
960
|
value: e.modelValue.left,
|
|
961
961
|
"aria-label": y(i).spacingControl.left,
|
|
962
962
|
min: "0",
|
|
963
963
|
onInput: n[4] ||= (e) => l("left", Number(e.target.value))
|
|
964
|
-
}, null, 40,
|
|
964
|
+
}, null, 40, Rr),
|
|
965
965
|
T("button", {
|
|
966
966
|
"aria-label": y(i).spacingControl.increaseLeft,
|
|
967
967
|
class: w([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
968
968
|
onClick: n[5] ||= (e) => c("left", 1)
|
|
969
|
-
}, [
|
|
969
|
+
}, [M(y(H), {
|
|
970
970
|
size: 12,
|
|
971
971
|
"stroke-width": 2
|
|
972
|
-
})], 10,
|
|
972
|
+
})], 10, zr)
|
|
973
973
|
]),
|
|
974
974
|
T("button", {
|
|
975
975
|
class: w(["tpl:flex tpl:h-8 tpl:w-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", s.value ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
|
|
976
976
|
"aria-label": s.value ? y(i).spacingControl.unlock : y(i).spacingControl.lockAll,
|
|
977
977
|
title: s.value ? y(i).spacingControl.unlock : y(i).spacingControl.lockAll,
|
|
978
978
|
onClick: u
|
|
979
|
-
}, [s.value ? (o(), x(y(
|
|
979
|
+
}, [s.value ? (o(), x(y(ct), {
|
|
980
980
|
key: 0,
|
|
981
981
|
size: 14,
|
|
982
982
|
"stroke-width": 2
|
|
983
|
-
})) : (o(), x(y(
|
|
983
|
+
})) : (o(), x(y(yt), {
|
|
984
984
|
key: 1,
|
|
985
985
|
size: 14,
|
|
986
986
|
"stroke-width": 2
|
|
987
|
-
}))], 10,
|
|
988
|
-
T("div",
|
|
987
|
+
}))], 10, Br),
|
|
988
|
+
T("div", Vr, [
|
|
989
989
|
T("button", {
|
|
990
990
|
"aria-label": y(i).spacingControl.decreaseRight,
|
|
991
991
|
class: w([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
992
992
|
onClick: n[6] ||= (e) => c("right", -1)
|
|
993
|
-
}, [
|
|
993
|
+
}, [M(y(Ct), {
|
|
994
994
|
size: 12,
|
|
995
995
|
"stroke-width": 2
|
|
996
|
-
})], 10,
|
|
996
|
+
})], 10, Hr),
|
|
997
997
|
T("input", {
|
|
998
998
|
type: "number",
|
|
999
|
-
class: w(
|
|
999
|
+
class: w(Yr),
|
|
1000
1000
|
value: e.modelValue.right,
|
|
1001
1001
|
"aria-label": y(i).spacingControl.right,
|
|
1002
1002
|
min: "0",
|
|
1003
1003
|
onInput: n[7] ||= (e) => l("right", Number(e.target.value))
|
|
1004
|
-
}, null, 40,
|
|
1004
|
+
}, null, 40, Ur),
|
|
1005
1005
|
T("button", {
|
|
1006
1006
|
"aria-label": y(i).spacingControl.increaseRight,
|
|
1007
1007
|
class: w([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1008
1008
|
onClick: n[8] ||= (e) => c("right", 1)
|
|
1009
|
-
}, [
|
|
1009
|
+
}, [M(y(H), {
|
|
1010
1010
|
size: 12,
|
|
1011
1011
|
"stroke-width": 2
|
|
1012
|
-
})], 10,
|
|
1012
|
+
})], 10, Wr)
|
|
1013
1013
|
])
|
|
1014
1014
|
]),
|
|
1015
|
-
T("div",
|
|
1015
|
+
T("div", Gr, [
|
|
1016
1016
|
T("button", {
|
|
1017
1017
|
"aria-label": y(i).spacingControl.decreaseBottom,
|
|
1018
1018
|
class: w([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1019
1019
|
onClick: n[9] ||= (e) => c("bottom", -1)
|
|
1020
|
-
}, [
|
|
1020
|
+
}, [M(y(Ct), {
|
|
1021
1021
|
size: 12,
|
|
1022
1022
|
"stroke-width": 2
|
|
1023
|
-
})], 10,
|
|
1023
|
+
})], 10, Kr),
|
|
1024
1024
|
T("input", {
|
|
1025
1025
|
type: "number",
|
|
1026
|
-
class: w(
|
|
1026
|
+
class: w(Yr),
|
|
1027
1027
|
value: e.modelValue.bottom,
|
|
1028
1028
|
"aria-label": y(i).spacingControl.bottom,
|
|
1029
1029
|
min: "0",
|
|
1030
1030
|
onInput: n[10] ||= (e) => l("bottom", Number(e.target.value))
|
|
1031
|
-
}, null, 40,
|
|
1031
|
+
}, null, 40, qr),
|
|
1032
1032
|
T("button", {
|
|
1033
1033
|
"aria-label": y(i).spacingControl.increaseBottom,
|
|
1034
1034
|
class: w([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1035
1035
|
onClick: n[11] ||= (e) => c("bottom", 1)
|
|
1036
|
-
}, [
|
|
1036
|
+
}, [M(y(H), {
|
|
1037
1037
|
size: 12,
|
|
1038
1038
|
"stroke-width": 2
|
|
1039
|
-
})], 10,
|
|
1039
|
+
})], 10, Jr)
|
|
1040
1040
|
])
|
|
1041
1041
|
])]));
|
|
1042
1042
|
}
|
|
1043
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1043
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Zr = { class: "tpl:mt-3" }, Qr = /* @__PURE__ */ j({
|
|
1044
1044
|
__name: "CollapsibleSection",
|
|
1045
1045
|
props: {
|
|
1046
1046
|
title: {},
|
|
@@ -1053,25 +1053,25 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1053
1053
|
type: "button",
|
|
1054
1054
|
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)]",
|
|
1055
1055
|
onClick: i[0] ||= (e) => n.$emit("toggle")
|
|
1056
|
-
}, [
|
|
1056
|
+
}, [M(y(re), {
|
|
1057
1057
|
class: w(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1058
1058
|
size: 12,
|
|
1059
1059
|
"stroke-width": 2
|
|
1060
|
-
}, null, 8, ["class"]), T("span", null, h(e.title), 1)]), r(T("div",
|
|
1060
|
+
}, null, 8, ["class"]), T("span", null, h(e.title), 1)]), r(T("div", Zr, [t(n.$slots, "default")], 512), [[E, e.open]])], 2));
|
|
1061
1061
|
}
|
|
1062
|
-
}),
|
|
1062
|
+
}), $r = { class: "tpl:space-y-2" }, ei = ["checked", "onChange"], ti = { class: "tpl:space-y-2" }, ni = ["value"], ri = { value: "" }, ii = ["label"], ai = ["value"], oi = ["value"], si = {
|
|
1063
1063
|
key: 0,
|
|
1064
1064
|
value: "__custom__"
|
|
1065
|
-
},
|
|
1065
|
+
}, ci = {
|
|
1066
1066
|
key: 0,
|
|
1067
1067
|
class: "tpl:space-y-2"
|
|
1068
|
-
},
|
|
1068
|
+
}, li = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ui = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, di = { class: "tpl:flex tpl:justify-end" }, fi = ["disabled"], pi = {
|
|
1069
1069
|
key: 0,
|
|
1070
1070
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1071
|
-
},
|
|
1071
|
+
}, mi = { class: "tpl:space-y-1" }, hi = { 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)]" }, gi = {
|
|
1072
1072
|
key: 0,
|
|
1073
1073
|
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)]"
|
|
1074
|
-
},
|
|
1074
|
+
}, _i = /* @__PURE__ */ j({
|
|
1075
1075
|
__name: "CommonBlockSettings",
|
|
1076
1076
|
props: {
|
|
1077
1077
|
block: {},
|
|
@@ -1079,37 +1079,37 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1079
1079
|
},
|
|
1080
1080
|
emits: ["update"],
|
|
1081
1081
|
setup(e, { emit: t }) {
|
|
1082
|
-
let n = e, i = t, { t: s } =
|
|
1082
|
+
let n = e, i = t, { t: s } = B(), p = l(de, []), m = l(Ce, !1), b = d(/* @__PURE__ */ new Set()), S = f(!1), E = f(""), D = f(""), O = [{
|
|
1083
1083
|
key: "desktop",
|
|
1084
|
-
icon:
|
|
1084
|
+
icon: mt,
|
|
1085
1085
|
labelKey: "showOnDesktop"
|
|
1086
1086
|
}, {
|
|
1087
1087
|
key: "mobile",
|
|
1088
|
-
icon:
|
|
1088
|
+
icon: Tt,
|
|
1089
1089
|
labelKey: "showOnMobile"
|
|
1090
1090
|
}];
|
|
1091
|
-
function
|
|
1091
|
+
function j(e) {
|
|
1092
1092
|
b.has(e) ? b.delete(e) : b.add(e);
|
|
1093
1093
|
}
|
|
1094
|
-
let
|
|
1095
|
-
function
|
|
1096
|
-
S.value = !0,
|
|
1094
|
+
let P = g(() => p.length > 0 || m), F = g(() => n.block.displayCondition ? !p.some((e) => e.label === n.block.displayCondition?.label) : !1);
|
|
1095
|
+
function ee() {
|
|
1096
|
+
S.value = !0, F.value && n.block.displayCondition ? (E.value = n.block.displayCondition.before, D.value = n.block.displayCondition.after ?? "") : (E.value = "", D.value = "");
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function te() {
|
|
1099
1099
|
E.value.trim() && (i("update", { displayCondition: {
|
|
1100
1100
|
label: s.blockSettings.customCondition,
|
|
1101
1101
|
before: E.value.trim(),
|
|
1102
1102
|
after: D.value.trim()
|
|
1103
1103
|
} }), S.value = !1, E.value = "", D.value = "");
|
|
1104
1104
|
}
|
|
1105
|
-
|
|
1105
|
+
N(() => n.block.displayCondition, (e) => {
|
|
1106
1106
|
if (!e) {
|
|
1107
1107
|
S.value = !1, E.value = "", D.value = "";
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
|
-
|
|
1110
|
+
F.value && (E.value = e.before, D.value = e.after ?? "");
|
|
1111
1111
|
}, { immediate: !0 });
|
|
1112
|
-
let
|
|
1112
|
+
let I = g(() => {
|
|
1113
1113
|
let e = {};
|
|
1114
1114
|
for (let t of p) {
|
|
1115
1115
|
let n = t.group ?? "";
|
|
@@ -1117,33 +1117,33 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1117
1117
|
}
|
|
1118
1118
|
return e;
|
|
1119
1119
|
});
|
|
1120
|
-
function
|
|
1120
|
+
function L(e, t) {
|
|
1121
1121
|
i("update", { styles: {
|
|
1122
1122
|
...n.block.styles,
|
|
1123
1123
|
[e]: t
|
|
1124
1124
|
} });
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function R(e) {
|
|
1127
1127
|
return n.block.visibility?.[e] !== !1;
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1129
|
+
function ne(e) {
|
|
1130
1130
|
let t = {
|
|
1131
|
-
desktop:
|
|
1132
|
-
mobile:
|
|
1131
|
+
desktop: R("desktop"),
|
|
1132
|
+
mobile: R("mobile")
|
|
1133
1133
|
};
|
|
1134
1134
|
t[e] = !t[e], i("update", { visibility: t });
|
|
1135
1135
|
}
|
|
1136
1136
|
return (t, n) => (o(), _("div", { class: w(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1137
|
-
|
|
1137
|
+
M(Qr, {
|
|
1138
1138
|
title: y(s).blockSettings.spacing,
|
|
1139
1139
|
open: b.has("spacing"),
|
|
1140
1140
|
"no-border": e.isFirstSection,
|
|
1141
|
-
onToggle: n[1] ||= (e) =>
|
|
1141
|
+
onToggle: n[1] ||= (e) => j("spacing")
|
|
1142
1142
|
}, {
|
|
1143
|
-
default: u(() => [
|
|
1143
|
+
default: u(() => [M(Xr, {
|
|
1144
1144
|
label: y(s).blockSettings.padding,
|
|
1145
1145
|
"model-value": e.block.styles.padding,
|
|
1146
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1146
|
+
"onUpdate:modelValue": n[0] ||= (e) => L("padding", e)
|
|
1147
1147
|
}, null, 8, ["label", "model-value"])]),
|
|
1148
1148
|
_: 1
|
|
1149
1149
|
}, 8, [
|
|
@@ -1151,53 +1151,53 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1151
1151
|
"open",
|
|
1152
1152
|
"no-border"
|
|
1153
1153
|
]),
|
|
1154
|
-
|
|
1154
|
+
M(Qr, {
|
|
1155
1155
|
title: y(s).blockSettings.background,
|
|
1156
1156
|
open: b.has("bg"),
|
|
1157
|
-
onToggle: n[3] ||= (e) =>
|
|
1157
|
+
onToggle: n[3] ||= (e) => j("bg")
|
|
1158
1158
|
}, {
|
|
1159
|
-
default: u(() => [T("label", { class: w(y(W)) }, h(y(s).blockSettings.color), 3),
|
|
1159
|
+
default: u(() => [T("label", { class: w(y(W)) }, h(y(s).blockSettings.color), 3), M(q, {
|
|
1160
1160
|
"model-value": e.block.styles.backgroundColor ?? "",
|
|
1161
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
1161
|
+
"onUpdate:modelValue": n[2] ||= (e) => L("backgroundColor", e)
|
|
1162
1162
|
}, null, 8, ["model-value"])]),
|
|
1163
1163
|
_: 1
|
|
1164
1164
|
}, 8, ["title", "open"]),
|
|
1165
|
-
|
|
1165
|
+
M(Qr, {
|
|
1166
1166
|
title: y(s).blockSettings.display,
|
|
1167
1167
|
open: b.has("display"),
|
|
1168
|
-
onToggle: n[4] ||= (e) =>
|
|
1168
|
+
onToggle: n[4] ||= (e) => j("display")
|
|
1169
1169
|
}, {
|
|
1170
|
-
default: u(() => [T("div",
|
|
1170
|
+
default: u(() => [T("div", $r, [(o(), _(k, null, c(O, (e) => T("label", {
|
|
1171
1171
|
key: e.key,
|
|
1172
1172
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1173
1173
|
}, [
|
|
1174
1174
|
T("input", {
|
|
1175
1175
|
type: "checkbox",
|
|
1176
1176
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1177
|
-
checked:
|
|
1178
|
-
onChange: (t) =>
|
|
1179
|
-
}, null, 40,
|
|
1177
|
+
checked: R(e.key),
|
|
1178
|
+
onChange: (t) => ne(e.key)
|
|
1179
|
+
}, null, 40, ei),
|
|
1180
1180
|
(o(), x(a(e.icon), {
|
|
1181
1181
|
size: 14,
|
|
1182
1182
|
"stroke-width": 1.5
|
|
1183
1183
|
})),
|
|
1184
|
-
|
|
1184
|
+
A(" " + h(y(s).blockSettings[e.labelKey]), 1)
|
|
1185
1185
|
])), 64))])]),
|
|
1186
1186
|
_: 1
|
|
1187
1187
|
}, 8, ["title", "open"]),
|
|
1188
|
-
|
|
1188
|
+
P.value ? (o(), x(Qr, {
|
|
1189
1189
|
key: 0,
|
|
1190
1190
|
title: y(s).blockSettings.displayCondition,
|
|
1191
1191
|
open: b.has("condition"),
|
|
1192
|
-
onToggle: n[8] ||= (e) =>
|
|
1192
|
+
onToggle: n[8] ||= (e) => j("condition")
|
|
1193
1193
|
}, {
|
|
1194
|
-
default: u(() => [T("div",
|
|
1194
|
+
default: u(() => [T("div", ti, [T("select", {
|
|
1195
1195
|
class: w(["tpl:w-full tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:outline-none tpl:transition-all tpl:duration-150 tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", e.block.displayCondition ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-text)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"]),
|
|
1196
|
-
value: S.value ||
|
|
1196
|
+
value: S.value || F.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1197
1197
|
onChange: n[5] ||= (e) => {
|
|
1198
1198
|
let t = e.target.value;
|
|
1199
1199
|
if (t === "__custom__") {
|
|
1200
|
-
|
|
1200
|
+
ee();
|
|
1201
1201
|
return;
|
|
1202
1202
|
}
|
|
1203
1203
|
if (S.value = !1, !t) {
|
|
@@ -1208,48 +1208,48 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1208
1208
|
n && i("update", { displayCondition: n });
|
|
1209
1209
|
}
|
|
1210
1210
|
}, [
|
|
1211
|
-
T("option",
|
|
1212
|
-
(o(!0), _(
|
|
1211
|
+
T("option", ri, h(y(s).blockSettings.noCondition), 1),
|
|
1212
|
+
(o(!0), _(k, null, c(I.value, (e, t) => (o(), _(k, { key: t }, [t ? (o(), _("optgroup", {
|
|
1213
1213
|
key: 0,
|
|
1214
1214
|
label: String(t)
|
|
1215
|
-
}, [(o(!0), _(
|
|
1215
|
+
}, [(o(!0), _(k, null, c(e, (e) => (o(), _("option", {
|
|
1216
1216
|
key: e.label,
|
|
1217
1217
|
value: e.label
|
|
1218
|
-
}, h(e.label), 9,
|
|
1218
|
+
}, h(e.label), 9, ai))), 128))], 8, ii)) : (o(!0), _(k, { key: 1 }, c(e, (e) => (o(), _("option", {
|
|
1219
1219
|
key: e.label,
|
|
1220
1220
|
value: e.label
|
|
1221
|
-
}, h(e.label), 9,
|
|
1222
|
-
y(m) ? (o(), _("option",
|
|
1223
|
-
], 42,
|
|
1224
|
-
T("div", null, [T("label",
|
|
1221
|
+
}, h(e.label), 9, oi))), 128))], 64))), 128)),
|
|
1222
|
+
y(m) ? (o(), _("option", si, h(y(s).blockSettings.customCondition), 1)) : v("", !0)
|
|
1223
|
+
], 42, ni), S.value || F.value ? (o(), _("div", ci, [
|
|
1224
|
+
T("div", null, [T("label", li, h(y(s).blockSettings.customConditionBefore), 1), r(T("textarea", {
|
|
1225
1225
|
"onUpdate:modelValue": n[6] ||= (e) => E.value = e,
|
|
1226
1226
|
rows: "2",
|
|
1227
|
-
class: w(y(
|
|
1227
|
+
class: w(y(Pt))
|
|
1228
1228
|
}, null, 2), [[C, E.value]])]),
|
|
1229
|
-
T("div", null, [T("label",
|
|
1229
|
+
T("div", null, [T("label", ui, h(y(s).blockSettings.customConditionAfter), 1), r(T("textarea", {
|
|
1230
1230
|
"onUpdate:modelValue": n[7] ||= (e) => D.value = e,
|
|
1231
1231
|
rows: "2",
|
|
1232
|
-
class: w(y(
|
|
1232
|
+
class: w(y(Pt))
|
|
1233
1233
|
}, null, 2), [[C, D.value]])]),
|
|
1234
|
-
T("div",
|
|
1234
|
+
T("div", di, [T("button", {
|
|
1235
1235
|
type: "button",
|
|
1236
1236
|
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",
|
|
1237
1237
|
disabled: !E.value.trim(),
|
|
1238
|
-
onClick:
|
|
1239
|
-
}, h(y(s).blockSettings.applyCondition), 9,
|
|
1240
|
-
])) : e.block.displayCondition && !
|
|
1238
|
+
onClick: te
|
|
1239
|
+
}, h(y(s).blockSettings.applyCondition), 9, fi)])
|
|
1240
|
+
])) : e.block.displayCondition && !F.value ? (o(), _(k, { key: 1 }, [e.block.displayCondition.description ? (o(), _("p", pi, h(e.block.displayCondition.description), 1)) : v("", !0), T("div", mi, [T("pre", hi, h(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (o(), _("pre", gi, h(e.block.displayCondition.after), 1)) : v("", !0)])], 64)) : v("", !0)])]),
|
|
1241
1241
|
_: 1
|
|
1242
1242
|
}, 8, ["title", "open"])) : v("", !0)
|
|
1243
1243
|
], 2));
|
|
1244
1244
|
}
|
|
1245
|
-
}),
|
|
1245
|
+
}), vi = ["title"], yi = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, bi = {
|
|
1246
1246
|
key: 1,
|
|
1247
1247
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1248
|
-
},
|
|
1248
|
+
}, xi = [
|
|
1249
1249
|
"aria-checked",
|
|
1250
1250
|
"aria-label",
|
|
1251
1251
|
"disabled"
|
|
1252
|
-
],
|
|
1252
|
+
], Si = /* @__PURE__ */ j({
|
|
1253
1253
|
__name: "BooleanField",
|
|
1254
1254
|
props: {
|
|
1255
1255
|
field: {},
|
|
@@ -1258,18 +1258,18 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1258
1258
|
},
|
|
1259
1259
|
emits: ["update:modelValue"],
|
|
1260
1260
|
setup(e, { emit: t }) {
|
|
1261
|
-
let n = t, { t: r } =
|
|
1261
|
+
let n = t, { t: r } = B();
|
|
1262
1262
|
return (t, i) => (o(), _("div", {
|
|
1263
1263
|
class: "tpl:mb-3.5",
|
|
1264
1264
|
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1265
|
-
}, [T("label", { class: w(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [T("span",
|
|
1266
|
-
|
|
1267
|
-
e.readOnly ? (o(), x(y(
|
|
1265
|
+
}, [T("label", { class: w(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [T("span", yi, [
|
|
1266
|
+
A(h(e.field.label) + " ", 1),
|
|
1267
|
+
e.readOnly ? (o(), x(y(ct), {
|
|
1268
1268
|
key: 0,
|
|
1269
1269
|
size: 12,
|
|
1270
1270
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1271
1271
|
})) : v("", !0),
|
|
1272
|
-
e.field.required ? (o(), _("span",
|
|
1272
|
+
e.field.required ? (o(), _("span", bi, " * ")) : v("", !0)
|
|
1273
1273
|
]), T("button", {
|
|
1274
1274
|
type: "button",
|
|
1275
1275
|
role: "switch",
|
|
@@ -1282,12 +1282,12 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1282
1282
|
]),
|
|
1283
1283
|
disabled: e.readOnly,
|
|
1284
1284
|
onClick: i[0] ||= (t) => !e.readOnly && n("update:modelValue", !e.modelValue)
|
|
1285
|
-
}, [T("span", { class: w(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10,
|
|
1285
|
+
}, [T("span", { class: w(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, xi)], 2)], 8, vi));
|
|
1286
1286
|
}
|
|
1287
|
-
}),
|
|
1287
|
+
}), Ci = { class: "tpl:mb-3.5" }, wi = {
|
|
1288
1288
|
key: 1,
|
|
1289
1289
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1290
|
-
}, Q = /* @__PURE__ */
|
|
1290
|
+
}, Q = /* @__PURE__ */ j({
|
|
1291
1291
|
__name: "FieldWrapper",
|
|
1292
1292
|
props: {
|
|
1293
1293
|
label: {},
|
|
@@ -1295,17 +1295,17 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1295
1295
|
readOnly: { type: Boolean }
|
|
1296
1296
|
},
|
|
1297
1297
|
setup(e) {
|
|
1298
|
-
return (n, r) => (o(), _("div",
|
|
1299
|
-
|
|
1300
|
-
e.readOnly ? (o(), x(y(
|
|
1298
|
+
return (n, r) => (o(), _("div", Ci, [T("label", { class: w(y(W)) }, [
|
|
1299
|
+
A(h(e.label) + " ", 1),
|
|
1300
|
+
e.readOnly ? (o(), x(y(ct), {
|
|
1301
1301
|
key: 0,
|
|
1302
1302
|
size: 12,
|
|
1303
1303
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1304
1304
|
})) : v("", !0),
|
|
1305
|
-
e.required ? (o(), _("span",
|
|
1305
|
+
e.required ? (o(), _("span", wi, "*")) : v("", !0)
|
|
1306
1306
|
], 2), t(n.$slots, "default")]));
|
|
1307
1307
|
}
|
|
1308
|
-
}),
|
|
1308
|
+
}), Ti = /* @__PURE__ */ j({
|
|
1309
1309
|
__name: "ColorField",
|
|
1310
1310
|
props: {
|
|
1311
1311
|
field: {},
|
|
@@ -1314,13 +1314,13 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1314
1314
|
},
|
|
1315
1315
|
emits: ["update:modelValue"],
|
|
1316
1316
|
setup(e, { emit: t }) {
|
|
1317
|
-
let n = t, { t: r } =
|
|
1317
|
+
let n = t, { t: r } = B();
|
|
1318
1318
|
return (t, i) => (o(), x(Q, {
|
|
1319
1319
|
label: e.field.label,
|
|
1320
1320
|
required: e.field.required,
|
|
1321
1321
|
"read-only": e.readOnly
|
|
1322
1322
|
}, {
|
|
1323
|
-
default: u(() => [
|
|
1323
|
+
default: u(() => [M(q, {
|
|
1324
1324
|
"model-value": e.modelValue,
|
|
1325
1325
|
placeholder: e.field.placeholder,
|
|
1326
1326
|
disabled: e.readOnly,
|
|
@@ -1339,11 +1339,15 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1339
1339
|
"read-only"
|
|
1340
1340
|
]));
|
|
1341
1341
|
}
|
|
1342
|
-
}),
|
|
1342
|
+
}), Ei = {
|
|
1343
|
+
key: 0,
|
|
1344
|
+
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1345
|
+
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
1346
|
+
}, Di = [
|
|
1343
1347
|
"value",
|
|
1344
1348
|
"placeholder",
|
|
1345
1349
|
"title"
|
|
1346
|
-
],
|
|
1350
|
+
], Oi = ["value", "placeholder"], ki = /* @__PURE__ */ j({
|
|
1347
1351
|
__name: "ImageField",
|
|
1348
1352
|
props: {
|
|
1349
1353
|
field: {},
|
|
@@ -1352,39 +1356,75 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1352
1356
|
},
|
|
1353
1357
|
emits: ["update:modelValue"],
|
|
1354
1358
|
setup(e, { emit: t }) {
|
|
1355
|
-
let n = t, { t:
|
|
1356
|
-
async function
|
|
1357
|
-
let e = await
|
|
1358
|
-
|
|
1359
|
+
let n = e, r = t, { t: i } = B(), a = l(P, null), s = z(), c = g(() => !!a);
|
|
1360
|
+
async function d() {
|
|
1361
|
+
let e = await a?.({ accept: ["images"] });
|
|
1362
|
+
s.alive && e && r("update:modelValue", e.url);
|
|
1363
|
+
}
|
|
1364
|
+
let p = f(), m = f(!1), b = g(() => c.value && !m.value && !n.readOnly);
|
|
1365
|
+
async function S(e) {
|
|
1366
|
+
if (a) {
|
|
1367
|
+
m.value = !0;
|
|
1368
|
+
try {
|
|
1369
|
+
let t = await a({
|
|
1370
|
+
accept: ["images"],
|
|
1371
|
+
files: e
|
|
1372
|
+
});
|
|
1373
|
+
if (!s.alive) return;
|
|
1374
|
+
t && r("update:modelValue", t.url);
|
|
1375
|
+
} finally {
|
|
1376
|
+
s.alive && (m.value = !1);
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1359
1379
|
}
|
|
1360
|
-
|
|
1380
|
+
let { isOver: C } = Oe({
|
|
1381
|
+
target: p,
|
|
1382
|
+
enabled: b,
|
|
1383
|
+
onFiles: S
|
|
1384
|
+
});
|
|
1385
|
+
return (t, n) => (o(), x(Q, {
|
|
1361
1386
|
label: e.field.label,
|
|
1362
1387
|
required: e.field.required,
|
|
1363
1388
|
"read-only": e.readOnly
|
|
1364
1389
|
}, {
|
|
1365
|
-
default: u(() => [
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
class:
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
key: 1,
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
"
|
|
1387
|
-
|
|
1390
|
+
default: u(() => [T("div", {
|
|
1391
|
+
ref_key: "dropZoneRef",
|
|
1392
|
+
ref: p,
|
|
1393
|
+
class: "tpl:relative"
|
|
1394
|
+
}, [
|
|
1395
|
+
b.value && (y(C) || m.value) ? (o(), _("div", Ei, [m.value ? (o(), _(k, { key: 0 }, [M(y(F), {
|
|
1396
|
+
class: "tpl-spinner",
|
|
1397
|
+
size: 18,
|
|
1398
|
+
"stroke-width": 2
|
|
1399
|
+
}), A(" " + h(y(i).image.uploading), 1)], 64)) : (o(), _(k, { key: 1 }, [M(y(tt), {
|
|
1400
|
+
size: 18,
|
|
1401
|
+
"stroke-width": 1.5
|
|
1402
|
+
}), A(" " + h(y(i).image.dropToUpload), 1)], 64))])) : v("", !0),
|
|
1403
|
+
e.readOnly ? (o(), _("input", {
|
|
1404
|
+
key: 1,
|
|
1405
|
+
type: "url",
|
|
1406
|
+
class: w([y(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1407
|
+
value: e.modelValue,
|
|
1408
|
+
placeholder: e.field.placeholder || "https://...",
|
|
1409
|
+
disabled: "",
|
|
1410
|
+
title: y(i).customBlocks.dataSource.readOnlyTooltip
|
|
1411
|
+
}, null, 10, Di)) : (o(), _("input", {
|
|
1412
|
+
key: 2,
|
|
1413
|
+
type: "url",
|
|
1414
|
+
class: w(y(U)),
|
|
1415
|
+
value: e.modelValue,
|
|
1416
|
+
placeholder: e.field.placeholder || "https://...",
|
|
1417
|
+
onInput: n[0] ||= (e) => r("update:modelValue", e.target.value)
|
|
1418
|
+
}, null, 42, Oi)),
|
|
1419
|
+
c.value && !e.readOnly ? (o(), _("button", {
|
|
1420
|
+
key: 3,
|
|
1421
|
+
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)]",
|
|
1422
|
+
onClick: n[1] ||= (e) => d()
|
|
1423
|
+
}, [M(y(rt), {
|
|
1424
|
+
size: 14,
|
|
1425
|
+
"stroke-width": 1.5
|
|
1426
|
+
}), A(" " + h(y(i).image.browseMedia), 1)])) : v("", !0)
|
|
1427
|
+
], 512)]),
|
|
1388
1428
|
_: 1
|
|
1389
1429
|
}, 8, [
|
|
1390
1430
|
"label",
|
|
@@ -1392,7 +1432,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1392
1432
|
"read-only"
|
|
1393
1433
|
]));
|
|
1394
1434
|
}
|
|
1395
|
-
}),
|
|
1435
|
+
}), Ai = [
|
|
1396
1436
|
"value",
|
|
1397
1437
|
"placeholder",
|
|
1398
1438
|
"min",
|
|
@@ -1400,7 +1440,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1400
1440
|
"step",
|
|
1401
1441
|
"disabled",
|
|
1402
1442
|
"title"
|
|
1403
|
-
],
|
|
1443
|
+
], ji = /* @__PURE__ */ j({
|
|
1404
1444
|
__name: "NumberField",
|
|
1405
1445
|
props: {
|
|
1406
1446
|
field: {},
|
|
@@ -1409,7 +1449,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1409
1449
|
},
|
|
1410
1450
|
emits: ["update:modelValue"],
|
|
1411
1451
|
setup(e, { emit: t }) {
|
|
1412
|
-
let n = t, { t: r } =
|
|
1452
|
+
let n = t, { t: r } = B();
|
|
1413
1453
|
return (t, i) => (o(), x(Q, {
|
|
1414
1454
|
label: e.field.label,
|
|
1415
1455
|
required: e.field.required,
|
|
@@ -1426,7 +1466,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1426
1466
|
disabled: e.readOnly,
|
|
1427
1467
|
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1428
1468
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
1429
|
-
}, null, 42,
|
|
1469
|
+
}, null, 42, Ai)]),
|
|
1430
1470
|
_: 1
|
|
1431
1471
|
}, 8, [
|
|
1432
1472
|
"label",
|
|
@@ -1434,10 +1474,10 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1434
1474
|
"read-only"
|
|
1435
1475
|
]));
|
|
1436
1476
|
}
|
|
1437
|
-
}),
|
|
1477
|
+
}), Mi = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ni = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, Pi = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Fi = ["title", "onClick"], Ii = {
|
|
1438
1478
|
key: 1,
|
|
1439
1479
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1440
|
-
},
|
|
1480
|
+
}, Li = /* @__PURE__ */ j({
|
|
1441
1481
|
__name: "RepeatableField",
|
|
1442
1482
|
props: {
|
|
1443
1483
|
field: {},
|
|
@@ -1446,7 +1486,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1446
1486
|
},
|
|
1447
1487
|
emits: ["update:modelValue"],
|
|
1448
1488
|
setup(e, { emit: t }) {
|
|
1449
|
-
let n = e, r = t, { t: i } =
|
|
1489
|
+
let n = e, r = t, { t: i } = B(), s = g(() => n.modelValue || []), l = g(() => !n.field.maxItems || s.value.length < n.field.maxItems), d = g(() => !n.field.minItems || s.value.length > n.field.minItems);
|
|
1450
1490
|
function f() {
|
|
1451
1491
|
if (!l.value || n.readOnly) return;
|
|
1452
1492
|
let e = {};
|
|
@@ -1469,20 +1509,20 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1469
1509
|
required: e.field.required,
|
|
1470
1510
|
"read-only": e.readOnly
|
|
1471
1511
|
}, {
|
|
1472
|
-
default: u(() => [T("div",
|
|
1473
|
-
(o(!0), _(
|
|
1512
|
+
default: u(() => [T("div", Mi, [
|
|
1513
|
+
(o(!0), _(k, null, c(s.value, (t, n) => (o(), _("div", {
|
|
1474
1514
|
key: `${e.field.key}-${n}`,
|
|
1475
1515
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1476
|
-
}, [T("div",
|
|
1516
|
+
}, [T("div", Ni, [T("span", Pi, " #" + h(n + 1), 1), d.value && !e.readOnly ? (o(), _("button", {
|
|
1477
1517
|
key: 0,
|
|
1478
1518
|
type: "button",
|
|
1479
1519
|
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)]",
|
|
1480
1520
|
title: y(i).customBlocks.fields.removeItem,
|
|
1481
1521
|
onClick: (e) => p(n)
|
|
1482
|
-
}, [
|
|
1522
|
+
}, [M(y(Re), {
|
|
1483
1523
|
size: 12,
|
|
1484
1524
|
"stroke-width": 2
|
|
1485
|
-
})], 8,
|
|
1525
|
+
})], 8, Fi)) : v("", !0)]), (o(!0), _(k, null, c(e.field.fields, (r) => (o(), x(a(y(Ki)(r.type)), {
|
|
1486
1526
|
key: r.key,
|
|
1487
1527
|
field: r,
|
|
1488
1528
|
"model-value": t[r.key],
|
|
@@ -1497,13 +1537,13 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1497
1537
|
l.value && !e.readOnly ? (o(), _("button", {
|
|
1498
1538
|
key: 0,
|
|
1499
1539
|
type: "button",
|
|
1500
|
-
class: w(y(
|
|
1540
|
+
class: w(y(Nt)),
|
|
1501
1541
|
onClick: f
|
|
1502
|
-
}, [
|
|
1542
|
+
}, [M(y(H), {
|
|
1503
1543
|
size: 14,
|
|
1504
1544
|
"stroke-width": 2
|
|
1505
|
-
}),
|
|
1506
|
-
!l.value && !e.readOnly ? (o(), _("p",
|
|
1545
|
+
}), A(" " + h(y(i).customBlocks.fields.addItem), 1)], 2)) : v("", !0),
|
|
1546
|
+
!l.value && !e.readOnly ? (o(), _("p", Ii, h(y(i).customBlocks.fields.maxItemsReached), 1)) : v("", !0)
|
|
1507
1547
|
])]),
|
|
1508
1548
|
_: 1
|
|
1509
1549
|
}, 8, [
|
|
@@ -1512,11 +1552,11 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1512
1552
|
"read-only"
|
|
1513
1553
|
]));
|
|
1514
1554
|
}
|
|
1515
|
-
}),
|
|
1555
|
+
}), Ri = [
|
|
1516
1556
|
"value",
|
|
1517
1557
|
"disabled",
|
|
1518
1558
|
"title"
|
|
1519
|
-
],
|
|
1559
|
+
], zi = ["value"], Bi = /* @__PURE__ */ j({
|
|
1520
1560
|
__name: "SelectField",
|
|
1521
1561
|
props: {
|
|
1522
1562
|
field: {},
|
|
@@ -1525,7 +1565,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1525
1565
|
},
|
|
1526
1566
|
emits: ["update:modelValue"],
|
|
1527
1567
|
setup(e, { emit: t }) {
|
|
1528
|
-
let n = t, { t: r } =
|
|
1568
|
+
let n = t, { t: r } = B();
|
|
1529
1569
|
return (t, i) => (o(), x(Q, {
|
|
1530
1570
|
label: e.field.label,
|
|
1531
1571
|
required: e.field.required,
|
|
@@ -1537,10 +1577,10 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1537
1577
|
disabled: e.readOnly,
|
|
1538
1578
|
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1539
1579
|
onChange: i[0] ||= (t) => !e.readOnly && n("update:modelValue", t.target.value)
|
|
1540
|
-
}, [(o(!0), _(
|
|
1580
|
+
}, [(o(!0), _(k, null, c(e.field.options, (e) => (o(), _("option", {
|
|
1541
1581
|
key: e.value,
|
|
1542
1582
|
value: e.value
|
|
1543
|
-
}, h(e.label), 9,
|
|
1583
|
+
}, h(e.label), 9, zi))), 128))], 42, Ri)]),
|
|
1544
1584
|
_: 1
|
|
1545
1585
|
}, 8, [
|
|
1546
1586
|
"label",
|
|
@@ -1548,11 +1588,11 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1548
1588
|
"read-only"
|
|
1549
1589
|
]));
|
|
1550
1590
|
}
|
|
1551
|
-
}),
|
|
1591
|
+
}), Vi = [
|
|
1552
1592
|
"value",
|
|
1553
1593
|
"placeholder",
|
|
1554
1594
|
"title"
|
|
1555
|
-
],
|
|
1595
|
+
], Hi = /* @__PURE__ */ j({
|
|
1556
1596
|
__name: "TextField",
|
|
1557
1597
|
props: {
|
|
1558
1598
|
field: {},
|
|
@@ -1561,7 +1601,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1561
1601
|
},
|
|
1562
1602
|
emits: ["update:modelValue"],
|
|
1563
1603
|
setup(e, { emit: t }) {
|
|
1564
|
-
let n = t, { t: r } =
|
|
1604
|
+
let n = t, { t: r } = B();
|
|
1565
1605
|
return (t, i) => (o(), x(Q, {
|
|
1566
1606
|
label: e.field.label,
|
|
1567
1607
|
required: e.field.required,
|
|
@@ -1575,7 +1615,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1575
1615
|
placeholder: e.field.placeholder,
|
|
1576
1616
|
disabled: "",
|
|
1577
1617
|
title: y(r).customBlocks.dataSource.readOnlyTooltip
|
|
1578
|
-
}, null, 10,
|
|
1618
|
+
}, null, 10, Vi)) : (o(), x(X, {
|
|
1579
1619
|
key: 1,
|
|
1580
1620
|
"model-value": e.modelValue,
|
|
1581
1621
|
placeholder: e.field.placeholder,
|
|
@@ -1588,13 +1628,13 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1588
1628
|
"read-only"
|
|
1589
1629
|
]));
|
|
1590
1630
|
}
|
|
1591
|
-
}),
|
|
1631
|
+
}), Ui = [
|
|
1592
1632
|
"value",
|
|
1593
1633
|
"placeholder",
|
|
1594
1634
|
"title"
|
|
1595
|
-
],
|
|
1596
|
-
text:
|
|
1597
|
-
textarea: /* @__PURE__ */
|
|
1635
|
+
], Wi = "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", Gi = {
|
|
1636
|
+
text: Hi,
|
|
1637
|
+
textarea: /* @__PURE__ */ j({
|
|
1598
1638
|
__name: "TextareaField",
|
|
1599
1639
|
props: {
|
|
1600
1640
|
field: {},
|
|
@@ -1603,7 +1643,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1603
1643
|
},
|
|
1604
1644
|
emits: ["update:modelValue"],
|
|
1605
1645
|
setup(e, { emit: t }) {
|
|
1606
|
-
let n = t, { t: r } =
|
|
1646
|
+
let n = t, { t: r } = B();
|
|
1607
1647
|
return (t, i) => (o(), x(Q, {
|
|
1608
1648
|
label: e.field.label,
|
|
1609
1649
|
required: e.field.required,
|
|
@@ -1616,8 +1656,8 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1616
1656
|
rows: "3",
|
|
1617
1657
|
disabled: "",
|
|
1618
1658
|
title: y(r).customBlocks.dataSource.readOnlyTooltip,
|
|
1619
|
-
class: w(
|
|
1620
|
-
}, null, 8,
|
|
1659
|
+
class: w(Wi)
|
|
1660
|
+
}, null, 8, Ui)) : (o(), x(wn, {
|
|
1621
1661
|
key: 1,
|
|
1622
1662
|
"model-value": e.modelValue,
|
|
1623
1663
|
placeholder: e.field.placeholder,
|
|
@@ -1631,42 +1671,42 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1631
1671
|
]));
|
|
1632
1672
|
}
|
|
1633
1673
|
}),
|
|
1634
|
-
image:
|
|
1635
|
-
color:
|
|
1636
|
-
number:
|
|
1637
|
-
select:
|
|
1638
|
-
boolean:
|
|
1639
|
-
repeatable:
|
|
1674
|
+
image: ki,
|
|
1675
|
+
color: Ti,
|
|
1676
|
+
number: ji,
|
|
1677
|
+
select: Bi,
|
|
1678
|
+
boolean: Si,
|
|
1679
|
+
repeatable: Li
|
|
1640
1680
|
};
|
|
1641
|
-
function
|
|
1642
|
-
return
|
|
1681
|
+
function Ki(e) {
|
|
1682
|
+
return Gi[e] ?? Hi;
|
|
1643
1683
|
}
|
|
1644
1684
|
//#endregion
|
|
1645
1685
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1646
|
-
var
|
|
1686
|
+
var qi = {
|
|
1647
1687
|
key: 0,
|
|
1648
1688
|
class: "tpl:p-4"
|
|
1649
|
-
},
|
|
1689
|
+
}, Ji = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Yi = { key: 1 }, Xi = {
|
|
1650
1690
|
key: 0,
|
|
1651
1691
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1652
|
-
},
|
|
1692
|
+
}, Zi = {
|
|
1653
1693
|
key: 1,
|
|
1654
1694
|
class: "tpl:mb-4"
|
|
1655
|
-
},
|
|
1695
|
+
}, Qi = {
|
|
1656
1696
|
key: 1,
|
|
1657
1697
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1658
|
-
},
|
|
1698
|
+
}, $i = {
|
|
1659
1699
|
key: 0,
|
|
1660
1700
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1661
|
-
},
|
|
1701
|
+
}, ea = {
|
|
1662
1702
|
key: 2,
|
|
1663
1703
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
1664
|
-
},
|
|
1704
|
+
}, ta = /* @__PURE__ */ j({
|
|
1665
1705
|
__name: "CustomBlockToolbar",
|
|
1666
1706
|
props: { block: {} },
|
|
1667
1707
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1668
1708
|
setup(e, { emit: t }) {
|
|
1669
|
-
let n = e, r = t, { t: i } =
|
|
1709
|
+
let n = e, r = t, { t: i } = B(), s = l(V, []), u = g(() => s.find((e) => e.type === n.block.customType)), { isFetching: d, fetchError: f, fetch: p, hasDataSource: m, needsFetch: b } = Me({
|
|
1670
1710
|
definition: u,
|
|
1671
1711
|
block: g(() => n.block),
|
|
1672
1712
|
onUpdate: (e, t) => {
|
|
@@ -1682,23 +1722,23 @@ var Ui = {
|
|
|
1682
1722
|
[e]: t
|
|
1683
1723
|
});
|
|
1684
1724
|
}
|
|
1685
|
-
return (t, n) => u.value ? (o(), _("div",
|
|
1686
|
-
u.value.description ? (o(), _("p",
|
|
1687
|
-
y(m) ? (o(), _("div",
|
|
1725
|
+
return (t, n) => u.value ? (o(), _("div", Yi, [
|
|
1726
|
+
u.value.description ? (o(), _("p", Xi, h(u.value.description), 1)) : v("", !0),
|
|
1727
|
+
y(m) ? (o(), _("div", Zi, [y(b) && !y(d) ? (o(), _("button", {
|
|
1688
1728
|
key: 0,
|
|
1689
1729
|
type: "button",
|
|
1690
1730
|
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)]",
|
|
1691
1731
|
onClick: n[0] ||= (...e) => y(p) && y(p)(...e)
|
|
1692
|
-
}, h(u.value?.dataSource?.label || y(i).customBlocks.dataSource.fetchButton), 1)) : (o(), _("div",
|
|
1732
|
+
}, h(u.value?.dataSource?.label || y(i).customBlocks.dataSource.fetchButton), 1)) : (o(), _("div", Qi, [y(d) ? (o(), _("div", $i, h(y(i).customBlocks.dataSource.fetching), 1)) : (o(), _("button", {
|
|
1693
1733
|
key: 1,
|
|
1694
1734
|
type: "button",
|
|
1695
1735
|
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)]",
|
|
1696
1736
|
onClick: n[1] ||= (...e) => y(p) && y(p)(...e)
|
|
1697
|
-
}, [
|
|
1737
|
+
}, [M(y(Ze), { size: 12 }), A(" " + h(y(i).customBlocks.dataSource.changeButton), 1)]))])), y(f) ? (o(), _("p", ea, [M(y(Ke), {
|
|
1698
1738
|
size: 14,
|
|
1699
1739
|
class: "tpl:shrink-0"
|
|
1700
|
-
}),
|
|
1701
|
-
(o(!0), _(
|
|
1740
|
+
}), A(" " + h(y(i).customBlocks.dataSource.fetchError), 1)])) : v("", !0)])) : v("", !0),
|
|
1741
|
+
(o(!0), _(k, null, c(u.value.fields, (t) => (o(), x(a(y(Ki)(t.type)), {
|
|
1702
1742
|
key: t.key,
|
|
1703
1743
|
field: t,
|
|
1704
1744
|
"model-value": e.block.fieldValues[t.key],
|
|
@@ -1710,19 +1750,19 @@ var Ui = {
|
|
|
1710
1750
|
"read-only",
|
|
1711
1751
|
"onUpdate:modelValue"
|
|
1712
1752
|
]))), 128))
|
|
1713
|
-
])) : (o(), _("div",
|
|
1753
|
+
])) : (o(), _("div", qi, [T("p", Ji, h(y(i).customBlocks.toolbar.noDefinition), 1)]));
|
|
1714
1754
|
}
|
|
1715
|
-
}),
|
|
1755
|
+
}), na = { class: "tpl:mb-3.5" }, ra = { class: "tpl:mb-3.5" }, ia = { class: "tpl:mb-3.5" }, aa = { class: "tpl:flex tpl:items-stretch" }, oa = ["value"], sa = /* @__PURE__ */ j({
|
|
1716
1756
|
__name: "DividerToolbar",
|
|
1717
1757
|
props: { block: {} },
|
|
1718
1758
|
emits: ["update"],
|
|
1719
1759
|
setup(e, { emit: t }) {
|
|
1720
|
-
let n = t, { t: r } =
|
|
1760
|
+
let n = t, { t: r } = B();
|
|
1721
1761
|
function i(e, t) {
|
|
1722
1762
|
n("update", { [e]: t });
|
|
1723
1763
|
}
|
|
1724
|
-
return (t, n) => (o(), _(
|
|
1725
|
-
T("div",
|
|
1764
|
+
return (t, n) => (o(), _(k, null, [
|
|
1765
|
+
T("div", na, [T("label", { class: w(y(W)) }, h(y(r).divider.style), 3), M(Y, {
|
|
1726
1766
|
options: [
|
|
1727
1767
|
{
|
|
1728
1768
|
value: "solid",
|
|
@@ -1740,56 +1780,60 @@ var Ui = {
|
|
|
1740
1780
|
"model-value": e.block.lineStyle,
|
|
1741
1781
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
1742
1782
|
}, null, 8, ["options", "model-value"])]),
|
|
1743
|
-
T("div",
|
|
1783
|
+
T("div", ra, [T("label", { class: w(y(W)) }, h(y(r).divider.color), 3), M(q, {
|
|
1744
1784
|
"model-value": e.block.color,
|
|
1745
1785
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
1746
1786
|
}, null, 8, ["model-value"])]),
|
|
1747
|
-
T("div",
|
|
1787
|
+
T("div", ia, [T("label", { class: w(y(W)) }, h(y(r).divider.thickness), 3), T("div", aa, [T("input", {
|
|
1748
1788
|
type: "number",
|
|
1749
1789
|
class: w(y(K)),
|
|
1750
1790
|
value: e.block.thickness,
|
|
1751
1791
|
min: "1",
|
|
1752
1792
|
max: "10",
|
|
1753
1793
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
1754
|
-
}, null, 42,
|
|
1794
|
+
}, null, 42, oa), T("span", { class: w(y(G)) }, "px", 2)])])
|
|
1755
1795
|
], 64));
|
|
1756
1796
|
}
|
|
1757
|
-
}),
|
|
1797
|
+
}), ca = { class: "tpl:mb-3.5" }, la = ["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)]" }, da = /* @__PURE__ */ j({
|
|
1758
1798
|
__name: "HtmlToolbar",
|
|
1759
1799
|
props: { block: {} },
|
|
1760
1800
|
emits: ["update"],
|
|
1761
1801
|
setup(e, { emit: t }) {
|
|
1762
|
-
let n = t, { t: r } =
|
|
1763
|
-
return (t, i) => (o(), _("div",
|
|
1802
|
+
let n = t, { t: r } = B();
|
|
1803
|
+
return (t, i) => (o(), _("div", ca, [
|
|
1764
1804
|
T("label", { class: w(y(W)) }, h(y(r).html.content), 3),
|
|
1765
1805
|
T("textarea", {
|
|
1766
1806
|
value: e.block.content,
|
|
1767
1807
|
placeholder: "<div>...</div>",
|
|
1768
1808
|
rows: "10",
|
|
1769
|
-
class: w(y(
|
|
1809
|
+
class: w(y(Pt)),
|
|
1770
1810
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
1771
|
-
}, null, 42,
|
|
1772
|
-
T("p",
|
|
1811
|
+
}, null, 42, la),
|
|
1812
|
+
T("p", ua, [M(y(Ne), {
|
|
1773
1813
|
size: 12,
|
|
1774
1814
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
1775
|
-
}),
|
|
1815
|
+
}), A(" " + h(y(r).html.sanitizationHint), 1)])
|
|
1776
1816
|
]));
|
|
1777
1817
|
}
|
|
1778
|
-
}),
|
|
1818
|
+
}), fa = { class: "tpl:mb-3.5" }, pa = {
|
|
1819
|
+
key: 0,
|
|
1820
|
+
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1821
|
+
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
1822
|
+
}, ma = {
|
|
1779
1823
|
key: 0,
|
|
1780
1824
|
class: "tpl:mb-3.5"
|
|
1781
|
-
},
|
|
1825
|
+
}, ha = ["value", "placeholder"], ga = { class: "tpl:mb-3.5" }, _a = { class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]" }, va = ["checked"], ya = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, ba = { class: "tpl:mb-3.5" }, xa = ["value"], Sa = { value: "full" }, Ca = { value: "custom" }, wa = {
|
|
1782
1826
|
key: 0,
|
|
1783
1827
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
1784
|
-
},
|
|
1828
|
+
}, Ta = ["value"], Ea = { class: "tpl:mb-3.5" }, Da = { class: "tpl:mb-3.5" }, Oa = {
|
|
1785
1829
|
key: 0,
|
|
1786
1830
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
1787
|
-
},
|
|
1831
|
+
}, ka = ["checked"], Aa = 350, ja = /* @__PURE__ */ j({
|
|
1788
1832
|
__name: "ImageToolbar",
|
|
1789
1833
|
props: { block: {} },
|
|
1790
1834
|
emits: ["update"],
|
|
1791
1835
|
setup(e, { emit: t }) {
|
|
1792
|
-
let n = e, r = t, { t: i } =
|
|
1836
|
+
let n = e, r = t, { t: i } = B(), a = l(P, null), s = l(xe, ot.liquid), c = z(), u = g(() => !!a), d = f(!1), p = f(!1), { start: m } = Ve(() => {
|
|
1793
1837
|
d.value = !1;
|
|
1794
1838
|
}, 1e3, { immediate: !1 }), b = [
|
|
1795
1839
|
300,
|
|
@@ -1805,7 +1849,7 @@ var Ui = {
|
|
|
1805
1849
|
function C(e) {
|
|
1806
1850
|
if (e === "custom") {
|
|
1807
1851
|
let e = n.block.width;
|
|
1808
|
-
(typeof e != "number" || b.includes(e)) && S("width",
|
|
1852
|
+
(typeof e != "number" || b.includes(e)) && S("width", Aa);
|
|
1809
1853
|
return;
|
|
1810
1854
|
}
|
|
1811
1855
|
S("width", e === "full" ? "full" : Number(e));
|
|
@@ -1818,10 +1862,42 @@ var Ui = {
|
|
|
1818
1862
|
let e = await a?.({ accept: ["images"] });
|
|
1819
1863
|
c.alive && e && (S("src", e.url), e.alt && (S("alt", e.alt), p.value = !0), d.value = !0, m());
|
|
1820
1864
|
}
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
j
|
|
1865
|
+
let O = f(), j = f(!1), N = g(() => Ie(n.block.src, s)), ee = g(() => u.value && !j.value && !N.value);
|
|
1866
|
+
async function te(e) {
|
|
1867
|
+
if (a) {
|
|
1868
|
+
j.value = !0;
|
|
1869
|
+
try {
|
|
1870
|
+
let t = await a({
|
|
1871
|
+
accept: ["images"],
|
|
1872
|
+
files: e
|
|
1873
|
+
});
|
|
1874
|
+
if (!c.alive) return;
|
|
1875
|
+
t && (S("src", t.url), t.alt && (S("alt", t.alt), p.value = !0), d.value = !0, m());
|
|
1876
|
+
} finally {
|
|
1877
|
+
c.alive && (j.value = !1);
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
let { isOver: I } = Oe({
|
|
1882
|
+
target: O,
|
|
1883
|
+
enabled: ee,
|
|
1884
|
+
onFiles: te
|
|
1885
|
+
});
|
|
1886
|
+
return (t, n) => (o(), _(k, null, [
|
|
1887
|
+
T("div", fa, [T("label", { class: w(y(W)) }, h(y(i).image.imageUrl), 3), T("div", {
|
|
1888
|
+
ref_key: "dropZoneRef",
|
|
1889
|
+
ref: O,
|
|
1890
|
+
class: "tpl:relative"
|
|
1891
|
+
}, [
|
|
1892
|
+
ee.value && (y(I) || j.value) ? (o(), _("div", pa, [j.value ? (o(), _(k, { key: 0 }, [M(y(F), {
|
|
1893
|
+
class: "tpl-spinner",
|
|
1894
|
+
size: 18,
|
|
1895
|
+
"stroke-width": 2
|
|
1896
|
+
}), A(" " + h(y(i).image.uploading), 1)], 64)) : (o(), _(k, { key: 1 }, [M(y(tt), {
|
|
1897
|
+
size: 18,
|
|
1898
|
+
"stroke-width": 1.5
|
|
1899
|
+
}), A(" " + h(y(i).image.dropToUpload), 1)], 64))])) : v("", !0),
|
|
1900
|
+
M(X, {
|
|
1825
1901
|
"model-value": e.block.src,
|
|
1826
1902
|
type: "url",
|
|
1827
1903
|
placeholder: y(i).image.imageUrlPlaceholder,
|
|
@@ -1833,7 +1909,7 @@ var Ui = {
|
|
|
1833
1909
|
"pulse"
|
|
1834
1910
|
]),
|
|
1835
1911
|
u.value ? (o(), _("button", {
|
|
1836
|
-
key:
|
|
1912
|
+
key: 1,
|
|
1837
1913
|
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",
|
|
1838
1914
|
style: {
|
|
1839
1915
|
"border-color": "var(--tpl-border)",
|
|
@@ -1841,21 +1917,21 @@ var Ui = {
|
|
|
1841
1917
|
"background-color": "var(--tpl-bg)"
|
|
1842
1918
|
},
|
|
1843
1919
|
onClick: D
|
|
1844
|
-
}, [
|
|
1920
|
+
}, [M(y(rt), {
|
|
1845
1921
|
size: 14,
|
|
1846
1922
|
"stroke-width": 1.5
|
|
1847
|
-
}),
|
|
1848
|
-
]),
|
|
1849
|
-
y(
|
|
1923
|
+
}), A(" " + h(y(i).image.browseMedia), 1)])) : v("", !0)
|
|
1924
|
+
], 512)]),
|
|
1925
|
+
y(Ie)(e.block.src, y(s)) ? (o(), _("div", ma, [T("label", { class: w(y(W)) }, [A(h(y(i).image.placeholderUrl) + " ", 1), n[9] ||= T("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, h("(optional)"), -1)], 2), T("input", {
|
|
1850
1926
|
type: "url",
|
|
1851
1927
|
class: w(y(U)),
|
|
1852
1928
|
value: e.block.placeholderUrl || "",
|
|
1853
1929
|
placeholder: y(i).image.placeholderUrlPlaceholder,
|
|
1854
1930
|
onInput: n[1] ||= (e) => S("placeholderUrl", e.target.value)
|
|
1855
|
-
}, null, 42,
|
|
1856
|
-
T("div",
|
|
1931
|
+
}, null, 42, ha)])) : v("", !0),
|
|
1932
|
+
T("div", ga, [
|
|
1857
1933
|
T("label", { class: w(y(W)) }, h(y(i).image.altText), 3),
|
|
1858
|
-
|
|
1934
|
+
M(X, {
|
|
1859
1935
|
"model-value": e.block.alt,
|
|
1860
1936
|
type: "text",
|
|
1861
1937
|
placeholder: y(i).image.altTextPlaceholder,
|
|
@@ -1868,35 +1944,35 @@ var Ui = {
|
|
|
1868
1944
|
"pulse",
|
|
1869
1945
|
"disabled"
|
|
1870
1946
|
]),
|
|
1871
|
-
T("label",
|
|
1947
|
+
T("label", _a, [T("input", {
|
|
1872
1948
|
type: "checkbox",
|
|
1873
1949
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1874
1950
|
checked: e.block.decorative === !0,
|
|
1875
1951
|
onChange: n[3] ||= (e) => S("decorative", e.target.checked)
|
|
1876
|
-
}, null, 40,
|
|
1952
|
+
}, null, 40, va), T("span", null, [A(h(y(i).image.decorative) + " ", 1), T("span", ya, h(y(i).image.decorativeHint), 1)])])
|
|
1877
1953
|
]),
|
|
1878
|
-
T("div",
|
|
1954
|
+
T("div", ba, [
|
|
1879
1955
|
T("label", { class: w(y(W)) }, h(y(i).image.width), 3),
|
|
1880
1956
|
T("select", {
|
|
1881
1957
|
class: w(y(U)),
|
|
1882
1958
|
value: x.value,
|
|
1883
1959
|
onChange: n[4] ||= (e) => C(e.target.value)
|
|
1884
1960
|
}, [
|
|
1885
|
-
T("option",
|
|
1961
|
+
T("option", Sa, h(y(i).image.fullWidth), 1),
|
|
1886
1962
|
n[10] ||= T("option", { value: "300" }, "300px", -1),
|
|
1887
1963
|
n[11] ||= T("option", { value: "400" }, "400px", -1),
|
|
1888
1964
|
n[12] ||= T("option", { value: "500" }, "500px", -1),
|
|
1889
|
-
T("option",
|
|
1890
|
-
], 42,
|
|
1891
|
-
x.value === "custom" ? (o(), _("div",
|
|
1965
|
+
T("option", Ca, h(y(i).image.widthCustom), 1)
|
|
1966
|
+
], 42, xa),
|
|
1967
|
+
x.value === "custom" ? (o(), _("div", wa, [T("input", {
|
|
1892
1968
|
type: "number",
|
|
1893
1969
|
class: w(y(K)),
|
|
1894
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
1970
|
+
value: typeof e.block.width == "number" ? e.block.width : Aa,
|
|
1895
1971
|
min: "20",
|
|
1896
1972
|
onInput: n[5] ||= (e) => E(e.target.value)
|
|
1897
|
-
}, null, 42,
|
|
1973
|
+
}, null, 42, Ta), T("span", { class: w(y(G)) }, "px", 2)])) : v("", !0)
|
|
1898
1974
|
]),
|
|
1899
|
-
T("div",
|
|
1975
|
+
T("div", Ea, [T("label", { class: w(y(W)) }, h(y(i).title.align), 3), M(Y, {
|
|
1900
1976
|
options: [
|
|
1901
1977
|
{
|
|
1902
1978
|
value: "left",
|
|
@@ -1914,28 +1990,28 @@ var Ui = {
|
|
|
1914
1990
|
"model-value": e.block.align,
|
|
1915
1991
|
"onUpdate:modelValue": n[6] ||= (e) => S("align", e)
|
|
1916
1992
|
}, null, 8, ["options", "model-value"])]),
|
|
1917
|
-
T("div",
|
|
1993
|
+
T("div", Da, [
|
|
1918
1994
|
T("label", { class: w(y(W)) }, h(y(i).image.linkUrl), 3),
|
|
1919
|
-
|
|
1995
|
+
M(X, {
|
|
1920
1996
|
"model-value": e.block.linkUrl || "",
|
|
1921
1997
|
type: "url",
|
|
1922
1998
|
placeholder: y(i).image.imageUrlPlaceholder,
|
|
1923
1999
|
"onUpdate:modelValue": n[7] ||= (e) => S("linkUrl", e)
|
|
1924
2000
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1925
|
-
e.block.linkUrl ? (o(), _("label",
|
|
2001
|
+
e.block.linkUrl ? (o(), _("label", Oa, [T("input", {
|
|
1926
2002
|
type: "checkbox",
|
|
1927
2003
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1928
2004
|
checked: e.block.linkOpenInNewTab ?? !1,
|
|
1929
2005
|
onChange: n[8] ||= (e) => S("linkOpenInNewTab", e.target.checked)
|
|
1930
|
-
}, null, 40,
|
|
2006
|
+
}, null, 40, ka), A(" " + h(y(i).image.openInNewTab), 1)])) : v("", !0)
|
|
1931
2007
|
])
|
|
1932
2008
|
], 64));
|
|
1933
2009
|
}
|
|
1934
|
-
}),
|
|
2010
|
+
}), Ma = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Na = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Pa = [
|
|
1935
2011
|
"value",
|
|
1936
2012
|
"placeholder",
|
|
1937
2013
|
"onInput"
|
|
1938
|
-
],
|
|
2014
|
+
], Fa = ["title", "onClick"], Ia = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, La = ["checked", "onChange"], Ra = { class: "tpl:flex tpl:items-center tpl:gap-2" }, za = ["value"], Ba = { value: "" }, Va = ["value"], Ha = ["value"], Ua = /* @__PURE__ */ j({
|
|
1939
2015
|
__name: "MenuToolbar",
|
|
1940
2016
|
props: {
|
|
1941
2017
|
block: {},
|
|
@@ -1943,7 +2019,7 @@ var Ui = {
|
|
|
1943
2019
|
},
|
|
1944
2020
|
emits: ["update"],
|
|
1945
2021
|
setup(e, { emit: t }) {
|
|
1946
|
-
let n = e, r = t, { t: i } =
|
|
2022
|
+
let n = e, r = t, { t: i } = B(), a = g(() => [
|
|
1947
2023
|
{
|
|
1948
2024
|
key: "openInNewTab",
|
|
1949
2025
|
label: i.menu.openInNewTab
|
|
@@ -1960,17 +2036,17 @@ var Ui = {
|
|
|
1960
2036
|
{
|
|
1961
2037
|
value: "left",
|
|
1962
2038
|
label: i.title.alignLeft,
|
|
1963
|
-
icon:
|
|
2039
|
+
icon: vt
|
|
1964
2040
|
},
|
|
1965
2041
|
{
|
|
1966
2042
|
value: "center",
|
|
1967
2043
|
label: i.title.alignCenter,
|
|
1968
|
-
icon:
|
|
2044
|
+
icon: ft
|
|
1969
2045
|
},
|
|
1970
2046
|
{
|
|
1971
2047
|
value: "right",
|
|
1972
2048
|
label: i.title.alignRight,
|
|
1973
|
-
icon:
|
|
2049
|
+
icon: dt
|
|
1974
2050
|
}
|
|
1975
2051
|
]);
|
|
1976
2052
|
function l(e, t) {
|
|
@@ -1978,7 +2054,7 @@ var Ui = {
|
|
|
1978
2054
|
}
|
|
1979
2055
|
function d() {
|
|
1980
2056
|
let e = {
|
|
1981
|
-
id:
|
|
2057
|
+
id: ve(),
|
|
1982
2058
|
text: "",
|
|
1983
2059
|
url: "",
|
|
1984
2060
|
openInNewTab: !1,
|
|
@@ -1996,27 +2072,27 @@ var Ui = {
|
|
|
1996
2072
|
function p(e) {
|
|
1997
2073
|
r("update", { items: n.block.items.filter((t) => t.id !== e) });
|
|
1998
2074
|
}
|
|
1999
|
-
return (t, n) => (o(), _(
|
|
2000
|
-
|
|
2001
|
-
default: u(() => [T("div",
|
|
2075
|
+
return (t, n) => (o(), _(k, null, [
|
|
2076
|
+
M(J, { label: y(i).menu.items }, {
|
|
2077
|
+
default: u(() => [T("div", Ma, [(o(!0), _(k, null, c(e.block.items, (t) => (o(), _("div", {
|
|
2002
2078
|
key: t.id,
|
|
2003
2079
|
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"
|
|
2004
2080
|
}, [
|
|
2005
|
-
T("div",
|
|
2081
|
+
T("div", Na, [T("input", {
|
|
2006
2082
|
type: "text",
|
|
2007
2083
|
class: w([y(U), "tpl:flex-1"]),
|
|
2008
2084
|
value: t.text,
|
|
2009
2085
|
placeholder: y(i).menu.text,
|
|
2010
2086
|
onInput: (e) => f(t.id, "text", e.target.value)
|
|
2011
|
-
}, null, 42,
|
|
2012
|
-
class: w(y(
|
|
2087
|
+
}, null, 42, Pa), T("button", {
|
|
2088
|
+
class: w(y(Mt)),
|
|
2013
2089
|
title: y(i).menu.removeItem,
|
|
2014
2090
|
onClick: (e) => p(t.id)
|
|
2015
|
-
}, [
|
|
2091
|
+
}, [M(y(Ye), {
|
|
2016
2092
|
size: 14,
|
|
2017
2093
|
"stroke-width": 2
|
|
2018
|
-
})], 10,
|
|
2019
|
-
|
|
2094
|
+
})], 10, Fa)]),
|
|
2095
|
+
M(X, {
|
|
2020
2096
|
"model-value": t.url,
|
|
2021
2097
|
type: "url",
|
|
2022
2098
|
placeholder: y(i).menu.urlPlaceholder,
|
|
@@ -2026,7 +2102,7 @@ var Ui = {
|
|
|
2026
2102
|
"placeholder",
|
|
2027
2103
|
"onUpdate:modelValue"
|
|
2028
2104
|
]),
|
|
2029
|
-
T("div",
|
|
2105
|
+
T("div", Ia, [(o(!0), _(k, null, c(a.value, (e) => (o(), _("label", {
|
|
2030
2106
|
key: e.key,
|
|
2031
2107
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
2032
2108
|
}, [T("input", {
|
|
@@ -2034,34 +2110,34 @@ var Ui = {
|
|
|
2034
2110
|
checked: t[e.key],
|
|
2035
2111
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2036
2112
|
onChange: (n) => f(t.id, e.key, n.target.checked)
|
|
2037
|
-
}, null, 40,
|
|
2038
|
-
T("div",
|
|
2113
|
+
}, null, 40, La), A(" " + h(e.label), 1)]))), 128))]),
|
|
2114
|
+
T("div", Ra, [T("label", { class: w([y(W), "tpl:!mb-0"]) }, h(y(i).menu.color), 3), M(q, {
|
|
2039
2115
|
"swatch-only": "",
|
|
2040
2116
|
"model-value": t.color || e.block.linkColor || e.block.color,
|
|
2041
2117
|
"onUpdate:modelValue": (e) => f(t.id, "color", e)
|
|
2042
2118
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2043
2119
|
]))), 128)), T("button", {
|
|
2044
|
-
class: w(y(
|
|
2120
|
+
class: w(y(Nt)),
|
|
2045
2121
|
onClick: d
|
|
2046
|
-
}, [
|
|
2122
|
+
}, [M(y(H), {
|
|
2047
2123
|
size: 14,
|
|
2048
2124
|
"stroke-width": 2
|
|
2049
|
-
}),
|
|
2125
|
+
}), A(" " + h(y(i).menu.addItem), 1)], 2)])]),
|
|
2050
2126
|
_: 1
|
|
2051
2127
|
}, 8, ["label"]),
|
|
2052
|
-
|
|
2128
|
+
M(J, { label: y(i).menu.fontFamily }, {
|
|
2053
2129
|
default: u(() => [T("select", {
|
|
2054
2130
|
class: w(y(U)),
|
|
2055
2131
|
value: e.block.fontFamily || "",
|
|
2056
2132
|
onChange: n[0] ||= (e) => l("fontFamily", e.target.value || void 0)
|
|
2057
|
-
}, [T("option",
|
|
2133
|
+
}, [T("option", Ba, h(y(i).title.inheritFont), 1), (o(!0), _(k, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
2058
2134
|
key: e.value,
|
|
2059
2135
|
value: e.value
|
|
2060
|
-
}, h(e.label), 9,
|
|
2136
|
+
}, h(e.label), 9, Va))), 128))], 42, za)]),
|
|
2061
2137
|
_: 1
|
|
2062
2138
|
}, 8, ["label"]),
|
|
2063
|
-
|
|
2064
|
-
default: u(() => [
|
|
2139
|
+
M(J, { label: y(i).menu.fontSize }, {
|
|
2140
|
+
default: u(() => [M(Rt, {
|
|
2065
2141
|
"model-value": e.block.fontSize,
|
|
2066
2142
|
min: 8,
|
|
2067
2143
|
max: 48,
|
|
@@ -2070,46 +2146,46 @@ var Ui = {
|
|
|
2070
2146
|
}, null, 8, ["model-value"])]),
|
|
2071
2147
|
_: 1
|
|
2072
2148
|
}, 8, ["label"]),
|
|
2073
|
-
|
|
2074
|
-
default: u(() => [
|
|
2149
|
+
M(J, { label: y(i).menu.color }, {
|
|
2150
|
+
default: u(() => [M(q, {
|
|
2075
2151
|
"model-value": e.block.color,
|
|
2076
2152
|
"onUpdate:modelValue": n[2] ||= (e) => l("color", e)
|
|
2077
2153
|
}, null, 8, ["model-value"])]),
|
|
2078
2154
|
_: 1
|
|
2079
2155
|
}, 8, ["label"]),
|
|
2080
|
-
|
|
2081
|
-
default: u(() => [
|
|
2156
|
+
M(J, { label: y(i).menu.linkColor }, {
|
|
2157
|
+
default: u(() => [M(q, {
|
|
2082
2158
|
"model-value": e.block.linkColor || e.block.color,
|
|
2083
2159
|
"onUpdate:modelValue": n[3] ||= (e) => l("linkColor", e || void 0)
|
|
2084
2160
|
}, null, 8, ["model-value"])]),
|
|
2085
2161
|
_: 1
|
|
2086
2162
|
}, 8, ["label"]),
|
|
2087
|
-
|
|
2088
|
-
default: u(() => [
|
|
2163
|
+
M(J, { label: y(i).menu.textAlign }, {
|
|
2164
|
+
default: u(() => [M(Y, {
|
|
2089
2165
|
options: s.value,
|
|
2090
2166
|
"model-value": e.block.textAlign,
|
|
2091
2167
|
"onUpdate:modelValue": n[4] ||= (e) => l("textAlign", e)
|
|
2092
2168
|
}, null, 8, ["options", "model-value"])]),
|
|
2093
2169
|
_: 1
|
|
2094
2170
|
}, 8, ["label"]),
|
|
2095
|
-
|
|
2171
|
+
M(J, { label: y(i).menu.separator }, {
|
|
2096
2172
|
default: u(() => [T("input", {
|
|
2097
2173
|
type: "text",
|
|
2098
2174
|
class: w(y(U)),
|
|
2099
2175
|
value: e.block.separator,
|
|
2100
2176
|
onInput: n[5] ||= (e) => l("separator", e.target.value)
|
|
2101
|
-
}, null, 42,
|
|
2177
|
+
}, null, 42, Ha)]),
|
|
2102
2178
|
_: 1
|
|
2103
2179
|
}, 8, ["label"]),
|
|
2104
|
-
|
|
2105
|
-
default: u(() => [
|
|
2180
|
+
M(J, { label: y(i).menu.separatorColor }, {
|
|
2181
|
+
default: u(() => [M(q, {
|
|
2106
2182
|
"model-value": e.block.separatorColor,
|
|
2107
2183
|
"onUpdate:modelValue": n[6] ||= (e) => l("separatorColor", e)
|
|
2108
2184
|
}, null, 8, ["model-value"])]),
|
|
2109
2185
|
_: 1
|
|
2110
2186
|
}, 8, ["label"]),
|
|
2111
|
-
|
|
2112
|
-
default: u(() => [
|
|
2187
|
+
M(J, { label: y(i).menu.spacing }, {
|
|
2188
|
+
default: u(() => [M(Rt, {
|
|
2113
2189
|
"model-value": e.block.spacing,
|
|
2114
2190
|
min: 0,
|
|
2115
2191
|
max: 50,
|
|
@@ -2123,11 +2199,11 @@ var Ui = {
|
|
|
2123
2199
|
});
|
|
2124
2200
|
//#endregion
|
|
2125
2201
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2126
|
-
function
|
|
2202
|
+
function Wa(e) {
|
|
2127
2203
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2128
2204
|
}
|
|
2129
|
-
function
|
|
2130
|
-
let n =
|
|
2205
|
+
function Ga(e, t) {
|
|
2206
|
+
let n = Wa(t);
|
|
2131
2207
|
if (e.length === n) return e;
|
|
2132
2208
|
if (e.length < n) {
|
|
2133
2209
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2138,12 +2214,12 @@ function Ba(e, t) {
|
|
|
2138
2214
|
}
|
|
2139
2215
|
//#endregion
|
|
2140
2216
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2141
|
-
var
|
|
2217
|
+
var Ka = { class: "tpl:mb-3.5" }, qa = ["value"], Ja = ["value"], Ya = /* @__PURE__ */ j({
|
|
2142
2218
|
__name: "SectionToolbar",
|
|
2143
2219
|
props: { block: {} },
|
|
2144
2220
|
emits: ["update"],
|
|
2145
2221
|
setup(e, { emit: t }) {
|
|
2146
|
-
let n = e, r = t, { t: i } =
|
|
2222
|
+
let n = e, r = t, { t: i } = B(), a = g(() => [
|
|
2147
2223
|
{
|
|
2148
2224
|
value: "1",
|
|
2149
2225
|
label: i.section.column1
|
|
@@ -2169,30 +2245,30 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2169
2245
|
let t = e.target.value;
|
|
2170
2246
|
r("update", {
|
|
2171
2247
|
columns: t,
|
|
2172
|
-
children:
|
|
2248
|
+
children: Ga(n.block.children, t)
|
|
2173
2249
|
});
|
|
2174
2250
|
}
|
|
2175
|
-
return (t, n) => (o(), _("div",
|
|
2251
|
+
return (t, n) => (o(), _("div", Ka, [T("label", { class: w(y(W)) }, h(y(i).section.columns), 3), T("select", {
|
|
2176
2252
|
class: w(y(U)),
|
|
2177
2253
|
value: e.block.columns,
|
|
2178
2254
|
onChange: s
|
|
2179
|
-
}, [(o(!0), _(
|
|
2255
|
+
}, [(o(!0), _(k, null, c(a.value, (e) => (o(), _("option", {
|
|
2180
2256
|
key: e.value,
|
|
2181
2257
|
value: e.value
|
|
2182
|
-
}, h(e.label), 9,
|
|
2258
|
+
}, h(e.label), 9, Ja))), 128))], 42, qa)]));
|
|
2183
2259
|
}
|
|
2184
|
-
}),
|
|
2260
|
+
}), Xa = { class: "tpl:mb-3.5" }, Za = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Qa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, $a = ["value", "onChange"], eo = ["value"], to = ["title", "onClick"], no = { class: "tpl:mb-3.5" }, ro = ["value"], io = { value: "solid" }, ao = { value: "outlined" }, oo = { value: "rounded" }, so = { value: "square" }, co = { value: "circle" }, lo = { class: "tpl:mb-3.5" }, uo = { class: "tpl:mb-3.5" }, fo = { class: "tpl:flex tpl:items-stretch" }, po = ["value"], mo = { class: "tpl:mb-3.5" }, ho = /* @__PURE__ */ j({
|
|
2185
2261
|
__name: "SocialToolbar",
|
|
2186
2262
|
props: { block: {} },
|
|
2187
2263
|
emits: ["update"],
|
|
2188
2264
|
setup(e, { emit: t }) {
|
|
2189
|
-
let n = e, r = t, { t: i } =
|
|
2265
|
+
let n = e, r = t, { t: i } = B();
|
|
2190
2266
|
function a(e, t) {
|
|
2191
2267
|
r("update", { [e]: t });
|
|
2192
2268
|
}
|
|
2193
2269
|
function s() {
|
|
2194
2270
|
let e = {
|
|
2195
|
-
id:
|
|
2271
|
+
id: ve(),
|
|
2196
2272
|
platform: "facebook",
|
|
2197
2273
|
url: ""
|
|
2198
2274
|
};
|
|
@@ -2207,26 +2283,26 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2207
2283
|
function u(e) {
|
|
2208
2284
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2209
2285
|
}
|
|
2210
|
-
return (t, n) => (o(), _(
|
|
2211
|
-
T("div",
|
|
2286
|
+
return (t, n) => (o(), _(k, null, [
|
|
2287
|
+
T("div", Xa, [T("label", { class: w(y(W)) }, h(y(i).social.icons), 3), T("div", Za, [(o(!0), _(k, null, c(e.block.icons, (e) => (o(), _("div", {
|
|
2212
2288
|
key: e.id,
|
|
2213
2289
|
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"
|
|
2214
|
-
}, [T("div",
|
|
2290
|
+
}, [T("div", Qa, [T("select", {
|
|
2215
2291
|
"data-testid": "social-platform-select",
|
|
2216
2292
|
class: w([y(U), "tpl:flex-1"]),
|
|
2217
2293
|
value: e.platform,
|
|
2218
2294
|
onChange: (t) => l(e.id, "platform", t.target.value)
|
|
2219
|
-
}, [(o(!0), _(
|
|
2295
|
+
}, [(o(!0), _(k, null, c(y(ie), (e) => (o(), _("option", {
|
|
2220
2296
|
key: e,
|
|
2221
2297
|
value: e
|
|
2222
|
-
}, h(y(i).social.platforms[e]), 9,
|
|
2223
|
-
class: w(y(
|
|
2298
|
+
}, h(y(i).social.platforms[e]), 9, eo))), 128))], 42, $a), T("button", {
|
|
2299
|
+
class: w(y(Mt)),
|
|
2224
2300
|
title: y(i).social.removeIcon,
|
|
2225
2301
|
onClick: (t) => u(e.id)
|
|
2226
|
-
}, [
|
|
2302
|
+
}, [M(y(Ye), {
|
|
2227
2303
|
size: 14,
|
|
2228
2304
|
"stroke-width": 2
|
|
2229
|
-
})], 10,
|
|
2305
|
+
})], 10, to)]), M(X, {
|
|
2230
2306
|
"model-value": e.url,
|
|
2231
2307
|
type: "url",
|
|
2232
2308
|
placeholder: y(i).social.urlPlaceholder,
|
|
@@ -2236,24 +2312,24 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2236
2312
|
"placeholder",
|
|
2237
2313
|
"onUpdate:modelValue"
|
|
2238
2314
|
])]))), 128)), T("button", {
|
|
2239
|
-
class: w(y(
|
|
2315
|
+
class: w(y(Nt)),
|
|
2240
2316
|
onClick: s
|
|
2241
|
-
}, [
|
|
2317
|
+
}, [M(y(H), {
|
|
2242
2318
|
size: 14,
|
|
2243
2319
|
"stroke-width": 2
|
|
2244
|
-
}),
|
|
2245
|
-
T("div",
|
|
2320
|
+
}), A(" " + h(y(i).social.addIcon), 1)], 2)])]),
|
|
2321
|
+
T("div", no, [T("label", { class: w(y(W)) }, h(y(i).social.style), 3), T("select", {
|
|
2246
2322
|
class: w(y(U)),
|
|
2247
2323
|
value: e.block.iconStyle,
|
|
2248
2324
|
onChange: n[0] ||= (e) => a("iconStyle", e.target.value)
|
|
2249
2325
|
}, [
|
|
2250
|
-
T("option",
|
|
2251
|
-
T("option",
|
|
2252
|
-
T("option",
|
|
2253
|
-
T("option",
|
|
2254
|
-
T("option",
|
|
2255
|
-
], 42,
|
|
2256
|
-
T("div",
|
|
2326
|
+
T("option", io, h(y(i).social.styleSolid), 1),
|
|
2327
|
+
T("option", ao, h(y(i).social.styleOutlined), 1),
|
|
2328
|
+
T("option", oo, h(y(i).social.styleRounded), 1),
|
|
2329
|
+
T("option", so, h(y(i).social.styleSquare), 1),
|
|
2330
|
+
T("option", co, h(y(i).social.styleCircle), 1)
|
|
2331
|
+
], 42, ro)]),
|
|
2332
|
+
T("div", lo, [T("label", { class: w(y(W)) }, h(y(i).social.size), 3), M(Y, {
|
|
2257
2333
|
options: [
|
|
2258
2334
|
{
|
|
2259
2335
|
value: "small",
|
|
@@ -2271,30 +2347,30 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2271
2347
|
"model-value": e.block.iconSize,
|
|
2272
2348
|
"onUpdate:modelValue": n[1] ||= (e) => a("iconSize", e)
|
|
2273
2349
|
}, null, 8, ["options", "model-value"])]),
|
|
2274
|
-
T("div",
|
|
2350
|
+
T("div", uo, [T("label", { class: w(y(W)) }, h(y(i).social.spacing), 3), T("div", fo, [T("input", {
|
|
2275
2351
|
type: "number",
|
|
2276
2352
|
class: w(y(K)),
|
|
2277
2353
|
value: e.block.spacing,
|
|
2278
2354
|
min: "0",
|
|
2279
2355
|
max: "50",
|
|
2280
2356
|
onInput: n[2] ||= (e) => a("spacing", Number(e.target.value))
|
|
2281
|
-
}, null, 42,
|
|
2282
|
-
T("div",
|
|
2357
|
+
}, null, 42, po), T("span", { class: w(y(G)) }, "px", 2)])]),
|
|
2358
|
+
T("div", mo, [T("label", { class: w(y(W)) }, h(y(i).social.align), 3), M(Y, {
|
|
2283
2359
|
options: [
|
|
2284
2360
|
{
|
|
2285
2361
|
value: "left",
|
|
2286
2362
|
label: y(i).title.alignLeft,
|
|
2287
|
-
icon: y(
|
|
2363
|
+
icon: y(vt)
|
|
2288
2364
|
},
|
|
2289
2365
|
{
|
|
2290
2366
|
value: "center",
|
|
2291
2367
|
label: y(i).title.alignCenter,
|
|
2292
|
-
icon: y(
|
|
2368
|
+
icon: y(ft)
|
|
2293
2369
|
},
|
|
2294
2370
|
{
|
|
2295
2371
|
value: "right",
|
|
2296
2372
|
label: y(i).title.alignRight,
|
|
2297
|
-
icon: y(
|
|
2373
|
+
icon: y(dt)
|
|
2298
2374
|
}
|
|
2299
2375
|
],
|
|
2300
2376
|
"model-value": e.block.align,
|
|
@@ -2302,22 +2378,22 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2302
2378
|
}, null, 8, ["options", "model-value"])])
|
|
2303
2379
|
], 64));
|
|
2304
2380
|
}
|
|
2305
|
-
}),
|
|
2381
|
+
}), go = { class: "tpl:mb-3.5" }, _o = { class: "tpl:flex tpl:items-stretch" }, vo = ["value"], yo = ["value"], bo = /* @__PURE__ */ j({
|
|
2306
2382
|
__name: "SpacerToolbar",
|
|
2307
2383
|
props: { block: {} },
|
|
2308
2384
|
emits: ["update"],
|
|
2309
2385
|
setup(e, { emit: t }) {
|
|
2310
|
-
let n = t, { t: r } =
|
|
2311
|
-
return (t, i) => (o(), _("div",
|
|
2386
|
+
let n = t, { t: r } = B();
|
|
2387
|
+
return (t, i) => (o(), _("div", go, [
|
|
2312
2388
|
T("label", { class: w(y(W)) }, h(y(r).spacer.height), 3),
|
|
2313
|
-
T("div",
|
|
2389
|
+
T("div", _o, [T("input", {
|
|
2314
2390
|
type: "number",
|
|
2315
2391
|
class: w(y(K)),
|
|
2316
2392
|
value: e.block.height,
|
|
2317
2393
|
min: "10",
|
|
2318
2394
|
max: "100",
|
|
2319
2395
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2320
|
-
}, null, 42,
|
|
2396
|
+
}, null, 42, vo), T("span", { class: w(y(G)) }, "px", 2)]),
|
|
2321
2397
|
T("input", {
|
|
2322
2398
|
type: "range",
|
|
2323
2399
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2325,13 +2401,13 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2325
2401
|
min: "10",
|
|
2326
2402
|
max: "100",
|
|
2327
2403
|
onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2328
|
-
}, null, 40,
|
|
2404
|
+
}, null, 40, yo)
|
|
2329
2405
|
]));
|
|
2330
2406
|
}
|
|
2331
|
-
}),
|
|
2407
|
+
}), xo = { class: "tpl:mb-3.5" }, So = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Co = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, wo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, To = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Eo = ["disabled"], Do = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Oo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ko = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Ao = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, jo = ["disabled"], Mo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, No = { class: "tpl:mb-3.5" }, Po = { 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)]" }, Fo = ["checked"], Io = {
|
|
2332
2408
|
key: 0,
|
|
2333
2409
|
class: "tpl:mb-3.5"
|
|
2334
|
-
},
|
|
2410
|
+
}, Lo = { class: "tpl:mb-3.5" }, Ro = { class: "tpl:mb-3.5" }, zo = { class: "tpl:flex tpl:items-stretch" }, Bo = ["value"], Vo = { class: "tpl:mb-3.5" }, Ho = { class: "tpl:flex tpl:items-stretch" }, Uo = ["value"], Wo = { class: "tpl:mb-3.5" }, Go = ["value"], Ko = { value: "" }, qo = ["value"], Jo = { class: "tpl:mb-3.5" }, Yo = { class: "tpl:flex tpl:items-stretch" }, Xo = ["value"], Zo = { class: "tpl:mb-3.5" }, Qo = { class: "tpl:mb-3.5" }, $o = /* @__PURE__ */ j({
|
|
2335
2411
|
__name: "TableToolbar",
|
|
2336
2412
|
props: {
|
|
2337
2413
|
block: {},
|
|
@@ -2339,15 +2415,15 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2339
2415
|
},
|
|
2340
2416
|
emits: ["update"],
|
|
2341
2417
|
setup(e, { emit: t }) {
|
|
2342
|
-
let n = e, r = t, { t: i } =
|
|
2418
|
+
let n = e, r = t, { t: i } = B(), a = g(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
|
|
2343
2419
|
function s(e, t) {
|
|
2344
2420
|
r("update", { [e]: t });
|
|
2345
2421
|
}
|
|
2346
2422
|
function l() {
|
|
2347
2423
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2348
|
-
id:
|
|
2424
|
+
id: ve(),
|
|
2349
2425
|
cells: Array.from({ length: e }, () => ({
|
|
2350
|
-
id:
|
|
2426
|
+
id: ve(),
|
|
2351
2427
|
content: ""
|
|
2352
2428
|
}))
|
|
2353
2429
|
};
|
|
@@ -2360,7 +2436,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2360
2436
|
r("update", { rows: n.block.rows.map((e) => ({
|
|
2361
2437
|
...e,
|
|
2362
2438
|
cells: [...e.cells, {
|
|
2363
|
-
id:
|
|
2439
|
+
id: ve(),
|
|
2364
2440
|
content: ""
|
|
2365
2441
|
}]
|
|
2366
2442
|
})) });
|
|
@@ -2371,51 +2447,51 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2371
2447
|
cells: t.cells.filter((t, n) => n !== e)
|
|
2372
2448
|
})) });
|
|
2373
2449
|
}
|
|
2374
|
-
return (t, n) => (o(), _(
|
|
2375
|
-
T("div",
|
|
2450
|
+
return (t, n) => (o(), _(k, null, [
|
|
2451
|
+
T("div", xo, [T("label", { class: w(y(W)) }, h(y(i).table.dimensions), 3), T("div", So, [T("div", Co, [T("span", wo, h(y(i).table.rows), 1), T("div", To, [
|
|
2376
2452
|
T("button", {
|
|
2377
2453
|
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",
|
|
2378
2454
|
disabled: e.block.rows.length <= 1,
|
|
2379
2455
|
onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2380
|
-
}, [
|
|
2456
|
+
}, [M(y(Ct), {
|
|
2381
2457
|
size: 12,
|
|
2382
2458
|
"stroke-width": 2
|
|
2383
|
-
})], 8,
|
|
2384
|
-
T("span",
|
|
2459
|
+
})], 8, Eo),
|
|
2460
|
+
T("span", Do, h(e.block.rows.length), 1),
|
|
2385
2461
|
T("button", {
|
|
2386
2462
|
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)]",
|
|
2387
2463
|
onClick: l
|
|
2388
|
-
}, [
|
|
2464
|
+
}, [M(y(H), {
|
|
2389
2465
|
size: 12,
|
|
2390
2466
|
"stroke-width": 2
|
|
2391
2467
|
})])
|
|
2392
|
-
])]), T("div",
|
|
2468
|
+
])]), T("div", Oo, [T("span", ko, h(y(i).table.columns), 1), T("div", Ao, [
|
|
2393
2469
|
T("button", {
|
|
2394
2470
|
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",
|
|
2395
2471
|
disabled: a.value <= 1,
|
|
2396
2472
|
onClick: n[1] ||= (e) => f(a.value - 1)
|
|
2397
|
-
}, [
|
|
2473
|
+
}, [M(y(Ct), {
|
|
2398
2474
|
size: 12,
|
|
2399
2475
|
"stroke-width": 2
|
|
2400
|
-
})], 8,
|
|
2401
|
-
T("span",
|
|
2476
|
+
})], 8, jo),
|
|
2477
|
+
T("span", Mo, h(a.value), 1),
|
|
2402
2478
|
T("button", {
|
|
2403
2479
|
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)]",
|
|
2404
2480
|
onClick: d
|
|
2405
|
-
}, [
|
|
2481
|
+
}, [M(y(H), {
|
|
2406
2482
|
size: 12,
|
|
2407
2483
|
"stroke-width": 2
|
|
2408
2484
|
})])
|
|
2409
2485
|
])])])]),
|
|
2410
|
-
T("div",
|
|
2486
|
+
T("div", No, [T("label", Po, [T("input", {
|
|
2411
2487
|
type: "checkbox",
|
|
2412
2488
|
checked: e.block.hasHeaderRow,
|
|
2413
2489
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2414
2490
|
onChange: n[2] ||= (e) => s("hasHeaderRow", e.target.checked)
|
|
2415
|
-
}, null, 40,
|
|
2416
|
-
e.block.hasHeaderRow ? (o(), _("div",
|
|
2491
|
+
}, null, 40, Fo), A(" " + h(y(i).table.hasHeaderRow), 1)])]),
|
|
2492
|
+
e.block.hasHeaderRow ? (o(), _("div", Io, [T("label", { class: w(y(W)) }, h(y(i).table.headerBackgroundColor), 3), M(q, {
|
|
2417
2493
|
"model-value": e.block.headerBackgroundColor ?? "",
|
|
2418
|
-
"seed-color": y(
|
|
2494
|
+
"seed-color": y(It),
|
|
2419
2495
|
placeholder: y(i).table.noHeaderBg,
|
|
2420
2496
|
"onUpdate:modelValue": n[3] ||= (e) => s("headerBackgroundColor", e || null)
|
|
2421
2497
|
}, null, 8, [
|
|
@@ -2423,62 +2499,62 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2423
2499
|
"seed-color",
|
|
2424
2500
|
"placeholder"
|
|
2425
2501
|
])])) : v("", !0),
|
|
2426
|
-
T("div",
|
|
2502
|
+
T("div", Lo, [T("label", { class: w(y(W)) }, h(y(i).table.borderColor), 3), M(q, {
|
|
2427
2503
|
"model-value": e.block.borderColor,
|
|
2428
2504
|
"onUpdate:modelValue": n[4] ||= (e) => s("borderColor", e)
|
|
2429
2505
|
}, null, 8, ["model-value"])]),
|
|
2430
|
-
T("div",
|
|
2506
|
+
T("div", Ro, [T("label", { class: w(y(W)) }, h(y(i).table.borderWidth), 3), T("div", zo, [T("input", {
|
|
2431
2507
|
type: "number",
|
|
2432
2508
|
class: w(y(K)),
|
|
2433
2509
|
value: e.block.borderWidth,
|
|
2434
2510
|
min: "0",
|
|
2435
2511
|
max: "10",
|
|
2436
2512
|
onInput: n[5] ||= (e) => s("borderWidth", Number(e.target.value))
|
|
2437
|
-
}, null, 42,
|
|
2438
|
-
T("div",
|
|
2513
|
+
}, null, 42, Bo), T("span", { class: w(y(G)) }, "px", 2)])]),
|
|
2514
|
+
T("div", Vo, [T("label", { class: w(y(W)) }, h(y(i).table.cellPadding), 3), T("div", Ho, [T("input", {
|
|
2439
2515
|
type: "number",
|
|
2440
2516
|
class: w(y(K)),
|
|
2441
2517
|
value: e.block.cellPadding,
|
|
2442
2518
|
min: "0",
|
|
2443
2519
|
max: "30",
|
|
2444
2520
|
onInput: n[6] ||= (e) => s("cellPadding", Number(e.target.value))
|
|
2445
|
-
}, null, 42,
|
|
2446
|
-
T("div",
|
|
2521
|
+
}, null, 42, Uo), T("span", { class: w(y(G)) }, "px", 2)])]),
|
|
2522
|
+
T("div", Wo, [T("label", { class: w(y(W)) }, h(y(i).table.fontFamily), 3), T("select", {
|
|
2447
2523
|
class: w(y(U)),
|
|
2448
2524
|
value: e.block.fontFamily || "",
|
|
2449
2525
|
onChange: n[7] ||= (e) => s("fontFamily", e.target.value || void 0)
|
|
2450
|
-
}, [T("option",
|
|
2526
|
+
}, [T("option", Ko, h(y(i).title.inheritFont), 1), (o(!0), _(k, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
2451
2527
|
key: e.value,
|
|
2452
2528
|
value: e.value
|
|
2453
|
-
}, h(e.label), 9,
|
|
2454
|
-
T("div",
|
|
2529
|
+
}, h(e.label), 9, qo))), 128))], 42, Go)]),
|
|
2530
|
+
T("div", Jo, [T("label", { class: w(y(W)) }, h(y(i).table.fontSize), 3), T("div", Yo, [T("input", {
|
|
2455
2531
|
type: "number",
|
|
2456
2532
|
class: w(y(K)),
|
|
2457
2533
|
value: e.block.fontSize,
|
|
2458
2534
|
min: "10",
|
|
2459
2535
|
max: "32",
|
|
2460
2536
|
onInput: n[8] ||= (e) => s("fontSize", Number(e.target.value))
|
|
2461
|
-
}, null, 42,
|
|
2462
|
-
T("div",
|
|
2537
|
+
}, null, 42, Xo), T("span", { class: w(y(G)) }, "px", 2)])]),
|
|
2538
|
+
T("div", Zo, [T("label", { class: w(y(W)) }, h(y(i).table.color), 3), M(q, {
|
|
2463
2539
|
"model-value": e.block.color,
|
|
2464
2540
|
"onUpdate:modelValue": n[9] ||= (e) => s("color", e)
|
|
2465
2541
|
}, null, 8, ["model-value"])]),
|
|
2466
|
-
T("div",
|
|
2542
|
+
T("div", Qo, [T("label", { class: w(y(W)) }, h(y(i).table.textAlign), 3), M(Y, {
|
|
2467
2543
|
options: [
|
|
2468
2544
|
{
|
|
2469
2545
|
value: "left",
|
|
2470
2546
|
label: y(i).title.alignLeft,
|
|
2471
|
-
icon: y(
|
|
2547
|
+
icon: y(vt)
|
|
2472
2548
|
},
|
|
2473
2549
|
{
|
|
2474
2550
|
value: "center",
|
|
2475
2551
|
label: y(i).title.alignCenter,
|
|
2476
|
-
icon: y(
|
|
2552
|
+
icon: y(ft)
|
|
2477
2553
|
},
|
|
2478
2554
|
{
|
|
2479
2555
|
value: "right",
|
|
2480
2556
|
label: y(i).title.alignRight,
|
|
2481
|
-
icon: y(
|
|
2557
|
+
icon: y(dt)
|
|
2482
2558
|
}
|
|
2483
2559
|
],
|
|
2484
2560
|
"model-value": e.block.textAlign,
|
|
@@ -2486,7 +2562,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2486
2562
|
}, null, 8, ["options", "model-value"])])
|
|
2487
2563
|
], 64));
|
|
2488
2564
|
}
|
|
2489
|
-
}),
|
|
2565
|
+
}), es = { class: "tpl:mb-3.5" }, ts = ["value"], ns = { value: 1 }, rs = { value: 2 }, is = { value: 3 }, as = { value: 4 }, os = { class: "tpl:mb-3.5" }, ss = ["value"], cs = { value: "" }, ls = ["value"], us = { class: "tpl:mb-3.5" }, ds = { class: "tpl:mb-3.5" }, fs = /* @__PURE__ */ j({
|
|
2490
2566
|
__name: "TitleToolbar",
|
|
2491
2567
|
props: {
|
|
2492
2568
|
block: {},
|
|
@@ -2494,49 +2570,49 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2494
2570
|
},
|
|
2495
2571
|
emits: ["update"],
|
|
2496
2572
|
setup(e, { emit: t }) {
|
|
2497
|
-
let n = t, { t: r } =
|
|
2573
|
+
let n = t, { t: r } = B();
|
|
2498
2574
|
function i(e, t) {
|
|
2499
2575
|
n("update", { [e]: t });
|
|
2500
2576
|
}
|
|
2501
|
-
return (t, n) => (o(), _(
|
|
2502
|
-
T("div",
|
|
2577
|
+
return (t, n) => (o(), _(k, null, [
|
|
2578
|
+
T("div", es, [T("label", { class: w(y(W)) }, h(y(r).title.level), 3), T("select", {
|
|
2503
2579
|
class: w(y(U)),
|
|
2504
2580
|
value: e.block.level,
|
|
2505
2581
|
onChange: n[0] ||= (e) => i("level", Number(e.target.value))
|
|
2506
2582
|
}, [
|
|
2507
|
-
T("option",
|
|
2508
|
-
T("option",
|
|
2509
|
-
T("option",
|
|
2510
|
-
T("option",
|
|
2511
|
-
], 42,
|
|
2512
|
-
T("div",
|
|
2583
|
+
T("option", ns, h(y(r).title.heading1), 1),
|
|
2584
|
+
T("option", rs, h(y(r).title.heading2), 1),
|
|
2585
|
+
T("option", is, h(y(r).title.heading3), 1),
|
|
2586
|
+
T("option", as, h(y(r).title.heading4), 1)
|
|
2587
|
+
], 42, ts)]),
|
|
2588
|
+
T("div", os, [T("label", { class: w(y(W)) }, h(y(r).title.fontFamily), 3), T("select", {
|
|
2513
2589
|
class: w(y(U)),
|
|
2514
2590
|
value: e.block.fontFamily || "",
|
|
2515
2591
|
onChange: n[1] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
2516
|
-
}, [T("option",
|
|
2592
|
+
}, [T("option", cs, h(y(r).title.inheritFont), 1), (o(!0), _(k, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
2517
2593
|
key: e.value,
|
|
2518
2594
|
value: e.value
|
|
2519
|
-
}, h(e.label), 9,
|
|
2520
|
-
T("div",
|
|
2595
|
+
}, h(e.label), 9, ls))), 128))], 42, ss)]),
|
|
2596
|
+
T("div", us, [T("label", { class: w(y(W)) }, h(y(r).title.color), 3), M(q, {
|
|
2521
2597
|
"model-value": e.block.color,
|
|
2522
2598
|
"onUpdate:modelValue": n[2] ||= (e) => i("color", e)
|
|
2523
2599
|
}, null, 8, ["model-value"])]),
|
|
2524
|
-
T("div",
|
|
2600
|
+
T("div", ds, [T("label", { class: w(y(W)) }, h(y(r).title.align), 3), M(Y, {
|
|
2525
2601
|
options: [
|
|
2526
2602
|
{
|
|
2527
2603
|
value: "left",
|
|
2528
2604
|
label: y(r).title.alignLeft,
|
|
2529
|
-
icon: y(
|
|
2605
|
+
icon: y(vt)
|
|
2530
2606
|
},
|
|
2531
2607
|
{
|
|
2532
2608
|
value: "center",
|
|
2533
2609
|
label: y(r).title.alignCenter,
|
|
2534
|
-
icon: y(
|
|
2610
|
+
icon: y(ft)
|
|
2535
2611
|
},
|
|
2536
2612
|
{
|
|
2537
2613
|
value: "right",
|
|
2538
2614
|
label: y(r).title.alignRight,
|
|
2539
|
-
icon: y(
|
|
2615
|
+
icon: y(dt)
|
|
2540
2616
|
}
|
|
2541
2617
|
],
|
|
2542
2618
|
"model-value": e.block.textAlign,
|
|
@@ -2544,22 +2620,22 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2544
2620
|
}, null, 8, ["options", "model-value"])])
|
|
2545
2621
|
], 64));
|
|
2546
2622
|
}
|
|
2547
|
-
}),
|
|
2623
|
+
}), ps = { class: "tpl:mb-3.5" }, ms = {
|
|
2548
2624
|
key: 0,
|
|
2549
2625
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
2550
|
-
},
|
|
2626
|
+
}, hs = ["checked"], gs = {
|
|
2551
2627
|
key: 0,
|
|
2552
2628
|
class: "tpl:mb-3.5"
|
|
2553
|
-
},
|
|
2629
|
+
}, _s = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, vs = [
|
|
2554
2630
|
"value",
|
|
2555
2631
|
"placeholder",
|
|
2556
2632
|
"title"
|
|
2557
|
-
],
|
|
2633
|
+
], ys = { class: "tpl:mb-3.5" }, bs = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, xs = { class: "tpl:mb-3.5" }, Ss = { class: "tpl:mb-3.5" }, Cs = ["value"], ws = { value: "full" }, Ts = { class: "tpl:mb-3.5" }, Es = /* @__PURE__ */ j({
|
|
2558
2634
|
__name: "VideoToolbar",
|
|
2559
2635
|
props: { block: {} },
|
|
2560
2636
|
emits: ["update"],
|
|
2561
2637
|
setup(e, { emit: t }) {
|
|
2562
|
-
let n = e, r = t, { t: i } =
|
|
2638
|
+
let n = e, r = t, { t: i } = B(), a = l(P, null), s = l(xe, ot.liquid), c = z(), u = g(() => !!a), d = g(() => Ie(n.block.url, s)), p = f(!1), { start: m } = Ve(() => {
|
|
2563
2639
|
p.value = !1;
|
|
2564
2640
|
}, 1e3, { immediate: !1 });
|
|
2565
2641
|
function b(e, t) {
|
|
@@ -2569,33 +2645,33 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2569
2645
|
let e = await a?.({ accept: ["images"] });
|
|
2570
2646
|
c.alive && e && (b("thumbnailUrl", e.url), p.value = !0, m());
|
|
2571
2647
|
}
|
|
2572
|
-
return (t, n) => (o(), _(
|
|
2573
|
-
T("div",
|
|
2648
|
+
return (t, n) => (o(), _(k, null, [
|
|
2649
|
+
T("div", ps, [
|
|
2574
2650
|
T("label", { class: w(y(W)) }, h(y(i).video.videoUrl), 3),
|
|
2575
|
-
|
|
2651
|
+
M(X, {
|
|
2576
2652
|
"model-value": e.block.url,
|
|
2577
2653
|
type: "url",
|
|
2578
2654
|
placeholder: y(i).video.videoUrlPlaceholder,
|
|
2579
2655
|
"onUpdate:modelValue": n[0] ||= (e) => b("url", e)
|
|
2580
2656
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2581
|
-
e.block.url ? (o(), _("label",
|
|
2657
|
+
e.block.url ? (o(), _("label", ms, [T("input", {
|
|
2582
2658
|
type: "checkbox",
|
|
2583
2659
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2584
2660
|
checked: e.block.openInNewTab ?? !1,
|
|
2585
2661
|
onChange: n[1] ||= (e) => b("openInNewTab", e.target.checked)
|
|
2586
|
-
}, null, 40,
|
|
2662
|
+
}, null, 40, hs), A(" " + h(y(i).video.openInNewTab), 1)])) : v("", !0)
|
|
2587
2663
|
]),
|
|
2588
|
-
d.value ? (o(), _("div",
|
|
2664
|
+
d.value ? (o(), _("div", gs, [T("label", { class: w(y(W)) }, [A(h(y(i).video.placeholderUrl) + " ", 1), T("span", _s, h(y(i).video.optional), 1)], 2), T("input", {
|
|
2589
2665
|
type: "url",
|
|
2590
2666
|
class: w(y(U)),
|
|
2591
2667
|
value: e.block.placeholderUrl || "",
|
|
2592
2668
|
placeholder: y(i).video.placeholderUrlPlaceholder,
|
|
2593
2669
|
title: y(i).video.placeholderUrlTooltip,
|
|
2594
2670
|
onInput: n[2] ||= (e) => b("placeholderUrl", e.target.value)
|
|
2595
|
-
}, null, 42,
|
|
2596
|
-
T("div",
|
|
2597
|
-
T("label", { class: w(y(W)) }, [
|
|
2598
|
-
|
|
2671
|
+
}, null, 42, vs)])) : v("", !0),
|
|
2672
|
+
T("div", ys, [
|
|
2673
|
+
T("label", { class: w(y(W)) }, [A(h(y(i).video.customThumbnail) + " ", 1), T("span", bs, h(y(i).video.optional), 1)], 2),
|
|
2674
|
+
M(X, {
|
|
2599
2675
|
"model-value": e.block.thumbnailUrl,
|
|
2600
2676
|
type: "url",
|
|
2601
2677
|
placeholder: y(i).video.thumbnailPlaceholder,
|
|
@@ -2615,28 +2691,28 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2615
2691
|
"background-color": "var(--tpl-bg)"
|
|
2616
2692
|
},
|
|
2617
2693
|
onClick: x
|
|
2618
|
-
}, [
|
|
2694
|
+
}, [M(y(rt), {
|
|
2619
2695
|
size: 14,
|
|
2620
2696
|
"stroke-width": 1.5
|
|
2621
|
-
}),
|
|
2697
|
+
}), A(" " + h(y(i).image.browseMedia), 1)])) : v("", !0)
|
|
2622
2698
|
]),
|
|
2623
|
-
T("div",
|
|
2699
|
+
T("div", xs, [T("label", { class: w(y(W)) }, h(y(i).video.altText), 3), M(X, {
|
|
2624
2700
|
"model-value": e.block.alt,
|
|
2625
2701
|
type: "text",
|
|
2626
2702
|
placeholder: y(i).video.altTextPlaceholder,
|
|
2627
2703
|
"onUpdate:modelValue": n[4] ||= (e) => b("alt", e)
|
|
2628
2704
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2629
|
-
T("div",
|
|
2705
|
+
T("div", Ss, [T("label", { class: w(y(W)) }, h(y(i).video.width), 3), T("select", {
|
|
2630
2706
|
class: w(y(U)),
|
|
2631
2707
|
value: e.block.width,
|
|
2632
2708
|
onChange: n[5] ||= (e) => b("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2633
2709
|
}, [
|
|
2634
|
-
T("option",
|
|
2710
|
+
T("option", ws, h(y(i).video.fullWidth), 1),
|
|
2635
2711
|
n[7] ||= T("option", { value: "300" }, "300px", -1),
|
|
2636
2712
|
n[8] ||= T("option", { value: "400" }, "400px", -1),
|
|
2637
2713
|
n[9] ||= T("option", { value: "500" }, "500px", -1)
|
|
2638
|
-
], 42,
|
|
2639
|
-
T("div",
|
|
2714
|
+
], 42, Cs)]),
|
|
2715
|
+
T("div", Ts, [T("label", { class: w(y(W)) }, h(y(i).title.align), 3), M(Y, {
|
|
2640
2716
|
options: [
|
|
2641
2717
|
{
|
|
2642
2718
|
value: "left",
|
|
@@ -2656,7 +2732,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2656
2732
|
}, null, 8, ["options", "model-value"])])
|
|
2657
2733
|
], 64));
|
|
2658
2734
|
}
|
|
2659
|
-
}),
|
|
2735
|
+
}), Ds = ["aria-label"], Os = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, ks = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, As = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, js = { class: "tpl:flex tpl:gap-1" }, Ms = ["title"], Ns = ["title"], Ps = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Fs = /*#__PURE__*/ Ue(/* @__PURE__ */ j({
|
|
2660
2736
|
__name: "Toolbar",
|
|
2661
2737
|
props: { block: {} },
|
|
2662
2738
|
emits: [
|
|
@@ -2665,87 +2741,87 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2665
2741
|
"duplicate"
|
|
2666
2742
|
],
|
|
2667
2743
|
setup(e, { emit: t }) {
|
|
2668
|
-
let n = p(() => import("./CountdownToolbar-
|
|
2744
|
+
let n = p(() => import("./CountdownToolbar-C6gX2SJr.js")), r = e, i = t, { t: s } = B(), c = Je(ke, "Toolbar"), u = l(V, []), d = g(() => r.block.type), f = g(() => Ge(r.block)), m = g(() => {
|
|
2669
2745
|
if (f.value) return u.find((e) => e.type === r.block.customType);
|
|
2670
|
-
}), b = g(() => f.value ? m.value?.name ?? r.block.customType :
|
|
2746
|
+
}), b = g(() => f.value ? m.value?.name ?? r.block.customType : ae(d.value, s)), S = c.fonts;
|
|
2671
2747
|
function C(e) {
|
|
2672
2748
|
i("update", e);
|
|
2673
2749
|
}
|
|
2674
2750
|
return (t, r) => (o(), _("aside", {
|
|
2675
2751
|
"aria-label": y(s).landmarks.blockToolbar,
|
|
2676
2752
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2677
|
-
}, [T("div",
|
|
2753
|
+
}, [T("div", Os, [T("div", ks, [y(jt)[d.value] ? (o(), x(a(y(jt)[d.value]), {
|
|
2678
2754
|
key: 0,
|
|
2679
2755
|
size: 16,
|
|
2680
2756
|
"stroke-width": 1.5
|
|
2681
|
-
})) : f.value ? (o(), x(y(
|
|
2757
|
+
})) : f.value ? (o(), x(y(L), {
|
|
2682
2758
|
key: 1,
|
|
2683
2759
|
size: 16,
|
|
2684
2760
|
"stroke-width": 1.5
|
|
2685
|
-
})) : v("", !0), T("h3",
|
|
2761
|
+
})) : v("", !0), T("h3", As, h(b.value), 1)]), T("div", js, [T("button", {
|
|
2686
2762
|
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)]",
|
|
2687
2763
|
title: y(s).toolbar.duplicate,
|
|
2688
2764
|
onClick: r[0] ||= (e) => i("duplicate")
|
|
2689
|
-
}, [
|
|
2765
|
+
}, [M(y(we), {
|
|
2690
2766
|
size: 14,
|
|
2691
2767
|
"stroke-width": 2
|
|
2692
|
-
})], 8,
|
|
2768
|
+
})], 8, Ms), T("button", {
|
|
2693
2769
|
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)]",
|
|
2694
2770
|
title: y(s).toolbar.delete,
|
|
2695
2771
|
onClick: r[1] ||= (e) => i("delete")
|
|
2696
|
-
}, [
|
|
2772
|
+
}, [M(y(Re), {
|
|
2697
2773
|
size: 14,
|
|
2698
2774
|
"stroke-width": 2
|
|
2699
|
-
})], 8,
|
|
2775
|
+
})], 8, Ns)])]), T("div", Ps, [f.value ? (o(), x(ta, {
|
|
2700
2776
|
key: 0,
|
|
2701
2777
|
block: e.block,
|
|
2702
2778
|
onUpdateFieldValues: r[2] ||= (e) => i("update", { fieldValues: e }),
|
|
2703
2779
|
onUpdateDataSourceFetched: r[3] ||= (e) => i("update", { dataSourceFetched: e })
|
|
2704
|
-
}, null, 8, ["block"])) : d.value === "section" ? (o(), x(
|
|
2780
|
+
}, null, 8, ["block"])) : d.value === "section" ? (o(), x(Ya, {
|
|
2705
2781
|
key: 1,
|
|
2706
2782
|
block: e.block,
|
|
2707
2783
|
onUpdate: C
|
|
2708
|
-
}, null, 8, ["block"])) : d.value === "title" ? (o(), x(
|
|
2784
|
+
}, null, 8, ["block"])) : d.value === "title" ? (o(), x(fs, {
|
|
2709
2785
|
key: 2,
|
|
2710
2786
|
block: e.block,
|
|
2711
2787
|
"font-families": y(S),
|
|
2712
2788
|
onUpdate: C
|
|
2713
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), _(
|
|
2789
|
+
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), _(k, { key: 3 }, [], 64)) : d.value === "image" ? (o(), x(ja, {
|
|
2714
2790
|
key: 4,
|
|
2715
2791
|
block: e.block,
|
|
2716
2792
|
onUpdate: C
|
|
2717
|
-
}, null, 8, ["block"])) : d.value === "video" ? (o(), x(
|
|
2793
|
+
}, null, 8, ["block"])) : d.value === "video" ? (o(), x(Es, {
|
|
2718
2794
|
key: 5,
|
|
2719
2795
|
block: e.block,
|
|
2720
2796
|
onUpdate: C
|
|
2721
|
-
}, null, 8, ["block"])) : d.value === "button" ? (o(), x(
|
|
2797
|
+
}, null, 8, ["block"])) : d.value === "button" ? (o(), x(Dr, {
|
|
2722
2798
|
key: 6,
|
|
2723
2799
|
block: e.block,
|
|
2724
2800
|
"font-families": y(S),
|
|
2725
2801
|
onUpdate: C
|
|
2726
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), x(
|
|
2802
|
+
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), x(sa, {
|
|
2727
2803
|
key: 7,
|
|
2728
2804
|
block: e.block,
|
|
2729
2805
|
onUpdate: C
|
|
2730
|
-
}, null, 8, ["block"])) : d.value === "social" ? (o(), x(
|
|
2806
|
+
}, null, 8, ["block"])) : d.value === "social" ? (o(), x(ho, {
|
|
2731
2807
|
key: 8,
|
|
2732
2808
|
block: e.block,
|
|
2733
2809
|
onUpdate: C
|
|
2734
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (o(), x(
|
|
2810
|
+
}, null, 8, ["block"])) : d.value === "menu" ? (o(), x(Ua, {
|
|
2735
2811
|
key: 9,
|
|
2736
2812
|
block: e.block,
|
|
2737
2813
|
"font-families": y(S),
|
|
2738
2814
|
onUpdate: C
|
|
2739
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), x(
|
|
2815
|
+
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), x($o, {
|
|
2740
2816
|
key: 10,
|
|
2741
2817
|
block: e.block,
|
|
2742
2818
|
"font-families": y(S),
|
|
2743
2819
|
onUpdate: C
|
|
2744
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), x(
|
|
2820
|
+
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), x(bo, {
|
|
2745
2821
|
key: 11,
|
|
2746
2822
|
block: e.block,
|
|
2747
2823
|
onUpdate: C
|
|
2748
|
-
}, null, 8, ["block"])) : d.value === "html" ? (o(), x(
|
|
2824
|
+
}, null, 8, ["block"])) : d.value === "html" ? (o(), x(da, {
|
|
2749
2825
|
key: 12,
|
|
2750
2826
|
block: e.block,
|
|
2751
2827
|
onUpdate: C
|
|
@@ -2754,52 +2830,52 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2754
2830
|
block: e.block,
|
|
2755
2831
|
"font-families": y(S),
|
|
2756
2832
|
onUpdate: C
|
|
2757
|
-
}, null, 8, ["block", "font-families"])) : v("", !0),
|
|
2833
|
+
}, null, 8, ["block", "font-families"])) : v("", !0), M(_i, {
|
|
2758
2834
|
block: e.block,
|
|
2759
2835
|
"is-first-section": d.value === "paragraph",
|
|
2760
2836
|
onUpdate: C
|
|
2761
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
2837
|
+
}, null, 8, ["block", "is-first-section"])])], 8, Ds));
|
|
2762
2838
|
}
|
|
2763
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
2839
|
+
}), [["__scopeId", "data-v-2ac88283"]]), Is = ["aria-label"], Ls = {
|
|
2764
2840
|
role: "tablist",
|
|
2765
2841
|
class: "tpl:relative tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-active)] tpl:p-1.5"
|
|
2766
|
-
},
|
|
2842
|
+
}, Rs = [
|
|
2767
2843
|
"aria-selected",
|
|
2768
2844
|
"aria-label",
|
|
2769
2845
|
"title"
|
|
2770
|
-
],
|
|
2846
|
+
], zs = { key: 0 }, Bs = [
|
|
2771
2847
|
"aria-selected",
|
|
2772
2848
|
"aria-label",
|
|
2773
2849
|
"title"
|
|
2774
|
-
],
|
|
2850
|
+
], Vs = { key: 0 }, Hs = [
|
|
2775
2851
|
"aria-selected",
|
|
2776
2852
|
"aria-label",
|
|
2777
2853
|
"title"
|
|
2778
|
-
],
|
|
2854
|
+
], Us = { key: 0 }, Ws = {
|
|
2779
2855
|
key: 1,
|
|
2780
2856
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
2781
|
-
},
|
|
2857
|
+
}, Gs = {
|
|
2782
2858
|
key: 0,
|
|
2783
2859
|
id: "tpl-tabpanel-content",
|
|
2784
2860
|
role: "tabpanel",
|
|
2785
2861
|
"aria-labelledby": "tpl-tab-content",
|
|
2786
2862
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2787
|
-
},
|
|
2863
|
+
}, Ks = {
|
|
2788
2864
|
key: 1,
|
|
2789
2865
|
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)]"
|
|
2790
|
-
},
|
|
2866
|
+
}, qs = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, Js = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ys = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, Xs = {
|
|
2791
2867
|
key: 1,
|
|
2792
2868
|
id: "tpl-tabpanel-settings",
|
|
2793
2869
|
role: "tabpanel",
|
|
2794
2870
|
"aria-labelledby": "tpl-tab-settings",
|
|
2795
2871
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2796
|
-
},
|
|
2872
|
+
}, Zs = {
|
|
2797
2873
|
key: 2,
|
|
2798
2874
|
id: "tpl-tabpanel-issues",
|
|
2799
2875
|
role: "tabpanel",
|
|
2800
2876
|
"aria-labelledby": "tpl-tab-issues",
|
|
2801
2877
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2802
|
-
},
|
|
2878
|
+
}, Qs = /* @__PURE__ */ j({
|
|
2803
2879
|
__name: "RightSidebar",
|
|
2804
2880
|
props: {
|
|
2805
2881
|
selectedBlock: {},
|
|
@@ -2813,7 +2889,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2813
2889
|
"update-settings"
|
|
2814
2890
|
],
|
|
2815
2891
|
setup(e, { emit: t }) {
|
|
2816
|
-
let n = p(() => import("./IssuesPanel-
|
|
2892
|
+
let n = p(() => import("./IssuesPanel-Bo1uhdSe.js")), r = e, i = t, { t: a } = B(), s = f("content"), c = l(et, null), u = g(() => c !== null), d = g(() => c?.issues.value.length ?? 0);
|
|
2817
2893
|
function m(e) {
|
|
2818
2894
|
return s.value === e ? "tpl:flex-1 tpl:text-[var(--tpl-primary)]" : "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]";
|
|
2819
2895
|
}
|
|
@@ -2823,13 +2899,13 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2823
2899
|
boxShadow: "var(--tpl-shadow-md)"
|
|
2824
2900
|
} : { backgroundColor: "transparent" };
|
|
2825
2901
|
}
|
|
2826
|
-
return
|
|
2902
|
+
return N(() => r.selectedBlock, (e) => {
|
|
2827
2903
|
e && (s.value = "content");
|
|
2828
2904
|
}), (t, r) => (o(), _("aside", {
|
|
2829
2905
|
"aria-label": y(a).landmarks.rightSidebar,
|
|
2830
2906
|
class: w(["tpl-right-sidebar tpl:absolute tpl:top-14 tpl:bottom-0 tpl:z-40 tpl:flex tpl:w-[320px] tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)] tpl:transition-all tpl:duration-200 tpl:border-l tpl:border-[var(--tpl-border)]", e.shiftedLeft ? "tpl:right-[360px]" : "tpl:right-0"])
|
|
2831
2907
|
}, [
|
|
2832
|
-
T("div",
|
|
2908
|
+
T("div", Ls, [
|
|
2833
2909
|
T("button", {
|
|
2834
2910
|
id: "tpl-tab-content",
|
|
2835
2911
|
role: "tab",
|
|
@@ -2840,10 +2916,10 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2840
2916
|
class: w(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", m("content")]),
|
|
2841
2917
|
style: D(b("content")),
|
|
2842
2918
|
onClick: r[0] ||= (e) => s.value = "content"
|
|
2843
|
-
}, [
|
|
2919
|
+
}, [M(y(Ot), {
|
|
2844
2920
|
size: 14,
|
|
2845
2921
|
"stroke-width": 2
|
|
2846
|
-
}), s.value === "content" ? (o(), _("span",
|
|
2922
|
+
}), s.value === "content" ? (o(), _("span", zs, h(y(a).sidebar.content), 1)) : v("", !0)], 14, Rs),
|
|
2847
2923
|
T("button", {
|
|
2848
2924
|
id: "tpl-tab-settings",
|
|
2849
2925
|
role: "tab",
|
|
@@ -2854,10 +2930,10 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2854
2930
|
class: w(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", m("settings")]),
|
|
2855
2931
|
style: D(b("settings")),
|
|
2856
2932
|
onClick: r[1] ||= (e) => s.value = "settings"
|
|
2857
|
-
}, [
|
|
2933
|
+
}, [M(y(wt), {
|
|
2858
2934
|
size: 14,
|
|
2859
2935
|
"stroke-width": 1.5
|
|
2860
|
-
}), s.value === "settings" ? (o(), _("span",
|
|
2936
|
+
}), s.value === "settings" ? (o(), _("span", Vs, h(y(a).sidebar.settings), 1)) : v("", !0)], 14, Bs),
|
|
2861
2937
|
u.value ? (o(), _("button", {
|
|
2862
2938
|
key: 0,
|
|
2863
2939
|
id: "tpl-tab-issues",
|
|
@@ -2870,64 +2946,64 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2870
2946
|
style: D(b("issues")),
|
|
2871
2947
|
onClick: r[2] ||= (e) => s.value = "issues"
|
|
2872
2948
|
}, [
|
|
2873
|
-
|
|
2949
|
+
M(y(pt), {
|
|
2874
2950
|
size: 14,
|
|
2875
2951
|
"stroke-width": 1.5
|
|
2876
2952
|
}),
|
|
2877
|
-
s.value === "issues" ? (o(), _("span",
|
|
2878
|
-
d.value > 0 ? (o(), _("span",
|
|
2879
|
-
], 14,
|
|
2953
|
+
s.value === "issues" ? (o(), _("span", Us, h(y(a).issues.panelTabLabel), 1)) : v("", !0),
|
|
2954
|
+
d.value > 0 ? (o(), _("span", Ws, h(d.value), 1)) : v("", !0)
|
|
2955
|
+
], 14, Hs)) : v("", !0)
|
|
2880
2956
|
]),
|
|
2881
|
-
s.value === "content" ? (o(), _("div",
|
|
2957
|
+
s.value === "content" ? (o(), _("div", Gs, [e.selectedBlock ? (o(), x(Fs, {
|
|
2882
2958
|
key: 0,
|
|
2883
2959
|
block: e.selectedBlock,
|
|
2884
2960
|
onUpdate: r[3] ||= (e) => i("update-block", e),
|
|
2885
2961
|
onDelete: r[4] ||= (e) => i("delete-block"),
|
|
2886
2962
|
onDuplicate: r[5] ||= (e) => i("duplicate-block")
|
|
2887
|
-
}, null, 8, ["block"])) : (o(), _("div",
|
|
2888
|
-
T("div",
|
|
2963
|
+
}, null, 8, ["block"])) : (o(), _("div", Ks, [
|
|
2964
|
+
T("div", qs, [M(y(ut), {
|
|
2889
2965
|
size: 40,
|
|
2890
2966
|
"stroke-width": 1.5
|
|
2891
2967
|
})]),
|
|
2892
|
-
T("h3",
|
|
2893
|
-
T("p",
|
|
2968
|
+
T("h3", Js, h(y(a).sidebar.noSelection), 1),
|
|
2969
|
+
T("p", Ys, h(y(a).sidebar.noSelectionHint), 1)
|
|
2894
2970
|
]))])) : v("", !0),
|
|
2895
|
-
s.value === "settings" ? (o(), _("div",
|
|
2971
|
+
s.value === "settings" ? (o(), _("div", Xs, [M(Zn, {
|
|
2896
2972
|
settings: e.settings,
|
|
2897
2973
|
onUpdate: r[6] ||= (e) => i("update-settings", e)
|
|
2898
2974
|
}, null, 8, ["settings"])])) : v("", !0),
|
|
2899
|
-
s.value === "issues" && u.value ? (o(), _("div",
|
|
2900
|
-
], 10,
|
|
2975
|
+
s.value === "issues" && u.value ? (o(), _("div", Zs, [M(y(n))])) : v("", !0)
|
|
2976
|
+
], 10, Is));
|
|
2901
2977
|
}
|
|
2902
|
-
}),
|
|
2978
|
+
}), $s = {
|
|
2903
2979
|
class: "tpl-small-screen-notice tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-6 tpl:py-10 tpl:text-center tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)]",
|
|
2904
2980
|
style: { "z-index": "10001" },
|
|
2905
2981
|
role: "status",
|
|
2906
2982
|
"data-testid": "small-screen-notice"
|
|
2907
|
-
},
|
|
2983
|
+
}, ec = { class: "tpl:text-[var(--tpl-text-dim)]" }, tc = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, nc = { class: "tpl:m-0 tpl:max-w-sm tpl:text-sm tpl:leading-normal" }, rc = /* @__PURE__ */ j({
|
|
2908
2984
|
__name: "SmallScreenNotice",
|
|
2909
2985
|
setup(e) {
|
|
2910
|
-
let { t } =
|
|
2911
|
-
return (e, n) => (o(), _("div",
|
|
2912
|
-
T("div",
|
|
2986
|
+
let { t } = B();
|
|
2987
|
+
return (e, n) => (o(), _("div", $s, [
|
|
2988
|
+
T("div", ec, [M(y(mt), {
|
|
2913
2989
|
size: 48,
|
|
2914
2990
|
"stroke-width": 1.5
|
|
2915
2991
|
})]),
|
|
2916
|
-
T("h2",
|
|
2917
|
-
T("p",
|
|
2992
|
+
T("h2", tc, h(y(t).smallScreen.title), 1),
|
|
2993
|
+
T("p", nc, h(y(t).smallScreen.message), 1)
|
|
2918
2994
|
]));
|
|
2919
2995
|
}
|
|
2920
|
-
}),
|
|
2996
|
+
}), ic = ["aria-label"], ac = [
|
|
2921
2997
|
"aria-checked",
|
|
2922
2998
|
"aria-label",
|
|
2923
2999
|
"title",
|
|
2924
3000
|
"onClick"
|
|
2925
|
-
],
|
|
3001
|
+
], oc = /* @__PURE__ */ j({
|
|
2926
3002
|
__name: "ViewportToggle",
|
|
2927
3003
|
props: { viewport: {} },
|
|
2928
3004
|
emits: ["change"],
|
|
2929
3005
|
setup(e, { emit: t }) {
|
|
2930
|
-
let n = e, r = t, { t: i } =
|
|
3006
|
+
let n = e, r = t, { t: i } = B(), a = g(() => [{
|
|
2931
3007
|
value: "desktop",
|
|
2932
3008
|
label: i.viewport.desktop
|
|
2933
3009
|
}, {
|
|
@@ -2952,7 +3028,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2952
3028
|
boxShadow: "var(--tpl-shadow)",
|
|
2953
3029
|
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
2954
3030
|
})
|
|
2955
|
-
}, null, 4), (o(!0), _(
|
|
3031
|
+
}, null, 4), (o(!0), _(k, null, c(a.value, (t) => (o(), _("button", {
|
|
2956
3032
|
key: t.value,
|
|
2957
3033
|
role: "radio",
|
|
2958
3034
|
"aria-checked": e.viewport === t.value,
|
|
@@ -2964,26 +3040,26 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2964
3040
|
}),
|
|
2965
3041
|
title: t.label,
|
|
2966
3042
|
onClick: (e) => r("change", t.value)
|
|
2967
|
-
}, [t.value === "desktop" ? (o(), x(y(
|
|
3043
|
+
}, [t.value === "desktop" ? (o(), x(y(mt), {
|
|
2968
3044
|
key: 0,
|
|
2969
3045
|
size: 18,
|
|
2970
3046
|
"stroke-width": 1.5
|
|
2971
|
-
})) : (o(), x(y(
|
|
3047
|
+
})) : (o(), x(y(Tt), {
|
|
2972
3048
|
key: 1,
|
|
2973
3049
|
size: 18,
|
|
2974
3050
|
"stroke-width": 1.5
|
|
2975
|
-
})), T("span", null, h(t.label), 1)], 12,
|
|
3051
|
+
})), T("span", null, h(t.label), 1)], 12, ac))), 128))], 12, ic));
|
|
2976
3052
|
}
|
|
2977
|
-
}),
|
|
3053
|
+
}), sc = [
|
|
2978
3054
|
"aria-label",
|
|
2979
3055
|
"title",
|
|
2980
3056
|
"aria-pressed"
|
|
2981
|
-
],
|
|
3057
|
+
], cc = /*#__PURE__*/ Ue(/* @__PURE__ */ j({
|
|
2982
3058
|
__name: "PreviewToggle",
|
|
2983
3059
|
props: { previewMode: { type: Boolean } },
|
|
2984
3060
|
emits: ["change"],
|
|
2985
3061
|
setup(e, { emit: t }) {
|
|
2986
|
-
let n = t, { t: r } =
|
|
3062
|
+
let n = t, { t: r } = B();
|
|
2987
3063
|
return (t, i) => (o(), _("button", {
|
|
2988
3064
|
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",
|
|
2989
3065
|
style: D({
|
|
@@ -2994,35 +3070,35 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2994
3070
|
title: e.previewMode ? y(r).previewMode.disable : y(r).previewMode.enable,
|
|
2995
3071
|
"aria-pressed": e.previewMode,
|
|
2996
3072
|
onClick: i[0] ||= (t) => n("change", !e.previewMode)
|
|
2997
|
-
}, [
|
|
3073
|
+
}, [M(S, {
|
|
2998
3074
|
"enter-active-class": "tpl-icon-enter-active",
|
|
2999
3075
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3000
3076
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3001
3077
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3002
3078
|
mode: "out-in"
|
|
3003
3079
|
}, {
|
|
3004
|
-
default: u(() => [e.previewMode ? (o(), x(y(
|
|
3080
|
+
default: u(() => [e.previewMode ? (o(), x(y(Le), {
|
|
3005
3081
|
key: "eye",
|
|
3006
3082
|
size: 18,
|
|
3007
3083
|
"stroke-width": 1.5
|
|
3008
|
-
})) : (o(), x(y(
|
|
3084
|
+
})) : (o(), x(y(at), {
|
|
3009
3085
|
key: "eye-off",
|
|
3010
3086
|
size: 18,
|
|
3011
3087
|
"stroke-width": 1.5
|
|
3012
3088
|
}))]),
|
|
3013
3089
|
_: 1
|
|
3014
|
-
})], 12,
|
|
3090
|
+
})], 12, sc));
|
|
3015
3091
|
}
|
|
3016
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3092
|
+
}), [["__scopeId", "data-v-af87d02a"]]), lc = [
|
|
3017
3093
|
"aria-label",
|
|
3018
3094
|
"title",
|
|
3019
3095
|
"aria-pressed"
|
|
3020
|
-
],
|
|
3096
|
+
], uc = /*#__PURE__*/ Ue(/* @__PURE__ */ j({
|
|
3021
3097
|
__name: "DarkModeToggle",
|
|
3022
3098
|
props: { darkMode: { type: Boolean } },
|
|
3023
3099
|
emits: ["change"],
|
|
3024
3100
|
setup(e, { emit: t }) {
|
|
3025
|
-
let n = t, { t: r } =
|
|
3101
|
+
let n = t, { t: r } = B();
|
|
3026
3102
|
return (t, i) => (o(), _("button", {
|
|
3027
3103
|
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",
|
|
3028
3104
|
style: D({
|
|
@@ -3033,44 +3109,44 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3033
3109
|
title: e.darkMode ? y(r).darkMode.disable : y(r).darkMode.enable,
|
|
3034
3110
|
"aria-pressed": e.darkMode,
|
|
3035
3111
|
onClick: i[0] ||= (t) => n("change", !e.darkMode)
|
|
3036
|
-
}, [
|
|
3112
|
+
}, [M(S, {
|
|
3037
3113
|
"enter-active-class": "tpl-icon-enter-active",
|
|
3038
3114
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3039
3115
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3040
3116
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3041
3117
|
mode: "out-in"
|
|
3042
3118
|
}, {
|
|
3043
|
-
default: u(() => [e.darkMode ? (o(), x(y(
|
|
3119
|
+
default: u(() => [e.darkMode ? (o(), x(y(lt), {
|
|
3044
3120
|
key: "moon",
|
|
3045
3121
|
size: 18,
|
|
3046
3122
|
"stroke-width": 1.5
|
|
3047
|
-
})) : (o(), x(y(
|
|
3123
|
+
})) : (o(), x(y(Dt), {
|
|
3048
3124
|
key: "sun",
|
|
3049
3125
|
size: 18,
|
|
3050
3126
|
"stroke-width": 1.5
|
|
3051
3127
|
}))]),
|
|
3052
3128
|
_: 1
|
|
3053
|
-
})], 12,
|
|
3129
|
+
})], 12, lc));
|
|
3054
3130
|
}
|
|
3055
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3131
|
+
}), [["__scopeId", "data-v-f8694f76"]]), dc = {
|
|
3056
3132
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3057
3133
|
style: {
|
|
3058
3134
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3059
3135
|
"backdrop-filter": "blur(8px)",
|
|
3060
3136
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3061
3137
|
}
|
|
3062
|
-
},
|
|
3138
|
+
}, fc = {
|
|
3063
3139
|
href: "https://github.com/templatical/sdk",
|
|
3064
3140
|
target: "_blank",
|
|
3065
3141
|
rel: "noopener noreferrer",
|
|
3066
3142
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3067
3143
|
style: { "text-decoration": "none" }
|
|
3068
|
-
},
|
|
3144
|
+
}, pc = /* @__PURE__ */ j({
|
|
3069
3145
|
__name: "EditorFooter",
|
|
3070
3146
|
props: { positionClass: {} },
|
|
3071
3147
|
setup(e) {
|
|
3072
|
-
let { t } =
|
|
3073
|
-
return (n, r) => (o(), _("footer", { class: w(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [T("div",
|
|
3148
|
+
let { t } = B();
|
|
3149
|
+
return (n, r) => (o(), _("footer", { class: w(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [T("div", dc, [
|
|
3074
3150
|
T("span", null, h(y(t).footer.poweredBy), 1),
|
|
3075
3151
|
r[0] ||= T("a", {
|
|
3076
3152
|
href: "https://templatical.com",
|
|
@@ -3083,34 +3159,34 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3083
3159
|
height: "14",
|
|
3084
3160
|
src: "https://templatical.com/logo.svg",
|
|
3085
3161
|
alt: ""
|
|
3086
|
-
}),
|
|
3162
|
+
}), A(" Templatical ")], -1),
|
|
3087
3163
|
r[1] ||= T("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3088
|
-
T("a",
|
|
3164
|
+
T("a", fc, h(y(t).footer.openSource), 1)
|
|
3089
3165
|
])], 2));
|
|
3090
3166
|
}
|
|
3091
|
-
}),
|
|
3167
|
+
}), mc = ["aria-labelledby", "data-tpl-theme"], hc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, gc = ["id"], _c = ["aria-label"], vc = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, yc = [
|
|
3092
3168
|
"id",
|
|
3093
3169
|
"placeholder",
|
|
3094
3170
|
"aria-label",
|
|
3095
3171
|
"aria-activedescendant"
|
|
3096
|
-
],
|
|
3172
|
+
], bc = {
|
|
3097
3173
|
key: 0,
|
|
3098
3174
|
class: "tpl:flex tpl:gap-1.5 tpl:overflow-x-auto tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2",
|
|
3099
3175
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3100
|
-
},
|
|
3176
|
+
}, xc = ["data-group-name", "onClick"], Sc = ["aria-label"], Cc = {
|
|
3101
3177
|
key: 0,
|
|
3102
3178
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3103
3179
|
"data-testid": "merge-tag-picker-empty"
|
|
3104
|
-
},
|
|
3180
|
+
}, wc = {
|
|
3105
3181
|
key: 1,
|
|
3106
3182
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3107
3183
|
"data-testid": "merge-tag-picker-empty"
|
|
3108
|
-
},
|
|
3184
|
+
}, Tc = [
|
|
3109
3185
|
"aria-expanded",
|
|
3110
3186
|
"data-group-name",
|
|
3111
3187
|
"data-group-collapsed",
|
|
3112
3188
|
"onClick"
|
|
3113
|
-
],
|
|
3189
|
+
], Ec = { class: "tpl:ml-1 tpl:font-normal" }, Dc = [
|
|
3114
3190
|
"id",
|
|
3115
3191
|
"aria-selected",
|
|
3116
3192
|
"data-selected",
|
|
@@ -3119,38 +3195,38 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3119
3195
|
"title",
|
|
3120
3196
|
"onMousemove",
|
|
3121
3197
|
"onClick"
|
|
3122
|
-
],
|
|
3198
|
+
], Oc = { class: "tpl:text-sm tpl:font-medium" }, kc = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, Ac = {
|
|
3123
3199
|
key: 0,
|
|
3124
3200
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3125
|
-
}, $ = "tpl-merge-tag-picker-list",
|
|
3201
|
+
}, $ = "tpl-merge-tag-picker-list", jc = /* @__PURE__ */ j({
|
|
3126
3202
|
__name: "MergeTagPickerModal",
|
|
3127
3203
|
setup(e) {
|
|
3128
|
-
let t =
|
|
3129
|
-
function
|
|
3130
|
-
return
|
|
3204
|
+
let t = Je(je, "MergeTagPickerModal"), { t: n, format: i } = B(), a = l(He, null), d = l(Pe, null), p = f(""), S = Xe(p, 200), E = f(null), O = g(() => S.value.trim().length > 0), A = f(0), j = g(() => t.tags.value.some((e) => !!e.group)), P = f(/* @__PURE__ */ new Set());
|
|
3205
|
+
function F(e) {
|
|
3206
|
+
return P.value.has(e);
|
|
3131
3207
|
}
|
|
3132
|
-
function
|
|
3133
|
-
let t = new Set(
|
|
3134
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
3208
|
+
function ee(e) {
|
|
3209
|
+
let t = new Set(P.value);
|
|
3210
|
+
t.has(e) ? t.delete(e) : t.add(e), P.value = t, A.value = 0;
|
|
3135
3211
|
}
|
|
3136
|
-
let
|
|
3212
|
+
let te = g(() => {
|
|
3137
3213
|
let e = S.value.trim().toLowerCase();
|
|
3138
3214
|
return e ? t.tags.value.filter((t) => [
|
|
3139
3215
|
t.label,
|
|
3140
3216
|
t.value,
|
|
3141
3217
|
t.description ?? ""
|
|
3142
3218
|
].join(" ").toLowerCase().includes(e)) : t.tags.value;
|
|
3143
|
-
}),
|
|
3144
|
-
if (!
|
|
3219
|
+
}), I = g(() => {
|
|
3220
|
+
if (!j.value) return [];
|
|
3145
3221
|
let e = n.mergeTag.picker.otherGroup, r = /* @__PURE__ */ new Set(), i = [];
|
|
3146
3222
|
for (let n of t.tags.value) {
|
|
3147
3223
|
let t = n.group ?? e;
|
|
3148
3224
|
r.has(t) || (r.add(t), i.push(t));
|
|
3149
3225
|
}
|
|
3150
3226
|
return i;
|
|
3151
|
-
}),
|
|
3152
|
-
let e =
|
|
3153
|
-
if (!
|
|
3227
|
+
}), L = g(() => {
|
|
3228
|
+
let e = te.value;
|
|
3229
|
+
if (!j.value || O.value) return e.map((e, t) => ({
|
|
3154
3230
|
kind: "tag",
|
|
3155
3231
|
tag: e,
|
|
3156
3232
|
index: t
|
|
@@ -3167,49 +3243,49 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3167
3243
|
kind: "header",
|
|
3168
3244
|
group: e,
|
|
3169
3245
|
count: t.length
|
|
3170
|
-
}), !
|
|
3246
|
+
}), !P.value.has(e)) for (let e of t) a.push({
|
|
3171
3247
|
kind: "tag",
|
|
3172
3248
|
tag: e,
|
|
3173
3249
|
index: o
|
|
3174
3250
|
}), o++;
|
|
3175
3251
|
}
|
|
3176
3252
|
return a;
|
|
3177
|
-
}),
|
|
3178
|
-
|
|
3179
|
-
e && (p.value = "",
|
|
3253
|
+
}), R = g(() => L.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3254
|
+
N(() => t.isOpen.value, (e) => {
|
|
3255
|
+
e && (p.value = "", A.value = 0, P.value = /* @__PURE__ */ new Set(), s(() => {
|
|
3180
3256
|
E.value?.focus();
|
|
3181
3257
|
}));
|
|
3182
|
-
}),
|
|
3183
|
-
|
|
3258
|
+
}), N(R, (e) => {
|
|
3259
|
+
A.value >= e.length && (A.value = Math.max(0, e.length - 1));
|
|
3184
3260
|
});
|
|
3185
|
-
function
|
|
3261
|
+
function ne(e) {
|
|
3186
3262
|
t.resolve(e);
|
|
3187
3263
|
}
|
|
3188
|
-
function
|
|
3264
|
+
function ie() {
|
|
3189
3265
|
t.resolve(null);
|
|
3190
3266
|
}
|
|
3191
|
-
function
|
|
3192
|
-
if (
|
|
3193
|
-
let t =
|
|
3194
|
-
|
|
3267
|
+
function ae(e) {
|
|
3268
|
+
if (R.value.length === 0) return;
|
|
3269
|
+
let t = A.value + e;
|
|
3270
|
+
A.value = Math.max(0, Math.min(R.value.length - 1, t)), ce();
|
|
3195
3271
|
}
|
|
3196
|
-
let
|
|
3197
|
-
function
|
|
3198
|
-
|
|
3272
|
+
let z = f(null), oe = f({});
|
|
3273
|
+
function se(e, t) {
|
|
3274
|
+
oe.value[e] = t ?? null;
|
|
3199
3275
|
}
|
|
3200
|
-
function
|
|
3276
|
+
function ce() {
|
|
3201
3277
|
s(() => {
|
|
3202
|
-
let e =
|
|
3203
|
-
e && e.querySelector(`[data-merge-tag-index="${
|
|
3278
|
+
let e = z.value;
|
|
3279
|
+
e && e.querySelector(`[data-merge-tag-index="${A.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3204
3280
|
});
|
|
3205
3281
|
}
|
|
3206
|
-
function
|
|
3207
|
-
if (
|
|
3208
|
-
let t = new Set(
|
|
3209
|
-
t.delete(e),
|
|
3282
|
+
function le(e) {
|
|
3283
|
+
if (P.value.has(e)) {
|
|
3284
|
+
let t = new Set(P.value);
|
|
3285
|
+
t.delete(e), P.value = t;
|
|
3210
3286
|
}
|
|
3211
3287
|
s(() => {
|
|
3212
|
-
let t =
|
|
3288
|
+
let t = z.value;
|
|
3213
3289
|
if (!t) return;
|
|
3214
3290
|
let n = 0, r = !1;
|
|
3215
3291
|
for (let i of Array.from(t.children)) {
|
|
@@ -3225,26 +3301,26 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3225
3301
|
});
|
|
3226
3302
|
});
|
|
3227
3303
|
}
|
|
3228
|
-
function
|
|
3229
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3230
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3304
|
+
function ue(e) {
|
|
3305
|
+
if (e.key === "ArrowDown") e.preventDefault(), ae(1);
|
|
3306
|
+
else if (e.key === "ArrowUp") e.preventDefault(), ae(-1);
|
|
3231
3307
|
else if (e.key === "Enter") {
|
|
3232
3308
|
e.preventDefault();
|
|
3233
|
-
let t =
|
|
3234
|
-
t &&
|
|
3309
|
+
let t = R.value[A.value];
|
|
3310
|
+
t && ne(t);
|
|
3235
3311
|
}
|
|
3236
3312
|
}
|
|
3237
|
-
function
|
|
3238
|
-
if (
|
|
3313
|
+
function de() {
|
|
3314
|
+
if (R.value.length !== 0) return `${$}-opt-${A.value}`;
|
|
3239
3315
|
}
|
|
3240
|
-
function
|
|
3316
|
+
function fe(e) {
|
|
3241
3317
|
return `${$}-opt-${e}`;
|
|
3242
3318
|
}
|
|
3243
|
-
let
|
|
3244
|
-
return (e, s) => (o(), x(
|
|
3319
|
+
let V = g(() => t.tags.value.length === 0), pe = g(() => !V.value && te.value.length === 0), me = g(() => j.value && I.value.length > 1 && !O.value);
|
|
3320
|
+
return (e, s) => (o(), x(_e, {
|
|
3245
3321
|
visible: y(t).isOpen.value,
|
|
3246
|
-
onClose:
|
|
3247
|
-
onKeydown:
|
|
3322
|
+
onClose: ie,
|
|
3323
|
+
onKeydown: ue
|
|
3248
3324
|
}, {
|
|
3249
3325
|
default: u(() => [T("div", {
|
|
3250
3326
|
role: "dialog",
|
|
@@ -3255,20 +3331,20 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3255
3331
|
class: "tpl tpl:flex tpl:max-h-[80vh] tpl:w-[min(420px,92vw)] tpl:flex-col tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
3256
3332
|
style: D(y(a))
|
|
3257
3333
|
}, [
|
|
3258
|
-
T("header",
|
|
3334
|
+
T("header", hc, [T("h2", {
|
|
3259
3335
|
id: `${$}-title`,
|
|
3260
3336
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3261
|
-
}, h(y(n).mergeTag.picker.title), 9,
|
|
3337
|
+
}, h(y(n).mergeTag.picker.title), 9, gc), T("button", {
|
|
3262
3338
|
type: "button",
|
|
3263
3339
|
class: "tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3264
3340
|
"aria-label": y(n).mergeTag.picker.close,
|
|
3265
3341
|
"data-testid": "merge-tag-picker-close",
|
|
3266
|
-
onClick:
|
|
3267
|
-
}, [
|
|
3342
|
+
onClick: ie
|
|
3343
|
+
}, [M(y(Ye), {
|
|
3268
3344
|
size: 16,
|
|
3269
3345
|
"stroke-width": 2
|
|
3270
|
-
})], 8,
|
|
3271
|
-
T("div",
|
|
3346
|
+
})], 8, _c)]),
|
|
3347
|
+
T("div", vc, [M(y(St), {
|
|
3272
3348
|
class: "tpl:pointer-events-none tpl:absolute tpl:top-1/2 tpl:left-5 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]",
|
|
3273
3349
|
size: 14,
|
|
3274
3350
|
"stroke-width": 2
|
|
@@ -3282,71 +3358,71 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3282
3358
|
placeholder: y(n).mergeTag.picker.searchPlaceholder,
|
|
3283
3359
|
"aria-label": y(n).mergeTag.picker.searchAriaLabel,
|
|
3284
3360
|
"aria-controls": $,
|
|
3285
|
-
"aria-activedescendant":
|
|
3361
|
+
"aria-activedescendant": de(),
|
|
3286
3362
|
"data-testid": "merge-tag-picker-search",
|
|
3287
3363
|
onKeydown: s[1] ||= m(b(() => {}, ["prevent"]), ["enter"])
|
|
3288
|
-
}, null, 40,
|
|
3289
|
-
me.value ? (o(), _("div",
|
|
3364
|
+
}, null, 40, yc), [[C, p.value]])]),
|
|
3365
|
+
me.value ? (o(), _("div", bc, [(o(!0), _(k, null, c(I.value, (e) => (o(), _("button", {
|
|
3290
3366
|
key: e,
|
|
3291
3367
|
type: "button",
|
|
3292
3368
|
class: "tpl:flex tpl:flex-shrink-0 tpl:cursor-pointer tpl:items-center tpl:rounded-full tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-2.5 tpl:py-0.5 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3293
3369
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3294
3370
|
"data-group-name": e,
|
|
3295
|
-
onClick: (t) =>
|
|
3296
|
-
}, h(e), 9,
|
|
3371
|
+
onClick: (t) => le(e)
|
|
3372
|
+
}, h(e), 9, xc))), 128))])) : v("", !0),
|
|
3297
3373
|
T("div", {
|
|
3298
3374
|
id: $,
|
|
3299
3375
|
ref_key: "listRef",
|
|
3300
|
-
ref:
|
|
3376
|
+
ref: z,
|
|
3301
3377
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3302
3378
|
role: "listbox",
|
|
3303
3379
|
"aria-label": y(n).mergeTag.picker.title,
|
|
3304
3380
|
"data-testid": "merge-tag-picker-list"
|
|
3305
|
-
}, [
|
|
3381
|
+
}, [V.value ? (o(), _("div", Cc, h(y(n).mergeTag.picker.empty), 1)) : pe.value ? (o(), _("div", wc, h(y(n).mergeTag.picker.noResults), 1)) : (o(!0), _(k, { key: 2 }, c(L.value, (e, t) => (o(), _(k, { key: t }, [e.kind === "header" ? (o(), _("button", {
|
|
3306
3382
|
key: 0,
|
|
3307
3383
|
ref_for: !0,
|
|
3308
|
-
ref: (t) =>
|
|
3384
|
+
ref: (t) => se(e.group, t),
|
|
3309
3385
|
type: "button",
|
|
3310
|
-
"aria-expanded": !
|
|
3386
|
+
"aria-expanded": !F(e.group),
|
|
3311
3387
|
"aria-controls": $,
|
|
3312
3388
|
class: "tpl:sticky tpl:top-0 tpl:z-10 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-[var(--tpl-bg-elevated)] tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-left tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)]",
|
|
3313
3389
|
"data-testid": "merge-tag-picker-group-header",
|
|
3314
3390
|
"data-group-name": e.group,
|
|
3315
|
-
"data-group-collapsed":
|
|
3316
|
-
onClick: (t) =>
|
|
3391
|
+
"data-group-collapsed": F(e.group) ? "true" : "false",
|
|
3392
|
+
onClick: (t) => ee(e.group)
|
|
3317
3393
|
}, [
|
|
3318
|
-
|
|
3394
|
+
M(y(re), {
|
|
3319
3395
|
size: 12,
|
|
3320
3396
|
"stroke-width": 2,
|
|
3321
|
-
class: w(["tpl:transition-transform",
|
|
3397
|
+
class: w(["tpl:transition-transform", F(e.group) ? "tpl:-rotate-90" : ""])
|
|
3322
3398
|
}, null, 8, ["class"]),
|
|
3323
3399
|
T("span", null, h(e.group), 1),
|
|
3324
|
-
T("span",
|
|
3325
|
-
], 8,
|
|
3400
|
+
T("span", Ec, " (" + h(y(i)(y(n).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
3401
|
+
], 8, Tc)) : (o(), _("button", {
|
|
3326
3402
|
key: 1,
|
|
3327
|
-
id:
|
|
3403
|
+
id: fe(e.index),
|
|
3328
3404
|
type: "button",
|
|
3329
3405
|
role: "option",
|
|
3330
|
-
"aria-selected": e.index ===
|
|
3331
|
-
"data-selected": e.index ===
|
|
3406
|
+
"aria-selected": e.index === A.value,
|
|
3407
|
+
"data-selected": e.index === A.value ? "true" : "false",
|
|
3332
3408
|
"data-merge-tag-index": e.index,
|
|
3333
3409
|
"data-merge-tag-value": e.tag.value,
|
|
3334
3410
|
title: e.tag.description ? `${e.tag.value} — ${e.tag.description}` : e.tag.value,
|
|
3335
|
-
class: w(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index ===
|
|
3411
|
+
class: w(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === A.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3336
3412
|
"data-testid": "merge-tag-picker-item",
|
|
3337
|
-
onMousemove: (t) =>
|
|
3338
|
-
onClick: (t) =>
|
|
3413
|
+
onMousemove: (t) => A.value = e.index,
|
|
3414
|
+
onClick: (t) => ne(e.tag)
|
|
3339
3415
|
}, [
|
|
3340
|
-
T("span",
|
|
3341
|
-
T("span",
|
|
3342
|
-
e.tag.description ? (o(), _("span",
|
|
3343
|
-
], 42,
|
|
3344
|
-
], 12,
|
|
3416
|
+
T("span", Oc, h(e.tag.label), 1),
|
|
3417
|
+
T("span", kc, h(e.tag.value), 1),
|
|
3418
|
+
e.tag.description ? (o(), _("span", Ac, h(e.tag.description), 1)) : v("", !0)
|
|
3419
|
+
], 42, Dc))], 64))), 128))], 8, Sc)
|
|
3420
|
+
], 12, mc)]),
|
|
3345
3421
|
_: 1
|
|
3346
3422
|
}, 8, ["visible"]));
|
|
3347
3423
|
}
|
|
3348
3424
|
});
|
|
3349
3425
|
//#endregion
|
|
3350
|
-
export {
|
|
3426
|
+
export { oc as a, cn as c, zt as d, cc as i, Zt as l, pc as n, rc as o, uc as r, Qs as s, jc as t, Xt as u };
|
|
3351
3427
|
|
|
3352
|
-
//# sourceMappingURL=styles-
|
|
3428
|
+
//# sourceMappingURL=styles-DiAdtiz9.js.map
|