@templatical/editor 0.12.1 → 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-CXH7l1Ar.js → AiChatSidebar-J8iO_sX7.js} +16 -16
- package/dist/{AiFeatureMenu-BKbUUc1D.js → AiFeatureMenu-F2diEDgV.js} +10 -10
- package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-a-qlByxF.js} +5 -5
- package/dist/{CloudEditor-CB16QzKM.js → CloudEditor-CDjtwb4i.js} +284 -250
- package/dist/{CollaboratorBar-ACUA7lBJ.js → CollaboratorBar-B_EnJLtW.js} +4 -4
- package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-DaP9BA_r.js} +18 -18
- package/dist/{CountdownBlock-C-6o19qS.js → CountdownBlock-DtAokAVw.js} +3 -3
- package/dist/{CountdownToolbar-Dol7Q0Pv.js → CountdownToolbar-Dtqgwy0g.js} +3 -3
- package/dist/{DesignReferenceSidebar-0dTsBW08.js → DesignReferenceSidebar-BHRlTqlT.js} +21 -33
- 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-CpaumPMS.js → ModulePreviewCanvas-Cx4MOJ0X.js} +21 -21
- package/dist/{NumberWithSuffix-Bp40ik4l.js → NumberWithSuffix-D2mW_DhT.js} +4 -4
- package/dist/{ParagraphEditor-BqRFV_Y-.js → ParagraphEditor-DMzkVnST.js} +156 -136
- package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-CRCxCwKf.js} +7 -7
- package/dist/{SaveModuleDialog-DmfvH5D0.js → SaveModuleDialog-DuEKgumL.js} +8 -8
- package/dist/{SnapshotHistory-C052o-8U.js → SnapshotHistory-CVgiNJtE.js} +12 -12
- package/dist/{TemplateScoringPanel-CUs8XmIi.js → TemplateScoringPanel-lm0_9nYi.js} +26 -26
- package/dist/{TestEmailModal-BIIxRWUt.js → TestEmailModal-WBMdiW5S.js} +5 -5
- package/dist/{TitleEditor-FMh54Cx5.js → TitleEditor-eyT0h-Sa.js} +71 -55
- package/dist/{TplModal-utMtXzSO.js → TplModal-tjQ7OB0g.js} +4 -4
- package/dist/{blockTypeIcons-C6UGDmrC.js → blockTypeIcons-DdB3uTKD.js} +5 -5
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js → AiFeatureMenu-D7rB2SBs.js} +9 -9
- package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js.map → AiFeatureMenu-D7rB2SBs.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js → BlockIssueBadge-DHOe0pgx.js} +6 -6
- package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js.map → BlockIssueBadge-DHOe0pgx.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DSeihOan.js → CloudEditor-DNed_Ym0.js} +273 -239
- package/dist/cdn/chunks/CloudEditor-DNed_Ym0.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js → CollaboratorBar-sj_9Lee3.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js.map → CollaboratorBar-sj_9Lee3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js → CountdownBlock-C1Ikjpn4.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js.map → CountdownBlock-C1Ikjpn4.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BQn0Kj0X.js → CountdownToolbar-j1G_X8rB.js} +4 -4
- package/dist/cdn/chunks/CountdownToolbar-j1G_X8rB.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js → IssuesPanel-CTOf3PsH.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js.map → IssuesPanel-CTOf3PsH.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js → ModuleBrowserModal-DCh88-rr.js} +13 -10
- package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js.map → ModuleBrowserModal-DCh88-rr.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js → ModulePreviewCanvas-DJqvTKmg.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js.map → ModulePreviewCanvas-DJqvTKmg.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js → NumberWithSuffix-Bu45XWSl.js} +5 -5
- package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js.map → NumberWithSuffix-Bu45XWSl.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BnhnFOW1.js → ParagraphEditor-DwZqLJp2.js} +131 -111
- package/dist/cdn/chunks/ParagraphEditor-DwZqLJp2.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js → RichTextEditorContent-CIuZ-2DV.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js.map → RichTextEditorContent-CIuZ-2DV.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js → SaveModuleDialog-Bep0X2s_.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js.map → SaveModuleDialog-Bep0X2s_.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CQqklX0D.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-CpGPHppB.js.map → blockTypeIcons-8o24HVJu.js.map} +1 -1
- package/dist/cdn/chunks/{de-BpseTWOA.js → de-LsV0u1tP.js} +20 -2
- 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-VGIQ0WNq.js → en-Bb8X1bOs.js} +20 -2
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Ds9GnMcd.js → extensions-iwBXnEwq.js} +21 -21
- package/dist/cdn/chunks/{extensions-Ds9GnMcd.js.map → extensions-iwBXnEwq.js.map} +1 -1
- package/dist/cdn/chunks/{features-DxWz_Enw.js → features-CkTMVylx.js} +996 -817
- package/dist/cdn/chunks/features-CkTMVylx.js.map +1 -0
- package/dist/cdn/chunks/{icons-BflGUmFY.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-C479-QcE.js → media-library-DMRIPx4g.js} +373 -371
- package/dist/cdn/chunks/media-library-DMRIPx4g.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-zAqpLQbW.js → pt-BR-BwJY_cvb.js} +20 -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-BL_pEvFP.js.map → quality-CyeUgs_c.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-C0vdAODQ.js → renderer-BIKUEKDD.js} +38 -29
- package/dist/cdn/chunks/{renderer-C0vdAODQ.js.map → renderer-BIKUEKDD.js.map} +1 -1
- package/dist/cdn/chunks/{src-DzvOWQ9S.js → src-pDy_imWG.js} +56 -56
- package/dist/cdn/chunks/{src-DzvOWQ9S.js.map → src-pDy_imWG.js.map} +1 -1
- package/dist/cdn/chunks/{styles-LfeoSNRA.js → styles-D4Bd3SCx.js} +1356 -905
- 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 +101 -97
- 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/{de-BpseTWOA.js → de-LsV0u1tP.js} +19 -1
- 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-DJ9aD8yA.js → dist-DuCzdgDA.js} +54 -5
- package/dist/{dist-o73iaGqy.js → dist-U5vfDdYI.js} +1 -1
- package/dist/{en-VGIQ0WNq.js → en-Bb8X1bOs.js} +19 -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-zAqpLQbW.js → pt-BR-BwJY_cvb.js} +19 -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-DSm9Ijxt.js → styles-BUwDOWd3.js} +1335 -882
- package/dist/templatical-editor.js +143 -139
- 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-e5kDRkPb.js +17 -0
- package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-cUQj9rmB.js} +1 -1
- package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-CYJKqXtI.js} +2 -2
- package/dist/{useEditorCore-D7dQFRkw.js → useEditorCore-8JxXDOA4.js} +1075 -894
- 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-Bz9hSjMS.js +0 -198
- package/dist/cdn/chunks/CloudEditor-DSeihOan.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-BQn0Kj0X.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-BnhnFOW1.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CQqklX0D.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-CpGPHppB.js +0 -22
- package/dist/cdn/chunks/de-BpseTWOA.js.map +0 -1
- package/dist/cdn/chunks/en-VGIQ0WNq.js.map +0 -1
- package/dist/cdn/chunks/features-DxWz_Enw.js.map +0 -1
- package/dist/cdn/chunks/icons-BflGUmFY.js.map +0 -1
- package/dist/cdn/chunks/media-library-C479-QcE.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-zAqpLQbW.js.map +0 -1
- package/dist/cdn/chunks/quality-BL_pEvFP.js +0 -2176
- package/dist/cdn/chunks/styles-LfeoSNRA.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
|
|
2
|
-
import { $
|
|
3
|
-
import { A as
|
|
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 It(e) {
|
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
-
var
|
|
18
|
+
var 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 Lt = ["aria-label"], Rt = {
|
|
|
44
44
|
],
|
|
45
45
|
setup(e, { emit: t }) {
|
|
46
46
|
let n = {
|
|
47
|
-
section:
|
|
47
|
+
section: ie,
|
|
48
48
|
title: ue,
|
|
49
|
-
paragraph:
|
|
50
|
-
image:
|
|
51
|
-
button:
|
|
52
|
-
divider:
|
|
53
|
-
spacer:
|
|
54
|
-
html:
|
|
55
|
-
social:
|
|
56
|
-
menu:
|
|
57
|
-
table:
|
|
58
|
-
video:
|
|
59
|
-
countdown:
|
|
60
|
-
custom:
|
|
61
|
-
}, i = e, s = t, { t: d } =
|
|
49
|
+
paragraph: Te,
|
|
50
|
+
image: Ce,
|
|
51
|
+
button: ge,
|
|
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({
|
|
@@ -66,31 +66,31 @@ var Lt = ["aria-label"], Rt = {
|
|
|
66
66
|
blocks: e
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
}),
|
|
69
|
+
}), F = g(() => {
|
|
70
70
|
switch (i.viewport) {
|
|
71
71
|
case "mobile": return 375;
|
|
72
72
|
default: return i.content.settings.width;
|
|
73
73
|
}
|
|
74
|
-
}),
|
|
75
|
-
function
|
|
76
|
-
|
|
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);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
78
|
+
function ae() {
|
|
79
|
+
z.value && (B.value = Math.max(0, B.value - 1));
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
81
|
+
function se() {
|
|
82
|
+
B.value = 0;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
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
|
-
function
|
|
93
|
+
function _e(e, t) {
|
|
94
94
|
e.type === "custom" && m.updateBlock(e.id, {
|
|
95
95
|
fieldValues: t.fieldValues,
|
|
96
96
|
dataSourceFetched: t.dataSourceFetched
|
|
@@ -99,7 +99,7 @@ var Lt = ["aria-label"], Rt = {
|
|
|
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
|
})
|
|
@@ -116,7 +116,7 @@ var Lt = ["aria-label"], Rt = {
|
|
|
116
116
|
"aria-label": y(d).landmarks.canvas,
|
|
117
117
|
class: "tpl-canvas-wrapper tpl:relative",
|
|
118
118
|
style: D({
|
|
119
|
-
width: `${
|
|
119
|
+
width: `${F.value}px`,
|
|
120
120
|
transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
121
121
|
})
|
|
122
122
|
}, [T("div", {
|
|
@@ -124,11 +124,11 @@ var Lt = ["aria-label"], Rt = {
|
|
|
124
124
|
"tpl-canvas--dark-mode": e.darkMode,
|
|
125
125
|
"tpl-preview-mode": e.previewMode
|
|
126
126
|
}]),
|
|
127
|
-
style: D(
|
|
128
|
-
onClick:
|
|
129
|
-
}, [
|
|
130
|
-
modelValue:
|
|
131
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
127
|
+
style: D(R.value),
|
|
128
|
+
onClick: pe
|
|
129
|
+
}, [M(y(O), {
|
|
130
|
+
modelValue: P.value,
|
|
131
|
+
"onUpdate:modelValue": n[2] ||= (e) => P.value = e,
|
|
132
132
|
group: "blocks",
|
|
133
133
|
animation: 150,
|
|
134
134
|
"ghost-class": "tpl-ghost",
|
|
@@ -141,70 +141,70 @@ var Lt = ["aria-label"], Rt = {
|
|
|
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
|
-
|
|
160
|
-
|
|
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
|
+
A(h(y(d).canvas.aiHintChat) + " ", 1),
|
|
161
161
|
T("button", {
|
|
162
162
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
163
163
|
onClick: n[0] ||= (e) => s("open-ai-chat")
|
|
164
|
-
}, [
|
|
164
|
+
}, [M(y(Re), {
|
|
165
165
|
size: 14,
|
|
166
166
|
"stroke-width": 2
|
|
167
|
-
}),
|
|
168
|
-
|
|
167
|
+
}), A(" " + h(y(p).aiMenu.aiAssistant), 1)]),
|
|
168
|
+
A(" " + h(y(d).canvas.aiHintChatSuffix), 1)
|
|
169
169
|
])) : v("", !0),
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
N.value && y(p) ? (o(), _("p", qt, [
|
|
171
|
+
A(h(y(d).canvas.aiHintDesign) + " ", 1),
|
|
172
172
|
T("button", {
|
|
173
173
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
174
174
|
onClick: n[1] ||= (e) => s("open-design-reference")
|
|
175
|
-
}, [
|
|
175
|
+
}, [M(y(ee), {
|
|
176
176
|
size: 14,
|
|
177
177
|
"stroke-width": 2
|
|
178
|
-
}),
|
|
179
|
-
|
|
178
|
+
}), A(" " + h(y(p).aiMenu.designToTemplate), 1)]),
|
|
179
|
+
A(" " + h(y(d).canvas.aiHintDesignSuffix), 1)
|
|
180
180
|
])) : v("", !0)
|
|
181
|
-
])) : v("", !0), (o(!0), _(
|
|
181
|
+
])) : v("", !0), (o(!0), _(k, null, c(P.value, (t) => r((o(), _("div", {
|
|
182
182
|
key: t.id,
|
|
183
183
|
class: "tpl-block-item"
|
|
184
|
-
}, [T("div",
|
|
184
|
+
}, [T("div", 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
|
-
onFetchData: (e) =>
|
|
207
|
+
onFetchData: (e) => _e(t, e),
|
|
208
208
|
onUpdate: (e) => y(m).updateBlock(t.id, e)
|
|
209
209
|
}, null, 40, [
|
|
210
210
|
"block",
|
|
@@ -225,12 +225,12 @@ var Lt = ["aria-label"], Rt = {
|
|
|
225
225
|
"modelValue",
|
|
226
226
|
"disabled",
|
|
227
227
|
"class"
|
|
228
|
-
])], 6)], 12,
|
|
228
|
+
])], 6)], 12, 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 Lt = ["aria-label"], Rt = {
|
|
|
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,37 +259,37 @@ function Yt(e, t) {
|
|
|
259
259
|
}
|
|
260
260
|
//#endregion
|
|
261
261
|
//#region src/components/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
262
|
-
var
|
|
262
|
+
var 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
|
}
|
|
286
286
|
function E() {
|
|
287
287
|
C.value = !0;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function A() {
|
|
290
290
|
C.value = !1;
|
|
291
291
|
}
|
|
292
|
-
let
|
|
292
|
+
let j = [
|
|
293
293
|
"section",
|
|
294
294
|
"image",
|
|
295
295
|
"title",
|
|
@@ -302,38 +302,38 @@ var Xt = ["aria-label"], Zt = {
|
|
|
302
302
|
"table",
|
|
303
303
|
"spacer",
|
|
304
304
|
"html"
|
|
305
|
-
],
|
|
306
|
-
let e =
|
|
305
|
+
], P = g(() => {
|
|
306
|
+
let e = j.map((e) => ({
|
|
307
307
|
type: e,
|
|
308
|
-
label:
|
|
308
|
+
label: ae(e, t)
|
|
309
309
|
}));
|
|
310
310
|
return m.plan && e.splice(-1, 0, {
|
|
311
311
|
type: "countdown",
|
|
312
|
-
label:
|
|
312
|
+
label: ae("countdown", t)
|
|
313
313
|
}), e;
|
|
314
|
-
}),
|
|
314
|
+
}), F = g(() => i.map((e) => ({
|
|
315
315
|
type: `custom:${e.type}`,
|
|
316
316
|
label: e.name,
|
|
317
317
|
isCustom: !0,
|
|
318
318
|
icon: e.icon
|
|
319
|
-
}))),
|
|
320
|
-
|
|
321
|
-
for (let t of e)
|
|
319
|
+
}))), 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,65 +349,65 @@ var Xt = ["aria-label"], Zt = {
|
|
|
349
349
|
onMouseleave: w,
|
|
350
350
|
onFocusin: i[2] ||= (e) => S.value = !0,
|
|
351
351
|
onFocusout: i[3] ||= (e) => S.value = !1
|
|
352
|
-
}, [b.value && y(r) ? (o(), _("div",
|
|
352
|
+
}, [b.value && y(r) ? (o(), _("div", 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
|
-
|
|
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,
|
|
377
377
|
class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:gap-0.5 tpl:overflow-y-auto tpl:p-1",
|
|
378
378
|
onChoose: E,
|
|
379
|
-
onEnd:
|
|
379
|
+
onEnd: A
|
|
380
380
|
}, {
|
|
381
|
-
default: u(() => [(o(!0), _(
|
|
381
|
+
default: u(() => [(o(!0), _(k, null, c(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;
|
|
@@ -424,7 +424,7 @@ function on(e) {
|
|
|
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 on(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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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
|
}
|
|
@@ -507,7 +525,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
507
525
|
class: w([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
508
526
|
onClick: i,
|
|
509
527
|
onKeydown: [m(i, ["enter"]), m(b(i, ["prevent"]), ["space"])]
|
|
510
|
-
}, [(o(!0), _(
|
|
528
|
+
}, [(o(!0), _(k, null, c(e.segments, (e, t) => (o(), _(k, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" ? (o(), _("span", {
|
|
511
529
|
key: 0,
|
|
512
530
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium",
|
|
513
531
|
"data-tooltip": e.value,
|
|
@@ -515,7 +533,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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
|
-
}, [
|
|
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
|
-
}),
|
|
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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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
|
-
}, [(o(!0), _(
|
|
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, [
|
|
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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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);
|
|
@@ -797,80 +868,80 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
797
868
|
let t = Number(e);
|
|
798
869
|
!Number.isFinite(t) || t <= 0 || s("width", t);
|
|
799
870
|
}
|
|
800
|
-
return (t, n) => (o(), _(
|
|
801
|
-
T("div",
|
|
802
|
-
class: w(y(
|
|
871
|
+
return (t, n) => (o(), _(k, null, [
|
|
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
|
-
|
|
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,8 +949,8 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
878
949
|
},
|
|
879
950
|
emits: ["update:modelValue"],
|
|
880
951
|
setup(e, { emit: t }) {
|
|
881
|
-
let n = e, r = t, { t: i } =
|
|
882
|
-
|
|
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);
|
|
953
|
+
N(a, (e) => {
|
|
883
954
|
!e && s.value && (s.value = !1);
|
|
884
955
|
});
|
|
885
956
|
function c(e, t) {
|
|
@@ -917,130 +988,130 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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
|
-
}, [
|
|
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
|
-
}, [
|
|
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
|
-
}, [
|
|
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
|
-
}, [
|
|
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
|
-
}, [
|
|
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
|
-
}, [
|
|
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
|
-
}, [
|
|
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
|
-
}, [
|
|
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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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
|
-
}, [
|
|
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,37 +1150,37 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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
|
-
function
|
|
1162
|
+
function j(e) {
|
|
1092
1163
|
b.has(e) ? b.delete(e) : b.add(e);
|
|
1093
1164
|
}
|
|
1094
|
-
let
|
|
1095
|
-
function
|
|
1096
|
-
S.value = !0,
|
|
1165
|
+
let P = g(() => p.length > 0 || m), F = g(() => n.block.displayCondition ? !p.some((e) => e.label === n.block.displayCondition?.label) : !1);
|
|
1166
|
+
function I() {
|
|
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(),
|
|
1102
1173
|
after: D.value.trim()
|
|
1103
1174
|
} }), S.value = !1, E.value = "", D.value = "");
|
|
1104
1175
|
}
|
|
1105
|
-
|
|
1176
|
+
N(() => n.block.displayCondition, (e) => {
|
|
1106
1177
|
if (!e) {
|
|
1107
1178
|
S.value = !1, E.value = "", D.value = "";
|
|
1108
1179
|
return;
|
|
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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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
|
-
|
|
1208
|
+
M(oi, {
|
|
1138
1209
|
title: y(s).blockSettings.spacing,
|
|
1139
1210
|
open: b.has("spacing"),
|
|
1140
1211
|
"no-border": e.isFirstSection,
|
|
1141
|
-
onToggle: n[1] ||= (e) =>
|
|
1212
|
+
onToggle: n[1] ||= (e) => j("spacing")
|
|
1142
1213
|
}, {
|
|
1143
|
-
default: u(() => [
|
|
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,53 +1222,53 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1151
1222
|
"open",
|
|
1152
1223
|
"no-border"
|
|
1153
1224
|
]),
|
|
1154
|
-
|
|
1225
|
+
M(oi, {
|
|
1155
1226
|
title: y(s).blockSettings.background,
|
|
1156
1227
|
open: b.has("bg"),
|
|
1157
|
-
onToggle: n[3] ||= (e) =>
|
|
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
|
-
|
|
1236
|
+
M(oi, {
|
|
1166
1237
|
title: y(s).blockSettings.display,
|
|
1167
1238
|
open: b.has("display"),
|
|
1168
|
-
onToggle: n[4] ||= (e) =>
|
|
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
|
|
1183
1254
|
})),
|
|
1184
|
-
|
|
1255
|
+
A(" " + h(y(s).blockSettings[e.labelKey]), 1)
|
|
1185
1256
|
])), 64))])]),
|
|
1186
1257
|
_: 1
|
|
1187
1258
|
}, 8, ["title", "open"]),
|
|
1188
|
-
|
|
1259
|
+
P.value ? (o(), x(oi, {
|
|
1189
1260
|
key: 0,
|
|
1190
1261
|
title: y(s).blockSettings.displayCondition,
|
|
1191
1262
|
open: b.has("condition"),
|
|
1192
|
-
onToggle: n[8] ||= (e) =>
|
|
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
|
-
value: S.value ||
|
|
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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1208
1279
|
n && i("update", { displayCondition: n });
|
|
1209
1280
|
}
|
|
1210
1281
|
}, [
|
|
1211
|
-
T("option",
|
|
1212
|
-
(o(!0), _(
|
|
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
|
-
}, [(o(!0), _(
|
|
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 && !
|
|
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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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",
|
|
1266
|
-
|
|
1267
|
-
e.readOnly ? (o(), x(y(
|
|
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, [
|
|
1337
|
+
A(h(e.field.label) + " ", 1),
|
|
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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1295
1366
|
readOnly: { type: Boolean }
|
|
1296
1367
|
},
|
|
1297
1368
|
setup(e) {
|
|
1298
|
-
return (n, r) => (o(), _("div",
|
|
1299
|
-
|
|
1300
|
-
e.readOnly ? (o(), x(y(
|
|
1369
|
+
return (n, r) => (o(), _("div", ji, [T("label", { class: w(y(K)) }, [
|
|
1370
|
+
A(h(e.label) + " ", 1),
|
|
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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["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(() => [
|
|
1394
|
+
default: u(() => [M(Y, {
|
|
1324
1395
|
"model-value": e.modelValue,
|
|
1325
1396
|
placeholder: e.field.placeholder,
|
|
1326
1397
|
disabled: e.readOnly,
|
|
@@ -1339,11 +1410,15 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1339
1410
|
"read-only"
|
|
1340
1411
|
]));
|
|
1341
1412
|
}
|
|
1342
|
-
}),
|
|
1413
|
+
}), Fi = {
|
|
1414
|
+
key: 0,
|
|
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)]",
|
|
1416
|
+
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
1417
|
+
}, Ii = [
|
|
1343
1418
|
"value",
|
|
1344
1419
|
"placeholder",
|
|
1345
1420
|
"title"
|
|
1346
|
-
],
|
|
1421
|
+
], Li = ["value", "placeholder"], Ri = /* @__PURE__ */ j({
|
|
1347
1422
|
__name: "ImageField",
|
|
1348
1423
|
props: {
|
|
1349
1424
|
field: {},
|
|
@@ -1352,39 +1427,75 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1352
1427
|
},
|
|
1353
1428
|
emits: ["update:modelValue"],
|
|
1354
1429
|
setup(e, { emit: t }) {
|
|
1355
|
-
let n = t, { t:
|
|
1356
|
-
async function
|
|
1357
|
-
let e = await
|
|
1358
|
-
|
|
1430
|
+
let n = e, r = t, { t: i } = H(), a = l($e, null), s = V(), c = g(() => !!a);
|
|
1431
|
+
async function d() {
|
|
1432
|
+
let e = await a?.({ accept: ["images"] });
|
|
1433
|
+
s.alive && e && r("update:modelValue", e.url);
|
|
1434
|
+
}
|
|
1435
|
+
let p = f(), m = f(!1), b = g(() => c.value && !m.value && !n.readOnly);
|
|
1436
|
+
async function S(e) {
|
|
1437
|
+
if (a) {
|
|
1438
|
+
m.value = !0;
|
|
1439
|
+
try {
|
|
1440
|
+
let t = await a({
|
|
1441
|
+
accept: ["images"],
|
|
1442
|
+
files: e
|
|
1443
|
+
});
|
|
1444
|
+
if (!s.alive) return;
|
|
1445
|
+
t && r("update:modelValue", t.url);
|
|
1446
|
+
} finally {
|
|
1447
|
+
s.alive && (m.value = !1);
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1359
1450
|
}
|
|
1360
|
-
|
|
1451
|
+
let { isOver: C } = De({
|
|
1452
|
+
target: p,
|
|
1453
|
+
enabled: b,
|
|
1454
|
+
onFiles: S
|
|
1455
|
+
});
|
|
1456
|
+
return (t, n) => (o(), x(Ni, {
|
|
1361
1457
|
label: e.field.label,
|
|
1362
1458
|
required: e.field.required,
|
|
1363
1459
|
"read-only": e.readOnly
|
|
1364
1460
|
}, {
|
|
1365
|
-
default: u(() => [
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
class:
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
key: 1,
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
"
|
|
1387
|
-
|
|
1461
|
+
default: u(() => [T("div", {
|
|
1462
|
+
ref_key: "dropZoneRef",
|
|
1463
|
+
ref: p,
|
|
1464
|
+
class: "tpl:relative"
|
|
1465
|
+
}, [
|
|
1466
|
+
b.value && (y(C) || m.value) ? (o(), _("div", Fi, [m.value ? (o(), _(k, { key: 0 }, [M(y(Pe), {
|
|
1467
|
+
class: "tpl-spinner",
|
|
1468
|
+
size: 18,
|
|
1469
|
+
"stroke-width": 2
|
|
1470
|
+
}), A(" " + h(y(i).image.uploading), 1)], 64)) : (o(), _(k, { key: 1 }, [M(y(Ie), {
|
|
1471
|
+
size: 18,
|
|
1472
|
+
"stroke-width": 1.5
|
|
1473
|
+
}), A(" " + h(y(i).image.dropToUpload), 1)], 64))])) : v("", !0),
|
|
1474
|
+
e.readOnly ? (o(), _("input", {
|
|
1475
|
+
key: 1,
|
|
1476
|
+
type: "url",
|
|
1477
|
+
class: w([y(G), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1478
|
+
value: e.modelValue,
|
|
1479
|
+
placeholder: e.field.placeholder || "https://...",
|
|
1480
|
+
disabled: "",
|
|
1481
|
+
title: y(i).customBlocks.dataSource.readOnlyTooltip
|
|
1482
|
+
}, null, 10, Ii)) : (o(), _("input", {
|
|
1483
|
+
key: 2,
|
|
1484
|
+
type: "url",
|
|
1485
|
+
class: w(y(G)),
|
|
1486
|
+
value: e.modelValue,
|
|
1487
|
+
placeholder: e.field.placeholder || "https://...",
|
|
1488
|
+
onInput: n[0] ||= (e) => r("update:modelValue", e.target.value)
|
|
1489
|
+
}, null, 42, Li)),
|
|
1490
|
+
c.value && !e.readOnly ? (o(), _("button", {
|
|
1491
|
+
key: 3,
|
|
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)]",
|
|
1493
|
+
onClick: n[1] ||= (e) => d()
|
|
1494
|
+
}, [M(y(be), {
|
|
1495
|
+
size: 14,
|
|
1496
|
+
"stroke-width": 1.5
|
|
1497
|
+
}), A(" " + h(y(i).image.browseMedia), 1)])) : v("", !0)
|
|
1498
|
+
], 512)]),
|
|
1388
1499
|
_: 1
|
|
1389
1500
|
}, 8, [
|
|
1390
1501
|
"label",
|
|
@@ -1392,7 +1503,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1392
1503
|
"read-only"
|
|
1393
1504
|
]));
|
|
1394
1505
|
}
|
|
1395
|
-
}),
|
|
1506
|
+
}), zi = [
|
|
1396
1507
|
"value",
|
|
1397
1508
|
"placeholder",
|
|
1398
1509
|
"min",
|
|
@@ -1400,7 +1511,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1400
1511
|
"step",
|
|
1401
1512
|
"disabled",
|
|
1402
1513
|
"title"
|
|
1403
|
-
],
|
|
1514
|
+
], Bi = /* @__PURE__ */ j({
|
|
1404
1515
|
__name: "NumberField",
|
|
1405
1516
|
props: {
|
|
1406
1517
|
field: {},
|
|
@@ -1409,15 +1520,15 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1409
1520
|
},
|
|
1410
1521
|
emits: ["update:modelValue"],
|
|
1411
1522
|
setup(e, { emit: t }) {
|
|
1412
|
-
let n = t, { t: r } =
|
|
1413
|
-
return (t, i) => (o(), x(
|
|
1523
|
+
let n = t, { t: r } = H();
|
|
1524
|
+
return (t, i) => (o(), x(Ni, {
|
|
1414
1525
|
label: e.field.label,
|
|
1415
1526
|
required: e.field.required,
|
|
1416
1527
|
"read-only": e.readOnly
|
|
1417
1528
|
}, {
|
|
1418
1529
|
default: u(() => [T("input", {
|
|
1419
1530
|
type: "number",
|
|
1420
|
-
class: w([y(
|
|
1531
|
+
class: w([y(G), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1421
1532
|
value: e.modelValue,
|
|
1422
1533
|
placeholder: e.field.placeholder,
|
|
1423
1534
|
min: e.field.min,
|
|
@@ -1426,7 +1537,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1426
1537
|
disabled: e.readOnly,
|
|
1427
1538
|
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1428
1539
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
1429
|
-
}, null, 42,
|
|
1540
|
+
}, null, 42, zi)]),
|
|
1430
1541
|
_: 1
|
|
1431
1542
|
}, 8, [
|
|
1432
1543
|
"label",
|
|
@@ -1434,10 +1545,10 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1434
1545
|
"read-only"
|
|
1435
1546
|
]));
|
|
1436
1547
|
}
|
|
1437
|
-
}),
|
|
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 = {
|
|
1438
1549
|
key: 1,
|
|
1439
1550
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1440
|
-
},
|
|
1551
|
+
}, Ki = /* @__PURE__ */ j({
|
|
1441
1552
|
__name: "RepeatableField",
|
|
1442
1553
|
props: {
|
|
1443
1554
|
field: {},
|
|
@@ -1446,7 +1557,7 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1446
1557
|
},
|
|
1447
1558
|
emits: ["update:modelValue"],
|
|
1448
1559
|
setup(e, { emit: t }) {
|
|
1449
|
-
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);
|
|
1450
1561
|
function f() {
|
|
1451
1562
|
if (!l.value || n.readOnly) return;
|
|
1452
1563
|
let e = {};
|
|
@@ -1459,30 +1570,31 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1459
1570
|
t.splice(e, 1), r("update:modelValue", t);
|
|
1460
1571
|
}
|
|
1461
1572
|
function m(e, t, n) {
|
|
1462
|
-
|
|
1573
|
+
let i = s.value.map((r, i) => i === e ? {
|
|
1463
1574
|
...r,
|
|
1464
1575
|
[t]: n
|
|
1465
|
-
} : r)
|
|
1576
|
+
} : r);
|
|
1577
|
+
r("update:modelValue", i);
|
|
1466
1578
|
}
|
|
1467
|
-
return (t, n) => (o(), x(
|
|
1579
|
+
return (t, n) => (o(), x(Ni, {
|
|
1468
1580
|
label: e.field.label,
|
|
1469
1581
|
required: e.field.required,
|
|
1470
1582
|
"read-only": e.readOnly
|
|
1471
1583
|
}, {
|
|
1472
|
-
default: u(() => [T("div",
|
|
1473
|
-
(o(!0), _(
|
|
1584
|
+
default: u(() => [T("div", Vi, [
|
|
1585
|
+
(o(!0), _(k, null, c(s.value, (t, n) => (o(), _("div", {
|
|
1474
1586
|
key: `${e.field.key}-${n}`,
|
|
1475
1587
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1476
|
-
}, [T("div",
|
|
1588
|
+
}, [T("div", Hi, [T("span", Ui, " #" + h(n + 1), 1), d.value && !e.readOnly ? (o(), _("button", {
|
|
1477
1589
|
key: 0,
|
|
1478
1590
|
type: "button",
|
|
1479
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)]",
|
|
1480
1592
|
title: y(i).customBlocks.fields.removeItem,
|
|
1481
1593
|
onClick: (e) => p(n)
|
|
1482
|
-
}, [
|
|
1594
|
+
}, [M(y(tt), {
|
|
1483
1595
|
size: 12,
|
|
1484
1596
|
"stroke-width": 2
|
|
1485
|
-
})], 8,
|
|
1597
|
+
})], 8, Wi)) : v("", !0)]), (o(!0), _(k, null, c(e.field.fields, (r) => (o(), x(a(y(ta)(r.type)), {
|
|
1486
1598
|
key: r.key,
|
|
1487
1599
|
field: r,
|
|
1488
1600
|
"model-value": t[r.key],
|
|
@@ -1497,13 +1609,13 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1497
1609
|
l.value && !e.readOnly ? (o(), _("button", {
|
|
1498
1610
|
key: 0,
|
|
1499
1611
|
type: "button",
|
|
1500
|
-
class: w(y(
|
|
1612
|
+
class: w(y(Pt)),
|
|
1501
1613
|
onClick: f
|
|
1502
|
-
}, [
|
|
1614
|
+
}, [M(y(W), {
|
|
1503
1615
|
size: 14,
|
|
1504
1616
|
"stroke-width": 2
|
|
1505
|
-
}),
|
|
1506
|
-
!l.value && !e.readOnly ? (o(), _("p",
|
|
1617
|
+
}), A(" " + h(y(i).customBlocks.fields.addItem), 1)], 2)) : v("", !0),
|
|
1618
|
+
!l.value && !e.readOnly ? (o(), _("p", Gi, h(y(i).customBlocks.fields.maxItemsReached), 1)) : v("", !0)
|
|
1507
1619
|
])]),
|
|
1508
1620
|
_: 1
|
|
1509
1621
|
}, 8, [
|
|
@@ -1512,11 +1624,11 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1512
1624
|
"read-only"
|
|
1513
1625
|
]));
|
|
1514
1626
|
}
|
|
1515
|
-
}),
|
|
1627
|
+
}), qi = [
|
|
1516
1628
|
"value",
|
|
1517
1629
|
"disabled",
|
|
1518
1630
|
"title"
|
|
1519
|
-
],
|
|
1631
|
+
], Ji = ["value"], Yi = /* @__PURE__ */ j({
|
|
1520
1632
|
__name: "SelectField",
|
|
1521
1633
|
props: {
|
|
1522
1634
|
field: {},
|
|
@@ -1525,22 +1637,22 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1525
1637
|
},
|
|
1526
1638
|
emits: ["update:modelValue"],
|
|
1527
1639
|
setup(e, { emit: t }) {
|
|
1528
|
-
let n = t, { t: r } =
|
|
1529
|
-
return (t, i) => (o(), x(
|
|
1640
|
+
let n = t, { t: r } = H();
|
|
1641
|
+
return (t, i) => (o(), x(Ni, {
|
|
1530
1642
|
label: e.field.label,
|
|
1531
1643
|
required: e.field.required,
|
|
1532
1644
|
"read-only": e.readOnly
|
|
1533
1645
|
}, {
|
|
1534
1646
|
default: u(() => [T("select", {
|
|
1535
|
-
class: w([y(
|
|
1647
|
+
class: w([y(G), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1536
1648
|
value: e.modelValue,
|
|
1537
1649
|
disabled: e.readOnly,
|
|
1538
1650
|
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1539
1651
|
onChange: i[0] ||= (t) => !e.readOnly && n("update:modelValue", t.target.value)
|
|
1540
|
-
}, [(o(!0), _(
|
|
1652
|
+
}, [(o(!0), _(k, null, c(e.field.options, (e) => (o(), _("option", {
|
|
1541
1653
|
key: e.value,
|
|
1542
1654
|
value: e.value
|
|
1543
|
-
}, h(e.label), 9,
|
|
1655
|
+
}, h(e.label), 9, Ji))), 128))], 42, qi)]),
|
|
1544
1656
|
_: 1
|
|
1545
1657
|
}, 8, [
|
|
1546
1658
|
"label",
|
|
@@ -1548,11 +1660,11 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1548
1660
|
"read-only"
|
|
1549
1661
|
]));
|
|
1550
1662
|
}
|
|
1551
|
-
}),
|
|
1663
|
+
}), Xi = [
|
|
1552
1664
|
"value",
|
|
1553
1665
|
"placeholder",
|
|
1554
1666
|
"title"
|
|
1555
|
-
],
|
|
1667
|
+
], Zi = /* @__PURE__ */ j({
|
|
1556
1668
|
__name: "TextField",
|
|
1557
1669
|
props: {
|
|
1558
1670
|
field: {},
|
|
@@ -1561,8 +1673,8 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1561
1673
|
},
|
|
1562
1674
|
emits: ["update:modelValue"],
|
|
1563
1675
|
setup(e, { emit: t }) {
|
|
1564
|
-
let n = t, { t: r } =
|
|
1565
|
-
return (t, i) => (o(), x(
|
|
1676
|
+
let n = t, { t: r } = H();
|
|
1677
|
+
return (t, i) => (o(), x(Ni, {
|
|
1566
1678
|
label: e.field.label,
|
|
1567
1679
|
required: e.field.required,
|
|
1568
1680
|
"read-only": e.readOnly
|
|
@@ -1570,12 +1682,12 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1570
1682
|
default: u(() => [e.readOnly ? (o(), _("input", {
|
|
1571
1683
|
key: 0,
|
|
1572
1684
|
type: "text",
|
|
1573
|
-
class: w([y(
|
|
1685
|
+
class: w([y(G), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1574
1686
|
value: e.modelValue,
|
|
1575
1687
|
placeholder: e.field.placeholder,
|
|
1576
1688
|
disabled: "",
|
|
1577
1689
|
title: y(r).customBlocks.dataSource.readOnlyTooltip
|
|
1578
|
-
}, null, 10,
|
|
1690
|
+
}, null, 10, Xi)) : (o(), x(Q, {
|
|
1579
1691
|
key: 1,
|
|
1580
1692
|
"model-value": e.modelValue,
|
|
1581
1693
|
placeholder: e.field.placeholder,
|
|
@@ -1588,13 +1700,13 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1588
1700
|
"read-only"
|
|
1589
1701
|
]));
|
|
1590
1702
|
}
|
|
1591
|
-
}),
|
|
1703
|
+
}), Qi = [
|
|
1592
1704
|
"value",
|
|
1593
1705
|
"placeholder",
|
|
1594
1706
|
"title"
|
|
1595
|
-
],
|
|
1596
|
-
text:
|
|
1597
|
-
textarea: /* @__PURE__ */
|
|
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,
|
|
1709
|
+
textarea: /* @__PURE__ */ j({
|
|
1598
1710
|
__name: "TextareaField",
|
|
1599
1711
|
props: {
|
|
1600
1712
|
field: {},
|
|
@@ -1603,8 +1715,8 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1603
1715
|
},
|
|
1604
1716
|
emits: ["update:modelValue"],
|
|
1605
1717
|
setup(e, { emit: t }) {
|
|
1606
|
-
let n = t, { t: r } =
|
|
1607
|
-
return (t, i) => (o(), x(
|
|
1718
|
+
let n = t, { t: r } = H();
|
|
1719
|
+
return (t, i) => (o(), x(Ni, {
|
|
1608
1720
|
label: e.field.label,
|
|
1609
1721
|
required: e.field.required,
|
|
1610
1722
|
"read-only": e.readOnly
|
|
@@ -1616,8 +1728,8 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1616
1728
|
rows: "3",
|
|
1617
1729
|
disabled: "",
|
|
1618
1730
|
title: y(r).customBlocks.dataSource.readOnlyTooltip,
|
|
1619
|
-
class: w(
|
|
1620
|
-
}, null, 8,
|
|
1731
|
+
class: w($i)
|
|
1732
|
+
}, null, 8, Qi)) : (o(), x(An, {
|
|
1621
1733
|
key: 1,
|
|
1622
1734
|
"model-value": e.modelValue,
|
|
1623
1735
|
placeholder: e.field.placeholder,
|
|
@@ -1631,42 +1743,42 @@ var sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip
|
|
|
1631
1743
|
]));
|
|
1632
1744
|
}
|
|
1633
1745
|
}),
|
|
1634
|
-
image:
|
|
1635
|
-
color:
|
|
1636
|
-
number:
|
|
1637
|
-
select:
|
|
1638
|
-
boolean:
|
|
1639
|
-
repeatable:
|
|
1746
|
+
image: Ri,
|
|
1747
|
+
color: Pi,
|
|
1748
|
+
number: Bi,
|
|
1749
|
+
select: Yi,
|
|
1750
|
+
boolean: Ai,
|
|
1751
|
+
repeatable: Ki
|
|
1640
1752
|
};
|
|
1641
|
-
function
|
|
1642
|
-
return
|
|
1753
|
+
function ta(e) {
|
|
1754
|
+
return ea[e] ?? Zi;
|
|
1643
1755
|
}
|
|
1644
1756
|
//#endregion
|
|
1645
1757
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1646
|
-
var
|
|
1758
|
+
var na = {
|
|
1647
1759
|
key: 0,
|
|
1648
1760
|
class: "tpl:p-4"
|
|
1649
|
-
},
|
|
1761
|
+
}, ra = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ia = { key: 1 }, aa = {
|
|
1650
1762
|
key: 0,
|
|
1651
1763
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1652
|
-
},
|
|
1764
|
+
}, oa = {
|
|
1653
1765
|
key: 1,
|
|
1654
1766
|
class: "tpl:mb-4"
|
|
1655
|
-
},
|
|
1767
|
+
}, sa = {
|
|
1656
1768
|
key: 1,
|
|
1657
1769
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1658
|
-
},
|
|
1770
|
+
}, ca = {
|
|
1659
1771
|
key: 0,
|
|
1660
1772
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1661
|
-
},
|
|
1773
|
+
}, la = {
|
|
1662
1774
|
key: 2,
|
|
1663
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)]"
|
|
1664
|
-
},
|
|
1776
|
+
}, ua = /* @__PURE__ */ j({
|
|
1665
1777
|
__name: "CustomBlockToolbar",
|
|
1666
1778
|
props: { block: {} },
|
|
1667
1779
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1668
1780
|
setup(e, { emit: t }) {
|
|
1669
|
-
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({
|
|
1670
1782
|
definition: u,
|
|
1671
1783
|
block: g(() => n.block),
|
|
1672
1784
|
onUpdate: (e, t) => {
|
|
@@ -1682,23 +1794,23 @@ var Ui = {
|
|
|
1682
1794
|
[e]: t
|
|
1683
1795
|
});
|
|
1684
1796
|
}
|
|
1685
|
-
return (t, n) => u.value ? (o(), _("div",
|
|
1686
|
-
u.value.description ? (o(), _("p",
|
|
1687
|
-
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", {
|
|
1688
1800
|
key: 0,
|
|
1689
1801
|
type: "button",
|
|
1690
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)]",
|
|
1691
1803
|
onClick: n[0] ||= (...e) => y(p) && y(p)(...e)
|
|
1692
|
-
}, 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", {
|
|
1693
1805
|
key: 1,
|
|
1694
1806
|
type: "button",
|
|
1695
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)]",
|
|
1696
1808
|
onClick: n[1] ||= (...e) => y(p) && y(p)(...e)
|
|
1697
|
-
}, [
|
|
1809
|
+
}, [M(y(ze), { size: 12 }), A(" " + h(y(i).customBlocks.dataSource.changeButton), 1)]))])), y(f) ? (o(), _("p", la, [M(y(We), {
|
|
1698
1810
|
size: 14,
|
|
1699
1811
|
class: "tpl:shrink-0"
|
|
1700
|
-
}),
|
|
1701
|
-
(o(!0), _(
|
|
1812
|
+
}), A(" " + h(y(i).customBlocks.dataSource.fetchError), 1)])) : v("", !0)])) : v("", !0),
|
|
1813
|
+
(o(!0), _(k, null, c(u.value.fields, (t) => (o(), x(a(y(ta)(t.type)), {
|
|
1702
1814
|
key: t.key,
|
|
1703
1815
|
field: t,
|
|
1704
1816
|
"model-value": e.block.fieldValues[t.key],
|
|
@@ -1710,19 +1822,19 @@ var Ui = {
|
|
|
1710
1822
|
"read-only",
|
|
1711
1823
|
"onUpdate:modelValue"
|
|
1712
1824
|
]))), 128))
|
|
1713
|
-
])) : (o(), _("div",
|
|
1825
|
+
])) : (o(), _("div", na, [T("p", ra, h(y(i).customBlocks.toolbar.noDefinition), 1)]));
|
|
1714
1826
|
}
|
|
1715
|
-
}),
|
|
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({
|
|
1716
1828
|
__name: "DividerToolbar",
|
|
1717
1829
|
props: { block: {} },
|
|
1718
1830
|
emits: ["update"],
|
|
1719
1831
|
setup(e, { emit: t }) {
|
|
1720
|
-
let n = t, { t: r } =
|
|
1832
|
+
let n = t, { t: r } = H();
|
|
1721
1833
|
function i(e, t) {
|
|
1722
1834
|
n("update", { [e]: t });
|
|
1723
1835
|
}
|
|
1724
|
-
return (t, n) => (o(), _(
|
|
1725
|
-
T("div",
|
|
1836
|
+
return (t, n) => (o(), _(k, null, [
|
|
1837
|
+
T("div", da, [T("label", { class: w(y(K)) }, h(y(r).divider.style), 3), M(Z, {
|
|
1726
1838
|
options: [
|
|
1727
1839
|
{
|
|
1728
1840
|
value: "solid",
|
|
@@ -1740,56 +1852,60 @@ var Ui = {
|
|
|
1740
1852
|
"model-value": e.block.lineStyle,
|
|
1741
1853
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
1742
1854
|
}, null, 8, ["options", "model-value"])]),
|
|
1743
|
-
T("div",
|
|
1855
|
+
T("div", fa, [T("label", { class: w(y(K)) }, h(y(r).divider.color), 3), M(Y, {
|
|
1744
1856
|
"model-value": e.block.color,
|
|
1745
1857
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
1746
1858
|
}, null, 8, ["model-value"])]),
|
|
1747
|
-
T("div",
|
|
1859
|
+
T("div", pa, [T("label", { class: w(y(K)) }, h(y(r).divider.thickness), 3), T("div", ma, [T("input", {
|
|
1748
1860
|
type: "number",
|
|
1749
|
-
class: w(y(
|
|
1861
|
+
class: w(y(J)),
|
|
1750
1862
|
value: e.block.thickness,
|
|
1751
1863
|
min: "1",
|
|
1752
1864
|
max: "10",
|
|
1753
1865
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
1754
|
-
}, null, 42,
|
|
1866
|
+
}, null, 42, ha), T("span", { class: w(y(q)) }, "px", 2)])])
|
|
1755
1867
|
], 64));
|
|
1756
1868
|
}
|
|
1757
|
-
}),
|
|
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({
|
|
1758
1870
|
__name: "HtmlToolbar",
|
|
1759
1871
|
props: { block: {} },
|
|
1760
1872
|
emits: ["update"],
|
|
1761
1873
|
setup(e, { emit: t }) {
|
|
1762
|
-
let n = t, { t: r } =
|
|
1763
|
-
return (t, i) => (o(), _("div",
|
|
1764
|
-
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),
|
|
1765
1877
|
T("textarea", {
|
|
1766
1878
|
value: e.block.content,
|
|
1767
1879
|
placeholder: "<div>...</div>",
|
|
1768
1880
|
rows: "10",
|
|
1769
|
-
class: w(y(
|
|
1881
|
+
class: w(y(Ft)),
|
|
1770
1882
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
1771
|
-
}, null, 42,
|
|
1772
|
-
T("p",
|
|
1883
|
+
}, null, 42, va),
|
|
1884
|
+
T("p", ya, [M(y(at), {
|
|
1773
1885
|
size: 12,
|
|
1774
1886
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
1775
|
-
}),
|
|
1887
|
+
}), A(" " + h(y(r).html.sanitizationHint), 1)])
|
|
1776
1888
|
]));
|
|
1777
1889
|
}
|
|
1778
|
-
}),
|
|
1890
|
+
}), xa = { class: "tpl:mb-3.5" }, Sa = {
|
|
1891
|
+
key: 0,
|
|
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)]",
|
|
1893
|
+
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
1894
|
+
}, Ca = {
|
|
1779
1895
|
key: 0,
|
|
1780
1896
|
class: "tpl:mb-3.5"
|
|
1781
|
-
},
|
|
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 = {
|
|
1782
1898
|
key: 0,
|
|
1783
1899
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
1784
|
-
},
|
|
1900
|
+
}, Pa = ["value"], Fa = { class: "tpl:mb-3.5" }, Ia = { class: "tpl:mb-3.5" }, La = {
|
|
1785
1901
|
key: 0,
|
|
1786
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)]"
|
|
1787
|
-
},
|
|
1903
|
+
}, Ra = ["checked"], za = 350, Ba = /* @__PURE__ */ j({
|
|
1788
1904
|
__name: "ImageToolbar",
|
|
1789
1905
|
props: { block: {} },
|
|
1790
1906
|
emits: ["update"],
|
|
1791
1907
|
setup(e, { emit: t }) {
|
|
1792
|
-
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(() => {
|
|
1793
1909
|
d.value = !1;
|
|
1794
1910
|
}, 1e3, { immediate: !1 }), b = [
|
|
1795
1911
|
300,
|
|
@@ -1805,7 +1921,7 @@ var Ui = {
|
|
|
1805
1921
|
function C(e) {
|
|
1806
1922
|
if (e === "custom") {
|
|
1807
1923
|
let e = n.block.width;
|
|
1808
|
-
(typeof e != "number" || b.includes(e)) && S("width",
|
|
1924
|
+
(typeof e != "number" || b.includes(e)) && S("width", za);
|
|
1809
1925
|
return;
|
|
1810
1926
|
}
|
|
1811
1927
|
S("width", e === "full" ? "full" : Number(e));
|
|
@@ -1818,10 +1934,42 @@ var Ui = {
|
|
|
1818
1934
|
let e = await a?.({ accept: ["images"] });
|
|
1819
1935
|
c.alive && e && (S("src", e.url), e.alt && (S("alt", e.alt), p.value = !0), d.value = !0, m());
|
|
1820
1936
|
}
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
j
|
|
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) {
|
|
1939
|
+
if (a) {
|
|
1940
|
+
j.value = !0;
|
|
1941
|
+
try {
|
|
1942
|
+
let t = await a({
|
|
1943
|
+
accept: ["images"],
|
|
1944
|
+
files: e
|
|
1945
|
+
});
|
|
1946
|
+
if (!c.alive) return;
|
|
1947
|
+
t && (S("src", t.url), t.alt && (S("alt", t.alt), p.value = !0), d.value = !0, m());
|
|
1948
|
+
} finally {
|
|
1949
|
+
c.alive && (j.value = !1);
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
let { isOver: I } = De({
|
|
1954
|
+
target: O,
|
|
1955
|
+
enabled: P,
|
|
1956
|
+
onFiles: F
|
|
1957
|
+
});
|
|
1958
|
+
return (t, n) => (o(), _(k, null, [
|
|
1959
|
+
T("div", xa, [T("label", { class: w(y(K)) }, h(y(i).image.imageUrl), 3), T("div", {
|
|
1960
|
+
ref_key: "dropZoneRef",
|
|
1961
|
+
ref: O,
|
|
1962
|
+
class: "tpl:relative"
|
|
1963
|
+
}, [
|
|
1964
|
+
P.value && (y(I) || j.value) ? (o(), _("div", Sa, [j.value ? (o(), _(k, { key: 0 }, [M(y(Pe), {
|
|
1965
|
+
class: "tpl-spinner",
|
|
1966
|
+
size: 18,
|
|
1967
|
+
"stroke-width": 2
|
|
1968
|
+
}), A(" " + h(y(i).image.uploading), 1)], 64)) : (o(), _(k, { key: 1 }, [M(y(Ie), {
|
|
1969
|
+
size: 18,
|
|
1970
|
+
"stroke-width": 1.5
|
|
1971
|
+
}), A(" " + h(y(i).image.dropToUpload), 1)], 64))])) : v("", !0),
|
|
1972
|
+
M(Q, {
|
|
1825
1973
|
"model-value": e.block.src,
|
|
1826
1974
|
type: "url",
|
|
1827
1975
|
placeholder: y(i).image.imageUrlPlaceholder,
|
|
@@ -1833,7 +1981,7 @@ var Ui = {
|
|
|
1833
1981
|
"pulse"
|
|
1834
1982
|
]),
|
|
1835
1983
|
u.value ? (o(), _("button", {
|
|
1836
|
-
key:
|
|
1984
|
+
key: 1,
|
|
1837
1985
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
1838
1986
|
style: {
|
|
1839
1987
|
"border-color": "var(--tpl-border)",
|
|
@@ -1841,21 +1989,21 @@ var Ui = {
|
|
|
1841
1989
|
"background-color": "var(--tpl-bg)"
|
|
1842
1990
|
},
|
|
1843
1991
|
onClick: D
|
|
1844
|
-
}, [
|
|
1992
|
+
}, [M(y(be), {
|
|
1845
1993
|
size: 14,
|
|
1846
1994
|
"stroke-width": 1.5
|
|
1847
|
-
}),
|
|
1848
|
-
]),
|
|
1849
|
-
y(
|
|
1995
|
+
}), A(" " + h(y(i).image.browseMedia), 1)])) : v("", !0)
|
|
1996
|
+
], 512)]),
|
|
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", {
|
|
1850
1998
|
type: "url",
|
|
1851
|
-
class: w(y(
|
|
1999
|
+
class: w(y(G)),
|
|
1852
2000
|
value: e.block.placeholderUrl || "",
|
|
1853
2001
|
placeholder: y(i).image.placeholderUrlPlaceholder,
|
|
1854
2002
|
onInput: n[1] ||= (e) => S("placeholderUrl", e.target.value)
|
|
1855
|
-
}, null, 42,
|
|
1856
|
-
T("div",
|
|
1857
|
-
T("label", { class: w(y(
|
|
1858
|
-
|
|
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, {
|
|
1859
2007
|
"model-value": e.block.alt,
|
|
1860
2008
|
type: "text",
|
|
1861
2009
|
placeholder: y(i).image.altTextPlaceholder,
|
|
@@ -1868,35 +2016,35 @@ var Ui = {
|
|
|
1868
2016
|
"pulse",
|
|
1869
2017
|
"disabled"
|
|
1870
2018
|
]),
|
|
1871
|
-
T("label",
|
|
2019
|
+
T("label", Ea, [T("input", {
|
|
1872
2020
|
type: "checkbox",
|
|
1873
2021
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1874
2022
|
checked: e.block.decorative === !0,
|
|
1875
2023
|
onChange: n[3] ||= (e) => S("decorative", e.target.checked)
|
|
1876
|
-
}, 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)])])
|
|
1877
2025
|
]),
|
|
1878
|
-
T("div",
|
|
1879
|
-
T("label", { class: w(y(
|
|
2026
|
+
T("div", ka, [
|
|
2027
|
+
T("label", { class: w(y(K)) }, h(y(i).image.width), 3),
|
|
1880
2028
|
T("select", {
|
|
1881
|
-
class: w(y(
|
|
2029
|
+
class: w(y(G)),
|
|
1882
2030
|
value: x.value,
|
|
1883
2031
|
onChange: n[4] ||= (e) => C(e.target.value)
|
|
1884
2032
|
}, [
|
|
1885
|
-
T("option",
|
|
2033
|
+
T("option", ja, h(y(i).image.fullWidth), 1),
|
|
1886
2034
|
n[10] ||= T("option", { value: "300" }, "300px", -1),
|
|
1887
2035
|
n[11] ||= T("option", { value: "400" }, "400px", -1),
|
|
1888
2036
|
n[12] ||= T("option", { value: "500" }, "500px", -1),
|
|
1889
|
-
T("option",
|
|
1890
|
-
], 42,
|
|
1891
|
-
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", {
|
|
1892
2040
|
type: "number",
|
|
1893
|
-
class: w(y(
|
|
1894
|
-
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,
|
|
1895
2043
|
min: "20",
|
|
1896
2044
|
onInput: n[5] ||= (e) => E(e.target.value)
|
|
1897
|
-
}, null, 42,
|
|
2045
|
+
}, null, 42, Pa), T("span", { class: w(y(q)) }, "px", 2)])) : v("", !0)
|
|
1898
2046
|
]),
|
|
1899
|
-
T("div",
|
|
2047
|
+
T("div", Fa, [T("label", { class: w(y(K)) }, h(y(i).title.align), 3), M(Z, {
|
|
1900
2048
|
options: [
|
|
1901
2049
|
{
|
|
1902
2050
|
value: "left",
|
|
@@ -1914,28 +2062,28 @@ var Ui = {
|
|
|
1914
2062
|
"model-value": e.block.align,
|
|
1915
2063
|
"onUpdate:modelValue": n[6] ||= (e) => S("align", e)
|
|
1916
2064
|
}, null, 8, ["options", "model-value"])]),
|
|
1917
|
-
T("div",
|
|
1918
|
-
T("label", { class: w(y(
|
|
1919
|
-
|
|
2065
|
+
T("div", Ia, [
|
|
2066
|
+
T("label", { class: w(y(K)) }, h(y(i).image.linkUrl), 3),
|
|
2067
|
+
M(Q, {
|
|
1920
2068
|
"model-value": e.block.linkUrl || "",
|
|
1921
2069
|
type: "url",
|
|
1922
2070
|
placeholder: y(i).image.imageUrlPlaceholder,
|
|
1923
2071
|
"onUpdate:modelValue": n[7] ||= (e) => S("linkUrl", e)
|
|
1924
2072
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1925
|
-
e.block.linkUrl ? (o(), _("label",
|
|
2073
|
+
e.block.linkUrl ? (o(), _("label", La, [T("input", {
|
|
1926
2074
|
type: "checkbox",
|
|
1927
2075
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1928
2076
|
checked: e.block.linkOpenInNewTab ?? !1,
|
|
1929
2077
|
onChange: n[8] ||= (e) => S("linkOpenInNewTab", e.target.checked)
|
|
1930
|
-
}, null, 40,
|
|
2078
|
+
}, null, 40, Ra), A(" " + h(y(i).image.openInNewTab), 1)])) : v("", !0)
|
|
1931
2079
|
])
|
|
1932
2080
|
], 64));
|
|
1933
2081
|
}
|
|
1934
|
-
}),
|
|
2082
|
+
}), Va = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ha = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ua = [
|
|
1935
2083
|
"value",
|
|
1936
2084
|
"placeholder",
|
|
1937
2085
|
"onInput"
|
|
1938
|
-
],
|
|
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({
|
|
1939
2087
|
__name: "MenuToolbar",
|
|
1940
2088
|
props: {
|
|
1941
2089
|
block: {},
|
|
@@ -1943,7 +2091,7 @@ var Ui = {
|
|
|
1943
2091
|
},
|
|
1944
2092
|
emits: ["update"],
|
|
1945
2093
|
setup(e, { emit: t }) {
|
|
1946
|
-
let n = e, r = t, { t: i } =
|
|
2094
|
+
let n = e, r = t, { t: i } = H(), a = g(() => [
|
|
1947
2095
|
{
|
|
1948
2096
|
key: "openInNewTab",
|
|
1949
2097
|
label: i.menu.openInNewTab
|
|
@@ -1960,17 +2108,17 @@ var Ui = {
|
|
|
1960
2108
|
{
|
|
1961
2109
|
value: "left",
|
|
1962
2110
|
label: i.title.alignLeft,
|
|
1963
|
-
icon:
|
|
2111
|
+
icon: wt
|
|
1964
2112
|
},
|
|
1965
2113
|
{
|
|
1966
2114
|
value: "center",
|
|
1967
2115
|
label: i.title.alignCenter,
|
|
1968
|
-
icon:
|
|
2116
|
+
icon: xt
|
|
1969
2117
|
},
|
|
1970
2118
|
{
|
|
1971
2119
|
value: "right",
|
|
1972
2120
|
label: i.title.alignRight,
|
|
1973
|
-
icon:
|
|
2121
|
+
icon: Tt
|
|
1974
2122
|
}
|
|
1975
2123
|
]);
|
|
1976
2124
|
function l(e, t) {
|
|
@@ -1978,7 +2126,7 @@ var Ui = {
|
|
|
1978
2126
|
}
|
|
1979
2127
|
function d() {
|
|
1980
2128
|
let e = {
|
|
1981
|
-
id:
|
|
2129
|
+
id: F(),
|
|
1982
2130
|
text: "",
|
|
1983
2131
|
url: "",
|
|
1984
2132
|
openInNewTab: !1,
|
|
@@ -1988,35 +2136,36 @@ var Ui = {
|
|
|
1988
2136
|
r("update", { items: [...n.block.items, e] });
|
|
1989
2137
|
}
|
|
1990
2138
|
function f(e, t, i) {
|
|
1991
|
-
|
|
2139
|
+
let a = n.block.items.map((n) => n.id === e ? {
|
|
1992
2140
|
...n,
|
|
1993
2141
|
[t]: i
|
|
1994
|
-
} : n)
|
|
2142
|
+
} : n);
|
|
2143
|
+
r("update", { items: a });
|
|
1995
2144
|
}
|
|
1996
2145
|
function p(e) {
|
|
1997
2146
|
r("update", { items: n.block.items.filter((t) => t.id !== e) });
|
|
1998
2147
|
}
|
|
1999
|
-
return (t, n) => (o(), _(
|
|
2000
|
-
|
|
2001
|
-
default: u(() => [T("div",
|
|
2148
|
+
return (t, n) => (o(), _(k, null, [
|
|
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", {
|
|
2002
2151
|
key: t.id,
|
|
2003
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"
|
|
2004
2153
|
}, [
|
|
2005
|
-
T("div",
|
|
2154
|
+
T("div", Ha, [T("input", {
|
|
2006
2155
|
type: "text",
|
|
2007
|
-
class: w([y(
|
|
2156
|
+
class: w([y(G), "tpl:flex-1"]),
|
|
2008
2157
|
value: t.text,
|
|
2009
2158
|
placeholder: y(i).menu.text,
|
|
2010
2159
|
onInput: (e) => f(t.id, "text", e.target.value)
|
|
2011
|
-
}, null, 42,
|
|
2012
|
-
class: w(y(
|
|
2160
|
+
}, null, 42, Ua), T("button", {
|
|
2161
|
+
class: w(y(Nt)),
|
|
2013
2162
|
title: y(i).menu.removeItem,
|
|
2014
2163
|
onClick: (e) => p(t.id)
|
|
2015
|
-
}, [
|
|
2164
|
+
}, [M(y(Qe), {
|
|
2016
2165
|
size: 14,
|
|
2017
2166
|
"stroke-width": 2
|
|
2018
|
-
})], 10,
|
|
2019
|
-
|
|
2167
|
+
})], 10, Wa)]),
|
|
2168
|
+
M(Q, {
|
|
2020
2169
|
"model-value": t.url,
|
|
2021
2170
|
type: "url",
|
|
2022
2171
|
placeholder: y(i).menu.urlPlaceholder,
|
|
@@ -2026,7 +2175,7 @@ var Ui = {
|
|
|
2026
2175
|
"placeholder",
|
|
2027
2176
|
"onUpdate:modelValue"
|
|
2028
2177
|
]),
|
|
2029
|
-
T("div",
|
|
2178
|
+
T("div", Ga, [(o(!0), _(k, null, c(a.value, (e) => (o(), _("label", {
|
|
2030
2179
|
key: e.key,
|
|
2031
2180
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
2032
2181
|
}, [T("input", {
|
|
@@ -2034,34 +2183,34 @@ var Ui = {
|
|
|
2034
2183
|
checked: t[e.key],
|
|
2035
2184
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2036
2185
|
onChange: (n) => f(t.id, e.key, n.target.checked)
|
|
2037
|
-
}, null, 40,
|
|
2038
|
-
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, {
|
|
2039
2188
|
"swatch-only": "",
|
|
2040
2189
|
"model-value": t.color || e.block.linkColor || e.block.color,
|
|
2041
2190
|
"onUpdate:modelValue": (e) => f(t.id, "color", e)
|
|
2042
2191
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2043
2192
|
]))), 128)), T("button", {
|
|
2044
|
-
class: w(y(
|
|
2193
|
+
class: w(y(Pt)),
|
|
2045
2194
|
onClick: d
|
|
2046
|
-
}, [
|
|
2195
|
+
}, [M(y(W), {
|
|
2047
2196
|
size: 14,
|
|
2048
2197
|
"stroke-width": 2
|
|
2049
|
-
}),
|
|
2198
|
+
}), A(" " + h(y(i).menu.addItem), 1)], 2)])]),
|
|
2050
2199
|
_: 1
|
|
2051
2200
|
}, 8, ["label"]),
|
|
2052
|
-
|
|
2201
|
+
M(X, { label: y(i).menu.fontFamily }, {
|
|
2053
2202
|
default: u(() => [T("select", {
|
|
2054
|
-
class: w(y(
|
|
2203
|
+
class: w(y(G)),
|
|
2055
2204
|
value: e.block.fontFamily || "",
|
|
2056
2205
|
onChange: n[0] ||= (e) => l("fontFamily", e.target.value || void 0)
|
|
2057
|
-
}, [T("option",
|
|
2206
|
+
}, [T("option", Ya, h(y(i).title.inheritFont), 1), (o(!0), _(k, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
2058
2207
|
key: e.value,
|
|
2059
2208
|
value: e.value
|
|
2060
|
-
}, h(e.label), 9,
|
|
2209
|
+
}, h(e.label), 9, Xa))), 128))], 42, Ja)]),
|
|
2061
2210
|
_: 1
|
|
2062
2211
|
}, 8, ["label"]),
|
|
2063
|
-
|
|
2064
|
-
default: u(() => [
|
|
2212
|
+
M(X, { label: y(i).menu.fontSize }, {
|
|
2213
|
+
default: u(() => [M(zt, {
|
|
2065
2214
|
"model-value": e.block.fontSize,
|
|
2066
2215
|
min: 8,
|
|
2067
2216
|
max: 48,
|
|
@@ -2070,46 +2219,46 @@ var Ui = {
|
|
|
2070
2219
|
}, null, 8, ["model-value"])]),
|
|
2071
2220
|
_: 1
|
|
2072
2221
|
}, 8, ["label"]),
|
|
2073
|
-
|
|
2074
|
-
default: u(() => [
|
|
2222
|
+
M(X, { label: y(i).menu.color }, {
|
|
2223
|
+
default: u(() => [M(Y, {
|
|
2075
2224
|
"model-value": e.block.color,
|
|
2076
2225
|
"onUpdate:modelValue": n[2] ||= (e) => l("color", e)
|
|
2077
2226
|
}, null, 8, ["model-value"])]),
|
|
2078
2227
|
_: 1
|
|
2079
2228
|
}, 8, ["label"]),
|
|
2080
|
-
|
|
2081
|
-
default: u(() => [
|
|
2229
|
+
M(X, { label: y(i).menu.linkColor }, {
|
|
2230
|
+
default: u(() => [M(Y, {
|
|
2082
2231
|
"model-value": e.block.linkColor || e.block.color,
|
|
2083
2232
|
"onUpdate:modelValue": n[3] ||= (e) => l("linkColor", e || void 0)
|
|
2084
2233
|
}, null, 8, ["model-value"])]),
|
|
2085
2234
|
_: 1
|
|
2086
2235
|
}, 8, ["label"]),
|
|
2087
|
-
|
|
2088
|
-
default: u(() => [
|
|
2236
|
+
M(X, { label: y(i).menu.textAlign }, {
|
|
2237
|
+
default: u(() => [M(Z, {
|
|
2089
2238
|
options: s.value,
|
|
2090
2239
|
"model-value": e.block.textAlign,
|
|
2091
2240
|
"onUpdate:modelValue": n[4] ||= (e) => l("textAlign", e)
|
|
2092
2241
|
}, null, 8, ["options", "model-value"])]),
|
|
2093
2242
|
_: 1
|
|
2094
2243
|
}, 8, ["label"]),
|
|
2095
|
-
|
|
2244
|
+
M(X, { label: y(i).menu.separator }, {
|
|
2096
2245
|
default: u(() => [T("input", {
|
|
2097
2246
|
type: "text",
|
|
2098
|
-
class: w(y(
|
|
2247
|
+
class: w(y(G)),
|
|
2099
2248
|
value: e.block.separator,
|
|
2100
2249
|
onInput: n[5] ||= (e) => l("separator", e.target.value)
|
|
2101
|
-
}, null, 42,
|
|
2250
|
+
}, null, 42, Za)]),
|
|
2102
2251
|
_: 1
|
|
2103
2252
|
}, 8, ["label"]),
|
|
2104
|
-
|
|
2105
|
-
default: u(() => [
|
|
2253
|
+
M(X, { label: y(i).menu.separatorColor }, {
|
|
2254
|
+
default: u(() => [M(Y, {
|
|
2106
2255
|
"model-value": e.block.separatorColor,
|
|
2107
2256
|
"onUpdate:modelValue": n[6] ||= (e) => l("separatorColor", e)
|
|
2108
2257
|
}, null, 8, ["model-value"])]),
|
|
2109
2258
|
_: 1
|
|
2110
2259
|
}, 8, ["label"]),
|
|
2111
|
-
|
|
2112
|
-
default: u(() => [
|
|
2260
|
+
M(X, { label: y(i).menu.spacing }, {
|
|
2261
|
+
default: u(() => [M(zt, {
|
|
2113
2262
|
"model-value": e.block.spacing,
|
|
2114
2263
|
min: 0,
|
|
2115
2264
|
max: 50,
|
|
@@ -2123,11 +2272,11 @@ var Ui = {
|
|
|
2123
2272
|
});
|
|
2124
2273
|
//#endregion
|
|
2125
2274
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2126
|
-
function
|
|
2275
|
+
function $a(e) {
|
|
2127
2276
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2128
2277
|
}
|
|
2129
|
-
function
|
|
2130
|
-
let n =
|
|
2278
|
+
function eo(e, t) {
|
|
2279
|
+
let n = $a(t);
|
|
2131
2280
|
if (e.length === n) return e;
|
|
2132
2281
|
if (e.length < n) {
|
|
2133
2282
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2138,12 +2287,15 @@ function Ba(e, t) {
|
|
|
2138
2287
|
}
|
|
2139
2288
|
//#endregion
|
|
2140
2289
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2141
|
-
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({
|
|
2142
2294
|
__name: "SectionToolbar",
|
|
2143
2295
|
props: { block: {} },
|
|
2144
2296
|
emits: ["update"],
|
|
2145
2297
|
setup(e, { emit: t }) {
|
|
2146
|
-
let n = e, r = t, { t: i } =
|
|
2298
|
+
let n = e, r = t, { t: i } = H(), a = g(() => [
|
|
2147
2299
|
{
|
|
2148
2300
|
value: "1",
|
|
2149
2301
|
label: i.section.column1
|
|
@@ -2166,67 +2318,131 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2166
2318
|
}
|
|
2167
2319
|
]);
|
|
2168
2320
|
function s(e) {
|
|
2169
|
-
let t = e.target.value;
|
|
2321
|
+
let t = e.target.value, i = eo(n.block.children, t);
|
|
2170
2322
|
r("update", {
|
|
2171
2323
|
columns: t,
|
|
2172
|
-
children:
|
|
2324
|
+
children: i
|
|
2173
2325
|
});
|
|
2174
2326
|
}
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
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));
|
|
2183
2398
|
}
|
|
2184
|
-
}),
|
|
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({
|
|
2185
2400
|
__name: "SocialToolbar",
|
|
2186
2401
|
props: { block: {} },
|
|
2187
2402
|
emits: ["update"],
|
|
2188
2403
|
setup(e, { emit: t }) {
|
|
2189
|
-
let n = e, r = t, { t: i } =
|
|
2404
|
+
let n = e, r = t, { t: i } = H();
|
|
2190
2405
|
function a(e, t) {
|
|
2191
2406
|
r("update", { [e]: t });
|
|
2192
2407
|
}
|
|
2193
2408
|
function s() {
|
|
2194
2409
|
let e = {
|
|
2195
|
-
id:
|
|
2410
|
+
id: F(),
|
|
2196
2411
|
platform: "facebook",
|
|
2197
2412
|
url: ""
|
|
2198
2413
|
};
|
|
2199
2414
|
r("update", { icons: [...n.block.icons, e] });
|
|
2200
2415
|
}
|
|
2201
2416
|
function l(e, t, i) {
|
|
2202
|
-
|
|
2417
|
+
let a = n.block.icons.map((n) => n.id === e ? {
|
|
2203
2418
|
...n,
|
|
2204
2419
|
[t]: i
|
|
2205
|
-
} : n)
|
|
2420
|
+
} : n);
|
|
2421
|
+
r("update", { icons: a });
|
|
2206
2422
|
}
|
|
2207
2423
|
function u(e) {
|
|
2208
2424
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2209
2425
|
}
|
|
2210
|
-
return (t, n) => (o(), _(
|
|
2211
|
-
T("div",
|
|
2426
|
+
return (t, n) => (o(), _(k, null, [
|
|
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", {
|
|
2212
2428
|
key: e.id,
|
|
2213
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"
|
|
2214
|
-
}, [T("div",
|
|
2430
|
+
}, [T("div", _o, [T("select", {
|
|
2215
2431
|
"data-testid": "social-platform-select",
|
|
2216
|
-
class: w([y(
|
|
2432
|
+
class: w([y(G), "tpl:flex-1"]),
|
|
2217
2433
|
value: e.platform,
|
|
2218
2434
|
onChange: (t) => l(e.id, "platform", t.target.value)
|
|
2219
|
-
}, [(o(!0), _(
|
|
2435
|
+
}, [(o(!0), _(k, null, c(y(B), (e) => (o(), _("option", {
|
|
2220
2436
|
key: e,
|
|
2221
2437
|
value: e
|
|
2222
|
-
}, h(y(i).social.platforms[e]), 9,
|
|
2223
|
-
class: w(y(
|
|
2438
|
+
}, h(y(i).social.platforms[e]), 9, yo))), 128))], 42, vo), T("button", {
|
|
2439
|
+
class: w(y(Nt)),
|
|
2224
2440
|
title: y(i).social.removeIcon,
|
|
2225
2441
|
onClick: (t) => u(e.id)
|
|
2226
|
-
}, [
|
|
2442
|
+
}, [M(y(Qe), {
|
|
2227
2443
|
size: 14,
|
|
2228
2444
|
"stroke-width": 2
|
|
2229
|
-
})], 10,
|
|
2445
|
+
})], 10, bo)]), M(Q, {
|
|
2230
2446
|
"model-value": e.url,
|
|
2231
2447
|
type: "url",
|
|
2232
2448
|
placeholder: y(i).social.urlPlaceholder,
|
|
@@ -2236,24 +2452,24 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2236
2452
|
"placeholder",
|
|
2237
2453
|
"onUpdate:modelValue"
|
|
2238
2454
|
])]))), 128)), T("button", {
|
|
2239
|
-
class: w(y(
|
|
2455
|
+
class: w(y(Pt)),
|
|
2240
2456
|
onClick: s
|
|
2241
|
-
}, [
|
|
2457
|
+
}, [M(y(W), {
|
|
2242
2458
|
size: 14,
|
|
2243
2459
|
"stroke-width": 2
|
|
2244
|
-
}),
|
|
2245
|
-
T("div",
|
|
2246
|
-
class: w(y(
|
|
2460
|
+
}), A(" " + h(y(i).social.addIcon), 1)], 2)])]),
|
|
2461
|
+
T("div", xo, [T("label", { class: w(y(K)) }, h(y(i).social.style), 3), T("select", {
|
|
2462
|
+
class: w(y(G)),
|
|
2247
2463
|
value: e.block.iconStyle,
|
|
2248
2464
|
onChange: n[0] ||= (e) => a("iconStyle", e.target.value)
|
|
2249
2465
|
}, [
|
|
2250
|
-
T("option",
|
|
2251
|
-
T("option",
|
|
2252
|
-
T("option",
|
|
2253
|
-
T("option",
|
|
2254
|
-
T("option",
|
|
2255
|
-
], 42,
|
|
2256
|
-
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, {
|
|
2257
2473
|
options: [
|
|
2258
2474
|
{
|
|
2259
2475
|
value: "small",
|
|
@@ -2271,30 +2487,30 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2271
2487
|
"model-value": e.block.iconSize,
|
|
2272
2488
|
"onUpdate:modelValue": n[1] ||= (e) => a("iconSize", e)
|
|
2273
2489
|
}, null, 8, ["options", "model-value"])]),
|
|
2274
|
-
T("div",
|
|
2490
|
+
T("div", ko, [T("label", { class: w(y(K)) }, h(y(i).social.spacing), 3), T("div", Ao, [T("input", {
|
|
2275
2491
|
type: "number",
|
|
2276
|
-
class: w(y(
|
|
2492
|
+
class: w(y(J)),
|
|
2277
2493
|
value: e.block.spacing,
|
|
2278
2494
|
min: "0",
|
|
2279
2495
|
max: "50",
|
|
2280
2496
|
onInput: n[2] ||= (e) => a("spacing", Number(e.target.value))
|
|
2281
|
-
}, null, 42,
|
|
2282
|
-
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, {
|
|
2283
2499
|
options: [
|
|
2284
2500
|
{
|
|
2285
2501
|
value: "left",
|
|
2286
2502
|
label: y(i).title.alignLeft,
|
|
2287
|
-
icon: y(
|
|
2503
|
+
icon: y(wt)
|
|
2288
2504
|
},
|
|
2289
2505
|
{
|
|
2290
2506
|
value: "center",
|
|
2291
2507
|
label: y(i).title.alignCenter,
|
|
2292
|
-
icon: y(
|
|
2508
|
+
icon: y(xt)
|
|
2293
2509
|
},
|
|
2294
2510
|
{
|
|
2295
2511
|
value: "right",
|
|
2296
2512
|
label: y(i).title.alignRight,
|
|
2297
|
-
icon: y(
|
|
2513
|
+
icon: y(Tt)
|
|
2298
2514
|
}
|
|
2299
2515
|
],
|
|
2300
2516
|
"model-value": e.block.align,
|
|
@@ -2302,22 +2518,22 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2302
2518
|
}, null, 8, ["options", "model-value"])])
|
|
2303
2519
|
], 64));
|
|
2304
2520
|
}
|
|
2305
|
-
}),
|
|
2521
|
+
}), Po = { class: "tpl:mb-3.5" }, Fo = { class: "tpl:flex tpl:items-stretch" }, Io = ["value"], Lo = ["value"], Ro = /* @__PURE__ */ j({
|
|
2306
2522
|
__name: "SpacerToolbar",
|
|
2307
2523
|
props: { block: {} },
|
|
2308
2524
|
emits: ["update"],
|
|
2309
2525
|
setup(e, { emit: t }) {
|
|
2310
|
-
let n = t, { t: r } =
|
|
2311
|
-
return (t, i) => (o(), _("div",
|
|
2312
|
-
T("label", { class: w(y(
|
|
2313
|
-
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", {
|
|
2314
2530
|
type: "number",
|
|
2315
|
-
class: w(y(
|
|
2531
|
+
class: w(y(J)),
|
|
2316
2532
|
value: e.block.height,
|
|
2317
2533
|
min: "10",
|
|
2318
2534
|
max: "100",
|
|
2319
2535
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2320
|
-
}, null, 42,
|
|
2536
|
+
}, null, 42, Io), T("span", { class: w(y(q)) }, "px", 2)]),
|
|
2321
2537
|
T("input", {
|
|
2322
2538
|
type: "range",
|
|
2323
2539
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2325,13 +2541,13 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2325
2541
|
min: "10",
|
|
2326
2542
|
max: "100",
|
|
2327
2543
|
onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2328
|
-
}, null, 40,
|
|
2544
|
+
}, null, 40, Lo)
|
|
2329
2545
|
]));
|
|
2330
2546
|
}
|
|
2331
|
-
}),
|
|
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 = {
|
|
2332
2548
|
key: 0,
|
|
2333
2549
|
class: "tpl:mb-3.5"
|
|
2334
|
-
},
|
|
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({
|
|
2335
2551
|
__name: "TableToolbar",
|
|
2336
2552
|
props: {
|
|
2337
2553
|
block: {},
|
|
@@ -2339,15 +2555,15 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2339
2555
|
},
|
|
2340
2556
|
emits: ["update"],
|
|
2341
2557
|
setup(e, { emit: t }) {
|
|
2342
|
-
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);
|
|
2343
2559
|
function s(e, t) {
|
|
2344
2560
|
r("update", { [e]: t });
|
|
2345
2561
|
}
|
|
2346
2562
|
function l() {
|
|
2347
2563
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2348
|
-
id:
|
|
2564
|
+
id: F(),
|
|
2349
2565
|
cells: Array.from({ length: e }, () => ({
|
|
2350
|
-
id:
|
|
2566
|
+
id: F(),
|
|
2351
2567
|
content: ""
|
|
2352
2568
|
}))
|
|
2353
2569
|
};
|
|
@@ -2357,65 +2573,67 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2357
2573
|
r("update", { rows: n.block.rows.filter((t) => t.id !== e) });
|
|
2358
2574
|
}
|
|
2359
2575
|
function d() {
|
|
2360
|
-
|
|
2576
|
+
let e = n.block.rows.map((e) => ({
|
|
2361
2577
|
...e,
|
|
2362
2578
|
cells: [...e.cells, {
|
|
2363
|
-
id:
|
|
2579
|
+
id: F(),
|
|
2364
2580
|
content: ""
|
|
2365
2581
|
}]
|
|
2366
|
-
}))
|
|
2582
|
+
}));
|
|
2583
|
+
r("update", { rows: e });
|
|
2367
2584
|
}
|
|
2368
2585
|
function f(e) {
|
|
2369
|
-
|
|
2586
|
+
let t = n.block.rows.map((t) => ({
|
|
2370
2587
|
...t,
|
|
2371
2588
|
cells: t.cells.filter((t, n) => n !== e)
|
|
2372
|
-
}))
|
|
2589
|
+
}));
|
|
2590
|
+
r("update", { rows: t });
|
|
2373
2591
|
}
|
|
2374
|
-
return (t, n) => (o(), _(
|
|
2375
|
-
T("div",
|
|
2592
|
+
return (t, n) => (o(), _(k, null, [
|
|
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, [
|
|
2376
2594
|
T("button", {
|
|
2377
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",
|
|
2378
2596
|
disabled: e.block.rows.length <= 1,
|
|
2379
2597
|
onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2380
|
-
}, [
|
|
2598
|
+
}, [M(y(ht), {
|
|
2381
2599
|
size: 12,
|
|
2382
2600
|
"stroke-width": 2
|
|
2383
|
-
})], 8,
|
|
2384
|
-
T("span",
|
|
2601
|
+
})], 8, Wo),
|
|
2602
|
+
T("span", Go, h(e.block.rows.length), 1),
|
|
2385
2603
|
T("button", {
|
|
2386
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)]",
|
|
2387
2605
|
onClick: l
|
|
2388
|
-
}, [
|
|
2606
|
+
}, [M(y(W), {
|
|
2389
2607
|
size: 12,
|
|
2390
2608
|
"stroke-width": 2
|
|
2391
2609
|
})])
|
|
2392
|
-
])]), T("div",
|
|
2610
|
+
])]), T("div", Ko, [T("span", qo, h(y(i).table.columns), 1), T("div", Jo, [
|
|
2393
2611
|
T("button", {
|
|
2394
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",
|
|
2395
2613
|
disabled: a.value <= 1,
|
|
2396
2614
|
onClick: n[1] ||= (e) => f(a.value - 1)
|
|
2397
|
-
}, [
|
|
2615
|
+
}, [M(y(ht), {
|
|
2398
2616
|
size: 12,
|
|
2399
2617
|
"stroke-width": 2
|
|
2400
|
-
})], 8,
|
|
2401
|
-
T("span",
|
|
2618
|
+
})], 8, Yo),
|
|
2619
|
+
T("span", Xo, h(a.value), 1),
|
|
2402
2620
|
T("button", {
|
|
2403
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)]",
|
|
2404
2622
|
onClick: d
|
|
2405
|
-
}, [
|
|
2623
|
+
}, [M(y(W), {
|
|
2406
2624
|
size: 12,
|
|
2407
2625
|
"stroke-width": 2
|
|
2408
2626
|
})])
|
|
2409
2627
|
])])])]),
|
|
2410
|
-
T("div",
|
|
2628
|
+
T("div", Zo, [T("label", Qo, [T("input", {
|
|
2411
2629
|
type: "checkbox",
|
|
2412
2630
|
checked: e.block.hasHeaderRow,
|
|
2413
2631
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2414
2632
|
onChange: n[2] ||= (e) => s("hasHeaderRow", e.target.checked)
|
|
2415
|
-
}, null, 40,
|
|
2416
|
-
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, {
|
|
2417
2635
|
"model-value": e.block.headerBackgroundColor ?? "",
|
|
2418
|
-
"seed-color": y(
|
|
2636
|
+
"seed-color": y(Lt),
|
|
2419
2637
|
placeholder: y(i).table.noHeaderBg,
|
|
2420
2638
|
"onUpdate:modelValue": n[3] ||= (e) => s("headerBackgroundColor", e || null)
|
|
2421
2639
|
}, null, 8, [
|
|
@@ -2423,62 +2641,62 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2423
2641
|
"seed-color",
|
|
2424
2642
|
"placeholder"
|
|
2425
2643
|
])])) : v("", !0),
|
|
2426
|
-
T("div",
|
|
2644
|
+
T("div", ts, [T("label", { class: w(y(K)) }, h(y(i).table.borderColor), 3), M(Y, {
|
|
2427
2645
|
"model-value": e.block.borderColor,
|
|
2428
2646
|
"onUpdate:modelValue": n[4] ||= (e) => s("borderColor", e)
|
|
2429
2647
|
}, null, 8, ["model-value"])]),
|
|
2430
|
-
T("div",
|
|
2648
|
+
T("div", ns, [T("label", { class: w(y(K)) }, h(y(i).table.borderWidth), 3), T("div", rs, [T("input", {
|
|
2431
2649
|
type: "number",
|
|
2432
|
-
class: w(y(
|
|
2650
|
+
class: w(y(J)),
|
|
2433
2651
|
value: e.block.borderWidth,
|
|
2434
2652
|
min: "0",
|
|
2435
2653
|
max: "10",
|
|
2436
2654
|
onInput: n[5] ||= (e) => s("borderWidth", Number(e.target.value))
|
|
2437
|
-
}, null, 42,
|
|
2438
|
-
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", {
|
|
2439
2657
|
type: "number",
|
|
2440
|
-
class: w(y(
|
|
2658
|
+
class: w(y(J)),
|
|
2441
2659
|
value: e.block.cellPadding,
|
|
2442
2660
|
min: "0",
|
|
2443
2661
|
max: "30",
|
|
2444
2662
|
onInput: n[6] ||= (e) => s("cellPadding", Number(e.target.value))
|
|
2445
|
-
}, null, 42,
|
|
2446
|
-
T("div",
|
|
2447
|
-
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)),
|
|
2448
2666
|
value: e.block.fontFamily || "",
|
|
2449
2667
|
onChange: n[7] ||= (e) => s("fontFamily", e.target.value || void 0)
|
|
2450
|
-
}, [T("option",
|
|
2668
|
+
}, [T("option", us, h(y(i).title.inheritFont), 1), (o(!0), _(k, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
2451
2669
|
key: e.value,
|
|
2452
2670
|
value: e.value
|
|
2453
|
-
}, h(e.label), 9,
|
|
2454
|
-
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", {
|
|
2455
2673
|
type: "number",
|
|
2456
|
-
class: w(y(
|
|
2674
|
+
class: w(y(J)),
|
|
2457
2675
|
value: e.block.fontSize,
|
|
2458
2676
|
min: "10",
|
|
2459
2677
|
max: "32",
|
|
2460
2678
|
onInput: n[8] ||= (e) => s("fontSize", Number(e.target.value))
|
|
2461
|
-
}, null, 42,
|
|
2462
|
-
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, {
|
|
2463
2681
|
"model-value": e.block.color,
|
|
2464
2682
|
"onUpdate:modelValue": n[9] ||= (e) => s("color", e)
|
|
2465
2683
|
}, null, 8, ["model-value"])]),
|
|
2466
|
-
T("div",
|
|
2684
|
+
T("div", gs, [T("label", { class: w(y(K)) }, h(y(i).table.textAlign), 3), M(Z, {
|
|
2467
2685
|
options: [
|
|
2468
2686
|
{
|
|
2469
2687
|
value: "left",
|
|
2470
2688
|
label: y(i).title.alignLeft,
|
|
2471
|
-
icon: y(
|
|
2689
|
+
icon: y(wt)
|
|
2472
2690
|
},
|
|
2473
2691
|
{
|
|
2474
2692
|
value: "center",
|
|
2475
2693
|
label: y(i).title.alignCenter,
|
|
2476
|
-
icon: y(
|
|
2694
|
+
icon: y(xt)
|
|
2477
2695
|
},
|
|
2478
2696
|
{
|
|
2479
2697
|
value: "right",
|
|
2480
2698
|
label: y(i).title.alignRight,
|
|
2481
|
-
icon: y(
|
|
2699
|
+
icon: y(Tt)
|
|
2482
2700
|
}
|
|
2483
2701
|
],
|
|
2484
2702
|
"model-value": e.block.textAlign,
|
|
@@ -2486,7 +2704,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2486
2704
|
}, null, 8, ["options", "model-value"])])
|
|
2487
2705
|
], 64));
|
|
2488
2706
|
}
|
|
2489
|
-
}),
|
|
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({
|
|
2490
2708
|
__name: "TitleToolbar",
|
|
2491
2709
|
props: {
|
|
2492
2710
|
block: {},
|
|
@@ -2494,49 +2712,49 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2494
2712
|
},
|
|
2495
2713
|
emits: ["update"],
|
|
2496
2714
|
setup(e, { emit: t }) {
|
|
2497
|
-
let n = t, { t: r } =
|
|
2715
|
+
let n = t, { t: r } = H();
|
|
2498
2716
|
function i(e, t) {
|
|
2499
2717
|
n("update", { [e]: t });
|
|
2500
2718
|
}
|
|
2501
|
-
return (t, n) => (o(), _(
|
|
2502
|
-
T("div",
|
|
2503
|
-
class: w(y(
|
|
2719
|
+
return (t, n) => (o(), _(k, null, [
|
|
2720
|
+
T("div", vs, [T("label", { class: w(y(K)) }, h(y(r).title.level), 3), T("select", {
|
|
2721
|
+
class: w(y(G)),
|
|
2504
2722
|
value: e.block.level,
|
|
2505
2723
|
onChange: n[0] ||= (e) => i("level", Number(e.target.value))
|
|
2506
2724
|
}, [
|
|
2507
|
-
T("option",
|
|
2508
|
-
T("option",
|
|
2509
|
-
T("option",
|
|
2510
|
-
T("option",
|
|
2511
|
-
], 42,
|
|
2512
|
-
T("div",
|
|
2513
|
-
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)),
|
|
2514
2732
|
value: e.block.fontFamily || "",
|
|
2515
2733
|
onChange: n[1] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
2516
|
-
}, [T("option",
|
|
2734
|
+
}, [T("option", Es, h(y(r).title.inheritFont), 1), (o(!0), _(k, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
2517
2735
|
key: e.value,
|
|
2518
2736
|
value: e.value
|
|
2519
|
-
}, h(e.label), 9,
|
|
2520
|
-
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, {
|
|
2521
2739
|
"model-value": e.block.color,
|
|
2522
2740
|
"onUpdate:modelValue": n[2] ||= (e) => i("color", e)
|
|
2523
2741
|
}, null, 8, ["model-value"])]),
|
|
2524
|
-
T("div",
|
|
2742
|
+
T("div", ks, [T("label", { class: w(y(K)) }, h(y(r).title.align), 3), M(Z, {
|
|
2525
2743
|
options: [
|
|
2526
2744
|
{
|
|
2527
2745
|
value: "left",
|
|
2528
2746
|
label: y(r).title.alignLeft,
|
|
2529
|
-
icon: y(
|
|
2747
|
+
icon: y(wt)
|
|
2530
2748
|
},
|
|
2531
2749
|
{
|
|
2532
2750
|
value: "center",
|
|
2533
2751
|
label: y(r).title.alignCenter,
|
|
2534
|
-
icon: y(
|
|
2752
|
+
icon: y(xt)
|
|
2535
2753
|
},
|
|
2536
2754
|
{
|
|
2537
2755
|
value: "right",
|
|
2538
2756
|
label: y(r).title.alignRight,
|
|
2539
|
-
icon: y(
|
|
2757
|
+
icon: y(Tt)
|
|
2540
2758
|
}
|
|
2541
2759
|
],
|
|
2542
2760
|
"model-value": e.block.textAlign,
|
|
@@ -2544,22 +2762,22 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2544
2762
|
}, null, 8, ["options", "model-value"])])
|
|
2545
2763
|
], 64));
|
|
2546
2764
|
}
|
|
2547
|
-
}),
|
|
2765
|
+
}), js = { class: "tpl:mb-3.5" }, Ms = {
|
|
2548
2766
|
key: 0,
|
|
2549
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)]"
|
|
2550
|
-
},
|
|
2768
|
+
}, Ns = ["checked"], Ps = {
|
|
2551
2769
|
key: 0,
|
|
2552
2770
|
class: "tpl:mb-3.5"
|
|
2553
|
-
},
|
|
2771
|
+
}, Fs = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Is = [
|
|
2554
2772
|
"value",
|
|
2555
2773
|
"placeholder",
|
|
2556
2774
|
"title"
|
|
2557
|
-
],
|
|
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({
|
|
2558
2776
|
__name: "VideoToolbar",
|
|
2559
2777
|
props: { block: {} },
|
|
2560
2778
|
emits: ["update"],
|
|
2561
2779
|
setup(e, { emit: t }) {
|
|
2562
|
-
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(() => {
|
|
2563
2781
|
p.value = !1;
|
|
2564
2782
|
}, 1e3, { immediate: !1 });
|
|
2565
2783
|
function b(e, t) {
|
|
@@ -2569,33 +2787,33 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2569
2787
|
let e = await a?.({ accept: ["images"] });
|
|
2570
2788
|
c.alive && e && (b("thumbnailUrl", e.url), p.value = !0, m());
|
|
2571
2789
|
}
|
|
2572
|
-
return (t, n) => (o(), _(
|
|
2573
|
-
T("div",
|
|
2574
|
-
T("label", { class: w(y(
|
|
2575
|
-
|
|
2790
|
+
return (t, n) => (o(), _(k, null, [
|
|
2791
|
+
T("div", js, [
|
|
2792
|
+
T("label", { class: w(y(K)) }, h(y(i).video.videoUrl), 3),
|
|
2793
|
+
M(Q, {
|
|
2576
2794
|
"model-value": e.block.url,
|
|
2577
2795
|
type: "url",
|
|
2578
2796
|
placeholder: y(i).video.videoUrlPlaceholder,
|
|
2579
2797
|
"onUpdate:modelValue": n[0] ||= (e) => b("url", e)
|
|
2580
2798
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2581
|
-
e.block.url ? (o(), _("label",
|
|
2799
|
+
e.block.url ? (o(), _("label", Ms, [T("input", {
|
|
2582
2800
|
type: "checkbox",
|
|
2583
2801
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2584
2802
|
checked: e.block.openInNewTab ?? !1,
|
|
2585
2803
|
onChange: n[1] ||= (e) => b("openInNewTab", e.target.checked)
|
|
2586
|
-
}, null, 40,
|
|
2804
|
+
}, null, 40, Ns), A(" " + h(y(i).video.openInNewTab), 1)])) : v("", !0)
|
|
2587
2805
|
]),
|
|
2588
|
-
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", {
|
|
2589
2807
|
type: "url",
|
|
2590
|
-
class: w(y(
|
|
2808
|
+
class: w(y(G)),
|
|
2591
2809
|
value: e.block.placeholderUrl || "",
|
|
2592
2810
|
placeholder: y(i).video.placeholderUrlPlaceholder,
|
|
2593
2811
|
title: y(i).video.placeholderUrlTooltip,
|
|
2594
2812
|
onInput: n[2] ||= (e) => b("placeholderUrl", e.target.value)
|
|
2595
|
-
}, null, 42,
|
|
2596
|
-
T("div",
|
|
2597
|
-
T("label", { class: w(y(
|
|
2598
|
-
|
|
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, {
|
|
2599
2817
|
"model-value": e.block.thumbnailUrl,
|
|
2600
2818
|
type: "url",
|
|
2601
2819
|
placeholder: y(i).video.thumbnailPlaceholder,
|
|
@@ -2615,28 +2833,28 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2615
2833
|
"background-color": "var(--tpl-bg)"
|
|
2616
2834
|
},
|
|
2617
2835
|
onClick: x
|
|
2618
|
-
}, [
|
|
2836
|
+
}, [M(y(be), {
|
|
2619
2837
|
size: 14,
|
|
2620
2838
|
"stroke-width": 1.5
|
|
2621
|
-
}),
|
|
2839
|
+
}), A(" " + h(y(i).image.browseMedia), 1)])) : v("", !0)
|
|
2622
2840
|
]),
|
|
2623
|
-
T("div",
|
|
2841
|
+
T("div", zs, [T("label", { class: w(y(K)) }, h(y(i).video.altText), 3), M(Q, {
|
|
2624
2842
|
"model-value": e.block.alt,
|
|
2625
2843
|
type: "text",
|
|
2626
2844
|
placeholder: y(i).video.altTextPlaceholder,
|
|
2627
2845
|
"onUpdate:modelValue": n[4] ||= (e) => b("alt", e)
|
|
2628
2846
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2629
|
-
T("div",
|
|
2630
|
-
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)),
|
|
2631
2849
|
value: e.block.width,
|
|
2632
2850
|
onChange: n[5] ||= (e) => b("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2633
2851
|
}, [
|
|
2634
|
-
T("option",
|
|
2852
|
+
T("option", Hs, h(y(i).video.fullWidth), 1),
|
|
2635
2853
|
n[7] ||= T("option", { value: "300" }, "300px", -1),
|
|
2636
2854
|
n[8] ||= T("option", { value: "400" }, "400px", -1),
|
|
2637
2855
|
n[9] ||= T("option", { value: "500" }, "500px", -1)
|
|
2638
|
-
], 42,
|
|
2639
|
-
T("div",
|
|
2856
|
+
], 42, Vs)]),
|
|
2857
|
+
T("div", Us, [T("label", { class: w(y(K)) }, h(y(i).title.align), 3), M(Z, {
|
|
2640
2858
|
options: [
|
|
2641
2859
|
{
|
|
2642
2860
|
value: "left",
|
|
@@ -2656,7 +2874,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2656
2874
|
}, null, 8, ["options", "model-value"])])
|
|
2657
2875
|
], 64));
|
|
2658
2876
|
}
|
|
2659
|
-
}),
|
|
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({
|
|
2660
2878
|
__name: "Toolbar",
|
|
2661
2879
|
props: { block: {} },
|
|
2662
2880
|
emits: [
|
|
@@ -2665,87 +2883,87 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2665
2883
|
"duplicate"
|
|
2666
2884
|
],
|
|
2667
2885
|
setup(e, { emit: t }) {
|
|
2668
|
-
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(() => {
|
|
2669
2887
|
if (f.value) return u.find((e) => e.type === r.block.customType);
|
|
2670
|
-
}), b = g(() => f.value ? m.value?.name ?? r.block.customType :
|
|
2888
|
+
}), b = g(() => f.value ? m.value?.name ?? r.block.customType : ae(d.value, s)), S = c.fonts;
|
|
2671
2889
|
function C(e) {
|
|
2672
2890
|
i("update", e);
|
|
2673
2891
|
}
|
|
2674
2892
|
return (t, r) => (o(), _("aside", {
|
|
2675
2893
|
"aria-label": y(s).landmarks.blockToolbar,
|
|
2676
2894
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2677
|
-
}, [T("div",
|
|
2895
|
+
}, [T("div", Ks, [T("div", qs, [y(Mt)[d.value] ? (o(), x(a(y(Mt)[d.value]), {
|
|
2678
2896
|
key: 0,
|
|
2679
2897
|
size: 16,
|
|
2680
2898
|
"stroke-width": 1.5
|
|
2681
|
-
})) : f.value ? (o(), x(y(
|
|
2899
|
+
})) : f.value ? (o(), x(y(R), {
|
|
2682
2900
|
key: 1,
|
|
2683
2901
|
size: 16,
|
|
2684
2902
|
"stroke-width": 1.5
|
|
2685
|
-
})) : v("", !0), T("h3",
|
|
2903
|
+
})) : v("", !0), T("h3", Js, h(b.value), 1)]), T("div", Ys, [T("button", {
|
|
2686
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)]",
|
|
2687
2905
|
title: y(s).toolbar.duplicate,
|
|
2688
2906
|
onClick: r[0] ||= (e) => i("duplicate")
|
|
2689
|
-
}, [
|
|
2907
|
+
}, [M(y(z), {
|
|
2690
2908
|
size: 14,
|
|
2691
2909
|
"stroke-width": 2
|
|
2692
|
-
})], 8,
|
|
2910
|
+
})], 8, Xs), T("button", {
|
|
2693
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)]",
|
|
2694
2912
|
title: y(s).toolbar.delete,
|
|
2695
2913
|
onClick: r[1] ||= (e) => i("delete")
|
|
2696
|
-
}, [
|
|
2914
|
+
}, [M(y(tt), {
|
|
2697
2915
|
size: 14,
|
|
2698
2916
|
"stroke-width": 2
|
|
2699
|
-
})], 8,
|
|
2917
|
+
})], 8, Zs)])]), T("div", Qs, [f.value ? (o(), x(ua, {
|
|
2700
2918
|
key: 0,
|
|
2701
2919
|
block: e.block,
|
|
2702
2920
|
onUpdateFieldValues: r[2] ||= (e) => i("update", { fieldValues: e }),
|
|
2703
2921
|
onUpdateDataSourceFetched: r[3] ||= (e) => i("update", { dataSourceFetched: e })
|
|
2704
|
-
}, null, 8, ["block"])) : d.value === "section" ? (o(), x(
|
|
2922
|
+
}, null, 8, ["block"])) : d.value === "section" ? (o(), x(mo, {
|
|
2705
2923
|
key: 1,
|
|
2706
2924
|
block: e.block,
|
|
2707
2925
|
onUpdate: C
|
|
2708
|
-
}, null, 8, ["block"])) : d.value === "title" ? (o(), x(
|
|
2926
|
+
}, null, 8, ["block"])) : d.value === "title" ? (o(), x(As, {
|
|
2709
2927
|
key: 2,
|
|
2710
2928
|
block: e.block,
|
|
2711
2929
|
"font-families": y(S),
|
|
2712
2930
|
onUpdate: C
|
|
2713
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), _(
|
|
2931
|
+
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), _(k, { key: 3 }, [], 64)) : d.value === "image" ? (o(), x(Ba, {
|
|
2714
2932
|
key: 4,
|
|
2715
2933
|
block: e.block,
|
|
2716
2934
|
onUpdate: C
|
|
2717
|
-
}, null, 8, ["block"])) : d.value === "video" ? (o(), x(
|
|
2935
|
+
}, null, 8, ["block"])) : d.value === "video" ? (o(), x(Ws, {
|
|
2718
2936
|
key: 5,
|
|
2719
2937
|
block: e.block,
|
|
2720
2938
|
onUpdate: C
|
|
2721
|
-
}, null, 8, ["block"])) : d.value === "button" ? (o(), x(
|
|
2939
|
+
}, null, 8, ["block"])) : d.value === "button" ? (o(), x(Fr, {
|
|
2722
2940
|
key: 6,
|
|
2723
2941
|
block: e.block,
|
|
2724
2942
|
"font-families": y(S),
|
|
2725
2943
|
onUpdate: C
|
|
2726
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), x(
|
|
2944
|
+
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), x(ga, {
|
|
2727
2945
|
key: 7,
|
|
2728
2946
|
block: e.block,
|
|
2729
2947
|
onUpdate: C
|
|
2730
|
-
}, null, 8, ["block"])) : d.value === "social" ? (o(), x(
|
|
2948
|
+
}, null, 8, ["block"])) : d.value === "social" ? (o(), x(No, {
|
|
2731
2949
|
key: 8,
|
|
2732
2950
|
block: e.block,
|
|
2733
2951
|
onUpdate: C
|
|
2734
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (o(), x(
|
|
2952
|
+
}, null, 8, ["block"])) : d.value === "menu" ? (o(), x(Qa, {
|
|
2735
2953
|
key: 9,
|
|
2736
2954
|
block: e.block,
|
|
2737
2955
|
"font-families": y(S),
|
|
2738
2956
|
onUpdate: C
|
|
2739
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), x(
|
|
2957
|
+
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), x(_s, {
|
|
2740
2958
|
key: 10,
|
|
2741
2959
|
block: e.block,
|
|
2742
2960
|
"font-families": y(S),
|
|
2743
2961
|
onUpdate: C
|
|
2744
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), x(
|
|
2962
|
+
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), x(Ro, {
|
|
2745
2963
|
key: 11,
|
|
2746
2964
|
block: e.block,
|
|
2747
2965
|
onUpdate: C
|
|
2748
|
-
}, null, 8, ["block"])) : d.value === "html" ? (o(), x(
|
|
2966
|
+
}, null, 8, ["block"])) : d.value === "html" ? (o(), x(ba, {
|
|
2749
2967
|
key: 12,
|
|
2750
2968
|
block: e.block,
|
|
2751
2969
|
onUpdate: C
|
|
@@ -2754,52 +2972,52 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2754
2972
|
block: e.block,
|
|
2755
2973
|
"font-families": y(S),
|
|
2756
2974
|
onUpdate: C
|
|
2757
|
-
}, null, 8, ["block", "font-families"])) : v("", !0),
|
|
2975
|
+
}, null, 8, ["block", "font-families"])) : v("", !0), M(Ti, {
|
|
2758
2976
|
block: e.block,
|
|
2759
2977
|
"is-first-section": d.value === "paragraph",
|
|
2760
2978
|
onUpdate: C
|
|
2761
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
2979
|
+
}, null, 8, ["block", "is-first-section"])])], 8, Gs));
|
|
2762
2980
|
}
|
|
2763
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
2981
|
+
}), [["__scopeId", "data-v-2ac88283"]]), ec = ["aria-label"], tc = {
|
|
2764
2982
|
role: "tablist",
|
|
2765
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"
|
|
2766
|
-
},
|
|
2984
|
+
}, nc = [
|
|
2767
2985
|
"aria-selected",
|
|
2768
2986
|
"aria-label",
|
|
2769
2987
|
"title"
|
|
2770
|
-
],
|
|
2988
|
+
], rc = { key: 0 }, ic = [
|
|
2771
2989
|
"aria-selected",
|
|
2772
2990
|
"aria-label",
|
|
2773
2991
|
"title"
|
|
2774
|
-
],
|
|
2992
|
+
], ac = { key: 0 }, oc = [
|
|
2775
2993
|
"aria-selected",
|
|
2776
2994
|
"aria-label",
|
|
2777
2995
|
"title"
|
|
2778
|
-
],
|
|
2996
|
+
], sc = { key: 0 }, cc = {
|
|
2779
2997
|
key: 1,
|
|
2780
2998
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
2781
|
-
},
|
|
2999
|
+
}, lc = {
|
|
2782
3000
|
key: 0,
|
|
2783
3001
|
id: "tpl-tabpanel-content",
|
|
2784
3002
|
role: "tabpanel",
|
|
2785
3003
|
"aria-labelledby": "tpl-tab-content",
|
|
2786
3004
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2787
|
-
},
|
|
3005
|
+
}, uc = {
|
|
2788
3006
|
key: 1,
|
|
2789
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)]"
|
|
2790
|
-
},
|
|
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 = {
|
|
2791
3009
|
key: 1,
|
|
2792
3010
|
id: "tpl-tabpanel-settings",
|
|
2793
3011
|
role: "tabpanel",
|
|
2794
3012
|
"aria-labelledby": "tpl-tab-settings",
|
|
2795
3013
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2796
|
-
},
|
|
3014
|
+
}, hc = {
|
|
2797
3015
|
key: 2,
|
|
2798
3016
|
id: "tpl-tabpanel-issues",
|
|
2799
3017
|
role: "tabpanel",
|
|
2800
3018
|
"aria-labelledby": "tpl-tab-issues",
|
|
2801
3019
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2802
|
-
},
|
|
3020
|
+
}, gc = /* @__PURE__ */ j({
|
|
2803
3021
|
__name: "RightSidebar",
|
|
2804
3022
|
props: {
|
|
2805
3023
|
selectedBlock: {},
|
|
@@ -2813,7 +3031,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2813
3031
|
"update-settings"
|
|
2814
3032
|
],
|
|
2815
3033
|
setup(e, { emit: t }) {
|
|
2816
|
-
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);
|
|
2817
3035
|
function m(e) {
|
|
2818
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)]";
|
|
2819
3037
|
}
|
|
@@ -2823,13 +3041,13 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2823
3041
|
boxShadow: "var(--tpl-shadow-md)"
|
|
2824
3042
|
} : { backgroundColor: "transparent" };
|
|
2825
3043
|
}
|
|
2826
|
-
return
|
|
3044
|
+
return N(() => r.selectedBlock, (e) => {
|
|
2827
3045
|
e && (s.value = "content");
|
|
2828
3046
|
}), (t, r) => (o(), _("aside", {
|
|
2829
3047
|
"aria-label": y(a).landmarks.rightSidebar,
|
|
2830
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"])
|
|
2831
3049
|
}, [
|
|
2832
|
-
T("div",
|
|
3050
|
+
T("div", tc, [
|
|
2833
3051
|
T("button", {
|
|
2834
3052
|
id: "tpl-tab-content",
|
|
2835
3053
|
role: "tab",
|
|
@@ -2840,10 +3058,10 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2840
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")]),
|
|
2841
3059
|
style: D(b("content")),
|
|
2842
3060
|
onClick: r[0] ||= (e) => s.value = "content"
|
|
2843
|
-
}, [
|
|
3061
|
+
}, [M(y(mt), {
|
|
2844
3062
|
size: 14,
|
|
2845
3063
|
"stroke-width": 2
|
|
2846
|
-
}), s.value === "content" ? (o(), _("span",
|
|
3064
|
+
}), s.value === "content" ? (o(), _("span", rc, h(y(a).sidebar.content), 1)) : v("", !0)], 14, nc),
|
|
2847
3065
|
T("button", {
|
|
2848
3066
|
id: "tpl-tab-settings",
|
|
2849
3067
|
role: "tab",
|
|
@@ -2854,10 +3072,10 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2854
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")]),
|
|
2855
3073
|
style: D(b("settings")),
|
|
2856
3074
|
onClick: r[1] ||= (e) => s.value = "settings"
|
|
2857
|
-
}, [
|
|
3075
|
+
}, [M(y(Dt), {
|
|
2858
3076
|
size: 14,
|
|
2859
3077
|
"stroke-width": 1.5
|
|
2860
|
-
}), s.value === "settings" ? (o(), _("span",
|
|
3078
|
+
}), s.value === "settings" ? (o(), _("span", ac, h(y(a).sidebar.settings), 1)) : v("", !0)], 14, ic),
|
|
2861
3079
|
u.value ? (o(), _("button", {
|
|
2862
3080
|
key: 0,
|
|
2863
3081
|
id: "tpl-tab-issues",
|
|
@@ -2870,64 +3088,64 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2870
3088
|
style: D(b("issues")),
|
|
2871
3089
|
onClick: r[2] ||= (e) => s.value = "issues"
|
|
2872
3090
|
}, [
|
|
2873
|
-
|
|
3091
|
+
M(y(kt), {
|
|
2874
3092
|
size: 14,
|
|
2875
3093
|
"stroke-width": 1.5
|
|
2876
3094
|
}),
|
|
2877
|
-
s.value === "issues" ? (o(), _("span",
|
|
2878
|
-
d.value > 0 ? (o(), _("span",
|
|
2879
|
-
], 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)
|
|
2880
3098
|
]),
|
|
2881
|
-
s.value === "content" ? (o(), _("div",
|
|
3099
|
+
s.value === "content" ? (o(), _("div", lc, [e.selectedBlock ? (o(), x($s, {
|
|
2882
3100
|
key: 0,
|
|
2883
3101
|
block: e.selectedBlock,
|
|
2884
3102
|
onUpdate: r[3] ||= (e) => i("update-block", e),
|
|
2885
3103
|
onDelete: r[4] ||= (e) => i("delete-block"),
|
|
2886
3104
|
onDuplicate: r[5] ||= (e) => i("duplicate-block")
|
|
2887
|
-
}, null, 8, ["block"])) : (o(), _("div",
|
|
2888
|
-
T("div",
|
|
3105
|
+
}, null, 8, ["block"])) : (o(), _("div", uc, [
|
|
3106
|
+
T("div", dc, [M(y(gt), {
|
|
2889
3107
|
size: 40,
|
|
2890
3108
|
"stroke-width": 1.5
|
|
2891
3109
|
})]),
|
|
2892
|
-
T("h3",
|
|
2893
|
-
T("p",
|
|
3110
|
+
T("h3", fc, h(y(a).sidebar.noSelection), 1),
|
|
3111
|
+
T("p", pc, h(y(a).sidebar.noSelectionHint), 1)
|
|
2894
3112
|
]))])) : v("", !0),
|
|
2895
|
-
s.value === "settings" ? (o(), _("div",
|
|
3113
|
+
s.value === "settings" ? (o(), _("div", mc, [M(rr, {
|
|
2896
3114
|
settings: e.settings,
|
|
2897
3115
|
onUpdate: r[6] ||= (e) => i("update-settings", e)
|
|
2898
3116
|
}, null, 8, ["settings"])])) : v("", !0),
|
|
2899
|
-
s.value === "issues" && u.value ? (o(), _("div",
|
|
2900
|
-
], 10,
|
|
3117
|
+
s.value === "issues" && u.value ? (o(), _("div", hc, [M(y(n))])) : v("", !0)
|
|
3118
|
+
], 10, ec));
|
|
2901
3119
|
}
|
|
2902
|
-
}),
|
|
3120
|
+
}), _c = {
|
|
2903
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)]",
|
|
2904
3122
|
style: { "z-index": "10001" },
|
|
2905
3123
|
role: "status",
|
|
2906
3124
|
"data-testid": "small-screen-notice"
|
|
2907
|
-
},
|
|
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({
|
|
2908
3126
|
__name: "SmallScreenNotice",
|
|
2909
3127
|
setup(e) {
|
|
2910
|
-
let { t } =
|
|
2911
|
-
return (e, n) => (o(), _("div",
|
|
2912
|
-
T("div",
|
|
3128
|
+
let { t } = H();
|
|
3129
|
+
return (e, n) => (o(), _("div", _c, [
|
|
3130
|
+
T("div", vc, [M(y(pt), {
|
|
2913
3131
|
size: 48,
|
|
2914
3132
|
"stroke-width": 1.5
|
|
2915
3133
|
})]),
|
|
2916
|
-
T("h2",
|
|
2917
|
-
T("p",
|
|
3134
|
+
T("h2", yc, h(y(t).smallScreen.title), 1),
|
|
3135
|
+
T("p", bc, h(y(t).smallScreen.message), 1)
|
|
2918
3136
|
]));
|
|
2919
3137
|
}
|
|
2920
|
-
}),
|
|
3138
|
+
}), Sc = ["aria-label"], Cc = [
|
|
2921
3139
|
"aria-checked",
|
|
2922
3140
|
"aria-label",
|
|
2923
3141
|
"title",
|
|
2924
3142
|
"onClick"
|
|
2925
|
-
],
|
|
3143
|
+
], wc = /* @__PURE__ */ j({
|
|
2926
3144
|
__name: "ViewportToggle",
|
|
2927
3145
|
props: { viewport: {} },
|
|
2928
3146
|
emits: ["change"],
|
|
2929
3147
|
setup(e, { emit: t }) {
|
|
2930
|
-
let n = e, r = t, { t: i } =
|
|
3148
|
+
let n = e, r = t, { t: i } = H(), a = g(() => [{
|
|
2931
3149
|
value: "desktop",
|
|
2932
3150
|
label: i.viewport.desktop
|
|
2933
3151
|
}, {
|
|
@@ -2952,7 +3170,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2952
3170
|
boxShadow: "var(--tpl-shadow)",
|
|
2953
3171
|
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
2954
3172
|
})
|
|
2955
|
-
}, null, 4), (o(!0), _(
|
|
3173
|
+
}, null, 4), (o(!0), _(k, null, c(a.value, (t) => (o(), _("button", {
|
|
2956
3174
|
key: t.value,
|
|
2957
3175
|
role: "radio",
|
|
2958
3176
|
"aria-checked": e.viewport === t.value,
|
|
@@ -2964,26 +3182,26 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2964
3182
|
}),
|
|
2965
3183
|
title: t.label,
|
|
2966
3184
|
onClick: (e) => r("change", t.value)
|
|
2967
|
-
}, [t.value === "desktop" ? (o(), x(y(
|
|
3185
|
+
}, [t.value === "desktop" ? (o(), x(y(pt), {
|
|
2968
3186
|
key: 0,
|
|
2969
3187
|
size: 18,
|
|
2970
3188
|
"stroke-width": 1.5
|
|
2971
|
-
})) : (o(), x(y(
|
|
3189
|
+
})) : (o(), x(y(yt), {
|
|
2972
3190
|
key: 1,
|
|
2973
3191
|
size: 18,
|
|
2974
3192
|
"stroke-width": 1.5
|
|
2975
|
-
})), T("span", null, h(t.label), 1)], 12,
|
|
3193
|
+
})), T("span", null, h(t.label), 1)], 12, Cc))), 128))], 12, Sc));
|
|
2976
3194
|
}
|
|
2977
|
-
}),
|
|
3195
|
+
}), Tc = [
|
|
2978
3196
|
"aria-label",
|
|
2979
3197
|
"title",
|
|
2980
3198
|
"aria-pressed"
|
|
2981
|
-
],
|
|
3199
|
+
], Ec = /*#__PURE__*/ Ne(/* @__PURE__ */ j({
|
|
2982
3200
|
__name: "PreviewToggle",
|
|
2983
3201
|
props: { previewMode: { type: Boolean } },
|
|
2984
3202
|
emits: ["change"],
|
|
2985
3203
|
setup(e, { emit: t }) {
|
|
2986
|
-
let n = t, { t: r } =
|
|
3204
|
+
let n = t, { t: r } = H();
|
|
2987
3205
|
return (t, i) => (o(), _("button", {
|
|
2988
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",
|
|
2989
3207
|
style: D({
|
|
@@ -2994,7 +3212,7 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
2994
3212
|
title: e.previewMode ? y(r).previewMode.disable : y(r).previewMode.enable,
|
|
2995
3213
|
"aria-pressed": e.previewMode,
|
|
2996
3214
|
onClick: i[0] ||= (t) => n("change", !e.previewMode)
|
|
2997
|
-
}, [
|
|
3215
|
+
}, [M(S, {
|
|
2998
3216
|
"enter-active-class": "tpl-icon-enter-active",
|
|
2999
3217
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3000
3218
|
"enter-from-class": "tpl-icon-enter-from",
|
|
@@ -3005,24 +3223,24 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3005
3223
|
key: "eye",
|
|
3006
3224
|
size: 18,
|
|
3007
3225
|
"stroke-width": 1.5
|
|
3008
|
-
})) : (o(), x(y(
|
|
3226
|
+
})) : (o(), x(y(Se), {
|
|
3009
3227
|
key: "eye-off",
|
|
3010
3228
|
size: 18,
|
|
3011
3229
|
"stroke-width": 1.5
|
|
3012
3230
|
}))]),
|
|
3013
3231
|
_: 1
|
|
3014
|
-
})], 12,
|
|
3232
|
+
})], 12, Tc));
|
|
3015
3233
|
}
|
|
3016
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3234
|
+
}), [["__scopeId", "data-v-af87d02a"]]), Dc = [
|
|
3017
3235
|
"aria-label",
|
|
3018
3236
|
"title",
|
|
3019
3237
|
"aria-pressed"
|
|
3020
|
-
],
|
|
3238
|
+
], Oc = /*#__PURE__*/ Ne(/* @__PURE__ */ j({
|
|
3021
3239
|
__name: "DarkModeToggle",
|
|
3022
3240
|
props: { darkMode: { type: Boolean } },
|
|
3023
3241
|
emits: ["change"],
|
|
3024
3242
|
setup(e, { emit: t }) {
|
|
3025
|
-
let n = t, { t: r } =
|
|
3243
|
+
let n = t, { t: r } = H();
|
|
3026
3244
|
return (t, i) => (o(), _("button", {
|
|
3027
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",
|
|
3028
3246
|
style: D({
|
|
@@ -3033,44 +3251,44 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3033
3251
|
title: e.darkMode ? y(r).darkMode.disable : y(r).darkMode.enable,
|
|
3034
3252
|
"aria-pressed": e.darkMode,
|
|
3035
3253
|
onClick: i[0] ||= (t) => n("change", !e.darkMode)
|
|
3036
|
-
}, [
|
|
3254
|
+
}, [M(S, {
|
|
3037
3255
|
"enter-active-class": "tpl-icon-enter-active",
|
|
3038
3256
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3039
3257
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3040
3258
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3041
3259
|
mode: "out-in"
|
|
3042
3260
|
}, {
|
|
3043
|
-
default: u(() => [e.darkMode ? (o(), x(y(
|
|
3261
|
+
default: u(() => [e.darkMode ? (o(), x(y(ft), {
|
|
3044
3262
|
key: "moon",
|
|
3045
3263
|
size: 18,
|
|
3046
3264
|
"stroke-width": 1.5
|
|
3047
|
-
})) : (o(), x(y(
|
|
3265
|
+
})) : (o(), x(y(Et), {
|
|
3048
3266
|
key: "sun",
|
|
3049
3267
|
size: 18,
|
|
3050
3268
|
"stroke-width": 1.5
|
|
3051
3269
|
}))]),
|
|
3052
3270
|
_: 1
|
|
3053
|
-
})], 12,
|
|
3271
|
+
})], 12, Dc));
|
|
3054
3272
|
}
|
|
3055
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3273
|
+
}), [["__scopeId", "data-v-f8694f76"]]), kc = {
|
|
3056
3274
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3057
3275
|
style: {
|
|
3058
3276
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3059
3277
|
"backdrop-filter": "blur(8px)",
|
|
3060
3278
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3061
3279
|
}
|
|
3062
|
-
},
|
|
3280
|
+
}, Ac = {
|
|
3063
3281
|
href: "https://github.com/templatical/sdk",
|
|
3064
3282
|
target: "_blank",
|
|
3065
3283
|
rel: "noopener noreferrer",
|
|
3066
3284
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3067
3285
|
style: { "text-decoration": "none" }
|
|
3068
|
-
},
|
|
3286
|
+
}, jc = /* @__PURE__ */ j({
|
|
3069
3287
|
__name: "EditorFooter",
|
|
3070
3288
|
props: { positionClass: {} },
|
|
3071
3289
|
setup(e) {
|
|
3072
|
-
let { t } =
|
|
3073
|
-
return (n, r) => (o(), _("footer", { class: w(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [T("div",
|
|
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, [
|
|
3074
3292
|
T("span", null, h(y(t).footer.poweredBy), 1),
|
|
3075
3293
|
r[0] ||= T("a", {
|
|
3076
3294
|
href: "https://templatical.com",
|
|
@@ -3083,34 +3301,34 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3083
3301
|
height: "14",
|
|
3084
3302
|
src: "https://templatical.com/logo.svg",
|
|
3085
3303
|
alt: ""
|
|
3086
|
-
}),
|
|
3304
|
+
}), A(" Templatical ")], -1),
|
|
3087
3305
|
r[1] ||= T("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3088
|
-
T("a",
|
|
3306
|
+
T("a", Ac, h(y(t).footer.openSource), 1)
|
|
3089
3307
|
])], 2));
|
|
3090
3308
|
}
|
|
3091
|
-
}),
|
|
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 = [
|
|
3092
3310
|
"id",
|
|
3093
3311
|
"placeholder",
|
|
3094
3312
|
"aria-label",
|
|
3095
3313
|
"aria-activedescendant"
|
|
3096
|
-
],
|
|
3314
|
+
], Rc = {
|
|
3097
3315
|
key: 0,
|
|
3098
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",
|
|
3099
3317
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3100
|
-
},
|
|
3318
|
+
}, zc = ["data-group-name", "onClick"], Bc = ["aria-label"], Vc = {
|
|
3101
3319
|
key: 0,
|
|
3102
3320
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3103
3321
|
"data-testid": "merge-tag-picker-empty"
|
|
3104
|
-
},
|
|
3322
|
+
}, Hc = {
|
|
3105
3323
|
key: 1,
|
|
3106
3324
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3107
3325
|
"data-testid": "merge-tag-picker-empty"
|
|
3108
|
-
},
|
|
3326
|
+
}, Uc = [
|
|
3109
3327
|
"aria-expanded",
|
|
3110
3328
|
"data-group-name",
|
|
3111
3329
|
"data-group-collapsed",
|
|
3112
3330
|
"onClick"
|
|
3113
|
-
],
|
|
3331
|
+
], Wc = { class: "tpl:ml-1 tpl:font-normal" }, Gc = [
|
|
3114
3332
|
"id",
|
|
3115
3333
|
"aria-selected",
|
|
3116
3334
|
"data-selected",
|
|
@@ -3119,38 +3337,38 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3119
3337
|
"title",
|
|
3120
3338
|
"onMousemove",
|
|
3121
3339
|
"onClick"
|
|
3122
|
-
],
|
|
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 = {
|
|
3123
3341
|
key: 0,
|
|
3124
3342
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3125
|
-
},
|
|
3343
|
+
}, Yc = "tpl-merge-tag-picker-list", Xc = /* @__PURE__ */ j({
|
|
3126
3344
|
__name: "MergeTagPickerModal",
|
|
3127
3345
|
setup(e) {
|
|
3128
|
-
let t =
|
|
3129
|
-
function
|
|
3130
|
-
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);
|
|
3131
3349
|
}
|
|
3132
|
-
function
|
|
3133
|
-
let t = new Set(
|
|
3134
|
-
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;
|
|
3135
3353
|
}
|
|
3136
|
-
let
|
|
3354
|
+
let ee = g(() => {
|
|
3137
3355
|
let e = S.value.trim().toLowerCase();
|
|
3138
3356
|
return e ? t.tags.value.filter((t) => [
|
|
3139
3357
|
t.label,
|
|
3140
3358
|
t.value,
|
|
3141
3359
|
t.description ?? ""
|
|
3142
3360
|
].join(" ").toLowerCase().includes(e)) : t.tags.value;
|
|
3143
|
-
}),
|
|
3144
|
-
if (!
|
|
3361
|
+
}), R = g(() => {
|
|
3362
|
+
if (!j.value) return [];
|
|
3145
3363
|
let e = n.mergeTag.picker.otherGroup, r = /* @__PURE__ */ new Set(), i = [];
|
|
3146
3364
|
for (let n of t.tags.value) {
|
|
3147
3365
|
let t = n.group ?? e;
|
|
3148
3366
|
r.has(t) || (r.add(t), i.push(t));
|
|
3149
3367
|
}
|
|
3150
3368
|
return i;
|
|
3151
|
-
}),
|
|
3152
|
-
let e =
|
|
3153
|
-
if (!
|
|
3369
|
+
}), z = g(() => {
|
|
3370
|
+
let e = ee.value;
|
|
3371
|
+
if (!j.value || O.value) return e.map((e, t) => ({
|
|
3154
3372
|
kind: "tag",
|
|
3155
3373
|
tag: e,
|
|
3156
3374
|
index: t
|
|
@@ -3167,49 +3385,49 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3167
3385
|
kind: "header",
|
|
3168
3386
|
group: e,
|
|
3169
3387
|
count: t.length
|
|
3170
|
-
}), !
|
|
3388
|
+
}), !F.value.has(e)) for (let e of t) a.push({
|
|
3171
3389
|
kind: "tag",
|
|
3172
3390
|
tag: e,
|
|
3173
3391
|
index: o
|
|
3174
3392
|
}), o++;
|
|
3175
3393
|
}
|
|
3176
3394
|
return a;
|
|
3177
|
-
}),
|
|
3178
|
-
|
|
3179
|
-
e && (p.value = "",
|
|
3395
|
+
}), B = g(() => z.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3396
|
+
N(() => t.isOpen.value, (e) => {
|
|
3397
|
+
e && (p.value = "", A.value = 0, F.value = /* @__PURE__ */ new Set(), s(() => {
|
|
3180
3398
|
E.value?.focus();
|
|
3181
3399
|
}));
|
|
3182
|
-
}),
|
|
3183
|
-
|
|
3400
|
+
}), N(B, (e) => {
|
|
3401
|
+
A.value >= e.length && (A.value = Math.max(0, e.length - 1));
|
|
3184
3402
|
});
|
|
3185
|
-
function
|
|
3403
|
+
function te(e) {
|
|
3186
3404
|
t.resolve(e);
|
|
3187
3405
|
}
|
|
3188
|
-
function
|
|
3406
|
+
function V() {
|
|
3189
3407
|
t.resolve(null);
|
|
3190
3408
|
}
|
|
3191
|
-
function
|
|
3192
|
-
if (
|
|
3193
|
-
let t =
|
|
3194
|
-
|
|
3409
|
+
function ne(e) {
|
|
3410
|
+
if (B.value.length === 0) return;
|
|
3411
|
+
let t = A.value + e;
|
|
3412
|
+
A.value = Math.max(0, Math.min(B.value.length - 1, t)), oe();
|
|
3195
3413
|
}
|
|
3196
|
-
let
|
|
3197
|
-
function
|
|
3198
|
-
|
|
3414
|
+
let re = f(null), ie = f({});
|
|
3415
|
+
function ae(e, t) {
|
|
3416
|
+
ie.value[e] = t ?? null;
|
|
3199
3417
|
}
|
|
3200
|
-
function
|
|
3418
|
+
function oe() {
|
|
3201
3419
|
s(() => {
|
|
3202
|
-
let e =
|
|
3203
|
-
e && e.querySelector(`[data-merge-tag-index="${
|
|
3420
|
+
let e = re.value;
|
|
3421
|
+
e && e.querySelector(`[data-merge-tag-index="${A.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3204
3422
|
});
|
|
3205
3423
|
}
|
|
3206
|
-
function
|
|
3207
|
-
if (
|
|
3208
|
-
let t = new Set(
|
|
3209
|
-
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;
|
|
3210
3428
|
}
|
|
3211
3429
|
s(() => {
|
|
3212
|
-
let t =
|
|
3430
|
+
let t = re.value;
|
|
3213
3431
|
if (!t) return;
|
|
3214
3432
|
let n = 0, r = !1;
|
|
3215
3433
|
for (let i of Array.from(t.children)) {
|
|
@@ -3225,55 +3443,55 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3225
3443
|
});
|
|
3226
3444
|
});
|
|
3227
3445
|
}
|
|
3228
|
-
function
|
|
3229
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3230
|
-
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);
|
|
3231
3449
|
else if (e.key === "Enter") {
|
|
3232
3450
|
e.preventDefault();
|
|
3233
|
-
let t =
|
|
3234
|
-
t &&
|
|
3451
|
+
let t = B.value[A.value];
|
|
3452
|
+
t && te(t);
|
|
3235
3453
|
}
|
|
3236
3454
|
}
|
|
3237
|
-
function
|
|
3238
|
-
if (
|
|
3455
|
+
function le() {
|
|
3456
|
+
if (B.value.length !== 0) return `${Yc}-opt-${A.value}`;
|
|
3239
3457
|
}
|
|
3240
|
-
function
|
|
3241
|
-
return `${
|
|
3458
|
+
function ue(e) {
|
|
3459
|
+
return `${Yc}-opt-${e}`;
|
|
3242
3460
|
}
|
|
3243
|
-
let
|
|
3244
|
-
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, {
|
|
3245
3463
|
visible: y(t).isOpen.value,
|
|
3246
|
-
onClose:
|
|
3247
|
-
onKeydown:
|
|
3464
|
+
onClose: V,
|
|
3465
|
+
onKeydown: ce
|
|
3248
3466
|
}, {
|
|
3249
3467
|
default: u(() => [T("div", {
|
|
3250
3468
|
role: "dialog",
|
|
3251
3469
|
"aria-modal": "true",
|
|
3252
|
-
"aria-labelledby": `${
|
|
3470
|
+
"aria-labelledby": `${Yc}-title`,
|
|
3253
3471
|
"data-tpl-theme": y(d),
|
|
3254
3472
|
"data-testid": "merge-tag-picker-modal",
|
|
3255
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)]",
|
|
3256
3474
|
style: D(y(a))
|
|
3257
3475
|
}, [
|
|
3258
|
-
T("header",
|
|
3259
|
-
id: `${
|
|
3476
|
+
T("header", Nc, [T("h2", {
|
|
3477
|
+
id: `${Yc}-title`,
|
|
3260
3478
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3261
|
-
}, h(y(n).mergeTag.picker.title), 9,
|
|
3479
|
+
}, h(y(n).mergeTag.picker.title), 9, Pc), T("button", {
|
|
3262
3480
|
type: "button",
|
|
3263
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)]",
|
|
3264
3482
|
"aria-label": y(n).mergeTag.picker.close,
|
|
3265
3483
|
"data-testid": "merge-tag-picker-close",
|
|
3266
|
-
onClick:
|
|
3267
|
-
}, [
|
|
3484
|
+
onClick: V
|
|
3485
|
+
}, [M(y(Qe), {
|
|
3268
3486
|
size: 16,
|
|
3269
3487
|
"stroke-width": 2
|
|
3270
|
-
})], 8,
|
|
3271
|
-
T("div",
|
|
3488
|
+
})], 8, Fc)]),
|
|
3489
|
+
T("div", Ic, [M(y(Ot), {
|
|
3272
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)]",
|
|
3273
3491
|
size: 14,
|
|
3274
3492
|
"stroke-width": 2
|
|
3275
3493
|
}), r(T("input", {
|
|
3276
|
-
id: `${
|
|
3494
|
+
id: `${Yc}-search`,
|
|
3277
3495
|
ref_key: "searchInputRef",
|
|
3278
3496
|
ref: E,
|
|
3279
3497
|
"onUpdate:modelValue": s[0] ||= (e) => p.value = e,
|
|
@@ -3281,72 +3499,305 @@ var Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = ["value"], Wa = /* @__PUR
|
|
|
3281
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)]",
|
|
3282
3500
|
placeholder: y(n).mergeTag.picker.searchPlaceholder,
|
|
3283
3501
|
"aria-label": y(n).mergeTag.picker.searchAriaLabel,
|
|
3284
|
-
"aria-controls":
|
|
3285
|
-
"aria-activedescendant":
|
|
3502
|
+
"aria-controls": Yc,
|
|
3503
|
+
"aria-activedescendant": le(),
|
|
3286
3504
|
"data-testid": "merge-tag-picker-search",
|
|
3287
3505
|
onKeydown: s[1] ||= m(b(() => {}, ["prevent"]), ["enter"])
|
|
3288
|
-
}, null, 40,
|
|
3289
|
-
|
|
3506
|
+
}, null, 40, Lc), [[C, p.value]])]),
|
|
3507
|
+
pe.value ? (o(), _("div", Rc, [(o(!0), _(k, null, c(R.value, (e) => (o(), _("button", {
|
|
3290
3508
|
key: e,
|
|
3291
3509
|
type: "button",
|
|
3292
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)]",
|
|
3293
3511
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3294
3512
|
"data-group-name": e,
|
|
3295
|
-
onClick: (t) =>
|
|
3296
|
-
}, h(e), 9,
|
|
3513
|
+
onClick: (t) => se(e)
|
|
3514
|
+
}, h(e), 9, zc))), 128))])) : v("", !0),
|
|
3297
3515
|
T("div", {
|
|
3298
|
-
id:
|
|
3516
|
+
id: Yc,
|
|
3299
3517
|
ref_key: "listRef",
|
|
3300
|
-
ref:
|
|
3518
|
+
ref: re,
|
|
3301
3519
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3302
3520
|
role: "listbox",
|
|
3303
3521
|
"aria-label": y(n).mergeTag.picker.title,
|
|
3304
3522
|
"data-testid": "merge-tag-picker-list"
|
|
3305
|
-
}, [
|
|
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", {
|
|
3306
3524
|
key: 0,
|
|
3307
3525
|
ref_for: !0,
|
|
3308
|
-
ref: (t) =>
|
|
3526
|
+
ref: (t) => ae(e.group, t),
|
|
3309
3527
|
type: "button",
|
|
3310
|
-
"aria-expanded": !
|
|
3311
|
-
"aria-controls":
|
|
3528
|
+
"aria-expanded": !I(e.group),
|
|
3529
|
+
"aria-controls": Yc,
|
|
3312
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)]",
|
|
3313
3531
|
"data-testid": "merge-tag-picker-group-header",
|
|
3314
3532
|
"data-group-name": e.group,
|
|
3315
|
-
"data-group-collapsed":
|
|
3316
|
-
onClick: (t) =>
|
|
3533
|
+
"data-group-collapsed": I(e.group) ? "true" : "false",
|
|
3534
|
+
onClick: (t) => L(e.group)
|
|
3317
3535
|
}, [
|
|
3318
|
-
|
|
3536
|
+
M(y(He), {
|
|
3319
3537
|
size: 12,
|
|
3320
3538
|
"stroke-width": 2,
|
|
3321
|
-
class: w(["tpl:transition-transform",
|
|
3539
|
+
class: w(["tpl:transition-transform", I(e.group) ? "tpl:-rotate-90" : ""])
|
|
3322
3540
|
}, null, 8, ["class"]),
|
|
3323
3541
|
T("span", null, h(e.group), 1),
|
|
3324
|
-
T("span",
|
|
3325
|
-
], 8,
|
|
3542
|
+
T("span", Wc, " (" + h(y(i)(y(n).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
3543
|
+
], 8, Uc)) : (o(), _("button", {
|
|
3326
3544
|
key: 1,
|
|
3327
|
-
id:
|
|
3545
|
+
id: ue(e.index),
|
|
3328
3546
|
type: "button",
|
|
3329
3547
|
role: "option",
|
|
3330
|
-
"aria-selected": e.index ===
|
|
3331
|
-
"data-selected": e.index ===
|
|
3548
|
+
"aria-selected": e.index === A.value,
|
|
3549
|
+
"data-selected": e.index === A.value ? "true" : "false",
|
|
3332
3550
|
"data-merge-tag-index": e.index,
|
|
3333
3551
|
"data-merge-tag-value": e.tag.value,
|
|
3334
3552
|
title: e.tag.description ? `${e.tag.value} — ${e.tag.description}` : e.tag.value,
|
|
3335
|
-
class: w(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index ===
|
|
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)]"]),
|
|
3336
3554
|
"data-testid": "merge-tag-picker-item",
|
|
3337
|
-
onMousemove: (t) =>
|
|
3338
|
-
onClick: (t) =>
|
|
3555
|
+
onMousemove: (t) => A.value = e.index,
|
|
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)
|
|
3339
3777
|
}, [
|
|
3340
|
-
T("span",
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
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)]),
|
|
3345
3796
|
_: 1
|
|
3346
3797
|
}, 8, ["visible"]));
|
|
3347
3798
|
}
|
|
3348
3799
|
});
|
|
3349
3800
|
//#endregion
|
|
3350
|
-
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 };
|
|
3351
3802
|
|
|
3352
|
-
//# sourceMappingURL=styles-
|
|
3803
|
+
//# sourceMappingURL=styles-D4Bd3SCx.js.map
|