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