@templatical/editor 0.16.0 → 0.16.2
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-B-k_Sdas.js → AiChatSidebar-EaPCeDXr.js} +14 -14
- package/dist/{AiFeatureMenu-B5_IKOlI.js → AiFeatureMenu-DfTYyExg.js} +7 -7
- package/dist/{BlockIssueBadge-B3xVgMTh.js → BlockIssueBadge-CZYgn-qg.js} +5 -5
- package/dist/{CloudEditor-BUJk4vXS.js → CloudEditor-BQyZ_nFg.js} +24 -24
- package/dist/{CollaboratorBar-BAUQfXUk.js → CollaboratorBar-DeP7K-zk.js} +4 -4
- package/dist/ColorPicker-CXAbjTaG.js +446 -0
- package/dist/{CommentsSidebar-D_tSGvTX.js → CommentsSidebar-DDKiFsSq.js} +13 -13
- package/dist/{CountdownBlock-apiYUhkQ.js → CountdownBlock-173fiO5Z.js} +3 -3
- package/dist/{CountdownToolbar-CS0axcjz.js → CountdownToolbar-nY9H0BKd.js} +4 -4
- package/dist/{DesignReferenceSidebar-BYQcuaL4.js → DesignReferenceSidebar-D6TfC176.js} +11 -11
- package/dist/{IssuesPanel-CR1MPaDE.js → IssuesPanel-CQQipLQP.js} +8 -8
- package/dist/{LoadingTrack-DsecR8Rw.js → LoadingTrack-KIcREPlS.js} +1 -1
- package/dist/{MergeTagSuggestion-DLVykS0K.js → MergeTagSuggestion-DrT3LiZ4.js} +4 -4
- package/dist/{ModuleBrowserModal-BzDuagt5.js → ModuleBrowserModal-CkeYw1e3.js} +11 -11
- package/dist/{ModulePreviewCanvas-CK11BX4i.js → ModulePreviewCanvas-BIMFyYaa.js} +3 -3
- package/dist/NumberWithSuffix-BoZyUoNz.js +89 -0
- package/dist/{ParagraphEditor-fg9Ljy_Z.js → ParagraphEditor-DGsTFMxg.js} +232 -207
- package/dist/{RichTextEditorContent-BqLHIZY7.js → RichTextEditorContent-BB_n8vgB.js} +56 -45
- package/dist/{SaveModuleDialog-D27ufH5q.js → SaveModuleDialog-Cypt_qOB.js} +8 -8
- package/dist/{SnapshotHistory-Cymqkk9_.js → SnapshotHistory-DQTH8TCS.js} +10 -10
- package/dist/{TemplateScoringPanel-CZ62rGHz.js → TemplateScoringPanel-C8VOC6gn.js} +15 -15
- package/dist/{TestEmailModal-BIvdHidU.js → TestEmailModal-DqxrL-U9.js} +6 -6
- package/dist/{TitleEditor-D0a4NdOn.js → TitleEditor-DoGgnrcb.js} +38 -35
- package/dist/{TplModal-dYXt3vyd.js → TplModal-Ca-29YDD.js} +5 -5
- package/dist/{blockTypeIcons-JSBvsa0M.js → blockTypeIcons-DVJXg5si.js} +7 -7
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-C58VqAgo.js → ca-B3eR47lE.js} +2 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B6V5CzCc.js → AiFeatureMenu-roPglhox.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B6V5CzCc.js.map → AiFeatureMenu-roPglhox.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-C6Xpl1KK.js → BlockIssueBadge-DW_Tt7Wg.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-C6Xpl1KK.js.map → BlockIssueBadge-DW_Tt7Wg.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-C-npgK-l.js → CloudEditor-CX6y1k3C.js} +161 -161
- package/dist/cdn/chunks/{CloudEditor-C-npgK-l.js.map → CloudEditor-CX6y1k3C.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BSKXgw9D.js → CollaboratorBar-Dyrab63H.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-BSKXgw9D.js.map → CollaboratorBar-Dyrab63H.js.map} +1 -1
- package/dist/cdn/chunks/ColorPicker-BggAWrc9.js +443 -0
- package/dist/cdn/chunks/ColorPicker-BggAWrc9.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Y-nycxv2.js → CountdownBlock-Bul4tczj.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-Y-nycxv2.js.map → CountdownBlock-Bul4tczj.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-9LqnhGyh.js → CountdownToolbar-DYvATR0J.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-9LqnhGyh.js.map → CountdownToolbar-DYvATR0J.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BYfGf1rC.js → IssuesPanel-BhHU-hq3.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-BYfGf1rC.js.map → IssuesPanel-BhHU-hq3.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-DQzKlLH7.js → MergeTagSuggestion-jesxS7An.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-DQzKlLH7.js.map → MergeTagSuggestion-jesxS7An.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-EzKgW5TG.js → ModuleBrowserModal-BGd5Ryyx.js} +9 -9
- package/dist/cdn/chunks/{ModuleBrowserModal-EzKgW5TG.js.map → ModuleBrowserModal-BGd5Ryyx.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DxbSzXm8.js → ModulePreviewCanvas-Hx6SCCjB.js} +11 -11
- package/dist/cdn/chunks/{ModulePreviewCanvas-DxbSzXm8.js.map → ModulePreviewCanvas-Hx6SCCjB.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-BImuhc9K.js +91 -0
- package/dist/cdn/chunks/NumberWithSuffix-BImuhc9K.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-CJNgRMhw.js → ParagraphEditor-K2vENidm.js} +209 -184
- package/dist/cdn/chunks/ParagraphEditor-K2vENidm.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-Cebdzomd.js → RichTextEditorContent-B_w3u5lN.js} +53 -42
- package/dist/cdn/chunks/RichTextEditorContent-B_w3u5lN.js.map +1 -0
- package/dist/cdn/chunks/{SaveModuleDialog-Cufwqoln.js → SaveModuleDialog-Cw-182CB.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-Cufwqoln.js.map → SaveModuleDialog-Cw-182CB.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-7BhmKL-_.js → TitleEditor-CUKlo_Zj.js} +46 -43
- package/dist/cdn/chunks/TitleEditor-CUKlo_Zj.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-d4Sb61H-.js → blockTypeIcons-Cx1FAqL6.js} +5 -5
- package/dist/cdn/chunks/{blockTypeIcons-d4Sb61H-.js.map → blockTypeIcons-Cx1FAqL6.js.map} +1 -1
- package/dist/cdn/chunks/{ca-C58VqAgo.js → ca-B3eR47lE.js} +3 -2
- package/dist/cdn/chunks/ca-B3eR47lE.js.map +1 -0
- package/dist/cdn/chunks/{de-C0sMmfic.js → de-Cy8FB-Ii.js} +3 -2
- package/dist/cdn/chunks/de-Cy8FB-Ii.js.map +1 -0
- package/dist/cdn/chunks/{draggable-kG-D5Xsm.js → draggable-D840DIZB.js} +52 -39
- package/dist/cdn/chunks/draggable-D840DIZB.js.map +1 -0
- package/dist/cdn/chunks/{en-CsGBTBOf.js → en-Bu-zS_5o.js} +3 -2
- package/dist/cdn/chunks/en-Bu-zS_5o.js.map +1 -0
- package/dist/cdn/chunks/{es-DgjbcPIu.js → es-CD3ZD6hK.js} +3 -2
- package/dist/cdn/chunks/es-CD3ZD6hK.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BeAsz_mp.js → extensions-DSxG2wYf.js} +28 -28
- package/dist/cdn/chunks/{extensions-BeAsz_mp.js.map → extensions-DSxG2wYf.js.map} +1 -1
- package/dist/cdn/chunks/{features-DO71hPJr.js → features-C-cjT_8L.js} +589 -553
- package/dist/cdn/chunks/features-C-cjT_8L.js.map +1 -0
- package/dist/cdn/chunks/{icons-BfP1cRNb.js → icons-ay0_fN-T.js} +2 -2
- package/dist/cdn/chunks/{icons-BfP1cRNb.js.map → icons-ay0_fN-T.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-0S3e0i8G.js → media-library-CkmqPdO4.js} +104 -104
- package/dist/cdn/chunks/{media-library-0S3e0i8G.js.map → media-library-CkmqPdO4.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DXaP5lMJ.js → pt-BR-CgICL-CQ.js} +3 -2
- package/dist/cdn/chunks/pt-BR-CgICL-CQ.js.map +1 -0
- package/dist/cdn/chunks/quality-CDNrMw2A.js +2180 -0
- package/dist/cdn/chunks/{quality-B6V4R_df.js.map → quality-CDNrMw2A.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Dhn1J4H4.js → renderer-JQ91A09w.js} +18 -18
- package/dist/cdn/chunks/renderer-JQ91A09w.js.map +1 -0
- package/dist/cdn/chunks/{src-DoKjbqU2.js → src-Cehu7Hqx.js} +5 -5
- package/dist/cdn/chunks/{src-DoKjbqU2.js.map → src-Cehu7Hqx.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CSqligXJ.js → styles-DBjy3lz9.js} +820 -820
- package/dist/cdn/chunks/{styles-CSqligXJ.js.map → styles-DBjy3lz9.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-DVHUKGZf.js → tiptap-zpXk5mN4.js} +1131 -1134
- package/dist/cdn/chunks/{tiptap-DVHUKGZf.js.map → tiptap-zpXk5mN4.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +75 -75
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-rl7ok6uJ.js → check-D1zYtCPK.js} +1 -1
- package/dist/{chevron-down-BKe__NOD.js → chevron-down-ByXpufZD.js} +1 -1
- package/dist/{circle-alert-C8xmpMsK.js → circle-alert-CjcAORUw.js} +1 -1
- package/dist/{clock-BW4JuDCN.js → clock-5lWLadUn.js} +1 -1
- package/dist/{cloud-CFpaFRCV.js → cloud-BogxOeZu.js} +1 -1
- package/dist/{createLucideIcon-Dx-EjR9r.js → createLucideIcon-Bh9xOmlW.js} +3 -3
- package/dist/{de-C0sMmfic.js → de-Cy8FB-Ii.js} +2 -1
- package/dist/dist-BE9m_i60.js +5 -0
- package/dist/{dist-C5-0GG3g.js → dist-BPPeDw62.js} +2 -2
- package/dist/{dist-DEcNpSJi.js → dist-BReUTadj.js} +4 -4
- package/dist/dist-BXR1aBJV.js +5 -0
- package/dist/{dist-r_2rJCMg.js → dist-Bm07Z3Es.js} +2 -2
- package/dist/{dist-BEWiuOMi.js → dist-CFOQvhSC.js} +3 -3
- package/dist/{dist-Ci5GHd96.js → dist-CHLoeloJ.js} +2 -2
- package/dist/{dist-0VHbLR6h.js → dist-D1WmF8BF.js} +2 -2
- package/dist/{dist-DrlHbc8g.js → dist-D9g4CSnm.js} +1 -1
- package/dist/{dist-Drm7i-yw.js → dist-DGEaAAIb.js} +2 -2
- package/dist/{dist-CTT6WYJ6.js → dist-DYv_Pttj.js} +2 -2
- package/dist/{dist-Dsoq4knU.js → dist-DcKlLQ8d.js} +2 -2
- package/dist/{dist-D_-AsMP4.js → dist-DhY2di4U.js} +2 -2
- package/dist/{dist-FVawx7ou.js → dist-i_Z7t67A.js} +260 -263
- package/dist/{en-CsGBTBOf.js → en-Bu-zS_5o.js} +2 -1
- package/dist/{es-DgjbcPIu.js → es-CD3ZD6hK.js} +2 -1
- package/dist/{extensions-3jhgwhV-.js → extensions-B2poxDIo.js} +7 -7
- package/dist/{image-up-BwBCmQ4P.js → image-up-Bj_nes3f.js} +1 -1
- package/dist/{info-TCn7uWR5.js → info-BhSQCxBV.js} +1 -1
- package/dist/{keys-Cv8-8GsD.js → keys-BbDgCU6K.js} +1 -1
- package/dist/{list-checks-CSrOWNgq.js → list-checks-CgxyUg7i.js} +1 -1
- package/dist/{loader-circle-BLmicnPG.js → loader-circle-DFU0HPAa.js} +1 -1
- package/dist/{message-circle-C9hHMQCI.js → message-circle-BEBsCHnk.js} +1 -1
- package/dist/{pt-BR-DXaP5lMJ.js → pt-BR-CgICL-CQ.js} +2 -1
- package/dist/{refresh-cw-D1JQ1LNa.js → refresh-cw--lvWGy0_.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-BzuoCyNp.js → runtime-dom.esm-bundler-GdMI8WqG.js} +6 -7
- package/dist/{scan-line-DgijVq9y.js → scan-line-QgyDIgn_.js} +1 -1
- package/dist/{send-DjPdq69F.js → send-BMyisUim.js} +1 -1
- package/dist/{shield-check-Bqluu8FS.js → shield-check-C49M20le.js} +1 -1
- package/dist/{sparkles-M4azPVSP.js → sparkles-DV7Dman6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-5sGbDIA2.js → styles-mvx3k1hf.js} +78 -78
- package/dist/templatical-editor.js +62 -62
- package/dist/{text-align-start-CMya5pCQ.js → text-align-start-BMU70uAm.js} +1 -1
- package/dist/{trash-2-C-81rkLS.js → trash-2-B6M659Ey.js} +1 -1
- package/dist/{triangle-alert-BuRWnynk.js → triangle-alert-D1lzx6ds.js} +1 -1
- package/dist/{upload-CWBIoLd4.js → upload-3A1oZtOR.js} +1 -1
- package/dist/{useAliveFlag-CECL_OUb.js → useAliveFlag-C43EhZFY.js} +1 -1
- package/dist/{useCloudI18n-AKCy98qD.js → useCloudI18n-WbfVWq5k.js} +2 -2
- package/dist/{useEditorCore-AQ0BN1ug.js → useEditorCore-DtZkR7Vk.js} +616 -580
- package/dist/{useI18n-C-TDeJBt.js → useI18n-eR1yVW0v.js} +2 -2
- package/dist/{useMergeTag-D0aZw7Q5.js → useMergeTag-C3GfSktg.js} +2 -2
- package/dist/usePopoverRoot-C1j0D7cc.js +8 -0
- package/dist/{vue.runtime.esm-bundler-l0XAqiyv.js → vue.runtime.esm-bundler-B0xoGkDv.js} +84 -70
- package/dist/{x-CQSvXnGR.js → x-CG_NV3nP.js} +1 -1
- package/package.json +23 -23
- package/dist/NumberWithSuffix-CrA6quxx.js +0 -445
- package/dist/cdn/chunks/NumberWithSuffix-Conp_Pki.js +0 -444
- package/dist/cdn/chunks/NumberWithSuffix-Conp_Pki.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-CJNgRMhw.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-Cebdzomd.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-7BhmKL-_.js.map +0 -1
- package/dist/cdn/chunks/ca-C58VqAgo.js.map +0 -1
- package/dist/cdn/chunks/de-C0sMmfic.js.map +0 -1
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +0 -1
- package/dist/cdn/chunks/en-CsGBTBOf.js.map +0 -1
- package/dist/cdn/chunks/es-DgjbcPIu.js.map +0 -1
- package/dist/cdn/chunks/features-DO71hPJr.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DXaP5lMJ.js.map +0 -1
- package/dist/cdn/chunks/quality-B6V4R_df.js +0 -2180
- package/dist/cdn/chunks/renderer-Dhn1J4H4.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js +0 -57
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js.map +0 -1
- package/dist/dist-DR-6IpV6.js +0 -5
- package/dist/dist-DW8b0TO6.js +0 -5
- package/dist/styleConstants-lGobwiLH.js +0 -55
- package/dist/usePopoverRoot-DKUDnr55.js +0 -8
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { C as e, F as t, G as n, H as r, J as i, K as a, L as o, M as s, O as c, P as l, T as u, V as d, Y as f, Z as p, b as m, c as h, ct as g, f as _, g as v, h as y, it as b, l as x, m as S, n as C, o as w, ot as T, p as E, s as D, st as O, t as k, u as A, v as j, x as M, y as N, z as P } from "./draggable-
|
|
2
|
-
import { $t as F, B as
|
|
3
|
-
import { A as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { _ as
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
1
|
+
import { C as e, F as t, G as n, H as r, J as i, K as a, L as o, M as s, O as c, P as l, T as u, V as d, Y as f, Z as p, b as m, c as h, ct as g, f as _, g as v, h as y, it as b, l as x, m as S, n as C, o as w, ot as T, p as E, s as D, st as O, t as k, u as A, v as j, x as M, y as N, z as P } from "./draggable-D840DIZB.js";
|
|
2
|
+
import { $t as F, At as ee, B as te, Bt as ne, Cn as I, Ct as L, Dn as R, Dt as z, Et as re, F as ie, Ft as ae, G as B, H as oe, Ht as se, I as ce, It as V, J as le, Jt as ue, K as de, L as fe, Ln as pe, Lt as me, M as he, Mn as ge, Mt as _e, N as ve, Nn as ye, O as be, On as xe, Ot as Se, P as Ce, Pn as we, Q as Te, Qt as Ee, R as De, Rt as H, St as Oe, Tn as ke, Tt as Ae, U as je, Ut as Me, V as Ne, W as Pe, Wt as Fe, Xt as Ie, Yt as Le, Zt as Re, _n as ze, _t as Be, bn as Ve, cn as He, ct as Ue, dt as We, en as Ge, j as Ke, k as qe, kn as Je, ln as Ye, lt as Xe, nn as Ze, nt as Qe, on as $e, ot as et, pt as tt, q as nt, qt as rt, rn as it, rt as at, sn as ot, st, tn as ct, un as lt, wn as ut, wt as dt, xn as ft, xt as pt } from "./features-C-cjT_8L.js";
|
|
3
|
+
import { A as mt, F as ht, G as gt, I as _t, M as vt, N as yt, O as bt, P as xt, T as U, V as St, X as Ct, Y as wt, _ as Tt, b as Et, c as Dt, h as Ot, m as kt, o as At, s as jt, u as Mt, v as Nt, y as Pt, z as Ft } from "./icons-ay0_fN-T.js";
|
|
4
|
+
import { t as It } from "./readableTextColor-f8Kykfnh.js";
|
|
5
|
+
import { t as Lt } from "./CountdownBlock-Bul4tczj.js";
|
|
6
|
+
import { t as Rt } from "./blockTypeIcons-Cx1FAqL6.js";
|
|
7
|
+
import { _ as zt, f as W, g as Bt, h as G, i as Vt, l as Ht, m as K, n as Ut, p as q, t as J, u as Wt } from "./ColorPicker-BggAWrc9.js";
|
|
8
|
+
import { n as Gt, r as Kt } from "./MergeTagSuggestion-jesxS7An.js";
|
|
9
|
+
import { n as Y, r as X, t as qt } from "./NumberWithSuffix-BImuhc9K.js";
|
|
10
10
|
//#region src/utils/resolveLintOptions.ts
|
|
11
|
-
function
|
|
11
|
+
function Jt(e) {
|
|
12
12
|
return {
|
|
13
13
|
...e.lint,
|
|
14
14
|
locale: e.locale
|
|
@@ -16,19 +16,19 @@ function qt(e) {
|
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
19
|
-
var
|
|
19
|
+
var Yt = ["aria-label"], Xt = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
22
|
-
},
|
|
22
|
+
}, Zt = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, Qt = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, $t = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, en = {
|
|
23
23
|
key: 0,
|
|
24
24
|
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)]"
|
|
25
|
-
},
|
|
25
|
+
}, tn = {
|
|
26
26
|
key: 1,
|
|
27
27
|
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)]"
|
|
28
|
-
},
|
|
28
|
+
}, nn = { class: "tpl:relative" }, rn = {
|
|
29
29
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
30
30
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
31
|
-
},
|
|
31
|
+
}, an = 96, on = /*#__PURE__*/ et(/* @__PURE__ */ M({
|
|
32
32
|
__name: "Canvas",
|
|
33
33
|
props: {
|
|
34
34
|
viewport: {},
|
|
@@ -45,21 +45,21 @@ var Jt = ["aria-label"], Yt = {
|
|
|
45
45
|
],
|
|
46
46
|
setup(e, { emit: t }) {
|
|
47
47
|
let n = {
|
|
48
|
-
section:
|
|
48
|
+
section: ce,
|
|
49
49
|
title: fe,
|
|
50
|
-
paragraph:
|
|
51
|
-
image:
|
|
52
|
-
button:
|
|
53
|
-
divider:
|
|
54
|
-
spacer:
|
|
55
|
-
html:
|
|
56
|
-
social:
|
|
57
|
-
menu:
|
|
58
|
-
table:
|
|
59
|
-
video:
|
|
60
|
-
countdown:
|
|
50
|
+
paragraph: Ne,
|
|
51
|
+
image: je,
|
|
52
|
+
button: ae,
|
|
53
|
+
divider: nt,
|
|
54
|
+
spacer: ve,
|
|
55
|
+
html: de,
|
|
56
|
+
social: Ce,
|
|
57
|
+
menu: oe,
|
|
58
|
+
table: he,
|
|
59
|
+
video: Ke,
|
|
60
|
+
countdown: Lt,
|
|
61
61
|
custom: le
|
|
62
|
-
}, i = e, a = t, { t: c } =
|
|
62
|
+
}, i = e, a = t, { t: c } = H(), { t: f } = at(), m = lt(Re, "Canvas"), h = u(rt, null), x = u(Me, null), C = u(Fe, {}), w = _(() => (C.plan?.hasFeature("ai_generation") ?? !1) && (C.ai?.isFeatureEnabled("chat") ?? !1)), M = _(() => (C.plan?.hasFeature("ai_generation") ?? !1) && (C.ai?.isFeatureEnabled("designToTemplate") ?? !1)), P = _({
|
|
63
63
|
get: () => i.content.blocks,
|
|
64
64
|
set: (e) => {
|
|
65
65
|
m.setContent({
|
|
@@ -72,29 +72,29 @@ var Jt = ["aria-label"], Yt = {
|
|
|
72
72
|
case "mobile": return 375;
|
|
73
73
|
default: return i.content.settings.width;
|
|
74
74
|
}
|
|
75
|
-
}),
|
|
75
|
+
}), ee = _(() => F.value + an * 2), ne = _(() => {
|
|
76
76
|
let e = { fontFamily: i.content.settings.fontFamily };
|
|
77
77
|
return i.content.settings.textColor && (e.color = i.content.settings.textColor), i.content.settings.linkColor && (e["--tpl-doc-link-color"] = i.content.settings.linkColor), i.content.settings.linkUnderline && (e["--tpl-doc-link-underline"] = "underline"), e;
|
|
78
|
-
}),
|
|
79
|
-
function
|
|
80
|
-
|
|
78
|
+
}), I = _(() => P.value.length === 0 && !i.previewMode), L = p(0), R = _(() => I.value && L.value > 0);
|
|
79
|
+
function z() {
|
|
80
|
+
I.value && (L.value += 1);
|
|
81
81
|
}
|
|
82
82
|
function re() {
|
|
83
|
-
|
|
83
|
+
I.value && (L.value = Math.max(0, L.value - 1));
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
85
|
+
function ie() {
|
|
86
|
+
L.value = 0;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function B(e) {
|
|
89
89
|
i.previewMode || e.target === e.currentTarget && a("select-block", null);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function se(e) {
|
|
92
|
+
return te(e, x, n);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function V(e) {
|
|
95
95
|
return i.lockedBlocks?.get(e) ?? null;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function ue(e, t) {
|
|
98
98
|
e.type === "custom" && m.updateBlock(e.id, {
|
|
99
99
|
fieldValues: t.fieldValues,
|
|
100
100
|
dataSourceFetched: t.dataSourceFetched
|
|
@@ -103,7 +103,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
103
103
|
return (t, n) => (s(), v("div", {
|
|
104
104
|
class: "tpl-canvas-stage tpl:relative tpl:flex tpl:justify-center tpl:rounded-lg",
|
|
105
105
|
style: O({
|
|
106
|
-
width: `${
|
|
106
|
+
width: `${ee.value}px`,
|
|
107
107
|
boxShadow: e.darkMode ? "none" : "var(--tpl-shadow-xl)",
|
|
108
108
|
transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
109
109
|
})
|
|
@@ -128,8 +128,8 @@ var Jt = ["aria-label"], Yt = {
|
|
|
128
128
|
"tpl-canvas--dark-mode": e.darkMode,
|
|
129
129
|
"tpl-preview-mode": e.previewMode
|
|
130
130
|
}]),
|
|
131
|
-
style: O(
|
|
132
|
-
onClick:
|
|
131
|
+
style: O(ne.value),
|
|
132
|
+
onClick: B
|
|
133
133
|
}, [N(b(k), {
|
|
134
134
|
modelValue: P.value,
|
|
135
135
|
"onUpdate:modelValue": n[2] ||= (e) => P.value = e,
|
|
@@ -145,38 +145,38 @@ var Jt = ["aria-label"], Yt = {
|
|
|
145
145
|
"force-fallback": !0,
|
|
146
146
|
class: T([
|
|
147
147
|
"tpl-canvas-blocks",
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
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" : "",
|
|
149
|
+
I.value && R.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
150
|
+
I.value && !R.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
151
151
|
]),
|
|
152
|
-
onDragenter:
|
|
152
|
+
onDragenter: z,
|
|
153
153
|
onDragleave: re,
|
|
154
|
-
onDrop:
|
|
154
|
+
onDrop: ie
|
|
155
155
|
}, {
|
|
156
|
-
default: d(() => [
|
|
157
|
-
E("div",
|
|
156
|
+
default: d(() => [I.value ? (s(), v("div", Xt, [
|
|
157
|
+
E("div", Zt, [N(b(Ot), {
|
|
158
158
|
size: 48,
|
|
159
159
|
"stroke-width": 1
|
|
160
160
|
})]),
|
|
161
|
-
E("p",
|
|
162
|
-
E("p",
|
|
163
|
-
w.value && b(f) ? (s(), v("p",
|
|
161
|
+
E("p", Qt, g(b(c).canvas.noBlocks), 1),
|
|
162
|
+
E("p", $t, g(b(c).canvas.dragHint), 1),
|
|
163
|
+
w.value && b(f) ? (s(), v("p", en, [
|
|
164
164
|
j(g(b(c).canvas.aiHintChat) + " ", 1),
|
|
165
165
|
E("button", {
|
|
166
166
|
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)]",
|
|
167
167
|
onClick: n[0] ||= (e) => a("open-ai-chat")
|
|
168
|
-
}, [N(b(
|
|
168
|
+
}, [N(b(tt), {
|
|
169
169
|
size: 14,
|
|
170
170
|
"stroke-width": 2
|
|
171
171
|
}), j(" " + g(b(f).aiMenu.aiAssistant), 1)]),
|
|
172
172
|
j(" " + g(b(c).canvas.aiHintChatSuffix), 1)
|
|
173
173
|
])) : y("", !0),
|
|
174
|
-
M.value && b(f) ? (s(), v("p",
|
|
174
|
+
M.value && b(f) ? (s(), v("p", tn, [
|
|
175
175
|
j(g(b(c).canvas.aiHintDesign) + " ", 1),
|
|
176
176
|
E("button", {
|
|
177
177
|
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)]",
|
|
178
178
|
onClick: n[1] ||= (e) => a("open-design-reference")
|
|
179
|
-
}, [N(b(
|
|
179
|
+
}, [N(b(dt), {
|
|
180
180
|
size: 14,
|
|
181
181
|
"stroke-width": 2
|
|
182
182
|
}), j(" " + g(b(f).aiMenu.designToTemplate), 1)]),
|
|
@@ -185,30 +185,30 @@ var Jt = ["aria-label"], Yt = {
|
|
|
185
185
|
])) : y("", !0), (s(!0), v(A, null, l(P.value, (t) => r((s(), v("div", {
|
|
186
186
|
key: t.id,
|
|
187
187
|
class: "tpl-block-item"
|
|
188
|
-
}, [E("div",
|
|
188
|
+
}, [E("div", nn, [V(t.id) ? (s(), v("div", {
|
|
189
189
|
key: 0,
|
|
190
190
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
191
191
|
style: O({
|
|
192
|
-
outline: `2px solid ${
|
|
192
|
+
outline: `2px solid ${V(t.id).color}`,
|
|
193
193
|
outlineOffset: "-1px"
|
|
194
194
|
})
|
|
195
195
|
}, [E("span", {
|
|
196
196
|
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",
|
|
197
197
|
style: O({
|
|
198
|
-
backgroundColor:
|
|
199
|
-
color: b(
|
|
198
|
+
backgroundColor: V(t.id).color,
|
|
199
|
+
color: b(It)(V(t.id).color)
|
|
200
200
|
})
|
|
201
|
-
}, [E("span",
|
|
201
|
+
}, [E("span", rn, g(V(t.id).name.charAt(0)), 1), j(" " + g(V(t.id).name), 1)], 4)], 4)) : y("", !0), N(De, {
|
|
202
202
|
block: t,
|
|
203
|
-
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !
|
|
203
|
+
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !V(t.id),
|
|
204
204
|
viewport: e.viewport,
|
|
205
205
|
"preview-mode": e.previewMode,
|
|
206
|
-
onSelect: (n) => e.previewMode ||
|
|
206
|
+
onSelect: (n) => e.previewMode || V(t.id) ? void 0 : a("select-block", t.id)
|
|
207
207
|
}, {
|
|
208
|
-
default: d(() => [(s(), S(o(
|
|
208
|
+
default: d(() => [(s(), S(o(se(t)), {
|
|
209
209
|
block: t,
|
|
210
210
|
viewport: e.viewport,
|
|
211
|
-
onFetchData: (e) =>
|
|
211
|
+
onFetchData: (e) => ue(t, e),
|
|
212
212
|
onUpdate: (e) => b(m).updateBlock(t.id, e)
|
|
213
213
|
}, null, 40, [
|
|
214
214
|
"block",
|
|
@@ -229,12 +229,12 @@ var Jt = ["aria-label"], Yt = {
|
|
|
229
229
|
"modelValue",
|
|
230
230
|
"disabled",
|
|
231
231
|
"class"
|
|
232
|
-
])], 6)], 12,
|
|
232
|
+
])], 6)], 12, Yt)], 4));
|
|
233
233
|
}
|
|
234
|
-
}), [["__scopeId", "data-v-b440d13f"]]),
|
|
234
|
+
}), [["__scopeId", "data-v-b440d13f"]]), sn = M({
|
|
235
235
|
name: "CustomBlockStylesheets",
|
|
236
236
|
setup() {
|
|
237
|
-
let t = u(
|
|
237
|
+
let t = u(Le, null);
|
|
238
238
|
return () => t ? t.value.map((t, n) => e("style", {
|
|
239
239
|
key: n,
|
|
240
240
|
"data-tpl-custom-block-stylesheet": "",
|
|
@@ -244,7 +244,7 @@ var Jt = ["aria-label"], Yt = {
|
|
|
244
244
|
});
|
|
245
245
|
//#endregion
|
|
246
246
|
//#region src/utils/resolvePaletteBlocks.ts
|
|
247
|
-
function
|
|
247
|
+
function cn(e, t) {
|
|
248
248
|
if (!t || t.length === 0) return {
|
|
249
249
|
items: e,
|
|
250
250
|
unknown: []
|
|
@@ -263,27 +263,27 @@ function sn(e, t) {
|
|
|
263
263
|
}
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region src/components/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
266
|
-
var
|
|
266
|
+
var ln = ["aria-label"], un = {
|
|
267
267
|
key: 0,
|
|
268
268
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
269
|
-
},
|
|
269
|
+
}, dn = ["aria-label"], fn = {
|
|
270
270
|
key: 0,
|
|
271
271
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
272
|
-
},
|
|
272
|
+
}, pn = {
|
|
273
273
|
key: 1,
|
|
274
274
|
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)]"
|
|
275
|
-
},
|
|
275
|
+
}, mn = [
|
|
276
276
|
"data-palette-type",
|
|
277
277
|
"aria-label",
|
|
278
278
|
"onClick",
|
|
279
279
|
"onKeydown"
|
|
280
|
-
],
|
|
280
|
+
], hn = { 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" }, gn = {
|
|
281
281
|
key: 0,
|
|
282
282
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
283
|
-
},
|
|
283
|
+
}, _n = /* @__PURE__ */ M({
|
|
284
284
|
__name: "Sidebar",
|
|
285
285
|
setup(e) {
|
|
286
|
-
let { t, format: n } =
|
|
286
|
+
let { t, format: n } = H(), { t: r } = at(), i = u(ue, []), a = u(it, void 0), c = u(se, void 0), f = u(Re, null), m = u(Fe, {}), h = _(() => (m.savedModules?.moduleCount.value ?? 0) > 0), x = p(!1), C = p(!1);
|
|
287
287
|
function w() {
|
|
288
288
|
C.value || (x.value = !1);
|
|
289
289
|
}
|
|
@@ -309,35 +309,35 @@ var cn = ["aria-label"], ln = {
|
|
|
309
309
|
], M = _(() => {
|
|
310
310
|
let e = j.map((e) => ({
|
|
311
311
|
type: e,
|
|
312
|
-
label:
|
|
312
|
+
label: me(e, t)
|
|
313
313
|
}));
|
|
314
314
|
return m.plan && e.splice(-1, 0, {
|
|
315
315
|
type: "countdown",
|
|
316
|
-
label:
|
|
316
|
+
label: me("countdown", t)
|
|
317
317
|
}), e;
|
|
318
318
|
}), F = _(() => i.map((e) => ({
|
|
319
319
|
type: `custom:${e.type}`,
|
|
320
320
|
label: e.name,
|
|
321
321
|
isCustom: !0,
|
|
322
322
|
icon: e.icon
|
|
323
|
-
}))),
|
|
324
|
-
P(() =>
|
|
325
|
-
for (let t of e)
|
|
323
|
+
}))), ee = _(() => [...M.value, ...F.value]), te = _(() => cn(ee.value, a)), ne = _(() => te.value.items), I = /* @__PURE__ */ new Set();
|
|
324
|
+
P(() => te.value.unknown, (e) => {
|
|
325
|
+
for (let t of e) I.has(t) || (I.add(t), V.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.`));
|
|
326
326
|
}, { immediate: !0 });
|
|
327
|
-
function
|
|
327
|
+
function L(e) {
|
|
328
328
|
if (e.isCustom) {
|
|
329
329
|
let t = e.type.replace("custom:", ""), n = i.find((e) => e.type === t);
|
|
330
|
-
if (n) return
|
|
330
|
+
if (n) return ye(n);
|
|
331
331
|
}
|
|
332
|
-
return
|
|
332
|
+
return ge(e.type, c);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function R(e) {
|
|
335
335
|
if (!f) return;
|
|
336
|
-
let t =
|
|
336
|
+
let t = L(e);
|
|
337
337
|
f.addBlock(t), f.selectBlock(t.id);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
339
|
+
function z(e, t) {
|
|
340
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), R(t));
|
|
341
341
|
}
|
|
342
342
|
return (e, i) => (s(), v("aside", {
|
|
343
343
|
"aria-label": b(t).sidebarNav.palette,
|
|
@@ -353,28 +353,28 @@ var cn = ["aria-label"], ln = {
|
|
|
353
353
|
onMouseleave: w,
|
|
354
354
|
onFocusin: i[2] ||= (e) => x.value = !0,
|
|
355
355
|
onFocusout: i[3] ||= (e) => x.value = !1
|
|
356
|
-
}, [h.value && b(r) ? (s(), v("div",
|
|
356
|
+
}, [h.value && b(r) ? (s(), v("div", un, [E("button", {
|
|
357
357
|
type: "button",
|
|
358
358
|
"aria-label": b(t).sidebarNav.browseModules,
|
|
359
359
|
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)]",
|
|
360
360
|
style: O({ justifyContent: x.value ? "flex-start" : "center" }),
|
|
361
361
|
onClick: i[0] ||= (e) => b(m).savedModules?.openBrowser()
|
|
362
362
|
}, [
|
|
363
|
-
N(b(
|
|
363
|
+
N(b(mt), {
|
|
364
364
|
size: 20,
|
|
365
365
|
"stroke-width": 1.5,
|
|
366
366
|
class: "tpl:shrink-0"
|
|
367
367
|
}),
|
|
368
|
-
x.value ? (s(), v("span",
|
|
369
|
-
x.value ? (s(), v("span",
|
|
370
|
-
], 12,
|
|
371
|
-
"model-value":
|
|
368
|
+
x.value ? (s(), v("span", fn, g(b(r).modules.title), 1)) : y("", !0),
|
|
369
|
+
x.value ? (s(), v("span", pn, g(b(m).savedModules?.moduleCount.value ?? 0), 1)) : y("", !0)
|
|
370
|
+
], 12, dn)])) : y("", !0), N(b(k), {
|
|
371
|
+
"model-value": ne.value,
|
|
372
372
|
group: {
|
|
373
373
|
name: "blocks",
|
|
374
374
|
pull: "clone",
|
|
375
375
|
put: !1
|
|
376
376
|
},
|
|
377
|
-
clone:
|
|
377
|
+
clone: L,
|
|
378
378
|
sort: !1,
|
|
379
379
|
animation: 150,
|
|
380
380
|
"force-fallback": !0,
|
|
@@ -382,31 +382,31 @@ var cn = ["aria-label"], ln = {
|
|
|
382
382
|
onChoose: T,
|
|
383
383
|
onEnd: D
|
|
384
384
|
}, {
|
|
385
|
-
default: d(() => [(s(!0), v(A, null, l(
|
|
385
|
+
default: d(() => [(s(!0), v(A, null, l(ne.value, (e) => (s(), v("button", {
|
|
386
386
|
key: e.type,
|
|
387
387
|
type: "button",
|
|
388
388
|
"data-palette-type": e.type,
|
|
389
389
|
"aria-label": b(n)(b(t).sidebarNav.insertBlock, { block: e.label }),
|
|
390
390
|
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",
|
|
391
391
|
style: O({ justifyContent: x.value ? "flex-start" : "center" }),
|
|
392
|
-
onClick: (t) =>
|
|
393
|
-
onKeydown: (t) =>
|
|
394
|
-
}, [E("div",
|
|
392
|
+
onClick: (t) => R(e),
|
|
393
|
+
onKeydown: (t) => z(t, e)
|
|
394
|
+
}, [E("div", hn, [b(Rt)[e.type] ? (s(), S(o(b(Rt)[e.type]), {
|
|
395
395
|
key: 0,
|
|
396
396
|
size: 20,
|
|
397
397
|
"stroke-width": 1.5
|
|
398
|
-
})) : e.isCustom ? (s(), S(
|
|
398
|
+
})) : e.isCustom ? (s(), S(st, {
|
|
399
399
|
key: 1,
|
|
400
400
|
icon: e.icon,
|
|
401
401
|
size: 20
|
|
402
|
-
}, null, 8, ["icon"])) : y("", !0)]), x.value ? (s(), v("span",
|
|
402
|
+
}, null, 8, ["icon"])) : y("", !0)]), x.value ? (s(), v("span", gn, g(e.label), 1)) : y("", !0)], 44, mn))), 128))]),
|
|
403
403
|
_: 1
|
|
404
|
-
}, 8, ["model-value"])], 44,
|
|
404
|
+
}, 8, ["model-value"])], 44, ln));
|
|
405
405
|
}
|
|
406
406
|
});
|
|
407
407
|
//#endregion
|
|
408
408
|
//#region src/utils/mergeTagTrigger.ts
|
|
409
|
-
function
|
|
409
|
+
function vn(e, t, n, r) {
|
|
410
410
|
if (!n) return null;
|
|
411
411
|
let i = e.slice(0, t), a = i.lastIndexOf(n);
|
|
412
412
|
if (a === -1) return null;
|
|
@@ -419,8 +419,8 @@ function _n(e, t, n, r) {
|
|
|
419
419
|
}
|
|
420
420
|
//#endregion
|
|
421
421
|
//#region src/utils/textFieldCaret.ts
|
|
422
|
-
var
|
|
423
|
-
function
|
|
422
|
+
var yn = /* @__PURE__ */ "boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.lineHeight.fontFamily.textAlign.textTransform.textIndent.letterSpacing.wordSpacing.tabSize.whiteSpace.wordWrap.wordBreak".split(".");
|
|
423
|
+
function bn(e, t, n) {
|
|
424
424
|
return {
|
|
425
425
|
left: e,
|
|
426
426
|
top: t,
|
|
@@ -433,7 +433,7 @@ function yn(e, t, n) {
|
|
|
433
433
|
toJSON: () => ({})
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function xn(e, t) {
|
|
437
437
|
let n = e.ownerDocument, r = n.defaultView;
|
|
438
438
|
if (!r) return null;
|
|
439
439
|
let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
|
|
@@ -441,7 +441,7 @@ function bn(e, t) {
|
|
|
441
441
|
let s = o.style;
|
|
442
442
|
s.position = "absolute", s.visibility = "hidden", s.top = "0", s.left = "0", s.overflow = "hidden", s.whiteSpace = i ? "pre" : "pre-wrap", s.wordWrap = i ? "normal" : "break-word";
|
|
443
443
|
let c = s, l = a;
|
|
444
|
-
for (let e of
|
|
444
|
+
for (let e of yn) c[e] = l[e];
|
|
445
445
|
i && (s.width = "auto", s.whiteSpace = "pre");
|
|
446
446
|
let u = e.value, d = u.slice(0, t);
|
|
447
447
|
i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
|
|
@@ -450,26 +450,26 @@ function bn(e, t) {
|
|
|
450
450
|
let p = f.offsetTop, m = f.offsetLeft;
|
|
451
451
|
n.body.removeChild(o);
|
|
452
452
|
let h = e.getBoundingClientRect(), g = parseFloat(a.borderTopWidth) || 0, _ = parseFloat(a.borderLeftWidth) || 0, v = parseFloat(a.lineHeight) || parseFloat(a.fontSize) || 0, y = h.left + m + _ - e.scrollLeft;
|
|
453
|
-
if (i) return
|
|
453
|
+
if (i) return bn(y, h.top, h.bottom);
|
|
454
454
|
let b = h.top + p + g - e.scrollTop;
|
|
455
|
-
return
|
|
455
|
+
return bn(y, b, b + v);
|
|
456
456
|
}
|
|
457
457
|
//#endregion
|
|
458
458
|
//#region src/composables/useMergeTagAutocomplete.ts
|
|
459
|
-
var
|
|
459
|
+
var Sn = /* @__PURE__ */ new Set([
|
|
460
460
|
"ArrowLeft",
|
|
461
461
|
"ArrowRight",
|
|
462
462
|
"Home",
|
|
463
463
|
"End"
|
|
464
464
|
]);
|
|
465
|
-
function
|
|
466
|
-
let { elementRef: t, modelValue: r, emit: o, mergeTags: s, syntax: l, enabled: d, onInsert: f } = e, p =
|
|
465
|
+
function Cn(e) {
|
|
466
|
+
let { elementRef: t, modelValue: r, emit: o, mergeTags: s, syntax: l, enabled: d, onInsert: f } = e, p = xe(l), m = R(l), h = d && p !== null && s.length > 0, g = u(He, null), _ = Gt((a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", qe()), v = !1;
|
|
467
467
|
n() && i(() => {
|
|
468
468
|
v = !0, _.close();
|
|
469
469
|
});
|
|
470
470
|
function y(e) {
|
|
471
471
|
let t = e.value ?? "";
|
|
472
|
-
return
|
|
472
|
+
return vn(t, e.selectionStart ?? t.length, p, m);
|
|
473
473
|
}
|
|
474
474
|
function b(e, n, i) {
|
|
475
475
|
let a = e.value ?? r(), s = a.slice(n.caret), l = m && s.startsWith(m) ? m.length : 0, u = a.slice(0, n.triggerStart), d = a.slice(n.caret + l), p = u + i.value + d, h = u.length + i.value.length;
|
|
@@ -491,7 +491,7 @@ function Sn(e) {
|
|
|
491
491
|
_.close();
|
|
492
492
|
return;
|
|
493
493
|
}
|
|
494
|
-
let r = Kt(s, n.query), i = () =>
|
|
494
|
+
let r = Kt(s, n.query), i = () => xn(e, n.triggerStart), a = (t) => b(e, n, t);
|
|
495
495
|
_.isOpen() ? _.update({
|
|
496
496
|
items: r,
|
|
497
497
|
getRect: i,
|
|
@@ -504,7 +504,7 @@ function Sn(e) {
|
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
506
|
function S(e) {
|
|
507
|
-
return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) :
|
|
507
|
+
return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) : Sn.has(e.key) ? (_.close(), !1) : _.handleKeyDown(e) : !1;
|
|
508
508
|
}
|
|
509
509
|
return {
|
|
510
510
|
available: h,
|
|
@@ -516,12 +516,12 @@ function Sn(e) {
|
|
|
516
516
|
}
|
|
517
517
|
//#endregion
|
|
518
518
|
//#region src/composables/useMergeTagField.ts
|
|
519
|
-
function
|
|
520
|
-
let { modelValue: t, emit: r, elementRef: a } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: l, isMergeTagValue: u, getMergeTagLabel: d, requestMergeTag: f, syntax: m, autocomplete: h } =
|
|
519
|
+
function wn(e) {
|
|
520
|
+
let { modelValue: t, emit: r, elementRef: a } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: l, isMergeTagValue: u, getMergeTagLabel: d, requestMergeTag: f, syntax: m, autocomplete: h } = Qe(), { canInsertLogicTag: g, isRequesting: v, requestLogicTag: y } = Te(), b = p(!1), x = !1, S = !1;
|
|
521
521
|
n() && i(() => {
|
|
522
522
|
S = !0;
|
|
523
523
|
});
|
|
524
|
-
let C =
|
|
524
|
+
let C = Cn({
|
|
525
525
|
elementRef: a,
|
|
526
526
|
modelValue: t,
|
|
527
527
|
emit: r,
|
|
@@ -545,10 +545,10 @@ function Cn(e) {
|
|
|
545
545
|
type: "mergeTag",
|
|
546
546
|
value: t,
|
|
547
547
|
label: d(t)
|
|
548
|
-
}) :
|
|
548
|
+
}) : Je(t, m) ? n.push({
|
|
549
549
|
type: "logicMergeTag",
|
|
550
550
|
value: t,
|
|
551
|
-
keyword:
|
|
551
|
+
keyword: ke(t, m)
|
|
552
552
|
}) : n.push({
|
|
553
553
|
type: "text",
|
|
554
554
|
value: t
|
|
@@ -643,10 +643,10 @@ function Cn(e) {
|
|
|
643
643
|
}
|
|
644
644
|
//#endregion
|
|
645
645
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
646
|
-
var
|
|
646
|
+
var Tn = ["aria-label", "onKeydown"], En = ["data-tooltip"], Dn = ["data-tooltip"], On = {
|
|
647
647
|
key: 2,
|
|
648
648
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
649
|
-
},
|
|
649
|
+
}, kn = ["aria-label", "title"], An = /* @__PURE__ */ M({
|
|
650
650
|
__name: "MergeTagSegments",
|
|
651
651
|
props: {
|
|
652
652
|
segments: {},
|
|
@@ -655,7 +655,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
655
655
|
},
|
|
656
656
|
emits: ["edit", "clear"],
|
|
657
657
|
setup(e, { emit: t }) {
|
|
658
|
-
let n = t, { t: r } =
|
|
658
|
+
let n = t, { t: r } = H();
|
|
659
659
|
function i() {
|
|
660
660
|
n("edit");
|
|
661
661
|
}
|
|
@@ -674,7 +674,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
674
674
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
675
675
|
color: "var(--tpl-primary)"
|
|
676
676
|
}
|
|
677
|
-
}, g(e.label), 9,
|
|
677
|
+
}, g(e.label), 9, En)) : e.type === "logicMergeTag" ? (s(), v("span", {
|
|
678
678
|
key: 1,
|
|
679
679
|
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",
|
|
680
680
|
"data-tooltip": e.value,
|
|
@@ -683,75 +683,75 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
683
683
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
684
684
|
color: "var(--tpl-primary)"
|
|
685
685
|
}
|
|
686
|
-
}, g(e.keyword), 9,
|
|
686
|
+
}, g(e.keyword), 9, Dn)) : (s(), v("span", On, g(e.value), 1))], 64))), 128)), E("button", {
|
|
687
687
|
type: "button",
|
|
688
688
|
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",
|
|
689
689
|
"aria-label": b(r).mergeTag.remove,
|
|
690
690
|
title: b(r).mergeTag.remove,
|
|
691
691
|
onClick: a[0] ||= x((e) => n("clear"), ["stop"])
|
|
692
|
-
}, [N(b(
|
|
692
|
+
}, [N(b(Ue), {
|
|
693
693
|
size: 12,
|
|
694
694
|
"stroke-width": 2.5
|
|
695
|
-
})], 8,
|
|
695
|
+
})], 8, kn)], 42, Tn));
|
|
696
696
|
}
|
|
697
|
-
}),
|
|
697
|
+
}), jn = [
|
|
698
698
|
"aria-label",
|
|
699
699
|
"title",
|
|
700
700
|
"disabled"
|
|
701
|
-
],
|
|
701
|
+
], 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)]", Nn = /* @__PURE__ */ M({
|
|
702
702
|
__name: "MergeTagInsertButton",
|
|
703
703
|
props: { disabled: { type: Boolean } },
|
|
704
704
|
emits: ["insert"],
|
|
705
705
|
setup(e) {
|
|
706
|
-
let { t } =
|
|
706
|
+
let { t } = H();
|
|
707
707
|
return (n, r) => (s(), v("button", {
|
|
708
708
|
type: "button",
|
|
709
|
-
class: T([
|
|
709
|
+
class: T([Mn, "tpl:mt-1.5"]),
|
|
710
710
|
"aria-label": b(t).mergeTag.insert,
|
|
711
711
|
title: b(t).mergeTag.insert,
|
|
712
712
|
disabled: e.disabled,
|
|
713
713
|
onMousedown: r[0] ||= x(() => {}, ["prevent"]),
|
|
714
714
|
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
715
|
-
}, [N(b(
|
|
715
|
+
}, [N(b(Et), {
|
|
716
716
|
size: 12,
|
|
717
717
|
"stroke-width": 2
|
|
718
|
-
}), j(" " + g(b(t).mergeTag.insertShort), 1)], 42,
|
|
718
|
+
}), j(" " + g(b(t).mergeTag.insertShort), 1)], 42, jn));
|
|
719
719
|
}
|
|
720
|
-
}),
|
|
720
|
+
}), Pn = [
|
|
721
721
|
"aria-label",
|
|
722
722
|
"title",
|
|
723
723
|
"disabled"
|
|
724
|
-
],
|
|
724
|
+
], Fn = "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)]", In = /* @__PURE__ */ M({
|
|
725
725
|
__name: "LogicTagInsertButton",
|
|
726
726
|
props: { disabled: { type: Boolean } },
|
|
727
727
|
emits: ["insert"],
|
|
728
728
|
setup(e) {
|
|
729
|
-
let { t } =
|
|
729
|
+
let { t } = H();
|
|
730
730
|
return (n, r) => (s(), v("button", {
|
|
731
731
|
type: "button",
|
|
732
|
-
class: T([
|
|
732
|
+
class: T([Fn, "tpl:mt-1.5"]),
|
|
733
733
|
"aria-label": b(t).logicTag.insert,
|
|
734
734
|
title: b(t).logicTag.insert,
|
|
735
735
|
disabled: e.disabled,
|
|
736
736
|
"data-testid": "field-insert-logic-button",
|
|
737
737
|
onMousedown: r[0] ||= x(() => {}, ["prevent"]),
|
|
738
738
|
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
739
|
-
}, [N(b(
|
|
739
|
+
}, [N(b(Ct), {
|
|
740
740
|
size: 12,
|
|
741
741
|
"stroke-width": 2
|
|
742
|
-
}), j(" " + g(b(t).logicTag.insertShort), 1)], 42,
|
|
742
|
+
}), j(" " + g(b(t).logicTag.insertShort), 1)], 42, Pn));
|
|
743
743
|
}
|
|
744
|
-
}),
|
|
744
|
+
}), Ln = { key: 0 }, Rn = {
|
|
745
745
|
key: 0,
|
|
746
746
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
747
|
-
},
|
|
747
|
+
}, zn = { key: 1 }, Bn = [
|
|
748
748
|
"value",
|
|
749
749
|
"placeholder",
|
|
750
750
|
"rows"
|
|
751
|
-
],
|
|
751
|
+
], Vn = {
|
|
752
752
|
key: 0,
|
|
753
753
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
754
|
-
},
|
|
754
|
+
}, Hn = "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)]", Un = "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)]", Wn = /* @__PURE__ */ M({
|
|
755
755
|
__name: "MergeTagTextarea",
|
|
756
756
|
props: {
|
|
757
757
|
modelValue: {},
|
|
@@ -760,32 +760,32 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
760
760
|
},
|
|
761
761
|
emits: ["update:modelValue"],
|
|
762
762
|
setup(e, { emit: t }) {
|
|
763
|
-
let n = e, r = t, i = p(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: m, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: x, clearValue: C, insertMergeTag: w, insertLogicTag: D } =
|
|
763
|
+
let n = e, r = t, i = p(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: m, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: x, clearValue: C, insertMergeTag: w, insertLogicTag: D } = wn({
|
|
764
764
|
modelValue: () => n.modelValue,
|
|
765
765
|
emit: (e) => r("update:modelValue", e),
|
|
766
766
|
elementRef: i
|
|
767
767
|
});
|
|
768
|
-
return (t, n) => b(o) && !b(f) ? (s(), v("div",
|
|
768
|
+
return (t, n) => b(o) && !b(f) ? (s(), v("div", Ln, [N(An, {
|
|
769
769
|
segments: b(a),
|
|
770
|
-
"display-class":
|
|
770
|
+
"display-class": Un,
|
|
771
771
|
onEdit: b(m),
|
|
772
772
|
onClear: b(C)
|
|
773
773
|
}, null, 8, [
|
|
774
774
|
"segments",
|
|
775
775
|
"onEdit",
|
|
776
776
|
"onClear"
|
|
777
|
-
]), b(c) || b(u) ? (s(), v("div",
|
|
777
|
+
]), b(c) || b(u) ? (s(), v("div", Rn, [b(c) ? (s(), S(Nn, {
|
|
778
778
|
key: 0,
|
|
779
779
|
disabled: b(l),
|
|
780
780
|
onInsert: b(w)
|
|
781
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(
|
|
781
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(In, {
|
|
782
782
|
key: 1,
|
|
783
783
|
disabled: b(d),
|
|
784
784
|
onInsert: b(D)
|
|
785
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)])) : (s(), v("div",
|
|
785
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)])) : (s(), v("div", zn, [E("textarea", {
|
|
786
786
|
ref_key: "textareaRef",
|
|
787
787
|
ref: i,
|
|
788
|
-
class: T(
|
|
788
|
+
class: T(Hn),
|
|
789
789
|
value: e.modelValue,
|
|
790
790
|
placeholder: e.placeholder,
|
|
791
791
|
rows: e.rows,
|
|
@@ -793,22 +793,22 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
793
793
|
onKeydown: n[1] ||= (...e) => b(g) && b(g)(...e),
|
|
794
794
|
onClick: n[2] ||= (...e) => b(_) && b(_)(...e),
|
|
795
795
|
onBlur: n[3] ||= (...e) => b(x) && b(x)(...e)
|
|
796
|
-
}, null, 40,
|
|
796
|
+
}, null, 40, Bn), b(c) || b(u) ? (s(), v("div", Vn, [b(c) ? (s(), S(Nn, {
|
|
797
797
|
key: 0,
|
|
798
798
|
disabled: b(l),
|
|
799
799
|
onInsert: b(w)
|
|
800
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(
|
|
800
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(In, {
|
|
801
801
|
key: 1,
|
|
802
802
|
disabled: b(d),
|
|
803
803
|
onInsert: b(D)
|
|
804
804
|
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)]));
|
|
805
805
|
}
|
|
806
|
-
}),
|
|
806
|
+
}), Gn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, Kn = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, qn = { 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" }, Yn = { 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)]" }, Xn = ["onClick"], Zn = { class: "tpl:flex tpl:items-stretch" }, Qn = ["value"], $n = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, er = { class: "tpl:mb-3.5" }, tr = { class: "tpl:mb-3.5" }, nr = { class: "tpl:mb-3.5" }, rr = { class: "tpl:mb-3.5" }, ir = { class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-between tpl:gap-2" }, ar = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, or = ["aria-checked", "aria-label"], sr = ["value"], cr = ["value"], lr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ur = ["value"], dr = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, fr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, pr = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, mr = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, hr = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, gr = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, _r = { 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)]" }, vr = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, yr = { class: "tpl:mb-1 tpl:last:mb-0" }, br = { class: "tpl:mb-1 tpl:last:mb-0" }, xr = { class: "tpl:mb-1 tpl:last:mb-0" }, Sr = 150, Cr = /* @__PURE__ */ M({
|
|
807
807
|
__name: "TemplateSettings",
|
|
808
808
|
props: { settings: {} },
|
|
809
809
|
emits: ["update"],
|
|
810
810
|
setup(e, { emit: t }) {
|
|
811
|
-
let n = e, r = t, { t: i } =
|
|
811
|
+
let n = e, r = t, { t: i } = H(), a = lt(Ee, "TemplateSettings"), o = _(() => a.fonts.value), c = _(() => o.value.some((e) => e.value === n.settings.fontFamily) ? n.settings.fontFamily : a.defaultFont.value), u = [
|
|
812
812
|
{
|
|
813
813
|
value: 480,
|
|
814
814
|
label: "480px"
|
|
@@ -826,14 +826,14 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
826
826
|
label: "800px"
|
|
827
827
|
}
|
|
828
828
|
];
|
|
829
|
-
return (t, n) => (s(), v("aside",
|
|
830
|
-
E("div", { class: T(b(
|
|
831
|
-
E("div",
|
|
829
|
+
return (t, n) => (s(), v("aside", Gn, [E("div", Kn, [
|
|
830
|
+
E("div", { class: T(b(Wt)) }, [
|
|
831
|
+
E("div", qn, [N(b(kt), {
|
|
832
832
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
833
833
|
size: 14,
|
|
834
834
|
"stroke-width": 2
|
|
835
835
|
}), E("span", null, g(b(i).templateSettings.layout), 1)]),
|
|
836
|
-
E("div",
|
|
836
|
+
E("div", Jn, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.widthPreset), 3), E("div", Yn, [(s(), v(A, null, l(u, (t) => E("button", {
|
|
837
837
|
key: t.value,
|
|
838
838
|
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)]",
|
|
839
839
|
style: O({
|
|
@@ -842,103 +842,103 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
842
842
|
boxShadow: e.settings.width === t.value ? "var(--tpl-shadow)" : "none"
|
|
843
843
|
}),
|
|
844
844
|
onClick: (e) => r("update", { width: t.value })
|
|
845
|
-
}, g(t.label), 13,
|
|
846
|
-
E("div", null, [E("label", { class: T(b(
|
|
845
|
+
}, g(t.label), 13, Xn)), 64))])]),
|
|
846
|
+
E("div", null, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.customWidth), 3), E("div", Zn, [E("input", {
|
|
847
847
|
type: "number",
|
|
848
|
-
class: T(b(
|
|
848
|
+
class: T(b(q)),
|
|
849
849
|
value: e.settings.width,
|
|
850
850
|
min: "300",
|
|
851
851
|
max: "900",
|
|
852
852
|
onInput: n[0] ||= (e) => r("update", { width: Number(e.target.value) })
|
|
853
|
-
}, null, 42,
|
|
853
|
+
}, null, 42, Qn), E("span", { class: T(b(K)) }, "px", 2)])])
|
|
854
854
|
], 2),
|
|
855
|
-
E("div", { class: T(b(
|
|
856
|
-
E("div",
|
|
855
|
+
E("div", { class: T(b(Wt)) }, [
|
|
856
|
+
E("div", $n, [N(b(wt), {
|
|
857
857
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
858
858
|
size: 14,
|
|
859
859
|
"stroke-width": 2
|
|
860
860
|
}), E("span", null, g(b(i).templateSettings.appearance), 1)]),
|
|
861
|
-
E("div",
|
|
861
|
+
E("div", er, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.backgroundColor), 3), N(J, {
|
|
862
862
|
"model-value": e.settings.backgroundColor,
|
|
863
863
|
placeholder: b(Ut),
|
|
864
864
|
"onUpdate:modelValue": n[1] ||= (e) => r("update", { backgroundColor: e })
|
|
865
865
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
866
|
-
E("div",
|
|
866
|
+
E("div", tr, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.textColor), 3), N(J, {
|
|
867
867
|
"model-value": e.settings.textColor ?? "",
|
|
868
868
|
"seed-color": "#1a1a1a",
|
|
869
869
|
"onUpdate:modelValue": n[2] ||= (e) => r("update", { textColor: e })
|
|
870
870
|
}, null, 8, ["model-value"])]),
|
|
871
|
-
E("div",
|
|
871
|
+
E("div", nr, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.linkColor), 3), N(J, {
|
|
872
872
|
"model-value": e.settings.linkColor ?? "",
|
|
873
873
|
"seed-color": "#0066cc",
|
|
874
874
|
"onUpdate:modelValue": n[3] ||= (e) => r("update", { linkColor: e || void 0 })
|
|
875
875
|
}, null, 8, ["model-value"])]),
|
|
876
|
-
E("div",
|
|
876
|
+
E("div", rr, [E("label", ir, [E("span", ar, g(b(i).templateSettings.linkUnderline), 1), E("button", {
|
|
877
877
|
type: "button",
|
|
878
878
|
role: "switch",
|
|
879
879
|
"aria-checked": e.settings.linkUnderline,
|
|
880
880
|
"aria-label": b(i).templateSettings.linkUnderline,
|
|
881
881
|
class: T(["tpl:relative tpl:inline-flex tpl:h-5 tpl:w-9 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-full tpl:border-2 tpl:border-transparent tpl:transition-colors tpl:duration-200", e.settings.linkUnderline ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-border)]"]),
|
|
882
882
|
onClick: n[4] ||= (t) => r("update", { linkUnderline: !e.settings.linkUnderline })
|
|
883
|
-
}, [E("span", { class: T(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.settings.linkUnderline ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10,
|
|
884
|
-
E("div", null, [E("label", { class: T(b(
|
|
885
|
-
class: T(b(
|
|
883
|
+
}, [E("span", { class: T(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.settings.linkUnderline ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, or)])]),
|
|
884
|
+
E("div", null, [E("label", { class: T(b(G)) }, g(b(i).templateSettings.fontFamily), 3), E("select", {
|
|
885
|
+
class: T(b(W)),
|
|
886
886
|
value: c.value,
|
|
887
887
|
onChange: n[5] ||= (e) => r("update", { fontFamily: e.target.value })
|
|
888
888
|
}, [(s(!0), v(A, null, l(o.value, (e) => (s(), v("option", {
|
|
889
889
|
key: e.value,
|
|
890
890
|
value: e.value
|
|
891
|
-
}, g(e.label), 9,
|
|
891
|
+
}, g(e.label), 9, cr))), 128))], 42, sr)])
|
|
892
892
|
], 2),
|
|
893
|
-
E("div", { class: T(b(
|
|
893
|
+
E("div", { class: T(b(Wt)) }, [E("div", lr, [N(b(gt), {
|
|
894
894
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
895
895
|
size: 14,
|
|
896
896
|
"stroke-width": 2
|
|
897
897
|
}), E("span", null, g(b(i).templateSettings.language), 1)]), E("div", null, [
|
|
898
|
-
E("label", { class: T(b(
|
|
898
|
+
E("label", { class: T(b(G)) }, g(b(i).templateSettings.contentLocale), 3),
|
|
899
899
|
E("input", {
|
|
900
900
|
type: "text",
|
|
901
|
-
class: T(b(
|
|
901
|
+
class: T(b(W)),
|
|
902
902
|
value: e.settings.locale ?? "",
|
|
903
903
|
placeholder: "en",
|
|
904
904
|
spellcheck: "false",
|
|
905
905
|
autocapitalize: "off",
|
|
906
906
|
autocomplete: "off",
|
|
907
907
|
onInput: n[6] ||= (e) => r("update", { locale: e.target.value.trim() || void 0 })
|
|
908
|
-
}, null, 42,
|
|
909
|
-
E("p",
|
|
908
|
+
}, null, 42, ur),
|
|
909
|
+
E("p", dr, g(b(i).templateSettings.contentLocaleHint), 1)
|
|
910
910
|
])], 2),
|
|
911
|
-
E("div", { class: T(b(
|
|
911
|
+
E("div", { class: T(b(Wt)) }, [E("div", fr, [N(b(Ae), {
|
|
912
912
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
913
913
|
size: 14,
|
|
914
914
|
"stroke-width": 2
|
|
915
|
-
}), E("span", null, g(b(i).templateSettings.preheaderText), 1)]), E("div", null, [N(
|
|
915
|
+
}), E("span", null, g(b(i).templateSettings.preheaderText), 1)]), E("div", null, [N(Wn, {
|
|
916
916
|
"model-value": e.settings.preheaderText ?? "",
|
|
917
917
|
placeholder: b(i).templateSettings.preheaderTextPlaceholder,
|
|
918
918
|
rows: 2,
|
|
919
919
|
"onUpdate:modelValue": n[7] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
920
|
-
}, null, 8, ["model-value", "placeholder"]), E("div",
|
|
921
|
-
E("div",
|
|
920
|
+
}, null, 8, ["model-value", "placeholder"]), E("div", pr, [E("span", mr, g(b(i).templateSettings.preheaderTextHint), 1), E("span", hr, g((e.settings.preheaderText ?? "").length) + "/" + g(Sr), 1)])])], 2),
|
|
921
|
+
E("div", gr, [E("div", _r, [N(b(Oe), {
|
|
922
922
|
size: 14,
|
|
923
923
|
"stroke-width": 2
|
|
924
|
-
}), E("span", null, g(b(i).templateSettings.tips), 1)]), E("ul",
|
|
925
|
-
E("li",
|
|
926
|
-
E("li",
|
|
927
|
-
E("li",
|
|
924
|
+
}), E("span", null, g(b(i).templateSettings.tips), 1)]), E("ul", vr, [
|
|
925
|
+
E("li", yr, g(b(i).templateSettings.tip1), 1),
|
|
926
|
+
E("li", br, g(b(i).templateSettings.tip2), 1),
|
|
927
|
+
E("li", xr, g(b(i).templateSettings.tip3), 1)
|
|
928
928
|
])])
|
|
929
929
|
])]));
|
|
930
930
|
}
|
|
931
|
-
}),
|
|
931
|
+
}), wr = { key: 0 }, Tr = {
|
|
932
932
|
key: 0,
|
|
933
933
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
934
|
-
},
|
|
934
|
+
}, Er = { key: 1 }, Dr = [
|
|
935
935
|
"type",
|
|
936
936
|
"value",
|
|
937
937
|
"placeholder"
|
|
938
|
-
],
|
|
938
|
+
], Or = {
|
|
939
939
|
key: 0,
|
|
940
940
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
941
|
-
},
|
|
941
|
+
}, kr = "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__*/ et(/* @__PURE__ */ M({
|
|
942
942
|
__name: "MergeTagInput",
|
|
943
943
|
props: {
|
|
944
944
|
modelValue: {},
|
|
@@ -951,14 +951,14 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
951
951
|
},
|
|
952
952
|
emits: ["update:modelValue"],
|
|
953
953
|
setup(e, { emit: t }) {
|
|
954
|
-
let n = e, r = t, i = p(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: m, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: x, clearValue: C, insertMergeTag: w, insertLogicTag: D } =
|
|
954
|
+
let n = e, r = t, i = p(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: m, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: x, clearValue: C, insertMergeTag: w, insertLogicTag: D } = wn({
|
|
955
955
|
modelValue: () => n.modelValue,
|
|
956
956
|
emit: (e) => r("update:modelValue", e),
|
|
957
957
|
elementRef: i
|
|
958
958
|
});
|
|
959
|
-
return (t, n) => b(o) && !b(f) ? (s(), v("div",
|
|
959
|
+
return (t, n) => b(o) && !b(f) ? (s(), v("div", wr, [N(An, {
|
|
960
960
|
segments: b(a),
|
|
961
|
-
"display-class":
|
|
961
|
+
"display-class": kr,
|
|
962
962
|
pulse: e.pulse,
|
|
963
963
|
onEdit: b(m),
|
|
964
964
|
onClear: b(C)
|
|
@@ -967,42 +967,42 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
967
967
|
"pulse",
|
|
968
968
|
"onEdit",
|
|
969
969
|
"onClear"
|
|
970
|
-
]), b(c) || b(u) ? (s(), v("div",
|
|
970
|
+
]), b(c) || b(u) ? (s(), v("div", Tr, [b(c) ? (s(), S(Nn, {
|
|
971
971
|
key: 0,
|
|
972
972
|
disabled: b(l),
|
|
973
973
|
onInsert: b(w)
|
|
974
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(
|
|
974
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(In, {
|
|
975
975
|
key: 1,
|
|
976
976
|
disabled: b(d),
|
|
977
977
|
onInsert: b(D)
|
|
978
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)])) : (s(), v("div",
|
|
978
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)])) : (s(), v("div", Er, [E("input", {
|
|
979
979
|
ref_key: "inputRef",
|
|
980
980
|
ref: i,
|
|
981
981
|
type: e.type,
|
|
982
|
-
class: T([b(
|
|
982
|
+
class: T([b(W), { "tpl-pulse-fill": e.pulse }]),
|
|
983
983
|
value: e.modelValue,
|
|
984
984
|
placeholder: e.placeholder,
|
|
985
985
|
onInput: n[0] ||= (...e) => b(h) && b(h)(...e),
|
|
986
986
|
onKeydown: n[1] ||= (...e) => b(g) && b(g)(...e),
|
|
987
987
|
onClick: n[2] ||= (...e) => b(_) && b(_)(...e),
|
|
988
988
|
onBlur: n[3] ||= (...e) => b(x) && b(x)(...e)
|
|
989
|
-
}, null, 42,
|
|
989
|
+
}, null, 42, Dr), b(c) || b(u) ? (s(), v("div", Or, [b(c) ? (s(), S(Nn, {
|
|
990
990
|
key: 0,
|
|
991
991
|
disabled: b(l),
|
|
992
992
|
onInsert: b(w)
|
|
993
|
-
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(
|
|
993
|
+
}, null, 8, ["disabled", "onInsert"])) : y("", !0), b(u) ? (s(), S(In, {
|
|
994
994
|
key: 1,
|
|
995
995
|
disabled: b(d),
|
|
996
996
|
onInsert: b(D)
|
|
997
997
|
}, null, 8, ["disabled", "onInsert"])) : y("", !0)])) : y("", !0)]));
|
|
998
998
|
}
|
|
999
|
-
}), [["__scopeId", "data-v-d6563be6"]]),
|
|
999
|
+
}), [["__scopeId", "data-v-d6563be6"]]), Ar = { class: "tpl:mb-3.5" }, jr = ["value"], Mr = { value: "" }, Nr = ["value"], Pr = { class: "tpl:mb-3.5" }, Fr = { class: "tpl:mb-3.5" }, Ir = {
|
|
1000
1000
|
key: 0,
|
|
1001
1001
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
1002
|
-
},
|
|
1002
|
+
}, Lr = ["checked"], Rr = { class: "tpl:mb-3.5" }, zr = { class: "tpl:mb-3.5" }, Br = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Vr = { class: "tpl:mb-3.5" }, Hr = { class: "tpl:flex tpl:items-stretch" }, Ur = ["value"], Wr = { class: "tpl:mb-3.5" }, Gr = { class: "tpl:flex tpl:items-stretch" }, Kr = ["value"], qr = { class: "tpl:mb-3.5" }, Jr = ["value"], Yr = { value: "auto" }, Xr = { value: "full" }, Zr = { value: "custom" }, Qr = {
|
|
1003
1003
|
key: 0,
|
|
1004
1004
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
1005
|
-
},
|
|
1005
|
+
}, $r = ["value"], ei = 200, ti = /* @__PURE__ */ M({
|
|
1006
1006
|
__name: "ButtonToolbar",
|
|
1007
1007
|
props: {
|
|
1008
1008
|
block: {},
|
|
@@ -1010,7 +1010,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1010
1010
|
},
|
|
1011
1011
|
emits: ["update"],
|
|
1012
1012
|
setup(e, { emit: t }) {
|
|
1013
|
-
let n = e, r = t, { t: i } =
|
|
1013
|
+
let n = e, r = t, { t: i } = H(), a = _(() => n.block.width === "full" ? "full" : typeof n.block.width == "number" ? "custom" : "auto");
|
|
1014
1014
|
function o(e, t) {
|
|
1015
1015
|
r("update", { [e]: t });
|
|
1016
1016
|
}
|
|
@@ -1020,7 +1020,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1020
1020
|
return;
|
|
1021
1021
|
}
|
|
1022
1022
|
if (e === "custom") {
|
|
1023
|
-
o("width", typeof n.block.width == "number" ? n.block.width :
|
|
1023
|
+
o("width", typeof n.block.width == "number" ? n.block.width : ei);
|
|
1024
1024
|
return;
|
|
1025
1025
|
}
|
|
1026
1026
|
o("width", void 0);
|
|
@@ -1030,79 +1030,79 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1030
1030
|
!Number.isFinite(t) || t <= 0 || o("width", t);
|
|
1031
1031
|
}
|
|
1032
1032
|
return (t, n) => (s(), v(A, null, [
|
|
1033
|
-
E("div",
|
|
1034
|
-
class: T(b(
|
|
1033
|
+
E("div", Ar, [E("label", { class: T(b(G)) }, g(b(i).button.fontFamily), 3), E("select", {
|
|
1034
|
+
class: T(b(W)),
|
|
1035
1035
|
value: e.block.fontFamily || "",
|
|
1036
1036
|
onChange: n[0] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
1037
|
-
}, [E("option",
|
|
1037
|
+
}, [E("option", Mr, g(b(i).button.inheritFont), 1), (s(!0), v(A, null, l(e.fontFamilies, (e) => (s(), v("option", {
|
|
1038
1038
|
key: e.value,
|
|
1039
1039
|
value: e.value
|
|
1040
|
-
}, g(e.label), 9,
|
|
1041
|
-
E("div",
|
|
1040
|
+
}, g(e.label), 9, Nr))), 128))], 42, jr)]),
|
|
1041
|
+
E("div", Pr, [E("label", { class: T(b(G)) }, g(b(i).button.text), 3), N(Z, {
|
|
1042
1042
|
"model-value": e.block.text,
|
|
1043
1043
|
type: "text",
|
|
1044
1044
|
"onUpdate:modelValue": n[1] ||= (e) => o("text", e)
|
|
1045
1045
|
}, null, 8, ["model-value"])]),
|
|
1046
|
-
E("div",
|
|
1047
|
-
E("label", { class: T(b(
|
|
1048
|
-
N(
|
|
1046
|
+
E("div", Fr, [
|
|
1047
|
+
E("label", { class: T(b(G)) }, g(b(i).button.url), 3),
|
|
1048
|
+
N(Z, {
|
|
1049
1049
|
"model-value": e.block.url,
|
|
1050
1050
|
type: "url",
|
|
1051
1051
|
placeholder: b(i).button.urlPlaceholder,
|
|
1052
1052
|
"onUpdate:modelValue": n[2] ||= (e) => o("url", e)
|
|
1053
1053
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1054
|
-
e.block.url ? (s(), v("label",
|
|
1054
|
+
e.block.url ? (s(), v("label", Ir, [E("input", {
|
|
1055
1055
|
type: "checkbox",
|
|
1056
1056
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1057
1057
|
checked: e.block.openInNewTab ?? !1,
|
|
1058
1058
|
onChange: n[3] ||= (e) => o("openInNewTab", e.target.checked)
|
|
1059
|
-
}, null, 40,
|
|
1059
|
+
}, null, 40, Lr), j(" " + g(b(i).button.openInNewTab), 1)])) : y("", !0)
|
|
1060
1060
|
]),
|
|
1061
|
-
E("div",
|
|
1061
|
+
E("div", Rr, [E("label", { class: T(b(G)) }, g(b(i).button.background), 3), N(J, {
|
|
1062
1062
|
"model-value": e.block.backgroundColor,
|
|
1063
1063
|
"onUpdate:modelValue": n[4] ||= (e) => o("backgroundColor", e)
|
|
1064
1064
|
}, null, 8, ["model-value"])]),
|
|
1065
|
-
E("div",
|
|
1065
|
+
E("div", zr, [E("label", { class: T(b(G)) }, g(b(i).button.textColor), 3), N(J, {
|
|
1066
1066
|
"model-value": e.block.textColor,
|
|
1067
1067
|
"onUpdate:modelValue": n[5] ||= (e) => o("textColor", e)
|
|
1068
1068
|
}, null, 8, ["model-value"])]),
|
|
1069
|
-
E("div",
|
|
1069
|
+
E("div", Br, [E("div", Vr, [E("label", { class: T(b(G)) }, g(b(i).button.borderRadius), 3), E("div", Hr, [E("input", {
|
|
1070
1070
|
type: "number",
|
|
1071
|
-
class: T(b(
|
|
1071
|
+
class: T(b(q)),
|
|
1072
1072
|
value: e.block.borderRadius,
|
|
1073
1073
|
min: "0",
|
|
1074
1074
|
max: "50",
|
|
1075
1075
|
onInput: n[6] ||= (e) => o("borderRadius", Number(e.target.value))
|
|
1076
|
-
}, null, 42,
|
|
1076
|
+
}, null, 42, Ur), E("span", { class: T(b(K)) }, "px", 2)])]), E("div", Wr, [E("label", { class: T(b(G)) }, g(b(i).button.fontSize), 3), E("div", Gr, [E("input", {
|
|
1077
1077
|
type: "number",
|
|
1078
|
-
class: T(b(
|
|
1078
|
+
class: T(b(q)),
|
|
1079
1079
|
value: e.block.fontSize,
|
|
1080
1080
|
min: "10",
|
|
1081
1081
|
max: "36",
|
|
1082
1082
|
onInput: n[7] ||= (e) => o("fontSize", Number(e.target.value))
|
|
1083
|
-
}, null, 42,
|
|
1084
|
-
E("div",
|
|
1085
|
-
E("label", { class: T(b(
|
|
1083
|
+
}, null, 42, Kr), E("span", { class: T(b(K)) }, "px", 2)])])]),
|
|
1084
|
+
E("div", qr, [
|
|
1085
|
+
E("label", { class: T(b(G)) }, g(b(i).button.width), 3),
|
|
1086
1086
|
E("select", {
|
|
1087
|
-
class: T(b(
|
|
1087
|
+
class: T(b(W)),
|
|
1088
1088
|
value: a.value,
|
|
1089
1089
|
onChange: n[8] ||= (e) => c(e.target.value)
|
|
1090
1090
|
}, [
|
|
1091
|
-
E("option",
|
|
1092
|
-
E("option",
|
|
1093
|
-
E("option",
|
|
1094
|
-
], 42,
|
|
1095
|
-
a.value === "custom" ? (s(), v("div",
|
|
1091
|
+
E("option", Yr, g(b(i).button.widthAuto), 1),
|
|
1092
|
+
E("option", Xr, g(b(i).button.fullWidth), 1),
|
|
1093
|
+
E("option", Zr, g(b(i).button.widthCustom), 1)
|
|
1094
|
+
], 42, Jr),
|
|
1095
|
+
a.value === "custom" ? (s(), v("div", Qr, [E("input", {
|
|
1096
1096
|
type: "number",
|
|
1097
|
-
class: T(b(
|
|
1098
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
1097
|
+
class: T(b(q)),
|
|
1098
|
+
value: typeof e.block.width == "number" ? e.block.width : ei,
|
|
1099
1099
|
min: "20",
|
|
1100
1100
|
onInput: n[9] ||= (e) => u(e.target.value)
|
|
1101
|
-
}, null, 42,
|
|
1101
|
+
}, null, 42, $r), E("span", { class: T(b(K)) }, "px", 2)])) : y("", !0)
|
|
1102
1102
|
])
|
|
1103
1103
|
], 64));
|
|
1104
1104
|
}
|
|
1105
|
-
}),
|
|
1105
|
+
}), ni = { class: "spacing-control" }, ri = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ii = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, ai = { class: "tpl:flex tpl:items-center" }, oi = ["aria-label"], si = ["value", "aria-label"], ci = ["aria-label"], li = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ui = { class: "tpl:flex tpl:items-center" }, di = ["aria-label"], fi = ["value", "aria-label"], pi = ["aria-label"], mi = ["aria-label", "title"], hi = { class: "tpl:flex tpl:items-center" }, gi = ["aria-label"], _i = ["value", "aria-label"], vi = ["aria-label"], yi = { class: "tpl:flex tpl:items-center" }, bi = ["aria-label"], xi = ["value", "aria-label"], Si = ["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)]", Ci = "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)]", wi = /*#__PURE__*/ et(/* @__PURE__ */ M({
|
|
1106
1106
|
__name: "SpacingControl",
|
|
1107
1107
|
props: {
|
|
1108
1108
|
modelValue: {},
|
|
@@ -1110,7 +1110,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1110
1110
|
},
|
|
1111
1111
|
emits: ["update:modelValue"],
|
|
1112
1112
|
setup(e, { emit: t }) {
|
|
1113
|
-
let n = e, r = t, { t: i } =
|
|
1113
|
+
let n = e, r = t, { t: i } = H(), a = _(() => n.modelValue.top === n.modelValue.right && n.modelValue.right === n.modelValue.bottom && n.modelValue.bottom === n.modelValue.left), o = p(a.value);
|
|
1114
1114
|
P(a, (e) => {
|
|
1115
1115
|
!e && o.value && (o.value = !1);
|
|
1116
1116
|
});
|
|
@@ -1149,130 +1149,130 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1149
1149
|
});
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
return (t, n) => (s(), v("div",
|
|
1153
|
-
E("div",
|
|
1152
|
+
return (t, n) => (s(), v("div", ni, [E("label", ri, g(e.label), 1), E("div", ii, [
|
|
1153
|
+
E("div", ai, [
|
|
1154
1154
|
E("button", {
|
|
1155
1155
|
"aria-label": b(i).spacingControl.decreaseTop,
|
|
1156
|
-
class: T([
|
|
1156
|
+
class: T([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1157
1157
|
onClick: n[0] ||= (e) => c("top", -1)
|
|
1158
|
-
}, [N(b(
|
|
1158
|
+
}, [N(b(xt), {
|
|
1159
1159
|
size: 12,
|
|
1160
1160
|
"stroke-width": 2
|
|
1161
|
-
})], 10,
|
|
1161
|
+
})], 10, oi),
|
|
1162
1162
|
E("input", {
|
|
1163
1163
|
type: "number",
|
|
1164
|
-
class: T(
|
|
1164
|
+
class: T(Ci),
|
|
1165
1165
|
value: e.modelValue.top,
|
|
1166
1166
|
"aria-label": b(i).spacingControl.top,
|
|
1167
1167
|
min: "0",
|
|
1168
1168
|
onInput: n[1] ||= (e) => l("top", Number(e.target.value))
|
|
1169
|
-
}, null, 40,
|
|
1169
|
+
}, null, 40, si),
|
|
1170
1170
|
E("button", {
|
|
1171
1171
|
"aria-label": b(i).spacingControl.increaseTop,
|
|
1172
|
-
class: T([
|
|
1172
|
+
class: T([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1173
1173
|
onClick: n[2] ||= (e) => c("top", 1)
|
|
1174
|
-
}, [N(b(
|
|
1174
|
+
}, [N(b(U), {
|
|
1175
1175
|
size: 12,
|
|
1176
1176
|
"stroke-width": 2
|
|
1177
|
-
})], 10,
|
|
1177
|
+
})], 10, ci)
|
|
1178
1178
|
]),
|
|
1179
|
-
E("div",
|
|
1180
|
-
E("div",
|
|
1179
|
+
E("div", li, [
|
|
1180
|
+
E("div", ui, [
|
|
1181
1181
|
E("button", {
|
|
1182
1182
|
"aria-label": b(i).spacingControl.decreaseLeft,
|
|
1183
|
-
class: T([
|
|
1183
|
+
class: T([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1184
1184
|
onClick: n[3] ||= (e) => c("left", -1)
|
|
1185
|
-
}, [N(b(
|
|
1185
|
+
}, [N(b(xt), {
|
|
1186
1186
|
size: 12,
|
|
1187
1187
|
"stroke-width": 2
|
|
1188
|
-
})], 10,
|
|
1188
|
+
})], 10, di),
|
|
1189
1189
|
E("input", {
|
|
1190
1190
|
type: "number",
|
|
1191
|
-
class: T(
|
|
1191
|
+
class: T(Ci),
|
|
1192
1192
|
value: e.modelValue.left,
|
|
1193
1193
|
"aria-label": b(i).spacingControl.left,
|
|
1194
1194
|
min: "0",
|
|
1195
1195
|
onInput: n[4] ||= (e) => l("left", Number(e.target.value))
|
|
1196
|
-
}, null, 40,
|
|
1196
|
+
}, null, 40, fi),
|
|
1197
1197
|
E("button", {
|
|
1198
1198
|
"aria-label": b(i).spacingControl.increaseLeft,
|
|
1199
|
-
class: T([
|
|
1199
|
+
class: T([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1200
1200
|
onClick: n[5] ||= (e) => c("left", 1)
|
|
1201
|
-
}, [N(b(
|
|
1201
|
+
}, [N(b(U), {
|
|
1202
1202
|
size: 12,
|
|
1203
1203
|
"stroke-width": 2
|
|
1204
|
-
})], 10,
|
|
1204
|
+
})], 10, pi)
|
|
1205
1205
|
]),
|
|
1206
1206
|
E("button", {
|
|
1207
1207
|
class: T(["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)]", o.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)]"]),
|
|
1208
1208
|
"aria-label": o.value ? b(i).spacingControl.unlock : b(i).spacingControl.lockAll,
|
|
1209
1209
|
title: o.value ? b(i).spacingControl.unlock : b(i).spacingControl.lockAll,
|
|
1210
1210
|
onClick: u
|
|
1211
|
-
}, [o.value ? (s(), S(b(
|
|
1211
|
+
}, [o.value ? (s(), S(b(ht), {
|
|
1212
1212
|
key: 0,
|
|
1213
1213
|
size: 14,
|
|
1214
1214
|
"stroke-width": 2
|
|
1215
|
-
})) : (s(), S(b(
|
|
1215
|
+
})) : (s(), S(b(_t), {
|
|
1216
1216
|
key: 1,
|
|
1217
1217
|
size: 14,
|
|
1218
1218
|
"stroke-width": 2
|
|
1219
|
-
}))], 10,
|
|
1220
|
-
E("div",
|
|
1219
|
+
}))], 10, mi),
|
|
1220
|
+
E("div", hi, [
|
|
1221
1221
|
E("button", {
|
|
1222
1222
|
"aria-label": b(i).spacingControl.decreaseRight,
|
|
1223
|
-
class: T([
|
|
1223
|
+
class: T([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1224
1224
|
onClick: n[6] ||= (e) => c("right", -1)
|
|
1225
|
-
}, [N(b(
|
|
1225
|
+
}, [N(b(xt), {
|
|
1226
1226
|
size: 12,
|
|
1227
1227
|
"stroke-width": 2
|
|
1228
|
-
})], 10,
|
|
1228
|
+
})], 10, gi),
|
|
1229
1229
|
E("input", {
|
|
1230
1230
|
type: "number",
|
|
1231
|
-
class: T(
|
|
1231
|
+
class: T(Ci),
|
|
1232
1232
|
value: e.modelValue.right,
|
|
1233
1233
|
"aria-label": b(i).spacingControl.right,
|
|
1234
1234
|
min: "0",
|
|
1235
1235
|
onInput: n[7] ||= (e) => l("right", Number(e.target.value))
|
|
1236
|
-
}, null, 40,
|
|
1236
|
+
}, null, 40, _i),
|
|
1237
1237
|
E("button", {
|
|
1238
1238
|
"aria-label": b(i).spacingControl.increaseRight,
|
|
1239
|
-
class: T([
|
|
1239
|
+
class: T([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1240
1240
|
onClick: n[8] ||= (e) => c("right", 1)
|
|
1241
|
-
}, [N(b(
|
|
1241
|
+
}, [N(b(U), {
|
|
1242
1242
|
size: 12,
|
|
1243
1243
|
"stroke-width": 2
|
|
1244
|
-
})], 10,
|
|
1244
|
+
})], 10, vi)
|
|
1245
1245
|
])
|
|
1246
1246
|
]),
|
|
1247
|
-
E("div",
|
|
1247
|
+
E("div", yi, [
|
|
1248
1248
|
E("button", {
|
|
1249
1249
|
"aria-label": b(i).spacingControl.decreaseBottom,
|
|
1250
|
-
class: T([
|
|
1250
|
+
class: T([Q, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1251
1251
|
onClick: n[9] ||= (e) => c("bottom", -1)
|
|
1252
|
-
}, [N(b(
|
|
1252
|
+
}, [N(b(xt), {
|
|
1253
1253
|
size: 12,
|
|
1254
1254
|
"stroke-width": 2
|
|
1255
|
-
})], 10,
|
|
1255
|
+
})], 10, bi),
|
|
1256
1256
|
E("input", {
|
|
1257
1257
|
type: "number",
|
|
1258
|
-
class: T(
|
|
1258
|
+
class: T(Ci),
|
|
1259
1259
|
value: e.modelValue.bottom,
|
|
1260
1260
|
"aria-label": b(i).spacingControl.bottom,
|
|
1261
1261
|
min: "0",
|
|
1262
1262
|
onInput: n[10] ||= (e) => l("bottom", Number(e.target.value))
|
|
1263
|
-
}, null, 40,
|
|
1263
|
+
}, null, 40, xi),
|
|
1264
1264
|
E("button", {
|
|
1265
1265
|
"aria-label": b(i).spacingControl.increaseBottom,
|
|
1266
|
-
class: T([
|
|
1266
|
+
class: T([Q, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1267
1267
|
onClick: n[11] ||= (e) => c("bottom", 1)
|
|
1268
|
-
}, [N(b(
|
|
1268
|
+
}, [N(b(U), {
|
|
1269
1269
|
size: 12,
|
|
1270
1270
|
"stroke-width": 2
|
|
1271
|
-
})], 10,
|
|
1271
|
+
})], 10, Si)
|
|
1272
1272
|
])
|
|
1273
1273
|
])]));
|
|
1274
1274
|
}
|
|
1275
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1275
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Ti = { class: "tpl:mt-3" }, Ei = /* @__PURE__ */ M({
|
|
1276
1276
|
__name: "CollapsibleSection",
|
|
1277
1277
|
props: {
|
|
1278
1278
|
title: {},
|
|
@@ -1285,25 +1285,25 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1285
1285
|
type: "button",
|
|
1286
1286
|
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)]",
|
|
1287
1287
|
onClick: i[0] ||= (e) => n.$emit("toggle")
|
|
1288
|
-
}, [N(b(
|
|
1288
|
+
}, [N(b(_e), {
|
|
1289
1289
|
class: T(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1290
1290
|
size: 12,
|
|
1291
1291
|
"stroke-width": 2
|
|
1292
|
-
}, null, 8, ["class"]), E("span", null, g(e.title), 1)]), r(E("div",
|
|
1292
|
+
}, null, 8, ["class"]), E("span", null, g(e.title), 1)]), r(E("div", Ti, [t(n.$slots, "default")], 512), [[D, e.open]])], 2));
|
|
1293
1293
|
}
|
|
1294
|
-
}),
|
|
1294
|
+
}), Di = { class: "tpl:space-y-2" }, Oi = ["checked", "onChange"], ki = { class: "tpl:space-y-2" }, Ai = ["value"], ji = { value: "" }, Mi = ["label"], Ni = ["value"], Pi = ["value"], Fi = {
|
|
1295
1295
|
key: 0,
|
|
1296
1296
|
value: "__custom__"
|
|
1297
|
-
},
|
|
1297
|
+
}, Ii = {
|
|
1298
1298
|
key: 0,
|
|
1299
1299
|
class: "tpl:space-y-2"
|
|
1300
|
-
},
|
|
1300
|
+
}, Li = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ri = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, zi = { class: "tpl:flex tpl:justify-end" }, Bi = ["disabled"], Vi = {
|
|
1301
1301
|
key: 0,
|
|
1302
1302
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1303
|
-
},
|
|
1303
|
+
}, Hi = { class: "tpl:space-y-1" }, Ui = { class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]" }, Wi = {
|
|
1304
1304
|
key: 0,
|
|
1305
1305
|
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)]"
|
|
1306
|
-
},
|
|
1306
|
+
}, Gi = /* @__PURE__ */ M({
|
|
1307
1307
|
__name: "CommonBlockSettings",
|
|
1308
1308
|
props: {
|
|
1309
1309
|
block: {},
|
|
@@ -1311,23 +1311,23 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1311
1311
|
},
|
|
1312
1312
|
emits: ["update"],
|
|
1313
1313
|
setup(e, { emit: t }) {
|
|
1314
|
-
let n = e, i = t, { t: a } =
|
|
1314
|
+
let n = e, i = t, { t: a } = H(), c = u(Ie, []), m = u(ne, !1), h = f(/* @__PURE__ */ new Set()), x = p(!1), C = p(""), D = p(""), O = [{
|
|
1315
1315
|
key: "desktop",
|
|
1316
|
-
icon:
|
|
1316
|
+
icon: yt,
|
|
1317
1317
|
labelKey: "showOnDesktop"
|
|
1318
1318
|
}, {
|
|
1319
1319
|
key: "mobile",
|
|
1320
|
-
icon:
|
|
1320
|
+
icon: Tt,
|
|
1321
1321
|
labelKey: "showOnMobile"
|
|
1322
1322
|
}];
|
|
1323
1323
|
function k(e) {
|
|
1324
1324
|
h.has(e) ? h.delete(e) : h.add(e);
|
|
1325
1325
|
}
|
|
1326
1326
|
let M = _(() => c.length > 0 || m), F = _(() => n.block.displayCondition ? !c.some((e) => e.label === n.block.displayCondition?.label) : !1);
|
|
1327
|
-
function
|
|
1327
|
+
function ee() {
|
|
1328
1328
|
x.value = !0, F.value && n.block.displayCondition ? (C.value = n.block.displayCondition.before, D.value = n.block.displayCondition.after ?? "") : (C.value = "", D.value = "");
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function te() {
|
|
1331
1331
|
C.value.trim() && (i("update", { displayCondition: {
|
|
1332
1332
|
label: a.blockSettings.customCondition,
|
|
1333
1333
|
before: C.value.trim(),
|
|
@@ -1341,7 +1341,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1341
1341
|
}
|
|
1342
1342
|
F.value && (C.value = e.before, D.value = e.after ?? "");
|
|
1343
1343
|
}, { immediate: !0 });
|
|
1344
|
-
let
|
|
1344
|
+
let I = _(() => {
|
|
1345
1345
|
let e = {};
|
|
1346
1346
|
for (let t of c) {
|
|
1347
1347
|
let n = t.group ?? "";
|
|
@@ -1349,33 +1349,33 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1349
1349
|
}
|
|
1350
1350
|
return e;
|
|
1351
1351
|
});
|
|
1352
|
-
function
|
|
1352
|
+
function L(e, t) {
|
|
1353
1353
|
i("update", { styles: {
|
|
1354
1354
|
...n.block.styles,
|
|
1355
1355
|
[e]: t
|
|
1356
1356
|
} });
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function R(e) {
|
|
1359
1359
|
return n.block.visibility?.[e] !== !1;
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function z(e) {
|
|
1362
1362
|
let t = {
|
|
1363
|
-
desktop:
|
|
1364
|
-
mobile:
|
|
1363
|
+
desktop: R("desktop"),
|
|
1364
|
+
mobile: R("mobile")
|
|
1365
1365
|
};
|
|
1366
1366
|
t[e] = !t[e], i("update", { visibility: t });
|
|
1367
1367
|
}
|
|
1368
1368
|
return (t, n) => (s(), v("div", { class: T(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1369
|
-
N(
|
|
1369
|
+
N(Ei, {
|
|
1370
1370
|
title: b(a).blockSettings.spacing,
|
|
1371
1371
|
open: h.has("spacing"),
|
|
1372
1372
|
"no-border": e.isFirstSection,
|
|
1373
1373
|
onToggle: n[1] ||= (e) => k("spacing")
|
|
1374
1374
|
}, {
|
|
1375
|
-
default: d(() => [N(
|
|
1375
|
+
default: d(() => [N(wi, {
|
|
1376
1376
|
label: b(a).blockSettings.padding,
|
|
1377
1377
|
"model-value": e.block.styles.padding,
|
|
1378
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1378
|
+
"onUpdate:modelValue": n[0] ||= (e) => L("padding", e)
|
|
1379
1379
|
}, null, 8, ["label", "model-value"])]),
|
|
1380
1380
|
_: 1
|
|
1381
1381
|
}, 8, [
|
|
@@ -1383,32 +1383,32 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1383
1383
|
"open",
|
|
1384
1384
|
"no-border"
|
|
1385
1385
|
]),
|
|
1386
|
-
N(
|
|
1386
|
+
N(Ei, {
|
|
1387
1387
|
title: b(a).blockSettings.background,
|
|
1388
1388
|
open: h.has("bg"),
|
|
1389
1389
|
onToggle: n[3] ||= (e) => k("bg")
|
|
1390
1390
|
}, {
|
|
1391
|
-
default: d(() => [E("label", { class: T(b(
|
|
1391
|
+
default: d(() => [E("label", { class: T(b(G)) }, g(b(a).blockSettings.color), 3), N(J, {
|
|
1392
1392
|
"model-value": e.block.styles.backgroundColor ?? "",
|
|
1393
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
1393
|
+
"onUpdate:modelValue": n[2] ||= (e) => L("backgroundColor", e)
|
|
1394
1394
|
}, null, 8, ["model-value"])]),
|
|
1395
1395
|
_: 1
|
|
1396
1396
|
}, 8, ["title", "open"]),
|
|
1397
|
-
N(
|
|
1397
|
+
N(Ei, {
|
|
1398
1398
|
title: b(a).blockSettings.display,
|
|
1399
1399
|
open: h.has("display"),
|
|
1400
1400
|
onToggle: n[4] ||= (e) => k("display")
|
|
1401
1401
|
}, {
|
|
1402
|
-
default: d(() => [E("div",
|
|
1402
|
+
default: d(() => [E("div", Di, [(s(), v(A, null, l(O, (e) => E("label", {
|
|
1403
1403
|
key: e.key,
|
|
1404
1404
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1405
1405
|
}, [
|
|
1406
1406
|
E("input", {
|
|
1407
1407
|
type: "checkbox",
|
|
1408
1408
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1409
|
-
checked:
|
|
1410
|
-
onChange: (t) =>
|
|
1411
|
-
}, null, 40,
|
|
1409
|
+
checked: R(e.key),
|
|
1410
|
+
onChange: (t) => z(e.key)
|
|
1411
|
+
}, null, 40, Oi),
|
|
1412
1412
|
(s(), S(o(e.icon), {
|
|
1413
1413
|
size: 14,
|
|
1414
1414
|
"stroke-width": 1.5
|
|
@@ -1417,19 +1417,19 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1417
1417
|
])), 64))])]),
|
|
1418
1418
|
_: 1
|
|
1419
1419
|
}, 8, ["title", "open"]),
|
|
1420
|
-
M.value ? (s(), S(
|
|
1420
|
+
M.value ? (s(), S(Ei, {
|
|
1421
1421
|
key: 0,
|
|
1422
1422
|
title: b(a).blockSettings.displayCondition,
|
|
1423
1423
|
open: h.has("condition"),
|
|
1424
1424
|
onToggle: n[8] ||= (e) => k("condition")
|
|
1425
1425
|
}, {
|
|
1426
|
-
default: d(() => [E("div",
|
|
1426
|
+
default: d(() => [E("div", ki, [E("select", {
|
|
1427
1427
|
class: T(["tpl:w-full tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:outline-none tpl:transition-all tpl:duration-150 tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", e.block.displayCondition ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-text)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"]),
|
|
1428
1428
|
value: x.value || F.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1429
1429
|
onChange: n[5] ||= (e) => {
|
|
1430
1430
|
let t = e.target.value;
|
|
1431
1431
|
if (t === "__custom__") {
|
|
1432
|
-
|
|
1432
|
+
ee();
|
|
1433
1433
|
return;
|
|
1434
1434
|
}
|
|
1435
1435
|
if (x.value = !1, !t) {
|
|
@@ -1440,48 +1440,48 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1440
1440
|
n && i("update", { displayCondition: n });
|
|
1441
1441
|
}
|
|
1442
1442
|
}, [
|
|
1443
|
-
E("option",
|
|
1444
|
-
(s(!0), v(A, null, l(
|
|
1443
|
+
E("option", ji, g(b(a).blockSettings.noCondition), 1),
|
|
1444
|
+
(s(!0), v(A, null, l(I.value, (e, t) => (s(), v(A, { key: t }, [t ? (s(), v("optgroup", {
|
|
1445
1445
|
key: 0,
|
|
1446
1446
|
label: String(t)
|
|
1447
1447
|
}, [(s(!0), v(A, null, l(e, (e) => (s(), v("option", {
|
|
1448
1448
|
key: e.label,
|
|
1449
1449
|
value: e.label
|
|
1450
|
-
}, g(e.label), 9,
|
|
1450
|
+
}, g(e.label), 9, Ni))), 128))], 8, Mi)) : (s(!0), v(A, { key: 1 }, l(e, (e) => (s(), v("option", {
|
|
1451
1451
|
key: e.label,
|
|
1452
1452
|
value: e.label
|
|
1453
|
-
}, g(e.label), 9,
|
|
1454
|
-
b(m) ? (s(), v("option",
|
|
1455
|
-
], 42,
|
|
1456
|
-
E("div", null, [E("label",
|
|
1453
|
+
}, g(e.label), 9, Pi))), 128))], 64))), 128)),
|
|
1454
|
+
b(m) ? (s(), v("option", Fi, g(b(a).blockSettings.customCondition), 1)) : y("", !0)
|
|
1455
|
+
], 42, Ai), x.value || F.value ? (s(), v("div", Ii, [
|
|
1456
|
+
E("div", null, [E("label", Li, g(b(a).blockSettings.customConditionBefore), 1), r(E("textarea", {
|
|
1457
1457
|
"onUpdate:modelValue": n[6] ||= (e) => C.value = e,
|
|
1458
1458
|
rows: "2",
|
|
1459
1459
|
class: T(b(Bt))
|
|
1460
1460
|
}, null, 2), [[w, C.value]])]),
|
|
1461
|
-
E("div", null, [E("label",
|
|
1461
|
+
E("div", null, [E("label", Ri, g(b(a).blockSettings.customConditionAfter), 1), r(E("textarea", {
|
|
1462
1462
|
"onUpdate:modelValue": n[7] ||= (e) => D.value = e,
|
|
1463
1463
|
rows: "2",
|
|
1464
1464
|
class: T(b(Bt))
|
|
1465
1465
|
}, null, 2), [[w, D.value]])]),
|
|
1466
|
-
E("div",
|
|
1466
|
+
E("div", zi, [E("button", {
|
|
1467
1467
|
type: "button",
|
|
1468
1468
|
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",
|
|
1469
1469
|
disabled: !C.value.trim(),
|
|
1470
|
-
onClick:
|
|
1471
|
-
}, g(b(a).blockSettings.applyCondition), 9,
|
|
1472
|
-
])) : e.block.displayCondition && !F.value ? (s(), v(A, { key: 1 }, [e.block.displayCondition.description ? (s(), v("p",
|
|
1470
|
+
onClick: te
|
|
1471
|
+
}, g(b(a).blockSettings.applyCondition), 9, Bi)])
|
|
1472
|
+
])) : e.block.displayCondition && !F.value ? (s(), v(A, { key: 1 }, [e.block.displayCondition.description ? (s(), v("p", Vi, g(e.block.displayCondition.description), 1)) : y("", !0), E("div", Hi, [E("pre", Ui, g(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (s(), v("pre", Wi, g(e.block.displayCondition.after), 1)) : y("", !0)])], 64)) : y("", !0)])]),
|
|
1473
1473
|
_: 1
|
|
1474
1474
|
}, 8, ["title", "open"])) : y("", !0)
|
|
1475
1475
|
], 2));
|
|
1476
1476
|
}
|
|
1477
|
-
}),
|
|
1477
|
+
}), Ki = ["title"], qi = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ji = {
|
|
1478
1478
|
key: 1,
|
|
1479
1479
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1480
|
-
},
|
|
1480
|
+
}, Yi = [
|
|
1481
1481
|
"aria-checked",
|
|
1482
1482
|
"aria-label",
|
|
1483
1483
|
"disabled"
|
|
1484
|
-
],
|
|
1484
|
+
], Xi = /* @__PURE__ */ M({
|
|
1485
1485
|
__name: "BooleanField",
|
|
1486
1486
|
props: {
|
|
1487
1487
|
field: {},
|
|
@@ -1490,18 +1490,18 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1490
1490
|
},
|
|
1491
1491
|
emits: ["update:modelValue"],
|
|
1492
1492
|
setup(e, { emit: t }) {
|
|
1493
|
-
let n = t, { t: r } =
|
|
1493
|
+
let n = t, { t: r } = H();
|
|
1494
1494
|
return (t, i) => (s(), v("div", {
|
|
1495
1495
|
class: "tpl:mb-3.5",
|
|
1496
1496
|
title: e.readOnly ? b(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1497
|
-
}, [E("label", { class: T(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [E("span",
|
|
1497
|
+
}, [E("label", { class: T(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [E("span", qi, [
|
|
1498
1498
|
j(g(e.field.label) + " ", 1),
|
|
1499
|
-
e.readOnly ? (s(), S(b(
|
|
1499
|
+
e.readOnly ? (s(), S(b(ht), {
|
|
1500
1500
|
key: 0,
|
|
1501
1501
|
size: 12,
|
|
1502
1502
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1503
1503
|
})) : y("", !0),
|
|
1504
|
-
e.field.required ? (s(), v("span",
|
|
1504
|
+
e.field.required ? (s(), v("span", Ji, " * ")) : y("", !0)
|
|
1505
1505
|
]), E("button", {
|
|
1506
1506
|
type: "button",
|
|
1507
1507
|
role: "switch",
|
|
@@ -1514,12 +1514,12 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1514
1514
|
]),
|
|
1515
1515
|
disabled: e.readOnly,
|
|
1516
1516
|
onClick: i[0] ||= (t) => !e.readOnly && n("update:modelValue", !e.modelValue)
|
|
1517
|
-
}, [E("span", { class: T(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10,
|
|
1517
|
+
}, [E("span", { class: T(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, Yi)], 2)], 8, Ki));
|
|
1518
1518
|
}
|
|
1519
|
-
}),
|
|
1519
|
+
}), Zi = { class: "tpl:mb-3.5" }, Qi = {
|
|
1520
1520
|
key: 1,
|
|
1521
1521
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1522
|
-
},
|
|
1522
|
+
}, $i = /* @__PURE__ */ M({
|
|
1523
1523
|
__name: "FieldWrapper",
|
|
1524
1524
|
props: {
|
|
1525
1525
|
label: {},
|
|
@@ -1527,17 +1527,17 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1527
1527
|
readOnly: { type: Boolean }
|
|
1528
1528
|
},
|
|
1529
1529
|
setup(e) {
|
|
1530
|
-
return (n, r) => (s(), v("div",
|
|
1530
|
+
return (n, r) => (s(), v("div", Zi, [E("label", { class: T(b(G)) }, [
|
|
1531
1531
|
j(g(e.label) + " ", 1),
|
|
1532
|
-
e.readOnly ? (s(), S(b(
|
|
1532
|
+
e.readOnly ? (s(), S(b(ht), {
|
|
1533
1533
|
key: 0,
|
|
1534
1534
|
size: 12,
|
|
1535
1535
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1536
1536
|
})) : y("", !0),
|
|
1537
|
-
e.required ? (s(), v("span",
|
|
1537
|
+
e.required ? (s(), v("span", Qi, "*")) : y("", !0)
|
|
1538
1538
|
], 2), t(n.$slots, "default")]));
|
|
1539
1539
|
}
|
|
1540
|
-
}),
|
|
1540
|
+
}), ea = /* @__PURE__ */ M({
|
|
1541
1541
|
__name: "ColorField",
|
|
1542
1542
|
props: {
|
|
1543
1543
|
field: {},
|
|
@@ -1546,13 +1546,13 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1546
1546
|
},
|
|
1547
1547
|
emits: ["update:modelValue"],
|
|
1548
1548
|
setup(e, { emit: t }) {
|
|
1549
|
-
let n = t, { t: r } =
|
|
1550
|
-
return (t, i) => (s(), S(
|
|
1549
|
+
let n = t, { t: r } = H();
|
|
1550
|
+
return (t, i) => (s(), S($i, {
|
|
1551
1551
|
label: e.field.label,
|
|
1552
1552
|
required: e.field.required,
|
|
1553
1553
|
"read-only": e.readOnly
|
|
1554
1554
|
}, {
|
|
1555
|
-
default: d(() => [N(
|
|
1555
|
+
default: d(() => [N(J, {
|
|
1556
1556
|
"model-value": e.modelValue,
|
|
1557
1557
|
placeholder: e.field.placeholder,
|
|
1558
1558
|
disabled: e.readOnly,
|
|
@@ -1571,15 +1571,15 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1571
1571
|
"read-only"
|
|
1572
1572
|
]));
|
|
1573
1573
|
}
|
|
1574
|
-
}),
|
|
1574
|
+
}), ta = {
|
|
1575
1575
|
key: 0,
|
|
1576
1576
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1577
1577
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
1578
|
-
},
|
|
1578
|
+
}, na = [
|
|
1579
1579
|
"value",
|
|
1580
1580
|
"placeholder",
|
|
1581
1581
|
"title"
|
|
1582
|
-
],
|
|
1582
|
+
], ra = ["value", "placeholder"], ia = /* @__PURE__ */ M({
|
|
1583
1583
|
__name: "ImageField",
|
|
1584
1584
|
props: {
|
|
1585
1585
|
field: {},
|
|
@@ -1588,7 +1588,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1588
1588
|
},
|
|
1589
1589
|
emits: ["update:modelValue"],
|
|
1590
1590
|
setup(e, { emit: t }) {
|
|
1591
|
-
let n = e, r = t, { t: i } =
|
|
1591
|
+
let n = e, r = t, { t: i } = H(), a = u(Ze, null), o = B(), c = _(() => !!a);
|
|
1592
1592
|
async function l() {
|
|
1593
1593
|
let e = await a?.({ accept: ["images"] });
|
|
1594
1594
|
o.alive && e && r("update:modelValue", e.url);
|
|
@@ -1609,12 +1609,12 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
1611
1611
|
}
|
|
1612
|
-
let { isOver: C } =
|
|
1612
|
+
let { isOver: C } = Pe({
|
|
1613
1613
|
target: f,
|
|
1614
1614
|
enabled: h,
|
|
1615
1615
|
onFiles: x
|
|
1616
1616
|
});
|
|
1617
|
-
return (t, n) => (s(), S(
|
|
1617
|
+
return (t, n) => (s(), S($i, {
|
|
1618
1618
|
label: e.field.label,
|
|
1619
1619
|
required: e.field.required,
|
|
1620
1620
|
"read-only": e.readOnly
|
|
@@ -1624,35 +1624,35 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1624
1624
|
ref: f,
|
|
1625
1625
|
class: "tpl:relative"
|
|
1626
1626
|
}, [
|
|
1627
|
-
h.value && (b(C) || m.value) ? (s(), v("div",
|
|
1627
|
+
h.value && (b(C) || m.value) ? (s(), v("div", ta, [m.value ? (s(), v(A, { key: 0 }, [N(b(pt), {
|
|
1628
1628
|
class: "tpl-spinner",
|
|
1629
1629
|
size: 18,
|
|
1630
1630
|
"stroke-width": 2
|
|
1631
|
-
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(
|
|
1631
|
+
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(Xe), {
|
|
1632
1632
|
size: 18,
|
|
1633
1633
|
"stroke-width": 1.5
|
|
1634
1634
|
}), j(" " + g(b(i).image.dropToUpload), 1)], 64))])) : y("", !0),
|
|
1635
1635
|
e.readOnly ? (s(), v("input", {
|
|
1636
1636
|
key: 1,
|
|
1637
1637
|
type: "url",
|
|
1638
|
-
class: T([b(
|
|
1638
|
+
class: T([b(W), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1639
1639
|
value: e.modelValue,
|
|
1640
1640
|
placeholder: e.field.placeholder || "https://...",
|
|
1641
1641
|
disabled: "",
|
|
1642
1642
|
title: b(i).customBlocks.dataSource.readOnlyTooltip
|
|
1643
|
-
}, null, 10,
|
|
1643
|
+
}, null, 10, na)) : (s(), v("input", {
|
|
1644
1644
|
key: 2,
|
|
1645
1645
|
type: "url",
|
|
1646
|
-
class: T(b(
|
|
1646
|
+
class: T(b(W)),
|
|
1647
1647
|
value: e.modelValue,
|
|
1648
1648
|
placeholder: e.field.placeholder || "https://...",
|
|
1649
1649
|
onInput: n[0] ||= (e) => r("update:modelValue", e.target.value)
|
|
1650
|
-
}, null, 42,
|
|
1650
|
+
}, null, 42, ra)),
|
|
1651
1651
|
c.value && !e.readOnly ? (s(), v("button", {
|
|
1652
1652
|
key: 3,
|
|
1653
1653
|
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)]",
|
|
1654
1654
|
onClick: n[1] ||= (e) => l()
|
|
1655
|
-
}, [N(b(
|
|
1655
|
+
}, [N(b(L), {
|
|
1656
1656
|
size: 14,
|
|
1657
1657
|
"stroke-width": 1.5
|
|
1658
1658
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
@@ -1664,7 +1664,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1664
1664
|
"read-only"
|
|
1665
1665
|
]));
|
|
1666
1666
|
}
|
|
1667
|
-
}),
|
|
1667
|
+
}), aa = [
|
|
1668
1668
|
"value",
|
|
1669
1669
|
"placeholder",
|
|
1670
1670
|
"min",
|
|
@@ -1672,7 +1672,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1672
1672
|
"step",
|
|
1673
1673
|
"disabled",
|
|
1674
1674
|
"title"
|
|
1675
|
-
],
|
|
1675
|
+
], oa = /* @__PURE__ */ M({
|
|
1676
1676
|
__name: "NumberField",
|
|
1677
1677
|
props: {
|
|
1678
1678
|
field: {},
|
|
@@ -1681,15 +1681,15 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1681
1681
|
},
|
|
1682
1682
|
emits: ["update:modelValue"],
|
|
1683
1683
|
setup(e, { emit: t }) {
|
|
1684
|
-
let n = t, { t: r } =
|
|
1685
|
-
return (t, i) => (s(), S(
|
|
1684
|
+
let n = t, { t: r } = H();
|
|
1685
|
+
return (t, i) => (s(), S($i, {
|
|
1686
1686
|
label: e.field.label,
|
|
1687
1687
|
required: e.field.required,
|
|
1688
1688
|
"read-only": e.readOnly
|
|
1689
1689
|
}, {
|
|
1690
1690
|
default: d(() => [E("input", {
|
|
1691
1691
|
type: "number",
|
|
1692
|
-
class: T([b(
|
|
1692
|
+
class: T([b(W), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1693
1693
|
value: e.modelValue,
|
|
1694
1694
|
placeholder: e.field.placeholder,
|
|
1695
1695
|
min: e.field.min,
|
|
@@ -1698,7 +1698,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1698
1698
|
disabled: e.readOnly,
|
|
1699
1699
|
title: e.readOnly ? b(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1700
1700
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
1701
|
-
}, null, 42,
|
|
1701
|
+
}, null, 42, aa)]),
|
|
1702
1702
|
_: 1
|
|
1703
1703
|
}, 8, [
|
|
1704
1704
|
"label",
|
|
@@ -1706,10 +1706,10 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1706
1706
|
"read-only"
|
|
1707
1707
|
]));
|
|
1708
1708
|
}
|
|
1709
|
-
}),
|
|
1709
|
+
}), sa = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ca = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, la = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, ua = ["title", "onClick"], da = {
|
|
1710
1710
|
key: 1,
|
|
1711
1711
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1712
|
-
},
|
|
1712
|
+
}, fa = /* @__PURE__ */ M({
|
|
1713
1713
|
__name: "RepeatableField",
|
|
1714
1714
|
props: {
|
|
1715
1715
|
field: {},
|
|
@@ -1718,7 +1718,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1718
1718
|
},
|
|
1719
1719
|
emits: ["update:modelValue"],
|
|
1720
1720
|
setup(e, { emit: t }) {
|
|
1721
|
-
let n = e, r = t, { t: i } =
|
|
1721
|
+
let n = e, r = t, { t: i } = H(), a = _(() => n.modelValue || []), c = _(() => !n.field.maxItems || a.value.length < n.field.maxItems), u = _(() => !n.field.minItems || a.value.length > n.field.minItems);
|
|
1722
1722
|
function f() {
|
|
1723
1723
|
if (!c.value || n.readOnly) return;
|
|
1724
1724
|
let e = {};
|
|
@@ -1737,25 +1737,25 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1737
1737
|
} : r);
|
|
1738
1738
|
r("update:modelValue", i);
|
|
1739
1739
|
}
|
|
1740
|
-
return (t, n) => (s(), S(
|
|
1740
|
+
return (t, n) => (s(), S($i, {
|
|
1741
1741
|
label: e.field.label,
|
|
1742
1742
|
required: e.field.required,
|
|
1743
1743
|
"read-only": e.readOnly
|
|
1744
1744
|
}, {
|
|
1745
|
-
default: d(() => [E("div",
|
|
1745
|
+
default: d(() => [E("div", sa, [
|
|
1746
1746
|
(s(!0), v(A, null, l(a.value, (t, n) => (s(), v("div", {
|
|
1747
1747
|
key: `${e.field.key}-${n}`,
|
|
1748
1748
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1749
|
-
}, [E("div",
|
|
1749
|
+
}, [E("div", ca, [E("span", la, " #" + g(n + 1), 1), u.value && !e.readOnly ? (s(), v("button", {
|
|
1750
1750
|
key: 0,
|
|
1751
1751
|
type: "button",
|
|
1752
1752
|
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)]",
|
|
1753
1753
|
title: b(i).customBlocks.fields.removeItem,
|
|
1754
1754
|
onClick: (e) => p(n)
|
|
1755
|
-
}, [N(b(
|
|
1755
|
+
}, [N(b(We), {
|
|
1756
1756
|
size: 12,
|
|
1757
1757
|
"stroke-width": 2
|
|
1758
|
-
})], 8,
|
|
1758
|
+
})], 8, ua)) : y("", !0)]), (s(!0), v(A, null, l(e.field.fields, (r) => (s(), S(o(b(xa)(r.type)), {
|
|
1759
1759
|
key: r.key,
|
|
1760
1760
|
field: r,
|
|
1761
1761
|
"model-value": t[r.key],
|
|
@@ -1770,13 +1770,13 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1770
1770
|
c.value && !e.readOnly ? (s(), v("button", {
|
|
1771
1771
|
key: 0,
|
|
1772
1772
|
type: "button",
|
|
1773
|
-
class: T(b(
|
|
1773
|
+
class: T(b(Ht)),
|
|
1774
1774
|
onClick: f
|
|
1775
|
-
}, [N(b(
|
|
1775
|
+
}, [N(b(U), {
|
|
1776
1776
|
size: 14,
|
|
1777
1777
|
"stroke-width": 2
|
|
1778
1778
|
}), j(" " + g(b(i).customBlocks.fields.addItem), 1)], 2)) : y("", !0),
|
|
1779
|
-
!c.value && !e.readOnly ? (s(), v("p",
|
|
1779
|
+
!c.value && !e.readOnly ? (s(), v("p", da, g(b(i).customBlocks.fields.maxItemsReached), 1)) : y("", !0)
|
|
1780
1780
|
])]),
|
|
1781
1781
|
_: 1
|
|
1782
1782
|
}, 8, [
|
|
@@ -1785,11 +1785,11 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1785
1785
|
"read-only"
|
|
1786
1786
|
]));
|
|
1787
1787
|
}
|
|
1788
|
-
}),
|
|
1788
|
+
}), pa = [
|
|
1789
1789
|
"value",
|
|
1790
1790
|
"disabled",
|
|
1791
1791
|
"title"
|
|
1792
|
-
],
|
|
1792
|
+
], ma = ["value"], ha = /* @__PURE__ */ M({
|
|
1793
1793
|
__name: "SelectField",
|
|
1794
1794
|
props: {
|
|
1795
1795
|
field: {},
|
|
@@ -1798,14 +1798,14 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1798
1798
|
},
|
|
1799
1799
|
emits: ["update:modelValue"],
|
|
1800
1800
|
setup(e, { emit: t }) {
|
|
1801
|
-
let n = t, { t: r } =
|
|
1802
|
-
return (t, i) => (s(), S(
|
|
1801
|
+
let n = t, { t: r } = H();
|
|
1802
|
+
return (t, i) => (s(), S($i, {
|
|
1803
1803
|
label: e.field.label,
|
|
1804
1804
|
required: e.field.required,
|
|
1805
1805
|
"read-only": e.readOnly
|
|
1806
1806
|
}, {
|
|
1807
1807
|
default: d(() => [E("select", {
|
|
1808
|
-
class: T([b(
|
|
1808
|
+
class: T([b(W), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1809
1809
|
value: e.modelValue,
|
|
1810
1810
|
disabled: e.readOnly,
|
|
1811
1811
|
title: e.readOnly ? b(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
@@ -1813,7 +1813,7 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1813
1813
|
}, [(s(!0), v(A, null, l(e.field.options, (e) => (s(), v("option", {
|
|
1814
1814
|
key: e.value,
|
|
1815
1815
|
value: e.value
|
|
1816
|
-
}, g(e.label), 9,
|
|
1816
|
+
}, g(e.label), 9, ma))), 128))], 42, pa)]),
|
|
1817
1817
|
_: 1
|
|
1818
1818
|
}, 8, [
|
|
1819
1819
|
"label",
|
|
@@ -1821,11 +1821,11 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1821
1821
|
"read-only"
|
|
1822
1822
|
]));
|
|
1823
1823
|
}
|
|
1824
|
-
}),
|
|
1824
|
+
}), ga = [
|
|
1825
1825
|
"value",
|
|
1826
1826
|
"placeholder",
|
|
1827
1827
|
"title"
|
|
1828
|
-
],
|
|
1828
|
+
], _a = /* @__PURE__ */ M({
|
|
1829
1829
|
__name: "TextField",
|
|
1830
1830
|
props: {
|
|
1831
1831
|
field: {},
|
|
@@ -1834,8 +1834,8 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1834
1834
|
},
|
|
1835
1835
|
emits: ["update:modelValue"],
|
|
1836
1836
|
setup(e, { emit: t }) {
|
|
1837
|
-
let n = t, { t: r } =
|
|
1838
|
-
return (t, i) => (s(), S(
|
|
1837
|
+
let n = t, { t: r } = H();
|
|
1838
|
+
return (t, i) => (s(), S($i, {
|
|
1839
1839
|
label: e.field.label,
|
|
1840
1840
|
required: e.field.required,
|
|
1841
1841
|
"read-only": e.readOnly
|
|
@@ -1843,12 +1843,12 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1843
1843
|
default: d(() => [e.readOnly ? (s(), v("input", {
|
|
1844
1844
|
key: 0,
|
|
1845
1845
|
type: "text",
|
|
1846
|
-
class: T([b(
|
|
1846
|
+
class: T([b(W), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1847
1847
|
value: e.modelValue,
|
|
1848
1848
|
placeholder: e.field.placeholder,
|
|
1849
1849
|
disabled: "",
|
|
1850
1850
|
title: b(r).customBlocks.dataSource.readOnlyTooltip
|
|
1851
|
-
}, null, 10,
|
|
1851
|
+
}, null, 10, ga)) : (s(), S(Z, {
|
|
1852
1852
|
key: 1,
|
|
1853
1853
|
"model-value": e.modelValue,
|
|
1854
1854
|
placeholder: e.field.placeholder,
|
|
@@ -1861,12 +1861,12 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1861
1861
|
"read-only"
|
|
1862
1862
|
]));
|
|
1863
1863
|
}
|
|
1864
|
-
}),
|
|
1864
|
+
}), va = [
|
|
1865
1865
|
"value",
|
|
1866
1866
|
"placeholder",
|
|
1867
1867
|
"title"
|
|
1868
|
-
],
|
|
1869
|
-
text:
|
|
1868
|
+
], ya = "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", ba = {
|
|
1869
|
+
text: _a,
|
|
1870
1870
|
textarea: /* @__PURE__ */ M({
|
|
1871
1871
|
__name: "TextareaField",
|
|
1872
1872
|
props: {
|
|
@@ -1876,8 +1876,8 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1876
1876
|
},
|
|
1877
1877
|
emits: ["update:modelValue"],
|
|
1878
1878
|
setup(e, { emit: t }) {
|
|
1879
|
-
let n = t, { t: r } =
|
|
1880
|
-
return (t, i) => (s(), S(
|
|
1879
|
+
let n = t, { t: r } = H();
|
|
1880
|
+
return (t, i) => (s(), S($i, {
|
|
1881
1881
|
label: e.field.label,
|
|
1882
1882
|
required: e.field.required,
|
|
1883
1883
|
"read-only": e.readOnly
|
|
@@ -1889,8 +1889,8 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1889
1889
|
rows: "3",
|
|
1890
1890
|
disabled: "",
|
|
1891
1891
|
title: b(r).customBlocks.dataSource.readOnlyTooltip,
|
|
1892
|
-
class: T(
|
|
1893
|
-
}, null, 8,
|
|
1892
|
+
class: T(ya)
|
|
1893
|
+
}, null, 8, va)) : (s(), S(Wn, {
|
|
1894
1894
|
key: 1,
|
|
1895
1895
|
"model-value": e.modelValue,
|
|
1896
1896
|
placeholder: e.field.placeholder,
|
|
@@ -1904,42 +1904,42 @@ var wn = ["aria-label", "onKeydown"], Tn = ["data-tooltip"], En = ["data-tooltip
|
|
|
1904
1904
|
]));
|
|
1905
1905
|
}
|
|
1906
1906
|
}),
|
|
1907
|
-
image:
|
|
1908
|
-
color:
|
|
1909
|
-
number:
|
|
1910
|
-
select:
|
|
1911
|
-
boolean:
|
|
1912
|
-
repeatable:
|
|
1907
|
+
image: ia,
|
|
1908
|
+
color: ea,
|
|
1909
|
+
number: oa,
|
|
1910
|
+
select: ha,
|
|
1911
|
+
boolean: Xi,
|
|
1912
|
+
repeatable: fa
|
|
1913
1913
|
};
|
|
1914
|
-
function
|
|
1915
|
-
return
|
|
1914
|
+
function xa(e) {
|
|
1915
|
+
return ba[e] ?? _a;
|
|
1916
1916
|
}
|
|
1917
1917
|
//#endregion
|
|
1918
1918
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1919
|
-
var
|
|
1919
|
+
var Sa = {
|
|
1920
1920
|
key: 0,
|
|
1921
1921
|
class: "tpl:p-4"
|
|
1922
|
-
},
|
|
1922
|
+
}, Ca = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, wa = { key: 1 }, Ta = {
|
|
1923
1923
|
key: 0,
|
|
1924
1924
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1925
|
-
},
|
|
1925
|
+
}, Ea = {
|
|
1926
1926
|
key: 1,
|
|
1927
1927
|
class: "tpl:mb-4"
|
|
1928
|
-
},
|
|
1928
|
+
}, Da = {
|
|
1929
1929
|
key: 1,
|
|
1930
1930
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1931
|
-
},
|
|
1931
|
+
}, Oa = {
|
|
1932
1932
|
key: 0,
|
|
1933
1933
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1934
|
-
},
|
|
1934
|
+
}, ka = {
|
|
1935
1935
|
key: 2,
|
|
1936
1936
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
1937
|
-
},
|
|
1937
|
+
}, Aa = /* @__PURE__ */ M({
|
|
1938
1938
|
__name: "CustomBlockToolbar",
|
|
1939
1939
|
props: { block: {} },
|
|
1940
1940
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1941
1941
|
setup(e, { emit: t }) {
|
|
1942
|
-
let n = e, r = t, { t: i } =
|
|
1942
|
+
let n = e, r = t, { t: i } = H(), a = u(ue, []), c = _(() => a.find((e) => e.type === n.block.customType)), { isFetching: d, fetchError: f, fetch: p, hasDataSource: m, needsFetch: h } = ft({
|
|
1943
1943
|
definition: c,
|
|
1944
1944
|
block: _(() => n.block),
|
|
1945
1945
|
onUpdate: (e, t) => {
|
|
@@ -1955,23 +1955,23 @@ var xa = {
|
|
|
1955
1955
|
[e]: t
|
|
1956
1956
|
});
|
|
1957
1957
|
}
|
|
1958
|
-
return (t, n) => c.value ? (s(), v("div",
|
|
1959
|
-
c.value.description ? (s(), v("p",
|
|
1960
|
-
b(m) ? (s(), v("div",
|
|
1958
|
+
return (t, n) => c.value ? (s(), v("div", wa, [
|
|
1959
|
+
c.value.description ? (s(), v("p", Ta, g(c.value.description), 1)) : y("", !0),
|
|
1960
|
+
b(m) ? (s(), v("div", Ea, [b(h) && !b(d) ? (s(), v("button", {
|
|
1961
1961
|
key: 0,
|
|
1962
1962
|
type: "button",
|
|
1963
1963
|
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)]",
|
|
1964
1964
|
onClick: n[0] ||= (...e) => b(p) && b(p)(...e)
|
|
1965
|
-
}, g(c.value?.dataSource?.label || b(i).customBlocks.dataSource.fetchButton), 1)) : (s(), v("div",
|
|
1965
|
+
}, g(c.value?.dataSource?.label || b(i).customBlocks.dataSource.fetchButton), 1)) : (s(), v("div", Da, [b(d) ? (s(), v("div", Oa, g(b(i).customBlocks.dataSource.fetching), 1)) : (s(), v("button", {
|
|
1966
1966
|
key: 1,
|
|
1967
1967
|
type: "button",
|
|
1968
1968
|
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)]",
|
|
1969
1969
|
onClick: n[1] ||= (...e) => b(p) && b(p)(...e)
|
|
1970
|
-
}, [N(b(
|
|
1970
|
+
}, [N(b(Be), { size: 12 }), j(" " + g(b(i).customBlocks.dataSource.changeButton), 1)]))])), b(f) ? (s(), v("p", ka, [N(b(ee), {
|
|
1971
1971
|
size: 14,
|
|
1972
1972
|
class: "tpl:shrink-0"
|
|
1973
1973
|
}), j(" " + g(b(i).customBlocks.dataSource.fetchError), 1)])) : y("", !0)])) : y("", !0),
|
|
1974
|
-
(s(!0), v(A, null, l(c.value.fields, (t) => (s(), S(o(b(
|
|
1974
|
+
(s(!0), v(A, null, l(c.value.fields, (t) => (s(), S(o(b(xa)(t.type)), {
|
|
1975
1975
|
key: t.key,
|
|
1976
1976
|
field: t,
|
|
1977
1977
|
"model-value": e.block.fieldValues[t.key],
|
|
@@ -1983,19 +1983,19 @@ var xa = {
|
|
|
1983
1983
|
"read-only",
|
|
1984
1984
|
"onUpdate:modelValue"
|
|
1985
1985
|
]))), 128))
|
|
1986
|
-
])) : (s(), v("div",
|
|
1986
|
+
])) : (s(), v("div", Sa, [E("p", Ca, g(b(i).customBlocks.toolbar.noDefinition), 1)]));
|
|
1987
1987
|
}
|
|
1988
|
-
}),
|
|
1988
|
+
}), ja = { class: "tpl:mb-3.5" }, Ma = { class: "tpl:mb-3.5" }, Na = { class: "tpl:mb-3.5" }, Pa = { class: "tpl:flex tpl:items-stretch" }, Fa = ["value"], Ia = /* @__PURE__ */ M({
|
|
1989
1989
|
__name: "DividerToolbar",
|
|
1990
1990
|
props: { block: {} },
|
|
1991
1991
|
emits: ["update"],
|
|
1992
1992
|
setup(e, { emit: t }) {
|
|
1993
|
-
let n = t, { t: r } =
|
|
1993
|
+
let n = t, { t: r } = H();
|
|
1994
1994
|
function i(e, t) {
|
|
1995
1995
|
n("update", { [e]: t });
|
|
1996
1996
|
}
|
|
1997
1997
|
return (t, n) => (s(), v(A, null, [
|
|
1998
|
-
E("div",
|
|
1998
|
+
E("div", ja, [E("label", { class: T(b(G)) }, g(b(r).divider.style), 3), N(X, {
|
|
1999
1999
|
options: [
|
|
2000
2000
|
{
|
|
2001
2001
|
value: "solid",
|
|
@@ -2013,60 +2013,60 @@ var xa = {
|
|
|
2013
2013
|
"model-value": e.block.lineStyle,
|
|
2014
2014
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
2015
2015
|
}, null, 8, ["options", "model-value"])]),
|
|
2016
|
-
E("div",
|
|
2016
|
+
E("div", Ma, [E("label", { class: T(b(G)) }, g(b(r).divider.color), 3), N(J, {
|
|
2017
2017
|
"model-value": e.block.color,
|
|
2018
2018
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
2019
2019
|
}, null, 8, ["model-value"])]),
|
|
2020
|
-
E("div",
|
|
2020
|
+
E("div", Na, [E("label", { class: T(b(G)) }, g(b(r).divider.thickness), 3), E("div", Pa, [E("input", {
|
|
2021
2021
|
type: "number",
|
|
2022
|
-
class: T(b(
|
|
2022
|
+
class: T(b(q)),
|
|
2023
2023
|
value: e.block.thickness,
|
|
2024
2024
|
min: "1",
|
|
2025
2025
|
max: "10",
|
|
2026
2026
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
2027
|
-
}, null, 42,
|
|
2027
|
+
}, null, 42, Fa), E("span", { class: T(b(K)) }, "px", 2)])])
|
|
2028
2028
|
], 64));
|
|
2029
2029
|
}
|
|
2030
|
-
}),
|
|
2030
|
+
}), La = { class: "tpl:mb-3.5" }, Ra = ["value"], za = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ba = /* @__PURE__ */ M({
|
|
2031
2031
|
__name: "HtmlToolbar",
|
|
2032
2032
|
props: { block: {} },
|
|
2033
2033
|
emits: ["update"],
|
|
2034
2034
|
setup(e, { emit: t }) {
|
|
2035
|
-
let n = t, { t: r } =
|
|
2036
|
-
return (t, i) => (s(), v("div",
|
|
2037
|
-
E("label", { class: T(b(
|
|
2035
|
+
let n = t, { t: r } = H();
|
|
2036
|
+
return (t, i) => (s(), v("div", La, [
|
|
2037
|
+
E("label", { class: T(b(G)) }, g(b(r).html.content), 3),
|
|
2038
2038
|
E("textarea", {
|
|
2039
2039
|
value: e.block.content,
|
|
2040
2040
|
placeholder: "<div>...</div>",
|
|
2041
2041
|
rows: "10",
|
|
2042
2042
|
class: T(b(Bt)),
|
|
2043
2043
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
2044
|
-
}, null, 42,
|
|
2045
|
-
E("p",
|
|
2044
|
+
}, null, 42, Ra),
|
|
2045
|
+
E("p", za, [N(b(Oe), {
|
|
2046
2046
|
size: 12,
|
|
2047
2047
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
2048
2048
|
}), j(" " + g(b(r).html.sanitizationHint), 1)])
|
|
2049
2049
|
]));
|
|
2050
2050
|
}
|
|
2051
|
-
}),
|
|
2051
|
+
}), Va = { class: "tpl:mb-3.5" }, Ha = {
|
|
2052
2052
|
key: 0,
|
|
2053
2053
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
2054
2054
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
2055
|
-
},
|
|
2055
|
+
}, Ua = {
|
|
2056
2056
|
key: 0,
|
|
2057
2057
|
class: "tpl:mb-3.5"
|
|
2058
|
-
},
|
|
2058
|
+
}, Wa = ["value", "placeholder"], Ga = { class: "tpl:mb-3.5" }, Ka = { class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]" }, qa = ["checked"], Ja = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, Ya = { class: "tpl:mb-3.5" }, Xa = ["value"], Za = { value: "full" }, Qa = { value: "custom" }, $a = {
|
|
2059
2059
|
key: 0,
|
|
2060
2060
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2061
|
-
},
|
|
2061
|
+
}, eo = ["value"], to = { class: "tpl:mb-3.5" }, no = { class: "tpl:mb-3.5" }, ro = {
|
|
2062
2062
|
key: 0,
|
|
2063
2063
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
2064
|
-
},
|
|
2064
|
+
}, io = ["checked"], ao = 350, oo = /* @__PURE__ */ M({
|
|
2065
2065
|
__name: "ImageToolbar",
|
|
2066
2066
|
props: { block: {} },
|
|
2067
2067
|
emits: ["update"],
|
|
2068
2068
|
setup(e, { emit: t }) {
|
|
2069
|
-
let n = e, r = t, { t: i } =
|
|
2069
|
+
let n = e, r = t, { t: i } = H(), a = u(Ze, null), o = u(ct, I.liquid), c = B(), l = _(() => !!a), d = p(!1), f = p(!1), { start: m } = Ve(() => {
|
|
2070
2070
|
d.value = !1;
|
|
2071
2071
|
}, 1e3, { immediate: !1 }), h = [
|
|
2072
2072
|
300,
|
|
@@ -2082,7 +2082,7 @@ var xa = {
|
|
|
2082
2082
|
function C(e) {
|
|
2083
2083
|
if (e === "custom") {
|
|
2084
2084
|
let e = n.block.width;
|
|
2085
|
-
(typeof e != "number" || h.includes(e)) && S("width",
|
|
2085
|
+
(typeof e != "number" || h.includes(e)) && S("width", ao);
|
|
2086
2086
|
return;
|
|
2087
2087
|
}
|
|
2088
2088
|
S("width", e === "full" ? "full" : Number(e));
|
|
@@ -2095,7 +2095,7 @@ var xa = {
|
|
|
2095
2095
|
let e = await a?.({ accept: ["images"] });
|
|
2096
2096
|
c.alive && e && (S("src", e.url), e.alt && (S("alt", e.alt), f.value = !0), d.value = !0, m());
|
|
2097
2097
|
}
|
|
2098
|
-
let O = p(), k = p(!1), M = _(() =>
|
|
2098
|
+
let O = p(), k = p(!1), M = _(() => ut(n.block.src, o)), P = _(() => l.value && !k.value && !M.value);
|
|
2099
2099
|
async function F(e) {
|
|
2100
2100
|
if (a) {
|
|
2101
2101
|
k.value = !0;
|
|
@@ -2111,26 +2111,26 @@ var xa = {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
2114
|
-
let { isOver:
|
|
2114
|
+
let { isOver: ee } = Pe({
|
|
2115
2115
|
target: O,
|
|
2116
2116
|
enabled: P,
|
|
2117
2117
|
onFiles: F
|
|
2118
2118
|
});
|
|
2119
2119
|
return (t, n) => (s(), v(A, null, [
|
|
2120
|
-
E("div",
|
|
2120
|
+
E("div", Va, [E("label", { class: T(b(G)) }, g(b(i).image.imageUrl), 3), E("div", {
|
|
2121
2121
|
ref_key: "dropZoneRef",
|
|
2122
2122
|
ref: O,
|
|
2123
2123
|
class: "tpl:relative"
|
|
2124
2124
|
}, [
|
|
2125
|
-
P.value && (b(
|
|
2125
|
+
P.value && (b(ee) || k.value) ? (s(), v("div", Ha, [k.value ? (s(), v(A, { key: 0 }, [N(b(pt), {
|
|
2126
2126
|
class: "tpl-spinner",
|
|
2127
2127
|
size: 18,
|
|
2128
2128
|
"stroke-width": 2
|
|
2129
|
-
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(
|
|
2129
|
+
}), j(" " + g(b(i).image.uploading), 1)], 64)) : (s(), v(A, { key: 1 }, [N(b(Xe), {
|
|
2130
2130
|
size: 18,
|
|
2131
2131
|
"stroke-width": 1.5
|
|
2132
2132
|
}), j(" " + g(b(i).image.dropToUpload), 1)], 64))])) : y("", !0),
|
|
2133
|
-
N(
|
|
2133
|
+
N(Z, {
|
|
2134
2134
|
"model-value": e.block.src,
|
|
2135
2135
|
type: "url",
|
|
2136
2136
|
placeholder: b(i).image.imageUrlPlaceholder,
|
|
@@ -2150,21 +2150,21 @@ var xa = {
|
|
|
2150
2150
|
"background-color": "var(--tpl-bg)"
|
|
2151
2151
|
},
|
|
2152
2152
|
onClick: D
|
|
2153
|
-
}, [N(b(
|
|
2153
|
+
}, [N(b(L), {
|
|
2154
2154
|
size: 14,
|
|
2155
2155
|
"stroke-width": 1.5
|
|
2156
2156
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
2157
2157
|
], 512)]),
|
|
2158
|
-
b(
|
|
2158
|
+
b(ut)(e.block.src, b(o)) ? (s(), v("div", Ua, [E("label", { class: T(b(G)) }, [j(g(b(i).image.placeholderUrl) + " ", 1), n[9] ||= E("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, g("(optional)"), -1)], 2), E("input", {
|
|
2159
2159
|
type: "url",
|
|
2160
|
-
class: T(b(
|
|
2160
|
+
class: T(b(W)),
|
|
2161
2161
|
value: e.block.placeholderUrl || "",
|
|
2162
2162
|
placeholder: b(i).image.placeholderUrlPlaceholder,
|
|
2163
2163
|
onInput: n[1] ||= (e) => S("placeholderUrl", e.target.value)
|
|
2164
|
-
}, null, 42,
|
|
2165
|
-
E("div",
|
|
2166
|
-
E("label", { class: T(b(
|
|
2167
|
-
N(
|
|
2164
|
+
}, null, 42, Wa)])) : y("", !0),
|
|
2165
|
+
E("div", Ga, [
|
|
2166
|
+
E("label", { class: T(b(G)) }, g(b(i).image.altText), 3),
|
|
2167
|
+
N(Z, {
|
|
2168
2168
|
"model-value": e.block.alt,
|
|
2169
2169
|
type: "text",
|
|
2170
2170
|
placeholder: b(i).image.altTextPlaceholder,
|
|
@@ -2177,35 +2177,35 @@ var xa = {
|
|
|
2177
2177
|
"pulse",
|
|
2178
2178
|
"disabled"
|
|
2179
2179
|
]),
|
|
2180
|
-
E("label",
|
|
2180
|
+
E("label", Ka, [E("input", {
|
|
2181
2181
|
type: "checkbox",
|
|
2182
2182
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2183
2183
|
checked: e.block.decorative === !0,
|
|
2184
2184
|
onChange: n[3] ||= (e) => S("decorative", e.target.checked)
|
|
2185
|
-
}, null, 40,
|
|
2185
|
+
}, null, 40, qa), E("span", null, [j(g(b(i).image.decorative) + " ", 1), E("span", Ja, g(b(i).image.decorativeHint), 1)])])
|
|
2186
2186
|
]),
|
|
2187
|
-
E("div",
|
|
2188
|
-
E("label", { class: T(b(
|
|
2187
|
+
E("div", Ya, [
|
|
2188
|
+
E("label", { class: T(b(G)) }, g(b(i).image.width), 3),
|
|
2189
2189
|
E("select", {
|
|
2190
|
-
class: T(b(
|
|
2190
|
+
class: T(b(W)),
|
|
2191
2191
|
value: x.value,
|
|
2192
2192
|
onChange: n[4] ||= (e) => C(e.target.value)
|
|
2193
2193
|
}, [
|
|
2194
|
-
E("option",
|
|
2194
|
+
E("option", Za, g(b(i).image.fullWidth), 1),
|
|
2195
2195
|
n[10] ||= E("option", { value: "300" }, "300px", -1),
|
|
2196
2196
|
n[11] ||= E("option", { value: "400" }, "400px", -1),
|
|
2197
2197
|
n[12] ||= E("option", { value: "500" }, "500px", -1),
|
|
2198
|
-
E("option",
|
|
2199
|
-
], 42,
|
|
2200
|
-
x.value === "custom" ? (s(), v("div",
|
|
2198
|
+
E("option", Qa, g(b(i).image.widthCustom), 1)
|
|
2199
|
+
], 42, Xa),
|
|
2200
|
+
x.value === "custom" ? (s(), v("div", $a, [E("input", {
|
|
2201
2201
|
type: "number",
|
|
2202
|
-
class: T(b(
|
|
2203
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
2202
|
+
class: T(b(q)),
|
|
2203
|
+
value: typeof e.block.width == "number" ? e.block.width : ao,
|
|
2204
2204
|
min: "20",
|
|
2205
2205
|
onInput: n[5] ||= (e) => w(e.target.value)
|
|
2206
|
-
}, null, 42,
|
|
2206
|
+
}, null, 42, eo), E("span", { class: T(b(K)) }, "px", 2)])) : y("", !0)
|
|
2207
2207
|
]),
|
|
2208
|
-
E("div",
|
|
2208
|
+
E("div", to, [E("label", { class: T(b(G)) }, g(b(i).title.align), 3), N(X, {
|
|
2209
2209
|
options: [
|
|
2210
2210
|
{
|
|
2211
2211
|
value: "left",
|
|
@@ -2223,28 +2223,28 @@ var xa = {
|
|
|
2223
2223
|
"model-value": e.block.align,
|
|
2224
2224
|
"onUpdate:modelValue": n[6] ||= (e) => S("align", e)
|
|
2225
2225
|
}, null, 8, ["options", "model-value"])]),
|
|
2226
|
-
E("div",
|
|
2227
|
-
E("label", { class: T(b(
|
|
2228
|
-
N(
|
|
2226
|
+
E("div", no, [
|
|
2227
|
+
E("label", { class: T(b(G)) }, g(b(i).image.linkUrl), 3),
|
|
2228
|
+
N(Z, {
|
|
2229
2229
|
"model-value": e.block.linkUrl || "",
|
|
2230
2230
|
type: "url",
|
|
2231
2231
|
placeholder: b(i).image.imageUrlPlaceholder,
|
|
2232
2232
|
"onUpdate:modelValue": n[7] ||= (e) => S("linkUrl", e)
|
|
2233
2233
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2234
|
-
e.block.linkUrl ? (s(), v("label",
|
|
2234
|
+
e.block.linkUrl ? (s(), v("label", ro, [E("input", {
|
|
2235
2235
|
type: "checkbox",
|
|
2236
2236
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2237
2237
|
checked: e.block.linkOpenInNewTab ?? !1,
|
|
2238
2238
|
onChange: n[8] ||= (e) => S("linkOpenInNewTab", e.target.checked)
|
|
2239
|
-
}, null, 40,
|
|
2239
|
+
}, null, 40, io), j(" " + g(b(i).image.openInNewTab), 1)])) : y("", !0)
|
|
2240
2240
|
])
|
|
2241
2241
|
], 64));
|
|
2242
2242
|
}
|
|
2243
|
-
}),
|
|
2243
|
+
}), so = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, co = { class: "tpl:flex tpl:items-center tpl:gap-2" }, lo = [
|
|
2244
2244
|
"value",
|
|
2245
2245
|
"placeholder",
|
|
2246
2246
|
"onInput"
|
|
2247
|
-
],
|
|
2247
|
+
], uo = ["title", "onClick"], fo = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, po = ["checked", "onChange"], mo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ho = ["value"], go = { value: "" }, _o = ["value"], vo = ["value"], yo = /* @__PURE__ */ M({
|
|
2248
2248
|
__name: "MenuToolbar",
|
|
2249
2249
|
props: {
|
|
2250
2250
|
block: {},
|
|
@@ -2252,7 +2252,7 @@ var xa = {
|
|
|
2252
2252
|
},
|
|
2253
2253
|
emits: ["update"],
|
|
2254
2254
|
setup(e, { emit: t }) {
|
|
2255
|
-
let n = e, r = t, { t: i } =
|
|
2255
|
+
let n = e, r = t, { t: i } = H(), a = _(() => [
|
|
2256
2256
|
{
|
|
2257
2257
|
key: "openInNewTab",
|
|
2258
2258
|
label: i.menu.openInNewTab
|
|
@@ -2269,17 +2269,17 @@ var xa = {
|
|
|
2269
2269
|
{
|
|
2270
2270
|
value: "left",
|
|
2271
2271
|
label: i.title.alignLeft,
|
|
2272
|
-
icon:
|
|
2272
|
+
icon: At
|
|
2273
2273
|
},
|
|
2274
2274
|
{
|
|
2275
2275
|
value: "center",
|
|
2276
2276
|
label: i.title.alignCenter,
|
|
2277
|
-
icon:
|
|
2277
|
+
icon: jt
|
|
2278
2278
|
},
|
|
2279
2279
|
{
|
|
2280
2280
|
value: "right",
|
|
2281
2281
|
label: i.title.alignRight,
|
|
2282
|
-
icon:
|
|
2282
|
+
icon: Dt
|
|
2283
2283
|
}
|
|
2284
2284
|
]);
|
|
2285
2285
|
function c(e, t) {
|
|
@@ -2287,7 +2287,7 @@ var xa = {
|
|
|
2287
2287
|
}
|
|
2288
2288
|
function u() {
|
|
2289
2289
|
let e = {
|
|
2290
|
-
id:
|
|
2290
|
+
id: we(),
|
|
2291
2291
|
text: "",
|
|
2292
2292
|
url: "",
|
|
2293
2293
|
openInNewTab: !1,
|
|
@@ -2307,26 +2307,26 @@ var xa = {
|
|
|
2307
2307
|
r("update", { items: n.block.items.filter((t) => t.id !== e) });
|
|
2308
2308
|
}
|
|
2309
2309
|
return (t, n) => (s(), v(A, null, [
|
|
2310
|
-
N(
|
|
2311
|
-
default: d(() => [E("div",
|
|
2310
|
+
N(Y, { label: b(i).menu.items }, {
|
|
2311
|
+
default: d(() => [E("div", so, [(s(!0), v(A, null, l(e.block.items, (t) => (s(), v("div", {
|
|
2312
2312
|
key: t.id,
|
|
2313
2313
|
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"
|
|
2314
2314
|
}, [
|
|
2315
|
-
E("div",
|
|
2315
|
+
E("div", co, [E("input", {
|
|
2316
2316
|
type: "text",
|
|
2317
|
-
class: T([b(
|
|
2317
|
+
class: T([b(W), "tpl:flex-1"]),
|
|
2318
2318
|
value: t.text,
|
|
2319
2319
|
placeholder: b(i).menu.text,
|
|
2320
2320
|
onInput: (e) => f(t.id, "text", e.target.value)
|
|
2321
|
-
}, null, 42,
|
|
2322
|
-
class: T(b(
|
|
2321
|
+
}, null, 42, lo), E("button", {
|
|
2322
|
+
class: T(b(zt)),
|
|
2323
2323
|
title: b(i).menu.removeItem,
|
|
2324
2324
|
onClick: (e) => p(t.id)
|
|
2325
|
-
}, [N(b(
|
|
2325
|
+
}, [N(b(Ue), {
|
|
2326
2326
|
size: 14,
|
|
2327
2327
|
"stroke-width": 2
|
|
2328
|
-
})], 10,
|
|
2329
|
-
N(
|
|
2328
|
+
})], 10, uo)]),
|
|
2329
|
+
N(Z, {
|
|
2330
2330
|
"model-value": t.url,
|
|
2331
2331
|
type: "url",
|
|
2332
2332
|
placeholder: b(i).menu.urlPlaceholder,
|
|
@@ -2336,7 +2336,7 @@ var xa = {
|
|
|
2336
2336
|
"placeholder",
|
|
2337
2337
|
"onUpdate:modelValue"
|
|
2338
2338
|
]),
|
|
2339
|
-
E("div",
|
|
2339
|
+
E("div", fo, [(s(!0), v(A, null, l(a.value, (e) => (s(), v("label", {
|
|
2340
2340
|
key: e.key,
|
|
2341
2341
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
2342
2342
|
}, [E("input", {
|
|
@@ -2344,34 +2344,34 @@ var xa = {
|
|
|
2344
2344
|
checked: t[e.key],
|
|
2345
2345
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2346
2346
|
onChange: (n) => f(t.id, e.key, n.target.checked)
|
|
2347
|
-
}, null, 40,
|
|
2348
|
-
E("div",
|
|
2347
|
+
}, null, 40, po), j(" " + g(e.label), 1)]))), 128))]),
|
|
2348
|
+
E("div", mo, [E("label", { class: T([b(G), "tpl:!mb-0"]) }, g(b(i).menu.color), 3), N(J, {
|
|
2349
2349
|
"swatch-only": "",
|
|
2350
2350
|
"model-value": t.color || e.block.linkColor || e.block.color || "",
|
|
2351
2351
|
"onUpdate:modelValue": (e) => f(t.id, "color", e)
|
|
2352
2352
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2353
2353
|
]))), 128)), E("button", {
|
|
2354
|
-
class: T(b(
|
|
2354
|
+
class: T(b(Ht)),
|
|
2355
2355
|
onClick: u
|
|
2356
|
-
}, [N(b(
|
|
2356
|
+
}, [N(b(U), {
|
|
2357
2357
|
size: 14,
|
|
2358
2358
|
"stroke-width": 2
|
|
2359
2359
|
}), j(" " + g(b(i).menu.addItem), 1)], 2)])]),
|
|
2360
2360
|
_: 1
|
|
2361
2361
|
}, 8, ["label"]),
|
|
2362
|
-
N(
|
|
2362
|
+
N(Y, { label: b(i).menu.fontFamily }, {
|
|
2363
2363
|
default: d(() => [E("select", {
|
|
2364
|
-
class: T(b(
|
|
2364
|
+
class: T(b(W)),
|
|
2365
2365
|
value: e.block.fontFamily || "",
|
|
2366
2366
|
onChange: n[0] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2367
|
-
}, [E("option",
|
|
2367
|
+
}, [E("option", go, g(b(i).title.inheritFont), 1), (s(!0), v(A, null, l(e.fontFamilies, (e) => (s(), v("option", {
|
|
2368
2368
|
key: e.value,
|
|
2369
2369
|
value: e.value
|
|
2370
|
-
}, g(e.label), 9,
|
|
2370
|
+
}, g(e.label), 9, _o))), 128))], 42, ho)]),
|
|
2371
2371
|
_: 1
|
|
2372
2372
|
}, 8, ["label"]),
|
|
2373
|
-
N(
|
|
2374
|
-
default: d(() => [N(
|
|
2373
|
+
N(Y, { label: b(i).menu.fontSize }, {
|
|
2374
|
+
default: d(() => [N(qt, {
|
|
2375
2375
|
"model-value": e.block.fontSize,
|
|
2376
2376
|
min: 8,
|
|
2377
2377
|
max: 48,
|
|
@@ -2380,46 +2380,46 @@ var xa = {
|
|
|
2380
2380
|
}, null, 8, ["model-value"])]),
|
|
2381
2381
|
_: 1
|
|
2382
2382
|
}, 8, ["label"]),
|
|
2383
|
-
N(
|
|
2384
|
-
default: d(() => [N(
|
|
2383
|
+
N(Y, { label: b(i).menu.color }, {
|
|
2384
|
+
default: d(() => [N(J, {
|
|
2385
2385
|
"model-value": e.block.color ?? "",
|
|
2386
2386
|
"onUpdate:modelValue": n[2] ||= (e) => c("color", e || void 0)
|
|
2387
2387
|
}, null, 8, ["model-value"])]),
|
|
2388
2388
|
_: 1
|
|
2389
2389
|
}, 8, ["label"]),
|
|
2390
|
-
N(
|
|
2391
|
-
default: d(() => [N(
|
|
2390
|
+
N(Y, { label: b(i).menu.linkColor }, {
|
|
2391
|
+
default: d(() => [N(J, {
|
|
2392
2392
|
"model-value": e.block.linkColor || e.block.color || "",
|
|
2393
2393
|
"onUpdate:modelValue": n[3] ||= (e) => c("linkColor", e || void 0)
|
|
2394
2394
|
}, null, 8, ["model-value"])]),
|
|
2395
2395
|
_: 1
|
|
2396
2396
|
}, 8, ["label"]),
|
|
2397
|
-
N(
|
|
2398
|
-
default: d(() => [N(
|
|
2397
|
+
N(Y, { label: b(i).menu.textAlign }, {
|
|
2398
|
+
default: d(() => [N(X, {
|
|
2399
2399
|
options: o.value,
|
|
2400
2400
|
"model-value": e.block.textAlign,
|
|
2401
2401
|
"onUpdate:modelValue": n[4] ||= (e) => c("textAlign", e)
|
|
2402
2402
|
}, null, 8, ["options", "model-value"])]),
|
|
2403
2403
|
_: 1
|
|
2404
2404
|
}, 8, ["label"]),
|
|
2405
|
-
N(
|
|
2405
|
+
N(Y, { label: b(i).menu.separator }, {
|
|
2406
2406
|
default: d(() => [E("input", {
|
|
2407
2407
|
type: "text",
|
|
2408
|
-
class: T(b(
|
|
2408
|
+
class: T(b(W)),
|
|
2409
2409
|
value: e.block.separator,
|
|
2410
2410
|
onInput: n[5] ||= (e) => c("separator", e.target.value)
|
|
2411
|
-
}, null, 42,
|
|
2411
|
+
}, null, 42, vo)]),
|
|
2412
2412
|
_: 1
|
|
2413
2413
|
}, 8, ["label"]),
|
|
2414
|
-
N(
|
|
2415
|
-
default: d(() => [N(
|
|
2414
|
+
N(Y, { label: b(i).menu.separatorColor }, {
|
|
2415
|
+
default: d(() => [N(J, {
|
|
2416
2416
|
"model-value": e.block.separatorColor,
|
|
2417
2417
|
"onUpdate:modelValue": n[6] ||= (e) => c("separatorColor", e)
|
|
2418
2418
|
}, null, 8, ["model-value"])]),
|
|
2419
2419
|
_: 1
|
|
2420
2420
|
}, 8, ["label"]),
|
|
2421
|
-
N(
|
|
2422
|
-
default: d(() => [N(
|
|
2421
|
+
N(Y, { label: b(i).menu.spacing }, {
|
|
2422
|
+
default: d(() => [N(qt, {
|
|
2423
2423
|
"model-value": e.block.spacing,
|
|
2424
2424
|
min: 0,
|
|
2425
2425
|
max: 50,
|
|
@@ -2433,11 +2433,11 @@ var xa = {
|
|
|
2433
2433
|
});
|
|
2434
2434
|
//#endregion
|
|
2435
2435
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2436
|
-
function
|
|
2436
|
+
function bo(e) {
|
|
2437
2437
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2440
|
-
let n =
|
|
2439
|
+
function xo(e, t) {
|
|
2440
|
+
let n = bo(t);
|
|
2441
2441
|
if (e.length === n) return e;
|
|
2442
2442
|
if (e.length < n) {
|
|
2443
2443
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2448,15 +2448,15 @@ function bo(e, t) {
|
|
|
2448
2448
|
}
|
|
2449
2449
|
//#endregion
|
|
2450
2450
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2451
|
-
var
|
|
2451
|
+
var So = { class: "tpl:mb-3.5" }, Co = ["value"], wo = ["value"], To = { class: "tpl:mb-3.5" }, Eo = { class: "tpl:flex tpl:items-stretch" }, Do = ["value"], Oo = { class: "tpl:mb-3.5" }, ko = { class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]" }, Ao = ["checked"], jo = {
|
|
2452
2452
|
key: 0,
|
|
2453
2453
|
class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
|
|
2454
|
-
},
|
|
2454
|
+
}, Mo = { class: "tpl:flex tpl:items-stretch" }, No = ["value"], Po = /* @__PURE__ */ M({
|
|
2455
2455
|
__name: "SectionToolbar",
|
|
2456
2456
|
props: { block: {} },
|
|
2457
2457
|
emits: ["update"],
|
|
2458
2458
|
setup(e, { emit: t }) {
|
|
2459
|
-
let n = e, r = t, { t: i } =
|
|
2459
|
+
let n = e, r = t, { t: i } = H(), a = _(() => [
|
|
2460
2460
|
{
|
|
2461
2461
|
value: "1",
|
|
2462
2462
|
label: i.section.column1
|
|
@@ -2479,7 +2479,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2479
2479
|
}
|
|
2480
2480
|
]);
|
|
2481
2481
|
function o(e) {
|
|
2482
|
-
let t = e.target.value, i =
|
|
2482
|
+
let t = e.target.value, i = xo(n.block.children, t);
|
|
2483
2483
|
r("update", {
|
|
2484
2484
|
columns: t,
|
|
2485
2485
|
children: i
|
|
@@ -2510,33 +2510,33 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2510
2510
|
d({ borderRadius: Number(e.target.value) });
|
|
2511
2511
|
}
|
|
2512
2512
|
return (t, n) => (s(), v(A, null, [
|
|
2513
|
-
E("div",
|
|
2514
|
-
class: T(b(
|
|
2513
|
+
E("div", So, [E("label", { class: T(b(G)) }, g(b(i).section.columns), 3), E("select", {
|
|
2514
|
+
class: T(b(W)),
|
|
2515
2515
|
value: e.block.columns,
|
|
2516
2516
|
onChange: o
|
|
2517
2517
|
}, [(s(!0), v(A, null, l(a.value, (e) => (s(), v("option", {
|
|
2518
2518
|
key: e.value,
|
|
2519
2519
|
value: e.value
|
|
2520
|
-
}, g(e.label), 9,
|
|
2521
|
-
E("div",
|
|
2520
|
+
}, g(e.label), 9, wo))), 128))], 42, Co)]),
|
|
2521
|
+
E("div", To, [E("label", { class: T(b(G)) }, g(b(i).section.borderRadius), 3), E("div", Eo, [E("input", {
|
|
2522
2522
|
type: "number",
|
|
2523
|
-
class: T(b(
|
|
2523
|
+
class: T(b(q)),
|
|
2524
2524
|
value: e.block.borderRadius ?? 0,
|
|
2525
2525
|
min: "0",
|
|
2526
2526
|
max: "50",
|
|
2527
2527
|
onInput: c
|
|
2528
|
-
}, null, 42,
|
|
2529
|
-
E("div",
|
|
2528
|
+
}, null, 42, Do), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2529
|
+
E("div", Oo, [E("label", ko, [E("input", {
|
|
2530
2530
|
type: "checkbox",
|
|
2531
2531
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2532
2532
|
checked: !!e.block.wrapper,
|
|
2533
2533
|
onChange: n[0] ||= (e) => u(e.target.checked)
|
|
2534
|
-
}, null, 40,
|
|
2535
|
-
E("div", null, [E("label", { class: T(b(
|
|
2534
|
+
}, null, 40, Ao), j(" " + g(b(i).section.wrapperEnable), 1)]), e.block.wrapper ? (s(), v("div", jo, [
|
|
2535
|
+
E("div", null, [E("label", { class: T(b(G)) }, g(b(i).blockSettings.color), 3), N(J, {
|
|
2536
2536
|
"model-value": e.block.wrapper.backgroundColor ?? "",
|
|
2537
2537
|
"onUpdate:modelValue": n[1] ||= (e) => d({ backgroundColor: e })
|
|
2538
2538
|
}, null, 8, ["model-value"])]),
|
|
2539
|
-
N(
|
|
2539
|
+
N(wi, {
|
|
2540
2540
|
label: b(i).blockSettings.padding,
|
|
2541
2541
|
"model-value": e.block.wrapper.padding ?? {
|
|
2542
2542
|
top: 0,
|
|
@@ -2546,29 +2546,29 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2546
2546
|
},
|
|
2547
2547
|
"onUpdate:modelValue": f
|
|
2548
2548
|
}, null, 8, ["label", "model-value"]),
|
|
2549
|
-
E("div", null, [E("label", { class: T(b(
|
|
2549
|
+
E("div", null, [E("label", { class: T(b(G)) }, g(b(i).section.borderRadius), 3), E("div", Mo, [E("input", {
|
|
2550
2550
|
type: "number",
|
|
2551
|
-
class: T(b(
|
|
2551
|
+
class: T(b(q)),
|
|
2552
2552
|
value: e.block.wrapper.borderRadius ?? 0,
|
|
2553
2553
|
min: "0",
|
|
2554
2554
|
max: "50",
|
|
2555
2555
|
onInput: p
|
|
2556
|
-
}, null, 42,
|
|
2556
|
+
}, null, 42, No), E("span", { class: T(b(K)) }, "px", 2)])])
|
|
2557
2557
|
])) : y("", !0)])
|
|
2558
2558
|
], 64));
|
|
2559
2559
|
}
|
|
2560
|
-
}),
|
|
2560
|
+
}), Fo = { class: "tpl:mb-3.5" }, Io = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Lo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ro = ["value", "onChange"], zo = ["value"], Bo = ["title", "onClick"], Vo = { class: "tpl:mb-3.5" }, Ho = ["value"], Uo = { value: "solid" }, Wo = { value: "outlined" }, Go = { value: "rounded" }, Ko = { value: "square" }, qo = { value: "circle" }, Jo = { class: "tpl:mb-3.5" }, Yo = { class: "tpl:mb-3.5" }, Xo = { class: "tpl:flex tpl:items-stretch" }, Zo = ["value"], Qo = { class: "tpl:mb-3.5" }, $o = /* @__PURE__ */ M({
|
|
2561
2561
|
__name: "SocialToolbar",
|
|
2562
2562
|
props: { block: {} },
|
|
2563
2563
|
emits: ["update"],
|
|
2564
2564
|
setup(e, { emit: t }) {
|
|
2565
|
-
let n = e, r = t, { t: i } =
|
|
2565
|
+
let n = e, r = t, { t: i } = H();
|
|
2566
2566
|
function a(e, t) {
|
|
2567
2567
|
r("update", { [e]: t });
|
|
2568
2568
|
}
|
|
2569
2569
|
function o() {
|
|
2570
2570
|
let e = {
|
|
2571
|
-
id:
|
|
2571
|
+
id: we(),
|
|
2572
2572
|
platform: "facebook",
|
|
2573
2573
|
url: ""
|
|
2574
2574
|
};
|
|
@@ -2585,25 +2585,25 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2585
2585
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2586
2586
|
}
|
|
2587
2587
|
return (t, n) => (s(), v(A, null, [
|
|
2588
|
-
E("div",
|
|
2588
|
+
E("div", Fo, [E("label", { class: T(b(G)) }, g(b(i).social.icons), 3), E("div", Io, [(s(!0), v(A, null, l(e.block.icons, (e) => (s(), v("div", {
|
|
2589
2589
|
key: e.id,
|
|
2590
2590
|
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"
|
|
2591
|
-
}, [E("div",
|
|
2591
|
+
}, [E("div", Lo, [E("select", {
|
|
2592
2592
|
"data-testid": "social-platform-select",
|
|
2593
|
-
class: T([b(
|
|
2593
|
+
class: T([b(W), "tpl:flex-1"]),
|
|
2594
2594
|
value: e.platform,
|
|
2595
2595
|
onChange: (t) => c(e.id, "platform", t.target.value)
|
|
2596
|
-
}, [(s(!0), v(A, null, l(b(
|
|
2596
|
+
}, [(s(!0), v(A, null, l(b(ie), (e) => (s(), v("option", {
|
|
2597
2597
|
key: e,
|
|
2598
2598
|
value: e
|
|
2599
|
-
}, g(b(i).social.platforms[e]), 9,
|
|
2600
|
-
class: T(b(
|
|
2599
|
+
}, g(b(i).social.platforms[e]), 9, zo))), 128))], 42, Ro), E("button", {
|
|
2600
|
+
class: T(b(zt)),
|
|
2601
2601
|
title: b(i).social.removeIcon,
|
|
2602
2602
|
onClick: (t) => u(e.id)
|
|
2603
|
-
}, [N(b(
|
|
2603
|
+
}, [N(b(Ue), {
|
|
2604
2604
|
size: 14,
|
|
2605
2605
|
"stroke-width": 2
|
|
2606
|
-
})], 10,
|
|
2606
|
+
})], 10, Bo)]), N(Z, {
|
|
2607
2607
|
"model-value": e.url,
|
|
2608
2608
|
type: "url",
|
|
2609
2609
|
placeholder: b(i).social.urlPlaceholder,
|
|
@@ -2613,24 +2613,24 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2613
2613
|
"placeholder",
|
|
2614
2614
|
"onUpdate:modelValue"
|
|
2615
2615
|
])]))), 128)), E("button", {
|
|
2616
|
-
class: T(b(
|
|
2616
|
+
class: T(b(Ht)),
|
|
2617
2617
|
onClick: o
|
|
2618
|
-
}, [N(b(
|
|
2618
|
+
}, [N(b(U), {
|
|
2619
2619
|
size: 14,
|
|
2620
2620
|
"stroke-width": 2
|
|
2621
2621
|
}), j(" " + g(b(i).social.addIcon), 1)], 2)])]),
|
|
2622
|
-
E("div",
|
|
2623
|
-
class: T(b(
|
|
2622
|
+
E("div", Vo, [E("label", { class: T(b(G)) }, g(b(i).social.style), 3), E("select", {
|
|
2623
|
+
class: T(b(W)),
|
|
2624
2624
|
value: e.block.iconStyle,
|
|
2625
2625
|
onChange: n[0] ||= (e) => a("iconStyle", e.target.value)
|
|
2626
2626
|
}, [
|
|
2627
|
-
E("option",
|
|
2628
|
-
E("option",
|
|
2629
|
-
E("option",
|
|
2630
|
-
E("option",
|
|
2631
|
-
E("option",
|
|
2632
|
-
], 42,
|
|
2633
|
-
E("div",
|
|
2627
|
+
E("option", Uo, g(b(i).social.styleSolid), 1),
|
|
2628
|
+
E("option", Wo, g(b(i).social.styleOutlined), 1),
|
|
2629
|
+
E("option", Go, g(b(i).social.styleRounded), 1),
|
|
2630
|
+
E("option", Ko, g(b(i).social.styleSquare), 1),
|
|
2631
|
+
E("option", qo, g(b(i).social.styleCircle), 1)
|
|
2632
|
+
], 42, Ho)]),
|
|
2633
|
+
E("div", Jo, [E("label", { class: T(b(G)) }, g(b(i).social.size), 3), N(X, {
|
|
2634
2634
|
options: [
|
|
2635
2635
|
{
|
|
2636
2636
|
value: "small",
|
|
@@ -2648,30 +2648,30 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2648
2648
|
"model-value": e.block.iconSize,
|
|
2649
2649
|
"onUpdate:modelValue": n[1] ||= (e) => a("iconSize", e)
|
|
2650
2650
|
}, null, 8, ["options", "model-value"])]),
|
|
2651
|
-
E("div",
|
|
2651
|
+
E("div", Yo, [E("label", { class: T(b(G)) }, g(b(i).social.spacing), 3), E("div", Xo, [E("input", {
|
|
2652
2652
|
type: "number",
|
|
2653
|
-
class: T(b(
|
|
2653
|
+
class: T(b(q)),
|
|
2654
2654
|
value: e.block.spacing,
|
|
2655
2655
|
min: "0",
|
|
2656
2656
|
max: "50",
|
|
2657
2657
|
onInput: n[2] ||= (e) => a("spacing", Number(e.target.value))
|
|
2658
|
-
}, null, 42,
|
|
2659
|
-
E("div",
|
|
2658
|
+
}, null, 42, Zo), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2659
|
+
E("div", Qo, [E("label", { class: T(b(G)) }, g(b(i).social.align), 3), N(X, {
|
|
2660
2660
|
options: [
|
|
2661
2661
|
{
|
|
2662
2662
|
value: "left",
|
|
2663
2663
|
label: b(i).title.alignLeft,
|
|
2664
|
-
icon: b(
|
|
2664
|
+
icon: b(At)
|
|
2665
2665
|
},
|
|
2666
2666
|
{
|
|
2667
2667
|
value: "center",
|
|
2668
2668
|
label: b(i).title.alignCenter,
|
|
2669
|
-
icon: b(
|
|
2669
|
+
icon: b(jt)
|
|
2670
2670
|
},
|
|
2671
2671
|
{
|
|
2672
2672
|
value: "right",
|
|
2673
2673
|
label: b(i).title.alignRight,
|
|
2674
|
-
icon: b(
|
|
2674
|
+
icon: b(Dt)
|
|
2675
2675
|
}
|
|
2676
2676
|
],
|
|
2677
2677
|
"model-value": e.block.align,
|
|
@@ -2679,22 +2679,22 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2679
2679
|
}, null, 8, ["options", "model-value"])])
|
|
2680
2680
|
], 64));
|
|
2681
2681
|
}
|
|
2682
|
-
}),
|
|
2682
|
+
}), es = { class: "tpl:mb-3.5" }, ts = { class: "tpl:flex tpl:items-stretch" }, ns = ["value"], rs = ["value"], is = /* @__PURE__ */ M({
|
|
2683
2683
|
__name: "SpacerToolbar",
|
|
2684
2684
|
props: { block: {} },
|
|
2685
2685
|
emits: ["update"],
|
|
2686
2686
|
setup(e, { emit: t }) {
|
|
2687
|
-
let n = t, { t: r } =
|
|
2688
|
-
return (t, i) => (s(), v("div",
|
|
2689
|
-
E("label", { class: T(b(
|
|
2690
|
-
E("div",
|
|
2687
|
+
let n = t, { t: r } = H();
|
|
2688
|
+
return (t, i) => (s(), v("div", es, [
|
|
2689
|
+
E("label", { class: T(b(G)) }, g(b(r).spacer.height), 3),
|
|
2690
|
+
E("div", ts, [E("input", {
|
|
2691
2691
|
type: "number",
|
|
2692
|
-
class: T(b(
|
|
2692
|
+
class: T(b(q)),
|
|
2693
2693
|
value: e.block.height,
|
|
2694
2694
|
min: "10",
|
|
2695
2695
|
max: "100",
|
|
2696
2696
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2697
|
-
}, null, 42,
|
|
2697
|
+
}, null, 42, ns), E("span", { class: T(b(K)) }, "px", 2)]),
|
|
2698
2698
|
E("input", {
|
|
2699
2699
|
type: "range",
|
|
2700
2700
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2702,13 +2702,13 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2702
2702
|
min: "10",
|
|
2703
2703
|
max: "100",
|
|
2704
2704
|
onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2705
|
-
}, null, 40,
|
|
2705
|
+
}, null, 40, rs)
|
|
2706
2706
|
]));
|
|
2707
2707
|
}
|
|
2708
|
-
}),
|
|
2708
|
+
}), as = { class: "tpl:mb-3.5" }, os = { class: "tpl:flex tpl:items-center tpl:gap-3" }, ss = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, cs = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, ls = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, us = ["disabled"], ds = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, fs = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ps = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, ms = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, hs = ["disabled"], gs = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, _s = { class: "tpl:mb-3.5" }, vs = { 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)]" }, ys = ["checked"], bs = {
|
|
2709
2709
|
key: 0,
|
|
2710
2710
|
class: "tpl:mb-3.5"
|
|
2711
|
-
},
|
|
2711
|
+
}, xs = { class: "tpl:mb-3.5" }, Ss = { class: "tpl:mb-3.5" }, Cs = { class: "tpl:flex tpl:items-stretch" }, ws = ["value"], Ts = { class: "tpl:mb-3.5" }, Es = { class: "tpl:flex tpl:items-stretch" }, Ds = ["value"], Os = { class: "tpl:mb-3.5" }, ks = ["value"], As = { value: "" }, js = ["value"], Ms = { class: "tpl:mb-3.5" }, Ns = { class: "tpl:flex tpl:items-stretch" }, Ps = ["value"], Fs = { class: "tpl:mb-3.5" }, Is = { class: "tpl:mb-3.5" }, Ls = /* @__PURE__ */ M({
|
|
2712
2712
|
__name: "TableToolbar",
|
|
2713
2713
|
props: {
|
|
2714
2714
|
block: {},
|
|
@@ -2716,15 +2716,15 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2716
2716
|
},
|
|
2717
2717
|
emits: ["update"],
|
|
2718
2718
|
setup(e, { emit: t }) {
|
|
2719
|
-
let n = e, r = t, { t: i } =
|
|
2719
|
+
let n = e, r = t, { t: i } = H(), a = _(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
|
|
2720
2720
|
function o(e, t) {
|
|
2721
2721
|
r("update", { [e]: t });
|
|
2722
2722
|
}
|
|
2723
2723
|
function c() {
|
|
2724
2724
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2725
|
-
id:
|
|
2725
|
+
id: we(),
|
|
2726
2726
|
cells: Array.from({ length: e }, () => ({
|
|
2727
|
-
id:
|
|
2727
|
+
id: we(),
|
|
2728
2728
|
content: ""
|
|
2729
2729
|
}))
|
|
2730
2730
|
};
|
|
@@ -2737,7 +2737,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2737
2737
|
let e = n.block.rows.map((e) => ({
|
|
2738
2738
|
...e,
|
|
2739
2739
|
cells: [...e.cells, {
|
|
2740
|
-
id:
|
|
2740
|
+
id: we(),
|
|
2741
2741
|
content: ""
|
|
2742
2742
|
}]
|
|
2743
2743
|
}));
|
|
@@ -2751,50 +2751,50 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2751
2751
|
r("update", { rows: t });
|
|
2752
2752
|
}
|
|
2753
2753
|
return (t, n) => (s(), v(A, null, [
|
|
2754
|
-
E("div",
|
|
2754
|
+
E("div", as, [E("label", { class: T(b(G)) }, g(b(i).table.dimensions), 3), E("div", os, [E("div", ss, [E("span", cs, g(b(i).table.rows), 1), E("div", ls, [
|
|
2755
2755
|
E("button", {
|
|
2756
2756
|
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",
|
|
2757
2757
|
disabled: e.block.rows.length <= 1,
|
|
2758
2758
|
onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2759
|
-
}, [N(b(
|
|
2759
|
+
}, [N(b(xt), {
|
|
2760
2760
|
size: 12,
|
|
2761
2761
|
"stroke-width": 2
|
|
2762
|
-
})], 8,
|
|
2763
|
-
E("span",
|
|
2762
|
+
})], 8, us),
|
|
2763
|
+
E("span", ds, g(e.block.rows.length), 1),
|
|
2764
2764
|
E("button", {
|
|
2765
2765
|
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)]",
|
|
2766
2766
|
onClick: c
|
|
2767
|
-
}, [N(b(
|
|
2767
|
+
}, [N(b(U), {
|
|
2768
2768
|
size: 12,
|
|
2769
2769
|
"stroke-width": 2
|
|
2770
2770
|
})])
|
|
2771
|
-
])]), E("div",
|
|
2771
|
+
])]), E("div", fs, [E("span", ps, g(b(i).table.columns), 1), E("div", ms, [
|
|
2772
2772
|
E("button", {
|
|
2773
2773
|
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",
|
|
2774
2774
|
disabled: a.value <= 1,
|
|
2775
2775
|
onClick: n[1] ||= (e) => f(a.value - 1)
|
|
2776
|
-
}, [N(b(
|
|
2776
|
+
}, [N(b(xt), {
|
|
2777
2777
|
size: 12,
|
|
2778
2778
|
"stroke-width": 2
|
|
2779
|
-
})], 8,
|
|
2780
|
-
E("span",
|
|
2779
|
+
})], 8, hs),
|
|
2780
|
+
E("span", gs, g(a.value), 1),
|
|
2781
2781
|
E("button", {
|
|
2782
2782
|
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)]",
|
|
2783
2783
|
onClick: d
|
|
2784
|
-
}, [N(b(
|
|
2784
|
+
}, [N(b(U), {
|
|
2785
2785
|
size: 12,
|
|
2786
2786
|
"stroke-width": 2
|
|
2787
2787
|
})])
|
|
2788
2788
|
])])])]),
|
|
2789
|
-
E("div",
|
|
2789
|
+
E("div", _s, [E("label", vs, [E("input", {
|
|
2790
2790
|
type: "checkbox",
|
|
2791
2791
|
checked: e.block.hasHeaderRow,
|
|
2792
2792
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2793
2793
|
onChange: n[2] ||= (e) => o("hasHeaderRow", e.target.checked)
|
|
2794
|
-
}, null, 40,
|
|
2795
|
-
e.block.hasHeaderRow ? (s(), v("div",
|
|
2794
|
+
}, null, 40, ys), j(" " + g(b(i).table.hasHeaderRow), 1)])]),
|
|
2795
|
+
e.block.hasHeaderRow ? (s(), v("div", bs, [E("label", { class: T(b(G)) }, g(b(i).table.headerBackgroundColor), 3), N(J, {
|
|
2796
2796
|
"model-value": e.block.headerBackgroundColor ?? "",
|
|
2797
|
-
"seed-color": b(
|
|
2797
|
+
"seed-color": b(Vt),
|
|
2798
2798
|
placeholder: b(i).table.noHeaderBg,
|
|
2799
2799
|
"onUpdate:modelValue": n[3] ||= (e) => o("headerBackgroundColor", e || null)
|
|
2800
2800
|
}, null, 8, [
|
|
@@ -2802,62 +2802,62 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2802
2802
|
"seed-color",
|
|
2803
2803
|
"placeholder"
|
|
2804
2804
|
])])) : y("", !0),
|
|
2805
|
-
E("div",
|
|
2805
|
+
E("div", xs, [E("label", { class: T(b(G)) }, g(b(i).table.borderColor), 3), N(J, {
|
|
2806
2806
|
"model-value": e.block.borderColor,
|
|
2807
2807
|
"onUpdate:modelValue": n[4] ||= (e) => o("borderColor", e)
|
|
2808
2808
|
}, null, 8, ["model-value"])]),
|
|
2809
|
-
E("div",
|
|
2809
|
+
E("div", Ss, [E("label", { class: T(b(G)) }, g(b(i).table.borderWidth), 3), E("div", Cs, [E("input", {
|
|
2810
2810
|
type: "number",
|
|
2811
|
-
class: T(b(
|
|
2811
|
+
class: T(b(q)),
|
|
2812
2812
|
value: e.block.borderWidth,
|
|
2813
2813
|
min: "0",
|
|
2814
2814
|
max: "10",
|
|
2815
2815
|
onInput: n[5] ||= (e) => o("borderWidth", Number(e.target.value))
|
|
2816
|
-
}, null, 42,
|
|
2817
|
-
E("div",
|
|
2816
|
+
}, null, 42, ws), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2817
|
+
E("div", Ts, [E("label", { class: T(b(G)) }, g(b(i).table.cellPadding), 3), E("div", Es, [E("input", {
|
|
2818
2818
|
type: "number",
|
|
2819
|
-
class: T(b(
|
|
2819
|
+
class: T(b(q)),
|
|
2820
2820
|
value: e.block.cellPadding,
|
|
2821
2821
|
min: "0",
|
|
2822
2822
|
max: "30",
|
|
2823
2823
|
onInput: n[6] ||= (e) => o("cellPadding", Number(e.target.value))
|
|
2824
|
-
}, null, 42,
|
|
2825
|
-
E("div",
|
|
2826
|
-
class: T(b(
|
|
2824
|
+
}, null, 42, Ds), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2825
|
+
E("div", Os, [E("label", { class: T(b(G)) }, g(b(i).table.fontFamily), 3), E("select", {
|
|
2826
|
+
class: T(b(W)),
|
|
2827
2827
|
value: e.block.fontFamily || "",
|
|
2828
2828
|
onChange: n[7] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
2829
|
-
}, [E("option",
|
|
2829
|
+
}, [E("option", As, g(b(i).title.inheritFont), 1), (s(!0), v(A, null, l(e.fontFamilies, (e) => (s(), v("option", {
|
|
2830
2830
|
key: e.value,
|
|
2831
2831
|
value: e.value
|
|
2832
|
-
}, g(e.label), 9,
|
|
2833
|
-
E("div",
|
|
2832
|
+
}, g(e.label), 9, js))), 128))], 42, ks)]),
|
|
2833
|
+
E("div", Ms, [E("label", { class: T(b(G)) }, g(b(i).table.fontSize), 3), E("div", Ns, [E("input", {
|
|
2834
2834
|
type: "number",
|
|
2835
|
-
class: T(b(
|
|
2835
|
+
class: T(b(q)),
|
|
2836
2836
|
value: e.block.fontSize,
|
|
2837
2837
|
min: "10",
|
|
2838
2838
|
max: "32",
|
|
2839
2839
|
onInput: n[8] ||= (e) => o("fontSize", Number(e.target.value))
|
|
2840
|
-
}, null, 42,
|
|
2841
|
-
E("div",
|
|
2840
|
+
}, null, 42, Ps), E("span", { class: T(b(K)) }, "px", 2)])]),
|
|
2841
|
+
E("div", Fs, [E("label", { class: T(b(G)) }, g(b(i).table.color), 3), N(J, {
|
|
2842
2842
|
"model-value": e.block.color ?? "",
|
|
2843
2843
|
"onUpdate:modelValue": n[9] ||= (e) => o("color", e || void 0)
|
|
2844
2844
|
}, null, 8, ["model-value"])]),
|
|
2845
|
-
E("div",
|
|
2845
|
+
E("div", Is, [E("label", { class: T(b(G)) }, g(b(i).table.textAlign), 3), N(X, {
|
|
2846
2846
|
options: [
|
|
2847
2847
|
{
|
|
2848
2848
|
value: "left",
|
|
2849
2849
|
label: b(i).title.alignLeft,
|
|
2850
|
-
icon: b(
|
|
2850
|
+
icon: b(At)
|
|
2851
2851
|
},
|
|
2852
2852
|
{
|
|
2853
2853
|
value: "center",
|
|
2854
2854
|
label: b(i).title.alignCenter,
|
|
2855
|
-
icon: b(
|
|
2855
|
+
icon: b(jt)
|
|
2856
2856
|
},
|
|
2857
2857
|
{
|
|
2858
2858
|
value: "right",
|
|
2859
2859
|
label: b(i).title.alignRight,
|
|
2860
|
-
icon: b(
|
|
2860
|
+
icon: b(Dt)
|
|
2861
2861
|
}
|
|
2862
2862
|
],
|
|
2863
2863
|
"model-value": e.block.textAlign,
|
|
@@ -2865,7 +2865,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2865
2865
|
}, null, 8, ["options", "model-value"])])
|
|
2866
2866
|
], 64));
|
|
2867
2867
|
}
|
|
2868
|
-
}),
|
|
2868
|
+
}), Rs = { class: "tpl:mb-3.5" }, zs = ["value"], Bs = { value: 1 }, Vs = { value: 2 }, Hs = { value: 3 }, Us = { value: 4 }, Ws = { class: "tpl:mb-3.5" }, Gs = ["value"], Ks = { value: "" }, qs = ["value"], Js = { class: "tpl:mb-3.5" }, Ys = { class: "tpl:mb-3.5" }, Xs = /* @__PURE__ */ M({
|
|
2869
2869
|
__name: "TitleToolbar",
|
|
2870
2870
|
props: {
|
|
2871
2871
|
block: {},
|
|
@@ -2873,49 +2873,49 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2873
2873
|
},
|
|
2874
2874
|
emits: ["update"],
|
|
2875
2875
|
setup(e, { emit: t }) {
|
|
2876
|
-
let n = t, { t: r } =
|
|
2876
|
+
let n = t, { t: r } = H();
|
|
2877
2877
|
function i(e, t) {
|
|
2878
2878
|
n("update", { [e]: t });
|
|
2879
2879
|
}
|
|
2880
2880
|
return (t, n) => (s(), v(A, null, [
|
|
2881
|
-
E("div",
|
|
2882
|
-
class: T(b(
|
|
2881
|
+
E("div", Rs, [E("label", { class: T(b(G)) }, g(b(r).title.level), 3), E("select", {
|
|
2882
|
+
class: T(b(W)),
|
|
2883
2883
|
value: e.block.level,
|
|
2884
2884
|
onChange: n[0] ||= (e) => i("level", Number(e.target.value))
|
|
2885
2885
|
}, [
|
|
2886
|
-
E("option",
|
|
2887
|
-
E("option",
|
|
2888
|
-
E("option",
|
|
2889
|
-
E("option",
|
|
2890
|
-
], 42,
|
|
2891
|
-
E("div",
|
|
2892
|
-
class: T(b(
|
|
2886
|
+
E("option", Bs, g(b(r).title.heading1), 1),
|
|
2887
|
+
E("option", Vs, g(b(r).title.heading2), 1),
|
|
2888
|
+
E("option", Hs, g(b(r).title.heading3), 1),
|
|
2889
|
+
E("option", Us, g(b(r).title.heading4), 1)
|
|
2890
|
+
], 42, zs)]),
|
|
2891
|
+
E("div", Ws, [E("label", { class: T(b(G)) }, g(b(r).title.fontFamily), 3), E("select", {
|
|
2892
|
+
class: T(b(W)),
|
|
2893
2893
|
value: e.block.fontFamily || "",
|
|
2894
2894
|
onChange: n[1] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
2895
|
-
}, [E("option",
|
|
2895
|
+
}, [E("option", Ks, g(b(r).title.inheritFont), 1), (s(!0), v(A, null, l(e.fontFamilies, (e) => (s(), v("option", {
|
|
2896
2896
|
key: e.value,
|
|
2897
2897
|
value: e.value
|
|
2898
|
-
}, g(e.label), 9,
|
|
2899
|
-
E("div",
|
|
2898
|
+
}, g(e.label), 9, qs))), 128))], 42, Gs)]),
|
|
2899
|
+
E("div", Js, [E("label", { class: T(b(G)) }, g(b(r).title.color), 3), N(J, {
|
|
2900
2900
|
"model-value": e.block.color ?? "",
|
|
2901
2901
|
"onUpdate:modelValue": n[2] ||= (e) => i("color", e || void 0)
|
|
2902
2902
|
}, null, 8, ["model-value"])]),
|
|
2903
|
-
E("div",
|
|
2903
|
+
E("div", Ys, [E("label", { class: T(b(G)) }, g(b(r).title.align), 3), N(X, {
|
|
2904
2904
|
options: [
|
|
2905
2905
|
{
|
|
2906
2906
|
value: "left",
|
|
2907
2907
|
label: b(r).title.alignLeft,
|
|
2908
|
-
icon: b(
|
|
2908
|
+
icon: b(At)
|
|
2909
2909
|
},
|
|
2910
2910
|
{
|
|
2911
2911
|
value: "center",
|
|
2912
2912
|
label: b(r).title.alignCenter,
|
|
2913
|
-
icon: b(
|
|
2913
|
+
icon: b(jt)
|
|
2914
2914
|
},
|
|
2915
2915
|
{
|
|
2916
2916
|
value: "right",
|
|
2917
2917
|
label: b(r).title.alignRight,
|
|
2918
|
-
icon: b(
|
|
2918
|
+
icon: b(Dt)
|
|
2919
2919
|
}
|
|
2920
2920
|
],
|
|
2921
2921
|
"model-value": e.block.textAlign,
|
|
@@ -2923,22 +2923,22 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2923
2923
|
}, null, 8, ["options", "model-value"])])
|
|
2924
2924
|
], 64));
|
|
2925
2925
|
}
|
|
2926
|
-
}),
|
|
2926
|
+
}), Zs = { class: "tpl:mb-3.5" }, Qs = {
|
|
2927
2927
|
key: 0,
|
|
2928
2928
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
2929
|
-
},
|
|
2929
|
+
}, $s = ["checked"], ec = {
|
|
2930
2930
|
key: 0,
|
|
2931
2931
|
class: "tpl:mb-3.5"
|
|
2932
|
-
},
|
|
2932
|
+
}, tc = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, nc = [
|
|
2933
2933
|
"value",
|
|
2934
2934
|
"placeholder",
|
|
2935
2935
|
"title"
|
|
2936
|
-
],
|
|
2936
|
+
], rc = { class: "tpl:mb-3.5" }, ic = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ac = { class: "tpl:mb-3.5" }, oc = { class: "tpl:mb-3.5" }, sc = ["value"], cc = { value: "full" }, lc = { class: "tpl:mb-3.5" }, uc = /* @__PURE__ */ M({
|
|
2937
2937
|
__name: "VideoToolbar",
|
|
2938
2938
|
props: { block: {} },
|
|
2939
2939
|
emits: ["update"],
|
|
2940
2940
|
setup(e, { emit: t }) {
|
|
2941
|
-
let n = e, r = t, { t: i } =
|
|
2941
|
+
let n = e, r = t, { t: i } = H(), a = u(Ze, null), o = u(ct, I.liquid), c = B(), l = _(() => !!a), d = _(() => ut(n.block.url, o)), f = p(!1), { start: m } = Ve(() => {
|
|
2942
2942
|
f.value = !1;
|
|
2943
2943
|
}, 1e3, { immediate: !1 });
|
|
2944
2944
|
function h(e, t) {
|
|
@@ -2949,32 +2949,32 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2949
2949
|
c.alive && e && (h("thumbnailUrl", e.url), f.value = !0, m());
|
|
2950
2950
|
}
|
|
2951
2951
|
return (t, n) => (s(), v(A, null, [
|
|
2952
|
-
E("div",
|
|
2953
|
-
E("label", { class: T(b(
|
|
2954
|
-
N(
|
|
2952
|
+
E("div", Zs, [
|
|
2953
|
+
E("label", { class: T(b(G)) }, g(b(i).video.videoUrl), 3),
|
|
2954
|
+
N(Z, {
|
|
2955
2955
|
"model-value": e.block.url,
|
|
2956
2956
|
type: "url",
|
|
2957
2957
|
placeholder: b(i).video.videoUrlPlaceholder,
|
|
2958
2958
|
"onUpdate:modelValue": n[0] ||= (e) => h("url", e)
|
|
2959
2959
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2960
|
-
e.block.url ? (s(), v("label",
|
|
2960
|
+
e.block.url ? (s(), v("label", Qs, [E("input", {
|
|
2961
2961
|
type: "checkbox",
|
|
2962
2962
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2963
2963
|
checked: e.block.openInNewTab ?? !1,
|
|
2964
2964
|
onChange: n[1] ||= (e) => h("openInNewTab", e.target.checked)
|
|
2965
|
-
}, null, 40,
|
|
2965
|
+
}, null, 40, $s), j(" " + g(b(i).video.openInNewTab), 1)])) : y("", !0)
|
|
2966
2966
|
]),
|
|
2967
|
-
d.value ? (s(), v("div",
|
|
2967
|
+
d.value ? (s(), v("div", ec, [E("label", { class: T(b(G)) }, [j(g(b(i).video.placeholderUrl) + " ", 1), E("span", tc, g(b(i).video.optional), 1)], 2), E("input", {
|
|
2968
2968
|
type: "url",
|
|
2969
|
-
class: T(b(
|
|
2969
|
+
class: T(b(W)),
|
|
2970
2970
|
value: e.block.placeholderUrl || "",
|
|
2971
2971
|
placeholder: b(i).video.placeholderUrlPlaceholder,
|
|
2972
2972
|
title: b(i).video.placeholderUrlTooltip,
|
|
2973
2973
|
onInput: n[2] ||= (e) => h("placeholderUrl", e.target.value)
|
|
2974
|
-
}, null, 42,
|
|
2975
|
-
E("div",
|
|
2976
|
-
E("label", { class: T(b(
|
|
2977
|
-
N(
|
|
2974
|
+
}, null, 42, nc)])) : y("", !0),
|
|
2975
|
+
E("div", rc, [
|
|
2976
|
+
E("label", { class: T(b(G)) }, [j(g(b(i).video.customThumbnail) + " ", 1), E("span", ic, g(b(i).video.optional), 1)], 2),
|
|
2977
|
+
N(Z, {
|
|
2978
2978
|
"model-value": e.block.thumbnailUrl,
|
|
2979
2979
|
type: "url",
|
|
2980
2980
|
placeholder: b(i).video.thumbnailPlaceholder,
|
|
@@ -2994,28 +2994,28 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
2994
2994
|
"background-color": "var(--tpl-bg)"
|
|
2995
2995
|
},
|
|
2996
2996
|
onClick: x
|
|
2997
|
-
}, [N(b(
|
|
2997
|
+
}, [N(b(L), {
|
|
2998
2998
|
size: 14,
|
|
2999
2999
|
"stroke-width": 1.5
|
|
3000
3000
|
}), j(" " + g(b(i).image.browseMedia), 1)])) : y("", !0)
|
|
3001
3001
|
]),
|
|
3002
|
-
E("div",
|
|
3002
|
+
E("div", ac, [E("label", { class: T(b(G)) }, g(b(i).video.altText), 3), N(Z, {
|
|
3003
3003
|
"model-value": e.block.alt,
|
|
3004
3004
|
type: "text",
|
|
3005
3005
|
placeholder: b(i).video.altTextPlaceholder,
|
|
3006
3006
|
"onUpdate:modelValue": n[4] ||= (e) => h("alt", e)
|
|
3007
3007
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
3008
|
-
E("div",
|
|
3009
|
-
class: T(b(
|
|
3008
|
+
E("div", oc, [E("label", { class: T(b(G)) }, g(b(i).video.width), 3), E("select", {
|
|
3009
|
+
class: T(b(W)),
|
|
3010
3010
|
value: e.block.width,
|
|
3011
3011
|
onChange: n[5] ||= (e) => h("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
3012
3012
|
}, [
|
|
3013
|
-
E("option",
|
|
3013
|
+
E("option", cc, g(b(i).video.fullWidth), 1),
|
|
3014
3014
|
n[7] ||= E("option", { value: "300" }, "300px", -1),
|
|
3015
3015
|
n[8] ||= E("option", { value: "400" }, "400px", -1),
|
|
3016
3016
|
n[9] ||= E("option", { value: "500" }, "500px", -1)
|
|
3017
|
-
], 42,
|
|
3018
|
-
E("div",
|
|
3017
|
+
], 42, sc)]),
|
|
3018
|
+
E("div", lc, [E("label", { class: T(b(G)) }, g(b(i).title.align), 3), N(X, {
|
|
3019
3019
|
options: [
|
|
3020
3020
|
{
|
|
3021
3021
|
value: "left",
|
|
@@ -3035,7 +3035,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3035
3035
|
}, null, 8, ["options", "model-value"])])
|
|
3036
3036
|
], 64));
|
|
3037
3037
|
}
|
|
3038
|
-
}),
|
|
3038
|
+
}), dc = ["aria-label"], fc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, pc = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, mc = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, hc = { class: "tpl:flex tpl:gap-1" }, gc = ["title"], _c = ["title"], vc = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, yc = /*#__PURE__*/ et(/* @__PURE__ */ M({
|
|
3039
3039
|
__name: "Toolbar",
|
|
3040
3040
|
props: { block: {} },
|
|
3041
3041
|
emits: [
|
|
@@ -3044,87 +3044,87 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3044
3044
|
"duplicate"
|
|
3045
3045
|
],
|
|
3046
3046
|
setup(e, { emit: t }) {
|
|
3047
|
-
let n = m(() => import("./CountdownToolbar-
|
|
3047
|
+
let n = m(() => import("./CountdownToolbar-DYvATR0J.js")), r = e, i = t, { t: a } = H(), c = lt(Ee, "Toolbar"), l = u(ue, []), d = _(() => r.block.type), f = _(() => pe(r.block)), p = _(() => {
|
|
3048
3048
|
if (f.value) return l.find((e) => e.type === r.block.customType);
|
|
3049
|
-
}), h = _(() => f.value ? p.value?.name ?? r.block.customType :
|
|
3049
|
+
}), h = _(() => f.value ? p.value?.name ?? r.block.customType : me(d.value, a)), x = c.fonts;
|
|
3050
3050
|
function C(e) {
|
|
3051
3051
|
i("update", e);
|
|
3052
3052
|
}
|
|
3053
3053
|
return (t, r) => (s(), v("aside", {
|
|
3054
3054
|
"aria-label": b(a).landmarks.blockToolbar,
|
|
3055
3055
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
3056
|
-
}, [E("div",
|
|
3056
|
+
}, [E("div", fc, [E("div", pc, [b(Rt)[d.value] ? (s(), S(o(b(Rt)[d.value]), {
|
|
3057
3057
|
key: 0,
|
|
3058
3058
|
size: 16,
|
|
3059
3059
|
"stroke-width": 1.5
|
|
3060
|
-
})) : f.value ? (s(), S(b(
|
|
3060
|
+
})) : f.value ? (s(), S(b(Se), {
|
|
3061
3061
|
key: 1,
|
|
3062
3062
|
size: 16,
|
|
3063
3063
|
"stroke-width": 1.5
|
|
3064
|
-
})) : y("", !0), E("h3",
|
|
3064
|
+
})) : y("", !0), E("h3", mc, g(h.value), 1)]), E("div", hc, [E("button", {
|
|
3065
3065
|
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)]",
|
|
3066
3066
|
title: b(a).toolbar.duplicate,
|
|
3067
3067
|
onClick: r[0] ||= (e) => i("duplicate")
|
|
3068
|
-
}, [N(b(
|
|
3068
|
+
}, [N(b(z), {
|
|
3069
3069
|
size: 14,
|
|
3070
3070
|
"stroke-width": 2
|
|
3071
|
-
})], 8,
|
|
3071
|
+
})], 8, gc), E("button", {
|
|
3072
3072
|
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)]",
|
|
3073
3073
|
title: b(a).toolbar.delete,
|
|
3074
3074
|
onClick: r[1] ||= (e) => i("delete")
|
|
3075
|
-
}, [N(b(
|
|
3075
|
+
}, [N(b(We), {
|
|
3076
3076
|
size: 14,
|
|
3077
3077
|
"stroke-width": 2
|
|
3078
|
-
})], 8,
|
|
3078
|
+
})], 8, _c)])]), E("div", vc, [f.value ? (s(), S(Aa, {
|
|
3079
3079
|
key: 0,
|
|
3080
3080
|
block: e.block,
|
|
3081
3081
|
onUpdateFieldValues: r[2] ||= (e) => i("update", { fieldValues: e }),
|
|
3082
3082
|
onUpdateDataSourceFetched: r[3] ||= (e) => i("update", { dataSourceFetched: e })
|
|
3083
|
-
}, null, 8, ["block"])) : d.value === "section" ? (s(), S(
|
|
3083
|
+
}, null, 8, ["block"])) : d.value === "section" ? (s(), S(Po, {
|
|
3084
3084
|
key: 1,
|
|
3085
3085
|
block: e.block,
|
|
3086
3086
|
onUpdate: C
|
|
3087
|
-
}, null, 8, ["block"])) : d.value === "title" ? (s(), S(
|
|
3087
|
+
}, null, 8, ["block"])) : d.value === "title" ? (s(), S(Xs, {
|
|
3088
3088
|
key: 2,
|
|
3089
3089
|
block: e.block,
|
|
3090
3090
|
"font-families": b(x),
|
|
3091
3091
|
onUpdate: C
|
|
3092
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (s(), v(A, { key: 3 }, [], 64)) : d.value === "image" ? (s(), S(
|
|
3092
|
+
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (s(), v(A, { key: 3 }, [], 64)) : d.value === "image" ? (s(), S(oo, {
|
|
3093
3093
|
key: 4,
|
|
3094
3094
|
block: e.block,
|
|
3095
3095
|
onUpdate: C
|
|
3096
|
-
}, null, 8, ["block"])) : d.value === "video" ? (s(), S(
|
|
3096
|
+
}, null, 8, ["block"])) : d.value === "video" ? (s(), S(uc, {
|
|
3097
3097
|
key: 5,
|
|
3098
3098
|
block: e.block,
|
|
3099
3099
|
onUpdate: C
|
|
3100
|
-
}, null, 8, ["block"])) : d.value === "button" ? (s(), S(
|
|
3100
|
+
}, null, 8, ["block"])) : d.value === "button" ? (s(), S(ti, {
|
|
3101
3101
|
key: 6,
|
|
3102
3102
|
block: e.block,
|
|
3103
3103
|
"font-families": b(x),
|
|
3104
3104
|
onUpdate: C
|
|
3105
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (s(), S(
|
|
3105
|
+
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (s(), S(Ia, {
|
|
3106
3106
|
key: 7,
|
|
3107
3107
|
block: e.block,
|
|
3108
3108
|
onUpdate: C
|
|
3109
|
-
}, null, 8, ["block"])) : d.value === "social" ? (s(), S(
|
|
3109
|
+
}, null, 8, ["block"])) : d.value === "social" ? (s(), S($o, {
|
|
3110
3110
|
key: 8,
|
|
3111
3111
|
block: e.block,
|
|
3112
3112
|
onUpdate: C
|
|
3113
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (s(), S(
|
|
3113
|
+
}, null, 8, ["block"])) : d.value === "menu" ? (s(), S(yo, {
|
|
3114
3114
|
key: 9,
|
|
3115
3115
|
block: e.block,
|
|
3116
3116
|
"font-families": b(x),
|
|
3117
3117
|
onUpdate: C
|
|
3118
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (s(), S(
|
|
3118
|
+
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (s(), S(Ls, {
|
|
3119
3119
|
key: 10,
|
|
3120
3120
|
block: e.block,
|
|
3121
3121
|
"font-families": b(x),
|
|
3122
3122
|
onUpdate: C
|
|
3123
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (s(), S(
|
|
3123
|
+
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (s(), S(is, {
|
|
3124
3124
|
key: 11,
|
|
3125
3125
|
block: e.block,
|
|
3126
3126
|
onUpdate: C
|
|
3127
|
-
}, null, 8, ["block"])) : d.value === "html" ? (s(), S(
|
|
3127
|
+
}, null, 8, ["block"])) : d.value === "html" ? (s(), S(Ba, {
|
|
3128
3128
|
key: 12,
|
|
3129
3129
|
block: e.block,
|
|
3130
3130
|
onUpdate: C
|
|
@@ -3133,52 +3133,52 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3133
3133
|
block: e.block,
|
|
3134
3134
|
"font-families": b(x),
|
|
3135
3135
|
onUpdate: C
|
|
3136
|
-
}, null, 8, ["block", "font-families"])) : y("", !0), N(
|
|
3136
|
+
}, null, 8, ["block", "font-families"])) : y("", !0), N(Gi, {
|
|
3137
3137
|
block: e.block,
|
|
3138
3138
|
"is-first-section": d.value === "paragraph",
|
|
3139
3139
|
onUpdate: C
|
|
3140
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
3140
|
+
}, null, 8, ["block", "is-first-section"])])], 8, dc));
|
|
3141
3141
|
}
|
|
3142
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
3142
|
+
}), [["__scopeId", "data-v-2ac88283"]]), bc = ["aria-label"], xc = {
|
|
3143
3143
|
role: "tablist",
|
|
3144
3144
|
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"
|
|
3145
|
-
},
|
|
3145
|
+
}, Sc = [
|
|
3146
3146
|
"aria-selected",
|
|
3147
3147
|
"aria-label",
|
|
3148
3148
|
"title"
|
|
3149
|
-
],
|
|
3149
|
+
], Cc = { key: 0 }, wc = [
|
|
3150
3150
|
"aria-selected",
|
|
3151
3151
|
"aria-label",
|
|
3152
3152
|
"title"
|
|
3153
|
-
],
|
|
3153
|
+
], Tc = { key: 0 }, Ec = [
|
|
3154
3154
|
"aria-selected",
|
|
3155
3155
|
"aria-label",
|
|
3156
3156
|
"title"
|
|
3157
|
-
],
|
|
3157
|
+
], Dc = { key: 0 }, Oc = {
|
|
3158
3158
|
key: 1,
|
|
3159
3159
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
3160
|
-
},
|
|
3160
|
+
}, kc = {
|
|
3161
3161
|
key: 0,
|
|
3162
3162
|
id: "tpl-tabpanel-content",
|
|
3163
3163
|
role: "tabpanel",
|
|
3164
3164
|
"aria-labelledby": "tpl-tab-content",
|
|
3165
3165
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3166
|
-
},
|
|
3166
|
+
}, Ac = {
|
|
3167
3167
|
key: 1,
|
|
3168
3168
|
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)]"
|
|
3169
|
-
},
|
|
3169
|
+
}, jc = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, Mc = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Nc = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, Pc = {
|
|
3170
3170
|
key: 1,
|
|
3171
3171
|
id: "tpl-tabpanel-settings",
|
|
3172
3172
|
role: "tabpanel",
|
|
3173
3173
|
"aria-labelledby": "tpl-tab-settings",
|
|
3174
3174
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3175
|
-
},
|
|
3175
|
+
}, Fc = {
|
|
3176
3176
|
key: 2,
|
|
3177
3177
|
id: "tpl-tabpanel-issues",
|
|
3178
3178
|
role: "tabpanel",
|
|
3179
3179
|
"aria-labelledby": "tpl-tab-issues",
|
|
3180
3180
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3181
|
-
},
|
|
3181
|
+
}, Ic = /* @__PURE__ */ M({
|
|
3182
3182
|
__name: "RightSidebar",
|
|
3183
3183
|
props: {
|
|
3184
3184
|
selectedBlock: {},
|
|
@@ -3192,7 +3192,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3192
3192
|
"update-settings"
|
|
3193
3193
|
],
|
|
3194
3194
|
setup(e, { emit: t }) {
|
|
3195
|
-
let n = m(() => import("./IssuesPanel-
|
|
3195
|
+
let n = m(() => import("./IssuesPanel-BhHU-hq3.js")), r = e, i = t, { t: a } = H(), o = p("content"), c = u($e, null), l = _(() => c !== null), d = _(() => c?.issues.value.length ?? 0);
|
|
3196
3196
|
function f(e) {
|
|
3197
3197
|
return o.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)]";
|
|
3198
3198
|
}
|
|
@@ -3208,7 +3208,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3208
3208
|
"aria-label": b(a).landmarks.rightSidebar,
|
|
3209
3209
|
class: T(["tpl-right-sidebar tpl:absolute tpl:top-14 tpl:bottom-0 tpl:z-40 tpl:flex tpl:w-[320px] tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)] tpl:transition-all tpl:duration-200 tpl:border-l tpl:border-[var(--tpl-border)]", e.shiftedLeft ? "tpl:right-[360px]" : "tpl:right-0"])
|
|
3210
3210
|
}, [
|
|
3211
|
-
E("div",
|
|
3211
|
+
E("div", xc, [
|
|
3212
3212
|
E("button", {
|
|
3213
3213
|
id: "tpl-tab-content",
|
|
3214
3214
|
role: "tab",
|
|
@@ -3219,10 +3219,10 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3219
3219
|
class: T(["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)]", f("content")]),
|
|
3220
3220
|
style: O(h("content")),
|
|
3221
3221
|
onClick: r[0] ||= (e) => o.value = "content"
|
|
3222
|
-
}, [N(b(
|
|
3222
|
+
}, [N(b(bt), {
|
|
3223
3223
|
size: 14,
|
|
3224
3224
|
"stroke-width": 2
|
|
3225
|
-
}), o.value === "content" ? (s(), v("span",
|
|
3225
|
+
}), o.value === "content" ? (s(), v("span", Cc, g(b(a).sidebar.content), 1)) : y("", !0)], 14, Sc),
|
|
3226
3226
|
E("button", {
|
|
3227
3227
|
id: "tpl-tab-settings",
|
|
3228
3228
|
role: "tab",
|
|
@@ -3233,10 +3233,10 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3233
3233
|
class: T(["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)]", f("settings")]),
|
|
3234
3234
|
style: O(h("settings")),
|
|
3235
3235
|
onClick: r[1] ||= (e) => o.value = "settings"
|
|
3236
|
-
}, [N(b(
|
|
3236
|
+
}, [N(b(Nt), {
|
|
3237
3237
|
size: 14,
|
|
3238
3238
|
"stroke-width": 1.5
|
|
3239
|
-
}), o.value === "settings" ? (s(), v("span",
|
|
3239
|
+
}), o.value === "settings" ? (s(), v("span", Tc, g(b(a).sidebar.settings), 1)) : y("", !0)], 14, wc),
|
|
3240
3240
|
l.value ? (s(), v("button", {
|
|
3241
3241
|
key: 0,
|
|
3242
3242
|
id: "tpl-tab-issues",
|
|
@@ -3249,64 +3249,64 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3249
3249
|
style: O(h("issues")),
|
|
3250
3250
|
onClick: r[2] ||= (e) => o.value = "issues"
|
|
3251
3251
|
}, [
|
|
3252
|
-
N(b(
|
|
3252
|
+
N(b(Ft), {
|
|
3253
3253
|
size: 14,
|
|
3254
3254
|
"stroke-width": 1.5
|
|
3255
3255
|
}),
|
|
3256
|
-
o.value === "issues" ? (s(), v("span",
|
|
3257
|
-
d.value > 0 ? (s(), v("span",
|
|
3258
|
-
], 14,
|
|
3256
|
+
o.value === "issues" ? (s(), v("span", Dc, g(b(a).issues.panelTabLabel), 1)) : y("", !0),
|
|
3257
|
+
d.value > 0 ? (s(), v("span", Oc, g(d.value), 1)) : y("", !0)
|
|
3258
|
+
], 14, Ec)) : y("", !0)
|
|
3259
3259
|
]),
|
|
3260
|
-
o.value === "content" ? (s(), v("div",
|
|
3260
|
+
o.value === "content" ? (s(), v("div", kc, [e.selectedBlock ? (s(), S(yc, {
|
|
3261
3261
|
key: 0,
|
|
3262
3262
|
block: e.selectedBlock,
|
|
3263
3263
|
onUpdate: r[3] ||= (e) => i("update-block", e),
|
|
3264
3264
|
onDelete: r[4] ||= (e) => i("delete-block"),
|
|
3265
3265
|
onDuplicate: r[5] ||= (e) => i("duplicate-block")
|
|
3266
|
-
}, null, 8, ["block"])) : (s(), v("div",
|
|
3267
|
-
E("div",
|
|
3266
|
+
}, null, 8, ["block"])) : (s(), v("div", Ac, [
|
|
3267
|
+
E("div", jc, [N(b(St), {
|
|
3268
3268
|
size: 40,
|
|
3269
3269
|
"stroke-width": 1.5
|
|
3270
3270
|
})]),
|
|
3271
|
-
E("h3",
|
|
3272
|
-
E("p",
|
|
3271
|
+
E("h3", Mc, g(b(a).sidebar.noSelection), 1),
|
|
3272
|
+
E("p", Nc, g(b(a).sidebar.noSelectionHint), 1)
|
|
3273
3273
|
]))])) : y("", !0),
|
|
3274
|
-
o.value === "settings" ? (s(), v("div",
|
|
3274
|
+
o.value === "settings" ? (s(), v("div", Pc, [N(Cr, {
|
|
3275
3275
|
settings: e.settings,
|
|
3276
3276
|
onUpdate: r[6] ||= (e) => i("update-settings", e)
|
|
3277
3277
|
}, null, 8, ["settings"])])) : y("", !0),
|
|
3278
|
-
o.value === "issues" && l.value ? (s(), v("div",
|
|
3279
|
-
], 10,
|
|
3278
|
+
o.value === "issues" && l.value ? (s(), v("div", Fc, [N(b(n))])) : y("", !0)
|
|
3279
|
+
], 10, bc));
|
|
3280
3280
|
}
|
|
3281
|
-
}),
|
|
3281
|
+
}), Lc = {
|
|
3282
3282
|
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)]",
|
|
3283
3283
|
style: { "z-index": "10001" },
|
|
3284
3284
|
role: "status",
|
|
3285
3285
|
"data-testid": "small-screen-notice"
|
|
3286
|
-
},
|
|
3286
|
+
}, Rc = { class: "tpl:text-[var(--tpl-text-dim)]" }, zc = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Bc = { class: "tpl:m-0 tpl:max-w-sm tpl:text-sm tpl:leading-normal" }, Vc = /* @__PURE__ */ M({
|
|
3287
3287
|
__name: "SmallScreenNotice",
|
|
3288
3288
|
setup(e) {
|
|
3289
|
-
let { t } =
|
|
3290
|
-
return (e, n) => (s(), v("div",
|
|
3291
|
-
E("div",
|
|
3289
|
+
let { t } = H();
|
|
3290
|
+
return (e, n) => (s(), v("div", Lc, [
|
|
3291
|
+
E("div", Rc, [N(b(yt), {
|
|
3292
3292
|
size: 48,
|
|
3293
3293
|
"stroke-width": 1.5
|
|
3294
3294
|
})]),
|
|
3295
|
-
E("h2",
|
|
3296
|
-
E("p",
|
|
3295
|
+
E("h2", zc, g(b(t).smallScreen.title), 1),
|
|
3296
|
+
E("p", Bc, g(b(t).smallScreen.message), 1)
|
|
3297
3297
|
]));
|
|
3298
3298
|
}
|
|
3299
|
-
}),
|
|
3299
|
+
}), Hc = ["aria-label"], Uc = [
|
|
3300
3300
|
"aria-checked",
|
|
3301
3301
|
"aria-label",
|
|
3302
3302
|
"title",
|
|
3303
3303
|
"onClick"
|
|
3304
|
-
],
|
|
3304
|
+
], Wc = /* @__PURE__ */ M({
|
|
3305
3305
|
__name: "ViewportToggle",
|
|
3306
3306
|
props: { viewport: {} },
|
|
3307
3307
|
emits: ["change"],
|
|
3308
3308
|
setup(e, { emit: t }) {
|
|
3309
|
-
let n = e, r = t, { t: i } =
|
|
3309
|
+
let n = e, r = t, { t: i } = H(), a = _(() => [{
|
|
3310
3310
|
value: "desktop",
|
|
3311
3311
|
label: i.viewport.desktop
|
|
3312
3312
|
}, {
|
|
@@ -3343,26 +3343,26 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3343
3343
|
}),
|
|
3344
3344
|
title: t.label,
|
|
3345
3345
|
onClick: (e) => r("change", t.value)
|
|
3346
|
-
}, [t.value === "desktop" ? (s(), S(b(
|
|
3346
|
+
}, [t.value === "desktop" ? (s(), S(b(yt), {
|
|
3347
3347
|
key: 0,
|
|
3348
3348
|
size: 18,
|
|
3349
3349
|
"stroke-width": 1.5
|
|
3350
|
-
})) : (s(), S(b(
|
|
3350
|
+
})) : (s(), S(b(Tt), {
|
|
3351
3351
|
key: 1,
|
|
3352
3352
|
size: 18,
|
|
3353
3353
|
"stroke-width": 1.5
|
|
3354
|
-
})), E("span", null, g(t.label), 1)], 12,
|
|
3354
|
+
})), E("span", null, g(t.label), 1)], 12, Uc))), 128))], 12, Hc));
|
|
3355
3355
|
}
|
|
3356
|
-
}),
|
|
3356
|
+
}), Gc = [
|
|
3357
3357
|
"aria-label",
|
|
3358
3358
|
"title",
|
|
3359
3359
|
"aria-pressed"
|
|
3360
|
-
],
|
|
3360
|
+
], Kc = /*#__PURE__*/ et(/* @__PURE__ */ M({
|
|
3361
3361
|
__name: "PreviewToggle",
|
|
3362
3362
|
props: { previewMode: { type: Boolean } },
|
|
3363
3363
|
emits: ["change"],
|
|
3364
3364
|
setup(e, { emit: t }) {
|
|
3365
|
-
let n = t, { t: r } =
|
|
3365
|
+
let n = t, { t: r } = H();
|
|
3366
3366
|
return (t, i) => (s(), v("button", {
|
|
3367
3367
|
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",
|
|
3368
3368
|
style: O({
|
|
@@ -3380,28 +3380,28 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3380
3380
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3381
3381
|
mode: "out-in"
|
|
3382
3382
|
}, {
|
|
3383
|
-
default: d(() => [e.previewMode ? (s(), S(b(
|
|
3383
|
+
default: d(() => [e.previewMode ? (s(), S(b(Ae), {
|
|
3384
3384
|
key: "eye",
|
|
3385
3385
|
size: 18,
|
|
3386
3386
|
"stroke-width": 1.5
|
|
3387
|
-
})) : (s(), S(b(
|
|
3387
|
+
})) : (s(), S(b(re), {
|
|
3388
3388
|
key: "eye-off",
|
|
3389
3389
|
size: 18,
|
|
3390
3390
|
"stroke-width": 1.5
|
|
3391
3391
|
}))]),
|
|
3392
3392
|
_: 1
|
|
3393
|
-
})], 12,
|
|
3393
|
+
})], 12, Gc));
|
|
3394
3394
|
}
|
|
3395
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3395
|
+
}), [["__scopeId", "data-v-af87d02a"]]), qc = [
|
|
3396
3396
|
"aria-label",
|
|
3397
3397
|
"title",
|
|
3398
3398
|
"aria-pressed"
|
|
3399
|
-
],
|
|
3399
|
+
], Jc = /*#__PURE__*/ et(/* @__PURE__ */ M({
|
|
3400
3400
|
__name: "DarkModeToggle",
|
|
3401
3401
|
props: { darkMode: { type: Boolean } },
|
|
3402
3402
|
emits: ["change"],
|
|
3403
3403
|
setup(e, { emit: t }) {
|
|
3404
|
-
let n = t, { t: r } =
|
|
3404
|
+
let n = t, { t: r } = H();
|
|
3405
3405
|
return (t, i) => (s(), v("button", {
|
|
3406
3406
|
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",
|
|
3407
3407
|
style: O({
|
|
@@ -3419,37 +3419,37 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3419
3419
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3420
3420
|
mode: "out-in"
|
|
3421
3421
|
}, {
|
|
3422
|
-
default: d(() => [e.darkMode ? (s(), S(b(
|
|
3422
|
+
default: d(() => [e.darkMode ? (s(), S(b(vt), {
|
|
3423
3423
|
key: "moon",
|
|
3424
3424
|
size: 18,
|
|
3425
3425
|
"stroke-width": 1.5
|
|
3426
|
-
})) : (s(), S(b(
|
|
3426
|
+
})) : (s(), S(b(Mt), {
|
|
3427
3427
|
key: "sun",
|
|
3428
3428
|
size: 18,
|
|
3429
3429
|
"stroke-width": 1.5
|
|
3430
3430
|
}))]),
|
|
3431
3431
|
_: 1
|
|
3432
|
-
})], 12,
|
|
3432
|
+
})], 12, qc));
|
|
3433
3433
|
}
|
|
3434
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3434
|
+
}), [["__scopeId", "data-v-f8694f76"]]), Yc = {
|
|
3435
3435
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3436
3436
|
style: {
|
|
3437
3437
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3438
3438
|
"backdrop-filter": "blur(8px)",
|
|
3439
3439
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3440
3440
|
}
|
|
3441
|
-
},
|
|
3441
|
+
}, Xc = {
|
|
3442
3442
|
href: "https://github.com/templatical/sdk",
|
|
3443
3443
|
target: "_blank",
|
|
3444
3444
|
rel: "noopener noreferrer",
|
|
3445
3445
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3446
3446
|
style: { "text-decoration": "none" }
|
|
3447
|
-
},
|
|
3447
|
+
}, Zc = /* @__PURE__ */ M({
|
|
3448
3448
|
__name: "EditorFooter",
|
|
3449
3449
|
props: { positionClass: {} },
|
|
3450
3450
|
setup(e) {
|
|
3451
|
-
let { t } =
|
|
3452
|
-
return (n, r) => (s(), v("footer", { class: T(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [E("div",
|
|
3451
|
+
let { t } = H();
|
|
3452
|
+
return (n, r) => (s(), v("footer", { class: T(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [E("div", Yc, [
|
|
3453
3453
|
E("span", null, g(b(t).footer.poweredBy), 1),
|
|
3454
3454
|
r[0] ||= E("a", {
|
|
3455
3455
|
href: "https://templatical.com",
|
|
@@ -3464,32 +3464,32 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3464
3464
|
alt: ""
|
|
3465
3465
|
}), j(" Templatical ")], -1),
|
|
3466
3466
|
r[1] ||= E("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3467
|
-
E("a",
|
|
3467
|
+
E("a", Xc, g(b(t).footer.openSource), 1)
|
|
3468
3468
|
])], 2));
|
|
3469
3469
|
}
|
|
3470
|
-
}),
|
|
3470
|
+
}), Qc = ["aria-labelledby", "data-tpl-theme"], $c = { 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" }, el = ["id"], tl = ["aria-label"], nl = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, rl = [
|
|
3471
3471
|
"id",
|
|
3472
3472
|
"placeholder",
|
|
3473
3473
|
"aria-label",
|
|
3474
3474
|
"aria-activedescendant"
|
|
3475
|
-
],
|
|
3475
|
+
], il = {
|
|
3476
3476
|
key: 0,
|
|
3477
3477
|
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",
|
|
3478
3478
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3479
|
-
},
|
|
3479
|
+
}, al = ["data-group-name", "onClick"], ol = ["aria-label"], sl = {
|
|
3480
3480
|
key: 0,
|
|
3481
3481
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3482
3482
|
"data-testid": "merge-tag-picker-empty"
|
|
3483
|
-
},
|
|
3483
|
+
}, cl = {
|
|
3484
3484
|
key: 1,
|
|
3485
3485
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3486
3486
|
"data-testid": "merge-tag-picker-empty"
|
|
3487
|
-
},
|
|
3487
|
+
}, ll = [
|
|
3488
3488
|
"aria-expanded",
|
|
3489
3489
|
"data-group-name",
|
|
3490
3490
|
"data-group-collapsed",
|
|
3491
3491
|
"onClick"
|
|
3492
|
-
],
|
|
3492
|
+
], ul = { class: "tpl:ml-1 tpl:font-normal" }, dl = [
|
|
3493
3493
|
"id",
|
|
3494
3494
|
"aria-selected",
|
|
3495
3495
|
"data-selected",
|
|
@@ -3498,28 +3498,28 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3498
3498
|
"title",
|
|
3499
3499
|
"onMousemove",
|
|
3500
3500
|
"onClick"
|
|
3501
|
-
],
|
|
3501
|
+
], fl = { class: "tpl:text-sm tpl:font-medium" }, pl = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, ml = {
|
|
3502
3502
|
key: 0,
|
|
3503
3503
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3504
|
-
},
|
|
3504
|
+
}, $ = "tpl-merge-tag-picker-list", hl = /* @__PURE__ */ M({
|
|
3505
3505
|
__name: "MergeTagPickerModal",
|
|
3506
3506
|
setup(e) {
|
|
3507
|
-
let t =
|
|
3508
|
-
function
|
|
3507
|
+
let t = lt(Ge, "MergeTagPickerModal"), { t: n, format: i } = H(), a = u(ot, null), o = u(Ye, null), f = p(""), m = ze(f, 200), C = p(null), D = _(() => m.value.trim().length > 0), k = p(0), j = _(() => t.tags.value.some((e) => !!e.group)), M = p(/* @__PURE__ */ new Set());
|
|
3508
|
+
function F(e) {
|
|
3509
3509
|
return M.value.has(e);
|
|
3510
3510
|
}
|
|
3511
|
-
function
|
|
3511
|
+
function ee(e) {
|
|
3512
3512
|
let t = new Set(M.value);
|
|
3513
3513
|
t.has(e) ? t.delete(e) : t.add(e), M.value = t, k.value = 0;
|
|
3514
3514
|
}
|
|
3515
|
-
let
|
|
3515
|
+
let te = _(() => {
|
|
3516
3516
|
let e = m.value.trim().toLowerCase();
|
|
3517
3517
|
return e ? t.tags.value.filter((t) => [
|
|
3518
3518
|
t.label,
|
|
3519
3519
|
t.value,
|
|
3520
3520
|
t.description ?? ""
|
|
3521
3521
|
].join(" ").toLowerCase().includes(e)) : t.tags.value;
|
|
3522
|
-
}),
|
|
3522
|
+
}), ne = _(() => {
|
|
3523
3523
|
if (!j.value) return [];
|
|
3524
3524
|
let e = n.mergeTag.picker.otherGroup, r = /* @__PURE__ */ new Set(), i = [];
|
|
3525
3525
|
for (let n of t.tags.value) {
|
|
@@ -3527,8 +3527,8 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3527
3527
|
r.has(t) || (r.add(t), i.push(t));
|
|
3528
3528
|
}
|
|
3529
3529
|
return i;
|
|
3530
|
-
}),
|
|
3531
|
-
let e =
|
|
3530
|
+
}), I = _(() => {
|
|
3531
|
+
let e = te.value;
|
|
3532
3532
|
if (!j.value || D.value) return e.map((e, t) => ({
|
|
3533
3533
|
kind: "tag",
|
|
3534
3534
|
tag: e,
|
|
@@ -3553,32 +3553,32 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3553
3553
|
}), o++;
|
|
3554
3554
|
}
|
|
3555
3555
|
return a;
|
|
3556
|
-
}),
|
|
3556
|
+
}), L = _(() => I.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3557
3557
|
P(() => t.isOpen.value, (e) => {
|
|
3558
3558
|
e && (f.value = "", k.value = 0, M.value = /* @__PURE__ */ new Set(), c(() => {
|
|
3559
3559
|
C.value?.focus();
|
|
3560
3560
|
}));
|
|
3561
|
-
}), P(
|
|
3561
|
+
}), P(L, (e) => {
|
|
3562
3562
|
k.value >= e.length && (k.value = Math.max(0, e.length - 1));
|
|
3563
3563
|
});
|
|
3564
|
-
function
|
|
3564
|
+
function R(e) {
|
|
3565
3565
|
t.resolve(e);
|
|
3566
3566
|
}
|
|
3567
|
-
function
|
|
3567
|
+
function z() {
|
|
3568
3568
|
t.resolve(null);
|
|
3569
3569
|
}
|
|
3570
3570
|
function re(e) {
|
|
3571
|
-
if (
|
|
3571
|
+
if (L.value.length === 0) return;
|
|
3572
3572
|
let t = k.value + e;
|
|
3573
|
-
k.value = Math.max(0, Math.min(
|
|
3573
|
+
k.value = Math.max(0, Math.min(L.value.length - 1, t)), oe();
|
|
3574
3574
|
}
|
|
3575
|
-
let
|
|
3576
|
-
function
|
|
3577
|
-
|
|
3575
|
+
let ie = p(null), ae = p({});
|
|
3576
|
+
function B(e, t) {
|
|
3577
|
+
ae.value[e] = t ?? null;
|
|
3578
3578
|
}
|
|
3579
3579
|
function oe() {
|
|
3580
3580
|
c(() => {
|
|
3581
|
-
let e =
|
|
3581
|
+
let e = ie.value;
|
|
3582
3582
|
e && e.querySelector(`[data-merge-tag-index="${k.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3583
3583
|
});
|
|
3584
3584
|
}
|
|
@@ -3588,7 +3588,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3588
3588
|
t.delete(e), M.value = t;
|
|
3589
3589
|
}
|
|
3590
3590
|
c(() => {
|
|
3591
|
-
let t =
|
|
3591
|
+
let t = ie.value;
|
|
3592
3592
|
if (!t) return;
|
|
3593
3593
|
let n = 0, r = !1;
|
|
3594
3594
|
for (let i of Array.from(t.children)) {
|
|
@@ -3609,50 +3609,50 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3609
3609
|
else if (e.key === "ArrowUp") e.preventDefault(), re(-1);
|
|
3610
3610
|
else if (e.key === "Enter") {
|
|
3611
3611
|
e.preventDefault();
|
|
3612
|
-
let t =
|
|
3613
|
-
t &&
|
|
3612
|
+
let t = L.value[k.value];
|
|
3613
|
+
t && R(t);
|
|
3614
3614
|
}
|
|
3615
3615
|
}
|
|
3616
|
-
function
|
|
3617
|
-
if (
|
|
3616
|
+
function V() {
|
|
3617
|
+
if (L.value.length !== 0) return `${$}-opt-${k.value}`;
|
|
3618
3618
|
}
|
|
3619
|
-
function
|
|
3620
|
-
return `${
|
|
3619
|
+
function le(e) {
|
|
3620
|
+
return `${$}-opt-${e}`;
|
|
3621
3621
|
}
|
|
3622
|
-
let ue = _(() => t.tags.value.length === 0), de = _(() => !ue.value &&
|
|
3623
|
-
return (e, c) => (s(), S(
|
|
3622
|
+
let ue = _(() => t.tags.value.length === 0), de = _(() => !ue.value && te.value.length === 0), fe = _(() => j.value && ne.value.length > 1 && !D.value);
|
|
3623
|
+
return (e, c) => (s(), S(be, {
|
|
3624
3624
|
visible: b(t).isOpen.value,
|
|
3625
|
-
onClose:
|
|
3625
|
+
onClose: z,
|
|
3626
3626
|
onKeydown: ce
|
|
3627
3627
|
}, {
|
|
3628
3628
|
default: d(() => [E("div", {
|
|
3629
3629
|
role: "dialog",
|
|
3630
3630
|
"aria-modal": "true",
|
|
3631
|
-
"aria-labelledby": `${
|
|
3631
|
+
"aria-labelledby": `${$}-title`,
|
|
3632
3632
|
"data-tpl-theme": b(o),
|
|
3633
3633
|
"data-testid": "merge-tag-picker-modal",
|
|
3634
3634
|
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)]",
|
|
3635
3635
|
style: O(b(a))
|
|
3636
3636
|
}, [
|
|
3637
|
-
E("header",
|
|
3638
|
-
id: `${
|
|
3637
|
+
E("header", $c, [E("h2", {
|
|
3638
|
+
id: `${$}-title`,
|
|
3639
3639
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3640
|
-
}, g(b(n).mergeTag.picker.title), 9,
|
|
3640
|
+
}, g(b(n).mergeTag.picker.title), 9, el), E("button", {
|
|
3641
3641
|
type: "button",
|
|
3642
3642
|
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)]",
|
|
3643
3643
|
"aria-label": b(n).mergeTag.picker.close,
|
|
3644
3644
|
"data-testid": "merge-tag-picker-close",
|
|
3645
|
-
onClick:
|
|
3646
|
-
}, [N(b(
|
|
3645
|
+
onClick: z
|
|
3646
|
+
}, [N(b(Ue), {
|
|
3647
3647
|
size: 16,
|
|
3648
3648
|
"stroke-width": 2
|
|
3649
|
-
})], 8,
|
|
3650
|
-
E("div",
|
|
3649
|
+
})], 8, tl)]),
|
|
3650
|
+
E("div", nl, [N(b(Pt), {
|
|
3651
3651
|
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)]",
|
|
3652
3652
|
size: 14,
|
|
3653
3653
|
"stroke-width": 2
|
|
3654
3654
|
}), r(E("input", {
|
|
3655
|
-
id: `${
|
|
3655
|
+
id: `${$}-search`,
|
|
3656
3656
|
ref_key: "searchInputRef",
|
|
3657
3657
|
ref: C,
|
|
3658
3658
|
"onUpdate:modelValue": c[0] ||= (e) => f.value = e,
|
|
@@ -3660,50 +3660,50 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3660
3660
|
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)]",
|
|
3661
3661
|
placeholder: b(n).mergeTag.picker.searchPlaceholder,
|
|
3662
3662
|
"aria-label": b(n).mergeTag.picker.searchAriaLabel,
|
|
3663
|
-
"aria-controls":
|
|
3664
|
-
"aria-activedescendant":
|
|
3663
|
+
"aria-controls": $,
|
|
3664
|
+
"aria-activedescendant": V(),
|
|
3665
3665
|
"data-testid": "merge-tag-picker-search",
|
|
3666
3666
|
onKeydown: c[1] ||= h(x(() => {}, ["prevent"]), ["enter"])
|
|
3667
|
-
}, null, 40,
|
|
3668
|
-
fe.value ? (s(), v("div",
|
|
3667
|
+
}, null, 40, rl), [[w, f.value]])]),
|
|
3668
|
+
fe.value ? (s(), v("div", il, [(s(!0), v(A, null, l(ne.value, (e) => (s(), v("button", {
|
|
3669
3669
|
key: e,
|
|
3670
3670
|
type: "button",
|
|
3671
3671
|
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)]",
|
|
3672
3672
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3673
3673
|
"data-group-name": e,
|
|
3674
3674
|
onClick: (t) => se(e)
|
|
3675
|
-
}, g(e), 9,
|
|
3675
|
+
}, g(e), 9, al))), 128))])) : y("", !0),
|
|
3676
3676
|
E("div", {
|
|
3677
|
-
id:
|
|
3677
|
+
id: $,
|
|
3678
3678
|
ref_key: "listRef",
|
|
3679
|
-
ref:
|
|
3679
|
+
ref: ie,
|
|
3680
3680
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3681
3681
|
role: "listbox",
|
|
3682
3682
|
"aria-label": b(n).mergeTag.picker.title,
|
|
3683
3683
|
"data-testid": "merge-tag-picker-list"
|
|
3684
|
-
}, [ue.value ? (s(), v("div",
|
|
3684
|
+
}, [ue.value ? (s(), v("div", sl, g(b(n).mergeTag.picker.empty), 1)) : de.value ? (s(), v("div", cl, g(b(n).mergeTag.picker.noResults), 1)) : (s(!0), v(A, { key: 2 }, l(I.value, (e, t) => (s(), v(A, { key: t }, [e.kind === "header" ? (s(), v("button", {
|
|
3685
3685
|
key: 0,
|
|
3686
3686
|
ref_for: !0,
|
|
3687
|
-
ref: (t) =>
|
|
3687
|
+
ref: (t) => B(e.group, t),
|
|
3688
3688
|
type: "button",
|
|
3689
|
-
"aria-expanded": !
|
|
3690
|
-
"aria-controls":
|
|
3689
|
+
"aria-expanded": !F(e.group),
|
|
3690
|
+
"aria-controls": $,
|
|
3691
3691
|
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)]",
|
|
3692
3692
|
"data-testid": "merge-tag-picker-group-header",
|
|
3693
3693
|
"data-group-name": e.group,
|
|
3694
|
-
"data-group-collapsed":
|
|
3695
|
-
onClick: (t) =>
|
|
3694
|
+
"data-group-collapsed": F(e.group) ? "true" : "false",
|
|
3695
|
+
onClick: (t) => ee(e.group)
|
|
3696
3696
|
}, [
|
|
3697
|
-
N(b(
|
|
3697
|
+
N(b(_e), {
|
|
3698
3698
|
size: 12,
|
|
3699
3699
|
"stroke-width": 2,
|
|
3700
|
-
class: T(["tpl:transition-transform",
|
|
3700
|
+
class: T(["tpl:transition-transform", F(e.group) ? "tpl:-rotate-90" : ""])
|
|
3701
3701
|
}, null, 8, ["class"]),
|
|
3702
3702
|
E("span", null, g(e.group), 1),
|
|
3703
|
-
E("span",
|
|
3704
|
-
], 8,
|
|
3703
|
+
E("span", ul, " (" + g(b(i)(b(n).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
3704
|
+
], 8, ll)) : (s(), v("button", {
|
|
3705
3705
|
key: 1,
|
|
3706
|
-
id:
|
|
3706
|
+
id: le(e.index),
|
|
3707
3707
|
type: "button",
|
|
3708
3708
|
role: "option",
|
|
3709
3709
|
"aria-selected": e.index === k.value,
|
|
@@ -3714,13 +3714,13 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3714
3714
|
class: T(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === k.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3715
3715
|
"data-testid": "merge-tag-picker-item",
|
|
3716
3716
|
onMousemove: (t) => k.value = e.index,
|
|
3717
|
-
onClick: (t) =>
|
|
3717
|
+
onClick: (t) => R(e.tag)
|
|
3718
3718
|
}, [
|
|
3719
|
-
E("span",
|
|
3720
|
-
E("span",
|
|
3721
|
-
e.tag.description ? (s(), v("span",
|
|
3722
|
-
], 42,
|
|
3723
|
-
], 12,
|
|
3719
|
+
E("span", fl, g(e.tag.label), 1),
|
|
3720
|
+
E("span", pl, g(e.tag.value), 1),
|
|
3721
|
+
e.tag.description ? (s(), v("span", ml, g(e.tag.description), 1)) : y("", !0)
|
|
3722
|
+
], 42, dl))], 64))), 128))], 8, ol)
|
|
3723
|
+
], 12, Qc)]),
|
|
3724
3724
|
_: 1
|
|
3725
3725
|
}, 8, ["visible"]));
|
|
3726
3726
|
}
|
|
@@ -3731,7 +3731,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3731
3731
|
syntax: {}
|
|
3732
3732
|
},
|
|
3733
3733
|
setup(e) {
|
|
3734
|
-
let t = e, n = _(() =>
|
|
3734
|
+
let t = e, n = _(() => Je(t.value, t.syntax)), r = _(() => ke(t.value, t.syntax));
|
|
3735
3735
|
return (e, t) => n.value ? (s(), v("span", {
|
|
3736
3736
|
key: 0,
|
|
3737
3737
|
class: "tpl:inline-flex tpl:flex-shrink-0 tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:leading-none tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
@@ -3776,7 +3776,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3776
3776
|
}, Fl = "tpl-logic-picker-list", Il = /* @__PURE__ */ M({
|
|
3777
3777
|
__name: "LogicTagPickerModal",
|
|
3778
3778
|
setup(e) {
|
|
3779
|
-
let t =
|
|
3779
|
+
let t = lt(F, "LogicTagPickerModal"), { t: n } = H(), i = u(ct, I.liquid), a = u(ot, null), o = u(Ye, null), f = p(""), m = ze(f, 200), C = p(null), D = _(() => m.value.trim().length > 0), k = p(0);
|
|
3780
3780
|
function j(e) {
|
|
3781
3781
|
let t = m.value.trim().toLowerCase();
|
|
3782
3782
|
return !t || e.filter(Boolean).join(" ").toLowerCase().includes(t);
|
|
@@ -3785,12 +3785,12 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3785
3785
|
e.label,
|
|
3786
3786
|
e.value,
|
|
3787
3787
|
e.description
|
|
3788
|
-
]))),
|
|
3788
|
+
]))), ee = _(() => t.pairs.value.filter((e) => j([
|
|
3789
3789
|
e.label,
|
|
3790
3790
|
e.before,
|
|
3791
3791
|
e.after,
|
|
3792
3792
|
e.description
|
|
3793
|
-
]))),
|
|
3793
|
+
]))), te = _(() => [...ee.value.map((e) => ({
|
|
3794
3794
|
kind: "pair",
|
|
3795
3795
|
pair: e,
|
|
3796
3796
|
group: e.group
|
|
@@ -3798,8 +3798,8 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3798
3798
|
kind: "tag",
|
|
3799
3799
|
tag: e,
|
|
3800
3800
|
group: e.group
|
|
3801
|
-
}))]),
|
|
3802
|
-
function
|
|
3801
|
+
}))]), ne = _(() => t.tags.value.some((e) => !!e.group) || t.pairs.value.some((e) => !!e.group));
|
|
3802
|
+
function L(e) {
|
|
3803
3803
|
let t = n.logicTag.picker.otherGroup, r = /* @__PURE__ */ new Map(), i = [];
|
|
3804
3804
|
for (let n of e) {
|
|
3805
3805
|
let e = n.group ?? t;
|
|
@@ -3818,9 +3818,9 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3818
3818
|
pair: r.pair,
|
|
3819
3819
|
index: n
|
|
3820
3820
|
}), t.push(r.pair)), n++;
|
|
3821
|
-
}, i =
|
|
3822
|
-
if (D.value || !
|
|
3823
|
-
else for (let [t, n] of
|
|
3821
|
+
}, i = te.value;
|
|
3822
|
+
if (D.value || !ne.value) for (let e of i) r(e);
|
|
3823
|
+
else for (let [t, n] of L(i)) {
|
|
3824
3824
|
e.push({
|
|
3825
3825
|
kind: "header",
|
|
3826
3826
|
label: t
|
|
@@ -3831,43 +3831,43 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3831
3831
|
rows: e,
|
|
3832
3832
|
items: t
|
|
3833
3833
|
};
|
|
3834
|
-
}), z = _(() => R.value.items),
|
|
3834
|
+
}), z = _(() => R.value.items), re = _(() => t.tags.value.length === 0 && t.pairs.value.length === 0), ie = _(() => !re.value && z.value.length === 0);
|
|
3835
3835
|
P(() => t.isOpen.value, (e) => {
|
|
3836
3836
|
e && (f.value = "", k.value = 0, c(() => C.value?.focus()));
|
|
3837
3837
|
}), P(z, (e) => {
|
|
3838
3838
|
k.value >= e.length && (k.value = Math.max(0, e.length - 1));
|
|
3839
3839
|
});
|
|
3840
|
-
let
|
|
3841
|
-
function
|
|
3840
|
+
let ae = p(null);
|
|
3841
|
+
function B(e) {
|
|
3842
3842
|
t.resolve(e);
|
|
3843
3843
|
}
|
|
3844
|
-
function
|
|
3844
|
+
function oe() {
|
|
3845
3845
|
t.resolve(null);
|
|
3846
3846
|
}
|
|
3847
|
-
function
|
|
3847
|
+
function se(e) {
|
|
3848
3848
|
z.value.length !== 0 && (k.value = Math.max(0, Math.min(z.value.length - 1, k.value + e)), c(() => {
|
|
3849
|
-
|
|
3849
|
+
ae.value?.querySelector(`[data-logic-index="${k.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3850
3850
|
}));
|
|
3851
3851
|
}
|
|
3852
|
-
function
|
|
3853
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3854
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3852
|
+
function ce(e) {
|
|
3853
|
+
if (e.key === "ArrowDown") e.preventDefault(), se(1);
|
|
3854
|
+
else if (e.key === "ArrowUp") e.preventDefault(), se(-1);
|
|
3855
3855
|
else if (e.key === "Enter") {
|
|
3856
3856
|
e.preventDefault();
|
|
3857
3857
|
let t = z.value[k.value];
|
|
3858
|
-
t &&
|
|
3858
|
+
t && B(t);
|
|
3859
3859
|
}
|
|
3860
3860
|
}
|
|
3861
|
-
function
|
|
3861
|
+
function V(e) {
|
|
3862
3862
|
return `${Fl}-opt-${e}`;
|
|
3863
3863
|
}
|
|
3864
|
-
function
|
|
3864
|
+
function le() {
|
|
3865
3865
|
return z.value.length === 0 ? void 0 : `${Fl}-opt-${k.value}`;
|
|
3866
3866
|
}
|
|
3867
|
-
return (e, c) => (s(), S(
|
|
3867
|
+
return (e, c) => (s(), S(be, {
|
|
3868
3868
|
visible: b(t).isOpen.value,
|
|
3869
|
-
onClose:
|
|
3870
|
-
onKeydown:
|
|
3869
|
+
onClose: oe,
|
|
3870
|
+
onKeydown: ce
|
|
3871
3871
|
}, {
|
|
3872
3872
|
default: d(() => [E("div", {
|
|
3873
3873
|
role: "dialog",
|
|
@@ -3886,12 +3886,12 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3886
3886
|
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)]",
|
|
3887
3887
|
"aria-label": b(n).logicTag.picker.close,
|
|
3888
3888
|
"data-testid": "logic-picker-close",
|
|
3889
|
-
onClick:
|
|
3890
|
-
}, [N(b(
|
|
3889
|
+
onClick: oe
|
|
3890
|
+
}, [N(b(Ue), {
|
|
3891
3891
|
size: 16,
|
|
3892
3892
|
"stroke-width": 2
|
|
3893
3893
|
})], 8, xl)]),
|
|
3894
|
-
E("div", Sl, [N(b(
|
|
3894
|
+
E("div", Sl, [N(b(Pt), {
|
|
3895
3895
|
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)]",
|
|
3896
3896
|
size: 14,
|
|
3897
3897
|
"stroke-width": 2
|
|
@@ -3905,26 +3905,26 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3905
3905
|
placeholder: b(n).logicTag.picker.searchPlaceholder,
|
|
3906
3906
|
"aria-label": b(n).logicTag.picker.searchAriaLabel,
|
|
3907
3907
|
"aria-controls": Fl,
|
|
3908
|
-
"aria-activedescendant":
|
|
3908
|
+
"aria-activedescendant": le(),
|
|
3909
3909
|
"data-testid": "logic-picker-search",
|
|
3910
3910
|
onKeydown: c[1] ||= h(x(() => {}, ["prevent"]), ["enter"])
|
|
3911
3911
|
}, null, 40, Cl), [[w, f.value]])]),
|
|
3912
3912
|
E("div", {
|
|
3913
3913
|
id: Fl,
|
|
3914
3914
|
ref_key: "listRef",
|
|
3915
|
-
ref:
|
|
3915
|
+
ref: ae,
|
|
3916
3916
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3917
3917
|
role: "listbox",
|
|
3918
3918
|
"aria-label": b(n).logicTag.picker.title,
|
|
3919
3919
|
"data-testid": "logic-picker-list"
|
|
3920
|
-
}, [
|
|
3920
|
+
}, [re.value ? (s(), v("div", Tl, g(b(n).logicTag.picker.empty), 1)) : ie.value ? (s(), v("div", El, g(b(n).logicTag.picker.noResults), 1)) : (s(!0), v(A, { key: 2 }, l(R.value.rows, (e, t) => (s(), v(A, { key: t }, [e.kind === "header" ? (s(), v("div", {
|
|
3921
3921
|
key: 0,
|
|
3922
3922
|
class: "tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]",
|
|
3923
3923
|
"data-testid": "logic-picker-header",
|
|
3924
3924
|
"data-group-name": e.label
|
|
3925
3925
|
}, g(e.label), 9, Dl)) : (s(), v("button", {
|
|
3926
3926
|
key: 1,
|
|
3927
|
-
id:
|
|
3927
|
+
id: V(e.index),
|
|
3928
3928
|
type: "button",
|
|
3929
3929
|
role: "option",
|
|
3930
3930
|
"aria-selected": e.index === k.value,
|
|
@@ -3934,7 +3934,7 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3934
3934
|
class: T(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === k.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3935
3935
|
"data-testid": "logic-picker-item",
|
|
3936
3936
|
onMousemove: (t) => k.value = e.index,
|
|
3937
|
-
onClick: (t) =>
|
|
3937
|
+
onClick: (t) => B(e.kind === "tag" ? e.tag : e.pair)
|
|
3938
3938
|
}, [
|
|
3939
3939
|
E("span", kl, [E("span", Al, g(e.kind === "tag" ? e.tag.label : e.pair.label), 1), e.kind === "tag" ? (s(), v("span", jl, [N(_l, {
|
|
3940
3940
|
value: e.tag.value,
|
|
@@ -3959,6 +3959,6 @@ var xo = { class: "tpl:mb-3.5" }, So = ["value"], Co = ["value"], wo = { class:
|
|
|
3959
3959
|
}
|
|
3960
3960
|
});
|
|
3961
3961
|
//#endregion
|
|
3962
|
-
export {
|
|
3962
|
+
export { Kc as a, Ic as c, on as d, Jt as f, Jc as i, _n as l, hl as n, Wc as o, Zc as r, Vc as s, Il as t, sn as u };
|
|
3963
3963
|
|
|
3964
|
-
//# sourceMappingURL=styles-
|
|
3964
|
+
//# sourceMappingURL=styles-DBjy3lz9.js.map
|