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