@templatical/editor 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-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-F5YV5hE3.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-CDy9_2Yj.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-Cd7bz1Wk.js} +3 -3
- 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-OO8hWAVp.js} +162 -162
- package/dist/cdn/chunks/{CloudEditor-hxoqsTsq.js.map → CloudEditor-OO8hWAVp.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-BXjDFRHI.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-CZN92Bhz.js.map → CountdownToolbar-BXjDFRHI.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-ZuJ2ePB0.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-Deo8EOSz.js.map → NumberWithSuffix-ZuJ2ePB0.js.map} +1 -1
- 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-DpBN9H7-.js} +9 -1
- package/dist/cdn/chunks/de-DpBN9H7-.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-BhHtdIiU.js} +9 -1
- package/dist/cdn/chunks/en-BhHtdIiU.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-Bth5a93y.js} +8 -2
- package/dist/cdn/chunks/pt-BR-Bth5a93y.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-DwPomkBw.js} +53 -50
- package/dist/cdn/chunks/renderer-DwPomkBw.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-D45rgVq8.js} +737 -667
- package/dist/cdn/chunks/styles-D45rgVq8.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-DpBN9H7-.js} +7 -3
- 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-BhHtdIiU.js} +7 -3
- 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-Bth5a93y.js} +7 -1
- 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-Dp4mJuCM.js} +888 -818
- 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/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, t as yt } from "./styleConstants-lGobwiLH.js";
|
|
27
|
+
import { i as q, n as J, r as Y, t as bt } from "./NumberWithSuffix-Cd7bz1Wk.js";
|
|
28
|
+
import { t as xt } from "./TplModal-utMtXzSO.js";
|
|
29
|
+
var St = 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
|
+
}]]), Ct = 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
|
+
]), wt = H("circle", [["circle", {
|
|
30
58
|
cx: "12",
|
|
31
59
|
cy: "12",
|
|
32
60
|
r: "10",
|
|
33
61
|
key: "1mglay"
|
|
34
|
-
}]]),
|
|
62
|
+
}]]), Tt = 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
|
+
]), Et = 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
|
+
]), Dt = 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
|
+
}]]), Ot = 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
|
+
]), kt = 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
|
+
}]]), At = 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
|
+
}]]), jt = 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
|
+
}]]), Mt = 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
|
+
}]]), Nt = 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
|
+
}]]), Pt = 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
|
+
}]]), Ft = 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 It(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 Lt = ["aria-label"], Rt = {
|
|
238
238
|
key: 0,
|
|
239
239
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
240
|
-
},
|
|
240
|
+
}, zt = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, Bt = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, Vt = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, Ht = {
|
|
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
|
+
}, Ut = {
|
|
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
|
+
}, Wt = { class: "tpl:relative" }, Gt = {
|
|
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
|
+
}, Kt = 96, qt = /*#__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 + Kt * 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", Rt, [
|
|
372
|
+
_("div", zt, [k(T(Ct), {
|
|
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", Bt, D(T(l).canvas.noBlocks), 1),
|
|
377
|
+
_("p", Vt, D(T(l).canvas.dragHint), 1),
|
|
378
|
+
O.value && T(f) ? (e(), v("p", Ht, [
|
|
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", Ut, [
|
|
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", Wt, [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", Gt, 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, Lt)], 4));
|
|
448
448
|
}
|
|
449
|
-
}), [["__scopeId", "data-v-a9a1158b"]]),
|
|
449
|
+
}), [["__scopeId", "data-v-a9a1158b"]]), Jt = 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 Yt(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 Xt = ["aria-label"], Zt = {
|
|
482
482
|
key: 0,
|
|
483
483
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
484
|
-
},
|
|
484
|
+
}, Qt = ["aria-label"], $t = {
|
|
485
485
|
key: 0,
|
|
486
486
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
487
|
-
},
|
|
487
|
+
}, en = {
|
|
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
|
+
}, tn = [
|
|
491
491
|
"data-palette-type",
|
|
492
492
|
"aria-label",
|
|
493
493
|
"onClick",
|
|
494
494
|
"onKeydown"
|
|
495
|
-
],
|
|
495
|
+
], nn = { 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" }, rn = {
|
|
496
496
|
key: 0,
|
|
497
497
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
498
|
-
},
|
|
498
|
+
}, an = /* @__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(() => Yt(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", Zt, [_("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", $t, D(T(s).modules.title), 1)) : b("", !0),
|
|
584
|
+
h.value ? (e(), v("span", en, D(T(p).savedModules?.moduleCount.value ?? 0), 1)) : b("", !0)
|
|
585
|
+
], 12, Qt)])) : 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", nn, [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", rn, D(t.label), 1)) : b("", !0)], 44, tn))), 128))]),
|
|
619
618
|
_: 1
|
|
620
|
-
}, 8, ["model-value"])], 44,
|
|
619
|
+
}, 8, ["model-value"])], 44, Xt));
|
|
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 on(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 sn = ["aria-label", "onKeydown"], cn = ["data-tooltip"], ln = ["data-tooltip"], un = {
|
|
708
707
|
key: 2,
|
|
709
708
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
710
|
-
},
|
|
709
|
+
}, dn = ["aria-label", "title"], fn = /* @__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, cn)) : 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, ln)) : (e(), v("span", un, 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, dn)], 42, sn));
|
|
757
756
|
}
|
|
758
|
-
}),
|
|
757
|
+
}), pn = [
|
|
759
758
|
"aria-label",
|
|
760
759
|
"title",
|
|
761
760
|
"disabled"
|
|
762
|
-
],
|
|
761
|
+
], mn = "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)]", hn = /* @__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([mn, "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, pn));
|
|
779
778
|
}
|
|
780
|
-
}),
|
|
779
|
+
}), gn = { key: 0 }, _n = { key: 1 }, vn = [
|
|
781
780
|
"value",
|
|
782
781
|
"placeholder",
|
|
783
782
|
"rows"
|
|
784
|
-
],
|
|
783
|
+
], yn = "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)]", bn = "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)]", xn = /* @__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 } = on({
|
|
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", gn, [k(fn, {
|
|
799
798
|
segments: T(o),
|
|
800
|
-
"display-class":
|
|
799
|
+
"display-class": bn,
|
|
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(hn, {
|
|
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", _n, [_("textarea", {
|
|
812
811
|
ref_key: "textareaRef",
|
|
813
812
|
ref: a,
|
|
814
|
-
class: p(
|
|
813
|
+
class: p(yn),
|
|
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, vn), T(c) ? (e(), C(hn, {
|
|
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
|
+
}), Sn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, Cn = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, wn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tn = { class: "tpl:mb-3.5" }, En = { 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)]" }, Dn = ["onClick"], On = { class: "tpl:flex tpl:items-stretch" }, kn = ["value"], An = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, jn = { class: "tpl:mb-3.5" }, Mn = ["value"], Nn = ["value"], Pn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Fn = ["value"], In = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Ln = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Rn = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, zn = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Bn = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, Vn = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, Hn = { 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)]" }, Un = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Wn = { class: "tpl:mb-1 tpl:last:mb-0" }, Gn = { class: "tpl:mb-1 tpl:last:mb-0" }, Kn = { class: "tpl:mb-1 tpl:last:mb-0" }, qn = 150, Jn = /* @__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", Sn, [_("div", Cn, [
|
|
850
|
+
_("div", { class: p(T(vt)) }, [
|
|
851
|
+
_("div", wn, [k(T(Pt), {
|
|
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", Tn, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.widthPreset), 3), _("div", En, [(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, Dn)), 64))])]),
|
|
866
|
+
_("div", null, [_("label", { class: p(T(W)) }, D(T(a).templateSettings.customWidth), 3), _("div", On, [_("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, kn), _("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", An, [k(T(wt), {
|
|
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", jn, [_("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(yt),
|
|
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, Nn))), 128))], 42, Mn)])
|
|
895
894
|
], 2),
|
|
896
|
-
_("div", { class: p(T(
|
|
895
|
+
_("div", { class: p(T(vt)) }, [_("div", Pn, [k(T(Tt), {
|
|
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, Fn),
|
|
911
|
+
_("p", In, D(T(a).templateSettings.contentLocaleHint), 1)
|
|
913
912
|
])], 2),
|
|
914
|
-
_("div", { class: p(T(
|
|
913
|
+
_("div", { class: p(T(vt)) }, [_("div", Ln, [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(xn, {
|
|
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", Rn, [_("span", zn, D(T(a).templateSettings.preheaderTextHint), 1), _("span", Bn, D((t.settings.preheaderText ?? "").length) + "/" + D(qn), 1)])])], 2),
|
|
923
|
+
_("div", Vn, [_("div", Hn, [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", Un, [
|
|
927
|
+
_("li", Wn, D(T(a).templateSettings.tip1), 1),
|
|
928
|
+
_("li", Gn, D(T(a).templateSettings.tip2), 1),
|
|
929
|
+
_("li", Kn, D(T(a).templateSettings.tip3), 1)
|
|
931
930
|
])])
|
|
932
931
|
])]));
|
|
933
932
|
}
|
|
934
|
-
}),
|
|
933
|
+
}), Yn = { key: 0 }, Xn = { key: 1 }, Zn = [
|
|
935
934
|
"type",
|
|
936
935
|
"value",
|
|
937
936
|
"placeholder"
|
|
938
|
-
],
|
|
937
|
+
], Qn = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", 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 } = on({
|
|
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", Yn, [k(fn, {
|
|
957
956
|
segments: T(o),
|
|
958
|
-
"display-class":
|
|
957
|
+
"display-class": Qn,
|
|
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(hn, {
|
|
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", Xn, [_("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, Zn), T(c) ? (e(), C(hn, {
|
|
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"]]), $n = { class: "tpl:mb-3.5" }, er = ["value"], tr = { value: "" }, nr = ["value"], rr = { class: "tpl:mb-3.5" }, ir = { class: "tpl:mb-3.5" }, ar = {
|
|
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
|
+
}, or = ["checked"], sr = { class: "tpl:mb-3.5" }, cr = { class: "tpl:mb-3.5" }, lr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, ur = { class: "tpl:mb-3.5" }, dr = { class: "tpl:flex tpl:items-stretch" }, fr = ["value"], pr = { class: "tpl:mb-3.5" }, mr = { class: "tpl:flex tpl:items-stretch" }, hr = ["value"], gr = { class: "tpl:mb-3.5" }, _r = ["value"], vr = { value: "auto" }, yr = { value: "full" }, br = { value: "custom" }, xr = {
|
|
990
|
+
key: 0,
|
|
991
|
+
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
992
|
+
}, Sr = ["value"], Cr = 200, wr = /* @__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 : Cr);
|
|
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", $n, [_("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", tr, 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, nr))), 128))], 42, er)]),
|
|
1028
|
+
_("div", rr, [_("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", ir, [
|
|
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", ar, [_("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, or), d(" " + D(T(a).button.openInNewTab), 1)])) : b("", !0)
|
|
1030
1047
|
]),
|
|
1031
|
-
_("div",
|
|
1048
|
+
_("div", sr, [_("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", cr, [_("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", lr, [_("div", ur, [_("label", { class: p(T(
|
|
1054
|
+
"onUpdate:modelValue": r[5] ||= (e) => c("textColor", e)
|
|
1055
|
+
}, null, 8, ["model-value"])]),
|
|
1056
|
+
_("div", lr, [_("div", ur, [_("label", { class: p(T(W)) }, D(T(a).button.borderRadius), 3), _("div", dr, [_("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, fr), _("span", { class: p(T(
|
|
1062
|
+
onInput: r[6] ||= (e) => c("borderRadius", Number(e.target.value))
|
|
1063
|
+
}, null, 42, fr), _("span", { class: p(T(G)) }, "px", 2)])]), _("div", pr, [_("label", { class: p(T(W)) }, D(T(a).button.fontSize), 3), _("div", mr, [_("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, hr), _("span", { class: p(T(
|
|
1069
|
+
onInput: r[7] ||= (e) => c("fontSize", Number(e.target.value))
|
|
1070
|
+
}, null, 42, hr), _("span", { class: p(T(G)) }, "px", 2)])])]),
|
|
1071
|
+
_("div", gr, [
|
|
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", vr, D(T(a).button.widthAuto), 1),
|
|
1079
|
+
_("option", yr, D(T(a).button.fullWidth), 1),
|
|
1080
|
+
_("option", br, D(T(a).button.widthCustom), 1)
|
|
1081
|
+
], 42, _r),
|
|
1082
|
+
s.value === "custom" ? (e(), v("div", xr, [_("input", {
|
|
1083
|
+
type: "number",
|
|
1084
|
+
class: p(T(K)),
|
|
1085
|
+
value: typeof t.block.width == "number" ? t.block.width : Cr,
|
|
1086
|
+
min: "20",
|
|
1087
|
+
onInput: r[9] ||= (e) => u(e.target.value)
|
|
1088
|
+
}, null, 42, Sr), _("span", { class: p(T(G)) }, "px", 2)])) : b("", !0)
|
|
1089
|
+
])
|
|
1053
1090
|
], 64));
|
|
1054
1091
|
}
|
|
1055
|
-
}),
|
|
1092
|
+
}), Tr = { class: "spacing-control" }, Er = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Dr = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Or = { class: "tpl:flex tpl:items-center" }, kr = ["aria-label"], Ar = ["value", "aria-label"], jr = ["aria-label"], Mr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Nr = { class: "tpl:flex tpl:items-center" }, Pr = ["aria-label"], Fr = ["value", "aria-label"], Ir = ["aria-label"], Lr = ["aria-label", "title"], Rr = { class: "tpl:flex tpl:items-center" }, zr = ["aria-label"], Br = ["value", "aria-label"], Vr = ["aria-label"], Hr = { class: "tpl:flex tpl:items-center" }, Ur = ["aria-label"], Wr = ["value", "aria-label"], Gr = ["aria-label"], 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)]", Kr = "tpl:w-10 tpl:h-8 tpl:text-center tpl:text-xs tpl:font-medium tpl:border-y tpl:border-x-0 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", qr = /*#__PURE__*/ 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", Tr, [_("label", Er, D(t.label), 1), _("div", Dr, [
|
|
1140
|
+
_("div", Or, [
|
|
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, kr),
|
|
1112
1149
|
_("input", {
|
|
1113
1150
|
type: "number",
|
|
1114
|
-
class: p(
|
|
1151
|
+
class: p(Kr),
|
|
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, Ar),
|
|
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, jr)
|
|
1128
1165
|
]),
|
|
1129
|
-
_("div",
|
|
1130
|
-
_("div",
|
|
1166
|
+
_("div", Mr, [
|
|
1167
|
+
_("div", Nr, [
|
|
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, Pr),
|
|
1139
1176
|
_("input", {
|
|
1140
1177
|
type: "number",
|
|
1141
|
-
class: p(
|
|
1178
|
+
class: p(Kr),
|
|
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, Fr),
|
|
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, Ir)
|
|
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(Dt), {
|
|
1162
1199
|
key: 0,
|
|
1163
1200
|
size: 14,
|
|
1164
1201
|
"stroke-width": 2
|
|
1165
|
-
})) : (e(), C(T(
|
|
1202
|
+
})) : (e(), C(T(St), {
|
|
1166
1203
|
key: 1,
|
|
1167
1204
|
size: 14,
|
|
1168
1205
|
"stroke-width": 2
|
|
1169
|
-
}))], 10,
|
|
1170
|
-
_("div",
|
|
1206
|
+
}))], 10, Lr),
|
|
1207
|
+
_("div", Rr, [
|
|
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, zr),
|
|
1179
1216
|
_("input", {
|
|
1180
1217
|
type: "number",
|
|
1181
|
-
class: p(
|
|
1218
|
+
class: p(Kr),
|
|
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, Br),
|
|
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, Vr)
|
|
1195
1232
|
])
|
|
1196
1233
|
]),
|
|
1197
|
-
_("div",
|
|
1234
|
+
_("div", Hr, [
|
|
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, Ur),
|
|
1206
1243
|
_("input", {
|
|
1207
1244
|
type: "number",
|
|
1208
|
-
class: p(
|
|
1245
|
+
class: p(Kr),
|
|
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, Wr),
|
|
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, Gr)
|
|
1222
1259
|
])
|
|
1223
1260
|
])]));
|
|
1224
1261
|
}
|
|
1225
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1262
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Jr = { class: "tpl:mt-3" }, Yr = /* @__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", Jr, [s(r.$slots, "default")], 512), [[x, n.open]])], 2));
|
|
1243
1280
|
}
|
|
1244
|
-
}),
|
|
1281
|
+
}), Xr = { class: "tpl:space-y-2" }, Zr = ["checked", "onChange"], Qr = { class: "tpl:space-y-2" }, $r = ["value"], ei = { value: "" }, ti = ["label"], ni = ["value"], ri = ["value"], ii = {
|
|
1245
1282
|
key: 0,
|
|
1246
1283
|
value: "__custom__"
|
|
1247
|
-
},
|
|
1284
|
+
}, ai = {
|
|
1248
1285
|
key: 0,
|
|
1249
1286
|
class: "tpl:space-y-2"
|
|
1250
|
-
},
|
|
1287
|
+
}, oi = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, si = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ci = { class: "tpl:flex tpl:justify-end" }, li = ["disabled"], ui = {
|
|
1251
1288
|
key: 0,
|
|
1252
1289
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1253
|
-
},
|
|
1290
|
+
}, di = { class: "tpl:space-y-1" }, fi = { class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]" }, pi = {
|
|
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
|
+
}, mi = /* @__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: Ot,
|
|
1267
1304
|
labelKey: "showOnDesktop"
|
|
1268
1305
|
}, {
|
|
1269
1306
|
key: "mobile",
|
|
1270
|
-
icon:
|
|
1307
|
+
icon: Nt,
|
|
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(Yr, {
|
|
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(qr, {
|
|
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,33 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1333
1370
|
"open",
|
|
1334
1371
|
"no-border"
|
|
1335
1372
|
]),
|
|
1336
|
-
k(
|
|
1373
|
+
k(Yr, {
|
|
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(
|
|
1378
|
+
default: M(() => [_("label", { class: p(T(W)) }, D(T(m).blockSettings.color), 3), k(q, {
|
|
1342
1379
|
size: "large",
|
|
1343
1380
|
"model-value": n.block.styles.backgroundColor || T("#ffffff"),
|
|
1344
|
-
"onUpdate:modelValue": a[2] ||= (e) =>
|
|
1381
|
+
"onUpdate:modelValue": a[2] ||= (e) => te("backgroundColor", e)
|
|
1345
1382
|
}, null, 8, ["model-value"])]),
|
|
1346
1383
|
_: 1
|
|
1347
1384
|
}, 8, ["title", "open"]),
|
|
1348
|
-
k(
|
|
1385
|
+
k(Yr, {
|
|
1349
1386
|
title: T(m).blockSettings.display,
|
|
1350
1387
|
open: S.has("display"),
|
|
1351
1388
|
onToggle: a[4] ||= (e) => N("display")
|
|
1352
1389
|
}, {
|
|
1353
|
-
default: M(() => [_("div",
|
|
1390
|
+
default: M(() => [_("div", Xr, [(e(), v(y, null, o(j, (t) => _("label", {
|
|
1354
1391
|
key: t.key,
|
|
1355
1392
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1356
1393
|
}, [
|
|
1357
1394
|
_("input", {
|
|
1358
1395
|
type: "checkbox",
|
|
1359
1396
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1360
|
-
checked:
|
|
1361
|
-
onChange: (e) =>
|
|
1362
|
-
}, null, 40,
|
|
1397
|
+
checked: R(t.key),
|
|
1398
|
+
onChange: (e) => z(t.key)
|
|
1399
|
+
}, null, 40, Zr),
|
|
1363
1400
|
(e(), C(r(t.icon), {
|
|
1364
1401
|
size: 14,
|
|
1365
1402
|
"stroke-width": 1.5
|
|
@@ -1368,19 +1405,19 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1368
1405
|
])), 64))])]),
|
|
1369
1406
|
_: 1
|
|
1370
1407
|
}, 8, ["title", "open"]),
|
|
1371
|
-
P.value ? (e(), C(
|
|
1408
|
+
P.value ? (e(), C(Yr, {
|
|
1372
1409
|
key: 0,
|
|
1373
1410
|
title: T(m).blockSettings.displayCondition,
|
|
1374
1411
|
open: S.has("condition"),
|
|
1375
1412
|
onToggle: a[8] ||= (e) => N("condition")
|
|
1376
1413
|
}, {
|
|
1377
|
-
default: M(() => [_("div",
|
|
1414
|
+
default: M(() => [_("div", Qr, [_("select", {
|
|
1378
1415
|
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
1416
|
value: w.value || F.value ? "__custom__" : n.block.displayCondition?.label ?? "",
|
|
1380
1417
|
onChange: a[5] ||= (e) => {
|
|
1381
1418
|
let t = e.target.value;
|
|
1382
1419
|
if (t === "__custom__") {
|
|
1383
|
-
|
|
1420
|
+
ee();
|
|
1384
1421
|
return;
|
|
1385
1422
|
}
|
|
1386
1423
|
if (w.value = !1, !t) {
|
|
@@ -1391,48 +1428,48 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1391
1428
|
n && l("update", { displayCondition: n });
|
|
1392
1429
|
}
|
|
1393
1430
|
}, [
|
|
1394
|
-
_("option",
|
|
1395
|
-
(e(!0), v(y, null, o(
|
|
1431
|
+
_("option", ei, D(T(m).blockSettings.noCondition), 1),
|
|
1432
|
+
(e(!0), v(y, null, o(L.value, (t, n) => (e(), v(y, { key: n }, [n ? (e(), v("optgroup", {
|
|
1396
1433
|
key: 0,
|
|
1397
1434
|
label: String(n)
|
|
1398
1435
|
}, [(e(!0), v(y, null, o(t, (t) => (e(), v("option", {
|
|
1399
1436
|
key: t.label,
|
|
1400
1437
|
value: t.label
|
|
1401
|
-
}, D(t.label), 9,
|
|
1438
|
+
}, D(t.label), 9, ni))), 128))], 8, ti)) : (e(!0), v(y, { key: 1 }, o(t, (t) => (e(), v("option", {
|
|
1402
1439
|
key: t.label,
|
|
1403
1440
|
value: t.label
|
|
1404
|
-
}, D(t.label), 9,
|
|
1405
|
-
T(x) ? (e(), v("option",
|
|
1406
|
-
], 42,
|
|
1407
|
-
_("div", null, [_("label",
|
|
1441
|
+
}, D(t.label), 9, ri))), 128))], 64))), 128)),
|
|
1442
|
+
T(x) ? (e(), v("option", ii, D(T(m).blockSettings.customCondition), 1)) : b("", !0)
|
|
1443
|
+
], 42, $r), w.value || F.value ? (e(), v("div", ai, [
|
|
1444
|
+
_("div", null, [_("label", oi, D(T(m).blockSettings.customConditionBefore), 1), t(_("textarea", {
|
|
1408
1445
|
"onUpdate:modelValue": a[6] ||= (e) => E.value = e,
|
|
1409
1446
|
rows: "2",
|
|
1410
|
-
class: p(T(
|
|
1447
|
+
class: p(T(_t))
|
|
1411
1448
|
}, null, 2), [[f, E.value]])]),
|
|
1412
|
-
_("div", null, [_("label",
|
|
1449
|
+
_("div", null, [_("label", si, D(T(m).blockSettings.customConditionAfter), 1), t(_("textarea", {
|
|
1413
1450
|
"onUpdate:modelValue": a[7] ||= (e) => O.value = e,
|
|
1414
1451
|
rows: "2",
|
|
1415
|
-
class: p(T(
|
|
1452
|
+
class: p(T(_t))
|
|
1416
1453
|
}, null, 2), [[f, O.value]])]),
|
|
1417
|
-
_("div",
|
|
1454
|
+
_("div", ci, [_("button", {
|
|
1418
1455
|
type: "button",
|
|
1419
1456
|
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
1457
|
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",
|
|
1458
|
+
onClick: I
|
|
1459
|
+
}, D(T(m).blockSettings.applyCondition), 9, li)])
|
|
1460
|
+
])) : n.block.displayCondition && !F.value ? (e(), v(y, { key: 1 }, [n.block.displayCondition.description ? (e(), v("p", ui, D(n.block.displayCondition.description), 1)) : b("", !0), _("div", di, [_("pre", fi, D(n.block.displayCondition.before), 1), n.block.displayCondition.after ? (e(), v("pre", pi, D(n.block.displayCondition.after), 1)) : b("", !0)])], 64)) : b("", !0)])]),
|
|
1424
1461
|
_: 1
|
|
1425
1462
|
}, 8, ["title", "open"])) : b("", !0)
|
|
1426
1463
|
], 2));
|
|
1427
1464
|
}
|
|
1428
|
-
}),
|
|
1465
|
+
}), hi = ["title"], gi = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, _i = {
|
|
1429
1466
|
key: 1,
|
|
1430
1467
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1431
|
-
},
|
|
1468
|
+
}, vi = [
|
|
1432
1469
|
"aria-checked",
|
|
1433
1470
|
"aria-label",
|
|
1434
1471
|
"disabled"
|
|
1435
|
-
],
|
|
1472
|
+
], yi = /* @__PURE__ */ m({
|
|
1436
1473
|
__name: "BooleanField",
|
|
1437
1474
|
props: {
|
|
1438
1475
|
field: {},
|
|
@@ -1441,18 +1478,18 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1441
1478
|
},
|
|
1442
1479
|
emits: ["update:modelValue"],
|
|
1443
1480
|
setup(t, { emit: n }) {
|
|
1444
|
-
let r = n, { t: i } =
|
|
1481
|
+
let r = n, { t: i } = V();
|
|
1445
1482
|
return (n, a) => (e(), v("div", {
|
|
1446
1483
|
class: "tpl:mb-3.5",
|
|
1447
1484
|
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",
|
|
1485
|
+
}, [_("label", { class: p(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", t.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [_("span", gi, [
|
|
1449
1486
|
d(D(t.field.label) + " ", 1),
|
|
1450
|
-
t.readOnly ? (e(), C(T(
|
|
1487
|
+
t.readOnly ? (e(), C(T(Dt), {
|
|
1451
1488
|
key: 0,
|
|
1452
1489
|
size: 12,
|
|
1453
1490
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1454
1491
|
})) : b("", !0),
|
|
1455
|
-
t.field.required ? (e(), v("span",
|
|
1492
|
+
t.field.required ? (e(), v("span", _i, " * ")) : b("", !0)
|
|
1456
1493
|
]), _("button", {
|
|
1457
1494
|
type: "button",
|
|
1458
1495
|
role: "switch",
|
|
@@ -1465,12 +1502,12 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1465
1502
|
]),
|
|
1466
1503
|
disabled: t.readOnly,
|
|
1467
1504
|
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,
|
|
1505
|
+
}, [_("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, vi)], 2)], 8, hi));
|
|
1469
1506
|
}
|
|
1470
|
-
}),
|
|
1507
|
+
}), bi = { class: "tpl:mb-3.5" }, xi = {
|
|
1471
1508
|
key: 1,
|
|
1472
1509
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1473
|
-
},
|
|
1510
|
+
}, Si = /* @__PURE__ */ m({
|
|
1474
1511
|
__name: "FieldWrapper",
|
|
1475
1512
|
props: {
|
|
1476
1513
|
label: {},
|
|
@@ -1478,17 +1515,17 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1478
1515
|
readOnly: { type: Boolean }
|
|
1479
1516
|
},
|
|
1480
1517
|
setup(t) {
|
|
1481
|
-
return (n, r) => (e(), v("div",
|
|
1518
|
+
return (n, r) => (e(), v("div", bi, [_("label", { class: p(T(W)) }, [
|
|
1482
1519
|
d(D(t.label) + " ", 1),
|
|
1483
|
-
t.readOnly ? (e(), C(T(
|
|
1520
|
+
t.readOnly ? (e(), C(T(Dt), {
|
|
1484
1521
|
key: 0,
|
|
1485
1522
|
size: 12,
|
|
1486
1523
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1487
1524
|
})) : b("", !0),
|
|
1488
|
-
t.required ? (e(), v("span",
|
|
1525
|
+
t.required ? (e(), v("span", xi, "*")) : b("", !0)
|
|
1489
1526
|
], 2), s(n.$slots, "default")]));
|
|
1490
1527
|
}
|
|
1491
|
-
}),
|
|
1528
|
+
}), Ci = /* @__PURE__ */ m({
|
|
1492
1529
|
__name: "ColorField",
|
|
1493
1530
|
props: {
|
|
1494
1531
|
field: {},
|
|
@@ -1497,13 +1534,13 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1497
1534
|
},
|
|
1498
1535
|
emits: ["update:modelValue"],
|
|
1499
1536
|
setup(t, { emit: n }) {
|
|
1500
|
-
let r = n, { t: i } =
|
|
1501
|
-
return (n, a) => (e(), C(
|
|
1537
|
+
let r = n, { t: i } = V();
|
|
1538
|
+
return (n, a) => (e(), C(Si, {
|
|
1502
1539
|
label: t.field.label,
|
|
1503
1540
|
required: t.field.required,
|
|
1504
1541
|
"read-only": t.readOnly
|
|
1505
1542
|
}, {
|
|
1506
|
-
default: M(() => [k(
|
|
1543
|
+
default: M(() => [k(q, {
|
|
1507
1544
|
"model-value": t.modelValue || T("#000000"),
|
|
1508
1545
|
placeholder: t.field.placeholder || T("#000000"),
|
|
1509
1546
|
disabled: t.readOnly,
|
|
@@ -1522,11 +1559,11 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1522
1559
|
"read-only"
|
|
1523
1560
|
]));
|
|
1524
1561
|
}
|
|
1525
|
-
}),
|
|
1562
|
+
}), wi = [
|
|
1526
1563
|
"value",
|
|
1527
1564
|
"placeholder",
|
|
1528
1565
|
"title"
|
|
1529
|
-
],
|
|
1566
|
+
], Ti = ["value", "placeholder"], Ei = /* @__PURE__ */ m({
|
|
1530
1567
|
__name: "ImageField",
|
|
1531
1568
|
props: {
|
|
1532
1569
|
field: {},
|
|
@@ -1535,12 +1572,12 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1535
1572
|
},
|
|
1536
1573
|
emits: ["update:modelValue"],
|
|
1537
1574
|
setup(t, { emit: n }) {
|
|
1538
|
-
let r = n, { t: i } =
|
|
1575
|
+
let r = n, { t: i } = V(), a = A(Oe, null), o = ft(), s = g(() => !!a);
|
|
1539
1576
|
async function c() {
|
|
1540
1577
|
let e = await a?.({ accept: ["images"] });
|
|
1541
1578
|
o.alive && e && r("update:modelValue", e.url);
|
|
1542
1579
|
}
|
|
1543
|
-
return (n, a) => (e(), C(
|
|
1580
|
+
return (n, a) => (e(), C(Si, {
|
|
1544
1581
|
label: t.field.label,
|
|
1545
1582
|
required: t.field.required,
|
|
1546
1583
|
"read-only": t.readOnly
|
|
@@ -1548,23 +1585,23 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1548
1585
|
default: M(() => [t.readOnly ? (e(), v("input", {
|
|
1549
1586
|
key: 0,
|
|
1550
1587
|
type: "url",
|
|
1551
|
-
class: p([T(
|
|
1588
|
+
class: p([T(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1552
1589
|
value: t.modelValue,
|
|
1553
1590
|
placeholder: t.field.placeholder || "https://...",
|
|
1554
1591
|
disabled: "",
|
|
1555
1592
|
title: T(i).customBlocks.dataSource.readOnlyTooltip
|
|
1556
|
-
}, null, 10,
|
|
1593
|
+
}, null, 10, wi)) : (e(), v("input", {
|
|
1557
1594
|
key: 1,
|
|
1558
1595
|
type: "url",
|
|
1559
|
-
class: p(T(
|
|
1596
|
+
class: p(T(U)),
|
|
1560
1597
|
value: t.modelValue,
|
|
1561
1598
|
placeholder: t.field.placeholder || "https://...",
|
|
1562
1599
|
onInput: a[0] ||= (e) => r("update:modelValue", e.target.value)
|
|
1563
|
-
}, null, 42,
|
|
1600
|
+
}, null, 42, Ti)), s.value && !t.readOnly ? (e(), v("button", {
|
|
1564
1601
|
key: 2,
|
|
1565
1602
|
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
1603
|
onClick: a[1] ||= (e) => c()
|
|
1567
|
-
}, [k(T(
|
|
1604
|
+
}, [k(T(he), {
|
|
1568
1605
|
size: 14,
|
|
1569
1606
|
"stroke-width": 1.5
|
|
1570
1607
|
}), d(" " + D(T(i).image.browseMedia), 1)])) : b("", !0)]),
|
|
@@ -1575,7 +1612,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1575
1612
|
"read-only"
|
|
1576
1613
|
]));
|
|
1577
1614
|
}
|
|
1578
|
-
}),
|
|
1615
|
+
}), Di = [
|
|
1579
1616
|
"value",
|
|
1580
1617
|
"placeholder",
|
|
1581
1618
|
"min",
|
|
@@ -1583,7 +1620,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1583
1620
|
"step",
|
|
1584
1621
|
"disabled",
|
|
1585
1622
|
"title"
|
|
1586
|
-
],
|
|
1623
|
+
], Oi = /* @__PURE__ */ m({
|
|
1587
1624
|
__name: "NumberField",
|
|
1588
1625
|
props: {
|
|
1589
1626
|
field: {},
|
|
@@ -1592,15 +1629,15 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1592
1629
|
},
|
|
1593
1630
|
emits: ["update:modelValue"],
|
|
1594
1631
|
setup(t, { emit: n }) {
|
|
1595
|
-
let r = n, { t: i } =
|
|
1596
|
-
return (n, a) => (e(), C(
|
|
1632
|
+
let r = n, { t: i } = V();
|
|
1633
|
+
return (n, a) => (e(), C(Si, {
|
|
1597
1634
|
label: t.field.label,
|
|
1598
1635
|
required: t.field.required,
|
|
1599
1636
|
"read-only": t.readOnly
|
|
1600
1637
|
}, {
|
|
1601
1638
|
default: M(() => [_("input", {
|
|
1602
1639
|
type: "number",
|
|
1603
|
-
class: p([T(
|
|
1640
|
+
class: p([T(U), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1604
1641
|
value: t.modelValue,
|
|
1605
1642
|
placeholder: t.field.placeholder,
|
|
1606
1643
|
min: t.field.min,
|
|
@@ -1609,7 +1646,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1609
1646
|
disabled: t.readOnly,
|
|
1610
1647
|
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1611
1648
|
onInput: a[0] ||= (e) => !t.readOnly && r("update:modelValue", Number(e.target.value))
|
|
1612
|
-
}, null, 42,
|
|
1649
|
+
}, null, 42, Di)]),
|
|
1613
1650
|
_: 1
|
|
1614
1651
|
}, 8, [
|
|
1615
1652
|
"label",
|
|
@@ -1617,10 +1654,10 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1617
1654
|
"read-only"
|
|
1618
1655
|
]));
|
|
1619
1656
|
}
|
|
1620
|
-
}),
|
|
1657
|
+
}), ki = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ai = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, ji = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Mi = ["title", "onClick"], Ni = {
|
|
1621
1658
|
key: 1,
|
|
1622
1659
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1623
|
-
},
|
|
1660
|
+
}, Pi = /* @__PURE__ */ m({
|
|
1624
1661
|
__name: "RepeatableField",
|
|
1625
1662
|
props: {
|
|
1626
1663
|
field: {},
|
|
@@ -1629,7 +1666,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1629
1666
|
},
|
|
1630
1667
|
emits: ["update:modelValue"],
|
|
1631
1668
|
setup(t, { emit: n }) {
|
|
1632
|
-
let i = t, a = n, { t: s } =
|
|
1669
|
+
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
1670
|
function f() {
|
|
1634
1671
|
if (!l.value || i.readOnly) return;
|
|
1635
1672
|
let e = {};
|
|
@@ -1647,25 +1684,25 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1647
1684
|
[t]: n
|
|
1648
1685
|
} : r));
|
|
1649
1686
|
}
|
|
1650
|
-
return (n, i) => (e(), C(
|
|
1687
|
+
return (n, i) => (e(), C(Si, {
|
|
1651
1688
|
label: t.field.label,
|
|
1652
1689
|
required: t.field.required,
|
|
1653
1690
|
"read-only": t.readOnly
|
|
1654
1691
|
}, {
|
|
1655
|
-
default: M(() => [_("div",
|
|
1692
|
+
default: M(() => [_("div", ki, [
|
|
1656
1693
|
(e(!0), v(y, null, o(c.value, (n, i) => (e(), v("div", {
|
|
1657
1694
|
key: `${t.field.key}-${i}`,
|
|
1658
1695
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1659
|
-
}, [_("div",
|
|
1696
|
+
}, [_("div", Ai, [_("span", ji, " #" + D(i + 1), 1), u.value && !t.readOnly ? (e(), v("button", {
|
|
1660
1697
|
key: 0,
|
|
1661
1698
|
type: "button",
|
|
1662
1699
|
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
1700
|
title: T(s).customBlocks.fields.removeItem,
|
|
1664
1701
|
onClick: (e) => m(i)
|
|
1665
|
-
}, [k(T(
|
|
1702
|
+
}, [k(T(st), {
|
|
1666
1703
|
size: 12,
|
|
1667
1704
|
"stroke-width": 2
|
|
1668
|
-
})], 8,
|
|
1705
|
+
})], 8, Mi)) : b("", !0)]), (e(!0), v(y, null, o(t.field.fields, (a) => (e(), C(r(T(Ui)(a.type)), {
|
|
1669
1706
|
key: a.key,
|
|
1670
1707
|
field: a,
|
|
1671
1708
|
"model-value": n[a.key],
|
|
@@ -1680,13 +1717,13 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1680
1717
|
l.value && !t.readOnly ? (e(), v("button", {
|
|
1681
1718
|
key: 0,
|
|
1682
1719
|
type: "button",
|
|
1683
|
-
class: p(T(
|
|
1720
|
+
class: p(T(gt)),
|
|
1684
1721
|
onClick: f
|
|
1685
|
-
}, [k(T(
|
|
1722
|
+
}, [k(T(X), {
|
|
1686
1723
|
size: 14,
|
|
1687
1724
|
"stroke-width": 2
|
|
1688
1725
|
}), d(" " + D(T(s).customBlocks.fields.addItem), 1)], 2)) : b("", !0),
|
|
1689
|
-
!l.value && !t.readOnly ? (e(), v("p",
|
|
1726
|
+
!l.value && !t.readOnly ? (e(), v("p", Ni, D(T(s).customBlocks.fields.maxItemsReached), 1)) : b("", !0)
|
|
1690
1727
|
])]),
|
|
1691
1728
|
_: 1
|
|
1692
1729
|
}, 8, [
|
|
@@ -1695,11 +1732,11 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1695
1732
|
"read-only"
|
|
1696
1733
|
]));
|
|
1697
1734
|
}
|
|
1698
|
-
}),
|
|
1735
|
+
}), Fi = [
|
|
1699
1736
|
"value",
|
|
1700
1737
|
"disabled",
|
|
1701
1738
|
"title"
|
|
1702
|
-
],
|
|
1739
|
+
], Ii = ["value"], Li = /* @__PURE__ */ m({
|
|
1703
1740
|
__name: "SelectField",
|
|
1704
1741
|
props: {
|
|
1705
1742
|
field: {},
|
|
@@ -1708,14 +1745,14 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1708
1745
|
},
|
|
1709
1746
|
emits: ["update:modelValue"],
|
|
1710
1747
|
setup(t, { emit: n }) {
|
|
1711
|
-
let r = n, { t: i } =
|
|
1712
|
-
return (n, a) => (e(), C(
|
|
1748
|
+
let r = n, { t: i } = V();
|
|
1749
|
+
return (n, a) => (e(), C(Si, {
|
|
1713
1750
|
label: t.field.label,
|
|
1714
1751
|
required: t.field.required,
|
|
1715
1752
|
"read-only": t.readOnly
|
|
1716
1753
|
}, {
|
|
1717
1754
|
default: M(() => [_("select", {
|
|
1718
|
-
class: p([T(
|
|
1755
|
+
class: p([T(U), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1719
1756
|
value: t.modelValue,
|
|
1720
1757
|
disabled: t.readOnly,
|
|
1721
1758
|
title: t.readOnly ? T(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
@@ -1723,7 +1760,7 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1723
1760
|
}, [(e(!0), v(y, null, o(t.field.options, (t) => (e(), v("option", {
|
|
1724
1761
|
key: t.value,
|
|
1725
1762
|
value: t.value
|
|
1726
|
-
}, D(t.label), 9,
|
|
1763
|
+
}, D(t.label), 9, Ii))), 128))], 42, Fi)]),
|
|
1727
1764
|
_: 1
|
|
1728
1765
|
}, 8, [
|
|
1729
1766
|
"label",
|
|
@@ -1731,11 +1768,11 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1731
1768
|
"read-only"
|
|
1732
1769
|
]));
|
|
1733
1770
|
}
|
|
1734
|
-
}),
|
|
1771
|
+
}), Ri = [
|
|
1735
1772
|
"value",
|
|
1736
1773
|
"placeholder",
|
|
1737
1774
|
"title"
|
|
1738
|
-
],
|
|
1775
|
+
], zi = /* @__PURE__ */ m({
|
|
1739
1776
|
__name: "TextField",
|
|
1740
1777
|
props: {
|
|
1741
1778
|
field: {},
|
|
@@ -1744,8 +1781,8 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1744
1781
|
},
|
|
1745
1782
|
emits: ["update:modelValue"],
|
|
1746
1783
|
setup(t, { emit: n }) {
|
|
1747
|
-
let r = n, { t: i } =
|
|
1748
|
-
return (n, a) => (e(), C(
|
|
1784
|
+
let r = n, { t: i } = V();
|
|
1785
|
+
return (n, a) => (e(), C(Si, {
|
|
1749
1786
|
label: t.field.label,
|
|
1750
1787
|
required: t.field.required,
|
|
1751
1788
|
"read-only": t.readOnly
|
|
@@ -1753,12 +1790,12 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1753
1790
|
default: M(() => [t.readOnly ? (e(), v("input", {
|
|
1754
1791
|
key: 0,
|
|
1755
1792
|
type: "text",
|
|
1756
|
-
class: p([T(
|
|
1793
|
+
class: p([T(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1757
1794
|
value: t.modelValue,
|
|
1758
1795
|
placeholder: t.field.placeholder,
|
|
1759
1796
|
disabled: "",
|
|
1760
1797
|
title: T(i).customBlocks.dataSource.readOnlyTooltip
|
|
1761
|
-
}, null, 10,
|
|
1798
|
+
}, null, 10, Ri)) : (e(), C(Z, {
|
|
1762
1799
|
key: 1,
|
|
1763
1800
|
"model-value": t.modelValue,
|
|
1764
1801
|
placeholder: t.field.placeholder,
|
|
@@ -1771,12 +1808,12 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1771
1808
|
"read-only"
|
|
1772
1809
|
]));
|
|
1773
1810
|
}
|
|
1774
|
-
}),
|
|
1811
|
+
}), Bi = [
|
|
1775
1812
|
"value",
|
|
1776
1813
|
"placeholder",
|
|
1777
1814
|
"title"
|
|
1778
|
-
],
|
|
1779
|
-
text:
|
|
1815
|
+
], Vi = "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", Hi = {
|
|
1816
|
+
text: zi,
|
|
1780
1817
|
textarea: /* @__PURE__ */ m({
|
|
1781
1818
|
__name: "TextareaField",
|
|
1782
1819
|
props: {
|
|
@@ -1786,8 +1823,8 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1786
1823
|
},
|
|
1787
1824
|
emits: ["update:modelValue"],
|
|
1788
1825
|
setup(t, { emit: n }) {
|
|
1789
|
-
let r = n, { t: i } =
|
|
1790
|
-
return (n, a) => (e(), C(
|
|
1826
|
+
let r = n, { t: i } = V();
|
|
1827
|
+
return (n, a) => (e(), C(Si, {
|
|
1791
1828
|
label: t.field.label,
|
|
1792
1829
|
required: t.field.required,
|
|
1793
1830
|
"read-only": t.readOnly
|
|
@@ -1799,8 +1836,8 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1799
1836
|
rows: "3",
|
|
1800
1837
|
disabled: "",
|
|
1801
1838
|
title: T(i).customBlocks.dataSource.readOnlyTooltip,
|
|
1802
|
-
class: p(
|
|
1803
|
-
}, null, 8,
|
|
1839
|
+
class: p(Vi)
|
|
1840
|
+
}, null, 8, Bi)) : (e(), C(xn, {
|
|
1804
1841
|
key: 1,
|
|
1805
1842
|
"model-value": t.modelValue,
|
|
1806
1843
|
placeholder: t.field.placeholder,
|
|
@@ -1814,42 +1851,42 @@ var on = ["aria-label", "onKeydown"], sn = ["data-tooltip"], cn = ["data-tooltip
|
|
|
1814
1851
|
]));
|
|
1815
1852
|
}
|
|
1816
1853
|
}),
|
|
1817
|
-
image:
|
|
1818
|
-
color:
|
|
1819
|
-
number:
|
|
1820
|
-
select:
|
|
1821
|
-
boolean:
|
|
1822
|
-
repeatable:
|
|
1854
|
+
image: Ei,
|
|
1855
|
+
color: Ci,
|
|
1856
|
+
number: Oi,
|
|
1857
|
+
select: Li,
|
|
1858
|
+
boolean: yi,
|
|
1859
|
+
repeatable: Pi
|
|
1823
1860
|
};
|
|
1824
|
-
function
|
|
1825
|
-
return
|
|
1861
|
+
function Ui(e) {
|
|
1862
|
+
return Hi[e] ?? zi;
|
|
1826
1863
|
}
|
|
1827
1864
|
//#endregion
|
|
1828
1865
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1829
|
-
var
|
|
1866
|
+
var Wi = {
|
|
1830
1867
|
key: 0,
|
|
1831
1868
|
class: "tpl:p-4"
|
|
1832
|
-
},
|
|
1869
|
+
}, Gi = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ki = { key: 1 }, qi = {
|
|
1833
1870
|
key: 0,
|
|
1834
1871
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1835
|
-
},
|
|
1872
|
+
}, Ji = {
|
|
1836
1873
|
key: 1,
|
|
1837
1874
|
class: "tpl:mb-4"
|
|
1838
|
-
},
|
|
1875
|
+
}, Yi = {
|
|
1839
1876
|
key: 1,
|
|
1840
1877
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1841
|
-
},
|
|
1878
|
+
}, Xi = {
|
|
1842
1879
|
key: 0,
|
|
1843
1880
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1844
|
-
},
|
|
1881
|
+
}, Zi = {
|
|
1845
1882
|
key: 2,
|
|
1846
1883
|
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
|
-
},
|
|
1884
|
+
}, Qi = /* @__PURE__ */ m({
|
|
1848
1885
|
__name: "CustomBlockToolbar",
|
|
1849
1886
|
props: { block: {} },
|
|
1850
1887
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1851
1888
|
setup(t, { emit: n }) {
|
|
1852
|
-
let i = t, a = n, { t: s } =
|
|
1889
|
+
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
1890
|
definition: l,
|
|
1854
1891
|
block: g(() => i.block),
|
|
1855
1892
|
onUpdate: (e, t) => {
|
|
@@ -1865,23 +1902,23 @@ var Li = {
|
|
|
1865
1902
|
[e]: t
|
|
1866
1903
|
});
|
|
1867
1904
|
}
|
|
1868
|
-
return (n, i) => l.value ? (e(), v("div",
|
|
1869
|
-
l.value.description ? (e(), v("p",
|
|
1870
|
-
T(m) ? (e(), v("div",
|
|
1905
|
+
return (n, i) => l.value ? (e(), v("div", Ki, [
|
|
1906
|
+
l.value.description ? (e(), v("p", qi, D(l.value.description), 1)) : b("", !0),
|
|
1907
|
+
T(m) ? (e(), v("div", Ji, [T(h) && !T(u) ? (e(), v("button", {
|
|
1871
1908
|
key: 0,
|
|
1872
1909
|
type: "button",
|
|
1873
1910
|
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
1911
|
onClick: i[0] ||= (...e) => T(p) && T(p)(...e)
|
|
1875
|
-
}, D(l.value?.dataSource?.label || T(s).customBlocks.dataSource.fetchButton), 1)) : (e(), v("div",
|
|
1912
|
+
}, D(l.value?.dataSource?.label || T(s).customBlocks.dataSource.fetchButton), 1)) : (e(), v("div", Yi, [T(u) ? (e(), v("div", Xi, D(T(s).customBlocks.dataSource.fetching), 1)) : (e(), v("button", {
|
|
1876
1913
|
key: 1,
|
|
1877
1914
|
type: "button",
|
|
1878
1915
|
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
1916
|
onClick: i[1] ||= (...e) => T(p) && T(p)(...e)
|
|
1880
|
-
}, [k(T(
|
|
1917
|
+
}, [k(T(nt), { size: 12 }), d(" " + D(T(s).customBlocks.dataSource.changeButton), 1)]))])), T(f) ? (e(), v("p", Zi, [k(T(Ge), {
|
|
1881
1918
|
size: 14,
|
|
1882
1919
|
class: "tpl:shrink-0"
|
|
1883
1920
|
}), 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(
|
|
1921
|
+
(e(!0), v(y, null, o(l.value.fields, (n) => (e(), C(r(T(Ui)(n.type)), {
|
|
1885
1922
|
key: n.key,
|
|
1886
1923
|
field: n,
|
|
1887
1924
|
"model-value": t.block.fieldValues[n.key],
|
|
@@ -1893,19 +1930,19 @@ var Li = {
|
|
|
1893
1930
|
"read-only",
|
|
1894
1931
|
"onUpdate:modelValue"
|
|
1895
1932
|
]))), 128))
|
|
1896
|
-
])) : (e(), v("div",
|
|
1933
|
+
])) : (e(), v("div", Wi, [_("p", Gi, D(T(s).customBlocks.toolbar.noDefinition), 1)]));
|
|
1897
1934
|
}
|
|
1898
|
-
}),
|
|
1935
|
+
}), $i = { class: "tpl:mb-3.5" }, ea = { class: "tpl:mb-3.5" }, ta = { class: "tpl:mb-3.5" }, na = { class: "tpl:flex tpl:items-stretch" }, ra = ["value"], ia = /* @__PURE__ */ m({
|
|
1899
1936
|
__name: "DividerToolbar",
|
|
1900
1937
|
props: { block: {} },
|
|
1901
1938
|
emits: ["update"],
|
|
1902
1939
|
setup(t, { emit: n }) {
|
|
1903
|
-
let r = n, { t: i } =
|
|
1940
|
+
let r = n, { t: i } = V();
|
|
1904
1941
|
function a(e, t) {
|
|
1905
1942
|
r("update", { [e]: t });
|
|
1906
1943
|
}
|
|
1907
1944
|
return (n, r) => (e(), v(y, null, [
|
|
1908
|
-
_("div",
|
|
1945
|
+
_("div", $i, [_("label", { class: p(T(W)) }, D(T(i).divider.style), 3), k(Y, {
|
|
1909
1946
|
options: [
|
|
1910
1947
|
{
|
|
1911
1948
|
value: "solid",
|
|
@@ -1923,77 +1960,99 @@ var Li = {
|
|
|
1923
1960
|
"model-value": t.block.lineStyle,
|
|
1924
1961
|
"onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
|
|
1925
1962
|
}, null, 8, ["options", "model-value"])]),
|
|
1926
|
-
_("div",
|
|
1963
|
+
_("div", ea, [_("label", { class: p(T(W)) }, D(T(i).divider.color), 3), k(q, {
|
|
1927
1964
|
"model-value": t.block.color,
|
|
1928
1965
|
"onUpdate:modelValue": r[1] ||= (e) => a("color", e)
|
|
1929
1966
|
}, null, 8, ["model-value"])]),
|
|
1930
|
-
_("div",
|
|
1967
|
+
_("div", ta, [_("label", { class: p(T(W)) }, D(T(i).divider.thickness), 3), _("div", na, [_("input", {
|
|
1931
1968
|
type: "number",
|
|
1932
|
-
class: p(T(
|
|
1969
|
+
class: p(T(K)),
|
|
1933
1970
|
value: t.block.thickness,
|
|
1934
1971
|
min: "1",
|
|
1935
1972
|
max: "10",
|
|
1936
1973
|
onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
|
|
1937
|
-
}, null, 42,
|
|
1974
|
+
}, null, 42, ra), _("span", { class: p(T(G)) }, "px", 2)])])
|
|
1938
1975
|
], 64));
|
|
1939
1976
|
}
|
|
1940
|
-
}),
|
|
1977
|
+
}), aa = { class: "tpl:mb-3.5" }, oa = ["value"], sa = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, ca = /* @__PURE__ */ m({
|
|
1941
1978
|
__name: "HtmlToolbar",
|
|
1942
1979
|
props: { block: {} },
|
|
1943
1980
|
emits: ["update"],
|
|
1944
1981
|
setup(t, { emit: n }) {
|
|
1945
|
-
let r = n, { t: i } =
|
|
1946
|
-
return (n, a) => (e(), v("div",
|
|
1947
|
-
_("label", { class: p(T(
|
|
1982
|
+
let r = n, { t: i } = V();
|
|
1983
|
+
return (n, a) => (e(), v("div", aa, [
|
|
1984
|
+
_("label", { class: p(T(W)) }, D(T(i).html.content), 3),
|
|
1948
1985
|
_("textarea", {
|
|
1949
1986
|
value: t.block.content,
|
|
1950
1987
|
placeholder: "<div>...</div>",
|
|
1951
1988
|
rows: "10",
|
|
1952
|
-
class: p(T(
|
|
1989
|
+
class: p(T(_t)),
|
|
1953
1990
|
onInput: a[0] ||= (e) => r("update", { content: e.target.value })
|
|
1954
|
-
}, null, 42,
|
|
1955
|
-
_("p",
|
|
1991
|
+
}, null, 42, oa),
|
|
1992
|
+
_("p", sa, [k(T(it), {
|
|
1956
1993
|
size: 12,
|
|
1957
1994
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
1958
1995
|
}), d(" " + D(T(i).html.sanitizationHint), 1)])
|
|
1959
1996
|
]));
|
|
1960
1997
|
}
|
|
1961
|
-
}),
|
|
1998
|
+
}), la = { class: "tpl:mb-3.5" }, ua = {
|
|
1962
1999
|
key: 0,
|
|
1963
2000
|
class: "tpl:mb-3.5"
|
|
1964
|
-
},
|
|
2001
|
+
}, da = ["value", "placeholder"], fa = { class: "tpl:mb-3.5" }, pa = { class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]" }, ma = ["checked"], ha = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, ga = { class: "tpl:mb-3.5" }, _a = ["value"], va = { value: "full" }, ya = { value: "custom" }, ba = {
|
|
2002
|
+
key: 0,
|
|
2003
|
+
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2004
|
+
}, xa = ["value"], Sa = { class: "tpl:mb-3.5" }, Ca = { class: "tpl:mb-3.5" }, wa = {
|
|
1965
2005
|
key: 0,
|
|
1966
2006
|
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
|
-
},
|
|
2007
|
+
}, Ta = ["checked"], Ea = 350, Da = /* @__PURE__ */ m({
|
|
1968
2008
|
__name: "ImageToolbar",
|
|
1969
2009
|
props: { block: {} },
|
|
1970
2010
|
emits: ["update"],
|
|
1971
2011
|
setup(t, { emit: n }) {
|
|
1972
|
-
let r = n, { t:
|
|
1973
|
-
|
|
1974
|
-
}, 1e3, { immediate: !1 })
|
|
1975
|
-
|
|
1976
|
-
|
|
2012
|
+
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(() => {
|
|
2013
|
+
f.value = !1;
|
|
2014
|
+
}, 1e3, { immediate: !1 }), x = [
|
|
2015
|
+
300,
|
|
2016
|
+
400,
|
|
2017
|
+
500
|
|
2018
|
+
], S = g(() => {
|
|
2019
|
+
let e = r.block.width;
|
|
2020
|
+
return e === "full" ? "full" : x.includes(e) ? String(e) : "custom";
|
|
2021
|
+
});
|
|
2022
|
+
function C(e, t) {
|
|
2023
|
+
i("update", { [e]: t });
|
|
1977
2024
|
}
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2025
|
+
function w(e) {
|
|
2026
|
+
if (e === "custom") {
|
|
2027
|
+
let e = r.block.width;
|
|
2028
|
+
(typeof e != "number" || x.includes(e)) && C("width", Ea);
|
|
2029
|
+
return;
|
|
2030
|
+
}
|
|
2031
|
+
C("width", e === "full" ? "full" : Number(e));
|
|
2032
|
+
}
|
|
2033
|
+
function E(e) {
|
|
2034
|
+
let t = Number(e);
|
|
2035
|
+
!Number.isFinite(t) || t <= 0 || C("width", t);
|
|
2036
|
+
}
|
|
2037
|
+
async function O() {
|
|
2038
|
+
let e = await o?.({ accept: ["images"] });
|
|
2039
|
+
c.alive && e && (C("src", e.url), e.alt && (C("alt", e.alt), m.value = !0), f.value = !0, h());
|
|
1981
2040
|
}
|
|
1982
2041
|
return (n, r) => (e(), v(y, null, [
|
|
1983
|
-
_("div",
|
|
1984
|
-
_("label", { class: p(T(
|
|
1985
|
-
k(
|
|
2042
|
+
_("div", la, [
|
|
2043
|
+
_("label", { class: p(T(W)) }, D(T(a).image.imageUrl), 3),
|
|
2044
|
+
k(Z, {
|
|
1986
2045
|
"model-value": t.block.src,
|
|
1987
2046
|
type: "url",
|
|
1988
|
-
placeholder: T(
|
|
1989
|
-
pulse:
|
|
1990
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
2047
|
+
placeholder: T(a).image.imageUrlPlaceholder,
|
|
2048
|
+
pulse: f.value,
|
|
2049
|
+
"onUpdate:modelValue": r[0] ||= (e) => C("src", e)
|
|
1991
2050
|
}, null, 8, [
|
|
1992
2051
|
"model-value",
|
|
1993
2052
|
"placeholder",
|
|
1994
2053
|
"pulse"
|
|
1995
2054
|
]),
|
|
1996
|
-
|
|
2055
|
+
l.value ? (e(), v("button", {
|
|
1997
2056
|
key: 0,
|
|
1998
2057
|
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
2058
|
style: {
|
|
@@ -2001,91 +2060,102 @@ var Li = {
|
|
|
2001
2060
|
color: "var(--tpl-primary)",
|
|
2002
2061
|
"background-color": "var(--tpl-bg)"
|
|
2003
2062
|
},
|
|
2004
|
-
onClick:
|
|
2005
|
-
}, [k(T(
|
|
2063
|
+
onClick: O
|
|
2064
|
+
}, [k(T(he), {
|
|
2006
2065
|
size: 14,
|
|
2007
2066
|
"stroke-width": 1.5
|
|
2008
|
-
}), d(" " + D(T(
|
|
2067
|
+
}), d(" " + D(T(a).image.browseMedia), 1)])) : b("", !0)
|
|
2009
2068
|
]),
|
|
2010
|
-
T(
|
|
2069
|
+
T(ee)(t.block.src, T(s)) ? (e(), v("div", ua, [_("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
2070
|
type: "url",
|
|
2012
|
-
class: p(T(
|
|
2071
|
+
class: p(T(U)),
|
|
2013
2072
|
value: t.block.placeholderUrl || "",
|
|
2014
|
-
placeholder: T(
|
|
2015
|
-
onInput: r[1] ||= (e) =>
|
|
2016
|
-
}, null, 42,
|
|
2017
|
-
_("div",
|
|
2018
|
-
_("label", { class: p(T(
|
|
2019
|
-
k(
|
|
2073
|
+
placeholder: T(a).image.placeholderUrlPlaceholder,
|
|
2074
|
+
onInput: r[1] ||= (e) => C("placeholderUrl", e.target.value)
|
|
2075
|
+
}, null, 42, da)])) : b("", !0),
|
|
2076
|
+
_("div", fa, [
|
|
2077
|
+
_("label", { class: p(T(W)) }, D(T(a).image.altText), 3),
|
|
2078
|
+
k(Z, {
|
|
2020
2079
|
"model-value": t.block.alt,
|
|
2021
2080
|
type: "text",
|
|
2022
|
-
placeholder: T(
|
|
2023
|
-
pulse:
|
|
2081
|
+
placeholder: T(a).image.altTextPlaceholder,
|
|
2082
|
+
pulse: m.value,
|
|
2024
2083
|
disabled: t.block.decorative === !0,
|
|
2025
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
2084
|
+
"onUpdate:modelValue": r[2] ||= (e) => C("alt", e)
|
|
2026
2085
|
}, null, 8, [
|
|
2027
2086
|
"model-value",
|
|
2028
2087
|
"placeholder",
|
|
2029
2088
|
"pulse",
|
|
2030
2089
|
"disabled"
|
|
2031
2090
|
]),
|
|
2032
|
-
_("label",
|
|
2091
|
+
_("label", pa, [_("input", {
|
|
2033
2092
|
type: "checkbox",
|
|
2034
2093
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2035
2094
|
checked: t.block.decorative === !0,
|
|
2036
|
-
onChange: r[3] ||= (e) =>
|
|
2037
|
-
}, null, 40,
|
|
2095
|
+
onChange: r[3] ||= (e) => C("decorative", e.target.checked)
|
|
2096
|
+
}, null, 40, ma), _("span", null, [d(D(T(a).image.decorative) + " ", 1), _("span", ha, D(T(a).image.decorativeHint), 1)])])
|
|
2038
2097
|
]),
|
|
2039
|
-
_("div",
|
|
2040
|
-
class: p(T(
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2098
|
+
_("div", ga, [
|
|
2099
|
+
_("label", { class: p(T(W)) }, D(T(a).image.width), 3),
|
|
2100
|
+
_("select", {
|
|
2101
|
+
class: p(T(U)),
|
|
2102
|
+
value: S.value,
|
|
2103
|
+
onChange: r[4] ||= (e) => w(e.target.value)
|
|
2104
|
+
}, [
|
|
2105
|
+
_("option", va, D(T(a).image.fullWidth), 1),
|
|
2106
|
+
r[10] ||= _("option", { value: "300" }, "300px", -1),
|
|
2107
|
+
r[11] ||= _("option", { value: "400" }, "400px", -1),
|
|
2108
|
+
r[12] ||= _("option", { value: "500" }, "500px", -1),
|
|
2109
|
+
_("option", ya, D(T(a).image.widthCustom), 1)
|
|
2110
|
+
], 42, _a),
|
|
2111
|
+
S.value === "custom" ? (e(), v("div", ba, [_("input", {
|
|
2112
|
+
type: "number",
|
|
2113
|
+
class: p(T(K)),
|
|
2114
|
+
value: typeof t.block.width == "number" ? t.block.width : Ea,
|
|
2115
|
+
min: "20",
|
|
2116
|
+
onInput: r[5] ||= (e) => E(e.target.value)
|
|
2117
|
+
}, null, 42, xa), _("span", { class: p(T(G)) }, "px", 2)])) : b("", !0)
|
|
2118
|
+
]),
|
|
2119
|
+
_("div", Sa, [_("label", { class: p(T(W)) }, D(T(a).title.align), 3), k(Y, {
|
|
2050
2120
|
options: [
|
|
2051
2121
|
{
|
|
2052
2122
|
value: "left",
|
|
2053
|
-
label: T(
|
|
2123
|
+
label: T(a).title.alignLeft
|
|
2054
2124
|
},
|
|
2055
2125
|
{
|
|
2056
2126
|
value: "center",
|
|
2057
|
-
label: T(
|
|
2127
|
+
label: T(a).title.alignCenter
|
|
2058
2128
|
},
|
|
2059
2129
|
{
|
|
2060
2130
|
value: "right",
|
|
2061
|
-
label: T(
|
|
2131
|
+
label: T(a).title.alignRight
|
|
2062
2132
|
}
|
|
2063
2133
|
],
|
|
2064
2134
|
"model-value": t.block.align,
|
|
2065
|
-
"onUpdate:modelValue": r[
|
|
2135
|
+
"onUpdate:modelValue": r[6] ||= (e) => C("align", e)
|
|
2066
2136
|
}, null, 8, ["options", "model-value"])]),
|
|
2067
|
-
_("div",
|
|
2068
|
-
_("label", { class: p(T(
|
|
2069
|
-
k(
|
|
2137
|
+
_("div", Ca, [
|
|
2138
|
+
_("label", { class: p(T(W)) }, D(T(a).image.linkUrl), 3),
|
|
2139
|
+
k(Z, {
|
|
2070
2140
|
"model-value": t.block.linkUrl || "",
|
|
2071
2141
|
type: "url",
|
|
2072
|
-
placeholder: T(
|
|
2073
|
-
"onUpdate:modelValue": r[
|
|
2142
|
+
placeholder: T(a).image.imageUrlPlaceholder,
|
|
2143
|
+
"onUpdate:modelValue": r[7] ||= (e) => C("linkUrl", e)
|
|
2074
2144
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2075
|
-
t.block.linkUrl ? (e(), v("label",
|
|
2145
|
+
t.block.linkUrl ? (e(), v("label", wa, [_("input", {
|
|
2076
2146
|
type: "checkbox",
|
|
2077
2147
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2078
2148
|
checked: t.block.linkOpenInNewTab ?? !1,
|
|
2079
|
-
onChange: r[
|
|
2080
|
-
}, null, 40,
|
|
2149
|
+
onChange: r[8] ||= (e) => C("linkOpenInNewTab", e.target.checked)
|
|
2150
|
+
}, null, 40, Ta), d(" " + D(T(a).image.openInNewTab), 1)])) : b("", !0)
|
|
2081
2151
|
])
|
|
2082
2152
|
], 64));
|
|
2083
2153
|
}
|
|
2084
|
-
}),
|
|
2154
|
+
}), Oa = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ka = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Aa = [
|
|
2085
2155
|
"value",
|
|
2086
2156
|
"placeholder",
|
|
2087
2157
|
"onInput"
|
|
2088
|
-
],
|
|
2158
|
+
], ja = ["title", "onClick"], Ma = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Na = ["checked", "onChange"], Pa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Fa = ["value"], Ia = { value: "" }, La = ["value"], Ra = ["value"], za = /* @__PURE__ */ m({
|
|
2089
2159
|
__name: "MenuToolbar",
|
|
2090
2160
|
props: {
|
|
2091
2161
|
block: {},
|
|
@@ -2093,7 +2163,7 @@ var Li = {
|
|
|
2093
2163
|
},
|
|
2094
2164
|
emits: ["update"],
|
|
2095
2165
|
setup(t, { emit: n }) {
|
|
2096
|
-
let r = t, i = n, { t: a } =
|
|
2166
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [
|
|
2097
2167
|
{
|
|
2098
2168
|
key: "openInNewTab",
|
|
2099
2169
|
label: a.menu.openInNewTab
|
|
@@ -2110,17 +2180,17 @@ var Li = {
|
|
|
2110
2180
|
{
|
|
2111
2181
|
value: "left",
|
|
2112
2182
|
label: a.title.alignLeft,
|
|
2113
|
-
icon:
|
|
2183
|
+
icon: $e
|
|
2114
2184
|
},
|
|
2115
2185
|
{
|
|
2116
2186
|
value: "center",
|
|
2117
2187
|
label: a.title.alignCenter,
|
|
2118
|
-
icon:
|
|
2188
|
+
icon: Qe
|
|
2119
2189
|
},
|
|
2120
2190
|
{
|
|
2121
2191
|
value: "right",
|
|
2122
2192
|
label: a.title.alignRight,
|
|
2123
|
-
icon:
|
|
2193
|
+
icon: Ze
|
|
2124
2194
|
}
|
|
2125
2195
|
]);
|
|
2126
2196
|
function l(e, t) {
|
|
@@ -2128,7 +2198,7 @@ var Li = {
|
|
|
2128
2198
|
}
|
|
2129
2199
|
function u() {
|
|
2130
2200
|
let e = {
|
|
2131
|
-
id:
|
|
2201
|
+
id: N(),
|
|
2132
2202
|
text: "",
|
|
2133
2203
|
url: "",
|
|
2134
2204
|
openInNewTab: !1,
|
|
@@ -2147,26 +2217,26 @@ var Li = {
|
|
|
2147
2217
|
i("update", { items: r.block.items.filter((t) => t.id !== e) });
|
|
2148
2218
|
}
|
|
2149
2219
|
return (n, r) => (e(), v(y, null, [
|
|
2150
|
-
k(
|
|
2151
|
-
default: M(() => [_("div",
|
|
2220
|
+
k(J, { label: T(a).menu.items }, {
|
|
2221
|
+
default: M(() => [_("div", Oa, [(e(!0), v(y, null, o(t.block.items, (n) => (e(), v("div", {
|
|
2152
2222
|
key: n.id,
|
|
2153
2223
|
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
2224
|
}, [
|
|
2155
|
-
_("div",
|
|
2225
|
+
_("div", ka, [_("input", {
|
|
2156
2226
|
type: "text",
|
|
2157
|
-
class: p([T(
|
|
2227
|
+
class: p([T(U), "tpl:flex-1"]),
|
|
2158
2228
|
value: n.text,
|
|
2159
2229
|
placeholder: T(a).menu.text,
|
|
2160
2230
|
onInput: (e) => f(n.id, "text", e.target.value)
|
|
2161
|
-
}, null, 42,
|
|
2162
|
-
class: p(T(
|
|
2231
|
+
}, null, 42, Aa), _("button", {
|
|
2232
|
+
class: p(T(ht)),
|
|
2163
2233
|
title: T(a).menu.removeItem,
|
|
2164
2234
|
onClick: (e) => m(n.id)
|
|
2165
|
-
}, [k(T(
|
|
2235
|
+
}, [k(T(ct), {
|
|
2166
2236
|
size: 14,
|
|
2167
2237
|
"stroke-width": 2
|
|
2168
|
-
})], 10,
|
|
2169
|
-
k(
|
|
2238
|
+
})], 10, ja)]),
|
|
2239
|
+
k(Z, {
|
|
2170
2240
|
"model-value": n.url,
|
|
2171
2241
|
type: "url",
|
|
2172
2242
|
placeholder: T(a).menu.urlPlaceholder,
|
|
@@ -2176,7 +2246,7 @@ var Li = {
|
|
|
2176
2246
|
"placeholder",
|
|
2177
2247
|
"onUpdate:modelValue"
|
|
2178
2248
|
]),
|
|
2179
|
-
_("div",
|
|
2249
|
+
_("div", Ma, [(e(!0), v(y, null, o(s.value, (t) => (e(), v("label", {
|
|
2180
2250
|
key: t.key,
|
|
2181
2251
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
2182
2252
|
}, [_("input", {
|
|
@@ -2184,34 +2254,34 @@ var Li = {
|
|
|
2184
2254
|
checked: n[t.key],
|
|
2185
2255
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2186
2256
|
onChange: (e) => f(n.id, t.key, e.target.checked)
|
|
2187
|
-
}, null, 40,
|
|
2188
|
-
_("div",
|
|
2257
|
+
}, null, 40, Na), d(" " + D(t.label), 1)]))), 128))]),
|
|
2258
|
+
_("div", Pa, [_("label", { class: p([T(W), "tpl:!mb-0"]) }, D(T(a).menu.color), 3), k(q, {
|
|
2189
2259
|
"swatch-only": "",
|
|
2190
2260
|
"model-value": n.color || t.block.linkColor || t.block.color,
|
|
2191
2261
|
"onUpdate:modelValue": (e) => f(n.id, "color", e)
|
|
2192
2262
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2193
2263
|
]))), 128)), _("button", {
|
|
2194
|
-
class: p(T(
|
|
2264
|
+
class: p(T(gt)),
|
|
2195
2265
|
onClick: u
|
|
2196
|
-
}, [k(T(
|
|
2266
|
+
}, [k(T(X), {
|
|
2197
2267
|
size: 14,
|
|
2198
2268
|
"stroke-width": 2
|
|
2199
2269
|
}), d(" " + D(T(a).menu.addItem), 1)], 2)])]),
|
|
2200
2270
|
_: 1
|
|
2201
2271
|
}, 8, ["label"]),
|
|
2202
|
-
k(
|
|
2272
|
+
k(J, { label: T(a).menu.fontFamily }, {
|
|
2203
2273
|
default: M(() => [_("select", {
|
|
2204
|
-
class: p(T(
|
|
2274
|
+
class: p(T(U)),
|
|
2205
2275
|
value: t.block.fontFamily || "",
|
|
2206
2276
|
onChange: r[0] ||= (e) => l("fontFamily", e.target.value || void 0)
|
|
2207
|
-
}, [_("option",
|
|
2277
|
+
}, [_("option", Ia, D(T(a).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2208
2278
|
key: t.value,
|
|
2209
2279
|
value: t.value
|
|
2210
|
-
}, D(t.label), 9,
|
|
2280
|
+
}, D(t.label), 9, La))), 128))], 42, Fa)]),
|
|
2211
2281
|
_: 1
|
|
2212
2282
|
}, 8, ["label"]),
|
|
2213
|
-
k(
|
|
2214
|
-
default: M(() => [k(
|
|
2283
|
+
k(J, { label: T(a).menu.fontSize }, {
|
|
2284
|
+
default: M(() => [k(bt, {
|
|
2215
2285
|
"model-value": t.block.fontSize,
|
|
2216
2286
|
min: 8,
|
|
2217
2287
|
max: 48,
|
|
@@ -2220,46 +2290,46 @@ var Li = {
|
|
|
2220
2290
|
}, null, 8, ["model-value"])]),
|
|
2221
2291
|
_: 1
|
|
2222
2292
|
}, 8, ["label"]),
|
|
2223
|
-
k(
|
|
2224
|
-
default: M(() => [k(
|
|
2293
|
+
k(J, { label: T(a).menu.color }, {
|
|
2294
|
+
default: M(() => [k(q, {
|
|
2225
2295
|
"model-value": t.block.color,
|
|
2226
2296
|
"onUpdate:modelValue": r[2] ||= (e) => l("color", e)
|
|
2227
2297
|
}, null, 8, ["model-value"])]),
|
|
2228
2298
|
_: 1
|
|
2229
2299
|
}, 8, ["label"]),
|
|
2230
|
-
k(
|
|
2231
|
-
default: M(() => [k(
|
|
2300
|
+
k(J, { label: T(a).menu.linkColor }, {
|
|
2301
|
+
default: M(() => [k(q, {
|
|
2232
2302
|
"model-value": t.block.linkColor || t.block.color,
|
|
2233
2303
|
"onUpdate:modelValue": r[3] ||= (e) => l("linkColor", e || void 0)
|
|
2234
2304
|
}, null, 8, ["model-value"])]),
|
|
2235
2305
|
_: 1
|
|
2236
2306
|
}, 8, ["label"]),
|
|
2237
|
-
k(
|
|
2238
|
-
default: M(() => [k(
|
|
2307
|
+
k(J, { label: T(a).menu.textAlign }, {
|
|
2308
|
+
default: M(() => [k(Y, {
|
|
2239
2309
|
options: c.value,
|
|
2240
2310
|
"model-value": t.block.textAlign,
|
|
2241
2311
|
"onUpdate:modelValue": r[4] ||= (e) => l("textAlign", e)
|
|
2242
2312
|
}, null, 8, ["options", "model-value"])]),
|
|
2243
2313
|
_: 1
|
|
2244
2314
|
}, 8, ["label"]),
|
|
2245
|
-
k(
|
|
2315
|
+
k(J, { label: T(a).menu.separator }, {
|
|
2246
2316
|
default: M(() => [_("input", {
|
|
2247
2317
|
type: "text",
|
|
2248
|
-
class: p(T(
|
|
2318
|
+
class: p(T(U)),
|
|
2249
2319
|
value: t.block.separator,
|
|
2250
2320
|
onInput: r[5] ||= (e) => l("separator", e.target.value)
|
|
2251
|
-
}, null, 42,
|
|
2321
|
+
}, null, 42, Ra)]),
|
|
2252
2322
|
_: 1
|
|
2253
2323
|
}, 8, ["label"]),
|
|
2254
|
-
k(
|
|
2255
|
-
default: M(() => [k(
|
|
2324
|
+
k(J, { label: T(a).menu.separatorColor }, {
|
|
2325
|
+
default: M(() => [k(q, {
|
|
2256
2326
|
"model-value": t.block.separatorColor,
|
|
2257
2327
|
"onUpdate:modelValue": r[6] ||= (e) => l("separatorColor", e)
|
|
2258
2328
|
}, null, 8, ["model-value"])]),
|
|
2259
2329
|
_: 1
|
|
2260
2330
|
}, 8, ["label"]),
|
|
2261
|
-
k(
|
|
2262
|
-
default: M(() => [k(
|
|
2331
|
+
k(J, { label: T(a).menu.spacing }, {
|
|
2332
|
+
default: M(() => [k(bt, {
|
|
2263
2333
|
"model-value": t.block.spacing,
|
|
2264
2334
|
min: 0,
|
|
2265
2335
|
max: 50,
|
|
@@ -2273,11 +2343,11 @@ var Li = {
|
|
|
2273
2343
|
});
|
|
2274
2344
|
//#endregion
|
|
2275
2345
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2276
|
-
function
|
|
2346
|
+
function Ba(e) {
|
|
2277
2347
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2278
2348
|
}
|
|
2279
|
-
function
|
|
2280
|
-
let n =
|
|
2349
|
+
function Va(e, t) {
|
|
2350
|
+
let n = Ba(t);
|
|
2281
2351
|
if (e.length === n) return e;
|
|
2282
2352
|
if (e.length < n) {
|
|
2283
2353
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2288,12 +2358,12 @@ function Aa(e, t) {
|
|
|
2288
2358
|
}
|
|
2289
2359
|
//#endregion
|
|
2290
2360
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2291
|
-
var
|
|
2361
|
+
var Ha = { class: "tpl:mb-3.5" }, Ua = ["value"], Wa = ["value"], Ga = /* @__PURE__ */ m({
|
|
2292
2362
|
__name: "SectionToolbar",
|
|
2293
2363
|
props: { block: {} },
|
|
2294
2364
|
emits: ["update"],
|
|
2295
2365
|
setup(t, { emit: n }) {
|
|
2296
|
-
let r = t, i = n, { t: a } =
|
|
2366
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [
|
|
2297
2367
|
{
|
|
2298
2368
|
value: "1",
|
|
2299
2369
|
label: a.section.column1
|
|
@@ -2319,30 +2389,30 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2319
2389
|
let t = e.target.value;
|
|
2320
2390
|
i("update", {
|
|
2321
2391
|
columns: t,
|
|
2322
|
-
children:
|
|
2392
|
+
children: Va(r.block.children, t)
|
|
2323
2393
|
});
|
|
2324
2394
|
}
|
|
2325
|
-
return (n, r) => (e(), v("div",
|
|
2326
|
-
class: p(T(
|
|
2395
|
+
return (n, r) => (e(), v("div", Ha, [_("label", { class: p(T(W)) }, D(T(a).section.columns), 3), _("select", {
|
|
2396
|
+
class: p(T(U)),
|
|
2327
2397
|
value: t.block.columns,
|
|
2328
2398
|
onChange: c
|
|
2329
2399
|
}, [(e(!0), v(y, null, o(s.value, (t) => (e(), v("option", {
|
|
2330
2400
|
key: t.value,
|
|
2331
2401
|
value: t.value
|
|
2332
|
-
}, D(t.label), 9,
|
|
2402
|
+
}, D(t.label), 9, Wa))), 128))], 42, Ua)]));
|
|
2333
2403
|
}
|
|
2334
|
-
}),
|
|
2404
|
+
}), Ka = { class: "tpl:mb-3.5" }, qa = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ja = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ya = ["value", "onChange"], Xa = ["value"], Za = ["title", "onClick"], Qa = { class: "tpl:mb-3.5" }, $a = ["value"], eo = { value: "solid" }, to = { value: "outlined" }, no = { value: "rounded" }, ro = { value: "square" }, io = { value: "circle" }, ao = { class: "tpl:mb-3.5" }, oo = { class: "tpl:mb-3.5" }, so = { class: "tpl:flex tpl:items-stretch" }, co = ["value"], lo = { class: "tpl:mb-3.5" }, uo = /* @__PURE__ */ m({
|
|
2335
2405
|
__name: "SocialToolbar",
|
|
2336
2406
|
props: { block: {} },
|
|
2337
2407
|
emits: ["update"],
|
|
2338
2408
|
setup(t, { emit: n }) {
|
|
2339
|
-
let r = t, i = n, { t: a } =
|
|
2409
|
+
let r = t, i = n, { t: a } = V();
|
|
2340
2410
|
function s(e, t) {
|
|
2341
2411
|
i("update", { [e]: t });
|
|
2342
2412
|
}
|
|
2343
2413
|
function c() {
|
|
2344
2414
|
let e = {
|
|
2345
|
-
id:
|
|
2415
|
+
id: N(),
|
|
2346
2416
|
platform: "facebook",
|
|
2347
2417
|
url: ""
|
|
2348
2418
|
};
|
|
@@ -2358,25 +2428,25 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2358
2428
|
i("update", { icons: r.block.icons.filter((t) => t.id !== e) });
|
|
2359
2429
|
}
|
|
2360
2430
|
return (n, r) => (e(), v(y, null, [
|
|
2361
|
-
_("div",
|
|
2431
|
+
_("div", Ka, [_("label", { class: p(T(W)) }, D(T(a).social.icons), 3), _("div", qa, [(e(!0), v(y, null, o(t.block.icons, (t) => (e(), v("div", {
|
|
2362
2432
|
key: t.id,
|
|
2363
2433
|
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",
|
|
2434
|
+
}, [_("div", Ja, [_("select", {
|
|
2365
2435
|
"data-testid": "social-platform-select",
|
|
2366
|
-
class: p([T(
|
|
2436
|
+
class: p([T(U), "tpl:flex-1"]),
|
|
2367
2437
|
value: t.platform,
|
|
2368
2438
|
onChange: (e) => l(t.id, "platform", e.target.value)
|
|
2369
|
-
}, [(e(!0), v(y, null, o(T(
|
|
2439
|
+
}, [(e(!0), v(y, null, o(T(ye), (t) => (e(), v("option", {
|
|
2370
2440
|
key: t,
|
|
2371
2441
|
value: t
|
|
2372
|
-
}, D(T(
|
|
2373
|
-
class: p(T(
|
|
2442
|
+
}, D(T(a).social.platforms[t]), 9, Xa))), 128))], 42, Ya), _("button", {
|
|
2443
|
+
class: p(T(ht)),
|
|
2374
2444
|
title: T(a).social.removeIcon,
|
|
2375
2445
|
onClick: (e) => u(t.id)
|
|
2376
|
-
}, [k(T(
|
|
2446
|
+
}, [k(T(ct), {
|
|
2377
2447
|
size: 14,
|
|
2378
2448
|
"stroke-width": 2
|
|
2379
|
-
})], 10,
|
|
2449
|
+
})], 10, Za)]), k(Z, {
|
|
2380
2450
|
"model-value": t.url,
|
|
2381
2451
|
type: "url",
|
|
2382
2452
|
placeholder: T(a).social.urlPlaceholder,
|
|
@@ -2386,24 +2456,24 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2386
2456
|
"placeholder",
|
|
2387
2457
|
"onUpdate:modelValue"
|
|
2388
2458
|
])]))), 128)), _("button", {
|
|
2389
|
-
class: p(T(
|
|
2459
|
+
class: p(T(gt)),
|
|
2390
2460
|
onClick: c
|
|
2391
|
-
}, [k(T(
|
|
2461
|
+
}, [k(T(X), {
|
|
2392
2462
|
size: 14,
|
|
2393
2463
|
"stroke-width": 2
|
|
2394
2464
|
}), d(" " + D(T(a).social.addIcon), 1)], 2)])]),
|
|
2395
|
-
_("div",
|
|
2396
|
-
class: p(T(
|
|
2465
|
+
_("div", Qa, [_("label", { class: p(T(W)) }, D(T(a).social.style), 3), _("select", {
|
|
2466
|
+
class: p(T(U)),
|
|
2397
2467
|
value: t.block.iconStyle,
|
|
2398
2468
|
onChange: r[0] ||= (e) => s("iconStyle", e.target.value)
|
|
2399
2469
|
}, [
|
|
2400
|
-
_("option",
|
|
2401
|
-
_("option",
|
|
2402
|
-
_("option",
|
|
2403
|
-
_("option",
|
|
2404
|
-
_("option",
|
|
2405
|
-
], 42,
|
|
2406
|
-
_("div",
|
|
2470
|
+
_("option", eo, D(T(a).social.styleSolid), 1),
|
|
2471
|
+
_("option", to, D(T(a).social.styleOutlined), 1),
|
|
2472
|
+
_("option", no, D(T(a).social.styleRounded), 1),
|
|
2473
|
+
_("option", ro, D(T(a).social.styleSquare), 1),
|
|
2474
|
+
_("option", io, D(T(a).social.styleCircle), 1)
|
|
2475
|
+
], 42, $a)]),
|
|
2476
|
+
_("div", ao, [_("label", { class: p(T(W)) }, D(T(a).social.size), 3), k(Y, {
|
|
2407
2477
|
options: [
|
|
2408
2478
|
{
|
|
2409
2479
|
value: "small",
|
|
@@ -2421,30 +2491,30 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2421
2491
|
"model-value": t.block.iconSize,
|
|
2422
2492
|
"onUpdate:modelValue": r[1] ||= (e) => s("iconSize", e)
|
|
2423
2493
|
}, null, 8, ["options", "model-value"])]),
|
|
2424
|
-
_("div",
|
|
2494
|
+
_("div", oo, [_("label", { class: p(T(W)) }, D(T(a).social.spacing), 3), _("div", so, [_("input", {
|
|
2425
2495
|
type: "number",
|
|
2426
|
-
class: p(T(
|
|
2496
|
+
class: p(T(K)),
|
|
2427
2497
|
value: t.block.spacing,
|
|
2428
2498
|
min: "0",
|
|
2429
2499
|
max: "50",
|
|
2430
2500
|
onInput: r[2] ||= (e) => s("spacing", Number(e.target.value))
|
|
2431
|
-
}, null, 42,
|
|
2432
|
-
_("div",
|
|
2501
|
+
}, null, 42, co), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2502
|
+
_("div", lo, [_("label", { class: p(T(W)) }, D(T(a).social.align), 3), k(Y, {
|
|
2433
2503
|
options: [
|
|
2434
2504
|
{
|
|
2435
2505
|
value: "left",
|
|
2436
2506
|
label: T(a).title.alignLeft,
|
|
2437
|
-
icon: T(
|
|
2507
|
+
icon: T($e)
|
|
2438
2508
|
},
|
|
2439
2509
|
{
|
|
2440
2510
|
value: "center",
|
|
2441
2511
|
label: T(a).title.alignCenter,
|
|
2442
|
-
icon: T(
|
|
2512
|
+
icon: T(Qe)
|
|
2443
2513
|
},
|
|
2444
2514
|
{
|
|
2445
2515
|
value: "right",
|
|
2446
2516
|
label: T(a).title.alignRight,
|
|
2447
|
-
icon: T(
|
|
2517
|
+
icon: T(Ze)
|
|
2448
2518
|
}
|
|
2449
2519
|
],
|
|
2450
2520
|
"model-value": t.block.align,
|
|
@@ -2452,22 +2522,22 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2452
2522
|
}, null, 8, ["options", "model-value"])])
|
|
2453
2523
|
], 64));
|
|
2454
2524
|
}
|
|
2455
|
-
}),
|
|
2525
|
+
}), fo = { class: "tpl:mb-3.5" }, po = { class: "tpl:flex tpl:items-stretch" }, mo = ["value"], ho = ["value"], go = /* @__PURE__ */ m({
|
|
2456
2526
|
__name: "SpacerToolbar",
|
|
2457
2527
|
props: { block: {} },
|
|
2458
2528
|
emits: ["update"],
|
|
2459
2529
|
setup(t, { emit: n }) {
|
|
2460
|
-
let r = n, { t: i } =
|
|
2461
|
-
return (n, a) => (e(), v("div",
|
|
2462
|
-
_("label", { class: p(T(
|
|
2463
|
-
_("div",
|
|
2530
|
+
let r = n, { t: i } = V();
|
|
2531
|
+
return (n, a) => (e(), v("div", fo, [
|
|
2532
|
+
_("label", { class: p(T(W)) }, D(T(i).spacer.height), 3),
|
|
2533
|
+
_("div", po, [_("input", {
|
|
2464
2534
|
type: "number",
|
|
2465
|
-
class: p(T(
|
|
2535
|
+
class: p(T(K)),
|
|
2466
2536
|
value: t.block.height,
|
|
2467
2537
|
min: "10",
|
|
2468
2538
|
max: "100",
|
|
2469
2539
|
onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
2470
|
-
}, null, 42,
|
|
2540
|
+
}, null, 42, mo), _("span", { class: p(T(G)) }, "px", 2)]),
|
|
2471
2541
|
_("input", {
|
|
2472
2542
|
type: "range",
|
|
2473
2543
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2475,13 +2545,13 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2475
2545
|
min: "10",
|
|
2476
2546
|
max: "100",
|
|
2477
2547
|
onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
2478
|
-
}, null, 40,
|
|
2548
|
+
}, null, 40, ho)
|
|
2479
2549
|
]));
|
|
2480
2550
|
}
|
|
2481
|
-
}),
|
|
2551
|
+
}), _o = { class: "tpl:mb-3.5" }, vo = { class: "tpl:flex tpl:items-center tpl:gap-3" }, yo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, bo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, xo = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, So = ["disabled"], Co = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, wo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, To = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Eo = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Do = ["disabled"], Oo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ko = { class: "tpl:mb-3.5" }, Ao = { 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)]" }, jo = ["checked"], Mo = {
|
|
2482
2552
|
key: 0,
|
|
2483
2553
|
class: "tpl:mb-3.5"
|
|
2484
|
-
},
|
|
2554
|
+
}, No = { class: "tpl:mb-3.5" }, Po = { class: "tpl:mb-3.5" }, Fo = { class: "tpl:flex tpl:items-stretch" }, Io = ["value"], Lo = { class: "tpl:mb-3.5" }, Ro = { class: "tpl:flex tpl:items-stretch" }, zo = ["value"], Bo = { class: "tpl:mb-3.5" }, Vo = ["value"], Ho = { value: "" }, Uo = ["value"], Wo = { class: "tpl:mb-3.5" }, Go = { class: "tpl:flex tpl:items-stretch" }, Ko = ["value"], qo = { class: "tpl:mb-3.5" }, Jo = { class: "tpl:mb-3.5" }, Yo = /* @__PURE__ */ m({
|
|
2485
2555
|
__name: "TableToolbar",
|
|
2486
2556
|
props: {
|
|
2487
2557
|
block: {},
|
|
@@ -2489,15 +2559,15 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2489
2559
|
},
|
|
2490
2560
|
emits: ["update"],
|
|
2491
2561
|
setup(t, { emit: n }) {
|
|
2492
|
-
let r = t, i = n, { t: a } =
|
|
2562
|
+
let r = t, i = n, { t: a } = V(), s = g(() => r.block.rows.length > 0 ? r.block.rows[0].cells.length : 0);
|
|
2493
2563
|
function c(e, t) {
|
|
2494
2564
|
i("update", { [e]: t });
|
|
2495
2565
|
}
|
|
2496
2566
|
function l() {
|
|
2497
2567
|
let e = r.block.rows.length > 0 ? r.block.rows[0].cells.length : 3, t = {
|
|
2498
|
-
id:
|
|
2568
|
+
id: N(),
|
|
2499
2569
|
cells: Array.from({ length: e }, () => ({
|
|
2500
|
-
id:
|
|
2570
|
+
id: N(),
|
|
2501
2571
|
content: ""
|
|
2502
2572
|
}))
|
|
2503
2573
|
};
|
|
@@ -2510,7 +2580,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2510
2580
|
i("update", { rows: r.block.rows.map((e) => ({
|
|
2511
2581
|
...e,
|
|
2512
2582
|
cells: [...e.cells, {
|
|
2513
|
-
id:
|
|
2583
|
+
id: N(),
|
|
2514
2584
|
content: ""
|
|
2515
2585
|
}]
|
|
2516
2586
|
})) });
|
|
@@ -2522,7 +2592,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2522
2592
|
})) });
|
|
2523
2593
|
}
|
|
2524
2594
|
return (n, r) => (e(), v(y, null, [
|
|
2525
|
-
_("div",
|
|
2595
|
+
_("div", _o, [_("label", { class: p(T(W)) }, D(T(a).table.dimensions), 3), _("div", vo, [_("div", yo, [_("span", bo, D(T(a).table.rows), 1), _("div", xo, [
|
|
2526
2596
|
_("button", {
|
|
2527
2597
|
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
2598
|
disabled: t.block.rows.length <= 1,
|
|
@@ -2530,16 +2600,16 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2530
2600
|
}, [k(T(Ke), {
|
|
2531
2601
|
size: 12,
|
|
2532
2602
|
"stroke-width": 2
|
|
2533
|
-
})], 8,
|
|
2534
|
-
_("span",
|
|
2603
|
+
})], 8, So),
|
|
2604
|
+
_("span", Co, D(t.block.rows.length), 1),
|
|
2535
2605
|
_("button", {
|
|
2536
2606
|
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
2607
|
onClick: l
|
|
2538
|
-
}, [k(T(
|
|
2608
|
+
}, [k(T(X), {
|
|
2539
2609
|
size: 12,
|
|
2540
2610
|
"stroke-width": 2
|
|
2541
2611
|
})])
|
|
2542
|
-
])]), _("div",
|
|
2612
|
+
])]), _("div", wo, [_("span", To, D(T(a).table.columns), 1), _("div", Eo, [
|
|
2543
2613
|
_("button", {
|
|
2544
2614
|
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
2615
|
disabled: s.value <= 1,
|
|
@@ -2547,83 +2617,83 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2547
2617
|
}, [k(T(Ke), {
|
|
2548
2618
|
size: 12,
|
|
2549
2619
|
"stroke-width": 2
|
|
2550
|
-
})], 8,
|
|
2551
|
-
_("span",
|
|
2620
|
+
})], 8, Do),
|
|
2621
|
+
_("span", Oo, D(s.value), 1),
|
|
2552
2622
|
_("button", {
|
|
2553
2623
|
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
2624
|
onClick: f
|
|
2555
|
-
}, [k(T(
|
|
2625
|
+
}, [k(T(X), {
|
|
2556
2626
|
size: 12,
|
|
2557
2627
|
"stroke-width": 2
|
|
2558
2628
|
})])
|
|
2559
2629
|
])])])]),
|
|
2560
|
-
_("div",
|
|
2630
|
+
_("div", ko, [_("label", Ao, [_("input", {
|
|
2561
2631
|
type: "checkbox",
|
|
2562
2632
|
checked: t.block.hasHeaderRow,
|
|
2563
2633
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2564
2634
|
onChange: r[2] ||= (e) => c("hasHeaderRow", e.target.checked)
|
|
2565
|
-
}, null, 40,
|
|
2566
|
-
t.block.hasHeaderRow ? (e(), v("div",
|
|
2635
|
+
}, null, 40, jo), d(" " + D(T(a).table.hasHeaderRow), 1)])]),
|
|
2636
|
+
t.block.hasHeaderRow ? (e(), v("div", Mo, [_("label", { class: p(T(W)) }, D(T(a).table.headerBackgroundColor), 3), k(q, {
|
|
2567
2637
|
"model-value": t.block.headerBackgroundColor || T("#f2f2f2"),
|
|
2568
2638
|
placeholder: T(a).table.noHeaderBg,
|
|
2569
2639
|
"onUpdate:modelValue": r[3] ||= (e) => c("headerBackgroundColor", e || null)
|
|
2570
2640
|
}, null, 8, ["model-value", "placeholder"])])) : b("", !0),
|
|
2571
|
-
_("div",
|
|
2641
|
+
_("div", No, [_("label", { class: p(T(W)) }, D(T(a).table.borderColor), 3), k(q, {
|
|
2572
2642
|
"model-value": t.block.borderColor,
|
|
2573
2643
|
"onUpdate:modelValue": r[4] ||= (e) => c("borderColor", e)
|
|
2574
2644
|
}, null, 8, ["model-value"])]),
|
|
2575
|
-
_("div",
|
|
2645
|
+
_("div", Po, [_("label", { class: p(T(W)) }, D(T(a).table.borderWidth), 3), _("div", Fo, [_("input", {
|
|
2576
2646
|
type: "number",
|
|
2577
|
-
class: p(T(
|
|
2647
|
+
class: p(T(K)),
|
|
2578
2648
|
value: t.block.borderWidth,
|
|
2579
2649
|
min: "0",
|
|
2580
2650
|
max: "10",
|
|
2581
2651
|
onInput: r[5] ||= (e) => c("borderWidth", Number(e.target.value))
|
|
2582
|
-
}, null, 42,
|
|
2583
|
-
_("div",
|
|
2652
|
+
}, null, 42, Io), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2653
|
+
_("div", Lo, [_("label", { class: p(T(W)) }, D(T(a).table.cellPadding), 3), _("div", Ro, [_("input", {
|
|
2584
2654
|
type: "number",
|
|
2585
|
-
class: p(T(
|
|
2655
|
+
class: p(T(K)),
|
|
2586
2656
|
value: t.block.cellPadding,
|
|
2587
2657
|
min: "0",
|
|
2588
2658
|
max: "30",
|
|
2589
2659
|
onInput: r[6] ||= (e) => c("cellPadding", Number(e.target.value))
|
|
2590
|
-
}, null, 42,
|
|
2591
|
-
_("div",
|
|
2592
|
-
class: p(T(
|
|
2660
|
+
}, null, 42, zo), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2661
|
+
_("div", Bo, [_("label", { class: p(T(W)) }, D(T(a).table.fontFamily), 3), _("select", {
|
|
2662
|
+
class: p(T(U)),
|
|
2593
2663
|
value: t.block.fontFamily || "",
|
|
2594
2664
|
onChange: r[7] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2595
|
-
}, [_("option",
|
|
2665
|
+
}, [_("option", Ho, D(T(a).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2596
2666
|
key: t.value,
|
|
2597
2667
|
value: t.value
|
|
2598
|
-
}, D(t.label), 9,
|
|
2599
|
-
_("div",
|
|
2668
|
+
}, D(t.label), 9, Uo))), 128))], 42, Vo)]),
|
|
2669
|
+
_("div", Wo, [_("label", { class: p(T(W)) }, D(T(a).table.fontSize), 3), _("div", Go, [_("input", {
|
|
2600
2670
|
type: "number",
|
|
2601
|
-
class: p(T(
|
|
2671
|
+
class: p(T(K)),
|
|
2602
2672
|
value: t.block.fontSize,
|
|
2603
2673
|
min: "10",
|
|
2604
2674
|
max: "32",
|
|
2605
2675
|
onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
|
|
2606
|
-
}, null, 42,
|
|
2607
|
-
_("div",
|
|
2676
|
+
}, null, 42, Ko), _("span", { class: p(T(G)) }, "px", 2)])]),
|
|
2677
|
+
_("div", qo, [_("label", { class: p(T(W)) }, D(T(a).table.color), 3), k(q, {
|
|
2608
2678
|
"model-value": t.block.color,
|
|
2609
2679
|
"onUpdate:modelValue": r[9] ||= (e) => c("color", e)
|
|
2610
2680
|
}, null, 8, ["model-value"])]),
|
|
2611
|
-
_("div",
|
|
2681
|
+
_("div", Jo, [_("label", { class: p(T(W)) }, D(T(a).table.textAlign), 3), k(Y, {
|
|
2612
2682
|
options: [
|
|
2613
2683
|
{
|
|
2614
2684
|
value: "left",
|
|
2615
2685
|
label: T(a).title.alignLeft,
|
|
2616
|
-
icon: T(
|
|
2686
|
+
icon: T($e)
|
|
2617
2687
|
},
|
|
2618
2688
|
{
|
|
2619
2689
|
value: "center",
|
|
2620
2690
|
label: T(a).title.alignCenter,
|
|
2621
|
-
icon: T(
|
|
2691
|
+
icon: T(Qe)
|
|
2622
2692
|
},
|
|
2623
2693
|
{
|
|
2624
2694
|
value: "right",
|
|
2625
2695
|
label: T(a).title.alignRight,
|
|
2626
|
-
icon: T(
|
|
2696
|
+
icon: T(Ze)
|
|
2627
2697
|
}
|
|
2628
2698
|
],
|
|
2629
2699
|
"model-value": t.block.textAlign,
|
|
@@ -2631,7 +2701,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2631
2701
|
}, null, 8, ["options", "model-value"])])
|
|
2632
2702
|
], 64));
|
|
2633
2703
|
}
|
|
2634
|
-
}),
|
|
2704
|
+
}), Xo = { class: "tpl:mb-3.5" }, Zo = ["value"], Qo = { value: 1 }, $o = { value: 2 }, es = { value: 3 }, ts = { value: 4 }, ns = { class: "tpl:mb-3.5" }, rs = ["value"], is = { value: "" }, as = ["value"], os = { class: "tpl:mb-3.5" }, ss = { class: "tpl:mb-3.5" }, cs = /* @__PURE__ */ m({
|
|
2635
2705
|
__name: "TitleToolbar",
|
|
2636
2706
|
props: {
|
|
2637
2707
|
block: {},
|
|
@@ -2639,49 +2709,49 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2639
2709
|
},
|
|
2640
2710
|
emits: ["update"],
|
|
2641
2711
|
setup(t, { emit: n }) {
|
|
2642
|
-
let r = n, { t: i } =
|
|
2712
|
+
let r = n, { t: i } = V();
|
|
2643
2713
|
function a(e, t) {
|
|
2644
2714
|
r("update", { [e]: t });
|
|
2645
2715
|
}
|
|
2646
2716
|
return (n, r) => (e(), v(y, null, [
|
|
2647
|
-
_("div",
|
|
2648
|
-
class: p(T(
|
|
2717
|
+
_("div", Xo, [_("label", { class: p(T(W)) }, D(T(i).title.level), 3), _("select", {
|
|
2718
|
+
class: p(T(U)),
|
|
2649
2719
|
value: t.block.level,
|
|
2650
2720
|
onChange: r[0] ||= (e) => a("level", Number(e.target.value))
|
|
2651
2721
|
}, [
|
|
2652
|
-
_("option",
|
|
2653
|
-
_("option",
|
|
2654
|
-
_("option",
|
|
2655
|
-
_("option",
|
|
2656
|
-
], 42,
|
|
2657
|
-
_("div",
|
|
2658
|
-
class: p(T(
|
|
2722
|
+
_("option", Qo, D(T(i).title.heading1), 1),
|
|
2723
|
+
_("option", $o, D(T(i).title.heading2), 1),
|
|
2724
|
+
_("option", es, D(T(i).title.heading3), 1),
|
|
2725
|
+
_("option", ts, D(T(i).title.heading4), 1)
|
|
2726
|
+
], 42, Zo)]),
|
|
2727
|
+
_("div", ns, [_("label", { class: p(T(W)) }, D(T(i).title.fontFamily), 3), _("select", {
|
|
2728
|
+
class: p(T(U)),
|
|
2659
2729
|
value: t.block.fontFamily || "",
|
|
2660
2730
|
onChange: r[1] ||= (e) => a("fontFamily", e.target.value || void 0)
|
|
2661
|
-
}, [_("option",
|
|
2731
|
+
}, [_("option", is, D(T(i).title.inheritFont), 1), (e(!0), v(y, null, o(t.fontFamilies, (t) => (e(), v("option", {
|
|
2662
2732
|
key: t.value,
|
|
2663
2733
|
value: t.value
|
|
2664
|
-
}, D(t.label), 9,
|
|
2665
|
-
_("div",
|
|
2734
|
+
}, D(t.label), 9, as))), 128))], 42, rs)]),
|
|
2735
|
+
_("div", os, [_("label", { class: p(T(W)) }, D(T(i).title.color), 3), k(q, {
|
|
2666
2736
|
"model-value": t.block.color,
|
|
2667
2737
|
"onUpdate:modelValue": r[2] ||= (e) => a("color", e)
|
|
2668
2738
|
}, null, 8, ["model-value"])]),
|
|
2669
|
-
_("div",
|
|
2739
|
+
_("div", ss, [_("label", { class: p(T(W)) }, D(T(i).title.align), 3), k(Y, {
|
|
2670
2740
|
options: [
|
|
2671
2741
|
{
|
|
2672
2742
|
value: "left",
|
|
2673
2743
|
label: T(i).title.alignLeft,
|
|
2674
|
-
icon: T(
|
|
2744
|
+
icon: T($e)
|
|
2675
2745
|
},
|
|
2676
2746
|
{
|
|
2677
2747
|
value: "center",
|
|
2678
2748
|
label: T(i).title.alignCenter,
|
|
2679
|
-
icon: T(
|
|
2749
|
+
icon: T(Qe)
|
|
2680
2750
|
},
|
|
2681
2751
|
{
|
|
2682
2752
|
value: "right",
|
|
2683
2753
|
label: T(i).title.alignRight,
|
|
2684
|
-
icon: T(
|
|
2754
|
+
icon: T(Ze)
|
|
2685
2755
|
}
|
|
2686
2756
|
],
|
|
2687
2757
|
"model-value": t.block.textAlign,
|
|
@@ -2689,22 +2759,22 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2689
2759
|
}, null, 8, ["options", "model-value"])])
|
|
2690
2760
|
], 64));
|
|
2691
2761
|
}
|
|
2692
|
-
}),
|
|
2762
|
+
}), ls = { class: "tpl:mb-3.5" }, us = {
|
|
2693
2763
|
key: 0,
|
|
2694
2764
|
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
|
-
},
|
|
2765
|
+
}, ds = ["checked"], fs = {
|
|
2696
2766
|
key: 0,
|
|
2697
2767
|
class: "tpl:mb-3.5"
|
|
2698
|
-
},
|
|
2768
|
+
}, ps = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ms = [
|
|
2699
2769
|
"value",
|
|
2700
2770
|
"placeholder",
|
|
2701
2771
|
"title"
|
|
2702
|
-
],
|
|
2772
|
+
], hs = { class: "tpl:mb-3.5" }, gs = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, _s = { class: "tpl:mb-3.5" }, vs = { class: "tpl:mb-3.5" }, ys = ["value"], bs = { value: "full" }, xs = { class: "tpl:mb-3.5" }, Ss = /* @__PURE__ */ m({
|
|
2703
2773
|
__name: "VideoToolbar",
|
|
2704
2774
|
props: { block: {} },
|
|
2705
2775
|
emits: ["update"],
|
|
2706
2776
|
setup(t, { emit: n }) {
|
|
2707
|
-
let r = t, i = n, { t: a } =
|
|
2777
|
+
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
2778
|
m.value = !1;
|
|
2709
2779
|
}, 1e3, { immediate: !1 });
|
|
2710
2780
|
function x(e, t) {
|
|
@@ -2715,32 +2785,32 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2715
2785
|
c.alive && e && (x("thumbnailUrl", e.url), m.value = !0, h());
|
|
2716
2786
|
}
|
|
2717
2787
|
return (n, r) => (e(), v(y, null, [
|
|
2718
|
-
_("div",
|
|
2719
|
-
_("label", { class: p(T(
|
|
2720
|
-
k(
|
|
2788
|
+
_("div", ls, [
|
|
2789
|
+
_("label", { class: p(T(W)) }, D(T(a).video.videoUrl), 3),
|
|
2790
|
+
k(Z, {
|
|
2721
2791
|
"model-value": t.block.url,
|
|
2722
2792
|
type: "url",
|
|
2723
2793
|
placeholder: T(a).video.videoUrlPlaceholder,
|
|
2724
2794
|
"onUpdate:modelValue": r[0] ||= (e) => x("url", e)
|
|
2725
2795
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2726
|
-
t.block.url ? (e(), v("label",
|
|
2796
|
+
t.block.url ? (e(), v("label", us, [_("input", {
|
|
2727
2797
|
type: "checkbox",
|
|
2728
2798
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2729
2799
|
checked: t.block.openInNewTab ?? !1,
|
|
2730
2800
|
onChange: r[1] ||= (e) => x("openInNewTab", e.target.checked)
|
|
2731
|
-
}, null, 40,
|
|
2801
|
+
}, null, 40, ds), d(" " + D(T(a).video.openInNewTab), 1)])) : b("", !0)
|
|
2732
2802
|
]),
|
|
2733
|
-
f.value ? (e(), v("div",
|
|
2803
|
+
f.value ? (e(), v("div", fs, [_("label", { class: p(T(W)) }, [d(D(T(a).video.placeholderUrl) + " ", 1), _("span", ps, D(T(a).video.optional), 1)], 2), _("input", {
|
|
2734
2804
|
type: "url",
|
|
2735
|
-
class: p(T(
|
|
2805
|
+
class: p(T(U)),
|
|
2736
2806
|
value: t.block.placeholderUrl || "",
|
|
2737
2807
|
placeholder: T(a).video.placeholderUrlPlaceholder,
|
|
2738
2808
|
title: T(a).video.placeholderUrlTooltip,
|
|
2739
2809
|
onInput: r[2] ||= (e) => x("placeholderUrl", e.target.value)
|
|
2740
|
-
}, null, 42,
|
|
2741
|
-
_("div",
|
|
2742
|
-
_("label", { class: p(T(
|
|
2743
|
-
k(
|
|
2810
|
+
}, null, 42, ms)])) : b("", !0),
|
|
2811
|
+
_("div", hs, [
|
|
2812
|
+
_("label", { class: p(T(W)) }, [d(D(T(a).video.customThumbnail) + " ", 1), _("span", gs, D(T(a).video.optional), 1)], 2),
|
|
2813
|
+
k(Z, {
|
|
2744
2814
|
"model-value": t.block.thumbnailUrl,
|
|
2745
2815
|
type: "url",
|
|
2746
2816
|
placeholder: T(a).video.thumbnailPlaceholder,
|
|
@@ -2760,28 +2830,28 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2760
2830
|
"background-color": "var(--tpl-bg)"
|
|
2761
2831
|
},
|
|
2762
2832
|
onClick: S
|
|
2763
|
-
}, [k(T(
|
|
2833
|
+
}, [k(T(he), {
|
|
2764
2834
|
size: 14,
|
|
2765
2835
|
"stroke-width": 1.5
|
|
2766
2836
|
}), d(" " + D(T(a).image.browseMedia), 1)])) : b("", !0)
|
|
2767
2837
|
]),
|
|
2768
|
-
_("div",
|
|
2838
|
+
_("div", _s, [_("label", { class: p(T(W)) }, D(T(a).video.altText), 3), k(Z, {
|
|
2769
2839
|
"model-value": t.block.alt,
|
|
2770
2840
|
type: "text",
|
|
2771
2841
|
placeholder: T(a).video.altTextPlaceholder,
|
|
2772
2842
|
"onUpdate:modelValue": r[4] ||= (e) => x("alt", e)
|
|
2773
2843
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2774
|
-
_("div",
|
|
2775
|
-
class: p(T(
|
|
2844
|
+
_("div", vs, [_("label", { class: p(T(W)) }, D(T(a).video.width), 3), _("select", {
|
|
2845
|
+
class: p(T(U)),
|
|
2776
2846
|
value: t.block.width,
|
|
2777
2847
|
onChange: r[5] ||= (e) => x("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2778
2848
|
}, [
|
|
2779
|
-
_("option",
|
|
2849
|
+
_("option", bs, D(T(a).video.fullWidth), 1),
|
|
2780
2850
|
r[7] ||= _("option", { value: "300" }, "300px", -1),
|
|
2781
2851
|
r[8] ||= _("option", { value: "400" }, "400px", -1),
|
|
2782
2852
|
r[9] ||= _("option", { value: "500" }, "500px", -1)
|
|
2783
|
-
], 42,
|
|
2784
|
-
_("div",
|
|
2853
|
+
], 42, ys)]),
|
|
2854
|
+
_("div", xs, [_("label", { class: p(T(W)) }, D(T(a).title.align), 3), k(Y, {
|
|
2785
2855
|
options: [
|
|
2786
2856
|
{
|
|
2787
2857
|
value: "left",
|
|
@@ -2801,7 +2871,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2801
2871
|
}, null, 8, ["options", "model-value"])])
|
|
2802
2872
|
], 64));
|
|
2803
2873
|
}
|
|
2804
|
-
}),
|
|
2874
|
+
}), Cs = ["aria-label"], ws = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Ts = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Es = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ds = { class: "tpl:flex tpl:gap-1" }, Os = ["title"], ks = ["title"], As = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, js = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
2805
2875
|
__name: "Toolbar",
|
|
2806
2876
|
props: { block: {} },
|
|
2807
2877
|
emits: [
|
|
@@ -2810,7 +2880,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2810
2880
|
"duplicate"
|
|
2811
2881
|
],
|
|
2812
2882
|
setup(t, { emit: n }) {
|
|
2813
|
-
let i = j(() => import("./CountdownToolbar-
|
|
2883
|
+
let i = j(() => import("./CountdownToolbar-CDy9_2Yj.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
2884
|
if (d.value) return l.find((e) => e.type === a.block.customType);
|
|
2815
2885
|
}), p = g(() => d.value ? f.value?.name ?? a.block.customType : ne(u.value, s)), m = c.fonts;
|
|
2816
2886
|
function h(e) {
|
|
@@ -2819,7 +2889,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2819
2889
|
return (n, a) => (e(), v("aside", {
|
|
2820
2890
|
"aria-label": T(s).landmarks.blockToolbar,
|
|
2821
2891
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2822
|
-
}, [_("div",
|
|
2892
|
+
}, [_("div", ws, [_("div", Ts, [T(Ye)[u.value] ? (e(), C(r(T(Ye)[u.value]), {
|
|
2823
2893
|
key: 0,
|
|
2824
2894
|
size: 16,
|
|
2825
2895
|
"stroke-width": 1.5
|
|
@@ -2827,70 +2897,70 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2827
2897
|
key: 1,
|
|
2828
2898
|
size: 16,
|
|
2829
2899
|
"stroke-width": 1.5
|
|
2830
|
-
})) : b("", !0), _("h3",
|
|
2900
|
+
})) : b("", !0), _("h3", Es, D(p.value), 1)]), _("div", Ds, [_("button", {
|
|
2831
2901
|
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
2902
|
title: T(s).toolbar.duplicate,
|
|
2833
2903
|
onClick: a[0] ||= (e) => o("duplicate")
|
|
2834
|
-
}, [k(T(
|
|
2904
|
+
}, [k(T(me), {
|
|
2835
2905
|
size: 14,
|
|
2836
2906
|
"stroke-width": 2
|
|
2837
|
-
})], 8,
|
|
2907
|
+
})], 8, Os), _("button", {
|
|
2838
2908
|
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
2909
|
title: T(s).toolbar.delete,
|
|
2840
2910
|
onClick: a[1] ||= (e) => o("delete")
|
|
2841
|
-
}, [k(T(
|
|
2911
|
+
}, [k(T(st), {
|
|
2842
2912
|
size: 14,
|
|
2843
2913
|
"stroke-width": 2
|
|
2844
|
-
})], 8,
|
|
2914
|
+
})], 8, ks)])]), _("div", As, [d.value ? (e(), C(Qi, {
|
|
2845
2915
|
key: 0,
|
|
2846
2916
|
block: t.block,
|
|
2847
2917
|
onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
|
|
2848
2918
|
onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
|
|
2849
|
-
}, null, 8, ["block"])) : u.value === "section" ? (e(), C(
|
|
2919
|
+
}, null, 8, ["block"])) : u.value === "section" ? (e(), C(Ga, {
|
|
2850
2920
|
key: 1,
|
|
2851
2921
|
block: t.block,
|
|
2852
2922
|
onUpdate: h
|
|
2853
|
-
}, null, 8, ["block"])) : u.value === "title" ? (e(), C(
|
|
2923
|
+
}, null, 8, ["block"])) : u.value === "title" ? (e(), C(cs, {
|
|
2854
2924
|
key: 2,
|
|
2855
2925
|
block: t.block,
|
|
2856
2926
|
"font-families": T(m),
|
|
2857
2927
|
onUpdate: h
|
|
2858
|
-
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (e(), v(y, { key: 3 }, [], 64)) : u.value === "image" ? (e(), C(
|
|
2928
|
+
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (e(), v(y, { key: 3 }, [], 64)) : u.value === "image" ? (e(), C(Da, {
|
|
2859
2929
|
key: 4,
|
|
2860
2930
|
block: t.block,
|
|
2861
2931
|
onUpdate: h
|
|
2862
|
-
}, null, 8, ["block"])) : u.value === "video" ? (e(), C(
|
|
2932
|
+
}, null, 8, ["block"])) : u.value === "video" ? (e(), C(Ss, {
|
|
2863
2933
|
key: 5,
|
|
2864
2934
|
block: t.block,
|
|
2865
2935
|
onUpdate: h
|
|
2866
|
-
}, null, 8, ["block"])) : u.value === "button" ? (e(), C(
|
|
2936
|
+
}, null, 8, ["block"])) : u.value === "button" ? (e(), C(wr, {
|
|
2867
2937
|
key: 6,
|
|
2868
2938
|
block: t.block,
|
|
2869
2939
|
"font-families": T(m),
|
|
2870
2940
|
onUpdate: h
|
|
2871
|
-
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (e(), C(
|
|
2941
|
+
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (e(), C(ia, {
|
|
2872
2942
|
key: 7,
|
|
2873
2943
|
block: t.block,
|
|
2874
2944
|
onUpdate: h
|
|
2875
|
-
}, null, 8, ["block"])) : u.value === "social" ? (e(), C(
|
|
2945
|
+
}, null, 8, ["block"])) : u.value === "social" ? (e(), C(uo, {
|
|
2876
2946
|
key: 8,
|
|
2877
2947
|
block: t.block,
|
|
2878
2948
|
onUpdate: h
|
|
2879
|
-
}, null, 8, ["block"])) : u.value === "menu" ? (e(), C(
|
|
2949
|
+
}, null, 8, ["block"])) : u.value === "menu" ? (e(), C(za, {
|
|
2880
2950
|
key: 9,
|
|
2881
2951
|
block: t.block,
|
|
2882
2952
|
"font-families": T(m),
|
|
2883
2953
|
onUpdate: h
|
|
2884
|
-
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (e(), C(
|
|
2954
|
+
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (e(), C(Yo, {
|
|
2885
2955
|
key: 10,
|
|
2886
2956
|
block: t.block,
|
|
2887
2957
|
"font-families": T(m),
|
|
2888
2958
|
onUpdate: h
|
|
2889
|
-
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (e(), C(
|
|
2959
|
+
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (e(), C(go, {
|
|
2890
2960
|
key: 11,
|
|
2891
2961
|
block: t.block,
|
|
2892
2962
|
onUpdate: h
|
|
2893
|
-
}, null, 8, ["block"])) : u.value === "html" ? (e(), C(
|
|
2963
|
+
}, null, 8, ["block"])) : u.value === "html" ? (e(), C(ca, {
|
|
2894
2964
|
key: 12,
|
|
2895
2965
|
block: t.block,
|
|
2896
2966
|
onUpdate: h
|
|
@@ -2899,52 +2969,52 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2899
2969
|
block: t.block,
|
|
2900
2970
|
"font-families": T(m),
|
|
2901
2971
|
onUpdate: h
|
|
2902
|
-
}, null, 8, ["block", "font-families"])) : b("", !0), k(
|
|
2972
|
+
}, null, 8, ["block", "font-families"])) : b("", !0), k(mi, {
|
|
2903
2973
|
block: t.block,
|
|
2904
2974
|
"is-first-section": u.value === "paragraph",
|
|
2905
2975
|
onUpdate: h
|
|
2906
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
2976
|
+
}, null, 8, ["block", "is-first-section"])])], 8, Cs));
|
|
2907
2977
|
}
|
|
2908
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
2978
|
+
}), [["__scopeId", "data-v-2ac88283"]]), Ms = ["aria-label"], Ns = {
|
|
2909
2979
|
role: "tablist",
|
|
2910
2980
|
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
|
-
},
|
|
2981
|
+
}, Ps = [
|
|
2912
2982
|
"aria-selected",
|
|
2913
2983
|
"aria-label",
|
|
2914
2984
|
"title"
|
|
2915
|
-
],
|
|
2985
|
+
], Fs = { key: 0 }, Is = [
|
|
2916
2986
|
"aria-selected",
|
|
2917
2987
|
"aria-label",
|
|
2918
2988
|
"title"
|
|
2919
|
-
],
|
|
2989
|
+
], Ls = { key: 0 }, Rs = [
|
|
2920
2990
|
"aria-selected",
|
|
2921
2991
|
"aria-label",
|
|
2922
2992
|
"title"
|
|
2923
|
-
],
|
|
2993
|
+
], zs = { key: 0 }, Bs = {
|
|
2924
2994
|
key: 1,
|
|
2925
2995
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
2926
|
-
},
|
|
2996
|
+
}, Vs = {
|
|
2927
2997
|
key: 0,
|
|
2928
2998
|
id: "tpl-tabpanel-content",
|
|
2929
2999
|
role: "tabpanel",
|
|
2930
3000
|
"aria-labelledby": "tpl-tab-content",
|
|
2931
3001
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2932
|
-
},
|
|
3002
|
+
}, Hs = {
|
|
2933
3003
|
key: 1,
|
|
2934
3004
|
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
|
-
},
|
|
3005
|
+
}, Us = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, Ws = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Gs = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, Ks = {
|
|
2936
3006
|
key: 1,
|
|
2937
3007
|
id: "tpl-tabpanel-settings",
|
|
2938
3008
|
role: "tabpanel",
|
|
2939
3009
|
"aria-labelledby": "tpl-tab-settings",
|
|
2940
3010
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2941
|
-
},
|
|
3011
|
+
}, qs = {
|
|
2942
3012
|
key: 2,
|
|
2943
3013
|
id: "tpl-tabpanel-issues",
|
|
2944
3014
|
role: "tabpanel",
|
|
2945
3015
|
"aria-labelledby": "tpl-tab-issues",
|
|
2946
3016
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2947
|
-
},
|
|
3017
|
+
}, Js = /* @__PURE__ */ m({
|
|
2948
3018
|
__name: "RightSidebar",
|
|
2949
3019
|
props: {
|
|
2950
3020
|
selectedBlock: {},
|
|
@@ -2958,7 +3028,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2958
3028
|
"update-settings"
|
|
2959
3029
|
],
|
|
2960
3030
|
setup(t, { emit: n }) {
|
|
2961
|
-
let r = j(() => import("./IssuesPanel-
|
|
3031
|
+
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
3032
|
function m(e) {
|
|
2963
3033
|
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
3034
|
}
|
|
@@ -2974,7 +3044,7 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2974
3044
|
"aria-label": T(s).landmarks.rightSidebar,
|
|
2975
3045
|
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
3046
|
}, [
|
|
2977
|
-
_("div",
|
|
3047
|
+
_("div", Ns, [
|
|
2978
3048
|
_("button", {
|
|
2979
3049
|
id: "tpl-tab-content",
|
|
2980
3050
|
role: "tab",
|
|
@@ -2985,10 +3055,10 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2985
3055
|
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
3056
|
style: S(h("content")),
|
|
2987
3057
|
onClick: i[0] ||= (e) => c.value = "content"
|
|
2988
|
-
}, [k(T(
|
|
3058
|
+
}, [k(T(At), {
|
|
2989
3059
|
size: 14,
|
|
2990
3060
|
"stroke-width": 2
|
|
2991
|
-
}), c.value === "content" ? (e(), v("span",
|
|
3061
|
+
}), c.value === "content" ? (e(), v("span", Fs, D(T(s).sidebar.content), 1)) : b("", !0)], 14, Ps),
|
|
2992
3062
|
_("button", {
|
|
2993
3063
|
id: "tpl-tab-settings",
|
|
2994
3064
|
role: "tab",
|
|
@@ -2999,10 +3069,10 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
2999
3069
|
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
3070
|
style: S(h("settings")),
|
|
3001
3071
|
onClick: i[1] ||= (e) => c.value = "settings"
|
|
3002
|
-
}, [k(T(
|
|
3072
|
+
}, [k(T(Mt), {
|
|
3003
3073
|
size: 14,
|
|
3004
3074
|
"stroke-width": 1.5
|
|
3005
|
-
}), c.value === "settings" ? (e(), v("span",
|
|
3075
|
+
}), c.value === "settings" ? (e(), v("span", Ls, D(T(s).sidebar.settings), 1)) : b("", !0)], 14, Is),
|
|
3006
3076
|
d.value ? (e(), v("button", {
|
|
3007
3077
|
key: 0,
|
|
3008
3078
|
id: "tpl-tab-issues",
|
|
@@ -3015,64 +3085,64 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3015
3085
|
style: S(h("issues")),
|
|
3016
3086
|
onClick: i[2] ||= (e) => c.value = "issues"
|
|
3017
3087
|
}, [
|
|
3018
|
-
k(T(
|
|
3088
|
+
k(T(at), {
|
|
3019
3089
|
size: 14,
|
|
3020
3090
|
"stroke-width": 1.5
|
|
3021
3091
|
}),
|
|
3022
|
-
c.value === "issues" ? (e(), v("span",
|
|
3023
|
-
f.value > 0 ? (e(), v("span",
|
|
3024
|
-
], 14,
|
|
3092
|
+
c.value === "issues" ? (e(), v("span", zs, D(T(s).issues.panelTabLabel), 1)) : b("", !0),
|
|
3093
|
+
f.value > 0 ? (e(), v("span", Bs, D(f.value), 1)) : b("", !0)
|
|
3094
|
+
], 14, Rs)) : b("", !0)
|
|
3025
3095
|
]),
|
|
3026
|
-
c.value === "content" ? (e(), v("div",
|
|
3096
|
+
c.value === "content" ? (e(), v("div", Vs, [t.selectedBlock ? (e(), C(js, {
|
|
3027
3097
|
key: 0,
|
|
3028
3098
|
block: t.selectedBlock,
|
|
3029
3099
|
onUpdate: i[3] ||= (e) => o("update-block", e),
|
|
3030
3100
|
onDelete: i[4] ||= (e) => o("delete-block"),
|
|
3031
3101
|
onDuplicate: i[5] ||= (e) => o("duplicate-block")
|
|
3032
|
-
}, null, 8, ["block"])) : (e(), v("div",
|
|
3033
|
-
_("div",
|
|
3102
|
+
}, null, 8, ["block"])) : (e(), v("div", Hs, [
|
|
3103
|
+
_("div", Us, [k(T(Et), {
|
|
3034
3104
|
size: 40,
|
|
3035
3105
|
"stroke-width": 1.5
|
|
3036
3106
|
})]),
|
|
3037
|
-
_("h3",
|
|
3038
|
-
_("p",
|
|
3107
|
+
_("h3", Ws, D(T(s).sidebar.noSelection), 1),
|
|
3108
|
+
_("p", Gs, D(T(s).sidebar.noSelectionHint), 1)
|
|
3039
3109
|
]))])) : b("", !0),
|
|
3040
|
-
c.value === "settings" ? (e(), v("div",
|
|
3110
|
+
c.value === "settings" ? (e(), v("div", Ks, [k(Jn, {
|
|
3041
3111
|
settings: t.settings,
|
|
3042
3112
|
onUpdate: i[6] ||= (e) => o("update-settings", e)
|
|
3043
3113
|
}, null, 8, ["settings"])])) : b("", !0),
|
|
3044
|
-
c.value === "issues" && d.value ? (e(), v("div",
|
|
3045
|
-
], 10,
|
|
3114
|
+
c.value === "issues" && d.value ? (e(), v("div", qs, [k(T(r))])) : b("", !0)
|
|
3115
|
+
], 10, Ms));
|
|
3046
3116
|
}
|
|
3047
|
-
}),
|
|
3117
|
+
}), Ys = {
|
|
3048
3118
|
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
3119
|
style: { "z-index": "10001" },
|
|
3050
3120
|
role: "status",
|
|
3051
3121
|
"data-testid": "small-screen-notice"
|
|
3052
|
-
},
|
|
3122
|
+
}, Xs = { class: "tpl:text-[var(--tpl-text-dim)]" }, Zs = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Qs = { class: "tpl:m-0 tpl:max-w-sm tpl:text-sm tpl:leading-normal" }, $s = /* @__PURE__ */ m({
|
|
3053
3123
|
__name: "SmallScreenNotice",
|
|
3054
3124
|
setup(t) {
|
|
3055
|
-
let { t: n } =
|
|
3056
|
-
return (t, r) => (e(), v("div",
|
|
3057
|
-
_("div",
|
|
3125
|
+
let { t: n } = V();
|
|
3126
|
+
return (t, r) => (e(), v("div", Ys, [
|
|
3127
|
+
_("div", Xs, [k(T(Ot), {
|
|
3058
3128
|
size: 48,
|
|
3059
3129
|
"stroke-width": 1.5
|
|
3060
3130
|
})]),
|
|
3061
|
-
_("h2",
|
|
3062
|
-
_("p",
|
|
3131
|
+
_("h2", Zs, D(T(n).smallScreen.title), 1),
|
|
3132
|
+
_("p", Qs, D(T(n).smallScreen.message), 1)
|
|
3063
3133
|
]));
|
|
3064
3134
|
}
|
|
3065
|
-
}),
|
|
3135
|
+
}), ec = ["aria-label"], tc = [
|
|
3066
3136
|
"aria-checked",
|
|
3067
3137
|
"aria-label",
|
|
3068
3138
|
"title",
|
|
3069
3139
|
"onClick"
|
|
3070
|
-
],
|
|
3140
|
+
], nc = /* @__PURE__ */ m({
|
|
3071
3141
|
__name: "ViewportToggle",
|
|
3072
3142
|
props: { viewport: {} },
|
|
3073
3143
|
emits: ["change"],
|
|
3074
3144
|
setup(t, { emit: n }) {
|
|
3075
|
-
let r = t, i = n, { t: a } =
|
|
3145
|
+
let r = t, i = n, { t: a } = V(), s = g(() => [{
|
|
3076
3146
|
value: "desktop",
|
|
3077
3147
|
label: a.viewport.desktop
|
|
3078
3148
|
}, {
|
|
@@ -3109,26 +3179,26 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3109
3179
|
}),
|
|
3110
3180
|
title: n.label,
|
|
3111
3181
|
onClick: (e) => i("change", n.value)
|
|
3112
|
-
}, [n.value === "desktop" ? (e(), C(T(
|
|
3182
|
+
}, [n.value === "desktop" ? (e(), C(T(Ot), {
|
|
3113
3183
|
key: 0,
|
|
3114
3184
|
size: 18,
|
|
3115
3185
|
"stroke-width": 1.5
|
|
3116
|
-
})) : (e(), C(T(
|
|
3186
|
+
})) : (e(), C(T(Nt), {
|
|
3117
3187
|
key: 1,
|
|
3118
3188
|
size: 18,
|
|
3119
3189
|
"stroke-width": 1.5
|
|
3120
|
-
})), _("span", null, D(n.label), 1)], 12,
|
|
3190
|
+
})), _("span", null, D(n.label), 1)], 12, tc))), 128))], 12, ec));
|
|
3121
3191
|
}
|
|
3122
|
-
}),
|
|
3192
|
+
}), rc = [
|
|
3123
3193
|
"aria-label",
|
|
3124
3194
|
"title",
|
|
3125
3195
|
"aria-pressed"
|
|
3126
|
-
],
|
|
3196
|
+
], ic = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
3127
3197
|
__name: "PreviewToggle",
|
|
3128
3198
|
props: { previewMode: { type: Boolean } },
|
|
3129
3199
|
emits: ["change"],
|
|
3130
3200
|
setup(t, { emit: n }) {
|
|
3131
|
-
let r = n, { t: i } =
|
|
3201
|
+
let r = n, { t: i } = V();
|
|
3132
3202
|
return (n, a) => (e(), v("button", {
|
|
3133
3203
|
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
3204
|
style: S({
|
|
@@ -3146,28 +3216,28 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3146
3216
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3147
3217
|
mode: "out-in"
|
|
3148
3218
|
}, {
|
|
3149
|
-
default: M(() => [t.previewMode ? (e(), C(T(
|
|
3219
|
+
default: M(() => [t.previewMode ? (e(), C(T(tt), {
|
|
3150
3220
|
key: "eye",
|
|
3151
3221
|
size: 18,
|
|
3152
3222
|
"stroke-width": 1.5
|
|
3153
|
-
})) : (e(), C(T(
|
|
3223
|
+
})) : (e(), C(T(z), {
|
|
3154
3224
|
key: "eye-off",
|
|
3155
3225
|
size: 18,
|
|
3156
3226
|
"stroke-width": 1.5
|
|
3157
3227
|
}))]),
|
|
3158
3228
|
_: 1
|
|
3159
|
-
})], 12,
|
|
3229
|
+
})], 12, rc));
|
|
3160
3230
|
}
|
|
3161
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3231
|
+
}), [["__scopeId", "data-v-af87d02a"]]), ac = [
|
|
3162
3232
|
"aria-label",
|
|
3163
3233
|
"title",
|
|
3164
3234
|
"aria-pressed"
|
|
3165
|
-
],
|
|
3235
|
+
], oc = /*#__PURE__*/ lt(/* @__PURE__ */ m({
|
|
3166
3236
|
__name: "DarkModeToggle",
|
|
3167
3237
|
props: { darkMode: { type: Boolean } },
|
|
3168
3238
|
emits: ["change"],
|
|
3169
3239
|
setup(t, { emit: n }) {
|
|
3170
|
-
let r = n, { t: i } =
|
|
3240
|
+
let r = n, { t: i } = V();
|
|
3171
3241
|
return (n, a) => (e(), v("button", {
|
|
3172
3242
|
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
3243
|
style: S({
|
|
@@ -3185,37 +3255,37 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3185
3255
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3186
3256
|
mode: "out-in"
|
|
3187
3257
|
}, {
|
|
3188
|
-
default: M(() => [t.darkMode ? (e(), C(T(
|
|
3258
|
+
default: M(() => [t.darkMode ? (e(), C(T(kt), {
|
|
3189
3259
|
key: "moon",
|
|
3190
3260
|
size: 18,
|
|
3191
3261
|
"stroke-width": 1.5
|
|
3192
|
-
})) : (e(), C(T(
|
|
3262
|
+
})) : (e(), C(T(Ft), {
|
|
3193
3263
|
key: "sun",
|
|
3194
3264
|
size: 18,
|
|
3195
3265
|
"stroke-width": 1.5
|
|
3196
3266
|
}))]),
|
|
3197
3267
|
_: 1
|
|
3198
|
-
})], 12,
|
|
3268
|
+
})], 12, ac));
|
|
3199
3269
|
}
|
|
3200
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3270
|
+
}), [["__scopeId", "data-v-f8694f76"]]), sc = {
|
|
3201
3271
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3202
3272
|
style: {
|
|
3203
3273
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3204
3274
|
"backdrop-filter": "blur(8px)",
|
|
3205
3275
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3206
3276
|
}
|
|
3207
|
-
},
|
|
3277
|
+
}, cc = {
|
|
3208
3278
|
href: "https://github.com/templatical/sdk",
|
|
3209
3279
|
target: "_blank",
|
|
3210
3280
|
rel: "noopener noreferrer",
|
|
3211
3281
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3212
3282
|
style: { "text-decoration": "none" }
|
|
3213
|
-
},
|
|
3283
|
+
}, lc = /* @__PURE__ */ m({
|
|
3214
3284
|
__name: "EditorFooter",
|
|
3215
3285
|
props: { positionClass: {} },
|
|
3216
3286
|
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",
|
|
3287
|
+
let { t: n } = V();
|
|
3288
|
+
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", sc, [
|
|
3219
3289
|
_("span", null, D(T(n).footer.poweredBy), 1),
|
|
3220
3290
|
i[0] ||= _("a", {
|
|
3221
3291
|
href: "https://templatical.com",
|
|
@@ -3230,32 +3300,32 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3230
3300
|
alt: ""
|
|
3231
3301
|
}), d(" Templatical ")], -1),
|
|
3232
3302
|
i[1] ||= _("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3233
|
-
_("a",
|
|
3303
|
+
_("a", cc, D(T(n).footer.openSource), 1)
|
|
3234
3304
|
])], 2));
|
|
3235
3305
|
}
|
|
3236
|
-
}),
|
|
3306
|
+
}), uc = ["aria-labelledby", "data-tpl-theme"], dc = { 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" }, fc = ["id"], pc = ["aria-label"], mc = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, hc = [
|
|
3237
3307
|
"id",
|
|
3238
3308
|
"placeholder",
|
|
3239
3309
|
"aria-label",
|
|
3240
3310
|
"aria-activedescendant"
|
|
3241
|
-
],
|
|
3311
|
+
], gc = {
|
|
3242
3312
|
key: 0,
|
|
3243
3313
|
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
3314
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3245
|
-
},
|
|
3315
|
+
}, _c = ["data-group-name", "onClick"], vc = ["aria-label"], yc = {
|
|
3246
3316
|
key: 0,
|
|
3247
3317
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3248
3318
|
"data-testid": "merge-tag-picker-empty"
|
|
3249
|
-
},
|
|
3319
|
+
}, bc = {
|
|
3250
3320
|
key: 1,
|
|
3251
3321
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3252
3322
|
"data-testid": "merge-tag-picker-empty"
|
|
3253
|
-
},
|
|
3323
|
+
}, xc = [
|
|
3254
3324
|
"aria-expanded",
|
|
3255
3325
|
"data-group-name",
|
|
3256
3326
|
"data-group-collapsed",
|
|
3257
3327
|
"onClick"
|
|
3258
|
-
],
|
|
3328
|
+
], Sc = { class: "tpl:ml-1 tpl:font-normal" }, Cc = [
|
|
3259
3329
|
"id",
|
|
3260
3330
|
"aria-selected",
|
|
3261
3331
|
"data-selected",
|
|
@@ -3264,28 +3334,28 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3264
3334
|
"title",
|
|
3265
3335
|
"onMousemove",
|
|
3266
3336
|
"onClick"
|
|
3267
|
-
],
|
|
3337
|
+
], wc = { class: "tpl:text-sm tpl:font-medium" }, Tc = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, Ec = {
|
|
3268
3338
|
key: 0,
|
|
3269
3339
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3270
|
-
},
|
|
3340
|
+
}, $ = "tpl-merge-tag-picker-list", Dc = /* @__PURE__ */ m({
|
|
3271
3341
|
__name: "MergeTagPickerModal",
|
|
3272
3342
|
setup(r) {
|
|
3273
|
-
let i =
|
|
3343
|
+
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
3344
|
function F(e) {
|
|
3275
3345
|
return P.value.has(e);
|
|
3276
3346
|
}
|
|
3277
|
-
function
|
|
3347
|
+
function ee(e) {
|
|
3278
3348
|
let t = new Set(P.value);
|
|
3279
3349
|
t.has(e) ? t.delete(e) : t.add(e), P.value = t, j.value = 0;
|
|
3280
3350
|
}
|
|
3281
|
-
let
|
|
3351
|
+
let I = g(() => {
|
|
3282
3352
|
let e = x.value.trim().toLowerCase();
|
|
3283
3353
|
return e ? i.tags.value.filter((t) => [
|
|
3284
3354
|
t.label,
|
|
3285
3355
|
t.value,
|
|
3286
3356
|
t.description ?? ""
|
|
3287
3357
|
].join(" ").toLowerCase().includes(e)) : i.tags.value;
|
|
3288
|
-
}),
|
|
3358
|
+
}), L = g(() => {
|
|
3289
3359
|
if (!N.value) return [];
|
|
3290
3360
|
let e = s.mergeTag.picker.otherGroup, t = /* @__PURE__ */ new Set(), n = [];
|
|
3291
3361
|
for (let r of i.tags.value) {
|
|
@@ -3293,8 +3363,8 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3293
3363
|
t.has(i) || (t.add(i), n.push(i));
|
|
3294
3364
|
}
|
|
3295
3365
|
return n;
|
|
3296
|
-
}),
|
|
3297
|
-
let e =
|
|
3366
|
+
}), te = g(() => {
|
|
3367
|
+
let e = I.value;
|
|
3298
3368
|
if (!N.value || O.value) return e.map((e, t) => ({
|
|
3299
3369
|
kind: "tag",
|
|
3300
3370
|
tag: e,
|
|
@@ -3319,42 +3389,42 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3319
3389
|
}), a++;
|
|
3320
3390
|
}
|
|
3321
3391
|
return i;
|
|
3322
|
-
}),
|
|
3392
|
+
}), R = g(() => te.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3323
3393
|
a(() => i.isOpen.value, (e) => {
|
|
3324
3394
|
e && (m.value = "", j.value = 0, P.value = /* @__PURE__ */ new Set(), n(() => {
|
|
3325
3395
|
w.value?.focus();
|
|
3326
3396
|
}));
|
|
3327
|
-
}), a(
|
|
3397
|
+
}), a(R, (e) => {
|
|
3328
3398
|
j.value >= e.length && (j.value = Math.max(0, e.length - 1));
|
|
3329
3399
|
});
|
|
3330
|
-
function
|
|
3400
|
+
function z(e) {
|
|
3331
3401
|
i.resolve(e);
|
|
3332
3402
|
}
|
|
3333
|
-
function
|
|
3403
|
+
function ne() {
|
|
3334
3404
|
i.resolve(null);
|
|
3335
3405
|
}
|
|
3336
|
-
function
|
|
3337
|
-
if (
|
|
3406
|
+
function re(e) {
|
|
3407
|
+
if (R.value.length === 0) return;
|
|
3338
3408
|
let t = j.value + e;
|
|
3339
|
-
j.value = Math.max(0, Math.min(
|
|
3409
|
+
j.value = Math.max(0, Math.min(R.value.length - 1, t)), oe();
|
|
3340
3410
|
}
|
|
3341
|
-
let
|
|
3342
|
-
function
|
|
3343
|
-
|
|
3411
|
+
let ie = u(null), ae = u({});
|
|
3412
|
+
function B(e, t) {
|
|
3413
|
+
ae.value[e] = t ?? null;
|
|
3344
3414
|
}
|
|
3345
|
-
function
|
|
3415
|
+
function oe() {
|
|
3346
3416
|
n(() => {
|
|
3347
|
-
let e =
|
|
3417
|
+
let e = ie.value;
|
|
3348
3418
|
e && e.querySelector(`[data-merge-tag-index="${j.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3349
3419
|
});
|
|
3350
3420
|
}
|
|
3351
|
-
function
|
|
3421
|
+
function se(e) {
|
|
3352
3422
|
if (P.value.has(e)) {
|
|
3353
3423
|
let t = new Set(P.value);
|
|
3354
3424
|
t.delete(e), P.value = t;
|
|
3355
3425
|
}
|
|
3356
3426
|
n(() => {
|
|
3357
|
-
let t =
|
|
3427
|
+
let t = ie.value;
|
|
3358
3428
|
if (!t) return;
|
|
3359
3429
|
let n = 0, r = !1;
|
|
3360
3430
|
for (let i of Array.from(t.children)) {
|
|
@@ -3370,55 +3440,55 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3370
3440
|
});
|
|
3371
3441
|
});
|
|
3372
3442
|
}
|
|
3373
|
-
function
|
|
3374
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3375
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3443
|
+
function ce(e) {
|
|
3444
|
+
if (e.key === "ArrowDown") e.preventDefault(), re(1);
|
|
3445
|
+
else if (e.key === "ArrowUp") e.preventDefault(), re(-1);
|
|
3376
3446
|
else if (e.key === "Enter") {
|
|
3377
3447
|
e.preventDefault();
|
|
3378
|
-
let t =
|
|
3379
|
-
t &&
|
|
3448
|
+
let t = R.value[j.value];
|
|
3449
|
+
t && z(t);
|
|
3380
3450
|
}
|
|
3381
3451
|
}
|
|
3382
|
-
function
|
|
3383
|
-
if (
|
|
3452
|
+
function le() {
|
|
3453
|
+
if (R.value.length !== 0) return `${$}-opt-${j.value}`;
|
|
3384
3454
|
}
|
|
3385
|
-
function
|
|
3386
|
-
return `${
|
|
3455
|
+
function ue(e) {
|
|
3456
|
+
return `${$}-opt-${e}`;
|
|
3387
3457
|
}
|
|
3388
|
-
let
|
|
3389
|
-
return (n, r) => (e(), C(
|
|
3458
|
+
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);
|
|
3459
|
+
return (n, r) => (e(), C(xt, {
|
|
3390
3460
|
visible: T(i).isOpen.value,
|
|
3391
|
-
onClose:
|
|
3392
|
-
onKeydown:
|
|
3461
|
+
onClose: ne,
|
|
3462
|
+
onKeydown: ce
|
|
3393
3463
|
}, {
|
|
3394
3464
|
default: M(() => [_("div", {
|
|
3395
3465
|
role: "dialog",
|
|
3396
3466
|
"aria-modal": "true",
|
|
3397
|
-
"aria-labelledby": `${
|
|
3467
|
+
"aria-labelledby": `${$}-title`,
|
|
3398
3468
|
"data-tpl-theme": T(d),
|
|
3399
3469
|
"data-testid": "merge-tag-picker-modal",
|
|
3400
3470
|
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
3471
|
style: S(T(l))
|
|
3402
3472
|
}, [
|
|
3403
|
-
_("header",
|
|
3404
|
-
id: `${
|
|
3473
|
+
_("header", dc, [_("h2", {
|
|
3474
|
+
id: `${$}-title`,
|
|
3405
3475
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3406
|
-
}, D(T(s).mergeTag.picker.title), 9,
|
|
3476
|
+
}, D(T(s).mergeTag.picker.title), 9, fc), _("button", {
|
|
3407
3477
|
type: "button",
|
|
3408
3478
|
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
3479
|
"aria-label": T(s).mergeTag.picker.close,
|
|
3410
3480
|
"data-testid": "merge-tag-picker-close",
|
|
3411
|
-
onClick:
|
|
3412
|
-
}, [k(T(
|
|
3481
|
+
onClick: ne
|
|
3482
|
+
}, [k(T(ct), {
|
|
3413
3483
|
size: 16,
|
|
3414
3484
|
"stroke-width": 2
|
|
3415
|
-
})], 8,
|
|
3416
|
-
_("div",
|
|
3485
|
+
})], 8, pc)]),
|
|
3486
|
+
_("div", mc, [k(T(qe), {
|
|
3417
3487
|
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
3488
|
size: 14,
|
|
3419
3489
|
"stroke-width": 2
|
|
3420
3490
|
}), t(_("input", {
|
|
3421
|
-
id: `${
|
|
3491
|
+
id: `${$}-search`,
|
|
3422
3492
|
ref_key: "searchInputRef",
|
|
3423
3493
|
ref: w,
|
|
3424
3494
|
"onUpdate:modelValue": r[0] ||= (e) => m.value = e,
|
|
@@ -3426,50 +3496,50 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3426
3496
|
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
3497
|
placeholder: T(s).mergeTag.picker.searchPlaceholder,
|
|
3428
3498
|
"aria-label": T(s).mergeTag.picker.searchAriaLabel,
|
|
3429
|
-
"aria-controls":
|
|
3430
|
-
"aria-activedescendant":
|
|
3499
|
+
"aria-controls": $,
|
|
3500
|
+
"aria-activedescendant": le(),
|
|
3431
3501
|
"data-testid": "merge-tag-picker-search",
|
|
3432
3502
|
onKeydown: r[1] ||= E(h(() => {}, ["prevent"]), ["enter"])
|
|
3433
|
-
}, null, 40,
|
|
3434
|
-
|
|
3503
|
+
}, null, 40, hc), [[f, m.value]])]),
|
|
3504
|
+
pe.value ? (e(), v("div", gc, [(e(!0), v(y, null, o(L.value, (t) => (e(), v("button", {
|
|
3435
3505
|
key: t,
|
|
3436
3506
|
type: "button",
|
|
3437
3507
|
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
3508
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3439
3509
|
"data-group-name": t,
|
|
3440
|
-
onClick: (e) =>
|
|
3441
|
-
}, D(t), 9,
|
|
3510
|
+
onClick: (e) => se(t)
|
|
3511
|
+
}, D(t), 9, _c))), 128))])) : b("", !0),
|
|
3442
3512
|
_("div", {
|
|
3443
|
-
id:
|
|
3513
|
+
id: $,
|
|
3444
3514
|
ref_key: "listRef",
|
|
3445
|
-
ref:
|
|
3515
|
+
ref: ie,
|
|
3446
3516
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3447
3517
|
role: "listbox",
|
|
3448
3518
|
"aria-label": T(s).mergeTag.picker.title,
|
|
3449
3519
|
"data-testid": "merge-tag-picker-list"
|
|
3450
|
-
}, [
|
|
3520
|
+
}, [de.value ? (e(), v("div", yc, D(T(s).mergeTag.picker.empty), 1)) : fe.value ? (e(), v("div", bc, 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
3521
|
key: 0,
|
|
3452
3522
|
ref_for: !0,
|
|
3453
|
-
ref: (e) =>
|
|
3523
|
+
ref: (e) => B(t.group, e),
|
|
3454
3524
|
type: "button",
|
|
3455
3525
|
"aria-expanded": !F(t.group),
|
|
3456
|
-
"aria-controls":
|
|
3526
|
+
"aria-controls": $,
|
|
3457
3527
|
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
3528
|
"data-testid": "merge-tag-picker-group-header",
|
|
3459
3529
|
"data-group-name": t.group,
|
|
3460
3530
|
"data-group-collapsed": F(t.group) ? "true" : "false",
|
|
3461
|
-
onClick: (e) =>
|
|
3531
|
+
onClick: (e) => ee(t.group)
|
|
3462
3532
|
}, [
|
|
3463
|
-
k(T(
|
|
3533
|
+
k(T(et), {
|
|
3464
3534
|
size: 12,
|
|
3465
3535
|
"stroke-width": 2,
|
|
3466
3536
|
class: p(["tpl:transition-transform", F(t.group) ? "tpl:-rotate-90" : ""])
|
|
3467
3537
|
}, null, 8, ["class"]),
|
|
3468
3538
|
_("span", null, D(t.group), 1),
|
|
3469
|
-
_("span",
|
|
3470
|
-
], 8,
|
|
3539
|
+
_("span", Sc, " (" + D(T(c)(T(s).mergeTag.picker.groupCount, { count: t.count })) + ") ", 1)
|
|
3540
|
+
], 8, xc)) : (e(), v("button", {
|
|
3471
3541
|
key: 1,
|
|
3472
|
-
id:
|
|
3542
|
+
id: ue(t.index),
|
|
3473
3543
|
type: "button",
|
|
3474
3544
|
role: "option",
|
|
3475
3545
|
"aria-selected": t.index === j.value,
|
|
@@ -3480,16 +3550,16 @@ var ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = ["value"], Pa = /* @__PUR
|
|
|
3480
3550
|
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
3551
|
"data-testid": "merge-tag-picker-item",
|
|
3482
3552
|
onMousemove: (e) => j.value = t.index,
|
|
3483
|
-
onClick: (e) =>
|
|
3553
|
+
onClick: (e) => z(t.tag)
|
|
3484
3554
|
}, [
|
|
3485
|
-
_("span",
|
|
3486
|
-
_("span",
|
|
3487
|
-
t.tag.description ? (e(), v("span",
|
|
3488
|
-
], 42,
|
|
3489
|
-
], 12,
|
|
3555
|
+
_("span", wc, D(t.tag.label), 1),
|
|
3556
|
+
_("span", Tc, D(t.tag.value), 1),
|
|
3557
|
+
t.tag.description ? (e(), v("span", Ec, D(t.tag.description), 1)) : b("", !0)
|
|
3558
|
+
], 42, Cc))], 64))), 128))], 8, vc)
|
|
3559
|
+
], 12, uc)]),
|
|
3490
3560
|
_: 1
|
|
3491
3561
|
}, 8, ["visible"]));
|
|
3492
3562
|
}
|
|
3493
3563
|
});
|
|
3494
3564
|
//#endregion
|
|
3495
|
-
export {
|
|
3565
|
+
export { nc as a, an as c, It as d, jt as f, ic as i, Jt as l, lc as n, $s as o, oc as r, Js as s, Dc as t, qt as u };
|