@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,37 +1,65 @@
|
|
|
1
|
-
import { A as e, B as t, E as n, F as r, J as i, L as a, M as o, N as s, S as c, U as l, X as u, _ as d, a as f, at as p, b as m, c as h, d as g, f as _, h as v, l as y, m as b, o as x, ot as S, p as C, q as w, rt as T, s as E, st as D, t as O, v as k, w as A, y as j, z as M } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import { C as N, D as P,
|
|
3
|
-
import { A as
|
|
4
|
-
import { a as
|
|
5
|
-
import { A as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
26
|
-
import { _ as
|
|
27
|
-
import { i as
|
|
28
|
-
import { t as
|
|
29
|
-
var
|
|
1
|
+
import { A as e, B as t, E as n, F as r, J as i, L as a, M as o, N as s, S as c, U as l, X as u, _ as d, a as f, at as p, b as m, c as h, d as g, f as _, h as v, l as y, m as b, o as x, ot as S, p as C, q as w, rt as T, s as E, st as D, t as O, v as k, w as A, y as j, z as M } from "./vue.runtime.esm-bundler-B2k01iQh.js";
|
|
2
|
+
import { C as N, D as P, O as F, o as ee, r as I, s as L, u as te, w as R } from "./dist-BctFrpeA.js";
|
|
3
|
+
import { A as z, F as ne, I as re, M as ie, N as ae, P as B, T as oe, _ as se, a as ce, c as le, f as ue, g as de, h as fe, i as pe, j as me, k as he, l as ge, m as _e, n as ve, o as ye, p as be, r as xe, s as Se, u as Ce, v as we } from "./useEditorCore-D7dQFRkw.js";
|
|
4
|
+
import { a as Te, c as Ee } from "./dist-DJ9aD8yA.js";
|
|
5
|
+
import { A as De, C as Oe, M as ke, N as Ae, S as je, T as Me, a as Ne, d as Pe, f as Fe, g as Ie, k as Le, m as Re, n as ze, o as Be, p as Ve, s as He, u as Ue, x as We } from "./keys-mFiJ5N0_.js";
|
|
6
|
+
import { t as V } from "./useI18n-CTs_bP9d.js";
|
|
7
|
+
import { t as H } from "./createLucideIcon-CmPAC-gt.js";
|
|
8
|
+
import { t as Ge } from "./circle-alert-BStvZr3O.js";
|
|
9
|
+
import { i as Ke, n as qe, r as Je, t as Ye } from "./blockTypeIcons-C6UGDmrC.js";
|
|
10
|
+
import { t as Xe } from "./sparkles-C965Xop4.js";
|
|
11
|
+
import { n as Ze, r as Qe, t as $e } from "./text-align-start-Bxnps8fH.js";
|
|
12
|
+
import { t as et } from "./chevron-down-DmEgzmYT.js";
|
|
13
|
+
import { n as tt, t as nt } from "./refresh-cw-Butml7Q4.js";
|
|
14
|
+
import { t as rt } from "./image-up-BFPbw_Zq.js";
|
|
15
|
+
import { t as it } from "./info-B_qLEBN2.js";
|
|
16
|
+
import { t as at } from "./list-checks-CGg7JxPm.js";
|
|
17
|
+
import { t as ot } from "./scan-line-XYEqim_E.js";
|
|
18
|
+
import { t as st } from "./trash-2-DpGb7fIt.js";
|
|
19
|
+
import { t as ct } from "./x-CGjkjdKK.js";
|
|
20
|
+
import { t as lt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
21
|
+
import { t as ut } from "./useCloudI18n-L3H2XvdW.js";
|
|
22
|
+
import { t as dt } from "./useMergeTag-e3RSY-s3.js";
|
|
23
|
+
import { t as ft } from "./useAliveFlag-BinvbqQR.js";
|
|
24
|
+
import { t as pt } from "./readableTextColor-f8Kykfnh.js";
|
|
25
|
+
import { t as mt } from "./CountdownBlock-C-6o19qS.js";
|
|
26
|
+
import { _ as ht, c as gt, f as U, g as _t, h as W, l as vt, m as G, p as K, r as yt, t as bt } from "./styleConstants-lGobwiLH.js";
|
|
27
|
+
import { i as q, n as J, r as Y, t as xt } from "./NumberWithSuffix-Bp40ik4l.js";
|
|
28
|
+
import { t as St } from "./TplModal-utMtXzSO.js";
|
|
29
|
+
var Ct = H("lock-open", [["rect", {
|
|
30
|
+
width: "18",
|
|
31
|
+
height: "11",
|
|
32
|
+
x: "3",
|
|
33
|
+
y: "11",
|
|
34
|
+
rx: "2",
|
|
35
|
+
ry: "2",
|
|
36
|
+
key: "1w4ew1"
|
|
37
|
+
}], ["path", {
|
|
38
|
+
d: "M7 11V7a5 5 0 0 1 9.9-1",
|
|
39
|
+
key: "1mm8w8"
|
|
40
|
+
}]]), wt = H("square-plus", [
|
|
41
|
+
["rect", {
|
|
42
|
+
width: "18",
|
|
43
|
+
height: "18",
|
|
44
|
+
x: "3",
|
|
45
|
+
y: "3",
|
|
46
|
+
rx: "2",
|
|
47
|
+
key: "afitv7"
|
|
48
|
+
}],
|
|
49
|
+
["path", {
|
|
50
|
+
d: "M8 12h8",
|
|
51
|
+
key: "1wcyev"
|
|
52
|
+
}],
|
|
53
|
+
["path", {
|
|
54
|
+
d: "M12 8v8",
|
|
55
|
+
key: "napkw2"
|
|
56
|
+
}]
|
|
57
|
+
]), Tt = H("circle", [["circle", {
|
|
30
58
|
cx: "12",
|
|
31
59
|
cy: "12",
|
|
32
60
|
r: "10",
|
|
33
61
|
key: "1mglay"
|
|
34
|
-
}]]),
|
|
62
|
+
}]]), Et = H("globe", [
|
|
35
63
|
["circle", {
|
|
36
64
|
cx: "12",
|
|
37
65
|
cy: "12",
|
|
@@ -46,7 +74,7 @@ var xt = W("circle", [["circle", {
|
|
|
46
74
|
d: "M2 12h20",
|
|
47
75
|
key: "9i4pu4"
|
|
48
76
|
}]
|
|
49
|
-
]),
|
|
77
|
+
]), Dt = H("layout-template", [
|
|
50
78
|
["rect", {
|
|
51
79
|
width: "18",
|
|
52
80
|
height: "7",
|
|
@@ -71,18 +99,7 @@ var xt = W("circle", [["circle", {
|
|
|
71
99
|
rx: "1",
|
|
72
100
|
key: "q5h2i8"
|
|
73
101
|
}]
|
|
74
|
-
]),
|
|
75
|
-
width: "18",
|
|
76
|
-
height: "11",
|
|
77
|
-
x: "3",
|
|
78
|
-
y: "11",
|
|
79
|
-
rx: "2",
|
|
80
|
-
ry: "2",
|
|
81
|
-
key: "1w4ew1"
|
|
82
|
-
}], ["path", {
|
|
83
|
-
d: "M7 11V7a5 5 0 0 1 9.9-1",
|
|
84
|
-
key: "1mm8w8"
|
|
85
|
-
}]]), Tt = W("lock", [["rect", {
|
|
102
|
+
]), Ot = H("lock", [["rect", {
|
|
86
103
|
width: "18",
|
|
87
104
|
height: "11",
|
|
88
105
|
x: "3",
|
|
@@ -93,7 +110,7 @@ var xt = W("circle", [["circle", {
|
|
|
93
110
|
}], ["path", {
|
|
94
111
|
d: "M7 11V7a5 5 0 0 1 10 0v4",
|
|
95
112
|
key: "fwvmzm"
|
|
96
|
-
}]]),
|
|
113
|
+
}]]), kt = H("monitor", [
|
|
97
114
|
["rect", {
|
|
98
115
|
width: "20",
|
|
99
116
|
height: "14",
|
|
@@ -116,10 +133,10 @@ var xt = W("circle", [["circle", {
|
|
|
116
133
|
y2: "21",
|
|
117
134
|
key: "vw1qmm"
|
|
118
135
|
}]
|
|
119
|
-
]),
|
|
136
|
+
]), At = H("moon", [["path", {
|
|
120
137
|
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
121
138
|
key: "kfwtm"
|
|
122
|
-
}]]),
|
|
139
|
+
}]]), jt = H("panel-top", [["rect", {
|
|
123
140
|
width: "18",
|
|
124
141
|
height: "18",
|
|
125
142
|
x: "3",
|
|
@@ -129,19 +146,19 @@ var xt = W("circle", [["circle", {
|
|
|
129
146
|
}], ["path", {
|
|
130
147
|
d: "M3 9h18",
|
|
131
148
|
key: "1pudct"
|
|
132
|
-
}]]),
|
|
149
|
+
}]]), X = H("plus", [["path", {
|
|
133
150
|
d: "M5 12h14",
|
|
134
151
|
key: "1ays0h"
|
|
135
152
|
}], ["path", {
|
|
136
153
|
d: "M12 5v14",
|
|
137
154
|
key: "s699le"
|
|
138
|
-
}]]),
|
|
155
|
+
}]]), Mt = H("rotate-ccw", [["path", {
|
|
139
156
|
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
140
157
|
key: "1357e3"
|
|
141
158
|
}], ["path", {
|
|
142
159
|
d: "M3 3v5h5",
|
|
143
160
|
key: "1xhq8a"
|
|
144
|
-
}]]),
|
|
161
|
+
}]]), Nt = H("settings", [["path", {
|
|
145
162
|
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
146
163
|
key: "1i5ecw"
|
|
147
164
|
}], ["circle", {
|
|
@@ -149,7 +166,7 @@ var xt = W("circle", [["circle", {
|
|
|
149
166
|
cy: "12",
|
|
150
167
|
r: "3",
|
|
151
168
|
key: "1v7zrd"
|
|
152
|
-
}]]),
|
|
169
|
+
}]]), Pt = H("smartphone", [["rect", {
|
|
153
170
|
width: "14",
|
|
154
171
|
height: "20",
|
|
155
172
|
x: "5",
|
|
@@ -160,31 +177,14 @@ var xt = W("circle", [["circle", {
|
|
|
160
177
|
}], ["path", {
|
|
161
178
|
d: "M12 18h.01",
|
|
162
179
|
key: "mhygvu"
|
|
163
|
-
}]]),
|
|
164
|
-
["rect", {
|
|
165
|
-
width: "18",
|
|
166
|
-
height: "18",
|
|
167
|
-
x: "3",
|
|
168
|
-
y: "3",
|
|
169
|
-
rx: "2",
|
|
170
|
-
key: "afitv7"
|
|
171
|
-
}],
|
|
172
|
-
["path", {
|
|
173
|
-
d: "M8 12h8",
|
|
174
|
-
key: "1wcyev"
|
|
175
|
-
}],
|
|
176
|
-
["path", {
|
|
177
|
-
d: "M12 8v8",
|
|
178
|
-
key: "napkw2"
|
|
179
|
-
}]
|
|
180
|
-
]), Nt = W("square", [["rect", {
|
|
180
|
+
}]]), Ft = H("square", [["rect", {
|
|
181
181
|
width: "18",
|
|
182
182
|
height: "18",
|
|
183
183
|
x: "3",
|
|
184
184
|
y: "3",
|
|
185
185
|
rx: "2",
|
|
186
186
|
key: "afitv7"
|
|
187
|
-
}]]),
|
|
187
|
+
}]]), It = H("sun", [
|
|
188
188
|
["circle", {
|
|
189
189
|
cx: "12",
|
|
190
190
|
cy: "12",
|
|
@@ -226,7 +226,7 @@ var xt = W("circle", [["circle", {
|
|
|
226
226
|
]);
|
|
227
227
|
//#endregion
|
|
228
228
|
//#region src/utils/resolveLintOptions.ts
|
|
229
|
-
function
|
|
229
|
+
function Lt(e) {
|
|
230
230
|
return {
|
|
231
231
|
...e.lint,
|
|
232
232
|
locale: e.locale
|
|
@@ -234,19 +234,19 @@ function Ft(e) {
|
|
|
234
234
|
}
|
|
235
235
|
//#endregion
|
|
236
236
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
237
|
-
var
|
|
237
|
+
var Rt = ["aria-label"], zt = {
|
|
238
238
|
key: 0,
|
|
239
239
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
240
|
-
},
|
|
240
|
+
}, Bt = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, Vt = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, Ht = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, Ut = {
|
|
241
241
|
key: 0,
|
|
242
242
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
243
|
-
},
|
|
243
|
+
}, Wt = {
|
|
244
244
|
key: 1,
|
|
245
245
|
class: "tpl:m-0 tpl:mt-4 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
246
|
-
},
|
|
246
|
+
}, Gt = { class: "tpl:relative" }, Kt = {
|
|
247
247
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
248
248
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
249
|
-
},
|
|
249
|
+
}, qt = 96, Jt = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
250
250
|
__name: "Canvas",
|
|
251
251
|
props: {
|
|
252
252
|
viewport: {},
|
|
@@ -263,21 +263,21 @@ var It = ["aria-label"], Lt = {
|
|
|
263
263
|
],
|
|
264
264
|
setup(n, { emit: i }) {
|
|
265
265
|
let a = {
|
|
266
|
-
section:
|
|
267
|
-
title:
|
|
268
|
-
paragraph:
|
|
269
|
-
image:
|
|
266
|
+
section: Se,
|
|
267
|
+
title: ge,
|
|
268
|
+
paragraph: be,
|
|
269
|
+
image: fe,
|
|
270
270
|
button: ae,
|
|
271
|
-
divider:
|
|
272
|
-
spacer:
|
|
273
|
-
html:
|
|
274
|
-
social:
|
|
275
|
-
menu:
|
|
276
|
-
table:
|
|
277
|
-
video:
|
|
278
|
-
countdown:
|
|
279
|
-
custom:
|
|
280
|
-
}, s = n, c = i, { t: l } =
|
|
271
|
+
divider: se,
|
|
272
|
+
spacer: pe,
|
|
273
|
+
html: de,
|
|
274
|
+
social: ce,
|
|
275
|
+
menu: _e,
|
|
276
|
+
table: xe,
|
|
277
|
+
video: ve,
|
|
278
|
+
countdown: mt,
|
|
279
|
+
custom: we
|
|
280
|
+
}, s = n, c = i, { t: l } = V(), { t: f } = ut(), m = Ae(Re, "Canvas"), h = A(Ue, null), w = A(Be, null), E = A(He, {}), O = g(() => (E.plan?.hasFeature("ai_generation") ?? !1) && (E.ai?.isFeatureEnabled("chat") ?? !1)), j = g(() => (E.plan?.hasFeature("ai_generation") ?? !1) && (E.ai?.isFeatureEnabled("designToTemplate") ?? !1)), N = g({
|
|
281
281
|
get: () => s.content.blocks,
|
|
282
282
|
set: (e) => {
|
|
283
283
|
m.setContent({
|
|
@@ -290,26 +290,26 @@ var It = ["aria-label"], Lt = {
|
|
|
290
290
|
case "mobile": return 375;
|
|
291
291
|
default: return s.content.settings.width;
|
|
292
292
|
}
|
|
293
|
-
}), F = g(() => P.value +
|
|
294
|
-
function
|
|
295
|
-
|
|
293
|
+
}), F = g(() => P.value + qt * 2), ee = g(() => ({ fontFamily: s.content.settings.fontFamily })), I = g(() => N.value.length === 0 && !s.previewMode), L = u(0), te = g(() => I.value && L.value > 0);
|
|
294
|
+
function R() {
|
|
295
|
+
I.value && (L.value += 1);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
|
|
297
|
+
function z() {
|
|
298
|
+
I.value && (L.value = Math.max(0, L.value - 1));
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
300
|
+
function ne() {
|
|
301
|
+
L.value = 0;
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function re(e) {
|
|
304
304
|
s.previewMode || e.target === e.currentTarget && c("select-block", null);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
return
|
|
306
|
+
function ie(e) {
|
|
307
|
+
return ue(e, w, a);
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function B(e) {
|
|
310
310
|
return s.lockedBlocks?.get(e) ?? null;
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function oe(e, t) {
|
|
313
313
|
e.type === "custom" && m.updateBlock(e.id, {
|
|
314
314
|
fieldValues: t.fieldValues,
|
|
315
315
|
dataSourceFetched: t.dataSourceFetched
|
|
@@ -343,9 +343,9 @@ var It = ["aria-label"], Lt = {
|
|
|
343
343
|
"tpl-canvas--dark-mode": n.darkMode,
|
|
344
344
|
"tpl-preview-mode": n.previewMode
|
|
345
345
|
}]),
|
|
346
|
-
style: S(
|
|
347
|
-
onClick:
|
|
348
|
-
}, [k(T(
|
|
346
|
+
style: S(ee.value),
|
|
347
|
+
onClick: re
|
|
348
|
+
}, [k(T(le), {
|
|
349
349
|
modelValue: N.value,
|
|
350
350
|
"onUpdate:modelValue": a[2] ||= (e) => N.value = e,
|
|
351
351
|
group: "blocks",
|
|
@@ -360,38 +360,38 @@ var It = ["aria-label"], Lt = {
|
|
|
360
360
|
"force-fallback": !0,
|
|
361
361
|
class: p([
|
|
362
362
|
"tpl-canvas-blocks",
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
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" : "",
|
|
364
|
+
I.value && te.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
365
|
+
I.value && !te.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
366
366
|
]),
|
|
367
|
-
onDragenter:
|
|
368
|
-
onDragleave:
|
|
369
|
-
onDrop:
|
|
367
|
+
onDragenter: R,
|
|
368
|
+
onDragleave: z,
|
|
369
|
+
onDrop: ne
|
|
370
370
|
}, {
|
|
371
|
-
default: M(() => [
|
|
372
|
-
_("div",
|
|
371
|
+
default: M(() => [I.value ? (e(), v("div", zt, [
|
|
372
|
+
_("div", Bt, [k(T(wt), {
|
|
373
373
|
size: 48,
|
|
374
374
|
"stroke-width": 1
|
|
375
375
|
})]),
|
|
376
|
-
_("p",
|
|
377
|
-
_("p",
|
|
378
|
-
O.value && T(f) ? (e(), v("p",
|
|
376
|
+
_("p", Vt, D(T(l).canvas.noBlocks), 1),
|
|
377
|
+
_("p", Ht, D(T(l).canvas.dragHint), 1),
|
|
378
|
+
O.value && T(f) ? (e(), v("p", Ut, [
|
|
379
379
|
d(D(T(l).canvas.aiHintChat) + " ", 1),
|
|
380
380
|
_("button", {
|
|
381
381
|
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)]",
|
|
382
382
|
onClick: a[0] ||= (e) => c("open-ai-chat")
|
|
383
|
-
}, [k(T(
|
|
383
|
+
}, [k(T(Xe), {
|
|
384
384
|
size: 14,
|
|
385
385
|
"stroke-width": 2
|
|
386
386
|
}), d(" " + D(T(f).aiMenu.aiAssistant), 1)]),
|
|
387
387
|
d(" " + D(T(l).canvas.aiHintChatSuffix), 1)
|
|
388
388
|
])) : b("", !0),
|
|
389
|
-
j.value && T(f) ? (e(), v("p",
|
|
389
|
+
j.value && T(f) ? (e(), v("p", Wt, [
|
|
390
390
|
d(D(T(l).canvas.aiHintDesign) + " ", 1),
|
|
391
391
|
_("button", {
|
|
392
392
|
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)]",
|
|
393
393
|
onClick: a[1] ||= (e) => c("open-design-reference")
|
|
394
|
-
}, [k(T(
|
|
394
|
+
}, [k(T(rt), {
|
|
395
395
|
size: 14,
|
|
396
396
|
"stroke-width": 2
|
|
397
397
|
}), d(" " + D(T(f).aiMenu.designToTemplate), 1)]),
|
|
@@ -400,30 +400,30 @@ var It = ["aria-label"], Lt = {
|
|
|
400
400
|
])) : b("", !0), (e(!0), v(y, null, o(N.value, (i) => t((e(), v("div", {
|
|
401
401
|
key: i.id,
|
|
402
402
|
class: "tpl-block-item"
|
|
403
|
-
}, [_("div",
|
|
403
|
+
}, [_("div", Gt, [B(i.id) ? (e(), v("div", {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
406
406
|
style: S({
|
|
407
|
-
outline: `2px solid ${
|
|
407
|
+
outline: `2px solid ${B(i.id).color}`,
|
|
408
408
|
outlineOffset: "-1px"
|
|
409
409
|
})
|
|
410
410
|
}, [_("span", {
|
|
411
411
|
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",
|
|
412
412
|
style: S({
|
|
413
|
-
backgroundColor:
|
|
414
|
-
color: T(
|
|
413
|
+
backgroundColor: B(i.id).color,
|
|
414
|
+
color: T(pt)(B(i.id).color)
|
|
415
415
|
})
|
|
416
|
-
}, [_("span",
|
|
416
|
+
}, [_("span", Kt, D(B(i.id).name.charAt(0)), 1), d(" " + D(B(i.id).name), 1)], 4)], 4)) : b("", !0), k(Ce, {
|
|
417
417
|
block: i,
|
|
418
|
-
"is-selected": !n.previewMode && n.selectedBlockId === i.id && !
|
|
418
|
+
"is-selected": !n.previewMode && n.selectedBlockId === i.id && !B(i.id),
|
|
419
419
|
viewport: n.viewport,
|
|
420
420
|
"preview-mode": n.previewMode,
|
|
421
|
-
onSelect: (e) => n.previewMode ||
|
|
421
|
+
onSelect: (e) => n.previewMode || B(i.id) ? void 0 : c("select-block", i.id)
|
|
422
422
|
}, {
|
|
423
|
-
default: M(() => [(e(), C(r(
|
|
423
|
+
default: M(() => [(e(), C(r(ie(i)), {
|
|
424
424
|
block: i,
|
|
425
425
|
viewport: n.viewport,
|
|
426
|
-
onFetchData: (e) =>
|
|
426
|
+
onFetchData: (e) => oe(i, e),
|
|
427
427
|
onUpdate: (e) => T(m).updateBlock(i.id, e)
|
|
428
428
|
}, null, 40, [
|
|
429
429
|
"block",
|
|
@@ -444,12 +444,12 @@ var It = ["aria-label"], Lt = {
|
|
|
444
444
|
"modelValue",
|
|
445
445
|
"disabled",
|
|
446
446
|
"class"
|
|
447
|
-
])], 6)], 12,
|
|
447
|
+
])], 6)], 12, Rt)], 4));
|
|
448
448
|
}
|
|
449
|
-
}), [["__scopeId", "data-v-a9a1158b"]]),
|
|
449
|
+
}), [["__scopeId", "data-v-a9a1158b"]]), Yt = m({
|
|
450
450
|
name: "CustomBlockStylesheets",
|
|
451
451
|
setup() {
|
|
452
|
-
let e = A(
|
|
452
|
+
let e = A(Fe, null);
|
|
453
453
|
return () => e ? e.value.map((e, t) => c("style", {
|
|
454
454
|
key: t,
|
|
455
455
|
"data-tpl-custom-block-stylesheet": "",
|
|
@@ -459,7 +459,7 @@ var It = ["aria-label"], Lt = {
|
|
|
459
459
|
});
|
|
460
460
|
//#endregion
|
|
461
461
|
//#region src/utils/resolvePaletteBlocks.ts
|
|
462
|
-
function
|
|
462
|
+
function Xt(e, t) {
|
|
463
463
|
if (!t || t.length === 0) return {
|
|
464
464
|
items: e,
|
|
465
465
|
unknown: []
|
|
@@ -478,27 +478,27 @@ function Jt(e, t) {
|
|
|
478
478
|
}
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region src/components/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
481
|
-
var
|
|
481
|
+
var Zt = ["aria-label"], Qt = {
|
|
482
482
|
key: 0,
|
|
483
483
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
484
|
-
},
|
|
484
|
+
}, $t = ["aria-label"], en = {
|
|
485
485
|
key: 0,
|
|
486
486
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
487
|
-
},
|
|
487
|
+
}, tn = {
|
|
488
488
|
key: 1,
|
|
489
489
|
class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]"
|
|
490
|
-
},
|
|
490
|
+
}, nn = [
|
|
491
491
|
"data-palette-type",
|
|
492
492
|
"aria-label",
|
|
493
493
|
"onClick",
|
|
494
494
|
"onKeydown"
|
|
495
|
-
],
|
|
495
|
+
], rn = { class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:transition-transform tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:scale-105" }, an = {
|
|
496
496
|
key: 0,
|
|
497
497
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
498
|
-
},
|
|
498
|
+
}, on = /* @__PURE__ */ m({
|
|
499
499
|
__name: "Sidebar",
|
|
500
500
|
setup(t) {
|
|
501
|
-
let { t: n, format: i } =
|
|
501
|
+
let { t: n, format: i } = V(), { t: s } = ut(), c = A(Pe, []), l = A(Me, void 0), d = A(Ne, void 0), f = A(Re, null), p = A(He, {}), m = g(() => (p.savedModules?.moduleCount.value ?? 0) > 0), h = u(!1), x = u(!1);
|
|
502
502
|
function w() {
|
|
503
503
|
x.value || (h.value = !1);
|
|
504
504
|
}
|
|
@@ -535,24 +535,24 @@ var Yt = ["aria-label"], Xt = {
|
|
|
535
535
|
label: e.name,
|
|
536
536
|
isCustom: !0,
|
|
537
537
|
icon: e.icon
|
|
538
|
-
}))), F = g(() => [...N.value, ...P.value]),
|
|
539
|
-
a(() =>
|
|
540
|
-
for (let t of e)
|
|
538
|
+
}))), F = g(() => [...N.value, ...P.value]), ee = g(() => Xt(F.value, l)), I = g(() => ee.value.items), R = /* @__PURE__ */ new Set();
|
|
539
|
+
a(() => ee.value.unknown, (e) => {
|
|
540
|
+
for (let t of e) R.has(t) || (R.add(t), B.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.`));
|
|
541
541
|
}, { immediate: !0 });
|
|
542
|
-
function
|
|
542
|
+
function z(e) {
|
|
543
543
|
if (e.isCustom) {
|
|
544
544
|
let t = e.type.replace("custom:", ""), n = c.find((e) => e.type === t);
|
|
545
|
-
if (n) return
|
|
545
|
+
if (n) return te(n);
|
|
546
546
|
}
|
|
547
|
-
return
|
|
547
|
+
return L(e.type, d);
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function re(e) {
|
|
550
550
|
if (!f) return;
|
|
551
|
-
let t =
|
|
551
|
+
let t = z(e);
|
|
552
552
|
f.addBlock(t), f.selectBlock(t.id);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
554
|
+
function ie(e, t) {
|
|
555
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), re(t));
|
|
556
556
|
}
|
|
557
557
|
return (t, a) => (e(), v("aside", {
|
|
558
558
|
"aria-label": T(n).sidebarNav.palette,
|
|
@@ -568,7 +568,7 @@ var Yt = ["aria-label"], Xt = {
|
|
|
568
568
|
onMouseleave: w,
|
|
569
569
|
onFocusin: a[2] ||= (e) => h.value = !0,
|
|
570
570
|
onFocusout: a[3] ||= (e) => h.value = !1
|
|
571
|
-
}, [m.value && T(s) ? (e(), v("div",
|
|
571
|
+
}, [m.value && T(s) ? (e(), v("div", Qt, [_("button", {
|
|
572
572
|
type: "button",
|
|
573
573
|
"aria-label": T(n).sidebarNav.browseModules,
|
|
574
574
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)]",
|
|
@@ -580,50 +580,49 @@ var Yt = ["aria-label"], Xt = {
|
|
|
580
580
|
"stroke-width": 1.5,
|
|
581
581
|
class: "tpl:shrink-0"
|
|
582
582
|
}),
|
|
583
|
-
h.value ? (e(), v("span",
|
|
584
|
-
h.value ? (e(), v("span",
|
|
585
|
-
], 12,
|
|
586
|
-
"model-value":
|
|
583
|
+
h.value ? (e(), v("span", en, D(T(s).modules.title), 1)) : b("", !0),
|
|
584
|
+
h.value ? (e(), v("span", tn, D(T(p).savedModules?.moduleCount.value ?? 0), 1)) : b("", !0)
|
|
585
|
+
], 12, $t)])) : b("", !0), k(T(le), {
|
|
586
|
+
"model-value": I.value,
|
|
587
587
|
group: {
|
|
588
588
|
name: "blocks",
|
|
589
589
|
pull: "clone",
|
|
590
590
|
put: !1
|
|
591
591
|
},
|
|
592
|
-
clone:
|
|
592
|
+
clone: z,
|
|
593
593
|
sort: !1,
|
|
594
594
|
animation: 150,
|
|
595
|
-
"ghost-class": "tpl-ghost",
|
|
596
595
|
"force-fallback": !0,
|
|
597
596
|
class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:gap-0.5 tpl:overflow-y-auto tpl:p-1",
|
|
598
597
|
onChoose: E,
|
|
599
598
|
onEnd: O
|
|
600
599
|
}, {
|
|
601
|
-
default: M(() => [(e(!0), v(y, null, o(
|
|
600
|
+
default: M(() => [(e(!0), v(y, null, o(I.value, (t) => (e(), v("button", {
|
|
602
601
|
key: t.type,
|
|
603
602
|
type: "button",
|
|
604
603
|
"data-palette-type": t.type,
|
|
605
604
|
"aria-label": T(i)(T(n).sidebarNav.insertBlock, { block: t.label }),
|
|
606
605
|
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",
|
|
607
606
|
style: S({ justifyContent: h.value ? "flex-start" : "center" }),
|
|
608
|
-
onClick: (e) =>
|
|
609
|
-
onKeydown: (e) =>
|
|
610
|
-
}, [_("div",
|
|
607
|
+
onClick: (e) => re(t),
|
|
608
|
+
onKeydown: (e) => ie(e, t)
|
|
609
|
+
}, [_("div", rn, [T(Ye)[t.type] ? (e(), C(r(T(Ye)[t.type]), {
|
|
611
610
|
key: 0,
|
|
612
611
|
size: 20,
|
|
613
612
|
"stroke-width": 1.5
|
|
614
|
-
})) : t.isCustom ? (e(), C(
|
|
613
|
+
})) : t.isCustom ? (e(), C(oe, {
|
|
615
614
|
key: 1,
|
|
616
615
|
icon: t.icon,
|
|
617
616
|
size: 20
|
|
618
|
-
}, null, 8, ["icon"])) : b("", !0)]), h.value ? (e(), v("span",
|
|
617
|
+
}, null, 8, ["icon"])) : b("", !0)]), h.value ? (e(), v("span", an, D(t.label), 1)) : b("", !0)], 44, nn))), 128))]),
|
|
619
618
|
_: 1
|
|
620
|
-
}, 8, ["model-value"])], 44,
|
|
619
|
+
}, 8, ["model-value"])], 44, Zt));
|
|
621
620
|
}
|
|
622
621
|
});
|
|
623
622
|
//#endregion
|
|
624
623
|
//#region src/composables/useMergeTagField.ts
|
|
625
|
-
function
|
|
626
|
-
let { modelValue: t, emit: r, elementRef: i } = e, { canRequestMergeTag: a, isRequesting: o, isMergeTagValue: s, getMergeTagLabel: c, requestMergeTag: d, syntax: f } =
|
|
624
|
+
function sn(e) {
|
|
625
|
+
let { modelValue: t, emit: r, elementRef: i } = e, { canRequestMergeTag: a, isRequesting: o, isMergeTagValue: s, getMergeTagLabel: c, requestMergeTag: d, syntax: f } = dt(), p = u(!1), m = !1, h = !1;
|
|
627
626
|
l() && w(() => {
|
|
628
627
|
h = !0;
|
|
629
628
|
});
|
|
@@ -641,10 +640,10 @@ function an(e) {
|
|
|
641
640
|
type: "mergeTag",
|
|
642
641
|
value: t,
|
|
643
642
|
label: c(t)
|
|
644
|
-
}) :
|
|
643
|
+
}) : F(t, f) ? n.push({
|
|
645
644
|
type: "logicMergeTag",
|
|
646
645
|
value: t,
|
|
647
|
-
keyword:
|
|
646
|
+
keyword: R(t, f)
|
|
648
647
|
}) : n.push({
|
|
649
648
|
type: "text",
|
|
650
649
|
value: t
|
|
@@ -704,10 +703,10 @@ function an(e) {
|
|
|
704
703
|
}
|
|
705
704
|
//#endregion
|
|
706
705
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
707
|
-
var
|
|
706
|
+
var cn = ["aria-label", "onKeydown"], ln = ["data-tooltip"], un = ["data-tooltip"], dn = {
|
|
708
707
|
key: 2,
|
|
709
708
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
710
|
-
},
|
|
709
|
+
}, fn = ["aria-label", "title"], pn = /* @__PURE__ */ m({
|
|
711
710
|
__name: "MergeTagSegments",
|
|
712
711
|
props: {
|
|
713
712
|
segments: {},
|
|
@@ -716,7 +715,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
716
715
|
},
|
|
717
716
|
emits: ["edit", "clear"],
|
|
718
717
|
setup(t, { emit: n }) {
|
|
719
|
-
let r = n, { t: i } =
|
|
718
|
+
let r = n, { t: i } = V();
|
|
720
719
|
function a() {
|
|
721
720
|
r("edit");
|
|
722
721
|
}
|
|
@@ -735,7 +734,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
735
734
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
736
735
|
color: "var(--tpl-primary)"
|
|
737
736
|
}
|
|
738
|
-
}, D(t.label), 9,
|
|
737
|
+
}, D(t.label), 9, ln)) : t.type === "logicMergeTag" ? (e(), v("span", {
|
|
739
738
|
key: 1,
|
|
740
739
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
741
740
|
"data-tooltip": t.value,
|
|
@@ -744,44 +743,44 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
744
743
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
745
744
|
color: "var(--tpl-primary)"
|
|
746
745
|
}
|
|
747
|
-
}, D(t.keyword), 9,
|
|
746
|
+
}, D(t.keyword), 9, un)) : (e(), v("span", dn, D(t.value), 1))], 64))), 128)), _("button", {
|
|
748
747
|
type: "button",
|
|
749
748
|
class: "tpl:ml-auto tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all hover:tpl:text-[var(--tpl-danger)] hover:tpl:opacity-100",
|
|
750
749
|
"aria-label": T(i).mergeTag.remove,
|
|
751
750
|
title: T(i).mergeTag.remove,
|
|
752
751
|
onClick: s[0] ||= h((e) => r("clear"), ["stop"])
|
|
753
|
-
}, [k(T(
|
|
752
|
+
}, [k(T(ct), {
|
|
754
753
|
size: 12,
|
|
755
754
|
"stroke-width": 2.5
|
|
756
|
-
})], 8,
|
|
755
|
+
})], 8, fn)], 42, cn));
|
|
757
756
|
}
|
|
758
|
-
}),
|
|
757
|
+
}), mn = [
|
|
759
758
|
"aria-label",
|
|
760
759
|
"title",
|
|
761
760
|
"disabled"
|
|
762
|
-
],
|
|
761
|
+
], hn = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", gn = /* @__PURE__ */ m({
|
|
763
762
|
__name: "MergeTagInsertButton",
|
|
764
763
|
props: { disabled: { type: Boolean } },
|
|
765
764
|
emits: ["insert"],
|
|
766
765
|
setup(t) {
|
|
767
|
-
let { t: n } =
|
|
766
|
+
let { t: n } = V();
|
|
768
767
|
return (r, i) => (e(), v("button", {
|
|
769
768
|
type: "button",
|
|
770
|
-
class: p([
|
|
769
|
+
class: p([hn, "tpl:mt-1.5"]),
|
|
771
770
|
"aria-label": T(n).mergeTag.insert,
|
|
772
771
|
title: T(n).mergeTag.insert,
|
|
773
772
|
disabled: t.disabled,
|
|
774
773
|
onClick: i[0] ||= (e) => r.$emit("insert")
|
|
775
|
-
}, [k(T(
|
|
774
|
+
}, [k(T(ot), {
|
|
776
775
|
size: 12,
|
|
777
776
|
"stroke-width": 2
|
|
778
|
-
}), d(" " + D(T(n).mergeTag.insert), 1)], 10,
|
|
777
|
+
}), d(" " + D(T(n).mergeTag.insert), 1)], 10, mn));
|
|
779
778
|
}
|
|
780
|
-
}),
|
|
779
|
+
}), _n = { key: 0 }, vn = { key: 1 }, yn = [
|
|
781
780
|
"value",
|
|
782
781
|
"placeholder",
|
|
783
782
|
"rows"
|
|
784
|
-
],
|
|
783
|
+
], bn = "tpl:w-full tpl:resize-y tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", xn = "tpl:flex tpl:w-full tpl:min-h-20 tpl:cursor-pointer tpl:items-start tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", Sn = /* @__PURE__ */ m({
|
|
785
784
|
__name: "MergeTagTextarea",
|
|
786
785
|
props: {
|
|
787
786
|
modelValue: {},
|
|
@@ -790,46 +789,46 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
790
789
|
},
|
|
791
790
|
emits: ["update:modelValue"],
|
|
792
791
|
setup(t, { emit: n }) {
|
|
793
|
-
let r = t, i = n, a = u(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: d, startEditing: f, stopEditing: m, handleInput: h, clearValue: g, insertMergeTag: y } =
|
|
792
|
+
let r = t, i = n, a = u(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: d, startEditing: f, stopEditing: m, handleInput: h, clearValue: g, insertMergeTag: y } = sn({
|
|
794
793
|
modelValue: () => r.modelValue,
|
|
795
794
|
emit: (e) => i("update:modelValue", e),
|
|
796
795
|
elementRef: a
|
|
797
796
|
});
|
|
798
|
-
return (n, r) => T(s) && !T(d) ? (e(), v("div",
|
|
797
|
+
return (n, r) => T(s) && !T(d) ? (e(), v("div", _n, [k(pn, {
|
|
799
798
|
segments: T(o),
|
|
800
|
-
"display-class":
|
|
799
|
+
"display-class": xn,
|
|
801
800
|
onEdit: T(f),
|
|
802
801
|
onClear: T(g)
|
|
803
802
|
}, null, 8, [
|
|
804
803
|
"segments",
|
|
805
804
|
"onEdit",
|
|
806
805
|
"onClear"
|
|
807
|
-
]), T(c) ? (e(), C(
|
|
806
|
+
]), T(c) ? (e(), C(gn, {
|
|
808
807
|
key: 0,
|
|
809
808
|
disabled: T(l),
|
|
810
809
|
onInsert: T(y)
|
|
811
|
-
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : (e(), v("div",
|
|
810
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : (e(), v("div", vn, [_("textarea", {
|
|
812
811
|
ref_key: "textareaRef",
|
|
813
812
|
ref: a,
|
|
814
|
-
class: p(
|
|
813
|
+
class: p(bn),
|
|
815
814
|
value: t.modelValue,
|
|
816
815
|
placeholder: t.placeholder,
|
|
817
816
|
rows: t.rows,
|
|
818
817
|
onInput: r[0] ||= (...e) => T(h) && T(h)(...e),
|
|
819
818
|
onBlur: r[1] ||= (...e) => T(m) && T(m)(...e),
|
|
820
819
|
onKeydown: r[2] ||= E((...e) => T(m) && T(m)(...e), ["escape"])
|
|
821
|
-
}, null, 40,
|
|
820
|
+
}, null, 40, yn), T(c) ? (e(), C(gn, {
|
|
822
821
|
key: 0,
|
|
823
822
|
disabled: T(l),
|
|
824
823
|
onInsert: T(y)
|
|
825
824
|
}, null, 8, ["disabled", "onInsert"])) : b("", !0)]));
|
|
826
825
|
}
|
|
827
|
-
}),
|
|
826
|
+
}), Cn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, wn = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, Tn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, En = { class: "tpl:mb-3.5" }, Dn = { class: "tpl:grid tpl:grid-cols-4 tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, On = ["onClick"], kn = { class: "tpl:flex tpl:items-stretch" }, An = ["value"], jn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Mn = { class: "tpl:mb-3.5" }, Nn = ["value"], Pn = ["value"], Fn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, In = ["value"], Ln = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Rn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, zn = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Bn = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Vn = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, Hn = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, Un = { class: "tpl:mb-2.5 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text-muted)]" }, Wn = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Gn = { class: "tpl:mb-1 tpl:last:mb-0" }, Kn = { class: "tpl:mb-1 tpl:last:mb-0" }, qn = { class: "tpl:mb-1 tpl:last:mb-0" }, Jn = 150, Yn = /* @__PURE__ */ m({
|
|
828
827
|
__name: "TemplateSettings",
|
|
829
828
|
props: { settings: {} },
|
|
830
829
|
emits: ["update"],
|
|
831
830
|
setup(t, { emit: n }) {
|
|
832
|
-
let r = t, i = n, { t: a } =
|
|
831
|
+
let r = t, i = n, { t: a } = V(), s = Ae(Ie, "TemplateSettings"), c = g(() => s.fonts.value), l = g(() => c.value.some((e) => e.value === r.settings.fontFamily) ? r.settings.fontFamily : s.defaultFont.value), u = [
|
|
833
832
|
{
|
|
834
833
|
value: 480,
|
|
835
834
|
label: "480px"
|
|
@@ -847,14 +846,14 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
847
846
|
label: "800px"
|
|
848
847
|
}
|
|
849
848
|
];
|
|
850
|
-
return (n, r) => (e(), v("aside",
|
|
851
|
-
_("div", { class: p(T(
|
|
852
|
-
_("div",
|
|
849
|
+
return (n, r) => (e(), v("aside", Cn, [_("div", wn, [
|
|
850
|
+
_("div", { class: p(T(vt)) }, [
|
|
851
|
+
_("div", Tn, [k(T(Ft), {
|
|
853
852
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
854
853
|
size: 14,
|
|
855
854
|
"stroke-width": 2
|
|
856
855
|
}), _("span", null, D(T(a).templateSettings.layout), 1)]),
|
|
857
|
-
_("div",
|
|
856
|
+
_("div", En, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.widthPreset), 3), _("div", Dn, [(e(), v(y, null, o(u, (e) => _("button", {
|
|
858
857
|
key: e.value,
|
|
859
858
|
class: "tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
860
859
|
style: S({
|
|
@@ -863,79 +862,79 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
863
862
|
boxShadow: t.settings.width === e.value ? "var(--tpl-shadow)" : "none"
|
|
864
863
|
}),
|
|
865
864
|
onClick: (t) => i("update", { width: e.value })
|
|
866
|
-
}, D(e.label), 13,
|
|
867
|
-
_("div", null, [_("label", { class: p(T(
|
|
865
|
+
}, D(e.label), 13, On)), 64))])]),
|
|
866
|
+
_("div", null, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.customWidth), 3), _("div", kn, [_("input", {
|
|
868
867
|
type: "number",
|
|
869
|
-
class: p(T(
|
|
868
|
+
class: p(T(K)),
|
|
870
869
|
value: t.settings.width,
|
|
871
870
|
min: "300",
|
|
872
871
|
max: "900",
|
|
873
872
|
onInput: r[0] ||= (e) => i("update", { width: Number(e.target.value) })
|
|
874
|
-
}, null, 42,
|
|
873
|
+
}, null, 42, An), _("span", { class: p(T(G)) }, "px", 2)])])
|
|
875
874
|
], 2),
|
|
876
|
-
_("div", { class: p(T(
|
|
877
|
-
_("div",
|
|
875
|
+
_("div", { class: p(T(vt)) }, [
|
|
876
|
+
_("div", jn, [k(T(Tt), {
|
|
878
877
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
879
878
|
size: 14,
|
|
880
879
|
"stroke-width": 2
|
|
881
880
|
}), _("span", null, D(T(a).templateSettings.appearance), 1)]),
|
|
882
|
-
_("div",
|
|
881
|
+
_("div", Mn, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.backgroundColor), 3), k(q, {
|
|
883
882
|
"model-value": t.settings.backgroundColor,
|
|
884
|
-
placeholder: T(
|
|
883
|
+
placeholder: T(bt),
|
|
885
884
|
"onUpdate:modelValue": r[1] ||= (e) => i("update", { backgroundColor: e })
|
|
886
885
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
887
|
-
_("div", null, [_("label", { class: p(T(
|
|
888
|
-
class: p(T(
|
|
886
|
+
_("div", null, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.fontFamily), 3), _("select", {
|
|
887
|
+
class: p(T(U)),
|
|
889
888
|
value: l.value,
|
|
890
889
|
onChange: r[2] ||= (e) => i("update", { fontFamily: e.target.value })
|
|
891
890
|
}, [(e(!0), v(y, null, o(c.value, (t) => (e(), v("option", {
|
|
892
891
|
key: t.value,
|
|
893
892
|
value: t.value
|
|
894
|
-
}, D(t.label), 9,
|
|
893
|
+
}, D(t.label), 9, Pn))), 128))], 42, Nn)])
|
|
895
894
|
], 2),
|
|
896
|
-
_("div", { class: p(T(
|
|
895
|
+
_("div", { class: p(T(vt)) }, [_("div", Fn, [k(T(Et), {
|
|
897
896
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
898
897
|
size: 14,
|
|
899
898
|
"stroke-width": 2
|
|
900
899
|
}), _("span", null, D(T(a).templateSettings.language), 1)]), _("div", null, [
|
|
901
|
-
_("label", { class: p(T(
|
|
900
|
+
_("label", { class: p(T(W)) }, D(T(a).templateSettings.contentLocale), 3),
|
|
902
901
|
_("input", {
|
|
903
902
|
type: "text",
|
|
904
|
-
class: p(T(
|
|
903
|
+
class: p(T(U)),
|
|
905
904
|
value: t.settings.locale ?? "",
|
|
906
905
|
placeholder: "en",
|
|
907
906
|
spellcheck: "false",
|
|
908
907
|
autocapitalize: "off",
|
|
909
908
|
autocomplete: "off",
|
|
910
909
|
onInput: r[3] ||= (e) => i("update", { locale: e.target.value.trim() || void 0 })
|
|
911
|
-
}, null, 42,
|
|
912
|
-
_("p",
|
|
910
|
+
}, null, 42, In),
|
|
911
|
+
_("p", Ln, D(T(a).templateSettings.contentLocaleHint), 1)
|
|
913
912
|
])], 2),
|
|
914
|
-
_("div", { class: p(T(
|
|
913
|
+
_("div", { class: p(T(vt)) }, [_("div", Rn, [k(T(tt), {
|
|
915
914
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
916
915
|
size: 14,
|
|
917
916
|
"stroke-width": 2
|
|
918
|
-
}), _("span", null, D(T(a).templateSettings.preheaderText), 1)]), _("div", null, [k(
|
|
917
|
+
}), _("span", null, D(T(a).templateSettings.preheaderText), 1)]), _("div", null, [k(Sn, {
|
|
919
918
|
"model-value": t.settings.preheaderText ?? "",
|
|
920
919
|
placeholder: T(a).templateSettings.preheaderTextPlaceholder,
|
|
921
920
|
rows: 2,
|
|
922
921
|
"onUpdate:modelValue": r[4] ||= (e) => i("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
923
|
-
}, null, 8, ["model-value", "placeholder"]), _("div",
|
|
924
|
-
_("div",
|
|
922
|
+
}, null, 8, ["model-value", "placeholder"]), _("div", zn, [_("span", Bn, D(T(a).templateSettings.preheaderTextHint), 1), _("span", Vn, D((t.settings.preheaderText ?? "").length) + "/" + D(Jn), 1)])])], 2),
|
|
923
|
+
_("div", Hn, [_("div", Un, [k(T(it), {
|
|
925
924
|
size: 14,
|
|
926
925
|
"stroke-width": 2
|
|
927
|
-
}), _("span", null, D(T(a).templateSettings.tips), 1)]), _("ul",
|
|
928
|
-
_("li",
|
|
929
|
-
_("li",
|
|
930
|
-
_("li",
|
|
926
|
+
}), _("span", null, D(T(a).templateSettings.tips), 1)]), _("ul", Wn, [
|
|
927
|
+
_("li", Gn, D(T(a).templateSettings.tip1), 1),
|
|
928
|
+
_("li", Kn, D(T(a).templateSettings.tip2), 1),
|
|
929
|
+
_("li", qn, D(T(a).templateSettings.tip3), 1)
|
|
931
930
|
])])
|
|
932
931
|
])]));
|
|
933
932
|
}
|
|
934
|
-
}),
|
|
933
|
+
}), Xn = { key: 0 }, Zn = { key: 1 }, Qn = [
|
|
935
934
|
"type",
|
|
936
935
|
"value",
|
|
937
936
|
"placeholder"
|
|
938
|
-
],
|
|
937
|
+
], $n = "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)]", Z = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
939
938
|
__name: "MergeTagInput",
|
|
940
939
|
props: {
|
|
941
940
|
modelValue: {},
|
|
@@ -948,14 +947,14 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
948
947
|
},
|
|
949
948
|
emits: ["update:modelValue"],
|
|
950
949
|
setup(t, { emit: n }) {
|
|
951
|
-
let r = t, i = n, a = u(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: d, startEditing: f, stopEditing: m, handleInput: h, clearValue: g, insertMergeTag: y } =
|
|
950
|
+
let r = t, i = n, a = u(null), { segments: o, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: d, startEditing: f, stopEditing: m, handleInput: h, clearValue: g, insertMergeTag: y } = sn({
|
|
952
951
|
modelValue: () => r.modelValue,
|
|
953
952
|
emit: (e) => i("update:modelValue", e),
|
|
954
953
|
elementRef: a
|
|
955
954
|
});
|
|
956
|
-
return (n, r) => T(s) && !T(d) ? (e(), v("div",
|
|
955
|
+
return (n, r) => T(s) && !T(d) ? (e(), v("div", Xn, [k(pn, {
|
|
957
956
|
segments: T(o),
|
|
958
|
-
"display-class":
|
|
957
|
+
"display-class": $n,
|
|
959
958
|
pulse: t.pulse,
|
|
960
959
|
onEdit: T(f),
|
|
961
960
|
onClear: T(g)
|
|
@@ -964,30 +963,33 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
964
963
|
"pulse",
|
|
965
964
|
"onEdit",
|
|
966
965
|
"onClear"
|
|
967
|
-
]), T(c) ? (e(), C(
|
|
966
|
+
]), T(c) ? (e(), C(gn, {
|
|
968
967
|
key: 0,
|
|
969
968
|
disabled: T(l),
|
|
970
969
|
onInsert: T(y)
|
|
971
|
-
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : (e(), v("div",
|
|
970
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : (e(), v("div", Zn, [_("input", {
|
|
972
971
|
ref_key: "inputRef",
|
|
973
972
|
ref: a,
|
|
974
973
|
type: t.type,
|
|
975
|
-
class: p([T(
|
|
974
|
+
class: p([T(U), { "tpl-pulse-fill": t.pulse }]),
|
|
976
975
|
value: t.modelValue,
|
|
977
976
|
placeholder: t.placeholder,
|
|
978
977
|
onInput: r[0] ||= (...e) => T(h) && T(h)(...e),
|
|
979
978
|
onBlur: r[1] ||= (...e) => T(m) && T(m)(...e),
|
|
980
979
|
onKeydown: r[2] ||= E((...e) => T(m) && T(m)(...e), ["escape"])
|
|
981
|
-
}, null, 42,
|
|
980
|
+
}, null, 42, Qn), T(c) ? (e(), C(gn, {
|
|
982
981
|
key: 0,
|
|
983
982
|
disabled: T(l),
|
|
984
983
|
onInsert: T(y)
|
|
985
984
|
}, null, 8, ["disabled", "onInsert"])) : b("", !0)]));
|
|
986
985
|
}
|
|
987
|
-
}), [["__scopeId", "data-v-358207dd"]]),
|
|
986
|
+
}), [["__scopeId", "data-v-358207dd"]]), er = { class: "tpl:mb-3.5" }, tr = ["value"], nr = { value: "" }, rr = ["value"], ir = { class: "tpl:mb-3.5" }, ar = { class: "tpl:mb-3.5" }, or = {
|
|
988
987
|
key: 0,
|
|
989
988
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
990
|
-
},
|
|
989
|
+
}, sr = ["checked"], cr = { class: "tpl:mb-3.5" }, lr = { class: "tpl:mb-3.5" }, ur = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, dr = { class: "tpl:mb-3.5" }, fr = { class: "tpl:flex tpl:items-stretch" }, pr = ["value"], mr = { class: "tpl:mb-3.5" }, hr = { class: "tpl:flex tpl:items-stretch" }, gr = ["value"], _r = { class: "tpl:mb-3.5" }, vr = ["value"], yr = { value: "auto" }, br = { value: "full" }, xr = { value: "custom" }, Sr = {
|
|
990
|
+
key: 0,
|
|
991
|
+
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
992
|
+
}, Cr = ["value"], wr = 200, Tr = /* @__PURE__ */ m({
|
|
991
993
|
__name: "ButtonToolbar",
|
|
992
994
|
props: {
|
|
993
995
|
block: {},
|
|
@@ -995,64 +997,99 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
995
997
|
},
|
|
996
998
|
emits: ["update"],
|
|
997
999
|
setup(t, { emit: n }) {
|
|
998
|
-
let r = n, { t:
|
|
999
|
-
function
|
|
1000
|
-
|
|
1000
|
+
let r = t, i = n, { t: a } = V(), s = g(() => r.block.width === "full" ? "full" : typeof r.block.width == "number" ? "custom" : "auto");
|
|
1001
|
+
function c(e, t) {
|
|
1002
|
+
i("update", { [e]: t });
|
|
1003
|
+
}
|
|
1004
|
+
function l(e) {
|
|
1005
|
+
if (e === "full") {
|
|
1006
|
+
c("width", "full");
|
|
1007
|
+
return;
|
|
1008
|
+
}
|
|
1009
|
+
if (e === "custom") {
|
|
1010
|
+
c("width", typeof r.block.width == "number" ? r.block.width : wr);
|
|
1011
|
+
return;
|
|
1012
|
+
}
|
|
1013
|
+
c("width", void 0);
|
|
1014
|
+
}
|
|
1015
|
+
function u(e) {
|
|
1016
|
+
let t = Number(e);
|
|
1017
|
+
!Number.isFinite(t) || t <= 0 || c("width", t);
|
|
1001
1018
|
}
|
|
1002
1019
|
return (n, r) => (e(), v(y, null, [
|
|
1003
|
-
_("div",
|
|
1004
|
-
class: p(T(
|
|
1020
|
+
_("div", er, [_("label", { class: p(T(W)) }, D(T(a).button.fontFamily), 3), _("select", {
|
|
1021
|
+
class: p(T(U)),
|
|
1005
1022
|
value: t.block.fontFamily || "",
|
|
1006
|
-
onChange: r[0] ||= (e) =>
|
|
1007
|
-
}, [_("option",
|
|
1023
|
+
onChange: r[0] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
1024
|
+
}, [_("option", nr, D(T(a).button.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
1008
1025
|
key: t.value,
|
|
1009
1026
|
value: t.value
|
|
1010
|
-
}, D(t.label), 9,
|
|
1011
|
-
_("div",
|
|
1027
|
+
}, D(t.label), 9, rr))), 128))], 42, tr)]),
|
|
1028
|
+
_("div", ir, [_("label", { class: p(T(W)) }, D(T(a).button.text), 3), k(Z, {
|
|
1012
1029
|
"model-value": t.block.text,
|
|
1013
1030
|
type: "text",
|
|
1014
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
1031
|
+
"onUpdate:modelValue": r[1] ||= (e) => c("text", e)
|
|
1015
1032
|
}, null, 8, ["model-value"])]),
|
|
1016
|
-
_("div",
|
|
1017
|
-
_("label", { class: p(T(
|
|
1018
|
-
k(
|
|
1033
|
+
_("div", ar, [
|
|
1034
|
+
_("label", { class: p(T(W)) }, D(T(a).button.url), 3),
|
|
1035
|
+
k(Z, {
|
|
1019
1036
|
"model-value": t.block.url,
|
|
1020
1037
|
type: "url",
|
|
1021
|
-
placeholder: T(
|
|
1022
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
1038
|
+
placeholder: T(a).button.urlPlaceholder,
|
|
1039
|
+
"onUpdate:modelValue": r[2] ||= (e) => c("url", e)
|
|
1023
1040
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1024
|
-
t.block.url ? (e(), v("label",
|
|
1041
|
+
t.block.url ? (e(), v("label", or, [_("input", {
|
|
1025
1042
|
type: "checkbox",
|
|
1026
1043
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1027
1044
|
checked: t.block.openInNewTab ?? !1,
|
|
1028
|
-
onChange: r[3] ||= (e) =>
|
|
1029
|
-
}, null, 40,
|
|
1045
|
+
onChange: r[3] ||= (e) => c("openInNewTab", e.target.checked)
|
|
1046
|
+
}, null, 40, sr), d(" " + D(T(a).button.openInNewTab), 1)])) : b("", !0)
|
|
1030
1047
|
]),
|
|
1031
|
-
_("div",
|
|
1048
|
+
_("div", cr, [_("label", { class: p(T(W)) }, D(T(a).button.background), 3), k(q, {
|
|
1032
1049
|
"model-value": t.block.backgroundColor,
|
|
1033
|
-
"onUpdate:modelValue": r[4] ||= (e) =>
|
|
1034
|
-
}, null, 8, ["model-value"])]),
|
|
1050
|
+
"onUpdate:modelValue": r[4] ||= (e) => c("backgroundColor", e)
|
|
1051
|
+
}, null, 8, ["model-value"])]),
|
|
1052
|
+
_("div", lr, [_("label", { class: p(T(W)) }, D(T(a).button.textColor), 3), k(q, {
|
|
1035
1053
|
"model-value": t.block.textColor,
|
|
1036
|
-
"onUpdate:modelValue": r[5] ||= (e) =>
|
|
1037
|
-
}, null, 8, ["model-value"])])
|
|
1038
|
-
_("div",
|
|
1054
|
+
"onUpdate:modelValue": r[5] ||= (e) => c("textColor", e)
|
|
1055
|
+
}, null, 8, ["model-value"])]),
|
|
1056
|
+
_("div", ur, [_("div", dr, [_("label", { class: p(T(W)) }, D(T(a).button.borderRadius), 3), _("div", fr, [_("input", {
|
|
1039
1057
|
type: "number",
|
|
1040
|
-
class: p(T(
|
|
1058
|
+
class: p(T(K)),
|
|
1041
1059
|
value: t.block.borderRadius,
|
|
1042
1060
|
min: "0",
|
|
1043
1061
|
max: "50",
|
|
1044
|
-
onInput: r[6] ||= (e) =>
|
|
1045
|
-
}, null, 42,
|
|
1062
|
+
onInput: r[6] ||= (e) => c("borderRadius", Number(e.target.value))
|
|
1063
|
+
}, null, 42, pr), _("span", { class: p(T(G)) }, "px", 2)])]), _("div", mr, [_("label", { class: p(T(W)) }, D(T(a).button.fontSize), 3), _("div", hr, [_("input", {
|
|
1046
1064
|
type: "number",
|
|
1047
|
-
class: p(T(
|
|
1065
|
+
class: p(T(K)),
|
|
1048
1066
|
value: t.block.fontSize,
|
|
1049
1067
|
min: "10",
|
|
1050
1068
|
max: "36",
|
|
1051
|
-
onInput: r[7] ||= (e) =>
|
|
1052
|
-
}, null, 42,
|
|
1069
|
+
onInput: r[7] ||= (e) => c("fontSize", Number(e.target.value))
|
|
1070
|
+
}, null, 42, gr), _("span", { class: p(T(G)) }, "px", 2)])])]),
|
|
1071
|
+
_("div", _r, [
|
|
1072
|
+
_("label", { class: p(T(W)) }, D(T(a).button.width), 3),
|
|
1073
|
+
_("select", {
|
|
1074
|
+
class: p(T(U)),
|
|
1075
|
+
value: s.value,
|
|
1076
|
+
onChange: r[8] ||= (e) => l(e.target.value)
|
|
1077
|
+
}, [
|
|
1078
|
+
_("option", yr, D(T(a).button.widthAuto), 1),
|
|
1079
|
+
_("option", br, D(T(a).button.fullWidth), 1),
|
|
1080
|
+
_("option", xr, D(T(a).button.widthCustom), 1)
|
|
1081
|
+
], 42, vr),
|
|
1082
|
+
s.value === "custom" ? (e(), v("div", Sr, [_("input", {
|
|
1083
|
+
type: "number",
|
|
1084
|
+
class: p(T(K)),
|
|
1085
|
+
value: typeof t.block.width == "number" ? t.block.width : wr,
|
|
1086
|
+
min: "20",
|
|
1087
|
+
onInput: r[9] ||= (e) => u(e.target.value)
|
|
1088
|
+
}, null, 42, Cr), _("span", { class: p(T(G)) }, "px", 2)])) : b("", !0)
|
|
1089
|
+
])
|
|
1053
1090
|
], 64));
|
|
1054
1091
|
}
|
|
1055
|
-
}),
|
|
1092
|
+
}), Er = { class: "spacing-control" }, Dr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Or = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, kr = { class: "tpl:flex tpl:items-center" }, Ar = ["aria-label"], jr = ["value", "aria-label"], Mr = ["aria-label"], Nr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Pr = { class: "tpl:flex tpl:items-center" }, Fr = ["aria-label"], Ir = ["value", "aria-label"], Lr = ["aria-label"], Rr = ["aria-label", "title"], zr = { class: "tpl:flex tpl:items-center" }, Br = ["aria-label"], Vr = ["value", "aria-label"], Hr = ["aria-label"], Ur = { class: "tpl:flex tpl:items-center" }, Wr = ["aria-label"], Gr = ["value", "aria-label"], Kr = ["aria-label"], Q = "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)]", qr = "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)]", Jr = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
1056
1093
|
__name: "SpacingControl",
|
|
1057
1094
|
props: {
|
|
1058
1095
|
modelValue: {},
|
|
@@ -1060,7 +1097,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1060
1097
|
},
|
|
1061
1098
|
emits: ["update:modelValue"],
|
|
1062
1099
|
setup(t, { emit: n }) {
|
|
1063
|
-
let r = t, i = n, { t: o } =
|
|
1100
|
+
let r = t, i = n, { t: o } = V(), s = g(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), c = u(s.value);
|
|
1064
1101
|
a(s, (e) => {
|
|
1065
1102
|
!e && c.value && (c.value = !1);
|
|
1066
1103
|
});
|
|
@@ -1099,130 +1136,130 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1099
1136
|
});
|
|
1100
1137
|
}
|
|
1101
1138
|
}
|
|
1102
|
-
return (n, r) => (e(), v("div",
|
|
1103
|
-
_("div",
|
|
1139
|
+
return (n, r) => (e(), v("div", Er, [_("label", Dr, D(t.label), 1), _("div", Or, [
|
|
1140
|
+
_("div", kr, [
|
|
1104
1141
|
_("button", {
|
|
1105
1142
|
"aria-label": T(o).spacingControl.decreaseTop,
|
|
1106
|
-
class: p([
|
|
1143
|
+
class: p([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1107
1144
|
onClick: r[0] ||= (e) => l("top", -1)
|
|
1108
1145
|
}, [k(T(Ke), {
|
|
1109
1146
|
size: 12,
|
|
1110
1147
|
"stroke-width": 2
|
|
1111
|
-
})], 10,
|
|
1148
|
+
})], 10, Ar),
|
|
1112
1149
|
_("input", {
|
|
1113
1150
|
type: "number",
|
|
1114
|
-
class: p(
|
|
1151
|
+
class: p(qr),
|
|
1115
1152
|
value: t.modelValue.top,
|
|
1116
1153
|
"aria-label": T(o).spacingControl.top,
|
|
1117
1154
|
min: "0",
|
|
1118
1155
|
onInput: r[1] ||= (e) => d("top", Number(e.target.value))
|
|
1119
|
-
}, null, 40,
|
|
1156
|
+
}, null, 40, jr),
|
|
1120
1157
|
_("button", {
|
|
1121
1158
|
"aria-label": T(o).spacingControl.increaseTop,
|
|
1122
|
-
class: p([
|
|
1159
|
+
class: p([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1123
1160
|
onClick: r[2] ||= (e) => l("top", 1)
|
|
1124
|
-
}, [k(T(
|
|
1161
|
+
}, [k(T(X), {
|
|
1125
1162
|
size: 12,
|
|
1126
1163
|
"stroke-width": 2
|
|
1127
|
-
})], 10,
|
|
1164
|
+
})], 10, Mr)
|
|
1128
1165
|
]),
|
|
1129
|
-
_("div",
|
|
1130
|
-
_("div",
|
|
1166
|
+
_("div", Nr, [
|
|
1167
|
+
_("div", Pr, [
|
|
1131
1168
|
_("button", {
|
|
1132
1169
|
"aria-label": T(o).spacingControl.decreaseLeft,
|
|
1133
|
-
class: p([
|
|
1170
|
+
class: p([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1134
1171
|
onClick: r[3] ||= (e) => l("left", -1)
|
|
1135
1172
|
}, [k(T(Ke), {
|
|
1136
1173
|
size: 12,
|
|
1137
1174
|
"stroke-width": 2
|
|
1138
|
-
})], 10,
|
|
1175
|
+
})], 10, Fr),
|
|
1139
1176
|
_("input", {
|
|
1140
1177
|
type: "number",
|
|
1141
|
-
class: p(
|
|
1178
|
+
class: p(qr),
|
|
1142
1179
|
value: t.modelValue.left,
|
|
1143
1180
|
"aria-label": T(o).spacingControl.left,
|
|
1144
1181
|
min: "0",
|
|
1145
1182
|
onInput: r[4] ||= (e) => d("left", Number(e.target.value))
|
|
1146
|
-
}, null, 40,
|
|
1183
|
+
}, null, 40, Ir),
|
|
1147
1184
|
_("button", {
|
|
1148
1185
|
"aria-label": T(o).spacingControl.increaseLeft,
|
|
1149
|
-
class: p([
|
|
1186
|
+
class: p([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1150
1187
|
onClick: r[5] ||= (e) => l("left", 1)
|
|
1151
|
-
}, [k(T(
|
|
1188
|
+
}, [k(T(X), {
|
|
1152
1189
|
size: 12,
|
|
1153
1190
|
"stroke-width": 2
|
|
1154
|
-
})], 10,
|
|
1191
|
+
})], 10, Lr)
|
|
1155
1192
|
]),
|
|
1156
1193
|
_("button", {
|
|
1157
1194
|
class: p(["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)]", c.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)]"]),
|
|
1158
1195
|
"aria-label": c.value ? T(o).spacingControl.unlock : T(o).spacingControl.lockAll,
|
|
1159
1196
|
title: c.value ? T(o).spacingControl.unlock : T(o).spacingControl.lockAll,
|
|
1160
1197
|
onClick: f
|
|
1161
|
-
}, [c.value ? (e(), C(T(
|
|
1198
|
+
}, [c.value ? (e(), C(T(Ot), {
|
|
1162
1199
|
key: 0,
|
|
1163
1200
|
size: 14,
|
|
1164
1201
|
"stroke-width": 2
|
|
1165
|
-
})) : (e(), C(T(
|
|
1202
|
+
})) : (e(), C(T(Ct), {
|
|
1166
1203
|
key: 1,
|
|
1167
1204
|
size: 14,
|
|
1168
1205
|
"stroke-width": 2
|
|
1169
|
-
}))], 10,
|
|
1170
|
-
_("div",
|
|
1206
|
+
}))], 10, Rr),
|
|
1207
|
+
_("div", zr, [
|
|
1171
1208
|
_("button", {
|
|
1172
1209
|
"aria-label": T(o).spacingControl.decreaseRight,
|
|
1173
|
-
class: p([
|
|
1210
|
+
class: p([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1174
1211
|
onClick: r[6] ||= (e) => l("right", -1)
|
|
1175
1212
|
}, [k(T(Ke), {
|
|
1176
1213
|
size: 12,
|
|
1177
1214
|
"stroke-width": 2
|
|
1178
|
-
})], 10,
|
|
1215
|
+
})], 10, Br),
|
|
1179
1216
|
_("input", {
|
|
1180
1217
|
type: "number",
|
|
1181
|
-
class: p(
|
|
1218
|
+
class: p(qr),
|
|
1182
1219
|
value: t.modelValue.right,
|
|
1183
1220
|
"aria-label": T(o).spacingControl.right,
|
|
1184
1221
|
min: "0",
|
|
1185
1222
|
onInput: r[7] ||= (e) => d("right", Number(e.target.value))
|
|
1186
|
-
}, null, 40,
|
|
1223
|
+
}, null, 40, Vr),
|
|
1187
1224
|
_("button", {
|
|
1188
1225
|
"aria-label": T(o).spacingControl.increaseRight,
|
|
1189
|
-
class: p([
|
|
1226
|
+
class: p([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1190
1227
|
onClick: r[8] ||= (e) => l("right", 1)
|
|
1191
|
-
}, [k(T(
|
|
1228
|
+
}, [k(T(X), {
|
|
1192
1229
|
size: 12,
|
|
1193
1230
|
"stroke-width": 2
|
|
1194
|
-
})], 10,
|
|
1231
|
+
})], 10, Hr)
|
|
1195
1232
|
])
|
|
1196
1233
|
]),
|
|
1197
|
-
_("div",
|
|
1234
|
+
_("div", Ur, [
|
|
1198
1235
|
_("button", {
|
|
1199
1236
|
"aria-label": T(o).spacingControl.decreaseBottom,
|
|
1200
|
-
class: p([
|
|
1237
|
+
class: p([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1201
1238
|
onClick: r[9] ||= (e) => l("bottom", -1)
|
|
1202
1239
|
}, [k(T(Ke), {
|
|
1203
1240
|
size: 12,
|
|
1204
1241
|
"stroke-width": 2
|
|
1205
|
-
})], 10,
|
|
1242
|
+
})], 10, Wr),
|
|
1206
1243
|
_("input", {
|
|
1207
1244
|
type: "number",
|
|
1208
|
-
class: p(
|
|
1245
|
+
class: p(qr),
|
|
1209
1246
|
value: t.modelValue.bottom,
|
|
1210
1247
|
"aria-label": T(o).spacingControl.bottom,
|
|
1211
1248
|
min: "0",
|
|
1212
1249
|
onInput: r[10] ||= (e) => d("bottom", Number(e.target.value))
|
|
1213
|
-
}, null, 40,
|
|
1250
|
+
}, null, 40, Gr),
|
|
1214
1251
|
_("button", {
|
|
1215
1252
|
"aria-label": T(o).spacingControl.increaseBottom,
|
|
1216
|
-
class: p([
|
|
1253
|
+
class: p([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1217
1254
|
onClick: r[11] ||= (e) => l("bottom", 1)
|
|
1218
|
-
}, [k(T(
|
|
1255
|
+
}, [k(T(X), {
|
|
1219
1256
|
size: 12,
|
|
1220
1257
|
"stroke-width": 2
|
|
1221
|
-
})], 10,
|
|
1258
|
+
})], 10, Kr)
|
|
1222
1259
|
])
|
|
1223
1260
|
])]));
|
|
1224
1261
|
}
|
|
1225
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1262
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Yr = { class: "tpl:mt-3" }, Xr = /* @__PURE__ */ m({
|
|
1226
1263
|
__name: "CollapsibleSection",
|
|
1227
1264
|
props: {
|
|
1228
1265
|
title: {},
|
|
@@ -1235,25 +1272,25 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1235
1272
|
type: "button",
|
|
1236
1273
|
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)]",
|
|
1237
1274
|
onClick: i[0] ||= (e) => r.$emit("toggle")
|
|
1238
|
-
}, [k(T(
|
|
1275
|
+
}, [k(T(et), {
|
|
1239
1276
|
class: p(["tpl:transition-transform tpl:duration-200", n.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1240
1277
|
size: 12,
|
|
1241
1278
|
"stroke-width": 2
|
|
1242
|
-
}, null, 8, ["class"]), _("span", null, D(n.title), 1)]), t(_("div",
|
|
1279
|
+
}, null, 8, ["class"]), _("span", null, D(n.title), 1)]), t(_("div", Yr, [s(r.$slots, "default")], 512), [[x, n.open]])], 2));
|
|
1243
1280
|
}
|
|
1244
|
-
}),
|
|
1281
|
+
}), Zr = { class: "tpl:space-y-2" }, Qr = ["checked", "onChange"], $r = { class: "tpl:space-y-2" }, ei = ["value"], ti = { value: "" }, ni = ["label"], ri = ["value"], ii = ["value"], ai = {
|
|
1245
1282
|
key: 0,
|
|
1246
1283
|
value: "__custom__"
|
|
1247
|
-
},
|
|
1284
|
+
}, oi = {
|
|
1248
1285
|
key: 0,
|
|
1249
1286
|
class: "tpl:space-y-2"
|
|
1250
|
-
},
|
|
1287
|
+
}, si = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ci = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, li = { class: "tpl:flex tpl:justify-end" }, ui = ["disabled"], di = {
|
|
1251
1288
|
key: 0,
|
|
1252
1289
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1253
|
-
},
|
|
1290
|
+
}, fi = { class: "tpl:space-y-1" }, pi = { 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)]" }, mi = {
|
|
1254
1291
|
key: 0,
|
|
1255
1292
|
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)]"
|
|
1256
|
-
},
|
|
1293
|
+
}, hi = /* @__PURE__ */ m({
|
|
1257
1294
|
__name: "CommonBlockSettings",
|
|
1258
1295
|
props: {
|
|
1259
1296
|
block: {},
|
|
@@ -1261,23 +1298,23 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1261
1298
|
},
|
|
1262
1299
|
emits: ["update"],
|
|
1263
1300
|
setup(n, { emit: s }) {
|
|
1264
|
-
let c = n, l = s, { t: m } =
|
|
1301
|
+
let c = n, l = s, { t: m } = V(), h = A(Ve, []), x = A(ze, !1), S = i(/* @__PURE__ */ new Set()), w = u(!1), E = u(""), O = u(""), j = [{
|
|
1265
1302
|
key: "desktop",
|
|
1266
|
-
icon:
|
|
1303
|
+
icon: kt,
|
|
1267
1304
|
labelKey: "showOnDesktop"
|
|
1268
1305
|
}, {
|
|
1269
1306
|
key: "mobile",
|
|
1270
|
-
icon:
|
|
1307
|
+
icon: Pt,
|
|
1271
1308
|
labelKey: "showOnMobile"
|
|
1272
1309
|
}];
|
|
1273
1310
|
function N(e) {
|
|
1274
1311
|
S.has(e) ? S.delete(e) : S.add(e);
|
|
1275
1312
|
}
|
|
1276
1313
|
let P = g(() => h.length > 0 || x), F = g(() => c.block.displayCondition ? !h.some((e) => e.label === c.block.displayCondition?.label) : !1);
|
|
1277
|
-
function
|
|
1314
|
+
function ee() {
|
|
1278
1315
|
w.value = !0, F.value && c.block.displayCondition ? (E.value = c.block.displayCondition.before, O.value = c.block.displayCondition.after ?? "") : (E.value = "", O.value = "");
|
|
1279
1316
|
}
|
|
1280
|
-
function
|
|
1317
|
+
function I() {
|
|
1281
1318
|
E.value.trim() && (l("update", { displayCondition: {
|
|
1282
1319
|
label: m.blockSettings.customCondition,
|
|
1283
1320
|
before: E.value.trim(),
|
|
@@ -1291,7 +1328,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1291
1328
|
}
|
|
1292
1329
|
F.value && (E.value = e.before, O.value = e.after ?? "");
|
|
1293
1330
|
}, { immediate: !0 });
|
|
1294
|
-
let
|
|
1331
|
+
let L = g(() => {
|
|
1295
1332
|
let e = {};
|
|
1296
1333
|
for (let t of h) {
|
|
1297
1334
|
let n = t.group ?? "";
|
|
@@ -1299,33 +1336,33 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1299
1336
|
}
|
|
1300
1337
|
return e;
|
|
1301
1338
|
});
|
|
1302
|
-
function
|
|
1339
|
+
function te(e, t) {
|
|
1303
1340
|
l("update", { styles: {
|
|
1304
1341
|
...c.block.styles,
|
|
1305
1342
|
[e]: t
|
|
1306
1343
|
} });
|
|
1307
1344
|
}
|
|
1308
|
-
function
|
|
1345
|
+
function R(e) {
|
|
1309
1346
|
return c.block.visibility?.[e] !== !1;
|
|
1310
1347
|
}
|
|
1311
|
-
function
|
|
1348
|
+
function z(e) {
|
|
1312
1349
|
let t = {
|
|
1313
|
-
desktop:
|
|
1314
|
-
mobile:
|
|
1350
|
+
desktop: R("desktop"),
|
|
1351
|
+
mobile: R("mobile")
|
|
1315
1352
|
};
|
|
1316
1353
|
t[e] = !t[e], l("update", { visibility: t });
|
|
1317
1354
|
}
|
|
1318
1355
|
return (i, a) => (e(), v("div", { class: p(["tpl:flex tpl:flex-col", n.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1319
|
-
k(
|
|
1356
|
+
k(Xr, {
|
|
1320
1357
|
title: T(m).blockSettings.spacing,
|
|
1321
1358
|
open: S.has("spacing"),
|
|
1322
1359
|
"no-border": n.isFirstSection,
|
|
1323
1360
|
onToggle: a[1] ||= (e) => N("spacing")
|
|
1324
1361
|
}, {
|
|
1325
|
-
default: M(() => [k(
|
|
1362
|
+
default: M(() => [k(Jr, {
|
|
1326
1363
|
label: T(m).blockSettings.padding,
|
|
1327
1364
|
"model-value": n.block.styles.padding,
|
|
1328
|
-
"onUpdate:modelValue": a[0] ||= (e) =>
|
|
1365
|
+
"onUpdate:modelValue": a[0] ||= (e) => te("padding", e)
|
|
1329
1366
|
}, null, 8, ["label", "model-value"])]),
|
|
1330
1367
|
_: 1
|
|
1331
1368
|
}, 8, [
|
|
@@ -1333,33 +1370,32 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1333
1370
|
"open",
|
|
1334
1371
|
"no-border"
|
|
1335
1372
|
]),
|
|
1336
|
-
k(
|
|
1373
|
+
k(Xr, {
|
|
1337
1374
|
title: T(m).blockSettings.background,
|
|
1338
1375
|
open: S.has("bg"),
|
|
1339
1376
|
onToggle: a[3] ||= (e) => N("bg")
|
|
1340
1377
|
}, {
|
|
1341
|
-
default: M(() => [_("label", { class: p(T(
|
|
1342
|
-
|
|
1343
|
-
"
|
|
1344
|
-
"onUpdate:modelValue": a[2] ||= (e) => z("backgroundColor", e)
|
|
1378
|
+
default: M(() => [_("label", { class: p(T(W)) }, D(T(m).blockSettings.color), 3), k(q, {
|
|
1379
|
+
"model-value": n.block.styles.backgroundColor ?? "",
|
|
1380
|
+
"onUpdate:modelValue": a[2] ||= (e) => te("backgroundColor", e)
|
|
1345
1381
|
}, null, 8, ["model-value"])]),
|
|
1346
1382
|
_: 1
|
|
1347
1383
|
}, 8, ["title", "open"]),
|
|
1348
|
-
k(
|
|
1384
|
+
k(Xr, {
|
|
1349
1385
|
title: T(m).blockSettings.display,
|
|
1350
1386
|
open: S.has("display"),
|
|
1351
1387
|
onToggle: a[4] ||= (e) => N("display")
|
|
1352
1388
|
}, {
|
|
1353
|
-
default: M(() => [_("div",
|
|
1389
|
+
default: M(() => [_("div", Zr, [(e(), v(y, null, o(j, (t) => _("label", {
|
|
1354
1390
|
key: t.key,
|
|
1355
1391
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1356
1392
|
}, [
|
|
1357
1393
|
_("input", {
|
|
1358
1394
|
type: "checkbox",
|
|
1359
1395
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1360
|
-
checked:
|
|
1361
|
-
onChange: (e) =>
|
|
1362
|
-
}, null, 40,
|
|
1396
|
+
checked: R(t.key),
|
|
1397
|
+
onChange: (e) => z(t.key)
|
|
1398
|
+
}, null, 40, Qr),
|
|
1363
1399
|
(e(), C(r(t.icon), {
|
|
1364
1400
|
size: 14,
|
|
1365
1401
|
"stroke-width": 1.5
|
|
@@ -1368,19 +1404,19 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1368
1404
|
])), 64))])]),
|
|
1369
1405
|
_: 1
|
|
1370
1406
|
}, 8, ["title", "open"]),
|
|
1371
|
-
P.value ? (e(), C(
|
|
1407
|
+
P.value ? (e(), C(Xr, {
|
|
1372
1408
|
key: 0,
|
|
1373
1409
|
title: T(m).blockSettings.displayCondition,
|
|
1374
1410
|
open: S.has("condition"),
|
|
1375
1411
|
onToggle: a[8] ||= (e) => N("condition")
|
|
1376
1412
|
}, {
|
|
1377
|
-
default: M(() => [_("div",
|
|
1413
|
+
default: M(() => [_("div", $r, [_("select", {
|
|
1378
1414
|
class: p(["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)]", n.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)]"]),
|
|
1379
1415
|
value: w.value || F.value ? "__custom__" : n.block.displayCondition?.label ?? "",
|
|
1380
1416
|
onChange: a[5] ||= (e) => {
|
|
1381
1417
|
let t = e.target.value;
|
|
1382
1418
|
if (t === "__custom__") {
|
|
1383
|
-
|
|
1419
|
+
ee();
|
|
1384
1420
|
return;
|
|
1385
1421
|
}
|
|
1386
1422
|
if (w.value = !1, !t) {
|
|
@@ -1391,48 +1427,48 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1391
1427
|
n && l("update", { displayCondition: n });
|
|
1392
1428
|
}
|
|
1393
1429
|
}, [
|
|
1394
|
-
_("option",
|
|
1395
|
-
(e(!0), v(y, null, o(
|
|
1430
|
+
_("option", ti, D(T(m).blockSettings.noCondition), 1),
|
|
1431
|
+
(e(!0), v(y, null, o(L.value, (t, n) => (e(), v(y, { key: n }, [n ? (e(), v("optgroup", {
|
|
1396
1432
|
key: 0,
|
|
1397
1433
|
label: String(n)
|
|
1398
1434
|
}, [(e(!0), v(y, null, o(t, (t) => (e(), v("option", {
|
|
1399
1435
|
key: t.label,
|
|
1400
1436
|
value: t.label
|
|
1401
|
-
}, D(t.label), 9,
|
|
1437
|
+
}, D(t.label), 9, ri))), 128))], 8, ni)) : (e(!0), v(y, { key: 1 }, o(t, (t) => (e(), v("option", {
|
|
1402
1438
|
key: t.label,
|
|
1403
1439
|
value: t.label
|
|
1404
|
-
}, D(t.label), 9,
|
|
1405
|
-
T(x) ? (e(), v("option",
|
|
1406
|
-
], 42,
|
|
1407
|
-
_("div", null, [_("label",
|
|
1440
|
+
}, D(t.label), 9, ii))), 128))], 64))), 128)),
|
|
1441
|
+
T(x) ? (e(), v("option", ai, D(T(m).blockSettings.customCondition), 1)) : b("", !0)
|
|
1442
|
+
], 42, ei), w.value || F.value ? (e(), v("div", oi, [
|
|
1443
|
+
_("div", null, [_("label", si, D(T(m).blockSettings.customConditionBefore), 1), t(_("textarea", {
|
|
1408
1444
|
"onUpdate:modelValue": a[6] ||= (e) => E.value = e,
|
|
1409
1445
|
rows: "2",
|
|
1410
|
-
class: p(T(
|
|
1446
|
+
class: p(T(_t))
|
|
1411
1447
|
}, null, 2), [[f, E.value]])]),
|
|
1412
|
-
_("div", null, [_("label",
|
|
1448
|
+
_("div", null, [_("label", ci, D(T(m).blockSettings.customConditionAfter), 1), t(_("textarea", {
|
|
1413
1449
|
"onUpdate:modelValue": a[7] ||= (e) => O.value = e,
|
|
1414
1450
|
rows: "2",
|
|
1415
|
-
class: p(T(
|
|
1451
|
+
class: p(T(_t))
|
|
1416
1452
|
}, null, 2), [[f, O.value]])]),
|
|
1417
|
-
_("div",
|
|
1453
|
+
_("div", li, [_("button", {
|
|
1418
1454
|
type: "button",
|
|
1419
1455
|
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",
|
|
1420
1456
|
disabled: !E.value.trim(),
|
|
1421
|
-
onClick:
|
|
1422
|
-
}, D(T(m).blockSettings.applyCondition), 9,
|
|
1423
|
-
])) : n.block.displayCondition && !F.value ? (e(), v(y, { key: 1 }, [n.block.displayCondition.description ? (e(), v("p",
|
|
1457
|
+
onClick: I
|
|
1458
|
+
}, D(T(m).blockSettings.applyCondition), 9, ui)])
|
|
1459
|
+
])) : n.block.displayCondition && !F.value ? (e(), v(y, { key: 1 }, [n.block.displayCondition.description ? (e(), v("p", di, D(n.block.displayCondition.description), 1)) : b("", !0), _("div", fi, [_("pre", pi, D(n.block.displayCondition.before), 1), n.block.displayCondition.after ? (e(), v("pre", mi, D(n.block.displayCondition.after), 1)) : b("", !0)])], 64)) : b("", !0)])]),
|
|
1424
1460
|
_: 1
|
|
1425
1461
|
}, 8, ["title", "open"])) : b("", !0)
|
|
1426
1462
|
], 2));
|
|
1427
1463
|
}
|
|
1428
|
-
}),
|
|
1464
|
+
}), gi = ["title"], _i = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, vi = {
|
|
1429
1465
|
key: 1,
|
|
1430
1466
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1431
|
-
},
|
|
1467
|
+
}, yi = [
|
|
1432
1468
|
"aria-checked",
|
|
1433
1469
|
"aria-label",
|
|
1434
1470
|
"disabled"
|
|
1435
|
-
],
|
|
1471
|
+
], bi = /* @__PURE__ */ m({
|
|
1436
1472
|
__name: "BooleanField",
|
|
1437
1473
|
props: {
|
|
1438
1474
|
field: {},
|
|
@@ -1441,18 +1477,18 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1441
1477
|
},
|
|
1442
1478
|
emits: ["update:modelValue"],
|
|
1443
1479
|
setup(t, { emit: n }) {
|
|
1444
|
-
let r = n, { t: i } =
|
|
1480
|
+
let r = n, { t: i } = V();
|
|
1445
1481
|
return (n, a) => (e(), v("div", {
|
|
1446
1482
|
class: "tpl:mb-3.5",
|
|
1447
1483
|
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1448
|
-
}, [_("label", { class: p(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", t.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [_("span",
|
|
1484
|
+
}, [_("label", { class: p(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", t.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [_("span", _i, [
|
|
1449
1485
|
d(D(t.field.label) + " ", 1),
|
|
1450
|
-
t.readOnly ? (e(), C(T(
|
|
1486
|
+
t.readOnly ? (e(), C(T(Ot), {
|
|
1451
1487
|
key: 0,
|
|
1452
1488
|
size: 12,
|
|
1453
1489
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1454
1490
|
})) : b("", !0),
|
|
1455
|
-
t.field.required ? (e(), v("span",
|
|
1491
|
+
t.field.required ? (e(), v("span", vi, " * ")) : b("", !0)
|
|
1456
1492
|
]), _("button", {
|
|
1457
1493
|
type: "button",
|
|
1458
1494
|
role: "switch",
|
|
@@ -1465,12 +1501,12 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1465
1501
|
]),
|
|
1466
1502
|
disabled: t.readOnly,
|
|
1467
1503
|
onClick: a[0] ||= (e) => !t.readOnly && r("update:modelValue", !t.modelValue)
|
|
1468
|
-
}, [_("span", { class: p(["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", t.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10,
|
|
1504
|
+
}, [_("span", { class: p(["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", t.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, yi)], 2)], 8, gi));
|
|
1469
1505
|
}
|
|
1470
|
-
}),
|
|
1506
|
+
}), xi = { class: "tpl:mb-3.5" }, Si = {
|
|
1471
1507
|
key: 1,
|
|
1472
1508
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1473
|
-
},
|
|
1509
|
+
}, Ci = /* @__PURE__ */ m({
|
|
1474
1510
|
__name: "FieldWrapper",
|
|
1475
1511
|
props: {
|
|
1476
1512
|
label: {},
|
|
@@ -1478,17 +1514,17 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1478
1514
|
readOnly: { type: Boolean }
|
|
1479
1515
|
},
|
|
1480
1516
|
setup(t) {
|
|
1481
|
-
return (n, r) => (e(), v("div",
|
|
1517
|
+
return (n, r) => (e(), v("div", xi, [_("label", { class: p(T(W)) }, [
|
|
1482
1518
|
d(D(t.label) + " ", 1),
|
|
1483
|
-
t.readOnly ? (e(), C(T(
|
|
1519
|
+
t.readOnly ? (e(), C(T(Ot), {
|
|
1484
1520
|
key: 0,
|
|
1485
1521
|
size: 12,
|
|
1486
1522
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1487
1523
|
})) : b("", !0),
|
|
1488
|
-
t.required ? (e(), v("span",
|
|
1524
|
+
t.required ? (e(), v("span", Si, "*")) : b("", !0)
|
|
1489
1525
|
], 2), s(n.$slots, "default")]));
|
|
1490
1526
|
}
|
|
1491
|
-
}),
|
|
1527
|
+
}), wi = /* @__PURE__ */ m({
|
|
1492
1528
|
__name: "ColorField",
|
|
1493
1529
|
props: {
|
|
1494
1530
|
field: {},
|
|
@@ -1497,15 +1533,15 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1497
1533
|
},
|
|
1498
1534
|
emits: ["update:modelValue"],
|
|
1499
1535
|
setup(t, { emit: n }) {
|
|
1500
|
-
let r = n, { t: i } =
|
|
1501
|
-
return (n, a) => (e(), C(
|
|
1536
|
+
let r = n, { t: i } = V();
|
|
1537
|
+
return (n, a) => (e(), C(Ci, {
|
|
1502
1538
|
label: t.field.label,
|
|
1503
1539
|
required: t.field.required,
|
|
1504
1540
|
"read-only": t.readOnly
|
|
1505
1541
|
}, {
|
|
1506
|
-
default: M(() => [k(
|
|
1507
|
-
"model-value": t.modelValue
|
|
1508
|
-
placeholder: t.field.placeholder
|
|
1542
|
+
default: M(() => [k(q, {
|
|
1543
|
+
"model-value": t.modelValue,
|
|
1544
|
+
placeholder: t.field.placeholder,
|
|
1509
1545
|
disabled: t.readOnly,
|
|
1510
1546
|
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1511
1547
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
@@ -1522,11 +1558,11 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1522
1558
|
"read-only"
|
|
1523
1559
|
]));
|
|
1524
1560
|
}
|
|
1525
|
-
}),
|
|
1561
|
+
}), Ti = [
|
|
1526
1562
|
"value",
|
|
1527
1563
|
"placeholder",
|
|
1528
1564
|
"title"
|
|
1529
|
-
],
|
|
1565
|
+
], Ei = ["value", "placeholder"], Di = /* @__PURE__ */ m({
|
|
1530
1566
|
__name: "ImageField",
|
|
1531
1567
|
props: {
|
|
1532
1568
|
field: {},
|
|
@@ -1535,12 +1571,12 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1535
1571
|
},
|
|
1536
1572
|
emits: ["update:modelValue"],
|
|
1537
1573
|
setup(t, { emit: n }) {
|
|
1538
|
-
let r = n, { t: i } =
|
|
1574
|
+
let r = n, { t: i } = V(), a = A(Oe, null), o = ft(), s = g(() => !!a);
|
|
1539
1575
|
async function c() {
|
|
1540
1576
|
let e = await a?.({ accept: ["images"] });
|
|
1541
1577
|
o.alive && e && r("update:modelValue", e.url);
|
|
1542
1578
|
}
|
|
1543
|
-
return (n, a) => (e(), C(
|
|
1579
|
+
return (n, a) => (e(), C(Ci, {
|
|
1544
1580
|
label: t.field.label,
|
|
1545
1581
|
required: t.field.required,
|
|
1546
1582
|
"read-only": t.readOnly
|
|
@@ -1548,23 +1584,23 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1548
1584
|
default: M(() => [t.readOnly ? (e(), v("input", {
|
|
1549
1585
|
key: 0,
|
|
1550
1586
|
type: "url",
|
|
1551
|
-
class: p([T(
|
|
1587
|
+
class: p([T(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1552
1588
|
value: t.modelValue,
|
|
1553
1589
|
placeholder: t.field.placeholder || "https://...",
|
|
1554
1590
|
disabled: "",
|
|
1555
1591
|
title: T(i).customBlocks.dataSource.readOnlyTooltip
|
|
1556
|
-
}, null, 10,
|
|
1592
|
+
}, null, 10, Ti)) : (e(), v("input", {
|
|
1557
1593
|
key: 1,
|
|
1558
1594
|
type: "url",
|
|
1559
|
-
class: p(T(
|
|
1595
|
+
class: p(T(U)),
|
|
1560
1596
|
value: t.modelValue,
|
|
1561
1597
|
placeholder: t.field.placeholder || "https://...",
|
|
1562
1598
|
onInput: a[0] ||= (e) => r("update:modelValue", e.target.value)
|
|
1563
|
-
}, null, 42,
|
|
1599
|
+
}, null, 42, Ei)), s.value && !t.readOnly ? (e(), v("button", {
|
|
1564
1600
|
key: 2,
|
|
1565
1601
|
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)]",
|
|
1566
1602
|
onClick: a[1] ||= (e) => c()
|
|
1567
|
-
}, [k(T(
|
|
1603
|
+
}, [k(T(he), {
|
|
1568
1604
|
size: 14,
|
|
1569
1605
|
"stroke-width": 1.5
|
|
1570
1606
|
}), d(" " + D(T(i).image.browseMedia), 1)])) : b("", !0)]),
|
|
@@ -1575,7 +1611,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1575
1611
|
"read-only"
|
|
1576
1612
|
]));
|
|
1577
1613
|
}
|
|
1578
|
-
}),
|
|
1614
|
+
}), Oi = [
|
|
1579
1615
|
"value",
|
|
1580
1616
|
"placeholder",
|
|
1581
1617
|
"min",
|
|
@@ -1583,7 +1619,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1583
1619
|
"step",
|
|
1584
1620
|
"disabled",
|
|
1585
1621
|
"title"
|
|
1586
|
-
],
|
|
1622
|
+
], ki = /* @__PURE__ */ m({
|
|
1587
1623
|
__name: "NumberField",
|
|
1588
1624
|
props: {
|
|
1589
1625
|
field: {},
|
|
@@ -1592,15 +1628,15 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1592
1628
|
},
|
|
1593
1629
|
emits: ["update:modelValue"],
|
|
1594
1630
|
setup(t, { emit: n }) {
|
|
1595
|
-
let r = n, { t: i } =
|
|
1596
|
-
return (n, a) => (e(), C(
|
|
1631
|
+
let r = n, { t: i } = V();
|
|
1632
|
+
return (n, a) => (e(), C(Ci, {
|
|
1597
1633
|
label: t.field.label,
|
|
1598
1634
|
required: t.field.required,
|
|
1599
1635
|
"read-only": t.readOnly
|
|
1600
1636
|
}, {
|
|
1601
1637
|
default: M(() => [_("input", {
|
|
1602
1638
|
type: "number",
|
|
1603
|
-
class: p([T(
|
|
1639
|
+
class: p([T(U), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1604
1640
|
value: t.modelValue,
|
|
1605
1641
|
placeholder: t.field.placeholder,
|
|
1606
1642
|
min: t.field.min,
|
|
@@ -1609,7 +1645,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1609
1645
|
disabled: t.readOnly,
|
|
1610
1646
|
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1611
1647
|
onInput: a[0] ||= (e) => !t.readOnly && r("update:modelValue", Number(e.target.value))
|
|
1612
|
-
}, null, 42,
|
|
1648
|
+
}, null, 42, Oi)]),
|
|
1613
1649
|
_: 1
|
|
1614
1650
|
}, 8, [
|
|
1615
1651
|
"label",
|
|
@@ -1617,10 +1653,10 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1617
1653
|
"read-only"
|
|
1618
1654
|
]));
|
|
1619
1655
|
}
|
|
1620
|
-
}),
|
|
1656
|
+
}), Ai = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ji = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, Mi = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Ni = ["title", "onClick"], Pi = {
|
|
1621
1657
|
key: 1,
|
|
1622
1658
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1623
|
-
},
|
|
1659
|
+
}, Fi = /* @__PURE__ */ m({
|
|
1624
1660
|
__name: "RepeatableField",
|
|
1625
1661
|
props: {
|
|
1626
1662
|
field: {},
|
|
@@ -1629,7 +1665,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1629
1665
|
},
|
|
1630
1666
|
emits: ["update:modelValue"],
|
|
1631
1667
|
setup(t, { emit: n }) {
|
|
1632
|
-
let i = t, a = n, { t: s } =
|
|
1668
|
+
let i = t, a = n, { t: s } = V(), c = g(() => i.modelValue || []), l = g(() => !i.field.maxItems || c.value.length < i.field.maxItems), u = g(() => !i.field.minItems || c.value.length > i.field.minItems);
|
|
1633
1669
|
function f() {
|
|
1634
1670
|
if (!l.value || i.readOnly) return;
|
|
1635
1671
|
let e = {};
|
|
@@ -1647,25 +1683,25 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1647
1683
|
[t]: n
|
|
1648
1684
|
} : r));
|
|
1649
1685
|
}
|
|
1650
|
-
return (n, i) => (e(), C(
|
|
1686
|
+
return (n, i) => (e(), C(Ci, {
|
|
1651
1687
|
label: t.field.label,
|
|
1652
1688
|
required: t.field.required,
|
|
1653
1689
|
"read-only": t.readOnly
|
|
1654
1690
|
}, {
|
|
1655
|
-
default: M(() => [_("div",
|
|
1691
|
+
default: M(() => [_("div", Ai, [
|
|
1656
1692
|
(e(!0), v(y, null, o(c.value, (n, i) => (e(), v("div", {
|
|
1657
1693
|
key: `${t.field.key}-${i}`,
|
|
1658
1694
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1659
|
-
}, [_("div",
|
|
1695
|
+
}, [_("div", ji, [_("span", Mi, " #" + D(i + 1), 1), u.value && !t.readOnly ? (e(), v("button", {
|
|
1660
1696
|
key: 0,
|
|
1661
1697
|
type: "button",
|
|
1662
1698
|
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)]",
|
|
1663
1699
|
title: T(s).customBlocks.fields.removeItem,
|
|
1664
1700
|
onClick: (e) => m(i)
|
|
1665
|
-
}, [k(T(
|
|
1701
|
+
}, [k(T(st), {
|
|
1666
1702
|
size: 12,
|
|
1667
1703
|
"stroke-width": 2
|
|
1668
|
-
})], 8,
|
|
1704
|
+
})], 8, Ni)) : b("", !0)]), (e(!0), v(y, null, o(t.field.fields, (a) => (e(), C(r(T(Wi)(a.type)), {
|
|
1669
1705
|
key: a.key,
|
|
1670
1706
|
field: a,
|
|
1671
1707
|
"model-value": n[a.key],
|
|
@@ -1680,13 +1716,13 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1680
1716
|
l.value && !t.readOnly ? (e(), v("button", {
|
|
1681
1717
|
key: 0,
|
|
1682
1718
|
type: "button",
|
|
1683
|
-
class: p(T(
|
|
1719
|
+
class: p(T(gt)),
|
|
1684
1720
|
onClick: f
|
|
1685
|
-
}, [k(T(
|
|
1721
|
+
}, [k(T(X), {
|
|
1686
1722
|
size: 14,
|
|
1687
1723
|
"stroke-width": 2
|
|
1688
1724
|
}), d(" " + D(T(s).customBlocks.fields.addItem), 1)], 2)) : b("", !0),
|
|
1689
|
-
!l.value && !t.readOnly ? (e(), v("p",
|
|
1725
|
+
!l.value && !t.readOnly ? (e(), v("p", Pi, D(T(s).customBlocks.fields.maxItemsReached), 1)) : b("", !0)
|
|
1690
1726
|
])]),
|
|
1691
1727
|
_: 1
|
|
1692
1728
|
}, 8, [
|
|
@@ -1695,11 +1731,11 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1695
1731
|
"read-only"
|
|
1696
1732
|
]));
|
|
1697
1733
|
}
|
|
1698
|
-
}),
|
|
1734
|
+
}), Ii = [
|
|
1699
1735
|
"value",
|
|
1700
1736
|
"disabled",
|
|
1701
1737
|
"title"
|
|
1702
|
-
],
|
|
1738
|
+
], Li = ["value"], Ri = /* @__PURE__ */ m({
|
|
1703
1739
|
__name: "SelectField",
|
|
1704
1740
|
props: {
|
|
1705
1741
|
field: {},
|
|
@@ -1708,14 +1744,14 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1708
1744
|
},
|
|
1709
1745
|
emits: ["update:modelValue"],
|
|
1710
1746
|
setup(t, { emit: n }) {
|
|
1711
|
-
let r = n, { t: i } =
|
|
1712
|
-
return (n, a) => (e(), C(
|
|
1747
|
+
let r = n, { t: i } = V();
|
|
1748
|
+
return (n, a) => (e(), C(Ci, {
|
|
1713
1749
|
label: t.field.label,
|
|
1714
1750
|
required: t.field.required,
|
|
1715
1751
|
"read-only": t.readOnly
|
|
1716
1752
|
}, {
|
|
1717
1753
|
default: M(() => [_("select", {
|
|
1718
|
-
class: p([T(
|
|
1754
|
+
class: p([T(U), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1719
1755
|
value: t.modelValue,
|
|
1720
1756
|
disabled: t.readOnly,
|
|
1721
1757
|
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
@@ -1723,7 +1759,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1723
1759
|
}, [(e(!0), v(y, null, o(t.field.options, (t) => (e(), v("option", {
|
|
1724
1760
|
key: t.value,
|
|
1725
1761
|
value: t.value
|
|
1726
|
-
}, D(t.label), 9,
|
|
1762
|
+
}, D(t.label), 9, Li))), 128))], 42, Ii)]),
|
|
1727
1763
|
_: 1
|
|
1728
1764
|
}, 8, [
|
|
1729
1765
|
"label",
|
|
@@ -1731,11 +1767,11 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1731
1767
|
"read-only"
|
|
1732
1768
|
]));
|
|
1733
1769
|
}
|
|
1734
|
-
}),
|
|
1770
|
+
}), zi = [
|
|
1735
1771
|
"value",
|
|
1736
1772
|
"placeholder",
|
|
1737
1773
|
"title"
|
|
1738
|
-
],
|
|
1774
|
+
], Bi = /* @__PURE__ */ m({
|
|
1739
1775
|
__name: "TextField",
|
|
1740
1776
|
props: {
|
|
1741
1777
|
field: {},
|
|
@@ -1744,8 +1780,8 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1744
1780
|
},
|
|
1745
1781
|
emits: ["update:modelValue"],
|
|
1746
1782
|
setup(t, { emit: n }) {
|
|
1747
|
-
let r = n, { t: i } =
|
|
1748
|
-
return (n, a) => (e(), C(
|
|
1783
|
+
let r = n, { t: i } = V();
|
|
1784
|
+
return (n, a) => (e(), C(Ci, {
|
|
1749
1785
|
label: t.field.label,
|
|
1750
1786
|
required: t.field.required,
|
|
1751
1787
|
"read-only": t.readOnly
|
|
@@ -1753,12 +1789,12 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1753
1789
|
default: M(() => [t.readOnly ? (e(), v("input", {
|
|
1754
1790
|
key: 0,
|
|
1755
1791
|
type: "text",
|
|
1756
|
-
class: p([T(
|
|
1792
|
+
class: p([T(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1757
1793
|
value: t.modelValue,
|
|
1758
1794
|
placeholder: t.field.placeholder,
|
|
1759
1795
|
disabled: "",
|
|
1760
1796
|
title: T(i).customBlocks.dataSource.readOnlyTooltip
|
|
1761
|
-
}, null, 10,
|
|
1797
|
+
}, null, 10, zi)) : (e(), C(Z, {
|
|
1762
1798
|
key: 1,
|
|
1763
1799
|
"model-value": t.modelValue,
|
|
1764
1800
|
placeholder: t.field.placeholder,
|
|
@@ -1771,12 +1807,12 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1771
1807
|
"read-only"
|
|
1772
1808
|
]));
|
|
1773
1809
|
}
|
|
1774
|
-
}),
|
|
1810
|
+
}), Vi = [
|
|
1775
1811
|
"value",
|
|
1776
1812
|
"placeholder",
|
|
1777
1813
|
"title"
|
|
1778
|
-
],
|
|
1779
|
-
text:
|
|
1814
|
+
], Hi = "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", Ui = {
|
|
1815
|
+
text: Bi,
|
|
1780
1816
|
textarea: /* @__PURE__ */ m({
|
|
1781
1817
|
__name: "TextareaField",
|
|
1782
1818
|
props: {
|
|
@@ -1786,8 +1822,8 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1786
1822
|
},
|
|
1787
1823
|
emits: ["update:modelValue"],
|
|
1788
1824
|
setup(t, { emit: n }) {
|
|
1789
|
-
let r = n, { t: i } =
|
|
1790
|
-
return (n, a) => (e(), C(
|
|
1825
|
+
let r = n, { t: i } = V();
|
|
1826
|
+
return (n, a) => (e(), C(Ci, {
|
|
1791
1827
|
label: t.field.label,
|
|
1792
1828
|
required: t.field.required,
|
|
1793
1829
|
"read-only": t.readOnly
|
|
@@ -1799,8 +1835,8 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1799
1835
|
rows: "3",
|
|
1800
1836
|
disabled: "",
|
|
1801
1837
|
title: T(i).customBlocks.dataSource.readOnlyTooltip,
|
|
1802
|
-
class: p(
|
|
1803
|
-
}, null, 8,
|
|
1838
|
+
class: p(Hi)
|
|
1839
|
+
}, null, 8, Vi)) : (e(), C(Sn, {
|
|
1804
1840
|
key: 1,
|
|
1805
1841
|
"model-value": t.modelValue,
|
|
1806
1842
|
placeholder: t.field.placeholder,
|
|
@@ -1814,42 +1850,42 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1814
1850
|
]));
|
|
1815
1851
|
}
|
|
1816
1852
|
}),
|
|
1817
|
-
image:
|
|
1818
|
-
color:
|
|
1819
|
-
number:
|
|
1820
|
-
select:
|
|
1821
|
-
boolean:
|
|
1822
|
-
repeatable:
|
|
1853
|
+
image: Di,
|
|
1854
|
+
color: wi,
|
|
1855
|
+
number: ki,
|
|
1856
|
+
select: Ri,
|
|
1857
|
+
boolean: bi,
|
|
1858
|
+
repeatable: Fi
|
|
1823
1859
|
};
|
|
1824
|
-
function
|
|
1825
|
-
return
|
|
1860
|
+
function Wi(e) {
|
|
1861
|
+
return Ui[e] ?? Bi;
|
|
1826
1862
|
}
|
|
1827
1863
|
//#endregion
|
|
1828
1864
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1829
|
-
var
|
|
1865
|
+
var Gi = {
|
|
1830
1866
|
key: 0,
|
|
1831
1867
|
class: "tpl:p-4"
|
|
1832
|
-
},
|
|
1868
|
+
}, Ki = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, qi = { key: 1 }, Ji = {
|
|
1833
1869
|
key: 0,
|
|
1834
1870
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1835
|
-
},
|
|
1871
|
+
}, Yi = {
|
|
1836
1872
|
key: 1,
|
|
1837
1873
|
class: "tpl:mb-4"
|
|
1838
|
-
},
|
|
1874
|
+
}, Xi = {
|
|
1839
1875
|
key: 1,
|
|
1840
1876
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1841
|
-
},
|
|
1877
|
+
}, Zi = {
|
|
1842
1878
|
key: 0,
|
|
1843
1879
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1844
|
-
},
|
|
1880
|
+
}, Qi = {
|
|
1845
1881
|
key: 2,
|
|
1846
1882
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
1847
|
-
},
|
|
1883
|
+
}, $i = /* @__PURE__ */ m({
|
|
1848
1884
|
__name: "CustomBlockToolbar",
|
|
1849
1885
|
props: { block: {} },
|
|
1850
1886
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1851
1887
|
setup(t, { emit: n }) {
|
|
1852
|
-
let i = t, a = n, { t: s } =
|
|
1888
|
+
let i = t, a = n, { t: s } = V(), c = A(Pe, []), l = g(() => c.find((e) => e.type === i.block.customType)), { isFetching: u, fetchError: f, fetch: p, hasDataSource: m, needsFetch: h } = re({
|
|
1853
1889
|
definition: l,
|
|
1854
1890
|
block: g(() => i.block),
|
|
1855
1891
|
onUpdate: (e, t) => {
|
|
@@ -1865,23 +1901,23 @@ var Li = {
|
|
|
1865
1901
|
[e]: t
|
|
1866
1902
|
});
|
|
1867
1903
|
}
|
|
1868
|
-
return (n, i) => l.value ? (e(), v("div",
|
|
1869
|
-
l.value.description ? (e(), v("p",
|
|
1870
|
-
T(m) ? (e(), v("div",
|
|
1904
|
+
return (n, i) => l.value ? (e(), v("div", qi, [
|
|
1905
|
+
l.value.description ? (e(), v("p", Ji, D(l.value.description), 1)) : b("", !0),
|
|
1906
|
+
T(m) ? (e(), v("div", Yi, [T(h) && !T(u) ? (e(), v("button", {
|
|
1871
1907
|
key: 0,
|
|
1872
1908
|
type: "button",
|
|
1873
1909
|
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)]",
|
|
1874
1910
|
onClick: i[0] ||= (...e) => T(p) && T(p)(...e)
|
|
1875
|
-
}, D(l.value?.dataSource?.label || T(s).customBlocks.dataSource.fetchButton), 1)) : (e(), v("div",
|
|
1911
|
+
}, D(l.value?.dataSource?.label || T(s).customBlocks.dataSource.fetchButton), 1)) : (e(), v("div", Xi, [T(u) ? (e(), v("div", Zi, D(T(s).customBlocks.dataSource.fetching), 1)) : (e(), v("button", {
|
|
1876
1912
|
key: 1,
|
|
1877
1913
|
type: "button",
|
|
1878
1914
|
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)]",
|
|
1879
1915
|
onClick: i[1] ||= (...e) => T(p) && T(p)(...e)
|
|
1880
|
-
}, [k(T(
|
|
1916
|
+
}, [k(T(nt), { size: 12 }), d(" " + D(T(s).customBlocks.dataSource.changeButton), 1)]))])), T(f) ? (e(), v("p", Qi, [k(T(Ge), {
|
|
1881
1917
|
size: 14,
|
|
1882
1918
|
class: "tpl:shrink-0"
|
|
1883
1919
|
}), d(" " + D(T(s).customBlocks.dataSource.fetchError), 1)])) : b("", !0)])) : b("", !0),
|
|
1884
|
-
(e(!0), v(y, null, o(l.value.fields, (n) => (e(), C(r(T(
|
|
1920
|
+
(e(!0), v(y, null, o(l.value.fields, (n) => (e(), C(r(T(Wi)(n.type)), {
|
|
1885
1921
|
key: n.key,
|
|
1886
1922
|
field: n,
|
|
1887
1923
|
"model-value": t.block.fieldValues[n.key],
|
|
@@ -1893,19 +1929,19 @@ var Li = {
|
|
|
1893
1929
|
"read-only",
|
|
1894
1930
|
"onUpdate:modelValue"
|
|
1895
1931
|
]))), 128))
|
|
1896
|
-
])) : (e(), v("div",
|
|
1932
|
+
])) : (e(), v("div", Gi, [_("p", Ki, D(T(s).customBlocks.toolbar.noDefinition), 1)]));
|
|
1897
1933
|
}
|
|
1898
|
-
}),
|
|
1934
|
+
}), ea = { class: "tpl:mb-3.5" }, ta = { class: "tpl:mb-3.5" }, na = { class: "tpl:mb-3.5" }, ra = { class: "tpl:flex tpl:items-stretch" }, ia = ["value"], aa = /* @__PURE__ */ m({
|
|
1899
1935
|
__name: "DividerToolbar",
|
|
1900
1936
|
props: { block: {} },
|
|
1901
1937
|
emits: ["update"],
|
|
1902
1938
|
setup(t, { emit: n }) {
|
|
1903
|
-
let r = n, { t: i } =
|
|
1939
|
+
let r = n, { t: i } = V();
|
|
1904
1940
|
function a(e, t) {
|
|
1905
1941
|
r("update", { [e]: t });
|
|
1906
1942
|
}
|
|
1907
1943
|
return (n, r) => (e(), v(y, null, [
|
|
1908
|
-
_("div",
|
|
1944
|
+
_("div", ea, [_("label", { class: p(T(W)) }, D(T(i).divider.style), 3), k(Y, {
|
|
1909
1945
|
options: [
|
|
1910
1946
|
{
|
|
1911
1947
|
value: "solid",
|
|
@@ -1923,77 +1959,99 @@ var Li = {
|
|
|
1923
1959
|
"model-value": t.block.lineStyle,
|
|
1924
1960
|
"onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
|
|
1925
1961
|
}, null, 8, ["options", "model-value"])]),
|
|
1926
|
-
_("div",
|
|
1962
|
+
_("div", ta, [_("label", { class: p(T(W)) }, D(T(i).divider.color), 3), k(q, {
|
|
1927
1963
|
"model-value": t.block.color,
|
|
1928
1964
|
"onUpdate:modelValue": r[1] ||= (e) => a("color", e)
|
|
1929
1965
|
}, null, 8, ["model-value"])]),
|
|
1930
|
-
_("div",
|
|
1966
|
+
_("div", na, [_("label", { class: p(T(W)) }, D(T(i).divider.thickness), 3), _("div", ra, [_("input", {
|
|
1931
1967
|
type: "number",
|
|
1932
|
-
class: p(T(
|
|
1968
|
+
class: p(T(K)),
|
|
1933
1969
|
value: t.block.thickness,
|
|
1934
1970
|
min: "1",
|
|
1935
1971
|
max: "10",
|
|
1936
1972
|
onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
|
|
1937
|
-
}, null, 42,
|
|
1973
|
+
}, null, 42, ia), _("span", { class: p(T(G)) }, "px", 2)])])
|
|
1938
1974
|
], 64));
|
|
1939
1975
|
}
|
|
1940
|
-
}),
|
|
1976
|
+
}), oa = { class: "tpl:mb-3.5" }, sa = ["value"], ca = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, la = /* @__PURE__ */ m({
|
|
1941
1977
|
__name: "HtmlToolbar",
|
|
1942
1978
|
props: { block: {} },
|
|
1943
1979
|
emits: ["update"],
|
|
1944
1980
|
setup(t, { emit: n }) {
|
|
1945
|
-
let r = n, { t: i } =
|
|
1946
|
-
return (n, a) => (e(), v("div",
|
|
1947
|
-
_("label", { class: p(T(
|
|
1981
|
+
let r = n, { t: i } = V();
|
|
1982
|
+
return (n, a) => (e(), v("div", oa, [
|
|
1983
|
+
_("label", { class: p(T(W)) }, D(T(i).html.content), 3),
|
|
1948
1984
|
_("textarea", {
|
|
1949
1985
|
value: t.block.content,
|
|
1950
1986
|
placeholder: "<div>...</div>",
|
|
1951
1987
|
rows: "10",
|
|
1952
|
-
class: p(T(
|
|
1988
|
+
class: p(T(_t)),
|
|
1953
1989
|
onInput: a[0] ||= (e) => r("update", { content: e.target.value })
|
|
1954
|
-
}, null, 42,
|
|
1955
|
-
_("p",
|
|
1990
|
+
}, null, 42, sa),
|
|
1991
|
+
_("p", ca, [k(T(it), {
|
|
1956
1992
|
size: 12,
|
|
1957
1993
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
1958
1994
|
}), d(" " + D(T(i).html.sanitizationHint), 1)])
|
|
1959
1995
|
]));
|
|
1960
1996
|
}
|
|
1961
|
-
}),
|
|
1997
|
+
}), ua = { class: "tpl:mb-3.5" }, da = {
|
|
1962
1998
|
key: 0,
|
|
1963
1999
|
class: "tpl:mb-3.5"
|
|
1964
|
-
},
|
|
2000
|
+
}, fa = ["value", "placeholder"], pa = { class: "tpl:mb-3.5" }, ma = { class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]" }, ha = ["checked"], ga = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, _a = { class: "tpl:mb-3.5" }, va = ["value"], ya = { value: "full" }, ba = { value: "custom" }, xa = {
|
|
2001
|
+
key: 0,
|
|
2002
|
+
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2003
|
+
}, Sa = ["value"], Ca = { class: "tpl:mb-3.5" }, wa = { class: "tpl:mb-3.5" }, Ta = {
|
|
1965
2004
|
key: 0,
|
|
1966
2005
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
1967
|
-
},
|
|
2006
|
+
}, Ea = ["checked"], Da = 350, Oa = /* @__PURE__ */ m({
|
|
1968
2007
|
__name: "ImageToolbar",
|
|
1969
2008
|
props: { block: {} },
|
|
1970
2009
|
emits: ["update"],
|
|
1971
2010
|
setup(t, { emit: n }) {
|
|
1972
|
-
let r = n, { t:
|
|
1973
|
-
|
|
1974
|
-
}, 1e3, { immediate: !1 })
|
|
1975
|
-
|
|
1976
|
-
|
|
2011
|
+
let r = t, i = n, { t: a } = V(), o = A(Oe, null), s = A(je, I.liquid), c = ft(), l = g(() => !!o), f = u(!1), m = u(!1), { start: h } = Ee(() => {
|
|
2012
|
+
f.value = !1;
|
|
2013
|
+
}, 1e3, { immediate: !1 }), x = [
|
|
2014
|
+
300,
|
|
2015
|
+
400,
|
|
2016
|
+
500
|
|
2017
|
+
], S = g(() => {
|
|
2018
|
+
let e = r.block.width;
|
|
2019
|
+
return e === "full" ? "full" : x.includes(e) ? String(e) : "custom";
|
|
2020
|
+
});
|
|
2021
|
+
function C(e, t) {
|
|
2022
|
+
i("update", { [e]: t });
|
|
1977
2023
|
}
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2024
|
+
function w(e) {
|
|
2025
|
+
if (e === "custom") {
|
|
2026
|
+
let e = r.block.width;
|
|
2027
|
+
(typeof e != "number" || x.includes(e)) && C("width", Da);
|
|
2028
|
+
return;
|
|
2029
|
+
}
|
|
2030
|
+
C("width", e === "full" ? "full" : Number(e));
|
|
2031
|
+
}
|
|
2032
|
+
function E(e) {
|
|
2033
|
+
let t = Number(e);
|
|
2034
|
+
!Number.isFinite(t) || t <= 0 || C("width", t);
|
|
2035
|
+
}
|
|
2036
|
+
async function O() {
|
|
2037
|
+
let e = await o?.({ accept: ["images"] });
|
|
2038
|
+
c.alive && e && (C("src", e.url), e.alt && (C("alt", e.alt), m.value = !0), f.value = !0, h());
|
|
1981
2039
|
}
|
|
1982
2040
|
return (n, r) => (e(), v(y, null, [
|
|
1983
|
-
_("div",
|
|
1984
|
-
_("label", { class: p(T(
|
|
1985
|
-
k(
|
|
2041
|
+
_("div", ua, [
|
|
2042
|
+
_("label", { class: p(T(W)) }, D(T(a).image.imageUrl), 3),
|
|
2043
|
+
k(Z, {
|
|
1986
2044
|
"model-value": t.block.src,
|
|
1987
2045
|
type: "url",
|
|
1988
|
-
placeholder: T(
|
|
1989
|
-
pulse:
|
|
1990
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
2046
|
+
placeholder: T(a).image.imageUrlPlaceholder,
|
|
2047
|
+
pulse: f.value,
|
|
2048
|
+
"onUpdate:modelValue": r[0] ||= (e) => C("src", e)
|
|
1991
2049
|
}, null, 8, [
|
|
1992
2050
|
"model-value",
|
|
1993
2051
|
"placeholder",
|
|
1994
2052
|
"pulse"
|
|
1995
2053
|
]),
|
|
1996
|
-
|
|
2054
|
+
l.value ? (e(), v("button", {
|
|
1997
2055
|
key: 0,
|
|
1998
2056
|
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",
|
|
1999
2057
|
style: {
|
|
@@ -2001,91 +2059,102 @@ var Li = {
|
|
|
2001
2059
|
color: "var(--tpl-primary)",
|
|
2002
2060
|
"background-color": "var(--tpl-bg)"
|
|
2003
2061
|
},
|
|
2004
|
-
onClick:
|
|
2005
|
-
}, [k(T(
|
|
2062
|
+
onClick: O
|
|
2063
|
+
}, [k(T(he), {
|
|
2006
2064
|
size: 14,
|
|
2007
2065
|
"stroke-width": 1.5
|
|
2008
|
-
}), d(" " + D(T(
|
|
2066
|
+
}), d(" " + D(T(a).image.browseMedia), 1)])) : b("", !0)
|
|
2009
2067
|
]),
|
|
2010
|
-
T(
|
|
2068
|
+
T(ee)(t.block.src, T(s)) ? (e(), v("div", da, [_("label", { class: p(T(W)) }, [d(D(T(a).image.placeholderUrl) + " ", 1), r[9] ||= _("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, D("(optional)"), -1)], 2), _("input", {
|
|
2011
2069
|
type: "url",
|
|
2012
|
-
class: p(T(
|
|
2070
|
+
class: p(T(U)),
|
|
2013
2071
|
value: t.block.placeholderUrl || "",
|
|
2014
|
-
placeholder: T(
|
|
2015
|
-
onInput: r[1] ||= (e) =>
|
|
2016
|
-
}, null, 42,
|
|
2017
|
-
_("div",
|
|
2018
|
-
_("label", { class: p(T(
|
|
2019
|
-
k(
|
|
2072
|
+
placeholder: T(a).image.placeholderUrlPlaceholder,
|
|
2073
|
+
onInput: r[1] ||= (e) => C("placeholderUrl", e.target.value)
|
|
2074
|
+
}, null, 42, fa)])) : b("", !0),
|
|
2075
|
+
_("div", pa, [
|
|
2076
|
+
_("label", { class: p(T(W)) }, D(T(a).image.altText), 3),
|
|
2077
|
+
k(Z, {
|
|
2020
2078
|
"model-value": t.block.alt,
|
|
2021
2079
|
type: "text",
|
|
2022
|
-
placeholder: T(
|
|
2023
|
-
pulse:
|
|
2080
|
+
placeholder: T(a).image.altTextPlaceholder,
|
|
2081
|
+
pulse: m.value,
|
|
2024
2082
|
disabled: t.block.decorative === !0,
|
|
2025
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
2083
|
+
"onUpdate:modelValue": r[2] ||= (e) => C("alt", e)
|
|
2026
2084
|
}, null, 8, [
|
|
2027
2085
|
"model-value",
|
|
2028
2086
|
"placeholder",
|
|
2029
2087
|
"pulse",
|
|
2030
2088
|
"disabled"
|
|
2031
2089
|
]),
|
|
2032
|
-
_("label",
|
|
2090
|
+
_("label", ma, [_("input", {
|
|
2033
2091
|
type: "checkbox",
|
|
2034
2092
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2035
2093
|
checked: t.block.decorative === !0,
|
|
2036
|
-
onChange: r[3] ||= (e) =>
|
|
2037
|
-
}, null, 40,
|
|
2094
|
+
onChange: r[3] ||= (e) => C("decorative", e.target.checked)
|
|
2095
|
+
}, null, 40, ha), _("span", null, [d(D(T(a).image.decorative) + " ", 1), _("span", ga, D(T(a).image.decorativeHint), 1)])])
|
|
2038
2096
|
]),
|
|
2039
|
-
_("div",
|
|
2040
|
-
class: p(T(
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2097
|
+
_("div", _a, [
|
|
2098
|
+
_("label", { class: p(T(W)) }, D(T(a).image.width), 3),
|
|
2099
|
+
_("select", {
|
|
2100
|
+
class: p(T(U)),
|
|
2101
|
+
value: S.value,
|
|
2102
|
+
onChange: r[4] ||= (e) => w(e.target.value)
|
|
2103
|
+
}, [
|
|
2104
|
+
_("option", ya, D(T(a).image.fullWidth), 1),
|
|
2105
|
+
r[10] ||= _("option", { value: "300" }, "300px", -1),
|
|
2106
|
+
r[11] ||= _("option", { value: "400" }, "400px", -1),
|
|
2107
|
+
r[12] ||= _("option", { value: "500" }, "500px", -1),
|
|
2108
|
+
_("option", ba, D(T(a).image.widthCustom), 1)
|
|
2109
|
+
], 42, va),
|
|
2110
|
+
S.value === "custom" ? (e(), v("div", xa, [_("input", {
|
|
2111
|
+
type: "number",
|
|
2112
|
+
class: p(T(K)),
|
|
2113
|
+
value: typeof t.block.width == "number" ? t.block.width : Da,
|
|
2114
|
+
min: "20",
|
|
2115
|
+
onInput: r[5] ||= (e) => E(e.target.value)
|
|
2116
|
+
}, null, 42, Sa), _("span", { class: p(T(G)) }, "px", 2)])) : b("", !0)
|
|
2117
|
+
]),
|
|
2118
|
+
_("div", Ca, [_("label", { class: p(T(W)) }, D(T(a).title.align), 3), k(Y, {
|
|
2050
2119
|
options: [
|
|
2051
2120
|
{
|
|
2052
2121
|
value: "left",
|
|
2053
|
-
label: T(
|
|
2122
|
+
label: T(a).title.alignLeft
|
|
2054
2123
|
},
|
|
2055
2124
|
{
|
|
2056
2125
|
value: "center",
|
|
2057
|
-
label: T(
|
|
2126
|
+
label: T(a).title.alignCenter
|
|
2058
2127
|
},
|
|
2059
2128
|
{
|
|
2060
2129
|
value: "right",
|
|
2061
|
-
label: T(
|
|
2130
|
+
label: T(a).title.alignRight
|
|
2062
2131
|
}
|
|
2063
2132
|
],
|
|
2064
2133
|
"model-value": t.block.align,
|
|
2065
|
-
"onUpdate:modelValue": r[
|
|
2134
|
+
"onUpdate:modelValue": r[6] ||= (e) => C("align", e)
|
|
2066
2135
|
}, null, 8, ["options", "model-value"])]),
|
|
2067
|
-
_("div",
|
|
2068
|
-
_("label", { class: p(T(
|
|
2069
|
-
k(
|
|
2136
|
+
_("div", wa, [
|
|
2137
|
+
_("label", { class: p(T(W)) }, D(T(a).image.linkUrl), 3),
|
|
2138
|
+
k(Z, {
|
|
2070
2139
|
"model-value": t.block.linkUrl || "",
|
|
2071
2140
|
type: "url",
|
|
2072
|
-
placeholder: T(
|
|
2073
|
-
"onUpdate:modelValue": r[
|
|
2141
|
+
placeholder: T(a).image.imageUrlPlaceholder,
|
|
2142
|
+
"onUpdate:modelValue": r[7] ||= (e) => C("linkUrl", e)
|
|
2074
2143
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2075
|
-
t.block.linkUrl ? (e(), v("label",
|
|
2144
|
+
t.block.linkUrl ? (e(), v("label", Ta, [_("input", {
|
|
2076
2145
|
type: "checkbox",
|
|
2077
2146
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2078
2147
|
checked: t.block.linkOpenInNewTab ?? !1,
|
|
2079
|
-
onChange: r[
|
|
2080
|
-
}, null, 40,
|
|
2148
|
+
onChange: r[8] ||= (e) => C("linkOpenInNewTab", e.target.checked)
|
|
2149
|
+
}, null, 40, Ea), d(" " + D(T(a).image.openInNewTab), 1)])) : b("", !0)
|
|
2081
2150
|
])
|
|
2082
2151
|
], 64));
|
|
2083
2152
|
}
|
|
2084
|
-
}),
|
|
2153
|
+
}), ka = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Aa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ja = [
|
|
2085
2154
|
"value",
|
|
2086
2155
|
"placeholder",
|
|
2087
2156
|
"onInput"
|
|
2088
|
-
],
|
|
2157
|
+
], Ma = ["title", "onClick"], Na = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Pa = ["checked", "onChange"], Fa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ia = ["value"], La = { value: "" }, Ra = ["value"], za = ["value"], Ba = /* @__PURE__ */ m({
|
|
2089
2158
|
__name: "MenuToolbar",
|
|
2090
2159
|
props: {
|
|
2091
2160
|
block: {},
|
|
@@ -2093,7 +2162,7 @@ var Li = {
|
|
|
2093
2162
|
},
|
|
2094
2163
|
emits: ["update"],
|
|
2095
2164
|
setup(t, { emit: n }) {
|
|
2096
|
-
let r = t, i = n, { t: a } =
|
|
2165
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [
|
|
2097
2166
|
{
|
|
2098
2167
|
key: "openInNewTab",
|
|
2099
2168
|
label: a.menu.openInNewTab
|
|
@@ -2110,17 +2179,17 @@ var Li = {
|
|
|
2110
2179
|
{
|
|
2111
2180
|
value: "left",
|
|
2112
2181
|
label: a.title.alignLeft,
|
|
2113
|
-
icon:
|
|
2182
|
+
icon: $e
|
|
2114
2183
|
},
|
|
2115
2184
|
{
|
|
2116
2185
|
value: "center",
|
|
2117
2186
|
label: a.title.alignCenter,
|
|
2118
|
-
icon:
|
|
2187
|
+
icon: Qe
|
|
2119
2188
|
},
|
|
2120
2189
|
{
|
|
2121
2190
|
value: "right",
|
|
2122
2191
|
label: a.title.alignRight,
|
|
2123
|
-
icon:
|
|
2192
|
+
icon: Ze
|
|
2124
2193
|
}
|
|
2125
2194
|
]);
|
|
2126
2195
|
function l(e, t) {
|
|
@@ -2128,7 +2197,7 @@ var Li = {
|
|
|
2128
2197
|
}
|
|
2129
2198
|
function u() {
|
|
2130
2199
|
let e = {
|
|
2131
|
-
id:
|
|
2200
|
+
id: N(),
|
|
2132
2201
|
text: "",
|
|
2133
2202
|
url: "",
|
|
2134
2203
|
openInNewTab: !1,
|
|
@@ -2147,26 +2216,26 @@ var Li = {
|
|
|
2147
2216
|
i("update", { items: r.block.items.filter((t) => t.id !== e) });
|
|
2148
2217
|
}
|
|
2149
2218
|
return (n, r) => (e(), v(y, null, [
|
|
2150
|
-
k(
|
|
2151
|
-
default: M(() => [_("div",
|
|
2219
|
+
k(J, { label: T(a).menu.items }, {
|
|
2220
|
+
default: M(() => [_("div", ka, [(e(!0), v(y, null, o(t.block.items, (n) => (e(), v("div", {
|
|
2152
2221
|
key: n.id,
|
|
2153
2222
|
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"
|
|
2154
2223
|
}, [
|
|
2155
|
-
_("div",
|
|
2224
|
+
_("div", Aa, [_("input", {
|
|
2156
2225
|
type: "text",
|
|
2157
|
-
class: p([T(
|
|
2226
|
+
class: p([T(U), "tpl:flex-1"]),
|
|
2158
2227
|
value: n.text,
|
|
2159
2228
|
placeholder: T(a).menu.text,
|
|
2160
2229
|
onInput: (e) => f(n.id, "text", e.target.value)
|
|
2161
|
-
}, null, 42,
|
|
2162
|
-
class: p(T(
|
|
2230
|
+
}, null, 42, ja), _("button", {
|
|
2231
|
+
class: p(T(ht)),
|
|
2163
2232
|
title: T(a).menu.removeItem,
|
|
2164
2233
|
onClick: (e) => m(n.id)
|
|
2165
|
-
}, [k(T(
|
|
2234
|
+
}, [k(T(ct), {
|
|
2166
2235
|
size: 14,
|
|
2167
2236
|
"stroke-width": 2
|
|
2168
|
-
})], 10,
|
|
2169
|
-
k(
|
|
2237
|
+
})], 10, Ma)]),
|
|
2238
|
+
k(Z, {
|
|
2170
2239
|
"model-value": n.url,
|
|
2171
2240
|
type: "url",
|
|
2172
2241
|
placeholder: T(a).menu.urlPlaceholder,
|
|
@@ -2176,7 +2245,7 @@ var Li = {
|
|
|
2176
2245
|
"placeholder",
|
|
2177
2246
|
"onUpdate:modelValue"
|
|
2178
2247
|
]),
|
|
2179
|
-
_("div",
|
|
2248
|
+
_("div", Na, [(e(!0), v(y, null, o(s.value, (t) => (e(), v("label", {
|
|
2180
2249
|
key: t.key,
|
|
2181
2250
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
2182
2251
|
}, [_("input", {
|
|
@@ -2184,34 +2253,34 @@ var Li = {
|
|
|
2184
2253
|
checked: n[t.key],
|
|
2185
2254
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2186
2255
|
onChange: (e) => f(n.id, t.key, e.target.checked)
|
|
2187
|
-
}, null, 40,
|
|
2188
|
-
_("div",
|
|
2256
|
+
}, null, 40, Pa), d(" " + D(t.label), 1)]))), 128))]),
|
|
2257
|
+
_("div", Fa, [_("label", { class: p([T(W), "tpl:!mb-0"]) }, D(T(a).menu.color), 3), k(q, {
|
|
2189
2258
|
"swatch-only": "",
|
|
2190
2259
|
"model-value": n.color || t.block.linkColor || t.block.color,
|
|
2191
2260
|
"onUpdate:modelValue": (e) => f(n.id, "color", e)
|
|
2192
2261
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2193
2262
|
]))), 128)), _("button", {
|
|
2194
|
-
class: p(T(
|
|
2263
|
+
class: p(T(gt)),
|
|
2195
2264
|
onClick: u
|
|
2196
|
-
}, [k(T(
|
|
2265
|
+
}, [k(T(X), {
|
|
2197
2266
|
size: 14,
|
|
2198
2267
|
"stroke-width": 2
|
|
2199
2268
|
}), d(" " + D(T(a).menu.addItem), 1)], 2)])]),
|
|
2200
2269
|
_: 1
|
|
2201
2270
|
}, 8, ["label"]),
|
|
2202
|
-
k(
|
|
2271
|
+
k(J, { label: T(a).menu.fontFamily }, {
|
|
2203
2272
|
default: M(() => [_("select", {
|
|
2204
|
-
class: p(T(
|
|
2273
|
+
class: p(T(U)),
|
|
2205
2274
|
value: t.block.fontFamily || "",
|
|
2206
2275
|
onChange: r[0] ||= (e) => l("fontFamily", e.target.value || void 0)
|
|
2207
|
-
}, [_("option",
|
|
2276
|
+
}, [_("option", La, D(T(a).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2208
2277
|
key: t.value,
|
|
2209
2278
|
value: t.value
|
|
2210
|
-
}, D(t.label), 9,
|
|
2279
|
+
}, D(t.label), 9, Ra))), 128))], 42, Ia)]),
|
|
2211
2280
|
_: 1
|
|
2212
2281
|
}, 8, ["label"]),
|
|
2213
|
-
k(
|
|
2214
|
-
default: M(() => [k(
|
|
2282
|
+
k(J, { label: T(a).menu.fontSize }, {
|
|
2283
|
+
default: M(() => [k(xt, {
|
|
2215
2284
|
"model-value": t.block.fontSize,
|
|
2216
2285
|
min: 8,
|
|
2217
2286
|
max: 48,
|
|
@@ -2220,46 +2289,46 @@ var Li = {
|
|
|
2220
2289
|
}, null, 8, ["model-value"])]),
|
|
2221
2290
|
_: 1
|
|
2222
2291
|
}, 8, ["label"]),
|
|
2223
|
-
k(
|
|
2224
|
-
default: M(() => [k(
|
|
2292
|
+
k(J, { label: T(a).menu.color }, {
|
|
2293
|
+
default: M(() => [k(q, {
|
|
2225
2294
|
"model-value": t.block.color,
|
|
2226
2295
|
"onUpdate:modelValue": r[2] ||= (e) => l("color", e)
|
|
2227
2296
|
}, null, 8, ["model-value"])]),
|
|
2228
2297
|
_: 1
|
|
2229
2298
|
}, 8, ["label"]),
|
|
2230
|
-
k(
|
|
2231
|
-
default: M(() => [k(
|
|
2299
|
+
k(J, { label: T(a).menu.linkColor }, {
|
|
2300
|
+
default: M(() => [k(q, {
|
|
2232
2301
|
"model-value": t.block.linkColor || t.block.color,
|
|
2233
2302
|
"onUpdate:modelValue": r[3] ||= (e) => l("linkColor", e || void 0)
|
|
2234
2303
|
}, null, 8, ["model-value"])]),
|
|
2235
2304
|
_: 1
|
|
2236
2305
|
}, 8, ["label"]),
|
|
2237
|
-
k(
|
|
2238
|
-
default: M(() => [k(
|
|
2306
|
+
k(J, { label: T(a).menu.textAlign }, {
|
|
2307
|
+
default: M(() => [k(Y, {
|
|
2239
2308
|
options: c.value,
|
|
2240
2309
|
"model-value": t.block.textAlign,
|
|
2241
2310
|
"onUpdate:modelValue": r[4] ||= (e) => l("textAlign", e)
|
|
2242
2311
|
}, null, 8, ["options", "model-value"])]),
|
|
2243
2312
|
_: 1
|
|
2244
2313
|
}, 8, ["label"]),
|
|
2245
|
-
k(
|
|
2314
|
+
k(J, { label: T(a).menu.separator }, {
|
|
2246
2315
|
default: M(() => [_("input", {
|
|
2247
2316
|
type: "text",
|
|
2248
|
-
class: p(T(
|
|
2317
|
+
class: p(T(U)),
|
|
2249
2318
|
value: t.block.separator,
|
|
2250
2319
|
onInput: r[5] ||= (e) => l("separator", e.target.value)
|
|
2251
|
-
}, null, 42,
|
|
2320
|
+
}, null, 42, za)]),
|
|
2252
2321
|
_: 1
|
|
2253
2322
|
}, 8, ["label"]),
|
|
2254
|
-
k(
|
|
2255
|
-
default: M(() => [k(
|
|
2323
|
+
k(J, { label: T(a).menu.separatorColor }, {
|
|
2324
|
+
default: M(() => [k(q, {
|
|
2256
2325
|
"model-value": t.block.separatorColor,
|
|
2257
2326
|
"onUpdate:modelValue": r[6] ||= (e) => l("separatorColor", e)
|
|
2258
2327
|
}, null, 8, ["model-value"])]),
|
|
2259
2328
|
_: 1
|
|
2260
2329
|
}, 8, ["label"]),
|
|
2261
|
-
k(
|
|
2262
|
-
default: M(() => [k(
|
|
2330
|
+
k(J, { label: T(a).menu.spacing }, {
|
|
2331
|
+
default: M(() => [k(xt, {
|
|
2263
2332
|
"model-value": t.block.spacing,
|
|
2264
2333
|
min: 0,
|
|
2265
2334
|
max: 50,
|
|
@@ -2273,11 +2342,11 @@ var Li = {
|
|
|
2273
2342
|
});
|
|
2274
2343
|
//#endregion
|
|
2275
2344
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2276
|
-
function
|
|
2345
|
+
function Va(e) {
|
|
2277
2346
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2278
2347
|
}
|
|
2279
|
-
function
|
|
2280
|
-
let n =
|
|
2348
|
+
function Ha(e, t) {
|
|
2349
|
+
let n = Va(t);
|
|
2281
2350
|
if (e.length === n) return e;
|
|
2282
2351
|
if (e.length < n) {
|
|
2283
2352
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2288,12 +2357,12 @@ function Aa(e, t) {
|
|
|
2288
2357
|
}
|
|
2289
2358
|
//#endregion
|
|
2290
2359
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2291
|
-
var
|
|
2360
|
+
var Ua = { class: "tpl:mb-3.5" }, Wa = ["value"], Ga = ["value"], Ka = /* @__PURE__ */ m({
|
|
2292
2361
|
__name: "SectionToolbar",
|
|
2293
2362
|
props: { block: {} },
|
|
2294
2363
|
emits: ["update"],
|
|
2295
2364
|
setup(t, { emit: n }) {
|
|
2296
|
-
let r = t, i = n, { t: a } =
|
|
2365
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [
|
|
2297
2366
|
{
|
|
2298
2367
|
value: "1",
|
|
2299
2368
|
label: a.section.column1
|
|
@@ -2319,30 +2388,30 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2319
2388
|
let t = e.target.value;
|
|
2320
2389
|
i("update", {
|
|
2321
2390
|
columns: t,
|
|
2322
|
-
children:
|
|
2391
|
+
children: Ha(r.block.children, t)
|
|
2323
2392
|
});
|
|
2324
2393
|
}
|
|
2325
|
-
return (n, r) => (e(), v("div",
|
|
2326
|
-
class: p(T(
|
|
2394
|
+
return (n, r) => (e(), v("div", Ua, [_("label", { class: p(T(W)) }, D(T(a).section.columns), 3), _("select", {
|
|
2395
|
+
class: p(T(U)),
|
|
2327
2396
|
value: t.block.columns,
|
|
2328
2397
|
onChange: c
|
|
2329
2398
|
}, [(e(!0), v(y, null, o(s.value, (t) => (e(), v("option", {
|
|
2330
2399
|
key: t.value,
|
|
2331
2400
|
value: t.value
|
|
2332
|
-
}, D(t.label), 9,
|
|
2401
|
+
}, D(t.label), 9, Ga))), 128))], 42, Wa)]));
|
|
2333
2402
|
}
|
|
2334
|
-
}),
|
|
2403
|
+
}), qa = { class: "tpl:mb-3.5" }, Ja = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ya = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xa = ["value", "onChange"], Za = ["value"], Qa = ["title", "onClick"], $a = { class: "tpl:mb-3.5" }, eo = ["value"], to = { value: "solid" }, no = { value: "outlined" }, ro = { value: "rounded" }, io = { value: "square" }, ao = { value: "circle" }, oo = { class: "tpl:mb-3.5" }, so = { class: "tpl:mb-3.5" }, co = { class: "tpl:flex tpl:items-stretch" }, lo = ["value"], uo = { class: "tpl:mb-3.5" }, fo = /* @__PURE__ */ m({
|
|
2335
2404
|
__name: "SocialToolbar",
|
|
2336
2405
|
props: { block: {} },
|
|
2337
2406
|
emits: ["update"],
|
|
2338
2407
|
setup(t, { emit: n }) {
|
|
2339
|
-
let r = t, i = n, { t: a } =
|
|
2408
|
+
let r = t, i = n, { t: a } = V();
|
|
2340
2409
|
function s(e, t) {
|
|
2341
2410
|
i("update", { [e]: t });
|
|
2342
2411
|
}
|
|
2343
2412
|
function c() {
|
|
2344
2413
|
let e = {
|
|
2345
|
-
id:
|
|
2414
|
+
id: N(),
|
|
2346
2415
|
platform: "facebook",
|
|
2347
2416
|
url: ""
|
|
2348
2417
|
};
|
|
@@ -2358,25 +2427,25 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2358
2427
|
i("update", { icons: r.block.icons.filter((t) => t.id !== e) });
|
|
2359
2428
|
}
|
|
2360
2429
|
return (n, r) => (e(), v(y, null, [
|
|
2361
|
-
_("div",
|
|
2430
|
+
_("div", qa, [_("label", { class: p(T(W)) }, D(T(a).social.icons), 3), _("div", Ja, [(e(!0), v(y, null, o(t.block.icons, (t) => (e(), v("div", {
|
|
2362
2431
|
key: t.id,
|
|
2363
2432
|
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"
|
|
2364
|
-
}, [_("div",
|
|
2433
|
+
}, [_("div", Ya, [_("select", {
|
|
2365
2434
|
"data-testid": "social-platform-select",
|
|
2366
|
-
class: p([T(
|
|
2435
|
+
class: p([T(U), "tpl:flex-1"]),
|
|
2367
2436
|
value: t.platform,
|
|
2368
2437
|
onChange: (e) => l(t.id, "platform", e.target.value)
|
|
2369
|
-
}, [(e(!0), v(y, null, o(T(
|
|
2438
|
+
}, [(e(!0), v(y, null, o(T(ye), (t) => (e(), v("option", {
|
|
2370
2439
|
key: t,
|
|
2371
2440
|
value: t
|
|
2372
|
-
}, D(T(
|
|
2373
|
-
class: p(T(
|
|
2441
|
+
}, D(T(a).social.platforms[t]), 9, Za))), 128))], 42, Xa), _("button", {
|
|
2442
|
+
class: p(T(ht)),
|
|
2374
2443
|
title: T(a).social.removeIcon,
|
|
2375
2444
|
onClick: (e) => u(t.id)
|
|
2376
|
-
}, [k(T(
|
|
2445
|
+
}, [k(T(ct), {
|
|
2377
2446
|
size: 14,
|
|
2378
2447
|
"stroke-width": 2
|
|
2379
|
-
})], 10,
|
|
2448
|
+
})], 10, Qa)]), k(Z, {
|
|
2380
2449
|
"model-value": t.url,
|
|
2381
2450
|
type: "url",
|
|
2382
2451
|
placeholder: T(a).social.urlPlaceholder,
|
|
@@ -2386,24 +2455,24 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2386
2455
|
"placeholder",
|
|
2387
2456
|
"onUpdate:modelValue"
|
|
2388
2457
|
])]))), 128)), _("button", {
|
|
2389
|
-
class: p(T(
|
|
2458
|
+
class: p(T(gt)),
|
|
2390
2459
|
onClick: c
|
|
2391
|
-
}, [k(T(
|
|
2460
|
+
}, [k(T(X), {
|
|
2392
2461
|
size: 14,
|
|
2393
2462
|
"stroke-width": 2
|
|
2394
2463
|
}), d(" " + D(T(a).social.addIcon), 1)], 2)])]),
|
|
2395
|
-
_("div",
|
|
2396
|
-
class: p(T(
|
|
2464
|
+
_("div", $a, [_("label", { class: p(T(W)) }, D(T(a).social.style), 3), _("select", {
|
|
2465
|
+
class: p(T(U)),
|
|
2397
2466
|
value: t.block.iconStyle,
|
|
2398
2467
|
onChange: r[0] ||= (e) => s("iconStyle", e.target.value)
|
|
2399
2468
|
}, [
|
|
2400
|
-
_("option",
|
|
2401
|
-
_("option",
|
|
2402
|
-
_("option",
|
|
2403
|
-
_("option",
|
|
2404
|
-
_("option",
|
|
2405
|
-
], 42,
|
|
2406
|
-
_("div",
|
|
2469
|
+
_("option", to, D(T(a).social.styleSolid), 1),
|
|
2470
|
+
_("option", no, D(T(a).social.styleOutlined), 1),
|
|
2471
|
+
_("option", ro, D(T(a).social.styleRounded), 1),
|
|
2472
|
+
_("option", io, D(T(a).social.styleSquare), 1),
|
|
2473
|
+
_("option", ao, D(T(a).social.styleCircle), 1)
|
|
2474
|
+
], 42, eo)]),
|
|
2475
|
+
_("div", oo, [_("label", { class: p(T(W)) }, D(T(a).social.size), 3), k(Y, {
|
|
2407
2476
|
options: [
|
|
2408
2477
|
{
|
|
2409
2478
|
value: "small",
|
|
@@ -2421,30 +2490,30 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2421
2490
|
"model-value": t.block.iconSize,
|
|
2422
2491
|
"onUpdate:modelValue": r[1] ||= (e) => s("iconSize", e)
|
|
2423
2492
|
}, null, 8, ["options", "model-value"])]),
|
|
2424
|
-
_("div",
|
|
2493
|
+
_("div", so, [_("label", { class: p(T(W)) }, D(T(a).social.spacing), 3), _("div", co, [_("input", {
|
|
2425
2494
|
type: "number",
|
|
2426
|
-
class: p(T(
|
|
2495
|
+
class: p(T(K)),
|
|
2427
2496
|
value: t.block.spacing,
|
|
2428
2497
|
min: "0",
|
|
2429
2498
|
max: "50",
|
|
2430
2499
|
onInput: r[2] ||= (e) => s("spacing", Number(e.target.value))
|
|
2431
|
-
}, null, 42,
|
|
2432
|
-
_("div",
|
|
2500
|
+
}, null, 42, lo), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2501
|
+
_("div", uo, [_("label", { class: p(T(W)) }, D(T(a).social.align), 3), k(Y, {
|
|
2433
2502
|
options: [
|
|
2434
2503
|
{
|
|
2435
2504
|
value: "left",
|
|
2436
2505
|
label: T(a).title.alignLeft,
|
|
2437
|
-
icon: T(
|
|
2506
|
+
icon: T($e)
|
|
2438
2507
|
},
|
|
2439
2508
|
{
|
|
2440
2509
|
value: "center",
|
|
2441
2510
|
label: T(a).title.alignCenter,
|
|
2442
|
-
icon: T(
|
|
2511
|
+
icon: T(Qe)
|
|
2443
2512
|
},
|
|
2444
2513
|
{
|
|
2445
2514
|
value: "right",
|
|
2446
2515
|
label: T(a).title.alignRight,
|
|
2447
|
-
icon: T(
|
|
2516
|
+
icon: T(Ze)
|
|
2448
2517
|
}
|
|
2449
2518
|
],
|
|
2450
2519
|
"model-value": t.block.align,
|
|
@@ -2452,22 +2521,22 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2452
2521
|
}, null, 8, ["options", "model-value"])])
|
|
2453
2522
|
], 64));
|
|
2454
2523
|
}
|
|
2455
|
-
}),
|
|
2524
|
+
}), po = { class: "tpl:mb-3.5" }, mo = { class: "tpl:flex tpl:items-stretch" }, ho = ["value"], go = ["value"], _o = /* @__PURE__ */ m({
|
|
2456
2525
|
__name: "SpacerToolbar",
|
|
2457
2526
|
props: { block: {} },
|
|
2458
2527
|
emits: ["update"],
|
|
2459
2528
|
setup(t, { emit: n }) {
|
|
2460
|
-
let r = n, { t: i } =
|
|
2461
|
-
return (n, a) => (e(), v("div",
|
|
2462
|
-
_("label", { class: p(T(
|
|
2463
|
-
_("div",
|
|
2529
|
+
let r = n, { t: i } = V();
|
|
2530
|
+
return (n, a) => (e(), v("div", po, [
|
|
2531
|
+
_("label", { class: p(T(W)) }, D(T(i).spacer.height), 3),
|
|
2532
|
+
_("div", mo, [_("input", {
|
|
2464
2533
|
type: "number",
|
|
2465
|
-
class: p(T(
|
|
2534
|
+
class: p(T(K)),
|
|
2466
2535
|
value: t.block.height,
|
|
2467
2536
|
min: "10",
|
|
2468
2537
|
max: "100",
|
|
2469
2538
|
onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
2470
|
-
}, null, 42,
|
|
2539
|
+
}, null, 42, ho), _("span", { class: p(T(G)) }, "px", 2)]),
|
|
2471
2540
|
_("input", {
|
|
2472
2541
|
type: "range",
|
|
2473
2542
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2475,13 +2544,13 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2475
2544
|
min: "10",
|
|
2476
2545
|
max: "100",
|
|
2477
2546
|
onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
2478
|
-
}, null, 40,
|
|
2547
|
+
}, null, 40, go)
|
|
2479
2548
|
]));
|
|
2480
2549
|
}
|
|
2481
|
-
}),
|
|
2550
|
+
}), vo = { class: "tpl:mb-3.5" }, yo = { class: "tpl:flex tpl:items-center tpl:gap-3" }, bo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, xo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, So = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Co = ["disabled"], wo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, To = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Eo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Do = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Oo = ["disabled"], ko = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ao = { class: "tpl:mb-3.5" }, jo = { 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)]" }, Mo = ["checked"], No = {
|
|
2482
2551
|
key: 0,
|
|
2483
2552
|
class: "tpl:mb-3.5"
|
|
2484
|
-
},
|
|
2553
|
+
}, Po = { class: "tpl:mb-3.5" }, Fo = { class: "tpl:mb-3.5" }, Io = { class: "tpl:flex tpl:items-stretch" }, Lo = ["value"], Ro = { class: "tpl:mb-3.5" }, zo = { class: "tpl:flex tpl:items-stretch" }, Bo = ["value"], Vo = { class: "tpl:mb-3.5" }, Ho = ["value"], Uo = { value: "" }, Wo = ["value"], Go = { class: "tpl:mb-3.5" }, Ko = { class: "tpl:flex tpl:items-stretch" }, qo = ["value"], Jo = { class: "tpl:mb-3.5" }, Yo = { class: "tpl:mb-3.5" }, Xo = /* @__PURE__ */ m({
|
|
2485
2554
|
__name: "TableToolbar",
|
|
2486
2555
|
props: {
|
|
2487
2556
|
block: {},
|
|
@@ -2489,15 +2558,15 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2489
2558
|
},
|
|
2490
2559
|
emits: ["update"],
|
|
2491
2560
|
setup(t, { emit: n }) {
|
|
2492
|
-
let r = t, i = n, { t: a } =
|
|
2561
|
+
let r = t, i = n, { t: a } = V(), s = g(() => r.block.rows.length > 0 ? r.block.rows[0].cells.length : 0);
|
|
2493
2562
|
function c(e, t) {
|
|
2494
2563
|
i("update", { [e]: t });
|
|
2495
2564
|
}
|
|
2496
2565
|
function l() {
|
|
2497
2566
|
let e = r.block.rows.length > 0 ? r.block.rows[0].cells.length : 3, t = {
|
|
2498
|
-
id:
|
|
2567
|
+
id: N(),
|
|
2499
2568
|
cells: Array.from({ length: e }, () => ({
|
|
2500
|
-
id:
|
|
2569
|
+
id: N(),
|
|
2501
2570
|
content: ""
|
|
2502
2571
|
}))
|
|
2503
2572
|
};
|
|
@@ -2510,7 +2579,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2510
2579
|
i("update", { rows: r.block.rows.map((e) => ({
|
|
2511
2580
|
...e,
|
|
2512
2581
|
cells: [...e.cells, {
|
|
2513
|
-
id:
|
|
2582
|
+
id: N(),
|
|
2514
2583
|
content: ""
|
|
2515
2584
|
}]
|
|
2516
2585
|
})) });
|
|
@@ -2522,7 +2591,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2522
2591
|
})) });
|
|
2523
2592
|
}
|
|
2524
2593
|
return (n, r) => (e(), v(y, null, [
|
|
2525
|
-
_("div",
|
|
2594
|
+
_("div", vo, [_("label", { class: p(T(W)) }, D(T(a).table.dimensions), 3), _("div", yo, [_("div", bo, [_("span", xo, D(T(a).table.rows), 1), _("div", So, [
|
|
2526
2595
|
_("button", {
|
|
2527
2596
|
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",
|
|
2528
2597
|
disabled: t.block.rows.length <= 1,
|
|
@@ -2530,16 +2599,16 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2530
2599
|
}, [k(T(Ke), {
|
|
2531
2600
|
size: 12,
|
|
2532
2601
|
"stroke-width": 2
|
|
2533
|
-
})], 8,
|
|
2534
|
-
_("span",
|
|
2602
|
+
})], 8, Co),
|
|
2603
|
+
_("span", wo, D(t.block.rows.length), 1),
|
|
2535
2604
|
_("button", {
|
|
2536
2605
|
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)]",
|
|
2537
2606
|
onClick: l
|
|
2538
|
-
}, [k(T(
|
|
2607
|
+
}, [k(T(X), {
|
|
2539
2608
|
size: 12,
|
|
2540
2609
|
"stroke-width": 2
|
|
2541
2610
|
})])
|
|
2542
|
-
])]), _("div",
|
|
2611
|
+
])]), _("div", To, [_("span", Eo, D(T(a).table.columns), 1), _("div", Do, [
|
|
2543
2612
|
_("button", {
|
|
2544
2613
|
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",
|
|
2545
2614
|
disabled: s.value <= 1,
|
|
@@ -2547,83 +2616,88 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2547
2616
|
}, [k(T(Ke), {
|
|
2548
2617
|
size: 12,
|
|
2549
2618
|
"stroke-width": 2
|
|
2550
|
-
})], 8,
|
|
2551
|
-
_("span",
|
|
2619
|
+
})], 8, Oo),
|
|
2620
|
+
_("span", ko, D(s.value), 1),
|
|
2552
2621
|
_("button", {
|
|
2553
2622
|
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)]",
|
|
2554
2623
|
onClick: f
|
|
2555
|
-
}, [k(T(
|
|
2624
|
+
}, [k(T(X), {
|
|
2556
2625
|
size: 12,
|
|
2557
2626
|
"stroke-width": 2
|
|
2558
2627
|
})])
|
|
2559
2628
|
])])])]),
|
|
2560
|
-
_("div",
|
|
2629
|
+
_("div", Ao, [_("label", jo, [_("input", {
|
|
2561
2630
|
type: "checkbox",
|
|
2562
2631
|
checked: t.block.hasHeaderRow,
|
|
2563
2632
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2564
2633
|
onChange: r[2] ||= (e) => c("hasHeaderRow", e.target.checked)
|
|
2565
|
-
}, null, 40,
|
|
2566
|
-
t.block.hasHeaderRow ? (e(), v("div",
|
|
2567
|
-
"model-value": t.block.headerBackgroundColor
|
|
2634
|
+
}, null, 40, Mo), d(" " + D(T(a).table.hasHeaderRow), 1)])]),
|
|
2635
|
+
t.block.hasHeaderRow ? (e(), v("div", No, [_("label", { class: p(T(W)) }, D(T(a).table.headerBackgroundColor), 3), k(q, {
|
|
2636
|
+
"model-value": t.block.headerBackgroundColor ?? "",
|
|
2637
|
+
"seed-color": T(yt),
|
|
2568
2638
|
placeholder: T(a).table.noHeaderBg,
|
|
2569
2639
|
"onUpdate:modelValue": r[3] ||= (e) => c("headerBackgroundColor", e || null)
|
|
2570
|
-
}, null, 8, [
|
|
2571
|
-
|
|
2640
|
+
}, null, 8, [
|
|
2641
|
+
"model-value",
|
|
2642
|
+
"seed-color",
|
|
2643
|
+
"placeholder"
|
|
2644
|
+
])])) : b("", !0),
|
|
2645
|
+
_("div", Po, [_("label", { class: p(T(W)) }, D(T(a).table.borderColor), 3), k(q, {
|
|
2572
2646
|
"model-value": t.block.borderColor,
|
|
2573
2647
|
"onUpdate:modelValue": r[4] ||= (e) => c("borderColor", e)
|
|
2574
2648
|
}, null, 8, ["model-value"])]),
|
|
2575
|
-
_("div",
|
|
2649
|
+
_("div", Fo, [_("label", { class: p(T(W)) }, D(T(a).table.borderWidth), 3), _("div", Io, [_("input", {
|
|
2576
2650
|
type: "number",
|
|
2577
|
-
class: p(T(
|
|
2651
|
+
class: p(T(K)),
|
|
2578
2652
|
value: t.block.borderWidth,
|
|
2579
2653
|
min: "0",
|
|
2580
2654
|
max: "10",
|
|
2581
2655
|
onInput: r[5] ||= (e) => c("borderWidth", Number(e.target.value))
|
|
2582
|
-
}, null, 42,
|
|
2583
|
-
_("div",
|
|
2656
|
+
}, null, 42, Lo), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2657
|
+
_("div", Ro, [_("label", { class: p(T(W)) }, D(T(a).table.cellPadding), 3), _("div", zo, [_("input", {
|
|
2584
2658
|
type: "number",
|
|
2585
|
-
class: p(T(
|
|
2659
|
+
class: p(T(K)),
|
|
2586
2660
|
value: t.block.cellPadding,
|
|
2587
2661
|
min: "0",
|
|
2588
2662
|
max: "30",
|
|
2589
2663
|
onInput: r[6] ||= (e) => c("cellPadding", Number(e.target.value))
|
|
2590
|
-
}, null, 42,
|
|
2591
|
-
_("div",
|
|
2592
|
-
class: p(T(
|
|
2664
|
+
}, null, 42, Bo), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2665
|
+
_("div", Vo, [_("label", { class: p(T(W)) }, D(T(a).table.fontFamily), 3), _("select", {
|
|
2666
|
+
class: p(T(U)),
|
|
2593
2667
|
value: t.block.fontFamily || "",
|
|
2594
2668
|
onChange: r[7] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2595
|
-
}, [_("option",
|
|
2669
|
+
}, [_("option", Uo, D(T(a).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2596
2670
|
key: t.value,
|
|
2597
2671
|
value: t.value
|
|
2598
|
-
}, D(t.label), 9,
|
|
2599
|
-
_("div",
|
|
2672
|
+
}, D(t.label), 9, Wo))), 128))], 42, Ho)]),
|
|
2673
|
+
_("div", Go, [_("label", { class: p(T(W)) }, D(T(a).table.fontSize), 3), _("div", Ko, [_("input", {
|
|
2600
2674
|
type: "number",
|
|
2601
|
-
class: p(T(
|
|
2675
|
+
class: p(T(K)),
|
|
2602
2676
|
value: t.block.fontSize,
|
|
2603
2677
|
min: "10",
|
|
2604
2678
|
max: "32",
|
|
2605
2679
|
onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
|
|
2606
|
-
}, null, 42,
|
|
2607
|
-
_("div",
|
|
2680
|
+
}, null, 42, qo), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2681
|
+
_("div", Jo, [_("label", { class: p(T(W)) }, D(T(a).table.color), 3), k(q, {
|
|
2608
2682
|
"model-value": t.block.color,
|
|
2609
2683
|
"onUpdate:modelValue": r[9] ||= (e) => c("color", e)
|
|
2610
2684
|
}, null, 8, ["model-value"])]),
|
|
2611
|
-
_("div",
|
|
2685
|
+
_("div", Yo, [_("label", { class: p(T(W)) }, D(T(a).table.textAlign), 3), k(Y, {
|
|
2612
2686
|
options: [
|
|
2613
2687
|
{
|
|
2614
2688
|
value: "left",
|
|
2615
2689
|
label: T(a).title.alignLeft,
|
|
2616
|
-
icon: T(
|
|
2690
|
+
icon: T($e)
|
|
2617
2691
|
},
|
|
2618
2692
|
{
|
|
2619
2693
|
value: "center",
|
|
2620
2694
|
label: T(a).title.alignCenter,
|
|
2621
|
-
icon: T(
|
|
2695
|
+
icon: T(Qe)
|
|
2622
2696
|
},
|
|
2623
2697
|
{
|
|
2624
2698
|
value: "right",
|
|
2625
2699
|
label: T(a).title.alignRight,
|
|
2626
|
-
icon: T(
|
|
2700
|
+
icon: T(Ze)
|
|
2627
2701
|
}
|
|
2628
2702
|
],
|
|
2629
2703
|
"model-value": t.block.textAlign,
|
|
@@ -2631,7 +2705,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2631
2705
|
}, null, 8, ["options", "model-value"])])
|
|
2632
2706
|
], 64));
|
|
2633
2707
|
}
|
|
2634
|
-
}),
|
|
2708
|
+
}), Zo = { class: "tpl:mb-3.5" }, Qo = ["value"], $o = { value: 1 }, es = { value: 2 }, ts = { value: 3 }, ns = { value: 4 }, rs = { class: "tpl:mb-3.5" }, is = ["value"], as = { value: "" }, os = ["value"], ss = { class: "tpl:mb-3.5" }, cs = { class: "tpl:mb-3.5" }, ls = /* @__PURE__ */ m({
|
|
2635
2709
|
__name: "TitleToolbar",
|
|
2636
2710
|
props: {
|
|
2637
2711
|
block: {},
|
|
@@ -2639,49 +2713,49 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2639
2713
|
},
|
|
2640
2714
|
emits: ["update"],
|
|
2641
2715
|
setup(t, { emit: n }) {
|
|
2642
|
-
let r = n, { t: i } =
|
|
2716
|
+
let r = n, { t: i } = V();
|
|
2643
2717
|
function a(e, t) {
|
|
2644
2718
|
r("update", { [e]: t });
|
|
2645
2719
|
}
|
|
2646
2720
|
return (n, r) => (e(), v(y, null, [
|
|
2647
|
-
_("div",
|
|
2648
|
-
class: p(T(
|
|
2721
|
+
_("div", Zo, [_("label", { class: p(T(W)) }, D(T(i).title.level), 3), _("select", {
|
|
2722
|
+
class: p(T(U)),
|
|
2649
2723
|
value: t.block.level,
|
|
2650
2724
|
onChange: r[0] ||= (e) => a("level", Number(e.target.value))
|
|
2651
2725
|
}, [
|
|
2652
|
-
_("option",
|
|
2653
|
-
_("option",
|
|
2654
|
-
_("option",
|
|
2655
|
-
_("option",
|
|
2656
|
-
], 42,
|
|
2657
|
-
_("div",
|
|
2658
|
-
class: p(T(
|
|
2726
|
+
_("option", $o, D(T(i).title.heading1), 1),
|
|
2727
|
+
_("option", es, D(T(i).title.heading2), 1),
|
|
2728
|
+
_("option", ts, D(T(i).title.heading3), 1),
|
|
2729
|
+
_("option", ns, D(T(i).title.heading4), 1)
|
|
2730
|
+
], 42, Qo)]),
|
|
2731
|
+
_("div", rs, [_("label", { class: p(T(W)) }, D(T(i).title.fontFamily), 3), _("select", {
|
|
2732
|
+
class: p(T(U)),
|
|
2659
2733
|
value: t.block.fontFamily || "",
|
|
2660
2734
|
onChange: r[1] ||= (e) => a("fontFamily", e.target.value || void 0)
|
|
2661
|
-
}, [_("option",
|
|
2735
|
+
}, [_("option", as, D(T(i).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2662
2736
|
key: t.value,
|
|
2663
2737
|
value: t.value
|
|
2664
|
-
}, D(t.label), 9,
|
|
2665
|
-
_("div",
|
|
2738
|
+
}, D(t.label), 9, os))), 128))], 42, is)]),
|
|
2739
|
+
_("div", ss, [_("label", { class: p(T(W)) }, D(T(i).title.color), 3), k(q, {
|
|
2666
2740
|
"model-value": t.block.color,
|
|
2667
2741
|
"onUpdate:modelValue": r[2] ||= (e) => a("color", e)
|
|
2668
2742
|
}, null, 8, ["model-value"])]),
|
|
2669
|
-
_("div",
|
|
2743
|
+
_("div", cs, [_("label", { class: p(T(W)) }, D(T(i).title.align), 3), k(Y, {
|
|
2670
2744
|
options: [
|
|
2671
2745
|
{
|
|
2672
2746
|
value: "left",
|
|
2673
2747
|
label: T(i).title.alignLeft,
|
|
2674
|
-
icon: T(
|
|
2748
|
+
icon: T($e)
|
|
2675
2749
|
},
|
|
2676
2750
|
{
|
|
2677
2751
|
value: "center",
|
|
2678
2752
|
label: T(i).title.alignCenter,
|
|
2679
|
-
icon: T(
|
|
2753
|
+
icon: T(Qe)
|
|
2680
2754
|
},
|
|
2681
2755
|
{
|
|
2682
2756
|
value: "right",
|
|
2683
2757
|
label: T(i).title.alignRight,
|
|
2684
|
-
icon: T(
|
|
2758
|
+
icon: T(Ze)
|
|
2685
2759
|
}
|
|
2686
2760
|
],
|
|
2687
2761
|
"model-value": t.block.textAlign,
|
|
@@ -2689,22 +2763,22 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2689
2763
|
}, null, 8, ["options", "model-value"])])
|
|
2690
2764
|
], 64));
|
|
2691
2765
|
}
|
|
2692
|
-
}),
|
|
2766
|
+
}), us = { class: "tpl:mb-3.5" }, ds = {
|
|
2693
2767
|
key: 0,
|
|
2694
2768
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
2695
|
-
},
|
|
2769
|
+
}, fs = ["checked"], ps = {
|
|
2696
2770
|
key: 0,
|
|
2697
2771
|
class: "tpl:mb-3.5"
|
|
2698
|
-
},
|
|
2772
|
+
}, ms = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, hs = [
|
|
2699
2773
|
"value",
|
|
2700
2774
|
"placeholder",
|
|
2701
2775
|
"title"
|
|
2702
|
-
],
|
|
2776
|
+
], gs = { class: "tpl:mb-3.5" }, _s = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, vs = { class: "tpl:mb-3.5" }, ys = { class: "tpl:mb-3.5" }, bs = ["value"], xs = { value: "full" }, Ss = { class: "tpl:mb-3.5" }, Cs = /* @__PURE__ */ m({
|
|
2703
2777
|
__name: "VideoToolbar",
|
|
2704
2778
|
props: { block: {} },
|
|
2705
2779
|
emits: ["update"],
|
|
2706
2780
|
setup(t, { emit: n }) {
|
|
2707
|
-
let r = t, i = n, { t: a } =
|
|
2781
|
+
let r = t, i = n, { t: a } = V(), o = A(Oe, null), s = A(je, I.liquid), c = ft(), l = g(() => !!o), f = g(() => ee(r.block.url, s)), m = u(!1), { start: h } = Ee(() => {
|
|
2708
2782
|
m.value = !1;
|
|
2709
2783
|
}, 1e3, { immediate: !1 });
|
|
2710
2784
|
function x(e, t) {
|
|
@@ -2715,32 +2789,32 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2715
2789
|
c.alive && e && (x("thumbnailUrl", e.url), m.value = !0, h());
|
|
2716
2790
|
}
|
|
2717
2791
|
return (n, r) => (e(), v(y, null, [
|
|
2718
|
-
_("div",
|
|
2719
|
-
_("label", { class: p(T(
|
|
2720
|
-
k(
|
|
2792
|
+
_("div", us, [
|
|
2793
|
+
_("label", { class: p(T(W)) }, D(T(a).video.videoUrl), 3),
|
|
2794
|
+
k(Z, {
|
|
2721
2795
|
"model-value": t.block.url,
|
|
2722
2796
|
type: "url",
|
|
2723
2797
|
placeholder: T(a).video.videoUrlPlaceholder,
|
|
2724
2798
|
"onUpdate:modelValue": r[0] ||= (e) => x("url", e)
|
|
2725
2799
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2726
|
-
t.block.url ? (e(), v("label",
|
|
2800
|
+
t.block.url ? (e(), v("label", ds, [_("input", {
|
|
2727
2801
|
type: "checkbox",
|
|
2728
2802
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2729
2803
|
checked: t.block.openInNewTab ?? !1,
|
|
2730
2804
|
onChange: r[1] ||= (e) => x("openInNewTab", e.target.checked)
|
|
2731
|
-
}, null, 40,
|
|
2805
|
+
}, null, 40, fs), d(" " + D(T(a).video.openInNewTab), 1)])) : b("", !0)
|
|
2732
2806
|
]),
|
|
2733
|
-
f.value ? (e(), v("div",
|
|
2807
|
+
f.value ? (e(), v("div", ps, [_("label", { class: p(T(W)) }, [d(D(T(a).video.placeholderUrl) + " ", 1), _("span", ms, D(T(a).video.optional), 1)], 2), _("input", {
|
|
2734
2808
|
type: "url",
|
|
2735
|
-
class: p(T(
|
|
2809
|
+
class: p(T(U)),
|
|
2736
2810
|
value: t.block.placeholderUrl || "",
|
|
2737
2811
|
placeholder: T(a).video.placeholderUrlPlaceholder,
|
|
2738
2812
|
title: T(a).video.placeholderUrlTooltip,
|
|
2739
2813
|
onInput: r[2] ||= (e) => x("placeholderUrl", e.target.value)
|
|
2740
|
-
}, null, 42,
|
|
2741
|
-
_("div",
|
|
2742
|
-
_("label", { class: p(T(
|
|
2743
|
-
k(
|
|
2814
|
+
}, null, 42, hs)])) : b("", !0),
|
|
2815
|
+
_("div", gs, [
|
|
2816
|
+
_("label", { class: p(T(W)) }, [d(D(T(a).video.customThumbnail) + " ", 1), _("span", _s, D(T(a).video.optional), 1)], 2),
|
|
2817
|
+
k(Z, {
|
|
2744
2818
|
"model-value": t.block.thumbnailUrl,
|
|
2745
2819
|
type: "url",
|
|
2746
2820
|
placeholder: T(a).video.thumbnailPlaceholder,
|
|
@@ -2760,28 +2834,28 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2760
2834
|
"background-color": "var(--tpl-bg)"
|
|
2761
2835
|
},
|
|
2762
2836
|
onClick: S
|
|
2763
|
-
}, [k(T(
|
|
2837
|
+
}, [k(T(he), {
|
|
2764
2838
|
size: 14,
|
|
2765
2839
|
"stroke-width": 1.5
|
|
2766
2840
|
}), d(" " + D(T(a).image.browseMedia), 1)])) : b("", !0)
|
|
2767
2841
|
]),
|
|
2768
|
-
_("div",
|
|
2842
|
+
_("div", vs, [_("label", { class: p(T(W)) }, D(T(a).video.altText), 3), k(Z, {
|
|
2769
2843
|
"model-value": t.block.alt,
|
|
2770
2844
|
type: "text",
|
|
2771
2845
|
placeholder: T(a).video.altTextPlaceholder,
|
|
2772
2846
|
"onUpdate:modelValue": r[4] ||= (e) => x("alt", e)
|
|
2773
2847
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2774
|
-
_("div",
|
|
2775
|
-
class: p(T(
|
|
2848
|
+
_("div", ys, [_("label", { class: p(T(W)) }, D(T(a).video.width), 3), _("select", {
|
|
2849
|
+
class: p(T(U)),
|
|
2776
2850
|
value: t.block.width,
|
|
2777
2851
|
onChange: r[5] ||= (e) => x("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2778
2852
|
}, [
|
|
2779
|
-
_("option",
|
|
2853
|
+
_("option", xs, D(T(a).video.fullWidth), 1),
|
|
2780
2854
|
r[7] ||= _("option", { value: "300" }, "300px", -1),
|
|
2781
2855
|
r[8] ||= _("option", { value: "400" }, "400px", -1),
|
|
2782
2856
|
r[9] ||= _("option", { value: "500" }, "500px", -1)
|
|
2783
|
-
], 42,
|
|
2784
|
-
_("div",
|
|
2857
|
+
], 42, bs)]),
|
|
2858
|
+
_("div", Ss, [_("label", { class: p(T(W)) }, D(T(a).title.align), 3), k(Y, {
|
|
2785
2859
|
options: [
|
|
2786
2860
|
{
|
|
2787
2861
|
value: "left",
|
|
@@ -2801,7 +2875,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2801
2875
|
}, null, 8, ["options", "model-value"])])
|
|
2802
2876
|
], 64));
|
|
2803
2877
|
}
|
|
2804
|
-
}),
|
|
2878
|
+
}), ws = ["aria-label"], Ts = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Es = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Ds = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Os = { class: "tpl:flex tpl:gap-1" }, ks = ["title"], As = ["title"], js = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Ms = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
2805
2879
|
__name: "Toolbar",
|
|
2806
2880
|
props: { block: {} },
|
|
2807
2881
|
emits: [
|
|
@@ -2810,7 +2884,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2810
2884
|
"duplicate"
|
|
2811
2885
|
],
|
|
2812
2886
|
setup(t, { emit: n }) {
|
|
2813
|
-
let i = j(() => import("./CountdownToolbar-
|
|
2887
|
+
let i = j(() => import("./CountdownToolbar-Dol7Q0Pv.js")), a = t, o = n, { t: s } = V(), c = Ae(Ie, "Toolbar"), l = A(Pe, []), u = g(() => a.block.type), d = g(() => P(a.block)), f = g(() => {
|
|
2814
2888
|
if (d.value) return l.find((e) => e.type === a.block.customType);
|
|
2815
2889
|
}), p = g(() => d.value ? f.value?.name ?? a.block.customType : ne(u.value, s)), m = c.fonts;
|
|
2816
2890
|
function h(e) {
|
|
@@ -2819,7 +2893,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2819
2893
|
return (n, a) => (e(), v("aside", {
|
|
2820
2894
|
"aria-label": T(s).landmarks.blockToolbar,
|
|
2821
2895
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2822
|
-
}, [_("div",
|
|
2896
|
+
}, [_("div", Ts, [_("div", Es, [T(Ye)[u.value] ? (e(), C(r(T(Ye)[u.value]), {
|
|
2823
2897
|
key: 0,
|
|
2824
2898
|
size: 16,
|
|
2825
2899
|
"stroke-width": 1.5
|
|
@@ -2827,70 +2901,70 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2827
2901
|
key: 1,
|
|
2828
2902
|
size: 16,
|
|
2829
2903
|
"stroke-width": 1.5
|
|
2830
|
-
})) : b("", !0), _("h3",
|
|
2904
|
+
})) : b("", !0), _("h3", Ds, D(p.value), 1)]), _("div", Os, [_("button", {
|
|
2831
2905
|
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)]",
|
|
2832
2906
|
title: T(s).toolbar.duplicate,
|
|
2833
2907
|
onClick: a[0] ||= (e) => o("duplicate")
|
|
2834
|
-
}, [k(T(
|
|
2908
|
+
}, [k(T(me), {
|
|
2835
2909
|
size: 14,
|
|
2836
2910
|
"stroke-width": 2
|
|
2837
|
-
})], 8,
|
|
2911
|
+
})], 8, ks), _("button", {
|
|
2838
2912
|
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)]",
|
|
2839
2913
|
title: T(s).toolbar.delete,
|
|
2840
2914
|
onClick: a[1] ||= (e) => o("delete")
|
|
2841
|
-
}, [k(T(
|
|
2915
|
+
}, [k(T(st), {
|
|
2842
2916
|
size: 14,
|
|
2843
2917
|
"stroke-width": 2
|
|
2844
|
-
})], 8,
|
|
2918
|
+
})], 8, As)])]), _("div", js, [d.value ? (e(), C($i, {
|
|
2845
2919
|
key: 0,
|
|
2846
2920
|
block: t.block,
|
|
2847
2921
|
onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
|
|
2848
2922
|
onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
|
|
2849
|
-
}, null, 8, ["block"])) : u.value === "section" ? (e(), C(
|
|
2923
|
+
}, null, 8, ["block"])) : u.value === "section" ? (e(), C(Ka, {
|
|
2850
2924
|
key: 1,
|
|
2851
2925
|
block: t.block,
|
|
2852
2926
|
onUpdate: h
|
|
2853
|
-
}, null, 8, ["block"])) : u.value === "title" ? (e(), C(
|
|
2927
|
+
}, null, 8, ["block"])) : u.value === "title" ? (e(), C(ls, {
|
|
2854
2928
|
key: 2,
|
|
2855
2929
|
block: t.block,
|
|
2856
2930
|
"font-families": T(m),
|
|
2857
2931
|
onUpdate: h
|
|
2858
|
-
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (e(), v(y, { key: 3 }, [], 64)) : u.value === "image" ? (e(), C(
|
|
2932
|
+
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (e(), v(y, { key: 3 }, [], 64)) : u.value === "image" ? (e(), C(Oa, {
|
|
2859
2933
|
key: 4,
|
|
2860
2934
|
block: t.block,
|
|
2861
2935
|
onUpdate: h
|
|
2862
|
-
}, null, 8, ["block"])) : u.value === "video" ? (e(), C(
|
|
2936
|
+
}, null, 8, ["block"])) : u.value === "video" ? (e(), C(Cs, {
|
|
2863
2937
|
key: 5,
|
|
2864
2938
|
block: t.block,
|
|
2865
2939
|
onUpdate: h
|
|
2866
|
-
}, null, 8, ["block"])) : u.value === "button" ? (e(), C(
|
|
2940
|
+
}, null, 8, ["block"])) : u.value === "button" ? (e(), C(Tr, {
|
|
2867
2941
|
key: 6,
|
|
2868
2942
|
block: t.block,
|
|
2869
2943
|
"font-families": T(m),
|
|
2870
2944
|
onUpdate: h
|
|
2871
|
-
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (e(), C(
|
|
2945
|
+
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (e(), C(aa, {
|
|
2872
2946
|
key: 7,
|
|
2873
2947
|
block: t.block,
|
|
2874
2948
|
onUpdate: h
|
|
2875
|
-
}, null, 8, ["block"])) : u.value === "social" ? (e(), C(
|
|
2949
|
+
}, null, 8, ["block"])) : u.value === "social" ? (e(), C(fo, {
|
|
2876
2950
|
key: 8,
|
|
2877
2951
|
block: t.block,
|
|
2878
2952
|
onUpdate: h
|
|
2879
|
-
}, null, 8, ["block"])) : u.value === "menu" ? (e(), C(
|
|
2953
|
+
}, null, 8, ["block"])) : u.value === "menu" ? (e(), C(Ba, {
|
|
2880
2954
|
key: 9,
|
|
2881
2955
|
block: t.block,
|
|
2882
2956
|
"font-families": T(m),
|
|
2883
2957
|
onUpdate: h
|
|
2884
|
-
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (e(), C(
|
|
2958
|
+
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (e(), C(Xo, {
|
|
2885
2959
|
key: 10,
|
|
2886
2960
|
block: t.block,
|
|
2887
2961
|
"font-families": T(m),
|
|
2888
2962
|
onUpdate: h
|
|
2889
|
-
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (e(), C(
|
|
2963
|
+
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (e(), C(_o, {
|
|
2890
2964
|
key: 11,
|
|
2891
2965
|
block: t.block,
|
|
2892
2966
|
onUpdate: h
|
|
2893
|
-
}, null, 8, ["block"])) : u.value === "html" ? (e(), C(
|
|
2967
|
+
}, null, 8, ["block"])) : u.value === "html" ? (e(), C(la, {
|
|
2894
2968
|
key: 12,
|
|
2895
2969
|
block: t.block,
|
|
2896
2970
|
onUpdate: h
|
|
@@ -2899,52 +2973,52 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2899
2973
|
block: t.block,
|
|
2900
2974
|
"font-families": T(m),
|
|
2901
2975
|
onUpdate: h
|
|
2902
|
-
}, null, 8, ["block", "font-families"])) : b("", !0), k(
|
|
2976
|
+
}, null, 8, ["block", "font-families"])) : b("", !0), k(hi, {
|
|
2903
2977
|
block: t.block,
|
|
2904
2978
|
"is-first-section": u.value === "paragraph",
|
|
2905
2979
|
onUpdate: h
|
|
2906
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
2980
|
+
}, null, 8, ["block", "is-first-section"])])], 8, ws));
|
|
2907
2981
|
}
|
|
2908
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
2982
|
+
}), [["__scopeId", "data-v-2ac88283"]]), Ns = ["aria-label"], Ps = {
|
|
2909
2983
|
role: "tablist",
|
|
2910
2984
|
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"
|
|
2911
|
-
},
|
|
2985
|
+
}, Fs = [
|
|
2912
2986
|
"aria-selected",
|
|
2913
2987
|
"aria-label",
|
|
2914
2988
|
"title"
|
|
2915
|
-
],
|
|
2989
|
+
], Is = { key: 0 }, Ls = [
|
|
2916
2990
|
"aria-selected",
|
|
2917
2991
|
"aria-label",
|
|
2918
2992
|
"title"
|
|
2919
|
-
],
|
|
2993
|
+
], Rs = { key: 0 }, zs = [
|
|
2920
2994
|
"aria-selected",
|
|
2921
2995
|
"aria-label",
|
|
2922
2996
|
"title"
|
|
2923
|
-
],
|
|
2997
|
+
], Bs = { key: 0 }, Vs = {
|
|
2924
2998
|
key: 1,
|
|
2925
2999
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
2926
|
-
},
|
|
3000
|
+
}, Hs = {
|
|
2927
3001
|
key: 0,
|
|
2928
3002
|
id: "tpl-tabpanel-content",
|
|
2929
3003
|
role: "tabpanel",
|
|
2930
3004
|
"aria-labelledby": "tpl-tab-content",
|
|
2931
3005
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2932
|
-
},
|
|
3006
|
+
}, Us = {
|
|
2933
3007
|
key: 1,
|
|
2934
3008
|
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)]"
|
|
2935
|
-
},
|
|
3009
|
+
}, Ws = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, Gs = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ks = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, qs = {
|
|
2936
3010
|
key: 1,
|
|
2937
3011
|
id: "tpl-tabpanel-settings",
|
|
2938
3012
|
role: "tabpanel",
|
|
2939
3013
|
"aria-labelledby": "tpl-tab-settings",
|
|
2940
3014
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2941
|
-
},
|
|
3015
|
+
}, Js = {
|
|
2942
3016
|
key: 2,
|
|
2943
3017
|
id: "tpl-tabpanel-issues",
|
|
2944
3018
|
role: "tabpanel",
|
|
2945
3019
|
"aria-labelledby": "tpl-tab-issues",
|
|
2946
3020
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2947
|
-
},
|
|
3021
|
+
}, Ys = /* @__PURE__ */ m({
|
|
2948
3022
|
__name: "RightSidebar",
|
|
2949
3023
|
props: {
|
|
2950
3024
|
selectedBlock: {},
|
|
@@ -2958,7 +3032,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2958
3032
|
"update-settings"
|
|
2959
3033
|
],
|
|
2960
3034
|
setup(t, { emit: n }) {
|
|
2961
|
-
let r = j(() => import("./IssuesPanel-
|
|
3035
|
+
let r = j(() => import("./IssuesPanel-I0z6k6-H.js")), i = t, o = n, { t: s } = V(), c = u("content"), l = A(Le, null), d = g(() => l !== null), f = g(() => l?.issues.value.length ?? 0);
|
|
2962
3036
|
function m(e) {
|
|
2963
3037
|
return c.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)]";
|
|
2964
3038
|
}
|
|
@@ -2974,7 +3048,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2974
3048
|
"aria-label": T(s).landmarks.rightSidebar,
|
|
2975
3049
|
class: p(["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)]", t.shiftedLeft ? "tpl:right-[360px]" : "tpl:right-0"])
|
|
2976
3050
|
}, [
|
|
2977
|
-
_("div",
|
|
3051
|
+
_("div", Ps, [
|
|
2978
3052
|
_("button", {
|
|
2979
3053
|
id: "tpl-tab-content",
|
|
2980
3054
|
role: "tab",
|
|
@@ -2985,10 +3059,10 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2985
3059
|
class: p(["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")]),
|
|
2986
3060
|
style: S(h("content")),
|
|
2987
3061
|
onClick: i[0] ||= (e) => c.value = "content"
|
|
2988
|
-
}, [k(T(
|
|
3062
|
+
}, [k(T(jt), {
|
|
2989
3063
|
size: 14,
|
|
2990
3064
|
"stroke-width": 2
|
|
2991
|
-
}), c.value === "content" ? (e(), v("span",
|
|
3065
|
+
}), c.value === "content" ? (e(), v("span", Is, D(T(s).sidebar.content), 1)) : b("", !0)], 14, Fs),
|
|
2992
3066
|
_("button", {
|
|
2993
3067
|
id: "tpl-tab-settings",
|
|
2994
3068
|
role: "tab",
|
|
@@ -2999,10 +3073,10 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2999
3073
|
class: p(["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")]),
|
|
3000
3074
|
style: S(h("settings")),
|
|
3001
3075
|
onClick: i[1] ||= (e) => c.value = "settings"
|
|
3002
|
-
}, [k(T(
|
|
3076
|
+
}, [k(T(Nt), {
|
|
3003
3077
|
size: 14,
|
|
3004
3078
|
"stroke-width": 1.5
|
|
3005
|
-
}), c.value === "settings" ? (e(), v("span",
|
|
3079
|
+
}), c.value === "settings" ? (e(), v("span", Rs, D(T(s).sidebar.settings), 1)) : b("", !0)], 14, Ls),
|
|
3006
3080
|
d.value ? (e(), v("button", {
|
|
3007
3081
|
key: 0,
|
|
3008
3082
|
id: "tpl-tab-issues",
|
|
@@ -3015,64 +3089,64 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3015
3089
|
style: S(h("issues")),
|
|
3016
3090
|
onClick: i[2] ||= (e) => c.value = "issues"
|
|
3017
3091
|
}, [
|
|
3018
|
-
k(T(
|
|
3092
|
+
k(T(at), {
|
|
3019
3093
|
size: 14,
|
|
3020
3094
|
"stroke-width": 1.5
|
|
3021
3095
|
}),
|
|
3022
|
-
c.value === "issues" ? (e(), v("span",
|
|
3023
|
-
f.value > 0 ? (e(), v("span",
|
|
3024
|
-
], 14,
|
|
3096
|
+
c.value === "issues" ? (e(), v("span", Bs, D(T(s).issues.panelTabLabel), 1)) : b("", !0),
|
|
3097
|
+
f.value > 0 ? (e(), v("span", Vs, D(f.value), 1)) : b("", !0)
|
|
3098
|
+
], 14, zs)) : b("", !0)
|
|
3025
3099
|
]),
|
|
3026
|
-
c.value === "content" ? (e(), v("div",
|
|
3100
|
+
c.value === "content" ? (e(), v("div", Hs, [t.selectedBlock ? (e(), C(Ms, {
|
|
3027
3101
|
key: 0,
|
|
3028
3102
|
block: t.selectedBlock,
|
|
3029
3103
|
onUpdate: i[3] ||= (e) => o("update-block", e),
|
|
3030
3104
|
onDelete: i[4] ||= (e) => o("delete-block"),
|
|
3031
3105
|
onDuplicate: i[5] ||= (e) => o("duplicate-block")
|
|
3032
|
-
}, null, 8, ["block"])) : (e(), v("div",
|
|
3033
|
-
_("div",
|
|
3106
|
+
}, null, 8, ["block"])) : (e(), v("div", Us, [
|
|
3107
|
+
_("div", Ws, [k(T(Dt), {
|
|
3034
3108
|
size: 40,
|
|
3035
3109
|
"stroke-width": 1.5
|
|
3036
3110
|
})]),
|
|
3037
|
-
_("h3",
|
|
3038
|
-
_("p",
|
|
3111
|
+
_("h3", Gs, D(T(s).sidebar.noSelection), 1),
|
|
3112
|
+
_("p", Ks, D(T(s).sidebar.noSelectionHint), 1)
|
|
3039
3113
|
]))])) : b("", !0),
|
|
3040
|
-
c.value === "settings" ? (e(), v("div",
|
|
3114
|
+
c.value === "settings" ? (e(), v("div", qs, [k(Yn, {
|
|
3041
3115
|
settings: t.settings,
|
|
3042
3116
|
onUpdate: i[6] ||= (e) => o("update-settings", e)
|
|
3043
3117
|
}, null, 8, ["settings"])])) : b("", !0),
|
|
3044
|
-
c.value === "issues" && d.value ? (e(), v("div",
|
|
3045
|
-
], 10,
|
|
3118
|
+
c.value === "issues" && d.value ? (e(), v("div", Js, [k(T(r))])) : b("", !0)
|
|
3119
|
+
], 10, Ns));
|
|
3046
3120
|
}
|
|
3047
|
-
}),
|
|
3121
|
+
}), Xs = {
|
|
3048
3122
|
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)]",
|
|
3049
3123
|
style: { "z-index": "10001" },
|
|
3050
3124
|
role: "status",
|
|
3051
3125
|
"data-testid": "small-screen-notice"
|
|
3052
|
-
},
|
|
3126
|
+
}, Zs = { class: "tpl:text-[var(--tpl-text-dim)]" }, Qs = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, $s = { class: "tpl:m-0 tpl:max-w-sm tpl:text-sm tpl:leading-normal" }, ec = /* @__PURE__ */ m({
|
|
3053
3127
|
__name: "SmallScreenNotice",
|
|
3054
3128
|
setup(t) {
|
|
3055
|
-
let { t: n } =
|
|
3056
|
-
return (t, r) => (e(), v("div",
|
|
3057
|
-
_("div",
|
|
3129
|
+
let { t: n } = V();
|
|
3130
|
+
return (t, r) => (e(), v("div", Xs, [
|
|
3131
|
+
_("div", Zs, [k(T(kt), {
|
|
3058
3132
|
size: 48,
|
|
3059
3133
|
"stroke-width": 1.5
|
|
3060
3134
|
})]),
|
|
3061
|
-
_("h2",
|
|
3062
|
-
_("p",
|
|
3135
|
+
_("h2", Qs, D(T(n).smallScreen.title), 1),
|
|
3136
|
+
_("p", $s, D(T(n).smallScreen.message), 1)
|
|
3063
3137
|
]));
|
|
3064
3138
|
}
|
|
3065
|
-
}),
|
|
3139
|
+
}), tc = ["aria-label"], nc = [
|
|
3066
3140
|
"aria-checked",
|
|
3067
3141
|
"aria-label",
|
|
3068
3142
|
"title",
|
|
3069
3143
|
"onClick"
|
|
3070
|
-
],
|
|
3144
|
+
], rc = /* @__PURE__ */ m({
|
|
3071
3145
|
__name: "ViewportToggle",
|
|
3072
3146
|
props: { viewport: {} },
|
|
3073
3147
|
emits: ["change"],
|
|
3074
3148
|
setup(t, { emit: n }) {
|
|
3075
|
-
let r = t, i = n, { t: a } =
|
|
3149
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [{
|
|
3076
3150
|
value: "desktop",
|
|
3077
3151
|
label: a.viewport.desktop
|
|
3078
3152
|
}, {
|
|
@@ -3109,26 +3183,26 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3109
3183
|
}),
|
|
3110
3184
|
title: n.label,
|
|
3111
3185
|
onClick: (e) => i("change", n.value)
|
|
3112
|
-
}, [n.value === "desktop" ? (e(), C(T(
|
|
3186
|
+
}, [n.value === "desktop" ? (e(), C(T(kt), {
|
|
3113
3187
|
key: 0,
|
|
3114
3188
|
size: 18,
|
|
3115
3189
|
"stroke-width": 1.5
|
|
3116
|
-
})) : (e(), C(T(
|
|
3190
|
+
})) : (e(), C(T(Pt), {
|
|
3117
3191
|
key: 1,
|
|
3118
3192
|
size: 18,
|
|
3119
3193
|
"stroke-width": 1.5
|
|
3120
|
-
})), _("span", null, D(n.label), 1)], 12,
|
|
3194
|
+
})), _("span", null, D(n.label), 1)], 12, nc))), 128))], 12, tc));
|
|
3121
3195
|
}
|
|
3122
|
-
}),
|
|
3196
|
+
}), ic = [
|
|
3123
3197
|
"aria-label",
|
|
3124
3198
|
"title",
|
|
3125
3199
|
"aria-pressed"
|
|
3126
|
-
],
|
|
3200
|
+
], ac = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
3127
3201
|
__name: "PreviewToggle",
|
|
3128
3202
|
props: { previewMode: { type: Boolean } },
|
|
3129
3203
|
emits: ["change"],
|
|
3130
3204
|
setup(t, { emit: n }) {
|
|
3131
|
-
let r = n, { t: i } =
|
|
3205
|
+
let r = n, { t: i } = V();
|
|
3132
3206
|
return (n, a) => (e(), v("button", {
|
|
3133
3207
|
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",
|
|
3134
3208
|
style: S({
|
|
@@ -3146,28 +3220,28 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3146
3220
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3147
3221
|
mode: "out-in"
|
|
3148
3222
|
}, {
|
|
3149
|
-
default: M(() => [t.previewMode ? (e(), C(T(
|
|
3223
|
+
default: M(() => [t.previewMode ? (e(), C(T(tt), {
|
|
3150
3224
|
key: "eye",
|
|
3151
3225
|
size: 18,
|
|
3152
3226
|
"stroke-width": 1.5
|
|
3153
|
-
})) : (e(), C(T(
|
|
3227
|
+
})) : (e(), C(T(z), {
|
|
3154
3228
|
key: "eye-off",
|
|
3155
3229
|
size: 18,
|
|
3156
3230
|
"stroke-width": 1.5
|
|
3157
3231
|
}))]),
|
|
3158
3232
|
_: 1
|
|
3159
|
-
})], 12,
|
|
3233
|
+
})], 12, ic));
|
|
3160
3234
|
}
|
|
3161
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3235
|
+
}), [["__scopeId", "data-v-af87d02a"]]), oc = [
|
|
3162
3236
|
"aria-label",
|
|
3163
3237
|
"title",
|
|
3164
3238
|
"aria-pressed"
|
|
3165
|
-
],
|
|
3239
|
+
], sc = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
3166
3240
|
__name: "DarkModeToggle",
|
|
3167
3241
|
props: { darkMode: { type: Boolean } },
|
|
3168
3242
|
emits: ["change"],
|
|
3169
3243
|
setup(t, { emit: n }) {
|
|
3170
|
-
let r = n, { t: i } =
|
|
3244
|
+
let r = n, { t: i } = V();
|
|
3171
3245
|
return (n, a) => (e(), v("button", {
|
|
3172
3246
|
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",
|
|
3173
3247
|
style: S({
|
|
@@ -3185,37 +3259,37 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3185
3259
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3186
3260
|
mode: "out-in"
|
|
3187
3261
|
}, {
|
|
3188
|
-
default: M(() => [t.darkMode ? (e(), C(T(
|
|
3262
|
+
default: M(() => [t.darkMode ? (e(), C(T(At), {
|
|
3189
3263
|
key: "moon",
|
|
3190
3264
|
size: 18,
|
|
3191
3265
|
"stroke-width": 1.5
|
|
3192
|
-
})) : (e(), C(T(
|
|
3266
|
+
})) : (e(), C(T(It), {
|
|
3193
3267
|
key: "sun",
|
|
3194
3268
|
size: 18,
|
|
3195
3269
|
"stroke-width": 1.5
|
|
3196
3270
|
}))]),
|
|
3197
3271
|
_: 1
|
|
3198
|
-
})], 12,
|
|
3272
|
+
})], 12, oc));
|
|
3199
3273
|
}
|
|
3200
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3274
|
+
}), [["__scopeId", "data-v-f8694f76"]]), cc = {
|
|
3201
3275
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3202
3276
|
style: {
|
|
3203
3277
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3204
3278
|
"backdrop-filter": "blur(8px)",
|
|
3205
3279
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3206
3280
|
}
|
|
3207
|
-
},
|
|
3281
|
+
}, lc = {
|
|
3208
3282
|
href: "https://github.com/templatical/sdk",
|
|
3209
3283
|
target: "_blank",
|
|
3210
3284
|
rel: "noopener noreferrer",
|
|
3211
3285
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3212
3286
|
style: { "text-decoration": "none" }
|
|
3213
|
-
},
|
|
3287
|
+
}, uc = /* @__PURE__ */ m({
|
|
3214
3288
|
__name: "EditorFooter",
|
|
3215
3289
|
props: { positionClass: {} },
|
|
3216
3290
|
setup(t) {
|
|
3217
|
-
let { t: n } =
|
|
3218
|
-
return (r, i) => (e(), v("footer", { class: p(["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)]", t.positionClass]) }, [_("div",
|
|
3291
|
+
let { t: n } = V();
|
|
3292
|
+
return (r, i) => (e(), v("footer", { class: p(["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)]", t.positionClass]) }, [_("div", cc, [
|
|
3219
3293
|
_("span", null, D(T(n).footer.poweredBy), 1),
|
|
3220
3294
|
i[0] ||= _("a", {
|
|
3221
3295
|
href: "https://templatical.com",
|
|
@@ -3230,32 +3304,32 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3230
3304
|
alt: ""
|
|
3231
3305
|
}), d(" Templatical ")], -1),
|
|
3232
3306
|
i[1] ||= _("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3233
|
-
_("a",
|
|
3307
|
+
_("a", lc, D(T(n).footer.openSource), 1)
|
|
3234
3308
|
])], 2));
|
|
3235
3309
|
}
|
|
3236
|
-
}),
|
|
3310
|
+
}), dc = ["aria-labelledby", "data-tpl-theme"], fc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, pc = ["id"], mc = ["aria-label"], hc = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, gc = [
|
|
3237
3311
|
"id",
|
|
3238
3312
|
"placeholder",
|
|
3239
3313
|
"aria-label",
|
|
3240
3314
|
"aria-activedescendant"
|
|
3241
|
-
],
|
|
3315
|
+
], _c = {
|
|
3242
3316
|
key: 0,
|
|
3243
3317
|
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",
|
|
3244
3318
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3245
|
-
},
|
|
3319
|
+
}, vc = ["data-group-name", "onClick"], yc = ["aria-label"], bc = {
|
|
3246
3320
|
key: 0,
|
|
3247
3321
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3248
3322
|
"data-testid": "merge-tag-picker-empty"
|
|
3249
|
-
},
|
|
3323
|
+
}, xc = {
|
|
3250
3324
|
key: 1,
|
|
3251
3325
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3252
3326
|
"data-testid": "merge-tag-picker-empty"
|
|
3253
|
-
},
|
|
3327
|
+
}, Sc = [
|
|
3254
3328
|
"aria-expanded",
|
|
3255
3329
|
"data-group-name",
|
|
3256
3330
|
"data-group-collapsed",
|
|
3257
3331
|
"onClick"
|
|
3258
|
-
],
|
|
3332
|
+
], Cc = { class: "tpl:ml-1 tpl:font-normal" }, wc = [
|
|
3259
3333
|
"id",
|
|
3260
3334
|
"aria-selected",
|
|
3261
3335
|
"data-selected",
|
|
@@ -3264,28 +3338,28 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3264
3338
|
"title",
|
|
3265
3339
|
"onMousemove",
|
|
3266
3340
|
"onClick"
|
|
3267
|
-
],
|
|
3341
|
+
], Tc = { class: "tpl:text-sm tpl:font-medium" }, Ec = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, Dc = {
|
|
3268
3342
|
key: 0,
|
|
3269
3343
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3270
|
-
},
|
|
3344
|
+
}, $ = "tpl-merge-tag-picker-list", Oc = /* @__PURE__ */ m({
|
|
3271
3345
|
__name: "MergeTagPickerModal",
|
|
3272
3346
|
setup(r) {
|
|
3273
|
-
let i =
|
|
3347
|
+
let i = Ae(We, "MergeTagPickerModal"), { t: s, format: c } = V(), l = A(De, null), d = A(ke, null), m = u(""), x = Te(m, 200), w = u(null), O = g(() => x.value.trim().length > 0), j = u(0), N = g(() => i.tags.value.some((e) => !!e.group)), P = u(/* @__PURE__ */ new Set());
|
|
3274
3348
|
function F(e) {
|
|
3275
3349
|
return P.value.has(e);
|
|
3276
3350
|
}
|
|
3277
|
-
function
|
|
3351
|
+
function ee(e) {
|
|
3278
3352
|
let t = new Set(P.value);
|
|
3279
3353
|
t.has(e) ? t.delete(e) : t.add(e), P.value = t, j.value = 0;
|
|
3280
3354
|
}
|
|
3281
|
-
let
|
|
3355
|
+
let I = g(() => {
|
|
3282
3356
|
let e = x.value.trim().toLowerCase();
|
|
3283
3357
|
return e ? i.tags.value.filter((t) => [
|
|
3284
3358
|
t.label,
|
|
3285
3359
|
t.value,
|
|
3286
3360
|
t.description ?? ""
|
|
3287
3361
|
].join(" ").toLowerCase().includes(e)) : i.tags.value;
|
|
3288
|
-
}),
|
|
3362
|
+
}), L = g(() => {
|
|
3289
3363
|
if (!N.value) return [];
|
|
3290
3364
|
let e = s.mergeTag.picker.otherGroup, t = /* @__PURE__ */ new Set(), n = [];
|
|
3291
3365
|
for (let r of i.tags.value) {
|
|
@@ -3293,8 +3367,8 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3293
3367
|
t.has(i) || (t.add(i), n.push(i));
|
|
3294
3368
|
}
|
|
3295
3369
|
return n;
|
|
3296
|
-
}),
|
|
3297
|
-
let e =
|
|
3370
|
+
}), te = g(() => {
|
|
3371
|
+
let e = I.value;
|
|
3298
3372
|
if (!N.value || O.value) return e.map((e, t) => ({
|
|
3299
3373
|
kind: "tag",
|
|
3300
3374
|
tag: e,
|
|
@@ -3319,42 +3393,42 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3319
3393
|
}), a++;
|
|
3320
3394
|
}
|
|
3321
3395
|
return i;
|
|
3322
|
-
}),
|
|
3396
|
+
}), R = g(() => te.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3323
3397
|
a(() => i.isOpen.value, (e) => {
|
|
3324
3398
|
e && (m.value = "", j.value = 0, P.value = /* @__PURE__ */ new Set(), n(() => {
|
|
3325
3399
|
w.value?.focus();
|
|
3326
3400
|
}));
|
|
3327
|
-
}), a(
|
|
3401
|
+
}), a(R, (e) => {
|
|
3328
3402
|
j.value >= e.length && (j.value = Math.max(0, e.length - 1));
|
|
3329
3403
|
});
|
|
3330
|
-
function
|
|
3404
|
+
function z(e) {
|
|
3331
3405
|
i.resolve(e);
|
|
3332
3406
|
}
|
|
3333
|
-
function
|
|
3407
|
+
function ne() {
|
|
3334
3408
|
i.resolve(null);
|
|
3335
3409
|
}
|
|
3336
|
-
function
|
|
3337
|
-
if (
|
|
3410
|
+
function re(e) {
|
|
3411
|
+
if (R.value.length === 0) return;
|
|
3338
3412
|
let t = j.value + e;
|
|
3339
|
-
j.value = Math.max(0, Math.min(
|
|
3413
|
+
j.value = Math.max(0, Math.min(R.value.length - 1, t)), oe();
|
|
3340
3414
|
}
|
|
3341
|
-
let
|
|
3342
|
-
function
|
|
3343
|
-
|
|
3415
|
+
let ie = u(null), ae = u({});
|
|
3416
|
+
function B(e, t) {
|
|
3417
|
+
ae.value[e] = t ?? null;
|
|
3344
3418
|
}
|
|
3345
|
-
function
|
|
3419
|
+
function oe() {
|
|
3346
3420
|
n(() => {
|
|
3347
|
-
let e =
|
|
3421
|
+
let e = ie.value;
|
|
3348
3422
|
e && e.querySelector(`[data-merge-tag-index="${j.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3349
3423
|
});
|
|
3350
3424
|
}
|
|
3351
|
-
function
|
|
3425
|
+
function se(e) {
|
|
3352
3426
|
if (P.value.has(e)) {
|
|
3353
3427
|
let t = new Set(P.value);
|
|
3354
3428
|
t.delete(e), P.value = t;
|
|
3355
3429
|
}
|
|
3356
3430
|
n(() => {
|
|
3357
|
-
let t =
|
|
3431
|
+
let t = ie.value;
|
|
3358
3432
|
if (!t) return;
|
|
3359
3433
|
let n = 0, r = !1;
|
|
3360
3434
|
for (let i of Array.from(t.children)) {
|
|
@@ -3370,55 +3444,55 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3370
3444
|
});
|
|
3371
3445
|
});
|
|
3372
3446
|
}
|
|
3373
|
-
function
|
|
3374
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3375
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3447
|
+
function ce(e) {
|
|
3448
|
+
if (e.key === "ArrowDown") e.preventDefault(), re(1);
|
|
3449
|
+
else if (e.key === "ArrowUp") e.preventDefault(), re(-1);
|
|
3376
3450
|
else if (e.key === "Enter") {
|
|
3377
3451
|
e.preventDefault();
|
|
3378
|
-
let t =
|
|
3379
|
-
t &&
|
|
3452
|
+
let t = R.value[j.value];
|
|
3453
|
+
t && z(t);
|
|
3380
3454
|
}
|
|
3381
3455
|
}
|
|
3382
|
-
function
|
|
3383
|
-
if (
|
|
3456
|
+
function le() {
|
|
3457
|
+
if (R.value.length !== 0) return `${$}-opt-${j.value}`;
|
|
3384
3458
|
}
|
|
3385
|
-
function
|
|
3386
|
-
return `${
|
|
3459
|
+
function ue(e) {
|
|
3460
|
+
return `${$}-opt-${e}`;
|
|
3387
3461
|
}
|
|
3388
|
-
let
|
|
3389
|
-
return (n, r) => (e(), C(
|
|
3462
|
+
let de = g(() => i.tags.value.length === 0), fe = g(() => !de.value && I.value.length === 0), pe = g(() => N.value && L.value.length > 1 && !O.value);
|
|
3463
|
+
return (n, r) => (e(), C(St, {
|
|
3390
3464
|
visible: T(i).isOpen.value,
|
|
3391
|
-
onClose:
|
|
3392
|
-
onKeydown:
|
|
3465
|
+
onClose: ne,
|
|
3466
|
+
onKeydown: ce
|
|
3393
3467
|
}, {
|
|
3394
3468
|
default: M(() => [_("div", {
|
|
3395
3469
|
role: "dialog",
|
|
3396
3470
|
"aria-modal": "true",
|
|
3397
|
-
"aria-labelledby": `${
|
|
3471
|
+
"aria-labelledby": `${$}-title`,
|
|
3398
3472
|
"data-tpl-theme": T(d),
|
|
3399
3473
|
"data-testid": "merge-tag-picker-modal",
|
|
3400
3474
|
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)]",
|
|
3401
3475
|
style: S(T(l))
|
|
3402
3476
|
}, [
|
|
3403
|
-
_("header",
|
|
3404
|
-
id: `${
|
|
3477
|
+
_("header", fc, [_("h2", {
|
|
3478
|
+
id: `${$}-title`,
|
|
3405
3479
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3406
|
-
}, D(T(s).mergeTag.picker.title), 9,
|
|
3480
|
+
}, D(T(s).mergeTag.picker.title), 9, pc), _("button", {
|
|
3407
3481
|
type: "button",
|
|
3408
3482
|
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)]",
|
|
3409
3483
|
"aria-label": T(s).mergeTag.picker.close,
|
|
3410
3484
|
"data-testid": "merge-tag-picker-close",
|
|
3411
|
-
onClick:
|
|
3412
|
-
}, [k(T(
|
|
3485
|
+
onClick: ne
|
|
3486
|
+
}, [k(T(ct), {
|
|
3413
3487
|
size: 16,
|
|
3414
3488
|
"stroke-width": 2
|
|
3415
|
-
})], 8,
|
|
3416
|
-
_("div",
|
|
3489
|
+
})], 8, mc)]),
|
|
3490
|
+
_("div", hc, [k(T(qe), {
|
|
3417
3491
|
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)]",
|
|
3418
3492
|
size: 14,
|
|
3419
3493
|
"stroke-width": 2
|
|
3420
3494
|
}), t(_("input", {
|
|
3421
|
-
id: `${
|
|
3495
|
+
id: `${$}-search`,
|
|
3422
3496
|
ref_key: "searchInputRef",
|
|
3423
3497
|
ref: w,
|
|
3424
3498
|
"onUpdate:modelValue": r[0] ||= (e) => m.value = e,
|
|
@@ -3426,50 +3500,50 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3426
3500
|
class: "tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)]",
|
|
3427
3501
|
placeholder: T(s).mergeTag.picker.searchPlaceholder,
|
|
3428
3502
|
"aria-label": T(s).mergeTag.picker.searchAriaLabel,
|
|
3429
|
-
"aria-controls":
|
|
3430
|
-
"aria-activedescendant":
|
|
3503
|
+
"aria-controls": $,
|
|
3504
|
+
"aria-activedescendant": le(),
|
|
3431
3505
|
"data-testid": "merge-tag-picker-search",
|
|
3432
3506
|
onKeydown: r[1] ||= E(h(() => {}, ["prevent"]), ["enter"])
|
|
3433
|
-
}, null, 40,
|
|
3434
|
-
|
|
3507
|
+
}, null, 40, gc), [[f, m.value]])]),
|
|
3508
|
+
pe.value ? (e(), v("div", _c, [(e(!0), v(y, null, o(L.value, (t) => (e(), v("button", {
|
|
3435
3509
|
key: t,
|
|
3436
3510
|
type: "button",
|
|
3437
3511
|
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)]",
|
|
3438
3512
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3439
3513
|
"data-group-name": t,
|
|
3440
|
-
onClick: (e) =>
|
|
3441
|
-
}, D(t), 9,
|
|
3514
|
+
onClick: (e) => se(t)
|
|
3515
|
+
}, D(t), 9, vc))), 128))])) : b("", !0),
|
|
3442
3516
|
_("div", {
|
|
3443
|
-
id:
|
|
3517
|
+
id: $,
|
|
3444
3518
|
ref_key: "listRef",
|
|
3445
|
-
ref:
|
|
3519
|
+
ref: ie,
|
|
3446
3520
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3447
3521
|
role: "listbox",
|
|
3448
3522
|
"aria-label": T(s).mergeTag.picker.title,
|
|
3449
3523
|
"data-testid": "merge-tag-picker-list"
|
|
3450
|
-
}, [
|
|
3524
|
+
}, [de.value ? (e(), v("div", bc, D(T(s).mergeTag.picker.empty), 1)) : fe.value ? (e(), v("div", xc, D(T(s).mergeTag.picker.noResults), 1)) : (e(!0), v(y, { key: 2 }, o(te.value, (t, n) => (e(), v(y, { key: n }, [t.kind === "header" ? (e(), v("button", {
|
|
3451
3525
|
key: 0,
|
|
3452
3526
|
ref_for: !0,
|
|
3453
|
-
ref: (e) =>
|
|
3527
|
+
ref: (e) => B(t.group, e),
|
|
3454
3528
|
type: "button",
|
|
3455
3529
|
"aria-expanded": !F(t.group),
|
|
3456
|
-
"aria-controls":
|
|
3530
|
+
"aria-controls": $,
|
|
3457
3531
|
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)]",
|
|
3458
3532
|
"data-testid": "merge-tag-picker-group-header",
|
|
3459
3533
|
"data-group-name": t.group,
|
|
3460
3534
|
"data-group-collapsed": F(t.group) ? "true" : "false",
|
|
3461
|
-
onClick: (e) =>
|
|
3535
|
+
onClick: (e) => ee(t.group)
|
|
3462
3536
|
}, [
|
|
3463
|
-
k(T(
|
|
3537
|
+
k(T(et), {
|
|
3464
3538
|
size: 12,
|
|
3465
3539
|
"stroke-width": 2,
|
|
3466
3540
|
class: p(["tpl:transition-transform", F(t.group) ? "tpl:-rotate-90" : ""])
|
|
3467
3541
|
}, null, 8, ["class"]),
|
|
3468
3542
|
_("span", null, D(t.group), 1),
|
|
3469
|
-
_("span",
|
|
3470
|
-
], 8,
|
|
3543
|
+
_("span", Cc, " (" + D(T(c)(T(s).mergeTag.picker.groupCount, { count: t.count })) + ") ", 1)
|
|
3544
|
+
], 8, Sc)) : (e(), v("button", {
|
|
3471
3545
|
key: 1,
|
|
3472
|
-
id:
|
|
3546
|
+
id: ue(t.index),
|
|
3473
3547
|
type: "button",
|
|
3474
3548
|
role: "option",
|
|
3475
3549
|
"aria-selected": t.index === j.value,
|
|
@@ -3480,16 +3554,16 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3480
3554
|
class: p(["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", t.index === j.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)]"]),
|
|
3481
3555
|
"data-testid": "merge-tag-picker-item",
|
|
3482
3556
|
onMousemove: (e) => j.value = t.index,
|
|
3483
|
-
onClick: (e) =>
|
|
3557
|
+
onClick: (e) => z(t.tag)
|
|
3484
3558
|
}, [
|
|
3485
|
-
_("span",
|
|
3486
|
-
_("span",
|
|
3487
|
-
t.tag.description ? (e(), v("span",
|
|
3488
|
-
], 42,
|
|
3489
|
-
], 12,
|
|
3559
|
+
_("span", Tc, D(t.tag.label), 1),
|
|
3560
|
+
_("span", Ec, D(t.tag.value), 1),
|
|
3561
|
+
t.tag.description ? (e(), v("span", Dc, D(t.tag.description), 1)) : b("", !0)
|
|
3562
|
+
], 42, wc))], 64))), 128))], 8, yc)
|
|
3563
|
+
], 12, dc)]),
|
|
3490
3564
|
_: 1
|
|
3491
3565
|
}, 8, ["visible"]));
|
|
3492
3566
|
}
|
|
3493
3567
|
});
|
|
3494
3568
|
//#endregion
|
|
3495
|
-
export {
|
|
3569
|
+
export { rc as a, on as c, Lt as d, Mt as f, ac as i, Yt as l, uc as n, ec as o, sc as r, Ys as s, Oc as t, Jt as u };
|