@templatical/editor 0.17.1 → 0.19.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-LxCHMdcj.js → AiChatSidebar-DAQTFuvi.js} +2 -2
- package/dist/{AiFeatureMenu-Cr8pLXMj.js → AiFeatureMenu-aFSO20PR.js} +3 -3
- package/dist/{BlockIssueBadge-BQ1yB1me.js → BlockIssueBadge-BQmq1bxn.js} +2 -2
- package/dist/{CloudEditor-qzoNS8K4.js → CloudEditor-D0K-m1GA.js} +15 -13
- package/dist/{CollaboratorBar-BkfR0CyD.js → CollaboratorBar-CJO3l6Dt.js} +2 -2
- package/dist/ColorPicker-BsgpTJqK.js +552 -0
- package/dist/{CommentsSidebar-Cl93TN96.js → CommentsSidebar-BYMVucZh.js} +4 -4
- package/dist/{CountdownBlock-DbXfzwae.js → CountdownBlock-Bn5w7C-p.js} +1 -1
- package/dist/{CountdownToolbar-BqaMWRyB.js → CountdownToolbar-PJI3ffi1.js} +3 -3
- package/dist/{DesignReferenceSidebar-jVrdS8wW.js → DesignReferenceSidebar-QfAV8XT9.js} +13 -14
- package/dist/{IssuesPanel-Bq3yXg6M.js → IssuesPanel-CTjRgz8w.js} +2 -2
- package/dist/{ModuleBrowserModal-XEHfEO0O.js → ModuleBrowserModal-BNalLx0k.js} +7 -7
- package/dist/{ModulePreviewCanvas-BM8XUgbc.js → ModulePreviewCanvas-BwObwisa.js} +2 -2
- package/dist/{NumberWithSuffix-9FG7mNnn.js → NumberWithSuffix-D3BKz66W.js} +1 -1
- package/dist/{ParagraphEditor-Cs47wU1V.js → ParagraphEditor-Cf75UfSo.js} +42 -42
- package/dist/{RichTextEditorContent-DCzmVeyb.js → RichTextEditorContent-MdaLz6Q3.js} +5 -5
- package/dist/{SaveModuleDialog-BgOS9vCQ.js → SaveModuleDialog-MTjwiF9D.js} +6 -6
- package/dist/{SnapshotHistory-CLfYzwv9.js → SnapshotHistory-C_Y1LzAY.js} +4 -4
- package/dist/{TemplateScoringPanel-CMrfa9Rd.js → TemplateScoringPanel-DikuKc6i.js} +3 -3
- package/dist/{TestEmailModal-DTLfATNt.js → TestEmailModal-BW8aTtzf.js} +3 -3
- package/dist/{TitleEditor-Bq9S0C8Z.js → TitleEditor-CCUkbRN0.js} +7 -7
- package/dist/{TplModal-BW0FAtYe.js → TplModal-DoOwUKlT.js} +3 -3
- package/dist/{blockTypeIcons-CvSfLeyV.js → blockTypeIcons-BlPKjD7M.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-CSl--oWR.js → ca-DbWoy4rG.js} +2 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B0zH66nO.js → AiFeatureMenu-RwJiaPXZ.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-B0zH66nO.js.map → AiFeatureMenu-RwJiaPXZ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-yD4pKsU9.js → BlockIssueBadge-DM-TDKbr.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-yD4pKsU9.js.map → BlockIssueBadge-DM-TDKbr.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Da-aSmw5.js → CloudEditor-Dufl354p.js} +132 -130
- package/dist/cdn/chunks/CloudEditor-Dufl354p.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DixaFis-.js → CollaboratorBar-xsU20iPl.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-DixaFis-.js.map → CollaboratorBar-xsU20iPl.js.map} +1 -1
- package/dist/{ColorPicker-DfzDyNKe.js → cdn/chunks/ColorPicker-y_obnw4o.js} +234 -157
- package/dist/cdn/chunks/ColorPicker-y_obnw4o.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-jgBPbI1p.js → CountdownBlock-sHsRMe1q.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-jgBPbI1p.js.map → CountdownBlock-sHsRMe1q.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DrmZwvIH.js → CountdownToolbar-Ckc_jEi-.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-DrmZwvIH.js.map → CountdownToolbar-Ckc_jEi-.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CpyhXg9M.js → IssuesPanel-DF5Ajuna.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-CpyhXg9M.js.map → IssuesPanel-DF5Ajuna.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DPQLFTti.js → ModuleBrowserModal-DG4AVFjH.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-DPQLFTti.js.map → ModuleBrowserModal-DG4AVFjH.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Csc6M0RA.js → ModulePreviewCanvas-Bc_PcJuc.js} +24 -24
- package/dist/cdn/chunks/{ModulePreviewCanvas-Csc6M0RA.js.map → ModulePreviewCanvas-Bc_PcJuc.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-YmcsBmCd.js → NumberWithSuffix-8fOO-LC_.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-YmcsBmCd.js.map → NumberWithSuffix-8fOO-LC_.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DR5AcHB0.js → ParagraphEditor-BkafKSju.js} +107 -107
- package/dist/cdn/chunks/{ParagraphEditor-DR5AcHB0.js.map → ParagraphEditor-BkafKSju.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-52c2EuCT.js → RichTextEditorContent-BthhzOZS.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-52c2EuCT.js.map → RichTextEditorContent-BthhzOZS.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-dpRlVrrQ.js → SaveModuleDialog-DhsfYf2n.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-dpRlVrrQ.js.map → SaveModuleDialog-DhsfYf2n.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DtQTPAg3.js → TitleEditor-DLv9cXba.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-DtQTPAg3.js.map → TitleEditor-DLv9cXba.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-B0ktHdUG.js → blockTypeIcons-B0uibGX7.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-B0ktHdUG.js.map → blockTypeIcons-B0uibGX7.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CSl--oWR.js → ca-DbWoy4rG.js} +3 -2
- package/dist/cdn/chunks/{ca-CSl--oWR.js.map → ca-DbWoy4rG.js.map} +1 -1
- package/dist/cdn/chunks/{de-ZaffrKDP.js → de-CgGOnerg.js} +3 -2
- package/dist/cdn/chunks/{de-ZaffrKDP.js.map → de-CgGOnerg.js.map} +1 -1
- package/dist/cdn/chunks/{en-CHuXeJDt.js → en-DrUV9xth.js} +3 -2
- package/dist/cdn/chunks/{en-CHuXeJDt.js.map → en-DrUV9xth.js.map} +1 -1
- package/dist/{es-CaC8VQjO.js → cdn/chunks/es-DwbKjU7q.js} +4 -1
- package/dist/cdn/chunks/{es-CaC8VQjO.js.map → es-DwbKjU7q.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CiewgCtw.js → extensions-DLHvZ0UH.js} +19 -19
- package/dist/cdn/chunks/{extensions-CiewgCtw.js.map → extensions-DLHvZ0UH.js.map} +1 -1
- package/dist/cdn/chunks/{features-DLu_D-6j.js → features-Cnfv4QAY.js} +1442 -1295
- package/dist/cdn/chunks/features-Cnfv4QAY.js.map +1 -0
- package/dist/cdn/chunks/{icons-B03IY-pm.js → icons-DbcM69bb.js} +2 -2
- package/dist/cdn/chunks/{icons-B03IY-pm.js.map → icons-DbcM69bb.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CYF18RNk.js → media-library-DpSMwHd4.js} +524 -524
- package/dist/cdn/chunks/{media-library-CYF18RNk.js.map → media-library-DpSMwHd4.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-C74zfEWH.js → pt-BR-Bcc5Tjed.js} +3 -2
- package/dist/cdn/chunks/{pt-BR-C74zfEWH.js.map → pt-BR-Bcc5Tjed.js.map} +1 -1
- package/dist/cdn/chunks/{quality-LmsngN2B.js → quality-D9QqkRcU.js} +77 -77
- package/dist/cdn/chunks/{quality-LmsngN2B.js.map → quality-D9QqkRcU.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-DAeNIQqa.js → renderer-BsLQZNXU.js} +14 -14
- package/dist/cdn/chunks/{renderer-DAeNIQqa.js.map → renderer-BsLQZNXU.js.map} +1 -1
- package/dist/cdn/chunks/{src-CModhUDN.js → src-zu1ehVNN.js} +6 -6
- package/dist/cdn/chunks/{src-CModhUDN.js.map → src-zu1ehVNN.js.map} +1 -1
- package/dist/cdn/chunks/{styles-hd_LBGaF.js → styles-Dx-jXeCd.js} +184 -184
- package/dist/cdn/chunks/{styles-hd_LBGaF.js.map → styles-Dx-jXeCd.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +55 -52
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-BogxOeZu.js → cloud-B-RebwxI.js} +5 -5
- package/dist/{de-ZaffrKDP.js → de-CgGOnerg.js} +2 -1
- package/dist/{dist-DoRIUsfz.js → dist-BJbqgyPn.js} +108 -94
- package/dist/{en-CHuXeJDt.js → en-DrUV9xth.js} +2 -1
- package/dist/{cdn/chunks/es-CaC8VQjO.js → es-DwbKjU7q.js} +2 -3
- package/dist/{extensions-DhgbhfBX.js → extensions-BCA9pyer.js} +11 -11
- package/dist/index.d.ts +68 -0
- package/dist/keys-DFaIbGR8.js +10 -0
- package/dist/{pt-BR-C74zfEWH.js → pt-BR-Bcc5Tjed.js} +2 -1
- package/dist/style.css +1 -1
- package/dist/{styles-BWC0jc5-.js → styles-64uLkPJV.js} +136 -136
- package/dist/templatical-editor.js +15 -12
- package/dist/{upload-BKg6hDRW.js → upload-y4gxiFp5.js} +3 -2
- package/dist/{useCloudI18n-CIKI0hCd.js → useCloudI18n-PCDOC2kz.js} +1 -1
- package/dist/{useEditorCore-FLMIhtv1.js → useEditorCore-ea9OrrH3.js} +870 -764
- package/dist/{useI18n-0EU_JVe7.js → useI18n-BNMzZTM5.js} +1 -1
- package/dist/{useMergeTag-C7v6MVah.js → useMergeTag-DfEY0eK5.js} +5 -5
- package/dist/{usePopoverPosition-BDqqnMeo.js → usePopoverPosition-F9STHRIr.js} +33 -6
- package/package.json +7 -7
- package/dist/cdn/chunks/CloudEditor-Da-aSmw5.js.map +0 -1
- package/dist/cdn/chunks/ColorPicker-O6xXCPEg.js +0 -471
- package/dist/cdn/chunks/ColorPicker-O6xXCPEg.js.map +0 -1
- package/dist/cdn/chunks/features-DLu_D-6j.js.map +0 -1
- package/dist/keys-WVNarXg8.js +0 -10
- package/dist/timeouts-Bmi_yePw.js +0 -4
|
@@ -1,13 +1,13 @@
|
|
|
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 { $
|
|
3
|
-
import { A as ft, F as pt, G as mt, I as ht, M as gt, N as _t, O as vt, P as yt, T as G, V as bt, X as xt, Y as St, _ as Ct, b as wt, c as Tt, h as Et, m as Dt, o as Ot, s as kt, u as At, v as jt, y as Mt, z as Nt } from "./icons-
|
|
2
|
+
import { $ as F, $t as I, A as ee, An as L, B as R, Bt as z, Ct as B, Dt as te, En as V, Et as H, F as ne, G as re, H as ie, Hn as ae, Ht as U, I as oe, It as se, J as ce, Jt as le, K as W, Kt as ue, L as de, Ln as fe, M as pe, Mn as me, N as he, Nn as ge, Nt as _e, O as ve, On as ye, Ot as be, P as xe, Pn as Se, Qt as Ce, Rn as we, Sn as Te, St as Ee, Tn as De, Tt as Oe, U as ke, Vt as Ae, W as je, Wt as Me, Y as Ne, an as Pe, cn as Fe, ct as Ie, dn as Le, en as Re, fn as ze, ft as Be, hn as Ve, in as He, it as Ue, j as We, jt as Ge, kn as Ke, kt as qe, lt as Je, mn as Ye, mt as Xe, nn as Ze, on as Qe, pn as $e, q as et, qt as tt, rn as nt, rt, sn as it, st as at, tn as ot, ut as st, vt as ct, wt as lt, z as ut, zn as dt } from "./features-Cnfv4QAY.js";
|
|
3
|
+
import { A as ft, F as pt, G as mt, I as ht, M as gt, N as _t, O as vt, P as yt, T as G, V as bt, X as xt, Y as St, _ as Ct, b as wt, c as Tt, h as Et, m as Dt, o as Ot, s as kt, u as At, v as jt, y as Mt, z as Nt } from "./icons-DbcM69bb.js";
|
|
4
4
|
import { t as Pt } from "./readableTextColor-f8Kykfnh.js";
|
|
5
|
-
import { t as Ft } from "./CountdownBlock-
|
|
6
|
-
import { t as It } from "./blockTypeIcons-
|
|
7
|
-
import { _ as Lt, f as K, g as Rt, h as q, i as zt, l as Bt, m as J, n as Vt, p as Y, t as X, u as Ht } from "./ColorPicker-
|
|
5
|
+
import { t as Ft } from "./CountdownBlock-sHsRMe1q.js";
|
|
6
|
+
import { t as It } from "./blockTypeIcons-B0uibGX7.js";
|
|
7
|
+
import { _ as Lt, f as K, g as Rt, h as q, i as zt, l as Bt, m as J, n as Vt, p as Y, t as X, u as Ht } from "./ColorPicker-y_obnw4o.js";
|
|
8
8
|
import { n as Ut, r as Wt } from "./MergeTagSuggestion-BmMmdcRg.js";
|
|
9
9
|
import { t as Z } from "./ToggleSwitch-OrmX_w18.js";
|
|
10
|
-
import { n as Q, r as Gt, t as Kt } from "./NumberWithSuffix-
|
|
10
|
+
import { n as Q, r as Gt, t as Kt } from "./NumberWithSuffix-8fOO-LC_.js";
|
|
11
11
|
//#region src/utils/resolveLintOptions.ts
|
|
12
12
|
function qt(e) {
|
|
13
13
|
return {
|
|
@@ -29,7 +29,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
29
29
|
}, tn = { class: "tpl:relative" }, nn = {
|
|
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
|
-
}, rn = 96, an = /*#__PURE__*/
|
|
32
|
+
}, rn = 96, an = /*#__PURE__*/ at(/* @__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:
|
|
51
|
-
paragraph:
|
|
52
|
-
image:
|
|
53
|
-
button:
|
|
54
|
-
divider:
|
|
55
|
-
spacer:
|
|
56
|
-
html:
|
|
57
|
-
social:
|
|
58
|
-
menu:
|
|
59
|
-
table:
|
|
49
|
+
section: ne,
|
|
50
|
+
title: oe,
|
|
51
|
+
paragraph: R,
|
|
52
|
+
image: je,
|
|
53
|
+
button: se,
|
|
54
|
+
divider: ce,
|
|
55
|
+
spacer: pe,
|
|
56
|
+
html: et,
|
|
57
|
+
social: he,
|
|
58
|
+
menu: ke,
|
|
59
|
+
table: We,
|
|
60
60
|
video: ee,
|
|
61
61
|
countdown: Ft,
|
|
62
|
-
custom:
|
|
63
|
-
}, i = e, a = t, { t: c } =
|
|
62
|
+
custom: Ne
|
|
63
|
+
}, i = e, a = t, { t: c } = U(), { t: f } = Ue(), m = Ve(Ze, "Canvas"), h = u(Ce, null), x = u(tt, null), C = u(le, {}), 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({
|
|
@@ -68,34 +68,34 @@ var Jt = ["aria-label"], Yt = {
|
|
|
68
68
|
blocks: e
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
}),
|
|
71
|
+
}), F = _(() => {
|
|
72
72
|
switch (i.viewport) {
|
|
73
73
|
case "mobile": return 375;
|
|
74
74
|
default: return i.content.settings.width;
|
|
75
75
|
}
|
|
76
|
-
}),
|
|
76
|
+
}), I = _(() => F.value + rn * 2), L = _(() => {
|
|
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
|
+
}), z = _(() => P.value.length === 0 && !i.previewMode), B = p(0), te = _(() => z.value && B.value > 0);
|
|
80
|
+
function V() {
|
|
81
|
+
z.value && (B.value += 1);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
83
|
+
function H() {
|
|
84
|
+
z.value && (B.value = Math.max(0, B.value - 1));
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
86
|
+
function re() {
|
|
87
|
+
B.value = 0;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function ie(e) {
|
|
90
90
|
i.previewMode || e.target === e.currentTarget && a("select-block", null);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
92
|
+
function ae(e) {
|
|
93
|
+
return ut(e, x, n);
|
|
94
94
|
}
|
|
95
95
|
function W(e) {
|
|
96
96
|
return i.lockedBlocks?.get(e) ?? null;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function ue(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: `${I.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
|
})
|
|
@@ -121,7 +121,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
121
121
|
"aria-label": b(c).landmarks.canvas,
|
|
122
122
|
class: "tpl-canvas-wrapper tpl:relative",
|
|
123
123
|
style: O({
|
|
124
|
-
width: `${
|
|
124
|
+
width: `${F.value}px`,
|
|
125
125
|
transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
126
126
|
})
|
|
127
127
|
}, [E("div", {
|
|
@@ -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(L.value),
|
|
133
|
+
onClick: ie
|
|
134
134
|
}, [N(b(k), {
|
|
135
135
|
modelValue: P.value,
|
|
136
136
|
"onUpdate:modelValue": n[2] ||= (e) => P.value = e,
|
|
@@ -146,15 +146,15 @@ var Jt = ["aria-label"], Yt = {
|
|
|
146
146
|
"force-fallback": !0,
|
|
147
147
|
class: T([
|
|
148
148
|
"tpl-canvas-blocks",
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
z.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
|
+
z.value && te.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
151
|
+
z.value && !te.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
152
152
|
]),
|
|
153
|
-
onDragenter:
|
|
154
|
-
onDragleave:
|
|
155
|
-
onDrop:
|
|
153
|
+
onDragenter: V,
|
|
154
|
+
onDragleave: H,
|
|
155
|
+
onDrop: re
|
|
156
156
|
}, {
|
|
157
|
-
default: d(() => [
|
|
157
|
+
default: d(() => [z.value ? (s(), v("div", Yt, [
|
|
158
158
|
E("div", Xt, [N(b(Et), {
|
|
159
159
|
size: 48,
|
|
160
160
|
"stroke-width": 1
|
|
@@ -166,7 +166,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
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(Xe), {
|
|
170
170
|
size: 14,
|
|
171
171
|
"stroke-width": 2
|
|
172
172
|
}), j(" " + g(b(f).aiMenu.aiAssistant), 1)]),
|
|
@@ -177,7 +177,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
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(Oe), {
|
|
181
181
|
size: 14,
|
|
182
182
|
"stroke-width": 2
|
|
183
183
|
}), j(" " + g(b(f).aiMenu.designToTemplate), 1)]),
|
|
@@ -199,17 +199,17 @@ var Jt = ["aria-label"], Yt = {
|
|
|
199
199
|
backgroundColor: W(t.id).color,
|
|
200
200
|
color: b(Pt)(W(t.id).color)
|
|
201
201
|
})
|
|
202
|
-
}, [E("span", nn, g(W(t.id).name.charAt(0)), 1), j(" " + g(W(t.id).name), 1)], 4)], 4)) : y("", !0), N(
|
|
202
|
+
}, [E("span", nn, g(W(t.id).name.charAt(0)), 1), j(" " + g(W(t.id).name), 1)], 4)], 4)) : y("", !0), N(de, {
|
|
203
203
|
block: t,
|
|
204
204
|
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !W(t.id),
|
|
205
205
|
viewport: e.viewport,
|
|
206
206
|
"preview-mode": e.previewMode,
|
|
207
207
|
onSelect: (n) => e.previewMode || W(t.id) ? void 0 : a("select-block", t.id)
|
|
208
208
|
}, {
|
|
209
|
-
default: d(() => [(s(), S(o(
|
|
209
|
+
default: d(() => [(s(), S(o(ae(t)), {
|
|
210
210
|
block: t,
|
|
211
211
|
viewport: e.viewport,
|
|
212
|
-
onFetchData: (e) =>
|
|
212
|
+
onFetchData: (e) => ue(t, e),
|
|
213
213
|
onUpdate: (e) => b(m).updateBlock(t.id, e)
|
|
214
214
|
}, null, 40, [
|
|
215
215
|
"block",
|
|
@@ -235,7 +235,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
235
235
|
}), [["__scopeId", "data-v-b440d13f"]]), on = M({
|
|
236
236
|
name: "CustomBlockStylesheets",
|
|
237
237
|
setup() {
|
|
238
|
-
let t = u(
|
|
238
|
+
let t = u(Re, null);
|
|
239
239
|
return () => t ? t.value.map((t, n) => e("style", {
|
|
240
240
|
key: n,
|
|
241
241
|
"data-tpl-custom-block-stylesheet": "",
|
|
@@ -284,7 +284,7 @@ var cn = ["aria-label"], ln = {
|
|
|
284
284
|
}, gn = /* @__PURE__ */ M({
|
|
285
285
|
__name: "Sidebar",
|
|
286
286
|
setup(e) {
|
|
287
|
-
let { t, format: n } =
|
|
287
|
+
let { t, format: n } = U(), { t: r } = Ue(), i = u(I, []), a = u(Fe, void 0), c = u(ue, void 0), f = u(Ze, null), m = u(le, {}), 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,31 +310,31 @@ var cn = ["aria-label"], ln = {
|
|
|
310
310
|
], M = _(() => {
|
|
311
311
|
let e = j.map((e) => ({
|
|
312
312
|
type: e,
|
|
313
|
-
label:
|
|
313
|
+
label: Ae(e, t)
|
|
314
314
|
}));
|
|
315
315
|
return m.plan && e.splice(-1, 0, {
|
|
316
316
|
type: "countdown",
|
|
317
|
-
label:
|
|
317
|
+
label: Ae("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
|
-
}))),
|
|
324
|
+
}))), ee = _(() => [...M.value, ...F.value]), L = _(() => sn(ee.value, a)), R = _(() => L.value.items), B = /* @__PURE__ */ new Set();
|
|
325
325
|
P(() => L.value.unknown, (e) => {
|
|
326
|
-
for (let t of e)
|
|
326
|
+
for (let t of e) B.has(t) || (B.add(t), z.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 te(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 we(n);
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return fe(e.type, c);
|
|
334
334
|
}
|
|
335
335
|
function V(e) {
|
|
336
336
|
if (!f) return;
|
|
337
|
-
let t =
|
|
337
|
+
let t = te(e);
|
|
338
338
|
f.addBlock(t), f.selectBlock(t.id);
|
|
339
339
|
}
|
|
340
340
|
function H(e, t) {
|
|
@@ -369,13 +369,13 @@ var cn = ["aria-label"], ln = {
|
|
|
369
369
|
x.value ? (s(), v("span", dn, g(b(r).modules.title), 1)) : y("", !0),
|
|
370
370
|
x.value ? (s(), v("span", fn, g(b(m).savedModules?.moduleCount.value ?? 0), 1)) : y("", !0)
|
|
371
371
|
], 12, un)])) : y("", !0), N(b(k), {
|
|
372
|
-
"model-value":
|
|
372
|
+
"model-value": R.value,
|
|
373
373
|
group: {
|
|
374
374
|
name: "blocks",
|
|
375
375
|
pull: "clone",
|
|
376
376
|
put: !1
|
|
377
377
|
},
|
|
378
|
-
clone:
|
|
378
|
+
clone: te,
|
|
379
379
|
sort: !1,
|
|
380
380
|
animation: 150,
|
|
381
381
|
"force-fallback": !0,
|
|
@@ -383,7 +383,7 @@ 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(R.value, (e) => (s(), v("button", {
|
|
387
387
|
key: e.type,
|
|
388
388
|
type: "button",
|
|
389
389
|
"data-palette-type": e.type,
|
|
@@ -396,7 +396,7 @@ var cn = ["aria-label"], ln = {
|
|
|
396
396
|
key: 0,
|
|
397
397
|
size: 20,
|
|
398
398
|
"stroke-width": 1.5
|
|
399
|
-
})) : e.isCustom ? (s(), S(
|
|
399
|
+
})) : e.isCustom ? (s(), S(Ie, {
|
|
400
400
|
key: 1,
|
|
401
401
|
icon: e.icon,
|
|
402
402
|
size: 20
|
|
@@ -464,7 +464,7 @@ var xn = /* @__PURE__ */ new Set([
|
|
|
464
464
|
"End"
|
|
465
465
|
]);
|
|
466
466
|
function Sn(e) {
|
|
467
|
-
let { elementRef: t, modelValue: r, emit: o, mergeTags: s, syntax: l, enabled: d, onInsert: f } = e, p =
|
|
467
|
+
let { elementRef: t, modelValue: r, emit: o, mergeTags: s, syntax: l, enabled: d, onInsert: f } = e, p = ge(l), m = me(l), h = d && p !== null && s.length > 0, g = u($e, null), _ = Ut((a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", ie()), v = !1;
|
|
468
468
|
n() && i(() => {
|
|
469
469
|
v = !0, _.close();
|
|
470
470
|
});
|
|
@@ -518,7 +518,7 @@ function Sn(e) {
|
|
|
518
518
|
//#endregion
|
|
519
519
|
//#region src/composables/useMergeTagField.ts
|
|
520
520
|
function Cn(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 } =
|
|
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 } = rt(), { canInsertLogicTag: g, isRequesting: v, requestLogicTag: y } = F(), b = p(!1), x = !1, S = !1;
|
|
522
522
|
n() && i(() => {
|
|
523
523
|
S = !0;
|
|
524
524
|
});
|
|
@@ -546,10 +546,10 @@ function Cn(e) {
|
|
|
546
546
|
type: "mergeTag",
|
|
547
547
|
value: t,
|
|
548
548
|
label: d(t)
|
|
549
|
-
}) :
|
|
549
|
+
}) : Se(t, m) ? n.push({
|
|
550
550
|
type: "logicMergeTag",
|
|
551
551
|
value: t,
|
|
552
|
-
keyword:
|
|
552
|
+
keyword: L(t, m)
|
|
553
553
|
}) : n.push({
|
|
554
554
|
type: "text",
|
|
555
555
|
value: t
|
|
@@ -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 } = U();
|
|
660
660
|
function i() {
|
|
661
661
|
n("edit");
|
|
662
662
|
}
|
|
@@ -690,7 +690,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
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(Je), {
|
|
694
694
|
size: 12,
|
|
695
695
|
"stroke-width": 2.5
|
|
696
696
|
})], 8, On)], 42, wn));
|
|
@@ -704,7 +704,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
704
704
|
props: { disabled: { type: Boolean } },
|
|
705
705
|
emits: ["insert"],
|
|
706
706
|
setup(e) {
|
|
707
|
-
let { t } =
|
|
707
|
+
let { t } = U();
|
|
708
708
|
return (n, r) => (s(), v("button", {
|
|
709
709
|
type: "button",
|
|
710
710
|
class: T([jn, "tpl:mt-1.5"]),
|
|
@@ -727,7 +727,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
727
727
|
props: { disabled: { type: Boolean } },
|
|
728
728
|
emits: ["insert"],
|
|
729
729
|
setup(e) {
|
|
730
|
-
let { t } =
|
|
730
|
+
let { t } = U();
|
|
731
731
|
return (n, r) => (s(), v("button", {
|
|
732
732
|
type: "button",
|
|
733
733
|
class: T([Pn, "tpl:mt-1.5"]),
|
|
@@ -809,7 +809,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
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 } = U(), a = Ve(nt, "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"
|
|
@@ -917,7 +917,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
917
917
|
rows: 2,
|
|
918
918
|
"onUpdate:modelValue": n[7] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
919
919
|
}, null, 8, ["model-value", "placeholder"]), E("div", lr, [E("span", ur, g(b(i).templateSettings.preheaderTextHint), 1), E("span", dr, g((e.settings.preheaderText ?? "").length) + "/" + g(vr), 1)])])], 2),
|
|
920
|
-
E("div", fr, [E("div", pr, [N(b(
|
|
920
|
+
E("div", fr, [E("div", pr, [N(b(B), {
|
|
921
921
|
size: 14,
|
|
922
922
|
"stroke-width": 2
|
|
923
923
|
}), E("span", null, g(b(i).templateSettings.tips), 1)]), E("ul", mr, [
|
|
@@ -937,7 +937,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
937
937
|
], wr = {
|
|
938
938
|
key: 0,
|
|
939
939
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
940
|
-
}, Tr = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", $ = /*#__PURE__*/
|
|
940
|
+
}, Tr = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", $ = /*#__PURE__*/ at(/* @__PURE__ */ M({
|
|
941
941
|
__name: "MergeTagInput",
|
|
942
942
|
props: {
|
|
943
943
|
modelValue: {},
|
|
@@ -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 } = U(), 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
|
}
|
|
@@ -1099,7 +1099,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1099
1099
|
])
|
|
1100
1100
|
], 64));
|
|
1101
1101
|
}
|
|
1102
|
-
}), Xr = { class: "spacing-control" }, Zr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qr = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, $r = { class: "tpl:flex tpl:items-center" }, ei = ["aria-label"], ti = ["value", "aria-label"], ni = ["aria-label"], ri = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ii = { class: "tpl:flex tpl:items-center" }, ai = ["aria-label"], oi = ["value", "aria-label"], si = ["aria-label"], ci = ["aria-label", "title"], li = { class: "tpl:flex tpl:items-center" }, ui = ["aria-label"], di = ["value", "aria-label"], fi = ["aria-label"], pi = { class: "tpl:flex tpl:items-center" }, mi = ["aria-label"], hi = ["value", "aria-label"], gi = ["aria-label"], _i = "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)]", vi = "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)]", yi = /*#__PURE__*/
|
|
1102
|
+
}), Xr = { class: "spacing-control" }, Zr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qr = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, $r = { class: "tpl:flex tpl:items-center" }, ei = ["aria-label"], ti = ["value", "aria-label"], ni = ["aria-label"], ri = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ii = { class: "tpl:flex tpl:items-center" }, ai = ["aria-label"], oi = ["value", "aria-label"], si = ["aria-label"], ci = ["aria-label", "title"], li = { class: "tpl:flex tpl:items-center" }, ui = ["aria-label"], di = ["value", "aria-label"], fi = ["aria-label"], pi = { class: "tpl:flex tpl:items-center" }, mi = ["aria-label"], hi = ["value", "aria-label"], gi = ["aria-label"], _i = "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)]", vi = "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)]", yi = /*#__PURE__*/ at(/* @__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 } = U(), 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
|
});
|
|
@@ -1282,7 +1282,7 @@ 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(_e), {
|
|
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
|
|
@@ -1308,7 +1308,7 @@ 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 } = U(), c = u(ot, []), m = u(Me, !1), h = f(/* @__PURE__ */ new Set()), x = p(!1), C = p(""), D = p(""), O = [{
|
|
1312
1312
|
key: "desktop",
|
|
1313
1313
|
icon: _t,
|
|
1314
1314
|
labelKey: "showOnDesktop"
|
|
@@ -1321,10 +1321,10 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
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 I() {
|
|
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 ee() {
|
|
1328
1328
|
C.value.trim() && (i("update", { displayCondition: {
|
|
1329
1329
|
label: a.blockSettings.customCondition,
|
|
1330
1330
|
before: C.value.trim(),
|
|
@@ -1346,7 +1346,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1346
1346
|
}
|
|
1347
1347
|
return e;
|
|
1348
1348
|
});
|
|
1349
|
-
function
|
|
1349
|
+
function R(e, t) {
|
|
1350
1350
|
i("update", { styles: {
|
|
1351
1351
|
...n.block.styles,
|
|
1352
1352
|
[e]: t
|
|
@@ -1372,7 +1372,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1372
1372
|
default: d(() => [N(yi, {
|
|
1373
1373
|
label: b(a).blockSettings.padding,
|
|
1374
1374
|
"model-value": e.block.styles.padding,
|
|
1375
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1375
|
+
"onUpdate:modelValue": n[0] ||= (e) => R("padding", e)
|
|
1376
1376
|
}, null, 8, ["label", "model-value"])]),
|
|
1377
1377
|
_: 1
|
|
1378
1378
|
}, 8, [
|
|
@@ -1387,7 +1387,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1387
1387
|
}, {
|
|
1388
1388
|
default: d(() => [E("label", { class: T(b(q)) }, g(b(a).blockSettings.color), 3), N(X, {
|
|
1389
1389
|
"model-value": e.block.styles.backgroundColor ?? "",
|
|
1390
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
1390
|
+
"onUpdate:modelValue": n[2] ||= (e) => R("backgroundColor", e)
|
|
1391
1391
|
}, null, 8, ["model-value"])]),
|
|
1392
1392
|
_: 1
|
|
1393
1393
|
}, 8, ["title", "open"]),
|
|
@@ -1427,7 +1427,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1427
1427
|
onChange: n[5] ||= (e) => {
|
|
1428
1428
|
let t = e.target.value;
|
|
1429
1429
|
if (t === "__custom__") {
|
|
1430
|
-
|
|
1430
|
+
I();
|
|
1431
1431
|
return;
|
|
1432
1432
|
}
|
|
1433
1433
|
if (x.value = !1, !t) {
|
|
@@ -1465,7 +1465,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
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:
|
|
1468
|
+
onClick: ee
|
|
1469
1469
|
}, g(b(a).blockSettings.applyCondition), 9, Fi)])
|
|
1470
1470
|
])) : e.block.displayCondition && !F.value ? (s(), v(A, { key: 1 }, [e.block.displayCondition.description ? (s(), v("p", Ii, g(e.block.displayCondition.description), 1)) : y("", !0), E("div", Li, [E("pre", Ri, g(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (s(), v("pre", zi, g(e.block.displayCondition.after), 1)) : y("", !0)])], 64)) : y("", !0)])]),
|
|
1471
1471
|
_: 1
|
|
@@ -1481,7 +1481,7 @@ 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 } = U();
|
|
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
|
|
@@ -1536,7 +1536,7 @@ 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: r } =
|
|
1539
|
+
let n = t, { t: r } = U();
|
|
1540
1540
|
return (t, i) => (s(), S(Gi, {
|
|
1541
1541
|
label: e.field.label,
|
|
1542
1542
|
required: e.field.required,
|
|
@@ -1578,7 +1578,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1578
1578
|
},
|
|
1579
1579
|
emits: ["update:modelValue"],
|
|
1580
1580
|
setup(e, { emit: t }) {
|
|
1581
|
-
let n = e, r = t, { t: i } =
|
|
1581
|
+
let n = e, r = t, { t: i } = U(), a = u(it, null), o = W(), c = _(() => !!a);
|
|
1582
1582
|
async function l() {
|
|
1583
1583
|
let e = await a?.({ accept: ["images"] });
|
|
1584
1584
|
o.alive && e && r("update:modelValue", e.url);
|
|
@@ -1599,7 +1599,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1599
1599
|
}
|
|
1600
1600
|
}
|
|
1601
1601
|
}
|
|
1602
|
-
let { isOver: C } =
|
|
1602
|
+
let { isOver: C } = re({
|
|
1603
1603
|
target: f,
|
|
1604
1604
|
enabled: h,
|
|
1605
1605
|
onFiles: x
|
|
@@ -1614,11 +1614,11 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1614
1614
|
ref: f,
|
|
1615
1615
|
class: "tpl:relative"
|
|
1616
1616
|
}, [
|
|
1617
|
-
h.value && (b(C) || m.value) ? (s(), v("div", qi, [m.value ? (s(), v(A, { key: 0 }, [N(b(
|
|
1617
|
+
h.value && (b(C) || m.value) ? (s(), v("div", qi, [m.value ? (s(), v(A, { key: 0 }, [N(b(Ee), {
|
|
1618
1618
|
class: "tpl-spinner",
|
|
1619
1619
|
size: 18,
|
|
1620
1620
|
"stroke-width": 2
|
|
1621
|
-
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(
|
|
1621
|
+
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(st), {
|
|
1622
1622
|
size: 18,
|
|
1623
1623
|
"stroke-width": 1.5
|
|
1624
1624
|
}), j(" " + g(b(i).image.dropToUpload), 1)], 64))])) : y("", !0),
|
|
@@ -1642,7 +1642,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1642
1642
|
key: 3,
|
|
1643
1643
|
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
1644
|
onClick: n[1] ||= (e) => l()
|
|
1645
|
-
}, [N(b(
|
|
1645
|
+
}, [N(b(lt), {
|
|
1646
1646
|
size: 14,
|
|
1647
1647
|
"stroke-width": 1.5
|
|
1648
1648
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
@@ -1671,7 +1671,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1671
1671
|
},
|
|
1672
1672
|
emits: ["update:modelValue"],
|
|
1673
1673
|
setup(e, { emit: t }) {
|
|
1674
|
-
let n = t, { t: r } =
|
|
1674
|
+
let n = t, { t: r } = U();
|
|
1675
1675
|
return (t, i) => (s(), S(Gi, {
|
|
1676
1676
|
label: e.field.label,
|
|
1677
1677
|
required: e.field.required,
|
|
@@ -1708,7 +1708,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1708
1708
|
},
|
|
1709
1709
|
emits: ["update:modelValue"],
|
|
1710
1710
|
setup(e, { emit: t }) {
|
|
1711
|
-
let n = e, r = t, { t: i } =
|
|
1711
|
+
let n = e, r = t, { t: i } = U(), a = _(() => n.modelValue || []), c = _(() => !n.field.maxItems || a.value.length < n.field.maxItems), u = _(() => !n.field.minItems || a.value.length > n.field.minItems);
|
|
1712
1712
|
function f() {
|
|
1713
1713
|
if (!c.value || n.readOnly) return;
|
|
1714
1714
|
let e = {};
|
|
@@ -1742,7 +1742,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1742
1742
|
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
1743
|
title: b(i).customBlocks.fields.removeItem,
|
|
1744
1744
|
onClick: (e) => p(n)
|
|
1745
|
-
}, [N(b(
|
|
1745
|
+
}, [N(b(Be), {
|
|
1746
1746
|
size: 12,
|
|
1747
1747
|
"stroke-width": 2
|
|
1748
1748
|
})], 8, na)) : y("", !0)]), (s(!0), v(A, null, l(e.field.fields, (r) => (s(), S(o(b(pa)(r.type)), {
|
|
@@ -1788,7 +1788,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1788
1788
|
},
|
|
1789
1789
|
emits: ["update:modelValue"],
|
|
1790
1790
|
setup(e, { emit: t }) {
|
|
1791
|
-
let n = t, { t: r } =
|
|
1791
|
+
let n = t, { t: r } = U();
|
|
1792
1792
|
return (t, i) => (s(), S(Gi, {
|
|
1793
1793
|
label: e.field.label,
|
|
1794
1794
|
required: e.field.required,
|
|
@@ -1824,7 +1824,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1824
1824
|
},
|
|
1825
1825
|
emits: ["update:modelValue"],
|
|
1826
1826
|
setup(e, { emit: t }) {
|
|
1827
|
-
let n = t, { t: r } =
|
|
1827
|
+
let n = t, { t: r } = U();
|
|
1828
1828
|
return (t, i) => (s(), S(Gi, {
|
|
1829
1829
|
label: e.field.label,
|
|
1830
1830
|
required: e.field.required,
|
|
@@ -1866,7 +1866,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1866
1866
|
},
|
|
1867
1867
|
emits: ["update:modelValue"],
|
|
1868
1868
|
setup(e, { emit: t }) {
|
|
1869
|
-
let n = t, { t: r } =
|
|
1869
|
+
let n = t, { t: r } = U();
|
|
1870
1870
|
return (t, i) => (s(), S(Gi, {
|
|
1871
1871
|
label: e.field.label,
|
|
1872
1872
|
required: e.field.required,
|
|
@@ -1929,7 +1929,7 @@ var ma = {
|
|
|
1929
1929
|
props: { block: {} },
|
|
1930
1930
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1931
1931
|
setup(e, { emit: t }) {
|
|
1932
|
-
let n = e, r = t, { t: i } =
|
|
1932
|
+
let n = e, r = t, { t: i } = U(), a = u(I, []), c = _(() => a.find((e) => e.type === n.block.customType)), { isFetching: d, fetchError: f, fetch: p, hasDataSource: m, needsFetch: h } = V({
|
|
1933
1933
|
definition: c,
|
|
1934
1934
|
block: _(() => n.block),
|
|
1935
1935
|
onUpdate: (e, t) => {
|
|
@@ -1957,7 +1957,7 @@ var ma = {
|
|
|
1957
1957
|
type: "button",
|
|
1958
1958
|
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
1959
|
onClick: n[1] ||= (...e) => b(p) && b(p)(...e)
|
|
1960
|
-
}, [N(b(ct), { size: 12 }), j(" " + g(b(i).customBlocks.dataSource.changeButton), 1)]))])), b(f) ? (s(), v("p", xa, [N(b(
|
|
1960
|
+
}, [N(b(ct), { size: 12 }), j(" " + g(b(i).customBlocks.dataSource.changeButton), 1)]))])), b(f) ? (s(), v("p", xa, [N(b(Ge), {
|
|
1961
1961
|
size: 14,
|
|
1962
1962
|
class: "tpl:shrink-0"
|
|
1963
1963
|
}), j(" " + g(b(i).customBlocks.dataSource.fetchError), 1)])) : y("", !0)])) : y("", !0),
|
|
@@ -1980,7 +1980,7 @@ var ma = {
|
|
|
1980
1980
|
props: { block: {} },
|
|
1981
1981
|
emits: ["update"],
|
|
1982
1982
|
setup(e, { emit: t }) {
|
|
1983
|
-
let n = t, { t: r } =
|
|
1983
|
+
let n = t, { t: r } = U();
|
|
1984
1984
|
function i(e, t) {
|
|
1985
1985
|
n("update", { [e]: t });
|
|
1986
1986
|
}
|
|
@@ -2022,7 +2022,7 @@ var ma = {
|
|
|
2022
2022
|
props: { block: {} },
|
|
2023
2023
|
emits: ["update"],
|
|
2024
2024
|
setup(e, { emit: t }) {
|
|
2025
|
-
let n = t, { t: r } =
|
|
2025
|
+
let n = t, { t: r } = U();
|
|
2026
2026
|
return (t, i) => (s(), v("div", ka, [
|
|
2027
2027
|
E("label", { class: T(b(q)) }, g(b(r).html.content), 3),
|
|
2028
2028
|
E("textarea", {
|
|
@@ -2032,7 +2032,7 @@ var ma = {
|
|
|
2032
2032
|
class: T(b(Rt)),
|
|
2033
2033
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
2034
2034
|
}, null, 42, Aa),
|
|
2035
|
-
E("p", ja, [N(b(
|
|
2035
|
+
E("p", ja, [N(b(B), {
|
|
2036
2036
|
size: 12,
|
|
2037
2037
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
2038
2038
|
}), j(" " + g(b(r).html.sanitizationHint), 1)])
|
|
@@ -2053,7 +2053,7 @@ var ma = {
|
|
|
2053
2053
|
props: { block: {} },
|
|
2054
2054
|
emits: ["update"],
|
|
2055
2055
|
setup(e, { emit: t }) {
|
|
2056
|
-
let n = e, r = t, { t: i } =
|
|
2056
|
+
let n = e, r = t, { t: i } = U(), a = u(it, null), o = u(Qe, ye.liquid), c = W(), l = _(() => !!a), f = p(!1), m = p(!1), { start: h } = De(() => {
|
|
2057
2057
|
f.value = !1;
|
|
2058
2058
|
}, 1e3, { immediate: !1 }), x = [
|
|
2059
2059
|
300,
|
|
@@ -2082,8 +2082,8 @@ var ma = {
|
|
|
2082
2082
|
let e = await a?.({ accept: ["images"] });
|
|
2083
2083
|
c.alive && e && (w("src", e.url), e.alt && (w("alt", e.alt), m.value = !0), f.value = !0, h());
|
|
2084
2084
|
}
|
|
2085
|
-
let M = p(), P = p(!1), F = _(() =>
|
|
2086
|
-
async function
|
|
2085
|
+
let M = p(), P = p(!1), F = _(() => Ke(n.block.src, o)), I = _(() => l.value && !P.value && !F.value);
|
|
2086
|
+
async function ee(e) {
|
|
2087
2087
|
if (a) {
|
|
2088
2088
|
P.value = !0;
|
|
2089
2089
|
try {
|
|
@@ -2098,10 +2098,10 @@ var ma = {
|
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
2100
2100
|
}
|
|
2101
|
-
let { isOver: L } =
|
|
2101
|
+
let { isOver: L } = re({
|
|
2102
2102
|
target: M,
|
|
2103
|
-
enabled:
|
|
2104
|
-
onFiles:
|
|
2103
|
+
enabled: I,
|
|
2104
|
+
onFiles: ee
|
|
2105
2105
|
});
|
|
2106
2106
|
return (t, n) => (s(), v(A, null, [
|
|
2107
2107
|
E("div", Na, [E("label", { class: T(b(q)) }, g(b(i).image.imageUrl), 3), E("div", {
|
|
@@ -2109,11 +2109,11 @@ var ma = {
|
|
|
2109
2109
|
ref: M,
|
|
2110
2110
|
class: "tpl:relative"
|
|
2111
2111
|
}, [
|
|
2112
|
-
|
|
2112
|
+
I.value && (b(L) || P.value) ? (s(), v("div", Pa, [P.value ? (s(), v(A, { key: 0 }, [N(b(Ee), {
|
|
2113
2113
|
class: "tpl-spinner",
|
|
2114
2114
|
size: 18,
|
|
2115
2115
|
"stroke-width": 2
|
|
2116
|
-
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(
|
|
2116
|
+
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(st), {
|
|
2117
2117
|
size: 18,
|
|
2118
2118
|
"stroke-width": 1.5
|
|
2119
2119
|
}), j(" " + g(b(i).image.dropToUpload), 1)], 64))])) : y("", !0),
|
|
@@ -2137,12 +2137,12 @@ var ma = {
|
|
|
2137
2137
|
"background-color": "var(--tpl-bg)"
|
|
2138
2138
|
},
|
|
2139
2139
|
onClick: k
|
|
2140
|
-
}, [N(b(
|
|
2140
|
+
}, [N(b(lt), {
|
|
2141
2141
|
size: 14,
|
|
2142
2142
|
"stroke-width": 1.5
|
|
2143
2143
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
2144
2144
|
], 512)]),
|
|
2145
|
-
b(
|
|
2145
|
+
b(Ke)(e.block.src, b(o)) ? (s(), v("div", Fa, [E("label", { class: T(b(q)) }, [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
2146
|
type: "url",
|
|
2147
2147
|
class: T(b(K)),
|
|
2148
2148
|
value: e.block.placeholderUrl || "",
|
|
@@ -2243,7 +2243,7 @@ var ma = {
|
|
|
2243
2243
|
},
|
|
2244
2244
|
emits: ["update"],
|
|
2245
2245
|
setup(e, { emit: t }) {
|
|
2246
|
-
let n = e, r = t, { t: i } =
|
|
2246
|
+
let n = e, r = t, { t: i } = U(), a = _(() => [
|
|
2247
2247
|
{
|
|
2248
2248
|
key: "openInNewTab",
|
|
2249
2249
|
label: i.menu.openInNewTab
|
|
@@ -2278,7 +2278,7 @@ var ma = {
|
|
|
2278
2278
|
}
|
|
2279
2279
|
function u() {
|
|
2280
2280
|
let e = {
|
|
2281
|
-
id:
|
|
2281
|
+
id: dt(),
|
|
2282
2282
|
text: "",
|
|
2283
2283
|
url: "",
|
|
2284
2284
|
openInNewTab: !1,
|
|
@@ -2313,7 +2313,7 @@ var ma = {
|
|
|
2313
2313
|
class: T(b(Lt)),
|
|
2314
2314
|
title: b(i).menu.removeItem,
|
|
2315
2315
|
onClick: (e) => p(t.id)
|
|
2316
|
-
}, [N(b(
|
|
2316
|
+
}, [N(b(Je), {
|
|
2317
2317
|
size: 14,
|
|
2318
2318
|
"stroke-width": 2
|
|
2319
2319
|
})], 10, Qa)]),
|
|
@@ -2451,7 +2451,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2451
2451
|
props: { block: {} },
|
|
2452
2452
|
emits: ["update"],
|
|
2453
2453
|
setup(e, { emit: t }) {
|
|
2454
|
-
let n = e, r = t, { t: i } =
|
|
2454
|
+
let n = e, r = t, { t: i } = U(), a = _(() => [
|
|
2455
2455
|
{
|
|
2456
2456
|
value: "1",
|
|
2457
2457
|
label: i.section.column1
|
|
@@ -2566,13 +2566,13 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2566
2566
|
props: { block: {} },
|
|
2567
2567
|
emits: ["update"],
|
|
2568
2568
|
setup(e, { emit: t }) {
|
|
2569
|
-
let n = e, r = t, { t: i } =
|
|
2569
|
+
let n = e, r = t, { t: i } = U();
|
|
2570
2570
|
function a(e, t) {
|
|
2571
2571
|
r("update", { [e]: t });
|
|
2572
2572
|
}
|
|
2573
2573
|
function o() {
|
|
2574
2574
|
let e = {
|
|
2575
|
-
id:
|
|
2575
|
+
id: dt(),
|
|
2576
2576
|
platform: "facebook",
|
|
2577
2577
|
url: ""
|
|
2578
2578
|
};
|
|
@@ -2597,14 +2597,14 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2597
2597
|
class: T([b(K), "tpl:flex-1"]),
|
|
2598
2598
|
value: e.platform,
|
|
2599
2599
|
onChange: (t) => c(e.id, "platform", t.target.value)
|
|
2600
|
-
}, [(s(!0), v(A, null, l(b(
|
|
2600
|
+
}, [(s(!0), v(A, null, l(b(xe), (e) => (s(), v("option", {
|
|
2601
2601
|
key: e,
|
|
2602
2602
|
value: e
|
|
2603
2603
|
}, g(b(i).social.platforms[e]), 9, To))), 128))], 42, wo), E("button", {
|
|
2604
2604
|
class: T(b(Lt)),
|
|
2605
2605
|
title: b(i).social.removeIcon,
|
|
2606
2606
|
onClick: (t) => u(e.id)
|
|
2607
|
-
}, [N(b(
|
|
2607
|
+
}, [N(b(Je), {
|
|
2608
2608
|
size: 14,
|
|
2609
2609
|
"stroke-width": 2
|
|
2610
2610
|
})], 10, Eo)]), N($, {
|
|
@@ -2688,7 +2688,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2688
2688
|
props: { block: {} },
|
|
2689
2689
|
emits: ["update"],
|
|
2690
2690
|
setup(e, { emit: t }) {
|
|
2691
|
-
let n = t, { t: r } =
|
|
2691
|
+
let n = t, { t: r } = U();
|
|
2692
2692
|
return (t, i) => (s(), v("div", Bo, [
|
|
2693
2693
|
E("label", { class: T(b(q)) }, g(b(r).spacer.height), 3),
|
|
2694
2694
|
E("div", Vo, [E("input", {
|
|
@@ -2720,15 +2720,15 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2720
2720
|
},
|
|
2721
2721
|
emits: ["update"],
|
|
2722
2722
|
setup(e, { emit: t }) {
|
|
2723
|
-
let n = e, r = t, { t: i } =
|
|
2723
|
+
let n = e, r = t, { t: i } = U(), a = _(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
|
|
2724
2724
|
function o(e, t) {
|
|
2725
2725
|
r("update", { [e]: t });
|
|
2726
2726
|
}
|
|
2727
2727
|
function c() {
|
|
2728
2728
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2729
|
-
id:
|
|
2729
|
+
id: dt(),
|
|
2730
2730
|
cells: Array.from({ length: e }, () => ({
|
|
2731
|
-
id:
|
|
2731
|
+
id: dt(),
|
|
2732
2732
|
content: ""
|
|
2733
2733
|
}))
|
|
2734
2734
|
};
|
|
@@ -2741,7 +2741,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2741
2741
|
let e = n.block.rows.map((e) => ({
|
|
2742
2742
|
...e,
|
|
2743
2743
|
cells: [...e.cells, {
|
|
2744
|
-
id:
|
|
2744
|
+
id: dt(),
|
|
2745
2745
|
content: ""
|
|
2746
2746
|
}]
|
|
2747
2747
|
}));
|
|
@@ -2877,7 +2877,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2877
2877
|
},
|
|
2878
2878
|
emits: ["update"],
|
|
2879
2879
|
setup(e, { emit: t }) {
|
|
2880
|
-
let n = t, { t: r } =
|
|
2880
|
+
let n = t, { t: r } = U();
|
|
2881
2881
|
function i(e, t) {
|
|
2882
2882
|
n("update", { [e]: t });
|
|
2883
2883
|
}
|
|
@@ -2939,7 +2939,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2939
2939
|
props: { block: {} },
|
|
2940
2940
|
emits: ["update"],
|
|
2941
2941
|
setup(e, { emit: t }) {
|
|
2942
|
-
let n = e, r = t, { t: i } =
|
|
2942
|
+
let n = e, r = t, { t: i } = U(), a = u(it, null), o = u(Qe, ye.liquid), c = W(), l = _(() => !!a), d = _(() => Ke(n.block.url, o)), f = p(!1), { start: m } = De(() => {
|
|
2943
2943
|
f.value = !1;
|
|
2944
2944
|
}, 1e3, { immediate: !1 });
|
|
2945
2945
|
function h(e, t) {
|
|
@@ -2996,7 +2996,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
2996
2996
|
"background-color": "var(--tpl-bg)"
|
|
2997
2997
|
},
|
|
2998
2998
|
onClick: x
|
|
2999
|
-
}, [N(b(
|
|
2999
|
+
}, [N(b(lt), {
|
|
3000
3000
|
size: 14,
|
|
3001
3001
|
"stroke-width": 1.5
|
|
3002
3002
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
@@ -3037,7 +3037,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3037
3037
|
}, null, 8, ["options", "model-value"])])
|
|
3038
3038
|
], 64));
|
|
3039
3039
|
}
|
|
3040
|
-
}), qs = ["aria-label"], Js = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Ys = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Xs = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Zs = { class: "tpl:flex tpl:gap-1" }, Qs = ["title"], $s = ["title"], ec = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, tc = /*#__PURE__*/
|
|
3040
|
+
}), qs = ["aria-label"], Js = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Ys = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Xs = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Zs = { class: "tpl:flex tpl:gap-1" }, Qs = ["title"], $s = ["title"], ec = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, tc = /*#__PURE__*/ at(/* @__PURE__ */ M({
|
|
3041
3041
|
__name: "Toolbar",
|
|
3042
3042
|
props: { block: {} },
|
|
3043
3043
|
emits: [
|
|
@@ -3046,9 +3046,9 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3046
3046
|
"duplicate"
|
|
3047
3047
|
],
|
|
3048
3048
|
setup(e, { emit: t }) {
|
|
3049
|
-
let n = m(() => import("./CountdownToolbar-
|
|
3049
|
+
let n = m(() => import("./CountdownToolbar-Ckc_jEi-.js")), r = e, i = t, { t: a } = U(), c = Ve(nt, "Toolbar"), l = u(I, []), d = _(() => r.block.type), f = _(() => ae(r.block)), p = _(() => {
|
|
3050
3050
|
if (f.value) return l.find((e) => e.type === r.block.customType);
|
|
3051
|
-
}), h = _(() => f.value ? p.value?.name ?? r.block.customType :
|
|
3051
|
+
}), h = _(() => f.value ? p.value?.name ?? r.block.customType : Ae(d.value, a)), x = c.fonts;
|
|
3052
3052
|
function C(e) {
|
|
3053
3053
|
i("update", e);
|
|
3054
3054
|
}
|
|
@@ -3059,7 +3059,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3059
3059
|
key: 0,
|
|
3060
3060
|
size: 16,
|
|
3061
3061
|
"stroke-width": 1.5
|
|
3062
|
-
})) : f.value ? (s(), S(b(
|
|
3062
|
+
})) : f.value ? (s(), S(b(qe), {
|
|
3063
3063
|
key: 1,
|
|
3064
3064
|
size: 16,
|
|
3065
3065
|
"stroke-width": 1.5
|
|
@@ -3067,14 +3067,14 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3067
3067
|
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
3068
|
title: b(a).toolbar.duplicate,
|
|
3069
3069
|
onClick: r[0] ||= (e) => i("duplicate")
|
|
3070
|
-
}, [N(b(
|
|
3070
|
+
}, [N(b(be), {
|
|
3071
3071
|
size: 14,
|
|
3072
3072
|
"stroke-width": 2
|
|
3073
3073
|
})], 8, Qs), E("button", {
|
|
3074
3074
|
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
3075
|
title: b(a).toolbar.delete,
|
|
3076
3076
|
onClick: r[1] ||= (e) => i("delete")
|
|
3077
|
-
}, [N(b(
|
|
3077
|
+
}, [N(b(Be), {
|
|
3078
3078
|
size: 14,
|
|
3079
3079
|
"stroke-width": 2
|
|
3080
3080
|
})], 8, $s)])]), E("div", ec, [f.value ? (s(), S(Sa, {
|
|
@@ -3194,7 +3194,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3194
3194
|
"update-settings"
|
|
3195
3195
|
],
|
|
3196
3196
|
setup(e, { emit: t }) {
|
|
3197
|
-
let n = m(() => import("./IssuesPanel-
|
|
3197
|
+
let n = m(() => import("./IssuesPanel-DF5Ajuna.js")), r = e, i = t, { t: a } = U(), o = p("content"), c = u(Le, null), l = _(() => c !== null), d = _(() => c?.issues.value.length ?? 0);
|
|
3198
3198
|
function f(e) {
|
|
3199
3199
|
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
3200
|
}
|
|
@@ -3288,7 +3288,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3288
3288
|
}, bc = { class: "tpl:text-[var(--tpl-text-dim)]" }, xc = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Sc = { class: "tpl:m-0 tpl:max-w-sm tpl:text-sm tpl:leading-normal" }, Cc = /* @__PURE__ */ M({
|
|
3289
3289
|
__name: "SmallScreenNotice",
|
|
3290
3290
|
setup(e) {
|
|
3291
|
-
let { t } =
|
|
3291
|
+
let { t } = U();
|
|
3292
3292
|
return (e, n) => (s(), v("div", yc, [
|
|
3293
3293
|
E("div", bc, [N(b(_t), {
|
|
3294
3294
|
size: 48,
|
|
@@ -3308,7 +3308,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3308
3308
|
props: { viewport: {} },
|
|
3309
3309
|
emits: ["change"],
|
|
3310
3310
|
setup(e, { emit: t }) {
|
|
3311
|
-
let n = e, r = t, { t: i } =
|
|
3311
|
+
let n = e, r = t, { t: i } = U(), a = _(() => [{
|
|
3312
3312
|
value: "desktop",
|
|
3313
3313
|
label: i.viewport.desktop
|
|
3314
3314
|
}, {
|
|
@@ -3359,12 +3359,12 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3359
3359
|
"aria-label",
|
|
3360
3360
|
"title",
|
|
3361
3361
|
"aria-pressed"
|
|
3362
|
-
], Oc = /*#__PURE__*/
|
|
3362
|
+
], Oc = /*#__PURE__*/ at(/* @__PURE__ */ M({
|
|
3363
3363
|
__name: "PreviewToggle",
|
|
3364
3364
|
props: { previewMode: { type: Boolean } },
|
|
3365
3365
|
emits: ["change"],
|
|
3366
3366
|
setup(e, { emit: t }) {
|
|
3367
|
-
let n = t, { t: r } =
|
|
3367
|
+
let n = t, { t: r } = U();
|
|
3368
3368
|
return (t, i) => (s(), v("button", {
|
|
3369
3369
|
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
3370
|
style: O({
|
|
@@ -3386,7 +3386,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3386
3386
|
key: "eye",
|
|
3387
3387
|
size: 18,
|
|
3388
3388
|
"stroke-width": 1.5
|
|
3389
|
-
})) : (s(), S(b(
|
|
3389
|
+
})) : (s(), S(b(te), {
|
|
3390
3390
|
key: "eye-off",
|
|
3391
3391
|
size: 18,
|
|
3392
3392
|
"stroke-width": 1.5
|
|
@@ -3398,12 +3398,12 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3398
3398
|
"aria-label",
|
|
3399
3399
|
"title",
|
|
3400
3400
|
"aria-pressed"
|
|
3401
|
-
], Ac = /*#__PURE__*/
|
|
3401
|
+
], Ac = /*#__PURE__*/ at(/* @__PURE__ */ M({
|
|
3402
3402
|
__name: "DarkModeToggle",
|
|
3403
3403
|
props: { darkMode: { type: Boolean } },
|
|
3404
3404
|
emits: ["change"],
|
|
3405
3405
|
setup(e, { emit: t }) {
|
|
3406
|
-
let n = t, { t: r } =
|
|
3406
|
+
let n = t, { t: r } = U();
|
|
3407
3407
|
return (t, i) => (s(), v("button", {
|
|
3408
3408
|
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
3409
|
style: O({
|
|
@@ -3450,7 +3450,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3450
3450
|
__name: "EditorFooter",
|
|
3451
3451
|
props: { positionClass: {} },
|
|
3452
3452
|
setup(e) {
|
|
3453
|
-
let { t } =
|
|
3453
|
+
let { t } = U();
|
|
3454
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", jc, [
|
|
3455
3455
|
E("span", null, g(b(t).footer.poweredBy), 1),
|
|
3456
3456
|
r[0] ||= E("a", {
|
|
@@ -3506,15 +3506,15 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3506
3506
|
}, Zc = "tpl-merge-tag-picker-list", Qc = /* @__PURE__ */ M({
|
|
3507
3507
|
__name: "MergeTagPickerModal",
|
|
3508
3508
|
setup(e) {
|
|
3509
|
-
let t =
|
|
3509
|
+
let t = Ve(Pe, "MergeTagPickerModal"), { t: n, format: i } = U(), a = u(ze, null), o = u(Ye, 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
3510
|
function F(e) {
|
|
3511
3511
|
return M.value.has(e);
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3513
|
+
function I(e) {
|
|
3514
3514
|
let t = new Set(M.value);
|
|
3515
3515
|
t.has(e) ? t.delete(e) : t.add(e), M.value = t, k.value = 0;
|
|
3516
3516
|
}
|
|
3517
|
-
let
|
|
3517
|
+
let ee = _(() => {
|
|
3518
3518
|
let e = m.value.trim().toLowerCase();
|
|
3519
3519
|
return e ? t.tags.value.filter((t) => [
|
|
3520
3520
|
t.label,
|
|
@@ -3529,8 +3529,8 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3529
3529
|
r.has(t) || (r.add(t), i.push(t));
|
|
3530
3530
|
}
|
|
3531
3531
|
return i;
|
|
3532
|
-
}),
|
|
3533
|
-
let e =
|
|
3532
|
+
}), R = _(() => {
|
|
3533
|
+
let e = ee.value;
|
|
3534
3534
|
if (!j.value || D.value) return e.map((e, t) => ({
|
|
3535
3535
|
kind: "tag",
|
|
3536
3536
|
tag: e,
|
|
@@ -3555,7 +3555,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3555
3555
|
}), o++;
|
|
3556
3556
|
}
|
|
3557
3557
|
return a;
|
|
3558
|
-
}), z = _(() =>
|
|
3558
|
+
}), z = _(() => R.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3559
3559
|
P(() => t.isOpen.value, (e) => {
|
|
3560
3560
|
e && (f.value = "", k.value = 0, M.value = /* @__PURE__ */ new Set(), c(() => {
|
|
3561
3561
|
C.value?.focus();
|
|
@@ -3566,21 +3566,21 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3566
3566
|
function B(e) {
|
|
3567
3567
|
t.resolve(e);
|
|
3568
3568
|
}
|
|
3569
|
-
function
|
|
3569
|
+
function te() {
|
|
3570
3570
|
t.resolve(null);
|
|
3571
3571
|
}
|
|
3572
|
-
function
|
|
3572
|
+
function V(e) {
|
|
3573
3573
|
if (z.value.length === 0) return;
|
|
3574
3574
|
let t = k.value + e;
|
|
3575
3575
|
k.value = Math.max(0, Math.min(z.value.length - 1, t)), ie();
|
|
3576
3576
|
}
|
|
3577
|
-
let
|
|
3577
|
+
let H = p(null), ne = p({});
|
|
3578
3578
|
function re(e, t) {
|
|
3579
3579
|
ne.value[e] = t ?? null;
|
|
3580
3580
|
}
|
|
3581
3581
|
function ie() {
|
|
3582
3582
|
c(() => {
|
|
3583
|
-
let e =
|
|
3583
|
+
let e = H.value;
|
|
3584
3584
|
e && e.querySelector(`[data-merge-tag-index="${k.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3585
3585
|
});
|
|
3586
3586
|
}
|
|
@@ -3590,7 +3590,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3590
3590
|
t.delete(e), M.value = t;
|
|
3591
3591
|
}
|
|
3592
3592
|
c(() => {
|
|
3593
|
-
let t =
|
|
3593
|
+
let t = H.value;
|
|
3594
3594
|
if (!t) return;
|
|
3595
3595
|
let n = 0, r = !1;
|
|
3596
3596
|
for (let i of Array.from(t.children)) {
|
|
@@ -3607,8 +3607,8 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3607
3607
|
});
|
|
3608
3608
|
}
|
|
3609
3609
|
function oe(e) {
|
|
3610
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3611
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3610
|
+
if (e.key === "ArrowDown") e.preventDefault(), V(1);
|
|
3611
|
+
else if (e.key === "ArrowUp") e.preventDefault(), V(-1);
|
|
3612
3612
|
else if (e.key === "Enter") {
|
|
3613
3613
|
e.preventDefault();
|
|
3614
3614
|
let t = z.value[k.value];
|
|
@@ -3621,10 +3621,10 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3621
3621
|
function ce(e) {
|
|
3622
3622
|
return `${Zc}-opt-${e}`;
|
|
3623
3623
|
}
|
|
3624
|
-
let le = _(() => t.tags.value.length === 0), W = _(() => !le.value &&
|
|
3624
|
+
let le = _(() => t.tags.value.length === 0), W = _(() => !le.value && ee.value.length === 0), ue = _(() => j.value && L.value.length > 1 && !D.value);
|
|
3625
3625
|
return (e, c) => (s(), S(ve, {
|
|
3626
3626
|
visible: b(t).isOpen.value,
|
|
3627
|
-
onClose:
|
|
3627
|
+
onClose: te,
|
|
3628
3628
|
onKeydown: oe
|
|
3629
3629
|
}, {
|
|
3630
3630
|
default: d(() => [E("div", {
|
|
@@ -3644,8 +3644,8 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3644
3644
|
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
3645
|
"aria-label": b(n).mergeTag.picker.close,
|
|
3646
3646
|
"data-testid": "merge-tag-picker-close",
|
|
3647
|
-
onClick:
|
|
3648
|
-
}, [N(b(
|
|
3647
|
+
onClick: te
|
|
3648
|
+
}, [N(b(Je), {
|
|
3649
3649
|
size: 16,
|
|
3650
3650
|
"stroke-width": 2
|
|
3651
3651
|
})], 8, Lc)]),
|
|
@@ -3678,12 +3678,12 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3678
3678
|
E("div", {
|
|
3679
3679
|
id: Zc,
|
|
3680
3680
|
ref_key: "listRef",
|
|
3681
|
-
ref:
|
|
3681
|
+
ref: H,
|
|
3682
3682
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3683
3683
|
role: "listbox",
|
|
3684
3684
|
"aria-label": b(n).mergeTag.picker.title,
|
|
3685
3685
|
"data-testid": "merge-tag-picker-list"
|
|
3686
|
-
}, [le.value ? (s(), v("div", Uc, g(b(n).mergeTag.picker.empty), 1)) : W.value ? (s(), v("div", Wc, g(b(n).mergeTag.picker.noResults), 1)) : (s(!0), v(A, { key: 2 }, l(
|
|
3686
|
+
}, [le.value ? (s(), v("div", Uc, g(b(n).mergeTag.picker.empty), 1)) : W.value ? (s(), v("div", Wc, 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
3687
|
key: 0,
|
|
3688
3688
|
ref_for: !0,
|
|
3689
3689
|
ref: (t) => re(e.group, t),
|
|
@@ -3694,9 +3694,9 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3694
3694
|
"data-testid": "merge-tag-picker-group-header",
|
|
3695
3695
|
"data-group-name": e.group,
|
|
3696
3696
|
"data-group-collapsed": F(e.group) ? "true" : "false",
|
|
3697
|
-
onClick: (t) =>
|
|
3697
|
+
onClick: (t) => I(e.group)
|
|
3698
3698
|
}, [
|
|
3699
|
-
N(b(
|
|
3699
|
+
N(b(_e), {
|
|
3700
3700
|
size: 12,
|
|
3701
3701
|
"stroke-width": 2,
|
|
3702
3702
|
class: T(["tpl:transition-transform", F(e.group) ? "tpl:-rotate-90" : ""])
|
|
@@ -3733,7 +3733,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3733
3733
|
syntax: {}
|
|
3734
3734
|
},
|
|
3735
3735
|
setup(e) {
|
|
3736
|
-
let t = e, n = _(() =>
|
|
3736
|
+
let t = e, n = _(() => Se(t.value, t.syntax)), r = _(() => L(t.value, t.syntax));
|
|
3737
3737
|
return (e, t) => n.value ? (s(), v("span", {
|
|
3738
3738
|
key: 0,
|
|
3739
3739
|
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",
|
|
@@ -3778,7 +3778,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3778
3778
|
}, vl = "tpl-logic-picker-list", yl = /* @__PURE__ */ M({
|
|
3779
3779
|
__name: "LogicTagPickerModal",
|
|
3780
3780
|
setup(e) {
|
|
3781
|
-
let t =
|
|
3781
|
+
let t = Ve(He, "LogicTagPickerModal"), { t: n } = U(), i = u(Qe, ye.liquid), a = u(ze, null), o = u(Ye, null), f = p(""), m = Te(f, 200), C = p(null), D = _(() => m.value.trim().length > 0), k = p(0);
|
|
3782
3782
|
function j(e) {
|
|
3783
3783
|
let t = m.value.trim().toLowerCase();
|
|
3784
3784
|
return !t || e.filter(Boolean).join(" ").toLowerCase().includes(t);
|
|
@@ -3792,7 +3792,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3792
3792
|
e.before,
|
|
3793
3793
|
e.after,
|
|
3794
3794
|
e.description
|
|
3795
|
-
]))),
|
|
3795
|
+
]))), I = _(() => [...F.value.map((e) => ({
|
|
3796
3796
|
kind: "pair",
|
|
3797
3797
|
pair: e,
|
|
3798
3798
|
group: e.group
|
|
@@ -3800,7 +3800,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3800
3800
|
kind: "tag",
|
|
3801
3801
|
tag: e,
|
|
3802
3802
|
group: e.group
|
|
3803
|
-
}))]),
|
|
3803
|
+
}))]), ee = _(() => t.tags.value.some((e) => !!e.group) || t.pairs.value.some((e) => !!e.group));
|
|
3804
3804
|
function L(e) {
|
|
3805
3805
|
let t = n.logicTag.picker.otherGroup, r = /* @__PURE__ */ new Map(), i = [];
|
|
3806
3806
|
for (let n of e) {
|
|
@@ -3809,7 +3809,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3809
3809
|
}
|
|
3810
3810
|
return i.map((e) => [e, r.get(e)]);
|
|
3811
3811
|
}
|
|
3812
|
-
let
|
|
3812
|
+
let R = _(() => {
|
|
3813
3813
|
let e = [], t = [], n = 0, r = (r) => {
|
|
3814
3814
|
r.kind === "tag" ? (e.push({
|
|
3815
3815
|
kind: "tag",
|
|
@@ -3820,8 +3820,8 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3820
3820
|
pair: r.pair,
|
|
3821
3821
|
index: n
|
|
3822
3822
|
}), t.push(r.pair)), n++;
|
|
3823
|
-
}, i =
|
|
3824
|
-
if (D.value || !
|
|
3823
|
+
}, i = I.value;
|
|
3824
|
+
if (D.value || !ee.value) for (let e of i) r(e);
|
|
3825
3825
|
else for (let [t, n] of L(i)) {
|
|
3826
3826
|
e.push({
|
|
3827
3827
|
kind: "header",
|
|
@@ -3833,14 +3833,14 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3833
3833
|
rows: e,
|
|
3834
3834
|
items: t
|
|
3835
3835
|
};
|
|
3836
|
-
}), z = _(() =>
|
|
3836
|
+
}), z = _(() => R.value.items), B = _(() => t.tags.value.length === 0 && t.pairs.value.length === 0), te = _(() => !B.value && z.value.length === 0);
|
|
3837
3837
|
P(() => t.isOpen.value, (e) => {
|
|
3838
3838
|
e && (f.value = "", k.value = 0, c(() => C.value?.focus()));
|
|
3839
3839
|
}), P(z, (e) => {
|
|
3840
3840
|
k.value >= e.length && (k.value = Math.max(0, e.length - 1));
|
|
3841
3841
|
});
|
|
3842
|
-
let
|
|
3843
|
-
function
|
|
3842
|
+
let V = p(null);
|
|
3843
|
+
function H(e) {
|
|
3844
3844
|
t.resolve(e);
|
|
3845
3845
|
}
|
|
3846
3846
|
function ne() {
|
|
@@ -3848,7 +3848,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3848
3848
|
}
|
|
3849
3849
|
function re(e) {
|
|
3850
3850
|
z.value.length !== 0 && (k.value = Math.max(0, Math.min(z.value.length - 1, k.value + e)), c(() => {
|
|
3851
|
-
|
|
3851
|
+
V.value?.querySelector(`[data-logic-index="${k.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3852
3852
|
}));
|
|
3853
3853
|
}
|
|
3854
3854
|
function ie(e) {
|
|
@@ -3857,7 +3857,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3857
3857
|
else if (e.key === "Enter") {
|
|
3858
3858
|
e.preventDefault();
|
|
3859
3859
|
let t = z.value[k.value];
|
|
3860
|
-
t &&
|
|
3860
|
+
t && H(t);
|
|
3861
3861
|
}
|
|
3862
3862
|
}
|
|
3863
3863
|
function ae(e) {
|
|
@@ -3889,7 +3889,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3889
3889
|
"aria-label": b(n).logicTag.picker.close,
|
|
3890
3890
|
"data-testid": "logic-picker-close",
|
|
3891
3891
|
onClick: ne
|
|
3892
|
-
}, [N(b(
|
|
3892
|
+
}, [N(b(Je), {
|
|
3893
3893
|
size: 16,
|
|
3894
3894
|
"stroke-width": 2
|
|
3895
3895
|
})], 8, il)]),
|
|
@@ -3914,12 +3914,12 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3914
3914
|
E("div", {
|
|
3915
3915
|
id: vl,
|
|
3916
3916
|
ref_key: "listRef",
|
|
3917
|
-
ref:
|
|
3917
|
+
ref: V,
|
|
3918
3918
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3919
3919
|
role: "listbox",
|
|
3920
3920
|
"aria-label": b(n).logicTag.picker.title,
|
|
3921
3921
|
"data-testid": "logic-picker-list"
|
|
3922
|
-
}, [B.value ? (s(), v("div", cl, g(b(n).logicTag.picker.empty), 1)) :
|
|
3922
|
+
}, [B.value ? (s(), v("div", cl, g(b(n).logicTag.picker.empty), 1)) : te.value ? (s(), v("div", ll, 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
3923
|
key: 0,
|
|
3924
3924
|
class: "tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]",
|
|
3925
3925
|
"data-testid": "logic-picker-header",
|
|
@@ -3936,7 +3936,7 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3936
3936
|
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
3937
|
"data-testid": "logic-picker-item",
|
|
3938
3938
|
onMousemove: (t) => k.value = e.index,
|
|
3939
|
-
onClick: (t) =>
|
|
3939
|
+
onClick: (t) => H(e.kind === "tag" ? e.tag : e.pair)
|
|
3940
3940
|
}, [
|
|
3941
3941
|
E("span", fl, [E("span", pl, g(e.kind === "tag" ? e.tag.label : e.pair.label), 1), e.kind === "tag" ? (s(), v("span", ml, [N(el, {
|
|
3942
3942
|
value: e.tag.value,
|
|
@@ -3963,4 +3963,4 @@ var co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = ["value"], fo = {
|
|
|
3963
3963
|
//#endregion
|
|
3964
3964
|
export { Oc as a, vc as c, an as d, qt as f, Ac as i, gn as l, Qc as n, Ec as o, Nc as r, Cc as s, yl as t, on as u };
|
|
3965
3965
|
|
|
3966
|
-
//# sourceMappingURL=styles-
|
|
3966
|
+
//# sourceMappingURL=styles-Dx-jXeCd.js.map
|