@templatical/editor 0.19.0 → 0.20.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-DAQTFuvi.js → AiChatSidebar-ChrE6pUq.js} +7 -7
- package/dist/{AiFeatureMenu-aFSO20PR.js → AiFeatureMenu-DkQ9HhQ6.js} +4 -4
- package/dist/{BlockIssueBadge-BQmq1bxn.js → BlockIssueBadge-B4QjePax.js} +2 -2
- package/dist/{CloudEditor-D0K-m1GA.js → CloudEditor-CfX-aMiV.js} +15 -15
- package/dist/{CollaboratorBar-CJO3l6Dt.js → CollaboratorBar-DTibhQ1j.js} +2 -2
- package/dist/{ColorPicker-BsgpTJqK.js → ColorPicker-4vDYhdGe.js} +1 -1
- package/dist/{CommentsSidebar-BYMVucZh.js → CommentsSidebar-D-o5Stlg.js} +8 -8
- package/dist/{CountdownToolbar-PJI3ffi1.js → CountdownToolbar-D7yQqnA2.js} +2 -2
- package/dist/{DesignReferenceSidebar-QfAV8XT9.js → DesignReferenceSidebar-DnO6ZdwS.js} +5 -5
- package/dist/{IssuesPanel-CTjRgz8w.js → IssuesPanel-X_vkNGrs.js} +5 -5
- package/dist/{ModuleBrowserModal-BNalLx0k.js → ModuleBrowserModal-AJt--JPh.js} +6 -6
- package/dist/{ModulePreviewCanvas-BwObwisa.js → ModulePreviewCanvas-BKYOcVCh.js} +1 -1
- package/dist/{NumberWithSuffix-D3BKz66W.js → NumberWithSuffix-Bf3rNxza.js} +1 -1
- package/dist/{ParagraphEditor-Cf75UfSo.js → ParagraphEditor-C5ixOIYb.js} +7 -7
- package/dist/{RichTextEditorContent-MdaLz6Q3.js → RichTextEditorContent-DwhDnMsG.js} +3 -3
- package/dist/{SaveModuleDialog-MTjwiF9D.js → SaveModuleDialog-B4QX9eiv.js} +3 -3
- package/dist/{SnapshotHistory-C_Y1LzAY.js → SnapshotHistory-DaVueFv6.js} +5 -5
- package/dist/{TemplateScoringPanel-DikuKc6i.js → TemplateScoringPanel-B0UHoTLx.js} +10 -10
- package/dist/{TestEmailModal-BW8aTtzf.js → TestEmailModal-BkauxF7j.js} +3 -3
- package/dist/{TitleEditor-CCUkbRN0.js → TitleEditor-n6WDVDjW.js} +4 -4
- package/dist/{TplModal-DoOwUKlT.js → TplModal-BDDyvT-C.js} +1 -1
- package/dist/{blockTypeIcons-BlPKjD7M.js → blockTypeIcons-4D0aFXNg.js} +2 -2
- package/dist/bundle-stats.json +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js → AiFeatureMenu-CIBHAGSz.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js.map → AiFeatureMenu-CIBHAGSz.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js → BlockIssueBadge-CxMiLo3p.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js.map → BlockIssueBadge-CxMiLo3p.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Dufl354p.js → CloudEditor-CEa3Xgqh.js} +131 -131
- package/dist/cdn/chunks/{CloudEditor-Dufl354p.js.map → CloudEditor-CEa3Xgqh.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js → CollaboratorBar-Bk1gD02G.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js.map → CollaboratorBar-Bk1gD02G.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-y_obnw4o.js → ColorPicker-ll8pynws.js} +179 -179
- package/dist/cdn/chunks/ColorPicker-ll8pynws.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js → CountdownBlock-eGUE7hhw.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js.map → CountdownBlock-eGUE7hhw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js → CountdownToolbar-C1bkSjUR.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js.map → CountdownToolbar-C1bkSjUR.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js → IssuesPanel-Csasylf_.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js.map → IssuesPanel-Csasylf_.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DG4AVFjH.js → ModuleBrowserModal-DznWWtBI.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-DG4AVFjH.js.map → ModuleBrowserModal-DznWWtBI.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bc_PcJuc.js → ModulePreviewCanvas-D-h7fr87.js} +20 -20
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bc_PcJuc.js.map → ModulePreviewCanvas-D-h7fr87.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-8fOO-LC_.js → NumberWithSuffix-Dt-0odUN.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-8fOO-LC_.js.map → NumberWithSuffix-Dt-0odUN.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js → ParagraphEditor-v0_XEL-v.js} +18 -18
- package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js.map → ParagraphEditor-v0_XEL-v.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js → RichTextEditorContent-NQExNsaV.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js.map → RichTextEditorContent-NQExNsaV.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DhsfYf2n.js → SaveModuleDialog-BpFhTi-k.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-DhsfYf2n.js.map → SaveModuleDialog-BpFhTi-k.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js → TitleEditor-CS-_MzYs.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js.map → TitleEditor-CS-_MzYs.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js → blockTypeIcons-B0Hjh42a.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js.map → blockTypeIcons-B0Hjh42a.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-DLHvZ0UH.js → extensions-Di3hdIRT.js} +22 -22
- package/dist/cdn/chunks/{extensions-DLHvZ0UH.js.map → extensions-Di3hdIRT.js.map} +1 -1
- package/dist/cdn/chunks/{features-Cnfv4QAY.js → features-CLIZ7Q-Y.js} +1490 -1447
- package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +1 -0
- package/dist/cdn/chunks/{icons-DbcM69bb.js → icons-GX40Qm2W.js} +2 -2
- package/dist/cdn/chunks/{icons-DbcM69bb.js.map → icons-GX40Qm2W.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-DpSMwHd4.js → media-library-yYAkAagU.js} +80 -80
- package/dist/cdn/chunks/{media-library-DpSMwHd4.js.map → media-library-yYAkAagU.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CIwiKF8H.js → pusher-R0v5p99W.js} +27 -22
- package/dist/cdn/chunks/pusher-R0v5p99W.js.map +1 -0
- package/dist/cdn/chunks/quality-DffYv9j5.js +2180 -0
- package/dist/cdn/chunks/{quality-D9QqkRcU.js.map → quality-DffYv9j5.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BsLQZNXU.js → renderer-DpBGiXOg.js} +13 -13
- package/dist/cdn/chunks/{renderer-BsLQZNXU.js.map → renderer-DpBGiXOg.js.map} +1 -1
- package/dist/cdn/chunks/{src-zu1ehVNN.js → src-9K6uFiuK.js} +4 -4
- package/dist/cdn/chunks/{src-zu1ehVNN.js.map → src-9K6uFiuK.js.map} +1 -1
- package/dist/cdn/chunks/{styles-Dx-jXeCd.js → styles-DHSmjlpX.js} +837 -833
- package/dist/cdn/chunks/styles-DHSmjlpX.js.map +1 -0
- package/dist/cdn/editor.js +11 -11
- package/dist/{check-Cg6Mc2pP.js → check-Bl4J_tYV.js} +1 -1
- package/dist/{chevron-down-dClfxKrJ.js → chevron-down-COEcl2iP.js} +1 -1
- package/dist/{circle-alert-Bhzm-fNA.js → circle-alert-CvHi5etc.js} +1 -1
- package/dist/{clock-m7TwQw4b.js → clock-CZZw62e8.js} +1 -1
- package/dist/{createLucideIcon-FSF4peHQ.js → createLucideIcon-_peTZQtY.js} +2 -2
- package/dist/{image-up-CDEgJqwA.js → image-up-D26rNdfX.js} +1 -1
- package/dist/{info-BNP8yGsK.js → info-CE3JSTqk.js} +1 -1
- package/dist/{list-checks-jepi4iYr.js → list-checks-BQsLrtBB.js} +1 -1
- package/dist/{loader-circle-BT38qSm3.js → loader-circle-s9Rh5lLd.js} +1 -1
- package/dist/{message-circle-BAHcL9S-.js → message-circle-CI62d690.js} +1 -1
- package/dist/{refresh-cw-as5Bmg4X.js → refresh-cw-DlYfl65Y.js} +1 -1
- package/dist/{scan-line-IAMjPtRw.js → scan-line-CHadrYVb.js} +1 -1
- package/dist/{send-DvMay6bt.js → send-CbP40otC.js} +1 -1
- package/dist/{shield-check-YYDhGroE.js → shield-check-Bnj9aRoJ.js} +1 -1
- package/dist/{sparkles-CCwQMMMZ.js → sparkles-CncWT57a.js} +1 -1
- package/dist/{styles-64uLkPJV.js → styles-DkF_-uX8.js} +658 -654
- package/dist/templatical-editor.js +4 -4
- package/dist/{text-align-start-BwsA6QzC.js → text-align-start-B458vzYw.js} +1 -1
- package/dist/{trash-2-CRBDolnR.js → trash-2-DO0yjSU1.js} +1 -1
- package/dist/{triangle-alert-B2g0ALvq.js → triangle-alert-C18_ima6.js} +1 -1
- package/dist/{upload-y4gxiFp5.js → upload-DsCd2zTR.js} +1 -1
- package/dist/{useEditorCore-ea9OrrH3.js → useEditorCore-kKUemYY6.js} +910 -867
- package/dist/{x-Ctg_250T.js → x-BCFQuE_q.js} +1 -1
- package/package.json +10 -10
- package/dist/cdn/chunks/ColorPicker-y_obnw4o.js.map +0 -1
- package/dist/cdn/chunks/features-Cnfv4QAY.js.map +0 -1
- package/dist/cdn/chunks/pusher-CIwiKF8H.js.map +0 -1
- package/dist/cdn/chunks/quality-D9QqkRcU.js +0 -2180
- package/dist/cdn/chunks/styles-Dx-jXeCd.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { C as e, F as t, G as n, H as r, J as i, K as a, L as o, M as s, O as c, P as l, T as u, V as d, Y as f, Z as p, b as m, c as h, ct as g, f as _, g as v, h as y, it as b, l as x, m as S, n as C, o as w, ot as T, p as E, s as D, st as O, t as k, u as A, v as j, x as M, y as N, z as P } from "./draggable-D840DIZB.js";
|
|
2
|
-
import { $ as F, $t as
|
|
3
|
-
import { A as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { n as
|
|
2
|
+
import { $ as F, $t as ee, A as I, An as L, B as R, Bn as z, Bt as B, Cn as te, Ct as ne, Dn as re, Dt as ie, En as ae, Et as oe, F as se, Fn as ce, G as V, Gt as le, H as ue, Ht as de, I as fe, It as pe, J as me, Jt as he, K as ge, L as _e, Lt as ve, M as ye, N as be, Nn as xe, Nt as Se, O as Ce, Ot as we, P as Te, Pn as Ee, Rn as De, St as Oe, Tt as ke, U as Ae, Un as je, Ut as H, Vt as Me, W as Ne, Y as Pe, Yt as Fe, Zt as Ie, an as Le, cn as Re, ct as ze, en as Be, fn as Ve, ft as He, gn as Ue, hn as We, in as Ge, it as Ke, j as qe, jn as Je, jt as Ye, kn as Xe, kt as Ze, ln as Qe, lt as $e, mn as et, mt as tt, nn as nt, on as rt, pn as it, q as at, qt as ot, rn as st, rt as ct, sn as lt, st as ut, tn as dt, ut as ft, vt as pt, wt as mt, z as ht, zn as gt } from "./features-CLIZ7Q-Y.js";
|
|
3
|
+
import { A as _t, F as vt, G as yt, I as bt, M as xt, N as St, O as Ct, P as wt, T as U, V as Tt, X as Et, Y as Dt, _ as Ot, b as kt, c as At, h as jt, m as Mt, o as Nt, s as Pt, u as Ft, v as It, y as Lt, z as Rt } from "./icons-GX40Qm2W.js";
|
|
4
|
+
import { t as zt } from "./readableTextColor-f8Kykfnh.js";
|
|
5
|
+
import { t as Bt } from "./CountdownBlock-eGUE7hhw.js";
|
|
6
|
+
import { t as Vt } from "./blockTypeIcons-B0Hjh42a.js";
|
|
7
|
+
import { _ as Ht, f as W, g as Ut, h as G, i as Wt, l as Gt, m as K, n as Kt, p as q, t as J, u as qt } from "./ColorPicker-ll8pynws.js";
|
|
8
|
+
import { n as Jt, r as Yt } from "./MergeTagSuggestion-BmMmdcRg.js";
|
|
9
|
+
import { t as Y } from "./ToggleSwitch-OrmX_w18.js";
|
|
10
|
+
import { n as X, r as Z, t as Xt } from "./NumberWithSuffix-Dt-0odUN.js";
|
|
11
11
|
//#region src/utils/resolveLintOptions.ts
|
|
12
|
-
function
|
|
12
|
+
function Zt(e) {
|
|
13
13
|
return {
|
|
14
14
|
...e.lint,
|
|
15
15
|
locale: e.locale
|
|
@@ -17,19 +17,19 @@ function qt(e) {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
20
|
-
var
|
|
20
|
+
var Qt = ["aria-label"], $t = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
23
|
-
},
|
|
23
|
+
}, en = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, tn = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, nn = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, rn = {
|
|
24
24
|
key: 0,
|
|
25
25
|
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)]"
|
|
26
|
-
},
|
|
26
|
+
}, an = {
|
|
27
27
|
key: 1,
|
|
28
28
|
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)]"
|
|
29
|
-
},
|
|
29
|
+
}, on = { class: "tpl:relative" }, sn = {
|
|
30
30
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
31
31
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
32
|
-
},
|
|
32
|
+
}, cn = 96, ln = /*#__PURE__*/ ut(/* @__PURE__ */ M({
|
|
33
33
|
__name: "Canvas",
|
|
34
34
|
props: {
|
|
35
35
|
viewport: {},
|
|
@@ -46,21 +46,21 @@ var Jt = ["aria-label"], Yt = {
|
|
|
46
46
|
],
|
|
47
47
|
setup(e, { emit: t }) {
|
|
48
48
|
let n = {
|
|
49
|
-
section:
|
|
50
|
-
title:
|
|
49
|
+
section: se,
|
|
50
|
+
title: fe,
|
|
51
51
|
paragraph: R,
|
|
52
|
-
image:
|
|
53
|
-
button:
|
|
54
|
-
divider:
|
|
55
|
-
spacer:
|
|
56
|
-
html:
|
|
57
|
-
social:
|
|
58
|
-
menu:
|
|
59
|
-
table:
|
|
60
|
-
video:
|
|
61
|
-
countdown:
|
|
62
|
-
custom:
|
|
63
|
-
}, i = e, a = t, { t: c } =
|
|
52
|
+
image: Ne,
|
|
53
|
+
button: pe,
|
|
54
|
+
divider: me,
|
|
55
|
+
spacer: ye,
|
|
56
|
+
html: at,
|
|
57
|
+
social: be,
|
|
58
|
+
menu: Ae,
|
|
59
|
+
table: qe,
|
|
60
|
+
video: I,
|
|
61
|
+
countdown: Bt,
|
|
62
|
+
custom: Pe
|
|
63
|
+
}, i = e, a = t, { t: c } = H(), { t: f } = Ke(), m = Ue(st, "Canvas"), h = u(ee, null), x = u(he, null), C = u(Fe, {}), w = _(() => (C.plan?.hasFeature("ai_generation") ?? !1) && (C.ai?.isFeatureEnabled("chat") ?? !1)), M = _(() => (C.plan?.hasFeature("ai_generation") ?? !1) && (C.ai?.isFeatureEnabled("designToTemplate") ?? !1)), P = _({
|
|
64
64
|
get: () => i.content.blocks,
|
|
65
65
|
set: (e) => {
|
|
66
66
|
m.setContent({
|
|
@@ -73,29 +73,29 @@ var Jt = ["aria-label"], Yt = {
|
|
|
73
73
|
case "mobile": return 375;
|
|
74
74
|
default: return i.content.settings.width;
|
|
75
75
|
}
|
|
76
|
-
}),
|
|
76
|
+
}), L = _(() => F.value + cn * 2), z = _(() => {
|
|
77
77
|
let e = { fontFamily: i.content.settings.fontFamily };
|
|
78
78
|
return i.content.settings.textColor && (e.color = i.content.settings.textColor), i.content.settings.linkColor && (e["--tpl-doc-link-color"] = i.content.settings.linkColor), i.content.settings.linkUnderline && (e["--tpl-doc-link-underline"] = "underline"), e;
|
|
79
|
-
}),
|
|
80
|
-
function
|
|
81
|
-
|
|
79
|
+
}), B = _(() => P.value.length === 0 && !i.previewMode), te = p(0), ne = _(() => B.value && te.value > 0);
|
|
80
|
+
function re() {
|
|
81
|
+
B.value && (te.value += 1);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
83
|
+
function ie() {
|
|
84
|
+
B.value && (te.value = Math.max(0, te.value - 1));
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
86
|
+
function ae() {
|
|
87
|
+
te.value = 0;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function oe(e) {
|
|
90
90
|
i.previewMode || e.target === e.currentTarget && a("select-block", null);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
92
|
+
function ce(e) {
|
|
93
|
+
return ht(e, x, n);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function V(e) {
|
|
96
96
|
return i.lockedBlocks?.get(e) ?? null;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function le(e, t) {
|
|
99
99
|
e.type === "custom" && m.updateBlock(e.id, {
|
|
100
100
|
fieldValues: t.fieldValues,
|
|
101
101
|
dataSourceFetched: t.dataSourceFetched
|
|
@@ -104,7 +104,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
104
104
|
return (t, n) => (s(), v("div", {
|
|
105
105
|
class: "tpl-canvas-stage tpl:relative tpl:flex tpl:justify-center tpl:rounded-lg",
|
|
106
106
|
style: O({
|
|
107
|
-
width: `${
|
|
107
|
+
width: `${L.value}px`,
|
|
108
108
|
boxShadow: e.darkMode ? "none" : "var(--tpl-shadow-xl)",
|
|
109
109
|
transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
110
110
|
})
|
|
@@ -129,8 +129,8 @@ var Jt = ["aria-label"], Yt = {
|
|
|
129
129
|
"tpl-canvas--dark-mode": e.darkMode,
|
|
130
130
|
"tpl-preview-mode": e.previewMode
|
|
131
131
|
}]),
|
|
132
|
-
style: O(
|
|
133
|
-
onClick:
|
|
132
|
+
style: O(z.value),
|
|
133
|
+
onClick: oe
|
|
134
134
|
}, [N(b(k), {
|
|
135
135
|
modelValue: P.value,
|
|
136
136
|
"onUpdate:modelValue": n[2] ||= (e) => P.value = e,
|
|
@@ -146,38 +146,38 @@ var Jt = ["aria-label"], Yt = {
|
|
|
146
146
|
"force-fallback": !0,
|
|
147
147
|
class: T([
|
|
148
148
|
"tpl-canvas-blocks",
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
B.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" : "",
|
|
150
|
+
B.value && ne.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
151
|
+
B.value && !ne.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
152
152
|
]),
|
|
153
|
-
onDragenter:
|
|
154
|
-
onDragleave:
|
|
155
|
-
onDrop:
|
|
153
|
+
onDragenter: re,
|
|
154
|
+
onDragleave: ie,
|
|
155
|
+
onDrop: ae
|
|
156
156
|
}, {
|
|
157
|
-
default: d(() => [
|
|
158
|
-
E("div",
|
|
157
|
+
default: d(() => [B.value ? (s(), v("div", $t, [
|
|
158
|
+
E("div", en, [N(b(jt), {
|
|
159
159
|
size: 48,
|
|
160
160
|
"stroke-width": 1
|
|
161
161
|
})]),
|
|
162
|
-
E("p",
|
|
163
|
-
E("p",
|
|
164
|
-
w.value && b(f) ? (s(), v("p",
|
|
162
|
+
E("p", tn, g(b(c).canvas.noBlocks), 1),
|
|
163
|
+
E("p", nn, g(b(c).canvas.dragHint), 1),
|
|
164
|
+
w.value && b(f) ? (s(), v("p", rn, [
|
|
165
165
|
j(g(b(c).canvas.aiHintChat) + " ", 1),
|
|
166
166
|
E("button", {
|
|
167
167
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
168
168
|
onClick: n[0] ||= (e) => a("open-ai-chat")
|
|
169
|
-
}, [N(b(
|
|
169
|
+
}, [N(b(tt), {
|
|
170
170
|
size: 14,
|
|
171
171
|
"stroke-width": 2
|
|
172
172
|
}), j(" " + g(b(f).aiMenu.aiAssistant), 1)]),
|
|
173
173
|
j(" " + g(b(c).canvas.aiHintChatSuffix), 1)
|
|
174
174
|
])) : y("", !0),
|
|
175
|
-
M.value && b(f) ? (s(), v("p",
|
|
175
|
+
M.value && b(f) ? (s(), v("p", an, [
|
|
176
176
|
j(g(b(c).canvas.aiHintDesign) + " ", 1),
|
|
177
177
|
E("button", {
|
|
178
178
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
179
179
|
onClick: n[1] ||= (e) => a("open-design-reference")
|
|
180
|
-
}, [N(b(
|
|
180
|
+
}, [N(b(ke), {
|
|
181
181
|
size: 14,
|
|
182
182
|
"stroke-width": 2
|
|
183
183
|
}), j(" " + g(b(f).aiMenu.designToTemplate), 1)]),
|
|
@@ -186,30 +186,30 @@ var Jt = ["aria-label"], Yt = {
|
|
|
186
186
|
])) : y("", !0), (s(!0), v(A, null, l(P.value, (t) => r((s(), v("div", {
|
|
187
187
|
key: t.id,
|
|
188
188
|
class: "tpl-block-item"
|
|
189
|
-
}, [E("div",
|
|
189
|
+
}, [E("div", on, [V(t.id) ? (s(), v("div", {
|
|
190
190
|
key: 0,
|
|
191
191
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
192
192
|
style: O({
|
|
193
|
-
outline: `2px solid ${
|
|
193
|
+
outline: `2px solid ${V(t.id).color}`,
|
|
194
194
|
outlineOffset: "-1px"
|
|
195
195
|
})
|
|
196
196
|
}, [E("span", {
|
|
197
197
|
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",
|
|
198
198
|
style: O({
|
|
199
|
-
backgroundColor:
|
|
200
|
-
color: b(
|
|
199
|
+
backgroundColor: V(t.id).color,
|
|
200
|
+
color: b(zt)(V(t.id).color)
|
|
201
201
|
})
|
|
202
|
-
}, [E("span",
|
|
202
|
+
}, [E("span", sn, g(V(t.id).name.charAt(0)), 1), j(" " + g(V(t.id).name), 1)], 4)], 4)) : y("", !0), N(_e, {
|
|
203
203
|
block: t,
|
|
204
|
-
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !
|
|
204
|
+
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !V(t.id),
|
|
205
205
|
viewport: e.viewport,
|
|
206
206
|
"preview-mode": e.previewMode,
|
|
207
|
-
onSelect: (n) => e.previewMode ||
|
|
207
|
+
onSelect: (n) => e.previewMode || V(t.id) ? void 0 : a("select-block", t.id)
|
|
208
208
|
}, {
|
|
209
|
-
default: d(() => [(s(), S(o(
|
|
209
|
+
default: d(() => [(s(), S(o(ce(t)), {
|
|
210
210
|
block: t,
|
|
211
211
|
viewport: e.viewport,
|
|
212
|
-
onFetchData: (e) =>
|
|
212
|
+
onFetchData: (e) => le(t, e),
|
|
213
213
|
onUpdate: (e) => b(m).updateBlock(t.id, e)
|
|
214
214
|
}, null, 40, [
|
|
215
215
|
"block",
|
|
@@ -230,12 +230,12 @@ var Jt = ["aria-label"], Yt = {
|
|
|
230
230
|
"modelValue",
|
|
231
231
|
"disabled",
|
|
232
232
|
"class"
|
|
233
|
-
])], 6)], 12,
|
|
233
|
+
])], 6)], 12, Qt)], 4));
|
|
234
234
|
}
|
|
235
|
-
}), [["__scopeId", "data-v-b440d13f"]]),
|
|
235
|
+
}), [["__scopeId", "data-v-b440d13f"]]), un = M({
|
|
236
236
|
name: "CustomBlockStylesheets",
|
|
237
237
|
setup() {
|
|
238
|
-
let t = u(
|
|
238
|
+
let t = u(dt, null);
|
|
239
239
|
return () => t ? t.value.map((t, n) => e("style", {
|
|
240
240
|
key: n,
|
|
241
241
|
"data-tpl-custom-block-stylesheet": "",
|
|
@@ -245,7 +245,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
245
245
|
});
|
|
246
246
|
//#endregion
|
|
247
247
|
//#region src/utils/resolvePaletteBlocks.ts
|
|
248
|
-
function
|
|
248
|
+
function dn(e, t) {
|
|
249
249
|
if (!t || t.length === 0) return {
|
|
250
250
|
items: e,
|
|
251
251
|
unknown: []
|
|
@@ -264,27 +264,27 @@ function sn(e, t) {
|
|
|
264
264
|
}
|
|
265
265
|
//#endregion
|
|
266
266
|
//#region src/components/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
267
|
-
var
|
|
267
|
+
var fn = ["aria-label"], pn = {
|
|
268
268
|
key: 0,
|
|
269
269
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
270
|
-
},
|
|
270
|
+
}, mn = ["aria-label"], hn = {
|
|
271
271
|
key: 0,
|
|
272
272
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
273
|
-
},
|
|
273
|
+
}, gn = {
|
|
274
274
|
key: 1,
|
|
275
275
|
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)]"
|
|
276
|
-
},
|
|
276
|
+
}, _n = [
|
|
277
277
|
"data-palette-type",
|
|
278
278
|
"aria-label",
|
|
279
279
|
"onClick",
|
|
280
280
|
"onKeydown"
|
|
281
|
-
],
|
|
281
|
+
], vn = { 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" }, yn = {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
284
|
-
},
|
|
284
|
+
}, bn = /* @__PURE__ */ M({
|
|
285
285
|
__name: "Sidebar",
|
|
286
286
|
setup(e) {
|
|
287
|
-
let { t, format: n } =
|
|
287
|
+
let { t, format: n } = H(), { t: r } = Ke(), i = u(Be, []), a = u(Qe, void 0), c = u(ot, void 0), f = u(st, null), m = u(Fe, {}), h = _(() => (m.savedModules?.moduleCount.value ?? 0) > 0), x = p(!1), C = p(!1);
|
|
288
288
|
function w() {
|
|
289
289
|
C.value || (x.value = !1);
|
|
290
290
|
}
|
|
@@ -310,35 +310,35 @@ var cn = ["aria-label"], ln = {
|
|
|
310
310
|
], M = _(() => {
|
|
311
311
|
let e = j.map((e) => ({
|
|
312
312
|
type: e,
|
|
313
|
-
label:
|
|
313
|
+
label: de(e, t)
|
|
314
314
|
}));
|
|
315
315
|
return m.plan && e.splice(-1, 0, {
|
|
316
316
|
type: "countdown",
|
|
317
|
-
label:
|
|
317
|
+
label: de("countdown", t)
|
|
318
318
|
}), e;
|
|
319
319
|
}), F = _(() => i.map((e) => ({
|
|
320
320
|
type: `custom:${e.type}`,
|
|
321
321
|
label: e.name,
|
|
322
322
|
isCustom: !0,
|
|
323
323
|
icon: e.icon
|
|
324
|
-
}))), ee = _(() => [...M.value, ...F.value]),
|
|
325
|
-
P(() =>
|
|
326
|
-
for (let t of e)
|
|
324
|
+
}))), ee = _(() => [...M.value, ...F.value]), I = _(() => dn(ee.value, a)), L = _(() => I.value.items), R = /* @__PURE__ */ new Set();
|
|
325
|
+
P(() => I.value.unknown, (e) => {
|
|
326
|
+
for (let t of e) R.has(t) || (R.add(t), Me.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.`));
|
|
327
327
|
}, { immediate: !0 });
|
|
328
|
-
function
|
|
328
|
+
function z(e) {
|
|
329
329
|
if (e.isCustom) {
|
|
330
330
|
let t = e.type.replace("custom:", ""), n = i.find((e) => e.type === t);
|
|
331
|
-
if (n) return
|
|
331
|
+
if (n) return gt(n);
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return De(e.type, c);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function B(e) {
|
|
336
336
|
if (!f) return;
|
|
337
|
-
let t =
|
|
337
|
+
let t = z(e);
|
|
338
338
|
f.addBlock(t), f.selectBlock(t.id);
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
340
|
+
function te(e, t) {
|
|
341
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), B(t));
|
|
342
342
|
}
|
|
343
343
|
return (e, i) => (s(), v("aside", {
|
|
344
344
|
"aria-label": b(t).sidebarNav.palette,
|
|
@@ -354,28 +354,28 @@ var cn = ["aria-label"], ln = {
|
|
|
354
354
|
onMouseleave: w,
|
|
355
355
|
onFocusin: i[2] ||= (e) => x.value = !0,
|
|
356
356
|
onFocusout: i[3] ||= (e) => x.value = !1
|
|
357
|
-
}, [h.value && b(r) ? (s(), v("div",
|
|
357
|
+
}, [h.value && b(r) ? (s(), v("div", pn, [E("button", {
|
|
358
358
|
type: "button",
|
|
359
359
|
"aria-label": b(t).sidebarNav.browseModules,
|
|
360
360
|
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)]",
|
|
361
361
|
style: O({ justifyContent: x.value ? "flex-start" : "center" }),
|
|
362
362
|
onClick: i[0] ||= (e) => b(m).savedModules?.openBrowser()
|
|
363
363
|
}, [
|
|
364
|
-
N(b(
|
|
364
|
+
N(b(_t), {
|
|
365
365
|
size: 20,
|
|
366
366
|
"stroke-width": 1.5,
|
|
367
367
|
class: "tpl:shrink-0"
|
|
368
368
|
}),
|
|
369
|
-
x.value ? (s(), v("span",
|
|
370
|
-
x.value ? (s(), v("span",
|
|
371
|
-
], 12,
|
|
372
|
-
"model-value":
|
|
369
|
+
x.value ? (s(), v("span", hn, g(b(r).modules.title), 1)) : y("", !0),
|
|
370
|
+
x.value ? (s(), v("span", gn, g(b(m).savedModules?.moduleCount.value ?? 0), 1)) : y("", !0)
|
|
371
|
+
], 12, mn)])) : y("", !0), N(b(k), {
|
|
372
|
+
"model-value": L.value,
|
|
373
373
|
group: {
|
|
374
374
|
name: "blocks",
|
|
375
375
|
pull: "clone",
|
|
376
376
|
put: !1
|
|
377
377
|
},
|
|
378
|
-
clone:
|
|
378
|
+
clone: z,
|
|
379
379
|
sort: !1,
|
|
380
380
|
animation: 150,
|
|
381
381
|
"force-fallback": !0,
|
|
@@ -383,31 +383,31 @@ var cn = ["aria-label"], ln = {
|
|
|
383
383
|
onChoose: T,
|
|
384
384
|
onEnd: D
|
|
385
385
|
}, {
|
|
386
|
-
default: d(() => [(s(!0), v(A, null, l(
|
|
386
|
+
default: d(() => [(s(!0), v(A, null, l(L.value, (e) => (s(), v("button", {
|
|
387
387
|
key: e.type,
|
|
388
388
|
type: "button",
|
|
389
389
|
"data-palette-type": e.type,
|
|
390
390
|
"aria-label": b(n)(b(t).sidebarNav.insertBlock, { block: e.label }),
|
|
391
391
|
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",
|
|
392
392
|
style: O({ justifyContent: x.value ? "flex-start" : "center" }),
|
|
393
|
-
onClick: (t) =>
|
|
394
|
-
onKeydown: (t) =>
|
|
395
|
-
}, [E("div",
|
|
393
|
+
onClick: (t) => B(e),
|
|
394
|
+
onKeydown: (t) => te(t, e)
|
|
395
|
+
}, [E("div", vn, [b(Vt)[e.type] ? (s(), S(o(b(Vt)[e.type]), {
|
|
396
396
|
key: 0,
|
|
397
397
|
size: 20,
|
|
398
398
|
"stroke-width": 1.5
|
|
399
|
-
})) : e.isCustom ? (s(), S(
|
|
399
|
+
})) : e.isCustom ? (s(), S(ze, {
|
|
400
400
|
key: 1,
|
|
401
401
|
icon: e.icon,
|
|
402
402
|
size: 20
|
|
403
|
-
}, null, 8, ["icon"])) : y("", !0)]), x.value ? (s(), v("span",
|
|
403
|
+
}, null, 8, ["icon"])) : y("", !0)]), x.value ? (s(), v("span", yn, g(e.label), 1)) : y("", !0)], 44, _n))), 128))]),
|
|
404
404
|
_: 1
|
|
405
|
-
}, 8, ["model-value"])], 44,
|
|
405
|
+
}, 8, ["model-value"])], 44, fn));
|
|
406
406
|
}
|
|
407
407
|
});
|
|
408
408
|
//#endregion
|
|
409
409
|
//#region src/utils/mergeTagTrigger.ts
|
|
410
|
-
function
|
|
410
|
+
function xn(e, t, n, r) {
|
|
411
411
|
if (!n) return null;
|
|
412
412
|
let i = e.slice(0, t), a = i.lastIndexOf(n);
|
|
413
413
|
if (a === -1) return null;
|
|
@@ -420,8 +420,8 @@ function _n(e, t, n, r) {
|
|
|
420
420
|
}
|
|
421
421
|
//#endregion
|
|
422
422
|
//#region src/utils/textFieldCaret.ts
|
|
423
|
-
var
|
|
424
|
-
function
|
|
423
|
+
var Sn = /* @__PURE__ */ "boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.lineHeight.fontFamily.textAlign.textTransform.textIndent.letterSpacing.wordSpacing.tabSize.whiteSpace.wordWrap.wordBreak".split(".");
|
|
424
|
+
function Cn(e, t, n) {
|
|
425
425
|
return {
|
|
426
426
|
left: e,
|
|
427
427
|
top: t,
|
|
@@ -434,7 +434,7 @@ function yn(e, t, n) {
|
|
|
434
434
|
toJSON: () => ({})
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function wn(e, t) {
|
|
438
438
|
let n = e.ownerDocument, r = n.defaultView;
|
|
439
439
|
if (!r) return null;
|
|
440
440
|
let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
|
|
@@ -442,7 +442,7 @@ function bn(e, t) {
|
|
|
442
442
|
let s = o.style;
|
|
443
443
|
s.position = "absolute", s.visibility = "hidden", s.top = "0", s.left = "0", s.overflow = "hidden", s.whiteSpace = i ? "pre" : "pre-wrap", s.wordWrap = i ? "normal" : "break-word";
|
|
444
444
|
let c = s, l = a;
|
|
445
|
-
for (let e of
|
|
445
|
+
for (let e of Sn) c[e] = l[e];
|
|
446
446
|
i && (s.width = "auto", s.whiteSpace = "pre");
|
|
447
447
|
let u = e.value, d = u.slice(0, t);
|
|
448
448
|
i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
|
|
@@ -451,26 +451,26 @@ function bn(e, t) {
|
|
|
451
451
|
let p = f.offsetTop, m = f.offsetLeft;
|
|
452
452
|
n.body.removeChild(o);
|
|
453
453
|
let h = e.getBoundingClientRect(), g = parseFloat(a.borderTopWidth) || 0, _ = parseFloat(a.borderLeftWidth) || 0, v = parseFloat(a.lineHeight) || parseFloat(a.fontSize) || 0, y = h.left + m + _ - e.scrollLeft;
|
|
454
|
-
if (i) return
|
|
454
|
+
if (i) return Cn(y, h.top, h.bottom);
|
|
455
455
|
let b = h.top + p + g - e.scrollTop;
|
|
456
|
-
return
|
|
456
|
+
return Cn(y, b, b + v);
|
|
457
457
|
}
|
|
458
458
|
//#endregion
|
|
459
459
|
//#region src/composables/useMergeTagAutocomplete.ts
|
|
460
|
-
var
|
|
460
|
+
var Tn = /* @__PURE__ */ new Set([
|
|
461
461
|
"ArrowLeft",
|
|
462
462
|
"ArrowRight",
|
|
463
463
|
"Home",
|
|
464
464
|
"End"
|
|
465
465
|
]);
|
|
466
|
-
function
|
|
467
|
-
let { elementRef: t, modelValue: r, emit: o, mergeTags: s, syntax: l, enabled: d, onInsert: f } = e, p =
|
|
466
|
+
function En(e) {
|
|
467
|
+
let { elementRef: t, modelValue: r, emit: o, mergeTags: s, syntax: l, enabled: d, onInsert: f } = e, p = Ee(l), m = xe(l), h = d && p !== null && s.length > 0, g = u(et, null), _ = Jt((a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", ue()), v = !1;
|
|
468
468
|
n() && i(() => {
|
|
469
469
|
v = !0, _.close();
|
|
470
470
|
});
|
|
471
471
|
function y(e) {
|
|
472
472
|
let t = e.value ?? "";
|
|
473
|
-
return
|
|
473
|
+
return xn(t, e.selectionStart ?? t.length, p, m);
|
|
474
474
|
}
|
|
475
475
|
function b(e, n, i) {
|
|
476
476
|
let a = e.value ?? r(), s = a.slice(n.caret), l = m && s.startsWith(m) ? m.length : 0, u = a.slice(0, n.triggerStart), d = a.slice(n.caret + l), p = u + i.value + d, h = u.length + i.value.length;
|
|
@@ -492,7 +492,7 @@ function Sn(e) {
|
|
|
492
492
|
_.close();
|
|
493
493
|
return;
|
|
494
494
|
}
|
|
495
|
-
let r =
|
|
495
|
+
let r = Yt(s, n.query), i = () => wn(e, n.triggerStart), a = (t) => b(e, n, t);
|
|
496
496
|
_.isOpen() ? _.update({
|
|
497
497
|
items: r,
|
|
498
498
|
getRect: i,
|
|
@@ -505,7 +505,7 @@ function Sn(e) {
|
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
507
|
function S(e) {
|
|
508
|
-
return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) :
|
|
508
|
+
return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) : Tn.has(e.key) ? (_.close(), !1) : _.handleKeyDown(e) : !1;
|
|
509
509
|
}
|
|
510
510
|
return {
|
|
511
511
|
available: h,
|
|
@@ -517,12 +517,12 @@ function Sn(e) {
|
|
|
517
517
|
}
|
|
518
518
|
//#endregion
|
|
519
519
|
//#region src/composables/useMergeTagField.ts
|
|
520
|
-
function
|
|
521
|
-
let { modelValue: t, emit: r, elementRef: a } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: l, isMergeTagValue: u, getMergeTagLabel: d, requestMergeTag: f, syntax: m, autocomplete: h } =
|
|
520
|
+
function Dn(e) {
|
|
521
|
+
let { modelValue: t, emit: r, elementRef: a } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: l, isMergeTagValue: u, getMergeTagLabel: d, requestMergeTag: f, syntax: m, autocomplete: h } = ct(), { canInsertLogicTag: g, isRequesting: v, requestLogicTag: y } = F(), b = p(!1), x = !1, S = !1;
|
|
522
522
|
n() && i(() => {
|
|
523
523
|
S = !0;
|
|
524
524
|
});
|
|
525
|
-
let C =
|
|
525
|
+
let C = En({
|
|
526
526
|
elementRef: a,
|
|
527
527
|
modelValue: t,
|
|
528
528
|
emit: r,
|
|
@@ -546,10 +546,10 @@ function Cn(e) {
|
|
|
546
546
|
type: "mergeTag",
|
|
547
547
|
value: t,
|
|
548
548
|
label: d(t)
|
|
549
|
-
}) :
|
|
549
|
+
}) : ce(t, m) ? n.push({
|
|
550
550
|
type: "logicMergeTag",
|
|
551
551
|
value: t,
|
|
552
|
-
keyword:
|
|
552
|
+
keyword: Je(t, m)
|
|
553
553
|
}) : n.push({
|
|
554
554
|
type: "text",
|
|
555
555
|
value: t
|
|
@@ -644,10 +644,10 @@ function Cn(e) {
|
|
|
644
644
|
}
|
|
645
645
|
//#endregion
|
|
646
646
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
647
|
-
var
|
|
647
|
+
var On = ["aria-label", "onKeydown"], kn = ["data-tooltip"], An = ["data-tooltip"], jn = {
|
|
648
648
|
key: 2,
|
|
649
649
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
650
|
-
},
|
|
650
|
+
}, Mn = ["aria-label", "title"], Nn = /* @__PURE__ */ M({
|
|
651
651
|
__name: "MergeTagSegments",
|
|
652
652
|
props: {
|
|
653
653
|
segments: {},
|
|
@@ -656,7 +656,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
656
656
|
},
|
|
657
657
|
emits: ["edit", "clear"],
|
|
658
658
|
setup(e, { emit: t }) {
|
|
659
|
-
let n = t, { t: r } =
|
|
659
|
+
let n = t, { t: r } = H();
|
|
660
660
|
function i() {
|
|
661
661
|
n("edit");
|
|
662
662
|
}
|
|
@@ -675,7 +675,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
675
675
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
676
676
|
color: "var(--tpl-primary)"
|
|
677
677
|
}
|
|
678
|
-
}, g(e.label), 9,
|
|
678
|
+
}, g(e.label), 9, kn)) : e.type === "logicMergeTag" ? (s(), v("span", {
|
|
679
679
|
key: 1,
|
|
680
680
|
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",
|
|
681
681
|
"data-tooltip": e.value,
|
|
@@ -684,75 +684,75 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
684
684
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
685
685
|
color: "var(--tpl-primary)"
|
|
686
686
|
}
|
|
687
|
-
}, g(e.keyword), 9,
|
|
687
|
+
}, g(e.keyword), 9, An)) : (s(), v("span", jn, g(e.value), 1))], 64))), 128)), E("button", {
|
|
688
688
|
type: "button",
|
|
689
689
|
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",
|
|
690
690
|
"aria-label": b(r).mergeTag.remove,
|
|
691
691
|
title: b(r).mergeTag.remove,
|
|
692
692
|
onClick: a[0] ||= x((e) => n("clear"), ["stop"])
|
|
693
|
-
}, [N(b(
|
|
693
|
+
}, [N(b($e), {
|
|
694
694
|
size: 12,
|
|
695
695
|
"stroke-width": 2.5
|
|
696
|
-
})], 8,
|
|
696
|
+
})], 8, Mn)], 42, On));
|
|
697
697
|
}
|
|
698
|
-
}),
|
|
698
|
+
}), Pn = [
|
|
699
699
|
"aria-label",
|
|
700
700
|
"title",
|
|
701
701
|
"disabled"
|
|
702
|
-
],
|
|
702
|
+
], Fn = "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)]", In = /* @__PURE__ */ M({
|
|
703
703
|
__name: "MergeTagInsertButton",
|
|
704
704
|
props: { disabled: { type: Boolean } },
|
|
705
705
|
emits: ["insert"],
|
|
706
706
|
setup(e) {
|
|
707
|
-
let { t } =
|
|
707
|
+
let { t } = H();
|
|
708
708
|
return (n, r) => (s(), v("button", {
|
|
709
709
|
type: "button",
|
|
710
|
-
class: T([
|
|
710
|
+
class: T([Fn, "tpl:mt-1.5"]),
|
|
711
711
|
"aria-label": b(t).mergeTag.insert,
|
|
712
712
|
title: b(t).mergeTag.insert,
|
|
713
713
|
disabled: e.disabled,
|
|
714
714
|
onMousedown: r[0] ||= x(() => {}, ["prevent"]),
|
|
715
715
|
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
716
|
-
}, [N(b(
|
|
716
|
+
}, [N(b(kt), {
|
|
717
717
|
size: 12,
|
|
718
718
|
"stroke-width": 2
|
|
719
|
-
}), j(" " + g(b(t).mergeTag.insertShort), 1)], 42,
|
|
719
|
+
}), j(" " + g(b(t).mergeTag.insertShort), 1)], 42, Pn));
|
|
720
720
|
}
|
|
721
|
-
}),
|
|
721
|
+
}), Ln = [
|
|
722
722
|
"aria-label",
|
|
723
723
|
"title",
|
|
724
724
|
"disabled"
|
|
725
|
-
],
|
|
725
|
+
], Rn = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", zn = /* @__PURE__ */ M({
|
|
726
726
|
__name: "LogicTagInsertButton",
|
|
727
727
|
props: { disabled: { type: Boolean } },
|
|
728
728
|
emits: ["insert"],
|
|
729
729
|
setup(e) {
|
|
730
|
-
let { t } =
|
|
730
|
+
let { t } = H();
|
|
731
731
|
return (n, r) => (s(), v("button", {
|
|
732
732
|
type: "button",
|
|
733
|
-
class: T([
|
|
733
|
+
class: T([Rn, "tpl:mt-1.5"]),
|
|
734
734
|
"aria-label": b(t).logicTag.insert,
|
|
735
735
|
title: b(t).logicTag.insert,
|
|
736
736
|
disabled: e.disabled,
|
|
737
737
|
"data-testid": "field-insert-logic-button",
|
|
738
738
|
onMousedown: r[0] ||= x(() => {}, ["prevent"]),
|
|
739
739
|
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
740
|
-
}, [N(b(
|
|
740
|
+
}, [N(b(Et), {
|
|
741
741
|
size: 12,
|
|
742
742
|
"stroke-width": 2
|
|
743
|
-
}), j(" " + g(b(t).logicTag.insertShort), 1)], 42,
|
|
743
|
+
}), j(" " + g(b(t).logicTag.insertShort), 1)], 42, Ln));
|
|
744
744
|
}
|
|
745
|
-
}),
|
|
745
|
+
}), Bn = { key: 0 }, Vn = {
|
|
746
746
|
key: 0,
|
|
747
747
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
748
|
-
},
|
|
748
|
+
}, Hn = { key: 1 }, Un = [
|
|
749
749
|
"value",
|
|
750
750
|
"placeholder",
|
|
751
751
|
"rows"
|
|
752
|
-
],
|
|
752
|
+
], Wn = {
|
|
753
753
|
key: 0,
|
|
754
754
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
755
|
-
},
|
|
755
|
+
}, Gn = "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)]", Kn = "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)]", qn = /* @__PURE__ */ M({
|
|
756
756
|
__name: "MergeTagTextarea",
|
|
757
757
|
props: {
|
|
758
758
|
modelValue: {},
|
|
@@ -761,32 +761,32 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
761
761
|
},
|
|
762
762
|
emits: ["update:modelValue"],
|
|
763
763
|
setup(e, { emit: t }) {
|
|
764
|
-
let n = e, r = t, i = p(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: m, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: x, clearValue: C, insertMergeTag: w, insertLogicTag: D } =
|
|
764
|
+
let n = e, r = t, i = p(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: m, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: x, clearValue: C, insertMergeTag: w, insertLogicTag: D } = Dn({
|
|
765
765
|
modelValue: () => n.modelValue,
|
|
766
766
|
emit: (e) => r("update:modelValue", e),
|
|
767
767
|
elementRef: i
|
|
768
768
|
});
|
|
769
|
-
return (t, n) => b(o) && !b(f) ? (s(), v("div",
|
|
769
|
+
return (t, n) => b(o) && !b(f) ? (s(), v("div", Bn, [N(Nn, {
|
|
770
770
|
segments: b(a),
|
|
771
|
-
"display-class":
|
|
771
|
+
"display-class": Kn,
|
|
772
772
|
onEdit: b(m),
|
|
773
773
|
onClear: b(C)
|
|
774
774
|
}, null, 8, [
|
|
775
775
|
"segments",
|
|
776
776
|
"onEdit",
|
|
777
777
|
"onClear"
|
|
778
|
-
]), b(c) || b(u) ? (s(), v("div",
|
|
778
|
+
]), b(c) || b(u) ? (s(), v("div", Vn, [b(c) ? (s(), S(In, {
|
|
779
779
|
key: 0,
|
|
780
780
|
disabled: b(l),
|
|
781
781
|
onInsert: b(w)
|
|
782
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(
|
|
782
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(zn, {
|
|
783
783
|
key: 1,
|
|
784
784
|
disabled: b(d),
|
|
785
785
|
onInsert: b(D)
|
|
786
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)])) : (s(), v("div",
|
|
786
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)])) : (s(), v("div", Hn, [E("textarea", {
|
|
787
787
|
ref_key: "textareaRef",
|
|
788
788
|
ref: i,
|
|
789
|
-
class: T(
|
|
789
|
+
class: T(Gn),
|
|
790
790
|
value: e.modelValue,
|
|
791
791
|
placeholder: e.placeholder,
|
|
792
792
|
rows: e.rows,
|
|
@@ -794,22 +794,22 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
794
794
|
onKeydown: n[1] ||= (...e) => b(g) && b(g)(...e),
|
|
795
795
|
onClick: n[2] ||= (...e) => b(_) && b(_)(...e),
|
|
796
796
|
onBlur: n[3] ||= (...e) => b(x) && b(x)(...e)
|
|
797
|
-
}, null, 40,
|
|
797
|
+
}, null, 40, Un), b(c) || b(u) ? (s(), v("div", Wn, [b(c) ? (s(), S(In, {
|
|
798
798
|
key: 0,
|
|
799
799
|
disabled: b(l),
|
|
800
800
|
onInsert: b(w)
|
|
801
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(
|
|
801
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(zn, {
|
|
802
802
|
key: 1,
|
|
803
803
|
disabled: b(d),
|
|
804
804
|
onInsert: b(D)
|
|
805
805
|
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)]));
|
|
806
806
|
}
|
|
807
|
-
}),
|
|
807
|
+
}), Jn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, Yn = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, Xn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Zn = { class: "tpl:mb-3.5" }, Qn = { 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)]" }, $n = ["onClick"], er = { class: "tpl:flex tpl:items-stretch" }, tr = ["value"], nr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, rr = { class: "tpl:mb-3.5" }, ir = { class: "tpl:mb-3.5" }, ar = { class: "tpl:mb-3.5" }, or = { class: "tpl:mb-3.5" }, sr = ["value"], cr = ["value"], lr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ur = ["value"], dr = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, fr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, pr = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, mr = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, hr = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, gr = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, _r = { 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)]" }, vr = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, yr = { class: "tpl:mb-1 tpl:last:mb-0" }, br = { class: "tpl:mb-1 tpl:last:mb-0" }, xr = { class: "tpl:mb-1 tpl:last:mb-0" }, Sr = 150, Cr = /* @__PURE__ */ M({
|
|
808
808
|
__name: "TemplateSettings",
|
|
809
809
|
props: { settings: {} },
|
|
810
810
|
emits: ["update"],
|
|
811
811
|
setup(e, { emit: t }) {
|
|
812
|
-
let n = e, r = t, { t: i } =
|
|
812
|
+
let n = e, r = t, { t: i } = H(), a = Ue(Ge, "TemplateSettings"), o = _(() => a.fonts.value), c = _(() => o.value.some((e) => e.value === n.settings.fontFamily) ? n.settings.fontFamily : a.defaultFont.value), u = [
|
|
813
813
|
{
|
|
814
814
|
value: 480,
|
|
815
815
|
label: "480px"
|
|
@@ -827,14 +827,14 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
827
827
|
label: "800px"
|
|
828
828
|
}
|
|
829
829
|
];
|
|
830
|
-
return (t, n) => (s(), v("aside",
|
|
831
|
-
E("div", { class: T(b(
|
|
832
|
-
E("div",
|
|
830
|
+
return (t, n) => (s(), v("aside", Jn, [E("div", Yn, [
|
|
831
|
+
E("div", { class: T(b(qt)) }, [
|
|
832
|
+
E("div", Xn, [N(b(Mt), {
|
|
833
833
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
834
834
|
size: 14,
|
|
835
835
|
"stroke-width": 2
|
|
836
836
|
}), E("span", null, g(b(i).templateSettings.layout), 1)]),
|
|
837
|
-
E("div",
|
|
837
|
+
E("div", Zn, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.widthPreset), 3), E("div", Qn, [(s(), v(A, null, l(u, (t) => E("button", {
|
|
838
838
|
key: t.value,
|
|
839
839
|
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)]",
|
|
840
840
|
style: O({
|
|
@@ -843,101 +843,101 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
843
843
|
boxShadow: e.settings.width === t.value ? "var(--tpl-shadow)" : "none"
|
|
844
844
|
}),
|
|
845
845
|
onClick: (e) => r("update", { width: t.value })
|
|
846
|
-
}, g(t.label), 13,
|
|
847
|
-
E("div", null, [E("label", { class: T(b(
|
|
846
|
+
}, g(t.label), 13, $n)), 64))])]),
|
|
847
|
+
E("div", null, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.customWidth), 3), E("div", er, [E("input", {
|
|
848
848
|
type: "number",
|
|
849
|
-
class: T(b(
|
|
849
|
+
class: T(b(q)),
|
|
850
850
|
value: e.settings.width,
|
|
851
851
|
min: "300",
|
|
852
852
|
max: "900",
|
|
853
853
|
onInput: n[0] ||= (e) => r("update", { width: Number(e.target.value) })
|
|
854
|
-
}, null, 42,
|
|
854
|
+
}, null, 42, tr), E("span", { class: T(b(K)) }, "px", 2)])])
|
|
855
855
|
], 2),
|
|
856
|
-
E("div", { class: T(b(
|
|
857
|
-
E("div",
|
|
856
|
+
E("div", { class: T(b(qt)) }, [
|
|
857
|
+
E("div", nr, [N(b(Dt), {
|
|
858
858
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
859
859
|
size: 14,
|
|
860
860
|
"stroke-width": 2
|
|
861
861
|
}), E("span", null, g(b(i).templateSettings.appearance), 1)]),
|
|
862
|
-
E("div",
|
|
862
|
+
E("div", rr, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.backgroundColor), 3), N(J, {
|
|
863
863
|
"model-value": e.settings.backgroundColor,
|
|
864
|
-
placeholder: b(
|
|
864
|
+
placeholder: b(Kt),
|
|
865
865
|
"onUpdate:modelValue": n[1] ||= (e) => r("update", { backgroundColor: e })
|
|
866
866
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
867
|
-
E("div",
|
|
867
|
+
E("div", ir, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.textColor), 3), N(J, {
|
|
868
868
|
"model-value": e.settings.textColor ?? "",
|
|
869
869
|
"seed-color": "#1a1a1a",
|
|
870
870
|
"onUpdate:modelValue": n[2] ||= (e) => r("update", { textColor: e })
|
|
871
871
|
}, null, 8, ["model-value"])]),
|
|
872
|
-
E("div",
|
|
872
|
+
E("div", ar, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.linkColor), 3), N(J, {
|
|
873
873
|
"model-value": e.settings.linkColor ?? "",
|
|
874
874
|
"seed-color": "#0066cc",
|
|
875
875
|
"onUpdate:modelValue": n[3] ||= (e) => r("update", { linkColor: e || void 0 })
|
|
876
876
|
}, null, 8, ["model-value"])]),
|
|
877
|
-
E("div",
|
|
877
|
+
E("div", or, [N(Y, {
|
|
878
878
|
class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
879
879
|
"model-value": e.settings.linkUnderline,
|
|
880
880
|
label: b(i).templateSettings.linkUnderline,
|
|
881
881
|
"onUpdate:modelValue": n[4] ||= (e) => r("update", { linkUnderline: e })
|
|
882
882
|
}, null, 8, ["model-value", "label"])]),
|
|
883
|
-
E("div", null, [E("label", { class: T(b(
|
|
884
|
-
class: T(b(
|
|
883
|
+
E("div", null, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.fontFamily), 3), E("select", {
|
|
884
|
+
class: T(b(W)),
|
|
885
885
|
value: c.value,
|
|
886
886
|
onChange: n[5] ||= (e) => r("update", { fontFamily: e.target.value })
|
|
887
887
|
}, [(s(!0), v(A, null, l(o.value, (e) => (s(), v("option", {
|
|
888
888
|
key: e.value,
|
|
889
889
|
value: e.value
|
|
890
|
-
}, g(e.label), 9,
|
|
890
|
+
}, g(e.label), 9, cr))), 128))], 42, sr)])
|
|
891
891
|
], 2),
|
|
892
|
-
E("div", { class: T(b(
|
|
892
|
+
E("div", { class: T(b(qt)) }, [E("div", lr, [N(b(yt), {
|
|
893
893
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
894
894
|
size: 14,
|
|
895
895
|
"stroke-width": 2
|
|
896
896
|
}), E("span", null, g(b(i).templateSettings.language), 1)]), E("div", null, [
|
|
897
|
-
E("label", { class: T(b(
|
|
897
|
+
E("label", { class: T(b(G)) }, g(b(i).templateSettings.contentLocale), 3),
|
|
898
898
|
E("input", {
|
|
899
899
|
type: "text",
|
|
900
|
-
class: T(b(
|
|
900
|
+
class: T(b(W)),
|
|
901
901
|
value: e.settings.locale ?? "",
|
|
902
902
|
placeholder: "en",
|
|
903
903
|
spellcheck: "false",
|
|
904
904
|
autocapitalize: "off",
|
|
905
905
|
autocomplete: "off",
|
|
906
906
|
onInput: n[6] ||= (e) => r("update", { locale: e.target.value.trim() || void 0 })
|
|
907
|
-
}, null, 42,
|
|
908
|
-
E("p",
|
|
907
|
+
}, null, 42, ur),
|
|
908
|
+
E("p", dr, g(b(i).templateSettings.contentLocaleHint), 1)
|
|
909
909
|
])], 2),
|
|
910
|
-
E("div", { class: T(b(
|
|
910
|
+
E("div", { class: T(b(qt)) }, [E("div", fr, [N(b(oe), {
|
|
911
911
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
912
912
|
size: 14,
|
|
913
913
|
"stroke-width": 2
|
|
914
|
-
}), E("span", null, g(b(i).templateSettings.preheaderText), 1)]), E("div", null, [N(
|
|
914
|
+
}), E("span", null, g(b(i).templateSettings.preheaderText), 1)]), E("div", null, [N(qn, {
|
|
915
915
|
"model-value": e.settings.preheaderText ?? "",
|
|
916
916
|
placeholder: b(i).templateSettings.preheaderTextPlaceholder,
|
|
917
917
|
rows: 2,
|
|
918
918
|
"onUpdate:modelValue": n[7] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
919
|
-
}, null, 8, ["model-value", "placeholder"]), E("div",
|
|
920
|
-
E("div",
|
|
919
|
+
}, null, 8, ["model-value", "placeholder"]), E("div", pr, [E("span", mr, g(b(i).templateSettings.preheaderTextHint), 1), E("span", hr, g((e.settings.preheaderText ?? "").length) + "/" + g(Sr), 1)])])], 2),
|
|
920
|
+
E("div", gr, [E("div", _r, [N(b(ne), {
|
|
921
921
|
size: 14,
|
|
922
922
|
"stroke-width": 2
|
|
923
|
-
}), E("span", null, g(b(i).templateSettings.tips), 1)]), E("ul",
|
|
924
|
-
E("li",
|
|
925
|
-
E("li",
|
|
926
|
-
E("li",
|
|
923
|
+
}), E("span", null, g(b(i).templateSettings.tips), 1)]), E("ul", vr, [
|
|
924
|
+
E("li", yr, g(b(i).templateSettings.tip1), 1),
|
|
925
|
+
E("li", br, g(b(i).templateSettings.tip2), 1),
|
|
926
|
+
E("li", xr, g(b(i).templateSettings.tip3), 1)
|
|
927
927
|
])])
|
|
928
928
|
])]));
|
|
929
929
|
}
|
|
930
|
-
}),
|
|
930
|
+
}), wr = { key: 0 }, Tr = {
|
|
931
931
|
key: 0,
|
|
932
932
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
933
|
-
},
|
|
933
|
+
}, Er = { key: 1 }, Dr = [
|
|
934
934
|
"type",
|
|
935
935
|
"value",
|
|
936
936
|
"placeholder"
|
|
937
|
-
],
|
|
937
|
+
], Or = {
|
|
938
938
|
key: 0,
|
|
939
939
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
940
|
-
},
|
|
940
|
+
}, kr = "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)]", Q = /*#__PURE__*/ ut(/* @__PURE__ */ M({
|
|
941
941
|
__name: "MergeTagInput",
|
|
942
942
|
props: {
|
|
943
943
|
modelValue: {},
|
|
@@ -950,14 +950,14 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
950
950
|
},
|
|
951
951
|
emits: ["update:modelValue"],
|
|
952
952
|
setup(e, { emit: t }) {
|
|
953
|
-
let n = e, r = t, i = p(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: m, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: x, clearValue: C, insertMergeTag: w, insertLogicTag: D } =
|
|
953
|
+
let n = e, r = t, i = p(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: m, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: x, clearValue: C, insertMergeTag: w, insertLogicTag: D } = Dn({
|
|
954
954
|
modelValue: () => n.modelValue,
|
|
955
955
|
emit: (e) => r("update:modelValue", e),
|
|
956
956
|
elementRef: i
|
|
957
957
|
});
|
|
958
|
-
return (t, n) => b(o) && !b(f) ? (s(), v("div",
|
|
958
|
+
return (t, n) => b(o) && !b(f) ? (s(), v("div", wr, [N(Nn, {
|
|
959
959
|
segments: b(a),
|
|
960
|
-
"display-class":
|
|
960
|
+
"display-class": kr,
|
|
961
961
|
pulse: e.pulse,
|
|
962
962
|
onEdit: b(m),
|
|
963
963
|
onClear: b(C)
|
|
@@ -966,39 +966,39 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
966
966
|
"pulse",
|
|
967
967
|
"onEdit",
|
|
968
968
|
"onClear"
|
|
969
|
-
]), b(c) || b(u) ? (s(), v("div",
|
|
969
|
+
]), b(c) || b(u) ? (s(), v("div", Tr, [b(c) ? (s(), S(In, {
|
|
970
970
|
key: 0,
|
|
971
971
|
disabled: b(l),
|
|
972
972
|
onInsert: b(w)
|
|
973
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(
|
|
973
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(zn, {
|
|
974
974
|
key: 1,
|
|
975
975
|
disabled: b(d),
|
|
976
976
|
onInsert: b(D)
|
|
977
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)])) : (s(), v("div",
|
|
977
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)])) : (s(), v("div", Er, [E("input", {
|
|
978
978
|
ref_key: "inputRef",
|
|
979
979
|
ref: i,
|
|
980
980
|
type: e.type,
|
|
981
|
-
class: T([b(
|
|
981
|
+
class: T([b(W), { "tpl-pulse-fill": e.pulse }]),
|
|
982
982
|
value: e.modelValue,
|
|
983
983
|
placeholder: e.placeholder,
|
|
984
984
|
onInput: n[0] ||= (...e) => b(h) && b(h)(...e),
|
|
985
985
|
onKeydown: n[1] ||= (...e) => b(g) && b(g)(...e),
|
|
986
986
|
onClick: n[2] ||= (...e) => b(_) && b(_)(...e),
|
|
987
987
|
onBlur: n[3] ||= (...e) => b(x) && b(x)(...e)
|
|
988
|
-
}, null, 42,
|
|
988
|
+
}, null, 42, Dr), b(c) || b(u) ? (s(), v("div", Or, [b(c) ? (s(), S(In, {
|
|
989
989
|
key: 0,
|
|
990
990
|
disabled: b(l),
|
|
991
991
|
onInsert: b(w)
|
|
992
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(
|
|
992
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(zn, {
|
|
993
993
|
key: 1,
|
|
994
994
|
disabled: b(d),
|
|
995
995
|
onInsert: b(D)
|
|
996
996
|
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)]));
|
|
997
997
|
}
|
|
998
|
-
}), [["__scopeId", "data-v-d6563be6"]]),
|
|
998
|
+
}), [["__scopeId", "data-v-d6563be6"]]), Ar = { class: "tpl:mb-3.5" }, jr = ["value"], Mr = { value: "" }, Nr = ["value"], Pr = { class: "tpl:mb-3.5" }, Fr = { class: "tpl:mb-3.5" }, Ir = { class: "tpl:mb-3.5" }, Lr = { class: "tpl:mb-3.5" }, Rr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, zr = { class: "tpl:mb-3.5" }, Br = { class: "tpl:flex tpl:items-stretch" }, Vr = ["value"], Hr = { class: "tpl:mb-3.5" }, Ur = { class: "tpl:flex tpl:items-stretch" }, Wr = ["value"], Gr = { class: "tpl:mb-3.5" }, Kr = ["value"], qr = { value: "auto" }, Jr = { value: "full" }, Yr = { value: "custom" }, Xr = {
|
|
999
999
|
key: 0,
|
|
1000
1000
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
1001
|
-
},
|
|
1001
|
+
}, Zr = ["value"], Qr = 200, $r = /* @__PURE__ */ M({
|
|
1002
1002
|
__name: "ButtonToolbar",
|
|
1003
1003
|
props: {
|
|
1004
1004
|
block: {},
|
|
@@ -1006,7 +1006,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1006
1006
|
},
|
|
1007
1007
|
emits: ["update"],
|
|
1008
1008
|
setup(e, { emit: t }) {
|
|
1009
|
-
let n = e, r = t, { t: i } =
|
|
1009
|
+
let n = e, r = t, { t: i } = H(), a = _(() => n.block.width === "full" ? "full" : typeof n.block.width == "number" ? "custom" : "auto");
|
|
1010
1010
|
function o(e, t) {
|
|
1011
1011
|
r("update", { [e]: t });
|
|
1012
1012
|
}
|
|
@@ -1016,7 +1016,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1016
1016
|
return;
|
|
1017
1017
|
}
|
|
1018
1018
|
if (e === "custom") {
|
|
1019
|
-
o("width", typeof n.block.width == "number" ? n.block.width :
|
|
1019
|
+
o("width", typeof n.block.width == "number" ? n.block.width : Qr);
|
|
1020
1020
|
return;
|
|
1021
1021
|
}
|
|
1022
1022
|
o("width", void 0);
|
|
@@ -1026,28 +1026,28 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1026
1026
|
!Number.isFinite(t) || t <= 0 || o("width", t);
|
|
1027
1027
|
}
|
|
1028
1028
|
return (t, n) => (s(), v(A, null, [
|
|
1029
|
-
E("div",
|
|
1030
|
-
class: T(b(
|
|
1029
|
+
E("div", Ar, [E("label", { class: T(b(G)) }, g(b(i).button.fontFamily), 3), E("select", {
|
|
1030
|
+
class: T(b(W)),
|
|
1031
1031
|
value: e.block.fontFamily || "",
|
|
1032
1032
|
onChange: n[0] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
1033
|
-
}, [E("option",
|
|
1033
|
+
}, [E("option", Mr, g(b(i).button.inheritFont), 1), (s(!0), v(A, null, l(e.fontFamilies, (e) => (s(), v("option", {
|
|
1034
1034
|
key: e.value,
|
|
1035
1035
|
value: e.value
|
|
1036
|
-
}, g(e.label), 9,
|
|
1037
|
-
E("div",
|
|
1036
|
+
}, g(e.label), 9, Nr))), 128))], 42, jr)]),
|
|
1037
|
+
E("div", Pr, [E("label", { class: T(b(G)) }, g(b(i).button.text), 3), N(Q, {
|
|
1038
1038
|
"model-value": e.block.text,
|
|
1039
1039
|
type: "text",
|
|
1040
1040
|
"onUpdate:modelValue": n[1] ||= (e) => o("text", e)
|
|
1041
1041
|
}, null, 8, ["model-value"])]),
|
|
1042
|
-
E("div",
|
|
1043
|
-
E("label", { class: T(b(
|
|
1044
|
-
N(
|
|
1042
|
+
E("div", Fr, [
|
|
1043
|
+
E("label", { class: T(b(G)) }, g(b(i).button.url), 3),
|
|
1044
|
+
N(Q, {
|
|
1045
1045
|
"model-value": e.block.url,
|
|
1046
1046
|
type: "url",
|
|
1047
1047
|
placeholder: b(i).button.urlPlaceholder,
|
|
1048
1048
|
"onUpdate:modelValue": n[2] ||= (e) => o("url", e)
|
|
1049
1049
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1050
|
-
e.block.url ? (s(), S(
|
|
1050
|
+
e.block.url ? (s(), S(Y, {
|
|
1051
1051
|
key: 0,
|
|
1052
1052
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
1053
1053
|
"model-value": e.block.openInNewTab ?? !1,
|
|
@@ -1055,51 +1055,51 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1055
1055
|
"onUpdate:modelValue": n[3] ||= (e) => o("openInNewTab", e)
|
|
1056
1056
|
}, null, 8, ["model-value", "label"])) : y("", !0)
|
|
1057
1057
|
]),
|
|
1058
|
-
E("div",
|
|
1058
|
+
E("div", Ir, [E("label", { class: T(b(G)) }, g(b(i).button.background), 3), N(J, {
|
|
1059
1059
|
"model-value": e.block.backgroundColor,
|
|
1060
1060
|
"onUpdate:modelValue": n[4] ||= (e) => o("backgroundColor", e)
|
|
1061
1061
|
}, null, 8, ["model-value"])]),
|
|
1062
|
-
E("div",
|
|
1062
|
+
E("div", Lr, [E("label", { class: T(b(G)) }, g(b(i).button.textColor), 3), N(J, {
|
|
1063
1063
|
"model-value": e.block.textColor,
|
|
1064
1064
|
"onUpdate:modelValue": n[5] ||= (e) => o("textColor", e)
|
|
1065
1065
|
}, null, 8, ["model-value"])]),
|
|
1066
|
-
E("div",
|
|
1066
|
+
E("div", Rr, [E("div", zr, [E("label", { class: T(b(G)) }, g(b(i).button.borderRadius), 3), E("div", Br, [E("input", {
|
|
1067
1067
|
type: "number",
|
|
1068
|
-
class: T(b(
|
|
1068
|
+
class: T(b(q)),
|
|
1069
1069
|
value: e.block.borderRadius,
|
|
1070
1070
|
min: "0",
|
|
1071
1071
|
max: "50",
|
|
1072
1072
|
onInput: n[6] ||= (e) => o("borderRadius", Number(e.target.value))
|
|
1073
|
-
}, null, 42,
|
|
1073
|
+
}, null, 42, Vr), E("span", { class: T(b(K)) }, "px", 2)])]), E("div", Hr, [E("label", { class: T(b(G)) }, g(b(i).button.fontSize), 3), E("div", Ur, [E("input", {
|
|
1074
1074
|
type: "number",
|
|
1075
|
-
class: T(b(
|
|
1075
|
+
class: T(b(q)),
|
|
1076
1076
|
value: e.block.fontSize,
|
|
1077
1077
|
min: "10",
|
|
1078
1078
|
max: "36",
|
|
1079
1079
|
onInput: n[7] ||= (e) => o("fontSize", Number(e.target.value))
|
|
1080
|
-
}, null, 42,
|
|
1081
|
-
E("div",
|
|
1082
|
-
E("label", { class: T(b(
|
|
1080
|
+
}, null, 42, Wr), E("span", { class: T(b(K)) }, "px", 2)])])]),
|
|
1081
|
+
E("div", Gr, [
|
|
1082
|
+
E("label", { class: T(b(G)) }, g(b(i).button.width), 3),
|
|
1083
1083
|
E("select", {
|
|
1084
|
-
class: T(b(
|
|
1084
|
+
class: T(b(W)),
|
|
1085
1085
|
value: a.value,
|
|
1086
1086
|
onChange: n[8] ||= (e) => c(e.target.value)
|
|
1087
1087
|
}, [
|
|
1088
|
-
E("option",
|
|
1089
|
-
E("option",
|
|
1090
|
-
E("option",
|
|
1091
|
-
], 42,
|
|
1092
|
-
a.value === "custom" ? (s(), v("div",
|
|
1088
|
+
E("option", qr, g(b(i).button.widthAuto), 1),
|
|
1089
|
+
E("option", Jr, g(b(i).button.fullWidth), 1),
|
|
1090
|
+
E("option", Yr, g(b(i).button.widthCustom), 1)
|
|
1091
|
+
], 42, Kr),
|
|
1092
|
+
a.value === "custom" ? (s(), v("div", Xr, [E("input", {
|
|
1093
1093
|
type: "number",
|
|
1094
|
-
class: T(b(
|
|
1095
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
1094
|
+
class: T(b(q)),
|
|
1095
|
+
value: typeof e.block.width == "number" ? e.block.width : Qr,
|
|
1096
1096
|
min: "20",
|
|
1097
1097
|
onInput: n[9] ||= (e) => u(e.target.value)
|
|
1098
|
-
}, null, 42,
|
|
1098
|
+
}, null, 42, Zr), E("span", { class: T(b(K)) }, "px", 2)])) : y("", !0)
|
|
1099
1099
|
])
|
|
1100
1100
|
], 64));
|
|
1101
1101
|
}
|
|
1102
|
-
}),
|
|
1102
|
+
}), ei = { class: "spacing-control" }, ti = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ni = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, ri = { class: "tpl:flex tpl:items-center" }, ii = ["aria-label"], ai = ["value", "aria-label"], oi = ["aria-label"], si = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ci = { class: "tpl:flex tpl:items-center" }, li = ["aria-label"], ui = ["value", "aria-label"], di = ["aria-label"], fi = ["aria-label", "title"], pi = { class: "tpl:flex tpl:items-center" }, mi = ["aria-label"], hi = ["value", "aria-label"], gi = ["aria-label"], _i = { class: "tpl:flex tpl:items-center" }, vi = ["aria-label"], yi = ["value", "aria-label"], bi = ["aria-label"], $ = "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)]", xi = "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)]", Si = /*#__PURE__*/ ut(/* @__PURE__ */ M({
|
|
1103
1103
|
__name: "SpacingControl",
|
|
1104
1104
|
props: {
|
|
1105
1105
|
modelValue: {},
|
|
@@ -1107,7 +1107,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1107
1107
|
},
|
|
1108
1108
|
emits: ["update:modelValue"],
|
|
1109
1109
|
setup(e, { emit: t }) {
|
|
1110
|
-
let n = e, r = t, { t: i } =
|
|
1110
|
+
let n = e, r = t, { t: i } = H(), a = _(() => n.modelValue.top === n.modelValue.right && n.modelValue.right === n.modelValue.bottom && n.modelValue.bottom === n.modelValue.left), o = p(a.value);
|
|
1111
1111
|
P(a, (e) => {
|
|
1112
1112
|
!e && o.value && (o.value = !1);
|
|
1113
1113
|
});
|
|
@@ -1146,130 +1146,130 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
1148
|
}
|
|
1149
|
-
return (t, n) => (s(), v("div",
|
|
1150
|
-
E("div",
|
|
1149
|
+
return (t, n) => (s(), v("div", ei, [E("label", ti, g(e.label), 1), E("div", ni, [
|
|
1150
|
+
E("div", ri, [
|
|
1151
1151
|
E("button", {
|
|
1152
1152
|
"aria-label": b(i).spacingControl.decreaseTop,
|
|
1153
|
-
class: T([
|
|
1153
|
+
class: T([$, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1154
1154
|
onClick: n[0] ||= (e) => c("top", -1)
|
|
1155
|
-
}, [N(b(
|
|
1155
|
+
}, [N(b(wt), {
|
|
1156
1156
|
size: 12,
|
|
1157
1157
|
"stroke-width": 2
|
|
1158
|
-
})], 10,
|
|
1158
|
+
})], 10, ii),
|
|
1159
1159
|
E("input", {
|
|
1160
1160
|
type: "number",
|
|
1161
|
-
class: T(
|
|
1161
|
+
class: T(xi),
|
|
1162
1162
|
value: e.modelValue.top,
|
|
1163
1163
|
"aria-label": b(i).spacingControl.top,
|
|
1164
1164
|
min: "0",
|
|
1165
1165
|
onInput: n[1] ||= (e) => l("top", Number(e.target.value))
|
|
1166
|
-
}, null, 40,
|
|
1166
|
+
}, null, 40, ai),
|
|
1167
1167
|
E("button", {
|
|
1168
1168
|
"aria-label": b(i).spacingControl.increaseTop,
|
|
1169
|
-
class: T([
|
|
1169
|
+
class: T([$, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1170
1170
|
onClick: n[2] ||= (e) => c("top", 1)
|
|
1171
|
-
}, [N(b(
|
|
1171
|
+
}, [N(b(U), {
|
|
1172
1172
|
size: 12,
|
|
1173
1173
|
"stroke-width": 2
|
|
1174
|
-
})], 10,
|
|
1174
|
+
})], 10, oi)
|
|
1175
1175
|
]),
|
|
1176
|
-
E("div",
|
|
1177
|
-
E("div",
|
|
1176
|
+
E("div", si, [
|
|
1177
|
+
E("div", ci, [
|
|
1178
1178
|
E("button", {
|
|
1179
1179
|
"aria-label": b(i).spacingControl.decreaseLeft,
|
|
1180
|
-
class: T([
|
|
1180
|
+
class: T([$, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1181
1181
|
onClick: n[3] ||= (e) => c("left", -1)
|
|
1182
|
-
}, [N(b(
|
|
1182
|
+
}, [N(b(wt), {
|
|
1183
1183
|
size: 12,
|
|
1184
1184
|
"stroke-width": 2
|
|
1185
|
-
})], 10,
|
|
1185
|
+
})], 10, li),
|
|
1186
1186
|
E("input", {
|
|
1187
1187
|
type: "number",
|
|
1188
|
-
class: T(
|
|
1188
|
+
class: T(xi),
|
|
1189
1189
|
value: e.modelValue.left,
|
|
1190
1190
|
"aria-label": b(i).spacingControl.left,
|
|
1191
1191
|
min: "0",
|
|
1192
1192
|
onInput: n[4] ||= (e) => l("left", Number(e.target.value))
|
|
1193
|
-
}, null, 40,
|
|
1193
|
+
}, null, 40, ui),
|
|
1194
1194
|
E("button", {
|
|
1195
1195
|
"aria-label": b(i).spacingControl.increaseLeft,
|
|
1196
|
-
class: T([
|
|
1196
|
+
class: T([$, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1197
1197
|
onClick: n[5] ||= (e) => c("left", 1)
|
|
1198
|
-
}, [N(b(
|
|
1198
|
+
}, [N(b(U), {
|
|
1199
1199
|
size: 12,
|
|
1200
1200
|
"stroke-width": 2
|
|
1201
|
-
})], 10,
|
|
1201
|
+
})], 10, di)
|
|
1202
1202
|
]),
|
|
1203
1203
|
E("button", {
|
|
1204
1204
|
class: T(["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)]", o.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)]"]),
|
|
1205
1205
|
"aria-label": o.value ? b(i).spacingControl.unlock : b(i).spacingControl.lockAll,
|
|
1206
1206
|
title: o.value ? b(i).spacingControl.unlock : b(i).spacingControl.lockAll,
|
|
1207
1207
|
onClick: u
|
|
1208
|
-
}, [o.value ? (s(), S(b(
|
|
1208
|
+
}, [o.value ? (s(), S(b(vt), {
|
|
1209
1209
|
key: 0,
|
|
1210
1210
|
size: 14,
|
|
1211
1211
|
"stroke-width": 2
|
|
1212
|
-
})) : (s(), S(b(
|
|
1212
|
+
})) : (s(), S(b(bt), {
|
|
1213
1213
|
key: 1,
|
|
1214
1214
|
size: 14,
|
|
1215
1215
|
"stroke-width": 2
|
|
1216
|
-
}))], 10,
|
|
1217
|
-
E("div",
|
|
1216
|
+
}))], 10, fi),
|
|
1217
|
+
E("div", pi, [
|
|
1218
1218
|
E("button", {
|
|
1219
1219
|
"aria-label": b(i).spacingControl.decreaseRight,
|
|
1220
|
-
class: T([
|
|
1220
|
+
class: T([$, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1221
1221
|
onClick: n[6] ||= (e) => c("right", -1)
|
|
1222
|
-
}, [N(b(
|
|
1222
|
+
}, [N(b(wt), {
|
|
1223
1223
|
size: 12,
|
|
1224
1224
|
"stroke-width": 2
|
|
1225
|
-
})], 10,
|
|
1225
|
+
})], 10, mi),
|
|
1226
1226
|
E("input", {
|
|
1227
1227
|
type: "number",
|
|
1228
|
-
class: T(
|
|
1228
|
+
class: T(xi),
|
|
1229
1229
|
value: e.modelValue.right,
|
|
1230
1230
|
"aria-label": b(i).spacingControl.right,
|
|
1231
1231
|
min: "0",
|
|
1232
1232
|
onInput: n[7] ||= (e) => l("right", Number(e.target.value))
|
|
1233
|
-
}, null, 40,
|
|
1233
|
+
}, null, 40, hi),
|
|
1234
1234
|
E("button", {
|
|
1235
1235
|
"aria-label": b(i).spacingControl.increaseRight,
|
|
1236
|
-
class: T([
|
|
1236
|
+
class: T([$, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1237
1237
|
onClick: n[8] ||= (e) => c("right", 1)
|
|
1238
|
-
}, [N(b(
|
|
1238
|
+
}, [N(b(U), {
|
|
1239
1239
|
size: 12,
|
|
1240
1240
|
"stroke-width": 2
|
|
1241
|
-
})], 10,
|
|
1241
|
+
})], 10, gi)
|
|
1242
1242
|
])
|
|
1243
1243
|
]),
|
|
1244
|
-
E("div",
|
|
1244
|
+
E("div", _i, [
|
|
1245
1245
|
E("button", {
|
|
1246
1246
|
"aria-label": b(i).spacingControl.decreaseBottom,
|
|
1247
|
-
class: T([
|
|
1247
|
+
class: T([$, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1248
1248
|
onClick: n[9] ||= (e) => c("bottom", -1)
|
|
1249
|
-
}, [N(b(
|
|
1249
|
+
}, [N(b(wt), {
|
|
1250
1250
|
size: 12,
|
|
1251
1251
|
"stroke-width": 2
|
|
1252
|
-
})], 10,
|
|
1252
|
+
})], 10, vi),
|
|
1253
1253
|
E("input", {
|
|
1254
1254
|
type: "number",
|
|
1255
|
-
class: T(
|
|
1255
|
+
class: T(xi),
|
|
1256
1256
|
value: e.modelValue.bottom,
|
|
1257
1257
|
"aria-label": b(i).spacingControl.bottom,
|
|
1258
1258
|
min: "0",
|
|
1259
1259
|
onInput: n[10] ||= (e) => l("bottom", Number(e.target.value))
|
|
1260
|
-
}, null, 40,
|
|
1260
|
+
}, null, 40, yi),
|
|
1261
1261
|
E("button", {
|
|
1262
1262
|
"aria-label": b(i).spacingControl.increaseBottom,
|
|
1263
|
-
class: T([
|
|
1263
|
+
class: T([$, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1264
1264
|
onClick: n[11] ||= (e) => c("bottom", 1)
|
|
1265
|
-
}, [N(b(
|
|
1265
|
+
}, [N(b(U), {
|
|
1266
1266
|
size: 12,
|
|
1267
1267
|
"stroke-width": 2
|
|
1268
|
-
})], 10,
|
|
1268
|
+
})], 10, bi)
|
|
1269
1269
|
])
|
|
1270
1270
|
])]));
|
|
1271
1271
|
}
|
|
1272
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1272
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Ci = { class: "tpl:mt-3" }, wi = /* @__PURE__ */ M({
|
|
1273
1273
|
__name: "CollapsibleSection",
|
|
1274
1274
|
props: {
|
|
1275
1275
|
title: {},
|
|
@@ -1282,25 +1282,25 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1282
1282
|
type: "button",
|
|
1283
1283
|
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)]",
|
|
1284
1284
|
onClick: i[0] ||= (e) => n.$emit("toggle")
|
|
1285
|
-
}, [N(b(
|
|
1285
|
+
}, [N(b(Se), {
|
|
1286
1286
|
class: T(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1287
1287
|
size: 12,
|
|
1288
1288
|
"stroke-width": 2
|
|
1289
|
-
}, null, 8, ["class"]), E("span", null, g(e.title), 1)]), r(E("div",
|
|
1289
|
+
}, null, 8, ["class"]), E("span", null, g(e.title), 1)]), r(E("div", Ci, [t(n.$slots, "default")], 512), [[D, e.open]])], 2));
|
|
1290
1290
|
}
|
|
1291
|
-
}),
|
|
1291
|
+
}), Ti = { class: "tpl:space-y-2" }, Ei = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Di = { class: "tpl:space-y-2" }, Oi = ["value"], ki = { value: "" }, Ai = ["label"], ji = ["value"], Mi = ["value"], Ni = {
|
|
1292
1292
|
key: 0,
|
|
1293
1293
|
value: "__custom__"
|
|
1294
|
-
},
|
|
1294
|
+
}, Pi = {
|
|
1295
1295
|
key: 0,
|
|
1296
1296
|
class: "tpl:space-y-2"
|
|
1297
|
-
},
|
|
1297
|
+
}, Fi = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ii = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Li = { class: "tpl:flex tpl:justify-end" }, Ri = ["disabled"], zi = {
|
|
1298
1298
|
key: 0,
|
|
1299
1299
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1300
|
-
},
|
|
1300
|
+
}, Bi = { class: "tpl:space-y-1" }, Vi = { 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)]" }, Hi = {
|
|
1301
1301
|
key: 0,
|
|
1302
1302
|
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)]"
|
|
1303
|
-
},
|
|
1303
|
+
}, Ui = /* @__PURE__ */ M({
|
|
1304
1304
|
__name: "CommonBlockSettings",
|
|
1305
1305
|
props: {
|
|
1306
1306
|
block: {},
|
|
@@ -1308,23 +1308,23 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1308
1308
|
},
|
|
1309
1309
|
emits: ["update"],
|
|
1310
1310
|
setup(e, { emit: t }) {
|
|
1311
|
-
let n = e, i = t, { t: a } =
|
|
1311
|
+
let n = e, i = t, { t: a } = H(), c = u(nt, []), m = u(le, !1), h = f(/* @__PURE__ */ new Set()), x = p(!1), C = p(""), D = p(""), O = [{
|
|
1312
1312
|
key: "desktop",
|
|
1313
|
-
icon:
|
|
1313
|
+
icon: St,
|
|
1314
1314
|
labelKey: "showOnDesktop"
|
|
1315
1315
|
}, {
|
|
1316
1316
|
key: "mobile",
|
|
1317
|
-
icon:
|
|
1317
|
+
icon: Ot,
|
|
1318
1318
|
labelKey: "showOnMobile"
|
|
1319
1319
|
}];
|
|
1320
1320
|
function k(e) {
|
|
1321
1321
|
h.has(e) ? h.delete(e) : h.add(e);
|
|
1322
1322
|
}
|
|
1323
1323
|
let M = _(() => c.length > 0 || m), F = _(() => n.block.displayCondition ? !c.some((e) => e.label === n.block.displayCondition?.label) : !1);
|
|
1324
|
-
function
|
|
1324
|
+
function ee() {
|
|
1325
1325
|
x.value = !0, F.value && n.block.displayCondition ? (C.value = n.block.displayCondition.before, D.value = n.block.displayCondition.after ?? "") : (C.value = "", D.value = "");
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function I() {
|
|
1328
1328
|
C.value.trim() && (i("update", { displayCondition: {
|
|
1329
1329
|
label: a.blockSettings.customCondition,
|
|
1330
1330
|
before: C.value.trim(),
|
|
@@ -1363,13 +1363,13 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1363
1363
|
t[e] = !t[e], i("update", { visibility: t });
|
|
1364
1364
|
}
|
|
1365
1365
|
return (t, n) => (s(), v("div", { class: T(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1366
|
-
N(
|
|
1366
|
+
N(wi, {
|
|
1367
1367
|
title: b(a).blockSettings.spacing,
|
|
1368
1368
|
open: h.has("spacing"),
|
|
1369
1369
|
"no-border": e.isFirstSection,
|
|
1370
1370
|
onToggle: n[1] ||= (e) => k("spacing")
|
|
1371
1371
|
}, {
|
|
1372
|
-
default: d(() => [N(
|
|
1372
|
+
default: d(() => [N(Si, {
|
|
1373
1373
|
label: b(a).blockSettings.padding,
|
|
1374
1374
|
"model-value": e.block.styles.padding,
|
|
1375
1375
|
"onUpdate:modelValue": n[0] ||= (e) => R("padding", e)
|
|
@@ -1380,30 +1380,30 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1380
1380
|
"open",
|
|
1381
1381
|
"no-border"
|
|
1382
1382
|
]),
|
|
1383
|
-
N(
|
|
1383
|
+
N(wi, {
|
|
1384
1384
|
title: b(a).blockSettings.background,
|
|
1385
1385
|
open: h.has("bg"),
|
|
1386
1386
|
onToggle: n[3] ||= (e) => k("bg")
|
|
1387
1387
|
}, {
|
|
1388
|
-
default: d(() => [E("label", { class: T(b(
|
|
1388
|
+
default: d(() => [E("label", { class: T(b(G)) }, g(b(a).blockSettings.color), 3), N(J, {
|
|
1389
1389
|
"model-value": e.block.styles.backgroundColor ?? "",
|
|
1390
1390
|
"onUpdate:modelValue": n[2] ||= (e) => R("backgroundColor", e)
|
|
1391
1391
|
}, null, 8, ["model-value"])]),
|
|
1392
1392
|
_: 1
|
|
1393
1393
|
}, 8, ["title", "open"]),
|
|
1394
|
-
N(
|
|
1394
|
+
N(wi, {
|
|
1395
1395
|
title: b(a).blockSettings.display,
|
|
1396
1396
|
open: h.has("display"),
|
|
1397
1397
|
onToggle: n[4] ||= (e) => k("display")
|
|
1398
1398
|
}, {
|
|
1399
|
-
default: d(() => [E("div",
|
|
1399
|
+
default: d(() => [E("div", Ti, [(s(), v(A, null, l(O, (e) => N(Y, {
|
|
1400
1400
|
key: e.key,
|
|
1401
1401
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
1402
1402
|
"model-value": z(e.key),
|
|
1403
1403
|
label: b(a).blockSettings[e.labelKey],
|
|
1404
1404
|
"onUpdate:modelValue": (t) => B(e.key)
|
|
1405
1405
|
}, {
|
|
1406
|
-
default: d(() => [E("span",
|
|
1406
|
+
default: d(() => [E("span", Ei, [(s(), S(o(e.icon), {
|
|
1407
1407
|
size: 14,
|
|
1408
1408
|
"stroke-width": 1.5
|
|
1409
1409
|
})), j(" " + g(b(a).blockSettings[e.labelKey]), 1)])]),
|
|
@@ -1415,19 +1415,19 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1415
1415
|
])), 64))])]),
|
|
1416
1416
|
_: 1
|
|
1417
1417
|
}, 8, ["title", "open"]),
|
|
1418
|
-
M.value ? (s(), S(
|
|
1418
|
+
M.value ? (s(), S(wi, {
|
|
1419
1419
|
key: 0,
|
|
1420
1420
|
title: b(a).blockSettings.displayCondition,
|
|
1421
1421
|
open: h.has("condition"),
|
|
1422
1422
|
onToggle: n[8] ||= (e) => k("condition")
|
|
1423
1423
|
}, {
|
|
1424
|
-
default: d(() => [E("div",
|
|
1424
|
+
default: d(() => [E("div", Di, [E("select", {
|
|
1425
1425
|
class: T(["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)]"]),
|
|
1426
1426
|
value: x.value || F.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1427
1427
|
onChange: n[5] ||= (e) => {
|
|
1428
1428
|
let t = e.target.value;
|
|
1429
1429
|
if (t === "__custom__") {
|
|
1430
|
-
|
|
1430
|
+
ee();
|
|
1431
1431
|
return;
|
|
1432
1432
|
}
|
|
1433
1433
|
if (x.value = !1, !t) {
|
|
@@ -1438,41 +1438,41 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1438
1438
|
n && i("update", { displayCondition: n });
|
|
1439
1439
|
}
|
|
1440
1440
|
}, [
|
|
1441
|
-
E("option",
|
|
1441
|
+
E("option", ki, g(b(a).blockSettings.noCondition), 1),
|
|
1442
1442
|
(s(!0), v(A, null, l(L.value, (e, t) => (s(), v(A, { key: t }, [t ? (s(), v("optgroup", {
|
|
1443
1443
|
key: 0,
|
|
1444
1444
|
label: String(t)
|
|
1445
1445
|
}, [(s(!0), v(A, null, l(e, (e) => (s(), v("option", {
|
|
1446
1446
|
key: e.label,
|
|
1447
1447
|
value: e.label
|
|
1448
|
-
}, g(e.label), 9,
|
|
1448
|
+
}, g(e.label), 9, ji))), 128))], 8, Ai)) : (s(!0), v(A, { key: 1 }, l(e, (e) => (s(), v("option", {
|
|
1449
1449
|
key: e.label,
|
|
1450
1450
|
value: e.label
|
|
1451
|
-
}, g(e.label), 9,
|
|
1452
|
-
b(m) ? (s(), v("option",
|
|
1453
|
-
], 42,
|
|
1454
|
-
E("div", null, [E("label",
|
|
1451
|
+
}, g(e.label), 9, Mi))), 128))], 64))), 128)),
|
|
1452
|
+
b(m) ? (s(), v("option", Ni, g(b(a).blockSettings.customCondition), 1)) : y("", !0)
|
|
1453
|
+
], 42, Oi), x.value || F.value ? (s(), v("div", Pi, [
|
|
1454
|
+
E("div", null, [E("label", Fi, g(b(a).blockSettings.customConditionBefore), 1), r(E("textarea", {
|
|
1455
1455
|
"onUpdate:modelValue": n[6] ||= (e) => C.value = e,
|
|
1456
1456
|
rows: "2",
|
|
1457
|
-
class: T(b(
|
|
1457
|
+
class: T(b(Ut))
|
|
1458
1458
|
}, null, 2), [[w, C.value]])]),
|
|
1459
|
-
E("div", null, [E("label",
|
|
1459
|
+
E("div", null, [E("label", Ii, g(b(a).blockSettings.customConditionAfter), 1), r(E("textarea", {
|
|
1460
1460
|
"onUpdate:modelValue": n[7] ||= (e) => D.value = e,
|
|
1461
1461
|
rows: "2",
|
|
1462
|
-
class: T(b(
|
|
1462
|
+
class: T(b(Ut))
|
|
1463
1463
|
}, null, 2), [[w, D.value]])]),
|
|
1464
|
-
E("div",
|
|
1464
|
+
E("div", Li, [E("button", {
|
|
1465
1465
|
type: "button",
|
|
1466
1466
|
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",
|
|
1467
1467
|
disabled: !C.value.trim(),
|
|
1468
|
-
onClick:
|
|
1469
|
-
}, g(b(a).blockSettings.applyCondition), 9,
|
|
1470
|
-
])) : e.block.displayCondition && !F.value ? (s(), v(A, { key: 1 }, [e.block.displayCondition.description ? (s(), v("p",
|
|
1468
|
+
onClick: I
|
|
1469
|
+
}, g(b(a).blockSettings.applyCondition), 9, Ri)])
|
|
1470
|
+
])) : e.block.displayCondition && !F.value ? (s(), v(A, { key: 1 }, [e.block.displayCondition.description ? (s(), v("p", zi, g(e.block.displayCondition.description), 1)) : y("", !0), E("div", Bi, [E("pre", Vi, g(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (s(), v("pre", Hi, g(e.block.displayCondition.after), 1)) : y("", !0)])], 64)) : y("", !0)])]),
|
|
1471
1471
|
_: 1
|
|
1472
1472
|
}, 8, ["title", "open"])) : y("", !0)
|
|
1473
1473
|
], 2));
|
|
1474
1474
|
}
|
|
1475
|
-
}),
|
|
1475
|
+
}), Wi = ["title"], Gi = /* @__PURE__ */ M({
|
|
1476
1476
|
__name: "BooleanField",
|
|
1477
1477
|
props: {
|
|
1478
1478
|
field: {},
|
|
@@ -1481,11 +1481,11 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1481
1481
|
},
|
|
1482
1482
|
emits: ["update:modelValue"],
|
|
1483
1483
|
setup(e, { emit: t }) {
|
|
1484
|
-
let n = t, { t: r } =
|
|
1484
|
+
let n = t, { t: r } = H();
|
|
1485
1485
|
return (t, i) => (s(), v("div", {
|
|
1486
1486
|
class: "tpl:mb-3.5",
|
|
1487
1487
|
title: e.readOnly ? b(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1488
|
-
}, [N(
|
|
1488
|
+
}, [N(Y, {
|
|
1489
1489
|
class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
1490
1490
|
"model-value": e.modelValue,
|
|
1491
1491
|
label: e.field.label,
|
|
@@ -1493,7 +1493,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1493
1493
|
disabled: e.readOnly,
|
|
1494
1494
|
"onUpdate:modelValue": i[0] ||= (e) => n("update:modelValue", e)
|
|
1495
1495
|
}, {
|
|
1496
|
-
default: d(() => [j(g(e.field.label) + " ", 1), e.readOnly ? (s(), S(b(
|
|
1496
|
+
default: d(() => [j(g(e.field.label) + " ", 1), e.readOnly ? (s(), S(b(vt), {
|
|
1497
1497
|
key: 0,
|
|
1498
1498
|
size: 12,
|
|
1499
1499
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
@@ -1504,12 +1504,12 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1504
1504
|
"label",
|
|
1505
1505
|
"required",
|
|
1506
1506
|
"disabled"
|
|
1507
|
-
])], 8,
|
|
1507
|
+
])], 8, Wi));
|
|
1508
1508
|
}
|
|
1509
|
-
}),
|
|
1509
|
+
}), Ki = { class: "tpl:mb-3.5" }, qi = {
|
|
1510
1510
|
key: 1,
|
|
1511
1511
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1512
|
-
},
|
|
1512
|
+
}, Ji = /* @__PURE__ */ M({
|
|
1513
1513
|
__name: "FieldWrapper",
|
|
1514
1514
|
props: {
|
|
1515
1515
|
label: {},
|
|
@@ -1517,17 +1517,17 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1517
1517
|
readOnly: { type: Boolean }
|
|
1518
1518
|
},
|
|
1519
1519
|
setup(e) {
|
|
1520
|
-
return (n, r) => (s(), v("div",
|
|
1520
|
+
return (n, r) => (s(), v("div", Ki, [E("label", { class: T(b(G)) }, [
|
|
1521
1521
|
j(g(e.label) + " ", 1),
|
|
1522
|
-
e.readOnly ? (s(), S(b(
|
|
1522
|
+
e.readOnly ? (s(), S(b(vt), {
|
|
1523
1523
|
key: 0,
|
|
1524
1524
|
size: 12,
|
|
1525
1525
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1526
1526
|
})) : y("", !0),
|
|
1527
|
-
e.required ? (s(), v("span",
|
|
1527
|
+
e.required ? (s(), v("span", qi, "*")) : y("", !0)
|
|
1528
1528
|
], 2), t(n.$slots, "default")]));
|
|
1529
1529
|
}
|
|
1530
|
-
}),
|
|
1530
|
+
}), Yi = /* @__PURE__ */ M({
|
|
1531
1531
|
__name: "ColorField",
|
|
1532
1532
|
props: {
|
|
1533
1533
|
field: {},
|
|
@@ -1536,22 +1536,26 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1536
1536
|
},
|
|
1537
1537
|
emits: ["update:modelValue"],
|
|
1538
1538
|
setup(e, { emit: t }) {
|
|
1539
|
-
let n = t, { t:
|
|
1540
|
-
return (t,
|
|
1539
|
+
let n = e, r = t, { t: i } = H(), a = u(Ie, B), o = _(() => ve(n.field, a));
|
|
1540
|
+
return (t, n) => (s(), S(Ji, {
|
|
1541
1541
|
label: e.field.label,
|
|
1542
1542
|
required: e.field.required,
|
|
1543
1543
|
"read-only": e.readOnly
|
|
1544
1544
|
}, {
|
|
1545
|
-
default: d(() => [N(
|
|
1545
|
+
default: d(() => [N(J, {
|
|
1546
1546
|
"model-value": e.modelValue,
|
|
1547
1547
|
placeholder: e.field.placeholder,
|
|
1548
1548
|
disabled: e.readOnly,
|
|
1549
|
-
|
|
1550
|
-
"
|
|
1549
|
+
presets: o.value.presets,
|
|
1550
|
+
"allow-custom": o.value.allowCustom,
|
|
1551
|
+
title: e.readOnly ? b(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1552
|
+
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
1551
1553
|
}, null, 8, [
|
|
1552
1554
|
"model-value",
|
|
1553
1555
|
"placeholder",
|
|
1554
1556
|
"disabled",
|
|
1557
|
+
"presets",
|
|
1558
|
+
"allow-custom",
|
|
1555
1559
|
"title"
|
|
1556
1560
|
])]),
|
|
1557
1561
|
_: 1
|
|
@@ -1561,15 +1565,15 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1561
1565
|
"read-only"
|
|
1562
1566
|
]));
|
|
1563
1567
|
}
|
|
1564
|
-
}),
|
|
1568
|
+
}), Xi = {
|
|
1565
1569
|
key: 0,
|
|
1566
1570
|
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)]",
|
|
1567
1571
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
1568
|
-
},
|
|
1572
|
+
}, Zi = [
|
|
1569
1573
|
"value",
|
|
1570
1574
|
"placeholder",
|
|
1571
1575
|
"title"
|
|
1572
|
-
],
|
|
1576
|
+
], Qi = ["value", "placeholder"], $i = /* @__PURE__ */ M({
|
|
1573
1577
|
__name: "ImageField",
|
|
1574
1578
|
props: {
|
|
1575
1579
|
field: {},
|
|
@@ -1578,7 +1582,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1578
1582
|
},
|
|
1579
1583
|
emits: ["update:modelValue"],
|
|
1580
1584
|
setup(e, { emit: t }) {
|
|
1581
|
-
let n = e, r = t, { t: i } =
|
|
1585
|
+
let n = e, r = t, { t: i } = H(), a = u(Re, null), o = ge(), c = _(() => !!a);
|
|
1582
1586
|
async function l() {
|
|
1583
1587
|
let e = await a?.({ accept: ["images"] });
|
|
1584
1588
|
o.alive && e && r("update:modelValue", e.url);
|
|
@@ -1599,12 +1603,12 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1599
1603
|
}
|
|
1600
1604
|
}
|
|
1601
1605
|
}
|
|
1602
|
-
let { isOver: C } =
|
|
1606
|
+
let { isOver: C } = V({
|
|
1603
1607
|
target: f,
|
|
1604
1608
|
enabled: h,
|
|
1605
1609
|
onFiles: x
|
|
1606
1610
|
});
|
|
1607
|
-
return (t, n) => (s(), S(
|
|
1611
|
+
return (t, n) => (s(), S(Ji, {
|
|
1608
1612
|
label: e.field.label,
|
|
1609
1613
|
required: e.field.required,
|
|
1610
1614
|
"read-only": e.readOnly
|
|
@@ -1614,35 +1618,35 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1614
1618
|
ref: f,
|
|
1615
1619
|
class: "tpl:relative"
|
|
1616
1620
|
}, [
|
|
1617
|
-
h.value && (b(C) || m.value) ? (s(), v("div",
|
|
1621
|
+
h.value && (b(C) || m.value) ? (s(), v("div", Xi, [m.value ? (s(), v(A, { key: 0 }, [N(b(Oe), {
|
|
1618
1622
|
class: "tpl-spinner",
|
|
1619
1623
|
size: 18,
|
|
1620
1624
|
"stroke-width": 2
|
|
1621
|
-
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(
|
|
1625
|
+
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(ft), {
|
|
1622
1626
|
size: 18,
|
|
1623
1627
|
"stroke-width": 1.5
|
|
1624
1628
|
}), j(" " + g(b(i).image.dropToUpload), 1)], 64))])) : y("", !0),
|
|
1625
1629
|
e.readOnly ? (s(), v("input", {
|
|
1626
1630
|
key: 1,
|
|
1627
1631
|
type: "url",
|
|
1628
|
-
class: T([b(
|
|
1632
|
+
class: T([b(W), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1629
1633
|
value: e.modelValue,
|
|
1630
1634
|
placeholder: e.field.placeholder || "https://...",
|
|
1631
1635
|
disabled: "",
|
|
1632
1636
|
title: b(i).customBlocks.dataSource.readOnlyTooltip
|
|
1633
|
-
}, null, 10,
|
|
1637
|
+
}, null, 10, Zi)) : (s(), v("input", {
|
|
1634
1638
|
key: 2,
|
|
1635
1639
|
type: "url",
|
|
1636
|
-
class: T(b(
|
|
1640
|
+
class: T(b(W)),
|
|
1637
1641
|
value: e.modelValue,
|
|
1638
1642
|
placeholder: e.field.placeholder || "https://...",
|
|
1639
1643
|
onInput: n[0] ||= (e) => r("update:modelValue", e.target.value)
|
|
1640
|
-
}, null, 42,
|
|
1644
|
+
}, null, 42, Qi)),
|
|
1641
1645
|
c.value && !e.readOnly ? (s(), v("button", {
|
|
1642
1646
|
key: 3,
|
|
1643
1647
|
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)]",
|
|
1644
1648
|
onClick: n[1] ||= (e) => l()
|
|
1645
|
-
}, [N(b(
|
|
1649
|
+
}, [N(b(mt), {
|
|
1646
1650
|
size: 14,
|
|
1647
1651
|
"stroke-width": 1.5
|
|
1648
1652
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
@@ -1654,7 +1658,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1654
1658
|
"read-only"
|
|
1655
1659
|
]));
|
|
1656
1660
|
}
|
|
1657
|
-
}),
|
|
1661
|
+
}), ea = [
|
|
1658
1662
|
"value",
|
|
1659
1663
|
"placeholder",
|
|
1660
1664
|
"min",
|
|
@@ -1662,7 +1666,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1662
1666
|
"step",
|
|
1663
1667
|
"disabled",
|
|
1664
1668
|
"title"
|
|
1665
|
-
],
|
|
1669
|
+
], ta = /* @__PURE__ */ M({
|
|
1666
1670
|
__name: "NumberField",
|
|
1667
1671
|
props: {
|
|
1668
1672
|
field: {},
|
|
@@ -1671,15 +1675,15 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1671
1675
|
},
|
|
1672
1676
|
emits: ["update:modelValue"],
|
|
1673
1677
|
setup(e, { emit: t }) {
|
|
1674
|
-
let n = t, { t: r } =
|
|
1675
|
-
return (t, i) => (s(), S(
|
|
1678
|
+
let n = t, { t: r } = H();
|
|
1679
|
+
return (t, i) => (s(), S(Ji, {
|
|
1676
1680
|
label: e.field.label,
|
|
1677
1681
|
required: e.field.required,
|
|
1678
1682
|
"read-only": e.readOnly
|
|
1679
1683
|
}, {
|
|
1680
1684
|
default: d(() => [E("input", {
|
|
1681
1685
|
type: "number",
|
|
1682
|
-
class: T([b(
|
|
1686
|
+
class: T([b(W), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1683
1687
|
value: e.modelValue,
|
|
1684
1688
|
placeholder: e.field.placeholder,
|
|
1685
1689
|
min: e.field.min,
|
|
@@ -1688,7 +1692,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1688
1692
|
disabled: e.readOnly,
|
|
1689
1693
|
title: e.readOnly ? b(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1690
1694
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
1691
|
-
}, null, 42,
|
|
1695
|
+
}, null, 42, ea)]),
|
|
1692
1696
|
_: 1
|
|
1693
1697
|
}, 8, [
|
|
1694
1698
|
"label",
|
|
@@ -1696,10 +1700,10 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1696
1700
|
"read-only"
|
|
1697
1701
|
]));
|
|
1698
1702
|
}
|
|
1699
|
-
}),
|
|
1703
|
+
}), na = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ra = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, ia = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, aa = ["title", "onClick"], oa = {
|
|
1700
1704
|
key: 1,
|
|
1701
1705
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1702
|
-
},
|
|
1706
|
+
}, sa = /* @__PURE__ */ M({
|
|
1703
1707
|
__name: "RepeatableField",
|
|
1704
1708
|
props: {
|
|
1705
1709
|
field: {},
|
|
@@ -1708,7 +1712,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1708
1712
|
},
|
|
1709
1713
|
emits: ["update:modelValue"],
|
|
1710
1714
|
setup(e, { emit: t }) {
|
|
1711
|
-
let n = e, r = t, { t: i } =
|
|
1715
|
+
let n = e, r = t, { t: i } = H(), a = _(() => n.modelValue || []), c = _(() => !n.field.maxItems || a.value.length < n.field.maxItems), u = _(() => !n.field.minItems || a.value.length > n.field.minItems);
|
|
1712
1716
|
function f() {
|
|
1713
1717
|
if (!c.value || n.readOnly) return;
|
|
1714
1718
|
let e = {};
|
|
@@ -1727,25 +1731,25 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1727
1731
|
} : r);
|
|
1728
1732
|
r("update:modelValue", i);
|
|
1729
1733
|
}
|
|
1730
|
-
return (t, n) => (s(), S(
|
|
1734
|
+
return (t, n) => (s(), S(Ji, {
|
|
1731
1735
|
label: e.field.label,
|
|
1732
1736
|
required: e.field.required,
|
|
1733
1737
|
"read-only": e.readOnly
|
|
1734
1738
|
}, {
|
|
1735
|
-
default: d(() => [E("div",
|
|
1739
|
+
default: d(() => [E("div", na, [
|
|
1736
1740
|
(s(!0), v(A, null, l(a.value, (t, n) => (s(), v("div", {
|
|
1737
1741
|
key: `${e.field.key}-${n}`,
|
|
1738
1742
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1739
|
-
}, [E("div",
|
|
1743
|
+
}, [E("div", ra, [E("span", ia, " #" + g(n + 1), 1), u.value && !e.readOnly ? (s(), v("button", {
|
|
1740
1744
|
key: 0,
|
|
1741
1745
|
type: "button",
|
|
1742
1746
|
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)]",
|
|
1743
1747
|
title: b(i).customBlocks.fields.removeItem,
|
|
1744
1748
|
onClick: (e) => p(n)
|
|
1745
|
-
}, [N(b(
|
|
1749
|
+
}, [N(b(He), {
|
|
1746
1750
|
size: 12,
|
|
1747
1751
|
"stroke-width": 2
|
|
1748
|
-
})], 8,
|
|
1752
|
+
})], 8, aa)) : y("", !0)]), (s(!0), v(A, null, l(e.field.fields, (r) => (s(), S(o(b(ga)(r.type)), {
|
|
1749
1753
|
key: r.key,
|
|
1750
1754
|
field: r,
|
|
1751
1755
|
"model-value": t[r.key],
|
|
@@ -1760,13 +1764,13 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1760
1764
|
c.value && !e.readOnly ? (s(), v("button", {
|
|
1761
1765
|
key: 0,
|
|
1762
1766
|
type: "button",
|
|
1763
|
-
class: T(b(
|
|
1767
|
+
class: T(b(Gt)),
|
|
1764
1768
|
onClick: f
|
|
1765
|
-
}, [N(b(
|
|
1769
|
+
}, [N(b(U), {
|
|
1766
1770
|
size: 14,
|
|
1767
1771
|
"stroke-width": 2
|
|
1768
1772
|
}), j(" " + g(b(i).customBlocks.fields.addItem), 1)], 2)) : y("", !0),
|
|
1769
|
-
!c.value && !e.readOnly ? (s(), v("p",
|
|
1773
|
+
!c.value && !e.readOnly ? (s(), v("p", oa, g(b(i).customBlocks.fields.maxItemsReached), 1)) : y("", !0)
|
|
1770
1774
|
])]),
|
|
1771
1775
|
_: 1
|
|
1772
1776
|
}, 8, [
|
|
@@ -1775,11 +1779,11 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1775
1779
|
"read-only"
|
|
1776
1780
|
]));
|
|
1777
1781
|
}
|
|
1778
|
-
}),
|
|
1782
|
+
}), ca = [
|
|
1779
1783
|
"value",
|
|
1780
1784
|
"disabled",
|
|
1781
1785
|
"title"
|
|
1782
|
-
],
|
|
1786
|
+
], la = ["value"], ua = /* @__PURE__ */ M({
|
|
1783
1787
|
__name: "SelectField",
|
|
1784
1788
|
props: {
|
|
1785
1789
|
field: {},
|
|
@@ -1788,14 +1792,14 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1788
1792
|
},
|
|
1789
1793
|
emits: ["update:modelValue"],
|
|
1790
1794
|
setup(e, { emit: t }) {
|
|
1791
|
-
let n = t, { t: r } =
|
|
1792
|
-
return (t, i) => (s(), S(
|
|
1795
|
+
let n = t, { t: r } = H();
|
|
1796
|
+
return (t, i) => (s(), S(Ji, {
|
|
1793
1797
|
label: e.field.label,
|
|
1794
1798
|
required: e.field.required,
|
|
1795
1799
|
"read-only": e.readOnly
|
|
1796
1800
|
}, {
|
|
1797
1801
|
default: d(() => [E("select", {
|
|
1798
|
-
class: T([b(
|
|
1802
|
+
class: T([b(W), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1799
1803
|
value: e.modelValue,
|
|
1800
1804
|
disabled: e.readOnly,
|
|
1801
1805
|
title: e.readOnly ? b(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
@@ -1803,7 +1807,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1803
1807
|
}, [(s(!0), v(A, null, l(e.field.options, (e) => (s(), v("option", {
|
|
1804
1808
|
key: e.value,
|
|
1805
1809
|
value: e.value
|
|
1806
|
-
}, g(e.label), 9,
|
|
1810
|
+
}, g(e.label), 9, la))), 128))], 42, ca)]),
|
|
1807
1811
|
_: 1
|
|
1808
1812
|
}, 8, [
|
|
1809
1813
|
"label",
|
|
@@ -1811,11 +1815,11 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1811
1815
|
"read-only"
|
|
1812
1816
|
]));
|
|
1813
1817
|
}
|
|
1814
|
-
}),
|
|
1818
|
+
}), da = [
|
|
1815
1819
|
"value",
|
|
1816
1820
|
"placeholder",
|
|
1817
1821
|
"title"
|
|
1818
|
-
],
|
|
1822
|
+
], fa = /* @__PURE__ */ M({
|
|
1819
1823
|
__name: "TextField",
|
|
1820
1824
|
props: {
|
|
1821
1825
|
field: {},
|
|
@@ -1824,8 +1828,8 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1824
1828
|
},
|
|
1825
1829
|
emits: ["update:modelValue"],
|
|
1826
1830
|
setup(e, { emit: t }) {
|
|
1827
|
-
let n = t, { t: r } =
|
|
1828
|
-
return (t, i) => (s(), S(
|
|
1831
|
+
let n = t, { t: r } = H();
|
|
1832
|
+
return (t, i) => (s(), S(Ji, {
|
|
1829
1833
|
label: e.field.label,
|
|
1830
1834
|
required: e.field.required,
|
|
1831
1835
|
"read-only": e.readOnly
|
|
@@ -1833,12 +1837,12 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1833
1837
|
default: d(() => [e.readOnly ? (s(), v("input", {
|
|
1834
1838
|
key: 0,
|
|
1835
1839
|
type: "text",
|
|
1836
|
-
class: T([b(
|
|
1840
|
+
class: T([b(W), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1837
1841
|
value: e.modelValue,
|
|
1838
1842
|
placeholder: e.field.placeholder,
|
|
1839
1843
|
disabled: "",
|
|
1840
1844
|
title: b(r).customBlocks.dataSource.readOnlyTooltip
|
|
1841
|
-
}, null, 10,
|
|
1845
|
+
}, null, 10, da)) : (s(), S(Q, {
|
|
1842
1846
|
key: 1,
|
|
1843
1847
|
"model-value": e.modelValue,
|
|
1844
1848
|
placeholder: e.field.placeholder,
|
|
@@ -1851,12 +1855,12 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1851
1855
|
"read-only"
|
|
1852
1856
|
]));
|
|
1853
1857
|
}
|
|
1854
|
-
}),
|
|
1858
|
+
}), pa = [
|
|
1855
1859
|
"value",
|
|
1856
1860
|
"placeholder",
|
|
1857
1861
|
"title"
|
|
1858
|
-
],
|
|
1859
|
-
text:
|
|
1862
|
+
], ma = "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", ha = {
|
|
1863
|
+
text: fa,
|
|
1860
1864
|
textarea: /* @__PURE__ */ M({
|
|
1861
1865
|
__name: "TextareaField",
|
|
1862
1866
|
props: {
|
|
@@ -1866,8 +1870,8 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1866
1870
|
},
|
|
1867
1871
|
emits: ["update:modelValue"],
|
|
1868
1872
|
setup(e, { emit: t }) {
|
|
1869
|
-
let n = t, { t: r } =
|
|
1870
|
-
return (t, i) => (s(), S(
|
|
1873
|
+
let n = t, { t: r } = H();
|
|
1874
|
+
return (t, i) => (s(), S(Ji, {
|
|
1871
1875
|
label: e.field.label,
|
|
1872
1876
|
required: e.field.required,
|
|
1873
1877
|
"read-only": e.readOnly
|
|
@@ -1879,8 +1883,8 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1879
1883
|
rows: "3",
|
|
1880
1884
|
disabled: "",
|
|
1881
1885
|
title: b(r).customBlocks.dataSource.readOnlyTooltip,
|
|
1882
|
-
class: T(
|
|
1883
|
-
}, null, 8,
|
|
1886
|
+
class: T(ma)
|
|
1887
|
+
}, null, 8, pa)) : (s(), S(qn, {
|
|
1884
1888
|
key: 1,
|
|
1885
1889
|
"model-value": e.modelValue,
|
|
1886
1890
|
placeholder: e.field.placeholder,
|
|
@@ -1894,42 +1898,42 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1894
1898
|
]));
|
|
1895
1899
|
}
|
|
1896
1900
|
}),
|
|
1897
|
-
image:
|
|
1898
|
-
color:
|
|
1899
|
-
number:
|
|
1900
|
-
select:
|
|
1901
|
-
boolean:
|
|
1902
|
-
repeatable:
|
|
1901
|
+
image: $i,
|
|
1902
|
+
color: Yi,
|
|
1903
|
+
number: ta,
|
|
1904
|
+
select: ua,
|
|
1905
|
+
boolean: Gi,
|
|
1906
|
+
repeatable: sa
|
|
1903
1907
|
};
|
|
1904
|
-
function
|
|
1905
|
-
return
|
|
1908
|
+
function ga(e) {
|
|
1909
|
+
return ha[e] ?? fa;
|
|
1906
1910
|
}
|
|
1907
1911
|
//#endregion
|
|
1908
1912
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1909
|
-
var
|
|
1913
|
+
var _a = {
|
|
1910
1914
|
key: 0,
|
|
1911
1915
|
class: "tpl:p-4"
|
|
1912
|
-
},
|
|
1916
|
+
}, va = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ya = { key: 1 }, ba = {
|
|
1913
1917
|
key: 0,
|
|
1914
1918
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1915
|
-
},
|
|
1919
|
+
}, xa = {
|
|
1916
1920
|
key: 1,
|
|
1917
1921
|
class: "tpl:mb-4"
|
|
1918
|
-
},
|
|
1922
|
+
}, Sa = {
|
|
1919
1923
|
key: 1,
|
|
1920
1924
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1921
|
-
},
|
|
1925
|
+
}, Ca = {
|
|
1922
1926
|
key: 0,
|
|
1923
1927
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1924
|
-
},
|
|
1928
|
+
}, wa = {
|
|
1925
1929
|
key: 2,
|
|
1926
1930
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
1927
|
-
},
|
|
1931
|
+
}, Ta = /* @__PURE__ */ M({
|
|
1928
1932
|
__name: "CustomBlockToolbar",
|
|
1929
1933
|
props: { block: {} },
|
|
1930
1934
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1931
1935
|
setup(e, { emit: t }) {
|
|
1932
|
-
let n = e, r = t, { t: i } =
|
|
1936
|
+
let n = e, r = t, { t: i } = H(), a = u(Be, []), c = _(() => a.find((e) => e.type === n.block.customType)), { isFetching: d, fetchError: f, fetch: p, hasDataSource: m, needsFetch: h } = re({
|
|
1933
1937
|
definition: c,
|
|
1934
1938
|
block: _(() => n.block),
|
|
1935
1939
|
onUpdate: (e, t) => {
|
|
@@ -1945,23 +1949,23 @@ var ma = {
|
|
|
1945
1949
|
[e]: t
|
|
1946
1950
|
});
|
|
1947
1951
|
}
|
|
1948
|
-
return (t, n) => c.value ? (s(), v("div",
|
|
1949
|
-
c.value.description ? (s(), v("p",
|
|
1950
|
-
b(m) ? (s(), v("div",
|
|
1952
|
+
return (t, n) => c.value ? (s(), v("div", ya, [
|
|
1953
|
+
c.value.description ? (s(), v("p", ba, g(c.value.description), 1)) : y("", !0),
|
|
1954
|
+
b(m) ? (s(), v("div", xa, [b(h) && !b(d) ? (s(), v("button", {
|
|
1951
1955
|
key: 0,
|
|
1952
1956
|
type: "button",
|
|
1953
1957
|
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)]",
|
|
1954
1958
|
onClick: n[0] ||= (...e) => b(p) && b(p)(...e)
|
|
1955
|
-
}, g(c.value?.dataSource?.label || b(i).customBlocks.dataSource.fetchButton), 1)) : (s(), v("div",
|
|
1959
|
+
}, g(c.value?.dataSource?.label || b(i).customBlocks.dataSource.fetchButton), 1)) : (s(), v("div", Sa, [b(d) ? (s(), v("div", Ca, g(b(i).customBlocks.dataSource.fetching), 1)) : (s(), v("button", {
|
|
1956
1960
|
key: 1,
|
|
1957
1961
|
type: "button",
|
|
1958
1962
|
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)]",
|
|
1959
1963
|
onClick: n[1] ||= (...e) => b(p) && b(p)(...e)
|
|
1960
|
-
}, [N(b(
|
|
1964
|
+
}, [N(b(pt), { size: 12 }), j(" " + g(b(i).customBlocks.dataSource.changeButton), 1)]))])), b(f) ? (s(), v("p", wa, [N(b(Ye), {
|
|
1961
1965
|
size: 14,
|
|
1962
1966
|
class: "tpl:shrink-0"
|
|
1963
1967
|
}), j(" " + g(b(i).customBlocks.dataSource.fetchError), 1)])) : y("", !0)])) : y("", !0),
|
|
1964
|
-
(s(!0), v(A, null, l(c.value.fields, (t) => (s(), S(o(b(
|
|
1968
|
+
(s(!0), v(A, null, l(c.value.fields, (t) => (s(), S(o(b(ga)(t.type)), {
|
|
1965
1969
|
key: t.key,
|
|
1966
1970
|
field: t,
|
|
1967
1971
|
"model-value": e.block.fieldValues[t.key],
|
|
@@ -1973,19 +1977,19 @@ var ma = {
|
|
|
1973
1977
|
"read-only",
|
|
1974
1978
|
"onUpdate:modelValue"
|
|
1975
1979
|
]))), 128))
|
|
1976
|
-
])) : (s(), v("div",
|
|
1980
|
+
])) : (s(), v("div", _a, [E("p", va, g(b(i).customBlocks.toolbar.noDefinition), 1)]));
|
|
1977
1981
|
}
|
|
1978
|
-
}),
|
|
1982
|
+
}), Ea = { class: "tpl:mb-3.5" }, Da = { class: "tpl:mb-3.5" }, Oa = { class: "tpl:mb-3.5" }, ka = { class: "tpl:flex tpl:items-stretch" }, Aa = ["value"], ja = /* @__PURE__ */ M({
|
|
1979
1983
|
__name: "DividerToolbar",
|
|
1980
1984
|
props: { block: {} },
|
|
1981
1985
|
emits: ["update"],
|
|
1982
1986
|
setup(e, { emit: t }) {
|
|
1983
|
-
let n = t, { t: r } =
|
|
1987
|
+
let n = t, { t: r } = H();
|
|
1984
1988
|
function i(e, t) {
|
|
1985
1989
|
n("update", { [e]: t });
|
|
1986
1990
|
}
|
|
1987
1991
|
return (t, n) => (s(), v(A, null, [
|
|
1988
|
-
E("div",
|
|
1992
|
+
E("div", Ea, [E("label", { class: T(b(G)) }, g(b(r).divider.style), 3), N(Z, {
|
|
1989
1993
|
options: [
|
|
1990
1994
|
{
|
|
1991
1995
|
value: "solid",
|
|
@@ -2003,57 +2007,57 @@ var ma = {
|
|
|
2003
2007
|
"model-value": e.block.lineStyle,
|
|
2004
2008
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
2005
2009
|
}, null, 8, ["options", "model-value"])]),
|
|
2006
|
-
E("div",
|
|
2010
|
+
E("div", Da, [E("label", { class: T(b(G)) }, g(b(r).divider.color), 3), N(J, {
|
|
2007
2011
|
"model-value": e.block.color,
|
|
2008
2012
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
2009
2013
|
}, null, 8, ["model-value"])]),
|
|
2010
|
-
E("div",
|
|
2014
|
+
E("div", Oa, [E("label", { class: T(b(G)) }, g(b(r).divider.thickness), 3), E("div", ka, [E("input", {
|
|
2011
2015
|
type: "number",
|
|
2012
|
-
class: T(b(
|
|
2016
|
+
class: T(b(q)),
|
|
2013
2017
|
value: e.block.thickness,
|
|
2014
2018
|
min: "1",
|
|
2015
2019
|
max: "10",
|
|
2016
2020
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
2017
|
-
}, null, 42,
|
|
2021
|
+
}, null, 42, Aa), E("span", { class: T(b(K)) }, "px", 2)])])
|
|
2018
2022
|
], 64));
|
|
2019
2023
|
}
|
|
2020
|
-
}),
|
|
2024
|
+
}), Ma = { class: "tpl:mb-3.5" }, Na = ["value"], Pa = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Fa = /* @__PURE__ */ M({
|
|
2021
2025
|
__name: "HtmlToolbar",
|
|
2022
2026
|
props: { block: {} },
|
|
2023
2027
|
emits: ["update"],
|
|
2024
2028
|
setup(e, { emit: t }) {
|
|
2025
|
-
let n = t, { t: r } =
|
|
2026
|
-
return (t, i) => (s(), v("div",
|
|
2027
|
-
E("label", { class: T(b(
|
|
2029
|
+
let n = t, { t: r } = H();
|
|
2030
|
+
return (t, i) => (s(), v("div", Ma, [
|
|
2031
|
+
E("label", { class: T(b(G)) }, g(b(r).html.content), 3),
|
|
2028
2032
|
E("textarea", {
|
|
2029
2033
|
value: e.block.content,
|
|
2030
2034
|
placeholder: "<div>...</div>",
|
|
2031
2035
|
rows: "10",
|
|
2032
|
-
class: T(b(
|
|
2036
|
+
class: T(b(Ut)),
|
|
2033
2037
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
2034
|
-
}, null, 42,
|
|
2035
|
-
E("p",
|
|
2038
|
+
}, null, 42, Na),
|
|
2039
|
+
E("p", Pa, [N(b(ne), {
|
|
2036
2040
|
size: 12,
|
|
2037
2041
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
2038
2042
|
}), j(" " + g(b(r).html.sanitizationHint), 1)])
|
|
2039
2043
|
]));
|
|
2040
2044
|
}
|
|
2041
|
-
}),
|
|
2045
|
+
}), Ia = { class: "tpl:mb-3.5" }, La = {
|
|
2042
2046
|
key: 0,
|
|
2043
2047
|
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)]",
|
|
2044
2048
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
2045
|
-
},
|
|
2049
|
+
}, Ra = {
|
|
2046
2050
|
key: 0,
|
|
2047
2051
|
class: "tpl:mb-3.5"
|
|
2048
|
-
},
|
|
2052
|
+
}, za = ["value", "placeholder"], Ba = { class: "tpl:mb-3.5" }, Va = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, Ha = { class: "tpl:mb-3.5" }, Ua = ["value"], Wa = { value: "full" }, Ga = { value: "custom" }, Ka = {
|
|
2049
2053
|
key: 0,
|
|
2050
2054
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2051
|
-
},
|
|
2055
|
+
}, qa = ["value"], Ja = { class: "tpl:mb-3.5" }, Ya = { class: "tpl:mb-3.5" }, Xa = 350, Za = /* @__PURE__ */ M({
|
|
2052
2056
|
__name: "ImageToolbar",
|
|
2053
2057
|
props: { block: {} },
|
|
2054
2058
|
emits: ["update"],
|
|
2055
2059
|
setup(e, { emit: t }) {
|
|
2056
|
-
let n = e, r = t, { t: i } =
|
|
2060
|
+
let n = e, r = t, { t: i } = H(), a = u(Re, null), o = u(lt, Xe.liquid), c = ge(), l = _(() => !!a), f = p(!1), m = p(!1), { start: h } = ae(() => {
|
|
2057
2061
|
f.value = !1;
|
|
2058
2062
|
}, 1e3, { immediate: !1 }), x = [
|
|
2059
2063
|
300,
|
|
@@ -2069,7 +2073,7 @@ var ma = {
|
|
|
2069
2073
|
function D(e) {
|
|
2070
2074
|
if (e === "custom") {
|
|
2071
2075
|
let e = n.block.width;
|
|
2072
|
-
(typeof e != "number" || x.includes(e)) && w("width",
|
|
2076
|
+
(typeof e != "number" || x.includes(e)) && w("width", Xa);
|
|
2073
2077
|
return;
|
|
2074
2078
|
}
|
|
2075
2079
|
w("width", e === "full" ? "full" : Number(e));
|
|
@@ -2082,8 +2086,8 @@ var ma = {
|
|
|
2082
2086
|
let e = await a?.({ accept: ["images"] });
|
|
2083
2087
|
c.alive && e && (w("src", e.url), e.alt && (w("alt", e.alt), m.value = !0), f.value = !0, h());
|
|
2084
2088
|
}
|
|
2085
|
-
let M = p(), P = p(!1), F = _(() =>
|
|
2086
|
-
async function
|
|
2089
|
+
let M = p(), P = p(!1), F = _(() => L(n.block.src, o)), ee = _(() => l.value && !P.value && !F.value);
|
|
2090
|
+
async function I(e) {
|
|
2087
2091
|
if (a) {
|
|
2088
2092
|
P.value = !0;
|
|
2089
2093
|
try {
|
|
@@ -2098,26 +2102,26 @@ var ma = {
|
|
|
2098
2102
|
}
|
|
2099
2103
|
}
|
|
2100
2104
|
}
|
|
2101
|
-
let { isOver:
|
|
2105
|
+
let { isOver: R } = V({
|
|
2102
2106
|
target: M,
|
|
2103
|
-
enabled:
|
|
2104
|
-
onFiles:
|
|
2107
|
+
enabled: ee,
|
|
2108
|
+
onFiles: I
|
|
2105
2109
|
});
|
|
2106
2110
|
return (t, n) => (s(), v(A, null, [
|
|
2107
|
-
E("div",
|
|
2111
|
+
E("div", Ia, [E("label", { class: T(b(G)) }, g(b(i).image.imageUrl), 3), E("div", {
|
|
2108
2112
|
ref_key: "dropZoneRef",
|
|
2109
2113
|
ref: M,
|
|
2110
2114
|
class: "tpl:relative"
|
|
2111
2115
|
}, [
|
|
2112
|
-
|
|
2116
|
+
ee.value && (b(R) || P.value) ? (s(), v("div", La, [P.value ? (s(), v(A, { key: 0 }, [N(b(Oe), {
|
|
2113
2117
|
class: "tpl-spinner",
|
|
2114
2118
|
size: 18,
|
|
2115
2119
|
"stroke-width": 2
|
|
2116
|
-
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(
|
|
2120
|
+
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(ft), {
|
|
2117
2121
|
size: 18,
|
|
2118
2122
|
"stroke-width": 1.5
|
|
2119
2123
|
}), j(" " + g(b(i).image.dropToUpload), 1)], 64))])) : y("", !0),
|
|
2120
|
-
N(
|
|
2124
|
+
N(Q, {
|
|
2121
2125
|
"model-value": e.block.src,
|
|
2122
2126
|
type: "url",
|
|
2123
2127
|
placeholder: b(i).image.imageUrlPlaceholder,
|
|
@@ -2137,21 +2141,21 @@ var ma = {
|
|
|
2137
2141
|
"background-color": "var(--tpl-bg)"
|
|
2138
2142
|
},
|
|
2139
2143
|
onClick: k
|
|
2140
|
-
}, [N(b(
|
|
2144
|
+
}, [N(b(mt), {
|
|
2141
2145
|
size: 14,
|
|
2142
2146
|
"stroke-width": 1.5
|
|
2143
2147
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
2144
2148
|
], 512)]),
|
|
2145
|
-
b(
|
|
2149
|
+
b(L)(e.block.src, b(o)) ? (s(), v("div", Ra, [E("label", { class: T(b(G)) }, [j(g(b(i).image.placeholderUrl) + " ", 1), n[9] ||= E("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, g("(optional)"), -1)], 2), E("input", {
|
|
2146
2150
|
type: "url",
|
|
2147
|
-
class: T(b(
|
|
2151
|
+
class: T(b(W)),
|
|
2148
2152
|
value: e.block.placeholderUrl || "",
|
|
2149
2153
|
placeholder: b(i).image.placeholderUrlPlaceholder,
|
|
2150
2154
|
onInput: n[1] ||= (e) => w("placeholderUrl", e.target.value)
|
|
2151
|
-
}, null, 42,
|
|
2152
|
-
E("div",
|
|
2153
|
-
E("label", { class: T(b(
|
|
2154
|
-
N(
|
|
2155
|
+
}, null, 42, za)])) : y("", !0),
|
|
2156
|
+
E("div", Ba, [
|
|
2157
|
+
E("label", { class: T(b(G)) }, g(b(i).image.altText), 3),
|
|
2158
|
+
N(Q, {
|
|
2155
2159
|
"model-value": e.block.alt,
|
|
2156
2160
|
type: "text",
|
|
2157
2161
|
placeholder: b(i).image.altTextPlaceholder,
|
|
@@ -2164,38 +2168,38 @@ var ma = {
|
|
|
2164
2168
|
"pulse",
|
|
2165
2169
|
"disabled"
|
|
2166
2170
|
]),
|
|
2167
|
-
N(
|
|
2171
|
+
N(Y, {
|
|
2168
2172
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2169
2173
|
"model-value": e.block.decorative === !0,
|
|
2170
2174
|
label: b(i).image.decorative,
|
|
2171
2175
|
"onUpdate:modelValue": n[3] ||= (e) => w("decorative", e)
|
|
2172
2176
|
}, {
|
|
2173
|
-
default: d(() => [E("span", null, [j(g(b(i).image.decorative) + " ", 1), E("span",
|
|
2177
|
+
default: d(() => [E("span", null, [j(g(b(i).image.decorative) + " ", 1), E("span", Va, g(b(i).image.decorativeHint), 1)])]),
|
|
2174
2178
|
_: 1
|
|
2175
2179
|
}, 8, ["model-value", "label"])
|
|
2176
2180
|
]),
|
|
2177
|
-
E("div",
|
|
2178
|
-
E("label", { class: T(b(
|
|
2181
|
+
E("div", Ha, [
|
|
2182
|
+
E("label", { class: T(b(G)) }, g(b(i).image.width), 3),
|
|
2179
2183
|
E("select", {
|
|
2180
|
-
class: T(b(
|
|
2184
|
+
class: T(b(W)),
|
|
2181
2185
|
value: C.value,
|
|
2182
2186
|
onChange: n[4] ||= (e) => D(e.target.value)
|
|
2183
2187
|
}, [
|
|
2184
|
-
E("option",
|
|
2188
|
+
E("option", Wa, g(b(i).image.fullWidth), 1),
|
|
2185
2189
|
n[10] ||= E("option", { value: "300" }, "300px", -1),
|
|
2186
2190
|
n[11] ||= E("option", { value: "400" }, "400px", -1),
|
|
2187
2191
|
n[12] ||= E("option", { value: "500" }, "500px", -1),
|
|
2188
|
-
E("option",
|
|
2189
|
-
], 42,
|
|
2190
|
-
C.value === "custom" ? (s(), v("div",
|
|
2192
|
+
E("option", Ga, g(b(i).image.widthCustom), 1)
|
|
2193
|
+
], 42, Ua),
|
|
2194
|
+
C.value === "custom" ? (s(), v("div", Ka, [E("input", {
|
|
2191
2195
|
type: "number",
|
|
2192
|
-
class: T(b(
|
|
2193
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
2196
|
+
class: T(b(q)),
|
|
2197
|
+
value: typeof e.block.width == "number" ? e.block.width : Xa,
|
|
2194
2198
|
min: "20",
|
|
2195
2199
|
onInput: n[5] ||= (e) => O(e.target.value)
|
|
2196
|
-
}, null, 42,
|
|
2200
|
+
}, null, 42, qa), E("span", { class: T(b(K)) }, "px", 2)])) : y("", !0)
|
|
2197
2201
|
]),
|
|
2198
|
-
E("div",
|
|
2202
|
+
E("div", Ja, [E("label", { class: T(b(G)) }, g(b(i).title.align), 3), N(Z, {
|
|
2199
2203
|
options: [
|
|
2200
2204
|
{
|
|
2201
2205
|
value: "left",
|
|
@@ -2213,15 +2217,15 @@ var ma = {
|
|
|
2213
2217
|
"model-value": e.block.align,
|
|
2214
2218
|
"onUpdate:modelValue": n[6] ||= (e) => w("align", e)
|
|
2215
2219
|
}, null, 8, ["options", "model-value"])]),
|
|
2216
|
-
E("div",
|
|
2217
|
-
E("label", { class: T(b(
|
|
2218
|
-
N(
|
|
2220
|
+
E("div", Ya, [
|
|
2221
|
+
E("label", { class: T(b(G)) }, g(b(i).image.linkUrl), 3),
|
|
2222
|
+
N(Q, {
|
|
2219
2223
|
"model-value": e.block.linkUrl || "",
|
|
2220
2224
|
type: "url",
|
|
2221
2225
|
placeholder: b(i).image.imageUrlPlaceholder,
|
|
2222
2226
|
"onUpdate:modelValue": n[7] ||= (e) => w("linkUrl", e)
|
|
2223
2227
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2224
|
-
e.block.linkUrl ? (s(), S(
|
|
2228
|
+
e.block.linkUrl ? (s(), S(Y, {
|
|
2225
2229
|
key: 0,
|
|
2226
2230
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2227
2231
|
"model-value": e.block.linkOpenInNewTab ?? !1,
|
|
@@ -2231,11 +2235,11 @@ var ma = {
|
|
|
2231
2235
|
])
|
|
2232
2236
|
], 64));
|
|
2233
2237
|
}
|
|
2234
|
-
}),
|
|
2238
|
+
}), Qa = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, $a = { class: "tpl:flex tpl:items-center tpl:gap-2" }, eo = [
|
|
2235
2239
|
"value",
|
|
2236
2240
|
"placeholder",
|
|
2237
2241
|
"onInput"
|
|
2238
|
-
],
|
|
2242
|
+
], to = ["title", "onClick"], no = { class: "tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-x-3 tpl:gap-y-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, ro = { class: "tpl:flex tpl:items-center tpl:gap-2" }, io = ["value"], ao = { value: "" }, oo = ["value"], so = ["value"], co = /* @__PURE__ */ M({
|
|
2239
2243
|
__name: "MenuToolbar",
|
|
2240
2244
|
props: {
|
|
2241
2245
|
block: {},
|
|
@@ -2243,7 +2247,7 @@ var ma = {
|
|
|
2243
2247
|
},
|
|
2244
2248
|
emits: ["update"],
|
|
2245
2249
|
setup(e, { emit: t }) {
|
|
2246
|
-
let n = e, r = t, { t: i } =
|
|
2250
|
+
let n = e, r = t, { t: i } = H(), a = _(() => [
|
|
2247
2251
|
{
|
|
2248
2252
|
key: "openInNewTab",
|
|
2249
2253
|
label: i.menu.openInNewTab
|
|
@@ -2260,17 +2264,17 @@ var ma = {
|
|
|
2260
2264
|
{
|
|
2261
2265
|
value: "left",
|
|
2262
2266
|
label: i.title.alignLeft,
|
|
2263
|
-
icon:
|
|
2267
|
+
icon: Nt
|
|
2264
2268
|
},
|
|
2265
2269
|
{
|
|
2266
2270
|
value: "center",
|
|
2267
2271
|
label: i.title.alignCenter,
|
|
2268
|
-
icon:
|
|
2272
|
+
icon: At
|
|
2269
2273
|
},
|
|
2270
2274
|
{
|
|
2271
2275
|
value: "right",
|
|
2272
2276
|
label: i.title.alignRight,
|
|
2273
|
-
icon:
|
|
2277
|
+
icon: Pt
|
|
2274
2278
|
}
|
|
2275
2279
|
]);
|
|
2276
2280
|
function c(e, t) {
|
|
@@ -2278,7 +2282,7 @@ var ma = {
|
|
|
2278
2282
|
}
|
|
2279
2283
|
function u() {
|
|
2280
2284
|
let e = {
|
|
2281
|
-
id:
|
|
2285
|
+
id: z(),
|
|
2282
2286
|
text: "",
|
|
2283
2287
|
url: "",
|
|
2284
2288
|
openInNewTab: !1,
|
|
@@ -2298,26 +2302,26 @@ var ma = {
|
|
|
2298
2302
|
r("update", { items: n.block.items.filter((t) => t.id !== e) });
|
|
2299
2303
|
}
|
|
2300
2304
|
return (t, n) => (s(), v(A, null, [
|
|
2301
|
-
N(
|
|
2302
|
-
default: d(() => [E("div",
|
|
2305
|
+
N(X, { label: b(i).menu.items }, {
|
|
2306
|
+
default: d(() => [E("div", Qa, [(s(!0), v(A, null, l(e.block.items, (t) => (s(), v("div", {
|
|
2303
2307
|
key: t.id,
|
|
2304
2308
|
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"
|
|
2305
2309
|
}, [
|
|
2306
|
-
E("div",
|
|
2310
|
+
E("div", $a, [E("input", {
|
|
2307
2311
|
type: "text",
|
|
2308
|
-
class: T([b(
|
|
2312
|
+
class: T([b(W), "tpl:flex-1"]),
|
|
2309
2313
|
value: t.text,
|
|
2310
2314
|
placeholder: b(i).menu.text,
|
|
2311
2315
|
onInput: (e) => f(t.id, "text", e.target.value)
|
|
2312
|
-
}, null, 42,
|
|
2313
|
-
class: T(b(
|
|
2316
|
+
}, null, 42, eo), E("button", {
|
|
2317
|
+
class: T(b(Ht)),
|
|
2314
2318
|
title: b(i).menu.removeItem,
|
|
2315
2319
|
onClick: (e) => p(t.id)
|
|
2316
|
-
}, [N(b(
|
|
2320
|
+
}, [N(b($e), {
|
|
2317
2321
|
size: 14,
|
|
2318
2322
|
"stroke-width": 2
|
|
2319
|
-
})], 10,
|
|
2320
|
-
N(
|
|
2323
|
+
})], 10, to)]),
|
|
2324
|
+
N(Q, {
|
|
2321
2325
|
"model-value": t.url,
|
|
2322
2326
|
type: "url",
|
|
2323
2327
|
placeholder: b(i).menu.urlPlaceholder,
|
|
@@ -2327,7 +2331,7 @@ var ma = {
|
|
|
2327
2331
|
"placeholder",
|
|
2328
2332
|
"onUpdate:modelValue"
|
|
2329
2333
|
]),
|
|
2330
|
-
E("div",
|
|
2334
|
+
E("div", no, [(s(!0), v(A, null, l(a.value, (e) => (s(), S(Y, {
|
|
2331
2335
|
key: e.key,
|
|
2332
2336
|
"model-value": t[e.key],
|
|
2333
2337
|
label: e.label,
|
|
@@ -2337,33 +2341,33 @@ var ma = {
|
|
|
2337
2341
|
"label",
|
|
2338
2342
|
"onUpdate:modelValue"
|
|
2339
2343
|
]))), 128))]),
|
|
2340
|
-
E("div",
|
|
2344
|
+
E("div", ro, [E("label", { class: T([b(G), "tpl:!mb-0"]) }, g(b(i).menu.color), 3), N(J, {
|
|
2341
2345
|
"swatch-only": "",
|
|
2342
2346
|
"model-value": t.color || e.block.linkColor || e.block.color || "",
|
|
2343
2347
|
"onUpdate:modelValue": (e) => f(t.id, "color", e)
|
|
2344
2348
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2345
2349
|
]))), 128)), E("button", {
|
|
2346
|
-
class: T(b(
|
|
2350
|
+
class: T(b(Gt)),
|
|
2347
2351
|
onClick: u
|
|
2348
|
-
}, [N(b(
|
|
2352
|
+
}, [N(b(U), {
|
|
2349
2353
|
size: 14,
|
|
2350
2354
|
"stroke-width": 2
|
|
2351
2355
|
}), j(" " + g(b(i).menu.addItem), 1)], 2)])]),
|
|
2352
2356
|
_: 1
|
|
2353
2357
|
}, 8, ["label"]),
|
|
2354
|
-
N(
|
|
2358
|
+
N(X, { label: b(i).menu.fontFamily }, {
|
|
2355
2359
|
default: d(() => [E("select", {
|
|
2356
|
-
class: T(b(
|
|
2360
|
+
class: T(b(W)),
|
|
2357
2361
|
value: e.block.fontFamily || "",
|
|
2358
2362
|
onChange: n[0] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2359
|
-
}, [E("option",
|
|
2363
|
+
}, [E("option", ao, g(b(i).title.inheritFont), 1), (s(!0), v(A, null, l(e.fontFamilies, (e) => (s(), v("option", {
|
|
2360
2364
|
key: e.value,
|
|
2361
2365
|
value: e.value
|
|
2362
|
-
}, g(e.label), 9,
|
|
2366
|
+
}, g(e.label), 9, oo))), 128))], 42, io)]),
|
|
2363
2367
|
_: 1
|
|
2364
2368
|
}, 8, ["label"]),
|
|
2365
|
-
N(
|
|
2366
|
-
default: d(() => [N(
|
|
2369
|
+
N(X, { label: b(i).menu.fontSize }, {
|
|
2370
|
+
default: d(() => [N(Xt, {
|
|
2367
2371
|
"model-value": e.block.fontSize,
|
|
2368
2372
|
min: 8,
|
|
2369
2373
|
max: 48,
|
|
@@ -2372,46 +2376,46 @@ var ma = {
|
|
|
2372
2376
|
}, null, 8, ["model-value"])]),
|
|
2373
2377
|
_: 1
|
|
2374
2378
|
}, 8, ["label"]),
|
|
2375
|
-
N(
|
|
2376
|
-
default: d(() => [N(
|
|
2379
|
+
N(X, { label: b(i).menu.color }, {
|
|
2380
|
+
default: d(() => [N(J, {
|
|
2377
2381
|
"model-value": e.block.color ?? "",
|
|
2378
2382
|
"onUpdate:modelValue": n[2] ||= (e) => c("color", e || void 0)
|
|
2379
2383
|
}, null, 8, ["model-value"])]),
|
|
2380
2384
|
_: 1
|
|
2381
2385
|
}, 8, ["label"]),
|
|
2382
|
-
N(
|
|
2383
|
-
default: d(() => [N(
|
|
2386
|
+
N(X, { label: b(i).menu.linkColor }, {
|
|
2387
|
+
default: d(() => [N(J, {
|
|
2384
2388
|
"model-value": e.block.linkColor || e.block.color || "",
|
|
2385
2389
|
"onUpdate:modelValue": n[3] ||= (e) => c("linkColor", e || void 0)
|
|
2386
2390
|
}, null, 8, ["model-value"])]),
|
|
2387
2391
|
_: 1
|
|
2388
2392
|
}, 8, ["label"]),
|
|
2389
|
-
N(
|
|
2390
|
-
default: d(() => [N(
|
|
2393
|
+
N(X, { label: b(i).menu.textAlign }, {
|
|
2394
|
+
default: d(() => [N(Z, {
|
|
2391
2395
|
options: o.value,
|
|
2392
2396
|
"model-value": e.block.textAlign,
|
|
2393
2397
|
"onUpdate:modelValue": n[4] ||= (e) => c("textAlign", e)
|
|
2394
2398
|
}, null, 8, ["options", "model-value"])]),
|
|
2395
2399
|
_: 1
|
|
2396
2400
|
}, 8, ["label"]),
|
|
2397
|
-
N(
|
|
2401
|
+
N(X, { label: b(i).menu.separator }, {
|
|
2398
2402
|
default: d(() => [E("input", {
|
|
2399
2403
|
type: "text",
|
|
2400
|
-
class: T(b(
|
|
2404
|
+
class: T(b(W)),
|
|
2401
2405
|
value: e.block.separator,
|
|
2402
2406
|
onInput: n[5] ||= (e) => c("separator", e.target.value)
|
|
2403
|
-
}, null, 42,
|
|
2407
|
+
}, null, 42, so)]),
|
|
2404
2408
|
_: 1
|
|
2405
2409
|
}, 8, ["label"]),
|
|
2406
|
-
N(
|
|
2407
|
-
default: d(() => [N(
|
|
2410
|
+
N(X, { label: b(i).menu.separatorColor }, {
|
|
2411
|
+
default: d(() => [N(J, {
|
|
2408
2412
|
"model-value": e.block.separatorColor,
|
|
2409
2413
|
"onUpdate:modelValue": n[6] ||= (e) => c("separatorColor", e)
|
|
2410
2414
|
}, null, 8, ["model-value"])]),
|
|
2411
2415
|
_: 1
|
|
2412
2416
|
}, 8, ["label"]),
|
|
2413
|
-
N(
|
|
2414
|
-
default: d(() => [N(
|
|
2417
|
+
N(X, { label: b(i).menu.spacing }, {
|
|
2418
|
+
default: d(() => [N(Xt, {
|
|
2415
2419
|
"model-value": e.block.spacing,
|
|
2416
2420
|
min: 0,
|
|
2417
2421
|
max: 50,
|
|
@@ -2425,11 +2429,11 @@ var ma = {
|
|
|
2425
2429
|
});
|
|
2426
2430
|
//#endregion
|
|
2427
2431
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2428
|
-
function
|
|
2432
|
+
function lo(e) {
|
|
2429
2433
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2430
2434
|
}
|
|
2431
|
-
function
|
|
2432
|
-
let n =
|
|
2435
|
+
function uo(e, t) {
|
|
2436
|
+
let n = lo(t);
|
|
2433
2437
|
if (e.length === n) return e;
|
|
2434
2438
|
if (e.length < n) {
|
|
2435
2439
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2440,18 +2444,18 @@ function so(e, t) {
|
|
|
2440
2444
|
}
|
|
2441
2445
|
//#endregion
|
|
2442
2446
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2443
|
-
var
|
|
2447
|
+
var fo = { class: "tpl:mb-3.5" }, po = ["value"], mo = ["value"], ho = {
|
|
2444
2448
|
key: 0,
|
|
2445
2449
|
class: "tpl:mb-3.5"
|
|
2446
|
-
},
|
|
2450
|
+
}, go = { class: "tpl:mb-3.5" }, _o = { class: "tpl:flex tpl:items-stretch" }, vo = ["value"], yo = { class: "tpl:mb-3.5" }, bo = {
|
|
2447
2451
|
key: 0,
|
|
2448
2452
|
class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
|
|
2449
|
-
},
|
|
2453
|
+
}, xo = { class: "tpl:flex tpl:items-stretch" }, So = ["value"], Co = /* @__PURE__ */ M({
|
|
2450
2454
|
__name: "SectionToolbar",
|
|
2451
2455
|
props: { block: {} },
|
|
2452
2456
|
emits: ["update"],
|
|
2453
2457
|
setup(e, { emit: t }) {
|
|
2454
|
-
let n = e, r = t, { t: i } =
|
|
2458
|
+
let n = e, r = t, { t: i } = H(), a = _(() => [
|
|
2455
2459
|
{
|
|
2456
2460
|
value: "1",
|
|
2457
2461
|
label: i.section.column1
|
|
@@ -2474,7 +2478,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2474
2478
|
}
|
|
2475
2479
|
]);
|
|
2476
2480
|
function o(e) {
|
|
2477
|
-
let t = e.target.value, i =
|
|
2481
|
+
let t = e.target.value, i = uo(n.block.children, t);
|
|
2478
2482
|
r("update", {
|
|
2479
2483
|
columns: t,
|
|
2480
2484
|
children: i
|
|
@@ -2508,39 +2512,39 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2508
2512
|
f({ borderRadius: Number(e.target.value) });
|
|
2509
2513
|
}
|
|
2510
2514
|
return (t, n) => (s(), v(A, null, [
|
|
2511
|
-
E("div",
|
|
2512
|
-
class: T(b(
|
|
2515
|
+
E("div", fo, [E("label", { class: T(b(G)) }, g(b(i).section.columns), 3), E("select", {
|
|
2516
|
+
class: T(b(W)),
|
|
2513
2517
|
value: e.block.columns,
|
|
2514
2518
|
onChange: o
|
|
2515
2519
|
}, [(s(!0), v(A, null, l(a.value, (e) => (s(), v("option", {
|
|
2516
2520
|
key: e.value,
|
|
2517
2521
|
value: e.value
|
|
2518
|
-
}, g(e.label), 9,
|
|
2519
|
-
e.block.columns === "1" ? y("", !0) : (s(), v("div",
|
|
2522
|
+
}, g(e.label), 9, mo))), 128))], 42, po)]),
|
|
2523
|
+
e.block.columns === "1" ? y("", !0) : (s(), v("div", ho, [N(Y, {
|
|
2520
2524
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2521
2525
|
"model-value": e.block.stackOnMobile !== !1,
|
|
2522
2526
|
label: b(i).section.stackOnMobile,
|
|
2523
2527
|
"onUpdate:modelValue": n[0] ||= (e) => c(e)
|
|
2524
2528
|
}, null, 8, ["model-value", "label"])])),
|
|
2525
|
-
E("div",
|
|
2529
|
+
E("div", go, [E("label", { class: T(b(G)) }, g(b(i).section.borderRadius), 3), E("div", _o, [E("input", {
|
|
2526
2530
|
type: "number",
|
|
2527
|
-
class: T(b(
|
|
2531
|
+
class: T(b(q)),
|
|
2528
2532
|
value: e.block.borderRadius ?? 0,
|
|
2529
2533
|
min: "0",
|
|
2530
2534
|
max: "50",
|
|
2531
2535
|
onInput: u
|
|
2532
|
-
}, null, 42,
|
|
2533
|
-
E("div",
|
|
2536
|
+
}, null, 42, vo), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2537
|
+
E("div", yo, [N(Y, {
|
|
2534
2538
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2535
2539
|
"model-value": !!e.block.wrapper,
|
|
2536
2540
|
label: b(i).section.wrapperEnable,
|
|
2537
2541
|
"onUpdate:modelValue": n[1] ||= (e) => d(e)
|
|
2538
|
-
}, null, 8, ["model-value", "label"]), e.block.wrapper ? (s(), v("div",
|
|
2539
|
-
E("div", null, [E("label", { class: T(b(
|
|
2542
|
+
}, null, 8, ["model-value", "label"]), e.block.wrapper ? (s(), v("div", bo, [
|
|
2543
|
+
E("div", null, [E("label", { class: T(b(G)) }, g(b(i).blockSettings.color), 3), N(J, {
|
|
2540
2544
|
"model-value": e.block.wrapper.backgroundColor ?? "",
|
|
2541
2545
|
"onUpdate:modelValue": n[2] ||= (e) => f({ backgroundColor: e })
|
|
2542
2546
|
}, null, 8, ["model-value"])]),
|
|
2543
|
-
N(
|
|
2547
|
+
N(Si, {
|
|
2544
2548
|
label: b(i).blockSettings.padding,
|
|
2545
2549
|
"model-value": e.block.wrapper.padding ?? {
|
|
2546
2550
|
top: 0,
|
|
@@ -2550,29 +2554,29 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2550
2554
|
},
|
|
2551
2555
|
"onUpdate:modelValue": p
|
|
2552
2556
|
}, null, 8, ["label", "model-value"]),
|
|
2553
|
-
E("div", null, [E("label", { class: T(b(
|
|
2557
|
+
E("div", null, [E("label", { class: T(b(G)) }, g(b(i).section.borderRadius), 3), E("div", xo, [E("input", {
|
|
2554
2558
|
type: "number",
|
|
2555
|
-
class: T(b(
|
|
2559
|
+
class: T(b(q)),
|
|
2556
2560
|
value: e.block.wrapper.borderRadius ?? 0,
|
|
2557
2561
|
min: "0",
|
|
2558
2562
|
max: "50",
|
|
2559
2563
|
onInput: m
|
|
2560
|
-
}, null, 42,
|
|
2564
|
+
}, null, 42, So), E("span", { class: T(b(K)) }, "px", 2)])])
|
|
2561
2565
|
])) : y("", !0)])
|
|
2562
2566
|
], 64));
|
|
2563
2567
|
}
|
|
2564
|
-
}),
|
|
2568
|
+
}), wo = { class: "tpl:mb-3.5" }, To = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Eo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Do = ["value", "onChange"], Oo = ["value"], ko = ["title", "onClick"], Ao = { class: "tpl:mb-3.5" }, jo = ["value"], Mo = { value: "solid" }, No = { value: "outlined" }, Po = { value: "rounded" }, Fo = { value: "square" }, Io = { value: "circle" }, 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 = /* @__PURE__ */ M({
|
|
2565
2569
|
__name: "SocialToolbar",
|
|
2566
2570
|
props: { block: {} },
|
|
2567
2571
|
emits: ["update"],
|
|
2568
2572
|
setup(e, { emit: t }) {
|
|
2569
|
-
let n = e, r = t, { t: i } =
|
|
2573
|
+
let n = e, r = t, { t: i } = H();
|
|
2570
2574
|
function a(e, t) {
|
|
2571
2575
|
r("update", { [e]: t });
|
|
2572
2576
|
}
|
|
2573
2577
|
function o() {
|
|
2574
2578
|
let e = {
|
|
2575
|
-
id:
|
|
2579
|
+
id: z(),
|
|
2576
2580
|
platform: "facebook",
|
|
2577
2581
|
url: ""
|
|
2578
2582
|
};
|
|
@@ -2589,25 +2593,25 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2589
2593
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2590
2594
|
}
|
|
2591
2595
|
return (t, n) => (s(), v(A, null, [
|
|
2592
|
-
E("div",
|
|
2596
|
+
E("div", wo, [E("label", { class: T(b(G)) }, g(b(i).social.icons), 3), E("div", To, [(s(!0), v(A, null, l(e.block.icons, (e) => (s(), v("div", {
|
|
2593
2597
|
key: e.id,
|
|
2594
2598
|
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"
|
|
2595
|
-
}, [E("div",
|
|
2599
|
+
}, [E("div", Eo, [E("select", {
|
|
2596
2600
|
"data-testid": "social-platform-select",
|
|
2597
|
-
class: T([b(
|
|
2601
|
+
class: T([b(W), "tpl:flex-1"]),
|
|
2598
2602
|
value: e.platform,
|
|
2599
2603
|
onChange: (t) => c(e.id, "platform", t.target.value)
|
|
2600
|
-
}, [(s(!0), v(A, null, l(b(
|
|
2604
|
+
}, [(s(!0), v(A, null, l(b(Te), (e) => (s(), v("option", {
|
|
2601
2605
|
key: e,
|
|
2602
2606
|
value: e
|
|
2603
|
-
}, g(b(i).social.platforms[e]), 9,
|
|
2604
|
-
class: T(b(
|
|
2607
|
+
}, g(b(i).social.platforms[e]), 9, Oo))), 128))], 42, Do), E("button", {
|
|
2608
|
+
class: T(b(Ht)),
|
|
2605
2609
|
title: b(i).social.removeIcon,
|
|
2606
2610
|
onClick: (t) => u(e.id)
|
|
2607
|
-
}, [N(b(
|
|
2611
|
+
}, [N(b($e), {
|
|
2608
2612
|
size: 14,
|
|
2609
2613
|
"stroke-width": 2
|
|
2610
|
-
})], 10,
|
|
2614
|
+
})], 10, ko)]), N(Q, {
|
|
2611
2615
|
"model-value": e.url,
|
|
2612
2616
|
type: "url",
|
|
2613
2617
|
placeholder: b(i).social.urlPlaceholder,
|
|
@@ -2617,24 +2621,24 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2617
2621
|
"placeholder",
|
|
2618
2622
|
"onUpdate:modelValue"
|
|
2619
2623
|
])]))), 128)), E("button", {
|
|
2620
|
-
class: T(b(
|
|
2624
|
+
class: T(b(Gt)),
|
|
2621
2625
|
onClick: o
|
|
2622
|
-
}, [N(b(
|
|
2626
|
+
}, [N(b(U), {
|
|
2623
2627
|
size: 14,
|
|
2624
2628
|
"stroke-width": 2
|
|
2625
2629
|
}), j(" " + g(b(i).social.addIcon), 1)], 2)])]),
|
|
2626
|
-
E("div",
|
|
2627
|
-
class: T(b(
|
|
2630
|
+
E("div", Ao, [E("label", { class: T(b(G)) }, g(b(i).social.style), 3), E("select", {
|
|
2631
|
+
class: T(b(W)),
|
|
2628
2632
|
value: e.block.iconStyle,
|
|
2629
2633
|
onChange: n[0] ||= (e) => a("iconStyle", e.target.value)
|
|
2630
2634
|
}, [
|
|
2631
|
-
E("option",
|
|
2632
|
-
E("option",
|
|
2633
|
-
E("option",
|
|
2634
|
-
E("option",
|
|
2635
|
-
E("option",
|
|
2636
|
-
], 42,
|
|
2637
|
-
E("div",
|
|
2635
|
+
E("option", Mo, g(b(i).social.styleSolid), 1),
|
|
2636
|
+
E("option", No, g(b(i).social.styleOutlined), 1),
|
|
2637
|
+
E("option", Po, g(b(i).social.styleRounded), 1),
|
|
2638
|
+
E("option", Fo, g(b(i).social.styleSquare), 1),
|
|
2639
|
+
E("option", Io, g(b(i).social.styleCircle), 1)
|
|
2640
|
+
], 42, jo)]),
|
|
2641
|
+
E("div", Lo, [E("label", { class: T(b(G)) }, g(b(i).social.size), 3), N(Z, {
|
|
2638
2642
|
options: [
|
|
2639
2643
|
{
|
|
2640
2644
|
value: "small",
|
|
@@ -2652,30 +2656,30 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2652
2656
|
"model-value": e.block.iconSize,
|
|
2653
2657
|
"onUpdate:modelValue": n[1] ||= (e) => a("iconSize", e)
|
|
2654
2658
|
}, null, 8, ["options", "model-value"])]),
|
|
2655
|
-
E("div",
|
|
2659
|
+
E("div", Ro, [E("label", { class: T(b(G)) }, g(b(i).social.spacing), 3), E("div", zo, [E("input", {
|
|
2656
2660
|
type: "number",
|
|
2657
|
-
class: T(b(
|
|
2661
|
+
class: T(b(q)),
|
|
2658
2662
|
value: e.block.spacing,
|
|
2659
2663
|
min: "0",
|
|
2660
2664
|
max: "50",
|
|
2661
2665
|
onInput: n[2] ||= (e) => a("spacing", Number(e.target.value))
|
|
2662
|
-
}, null, 42,
|
|
2663
|
-
E("div",
|
|
2666
|
+
}, null, 42, Bo), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2667
|
+
E("div", Vo, [E("label", { class: T(b(G)) }, g(b(i).social.align), 3), N(Z, {
|
|
2664
2668
|
options: [
|
|
2665
2669
|
{
|
|
2666
2670
|
value: "left",
|
|
2667
2671
|
label: b(i).title.alignLeft,
|
|
2668
|
-
icon: b(
|
|
2672
|
+
icon: b(Nt)
|
|
2669
2673
|
},
|
|
2670
2674
|
{
|
|
2671
2675
|
value: "center",
|
|
2672
2676
|
label: b(i).title.alignCenter,
|
|
2673
|
-
icon: b(
|
|
2677
|
+
icon: b(At)
|
|
2674
2678
|
},
|
|
2675
2679
|
{
|
|
2676
2680
|
value: "right",
|
|
2677
2681
|
label: b(i).title.alignRight,
|
|
2678
|
-
icon: b(
|
|
2682
|
+
icon: b(Pt)
|
|
2679
2683
|
}
|
|
2680
2684
|
],
|
|
2681
2685
|
"model-value": e.block.align,
|
|
@@ -2683,22 +2687,22 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2683
2687
|
}, null, 8, ["options", "model-value"])])
|
|
2684
2688
|
], 64));
|
|
2685
2689
|
}
|
|
2686
|
-
}),
|
|
2690
|
+
}), Uo = { class: "tpl:mb-3.5" }, Wo = { class: "tpl:flex tpl:items-stretch" }, Go = ["value"], Ko = ["value"], qo = /* @__PURE__ */ M({
|
|
2687
2691
|
__name: "SpacerToolbar",
|
|
2688
2692
|
props: { block: {} },
|
|
2689
2693
|
emits: ["update"],
|
|
2690
2694
|
setup(e, { emit: t }) {
|
|
2691
|
-
let n = t, { t: r } =
|
|
2692
|
-
return (t, i) => (s(), v("div",
|
|
2693
|
-
E("label", { class: T(b(
|
|
2694
|
-
E("div",
|
|
2695
|
+
let n = t, { t: r } = H();
|
|
2696
|
+
return (t, i) => (s(), v("div", Uo, [
|
|
2697
|
+
E("label", { class: T(b(G)) }, g(b(r).spacer.height), 3),
|
|
2698
|
+
E("div", Wo, [E("input", {
|
|
2695
2699
|
type: "number",
|
|
2696
|
-
class: T(b(
|
|
2700
|
+
class: T(b(q)),
|
|
2697
2701
|
value: e.block.height,
|
|
2698
2702
|
min: "10",
|
|
2699
2703
|
max: "100",
|
|
2700
2704
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2701
|
-
}, null, 42,
|
|
2705
|
+
}, null, 42, Go), E("span", { class: T(b(K)) }, "px", 2)]),
|
|
2702
2706
|
E("input", {
|
|
2703
2707
|
type: "range",
|
|
2704
2708
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2706,13 +2710,13 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2706
2710
|
min: "10",
|
|
2707
2711
|
max: "100",
|
|
2708
2712
|
onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2709
|
-
}, null, 40,
|
|
2713
|
+
}, null, 40, Ko)
|
|
2710
2714
|
]));
|
|
2711
2715
|
}
|
|
2712
|
-
}),
|
|
2716
|
+
}), Jo = { class: "tpl:mb-3.5" }, Yo = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Xo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Zo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Qo = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, $o = ["disabled"], es = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ts = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ns = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, rs = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, is = ["disabled"], as = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, os = { class: "tpl:mb-3.5" }, ss = {
|
|
2713
2717
|
key: 0,
|
|
2714
2718
|
class: "tpl:mb-3.5"
|
|
2715
|
-
},
|
|
2719
|
+
}, cs = { class: "tpl:mb-3.5" }, ls = { class: "tpl:mb-3.5" }, us = { class: "tpl:flex tpl:items-stretch" }, ds = ["value"], fs = { class: "tpl:mb-3.5" }, ps = { class: "tpl:flex tpl:items-stretch" }, ms = ["value"], hs = { class: "tpl:mb-3.5" }, gs = ["value"], _s = { value: "" }, vs = ["value"], ys = { class: "tpl:mb-3.5" }, bs = { class: "tpl:flex tpl:items-stretch" }, xs = ["value"], Ss = { class: "tpl:mb-3.5" }, Cs = { class: "tpl:mb-3.5" }, ws = /* @__PURE__ */ M({
|
|
2716
2720
|
__name: "TableToolbar",
|
|
2717
2721
|
props: {
|
|
2718
2722
|
block: {},
|
|
@@ -2720,15 +2724,15 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2720
2724
|
},
|
|
2721
2725
|
emits: ["update"],
|
|
2722
2726
|
setup(e, { emit: t }) {
|
|
2723
|
-
let n = e, r = t, { t: i } =
|
|
2727
|
+
let n = e, r = t, { t: i } = H(), a = _(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
|
|
2724
2728
|
function o(e, t) {
|
|
2725
2729
|
r("update", { [e]: t });
|
|
2726
2730
|
}
|
|
2727
2731
|
function c() {
|
|
2728
2732
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2729
|
-
id:
|
|
2733
|
+
id: z(),
|
|
2730
2734
|
cells: Array.from({ length: e }, () => ({
|
|
2731
|
-
id:
|
|
2735
|
+
id: z(),
|
|
2732
2736
|
content: ""
|
|
2733
2737
|
}))
|
|
2734
2738
|
};
|
|
@@ -2741,7 +2745,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2741
2745
|
let e = n.block.rows.map((e) => ({
|
|
2742
2746
|
...e,
|
|
2743
2747
|
cells: [...e.cells, {
|
|
2744
|
-
id:
|
|
2748
|
+
id: z(),
|
|
2745
2749
|
content: ""
|
|
2746
2750
|
}]
|
|
2747
2751
|
}));
|
|
@@ -2755,50 +2759,50 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2755
2759
|
r("update", { rows: t });
|
|
2756
2760
|
}
|
|
2757
2761
|
return (t, n) => (s(), v(A, null, [
|
|
2758
|
-
E("div",
|
|
2762
|
+
E("div", Jo, [E("label", { class: T(b(G)) }, g(b(i).table.dimensions), 3), E("div", Yo, [E("div", Xo, [E("span", Zo, g(b(i).table.rows), 1), E("div", Qo, [
|
|
2759
2763
|
E("button", {
|
|
2760
2764
|
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",
|
|
2761
2765
|
disabled: e.block.rows.length <= 1,
|
|
2762
2766
|
onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2763
|
-
}, [N(b(
|
|
2767
|
+
}, [N(b(wt), {
|
|
2764
2768
|
size: 12,
|
|
2765
2769
|
"stroke-width": 2
|
|
2766
|
-
})], 8,
|
|
2767
|
-
E("span",
|
|
2770
|
+
})], 8, $o),
|
|
2771
|
+
E("span", es, g(e.block.rows.length), 1),
|
|
2768
2772
|
E("button", {
|
|
2769
2773
|
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)]",
|
|
2770
2774
|
onClick: c
|
|
2771
|
-
}, [N(b(
|
|
2775
|
+
}, [N(b(U), {
|
|
2772
2776
|
size: 12,
|
|
2773
2777
|
"stroke-width": 2
|
|
2774
2778
|
})])
|
|
2775
|
-
])]), E("div",
|
|
2779
|
+
])]), E("div", ts, [E("span", ns, g(b(i).table.columns), 1), E("div", rs, [
|
|
2776
2780
|
E("button", {
|
|
2777
2781
|
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",
|
|
2778
2782
|
disabled: a.value <= 1,
|
|
2779
2783
|
onClick: n[1] ||= (e) => f(a.value - 1)
|
|
2780
|
-
}, [N(b(
|
|
2784
|
+
}, [N(b(wt), {
|
|
2781
2785
|
size: 12,
|
|
2782
2786
|
"stroke-width": 2
|
|
2783
|
-
})], 8,
|
|
2784
|
-
E("span",
|
|
2787
|
+
})], 8, is),
|
|
2788
|
+
E("span", as, g(a.value), 1),
|
|
2785
2789
|
E("button", {
|
|
2786
2790
|
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)]",
|
|
2787
2791
|
onClick: d
|
|
2788
|
-
}, [N(b(
|
|
2792
|
+
}, [N(b(U), {
|
|
2789
2793
|
size: 12,
|
|
2790
2794
|
"stroke-width": 2
|
|
2791
2795
|
})])
|
|
2792
2796
|
])])])]),
|
|
2793
|
-
E("div",
|
|
2797
|
+
E("div", os, [N(Y, {
|
|
2794
2798
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
2795
2799
|
"model-value": e.block.hasHeaderRow,
|
|
2796
2800
|
label: b(i).table.hasHeaderRow,
|
|
2797
2801
|
"onUpdate:modelValue": n[2] ||= (e) => o("hasHeaderRow", e)
|
|
2798
2802
|
}, null, 8, ["model-value", "label"])]),
|
|
2799
|
-
e.block.hasHeaderRow ? (s(), v("div",
|
|
2803
|
+
e.block.hasHeaderRow ? (s(), v("div", ss, [E("label", { class: T(b(G)) }, g(b(i).table.headerBackgroundColor), 3), N(J, {
|
|
2800
2804
|
"model-value": e.block.headerBackgroundColor ?? "",
|
|
2801
|
-
"seed-color": b(
|
|
2805
|
+
"seed-color": b(Wt),
|
|
2802
2806
|
placeholder: b(i).table.noHeaderBg,
|
|
2803
2807
|
"onUpdate:modelValue": n[3] ||= (e) => o("headerBackgroundColor", e || null)
|
|
2804
2808
|
}, null, 8, [
|
|
@@ -2806,62 +2810,62 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2806
2810
|
"seed-color",
|
|
2807
2811
|
"placeholder"
|
|
2808
2812
|
])])) : y("", !0),
|
|
2809
|
-
E("div",
|
|
2813
|
+
E("div", cs, [E("label", { class: T(b(G)) }, g(b(i).table.borderColor), 3), N(J, {
|
|
2810
2814
|
"model-value": e.block.borderColor,
|
|
2811
2815
|
"onUpdate:modelValue": n[4] ||= (e) => o("borderColor", e)
|
|
2812
2816
|
}, null, 8, ["model-value"])]),
|
|
2813
|
-
E("div",
|
|
2817
|
+
E("div", ls, [E("label", { class: T(b(G)) }, g(b(i).table.borderWidth), 3), E("div", us, [E("input", {
|
|
2814
2818
|
type: "number",
|
|
2815
|
-
class: T(b(
|
|
2819
|
+
class: T(b(q)),
|
|
2816
2820
|
value: e.block.borderWidth,
|
|
2817
2821
|
min: "0",
|
|
2818
2822
|
max: "10",
|
|
2819
2823
|
onInput: n[5] ||= (e) => o("borderWidth", Number(e.target.value))
|
|
2820
|
-
}, null, 42,
|
|
2821
|
-
E("div",
|
|
2824
|
+
}, null, 42, ds), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2825
|
+
E("div", fs, [E("label", { class: T(b(G)) }, g(b(i).table.cellPadding), 3), E("div", ps, [E("input", {
|
|
2822
2826
|
type: "number",
|
|
2823
|
-
class: T(b(
|
|
2827
|
+
class: T(b(q)),
|
|
2824
2828
|
value: e.block.cellPadding,
|
|
2825
2829
|
min: "0",
|
|
2826
2830
|
max: "30",
|
|
2827
2831
|
onInput: n[6] ||= (e) => o("cellPadding", Number(e.target.value))
|
|
2828
|
-
}, null, 42,
|
|
2829
|
-
E("div",
|
|
2830
|
-
class: T(b(
|
|
2832
|
+
}, null, 42, ms), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2833
|
+
E("div", hs, [E("label", { class: T(b(G)) }, g(b(i).table.fontFamily), 3), E("select", {
|
|
2834
|
+
class: T(b(W)),
|
|
2831
2835
|
value: e.block.fontFamily || "",
|
|
2832
2836
|
onChange: n[7] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
2833
|
-
}, [E("option",
|
|
2837
|
+
}, [E("option", _s, g(b(i).title.inheritFont), 1), (s(!0), v(A, null, l(e.fontFamilies, (e) => (s(), v("option", {
|
|
2834
2838
|
key: e.value,
|
|
2835
2839
|
value: e.value
|
|
2836
|
-
}, g(e.label), 9,
|
|
2837
|
-
E("div",
|
|
2840
|
+
}, g(e.label), 9, vs))), 128))], 42, gs)]),
|
|
2841
|
+
E("div", ys, [E("label", { class: T(b(G)) }, g(b(i).table.fontSize), 3), E("div", bs, [E("input", {
|
|
2838
2842
|
type: "number",
|
|
2839
|
-
class: T(b(
|
|
2843
|
+
class: T(b(q)),
|
|
2840
2844
|
value: e.block.fontSize,
|
|
2841
2845
|
min: "10",
|
|
2842
2846
|
max: "32",
|
|
2843
2847
|
onInput: n[8] ||= (e) => o("fontSize", Number(e.target.value))
|
|
2844
|
-
}, null, 42,
|
|
2845
|
-
E("div",
|
|
2848
|
+
}, null, 42, xs), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2849
|
+
E("div", Ss, [E("label", { class: T(b(G)) }, g(b(i).table.color), 3), N(J, {
|
|
2846
2850
|
"model-value": e.block.color ?? "",
|
|
2847
2851
|
"onUpdate:modelValue": n[9] ||= (e) => o("color", e || void 0)
|
|
2848
2852
|
}, null, 8, ["model-value"])]),
|
|
2849
|
-
E("div",
|
|
2853
|
+
E("div", Cs, [E("label", { class: T(b(G)) }, g(b(i).table.textAlign), 3), N(Z, {
|
|
2850
2854
|
options: [
|
|
2851
2855
|
{
|
|
2852
2856
|
value: "left",
|
|
2853
2857
|
label: b(i).title.alignLeft,
|
|
2854
|
-
icon: b(
|
|
2858
|
+
icon: b(Nt)
|
|
2855
2859
|
},
|
|
2856
2860
|
{
|
|
2857
2861
|
value: "center",
|
|
2858
2862
|
label: b(i).title.alignCenter,
|
|
2859
|
-
icon: b(
|
|
2863
|
+
icon: b(At)
|
|
2860
2864
|
},
|
|
2861
2865
|
{
|
|
2862
2866
|
value: "right",
|
|
2863
2867
|
label: b(i).title.alignRight,
|
|
2864
|
-
icon: b(
|
|
2868
|
+
icon: b(Pt)
|
|
2865
2869
|
}
|
|
2866
2870
|
],
|
|
2867
2871
|
"model-value": e.block.textAlign,
|
|
@@ -2869,7 +2873,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2869
2873
|
}, null, 8, ["options", "model-value"])])
|
|
2870
2874
|
], 64));
|
|
2871
2875
|
}
|
|
2872
|
-
}),
|
|
2876
|
+
}), Ts = { class: "tpl:mb-3.5" }, Es = ["value"], Ds = { value: 1 }, Os = { value: 2 }, ks = { value: 3 }, As = { value: 4 }, js = { class: "tpl:mb-3.5" }, Ms = ["value"], Ns = { value: "" }, Ps = ["value"], Fs = { class: "tpl:mb-3.5" }, Is = { class: "tpl:mb-3.5" }, Ls = /* @__PURE__ */ M({
|
|
2873
2877
|
__name: "TitleToolbar",
|
|
2874
2878
|
props: {
|
|
2875
2879
|
block: {},
|
|
@@ -2877,49 +2881,49 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2877
2881
|
},
|
|
2878
2882
|
emits: ["update"],
|
|
2879
2883
|
setup(e, { emit: t }) {
|
|
2880
|
-
let n = t, { t: r } =
|
|
2884
|
+
let n = t, { t: r } = H();
|
|
2881
2885
|
function i(e, t) {
|
|
2882
2886
|
n("update", { [e]: t });
|
|
2883
2887
|
}
|
|
2884
2888
|
return (t, n) => (s(), v(A, null, [
|
|
2885
|
-
E("div",
|
|
2886
|
-
class: T(b(
|
|
2889
|
+
E("div", Ts, [E("label", { class: T(b(G)) }, g(b(r).title.level), 3), E("select", {
|
|
2890
|
+
class: T(b(W)),
|
|
2887
2891
|
value: e.block.level,
|
|
2888
2892
|
onChange: n[0] ||= (e) => i("level", Number(e.target.value))
|
|
2889
2893
|
}, [
|
|
2890
|
-
E("option",
|
|
2891
|
-
E("option",
|
|
2892
|
-
E("option",
|
|
2893
|
-
E("option",
|
|
2894
|
-
], 42,
|
|
2895
|
-
E("div",
|
|
2896
|
-
class: T(b(
|
|
2894
|
+
E("option", Ds, g(b(r).title.heading1), 1),
|
|
2895
|
+
E("option", Os, g(b(r).title.heading2), 1),
|
|
2896
|
+
E("option", ks, g(b(r).title.heading3), 1),
|
|
2897
|
+
E("option", As, g(b(r).title.heading4), 1)
|
|
2898
|
+
], 42, Es)]),
|
|
2899
|
+
E("div", js, [E("label", { class: T(b(G)) }, g(b(r).title.fontFamily), 3), E("select", {
|
|
2900
|
+
class: T(b(W)),
|
|
2897
2901
|
value: e.block.fontFamily || "",
|
|
2898
2902
|
onChange: n[1] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
2899
|
-
}, [E("option",
|
|
2903
|
+
}, [E("option", Ns, g(b(r).title.inheritFont), 1), (s(!0), v(A, null, l(e.fontFamilies, (e) => (s(), v("option", {
|
|
2900
2904
|
key: e.value,
|
|
2901
2905
|
value: e.value
|
|
2902
|
-
}, g(e.label), 9,
|
|
2903
|
-
E("div",
|
|
2906
|
+
}, g(e.label), 9, Ps))), 128))], 42, Ms)]),
|
|
2907
|
+
E("div", Fs, [E("label", { class: T(b(G)) }, g(b(r).title.color), 3), N(J, {
|
|
2904
2908
|
"model-value": e.block.color ?? "",
|
|
2905
2909
|
"onUpdate:modelValue": n[2] ||= (e) => i("color", e || void 0)
|
|
2906
2910
|
}, null, 8, ["model-value"])]),
|
|
2907
|
-
E("div",
|
|
2911
|
+
E("div", Is, [E("label", { class: T(b(G)) }, g(b(r).title.align), 3), N(Z, {
|
|
2908
2912
|
options: [
|
|
2909
2913
|
{
|
|
2910
2914
|
value: "left",
|
|
2911
2915
|
label: b(r).title.alignLeft,
|
|
2912
|
-
icon: b(
|
|
2916
|
+
icon: b(Nt)
|
|
2913
2917
|
},
|
|
2914
2918
|
{
|
|
2915
2919
|
value: "center",
|
|
2916
2920
|
label: b(r).title.alignCenter,
|
|
2917
|
-
icon: b(
|
|
2921
|
+
icon: b(At)
|
|
2918
2922
|
},
|
|
2919
2923
|
{
|
|
2920
2924
|
value: "right",
|
|
2921
2925
|
label: b(r).title.alignRight,
|
|
2922
|
-
icon: b(
|
|
2926
|
+
icon: b(Pt)
|
|
2923
2927
|
}
|
|
2924
2928
|
],
|
|
2925
2929
|
"model-value": e.block.textAlign,
|
|
@@ -2927,19 +2931,19 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2927
2931
|
}, null, 8, ["options", "model-value"])])
|
|
2928
2932
|
], 64));
|
|
2929
2933
|
}
|
|
2930
|
-
}),
|
|
2934
|
+
}), Rs = { class: "tpl:mb-3.5" }, zs = {
|
|
2931
2935
|
key: 0,
|
|
2932
2936
|
class: "tpl:mb-3.5"
|
|
2933
|
-
},
|
|
2937
|
+
}, Bs = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Vs = [
|
|
2934
2938
|
"value",
|
|
2935
2939
|
"placeholder",
|
|
2936
2940
|
"title"
|
|
2937
|
-
],
|
|
2941
|
+
], Hs = { class: "tpl:mb-3.5" }, Us = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Ws = { class: "tpl:mb-3.5" }, Gs = { class: "tpl:mb-3.5" }, Ks = ["value"], qs = { value: "full" }, Js = { class: "tpl:mb-3.5" }, Ys = /* @__PURE__ */ M({
|
|
2938
2942
|
__name: "VideoToolbar",
|
|
2939
2943
|
props: { block: {} },
|
|
2940
2944
|
emits: ["update"],
|
|
2941
2945
|
setup(e, { emit: t }) {
|
|
2942
|
-
let n = e, r = t, { t: i } =
|
|
2946
|
+
let n = e, r = t, { t: i } = H(), a = u(Re, null), o = u(lt, Xe.liquid), c = ge(), l = _(() => !!a), d = _(() => L(n.block.url, o)), f = p(!1), { start: m } = ae(() => {
|
|
2943
2947
|
f.value = !1;
|
|
2944
2948
|
}, 1e3, { immediate: !1 });
|
|
2945
2949
|
function h(e, t) {
|
|
@@ -2950,15 +2954,15 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2950
2954
|
c.alive && e && (h("thumbnailUrl", e.url), f.value = !0, m());
|
|
2951
2955
|
}
|
|
2952
2956
|
return (t, n) => (s(), v(A, null, [
|
|
2953
|
-
E("div",
|
|
2954
|
-
E("label", { class: T(b(
|
|
2955
|
-
N(
|
|
2957
|
+
E("div", Rs, [
|
|
2958
|
+
E("label", { class: T(b(G)) }, g(b(i).video.videoUrl), 3),
|
|
2959
|
+
N(Q, {
|
|
2956
2960
|
"model-value": e.block.url,
|
|
2957
2961
|
type: "url",
|
|
2958
2962
|
placeholder: b(i).video.videoUrlPlaceholder,
|
|
2959
2963
|
"onUpdate:modelValue": n[0] ||= (e) => h("url", e)
|
|
2960
2964
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2961
|
-
e.block.url ? (s(), S(
|
|
2965
|
+
e.block.url ? (s(), S(Y, {
|
|
2962
2966
|
key: 0,
|
|
2963
2967
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2964
2968
|
"model-value": e.block.openInNewTab ?? !1,
|
|
@@ -2966,17 +2970,17 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2966
2970
|
"onUpdate:modelValue": n[1] ||= (e) => h("openInNewTab", e)
|
|
2967
2971
|
}, null, 8, ["model-value", "label"])) : y("", !0)
|
|
2968
2972
|
]),
|
|
2969
|
-
d.value ? (s(), v("div",
|
|
2973
|
+
d.value ? (s(), v("div", zs, [E("label", { class: T(b(G)) }, [j(g(b(i).video.placeholderUrl) + " ", 1), E("span", Bs, g(b(i).video.optional), 1)], 2), E("input", {
|
|
2970
2974
|
type: "url",
|
|
2971
|
-
class: T(b(
|
|
2975
|
+
class: T(b(W)),
|
|
2972
2976
|
value: e.block.placeholderUrl || "",
|
|
2973
2977
|
placeholder: b(i).video.placeholderUrlPlaceholder,
|
|
2974
2978
|
title: b(i).video.placeholderUrlTooltip,
|
|
2975
2979
|
onInput: n[2] ||= (e) => h("placeholderUrl", e.target.value)
|
|
2976
|
-
}, null, 42,
|
|
2977
|
-
E("div",
|
|
2978
|
-
E("label", { class: T(b(
|
|
2979
|
-
N(
|
|
2980
|
+
}, null, 42, Vs)])) : y("", !0),
|
|
2981
|
+
E("div", Hs, [
|
|
2982
|
+
E("label", { class: T(b(G)) }, [j(g(b(i).video.customThumbnail) + " ", 1), E("span", Us, g(b(i).video.optional), 1)], 2),
|
|
2983
|
+
N(Q, {
|
|
2980
2984
|
"model-value": e.block.thumbnailUrl,
|
|
2981
2985
|
type: "url",
|
|
2982
2986
|
placeholder: b(i).video.thumbnailPlaceholder,
|
|
@@ -2996,28 +3000,28 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2996
3000
|
"background-color": "var(--tpl-bg)"
|
|
2997
3001
|
},
|
|
2998
3002
|
onClick: x
|
|
2999
|
-
}, [N(b(
|
|
3003
|
+
}, [N(b(mt), {
|
|
3000
3004
|
size: 14,
|
|
3001
3005
|
"stroke-width": 1.5
|
|
3002
3006
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
3003
3007
|
]),
|
|
3004
|
-
E("div",
|
|
3008
|
+
E("div", Ws, [E("label", { class: T(b(G)) }, g(b(i).video.altText), 3), N(Q, {
|
|
3005
3009
|
"model-value": e.block.alt,
|
|
3006
3010
|
type: "text",
|
|
3007
3011
|
placeholder: b(i).video.altTextPlaceholder,
|
|
3008
3012
|
"onUpdate:modelValue": n[4] ||= (e) => h("alt", e)
|
|
3009
3013
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
3010
|
-
E("div",
|
|
3011
|
-
class: T(b(
|
|
3014
|
+
E("div", Gs, [E("label", { class: T(b(G)) }, g(b(i).video.width), 3), E("select", {
|
|
3015
|
+
class: T(b(W)),
|
|
3012
3016
|
value: e.block.width,
|
|
3013
3017
|
onChange: n[5] ||= (e) => h("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
3014
3018
|
}, [
|
|
3015
|
-
E("option",
|
|
3019
|
+
E("option", qs, g(b(i).video.fullWidth), 1),
|
|
3016
3020
|
n[7] ||= E("option", { value: "300" }, "300px", -1),
|
|
3017
3021
|
n[8] ||= E("option", { value: "400" }, "400px", -1),
|
|
3018
3022
|
n[9] ||= E("option", { value: "500" }, "500px", -1)
|
|
3019
|
-
], 42,
|
|
3020
|
-
E("div",
|
|
3023
|
+
], 42, Ks)]),
|
|
3024
|
+
E("div", Js, [E("label", { class: T(b(G)) }, g(b(i).title.align), 3), N(Z, {
|
|
3021
3025
|
options: [
|
|
3022
3026
|
{
|
|
3023
3027
|
value: "left",
|
|
@@ -3037,7 +3041,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3037
3041
|
}, null, 8, ["options", "model-value"])])
|
|
3038
3042
|
], 64));
|
|
3039
3043
|
}
|
|
3040
|
-
}),
|
|
3044
|
+
}), Xs = ["aria-label"], Zs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Qs = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, $s = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ec = { class: "tpl:flex tpl:gap-1" }, tc = ["title"], nc = ["title"], rc = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ic = /*#__PURE__*/ ut(/* @__PURE__ */ M({
|
|
3041
3045
|
__name: "Toolbar",
|
|
3042
3046
|
props: { block: {} },
|
|
3043
3047
|
emits: [
|
|
@@ -3046,87 +3050,87 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3046
3050
|
"duplicate"
|
|
3047
3051
|
],
|
|
3048
3052
|
setup(e, { emit: t }) {
|
|
3049
|
-
let n = m(() => import("./CountdownToolbar-
|
|
3053
|
+
let n = m(() => import("./CountdownToolbar-C1bkSjUR.js")), r = e, i = t, { t: a } = H(), c = Ue(Ge, "Toolbar"), l = u(Be, []), d = _(() => r.block.type), f = _(() => je(r.block)), p = _(() => {
|
|
3050
3054
|
if (f.value) return l.find((e) => e.type === r.block.customType);
|
|
3051
|
-
}), h = _(() => f.value ? p.value?.name ?? r.block.customType :
|
|
3055
|
+
}), h = _(() => f.value ? p.value?.name ?? r.block.customType : de(d.value, a)), x = c.fonts;
|
|
3052
3056
|
function C(e) {
|
|
3053
3057
|
i("update", e);
|
|
3054
3058
|
}
|
|
3055
3059
|
return (t, r) => (s(), v("aside", {
|
|
3056
3060
|
"aria-label": b(a).landmarks.blockToolbar,
|
|
3057
3061
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
3058
|
-
}, [E("div",
|
|
3062
|
+
}, [E("div", Zs, [E("div", Qs, [b(Vt)[d.value] ? (s(), S(o(b(Vt)[d.value]), {
|
|
3059
3063
|
key: 0,
|
|
3060
3064
|
size: 16,
|
|
3061
3065
|
"stroke-width": 1.5
|
|
3062
|
-
})) : f.value ? (s(), S(b(
|
|
3066
|
+
})) : f.value ? (s(), S(b(Ze), {
|
|
3063
3067
|
key: 1,
|
|
3064
3068
|
size: 16,
|
|
3065
3069
|
"stroke-width": 1.5
|
|
3066
|
-
})) : y("", !0), E("h3",
|
|
3070
|
+
})) : y("", !0), E("h3", $s, g(h.value), 1)]), E("div", ec, [E("button", {
|
|
3067
3071
|
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)]",
|
|
3068
3072
|
title: b(a).toolbar.duplicate,
|
|
3069
3073
|
onClick: r[0] ||= (e) => i("duplicate")
|
|
3070
|
-
}, [N(b(
|
|
3074
|
+
}, [N(b(we), {
|
|
3071
3075
|
size: 14,
|
|
3072
3076
|
"stroke-width": 2
|
|
3073
|
-
})], 8,
|
|
3077
|
+
})], 8, tc), E("button", {
|
|
3074
3078
|
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)]",
|
|
3075
3079
|
title: b(a).toolbar.delete,
|
|
3076
3080
|
onClick: r[1] ||= (e) => i("delete")
|
|
3077
|
-
}, [N(b(
|
|
3081
|
+
}, [N(b(He), {
|
|
3078
3082
|
size: 14,
|
|
3079
3083
|
"stroke-width": 2
|
|
3080
|
-
})], 8,
|
|
3084
|
+
})], 8, nc)])]), E("div", rc, [f.value ? (s(), S(Ta, {
|
|
3081
3085
|
key: 0,
|
|
3082
3086
|
block: e.block,
|
|
3083
3087
|
onUpdateFieldValues: r[2] ||= (e) => i("update", { fieldValues: e }),
|
|
3084
3088
|
onUpdateDataSourceFetched: r[3] ||= (e) => i("update", { dataSourceFetched: e })
|
|
3085
|
-
}, null, 8, ["block"])) : d.value === "section" ? (s(), S(
|
|
3089
|
+
}, null, 8, ["block"])) : d.value === "section" ? (s(), S(Co, {
|
|
3086
3090
|
key: 1,
|
|
3087
3091
|
block: e.block,
|
|
3088
3092
|
onUpdate: C
|
|
3089
|
-
}, null, 8, ["block"])) : d.value === "title" ? (s(), S(
|
|
3093
|
+
}, null, 8, ["block"])) : d.value === "title" ? (s(), S(Ls, {
|
|
3090
3094
|
key: 2,
|
|
3091
3095
|
block: e.block,
|
|
3092
3096
|
"font-families": b(x),
|
|
3093
3097
|
onUpdate: C
|
|
3094
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (s(), v(A, { key: 3 }, [], 64)) : d.value === "image" ? (s(), S(
|
|
3098
|
+
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (s(), v(A, { key: 3 }, [], 64)) : d.value === "image" ? (s(), S(Za, {
|
|
3095
3099
|
key: 4,
|
|
3096
3100
|
block: e.block,
|
|
3097
3101
|
onUpdate: C
|
|
3098
|
-
}, null, 8, ["block"])) : d.value === "video" ? (s(), S(
|
|
3102
|
+
}, null, 8, ["block"])) : d.value === "video" ? (s(), S(Ys, {
|
|
3099
3103
|
key: 5,
|
|
3100
3104
|
block: e.block,
|
|
3101
3105
|
onUpdate: C
|
|
3102
|
-
}, null, 8, ["block"])) : d.value === "button" ? (s(), S(
|
|
3106
|
+
}, null, 8, ["block"])) : d.value === "button" ? (s(), S($r, {
|
|
3103
3107
|
key: 6,
|
|
3104
3108
|
block: e.block,
|
|
3105
3109
|
"font-families": b(x),
|
|
3106
3110
|
onUpdate: C
|
|
3107
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (s(), S(
|
|
3111
|
+
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (s(), S(ja, {
|
|
3108
3112
|
key: 7,
|
|
3109
3113
|
block: e.block,
|
|
3110
3114
|
onUpdate: C
|
|
3111
|
-
}, null, 8, ["block"])) : d.value === "social" ? (s(), S(
|
|
3115
|
+
}, null, 8, ["block"])) : d.value === "social" ? (s(), S(Ho, {
|
|
3112
3116
|
key: 8,
|
|
3113
3117
|
block: e.block,
|
|
3114
3118
|
onUpdate: C
|
|
3115
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (s(), S(
|
|
3119
|
+
}, null, 8, ["block"])) : d.value === "menu" ? (s(), S(co, {
|
|
3116
3120
|
key: 9,
|
|
3117
3121
|
block: e.block,
|
|
3118
3122
|
"font-families": b(x),
|
|
3119
3123
|
onUpdate: C
|
|
3120
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (s(), S(
|
|
3124
|
+
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (s(), S(ws, {
|
|
3121
3125
|
key: 10,
|
|
3122
3126
|
block: e.block,
|
|
3123
3127
|
"font-families": b(x),
|
|
3124
3128
|
onUpdate: C
|
|
3125
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (s(), S(
|
|
3129
|
+
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (s(), S(qo, {
|
|
3126
3130
|
key: 11,
|
|
3127
3131
|
block: e.block,
|
|
3128
3132
|
onUpdate: C
|
|
3129
|
-
}, null, 8, ["block"])) : d.value === "html" ? (s(), S(
|
|
3133
|
+
}, null, 8, ["block"])) : d.value === "html" ? (s(), S(Fa, {
|
|
3130
3134
|
key: 12,
|
|
3131
3135
|
block: e.block,
|
|
3132
3136
|
onUpdate: C
|
|
@@ -3135,52 +3139,52 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3135
3139
|
block: e.block,
|
|
3136
3140
|
"font-families": b(x),
|
|
3137
3141
|
onUpdate: C
|
|
3138
|
-
}, null, 8, ["block", "font-families"])) : y("", !0), N(
|
|
3142
|
+
}, null, 8, ["block", "font-families"])) : y("", !0), N(Ui, {
|
|
3139
3143
|
block: e.block,
|
|
3140
3144
|
"is-first-section": d.value === "paragraph",
|
|
3141
3145
|
onUpdate: C
|
|
3142
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
3146
|
+
}, null, 8, ["block", "is-first-section"])])], 8, Xs));
|
|
3143
3147
|
}
|
|
3144
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
3148
|
+
}), [["__scopeId", "data-v-2ac88283"]]), ac = ["aria-label"], oc = {
|
|
3145
3149
|
role: "tablist",
|
|
3146
3150
|
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"
|
|
3147
|
-
},
|
|
3151
|
+
}, sc = [
|
|
3148
3152
|
"aria-selected",
|
|
3149
3153
|
"aria-label",
|
|
3150
3154
|
"title"
|
|
3151
|
-
],
|
|
3155
|
+
], cc = { key: 0 }, lc = [
|
|
3152
3156
|
"aria-selected",
|
|
3153
3157
|
"aria-label",
|
|
3154
3158
|
"title"
|
|
3155
|
-
],
|
|
3159
|
+
], uc = { key: 0 }, dc = [
|
|
3156
3160
|
"aria-selected",
|
|
3157
3161
|
"aria-label",
|
|
3158
3162
|
"title"
|
|
3159
|
-
],
|
|
3163
|
+
], fc = { key: 0 }, pc = {
|
|
3160
3164
|
key: 1,
|
|
3161
3165
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
3162
|
-
},
|
|
3166
|
+
}, mc = {
|
|
3163
3167
|
key: 0,
|
|
3164
3168
|
id: "tpl-tabpanel-content",
|
|
3165
3169
|
role: "tabpanel",
|
|
3166
3170
|
"aria-labelledby": "tpl-tab-content",
|
|
3167
3171
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3168
|
-
},
|
|
3172
|
+
}, hc = {
|
|
3169
3173
|
key: 1,
|
|
3170
3174
|
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)]"
|
|
3171
|
-
},
|
|
3175
|
+
}, gc = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, _c = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, vc = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, yc = {
|
|
3172
3176
|
key: 1,
|
|
3173
3177
|
id: "tpl-tabpanel-settings",
|
|
3174
3178
|
role: "tabpanel",
|
|
3175
3179
|
"aria-labelledby": "tpl-tab-settings",
|
|
3176
3180
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3177
|
-
},
|
|
3181
|
+
}, bc = {
|
|
3178
3182
|
key: 2,
|
|
3179
3183
|
id: "tpl-tabpanel-issues",
|
|
3180
3184
|
role: "tabpanel",
|
|
3181
3185
|
"aria-labelledby": "tpl-tab-issues",
|
|
3182
3186
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3183
|
-
},
|
|
3187
|
+
}, xc = /* @__PURE__ */ M({
|
|
3184
3188
|
__name: "RightSidebar",
|
|
3185
3189
|
props: {
|
|
3186
3190
|
selectedBlock: {},
|
|
@@ -3194,7 +3198,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3194
3198
|
"update-settings"
|
|
3195
3199
|
],
|
|
3196
3200
|
setup(e, { emit: t }) {
|
|
3197
|
-
let n = m(() => import("./IssuesPanel-
|
|
3201
|
+
let n = m(() => import("./IssuesPanel-Csasylf_.js")), r = e, i = t, { t: a } = H(), o = p("content"), c = u(Ve, null), l = _(() => c !== null), d = _(() => c?.issues.value.length ?? 0);
|
|
3198
3202
|
function f(e) {
|
|
3199
3203
|
return o.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)]";
|
|
3200
3204
|
}
|
|
@@ -3210,7 +3214,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3210
3214
|
"aria-label": b(a).landmarks.rightSidebar,
|
|
3211
3215
|
class: T(["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"])
|
|
3212
3216
|
}, [
|
|
3213
|
-
E("div",
|
|
3217
|
+
E("div", oc, [
|
|
3214
3218
|
E("button", {
|
|
3215
3219
|
id: "tpl-tab-content",
|
|
3216
3220
|
role: "tab",
|
|
@@ -3221,10 +3225,10 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3221
3225
|
class: T(["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)]", f("content")]),
|
|
3222
3226
|
style: O(h("content")),
|
|
3223
3227
|
onClick: r[0] ||= (e) => o.value = "content"
|
|
3224
|
-
}, [N(b(
|
|
3228
|
+
}, [N(b(Ct), {
|
|
3225
3229
|
size: 14,
|
|
3226
3230
|
"stroke-width": 2
|
|
3227
|
-
}), o.value === "content" ? (s(), v("span",
|
|
3231
|
+
}), o.value === "content" ? (s(), v("span", cc, g(b(a).sidebar.content), 1)) : y("", !0)], 14, sc),
|
|
3228
3232
|
E("button", {
|
|
3229
3233
|
id: "tpl-tab-settings",
|
|
3230
3234
|
role: "tab",
|
|
@@ -3235,10 +3239,10 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3235
3239
|
class: T(["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)]", f("settings")]),
|
|
3236
3240
|
style: O(h("settings")),
|
|
3237
3241
|
onClick: r[1] ||= (e) => o.value = "settings"
|
|
3238
|
-
}, [N(b(
|
|
3242
|
+
}, [N(b(It), {
|
|
3239
3243
|
size: 14,
|
|
3240
3244
|
"stroke-width": 1.5
|
|
3241
|
-
}), o.value === "settings" ? (s(), v("span",
|
|
3245
|
+
}), o.value === "settings" ? (s(), v("span", uc, g(b(a).sidebar.settings), 1)) : y("", !0)], 14, lc),
|
|
3242
3246
|
l.value ? (s(), v("button", {
|
|
3243
3247
|
key: 0,
|
|
3244
3248
|
id: "tpl-tab-issues",
|
|
@@ -3251,64 +3255,64 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3251
3255
|
style: O(h("issues")),
|
|
3252
3256
|
onClick: r[2] ||= (e) => o.value = "issues"
|
|
3253
3257
|
}, [
|
|
3254
|
-
N(b(
|
|
3258
|
+
N(b(Rt), {
|
|
3255
3259
|
size: 14,
|
|
3256
3260
|
"stroke-width": 1.5
|
|
3257
3261
|
}),
|
|
3258
|
-
o.value === "issues" ? (s(), v("span",
|
|
3259
|
-
d.value > 0 ? (s(), v("span",
|
|
3260
|
-
], 14,
|
|
3262
|
+
o.value === "issues" ? (s(), v("span", fc, g(b(a).issues.panelTabLabel), 1)) : y("", !0),
|
|
3263
|
+
d.value > 0 ? (s(), v("span", pc, g(d.value), 1)) : y("", !0)
|
|
3264
|
+
], 14, dc)) : y("", !0)
|
|
3261
3265
|
]),
|
|
3262
|
-
o.value === "content" ? (s(), v("div",
|
|
3266
|
+
o.value === "content" ? (s(), v("div", mc, [e.selectedBlock ? (s(), S(ic, {
|
|
3263
3267
|
key: 0,
|
|
3264
3268
|
block: e.selectedBlock,
|
|
3265
3269
|
onUpdate: r[3] ||= (e) => i("update-block", e),
|
|
3266
3270
|
onDelete: r[4] ||= (e) => i("delete-block"),
|
|
3267
3271
|
onDuplicate: r[5] ||= (e) => i("duplicate-block")
|
|
3268
|
-
}, null, 8, ["block"])) : (s(), v("div",
|
|
3269
|
-
E("div",
|
|
3272
|
+
}, null, 8, ["block"])) : (s(), v("div", hc, [
|
|
3273
|
+
E("div", gc, [N(b(Tt), {
|
|
3270
3274
|
size: 40,
|
|
3271
3275
|
"stroke-width": 1.5
|
|
3272
3276
|
})]),
|
|
3273
|
-
E("h3",
|
|
3274
|
-
E("p",
|
|
3277
|
+
E("h3", _c, g(b(a).sidebar.noSelection), 1),
|
|
3278
|
+
E("p", vc, g(b(a).sidebar.noSelectionHint), 1)
|
|
3275
3279
|
]))])) : y("", !0),
|
|
3276
|
-
o.value === "settings" ? (s(), v("div",
|
|
3280
|
+
o.value === "settings" ? (s(), v("div", yc, [N(Cr, {
|
|
3277
3281
|
settings: e.settings,
|
|
3278
3282
|
onUpdate: r[6] ||= (e) => i("update-settings", e)
|
|
3279
3283
|
}, null, 8, ["settings"])])) : y("", !0),
|
|
3280
|
-
o.value === "issues" && l.value ? (s(), v("div",
|
|
3281
|
-
], 10,
|
|
3284
|
+
o.value === "issues" && l.value ? (s(), v("div", bc, [N(b(n))])) : y("", !0)
|
|
3285
|
+
], 10, ac));
|
|
3282
3286
|
}
|
|
3283
|
-
}),
|
|
3287
|
+
}), Sc = {
|
|
3284
3288
|
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)]",
|
|
3285
3289
|
style: { "z-index": "10001" },
|
|
3286
3290
|
role: "status",
|
|
3287
3291
|
"data-testid": "small-screen-notice"
|
|
3288
|
-
},
|
|
3292
|
+
}, Cc = { class: "tpl:text-[var(--tpl-text-dim)]" }, wc = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tc = { class: "tpl:m-0 tpl:max-w-sm tpl:text-sm tpl:leading-normal" }, Ec = /* @__PURE__ */ M({
|
|
3289
3293
|
__name: "SmallScreenNotice",
|
|
3290
3294
|
setup(e) {
|
|
3291
|
-
let { t } =
|
|
3292
|
-
return (e, n) => (s(), v("div",
|
|
3293
|
-
E("div",
|
|
3295
|
+
let { t } = H();
|
|
3296
|
+
return (e, n) => (s(), v("div", Sc, [
|
|
3297
|
+
E("div", Cc, [N(b(St), {
|
|
3294
3298
|
size: 48,
|
|
3295
3299
|
"stroke-width": 1.5
|
|
3296
3300
|
})]),
|
|
3297
|
-
E("h2",
|
|
3298
|
-
E("p",
|
|
3301
|
+
E("h2", wc, g(b(t).smallScreen.title), 1),
|
|
3302
|
+
E("p", Tc, g(b(t).smallScreen.message), 1)
|
|
3299
3303
|
]));
|
|
3300
3304
|
}
|
|
3301
|
-
}),
|
|
3305
|
+
}), Dc = ["aria-label"], Oc = [
|
|
3302
3306
|
"aria-checked",
|
|
3303
3307
|
"aria-label",
|
|
3304
3308
|
"title",
|
|
3305
3309
|
"onClick"
|
|
3306
|
-
],
|
|
3310
|
+
], kc = /* @__PURE__ */ M({
|
|
3307
3311
|
__name: "ViewportToggle",
|
|
3308
3312
|
props: { viewport: {} },
|
|
3309
3313
|
emits: ["change"],
|
|
3310
3314
|
setup(e, { emit: t }) {
|
|
3311
|
-
let n = e, r = t, { t: i } =
|
|
3315
|
+
let n = e, r = t, { t: i } = H(), a = _(() => [{
|
|
3312
3316
|
value: "desktop",
|
|
3313
3317
|
label: i.viewport.desktop
|
|
3314
3318
|
}, {
|
|
@@ -3345,26 +3349,26 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3345
3349
|
}),
|
|
3346
3350
|
title: t.label,
|
|
3347
3351
|
onClick: (e) => r("change", t.value)
|
|
3348
|
-
}, [t.value === "desktop" ? (s(), S(b(
|
|
3352
|
+
}, [t.value === "desktop" ? (s(), S(b(St), {
|
|
3349
3353
|
key: 0,
|
|
3350
3354
|
size: 18,
|
|
3351
3355
|
"stroke-width": 1.5
|
|
3352
|
-
})) : (s(), S(b(
|
|
3356
|
+
})) : (s(), S(b(Ot), {
|
|
3353
3357
|
key: 1,
|
|
3354
3358
|
size: 18,
|
|
3355
3359
|
"stroke-width": 1.5
|
|
3356
|
-
})), E("span", null, g(t.label), 1)], 12,
|
|
3360
|
+
})), E("span", null, g(t.label), 1)], 12, Oc))), 128))], 12, Dc));
|
|
3357
3361
|
}
|
|
3358
|
-
}),
|
|
3362
|
+
}), Ac = [
|
|
3359
3363
|
"aria-label",
|
|
3360
3364
|
"title",
|
|
3361
3365
|
"aria-pressed"
|
|
3362
|
-
],
|
|
3366
|
+
], jc = /*#__PURE__*/ ut(/* @__PURE__ */ M({
|
|
3363
3367
|
__name: "PreviewToggle",
|
|
3364
3368
|
props: { previewMode: { type: Boolean } },
|
|
3365
3369
|
emits: ["change"],
|
|
3366
3370
|
setup(e, { emit: t }) {
|
|
3367
|
-
let n = t, { t: r } =
|
|
3371
|
+
let n = t, { t: r } = H();
|
|
3368
3372
|
return (t, i) => (s(), v("button", {
|
|
3369
3373
|
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",
|
|
3370
3374
|
style: O({
|
|
@@ -3382,28 +3386,28 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3382
3386
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3383
3387
|
mode: "out-in"
|
|
3384
3388
|
}, {
|
|
3385
|
-
default: d(() => [e.previewMode ? (s(), S(b(
|
|
3389
|
+
default: d(() => [e.previewMode ? (s(), S(b(oe), {
|
|
3386
3390
|
key: "eye",
|
|
3387
3391
|
size: 18,
|
|
3388
3392
|
"stroke-width": 1.5
|
|
3389
|
-
})) : (s(), S(b(
|
|
3393
|
+
})) : (s(), S(b(ie), {
|
|
3390
3394
|
key: "eye-off",
|
|
3391
3395
|
size: 18,
|
|
3392
3396
|
"stroke-width": 1.5
|
|
3393
3397
|
}))]),
|
|
3394
3398
|
_: 1
|
|
3395
|
-
})], 12,
|
|
3399
|
+
})], 12, Ac));
|
|
3396
3400
|
}
|
|
3397
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3401
|
+
}), [["__scopeId", "data-v-af87d02a"]]), Mc = [
|
|
3398
3402
|
"aria-label",
|
|
3399
3403
|
"title",
|
|
3400
3404
|
"aria-pressed"
|
|
3401
|
-
],
|
|
3405
|
+
], Nc = /*#__PURE__*/ ut(/* @__PURE__ */ M({
|
|
3402
3406
|
__name: "DarkModeToggle",
|
|
3403
3407
|
props: { darkMode: { type: Boolean } },
|
|
3404
3408
|
emits: ["change"],
|
|
3405
3409
|
setup(e, { emit: t }) {
|
|
3406
|
-
let n = t, { t: r } =
|
|
3410
|
+
let n = t, { t: r } = H();
|
|
3407
3411
|
return (t, i) => (s(), v("button", {
|
|
3408
3412
|
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",
|
|
3409
3413
|
style: O({
|
|
@@ -3421,37 +3425,37 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3421
3425
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3422
3426
|
mode: "out-in"
|
|
3423
3427
|
}, {
|
|
3424
|
-
default: d(() => [e.darkMode ? (s(), S(b(
|
|
3428
|
+
default: d(() => [e.darkMode ? (s(), S(b(xt), {
|
|
3425
3429
|
key: "moon",
|
|
3426
3430
|
size: 18,
|
|
3427
3431
|
"stroke-width": 1.5
|
|
3428
|
-
})) : (s(), S(b(
|
|
3432
|
+
})) : (s(), S(b(Ft), {
|
|
3429
3433
|
key: "sun",
|
|
3430
3434
|
size: 18,
|
|
3431
3435
|
"stroke-width": 1.5
|
|
3432
3436
|
}))]),
|
|
3433
3437
|
_: 1
|
|
3434
|
-
})], 12,
|
|
3438
|
+
})], 12, Mc));
|
|
3435
3439
|
}
|
|
3436
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3440
|
+
}), [["__scopeId", "data-v-f8694f76"]]), Pc = {
|
|
3437
3441
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3438
3442
|
style: {
|
|
3439
3443
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3440
3444
|
"backdrop-filter": "blur(8px)",
|
|
3441
3445
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3442
3446
|
}
|
|
3443
|
-
},
|
|
3447
|
+
}, Fc = {
|
|
3444
3448
|
href: "https://github.com/templatical/sdk",
|
|
3445
3449
|
target: "_blank",
|
|
3446
3450
|
rel: "noopener noreferrer",
|
|
3447
3451
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3448
3452
|
style: { "text-decoration": "none" }
|
|
3449
|
-
},
|
|
3453
|
+
}, Ic = /* @__PURE__ */ M({
|
|
3450
3454
|
__name: "EditorFooter",
|
|
3451
3455
|
props: { positionClass: {} },
|
|
3452
3456
|
setup(e) {
|
|
3453
|
-
let { t } =
|
|
3454
|
-
return (n, r) => (s(), v("footer", { class: T(["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]) }, [E("div",
|
|
3457
|
+
let { t } = H();
|
|
3458
|
+
return (n, r) => (s(), v("footer", { class: T(["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]) }, [E("div", Pc, [
|
|
3455
3459
|
E("span", null, g(b(t).footer.poweredBy), 1),
|
|
3456
3460
|
r[0] ||= E("a", {
|
|
3457
3461
|
href: "https://templatical.com",
|
|
@@ -3466,32 +3470,32 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3466
3470
|
alt: ""
|
|
3467
3471
|
}), j(" Templatical ")], -1),
|
|
3468
3472
|
r[1] ||= E("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3469
|
-
E("a",
|
|
3473
|
+
E("a", Fc, g(b(t).footer.openSource), 1)
|
|
3470
3474
|
])], 2));
|
|
3471
3475
|
}
|
|
3472
|
-
}),
|
|
3476
|
+
}), Lc = ["aria-labelledby", "data-tpl-theme"], Rc = { 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" }, zc = ["id"], Bc = ["aria-label"], Vc = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, Hc = [
|
|
3473
3477
|
"id",
|
|
3474
3478
|
"placeholder",
|
|
3475
3479
|
"aria-label",
|
|
3476
3480
|
"aria-activedescendant"
|
|
3477
|
-
],
|
|
3481
|
+
], Uc = {
|
|
3478
3482
|
key: 0,
|
|
3479
3483
|
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",
|
|
3480
3484
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3481
|
-
},
|
|
3485
|
+
}, Wc = ["data-group-name", "onClick"], Gc = ["aria-label"], Kc = {
|
|
3482
3486
|
key: 0,
|
|
3483
3487
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3484
3488
|
"data-testid": "merge-tag-picker-empty"
|
|
3485
|
-
},
|
|
3489
|
+
}, qc = {
|
|
3486
3490
|
key: 1,
|
|
3487
3491
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3488
3492
|
"data-testid": "merge-tag-picker-empty"
|
|
3489
|
-
},
|
|
3493
|
+
}, Jc = [
|
|
3490
3494
|
"aria-expanded",
|
|
3491
3495
|
"data-group-name",
|
|
3492
3496
|
"data-group-collapsed",
|
|
3493
3497
|
"onClick"
|
|
3494
|
-
],
|
|
3498
|
+
], Yc = { class: "tpl:ml-1 tpl:font-normal" }, Xc = [
|
|
3495
3499
|
"id",
|
|
3496
3500
|
"aria-selected",
|
|
3497
3501
|
"data-selected",
|
|
@@ -3500,21 +3504,21 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3500
3504
|
"title",
|
|
3501
3505
|
"onMousemove",
|
|
3502
3506
|
"onClick"
|
|
3503
|
-
],
|
|
3507
|
+
], Zc = { class: "tpl:text-sm tpl:font-medium" }, Qc = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, $c = {
|
|
3504
3508
|
key: 0,
|
|
3505
3509
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3506
|
-
},
|
|
3510
|
+
}, el = "tpl-merge-tag-picker-list", tl = /* @__PURE__ */ M({
|
|
3507
3511
|
__name: "MergeTagPickerModal",
|
|
3508
3512
|
setup(e) {
|
|
3509
|
-
let t =
|
|
3513
|
+
let t = Ue(rt, "MergeTagPickerModal"), { t: n, format: i } = H(), a = u(it, null), o = u(We, null), f = p(""), m = te(f, 200), C = p(null), D = _(() => m.value.trim().length > 0), k = p(0), j = _(() => t.tags.value.some((e) => !!e.group)), M = p(/* @__PURE__ */ new Set());
|
|
3510
3514
|
function F(e) {
|
|
3511
3515
|
return M.value.has(e);
|
|
3512
3516
|
}
|
|
3513
|
-
function
|
|
3517
|
+
function ee(e) {
|
|
3514
3518
|
let t = new Set(M.value);
|
|
3515
3519
|
t.has(e) ? t.delete(e) : t.add(e), M.value = t, k.value = 0;
|
|
3516
3520
|
}
|
|
3517
|
-
let
|
|
3521
|
+
let I = _(() => {
|
|
3518
3522
|
let e = m.value.trim().toLowerCase();
|
|
3519
3523
|
return e ? t.tags.value.filter((t) => [
|
|
3520
3524
|
t.label,
|
|
@@ -3530,7 +3534,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3530
3534
|
}
|
|
3531
3535
|
return i;
|
|
3532
3536
|
}), R = _(() => {
|
|
3533
|
-
let e =
|
|
3537
|
+
let e = I.value;
|
|
3534
3538
|
if (!j.value || D.value) return e.map((e, t) => ({
|
|
3535
3539
|
kind: "tag",
|
|
3536
3540
|
tag: e,
|
|
@@ -3566,31 +3570,31 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3566
3570
|
function B(e) {
|
|
3567
3571
|
t.resolve(e);
|
|
3568
3572
|
}
|
|
3569
|
-
function
|
|
3573
|
+
function ne() {
|
|
3570
3574
|
t.resolve(null);
|
|
3571
3575
|
}
|
|
3572
|
-
function
|
|
3576
|
+
function re(e) {
|
|
3573
3577
|
if (z.value.length === 0) return;
|
|
3574
3578
|
let t = k.value + e;
|
|
3575
|
-
k.value = Math.max(0, Math.min(z.value.length - 1, t)),
|
|
3579
|
+
k.value = Math.max(0, Math.min(z.value.length - 1, t)), se();
|
|
3576
3580
|
}
|
|
3577
|
-
let
|
|
3578
|
-
function
|
|
3579
|
-
|
|
3581
|
+
let ie = p(null), ae = p({});
|
|
3582
|
+
function oe(e, t) {
|
|
3583
|
+
ae.value[e] = t ?? null;
|
|
3580
3584
|
}
|
|
3581
|
-
function
|
|
3585
|
+
function se() {
|
|
3582
3586
|
c(() => {
|
|
3583
|
-
let e =
|
|
3587
|
+
let e = ie.value;
|
|
3584
3588
|
e && e.querySelector(`[data-merge-tag-index="${k.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3585
3589
|
});
|
|
3586
3590
|
}
|
|
3587
|
-
function
|
|
3591
|
+
function ce(e) {
|
|
3588
3592
|
if (M.value.has(e)) {
|
|
3589
3593
|
let t = new Set(M.value);
|
|
3590
3594
|
t.delete(e), M.value = t;
|
|
3591
3595
|
}
|
|
3592
3596
|
c(() => {
|
|
3593
|
-
let t =
|
|
3597
|
+
let t = ie.value;
|
|
3594
3598
|
if (!t) return;
|
|
3595
3599
|
let n = 0, r = !1;
|
|
3596
3600
|
for (let i of Array.from(t.children)) {
|
|
@@ -3606,55 +3610,55 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3606
3610
|
});
|
|
3607
3611
|
});
|
|
3608
3612
|
}
|
|
3609
|
-
function
|
|
3610
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3611
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3613
|
+
function V(e) {
|
|
3614
|
+
if (e.key === "ArrowDown") e.preventDefault(), re(1);
|
|
3615
|
+
else if (e.key === "ArrowUp") e.preventDefault(), re(-1);
|
|
3612
3616
|
else if (e.key === "Enter") {
|
|
3613
3617
|
e.preventDefault();
|
|
3614
3618
|
let t = z.value[k.value];
|
|
3615
3619
|
t && B(t);
|
|
3616
3620
|
}
|
|
3617
3621
|
}
|
|
3618
|
-
function
|
|
3619
|
-
if (z.value.length !== 0) return `${
|
|
3622
|
+
function le() {
|
|
3623
|
+
if (z.value.length !== 0) return `${el}-opt-${k.value}`;
|
|
3620
3624
|
}
|
|
3621
|
-
function
|
|
3622
|
-
return `${
|
|
3625
|
+
function ue(e) {
|
|
3626
|
+
return `${el}-opt-${e}`;
|
|
3623
3627
|
}
|
|
3624
|
-
let
|
|
3625
|
-
return (e, c) => (s(), S(
|
|
3628
|
+
let de = _(() => t.tags.value.length === 0), fe = _(() => !de.value && I.value.length === 0), pe = _(() => j.value && L.value.length > 1 && !D.value);
|
|
3629
|
+
return (e, c) => (s(), S(Ce, {
|
|
3626
3630
|
visible: b(t).isOpen.value,
|
|
3627
|
-
onClose:
|
|
3628
|
-
onKeydown:
|
|
3631
|
+
onClose: ne,
|
|
3632
|
+
onKeydown: V
|
|
3629
3633
|
}, {
|
|
3630
3634
|
default: d(() => [E("div", {
|
|
3631
3635
|
role: "dialog",
|
|
3632
3636
|
"aria-modal": "true",
|
|
3633
|
-
"aria-labelledby": `${
|
|
3637
|
+
"aria-labelledby": `${el}-title`,
|
|
3634
3638
|
"data-tpl-theme": b(o),
|
|
3635
3639
|
"data-testid": "merge-tag-picker-modal",
|
|
3636
3640
|
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)]",
|
|
3637
3641
|
style: O(b(a))
|
|
3638
3642
|
}, [
|
|
3639
|
-
E("header",
|
|
3640
|
-
id: `${
|
|
3643
|
+
E("header", Rc, [E("h2", {
|
|
3644
|
+
id: `${el}-title`,
|
|
3641
3645
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3642
|
-
}, g(b(n).mergeTag.picker.title), 9,
|
|
3646
|
+
}, g(b(n).mergeTag.picker.title), 9, zc), E("button", {
|
|
3643
3647
|
type: "button",
|
|
3644
3648
|
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)]",
|
|
3645
3649
|
"aria-label": b(n).mergeTag.picker.close,
|
|
3646
3650
|
"data-testid": "merge-tag-picker-close",
|
|
3647
|
-
onClick:
|
|
3648
|
-
}, [N(b(
|
|
3651
|
+
onClick: ne
|
|
3652
|
+
}, [N(b($e), {
|
|
3649
3653
|
size: 16,
|
|
3650
3654
|
"stroke-width": 2
|
|
3651
|
-
})], 8,
|
|
3652
|
-
E("div",
|
|
3655
|
+
})], 8, Bc)]),
|
|
3656
|
+
E("div", Vc, [N(b(Lt), {
|
|
3653
3657
|
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)]",
|
|
3654
3658
|
size: 14,
|
|
3655
3659
|
"stroke-width": 2
|
|
3656
3660
|
}), r(E("input", {
|
|
3657
|
-
id: `${
|
|
3661
|
+
id: `${el}-search`,
|
|
3658
3662
|
ref_key: "searchInputRef",
|
|
3659
3663
|
ref: C,
|
|
3660
3664
|
"onUpdate:modelValue": c[0] ||= (e) => f.value = e,
|
|
@@ -3662,50 +3666,50 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3662
3666
|
class: "tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)]",
|
|
3663
3667
|
placeholder: b(n).mergeTag.picker.searchPlaceholder,
|
|
3664
3668
|
"aria-label": b(n).mergeTag.picker.searchAriaLabel,
|
|
3665
|
-
"aria-controls":
|
|
3666
|
-
"aria-activedescendant":
|
|
3669
|
+
"aria-controls": el,
|
|
3670
|
+
"aria-activedescendant": le(),
|
|
3667
3671
|
"data-testid": "merge-tag-picker-search",
|
|
3668
3672
|
onKeydown: c[1] ||= h(x(() => {}, ["prevent"]), ["enter"])
|
|
3669
|
-
}, null, 40,
|
|
3670
|
-
|
|
3673
|
+
}, null, 40, Hc), [[w, f.value]])]),
|
|
3674
|
+
pe.value ? (s(), v("div", Uc, [(s(!0), v(A, null, l(L.value, (e) => (s(), v("button", {
|
|
3671
3675
|
key: e,
|
|
3672
3676
|
type: "button",
|
|
3673
3677
|
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)]",
|
|
3674
3678
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3675
3679
|
"data-group-name": e,
|
|
3676
|
-
onClick: (t) =>
|
|
3677
|
-
}, g(e), 9,
|
|
3680
|
+
onClick: (t) => ce(e)
|
|
3681
|
+
}, g(e), 9, Wc))), 128))])) : y("", !0),
|
|
3678
3682
|
E("div", {
|
|
3679
|
-
id:
|
|
3683
|
+
id: el,
|
|
3680
3684
|
ref_key: "listRef",
|
|
3681
|
-
ref:
|
|
3685
|
+
ref: ie,
|
|
3682
3686
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3683
3687
|
role: "listbox",
|
|
3684
3688
|
"aria-label": b(n).mergeTag.picker.title,
|
|
3685
3689
|
"data-testid": "merge-tag-picker-list"
|
|
3686
|
-
}, [
|
|
3690
|
+
}, [de.value ? (s(), v("div", Kc, g(b(n).mergeTag.picker.empty), 1)) : fe.value ? (s(), v("div", qc, g(b(n).mergeTag.picker.noResults), 1)) : (s(!0), v(A, { key: 2 }, l(R.value, (e, t) => (s(), v(A, { key: t }, [e.kind === "header" ? (s(), v("button", {
|
|
3687
3691
|
key: 0,
|
|
3688
3692
|
ref_for: !0,
|
|
3689
|
-
ref: (t) =>
|
|
3693
|
+
ref: (t) => oe(e.group, t),
|
|
3690
3694
|
type: "button",
|
|
3691
3695
|
"aria-expanded": !F(e.group),
|
|
3692
|
-
"aria-controls":
|
|
3696
|
+
"aria-controls": el,
|
|
3693
3697
|
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)]",
|
|
3694
3698
|
"data-testid": "merge-tag-picker-group-header",
|
|
3695
3699
|
"data-group-name": e.group,
|
|
3696
3700
|
"data-group-collapsed": F(e.group) ? "true" : "false",
|
|
3697
|
-
onClick: (t) =>
|
|
3701
|
+
onClick: (t) => ee(e.group)
|
|
3698
3702
|
}, [
|
|
3699
|
-
N(b(
|
|
3703
|
+
N(b(Se), {
|
|
3700
3704
|
size: 12,
|
|
3701
3705
|
"stroke-width": 2,
|
|
3702
3706
|
class: T(["tpl:transition-transform", F(e.group) ? "tpl:-rotate-90" : ""])
|
|
3703
3707
|
}, null, 8, ["class"]),
|
|
3704
3708
|
E("span", null, g(e.group), 1),
|
|
3705
|
-
E("span",
|
|
3706
|
-
], 8,
|
|
3709
|
+
E("span", Yc, " (" + g(b(i)(b(n).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
3710
|
+
], 8, Jc)) : (s(), v("button", {
|
|
3707
3711
|
key: 1,
|
|
3708
|
-
id:
|
|
3712
|
+
id: ue(e.index),
|
|
3709
3713
|
type: "button",
|
|
3710
3714
|
role: "option",
|
|
3711
3715
|
"aria-selected": e.index === k.value,
|
|
@@ -3718,22 +3722,22 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3718
3722
|
onMousemove: (t) => k.value = e.index,
|
|
3719
3723
|
onClick: (t) => B(e.tag)
|
|
3720
3724
|
}, [
|
|
3721
|
-
E("span",
|
|
3722
|
-
E("span",
|
|
3723
|
-
e.tag.description ? (s(), v("span",
|
|
3724
|
-
], 42,
|
|
3725
|
-
], 12,
|
|
3725
|
+
E("span", Zc, g(e.tag.label), 1),
|
|
3726
|
+
E("span", Qc, g(e.tag.value), 1),
|
|
3727
|
+
e.tag.description ? (s(), v("span", $c, g(e.tag.description), 1)) : y("", !0)
|
|
3728
|
+
], 42, Xc))], 64))), 128))], 8, Gc)
|
|
3729
|
+
], 12, Lc)]),
|
|
3726
3730
|
_: 1
|
|
3727
3731
|
}, 8, ["visible"]));
|
|
3728
3732
|
}
|
|
3729
|
-
}),
|
|
3733
|
+
}), nl = ["data-logic-keyword"], rl = /* @__PURE__ */ M({
|
|
3730
3734
|
__name: "LogicTagBadge",
|
|
3731
3735
|
props: {
|
|
3732
3736
|
value: {},
|
|
3733
3737
|
syntax: {}
|
|
3734
3738
|
},
|
|
3735
3739
|
setup(e) {
|
|
3736
|
-
let t = e, n = _(() =>
|
|
3740
|
+
let t = e, n = _(() => ce(t.value, t.syntax)), r = _(() => Je(t.value, t.syntax));
|
|
3737
3741
|
return (e, t) => n.value ? (s(), v("span", {
|
|
3738
3742
|
key: 0,
|
|
3739
3743
|
class: "tpl:inline-flex tpl:flex-shrink-0 tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:leading-none tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
@@ -3743,22 +3747,22 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3743
3747
|
},
|
|
3744
3748
|
"data-testid": "merge-tag-logic-badge",
|
|
3745
3749
|
"data-logic-keyword": r.value
|
|
3746
|
-
}, g(r.value), 9,
|
|
3750
|
+
}, g(r.value), 9, nl)) : y("", !0);
|
|
3747
3751
|
}
|
|
3748
|
-
}),
|
|
3752
|
+
}), il = ["aria-labelledby", "data-tpl-theme"], al = { 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" }, ol = ["id"], sl = ["aria-label"], cl = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, ll = [
|
|
3749
3753
|
"id",
|
|
3750
3754
|
"placeholder",
|
|
3751
3755
|
"aria-label",
|
|
3752
3756
|
"aria-activedescendant"
|
|
3753
|
-
],
|
|
3757
|
+
], ul = ["aria-label"], dl = {
|
|
3754
3758
|
key: 0,
|
|
3755
3759
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3756
3760
|
"data-testid": "logic-picker-empty"
|
|
3757
|
-
},
|
|
3761
|
+
}, fl = {
|
|
3758
3762
|
key: 1,
|
|
3759
3763
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3760
3764
|
"data-testid": "logic-picker-empty"
|
|
3761
|
-
},
|
|
3765
|
+
}, pl = ["data-group-name"], ml = [
|
|
3762
3766
|
"id",
|
|
3763
3767
|
"aria-selected",
|
|
3764
3768
|
"data-selected",
|
|
@@ -3766,19 +3770,19 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3766
3770
|
"data-logic-kind",
|
|
3767
3771
|
"onMousemove",
|
|
3768
3772
|
"onClick"
|
|
3769
|
-
],
|
|
3773
|
+
], hl = { class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-between tpl:gap-2" }, gl = { class: "tpl:text-sm tpl:font-medium" }, _l = {
|
|
3770
3774
|
key: 0,
|
|
3771
3775
|
class: "tpl:flex tpl:items-center"
|
|
3772
|
-
},
|
|
3776
|
+
}, vl = {
|
|
3773
3777
|
key: 1,
|
|
3774
3778
|
class: "tpl:flex tpl:items-center tpl:gap-1"
|
|
3775
|
-
},
|
|
3779
|
+
}, yl = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, bl = {
|
|
3776
3780
|
key: 0,
|
|
3777
3781
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3778
|
-
},
|
|
3782
|
+
}, xl = "tpl-logic-picker-list", Sl = /* @__PURE__ */ M({
|
|
3779
3783
|
__name: "LogicTagPickerModal",
|
|
3780
3784
|
setup(e) {
|
|
3781
|
-
let t =
|
|
3785
|
+
let t = Ue(Le, "LogicTagPickerModal"), { t: n } = H(), i = u(lt, Xe.liquid), a = u(it, null), o = u(We, null), f = p(""), m = te(f, 200), C = p(null), D = _(() => m.value.trim().length > 0), k = p(0);
|
|
3782
3786
|
function j(e) {
|
|
3783
3787
|
let t = m.value.trim().toLowerCase();
|
|
3784
3788
|
return !t || e.filter(Boolean).join(" ").toLowerCase().includes(t);
|
|
@@ -3792,7 +3796,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3792
3796
|
e.before,
|
|
3793
3797
|
e.after,
|
|
3794
3798
|
e.description
|
|
3795
|
-
]))),
|
|
3799
|
+
]))), ee = _(() => [...F.value.map((e) => ({
|
|
3796
3800
|
kind: "pair",
|
|
3797
3801
|
pair: e,
|
|
3798
3802
|
group: e.group
|
|
@@ -3800,7 +3804,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3800
3804
|
kind: "tag",
|
|
3801
3805
|
tag: e,
|
|
3802
3806
|
group: e.group
|
|
3803
|
-
}))]),
|
|
3807
|
+
}))]), I = _(() => t.tags.value.some((e) => !!e.group) || t.pairs.value.some((e) => !!e.group));
|
|
3804
3808
|
function L(e) {
|
|
3805
3809
|
let t = n.logicTag.picker.otherGroup, r = /* @__PURE__ */ new Map(), i = [];
|
|
3806
3810
|
for (let n of e) {
|
|
@@ -3820,8 +3824,8 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3820
3824
|
pair: r.pair,
|
|
3821
3825
|
index: n
|
|
3822
3826
|
}), t.push(r.pair)), n++;
|
|
3823
|
-
}, i =
|
|
3824
|
-
if (D.value || !
|
|
3827
|
+
}, i = ee.value;
|
|
3828
|
+
if (D.value || !I.value) for (let e of i) r(e);
|
|
3825
3829
|
else for (let [t, n] of L(i)) {
|
|
3826
3830
|
e.push({
|
|
3827
3831
|
kind: "header",
|
|
@@ -3833,72 +3837,72 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3833
3837
|
rows: e,
|
|
3834
3838
|
items: t
|
|
3835
3839
|
};
|
|
3836
|
-
}), z = _(() => R.value.items), B = _(() => t.tags.value.length === 0 && t.pairs.value.length === 0),
|
|
3840
|
+
}), z = _(() => R.value.items), B = _(() => t.tags.value.length === 0 && t.pairs.value.length === 0), ne = _(() => !B.value && z.value.length === 0);
|
|
3837
3841
|
P(() => t.isOpen.value, (e) => {
|
|
3838
3842
|
e && (f.value = "", k.value = 0, c(() => C.value?.focus()));
|
|
3839
3843
|
}), P(z, (e) => {
|
|
3840
3844
|
k.value >= e.length && (k.value = Math.max(0, e.length - 1));
|
|
3841
3845
|
});
|
|
3842
|
-
let
|
|
3843
|
-
function
|
|
3846
|
+
let re = p(null);
|
|
3847
|
+
function ie(e) {
|
|
3844
3848
|
t.resolve(e);
|
|
3845
3849
|
}
|
|
3846
|
-
function
|
|
3850
|
+
function ae() {
|
|
3847
3851
|
t.resolve(null);
|
|
3848
3852
|
}
|
|
3849
|
-
function
|
|
3853
|
+
function oe(e) {
|
|
3850
3854
|
z.value.length !== 0 && (k.value = Math.max(0, Math.min(z.value.length - 1, k.value + e)), c(() => {
|
|
3851
|
-
|
|
3855
|
+
re.value?.querySelector(`[data-logic-index="${k.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3852
3856
|
}));
|
|
3853
3857
|
}
|
|
3854
|
-
function
|
|
3855
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3856
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3858
|
+
function se(e) {
|
|
3859
|
+
if (e.key === "ArrowDown") e.preventDefault(), oe(1);
|
|
3860
|
+
else if (e.key === "ArrowUp") e.preventDefault(), oe(-1);
|
|
3857
3861
|
else if (e.key === "Enter") {
|
|
3858
3862
|
e.preventDefault();
|
|
3859
3863
|
let t = z.value[k.value];
|
|
3860
|
-
t &&
|
|
3864
|
+
t && ie(t);
|
|
3861
3865
|
}
|
|
3862
3866
|
}
|
|
3863
|
-
function
|
|
3864
|
-
return `${
|
|
3867
|
+
function ce(e) {
|
|
3868
|
+
return `${xl}-opt-${e}`;
|
|
3865
3869
|
}
|
|
3866
|
-
function
|
|
3867
|
-
return z.value.length === 0 ? void 0 : `${
|
|
3870
|
+
function V() {
|
|
3871
|
+
return z.value.length === 0 ? void 0 : `${xl}-opt-${k.value}`;
|
|
3868
3872
|
}
|
|
3869
|
-
return (e, c) => (s(), S(
|
|
3873
|
+
return (e, c) => (s(), S(Ce, {
|
|
3870
3874
|
visible: b(t).isOpen.value,
|
|
3871
|
-
onClose:
|
|
3872
|
-
onKeydown:
|
|
3875
|
+
onClose: ae,
|
|
3876
|
+
onKeydown: se
|
|
3873
3877
|
}, {
|
|
3874
3878
|
default: d(() => [E("div", {
|
|
3875
3879
|
role: "dialog",
|
|
3876
3880
|
"aria-modal": "true",
|
|
3877
|
-
"aria-labelledby": `${
|
|
3881
|
+
"aria-labelledby": `${xl}-title`,
|
|
3878
3882
|
"data-tpl-theme": b(o),
|
|
3879
3883
|
"data-testid": "logic-picker-modal",
|
|
3880
3884
|
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)]",
|
|
3881
3885
|
style: O(b(a))
|
|
3882
3886
|
}, [
|
|
3883
|
-
E("header",
|
|
3884
|
-
id: `${
|
|
3887
|
+
E("header", al, [E("h2", {
|
|
3888
|
+
id: `${xl}-title`,
|
|
3885
3889
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3886
|
-
}, g(b(n).logicTag.picker.title), 9,
|
|
3890
|
+
}, g(b(n).logicTag.picker.title), 9, ol), E("button", {
|
|
3887
3891
|
type: "button",
|
|
3888
3892
|
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)]",
|
|
3889
3893
|
"aria-label": b(n).logicTag.picker.close,
|
|
3890
3894
|
"data-testid": "logic-picker-close",
|
|
3891
|
-
onClick:
|
|
3892
|
-
}, [N(b(
|
|
3895
|
+
onClick: ae
|
|
3896
|
+
}, [N(b($e), {
|
|
3893
3897
|
size: 16,
|
|
3894
3898
|
"stroke-width": 2
|
|
3895
|
-
})], 8,
|
|
3896
|
-
E("div",
|
|
3899
|
+
})], 8, sl)]),
|
|
3900
|
+
E("div", cl, [N(b(Lt), {
|
|
3897
3901
|
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)]",
|
|
3898
3902
|
size: 14,
|
|
3899
3903
|
"stroke-width": 2
|
|
3900
3904
|
}), r(E("input", {
|
|
3901
|
-
id: `${
|
|
3905
|
+
id: `${xl}-search`,
|
|
3902
3906
|
ref_key: "searchInputRef",
|
|
3903
3907
|
ref: C,
|
|
3904
3908
|
"onUpdate:modelValue": c[0] ||= (e) => f.value = e,
|
|
@@ -3906,27 +3910,27 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3906
3910
|
class: "tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)]",
|
|
3907
3911
|
placeholder: b(n).logicTag.picker.searchPlaceholder,
|
|
3908
3912
|
"aria-label": b(n).logicTag.picker.searchAriaLabel,
|
|
3909
|
-
"aria-controls":
|
|
3910
|
-
"aria-activedescendant":
|
|
3913
|
+
"aria-controls": xl,
|
|
3914
|
+
"aria-activedescendant": V(),
|
|
3911
3915
|
"data-testid": "logic-picker-search",
|
|
3912
3916
|
onKeydown: c[1] ||= h(x(() => {}, ["prevent"]), ["enter"])
|
|
3913
|
-
}, null, 40,
|
|
3917
|
+
}, null, 40, ll), [[w, f.value]])]),
|
|
3914
3918
|
E("div", {
|
|
3915
|
-
id:
|
|
3919
|
+
id: xl,
|
|
3916
3920
|
ref_key: "listRef",
|
|
3917
|
-
ref:
|
|
3921
|
+
ref: re,
|
|
3918
3922
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3919
3923
|
role: "listbox",
|
|
3920
3924
|
"aria-label": b(n).logicTag.picker.title,
|
|
3921
3925
|
"data-testid": "logic-picker-list"
|
|
3922
|
-
}, [B.value ? (s(), v("div",
|
|
3926
|
+
}, [B.value ? (s(), v("div", dl, g(b(n).logicTag.picker.empty), 1)) : ne.value ? (s(), v("div", fl, g(b(n).logicTag.picker.noResults), 1)) : (s(!0), v(A, { key: 2 }, l(R.value.rows, (e, t) => (s(), v(A, { key: t }, [e.kind === "header" ? (s(), v("div", {
|
|
3923
3927
|
key: 0,
|
|
3924
3928
|
class: "tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]",
|
|
3925
3929
|
"data-testid": "logic-picker-header",
|
|
3926
3930
|
"data-group-name": e.label
|
|
3927
|
-
}, g(e.label), 9,
|
|
3931
|
+
}, g(e.label), 9, pl)) : (s(), v("button", {
|
|
3928
3932
|
key: 1,
|
|
3929
|
-
id:
|
|
3933
|
+
id: ce(e.index),
|
|
3930
3934
|
type: "button",
|
|
3931
3935
|
role: "option",
|
|
3932
3936
|
"aria-selected": e.index === k.value,
|
|
@@ -3936,31 +3940,31 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3936
3940
|
class: T(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === k.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3937
3941
|
"data-testid": "logic-picker-item",
|
|
3938
3942
|
onMousemove: (t) => k.value = e.index,
|
|
3939
|
-
onClick: (t) =>
|
|
3943
|
+
onClick: (t) => ie(e.kind === "tag" ? e.tag : e.pair)
|
|
3940
3944
|
}, [
|
|
3941
|
-
E("span",
|
|
3945
|
+
E("span", hl, [E("span", gl, g(e.kind === "tag" ? e.tag.label : e.pair.label), 1), e.kind === "tag" ? (s(), v("span", _l, [N(rl, {
|
|
3942
3946
|
value: e.tag.value,
|
|
3943
3947
|
syntax: b(i)
|
|
3944
|
-
}, null, 8, ["value", "syntax"])])) : (s(), v("span",
|
|
3945
|
-
N(
|
|
3948
|
+
}, null, 8, ["value", "syntax"])])) : (s(), v("span", vl, [
|
|
3949
|
+
N(rl, {
|
|
3946
3950
|
value: e.pair.before,
|
|
3947
3951
|
syntax: b(i)
|
|
3948
3952
|
}, null, 8, ["value", "syntax"]),
|
|
3949
3953
|
c[2] ||= E("span", { class: "tpl:text-[var(--tpl-text-dim)]" }, "…", -1),
|
|
3950
|
-
N(
|
|
3954
|
+
N(rl, {
|
|
3951
3955
|
value: e.pair.after,
|
|
3952
3956
|
syntax: b(i)
|
|
3953
3957
|
}, null, 8, ["value", "syntax"])
|
|
3954
3958
|
]))]),
|
|
3955
|
-
E("span",
|
|
3956
|
-
(e.kind === "tag" ? e.tag.description : e.pair.description) ? (s(), v("span",
|
|
3957
|
-
], 42,
|
|
3958
|
-
], 12,
|
|
3959
|
+
E("span", yl, g(e.kind === "tag" ? e.tag.value : `${e.pair.before} … ${e.pair.after}`), 1),
|
|
3960
|
+
(e.kind === "tag" ? e.tag.description : e.pair.description) ? (s(), v("span", bl, g(e.kind === "tag" ? e.tag.description : e.pair.description), 1)) : y("", !0)
|
|
3961
|
+
], 42, ml))], 64))), 128))], 8, ul)
|
|
3962
|
+
], 12, il)]),
|
|
3959
3963
|
_: 1
|
|
3960
3964
|
}, 8, ["visible"]));
|
|
3961
3965
|
}
|
|
3962
3966
|
});
|
|
3963
3967
|
//#endregion
|
|
3964
|
-
export {
|
|
3968
|
+
export { jc as a, xc as c, ln as d, Zt as f, Nc as i, bn as l, tl as n, kc as o, Ic as r, Ec as s, Sl as t, un as u };
|
|
3965
3969
|
|
|
3966
|
-
//# sourceMappingURL=styles-
|
|
3970
|
+
//# sourceMappingURL=styles-DHSmjlpX.js.map
|