@templatical/editor 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-K_AehWc-.js → AiChatSidebar-Nq-jrGaf.js} +2 -2
- package/dist/{AiFeatureMenu-CcqjRMFW.js → AiFeatureMenu-tg_zMKMK.js} +3 -3
- package/dist/{BlockIssueBadge-Dmj9rVra.js → BlockIssueBadge-Bd94kIiw.js} +2 -2
- package/dist/BlockPreviewCanvas-B34aMhHe.js +117 -0
- package/dist/{CloudEditor-BVH7D1Ka.js → CloudEditor-DjN_9Yso.js} +285 -284
- package/dist/{CollaboratorBar-C_1SF7Xf.js → CollaboratorBar-Bhazzcg-.js} +2 -2
- package/dist/{ColorPicker-s9GHXjZs.js → ColorPicker-DXGrcJxJ.js} +5 -5
- package/dist/{CommentsSidebar-DvNEdugN.js → CommentsSidebar-ku1kt10u.js} +3 -3
- package/dist/{CountdownBlock-J_Q9JRQM.js → CountdownBlock-CN9Lc23W.js} +1 -1
- package/dist/{CountdownToolbar-DPRcv3Fu.js → CountdownToolbar-VEsIyKV6.js} +3 -3
- package/dist/{DesignReferenceSidebar-DNmK3dxp.js → DesignReferenceSidebar-C4pTMzQE.js} +3 -3
- package/dist/{IssuesPanel-CEnEGFtd.js → IssuesPanel-CEfzOpS_.js} +2 -2
- package/dist/MergeTagModeToggle-C3V2xGAg.js +180 -0
- package/dist/{MergeTagSuggestion-D9eCryMC.js → MergeTagSuggestion-Dn8ww9nV.js} +2 -2
- package/dist/{NumberWithSuffix-CCPN_oCh.js → NumberWithSuffix-BGocZkj9.js} +1 -1
- package/dist/{ParagraphEditor-MKJYyWN9.js → ParagraphEditor-D-fz0kUb.js} +19 -19
- package/dist/{RichTextEditorContent-FbnWsh46.js → RichTextEditorContent-DydrqFts.js} +5 -5
- package/dist/{SaveBlockDialog-B_5KBaXW.js → SaveBlockDialog-BDDFbAWF.js} +100 -99
- package/dist/{SavedBlocksBrowserModal-DoJBoYPk.js → SavedBlocksBrowserModal-Djik_fJh.js} +6 -6
- package/dist/{SavedBlocksPanels-3Af5dMaf.js → SavedBlocksPanels-CxemyPxL.js} +1 -1
- package/dist/{SavedBlocksPickBar-C1FTJP-I.js → SavedBlocksPickBar-Dlhipmob.js} +2 -2
- package/dist/{SnapshotHistory-DWlQ3Eh0.js → SnapshotHistory-DPbM4ons.js} +4 -4
- package/dist/{TemplateScoringPanel-ifGGGWs5.js → TemplateScoringPanel-BFYgweDX.js} +2 -2
- package/dist/TestEmailModal-IZfwgya-.js +174 -0
- package/dist/TestEmailPanel-QEEx_PkN.js +33 -0
- package/dist/{TitleEditor-DzsPxKv4.js → TitleEditor-BB4YlIBF.js} +10 -10
- package/dist/{TplModal-CykwWFhF.js → TplModal-DPH4vV8M.js} +3 -3
- package/dist/{blockTypeIcons-CpKkI47V.js → blockTypeIcons-Wzd7W_2x.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-BBgad6y5.js → ca-CO4nq6TX.js} +22 -1
- package/dist/cdn/chunks/{AiChatSidebar-A1CuWGY0.js → AiChatSidebar-CN-0DIuA.js} +11 -11
- package/dist/cdn/chunks/{AiChatSidebar-A1CuWGY0.js.map → AiChatSidebar-CN-0DIuA.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-hWgWQg11.js → AiFeatureMenu-B5pV6Iux.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-hWgWQg11.js.map → AiFeatureMenu-B5pV6Iux.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Da4yR-mh.js → BlockIssueBadge-aanOjeyi.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-Da4yR-mh.js.map → BlockIssueBadge-aanOjeyi.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-Dc4F4HzY.js +119 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-Dc4F4HzY.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-FCS53UcZ.js → CloudEditor-CeKaWWO5.js} +264 -263
- package/dist/cdn/chunks/CloudEditor-CeKaWWO5.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-mkJVAkSh.js → CollaboratorBar-CEdKr0A2.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-mkJVAkSh.js.map → CollaboratorBar-CEdKr0A2.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DZSzZ5ZP.js → ColorPicker-BckwEfcN.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-DZSzZ5ZP.js.map → ColorPicker-BckwEfcN.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-DHdRiGPX.js → CommentsSidebar-6PfpJKh-.js} +18 -18
- package/dist/cdn/chunks/{CommentsSidebar-DHdRiGPX.js.map → CommentsSidebar-6PfpJKh-.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Bffpoppw.js → CountdownBlock-CoBmvQKv.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-Bffpoppw.js.map → CountdownBlock-CoBmvQKv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DAnmIZjq.js → CountdownToolbar-CdV8RTQu.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-DAnmIZjq.js.map → CountdownToolbar-CdV8RTQu.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-Dre99DTH.js → DesignReferenceSidebar-BjlaP69l.js} +90 -90
- package/dist/cdn/chunks/{DesignReferenceSidebar-Dre99DTH.js.map → DesignReferenceSidebar-BjlaP69l.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-D80JedOj.js → IssuesPanel-CkkEnhxZ.js} +9 -9
- package/dist/cdn/chunks/{IssuesPanel-D80JedOj.js.map → IssuesPanel-CkkEnhxZ.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagModeToggle-DmtR300G.js +127 -0
- package/dist/cdn/chunks/MergeTagModeToggle-DmtR300G.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagSuggestion-BM349_QH.js → MergeTagSuggestion-Cvlkw_PM.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-BM349_QH.js.map → MergeTagSuggestion-Cvlkw_PM.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CjlVNIEe.js → NumberWithSuffix-BOcMN26z.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-CjlVNIEe.js.map → NumberWithSuffix-BOcMN26z.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-J-1RLyi7.js → ParagraphEditor-CX1yks4N.js} +35 -35
- package/dist/cdn/chunks/{ParagraphEditor-J-1RLyi7.js.map → ParagraphEditor-CX1yks4N.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BbdgJqWM.js → RichTextEditorContent-z9s7qxs3.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-BbdgJqWM.js.map → RichTextEditorContent-z9s7qxs3.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CSeD3gn9.js → SaveBlockDialog-D2CtW4lC.js} +100 -99
- package/dist/cdn/chunks/SaveBlockDialog-D2CtW4lC.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B2x5WRPN.js → SavedBlocksBrowserModal-DdUKJzzF.js} +8 -8
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DdUKJzzF.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-BzMTZxf2.js → SavedBlocksPanels-1kVbqdpc.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-BzMTZxf2.js.map → SavedBlocksPanels-1kVbqdpc.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CduR1Cpb.js → SavedBlocksPickBar--noDJIyN.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-CduR1Cpb.js.map → SavedBlocksPickBar--noDJIyN.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-DO-gzr3i.js → SnapshotHistory-DFuNJRc9.js} +8 -8
- package/dist/cdn/chunks/{SnapshotHistory-DO-gzr3i.js.map → SnapshotHistory-DFuNJRc9.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-CTk8WwxU.js → TemplateScoringPanel-DG1dAjQk.js} +52 -52
- package/dist/cdn/chunks/{TemplateScoringPanel-CTk8WwxU.js.map → TemplateScoringPanel-DG1dAjQk.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailModal-CiPfOn2v.js +174 -0
- package/dist/cdn/chunks/TestEmailModal-CiPfOn2v.js.map +1 -0
- package/dist/cdn/chunks/TestEmailPanel-saOfnpjz.js +35 -0
- package/dist/cdn/chunks/TestEmailPanel-saOfnpjz.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-J1vgU_J6.js → TitleEditor-08KM_VzZ.js} +18 -18
- package/dist/cdn/chunks/{TitleEditor-J1vgU_J6.js.map → TitleEditor-08KM_VzZ.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BN53d9Se.js → TplModal-Cu4tBBnF.js} +4 -4
- package/dist/cdn/chunks/{TplModal-BN53d9Se.js.map → TplModal-Cu4tBBnF.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-DvohkXqi.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-etMMQoVv.js.map → blockTypeIcons-DvohkXqi.js.map} +1 -1
- package/dist/cdn/chunks/{ca-BBgad6y5.js → ca-CO4nq6TX.js} +23 -2
- package/dist/cdn/chunks/{ca-BBgad6y5.js.map → ca-CO4nq6TX.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-BJlbXGTJ.js → cloud-C2I0P9qj.js} +46 -42
- package/dist/cdn/chunks/cloud-C2I0P9qj.js.map +1 -0
- package/dist/{de-D7WbpFBR.js → cdn/chunks/de-CUeaFJph.js} +24 -1
- package/dist/cdn/chunks/{de-D7WbpFBR.js.map → de-CUeaFJph.js.map} +1 -1
- package/dist/{de-Bw6fB5JU.js → cdn/chunks/de-uVoSP1xF.js} +2 -9
- package/dist/cdn/chunks/de-uVoSP1xF.js.map +1 -0
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js +8 -0
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js.map +1 -0
- package/dist/{en-DAdHJz7h.js → cdn/chunks/en-CjhsJxb-.js} +2 -9
- package/dist/cdn/chunks/en-CjhsJxb-.js.map +1 -0
- package/dist/{en-BrZ0uGK2.js → cdn/chunks/en-zCYIPAL5.js} +24 -1
- package/dist/cdn/chunks/{en-BrZ0uGK2.js.map → en-zCYIPAL5.js.map} +1 -1
- package/dist/{es-tLSLysPs.js → cdn/chunks/es-BSiH7YkP.js} +24 -1
- package/dist/cdn/chunks/{es-tLSLysPs.js.map → es-BSiH7YkP.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-C49c51P1.js → extensions-DBWF_lxx.js} +16 -16
- package/dist/cdn/chunks/{extensions-C49c51P1.js.map → extensions-DBWF_lxx.js.map} +1 -1
- package/dist/{fr-BMWOPztQ.js → cdn/chunks/fr-DTVJ3det.js} +24 -1
- package/dist/cdn/chunks/fr-DTVJ3det.js.map +1 -0
- package/dist/cdn/chunks/{icons-CYWw8Xfp.js → icons-Cqxvwgz7.js} +35 -14
- package/dist/cdn/chunks/icons-Cqxvwgz7.js.map +1 -0
- package/dist/cdn/chunks/keys-B5uoP9P7.js +12 -0
- package/dist/cdn/chunks/keys-B5uoP9P7.js.map +1 -0
- package/dist/{nl-Dhctu7JL.js → cdn/chunks/nl-BqSquFS3.js} +24 -1
- package/dist/cdn/chunks/nl-BqSquFS3.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-BWFokdTU.js → pt-BR-CMljK37h.js} +23 -2
- package/dist/cdn/chunks/{pt-BR-BWFokdTU.js.map → pt-BR-CMljK37h.js.map} +1 -1
- package/dist/{pt-BR-w2sGzHNX.js → cdn/chunks/pt-BR-CTzHTqJD.js} +2 -9
- package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +1 -0
- package/dist/cdn/chunks/{src-BKI1x1k7.js → src-BCJna-6p.js} +183 -165
- package/dist/cdn/chunks/{src-BKI1x1k7.js.map → src-BCJna-6p.js.map} +1 -1
- package/dist/cdn/chunks/{src-MA8DWI8O.js → src-C45kfA2t.js} +17 -17
- package/dist/cdn/chunks/{src-MA8DWI8O.js.map → src-C45kfA2t.js.map} +1 -1
- package/dist/cdn/chunks/{src-ByWL5K1f.js → src-XQmI_Xs1.js} +48 -48
- package/dist/cdn/chunks/{src-ByWL5K1f.js.map → src-XQmI_Xs1.js.map} +1 -1
- package/dist/cdn/chunks/{src-CM0gCvAS.js → src-YVsPFLNJ.js} +251 -251
- package/dist/cdn/chunks/{src-CM0gCvAS.js.map → src-YVsPFLNJ.js.map} +1 -1
- package/dist/cdn/chunks/{styles-BkXzQ4-n.js → styles-BohMfIBd.js} +785 -746
- package/dist/cdn/chunks/styles-BohMfIBd.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DUTbZTeR.js → tiptap-DRKu__AX.js} +5 -5
- package/dist/cdn/chunks/{tiptap-DUTbZTeR.js.map → tiptap-DRKu__AX.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-BjNENqkM.js → useCloudI18n-Bem8DUjH.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-BjNENqkM.js.map → useCloudI18n-Bem8DUjH.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CzMhD6Gd.js → useEditorCore-B_vwuKdI.js} +434 -414
- package/dist/cdn/chunks/useEditorCore-B_vwuKdI.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-8Wd7G-cq.js → useI18n-graz19nI.js} +2 -2
- package/dist/cdn/chunks/{useI18n-8Wd7G-cq.js.map → useI18n-graz19nI.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-C7G31KV-.js → useMergeTag-rTzAFMlr.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-C7G31KV-.js.map → useMergeTag-rTzAFMlr.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Bx0QewTv.js → usePopoverPosition-BaFxLP3w.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-Bx0QewTv.js.map → usePopoverPosition-BaFxLP3w.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +172 -150
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-Du7mnkz2.js → cloud-DsUct4Zq.js} +42 -40
- package/dist/{cdn/chunks/de-D7WbpFBR.js → de-CUeaFJph.js} +22 -3
- package/dist/{cdn/chunks/de-Bw6fB5JU.js → de-uVoSP1xF.js} +0 -11
- package/dist/{dist-CL_CfQ3Q.js → dist-9uhI32Q4.js} +2 -2
- package/dist/{dist-3DHaYEiT.js → dist-BAkGuPYm.js} +2 -2
- package/dist/dist-BIYm-U9x.js +5 -0
- package/dist/{dist-3HenmYIg.js → dist-ByJVlKWy.js} +1 -1
- package/dist/{dist-DKWoZJAV.js → dist-C5tigvDF.js} +2 -2
- package/dist/{dist-bivrM-nS.js → dist-CQiAZlTt.js} +2 -2
- package/dist/{dist-Ih7ejWzn.js → dist-C_kAE1sC.js} +2 -2
- package/dist/{dist-CclnU_v0.js → dist-CkCVlKj_.js} +2 -2
- package/dist/{dist-B_etKYyh.js → dist-DFO896yT.js} +5 -5
- package/dist/{dist-BJbqgyPn.js → dist-DPHqs0Yh.js} +105 -87
- package/dist/{dist-DOtLGnLr.js → dist-DWu9QWFl.js} +2 -2
- package/dist/{dist-BCnJcAQc.js → dist-IGetXrbO.js} +2 -2
- package/dist/dist-JXOq1hib.js +5 -0
- package/dist/emailFrameWidth-BmFCN2dp.js +6 -0
- package/dist/{cdn/chunks/en-DAdHJz7h.js → en-CjhsJxb-.js} +0 -11
- package/dist/{cdn/chunks/en-BrZ0uGK2.js → en-zCYIPAL5.js} +22 -3
- package/dist/{cdn/chunks/es-tLSLysPs.js → es-BSiH7YkP.js} +22 -3
- package/dist/{extensions-3870a_3R.js → extensions-C0DXnYdA.js} +13 -13
- package/dist/{cdn/chunks/fr-BMWOPztQ.js → fr-DTVJ3det.js} +22 -3
- package/dist/index.d.ts +74 -0
- package/dist/keys-BVlG5Ozc.js +10 -0
- package/dist/{cdn/chunks/nl-Dhctu7JL.js → nl-BqSquFS3.js} +22 -3
- package/dist/{pt-BR-BWFokdTU.js → pt-BR-CMljK37h.js} +22 -1
- package/dist/{cdn/chunks/pt-BR-w2sGzHNX.js → pt-BR-CTzHTqJD.js} +0 -11
- package/dist/style.css +1 -1
- package/dist/{styles-AxBd7CgB.js → styles-BTTD0Je4.js} +941 -935
- package/dist/templatical-editor.js +112 -89
- package/dist/{useCloudI18n-BmiygEM4.js → useCloudI18n-DGr3b2SX.js} +1 -1
- package/dist/{useEditorCore-CuMMIfiS.js → useEditorCore-DOrGex_t.js} +917 -897
- package/dist/{useI18n-D2L9Mkik.js → useI18n-BhAejA-x.js} +1 -1
- package/dist/{useMergeTag-BTdDq5DC.js → useMergeTag-Ce95YIOO.js} +3 -3
- package/dist/{usePopoverPosition-BO2LNy5n.js → usePopoverPosition-vjKJaqJf.js} +1 -1
- package/package.json +20 -20
- package/dist/SavedBlockPreviewCanvas-DXkGDYph.js +0 -109
- package/dist/TestEmailModal-DComAFpR.js +0 -95
- package/dist/cdn/chunks/CloudEditor-FCS53UcZ.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-CSeD3gn9.js.map +0 -1
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DgLOKtR_.js +0 -111
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DgLOKtR_.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-B2x5WRPN.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DT37w7i_.js +0 -96
- package/dist/cdn/chunks/TestEmailModal-DT37w7i_.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +0 -21
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +0 -1
- package/dist/cdn/chunks/de-Bw6fB5JU.js.map +0 -1
- package/dist/cdn/chunks/en-DAdHJz7h.js.map +0 -1
- package/dist/cdn/chunks/fr-BMWOPztQ.js.map +0 -1
- package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +0 -1
- package/dist/cdn/chunks/keys-D7kUmfpE.js +0 -12
- package/dist/cdn/chunks/keys-D7kUmfpE.js.map +0 -1
- package/dist/cdn/chunks/nl-Dhctu7JL.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-w2sGzHNX.js.map +0 -1
- package/dist/cdn/chunks/styles-BkXzQ4-n.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CzMhD6Gd.js.map +0 -1
- package/dist/dist-CcQLJeWV.js +0 -5
- package/dist/dist-DerdmERj.js +0 -5
- package/dist/keys-CHPcp-Nz.js +0 -10
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
import { A as e, Dt as t, Et as n, H as r, I as i, K as a, N as o, O as s, Ot as c, R as l, W as u, Y as d, _ as f, c as p, d as m, g as h, h as g, j as _, k as v, l as y, m as b, nt as x, q as S, r as C, s as w, u as T, w as E, x as D, y as O, z as k } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { a as A, c as j, o as M, s as N, t as P } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
3
|
import { t as F } from "./upload-BwwE0U6G.js";
|
|
4
|
-
import { A as I, E as L,
|
|
5
|
-
import { B as
|
|
6
|
-
import { c as
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { i as
|
|
15
|
-
import { n as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
26
|
-
import { t as
|
|
27
|
-
import { t as
|
|
28
|
-
import { t as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { i as
|
|
32
|
-
import {
|
|
33
|
-
|
|
4
|
+
import { A as I, E as L, M as R, N as z, T as B, a as ee, c as te, f as ne, k as re, l as ie, s as ae } from "./dist-DPHqs0Yh.js";
|
|
5
|
+
import { B as V, F as oe, G as se, I as ce, L as le, N as ue, U as de, V as fe, _ as pe, a as me, b as he, c as ge, f as _e, g as ve, h as ye, i as be, k as xe, l as Se, m as Ce, n as we, o as Te, p as Ee, q as De, r as Oe, s as ke, u as Ae, v as je, w as Me, y as Ne, z as Pe } from "./useEditorCore-DOrGex_t.js";
|
|
6
|
+
import { c as Fe, m as Ie } from "./dist-DYv_Pttj.js";
|
|
7
|
+
import { a as Le, n as Re } from "./usePopoverPosition-vjKJaqJf.js";
|
|
8
|
+
import { B as ze, D as Be, F as Ve, H as He, L as Ue, N as We, O as Ge, R as Ke, V as qe, _ as Je, a as Ye, d as Xe, f as Ze, h as Qe, j as $e, k as et, l as tt, m as nt, n as rt, o as it, p as at, s as ot, w as st, z as ct } from "./keys-BVlG5Ozc.js";
|
|
9
|
+
import { t as H } from "./useI18n-BhAejA-x.js";
|
|
10
|
+
import { t as U } from "./createLucideIcon-JWHwTI6N.js";
|
|
11
|
+
import { n as lt, t as ut } from "./scan-line-BFgesTOY.js";
|
|
12
|
+
import { t as dt } from "./chevron-down-j8GrdTyz.js";
|
|
13
|
+
import { t as ft } from "./circle-alert-CgtE46ND.js";
|
|
14
|
+
import { i as pt, n as mt, r as ht, t as gt } from "./blockTypeIcons-Wzd7W_2x.js";
|
|
15
|
+
import { n as _t, t as vt } from "./refresh-cw-maKlg0dl.js";
|
|
16
|
+
import { t as yt } from "./image-up-CQdtq8ge.js";
|
|
17
|
+
import { t as bt } from "./info-BUJBXoE6.js";
|
|
18
|
+
import { t as xt } from "./list-checks-BGHaCSD5.js";
|
|
19
|
+
import { t as St } from "./loader-circle-C-Z6kgI6.js";
|
|
20
|
+
import { i as Ct, r as wt } from "./MergeTagModeToggle-C3V2xGAg.js";
|
|
21
|
+
import { t as Tt } from "./sparkles-DVlm1Ipp.js";
|
|
22
|
+
import { n as Et, r as Dt, t as Ot } from "./text-align-start-Vay3Kvo2.js";
|
|
23
|
+
import { t as kt } from "./trash-2-DE8CmxAG.js";
|
|
24
|
+
import { t as At } from "./x-CkD6A1iB.js";
|
|
25
|
+
import { t as jt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
26
|
+
import { t as Mt } from "./useCloudI18n-DGr3b2SX.js";
|
|
27
|
+
import { t as Nt } from "./useMergeTag-Ce95YIOO.js";
|
|
28
|
+
import { t as Pt } from "./useAliveFlag-C43EhZFY.js";
|
|
29
|
+
import { n as Ft, t as It } from "./emailFrameWidth-BmFCN2dp.js";
|
|
30
|
+
import { t as Lt } from "./readableTextColor-f8Kykfnh.js";
|
|
31
|
+
import { _ as Rt, f as W, g as zt, h as G, i as Bt, l as Vt, m as K, n as Ht, p as q, t as J, u as Ut } from "./ColorPicker-DXGrcJxJ.js";
|
|
32
|
+
import { n as Wt, r as Gt } from "./MergeTagSuggestion-Dn8ww9nV.js";
|
|
33
|
+
import { i as Y, n as X, r as Z, t as Kt } from "./NumberWithSuffix-BGocZkj9.js";
|
|
34
|
+
import { t as qt } from "./TplModal-DPH4vV8M.js";
|
|
35
|
+
var Jt = U("circle", [["circle", {
|
|
34
36
|
cx: "12",
|
|
35
37
|
cy: "12",
|
|
36
38
|
r: "10",
|
|
37
39
|
key: "1mglay"
|
|
38
|
-
}]]),
|
|
40
|
+
}]]), Yt = U("globe", [
|
|
39
41
|
["circle", {
|
|
40
42
|
cx: "12",
|
|
41
43
|
cy: "12",
|
|
@@ -50,7 +52,7 @@ var Ht = W("circle", [["circle", {
|
|
|
50
52
|
d: "M2 12h20",
|
|
51
53
|
key: "9i4pu4"
|
|
52
54
|
}]
|
|
53
|
-
]),
|
|
55
|
+
]), Xt = U("layout-template", [
|
|
54
56
|
["rect", {
|
|
55
57
|
width: "18",
|
|
56
58
|
height: "7",
|
|
@@ -75,7 +77,7 @@ var Ht = W("circle", [["circle", {
|
|
|
75
77
|
rx: "1",
|
|
76
78
|
key: "q5h2i8"
|
|
77
79
|
}]
|
|
78
|
-
]),
|
|
80
|
+
]), Zt = U("lock-open", [["rect", {
|
|
79
81
|
width: "18",
|
|
80
82
|
height: "11",
|
|
81
83
|
x: "3",
|
|
@@ -86,7 +88,7 @@ var Ht = W("circle", [["circle", {
|
|
|
86
88
|
}], ["path", {
|
|
87
89
|
d: "M7 11V7a5 5 0 0 1 9.9-1",
|
|
88
90
|
key: "1mm8w8"
|
|
89
|
-
}]]),
|
|
91
|
+
}]]), Qt = U("lock", [["rect", {
|
|
90
92
|
width: "18",
|
|
91
93
|
height: "11",
|
|
92
94
|
x: "3",
|
|
@@ -97,33 +99,10 @@ var Ht = W("circle", [["circle", {
|
|
|
97
99
|
}], ["path", {
|
|
98
100
|
d: "M7 11V7a5 5 0 0 1 10 0v4",
|
|
99
101
|
key: "fwvmzm"
|
|
100
|
-
}]]),
|
|
101
|
-
["rect", {
|
|
102
|
-
width: "20",
|
|
103
|
-
height: "14",
|
|
104
|
-
x: "2",
|
|
105
|
-
y: "3",
|
|
106
|
-
rx: "2",
|
|
107
|
-
key: "48i651"
|
|
108
|
-
}],
|
|
109
|
-
["line", {
|
|
110
|
-
x1: "8",
|
|
111
|
-
x2: "16",
|
|
112
|
-
y1: "21",
|
|
113
|
-
y2: "21",
|
|
114
|
-
key: "1svkeh"
|
|
115
|
-
}],
|
|
116
|
-
["line", {
|
|
117
|
-
x1: "12",
|
|
118
|
-
x2: "12",
|
|
119
|
-
y1: "17",
|
|
120
|
-
y2: "21",
|
|
121
|
-
key: "vw1qmm"
|
|
122
|
-
}]
|
|
123
|
-
]), Jt = W("moon", [["path", {
|
|
102
|
+
}]]), $t = U("moon", [["path", {
|
|
124
103
|
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
125
104
|
key: "kfwtm"
|
|
126
|
-
}]]),
|
|
105
|
+
}]]), en = U("panel-top", [["rect", {
|
|
127
106
|
width: "18",
|
|
128
107
|
height: "18",
|
|
129
108
|
x: "3",
|
|
@@ -133,19 +112,19 @@ var Ht = W("circle", [["circle", {
|
|
|
133
112
|
}], ["path", {
|
|
134
113
|
d: "M3 9h18",
|
|
135
114
|
key: "1pudct"
|
|
136
|
-
}]]), Q =
|
|
115
|
+
}]]), Q = U("plus", [["path", {
|
|
137
116
|
d: "M5 12h14",
|
|
138
117
|
key: "1ays0h"
|
|
139
118
|
}], ["path", {
|
|
140
119
|
d: "M12 5v14",
|
|
141
120
|
key: "s699le"
|
|
142
|
-
}]]),
|
|
121
|
+
}]]), tn = U("rotate-ccw", [["path", {
|
|
143
122
|
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
|
|
144
123
|
key: "1357e3"
|
|
145
124
|
}], ["path", {
|
|
146
125
|
d: "M3 3v5h5",
|
|
147
126
|
key: "1xhq8a"
|
|
148
|
-
}]]),
|
|
127
|
+
}]]), nn = U("settings", [["path", {
|
|
149
128
|
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
150
129
|
key: "1i5ecw"
|
|
151
130
|
}], ["circle", {
|
|
@@ -153,18 +132,7 @@ var Ht = W("circle", [["circle", {
|
|
|
153
132
|
cy: "12",
|
|
154
133
|
r: "3",
|
|
155
134
|
key: "1v7zrd"
|
|
156
|
-
}]]),
|
|
157
|
-
width: "14",
|
|
158
|
-
height: "20",
|
|
159
|
-
x: "5",
|
|
160
|
-
y: "2",
|
|
161
|
-
rx: "2",
|
|
162
|
-
ry: "2",
|
|
163
|
-
key: "1yt0o3"
|
|
164
|
-
}], ["path", {
|
|
165
|
-
d: "M12 18h.01",
|
|
166
|
-
key: "mhygvu"
|
|
167
|
-
}]]), $t = W("square-plus", [
|
|
135
|
+
}]]), rn = U("square-plus", [
|
|
168
136
|
["rect", {
|
|
169
137
|
width: "18",
|
|
170
138
|
height: "18",
|
|
@@ -181,14 +149,14 @@ var Ht = W("circle", [["circle", {
|
|
|
181
149
|
d: "M12 8v8",
|
|
182
150
|
key: "napkw2"
|
|
183
151
|
}]
|
|
184
|
-
]),
|
|
152
|
+
]), an = U("square", [["rect", {
|
|
185
153
|
width: "18",
|
|
186
154
|
height: "18",
|
|
187
155
|
x: "3",
|
|
188
156
|
y: "3",
|
|
189
157
|
rx: "2",
|
|
190
158
|
key: "afitv7"
|
|
191
|
-
}]]),
|
|
159
|
+
}]]), on = U("sun", [
|
|
192
160
|
["circle", {
|
|
193
161
|
cx: "12",
|
|
194
162
|
cy: "12",
|
|
@@ -230,8 +198,8 @@ var Ht = W("circle", [["circle", {
|
|
|
230
198
|
]);
|
|
231
199
|
//#endregion
|
|
232
200
|
//#region src/composables/useSavedBlocksFeature.ts
|
|
233
|
-
function
|
|
234
|
-
let { provider: t, editor: n } = e, r =
|
|
201
|
+
function sn(e) {
|
|
202
|
+
let { provider: t, editor: n } = e, r = De({
|
|
235
203
|
provider: t,
|
|
236
204
|
onError: e.onError
|
|
237
205
|
}), a = d(!1), o = d(!1), s = d(!1), c = d(/* @__PURE__ */ new Set()), l = w(() => s.value), u = w(() => c.value.size);
|
|
@@ -266,7 +234,7 @@ function nn(e) {
|
|
|
266
234
|
}
|
|
267
235
|
function x(e, t) {
|
|
268
236
|
for (let r = 0; r < e.content.length; r++) {
|
|
269
|
-
let i =
|
|
237
|
+
let i = ae(e.content[r]), a = t === void 0 ? void 0 : t + r;
|
|
270
238
|
n.addBlock(i, void 0, void 0, a);
|
|
271
239
|
}
|
|
272
240
|
o.value = !1;
|
|
@@ -275,7 +243,7 @@ function nn(e) {
|
|
|
275
243
|
r.load().catch(() => {});
|
|
276
244
|
}
|
|
277
245
|
let C = w(() => r.savedBlocks.value.length), T = w(() => e.isAvailable?.() ?? !0);
|
|
278
|
-
return v(
|
|
246
|
+
return v(Ve, r), {
|
|
279
247
|
headless: r,
|
|
280
248
|
isPicking: l,
|
|
281
249
|
pickedIds: c,
|
|
@@ -311,8 +279,101 @@ function nn(e) {
|
|
|
311
279
|
};
|
|
312
280
|
}
|
|
313
281
|
//#endregion
|
|
282
|
+
//#region src/utils/toMjml.ts
|
|
283
|
+
async function cn() {
|
|
284
|
+
try {
|
|
285
|
+
return await import("@templatical/renderer");
|
|
286
|
+
} catch {
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
async function ln(e) {
|
|
291
|
+
let t = await cn();
|
|
292
|
+
if (!t) throw Error("[Templatical] toMjml() requires the @templatical/renderer package. Please install it.");
|
|
293
|
+
let n = e.getCustomBlockStylesheet;
|
|
294
|
+
return t.renderToMjml(e.getContent(), {
|
|
295
|
+
renderCustomBlock: e.renderCustomBlock,
|
|
296
|
+
...n ? { getCustomBlockStylesheet: (e) => n(e) } : {}
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/composables/useTestEmailFeature.ts
|
|
301
|
+
var un = 1200;
|
|
302
|
+
function dn(e) {
|
|
303
|
+
let { provider: t } = e, n = d(!1), r = d(!1), i = d(!1), o = d(null), s = null, c = !1;
|
|
304
|
+
function l() {
|
|
305
|
+
s !== null && (clearTimeout(s), s = null);
|
|
306
|
+
}
|
|
307
|
+
a(l);
|
|
308
|
+
let u = w(() => t.allowedRecipients), f = w(() => {
|
|
309
|
+
let e = t.defaultRecipient;
|
|
310
|
+
if (e === void 0) return;
|
|
311
|
+
let n = u.value;
|
|
312
|
+
if (!(n && !n.includes(e))) return e;
|
|
313
|
+
}), p = w(() => u.value?.length === 0 ? !1 : e.isAvailable?.() ?? !0);
|
|
314
|
+
function m() {
|
|
315
|
+
p.value && (o.value = null, i.value = !1, l(), n.value = !0);
|
|
316
|
+
}
|
|
317
|
+
function h() {
|
|
318
|
+
l(), n.value = !1, i.value = !1;
|
|
319
|
+
}
|
|
320
|
+
async function g() {
|
|
321
|
+
if (!(!t.includeMjml || !e.renderMjml)) try {
|
|
322
|
+
return await e.renderMjml();
|
|
323
|
+
} catch (e) {
|
|
324
|
+
if (await cn() === null) {
|
|
325
|
+
c || (c = !0, fe.warn("testEmail.includeMjml is set but @templatical/renderer is not installed — sending the template as JSON only. Install it to receive `payload.mjml`."));
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
throw e;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
async function _(n) {
|
|
332
|
+
if (r.value) return;
|
|
333
|
+
let a = u.value;
|
|
334
|
+
if (a && !a.includes(n)) {
|
|
335
|
+
o.value = { kind: "recipientNotAllowed" };
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
r.value = !0, o.value = null;
|
|
339
|
+
try {
|
|
340
|
+
let r = await g();
|
|
341
|
+
await t.send({
|
|
342
|
+
recipient: n,
|
|
343
|
+
content: e.getContent(),
|
|
344
|
+
...r === void 0 ? {} : { mjml: r },
|
|
345
|
+
...a === void 0 ? {} : { allowedRecipients: a }
|
|
346
|
+
}), i.value = !0, s = setTimeout(h, un);
|
|
347
|
+
} catch (t) {
|
|
348
|
+
let n = t instanceof Error ? t : Error(String(t));
|
|
349
|
+
o.value = {
|
|
350
|
+
kind: "provider",
|
|
351
|
+
message: n.message
|
|
352
|
+
}, e.onError?.(n);
|
|
353
|
+
} finally {
|
|
354
|
+
r.value = !1;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return {
|
|
358
|
+
isModalOpen: n,
|
|
359
|
+
open: m,
|
|
360
|
+
close: h,
|
|
361
|
+
isSending: r,
|
|
362
|
+
justSent: i,
|
|
363
|
+
error: o,
|
|
364
|
+
send: _,
|
|
365
|
+
allowedRecipients: u,
|
|
366
|
+
defaultRecipient: f,
|
|
367
|
+
isAvailable: p,
|
|
368
|
+
capability: {
|
|
369
|
+
open: m,
|
|
370
|
+
isAvailable: p
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
//#endregion
|
|
314
375
|
//#region src/utils/resolveLintOptions.ts
|
|
315
|
-
function
|
|
376
|
+
function fn(e) {
|
|
316
377
|
return {
|
|
317
378
|
...e.lint,
|
|
318
379
|
locale: e.locale
|
|
@@ -320,19 +381,19 @@ function rn(e) {
|
|
|
320
381
|
}
|
|
321
382
|
//#endregion
|
|
322
383
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
323
|
-
var
|
|
384
|
+
var pn = ["aria-label"], mn = {
|
|
324
385
|
key: 0,
|
|
325
386
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
326
|
-
},
|
|
387
|
+
}, hn = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, gn = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, _n = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, vn = {
|
|
327
388
|
key: 0,
|
|
328
389
|
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)]"
|
|
329
|
-
},
|
|
390
|
+
}, yn = {
|
|
330
391
|
key: 1,
|
|
331
392
|
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)]"
|
|
332
|
-
},
|
|
393
|
+
}, bn = { class: "tpl:relative" }, xn = {
|
|
333
394
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
334
395
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
335
|
-
},
|
|
396
|
+
}, Sn = 96, Cn = /*#__PURE__*/ jt(/* @__PURE__ */ f({
|
|
336
397
|
__name: "Canvas",
|
|
337
398
|
props: {
|
|
338
399
|
viewport: {},
|
|
@@ -349,66 +410,63 @@ var an = ["aria-label"], on = {
|
|
|
349
410
|
],
|
|
350
411
|
setup(r, { emit: i }) {
|
|
351
412
|
let a = {
|
|
352
|
-
section:
|
|
353
|
-
title:
|
|
354
|
-
paragraph:
|
|
355
|
-
image:
|
|
356
|
-
button:
|
|
357
|
-
divider:
|
|
358
|
-
spacer:
|
|
359
|
-
html:
|
|
360
|
-
social:
|
|
361
|
-
menu:
|
|
362
|
-
table:
|
|
363
|
-
video:
|
|
364
|
-
custom:
|
|
365
|
-
}, u = r, f = i, { t: h } =
|
|
413
|
+
section: ke,
|
|
414
|
+
title: Se,
|
|
415
|
+
paragraph: Ce,
|
|
416
|
+
image: ve,
|
|
417
|
+
button: Pe,
|
|
418
|
+
divider: Ne,
|
|
419
|
+
spacer: be,
|
|
420
|
+
html: je,
|
|
421
|
+
social: me,
|
|
422
|
+
menu: ye,
|
|
423
|
+
table: Oe,
|
|
424
|
+
video: we,
|
|
425
|
+
custom: he
|
|
426
|
+
}, u = r, f = i, { t: h } = H(), { t: _ } = Mt(), S = He(Qe, "Canvas"), E = D(Xe, null), O = D(it, null), A = D(ot, {}), j = D(Ge, null);
|
|
427
|
+
v(qe, w(() => u.previewMode && (j?.value ?? !1)));
|
|
428
|
+
let N = w(() => (A.plan?.hasFeature("ai_generation") ?? !1) && (A.ai?.isFeatureEnabled("chat") ?? !1)), P = w(() => (A.plan?.hasFeature("ai_generation") ?? !1) && (A.ai?.isFeatureEnabled("designToTemplate") ?? !1)), F = w({
|
|
366
429
|
get: () => u.content.blocks,
|
|
367
430
|
set: (e) => {
|
|
368
|
-
|
|
431
|
+
S.setContent({
|
|
369
432
|
...u.content,
|
|
370
433
|
blocks: e
|
|
371
434
|
});
|
|
372
435
|
}
|
|
373
|
-
}),
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
default: return u.content.settings.width;
|
|
377
|
-
}
|
|
378
|
-
}), F = w(() => P.value + mn * 2), I = w(() => ge(u.content.settings)), L = w(() => N.value.length === 0 && !u.previewMode), R = d(0), z = w(() => L.value && R.value > 0);
|
|
379
|
-
function B() {
|
|
380
|
-
L.value && (R.value += 1);
|
|
436
|
+
}), I = w(() => Ft(u.content.settings, u.viewport)), L = w(() => I.value + Sn * 2), R = w(() => _e(u.content.settings)), z = w(() => F.value.length === 0 && !u.previewMode), B = d(0), ee = w(() => z.value && B.value > 0);
|
|
437
|
+
function te() {
|
|
438
|
+
z.value && (B.value += 1);
|
|
381
439
|
}
|
|
382
|
-
function
|
|
383
|
-
|
|
440
|
+
function ne() {
|
|
441
|
+
z.value && (B.value = Math.max(0, B.value - 1));
|
|
384
442
|
}
|
|
385
|
-
function
|
|
386
|
-
|
|
443
|
+
function re() {
|
|
444
|
+
B.value = 0;
|
|
387
445
|
}
|
|
388
|
-
function
|
|
389
|
-
u.previewMode ||
|
|
446
|
+
function ie(e) {
|
|
447
|
+
u.previewMode || A.savedBlocks?.isPicking.value || e.target === e.currentTarget && f("select-block", null);
|
|
390
448
|
}
|
|
391
|
-
function
|
|
392
|
-
return
|
|
449
|
+
function ae(e) {
|
|
450
|
+
return Ee(e, O, a);
|
|
393
451
|
}
|
|
394
|
-
function
|
|
452
|
+
function V(e) {
|
|
395
453
|
return u.lockedBlocks?.get(e) ?? null;
|
|
396
454
|
}
|
|
397
|
-
function
|
|
398
|
-
if (u.previewMode ||
|
|
399
|
-
let t =
|
|
455
|
+
function oe(e) {
|
|
456
|
+
if (u.previewMode || V(e)) return;
|
|
457
|
+
let t = A.savedBlocks;
|
|
400
458
|
if (t?.isPicking.value) {
|
|
401
459
|
t.togglePick(e);
|
|
402
460
|
return;
|
|
403
461
|
}
|
|
404
462
|
f("select-block", e);
|
|
405
463
|
}
|
|
406
|
-
function
|
|
407
|
-
return
|
|
464
|
+
function se(e) {
|
|
465
|
+
return A.savedBlocks?.isPicked(e) ?? !1;
|
|
408
466
|
}
|
|
409
|
-
let
|
|
410
|
-
function
|
|
411
|
-
e.type === "custom" &&
|
|
467
|
+
let ce = w(() => A.savedBlocks?.isPicking.value === !0);
|
|
468
|
+
function le(e, t) {
|
|
469
|
+
e.type === "custom" && S.updateBlock(e.id, {
|
|
412
470
|
fieldValues: t.fieldValues,
|
|
413
471
|
dataSourceFetched: t.dataSourceFetched
|
|
414
472
|
});
|
|
@@ -416,9 +474,9 @@ var an = ["aria-label"], on = {
|
|
|
416
474
|
return (i, a) => (s(), m("div", {
|
|
417
475
|
class: "tpl-canvas-stage tpl:relative tpl:flex tpl:justify-center tpl:rounded-lg",
|
|
418
476
|
style: t({
|
|
419
|
-
width: `${
|
|
477
|
+
width: `${L.value}px`,
|
|
420
478
|
boxShadow: r.darkMode ? "none" : "var(--tpl-shadow-xl)",
|
|
421
|
-
transition:
|
|
479
|
+
transition: x(It)
|
|
422
480
|
})
|
|
423
481
|
}, [p("div", {
|
|
424
482
|
class: "tpl-canvas-bg tpl:absolute tpl:inset-0 tpl:rounded-lg tpl:pointer-events-none",
|
|
@@ -433,19 +491,19 @@ var an = ["aria-label"], on = {
|
|
|
433
491
|
"aria-label": x(h).landmarks.canvas,
|
|
434
492
|
class: "tpl-canvas-wrapper tpl:relative",
|
|
435
493
|
style: t({
|
|
436
|
-
width: `${
|
|
437
|
-
transition:
|
|
494
|
+
width: `${I.value}px`,
|
|
495
|
+
transition: x(It)
|
|
438
496
|
})
|
|
439
497
|
}, [p("div", {
|
|
440
498
|
class: n(["tpl-canvas tpl:relative tpl:rounded-lg", {
|
|
441
499
|
"tpl-canvas--dark-mode": r.darkMode,
|
|
442
500
|
"tpl-preview-mode": r.previewMode
|
|
443
501
|
}]),
|
|
444
|
-
style: t(
|
|
445
|
-
onClick:
|
|
446
|
-
}, [g(x(
|
|
447
|
-
modelValue:
|
|
448
|
-
"onUpdate:modelValue": a[2] ||= (e) =>
|
|
502
|
+
style: t(R.value),
|
|
503
|
+
onClick: ie
|
|
504
|
+
}, [g(x(ge), {
|
|
505
|
+
modelValue: F.value,
|
|
506
|
+
"onUpdate:modelValue": a[2] ||= (e) => F.value = e,
|
|
449
507
|
group: "blocks",
|
|
450
508
|
animation: 150,
|
|
451
509
|
"ghost-class": "tpl-ghost",
|
|
@@ -458,72 +516,72 @@ var an = ["aria-label"], on = {
|
|
|
458
516
|
"force-fallback": !0,
|
|
459
517
|
class: n([
|
|
460
518
|
"tpl-canvas-blocks",
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
519
|
+
z.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors tpl:duration-150" : "",
|
|
520
|
+
z.value && ee.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
521
|
+
z.value && !ee.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
464
522
|
]),
|
|
465
|
-
onDragenter:
|
|
466
|
-
onDragleave:
|
|
467
|
-
onDrop:
|
|
523
|
+
onDragenter: te,
|
|
524
|
+
onDragleave: ne,
|
|
525
|
+
onDrop: re
|
|
468
526
|
}, {
|
|
469
|
-
default: l(() => [
|
|
470
|
-
p("div",
|
|
527
|
+
default: l(() => [z.value ? (s(), m("div", mn, [
|
|
528
|
+
p("div", hn, [g(x(rn), {
|
|
471
529
|
size: 48,
|
|
472
530
|
"stroke-width": 1
|
|
473
531
|
})]),
|
|
474
|
-
p("p",
|
|
475
|
-
p("p",
|
|
476
|
-
|
|
532
|
+
p("p", gn, c(x(h).canvas.noBlocks), 1),
|
|
533
|
+
p("p", _n, c(x(h).canvas.dragHint), 1),
|
|
534
|
+
N.value && x(_) ? (s(), m("p", vn, [
|
|
477
535
|
b(c(x(h).canvas.aiHintChat) + " ", 1),
|
|
478
536
|
p("button", {
|
|
479
537
|
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)]",
|
|
480
538
|
onClick: a[0] ||= (e) => f("open-ai-chat")
|
|
481
|
-
}, [g(x(
|
|
539
|
+
}, [g(x(Tt), {
|
|
482
540
|
size: 14,
|
|
483
541
|
"stroke-width": 2
|
|
484
542
|
}), b(" " + c(x(_).aiMenu.aiAssistant), 1)]),
|
|
485
543
|
b(" " + c(x(h).canvas.aiHintChatSuffix), 1)
|
|
486
544
|
])) : T("", !0),
|
|
487
|
-
|
|
545
|
+
P.value && x(_) ? (s(), m("p", yn, [
|
|
488
546
|
b(c(x(h).canvas.aiHintDesign) + " ", 1),
|
|
489
547
|
p("button", {
|
|
490
548
|
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)]",
|
|
491
549
|
onClick: a[1] ||= (e) => f("open-design-reference")
|
|
492
|
-
}, [g(x(
|
|
550
|
+
}, [g(x(yt), {
|
|
493
551
|
size: 14,
|
|
494
552
|
"stroke-width": 2
|
|
495
553
|
}), b(" " + c(x(_).aiMenu.designToTemplate), 1)]),
|
|
496
554
|
b(" " + c(x(h).canvas.aiHintDesignSuffix), 1)
|
|
497
555
|
])) : T("", !0)
|
|
498
|
-
])) : T("", !0), (s(!0), m(C, null, e(
|
|
556
|
+
])) : T("", !0), (s(!0), m(C, null, e(F.value, (e) => k((s(), m("div", {
|
|
499
557
|
key: e.id,
|
|
500
558
|
class: "tpl-block-item"
|
|
501
|
-
}, [p("div",
|
|
559
|
+
}, [p("div", bn, [V(e.id) ? (s(), m("div", {
|
|
502
560
|
key: 0,
|
|
503
561
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
504
562
|
style: t({
|
|
505
|
-
outline: `2px solid ${
|
|
563
|
+
outline: `2px solid ${V(e.id).color}`,
|
|
506
564
|
outlineOffset: "-1px"
|
|
507
565
|
})
|
|
508
566
|
}, [p("span", {
|
|
509
567
|
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",
|
|
510
568
|
style: t({
|
|
511
|
-
backgroundColor:
|
|
512
|
-
color: x(
|
|
569
|
+
backgroundColor: V(e.id).color,
|
|
570
|
+
color: x(Lt)(V(e.id).color)
|
|
513
571
|
})
|
|
514
|
-
}, [p("span",
|
|
572
|
+
}, [p("span", xn, c(V(e.id).name.charAt(0)), 1), b(" " + c(V(e.id).name), 1)], 4)], 4)) : T("", !0), g(Ae, {
|
|
515
573
|
block: e,
|
|
516
|
-
"is-selected": !r.previewMode && !
|
|
517
|
-
picked:
|
|
574
|
+
"is-selected": !r.previewMode && !ce.value && r.selectedBlockId === e.id && !V(e.id),
|
|
575
|
+
picked: se(e.id),
|
|
518
576
|
viewport: r.viewport,
|
|
519
577
|
"preview-mode": r.previewMode,
|
|
520
|
-
onSelect: (t) =>
|
|
578
|
+
onSelect: (t) => oe(e.id)
|
|
521
579
|
}, {
|
|
522
|
-
default: l(() => [(s(), y(o(
|
|
580
|
+
default: l(() => [(s(), y(o(ae(e)), {
|
|
523
581
|
block: e,
|
|
524
582
|
viewport: r.viewport,
|
|
525
|
-
onFetchData: (t) =>
|
|
526
|
-
onUpdate: (t) => x(
|
|
583
|
+
onFetchData: (t) => le(e, t),
|
|
584
|
+
onUpdate: (t) => x(S).updateBlock(e.id, t)
|
|
527
585
|
}, null, 40, [
|
|
528
586
|
"block",
|
|
529
587
|
"viewport",
|
|
@@ -538,18 +596,18 @@ var an = ["aria-label"], on = {
|
|
|
538
596
|
"viewport",
|
|
539
597
|
"preview-mode",
|
|
540
598
|
"onSelect"
|
|
541
|
-
])])])), [[M, !x(
|
|
599
|
+
])])])), [[M, !x(E)?.isHidden(e.id)]])), 128))]),
|
|
542
600
|
_: 1
|
|
543
601
|
}, 8, [
|
|
544
602
|
"modelValue",
|
|
545
603
|
"disabled",
|
|
546
604
|
"class"
|
|
547
|
-
])], 6)], 12,
|
|
605
|
+
])], 6)], 12, pn)], 4));
|
|
548
606
|
}
|
|
549
|
-
}), [["__scopeId", "data-v-
|
|
607
|
+
}), [["__scopeId", "data-v-236bcafd"]]), wn = f({
|
|
550
608
|
name: "CustomBlockStylesheets",
|
|
551
609
|
setup() {
|
|
552
|
-
let e = D(
|
|
610
|
+
let e = D(at, null);
|
|
553
611
|
return () => e ? e.value.map((e, t) => O("style", {
|
|
554
612
|
key: t,
|
|
555
613
|
"data-tpl-custom-block-stylesheet": "",
|
|
@@ -559,7 +617,7 @@ var an = ["aria-label"], on = {
|
|
|
559
617
|
});
|
|
560
618
|
//#endregion
|
|
561
619
|
//#region src/utils/resolvePaletteBlocks.ts
|
|
562
|
-
function
|
|
620
|
+
function Tn(e, t) {
|
|
563
621
|
if (!t || t.length === 0) return {
|
|
564
622
|
items: e,
|
|
565
623
|
unknown: []
|
|
@@ -578,24 +636,24 @@ function _n(e, t) {
|
|
|
578
636
|
}
|
|
579
637
|
//#endregion
|
|
580
638
|
//#region src/components/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
581
|
-
var
|
|
639
|
+
var En = ["aria-label"], Dn = {
|
|
582
640
|
key: 0,
|
|
583
641
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
584
|
-
},
|
|
642
|
+
}, On = ["aria-label"], kn = {
|
|
585
643
|
key: 0,
|
|
586
644
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
587
|
-
},
|
|
645
|
+
}, An = [
|
|
588
646
|
"data-palette-type",
|
|
589
647
|
"aria-label",
|
|
590
648
|
"onClick",
|
|
591
649
|
"onKeydown"
|
|
592
|
-
],
|
|
650
|
+
], jn = { 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" }, Mn = {
|
|
593
651
|
key: 0,
|
|
594
652
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
595
|
-
},
|
|
653
|
+
}, Nn = /* @__PURE__ */ f({
|
|
596
654
|
__name: "Sidebar",
|
|
597
655
|
setup(n) {
|
|
598
|
-
let { t: r, format: a } =
|
|
656
|
+
let { t: r, format: a } = H(), u = D(Ze, []), f = D(We, void 0), h = D(Ye, void 0), _ = D(Qe, null), v = D(ot, {}), b = w(() => v.savedBlocks?.isAvailable.value === !0), S = d(!1), E = d(!1);
|
|
599
657
|
function O() {
|
|
600
658
|
E.value || (S.value = !1);
|
|
601
659
|
}
|
|
@@ -621,27 +679,27 @@ var vn = ["aria-label"], yn = {
|
|
|
621
679
|
], M = w(() => {
|
|
622
680
|
let e = j.map((e) => ({
|
|
623
681
|
type: e,
|
|
624
|
-
label:
|
|
682
|
+
label: de(e, r)
|
|
625
683
|
}));
|
|
626
684
|
return v.plan && e.splice(-1, 0, {
|
|
627
685
|
type: "countdown",
|
|
628
|
-
label:
|
|
686
|
+
label: de("countdown", r)
|
|
629
687
|
}), e;
|
|
630
688
|
}), N = w(() => u.map((e) => ({
|
|
631
689
|
type: `custom:${e.type}`,
|
|
632
690
|
label: e.name,
|
|
633
691
|
isCustom: !0,
|
|
634
692
|
icon: e.icon
|
|
635
|
-
}))), P = w(() => [...M.value, ...N.value]), F = w(() =>
|
|
693
|
+
}))), P = w(() => [...M.value, ...N.value]), F = w(() => Tn(P.value, f)), I = w(() => F.value.items), L = /* @__PURE__ */ new Set();
|
|
636
694
|
i(() => F.value.unknown, (e) => {
|
|
637
|
-
for (let t of e) L.has(t) || (L.add(t),
|
|
695
|
+
for (let t of e) L.has(t) || (L.add(t), fe.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.`));
|
|
638
696
|
}, { immediate: !0 });
|
|
639
697
|
function R(e) {
|
|
640
698
|
if (e.isCustom) {
|
|
641
699
|
let t = e.type.replace("custom:", ""), n = u.find((e) => e.type === t);
|
|
642
|
-
if (n) return
|
|
700
|
+
if (n) return ne(n);
|
|
643
701
|
}
|
|
644
|
-
return
|
|
702
|
+
return ie(e.type, h);
|
|
645
703
|
}
|
|
646
704
|
function z(e) {
|
|
647
705
|
if (!_) return;
|
|
@@ -665,17 +723,17 @@ var vn = ["aria-label"], yn = {
|
|
|
665
723
|
onMouseleave: O,
|
|
666
724
|
onFocusin: i[2] ||= (e) => S.value = !0,
|
|
667
725
|
onFocusout: i[3] ||= (e) => S.value = !1
|
|
668
|
-
}, [b.value ? (s(), m("div",
|
|
726
|
+
}, [b.value ? (s(), m("div", Dn, [p("button", {
|
|
669
727
|
type: "button",
|
|
670
728
|
"aria-label": x(r).sidebarNav.browseSavedBlocks,
|
|
671
729
|
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)]",
|
|
672
730
|
style: t({ justifyContent: S.value ? "flex-start" : "center" }),
|
|
673
731
|
onClick: i[0] ||= (e) => x(v).savedBlocks?.openBrowser()
|
|
674
|
-
}, [g(x(
|
|
732
|
+
}, [g(x(ht), {
|
|
675
733
|
size: 20,
|
|
676
734
|
"stroke-width": 1.5,
|
|
677
735
|
class: "tpl:shrink-0"
|
|
678
|
-
}), S.value ? (s(), m("span",
|
|
736
|
+
}), S.value ? (s(), m("span", kn, c(x(r).savedBlocks.title), 1)) : T("", !0)], 12, On)])) : T("", !0), g(x(ge), {
|
|
679
737
|
"model-value": I.value,
|
|
680
738
|
group: {
|
|
681
739
|
name: "blocks",
|
|
@@ -699,22 +757,22 @@ var vn = ["aria-label"], yn = {
|
|
|
699
757
|
style: t({ justifyContent: S.value ? "flex-start" : "center" }),
|
|
700
758
|
onClick: (t) => z(e),
|
|
701
759
|
onKeydown: (t) => B(t, e)
|
|
702
|
-
}, [p("div",
|
|
760
|
+
}, [p("div", jn, [x(gt)[e.type] ? (s(), y(o(x(gt)[e.type]), {
|
|
703
761
|
key: 0,
|
|
704
762
|
size: 20,
|
|
705
763
|
"stroke-width": 1.5
|
|
706
|
-
})) : e.isCustom ? (s(), y(
|
|
764
|
+
})) : e.isCustom ? (s(), y(xe, {
|
|
707
765
|
key: 1,
|
|
708
766
|
icon: e.icon,
|
|
709
767
|
size: 20
|
|
710
|
-
}, null, 8, ["icon"])) : T("", !0)]), S.value ? (s(), m("span",
|
|
768
|
+
}, null, 8, ["icon"])) : T("", !0)]), S.value ? (s(), m("span", Mn, c(e.label), 1)) : T("", !0)], 44, An))), 128))]),
|
|
711
769
|
_: 1
|
|
712
|
-
}, 8, ["model-value"])], 44,
|
|
770
|
+
}, 8, ["model-value"])], 44, En));
|
|
713
771
|
}
|
|
714
772
|
});
|
|
715
773
|
//#endregion
|
|
716
774
|
//#region src/utils/mergeTagTrigger.ts
|
|
717
|
-
function
|
|
775
|
+
function Pn(e, t, n, r) {
|
|
718
776
|
if (!n) return null;
|
|
719
777
|
let i = e.slice(0, t), a = i.lastIndexOf(n);
|
|
720
778
|
if (a === -1) return null;
|
|
@@ -727,8 +785,8 @@ function En(e, t, n, r) {
|
|
|
727
785
|
}
|
|
728
786
|
//#endregion
|
|
729
787
|
//#region src/utils/textFieldCaret.ts
|
|
730
|
-
var
|
|
731
|
-
function
|
|
788
|
+
var Fn = /* @__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(".");
|
|
789
|
+
function In(e, t, n) {
|
|
732
790
|
return {
|
|
733
791
|
left: e,
|
|
734
792
|
top: t,
|
|
@@ -741,7 +799,7 @@ function On(e, t, n) {
|
|
|
741
799
|
toJSON: () => ({})
|
|
742
800
|
};
|
|
743
801
|
}
|
|
744
|
-
function
|
|
802
|
+
function Ln(e, t) {
|
|
745
803
|
let n = e.ownerDocument, r = n.defaultView;
|
|
746
804
|
if (!r) return null;
|
|
747
805
|
let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
|
|
@@ -749,7 +807,7 @@ function kn(e, t) {
|
|
|
749
807
|
let s = o.style;
|
|
750
808
|
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";
|
|
751
809
|
let c = s, l = a;
|
|
752
|
-
for (let e of
|
|
810
|
+
for (let e of Fn) c[e] = l[e];
|
|
753
811
|
i && (s.width = "auto", s.whiteSpace = "pre");
|
|
754
812
|
let u = e.value, d = u.slice(0, t);
|
|
755
813
|
i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
|
|
@@ -758,26 +816,26 @@ function kn(e, t) {
|
|
|
758
816
|
let p = f.offsetTop, m = f.offsetLeft;
|
|
759
817
|
n.body.removeChild(o);
|
|
760
818
|
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;
|
|
761
|
-
if (i) return
|
|
819
|
+
if (i) return In(y, h.top, h.bottom);
|
|
762
820
|
let b = h.top + p + g - e.scrollTop;
|
|
763
|
-
return
|
|
821
|
+
return In(y, b, b + v);
|
|
764
822
|
}
|
|
765
823
|
//#endregion
|
|
766
824
|
//#region src/composables/useMergeTagAutocomplete.ts
|
|
767
|
-
var
|
|
825
|
+
var Rn = /* @__PURE__ */ new Set([
|
|
768
826
|
"ArrowLeft",
|
|
769
827
|
"ArrowRight",
|
|
770
828
|
"Home",
|
|
771
829
|
"End"
|
|
772
830
|
]);
|
|
773
|
-
function
|
|
774
|
-
let { elementRef: t, modelValue: n, emit: i, mergeTags: o, syntax: s, enabled: c, onInsert: l } = e, d =
|
|
831
|
+
function zn(e) {
|
|
832
|
+
let { elementRef: t, modelValue: n, emit: i, mergeTags: o, syntax: s, enabled: c, onInsert: l } = e, d = I(s), f = re(s), p = c && d !== null && o.length > 0, m = D(ct, null), h = Wt((u(m) ? m.value : m)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", Re()), g = !1;
|
|
775
833
|
r() && a(() => {
|
|
776
834
|
g = !0, h.close();
|
|
777
835
|
});
|
|
778
836
|
function _(e) {
|
|
779
837
|
let t = e.value ?? "";
|
|
780
|
-
return
|
|
838
|
+
return Pn(t, e.selectionStart ?? t.length, d, f);
|
|
781
839
|
}
|
|
782
840
|
function v(e, r, a) {
|
|
783
841
|
let o = e.value ?? n(), s = o.slice(r.caret), c = f && s.startsWith(f) ? f.length : 0, u = o.slice(0, r.triggerStart), d = o.slice(r.caret + c), p = u + a.value + d, m = u.length + a.value.length;
|
|
@@ -799,7 +857,7 @@ function jn(e) {
|
|
|
799
857
|
h.close();
|
|
800
858
|
return;
|
|
801
859
|
}
|
|
802
|
-
let r =
|
|
860
|
+
let r = Gt(o, n.query), i = () => Ln(e, n.triggerStart), a = (t) => v(e, n, t);
|
|
803
861
|
h.isOpen() ? h.update({
|
|
804
862
|
items: r,
|
|
805
863
|
getRect: i,
|
|
@@ -812,7 +870,7 @@ function jn(e) {
|
|
|
812
870
|
});
|
|
813
871
|
}
|
|
814
872
|
function b(e) {
|
|
815
|
-
return h.isOpen() ? e.key === "Escape" ? (h.close(), !0) :
|
|
873
|
+
return h.isOpen() ? e.key === "Escape" ? (h.close(), !0) : Rn.has(e.key) ? (h.close(), !1) : h.handleKeyDown(e) : !1;
|
|
816
874
|
}
|
|
817
875
|
return {
|
|
818
876
|
available: p,
|
|
@@ -824,12 +882,12 @@ function jn(e) {
|
|
|
824
882
|
}
|
|
825
883
|
//#endregion
|
|
826
884
|
//#region src/composables/useMergeTagField.ts
|
|
827
|
-
function
|
|
828
|
-
let { modelValue: t, emit: n, elementRef: i } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: c, isMergeTagValue: l, getMergeTagLabel: u, requestMergeTag: f, syntax: p, autocomplete: m } =
|
|
885
|
+
function Bn(e) {
|
|
886
|
+
let { modelValue: t, emit: n, elementRef: i } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: c, isMergeTagValue: l, getMergeTagLabel: u, requestMergeTag: f, syntax: p, autocomplete: m } = Nt(), { canInsertLogicTag: h, isRequesting: g, requestLogicTag: _ } = Me(), v = d(!1), y = !1, b = !1;
|
|
829
887
|
r() && a(() => {
|
|
830
888
|
b = !0;
|
|
831
889
|
});
|
|
832
|
-
let x =
|
|
890
|
+
let x = zn({
|
|
833
891
|
elementRef: i,
|
|
834
892
|
modelValue: t,
|
|
835
893
|
emit: n,
|
|
@@ -853,7 +911,7 @@ function Mn(e) {
|
|
|
853
911
|
type: "mergeTag",
|
|
854
912
|
value: t,
|
|
855
913
|
label: u(t)
|
|
856
|
-
}) :
|
|
914
|
+
}) : z(t, p) ? n.push({
|
|
857
915
|
type: "logicMergeTag",
|
|
858
916
|
value: t,
|
|
859
917
|
keyword: L(t, p)
|
|
@@ -951,10 +1009,10 @@ function Mn(e) {
|
|
|
951
1009
|
}
|
|
952
1010
|
//#endregion
|
|
953
1011
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
954
|
-
var
|
|
1012
|
+
var Vn = ["aria-label", "onKeydown"], Hn = ["data-tooltip"], Un = ["data-tooltip"], Wn = {
|
|
955
1013
|
key: 2,
|
|
956
1014
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
957
|
-
},
|
|
1015
|
+
}, Gn = ["aria-label", "title"], Kn = /* @__PURE__ */ f({
|
|
958
1016
|
__name: "MergeTagSegments",
|
|
959
1017
|
props: {
|
|
960
1018
|
segments: {},
|
|
@@ -963,7 +1021,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
963
1021
|
},
|
|
964
1022
|
emits: ["edit", "clear"],
|
|
965
1023
|
setup(t, { emit: r }) {
|
|
966
|
-
let i = r, { t: a } =
|
|
1024
|
+
let i = r, { t: a } = H();
|
|
967
1025
|
function o() {
|
|
968
1026
|
i("edit");
|
|
969
1027
|
}
|
|
@@ -982,7 +1040,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
982
1040
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
983
1041
|
color: "var(--tpl-primary)"
|
|
984
1042
|
}
|
|
985
|
-
}, c(e.label), 9,
|
|
1043
|
+
}, c(e.label), 9, Hn)) : e.type === "logicMergeTag" ? (s(), m("span", {
|
|
986
1044
|
key: 1,
|
|
987
1045
|
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",
|
|
988
1046
|
"data-tooltip": e.value,
|
|
@@ -991,75 +1049,75 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
991
1049
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
992
1050
|
color: "var(--tpl-primary)"
|
|
993
1051
|
}
|
|
994
|
-
}, c(e.keyword), 9,
|
|
1052
|
+
}, c(e.keyword), 9, Un)) : (s(), m("span", Wn, c(e.value), 1))], 64))), 128)), p("button", {
|
|
995
1053
|
type: "button",
|
|
996
1054
|
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",
|
|
997
1055
|
"aria-label": x(a).mergeTag.remove,
|
|
998
1056
|
title: x(a).mergeTag.remove,
|
|
999
1057
|
onClick: l[0] ||= j((e) => i("clear"), ["stop"])
|
|
1000
|
-
}, [g(x(
|
|
1058
|
+
}, [g(x(At), {
|
|
1001
1059
|
size: 12,
|
|
1002
1060
|
"stroke-width": 2.5
|
|
1003
|
-
})], 8,
|
|
1061
|
+
})], 8, Gn)], 42, Vn));
|
|
1004
1062
|
}
|
|
1005
|
-
}),
|
|
1063
|
+
}), qn = [
|
|
1006
1064
|
"aria-label",
|
|
1007
1065
|
"title",
|
|
1008
1066
|
"disabled"
|
|
1009
|
-
],
|
|
1067
|
+
], Jn = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", Yn = /* @__PURE__ */ f({
|
|
1010
1068
|
__name: "MergeTagInsertButton",
|
|
1011
1069
|
props: { disabled: { type: Boolean } },
|
|
1012
1070
|
emits: ["insert"],
|
|
1013
1071
|
setup(e) {
|
|
1014
|
-
let { t } =
|
|
1072
|
+
let { t } = H();
|
|
1015
1073
|
return (r, i) => (s(), m("button", {
|
|
1016
1074
|
type: "button",
|
|
1017
|
-
class: n([
|
|
1075
|
+
class: n([Jn, "tpl:mt-1.5"]),
|
|
1018
1076
|
"aria-label": x(t).mergeTag.insert,
|
|
1019
1077
|
title: x(t).mergeTag.insert,
|
|
1020
1078
|
disabled: e.disabled,
|
|
1021
1079
|
onMousedown: i[0] ||= j(() => {}, ["prevent"]),
|
|
1022
1080
|
onClick: i[1] ||= (e) => r.$emit("insert")
|
|
1023
|
-
}, [g(x(
|
|
1081
|
+
}, [g(x(ut), {
|
|
1024
1082
|
size: 12,
|
|
1025
1083
|
"stroke-width": 2
|
|
1026
|
-
}), b(" " + c(x(t).mergeTag.insertShort), 1)], 42,
|
|
1084
|
+
}), b(" " + c(x(t).mergeTag.insertShort), 1)], 42, qn));
|
|
1027
1085
|
}
|
|
1028
|
-
}),
|
|
1086
|
+
}), Xn = [
|
|
1029
1087
|
"aria-label",
|
|
1030
1088
|
"title",
|
|
1031
1089
|
"disabled"
|
|
1032
|
-
],
|
|
1090
|
+
], Zn = "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)]", Qn = /* @__PURE__ */ f({
|
|
1033
1091
|
__name: "LogicTagInsertButton",
|
|
1034
1092
|
props: { disabled: { type: Boolean } },
|
|
1035
1093
|
emits: ["insert"],
|
|
1036
1094
|
setup(e) {
|
|
1037
|
-
let { t } =
|
|
1095
|
+
let { t } = H();
|
|
1038
1096
|
return (r, i) => (s(), m("button", {
|
|
1039
1097
|
type: "button",
|
|
1040
|
-
class: n([
|
|
1098
|
+
class: n([Zn, "tpl:mt-1.5"]),
|
|
1041
1099
|
"aria-label": x(t).logicTag.insert,
|
|
1042
1100
|
title: x(t).logicTag.insert,
|
|
1043
1101
|
disabled: e.disabled,
|
|
1044
1102
|
"data-testid": "field-insert-logic-button",
|
|
1045
1103
|
onMousedown: i[0] ||= j(() => {}, ["prevent"]),
|
|
1046
1104
|
onClick: i[1] ||= (e) => r.$emit("insert")
|
|
1047
|
-
}, [g(x(
|
|
1105
|
+
}, [g(x(lt), {
|
|
1048
1106
|
size: 12,
|
|
1049
1107
|
"stroke-width": 2
|
|
1050
|
-
}), b(" " + c(x(t).logicTag.insertShort), 1)], 42,
|
|
1108
|
+
}), b(" " + c(x(t).logicTag.insertShort), 1)], 42, Xn));
|
|
1051
1109
|
}
|
|
1052
|
-
}),
|
|
1110
|
+
}), $n = { key: 0 }, er = {
|
|
1053
1111
|
key: 0,
|
|
1054
1112
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
1055
|
-
},
|
|
1113
|
+
}, tr = { key: 1 }, nr = [
|
|
1056
1114
|
"value",
|
|
1057
1115
|
"placeholder",
|
|
1058
1116
|
"rows"
|
|
1059
|
-
],
|
|
1117
|
+
], rr = {
|
|
1060
1118
|
key: 0,
|
|
1061
1119
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
1062
|
-
},
|
|
1120
|
+
}, ir = "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)]", ar = "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)]", or = /* @__PURE__ */ f({
|
|
1063
1121
|
__name: "MergeTagTextarea",
|
|
1064
1122
|
props: {
|
|
1065
1123
|
modelValue: {},
|
|
@@ -1068,32 +1126,32 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1068
1126
|
},
|
|
1069
1127
|
emits: ["update:modelValue"],
|
|
1070
1128
|
setup(e, { emit: t }) {
|
|
1071
|
-
let r = e, i = t, a = d(null), { segments: o, hasMergeTags: c, canRequestMergeTag: l, isRequestingMergeTag: u, canInsertLogicTag: f, isRequestingLogicTag: h, isEditing: _, startEditing: v, handleInput: b, handleKeydown: S, handleClick: C, handleBlur: w, clearValue: E, insertMergeTag: D, insertLogicTag: O } =
|
|
1129
|
+
let r = e, i = t, a = d(null), { segments: o, hasMergeTags: c, canRequestMergeTag: l, isRequestingMergeTag: u, canInsertLogicTag: f, isRequestingLogicTag: h, isEditing: _, startEditing: v, handleInput: b, handleKeydown: S, handleClick: C, handleBlur: w, clearValue: E, insertMergeTag: D, insertLogicTag: O } = Bn({
|
|
1072
1130
|
modelValue: () => r.modelValue,
|
|
1073
1131
|
emit: (e) => i("update:modelValue", e),
|
|
1074
1132
|
elementRef: a
|
|
1075
1133
|
});
|
|
1076
|
-
return (t, r) => x(c) && !x(_) ? (s(), m("div",
|
|
1134
|
+
return (t, r) => x(c) && !x(_) ? (s(), m("div", $n, [g(Kn, {
|
|
1077
1135
|
segments: x(o),
|
|
1078
|
-
"display-class":
|
|
1136
|
+
"display-class": ar,
|
|
1079
1137
|
onEdit: x(v),
|
|
1080
1138
|
onClear: x(E)
|
|
1081
1139
|
}, null, 8, [
|
|
1082
1140
|
"segments",
|
|
1083
1141
|
"onEdit",
|
|
1084
1142
|
"onClear"
|
|
1085
|
-
]), x(l) || x(f) ? (s(), m("div",
|
|
1143
|
+
]), x(l) || x(f) ? (s(), m("div", er, [x(l) ? (s(), y(Yn, {
|
|
1086
1144
|
key: 0,
|
|
1087
1145
|
disabled: x(u),
|
|
1088
1146
|
onInsert: x(D)
|
|
1089
|
-
}, null, 8, ["disabled", "onInsert"])) : T("", !0), x(f) ? (s(), y(
|
|
1147
|
+
}, null, 8, ["disabled", "onInsert"])) : T("", !0), x(f) ? (s(), y(Qn, {
|
|
1090
1148
|
key: 1,
|
|
1091
1149
|
disabled: x(h),
|
|
1092
1150
|
onInsert: x(O)
|
|
1093
|
-
}, null, 8, ["disabled", "onInsert"])) : T("", !0)])) : T("", !0)])) : (s(), m("div",
|
|
1151
|
+
}, null, 8, ["disabled", "onInsert"])) : T("", !0)])) : T("", !0)])) : (s(), m("div", tr, [p("textarea", {
|
|
1094
1152
|
ref_key: "textareaRef",
|
|
1095
1153
|
ref: a,
|
|
1096
|
-
class: n(
|
|
1154
|
+
class: n(ir),
|
|
1097
1155
|
value: e.modelValue,
|
|
1098
1156
|
placeholder: e.placeholder,
|
|
1099
1157
|
rows: e.rows,
|
|
@@ -1101,22 +1159,22 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1101
1159
|
onKeydown: r[1] ||= (...e) => x(S) && x(S)(...e),
|
|
1102
1160
|
onClick: r[2] ||= (...e) => x(C) && x(C)(...e),
|
|
1103
1161
|
onBlur: r[3] ||= (...e) => x(w) && x(w)(...e)
|
|
1104
|
-
}, null, 40,
|
|
1162
|
+
}, null, 40, nr), x(l) || x(f) ? (s(), m("div", rr, [x(l) ? (s(), y(Yn, {
|
|
1105
1163
|
key: 0,
|
|
1106
1164
|
disabled: x(u),
|
|
1107
1165
|
onInsert: x(D)
|
|
1108
|
-
}, null, 8, ["disabled", "onInsert"])) : T("", !0), x(f) ? (s(), y(
|
|
1166
|
+
}, null, 8, ["disabled", "onInsert"])) : T("", !0), x(f) ? (s(), y(Qn, {
|
|
1109
1167
|
key: 1,
|
|
1110
1168
|
disabled: x(h),
|
|
1111
1169
|
onInsert: x(O)
|
|
1112
1170
|
}, null, 8, ["disabled", "onInsert"])) : T("", !0)])) : T("", !0)]));
|
|
1113
1171
|
}
|
|
1114
|
-
}),
|
|
1172
|
+
}), sr = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, cr = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, 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 = { class: "tpl:mb-3.5" }, dr = { 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)]" }, fr = ["onClick"], pr = { class: "tpl:flex tpl:items-stretch" }, mr = ["value"], hr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, gr = { class: "tpl:mb-3.5" }, _r = { class: "tpl:mb-3.5" }, vr = { class: "tpl:mb-3.5" }, yr = { class: "tpl:mb-3.5" }, br = ["value"], xr = ["value"], Sr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Cr = ["value"], wr = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Tr = { 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:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Dr = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Or = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, kr = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, Ar = { 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)]" }, jr = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Mr = { class: "tpl:mb-1 tpl:last:mb-0" }, Nr = { class: "tpl:mb-1 tpl:last:mb-0" }, Pr = { class: "tpl:mb-1 tpl:last:mb-0" }, Fr = 150, Ir = /* @__PURE__ */ f({
|
|
1115
1173
|
__name: "TemplateSettings",
|
|
1116
1174
|
props: { settings: {} },
|
|
1117
1175
|
emits: ["update"],
|
|
1118
1176
|
setup(r, { emit: i }) {
|
|
1119
|
-
let a = r, o = i, { t: l } =
|
|
1177
|
+
let a = r, o = i, { t: l } = H(), u = He(Je, "TemplateSettings"), d = w(() => u.fonts.value), f = w(() => d.value.some((e) => e.value === a.settings.fontFamily) ? a.settings.fontFamily : u.defaultFont.value), h = [
|
|
1120
1178
|
{
|
|
1121
1179
|
value: 480,
|
|
1122
1180
|
label: "480px"
|
|
@@ -1134,14 +1192,14 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1134
1192
|
label: "800px"
|
|
1135
1193
|
}
|
|
1136
1194
|
];
|
|
1137
|
-
return (i, a) => (s(), m("aside",
|
|
1138
|
-
p("div", { class: n(x(
|
|
1139
|
-
p("div",
|
|
1195
|
+
return (i, a) => (s(), m("aside", sr, [p("div", cr, [
|
|
1196
|
+
p("div", { class: n(x(Ut)) }, [
|
|
1197
|
+
p("div", lr, [g(x(an), {
|
|
1140
1198
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1141
1199
|
size: 14,
|
|
1142
1200
|
"stroke-width": 2
|
|
1143
1201
|
}), p("span", null, c(x(l).templateSettings.layout), 1)]),
|
|
1144
|
-
p("div",
|
|
1202
|
+
p("div", ur, [p("label", { class: n(x(G)) }, c(x(l).templateSettings.widthPreset), 3), p("div", dr, [(s(), m(C, null, e(h, (e) => p("button", {
|
|
1145
1203
|
key: e.value,
|
|
1146
1204
|
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)]",
|
|
1147
1205
|
style: t({
|
|
@@ -1150,101 +1208,101 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1150
1208
|
boxShadow: r.settings.width === e.value ? "var(--tpl-shadow)" : "none"
|
|
1151
1209
|
}),
|
|
1152
1210
|
onClick: (t) => o("update", { width: e.value })
|
|
1153
|
-
}, c(e.label), 13,
|
|
1154
|
-
p("div", null, [p("label", { class: n(x(
|
|
1211
|
+
}, c(e.label), 13, fr)), 64))])]),
|
|
1212
|
+
p("div", null, [p("label", { class: n(x(G)) }, c(x(l).templateSettings.customWidth), 3), p("div", pr, [p("input", {
|
|
1155
1213
|
type: "number",
|
|
1156
|
-
class: n(x(
|
|
1214
|
+
class: n(x(q)),
|
|
1157
1215
|
value: r.settings.width,
|
|
1158
1216
|
min: "300",
|
|
1159
1217
|
max: "900",
|
|
1160
1218
|
onInput: a[0] ||= (e) => o("update", { width: Number(e.target.value) })
|
|
1161
|
-
}, null, 42,
|
|
1219
|
+
}, null, 42, mr), p("span", { class: n(x(K)) }, "px", 2)])])
|
|
1162
1220
|
], 2),
|
|
1163
|
-
p("div", { class: n(x(
|
|
1164
|
-
p("div",
|
|
1221
|
+
p("div", { class: n(x(Ut)) }, [
|
|
1222
|
+
p("div", hr, [g(x(Jt), {
|
|
1165
1223
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1166
1224
|
size: 14,
|
|
1167
1225
|
"stroke-width": 2
|
|
1168
1226
|
}), p("span", null, c(x(l).templateSettings.appearance), 1)]),
|
|
1169
|
-
p("div",
|
|
1227
|
+
p("div", gr, [p("label", { class: n(x(G)) }, c(x(l).templateSettings.backgroundColor), 3), g(J, {
|
|
1170
1228
|
"model-value": r.settings.backgroundColor,
|
|
1171
|
-
placeholder: x(
|
|
1229
|
+
placeholder: x(Ht),
|
|
1172
1230
|
"onUpdate:modelValue": a[1] ||= (e) => o("update", { backgroundColor: e })
|
|
1173
1231
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
1174
|
-
p("div",
|
|
1232
|
+
p("div", _r, [p("label", { class: n(x(G)) }, c(x(l).templateSettings.textColor), 3), g(J, {
|
|
1175
1233
|
"model-value": r.settings.textColor ?? "",
|
|
1176
1234
|
"seed-color": "#1a1a1a",
|
|
1177
1235
|
"onUpdate:modelValue": a[2] ||= (e) => o("update", { textColor: e })
|
|
1178
1236
|
}, null, 8, ["model-value"])]),
|
|
1179
|
-
p("div",
|
|
1237
|
+
p("div", vr, [p("label", { class: n(x(G)) }, c(x(l).templateSettings.linkColor), 3), g(J, {
|
|
1180
1238
|
"model-value": r.settings.linkColor ?? "",
|
|
1181
1239
|
"seed-color": "#0066cc",
|
|
1182
1240
|
"onUpdate:modelValue": a[3] ||= (e) => o("update", { linkColor: e || void 0 })
|
|
1183
1241
|
}, null, 8, ["model-value"])]),
|
|
1184
|
-
p("div",
|
|
1242
|
+
p("div", yr, [g(Y, {
|
|
1185
1243
|
class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
1186
1244
|
"model-value": r.settings.linkUnderline,
|
|
1187
1245
|
label: x(l).templateSettings.linkUnderline,
|
|
1188
1246
|
"onUpdate:modelValue": a[4] ||= (e) => o("update", { linkUnderline: e })
|
|
1189
1247
|
}, null, 8, ["model-value", "label"])]),
|
|
1190
|
-
p("div", null, [p("label", { class: n(x(
|
|
1191
|
-
class: n(x(
|
|
1248
|
+
p("div", null, [p("label", { class: n(x(G)) }, c(x(l).templateSettings.fontFamily), 3), p("select", {
|
|
1249
|
+
class: n(x(W)),
|
|
1192
1250
|
value: f.value,
|
|
1193
1251
|
onChange: a[5] ||= (e) => o("update", { fontFamily: e.target.value })
|
|
1194
1252
|
}, [(s(!0), m(C, null, e(d.value, (e) => (s(), m("option", {
|
|
1195
1253
|
key: e.value,
|
|
1196
1254
|
value: e.value
|
|
1197
|
-
}, c(e.label), 9,
|
|
1255
|
+
}, c(e.label), 9, xr))), 128))], 42, br)])
|
|
1198
1256
|
], 2),
|
|
1199
|
-
p("div", { class: n(x(
|
|
1257
|
+
p("div", { class: n(x(Ut)) }, [p("div", Sr, [g(x(Yt), {
|
|
1200
1258
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1201
1259
|
size: 14,
|
|
1202
1260
|
"stroke-width": 2
|
|
1203
1261
|
}), p("span", null, c(x(l).templateSettings.language), 1)]), p("div", null, [
|
|
1204
|
-
p("label", { class: n(x(
|
|
1262
|
+
p("label", { class: n(x(G)) }, c(x(l).templateSettings.contentLocale), 3),
|
|
1205
1263
|
p("input", {
|
|
1206
1264
|
type: "text",
|
|
1207
|
-
class: n(x(
|
|
1265
|
+
class: n(x(W)),
|
|
1208
1266
|
value: r.settings.locale ?? "",
|
|
1209
1267
|
placeholder: "en",
|
|
1210
1268
|
spellcheck: "false",
|
|
1211
1269
|
autocapitalize: "off",
|
|
1212
1270
|
autocomplete: "off",
|
|
1213
1271
|
onInput: a[6] ||= (e) => o("update", { locale: e.target.value.trim() || void 0 })
|
|
1214
|
-
}, null, 42,
|
|
1215
|
-
p("p",
|
|
1272
|
+
}, null, 42, Cr),
|
|
1273
|
+
p("p", wr, c(x(l).templateSettings.contentLocaleHint), 1)
|
|
1216
1274
|
])], 2),
|
|
1217
|
-
p("div", { class: n(x(
|
|
1275
|
+
p("div", { class: n(x(Ut)) }, [p("div", Tr, [g(x(_t), {
|
|
1218
1276
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1219
1277
|
size: 14,
|
|
1220
1278
|
"stroke-width": 2
|
|
1221
|
-
}), p("span", null, c(x(l).templateSettings.preheaderText), 1)]), p("div", null, [g(
|
|
1279
|
+
}), p("span", null, c(x(l).templateSettings.preheaderText), 1)]), p("div", null, [g(or, {
|
|
1222
1280
|
"model-value": r.settings.preheaderText ?? "",
|
|
1223
1281
|
placeholder: x(l).templateSettings.preheaderTextPlaceholder,
|
|
1224
1282
|
rows: 2,
|
|
1225
1283
|
"onUpdate:modelValue": a[7] ||= (e) => o("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
1226
|
-
}, null, 8, ["model-value", "placeholder"]), p("div",
|
|
1227
|
-
p("div",
|
|
1284
|
+
}, null, 8, ["model-value", "placeholder"]), p("div", Er, [p("span", Dr, c(x(l).templateSettings.preheaderTextHint), 1), p("span", Or, c((r.settings.preheaderText ?? "").length) + "/" + c(Fr), 1)])])], 2),
|
|
1285
|
+
p("div", kr, [p("div", Ar, [g(x(bt), {
|
|
1228
1286
|
size: 14,
|
|
1229
1287
|
"stroke-width": 2
|
|
1230
|
-
}), p("span", null, c(x(l).templateSettings.tips), 1)]), p("ul",
|
|
1231
|
-
p("li",
|
|
1232
|
-
p("li",
|
|
1233
|
-
p("li",
|
|
1288
|
+
}), p("span", null, c(x(l).templateSettings.tips), 1)]), p("ul", jr, [
|
|
1289
|
+
p("li", Mr, c(x(l).templateSettings.tip1), 1),
|
|
1290
|
+
p("li", Nr, c(x(l).templateSettings.tip2), 1),
|
|
1291
|
+
p("li", Pr, c(x(l).templateSettings.tip3), 1)
|
|
1234
1292
|
])])
|
|
1235
1293
|
])]));
|
|
1236
1294
|
}
|
|
1237
|
-
}),
|
|
1295
|
+
}), Lr = { key: 0 }, Rr = {
|
|
1238
1296
|
key: 0,
|
|
1239
1297
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
1240
|
-
},
|
|
1298
|
+
}, zr = { key: 1 }, Br = [
|
|
1241
1299
|
"type",
|
|
1242
1300
|
"value",
|
|
1243
1301
|
"placeholder"
|
|
1244
|
-
],
|
|
1302
|
+
], Vr = {
|
|
1245
1303
|
key: 0,
|
|
1246
1304
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
1247
|
-
},
|
|
1305
|
+
}, Hr = "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)]", $ = /*#__PURE__*/ jt(/* @__PURE__ */ f({
|
|
1248
1306
|
__name: "MergeTagInput",
|
|
1249
1307
|
props: {
|
|
1250
1308
|
modelValue: {},
|
|
@@ -1257,14 +1315,14 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1257
1315
|
},
|
|
1258
1316
|
emits: ["update:modelValue"],
|
|
1259
1317
|
setup(e, { emit: t }) {
|
|
1260
|
-
let r = e, i = t, a = d(null), { segments: o, hasMergeTags: c, canRequestMergeTag: l, isRequestingMergeTag: u, canInsertLogicTag: f, isRequestingLogicTag: h, isEditing: _, startEditing: v, handleInput: b, handleKeydown: S, handleClick: C, handleBlur: w, clearValue: E, insertMergeTag: D, insertLogicTag: O } =
|
|
1318
|
+
let r = e, i = t, a = d(null), { segments: o, hasMergeTags: c, canRequestMergeTag: l, isRequestingMergeTag: u, canInsertLogicTag: f, isRequestingLogicTag: h, isEditing: _, startEditing: v, handleInput: b, handleKeydown: S, handleClick: C, handleBlur: w, clearValue: E, insertMergeTag: D, insertLogicTag: O } = Bn({
|
|
1261
1319
|
modelValue: () => r.modelValue,
|
|
1262
1320
|
emit: (e) => i("update:modelValue", e),
|
|
1263
1321
|
elementRef: a
|
|
1264
1322
|
});
|
|
1265
|
-
return (t, r) => x(c) && !x(_) ? (s(), m("div",
|
|
1323
|
+
return (t, r) => x(c) && !x(_) ? (s(), m("div", Lr, [g(Kn, {
|
|
1266
1324
|
segments: x(o),
|
|
1267
|
-
"display-class":
|
|
1325
|
+
"display-class": Hr,
|
|
1268
1326
|
pulse: e.pulse,
|
|
1269
1327
|
onEdit: x(v),
|
|
1270
1328
|
onClear: x(E)
|
|
@@ -1273,39 +1331,39 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1273
1331
|
"pulse",
|
|
1274
1332
|
"onEdit",
|
|
1275
1333
|
"onClear"
|
|
1276
|
-
]), x(l) || x(f) ? (s(), m("div",
|
|
1334
|
+
]), x(l) || x(f) ? (s(), m("div", Rr, [x(l) ? (s(), y(Yn, {
|
|
1277
1335
|
key: 0,
|
|
1278
1336
|
disabled: x(u),
|
|
1279
1337
|
onInsert: x(D)
|
|
1280
|
-
}, null, 8, ["disabled", "onInsert"])) : T("", !0), x(f) ? (s(), y(
|
|
1338
|
+
}, null, 8, ["disabled", "onInsert"])) : T("", !0), x(f) ? (s(), y(Qn, {
|
|
1281
1339
|
key: 1,
|
|
1282
1340
|
disabled: x(h),
|
|
1283
1341
|
onInsert: x(O)
|
|
1284
|
-
}, null, 8, ["disabled", "onInsert"])) : T("", !0)])) : T("", !0)])) : (s(), m("div",
|
|
1342
|
+
}, null, 8, ["disabled", "onInsert"])) : T("", !0)])) : T("", !0)])) : (s(), m("div", zr, [p("input", {
|
|
1285
1343
|
ref_key: "inputRef",
|
|
1286
1344
|
ref: a,
|
|
1287
1345
|
type: e.type,
|
|
1288
|
-
class: n([x(
|
|
1346
|
+
class: n([x(W), { "tpl-pulse-fill": e.pulse }]),
|
|
1289
1347
|
value: e.modelValue,
|
|
1290
1348
|
placeholder: e.placeholder,
|
|
1291
1349
|
onInput: r[0] ||= (...e) => x(b) && x(b)(...e),
|
|
1292
1350
|
onKeydown: r[1] ||= (...e) => x(S) && x(S)(...e),
|
|
1293
1351
|
onClick: r[2] ||= (...e) => x(C) && x(C)(...e),
|
|
1294
1352
|
onBlur: r[3] ||= (...e) => x(w) && x(w)(...e)
|
|
1295
|
-
}, null, 42,
|
|
1353
|
+
}, null, 42, Br), x(l) || x(f) ? (s(), m("div", Vr, [x(l) ? (s(), y(Yn, {
|
|
1296
1354
|
key: 0,
|
|
1297
1355
|
disabled: x(u),
|
|
1298
1356
|
onInsert: x(D)
|
|
1299
|
-
}, null, 8, ["disabled", "onInsert"])) : T("", !0), x(f) ? (s(), y(
|
|
1357
|
+
}, null, 8, ["disabled", "onInsert"])) : T("", !0), x(f) ? (s(), y(Qn, {
|
|
1300
1358
|
key: 1,
|
|
1301
1359
|
disabled: x(h),
|
|
1302
1360
|
onInsert: x(O)
|
|
1303
1361
|
}, null, 8, ["disabled", "onInsert"])) : T("", !0)])) : T("", !0)]));
|
|
1304
1362
|
}
|
|
1305
|
-
}), [["__scopeId", "data-v-d6563be6"]]),
|
|
1363
|
+
}), [["__scopeId", "data-v-d6563be6"]]), Ur = { class: "tpl:mb-3.5" }, Wr = ["value"], Gr = { value: "" }, Kr = ["value"], qr = { class: "tpl:mb-3.5" }, Jr = { class: "tpl:mb-3.5" }, Yr = { class: "tpl:mb-3.5" }, Xr = { class: "tpl:mb-3.5" }, Zr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Qr = { class: "tpl:mb-3.5" }, $r = { class: "tpl:flex tpl:items-stretch" }, ei = ["value"], ti = { class: "tpl:mb-3.5" }, ni = { class: "tpl:flex tpl:items-stretch" }, ri = ["value"], ii = { class: "tpl:mb-3.5" }, ai = ["value"], oi = { value: "auto" }, si = { value: "full" }, ci = { value: "custom" }, li = {
|
|
1306
1364
|
key: 0,
|
|
1307
1365
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
1308
|
-
},
|
|
1366
|
+
}, ui = ["value"], di = 200, fi = /* @__PURE__ */ f({
|
|
1309
1367
|
__name: "ButtonToolbar",
|
|
1310
1368
|
props: {
|
|
1311
1369
|
block: {},
|
|
@@ -1313,7 +1371,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1313
1371
|
},
|
|
1314
1372
|
emits: ["update"],
|
|
1315
1373
|
setup(t, { emit: r }) {
|
|
1316
|
-
let i = t, a = r, { t: o } =
|
|
1374
|
+
let i = t, a = r, { t: o } = H(), l = w(() => i.block.width === "full" ? "full" : typeof i.block.width == "number" ? "custom" : "auto");
|
|
1317
1375
|
function u(e, t) {
|
|
1318
1376
|
a("update", { [e]: t });
|
|
1319
1377
|
}
|
|
@@ -1323,7 +1381,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1323
1381
|
return;
|
|
1324
1382
|
}
|
|
1325
1383
|
if (e === "custom") {
|
|
1326
|
-
u("width", typeof i.block.width == "number" ? i.block.width :
|
|
1384
|
+
u("width", typeof i.block.width == "number" ? i.block.width : di);
|
|
1327
1385
|
return;
|
|
1328
1386
|
}
|
|
1329
1387
|
u("width", void 0);
|
|
@@ -1333,28 +1391,28 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1333
1391
|
!Number.isFinite(t) || t <= 0 || u("width", t);
|
|
1334
1392
|
}
|
|
1335
1393
|
return (r, i) => (s(), m(C, null, [
|
|
1336
|
-
p("div",
|
|
1337
|
-
class: n(x(
|
|
1394
|
+
p("div", Ur, [p("label", { class: n(x(G)) }, c(x(o).button.fontFamily), 3), p("select", {
|
|
1395
|
+
class: n(x(W)),
|
|
1338
1396
|
value: t.block.fontFamily || "",
|
|
1339
1397
|
onChange: i[0] ||= (e) => u("fontFamily", e.target.value || void 0)
|
|
1340
|
-
}, [p("option",
|
|
1398
|
+
}, [p("option", Gr, c(x(o).button.inheritFont), 1), (s(!0), m(C, null, e(t.fontFamilies, (e) => (s(), m("option", {
|
|
1341
1399
|
key: e.value,
|
|
1342
1400
|
value: e.value
|
|
1343
|
-
}, c(e.label), 9,
|
|
1344
|
-
p("div",
|
|
1401
|
+
}, c(e.label), 9, Kr))), 128))], 42, Wr)]),
|
|
1402
|
+
p("div", qr, [p("label", { class: n(x(G)) }, c(x(o).button.text), 3), g($, {
|
|
1345
1403
|
"model-value": t.block.text,
|
|
1346
1404
|
type: "text",
|
|
1347
1405
|
"onUpdate:modelValue": i[1] ||= (e) => u("text", e)
|
|
1348
1406
|
}, null, 8, ["model-value"])]),
|
|
1349
|
-
p("div",
|
|
1350
|
-
p("label", { class: n(x(
|
|
1407
|
+
p("div", Jr, [
|
|
1408
|
+
p("label", { class: n(x(G)) }, c(x(o).button.url), 3),
|
|
1351
1409
|
g($, {
|
|
1352
1410
|
"model-value": t.block.url,
|
|
1353
1411
|
type: "url",
|
|
1354
1412
|
placeholder: x(o).button.urlPlaceholder,
|
|
1355
1413
|
"onUpdate:modelValue": i[2] ||= (e) => u("url", e)
|
|
1356
1414
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1357
|
-
t.block.url ? (s(), y(
|
|
1415
|
+
t.block.url ? (s(), y(Y, {
|
|
1358
1416
|
key: 0,
|
|
1359
1417
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
1360
1418
|
"model-value": t.block.openInNewTab ?? !1,
|
|
@@ -1362,51 +1420,51 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1362
1420
|
"onUpdate:modelValue": i[3] ||= (e) => u("openInNewTab", e)
|
|
1363
1421
|
}, null, 8, ["model-value", "label"])) : T("", !0)
|
|
1364
1422
|
]),
|
|
1365
|
-
p("div",
|
|
1423
|
+
p("div", Yr, [p("label", { class: n(x(G)) }, c(x(o).button.background), 3), g(J, {
|
|
1366
1424
|
"model-value": t.block.backgroundColor,
|
|
1367
1425
|
"onUpdate:modelValue": i[4] ||= (e) => u("backgroundColor", e)
|
|
1368
1426
|
}, null, 8, ["model-value"])]),
|
|
1369
|
-
p("div",
|
|
1427
|
+
p("div", Xr, [p("label", { class: n(x(G)) }, c(x(o).button.textColor), 3), g(J, {
|
|
1370
1428
|
"model-value": t.block.textColor,
|
|
1371
1429
|
"onUpdate:modelValue": i[5] ||= (e) => u("textColor", e)
|
|
1372
1430
|
}, null, 8, ["model-value"])]),
|
|
1373
|
-
p("div",
|
|
1431
|
+
p("div", Zr, [p("div", Qr, [p("label", { class: n(x(G)) }, c(x(o).button.borderRadius), 3), p("div", $r, [p("input", {
|
|
1374
1432
|
type: "number",
|
|
1375
|
-
class: n(x(
|
|
1433
|
+
class: n(x(q)),
|
|
1376
1434
|
value: t.block.borderRadius,
|
|
1377
1435
|
min: "0",
|
|
1378
1436
|
max: "50",
|
|
1379
1437
|
onInput: i[6] ||= (e) => u("borderRadius", Number(e.target.value))
|
|
1380
|
-
}, null, 42,
|
|
1438
|
+
}, null, 42, ei), p("span", { class: n(x(K)) }, "px", 2)])]), p("div", ti, [p("label", { class: n(x(G)) }, c(x(o).button.fontSize), 3), p("div", ni, [p("input", {
|
|
1381
1439
|
type: "number",
|
|
1382
|
-
class: n(x(
|
|
1440
|
+
class: n(x(q)),
|
|
1383
1441
|
value: t.block.fontSize,
|
|
1384
1442
|
min: "10",
|
|
1385
1443
|
max: "36",
|
|
1386
1444
|
onInput: i[7] ||= (e) => u("fontSize", Number(e.target.value))
|
|
1387
|
-
}, null, 42,
|
|
1388
|
-
p("div",
|
|
1389
|
-
p("label", { class: n(x(
|
|
1445
|
+
}, null, 42, ri), p("span", { class: n(x(K)) }, "px", 2)])])]),
|
|
1446
|
+
p("div", ii, [
|
|
1447
|
+
p("label", { class: n(x(G)) }, c(x(o).button.width), 3),
|
|
1390
1448
|
p("select", {
|
|
1391
|
-
class: n(x(
|
|
1449
|
+
class: n(x(W)),
|
|
1392
1450
|
value: l.value,
|
|
1393
1451
|
onChange: i[8] ||= (e) => d(e.target.value)
|
|
1394
1452
|
}, [
|
|
1395
|
-
p("option",
|
|
1396
|
-
p("option",
|
|
1397
|
-
p("option",
|
|
1398
|
-
], 42,
|
|
1399
|
-
l.value === "custom" ? (s(), m("div",
|
|
1453
|
+
p("option", oi, c(x(o).button.widthAuto), 1),
|
|
1454
|
+
p("option", si, c(x(o).button.fullWidth), 1),
|
|
1455
|
+
p("option", ci, c(x(o).button.widthCustom), 1)
|
|
1456
|
+
], 42, ai),
|
|
1457
|
+
l.value === "custom" ? (s(), m("div", li, [p("input", {
|
|
1400
1458
|
type: "number",
|
|
1401
|
-
class: n(x(
|
|
1402
|
-
value: typeof t.block.width == "number" ? t.block.width :
|
|
1459
|
+
class: n(x(q)),
|
|
1460
|
+
value: typeof t.block.width == "number" ? t.block.width : di,
|
|
1403
1461
|
min: "20",
|
|
1404
1462
|
onInput: i[9] ||= (e) => f(e.target.value)
|
|
1405
|
-
}, null, 42,
|
|
1463
|
+
}, null, 42, ui), p("span", { class: n(x(K)) }, "px", 2)])) : T("", !0)
|
|
1406
1464
|
])
|
|
1407
1465
|
], 64));
|
|
1408
1466
|
}
|
|
1409
|
-
}),
|
|
1467
|
+
}), pi = { class: "spacing-control" }, mi = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, hi = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, gi = { class: "tpl:flex tpl:items-center" }, _i = ["aria-label"], vi = ["value", "aria-label"], yi = ["aria-label"], bi = { class: "tpl:flex tpl:items-center tpl:gap-2" }, xi = { class: "tpl:flex tpl:items-center" }, Si = ["aria-label"], Ci = ["value", "aria-label"], wi = ["aria-label"], Ti = ["aria-label", "title"], Ei = { class: "tpl:flex tpl:items-center" }, Di = ["aria-label"], Oi = ["value", "aria-label"], ki = ["aria-label"], Ai = { class: "tpl:flex tpl:items-center" }, ji = ["aria-label"], Mi = ["value", "aria-label"], Ni = ["aria-label"], Pi = "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)]", Fi = "tpl:w-10 tpl:h-8 tpl:text-center tpl:text-xs tpl:font-medium tpl:border-y tpl:border-x-0 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", Ii = /*#__PURE__*/ jt(/* @__PURE__ */ f({
|
|
1410
1468
|
__name: "SpacingControl",
|
|
1411
1469
|
props: {
|
|
1412
1470
|
modelValue: {},
|
|
@@ -1414,7 +1472,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1414
1472
|
},
|
|
1415
1473
|
emits: ["update:modelValue"],
|
|
1416
1474
|
setup(e, { emit: t }) {
|
|
1417
|
-
let r = e, a = t, { t: o } =
|
|
1475
|
+
let r = e, a = t, { t: o } = H(), l = w(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), u = d(l.value);
|
|
1418
1476
|
i(l, (e) => {
|
|
1419
1477
|
!e && u.value && (u.value = !1);
|
|
1420
1478
|
});
|
|
@@ -1453,130 +1511,130 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1453
1511
|
});
|
|
1454
1512
|
}
|
|
1455
1513
|
}
|
|
1456
|
-
return (t, r) => (s(), m("div",
|
|
1457
|
-
p("div",
|
|
1514
|
+
return (t, r) => (s(), m("div", pi, [p("label", mi, c(e.label), 1), p("div", hi, [
|
|
1515
|
+
p("div", gi, [
|
|
1458
1516
|
p("button", {
|
|
1459
1517
|
"aria-label": x(o).spacingControl.decreaseTop,
|
|
1460
|
-
class: n([
|
|
1518
|
+
class: n([Pi, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1461
1519
|
onClick: r[0] ||= (e) => f("top", -1)
|
|
1462
|
-
}, [g(x(
|
|
1520
|
+
}, [g(x(pt), {
|
|
1463
1521
|
size: 12,
|
|
1464
1522
|
"stroke-width": 2
|
|
1465
|
-
})], 10,
|
|
1523
|
+
})], 10, _i),
|
|
1466
1524
|
p("input", {
|
|
1467
1525
|
type: "number",
|
|
1468
|
-
class: n(
|
|
1526
|
+
class: n(Fi),
|
|
1469
1527
|
value: e.modelValue.top,
|
|
1470
1528
|
"aria-label": x(o).spacingControl.top,
|
|
1471
1529
|
min: "0",
|
|
1472
1530
|
onInput: r[1] ||= (e) => h("top", Number(e.target.value))
|
|
1473
|
-
}, null, 40,
|
|
1531
|
+
}, null, 40, vi),
|
|
1474
1532
|
p("button", {
|
|
1475
1533
|
"aria-label": x(o).spacingControl.increaseTop,
|
|
1476
|
-
class: n([
|
|
1534
|
+
class: n([Pi, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1477
1535
|
onClick: r[2] ||= (e) => f("top", 1)
|
|
1478
1536
|
}, [g(x(Q), {
|
|
1479
1537
|
size: 12,
|
|
1480
1538
|
"stroke-width": 2
|
|
1481
|
-
})], 10,
|
|
1539
|
+
})], 10, yi)
|
|
1482
1540
|
]),
|
|
1483
|
-
p("div",
|
|
1484
|
-
p("div",
|
|
1541
|
+
p("div", bi, [
|
|
1542
|
+
p("div", xi, [
|
|
1485
1543
|
p("button", {
|
|
1486
1544
|
"aria-label": x(o).spacingControl.decreaseLeft,
|
|
1487
|
-
class: n([
|
|
1545
|
+
class: n([Pi, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1488
1546
|
onClick: r[3] ||= (e) => f("left", -1)
|
|
1489
|
-
}, [g(x(
|
|
1547
|
+
}, [g(x(pt), {
|
|
1490
1548
|
size: 12,
|
|
1491
1549
|
"stroke-width": 2
|
|
1492
|
-
})], 10,
|
|
1550
|
+
})], 10, Si),
|
|
1493
1551
|
p("input", {
|
|
1494
1552
|
type: "number",
|
|
1495
|
-
class: n(
|
|
1553
|
+
class: n(Fi),
|
|
1496
1554
|
value: e.modelValue.left,
|
|
1497
1555
|
"aria-label": x(o).spacingControl.left,
|
|
1498
1556
|
min: "0",
|
|
1499
1557
|
onInput: r[4] ||= (e) => h("left", Number(e.target.value))
|
|
1500
|
-
}, null, 40,
|
|
1558
|
+
}, null, 40, Ci),
|
|
1501
1559
|
p("button", {
|
|
1502
1560
|
"aria-label": x(o).spacingControl.increaseLeft,
|
|
1503
|
-
class: n([
|
|
1561
|
+
class: n([Pi, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1504
1562
|
onClick: r[5] ||= (e) => f("left", 1)
|
|
1505
1563
|
}, [g(x(Q), {
|
|
1506
1564
|
size: 12,
|
|
1507
1565
|
"stroke-width": 2
|
|
1508
|
-
})], 10,
|
|
1566
|
+
})], 10, wi)
|
|
1509
1567
|
]),
|
|
1510
1568
|
p("button", {
|
|
1511
1569
|
class: n(["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)]", u.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)]"]),
|
|
1512
1570
|
"aria-label": u.value ? x(o).spacingControl.unlock : x(o).spacingControl.lockAll,
|
|
1513
1571
|
title: u.value ? x(o).spacingControl.unlock : x(o).spacingControl.lockAll,
|
|
1514
1572
|
onClick: _
|
|
1515
|
-
}, [u.value ? (s(), y(x(
|
|
1573
|
+
}, [u.value ? (s(), y(x(Qt), {
|
|
1516
1574
|
key: 0,
|
|
1517
1575
|
size: 14,
|
|
1518
1576
|
"stroke-width": 2
|
|
1519
|
-
})) : (s(), y(x(
|
|
1577
|
+
})) : (s(), y(x(Zt), {
|
|
1520
1578
|
key: 1,
|
|
1521
1579
|
size: 14,
|
|
1522
1580
|
"stroke-width": 2
|
|
1523
|
-
}))], 10,
|
|
1524
|
-
p("div",
|
|
1581
|
+
}))], 10, Ti),
|
|
1582
|
+
p("div", Ei, [
|
|
1525
1583
|
p("button", {
|
|
1526
1584
|
"aria-label": x(o).spacingControl.decreaseRight,
|
|
1527
|
-
class: n([
|
|
1585
|
+
class: n([Pi, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1528
1586
|
onClick: r[6] ||= (e) => f("right", -1)
|
|
1529
|
-
}, [g(x(
|
|
1587
|
+
}, [g(x(pt), {
|
|
1530
1588
|
size: 12,
|
|
1531
1589
|
"stroke-width": 2
|
|
1532
|
-
})], 10,
|
|
1590
|
+
})], 10, Di),
|
|
1533
1591
|
p("input", {
|
|
1534
1592
|
type: "number",
|
|
1535
|
-
class: n(
|
|
1593
|
+
class: n(Fi),
|
|
1536
1594
|
value: e.modelValue.right,
|
|
1537
1595
|
"aria-label": x(o).spacingControl.right,
|
|
1538
1596
|
min: "0",
|
|
1539
1597
|
onInput: r[7] ||= (e) => h("right", Number(e.target.value))
|
|
1540
|
-
}, null, 40,
|
|
1598
|
+
}, null, 40, Oi),
|
|
1541
1599
|
p("button", {
|
|
1542
1600
|
"aria-label": x(o).spacingControl.increaseRight,
|
|
1543
|
-
class: n([
|
|
1601
|
+
class: n([Pi, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1544
1602
|
onClick: r[8] ||= (e) => f("right", 1)
|
|
1545
1603
|
}, [g(x(Q), {
|
|
1546
1604
|
size: 12,
|
|
1547
1605
|
"stroke-width": 2
|
|
1548
|
-
})], 10,
|
|
1606
|
+
})], 10, ki)
|
|
1549
1607
|
])
|
|
1550
1608
|
]),
|
|
1551
|
-
p("div",
|
|
1609
|
+
p("div", Ai, [
|
|
1552
1610
|
p("button", {
|
|
1553
1611
|
"aria-label": x(o).spacingControl.decreaseBottom,
|
|
1554
|
-
class: n([
|
|
1612
|
+
class: n([Pi, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1555
1613
|
onClick: r[9] ||= (e) => f("bottom", -1)
|
|
1556
|
-
}, [g(x(
|
|
1614
|
+
}, [g(x(pt), {
|
|
1557
1615
|
size: 12,
|
|
1558
1616
|
"stroke-width": 2
|
|
1559
|
-
})], 10,
|
|
1617
|
+
})], 10, ji),
|
|
1560
1618
|
p("input", {
|
|
1561
1619
|
type: "number",
|
|
1562
|
-
class: n(
|
|
1620
|
+
class: n(Fi),
|
|
1563
1621
|
value: e.modelValue.bottom,
|
|
1564
1622
|
"aria-label": x(o).spacingControl.bottom,
|
|
1565
1623
|
min: "0",
|
|
1566
1624
|
onInput: r[10] ||= (e) => h("bottom", Number(e.target.value))
|
|
1567
|
-
}, null, 40,
|
|
1625
|
+
}, null, 40, Mi),
|
|
1568
1626
|
p("button", {
|
|
1569
1627
|
"aria-label": x(o).spacingControl.increaseBottom,
|
|
1570
|
-
class: n([
|
|
1628
|
+
class: n([Pi, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1571
1629
|
onClick: r[11] ||= (e) => f("bottom", 1)
|
|
1572
1630
|
}, [g(x(Q), {
|
|
1573
1631
|
size: 12,
|
|
1574
1632
|
"stroke-width": 2
|
|
1575
|
-
})], 10,
|
|
1633
|
+
})], 10, Ni)
|
|
1576
1634
|
])
|
|
1577
1635
|
])]));
|
|
1578
1636
|
}
|
|
1579
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1637
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Li = { class: "tpl:mt-3" }, Ri = /* @__PURE__ */ f({
|
|
1580
1638
|
__name: "CollapsibleSection",
|
|
1581
1639
|
props: {
|
|
1582
1640
|
title: {},
|
|
@@ -1589,25 +1647,25 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1589
1647
|
type: "button",
|
|
1590
1648
|
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)]",
|
|
1591
1649
|
onClick: r[0] ||= (e) => t.$emit("toggle")
|
|
1592
|
-
}, [g(x(
|
|
1650
|
+
}, [g(x(dt), {
|
|
1593
1651
|
class: n(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1594
1652
|
size: 12,
|
|
1595
1653
|
"stroke-width": 2
|
|
1596
|
-
}, null, 8, ["class"]), p("span", null, c(e.title), 1)]), k(p("div",
|
|
1654
|
+
}, null, 8, ["class"]), p("span", null, c(e.title), 1)]), k(p("div", Li, [_(t.$slots, "default")], 512), [[M, e.open]])], 2));
|
|
1597
1655
|
}
|
|
1598
|
-
}),
|
|
1656
|
+
}), zi = { class: "tpl:space-y-2" }, Bi = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Vi = { class: "tpl:space-y-2" }, Hi = ["value"], Ui = { value: "" }, Wi = ["label"], Gi = ["value"], Ki = ["value"], qi = {
|
|
1599
1657
|
key: 0,
|
|
1600
1658
|
value: "__custom__"
|
|
1601
|
-
},
|
|
1659
|
+
}, Ji = {
|
|
1602
1660
|
key: 0,
|
|
1603
1661
|
class: "tpl:space-y-2"
|
|
1604
|
-
},
|
|
1662
|
+
}, Yi = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Xi = { 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" }, Qi = ["disabled"], $i = {
|
|
1605
1663
|
key: 0,
|
|
1606
1664
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1607
|
-
},
|
|
1665
|
+
}, ea = { class: "tpl:space-y-1" }, ta = { 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)]" }, na = {
|
|
1608
1666
|
key: 0,
|
|
1609
1667
|
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)]"
|
|
1610
|
-
},
|
|
1668
|
+
}, ra = /* @__PURE__ */ f({
|
|
1611
1669
|
__name: "CommonBlockSettings",
|
|
1612
1670
|
props: {
|
|
1613
1671
|
block: {},
|
|
@@ -1615,13 +1673,13 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1615
1673
|
},
|
|
1616
1674
|
emits: ["update"],
|
|
1617
1675
|
setup(t, { emit: r }) {
|
|
1618
|
-
let a = t, u = r, { t: f } =
|
|
1676
|
+
let a = t, u = r, { t: f } = H(), h = D(nt, []), _ = D(rt, !1), v = S(/* @__PURE__ */ new Set()), E = d(!1), O = d(""), j = d(""), M = [{
|
|
1619
1677
|
key: "desktop",
|
|
1620
|
-
icon:
|
|
1678
|
+
icon: Ct,
|
|
1621
1679
|
labelKey: "showOnDesktop"
|
|
1622
1680
|
}, {
|
|
1623
1681
|
key: "mobile",
|
|
1624
|
-
icon:
|
|
1682
|
+
icon: wt,
|
|
1625
1683
|
labelKey: "showOnMobile"
|
|
1626
1684
|
}];
|
|
1627
1685
|
function N(e) {
|
|
@@ -1662,7 +1720,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1662
1720
|
function B(e) {
|
|
1663
1721
|
return a.block.visibility?.[e] !== !1;
|
|
1664
1722
|
}
|
|
1665
|
-
function
|
|
1723
|
+
function ee(e) {
|
|
1666
1724
|
let t = {
|
|
1667
1725
|
desktop: B("desktop"),
|
|
1668
1726
|
mobile: B("mobile")
|
|
@@ -1670,13 +1728,13 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1670
1728
|
t[e] = !t[e], u("update", { visibility: t });
|
|
1671
1729
|
}
|
|
1672
1730
|
return (r, i) => (s(), m("div", { class: n(["tpl:flex tpl:flex-col", t.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1673
|
-
g(
|
|
1731
|
+
g(Ri, {
|
|
1674
1732
|
title: x(f).blockSettings.spacing,
|
|
1675
1733
|
open: v.has("spacing"),
|
|
1676
1734
|
"no-border": t.isFirstSection,
|
|
1677
1735
|
onToggle: i[1] ||= (e) => N("spacing")
|
|
1678
1736
|
}, {
|
|
1679
|
-
default: l(() => [g(
|
|
1737
|
+
default: l(() => [g(Ii, {
|
|
1680
1738
|
label: x(f).blockSettings.padding,
|
|
1681
1739
|
"model-value": t.block.styles.padding,
|
|
1682
1740
|
"onUpdate:modelValue": i[0] ||= (e) => z("padding", e)
|
|
@@ -1687,30 +1745,30 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1687
1745
|
"open",
|
|
1688
1746
|
"no-border"
|
|
1689
1747
|
]),
|
|
1690
|
-
g(
|
|
1748
|
+
g(Ri, {
|
|
1691
1749
|
title: x(f).blockSettings.background,
|
|
1692
1750
|
open: v.has("bg"),
|
|
1693
1751
|
onToggle: i[3] ||= (e) => N("bg")
|
|
1694
1752
|
}, {
|
|
1695
|
-
default: l(() => [p("label", { class: n(x(
|
|
1753
|
+
default: l(() => [p("label", { class: n(x(G)) }, c(x(f).blockSettings.color), 3), g(J, {
|
|
1696
1754
|
"model-value": t.block.styles.backgroundColor ?? "",
|
|
1697
1755
|
"onUpdate:modelValue": i[2] ||= (e) => z("backgroundColor", e)
|
|
1698
1756
|
}, null, 8, ["model-value"])]),
|
|
1699
1757
|
_: 1
|
|
1700
1758
|
}, 8, ["title", "open"]),
|
|
1701
|
-
g(
|
|
1759
|
+
g(Ri, {
|
|
1702
1760
|
title: x(f).blockSettings.display,
|
|
1703
1761
|
open: v.has("display"),
|
|
1704
1762
|
onToggle: i[4] ||= (e) => N("display")
|
|
1705
1763
|
}, {
|
|
1706
|
-
default: l(() => [p("div",
|
|
1764
|
+
default: l(() => [p("div", zi, [(s(), m(C, null, e(M, (e) => g(Y, {
|
|
1707
1765
|
key: e.key,
|
|
1708
1766
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
1709
1767
|
"model-value": B(e.key),
|
|
1710
1768
|
label: x(f).blockSettings[e.labelKey],
|
|
1711
|
-
"onUpdate:modelValue": (t) =>
|
|
1769
|
+
"onUpdate:modelValue": (t) => ee(e.key)
|
|
1712
1770
|
}, {
|
|
1713
|
-
default: l(() => [p("span",
|
|
1771
|
+
default: l(() => [p("span", Bi, [(s(), y(o(e.icon), {
|
|
1714
1772
|
size: 14,
|
|
1715
1773
|
"stroke-width": 1.5
|
|
1716
1774
|
})), b(" " + c(x(f).blockSettings[e.labelKey]), 1)])]),
|
|
@@ -1722,13 +1780,13 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1722
1780
|
])), 64))])]),
|
|
1723
1781
|
_: 1
|
|
1724
1782
|
}, 8, ["title", "open"]),
|
|
1725
|
-
P.value ? (s(), y(
|
|
1783
|
+
P.value ? (s(), y(Ri, {
|
|
1726
1784
|
key: 0,
|
|
1727
1785
|
title: x(f).blockSettings.displayCondition,
|
|
1728
1786
|
open: v.has("condition"),
|
|
1729
1787
|
onToggle: i[8] ||= (e) => N("condition")
|
|
1730
1788
|
}, {
|
|
1731
|
-
default: l(() => [p("div",
|
|
1789
|
+
default: l(() => [p("div", Vi, [p("select", {
|
|
1732
1790
|
class: n(["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)]", t.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)]"]),
|
|
1733
1791
|
value: E.value || F.value ? "__custom__" : t.block.displayCondition?.label ?? "",
|
|
1734
1792
|
onChange: i[5] ||= (e) => {
|
|
@@ -1745,41 +1803,41 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1745
1803
|
n && u("update", { displayCondition: n });
|
|
1746
1804
|
}
|
|
1747
1805
|
}, [
|
|
1748
|
-
p("option",
|
|
1806
|
+
p("option", Ui, c(x(f).blockSettings.noCondition), 1),
|
|
1749
1807
|
(s(!0), m(C, null, e(R.value, (t, n) => (s(), m(C, { key: n }, [n ? (s(), m("optgroup", {
|
|
1750
1808
|
key: 0,
|
|
1751
1809
|
label: String(n)
|
|
1752
1810
|
}, [(s(!0), m(C, null, e(t, (e) => (s(), m("option", {
|
|
1753
1811
|
key: e.label,
|
|
1754
1812
|
value: e.label
|
|
1755
|
-
}, c(e.label), 9,
|
|
1813
|
+
}, c(e.label), 9, Gi))), 128))], 8, Wi)) : (s(!0), m(C, { key: 1 }, e(t, (e) => (s(), m("option", {
|
|
1756
1814
|
key: e.label,
|
|
1757
1815
|
value: e.label
|
|
1758
|
-
}, c(e.label), 9,
|
|
1759
|
-
x(_) ? (s(), m("option",
|
|
1760
|
-
], 42,
|
|
1761
|
-
p("div", null, [p("label",
|
|
1816
|
+
}, c(e.label), 9, Ki))), 128))], 64))), 128)),
|
|
1817
|
+
x(_) ? (s(), m("option", qi, c(x(f).blockSettings.customCondition), 1)) : T("", !0)
|
|
1818
|
+
], 42, Hi), E.value || F.value ? (s(), m("div", Ji, [
|
|
1819
|
+
p("div", null, [p("label", Yi, c(x(f).blockSettings.customConditionBefore), 1), k(p("textarea", {
|
|
1762
1820
|
"onUpdate:modelValue": i[6] ||= (e) => O.value = e,
|
|
1763
1821
|
rows: "2",
|
|
1764
|
-
class: n(x(
|
|
1822
|
+
class: n(x(zt))
|
|
1765
1823
|
}, null, 2), [[A, O.value]])]),
|
|
1766
|
-
p("div", null, [p("label",
|
|
1824
|
+
p("div", null, [p("label", Xi, c(x(f).blockSettings.customConditionAfter), 1), k(p("textarea", {
|
|
1767
1825
|
"onUpdate:modelValue": i[7] ||= (e) => j.value = e,
|
|
1768
1826
|
rows: "2",
|
|
1769
|
-
class: n(x(
|
|
1827
|
+
class: n(x(zt))
|
|
1770
1828
|
}, null, 2), [[A, j.value]])]),
|
|
1771
|
-
p("div",
|
|
1829
|
+
p("div", Zi, [p("button", {
|
|
1772
1830
|
type: "button",
|
|
1773
1831
|
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",
|
|
1774
1832
|
disabled: !O.value.trim(),
|
|
1775
1833
|
onClick: L
|
|
1776
|
-
}, c(x(f).blockSettings.applyCondition), 9,
|
|
1777
|
-
])) : t.block.displayCondition && !F.value ? (s(), m(C, { key: 1 }, [t.block.displayCondition.description ? (s(), m("p",
|
|
1834
|
+
}, c(x(f).blockSettings.applyCondition), 9, Qi)])
|
|
1835
|
+
])) : t.block.displayCondition && !F.value ? (s(), m(C, { key: 1 }, [t.block.displayCondition.description ? (s(), m("p", $i, c(t.block.displayCondition.description), 1)) : T("", !0), p("div", ea, [p("pre", ta, c(t.block.displayCondition.before), 1), t.block.displayCondition.after ? (s(), m("pre", na, c(t.block.displayCondition.after), 1)) : T("", !0)])], 64)) : T("", !0)])]),
|
|
1778
1836
|
_: 1
|
|
1779
1837
|
}, 8, ["title", "open"])) : T("", !0)
|
|
1780
1838
|
], 2));
|
|
1781
1839
|
}
|
|
1782
|
-
}),
|
|
1840
|
+
}), ia = ["title"], aa = /* @__PURE__ */ f({
|
|
1783
1841
|
__name: "BooleanField",
|
|
1784
1842
|
props: {
|
|
1785
1843
|
field: {},
|
|
@@ -1788,11 +1846,11 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1788
1846
|
},
|
|
1789
1847
|
emits: ["update:modelValue"],
|
|
1790
1848
|
setup(e, { emit: t }) {
|
|
1791
|
-
let n = t, { t: r } =
|
|
1849
|
+
let n = t, { t: r } = H();
|
|
1792
1850
|
return (t, i) => (s(), m("div", {
|
|
1793
1851
|
class: "tpl:mb-3.5",
|
|
1794
1852
|
title: e.readOnly ? x(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1795
|
-
}, [g(
|
|
1853
|
+
}, [g(Y, {
|
|
1796
1854
|
class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
1797
1855
|
"model-value": e.modelValue,
|
|
1798
1856
|
label: e.field.label,
|
|
@@ -1800,7 +1858,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1800
1858
|
disabled: e.readOnly,
|
|
1801
1859
|
"onUpdate:modelValue": i[0] ||= (e) => n("update:modelValue", e)
|
|
1802
1860
|
}, {
|
|
1803
|
-
default: l(() => [b(c(e.field.label) + " ", 1), e.readOnly ? (s(), y(x(
|
|
1861
|
+
default: l(() => [b(c(e.field.label) + " ", 1), e.readOnly ? (s(), y(x(Qt), {
|
|
1804
1862
|
key: 0,
|
|
1805
1863
|
size: 12,
|
|
1806
1864
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
@@ -1811,12 +1869,12 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1811
1869
|
"label",
|
|
1812
1870
|
"required",
|
|
1813
1871
|
"disabled"
|
|
1814
|
-
])], 8,
|
|
1872
|
+
])], 8, ia));
|
|
1815
1873
|
}
|
|
1816
|
-
}),
|
|
1874
|
+
}), oa = { class: "tpl:mb-3.5" }, sa = {
|
|
1817
1875
|
key: 1,
|
|
1818
1876
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1819
|
-
},
|
|
1877
|
+
}, ca = /* @__PURE__ */ f({
|
|
1820
1878
|
__name: "FieldWrapper",
|
|
1821
1879
|
props: {
|
|
1822
1880
|
label: {},
|
|
@@ -1824,17 +1882,17 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1824
1882
|
readOnly: { type: Boolean }
|
|
1825
1883
|
},
|
|
1826
1884
|
setup(e) {
|
|
1827
|
-
return (t, r) => (s(), m("div",
|
|
1885
|
+
return (t, r) => (s(), m("div", oa, [p("label", { class: n(x(G)) }, [
|
|
1828
1886
|
b(c(e.label) + " ", 1),
|
|
1829
|
-
e.readOnly ? (s(), y(x(
|
|
1887
|
+
e.readOnly ? (s(), y(x(Qt), {
|
|
1830
1888
|
key: 0,
|
|
1831
1889
|
size: 12,
|
|
1832
1890
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1833
1891
|
})) : T("", !0),
|
|
1834
|
-
e.required ? (s(), m("span",
|
|
1892
|
+
e.required ? (s(), m("span", sa, "*")) : T("", !0)
|
|
1835
1893
|
], 2), _(t.$slots, "default")]));
|
|
1836
1894
|
}
|
|
1837
|
-
}),
|
|
1895
|
+
}), la = /* @__PURE__ */ f({
|
|
1838
1896
|
__name: "ColorField",
|
|
1839
1897
|
props: {
|
|
1840
1898
|
field: {},
|
|
@@ -1843,13 +1901,13 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1843
1901
|
},
|
|
1844
1902
|
emits: ["update:modelValue"],
|
|
1845
1903
|
setup(e, { emit: t }) {
|
|
1846
|
-
let n = e, r = t, { t: i } =
|
|
1847
|
-
return (t, n) => (s(), y(
|
|
1904
|
+
let n = e, r = t, { t: i } = H(), a = D(tt, Le), o = w(() => V(n.field, a));
|
|
1905
|
+
return (t, n) => (s(), y(ca, {
|
|
1848
1906
|
label: e.field.label,
|
|
1849
1907
|
required: e.field.required,
|
|
1850
1908
|
"read-only": e.readOnly
|
|
1851
1909
|
}, {
|
|
1852
|
-
default: l(() => [g(
|
|
1910
|
+
default: l(() => [g(J, {
|
|
1853
1911
|
"model-value": e.modelValue,
|
|
1854
1912
|
placeholder: e.field.placeholder,
|
|
1855
1913
|
disabled: e.readOnly,
|
|
@@ -1872,15 +1930,15 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1872
1930
|
"read-only"
|
|
1873
1931
|
]));
|
|
1874
1932
|
}
|
|
1875
|
-
}),
|
|
1933
|
+
}), ua = {
|
|
1876
1934
|
key: 0,
|
|
1877
1935
|
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)]",
|
|
1878
1936
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
1879
|
-
},
|
|
1937
|
+
}, da = [
|
|
1880
1938
|
"value",
|
|
1881
1939
|
"placeholder",
|
|
1882
1940
|
"title"
|
|
1883
|
-
],
|
|
1941
|
+
], fa = ["value", "placeholder"], pa = /* @__PURE__ */ f({
|
|
1884
1942
|
__name: "ImageField",
|
|
1885
1943
|
props: {
|
|
1886
1944
|
field: {},
|
|
@@ -1889,7 +1947,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1889
1947
|
},
|
|
1890
1948
|
emits: ["update:modelValue"],
|
|
1891
1949
|
setup(e, { emit: t }) {
|
|
1892
|
-
let r = e, i = t, { t: a } =
|
|
1950
|
+
let r = e, i = t, { t: a } = H(), o = D($e, null), u = Pt(), f = w(() => !!o);
|
|
1893
1951
|
async function h() {
|
|
1894
1952
|
let e = await o?.({ accept: ["images"] });
|
|
1895
1953
|
u.alive && e && i("update:modelValue", e.url);
|
|
@@ -1910,12 +1968,12 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1910
1968
|
}
|
|
1911
1969
|
}
|
|
1912
1970
|
}
|
|
1913
|
-
let { isOver: O } =
|
|
1971
|
+
let { isOver: O } = pe({
|
|
1914
1972
|
target: _,
|
|
1915
1973
|
enabled: S,
|
|
1916
1974
|
onFiles: E
|
|
1917
1975
|
});
|
|
1918
|
-
return (t, r) => (s(), y(
|
|
1976
|
+
return (t, r) => (s(), y(ca, {
|
|
1919
1977
|
label: e.field.label,
|
|
1920
1978
|
required: e.field.required,
|
|
1921
1979
|
"read-only": e.readOnly
|
|
@@ -1925,7 +1983,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1925
1983
|
ref: _,
|
|
1926
1984
|
class: "tpl:relative"
|
|
1927
1985
|
}, [
|
|
1928
|
-
S.value && (x(O) || v.value) ? (s(), m("div",
|
|
1986
|
+
S.value && (x(O) || v.value) ? (s(), m("div", ua, [v.value ? (s(), m(C, { key: 0 }, [g(x(St), {
|
|
1929
1987
|
class: "tpl-spinner",
|
|
1930
1988
|
size: 18,
|
|
1931
1989
|
"stroke-width": 2
|
|
@@ -1936,24 +1994,24 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1936
1994
|
e.readOnly ? (s(), m("input", {
|
|
1937
1995
|
key: 1,
|
|
1938
1996
|
type: "url",
|
|
1939
|
-
class: n([x(
|
|
1997
|
+
class: n([x(W), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1940
1998
|
value: e.modelValue,
|
|
1941
1999
|
placeholder: e.field.placeholder || "https://...",
|
|
1942
2000
|
disabled: "",
|
|
1943
2001
|
title: x(a).customBlocks.dataSource.readOnlyTooltip
|
|
1944
|
-
}, null, 10,
|
|
2002
|
+
}, null, 10, da)) : (s(), m("input", {
|
|
1945
2003
|
key: 2,
|
|
1946
2004
|
type: "url",
|
|
1947
|
-
class: n(x(
|
|
2005
|
+
class: n(x(W)),
|
|
1948
2006
|
value: e.modelValue,
|
|
1949
2007
|
placeholder: e.field.placeholder || "https://...",
|
|
1950
2008
|
onInput: r[0] ||= (e) => i("update:modelValue", e.target.value)
|
|
1951
|
-
}, null, 42,
|
|
2009
|
+
}, null, 42, fa)),
|
|
1952
2010
|
f.value && !e.readOnly ? (s(), m("button", {
|
|
1953
2011
|
key: 3,
|
|
1954
2012
|
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)]",
|
|
1955
2013
|
onClick: r[1] ||= (e) => h()
|
|
1956
|
-
}, [g(x(
|
|
2014
|
+
}, [g(x(ue), {
|
|
1957
2015
|
size: 14,
|
|
1958
2016
|
"stroke-width": 1.5
|
|
1959
2017
|
}), b(" " + c(x(a).image.browseMedia), 1)])) : T("", !0)
|
|
@@ -1965,7 +2023,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1965
2023
|
"read-only"
|
|
1966
2024
|
]));
|
|
1967
2025
|
}
|
|
1968
|
-
}),
|
|
2026
|
+
}), ma = [
|
|
1969
2027
|
"value",
|
|
1970
2028
|
"placeholder",
|
|
1971
2029
|
"min",
|
|
@@ -1973,7 +2031,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1973
2031
|
"step",
|
|
1974
2032
|
"disabled",
|
|
1975
2033
|
"title"
|
|
1976
|
-
],
|
|
2034
|
+
], ha = /* @__PURE__ */ f({
|
|
1977
2035
|
__name: "NumberField",
|
|
1978
2036
|
props: {
|
|
1979
2037
|
field: {},
|
|
@@ -1982,15 +2040,15 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1982
2040
|
},
|
|
1983
2041
|
emits: ["update:modelValue"],
|
|
1984
2042
|
setup(e, { emit: t }) {
|
|
1985
|
-
let r = t, { t: i } =
|
|
1986
|
-
return (t, a) => (s(), y(
|
|
2043
|
+
let r = t, { t: i } = H();
|
|
2044
|
+
return (t, a) => (s(), y(ca, {
|
|
1987
2045
|
label: e.field.label,
|
|
1988
2046
|
required: e.field.required,
|
|
1989
2047
|
"read-only": e.readOnly
|
|
1990
2048
|
}, {
|
|
1991
2049
|
default: l(() => [p("input", {
|
|
1992
2050
|
type: "number",
|
|
1993
|
-
class: n([x(
|
|
2051
|
+
class: n([x(W), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1994
2052
|
value: e.modelValue,
|
|
1995
2053
|
placeholder: e.field.placeholder,
|
|
1996
2054
|
min: e.field.min,
|
|
@@ -1999,7 +2057,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
1999
2057
|
disabled: e.readOnly,
|
|
2000
2058
|
title: e.readOnly ? x(i).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
2001
2059
|
onInput: a[0] ||= (t) => !e.readOnly && r("update:modelValue", Number(t.target.value))
|
|
2002
|
-
}, null, 42,
|
|
2060
|
+
}, null, 42, ma)]),
|
|
2003
2061
|
_: 1
|
|
2004
2062
|
}, 8, [
|
|
2005
2063
|
"label",
|
|
@@ -2007,10 +2065,10 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2007
2065
|
"read-only"
|
|
2008
2066
|
]));
|
|
2009
2067
|
}
|
|
2010
|
-
}),
|
|
2068
|
+
}), ga = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, _a = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, va = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, ya = ["title", "onClick"], ba = {
|
|
2011
2069
|
key: 1,
|
|
2012
2070
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
2013
|
-
},
|
|
2071
|
+
}, xa = /* @__PURE__ */ f({
|
|
2014
2072
|
__name: "RepeatableField",
|
|
2015
2073
|
props: {
|
|
2016
2074
|
field: {},
|
|
@@ -2019,7 +2077,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2019
2077
|
},
|
|
2020
2078
|
emits: ["update:modelValue"],
|
|
2021
2079
|
setup(t, { emit: r }) {
|
|
2022
|
-
let i = t, a = r, { t: u } =
|
|
2080
|
+
let i = t, a = r, { t: u } = H(), d = w(() => i.modelValue || []), f = w(() => !i.field.maxItems || d.value.length < i.field.maxItems), h = w(() => !i.field.minItems || d.value.length > i.field.minItems);
|
|
2023
2081
|
function _() {
|
|
2024
2082
|
if (!f.value || i.readOnly) return;
|
|
2025
2083
|
let e = {};
|
|
@@ -2038,25 +2096,25 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2038
2096
|
} : r);
|
|
2039
2097
|
a("update:modelValue", r);
|
|
2040
2098
|
}
|
|
2041
|
-
return (r, i) => (s(), y(
|
|
2099
|
+
return (r, i) => (s(), y(ca, {
|
|
2042
2100
|
label: t.field.label,
|
|
2043
2101
|
required: t.field.required,
|
|
2044
2102
|
"read-only": t.readOnly
|
|
2045
2103
|
}, {
|
|
2046
|
-
default: l(() => [p("div",
|
|
2104
|
+
default: l(() => [p("div", ga, [
|
|
2047
2105
|
(s(!0), m(C, null, e(d.value, (n, r) => (s(), m("div", {
|
|
2048
2106
|
key: `${t.field.key}-${r}`,
|
|
2049
2107
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
2050
|
-
}, [p("div",
|
|
2108
|
+
}, [p("div", _a, [p("span", va, " #" + c(r + 1), 1), h.value && !t.readOnly ? (s(), m("button", {
|
|
2051
2109
|
key: 0,
|
|
2052
2110
|
type: "button",
|
|
2053
2111
|
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)]",
|
|
2054
2112
|
title: x(u).customBlocks.fields.removeItem,
|
|
2055
2113
|
onClick: (e) => v(r)
|
|
2056
|
-
}, [g(x(
|
|
2114
|
+
}, [g(x(kt), {
|
|
2057
2115
|
size: 12,
|
|
2058
2116
|
"stroke-width": 2
|
|
2059
|
-
})], 8,
|
|
2117
|
+
})], 8, ya)) : T("", !0)]), (s(!0), m(C, null, e(t.field.fields, (e) => (s(), y(o(x(Aa)(e.type)), {
|
|
2060
2118
|
key: e.key,
|
|
2061
2119
|
field: e,
|
|
2062
2120
|
"model-value": n[e.key],
|
|
@@ -2071,13 +2129,13 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2071
2129
|
f.value && !t.readOnly ? (s(), m("button", {
|
|
2072
2130
|
key: 0,
|
|
2073
2131
|
type: "button",
|
|
2074
|
-
class: n(x(
|
|
2132
|
+
class: n(x(Vt)),
|
|
2075
2133
|
onClick: _
|
|
2076
2134
|
}, [g(x(Q), {
|
|
2077
2135
|
size: 14,
|
|
2078
2136
|
"stroke-width": 2
|
|
2079
2137
|
}), b(" " + c(x(u).customBlocks.fields.addItem), 1)], 2)) : T("", !0),
|
|
2080
|
-
!f.value && !t.readOnly ? (s(), m("p",
|
|
2138
|
+
!f.value && !t.readOnly ? (s(), m("p", ba, c(x(u).customBlocks.fields.maxItemsReached), 1)) : T("", !0)
|
|
2081
2139
|
])]),
|
|
2082
2140
|
_: 1
|
|
2083
2141
|
}, 8, [
|
|
@@ -2086,11 +2144,11 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2086
2144
|
"read-only"
|
|
2087
2145
|
]));
|
|
2088
2146
|
}
|
|
2089
|
-
}),
|
|
2147
|
+
}), Sa = [
|
|
2090
2148
|
"value",
|
|
2091
2149
|
"disabled",
|
|
2092
2150
|
"title"
|
|
2093
|
-
],
|
|
2151
|
+
], Ca = ["value"], wa = /* @__PURE__ */ f({
|
|
2094
2152
|
__name: "SelectField",
|
|
2095
2153
|
props: {
|
|
2096
2154
|
field: {},
|
|
@@ -2099,14 +2157,14 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2099
2157
|
},
|
|
2100
2158
|
emits: ["update:modelValue"],
|
|
2101
2159
|
setup(t, { emit: r }) {
|
|
2102
|
-
let i = r, { t: a } =
|
|
2103
|
-
return (r, o) => (s(), y(
|
|
2160
|
+
let i = r, { t: a } = H();
|
|
2161
|
+
return (r, o) => (s(), y(ca, {
|
|
2104
2162
|
label: t.field.label,
|
|
2105
2163
|
required: t.field.required,
|
|
2106
2164
|
"read-only": t.readOnly
|
|
2107
2165
|
}, {
|
|
2108
2166
|
default: l(() => [p("select", {
|
|
2109
|
-
class: n([x(
|
|
2167
|
+
class: n([x(W), t.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2110
2168
|
value: t.modelValue,
|
|
2111
2169
|
disabled: t.readOnly,
|
|
2112
2170
|
title: t.readOnly ? x(a).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
@@ -2114,7 +2172,7 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2114
2172
|
}, [(s(!0), m(C, null, e(t.field.options, (e) => (s(), m("option", {
|
|
2115
2173
|
key: e.value,
|
|
2116
2174
|
value: e.value
|
|
2117
|
-
}, c(e.label), 9,
|
|
2175
|
+
}, c(e.label), 9, Ca))), 128))], 42, Sa)]),
|
|
2118
2176
|
_: 1
|
|
2119
2177
|
}, 8, [
|
|
2120
2178
|
"label",
|
|
@@ -2122,11 +2180,11 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2122
2180
|
"read-only"
|
|
2123
2181
|
]));
|
|
2124
2182
|
}
|
|
2125
|
-
}),
|
|
2183
|
+
}), Ta = [
|
|
2126
2184
|
"value",
|
|
2127
2185
|
"placeholder",
|
|
2128
2186
|
"title"
|
|
2129
|
-
],
|
|
2187
|
+
], Ea = /* @__PURE__ */ f({
|
|
2130
2188
|
__name: "TextField",
|
|
2131
2189
|
props: {
|
|
2132
2190
|
field: {},
|
|
@@ -2135,8 +2193,8 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2135
2193
|
},
|
|
2136
2194
|
emits: ["update:modelValue"],
|
|
2137
2195
|
setup(e, { emit: t }) {
|
|
2138
|
-
let r = t, { t: i } =
|
|
2139
|
-
return (t, a) => (s(), y(
|
|
2196
|
+
let r = t, { t: i } = H();
|
|
2197
|
+
return (t, a) => (s(), y(ca, {
|
|
2140
2198
|
label: e.field.label,
|
|
2141
2199
|
required: e.field.required,
|
|
2142
2200
|
"read-only": e.readOnly
|
|
@@ -2144,12 +2202,12 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2144
2202
|
default: l(() => [e.readOnly ? (s(), m("input", {
|
|
2145
2203
|
key: 0,
|
|
2146
2204
|
type: "text",
|
|
2147
|
-
class: n([x(
|
|
2205
|
+
class: n([x(W), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2148
2206
|
value: e.modelValue,
|
|
2149
2207
|
placeholder: e.field.placeholder,
|
|
2150
2208
|
disabled: "",
|
|
2151
2209
|
title: x(i).customBlocks.dataSource.readOnlyTooltip
|
|
2152
|
-
}, null, 10,
|
|
2210
|
+
}, null, 10, Ta)) : (s(), y($, {
|
|
2153
2211
|
key: 1,
|
|
2154
2212
|
"model-value": e.modelValue,
|
|
2155
2213
|
placeholder: e.field.placeholder,
|
|
@@ -2162,12 +2220,12 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2162
2220
|
"read-only"
|
|
2163
2221
|
]));
|
|
2164
2222
|
}
|
|
2165
|
-
}),
|
|
2223
|
+
}), Da = [
|
|
2166
2224
|
"value",
|
|
2167
2225
|
"placeholder",
|
|
2168
2226
|
"title"
|
|
2169
|
-
],
|
|
2170
|
-
text:
|
|
2227
|
+
], Oa = "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", ka = {
|
|
2228
|
+
text: Ea,
|
|
2171
2229
|
textarea: /* @__PURE__ */ f({
|
|
2172
2230
|
__name: "TextareaField",
|
|
2173
2231
|
props: {
|
|
@@ -2177,8 +2235,8 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2177
2235
|
},
|
|
2178
2236
|
emits: ["update:modelValue"],
|
|
2179
2237
|
setup(e, { emit: t }) {
|
|
2180
|
-
let r = t, { t: i } =
|
|
2181
|
-
return (t, a) => (s(), y(
|
|
2238
|
+
let r = t, { t: i } = H();
|
|
2239
|
+
return (t, a) => (s(), y(ca, {
|
|
2182
2240
|
label: e.field.label,
|
|
2183
2241
|
required: e.field.required,
|
|
2184
2242
|
"read-only": e.readOnly
|
|
@@ -2190,8 +2248,8 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2190
2248
|
rows: "3",
|
|
2191
2249
|
disabled: "",
|
|
2192
2250
|
title: x(i).customBlocks.dataSource.readOnlyTooltip,
|
|
2193
|
-
class: n(
|
|
2194
|
-
}, null, 8,
|
|
2251
|
+
class: n(Oa)
|
|
2252
|
+
}, null, 8, Da)) : (s(), y(or, {
|
|
2195
2253
|
key: 1,
|
|
2196
2254
|
"model-value": e.modelValue,
|
|
2197
2255
|
placeholder: e.field.placeholder,
|
|
@@ -2205,42 +2263,42 @@ var Nn = ["aria-label", "onKeydown"], Pn = ["data-tooltip"], Fn = ["data-tooltip
|
|
|
2205
2263
|
]));
|
|
2206
2264
|
}
|
|
2207
2265
|
}),
|
|
2208
|
-
image:
|
|
2209
|
-
color:
|
|
2210
|
-
number:
|
|
2211
|
-
select:
|
|
2212
|
-
boolean:
|
|
2213
|
-
repeatable:
|
|
2266
|
+
image: pa,
|
|
2267
|
+
color: la,
|
|
2268
|
+
number: ha,
|
|
2269
|
+
select: wa,
|
|
2270
|
+
boolean: aa,
|
|
2271
|
+
repeatable: xa
|
|
2214
2272
|
};
|
|
2215
|
-
function
|
|
2216
|
-
return
|
|
2273
|
+
function Aa(e) {
|
|
2274
|
+
return ka[e] ?? Ea;
|
|
2217
2275
|
}
|
|
2218
2276
|
//#endregion
|
|
2219
2277
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2220
|
-
var
|
|
2278
|
+
var ja = {
|
|
2221
2279
|
key: 0,
|
|
2222
2280
|
class: "tpl:p-4"
|
|
2223
|
-
},
|
|
2281
|
+
}, Ma = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Na = { key: 1 }, Pa = {
|
|
2224
2282
|
key: 0,
|
|
2225
2283
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
2226
|
-
},
|
|
2284
|
+
}, Fa = {
|
|
2227
2285
|
key: 1,
|
|
2228
2286
|
class: "tpl:mb-4"
|
|
2229
|
-
},
|
|
2287
|
+
}, Ia = {
|
|
2230
2288
|
key: 1,
|
|
2231
2289
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
2232
|
-
},
|
|
2290
|
+
}, La = {
|
|
2233
2291
|
key: 0,
|
|
2234
2292
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
2235
|
-
},
|
|
2293
|
+
}, Ra = {
|
|
2236
2294
|
key: 2,
|
|
2237
2295
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
2238
|
-
},
|
|
2296
|
+
}, za = /* @__PURE__ */ f({
|
|
2239
2297
|
__name: "CustomBlockToolbar",
|
|
2240
2298
|
props: { block: {} },
|
|
2241
2299
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
2242
2300
|
setup(t, { emit: n }) {
|
|
2243
|
-
let r = t, i = n, { t: a } =
|
|
2301
|
+
let r = t, i = n, { t: a } = H(), l = D(Ze, []), u = w(() => l.find((e) => e.type === r.block.customType)), { isFetching: d, fetchError: f, fetch: h, hasDataSource: _, needsFetch: v } = se({
|
|
2244
2302
|
definition: u,
|
|
2245
2303
|
block: w(() => r.block),
|
|
2246
2304
|
onUpdate: (e, t) => {
|
|
@@ -2256,23 +2314,23 @@ var Ca = {
|
|
|
2256
2314
|
[e]: t
|
|
2257
2315
|
});
|
|
2258
2316
|
}
|
|
2259
|
-
return (n, r) => u.value ? (s(), m("div",
|
|
2260
|
-
u.value.description ? (s(), m("p",
|
|
2261
|
-
x(_) ? (s(), m("div",
|
|
2317
|
+
return (n, r) => u.value ? (s(), m("div", Na, [
|
|
2318
|
+
u.value.description ? (s(), m("p", Pa, c(u.value.description), 1)) : T("", !0),
|
|
2319
|
+
x(_) ? (s(), m("div", Fa, [x(v) && !x(d) ? (s(), m("button", {
|
|
2262
2320
|
key: 0,
|
|
2263
2321
|
type: "button",
|
|
2264
2322
|
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)]",
|
|
2265
2323
|
onClick: r[0] ||= (...e) => x(h) && x(h)(...e)
|
|
2266
|
-
}, c(u.value?.dataSource?.label || x(a).customBlocks.dataSource.fetchButton), 1)) : (s(), m("div",
|
|
2324
|
+
}, c(u.value?.dataSource?.label || x(a).customBlocks.dataSource.fetchButton), 1)) : (s(), m("div", Ia, [x(d) ? (s(), m("div", La, c(x(a).customBlocks.dataSource.fetching), 1)) : (s(), m("button", {
|
|
2267
2325
|
key: 1,
|
|
2268
2326
|
type: "button",
|
|
2269
2327
|
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)]",
|
|
2270
2328
|
onClick: r[1] ||= (...e) => x(h) && x(h)(...e)
|
|
2271
|
-
}, [g(x(
|
|
2329
|
+
}, [g(x(vt), { size: 12 }), b(" " + c(x(a).customBlocks.dataSource.changeButton), 1)]))])), x(f) ? (s(), m("p", Ra, [g(x(ft), {
|
|
2272
2330
|
size: 14,
|
|
2273
2331
|
class: "tpl:shrink-0"
|
|
2274
2332
|
}), b(" " + c(x(a).customBlocks.dataSource.fetchError), 1)])) : T("", !0)])) : T("", !0),
|
|
2275
|
-
(s(!0), m(C, null, e(u.value.fields, (e) => (s(), y(o(x(
|
|
2333
|
+
(s(!0), m(C, null, e(u.value.fields, (e) => (s(), y(o(x(Aa)(e.type)), {
|
|
2276
2334
|
key: e.key,
|
|
2277
2335
|
field: e,
|
|
2278
2336
|
"model-value": t.block.fieldValues[e.key],
|
|
@@ -2284,19 +2342,19 @@ var Ca = {
|
|
|
2284
2342
|
"read-only",
|
|
2285
2343
|
"onUpdate:modelValue"
|
|
2286
2344
|
]))), 128))
|
|
2287
|
-
])) : (s(), m("div",
|
|
2345
|
+
])) : (s(), m("div", ja, [p("p", Ma, c(x(a).customBlocks.toolbar.noDefinition), 1)]));
|
|
2288
2346
|
}
|
|
2289
|
-
}),
|
|
2347
|
+
}), Ba = { class: "tpl:mb-3.5" }, Va = { class: "tpl:mb-3.5" }, Ha = { class: "tpl:mb-3.5" }, Ua = { class: "tpl:flex tpl:items-stretch" }, Wa = ["value"], Ga = /* @__PURE__ */ f({
|
|
2290
2348
|
__name: "DividerToolbar",
|
|
2291
2349
|
props: { block: {} },
|
|
2292
2350
|
emits: ["update"],
|
|
2293
2351
|
setup(e, { emit: t }) {
|
|
2294
|
-
let r = t, { t: i } =
|
|
2352
|
+
let r = t, { t: i } = H();
|
|
2295
2353
|
function a(e, t) {
|
|
2296
2354
|
r("update", { [e]: t });
|
|
2297
2355
|
}
|
|
2298
2356
|
return (t, r) => (s(), m(C, null, [
|
|
2299
|
-
p("div",
|
|
2357
|
+
p("div", Ba, [p("label", { class: n(x(G)) }, c(x(i).divider.style), 3), g(Z, {
|
|
2300
2358
|
options: [
|
|
2301
2359
|
{
|
|
2302
2360
|
value: "solid",
|
|
@@ -2314,57 +2372,57 @@ var Ca = {
|
|
|
2314
2372
|
"model-value": e.block.lineStyle,
|
|
2315
2373
|
"onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
|
|
2316
2374
|
}, null, 8, ["options", "model-value"])]),
|
|
2317
|
-
p("div",
|
|
2375
|
+
p("div", Va, [p("label", { class: n(x(G)) }, c(x(i).divider.color), 3), g(J, {
|
|
2318
2376
|
"model-value": e.block.color,
|
|
2319
2377
|
"onUpdate:modelValue": r[1] ||= (e) => a("color", e)
|
|
2320
2378
|
}, null, 8, ["model-value"])]),
|
|
2321
|
-
p("div",
|
|
2379
|
+
p("div", Ha, [p("label", { class: n(x(G)) }, c(x(i).divider.thickness), 3), p("div", Ua, [p("input", {
|
|
2322
2380
|
type: "number",
|
|
2323
|
-
class: n(x(
|
|
2381
|
+
class: n(x(q)),
|
|
2324
2382
|
value: e.block.thickness,
|
|
2325
2383
|
min: "1",
|
|
2326
2384
|
max: "10",
|
|
2327
2385
|
onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
|
|
2328
|
-
}, null, 42,
|
|
2386
|
+
}, null, 42, Wa), p("span", { class: n(x(K)) }, "px", 2)])])
|
|
2329
2387
|
], 64));
|
|
2330
2388
|
}
|
|
2331
|
-
}),
|
|
2389
|
+
}), Ka = { class: "tpl:mb-3.5" }, qa = ["value"], Ja = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ya = /* @__PURE__ */ f({
|
|
2332
2390
|
__name: "HtmlToolbar",
|
|
2333
2391
|
props: { block: {} },
|
|
2334
2392
|
emits: ["update"],
|
|
2335
2393
|
setup(e, { emit: t }) {
|
|
2336
|
-
let r = t, { t: i } =
|
|
2337
|
-
return (t, a) => (s(), m("div",
|
|
2338
|
-
p("label", { class: n(x(
|
|
2394
|
+
let r = t, { t: i } = H();
|
|
2395
|
+
return (t, a) => (s(), m("div", Ka, [
|
|
2396
|
+
p("label", { class: n(x(G)) }, c(x(i).html.content), 3),
|
|
2339
2397
|
p("textarea", {
|
|
2340
2398
|
value: e.block.content,
|
|
2341
2399
|
placeholder: "<div>...</div>",
|
|
2342
2400
|
rows: "10",
|
|
2343
|
-
class: n(x(
|
|
2401
|
+
class: n(x(zt)),
|
|
2344
2402
|
onInput: a[0] ||= (e) => r("update", { content: e.target.value })
|
|
2345
|
-
}, null, 42,
|
|
2346
|
-
p("p",
|
|
2403
|
+
}, null, 42, qa),
|
|
2404
|
+
p("p", Ja, [g(x(bt), {
|
|
2347
2405
|
size: 12,
|
|
2348
2406
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
2349
2407
|
}), b(" " + c(x(i).html.sanitizationHint), 1)])
|
|
2350
2408
|
]));
|
|
2351
2409
|
}
|
|
2352
|
-
}),
|
|
2410
|
+
}), Xa = { class: "tpl:mb-3.5" }, Za = {
|
|
2353
2411
|
key: 0,
|
|
2354
2412
|
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)]",
|
|
2355
2413
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
2356
|
-
},
|
|
2414
|
+
}, Qa = {
|
|
2357
2415
|
key: 0,
|
|
2358
2416
|
class: "tpl:mb-3.5"
|
|
2359
|
-
},
|
|
2417
|
+
}, $a = ["value", "placeholder"], eo = { class: "tpl:mb-3.5" }, to = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, no = { class: "tpl:mb-3.5" }, ro = ["value"], io = { value: "full" }, ao = { value: "custom" }, oo = {
|
|
2360
2418
|
key: 0,
|
|
2361
2419
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2362
|
-
},
|
|
2420
|
+
}, so = ["value"], co = { class: "tpl:mb-3.5" }, lo = { class: "tpl:mb-3.5" }, uo = 350, fo = /* @__PURE__ */ f({
|
|
2363
2421
|
__name: "ImageToolbar",
|
|
2364
2422
|
props: { block: {} },
|
|
2365
2423
|
emits: ["update"],
|
|
2366
2424
|
setup(e, { emit: t }) {
|
|
2367
|
-
let r = e, i = t, { t: a } =
|
|
2425
|
+
let r = e, i = t, { t: a } = H(), o = D($e, null), u = D(et, ee.liquid), f = Pt(), h = w(() => !!o), _ = d(!1), v = d(!1), { start: S } = Ie(() => {
|
|
2368
2426
|
_.value = !1;
|
|
2369
2427
|
}, 1e3, { immediate: !1 }), E = [
|
|
2370
2428
|
300,
|
|
@@ -2380,7 +2438,7 @@ var Ca = {
|
|
|
2380
2438
|
function A(e) {
|
|
2381
2439
|
if (e === "custom") {
|
|
2382
2440
|
let e = r.block.width;
|
|
2383
|
-
(typeof e != "number" || E.includes(e)) && k("width",
|
|
2441
|
+
(typeof e != "number" || E.includes(e)) && k("width", uo);
|
|
2384
2442
|
return;
|
|
2385
2443
|
}
|
|
2386
2444
|
k("width", e === "full" ? "full" : Number(e));
|
|
@@ -2393,7 +2451,7 @@ var Ca = {
|
|
|
2393
2451
|
let e = await o?.({ accept: ["images"] });
|
|
2394
2452
|
f.alive && e && (k("src", e.url), e.alt && (k("alt", e.alt), v.value = !0), _.value = !0, S());
|
|
2395
2453
|
}
|
|
2396
|
-
let N = d(), P = d(!1), I = w(() =>
|
|
2454
|
+
let N = d(), P = d(!1), I = w(() => te(r.block.src, u)), L = w(() => h.value && !P.value && !I.value);
|
|
2397
2455
|
async function R(e) {
|
|
2398
2456
|
if (o) {
|
|
2399
2457
|
P.value = !0;
|
|
@@ -2409,18 +2467,18 @@ var Ca = {
|
|
|
2409
2467
|
}
|
|
2410
2468
|
}
|
|
2411
2469
|
}
|
|
2412
|
-
let { isOver: z } =
|
|
2470
|
+
let { isOver: z } = pe({
|
|
2413
2471
|
target: N,
|
|
2414
2472
|
enabled: L,
|
|
2415
2473
|
onFiles: R
|
|
2416
2474
|
});
|
|
2417
2475
|
return (t, r) => (s(), m(C, null, [
|
|
2418
|
-
p("div",
|
|
2476
|
+
p("div", Xa, [p("label", { class: n(x(G)) }, c(x(a).image.imageUrl), 3), p("div", {
|
|
2419
2477
|
ref_key: "dropZoneRef",
|
|
2420
2478
|
ref: N,
|
|
2421
2479
|
class: "tpl:relative"
|
|
2422
2480
|
}, [
|
|
2423
|
-
L.value && (x(z) || P.value) ? (s(), m("div",
|
|
2481
|
+
L.value && (x(z) || P.value) ? (s(), m("div", Za, [P.value ? (s(), m(C, { key: 0 }, [g(x(St), {
|
|
2424
2482
|
class: "tpl-spinner",
|
|
2425
2483
|
size: 18,
|
|
2426
2484
|
"stroke-width": 2
|
|
@@ -2448,20 +2506,20 @@ var Ca = {
|
|
|
2448
2506
|
"background-color": "var(--tpl-bg)"
|
|
2449
2507
|
},
|
|
2450
2508
|
onClick: M
|
|
2451
|
-
}, [g(x(
|
|
2509
|
+
}, [g(x(ue), {
|
|
2452
2510
|
size: 14,
|
|
2453
2511
|
"stroke-width": 1.5
|
|
2454
2512
|
}), b(" " + c(x(a).image.browseMedia), 1)])) : T("", !0)
|
|
2455
2513
|
], 512)]),
|
|
2456
|
-
x(
|
|
2514
|
+
x(te)(e.block.src, x(u)) ? (s(), m("div", Qa, [p("label", { class: n(x(G)) }, [b(c(x(a).image.placeholderUrl) + " ", 1), r[9] ||= p("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, c("(optional)"), -1)], 2), p("input", {
|
|
2457
2515
|
type: "url",
|
|
2458
|
-
class: n(x(
|
|
2516
|
+
class: n(x(W)),
|
|
2459
2517
|
value: e.block.placeholderUrl || "",
|
|
2460
2518
|
placeholder: x(a).image.placeholderUrlPlaceholder,
|
|
2461
2519
|
onInput: r[1] ||= (e) => k("placeholderUrl", e.target.value)
|
|
2462
|
-
}, null, 42,
|
|
2463
|
-
p("div",
|
|
2464
|
-
p("label", { class: n(x(
|
|
2520
|
+
}, null, 42, $a)])) : T("", !0),
|
|
2521
|
+
p("div", eo, [
|
|
2522
|
+
p("label", { class: n(x(G)) }, c(x(a).image.altText), 3),
|
|
2465
2523
|
g($, {
|
|
2466
2524
|
"model-value": e.block.alt,
|
|
2467
2525
|
type: "text",
|
|
@@ -2475,38 +2533,38 @@ var Ca = {
|
|
|
2475
2533
|
"pulse",
|
|
2476
2534
|
"disabled"
|
|
2477
2535
|
]),
|
|
2478
|
-
g(
|
|
2536
|
+
g(Y, {
|
|
2479
2537
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2480
2538
|
"model-value": e.block.decorative === !0,
|
|
2481
2539
|
label: x(a).image.decorative,
|
|
2482
2540
|
"onUpdate:modelValue": r[3] ||= (e) => k("decorative", e)
|
|
2483
2541
|
}, {
|
|
2484
|
-
default: l(() => [p("span", null, [b(c(x(a).image.decorative) + " ", 1), p("span",
|
|
2542
|
+
default: l(() => [p("span", null, [b(c(x(a).image.decorative) + " ", 1), p("span", to, c(x(a).image.decorativeHint), 1)])]),
|
|
2485
2543
|
_: 1
|
|
2486
2544
|
}, 8, ["model-value", "label"])
|
|
2487
2545
|
]),
|
|
2488
|
-
p("div",
|
|
2489
|
-
p("label", { class: n(x(
|
|
2546
|
+
p("div", no, [
|
|
2547
|
+
p("label", { class: n(x(G)) }, c(x(a).image.width), 3),
|
|
2490
2548
|
p("select", {
|
|
2491
|
-
class: n(x(
|
|
2549
|
+
class: n(x(W)),
|
|
2492
2550
|
value: O.value,
|
|
2493
2551
|
onChange: r[4] ||= (e) => A(e.target.value)
|
|
2494
2552
|
}, [
|
|
2495
|
-
p("option",
|
|
2553
|
+
p("option", io, c(x(a).image.fullWidth), 1),
|
|
2496
2554
|
r[10] ||= p("option", { value: "300" }, "300px", -1),
|
|
2497
2555
|
r[11] ||= p("option", { value: "400" }, "400px", -1),
|
|
2498
2556
|
r[12] ||= p("option", { value: "500" }, "500px", -1),
|
|
2499
|
-
p("option",
|
|
2500
|
-
], 42,
|
|
2501
|
-
O.value === "custom" ? (s(), m("div",
|
|
2557
|
+
p("option", ao, c(x(a).image.widthCustom), 1)
|
|
2558
|
+
], 42, ro),
|
|
2559
|
+
O.value === "custom" ? (s(), m("div", oo, [p("input", {
|
|
2502
2560
|
type: "number",
|
|
2503
|
-
class: n(x(
|
|
2504
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
2561
|
+
class: n(x(q)),
|
|
2562
|
+
value: typeof e.block.width == "number" ? e.block.width : uo,
|
|
2505
2563
|
min: "20",
|
|
2506
2564
|
onInput: r[5] ||= (e) => j(e.target.value)
|
|
2507
|
-
}, null, 42,
|
|
2565
|
+
}, null, 42, so), p("span", { class: n(x(K)) }, "px", 2)])) : T("", !0)
|
|
2508
2566
|
]),
|
|
2509
|
-
p("div",
|
|
2567
|
+
p("div", co, [p("label", { class: n(x(G)) }, c(x(a).title.align), 3), g(Z, {
|
|
2510
2568
|
options: [
|
|
2511
2569
|
{
|
|
2512
2570
|
value: "left",
|
|
@@ -2524,15 +2582,15 @@ var Ca = {
|
|
|
2524
2582
|
"model-value": e.block.align,
|
|
2525
2583
|
"onUpdate:modelValue": r[6] ||= (e) => k("align", e)
|
|
2526
2584
|
}, null, 8, ["options", "model-value"])]),
|
|
2527
|
-
p("div",
|
|
2528
|
-
p("label", { class: n(x(
|
|
2585
|
+
p("div", lo, [
|
|
2586
|
+
p("label", { class: n(x(G)) }, c(x(a).image.linkUrl), 3),
|
|
2529
2587
|
g($, {
|
|
2530
2588
|
"model-value": e.block.linkUrl || "",
|
|
2531
2589
|
type: "url",
|
|
2532
2590
|
placeholder: x(a).image.imageUrlPlaceholder,
|
|
2533
2591
|
"onUpdate:modelValue": r[7] ||= (e) => k("linkUrl", e)
|
|
2534
2592
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2535
|
-
e.block.linkUrl ? (s(), y(
|
|
2593
|
+
e.block.linkUrl ? (s(), y(Y, {
|
|
2536
2594
|
key: 0,
|
|
2537
2595
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2538
2596
|
"model-value": e.block.linkOpenInNewTab ?? !1,
|
|
@@ -2542,11 +2600,11 @@ var Ca = {
|
|
|
2542
2600
|
])
|
|
2543
2601
|
], 64));
|
|
2544
2602
|
}
|
|
2545
|
-
}),
|
|
2603
|
+
}), po = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, mo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ho = [
|
|
2546
2604
|
"value",
|
|
2547
2605
|
"placeholder",
|
|
2548
2606
|
"onInput"
|
|
2549
|
-
],
|
|
2607
|
+
], go = ["title", "onClick"], _o = { class: "tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-x-3 tpl:gap-y-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, vo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, yo = ["value"], bo = { value: "" }, xo = ["value"], So = ["value"], Co = /* @__PURE__ */ f({
|
|
2550
2608
|
__name: "MenuToolbar",
|
|
2551
2609
|
props: {
|
|
2552
2610
|
block: {},
|
|
@@ -2554,7 +2612,7 @@ var Ca = {
|
|
|
2554
2612
|
},
|
|
2555
2613
|
emits: ["update"],
|
|
2556
2614
|
setup(t, { emit: r }) {
|
|
2557
|
-
let i = t, a = r, { t: o } =
|
|
2615
|
+
let i = t, a = r, { t: o } = H(), u = w(() => [
|
|
2558
2616
|
{
|
|
2559
2617
|
key: "openInNewTab",
|
|
2560
2618
|
label: o.menu.openInNewTab
|
|
@@ -2571,17 +2629,17 @@ var Ca = {
|
|
|
2571
2629
|
{
|
|
2572
2630
|
value: "left",
|
|
2573
2631
|
label: o.title.alignLeft,
|
|
2574
|
-
icon:
|
|
2632
|
+
icon: Ot
|
|
2575
2633
|
},
|
|
2576
2634
|
{
|
|
2577
2635
|
value: "center",
|
|
2578
2636
|
label: o.title.alignCenter,
|
|
2579
|
-
icon:
|
|
2637
|
+
icon: Dt
|
|
2580
2638
|
},
|
|
2581
2639
|
{
|
|
2582
2640
|
value: "right",
|
|
2583
2641
|
label: o.title.alignRight,
|
|
2584
|
-
icon:
|
|
2642
|
+
icon: Et
|
|
2585
2643
|
}
|
|
2586
2644
|
]);
|
|
2587
2645
|
function f(e, t) {
|
|
@@ -2589,7 +2647,7 @@ var Ca = {
|
|
|
2589
2647
|
}
|
|
2590
2648
|
function h() {
|
|
2591
2649
|
let e = {
|
|
2592
|
-
id:
|
|
2650
|
+
id: B(),
|
|
2593
2651
|
text: "",
|
|
2594
2652
|
url: "",
|
|
2595
2653
|
openInNewTab: !1,
|
|
@@ -2609,25 +2667,25 @@ var Ca = {
|
|
|
2609
2667
|
a("update", { items: i.block.items.filter((t) => t.id !== e) });
|
|
2610
2668
|
}
|
|
2611
2669
|
return (r, i) => (s(), m(C, null, [
|
|
2612
|
-
g(
|
|
2613
|
-
default: l(() => [p("div",
|
|
2670
|
+
g(X, { label: x(o).menu.items }, {
|
|
2671
|
+
default: l(() => [p("div", po, [(s(!0), m(C, null, e(t.block.items, (r) => (s(), m("div", {
|
|
2614
2672
|
key: r.id,
|
|
2615
2673
|
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"
|
|
2616
2674
|
}, [
|
|
2617
|
-
p("div",
|
|
2675
|
+
p("div", mo, [p("input", {
|
|
2618
2676
|
type: "text",
|
|
2619
|
-
class: n([x(
|
|
2677
|
+
class: n([x(W), "tpl:flex-1"]),
|
|
2620
2678
|
value: r.text,
|
|
2621
2679
|
placeholder: x(o).menu.text,
|
|
2622
2680
|
onInput: (e) => _(r.id, "text", e.target.value)
|
|
2623
|
-
}, null, 42,
|
|
2624
|
-
class: n(x(
|
|
2681
|
+
}, null, 42, ho), p("button", {
|
|
2682
|
+
class: n(x(Rt)),
|
|
2625
2683
|
title: x(o).menu.removeItem,
|
|
2626
2684
|
onClick: (e) => v(r.id)
|
|
2627
|
-
}, [g(x(
|
|
2685
|
+
}, [g(x(At), {
|
|
2628
2686
|
size: 14,
|
|
2629
2687
|
"stroke-width": 2
|
|
2630
|
-
})], 10,
|
|
2688
|
+
})], 10, go)]),
|
|
2631
2689
|
g($, {
|
|
2632
2690
|
"model-value": r.url,
|
|
2633
2691
|
type: "url",
|
|
@@ -2638,7 +2696,7 @@ var Ca = {
|
|
|
2638
2696
|
"placeholder",
|
|
2639
2697
|
"onUpdate:modelValue"
|
|
2640
2698
|
]),
|
|
2641
|
-
p("div",
|
|
2699
|
+
p("div", _o, [(s(!0), m(C, null, e(u.value, (e) => (s(), y(Y, {
|
|
2642
2700
|
key: e.key,
|
|
2643
2701
|
"model-value": r[e.key],
|
|
2644
2702
|
label: e.label,
|
|
@@ -2648,13 +2706,13 @@ var Ca = {
|
|
|
2648
2706
|
"label",
|
|
2649
2707
|
"onUpdate:modelValue"
|
|
2650
2708
|
]))), 128))]),
|
|
2651
|
-
p("div",
|
|
2709
|
+
p("div", vo, [p("label", { class: n([x(G), "tpl:!mb-0"]) }, c(x(o).menu.color), 3), g(J, {
|
|
2652
2710
|
"swatch-only": "",
|
|
2653
2711
|
"model-value": r.color || t.block.linkColor || t.block.color || "",
|
|
2654
2712
|
"onUpdate:modelValue": (e) => _(r.id, "color", e)
|
|
2655
2713
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2656
2714
|
]))), 128)), p("button", {
|
|
2657
|
-
class: n(x(
|
|
2715
|
+
class: n(x(Vt)),
|
|
2658
2716
|
onClick: h
|
|
2659
2717
|
}, [g(x(Q), {
|
|
2660
2718
|
size: 14,
|
|
@@ -2662,19 +2720,19 @@ var Ca = {
|
|
|
2662
2720
|
}), b(" " + c(x(o).menu.addItem), 1)], 2)])]),
|
|
2663
2721
|
_: 1
|
|
2664
2722
|
}, 8, ["label"]),
|
|
2665
|
-
g(
|
|
2723
|
+
g(X, { label: x(o).menu.fontFamily }, {
|
|
2666
2724
|
default: l(() => [p("select", {
|
|
2667
|
-
class: n(x(
|
|
2725
|
+
class: n(x(W)),
|
|
2668
2726
|
value: t.block.fontFamily || "",
|
|
2669
2727
|
onChange: i[0] ||= (e) => f("fontFamily", e.target.value || void 0)
|
|
2670
|
-
}, [p("option",
|
|
2728
|
+
}, [p("option", bo, c(x(o).title.inheritFont), 1), (s(!0), m(C, null, e(t.fontFamilies, (e) => (s(), m("option", {
|
|
2671
2729
|
key: e.value,
|
|
2672
2730
|
value: e.value
|
|
2673
|
-
}, c(e.label), 9,
|
|
2731
|
+
}, c(e.label), 9, xo))), 128))], 42, yo)]),
|
|
2674
2732
|
_: 1
|
|
2675
2733
|
}, 8, ["label"]),
|
|
2676
|
-
g(
|
|
2677
|
-
default: l(() => [g(
|
|
2734
|
+
g(X, { label: x(o).menu.fontSize }, {
|
|
2735
|
+
default: l(() => [g(Kt, {
|
|
2678
2736
|
"model-value": t.block.fontSize,
|
|
2679
2737
|
min: 8,
|
|
2680
2738
|
max: 48,
|
|
@@ -2683,46 +2741,46 @@ var Ca = {
|
|
|
2683
2741
|
}, null, 8, ["model-value"])]),
|
|
2684
2742
|
_: 1
|
|
2685
2743
|
}, 8, ["label"]),
|
|
2686
|
-
g(
|
|
2687
|
-
default: l(() => [g(
|
|
2744
|
+
g(X, { label: x(o).menu.color }, {
|
|
2745
|
+
default: l(() => [g(J, {
|
|
2688
2746
|
"model-value": t.block.color ?? "",
|
|
2689
2747
|
"onUpdate:modelValue": i[2] ||= (e) => f("color", e || void 0)
|
|
2690
2748
|
}, null, 8, ["model-value"])]),
|
|
2691
2749
|
_: 1
|
|
2692
2750
|
}, 8, ["label"]),
|
|
2693
|
-
g(
|
|
2694
|
-
default: l(() => [g(
|
|
2751
|
+
g(X, { label: x(o).menu.linkColor }, {
|
|
2752
|
+
default: l(() => [g(J, {
|
|
2695
2753
|
"model-value": t.block.linkColor || t.block.color || "",
|
|
2696
2754
|
"onUpdate:modelValue": i[3] ||= (e) => f("linkColor", e || void 0)
|
|
2697
2755
|
}, null, 8, ["model-value"])]),
|
|
2698
2756
|
_: 1
|
|
2699
2757
|
}, 8, ["label"]),
|
|
2700
|
-
g(
|
|
2701
|
-
default: l(() => [g(
|
|
2758
|
+
g(X, { label: x(o).menu.textAlign }, {
|
|
2759
|
+
default: l(() => [g(Z, {
|
|
2702
2760
|
options: d.value,
|
|
2703
2761
|
"model-value": t.block.textAlign,
|
|
2704
2762
|
"onUpdate:modelValue": i[4] ||= (e) => f("textAlign", e)
|
|
2705
2763
|
}, null, 8, ["options", "model-value"])]),
|
|
2706
2764
|
_: 1
|
|
2707
2765
|
}, 8, ["label"]),
|
|
2708
|
-
g(
|
|
2766
|
+
g(X, { label: x(o).menu.separator }, {
|
|
2709
2767
|
default: l(() => [p("input", {
|
|
2710
2768
|
type: "text",
|
|
2711
|
-
class: n(x(
|
|
2769
|
+
class: n(x(W)),
|
|
2712
2770
|
value: t.block.separator,
|
|
2713
2771
|
onInput: i[5] ||= (e) => f("separator", e.target.value)
|
|
2714
|
-
}, null, 42,
|
|
2772
|
+
}, null, 42, So)]),
|
|
2715
2773
|
_: 1
|
|
2716
2774
|
}, 8, ["label"]),
|
|
2717
|
-
g(
|
|
2718
|
-
default: l(() => [g(
|
|
2775
|
+
g(X, { label: x(o).menu.separatorColor }, {
|
|
2776
|
+
default: l(() => [g(J, {
|
|
2719
2777
|
"model-value": t.block.separatorColor,
|
|
2720
2778
|
"onUpdate:modelValue": i[6] ||= (e) => f("separatorColor", e)
|
|
2721
2779
|
}, null, 8, ["model-value"])]),
|
|
2722
2780
|
_: 1
|
|
2723
2781
|
}, 8, ["label"]),
|
|
2724
|
-
g(
|
|
2725
|
-
default: l(() => [g(
|
|
2782
|
+
g(X, { label: x(o).menu.spacing }, {
|
|
2783
|
+
default: l(() => [g(Kt, {
|
|
2726
2784
|
"model-value": t.block.spacing,
|
|
2727
2785
|
min: 0,
|
|
2728
2786
|
max: 50,
|
|
@@ -2736,11 +2794,11 @@ var Ca = {
|
|
|
2736
2794
|
});
|
|
2737
2795
|
//#endregion
|
|
2738
2796
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2739
|
-
function
|
|
2797
|
+
function wo(e) {
|
|
2740
2798
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2741
2799
|
}
|
|
2742
|
-
function
|
|
2743
|
-
let n =
|
|
2800
|
+
function To(e, t) {
|
|
2801
|
+
let n = wo(t);
|
|
2744
2802
|
if (e.length === n) return e;
|
|
2745
2803
|
if (e.length < n) {
|
|
2746
2804
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2751,18 +2809,18 @@ function _o(e, t) {
|
|
|
2751
2809
|
}
|
|
2752
2810
|
//#endregion
|
|
2753
2811
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2754
|
-
var
|
|
2812
|
+
var Eo = { class: "tpl:mb-3.5" }, Do = ["value"], Oo = ["value"], ko = {
|
|
2755
2813
|
key: 0,
|
|
2756
2814
|
class: "tpl:mb-3.5"
|
|
2757
|
-
},
|
|
2815
|
+
}, Ao = { class: "tpl:mb-3.5" }, jo = { class: "tpl:flex tpl:items-stretch" }, Mo = ["value"], No = { class: "tpl:mb-3.5" }, Po = {
|
|
2758
2816
|
key: 0,
|
|
2759
2817
|
class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
|
|
2760
|
-
},
|
|
2818
|
+
}, Fo = { class: "tpl:flex tpl:items-stretch" }, Io = ["value"], Lo = /* @__PURE__ */ f({
|
|
2761
2819
|
__name: "SectionToolbar",
|
|
2762
2820
|
props: { block: {} },
|
|
2763
2821
|
emits: ["update"],
|
|
2764
2822
|
setup(t, { emit: r }) {
|
|
2765
|
-
let i = t, a = r, { t: o } =
|
|
2823
|
+
let i = t, a = r, { t: o } = H(), l = w(() => [
|
|
2766
2824
|
{
|
|
2767
2825
|
value: "1",
|
|
2768
2826
|
label: o.section.column1
|
|
@@ -2785,7 +2843,7 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
2785
2843
|
}
|
|
2786
2844
|
]);
|
|
2787
2845
|
function u(e) {
|
|
2788
|
-
let t = e.target.value, n =
|
|
2846
|
+
let t = e.target.value, n = To(i.block.children, t);
|
|
2789
2847
|
a("update", {
|
|
2790
2848
|
columns: t,
|
|
2791
2849
|
children: n
|
|
@@ -2819,39 +2877,39 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
2819
2877
|
_({ borderRadius: Number(e.target.value) });
|
|
2820
2878
|
}
|
|
2821
2879
|
return (r, i) => (s(), m(C, null, [
|
|
2822
|
-
p("div",
|
|
2823
|
-
class: n(x(
|
|
2880
|
+
p("div", Eo, [p("label", { class: n(x(G)) }, c(x(o).section.columns), 3), p("select", {
|
|
2881
|
+
class: n(x(W)),
|
|
2824
2882
|
value: t.block.columns,
|
|
2825
2883
|
onChange: u
|
|
2826
2884
|
}, [(s(!0), m(C, null, e(l.value, (e) => (s(), m("option", {
|
|
2827
2885
|
key: e.value,
|
|
2828
2886
|
value: e.value
|
|
2829
|
-
}, c(e.label), 9,
|
|
2830
|
-
t.block.columns === "1" ? T("", !0) : (s(), m("div",
|
|
2887
|
+
}, c(e.label), 9, Oo))), 128))], 42, Do)]),
|
|
2888
|
+
t.block.columns === "1" ? T("", !0) : (s(), m("div", ko, [g(Y, {
|
|
2831
2889
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2832
2890
|
"model-value": t.block.stackOnMobile !== !1,
|
|
2833
2891
|
label: x(o).section.stackOnMobile,
|
|
2834
2892
|
"onUpdate:modelValue": i[0] ||= (e) => d(e)
|
|
2835
2893
|
}, null, 8, ["model-value", "label"])])),
|
|
2836
|
-
p("div",
|
|
2894
|
+
p("div", Ao, [p("label", { class: n(x(G)) }, c(x(o).section.borderRadius), 3), p("div", jo, [p("input", {
|
|
2837
2895
|
type: "number",
|
|
2838
|
-
class: n(x(
|
|
2896
|
+
class: n(x(q)),
|
|
2839
2897
|
value: t.block.borderRadius ?? 0,
|
|
2840
2898
|
min: "0",
|
|
2841
2899
|
max: "50",
|
|
2842
2900
|
onInput: f
|
|
2843
|
-
}, null, 42,
|
|
2844
|
-
p("div",
|
|
2901
|
+
}, null, 42, Mo), p("span", { class: n(x(K)) }, "px", 2)])]),
|
|
2902
|
+
p("div", No, [g(Y, {
|
|
2845
2903
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2846
2904
|
"model-value": !!t.block.wrapper,
|
|
2847
2905
|
label: x(o).section.wrapperEnable,
|
|
2848
2906
|
"onUpdate:modelValue": i[1] ||= (e) => h(e)
|
|
2849
|
-
}, null, 8, ["model-value", "label"]), t.block.wrapper ? (s(), m("div",
|
|
2850
|
-
p("div", null, [p("label", { class: n(x(
|
|
2907
|
+
}, null, 8, ["model-value", "label"]), t.block.wrapper ? (s(), m("div", Po, [
|
|
2908
|
+
p("div", null, [p("label", { class: n(x(G)) }, c(x(o).blockSettings.color), 3), g(J, {
|
|
2851
2909
|
"model-value": t.block.wrapper.backgroundColor ?? "",
|
|
2852
2910
|
"onUpdate:modelValue": i[2] ||= (e) => _({ backgroundColor: e })
|
|
2853
2911
|
}, null, 8, ["model-value"])]),
|
|
2854
|
-
g(
|
|
2912
|
+
g(Ii, {
|
|
2855
2913
|
label: x(o).blockSettings.padding,
|
|
2856
2914
|
"model-value": t.block.wrapper.padding ?? {
|
|
2857
2915
|
top: 0,
|
|
@@ -2861,29 +2919,29 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
2861
2919
|
},
|
|
2862
2920
|
"onUpdate:modelValue": v
|
|
2863
2921
|
}, null, 8, ["label", "model-value"]),
|
|
2864
|
-
p("div", null, [p("label", { class: n(x(
|
|
2922
|
+
p("div", null, [p("label", { class: n(x(G)) }, c(x(o).section.borderRadius), 3), p("div", Fo, [p("input", {
|
|
2865
2923
|
type: "number",
|
|
2866
|
-
class: n(x(
|
|
2924
|
+
class: n(x(q)),
|
|
2867
2925
|
value: t.block.wrapper.borderRadius ?? 0,
|
|
2868
2926
|
min: "0",
|
|
2869
2927
|
max: "50",
|
|
2870
2928
|
onInput: y
|
|
2871
|
-
}, null, 42,
|
|
2929
|
+
}, null, 42, Io), p("span", { class: n(x(K)) }, "px", 2)])])
|
|
2872
2930
|
])) : T("", !0)])
|
|
2873
2931
|
], 64));
|
|
2874
2932
|
}
|
|
2875
|
-
}),
|
|
2933
|
+
}), Ro = { class: "tpl:mb-3.5" }, zo = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Bo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Vo = ["value", "onChange"], Ho = ["value"], Uo = ["title", "onClick"], Wo = { class: "tpl:mb-3.5" }, Go = ["value"], Ko = { value: "solid" }, qo = { value: "outlined" }, Jo = { value: "rounded" }, Yo = { value: "square" }, Xo = { value: "circle" }, Zo = { class: "tpl:mb-3.5" }, Qo = { class: "tpl:mb-3.5" }, $o = { class: "tpl:flex tpl:items-stretch" }, es = ["value"], ts = { class: "tpl:mb-3.5" }, ns = /* @__PURE__ */ f({
|
|
2876
2934
|
__name: "SocialToolbar",
|
|
2877
2935
|
props: { block: {} },
|
|
2878
2936
|
emits: ["update"],
|
|
2879
2937
|
setup(t, { emit: r }) {
|
|
2880
|
-
let i = t, a = r, { t: o } =
|
|
2938
|
+
let i = t, a = r, { t: o } = H();
|
|
2881
2939
|
function l(e, t) {
|
|
2882
2940
|
a("update", { [e]: t });
|
|
2883
2941
|
}
|
|
2884
2942
|
function u() {
|
|
2885
2943
|
let e = {
|
|
2886
|
-
id:
|
|
2944
|
+
id: B(),
|
|
2887
2945
|
platform: "facebook",
|
|
2888
2946
|
url: ""
|
|
2889
2947
|
};
|
|
@@ -2900,25 +2958,25 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
2900
2958
|
a("update", { icons: i.block.icons.filter((t) => t.id !== e) });
|
|
2901
2959
|
}
|
|
2902
2960
|
return (r, i) => (s(), m(C, null, [
|
|
2903
|
-
p("div",
|
|
2961
|
+
p("div", Ro, [p("label", { class: n(x(G)) }, c(x(o).social.icons), 3), p("div", zo, [(s(!0), m(C, null, e(t.block.icons, (t) => (s(), m("div", {
|
|
2904
2962
|
key: t.id,
|
|
2905
2963
|
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"
|
|
2906
|
-
}, [p("div",
|
|
2964
|
+
}, [p("div", Bo, [p("select", {
|
|
2907
2965
|
"data-testid": "social-platform-select",
|
|
2908
|
-
class: n([x(
|
|
2966
|
+
class: n([x(W), "tpl:flex-1"]),
|
|
2909
2967
|
value: t.platform,
|
|
2910
2968
|
onChange: (e) => d(t.id, "platform", e.target.value)
|
|
2911
|
-
}, [(s(!0), m(C, null, e(x(
|
|
2969
|
+
}, [(s(!0), m(C, null, e(x(Te), (e) => (s(), m("option", {
|
|
2912
2970
|
key: e,
|
|
2913
2971
|
value: e
|
|
2914
|
-
}, c(x(o).social.platforms[e]), 9,
|
|
2915
|
-
class: n(x(
|
|
2972
|
+
}, c(x(o).social.platforms[e]), 9, Ho))), 128))], 42, Vo), p("button", {
|
|
2973
|
+
class: n(x(Rt)),
|
|
2916
2974
|
title: x(o).social.removeIcon,
|
|
2917
2975
|
onClick: (e) => f(t.id)
|
|
2918
|
-
}, [g(x(
|
|
2976
|
+
}, [g(x(At), {
|
|
2919
2977
|
size: 14,
|
|
2920
2978
|
"stroke-width": 2
|
|
2921
|
-
})], 10,
|
|
2979
|
+
})], 10, Uo)]), g($, {
|
|
2922
2980
|
"model-value": t.url,
|
|
2923
2981
|
type: "url",
|
|
2924
2982
|
placeholder: x(o).social.urlPlaceholder,
|
|
@@ -2928,24 +2986,24 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
2928
2986
|
"placeholder",
|
|
2929
2987
|
"onUpdate:modelValue"
|
|
2930
2988
|
])]))), 128)), p("button", {
|
|
2931
|
-
class: n(x(
|
|
2989
|
+
class: n(x(Vt)),
|
|
2932
2990
|
onClick: u
|
|
2933
2991
|
}, [g(x(Q), {
|
|
2934
2992
|
size: 14,
|
|
2935
2993
|
"stroke-width": 2
|
|
2936
2994
|
}), b(" " + c(x(o).social.addIcon), 1)], 2)])]),
|
|
2937
|
-
p("div",
|
|
2938
|
-
class: n(x(
|
|
2995
|
+
p("div", Wo, [p("label", { class: n(x(G)) }, c(x(o).social.style), 3), p("select", {
|
|
2996
|
+
class: n(x(W)),
|
|
2939
2997
|
value: t.block.iconStyle,
|
|
2940
2998
|
onChange: i[0] ||= (e) => l("iconStyle", e.target.value)
|
|
2941
2999
|
}, [
|
|
2942
|
-
p("option",
|
|
2943
|
-
p("option",
|
|
2944
|
-
p("option",
|
|
2945
|
-
p("option",
|
|
2946
|
-
p("option",
|
|
2947
|
-
], 42,
|
|
2948
|
-
p("div",
|
|
3000
|
+
p("option", Ko, c(x(o).social.styleSolid), 1),
|
|
3001
|
+
p("option", qo, c(x(o).social.styleOutlined), 1),
|
|
3002
|
+
p("option", Jo, c(x(o).social.styleRounded), 1),
|
|
3003
|
+
p("option", Yo, c(x(o).social.styleSquare), 1),
|
|
3004
|
+
p("option", Xo, c(x(o).social.styleCircle), 1)
|
|
3005
|
+
], 42, Go)]),
|
|
3006
|
+
p("div", Zo, [p("label", { class: n(x(G)) }, c(x(o).social.size), 3), g(Z, {
|
|
2949
3007
|
options: [
|
|
2950
3008
|
{
|
|
2951
3009
|
value: "small",
|
|
@@ -2963,30 +3021,30 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
2963
3021
|
"model-value": t.block.iconSize,
|
|
2964
3022
|
"onUpdate:modelValue": i[1] ||= (e) => l("iconSize", e)
|
|
2965
3023
|
}, null, 8, ["options", "model-value"])]),
|
|
2966
|
-
p("div",
|
|
3024
|
+
p("div", Qo, [p("label", { class: n(x(G)) }, c(x(o).social.spacing), 3), p("div", $o, [p("input", {
|
|
2967
3025
|
type: "number",
|
|
2968
|
-
class: n(x(
|
|
3026
|
+
class: n(x(q)),
|
|
2969
3027
|
value: t.block.spacing,
|
|
2970
3028
|
min: "0",
|
|
2971
3029
|
max: "50",
|
|
2972
3030
|
onInput: i[2] ||= (e) => l("spacing", Number(e.target.value))
|
|
2973
|
-
}, null, 42,
|
|
2974
|
-
p("div",
|
|
3031
|
+
}, null, 42, es), p("span", { class: n(x(K)) }, "px", 2)])]),
|
|
3032
|
+
p("div", ts, [p("label", { class: n(x(G)) }, c(x(o).social.align), 3), g(Z, {
|
|
2975
3033
|
options: [
|
|
2976
3034
|
{
|
|
2977
3035
|
value: "left",
|
|
2978
3036
|
label: x(o).title.alignLeft,
|
|
2979
|
-
icon: x(
|
|
3037
|
+
icon: x(Ot)
|
|
2980
3038
|
},
|
|
2981
3039
|
{
|
|
2982
3040
|
value: "center",
|
|
2983
3041
|
label: x(o).title.alignCenter,
|
|
2984
|
-
icon: x(
|
|
3042
|
+
icon: x(Dt)
|
|
2985
3043
|
},
|
|
2986
3044
|
{
|
|
2987
3045
|
value: "right",
|
|
2988
3046
|
label: x(o).title.alignRight,
|
|
2989
|
-
icon: x(
|
|
3047
|
+
icon: x(Et)
|
|
2990
3048
|
}
|
|
2991
3049
|
],
|
|
2992
3050
|
"model-value": t.block.align,
|
|
@@ -2994,22 +3052,22 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
2994
3052
|
}, null, 8, ["options", "model-value"])])
|
|
2995
3053
|
], 64));
|
|
2996
3054
|
}
|
|
2997
|
-
}),
|
|
3055
|
+
}), rs = { class: "tpl:mb-3.5" }, is = { class: "tpl:flex tpl:items-stretch" }, as = ["value"], os = ["value"], ss = /* @__PURE__ */ f({
|
|
2998
3056
|
__name: "SpacerToolbar",
|
|
2999
3057
|
props: { block: {} },
|
|
3000
3058
|
emits: ["update"],
|
|
3001
3059
|
setup(e, { emit: t }) {
|
|
3002
|
-
let r = t, { t: i } =
|
|
3003
|
-
return (t, a) => (s(), m("div",
|
|
3004
|
-
p("label", { class: n(x(
|
|
3005
|
-
p("div",
|
|
3060
|
+
let r = t, { t: i } = H();
|
|
3061
|
+
return (t, a) => (s(), m("div", rs, [
|
|
3062
|
+
p("label", { class: n(x(G)) }, c(x(i).spacer.height), 3),
|
|
3063
|
+
p("div", is, [p("input", {
|
|
3006
3064
|
type: "number",
|
|
3007
|
-
class: n(x(
|
|
3065
|
+
class: n(x(q)),
|
|
3008
3066
|
value: e.block.height,
|
|
3009
3067
|
min: "10",
|
|
3010
3068
|
max: "100",
|
|
3011
3069
|
onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
3012
|
-
}, null, 42,
|
|
3070
|
+
}, null, 42, as), p("span", { class: n(x(K)) }, "px", 2)]),
|
|
3013
3071
|
p("input", {
|
|
3014
3072
|
type: "range",
|
|
3015
3073
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -3017,13 +3075,13 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3017
3075
|
min: "10",
|
|
3018
3076
|
max: "100",
|
|
3019
3077
|
onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
3020
|
-
}, null, 40,
|
|
3078
|
+
}, null, 40, os)
|
|
3021
3079
|
]));
|
|
3022
3080
|
}
|
|
3023
|
-
}),
|
|
3081
|
+
}), cs = { class: "tpl:mb-3.5" }, ls = { class: "tpl:flex tpl:items-center tpl:gap-3" }, us = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ds = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, fs = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, ps = ["disabled"], ms = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, hs = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, gs = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, _s = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, vs = ["disabled"], ys = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, bs = { class: "tpl:mb-3.5" }, xs = {
|
|
3024
3082
|
key: 0,
|
|
3025
3083
|
class: "tpl:mb-3.5"
|
|
3026
|
-
},
|
|
3084
|
+
}, Ss = { class: "tpl:mb-3.5" }, Cs = { class: "tpl:mb-3.5" }, ws = { class: "tpl:flex tpl:items-stretch" }, Ts = ["value"], Es = { class: "tpl:mb-3.5" }, Ds = { class: "tpl:flex tpl:items-stretch" }, Os = ["value"], ks = { class: "tpl:mb-3.5" }, As = ["value"], js = { value: "" }, Ms = ["value"], Ns = { class: "tpl:mb-3.5" }, Ps = { class: "tpl:flex tpl:items-stretch" }, Fs = ["value"], Is = { class: "tpl:mb-3.5" }, Ls = { class: "tpl:mb-3.5" }, Rs = /* @__PURE__ */ f({
|
|
3027
3085
|
__name: "TableToolbar",
|
|
3028
3086
|
props: {
|
|
3029
3087
|
block: {},
|
|
@@ -3031,15 +3089,15 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3031
3089
|
},
|
|
3032
3090
|
emits: ["update"],
|
|
3033
3091
|
setup(t, { emit: r }) {
|
|
3034
|
-
let i = t, a = r, { t: o } =
|
|
3092
|
+
let i = t, a = r, { t: o } = H(), l = w(() => i.block.rows.length > 0 ? i.block.rows[0].cells.length : 0);
|
|
3035
3093
|
function u(e, t) {
|
|
3036
3094
|
a("update", { [e]: t });
|
|
3037
3095
|
}
|
|
3038
3096
|
function d() {
|
|
3039
3097
|
let e = i.block.rows.length > 0 ? i.block.rows[0].cells.length : 3, t = {
|
|
3040
|
-
id:
|
|
3098
|
+
id: B(),
|
|
3041
3099
|
cells: Array.from({ length: e }, () => ({
|
|
3042
|
-
id:
|
|
3100
|
+
id: B(),
|
|
3043
3101
|
content: ""
|
|
3044
3102
|
}))
|
|
3045
3103
|
};
|
|
@@ -3052,7 +3110,7 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3052
3110
|
let e = i.block.rows.map((e) => ({
|
|
3053
3111
|
...e,
|
|
3054
3112
|
cells: [...e.cells, {
|
|
3055
|
-
id:
|
|
3113
|
+
id: B(),
|
|
3056
3114
|
content: ""
|
|
3057
3115
|
}]
|
|
3058
3116
|
}));
|
|
@@ -3066,16 +3124,16 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3066
3124
|
a("update", { rows: t });
|
|
3067
3125
|
}
|
|
3068
3126
|
return (r, i) => (s(), m(C, null, [
|
|
3069
|
-
p("div",
|
|
3127
|
+
p("div", cs, [p("label", { class: n(x(G)) }, c(x(o).table.dimensions), 3), p("div", ls, [p("div", us, [p("span", ds, c(x(o).table.rows), 1), p("div", fs, [
|
|
3070
3128
|
p("button", {
|
|
3071
3129
|
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",
|
|
3072
3130
|
disabled: t.block.rows.length <= 1,
|
|
3073
3131
|
onClick: i[0] ||= (e) => f(t.block.rows[t.block.rows.length - 1].id)
|
|
3074
|
-
}, [g(x(
|
|
3132
|
+
}, [g(x(pt), {
|
|
3075
3133
|
size: 12,
|
|
3076
3134
|
"stroke-width": 2
|
|
3077
|
-
})], 8,
|
|
3078
|
-
p("span",
|
|
3135
|
+
})], 8, ps),
|
|
3136
|
+
p("span", ms, c(t.block.rows.length), 1),
|
|
3079
3137
|
p("button", {
|
|
3080
3138
|
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)]",
|
|
3081
3139
|
onClick: d
|
|
@@ -3083,16 +3141,16 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3083
3141
|
size: 12,
|
|
3084
3142
|
"stroke-width": 2
|
|
3085
3143
|
})])
|
|
3086
|
-
])]), p("div",
|
|
3144
|
+
])]), p("div", hs, [p("span", gs, c(x(o).table.columns), 1), p("div", _s, [
|
|
3087
3145
|
p("button", {
|
|
3088
3146
|
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",
|
|
3089
3147
|
disabled: l.value <= 1,
|
|
3090
3148
|
onClick: i[1] ||= (e) => _(l.value - 1)
|
|
3091
|
-
}, [g(x(
|
|
3149
|
+
}, [g(x(pt), {
|
|
3092
3150
|
size: 12,
|
|
3093
3151
|
"stroke-width": 2
|
|
3094
|
-
})], 8,
|
|
3095
|
-
p("span",
|
|
3152
|
+
})], 8, vs),
|
|
3153
|
+
p("span", ys, c(l.value), 1),
|
|
3096
3154
|
p("button", {
|
|
3097
3155
|
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)]",
|
|
3098
3156
|
onClick: h
|
|
@@ -3101,15 +3159,15 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3101
3159
|
"stroke-width": 2
|
|
3102
3160
|
})])
|
|
3103
3161
|
])])])]),
|
|
3104
|
-
p("div",
|
|
3162
|
+
p("div", bs, [g(Y, {
|
|
3105
3163
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
3106
3164
|
"model-value": t.block.hasHeaderRow,
|
|
3107
3165
|
label: x(o).table.hasHeaderRow,
|
|
3108
3166
|
"onUpdate:modelValue": i[2] ||= (e) => u("hasHeaderRow", e)
|
|
3109
3167
|
}, null, 8, ["model-value", "label"])]),
|
|
3110
|
-
t.block.hasHeaderRow ? (s(), m("div",
|
|
3168
|
+
t.block.hasHeaderRow ? (s(), m("div", xs, [p("label", { class: n(x(G)) }, c(x(o).table.headerBackgroundColor), 3), g(J, {
|
|
3111
3169
|
"model-value": t.block.headerBackgroundColor ?? "",
|
|
3112
|
-
"seed-color": x(
|
|
3170
|
+
"seed-color": x(Bt),
|
|
3113
3171
|
placeholder: x(o).table.noHeaderBg,
|
|
3114
3172
|
"onUpdate:modelValue": i[3] ||= (e) => u("headerBackgroundColor", e || null)
|
|
3115
3173
|
}, null, 8, [
|
|
@@ -3117,62 +3175,62 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3117
3175
|
"seed-color",
|
|
3118
3176
|
"placeholder"
|
|
3119
3177
|
])])) : T("", !0),
|
|
3120
|
-
p("div",
|
|
3178
|
+
p("div", Ss, [p("label", { class: n(x(G)) }, c(x(o).table.borderColor), 3), g(J, {
|
|
3121
3179
|
"model-value": t.block.borderColor,
|
|
3122
3180
|
"onUpdate:modelValue": i[4] ||= (e) => u("borderColor", e)
|
|
3123
3181
|
}, null, 8, ["model-value"])]),
|
|
3124
|
-
p("div",
|
|
3182
|
+
p("div", Cs, [p("label", { class: n(x(G)) }, c(x(o).table.borderWidth), 3), p("div", ws, [p("input", {
|
|
3125
3183
|
type: "number",
|
|
3126
|
-
class: n(x(
|
|
3184
|
+
class: n(x(q)),
|
|
3127
3185
|
value: t.block.borderWidth,
|
|
3128
3186
|
min: "0",
|
|
3129
3187
|
max: "10",
|
|
3130
3188
|
onInput: i[5] ||= (e) => u("borderWidth", Number(e.target.value))
|
|
3131
|
-
}, null, 42,
|
|
3132
|
-
p("div",
|
|
3189
|
+
}, null, 42, Ts), p("span", { class: n(x(K)) }, "px", 2)])]),
|
|
3190
|
+
p("div", Es, [p("label", { class: n(x(G)) }, c(x(o).table.cellPadding), 3), p("div", Ds, [p("input", {
|
|
3133
3191
|
type: "number",
|
|
3134
|
-
class: n(x(
|
|
3192
|
+
class: n(x(q)),
|
|
3135
3193
|
value: t.block.cellPadding,
|
|
3136
3194
|
min: "0",
|
|
3137
3195
|
max: "30",
|
|
3138
3196
|
onInput: i[6] ||= (e) => u("cellPadding", Number(e.target.value))
|
|
3139
|
-
}, null, 42,
|
|
3140
|
-
p("div",
|
|
3141
|
-
class: n(x(
|
|
3197
|
+
}, null, 42, Os), p("span", { class: n(x(K)) }, "px", 2)])]),
|
|
3198
|
+
p("div", ks, [p("label", { class: n(x(G)) }, c(x(o).table.fontFamily), 3), p("select", {
|
|
3199
|
+
class: n(x(W)),
|
|
3142
3200
|
value: t.block.fontFamily || "",
|
|
3143
3201
|
onChange: i[7] ||= (e) => u("fontFamily", e.target.value || void 0)
|
|
3144
|
-
}, [p("option",
|
|
3202
|
+
}, [p("option", js, c(x(o).title.inheritFont), 1), (s(!0), m(C, null, e(t.fontFamilies, (e) => (s(), m("option", {
|
|
3145
3203
|
key: e.value,
|
|
3146
3204
|
value: e.value
|
|
3147
|
-
}, c(e.label), 9,
|
|
3148
|
-
p("div",
|
|
3205
|
+
}, c(e.label), 9, Ms))), 128))], 42, As)]),
|
|
3206
|
+
p("div", Ns, [p("label", { class: n(x(G)) }, c(x(o).table.fontSize), 3), p("div", Ps, [p("input", {
|
|
3149
3207
|
type: "number",
|
|
3150
|
-
class: n(x(
|
|
3208
|
+
class: n(x(q)),
|
|
3151
3209
|
value: t.block.fontSize,
|
|
3152
3210
|
min: "10",
|
|
3153
3211
|
max: "32",
|
|
3154
3212
|
onInput: i[8] ||= (e) => u("fontSize", Number(e.target.value))
|
|
3155
|
-
}, null, 42,
|
|
3156
|
-
p("div",
|
|
3213
|
+
}, null, 42, Fs), p("span", { class: n(x(K)) }, "px", 2)])]),
|
|
3214
|
+
p("div", Is, [p("label", { class: n(x(G)) }, c(x(o).table.color), 3), g(J, {
|
|
3157
3215
|
"model-value": t.block.color ?? "",
|
|
3158
3216
|
"onUpdate:modelValue": i[9] ||= (e) => u("color", e || void 0)
|
|
3159
3217
|
}, null, 8, ["model-value"])]),
|
|
3160
|
-
p("div",
|
|
3218
|
+
p("div", Ls, [p("label", { class: n(x(G)) }, c(x(o).table.textAlign), 3), g(Z, {
|
|
3161
3219
|
options: [
|
|
3162
3220
|
{
|
|
3163
3221
|
value: "left",
|
|
3164
3222
|
label: x(o).title.alignLeft,
|
|
3165
|
-
icon: x(
|
|
3223
|
+
icon: x(Ot)
|
|
3166
3224
|
},
|
|
3167
3225
|
{
|
|
3168
3226
|
value: "center",
|
|
3169
3227
|
label: x(o).title.alignCenter,
|
|
3170
|
-
icon: x(
|
|
3228
|
+
icon: x(Dt)
|
|
3171
3229
|
},
|
|
3172
3230
|
{
|
|
3173
3231
|
value: "right",
|
|
3174
3232
|
label: x(o).title.alignRight,
|
|
3175
|
-
icon: x(
|
|
3233
|
+
icon: x(Et)
|
|
3176
3234
|
}
|
|
3177
3235
|
],
|
|
3178
3236
|
"model-value": t.block.textAlign,
|
|
@@ -3180,7 +3238,7 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3180
3238
|
}, null, 8, ["options", "model-value"])])
|
|
3181
3239
|
], 64));
|
|
3182
3240
|
}
|
|
3183
|
-
}),
|
|
3241
|
+
}), zs = { class: "tpl:mb-3.5" }, Bs = ["value"], Vs = { value: 1 }, Hs = { value: 2 }, Us = { value: 3 }, Ws = { value: 4 }, Gs = { class: "tpl:mb-3.5" }, Ks = ["value"], qs = { value: "" }, Js = ["value"], Ys = { class: "tpl:mb-3.5" }, Xs = { class: "tpl:mb-3.5" }, Zs = /* @__PURE__ */ f({
|
|
3184
3242
|
__name: "TitleToolbar",
|
|
3185
3243
|
props: {
|
|
3186
3244
|
block: {},
|
|
@@ -3188,49 +3246,49 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3188
3246
|
},
|
|
3189
3247
|
emits: ["update"],
|
|
3190
3248
|
setup(t, { emit: r }) {
|
|
3191
|
-
let i = r, { t: a } =
|
|
3249
|
+
let i = r, { t: a } = H();
|
|
3192
3250
|
function o(e, t) {
|
|
3193
3251
|
i("update", { [e]: t });
|
|
3194
3252
|
}
|
|
3195
3253
|
return (r, i) => (s(), m(C, null, [
|
|
3196
|
-
p("div",
|
|
3197
|
-
class: n(x(
|
|
3254
|
+
p("div", zs, [p("label", { class: n(x(G)) }, c(x(a).title.level), 3), p("select", {
|
|
3255
|
+
class: n(x(W)),
|
|
3198
3256
|
value: t.block.level,
|
|
3199
3257
|
onChange: i[0] ||= (e) => o("level", Number(e.target.value))
|
|
3200
3258
|
}, [
|
|
3201
|
-
p("option",
|
|
3202
|
-
p("option",
|
|
3203
|
-
p("option",
|
|
3204
|
-
p("option",
|
|
3205
|
-
], 42,
|
|
3206
|
-
p("div",
|
|
3207
|
-
class: n(x(
|
|
3259
|
+
p("option", Vs, c(x(a).title.heading1), 1),
|
|
3260
|
+
p("option", Hs, c(x(a).title.heading2), 1),
|
|
3261
|
+
p("option", Us, c(x(a).title.heading3), 1),
|
|
3262
|
+
p("option", Ws, c(x(a).title.heading4), 1)
|
|
3263
|
+
], 42, Bs)]),
|
|
3264
|
+
p("div", Gs, [p("label", { class: n(x(G)) }, c(x(a).title.fontFamily), 3), p("select", {
|
|
3265
|
+
class: n(x(W)),
|
|
3208
3266
|
value: t.block.fontFamily || "",
|
|
3209
3267
|
onChange: i[1] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
3210
|
-
}, [p("option",
|
|
3268
|
+
}, [p("option", qs, c(x(a).title.inheritFont), 1), (s(!0), m(C, null, e(t.fontFamilies, (e) => (s(), m("option", {
|
|
3211
3269
|
key: e.value,
|
|
3212
3270
|
value: e.value
|
|
3213
|
-
}, c(e.label), 9,
|
|
3214
|
-
p("div",
|
|
3271
|
+
}, c(e.label), 9, Js))), 128))], 42, Ks)]),
|
|
3272
|
+
p("div", Ys, [p("label", { class: n(x(G)) }, c(x(a).title.color), 3), g(J, {
|
|
3215
3273
|
"model-value": t.block.color ?? "",
|
|
3216
3274
|
"onUpdate:modelValue": i[2] ||= (e) => o("color", e || void 0)
|
|
3217
3275
|
}, null, 8, ["model-value"])]),
|
|
3218
|
-
p("div",
|
|
3276
|
+
p("div", Xs, [p("label", { class: n(x(G)) }, c(x(a).title.align), 3), g(Z, {
|
|
3219
3277
|
options: [
|
|
3220
3278
|
{
|
|
3221
3279
|
value: "left",
|
|
3222
3280
|
label: x(a).title.alignLeft,
|
|
3223
|
-
icon: x(
|
|
3281
|
+
icon: x(Ot)
|
|
3224
3282
|
},
|
|
3225
3283
|
{
|
|
3226
3284
|
value: "center",
|
|
3227
3285
|
label: x(a).title.alignCenter,
|
|
3228
|
-
icon: x(
|
|
3286
|
+
icon: x(Dt)
|
|
3229
3287
|
},
|
|
3230
3288
|
{
|
|
3231
3289
|
value: "right",
|
|
3232
3290
|
label: x(a).title.alignRight,
|
|
3233
|
-
icon: x(
|
|
3291
|
+
icon: x(Et)
|
|
3234
3292
|
}
|
|
3235
3293
|
],
|
|
3236
3294
|
"model-value": t.block.textAlign,
|
|
@@ -3238,19 +3296,19 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3238
3296
|
}, null, 8, ["options", "model-value"])])
|
|
3239
3297
|
], 64));
|
|
3240
3298
|
}
|
|
3241
|
-
}),
|
|
3299
|
+
}), Qs = { class: "tpl:mb-3.5" }, $s = {
|
|
3242
3300
|
key: 0,
|
|
3243
3301
|
class: "tpl:mb-3.5"
|
|
3244
|
-
},
|
|
3302
|
+
}, ec = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, tc = [
|
|
3245
3303
|
"value",
|
|
3246
3304
|
"placeholder",
|
|
3247
3305
|
"title"
|
|
3248
|
-
],
|
|
3306
|
+
], nc = { class: "tpl:mb-3.5" }, rc = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ic = { class: "tpl:mb-3.5" }, ac = { class: "tpl:mb-3.5" }, oc = ["value"], sc = { value: "full" }, cc = { class: "tpl:mb-3.5" }, lc = /* @__PURE__ */ f({
|
|
3249
3307
|
__name: "VideoToolbar",
|
|
3250
3308
|
props: { block: {} },
|
|
3251
3309
|
emits: ["update"],
|
|
3252
3310
|
setup(e, { emit: t }) {
|
|
3253
|
-
let r = e, i = t, { t: a } =
|
|
3311
|
+
let r = e, i = t, { t: a } = H(), o = D($e, null), l = D(et, ee.liquid), u = Pt(), f = w(() => !!o), h = w(() => te(r.block.url, l)), _ = d(!1), { start: v } = Ie(() => {
|
|
3254
3312
|
_.value = !1;
|
|
3255
3313
|
}, 1e3, { immediate: !1 });
|
|
3256
3314
|
function S(e, t) {
|
|
@@ -3261,15 +3319,15 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3261
3319
|
u.alive && e && (S("thumbnailUrl", e.url), _.value = !0, v());
|
|
3262
3320
|
}
|
|
3263
3321
|
return (t, r) => (s(), m(C, null, [
|
|
3264
|
-
p("div",
|
|
3265
|
-
p("label", { class: n(x(
|
|
3322
|
+
p("div", Qs, [
|
|
3323
|
+
p("label", { class: n(x(G)) }, c(x(a).video.videoUrl), 3),
|
|
3266
3324
|
g($, {
|
|
3267
3325
|
"model-value": e.block.url,
|
|
3268
3326
|
type: "url",
|
|
3269
3327
|
placeholder: x(a).video.videoUrlPlaceholder,
|
|
3270
3328
|
"onUpdate:modelValue": r[0] ||= (e) => S("url", e)
|
|
3271
3329
|
}, null, 8, ["model-value", "placeholder"]),
|
|
3272
|
-
e.block.url ? (s(), y(
|
|
3330
|
+
e.block.url ? (s(), y(Y, {
|
|
3273
3331
|
key: 0,
|
|
3274
3332
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
3275
3333
|
"model-value": e.block.openInNewTab ?? !1,
|
|
@@ -3277,16 +3335,16 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3277
3335
|
"onUpdate:modelValue": r[1] ||= (e) => S("openInNewTab", e)
|
|
3278
3336
|
}, null, 8, ["model-value", "label"])) : T("", !0)
|
|
3279
3337
|
]),
|
|
3280
|
-
h.value ? (s(), m("div",
|
|
3338
|
+
h.value ? (s(), m("div", $s, [p("label", { class: n(x(G)) }, [b(c(x(a).video.placeholderUrl) + " ", 1), p("span", ec, c(x(a).video.optional), 1)], 2), p("input", {
|
|
3281
3339
|
type: "url",
|
|
3282
|
-
class: n(x(
|
|
3340
|
+
class: n(x(W)),
|
|
3283
3341
|
value: e.block.placeholderUrl || "",
|
|
3284
3342
|
placeholder: x(a).video.placeholderUrlPlaceholder,
|
|
3285
3343
|
title: x(a).video.placeholderUrlTooltip,
|
|
3286
3344
|
onInput: r[2] ||= (e) => S("placeholderUrl", e.target.value)
|
|
3287
|
-
}, null, 42,
|
|
3288
|
-
p("div",
|
|
3289
|
-
p("label", { class: n(x(
|
|
3345
|
+
}, null, 42, tc)])) : T("", !0),
|
|
3346
|
+
p("div", nc, [
|
|
3347
|
+
p("label", { class: n(x(G)) }, [b(c(x(a).video.customThumbnail) + " ", 1), p("span", rc, c(x(a).video.optional), 1)], 2),
|
|
3290
3348
|
g($, {
|
|
3291
3349
|
"model-value": e.block.thumbnailUrl,
|
|
3292
3350
|
type: "url",
|
|
@@ -3307,28 +3365,28 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3307
3365
|
"background-color": "var(--tpl-bg)"
|
|
3308
3366
|
},
|
|
3309
3367
|
onClick: E
|
|
3310
|
-
}, [g(x(
|
|
3368
|
+
}, [g(x(ue), {
|
|
3311
3369
|
size: 14,
|
|
3312
3370
|
"stroke-width": 1.5
|
|
3313
3371
|
}), b(" " + c(x(a).image.browseMedia), 1)])) : T("", !0)
|
|
3314
3372
|
]),
|
|
3315
|
-
p("div",
|
|
3373
|
+
p("div", ic, [p("label", { class: n(x(G)) }, c(x(a).video.altText), 3), g($, {
|
|
3316
3374
|
"model-value": e.block.alt,
|
|
3317
3375
|
type: "text",
|
|
3318
3376
|
placeholder: x(a).video.altTextPlaceholder,
|
|
3319
3377
|
"onUpdate:modelValue": r[4] ||= (e) => S("alt", e)
|
|
3320
3378
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
3321
|
-
p("div",
|
|
3322
|
-
class: n(x(
|
|
3379
|
+
p("div", ac, [p("label", { class: n(x(G)) }, c(x(a).video.width), 3), p("select", {
|
|
3380
|
+
class: n(x(W)),
|
|
3323
3381
|
value: e.block.width,
|
|
3324
3382
|
onChange: r[5] ||= (e) => S("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
3325
3383
|
}, [
|
|
3326
|
-
p("option",
|
|
3384
|
+
p("option", sc, c(x(a).video.fullWidth), 1),
|
|
3327
3385
|
r[7] ||= p("option", { value: "300" }, "300px", -1),
|
|
3328
3386
|
r[8] ||= p("option", { value: "400" }, "400px", -1),
|
|
3329
3387
|
r[9] ||= p("option", { value: "500" }, "500px", -1)
|
|
3330
|
-
], 42,
|
|
3331
|
-
p("div",
|
|
3388
|
+
], 42, oc)]),
|
|
3389
|
+
p("div", cc, [p("label", { class: n(x(G)) }, c(x(a).title.align), 3), g(Z, {
|
|
3332
3390
|
options: [
|
|
3333
3391
|
{
|
|
3334
3392
|
value: "left",
|
|
@@ -3348,7 +3406,7 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3348
3406
|
}, null, 8, ["options", "model-value"])])
|
|
3349
3407
|
], 64));
|
|
3350
3408
|
}
|
|
3351
|
-
}),
|
|
3409
|
+
}), uc = ["aria-label"], dc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, fc = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, pc = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, mc = { class: "tpl:flex tpl:gap-1" }, hc = ["title"], gc = ["title"], _c = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, vc = /*#__PURE__*/ jt(/* @__PURE__ */ f({
|
|
3352
3410
|
__name: "Toolbar",
|
|
3353
3411
|
props: { block: {} },
|
|
3354
3412
|
emits: [
|
|
@@ -3357,87 +3415,87 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3357
3415
|
"duplicate"
|
|
3358
3416
|
],
|
|
3359
3417
|
setup(e, { emit: t }) {
|
|
3360
|
-
let n = h(() => import("./CountdownToolbar-
|
|
3418
|
+
let n = h(() => import("./CountdownToolbar-VEsIyKV6.js")), r = e, i = t, { t: a } = H(), l = He(Je, "Toolbar"), u = D(Ze, []), d = w(() => r.block.type), f = w(() => R(r.block)), _ = w(() => {
|
|
3361
3419
|
if (f.value) return u.find((e) => e.type === r.block.customType);
|
|
3362
|
-
}), v = w(() => f.value ? _.value?.name ?? r.block.customType :
|
|
3420
|
+
}), v = w(() => f.value ? _.value?.name ?? r.block.customType : de(d.value, a)), b = l.fonts;
|
|
3363
3421
|
function S(e) {
|
|
3364
3422
|
i("update", e);
|
|
3365
3423
|
}
|
|
3366
3424
|
return (t, r) => (s(), m("aside", {
|
|
3367
3425
|
"aria-label": x(a).landmarks.blockToolbar,
|
|
3368
3426
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
3369
|
-
}, [p("div",
|
|
3427
|
+
}, [p("div", dc, [p("div", fc, [x(gt)[d.value] ? (s(), y(o(x(gt)[d.value]), {
|
|
3370
3428
|
key: 0,
|
|
3371
3429
|
size: 16,
|
|
3372
3430
|
"stroke-width": 1.5
|
|
3373
|
-
})) : f.value ? (s(), y(x(
|
|
3431
|
+
})) : f.value ? (s(), y(x(le), {
|
|
3374
3432
|
key: 1,
|
|
3375
3433
|
size: 16,
|
|
3376
3434
|
"stroke-width": 1.5
|
|
3377
|
-
})) : T("", !0), p("h3",
|
|
3435
|
+
})) : T("", !0), p("h3", pc, c(v.value), 1)]), p("div", mc, [p("button", {
|
|
3378
3436
|
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)]",
|
|
3379
3437
|
title: x(a).toolbar.duplicate,
|
|
3380
3438
|
onClick: r[0] ||= (e) => i("duplicate")
|
|
3381
|
-
}, [g(x(
|
|
3439
|
+
}, [g(x(ce), {
|
|
3382
3440
|
size: 14,
|
|
3383
3441
|
"stroke-width": 2
|
|
3384
|
-
})], 8,
|
|
3442
|
+
})], 8, hc), p("button", {
|
|
3385
3443
|
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)]",
|
|
3386
3444
|
title: x(a).toolbar.delete,
|
|
3387
3445
|
onClick: r[1] ||= (e) => i("delete")
|
|
3388
|
-
}, [g(x(
|
|
3446
|
+
}, [g(x(kt), {
|
|
3389
3447
|
size: 14,
|
|
3390
3448
|
"stroke-width": 2
|
|
3391
|
-
})], 8,
|
|
3449
|
+
})], 8, gc)])]), p("div", _c, [f.value ? (s(), y(za, {
|
|
3392
3450
|
key: 0,
|
|
3393
3451
|
block: e.block,
|
|
3394
3452
|
onUpdateFieldValues: r[2] ||= (e) => i("update", { fieldValues: e }),
|
|
3395
3453
|
onUpdateDataSourceFetched: r[3] ||= (e) => i("update", { dataSourceFetched: e })
|
|
3396
|
-
}, null, 8, ["block"])) : d.value === "section" ? (s(), y(
|
|
3454
|
+
}, null, 8, ["block"])) : d.value === "section" ? (s(), y(Lo, {
|
|
3397
3455
|
key: 1,
|
|
3398
3456
|
block: e.block,
|
|
3399
3457
|
onUpdate: S
|
|
3400
|
-
}, null, 8, ["block"])) : d.value === "title" ? (s(), y(
|
|
3458
|
+
}, null, 8, ["block"])) : d.value === "title" ? (s(), y(Zs, {
|
|
3401
3459
|
key: 2,
|
|
3402
3460
|
block: e.block,
|
|
3403
3461
|
"font-families": x(b),
|
|
3404
3462
|
onUpdate: S
|
|
3405
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (s(), m(C, { key: 3 }, [], 64)) : d.value === "image" ? (s(), y(
|
|
3463
|
+
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (s(), m(C, { key: 3 }, [], 64)) : d.value === "image" ? (s(), y(fo, {
|
|
3406
3464
|
key: 4,
|
|
3407
3465
|
block: e.block,
|
|
3408
3466
|
onUpdate: S
|
|
3409
|
-
}, null, 8, ["block"])) : d.value === "video" ? (s(), y(
|
|
3467
|
+
}, null, 8, ["block"])) : d.value === "video" ? (s(), y(lc, {
|
|
3410
3468
|
key: 5,
|
|
3411
3469
|
block: e.block,
|
|
3412
3470
|
onUpdate: S
|
|
3413
|
-
}, null, 8, ["block"])) : d.value === "button" ? (s(), y(
|
|
3471
|
+
}, null, 8, ["block"])) : d.value === "button" ? (s(), y(fi, {
|
|
3414
3472
|
key: 6,
|
|
3415
3473
|
block: e.block,
|
|
3416
3474
|
"font-families": x(b),
|
|
3417
3475
|
onUpdate: S
|
|
3418
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (s(), y(
|
|
3476
|
+
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (s(), y(Ga, {
|
|
3419
3477
|
key: 7,
|
|
3420
3478
|
block: e.block,
|
|
3421
3479
|
onUpdate: S
|
|
3422
|
-
}, null, 8, ["block"])) : d.value === "social" ? (s(), y(
|
|
3480
|
+
}, null, 8, ["block"])) : d.value === "social" ? (s(), y(ns, {
|
|
3423
3481
|
key: 8,
|
|
3424
3482
|
block: e.block,
|
|
3425
3483
|
onUpdate: S
|
|
3426
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (s(), y(
|
|
3484
|
+
}, null, 8, ["block"])) : d.value === "menu" ? (s(), y(Co, {
|
|
3427
3485
|
key: 9,
|
|
3428
3486
|
block: e.block,
|
|
3429
3487
|
"font-families": x(b),
|
|
3430
3488
|
onUpdate: S
|
|
3431
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (s(), y(
|
|
3489
|
+
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (s(), y(Rs, {
|
|
3432
3490
|
key: 10,
|
|
3433
3491
|
block: e.block,
|
|
3434
3492
|
"font-families": x(b),
|
|
3435
3493
|
onUpdate: S
|
|
3436
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (s(), y(
|
|
3494
|
+
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (s(), y(ss, {
|
|
3437
3495
|
key: 11,
|
|
3438
3496
|
block: e.block,
|
|
3439
3497
|
onUpdate: S
|
|
3440
|
-
}, null, 8, ["block"])) : d.value === "html" ? (s(), y(
|
|
3498
|
+
}, null, 8, ["block"])) : d.value === "html" ? (s(), y(Ya, {
|
|
3441
3499
|
key: 12,
|
|
3442
3500
|
block: e.block,
|
|
3443
3501
|
onUpdate: S
|
|
@@ -3446,52 +3504,52 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3446
3504
|
block: e.block,
|
|
3447
3505
|
"font-families": x(b),
|
|
3448
3506
|
onUpdate: S
|
|
3449
|
-
}, null, 8, ["block", "font-families"])) : T("", !0), g(
|
|
3507
|
+
}, null, 8, ["block", "font-families"])) : T("", !0), g(ra, {
|
|
3450
3508
|
block: e.block,
|
|
3451
3509
|
"is-first-section": d.value === "paragraph",
|
|
3452
3510
|
onUpdate: S
|
|
3453
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
3511
|
+
}, null, 8, ["block", "is-first-section"])])], 8, uc));
|
|
3454
3512
|
}
|
|
3455
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
3513
|
+
}), [["__scopeId", "data-v-2ac88283"]]), yc = ["aria-label"], bc = {
|
|
3456
3514
|
role: "tablist",
|
|
3457
3515
|
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"
|
|
3458
|
-
},
|
|
3516
|
+
}, xc = [
|
|
3459
3517
|
"aria-selected",
|
|
3460
3518
|
"aria-label",
|
|
3461
3519
|
"title"
|
|
3462
|
-
],
|
|
3520
|
+
], Sc = { key: 0 }, Cc = [
|
|
3463
3521
|
"aria-selected",
|
|
3464
3522
|
"aria-label",
|
|
3465
3523
|
"title"
|
|
3466
|
-
],
|
|
3524
|
+
], wc = { key: 0 }, Tc = [
|
|
3467
3525
|
"aria-selected",
|
|
3468
3526
|
"aria-label",
|
|
3469
3527
|
"title"
|
|
3470
|
-
],
|
|
3528
|
+
], Ec = { key: 0 }, Dc = {
|
|
3471
3529
|
key: 1,
|
|
3472
3530
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
3473
|
-
},
|
|
3531
|
+
}, Oc = {
|
|
3474
3532
|
key: 0,
|
|
3475
3533
|
id: "tpl-tabpanel-content",
|
|
3476
3534
|
role: "tabpanel",
|
|
3477
3535
|
"aria-labelledby": "tpl-tab-content",
|
|
3478
3536
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3479
|
-
},
|
|
3537
|
+
}, kc = {
|
|
3480
3538
|
key: 1,
|
|
3481
3539
|
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)]"
|
|
3482
|
-
},
|
|
3540
|
+
}, Ac = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, jc = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Mc = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, Nc = {
|
|
3483
3541
|
key: 1,
|
|
3484
3542
|
id: "tpl-tabpanel-settings",
|
|
3485
3543
|
role: "tabpanel",
|
|
3486
3544
|
"aria-labelledby": "tpl-tab-settings",
|
|
3487
3545
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3488
|
-
},
|
|
3546
|
+
}, Pc = {
|
|
3489
3547
|
key: 2,
|
|
3490
3548
|
id: "tpl-tabpanel-issues",
|
|
3491
3549
|
role: "tabpanel",
|
|
3492
3550
|
"aria-labelledby": "tpl-tab-issues",
|
|
3493
3551
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3494
|
-
},
|
|
3552
|
+
}, Fc = /* @__PURE__ */ f({
|
|
3495
3553
|
__name: "RightSidebar",
|
|
3496
3554
|
props: {
|
|
3497
3555
|
selectedBlock: {},
|
|
@@ -3505,7 +3563,7 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3505
3563
|
"update-settings"
|
|
3506
3564
|
],
|
|
3507
3565
|
setup(e, { emit: r }) {
|
|
3508
|
-
let a = h(() => import("./IssuesPanel-
|
|
3566
|
+
let a = h(() => import("./IssuesPanel-CEfzOpS_.js")), o = e, l = r, { t: u } = H(), f = d("content"), _ = D(Ue, null), v = w(() => _ !== null), b = w(() => _?.issues.value.length ?? 0);
|
|
3509
3567
|
function S(e) {
|
|
3510
3568
|
return f.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)]";
|
|
3511
3569
|
}
|
|
@@ -3521,7 +3579,7 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3521
3579
|
"aria-label": x(u).landmarks.rightSidebar,
|
|
3522
3580
|
class: n(["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"])
|
|
3523
3581
|
}, [
|
|
3524
|
-
p("div",
|
|
3582
|
+
p("div", bc, [
|
|
3525
3583
|
p("button", {
|
|
3526
3584
|
id: "tpl-tab-content",
|
|
3527
3585
|
role: "tab",
|
|
@@ -3532,10 +3590,10 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3532
3590
|
class: n(["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)]", S("content")]),
|
|
3533
3591
|
style: t(C("content")),
|
|
3534
3592
|
onClick: i[0] ||= (e) => f.value = "content"
|
|
3535
|
-
}, [g(x(
|
|
3593
|
+
}, [g(x(en), {
|
|
3536
3594
|
size: 14,
|
|
3537
3595
|
"stroke-width": 2
|
|
3538
|
-
}), f.value === "content" ? (s(), m("span",
|
|
3596
|
+
}), f.value === "content" ? (s(), m("span", Sc, c(x(u).sidebar.content), 1)) : T("", !0)], 14, xc),
|
|
3539
3597
|
p("button", {
|
|
3540
3598
|
id: "tpl-tab-settings",
|
|
3541
3599
|
role: "tab",
|
|
@@ -3546,10 +3604,10 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3546
3604
|
class: n(["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)]", S("settings")]),
|
|
3547
3605
|
style: t(C("settings")),
|
|
3548
3606
|
onClick: i[1] ||= (e) => f.value = "settings"
|
|
3549
|
-
}, [g(x(
|
|
3607
|
+
}, [g(x(nn), {
|
|
3550
3608
|
size: 14,
|
|
3551
3609
|
"stroke-width": 1.5
|
|
3552
|
-
}), f.value === "settings" ? (s(), m("span",
|
|
3610
|
+
}), f.value === "settings" ? (s(), m("span", wc, c(x(u).sidebar.settings), 1)) : T("", !0)], 14, Cc),
|
|
3553
3611
|
v.value ? (s(), m("button", {
|
|
3554
3612
|
key: 0,
|
|
3555
3613
|
id: "tpl-tab-issues",
|
|
@@ -3562,120 +3620,63 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3562
3620
|
style: t(C("issues")),
|
|
3563
3621
|
onClick: i[2] ||= (e) => f.value = "issues"
|
|
3564
3622
|
}, [
|
|
3565
|
-
g(x(
|
|
3623
|
+
g(x(xt), {
|
|
3566
3624
|
size: 14,
|
|
3567
3625
|
"stroke-width": 1.5
|
|
3568
3626
|
}),
|
|
3569
|
-
f.value === "issues" ? (s(), m("span",
|
|
3570
|
-
b.value > 0 ? (s(), m("span",
|
|
3571
|
-
], 14,
|
|
3627
|
+
f.value === "issues" ? (s(), m("span", Ec, c(x(u).issues.panelTabLabel), 1)) : T("", !0),
|
|
3628
|
+
b.value > 0 ? (s(), m("span", Dc, c(b.value), 1)) : T("", !0)
|
|
3629
|
+
], 14, Tc)) : T("", !0)
|
|
3572
3630
|
]),
|
|
3573
|
-
f.value === "content" ? (s(), m("div",
|
|
3631
|
+
f.value === "content" ? (s(), m("div", Oc, [e.selectedBlock ? (s(), y(vc, {
|
|
3574
3632
|
key: 0,
|
|
3575
3633
|
block: e.selectedBlock,
|
|
3576
3634
|
onUpdate: i[3] ||= (e) => l("update-block", e),
|
|
3577
3635
|
onDelete: i[4] ||= (e) => l("delete-block"),
|
|
3578
3636
|
onDuplicate: i[5] ||= (e) => l("duplicate-block")
|
|
3579
|
-
}, null, 8, ["block"])) : (s(), m("div",
|
|
3580
|
-
p("div",
|
|
3637
|
+
}, null, 8, ["block"])) : (s(), m("div", kc, [
|
|
3638
|
+
p("div", Ac, [g(x(Xt), {
|
|
3581
3639
|
size: 40,
|
|
3582
3640
|
"stroke-width": 1.5
|
|
3583
3641
|
})]),
|
|
3584
|
-
p("h3",
|
|
3585
|
-
p("p",
|
|
3642
|
+
p("h3", jc, c(x(u).sidebar.noSelection), 1),
|
|
3643
|
+
p("p", Mc, c(x(u).sidebar.noSelectionHint), 1)
|
|
3586
3644
|
]))])) : T("", !0),
|
|
3587
|
-
f.value === "settings" ? (s(), m("div",
|
|
3645
|
+
f.value === "settings" ? (s(), m("div", Nc, [g(Ir, {
|
|
3588
3646
|
settings: e.settings,
|
|
3589
3647
|
onUpdate: i[6] ||= (e) => l("update-settings", e)
|
|
3590
3648
|
}, null, 8, ["settings"])])) : T("", !0),
|
|
3591
|
-
f.value === "issues" && v.value ? (s(), m("div",
|
|
3592
|
-
], 10,
|
|
3649
|
+
f.value === "issues" && v.value ? (s(), m("div", Pc, [g(x(a))])) : T("", !0)
|
|
3650
|
+
], 10, yc));
|
|
3593
3651
|
}
|
|
3594
|
-
}),
|
|
3652
|
+
}), Ic = {
|
|
3595
3653
|
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)]",
|
|
3596
3654
|
style: { "z-index": "10001" },
|
|
3597
3655
|
role: "status",
|
|
3598
3656
|
"data-testid": "small-screen-notice"
|
|
3599
|
-
},
|
|
3657
|
+
}, Lc = { class: "tpl:text-[var(--tpl-text-dim)]" }, Rc = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, zc = { class: "tpl:m-0 tpl:max-w-sm tpl:text-sm tpl:leading-normal" }, Bc = /* @__PURE__ */ f({
|
|
3600
3658
|
__name: "SmallScreenNotice",
|
|
3601
3659
|
setup(e) {
|
|
3602
|
-
let { t } =
|
|
3603
|
-
return (e, n) => (s(), m("div",
|
|
3604
|
-
p("div",
|
|
3660
|
+
let { t } = H();
|
|
3661
|
+
return (e, n) => (s(), m("div", Ic, [
|
|
3662
|
+
p("div", Lc, [g(x(Ct), {
|
|
3605
3663
|
size: 48,
|
|
3606
3664
|
"stroke-width": 1.5
|
|
3607
3665
|
})]),
|
|
3608
|
-
p("h2",
|
|
3609
|
-
p("p",
|
|
3666
|
+
p("h2", Rc, c(x(t).smallScreen.title), 1),
|
|
3667
|
+
p("p", zc, c(x(t).smallScreen.message), 1)
|
|
3610
3668
|
]));
|
|
3611
3669
|
}
|
|
3612
|
-
}),
|
|
3613
|
-
"aria-checked",
|
|
3614
|
-
"aria-label",
|
|
3615
|
-
"title",
|
|
3616
|
-
"onClick"
|
|
3617
|
-
], Fc = /* @__PURE__ */ f({
|
|
3618
|
-
__name: "ViewportToggle",
|
|
3619
|
-
props: { viewport: {} },
|
|
3620
|
-
emits: ["change"],
|
|
3621
|
-
setup(n, { emit: r }) {
|
|
3622
|
-
let i = n, a = r, { t: o } = U(), l = w(() => [{
|
|
3623
|
-
value: "desktop",
|
|
3624
|
-
label: o.viewport.desktop
|
|
3625
|
-
}, {
|
|
3626
|
-
value: "mobile",
|
|
3627
|
-
label: o.viewport.mobile
|
|
3628
|
-
}]), u = w(() => `translateX(${l.value.findIndex((e) => e.value === i.viewport) * 100}%)`);
|
|
3629
|
-
return (r, i) => (s(), m("div", {
|
|
3630
|
-
role: "radiogroup",
|
|
3631
|
-
"aria-label": x(o).viewport.label,
|
|
3632
|
-
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
3633
|
-
style: t({
|
|
3634
|
-
gridTemplateColumns: `repeat(${l.value.length}, 1fr)`,
|
|
3635
|
-
backgroundColor: "var(--tpl-bg-hover)"
|
|
3636
|
-
})
|
|
3637
|
-
}, [p("div", {
|
|
3638
|
-
class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
|
|
3639
|
-
style: t({
|
|
3640
|
-
left: "4px",
|
|
3641
|
-
width: `calc((100% - 8px) / ${l.value.length})`,
|
|
3642
|
-
transform: u.value,
|
|
3643
|
-
backgroundColor: "var(--tpl-bg)",
|
|
3644
|
-
boxShadow: "var(--tpl-shadow)",
|
|
3645
|
-
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
3646
|
-
})
|
|
3647
|
-
}, null, 4), (s(!0), m(C, null, e(l.value, (e) => (s(), m("button", {
|
|
3648
|
-
key: e.value,
|
|
3649
|
-
role: "radio",
|
|
3650
|
-
"aria-checked": n.viewport === e.value,
|
|
3651
|
-
"aria-label": e.label,
|
|
3652
|
-
class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium",
|
|
3653
|
-
style: t({
|
|
3654
|
-
color: n.viewport === e.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
3655
|
-
transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
3656
|
-
}),
|
|
3657
|
-
title: e.label,
|
|
3658
|
-
onClick: (t) => a("change", e.value)
|
|
3659
|
-
}, [e.value === "desktop" ? (s(), y(x(qt), {
|
|
3660
|
-
key: 0,
|
|
3661
|
-
size: 18,
|
|
3662
|
-
"stroke-width": 1.5
|
|
3663
|
-
})) : (s(), y(x(Qt), {
|
|
3664
|
-
key: 1,
|
|
3665
|
-
size: 18,
|
|
3666
|
-
"stroke-width": 1.5
|
|
3667
|
-
})), p("span", null, c(e.label), 1)], 12, Pc))), 128))], 12, Nc));
|
|
3668
|
-
}
|
|
3669
|
-
}), Ic = [
|
|
3670
|
+
}), Vc = [
|
|
3670
3671
|
"aria-label",
|
|
3671
3672
|
"title",
|
|
3672
3673
|
"aria-pressed"
|
|
3673
|
-
],
|
|
3674
|
+
], Hc = /*#__PURE__*/ jt(/* @__PURE__ */ f({
|
|
3674
3675
|
__name: "PreviewToggle",
|
|
3675
3676
|
props: { previewMode: { type: Boolean } },
|
|
3676
3677
|
emits: ["change"],
|
|
3677
3678
|
setup(e, { emit: n }) {
|
|
3678
|
-
let r = n, { t: i } =
|
|
3679
|
+
let r = n, { t: i } = H();
|
|
3679
3680
|
return (n, a) => (s(), m("button", {
|
|
3680
3681
|
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",
|
|
3681
3682
|
style: t({
|
|
@@ -3693,28 +3694,28 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3693
3694
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3694
3695
|
mode: "out-in"
|
|
3695
3696
|
}, {
|
|
3696
|
-
default: l(() => [e.previewMode ? (s(), y(x(
|
|
3697
|
+
default: l(() => [e.previewMode ? (s(), y(x(_t), {
|
|
3697
3698
|
key: "eye",
|
|
3698
3699
|
size: 18,
|
|
3699
3700
|
"stroke-width": 1.5
|
|
3700
|
-
})) : (s(), y(x(
|
|
3701
|
+
})) : (s(), y(x(oe), {
|
|
3701
3702
|
key: "eye-off",
|
|
3702
3703
|
size: 18,
|
|
3703
3704
|
"stroke-width": 1.5
|
|
3704
3705
|
}))]),
|
|
3705
3706
|
_: 1
|
|
3706
|
-
})], 12,
|
|
3707
|
+
})], 12, Vc));
|
|
3707
3708
|
}
|
|
3708
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3709
|
+
}), [["__scopeId", "data-v-af87d02a"]]), Uc = [
|
|
3709
3710
|
"aria-label",
|
|
3710
3711
|
"title",
|
|
3711
3712
|
"aria-pressed"
|
|
3712
|
-
],
|
|
3713
|
+
], Wc = /*#__PURE__*/ jt(/* @__PURE__ */ f({
|
|
3713
3714
|
__name: "DarkModeToggle",
|
|
3714
3715
|
props: { darkMode: { type: Boolean } },
|
|
3715
3716
|
emits: ["change"],
|
|
3716
3717
|
setup(e, { emit: n }) {
|
|
3717
|
-
let r = n, { t: i } =
|
|
3718
|
+
let r = n, { t: i } = H();
|
|
3718
3719
|
return (n, a) => (s(), m("button", {
|
|
3719
3720
|
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",
|
|
3720
3721
|
style: t({
|
|
@@ -3732,37 +3733,37 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3732
3733
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3733
3734
|
mode: "out-in"
|
|
3734
3735
|
}, {
|
|
3735
|
-
default: l(() => [e.darkMode ? (s(), y(x(
|
|
3736
|
+
default: l(() => [e.darkMode ? (s(), y(x($t), {
|
|
3736
3737
|
key: "moon",
|
|
3737
3738
|
size: 18,
|
|
3738
3739
|
"stroke-width": 1.5
|
|
3739
|
-
})) : (s(), y(x(
|
|
3740
|
+
})) : (s(), y(x(on), {
|
|
3740
3741
|
key: "sun",
|
|
3741
3742
|
size: 18,
|
|
3742
3743
|
"stroke-width": 1.5
|
|
3743
3744
|
}))]),
|
|
3744
3745
|
_: 1
|
|
3745
|
-
})], 12,
|
|
3746
|
+
})], 12, Uc));
|
|
3746
3747
|
}
|
|
3747
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3748
|
+
}), [["__scopeId", "data-v-f8694f76"]]), Gc = {
|
|
3748
3749
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3749
3750
|
style: {
|
|
3750
3751
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3751
3752
|
"backdrop-filter": "blur(8px)",
|
|
3752
3753
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3753
3754
|
}
|
|
3754
|
-
},
|
|
3755
|
+
}, Kc = {
|
|
3755
3756
|
href: "https://github.com/templatical/sdk",
|
|
3756
3757
|
target: "_blank",
|
|
3757
3758
|
rel: "noopener noreferrer",
|
|
3758
3759
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3759
3760
|
style: { "text-decoration": "none" }
|
|
3760
|
-
},
|
|
3761
|
+
}, qc = /* @__PURE__ */ f({
|
|
3761
3762
|
__name: "EditorFooter",
|
|
3762
3763
|
props: { positionClass: {} },
|
|
3763
3764
|
setup(e) {
|
|
3764
|
-
let { t } =
|
|
3765
|
-
return (r, i) => (s(), m("footer", { class: n(["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]) }, [p("div",
|
|
3765
|
+
let { t } = H();
|
|
3766
|
+
return (r, i) => (s(), m("footer", { class: n(["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]) }, [p("div", Gc, [
|
|
3766
3767
|
p("span", null, c(x(t).footer.poweredBy), 1),
|
|
3767
3768
|
i[0] ||= p("a", {
|
|
3768
3769
|
href: "https://templatical.com",
|
|
@@ -3777,32 +3778,32 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3777
3778
|
alt: ""
|
|
3778
3779
|
}), b(" Templatical ")], -1),
|
|
3779
3780
|
i[1] ||= p("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3780
|
-
p("a",
|
|
3781
|
+
p("a", Kc, c(x(t).footer.openSource), 1)
|
|
3781
3782
|
])], 2));
|
|
3782
3783
|
}
|
|
3783
|
-
}),
|
|
3784
|
+
}), Jc = ["aria-labelledby", "data-tpl-theme"], Yc = { 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" }, Xc = ["id"], Zc = ["aria-label"], Qc = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, $c = [
|
|
3784
3785
|
"id",
|
|
3785
3786
|
"placeholder",
|
|
3786
3787
|
"aria-label",
|
|
3787
3788
|
"aria-activedescendant"
|
|
3788
|
-
],
|
|
3789
|
+
], el = {
|
|
3789
3790
|
key: 0,
|
|
3790
3791
|
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",
|
|
3791
3792
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3792
|
-
},
|
|
3793
|
+
}, tl = ["data-group-name", "onClick"], nl = ["aria-label"], rl = {
|
|
3793
3794
|
key: 0,
|
|
3794
3795
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3795
3796
|
"data-testid": "merge-tag-picker-empty"
|
|
3796
|
-
},
|
|
3797
|
+
}, il = {
|
|
3797
3798
|
key: 1,
|
|
3798
3799
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3799
3800
|
"data-testid": "merge-tag-picker-empty"
|
|
3800
|
-
},
|
|
3801
|
+
}, al = [
|
|
3801
3802
|
"aria-expanded",
|
|
3802
3803
|
"data-group-name",
|
|
3803
3804
|
"data-group-collapsed",
|
|
3804
3805
|
"onClick"
|
|
3805
|
-
],
|
|
3806
|
+
], ol = { class: "tpl:ml-1 tpl:font-normal" }, sl = [
|
|
3806
3807
|
"id",
|
|
3807
3808
|
"aria-selected",
|
|
3808
3809
|
"data-selected",
|
|
@@ -3811,13 +3812,17 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3811
3812
|
"title",
|
|
3812
3813
|
"onMousemove",
|
|
3813
3814
|
"onClick"
|
|
3814
|
-
],
|
|
3815
|
+
], cl = { class: "tpl:text-sm tpl:font-medium" }, ll = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, ul = {
|
|
3815
3816
|
key: 0,
|
|
3816
3817
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3817
|
-
},
|
|
3818
|
+
}, dl = {
|
|
3819
|
+
key: 1,
|
|
3820
|
+
"data-testid": "merge-tag-picker-sample",
|
|
3821
|
+
class: "tpl:line-clamp-1 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3822
|
+
}, fl = "tpl-merge-tag-picker-list", pl = /* @__PURE__ */ f({
|
|
3818
3823
|
__name: "MergeTagPickerModal",
|
|
3819
3824
|
setup(r) {
|
|
3820
|
-
let a =
|
|
3825
|
+
let a = He(Be, "MergeTagPickerModal"), { t: o, format: u } = H(), f = D(Ke, null), h = D(ze, null), _ = d(""), v = Fe(_, 200), b = d(null), S = w(() => v.value.trim().length > 0), O = d(0), M = w(() => a.tags.value.some((e) => !!e.group)), P = d(/* @__PURE__ */ new Set());
|
|
3821
3826
|
function F(e) {
|
|
3822
3827
|
return P.value.has(e);
|
|
3823
3828
|
}
|
|
@@ -3874,34 +3879,34 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3874
3879
|
}), i(B, (e) => {
|
|
3875
3880
|
O.value >= e.length && (O.value = Math.max(0, e.length - 1));
|
|
3876
3881
|
});
|
|
3877
|
-
function
|
|
3882
|
+
function ee(e) {
|
|
3878
3883
|
a.resolve(e);
|
|
3879
3884
|
}
|
|
3880
|
-
function
|
|
3885
|
+
function te() {
|
|
3881
3886
|
a.resolve(null);
|
|
3882
3887
|
}
|
|
3883
|
-
function
|
|
3888
|
+
function ne(e) {
|
|
3884
3889
|
if (B.value.length === 0) return;
|
|
3885
3890
|
let t = O.value + e;
|
|
3886
|
-
O.value = Math.max(0, Math.min(B.value.length - 1, t)),
|
|
3891
|
+
O.value = Math.max(0, Math.min(B.value.length - 1, t)), V();
|
|
3887
3892
|
}
|
|
3888
|
-
let
|
|
3889
|
-
function
|
|
3890
|
-
|
|
3893
|
+
let re = d(null), ie = d({});
|
|
3894
|
+
function ae(e, t) {
|
|
3895
|
+
ie.value[e] = t ?? null;
|
|
3891
3896
|
}
|
|
3892
|
-
function
|
|
3897
|
+
function V() {
|
|
3893
3898
|
E(() => {
|
|
3894
|
-
let e =
|
|
3899
|
+
let e = re.value;
|
|
3895
3900
|
e && e.querySelector(`[data-merge-tag-index="${O.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3896
3901
|
});
|
|
3897
3902
|
}
|
|
3898
|
-
function
|
|
3903
|
+
function oe(e) {
|
|
3899
3904
|
if (P.value.has(e)) {
|
|
3900
3905
|
let t = new Set(P.value);
|
|
3901
3906
|
t.delete(e), P.value = t;
|
|
3902
3907
|
}
|
|
3903
3908
|
E(() => {
|
|
3904
|
-
let t =
|
|
3909
|
+
let t = re.value;
|
|
3905
3910
|
if (!t) return;
|
|
3906
3911
|
let n = 0, r = !1;
|
|
3907
3912
|
for (let i of Array.from(t.children)) {
|
|
@@ -3917,55 +3922,55 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3917
3922
|
});
|
|
3918
3923
|
});
|
|
3919
3924
|
}
|
|
3920
|
-
function
|
|
3921
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3922
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3925
|
+
function se(e) {
|
|
3926
|
+
if (e.key === "ArrowDown") e.preventDefault(), ne(1);
|
|
3927
|
+
else if (e.key === "ArrowUp") e.preventDefault(), ne(-1);
|
|
3923
3928
|
else if (e.key === "Enter") {
|
|
3924
3929
|
e.preventDefault();
|
|
3925
3930
|
let t = B.value[O.value];
|
|
3926
|
-
t &&
|
|
3931
|
+
t && ee(t);
|
|
3927
3932
|
}
|
|
3928
3933
|
}
|
|
3929
|
-
function
|
|
3930
|
-
if (B.value.length !== 0) return `${
|
|
3934
|
+
function ce() {
|
|
3935
|
+
if (B.value.length !== 0) return `${fl}-opt-${O.value}`;
|
|
3931
3936
|
}
|
|
3932
|
-
function
|
|
3933
|
-
return `${
|
|
3937
|
+
function le(e) {
|
|
3938
|
+
return `${fl}-opt-${e}`;
|
|
3934
3939
|
}
|
|
3935
|
-
let
|
|
3936
|
-
return (r, i) => (s(), y(
|
|
3940
|
+
let ue = w(() => a.tags.value.length === 0), de = w(() => !ue.value && L.value.length === 0), fe = w(() => M.value && R.value.length > 1 && !S.value);
|
|
3941
|
+
return (r, i) => (s(), y(qt, {
|
|
3937
3942
|
visible: x(a).isOpen.value,
|
|
3938
|
-
onClose:
|
|
3939
|
-
onKeydown:
|
|
3943
|
+
onClose: te,
|
|
3944
|
+
onKeydown: se
|
|
3940
3945
|
}, {
|
|
3941
3946
|
default: l(() => [p("div", {
|
|
3942
3947
|
role: "dialog",
|
|
3943
3948
|
"aria-modal": "true",
|
|
3944
|
-
"aria-labelledby": `${
|
|
3949
|
+
"aria-labelledby": `${fl}-title`,
|
|
3945
3950
|
"data-tpl-theme": x(h),
|
|
3946
3951
|
"data-testid": "merge-tag-picker-modal",
|
|
3947
3952
|
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)]",
|
|
3948
3953
|
style: t(x(f))
|
|
3949
3954
|
}, [
|
|
3950
|
-
p("header",
|
|
3951
|
-
id: `${
|
|
3955
|
+
p("header", Yc, [p("h2", {
|
|
3956
|
+
id: `${fl}-title`,
|
|
3952
3957
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3953
|
-
}, c(x(o).mergeTag.picker.title), 9,
|
|
3958
|
+
}, c(x(o).mergeTag.picker.title), 9, Xc), p("button", {
|
|
3954
3959
|
type: "button",
|
|
3955
3960
|
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)]",
|
|
3956
3961
|
"aria-label": x(o).mergeTag.picker.close,
|
|
3957
3962
|
"data-testid": "merge-tag-picker-close",
|
|
3958
|
-
onClick:
|
|
3959
|
-
}, [g(x(
|
|
3963
|
+
onClick: te
|
|
3964
|
+
}, [g(x(At), {
|
|
3960
3965
|
size: 16,
|
|
3961
3966
|
"stroke-width": 2
|
|
3962
|
-
})], 8,
|
|
3963
|
-
p("div",
|
|
3967
|
+
})], 8, Zc)]),
|
|
3968
|
+
p("div", Qc, [g(x(mt), {
|
|
3964
3969
|
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)]",
|
|
3965
3970
|
size: 14,
|
|
3966
3971
|
"stroke-width": 2
|
|
3967
3972
|
}), k(p("input", {
|
|
3968
|
-
id: `${
|
|
3973
|
+
id: `${fl}-search`,
|
|
3969
3974
|
ref_key: "searchInputRef",
|
|
3970
3975
|
ref: b,
|
|
3971
3976
|
"onUpdate:modelValue": i[0] ||= (e) => _.value = e,
|
|
@@ -3973,50 +3978,50 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
3973
3978
|
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)]",
|
|
3974
3979
|
placeholder: x(o).mergeTag.picker.searchPlaceholder,
|
|
3975
3980
|
"aria-label": x(o).mergeTag.picker.searchAriaLabel,
|
|
3976
|
-
"aria-controls":
|
|
3977
|
-
"aria-activedescendant":
|
|
3981
|
+
"aria-controls": fl,
|
|
3982
|
+
"aria-activedescendant": ce(),
|
|
3978
3983
|
"data-testid": "merge-tag-picker-search",
|
|
3979
3984
|
onKeydown: i[1] ||= N(j(() => {}, ["prevent"]), ["enter"])
|
|
3980
|
-
}, null, 40,
|
|
3981
|
-
|
|
3985
|
+
}, null, 40, $c), [[A, _.value]])]),
|
|
3986
|
+
fe.value ? (s(), m("div", el, [(s(!0), m(C, null, e(R.value, (e) => (s(), m("button", {
|
|
3982
3987
|
key: e,
|
|
3983
3988
|
type: "button",
|
|
3984
3989
|
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)]",
|
|
3985
3990
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3986
3991
|
"data-group-name": e,
|
|
3987
|
-
onClick: (t) =>
|
|
3988
|
-
}, c(e), 9,
|
|
3992
|
+
onClick: (t) => oe(e)
|
|
3993
|
+
}, c(e), 9, tl))), 128))])) : T("", !0),
|
|
3989
3994
|
p("div", {
|
|
3990
|
-
id:
|
|
3995
|
+
id: fl,
|
|
3991
3996
|
ref_key: "listRef",
|
|
3992
|
-
ref:
|
|
3997
|
+
ref: re,
|
|
3993
3998
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3994
3999
|
role: "listbox",
|
|
3995
4000
|
"aria-label": x(o).mergeTag.picker.title,
|
|
3996
4001
|
"data-testid": "merge-tag-picker-list"
|
|
3997
|
-
}, [
|
|
4002
|
+
}, [ue.value ? (s(), m("div", rl, c(x(o).mergeTag.picker.empty), 1)) : de.value ? (s(), m("div", il, c(x(o).mergeTag.picker.noResults), 1)) : (s(!0), m(C, { key: 2 }, e(z.value, (e, t) => (s(), m(C, { key: t }, [e.kind === "header" ? (s(), m("button", {
|
|
3998
4003
|
key: 0,
|
|
3999
4004
|
ref_for: !0,
|
|
4000
|
-
ref: (t) =>
|
|
4005
|
+
ref: (t) => ae(e.group, t),
|
|
4001
4006
|
type: "button",
|
|
4002
4007
|
"aria-expanded": !F(e.group),
|
|
4003
|
-
"aria-controls":
|
|
4008
|
+
"aria-controls": fl,
|
|
4004
4009
|
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)]",
|
|
4005
4010
|
"data-testid": "merge-tag-picker-group-header",
|
|
4006
4011
|
"data-group-name": e.group,
|
|
4007
4012
|
"data-group-collapsed": F(e.group) ? "true" : "false",
|
|
4008
4013
|
onClick: (t) => I(e.group)
|
|
4009
4014
|
}, [
|
|
4010
|
-
g(x(
|
|
4015
|
+
g(x(dt), {
|
|
4011
4016
|
size: 12,
|
|
4012
4017
|
"stroke-width": 2,
|
|
4013
4018
|
class: n(["tpl:transition-transform", F(e.group) ? "tpl:-rotate-90" : ""])
|
|
4014
4019
|
}, null, 8, ["class"]),
|
|
4015
4020
|
p("span", null, c(e.group), 1),
|
|
4016
|
-
p("span",
|
|
4017
|
-
], 8,
|
|
4021
|
+
p("span", ol, " (" + c(x(u)(x(o).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
4022
|
+
], 8, al)) : (s(), m("button", {
|
|
4018
4023
|
key: 1,
|
|
4019
|
-
id:
|
|
4024
|
+
id: le(e.index),
|
|
4020
4025
|
type: "button",
|
|
4021
4026
|
role: "option",
|
|
4022
4027
|
"aria-selected": e.index === O.value,
|
|
@@ -4027,24 +4032,25 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
4027
4032
|
class: n(["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 === O.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)]"]),
|
|
4028
4033
|
"data-testid": "merge-tag-picker-item",
|
|
4029
4034
|
onMousemove: (t) => O.value = e.index,
|
|
4030
|
-
onClick: (t) =>
|
|
4035
|
+
onClick: (t) => ee(e.tag)
|
|
4031
4036
|
}, [
|
|
4032
|
-
p("span",
|
|
4033
|
-
p("span",
|
|
4034
|
-
e.tag.description ? (s(), m("span",
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
+
p("span", cl, c(e.tag.label), 1),
|
|
4038
|
+
p("span", ll, c(e.tag.value), 1),
|
|
4039
|
+
e.tag.description ? (s(), m("span", ul, c(e.tag.description), 1)) : T("", !0),
|
|
4040
|
+
e.tag.sample === void 0 ? T("", !0) : (s(), m("span", dl, c(x(u)(x(o).mergeTag.picker.sample, { sample: e.tag.sample })), 1))
|
|
4041
|
+
], 42, sl))], 64))), 128))], 8, nl)
|
|
4042
|
+
], 12, Jc)]),
|
|
4037
4043
|
_: 1
|
|
4038
4044
|
}, 8, ["visible"]));
|
|
4039
4045
|
}
|
|
4040
|
-
}),
|
|
4046
|
+
}), ml = ["data-logic-keyword"], hl = /* @__PURE__ */ f({
|
|
4041
4047
|
__name: "LogicTagBadge",
|
|
4042
4048
|
props: {
|
|
4043
4049
|
value: {},
|
|
4044
4050
|
syntax: {}
|
|
4045
4051
|
},
|
|
4046
4052
|
setup(e) {
|
|
4047
|
-
let t = e, n = w(() =>
|
|
4053
|
+
let t = e, n = w(() => z(t.value, t.syntax)), r = w(() => L(t.value, t.syntax));
|
|
4048
4054
|
return (e, t) => n.value ? (s(), m("span", {
|
|
4049
4055
|
key: 0,
|
|
4050
4056
|
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",
|
|
@@ -4054,22 +4060,22 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
4054
4060
|
},
|
|
4055
4061
|
"data-testid": "merge-tag-logic-badge",
|
|
4056
4062
|
"data-logic-keyword": r.value
|
|
4057
|
-
}, c(r.value), 9,
|
|
4063
|
+
}, c(r.value), 9, ml)) : T("", !0);
|
|
4058
4064
|
}
|
|
4059
|
-
}),
|
|
4065
|
+
}), gl = ["aria-labelledby", "data-tpl-theme"], _l = { 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" }, vl = ["id"], yl = ["aria-label"], bl = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, xl = [
|
|
4060
4066
|
"id",
|
|
4061
4067
|
"placeholder",
|
|
4062
4068
|
"aria-label",
|
|
4063
4069
|
"aria-activedescendant"
|
|
4064
|
-
],
|
|
4070
|
+
], Sl = ["aria-label"], Cl = {
|
|
4065
4071
|
key: 0,
|
|
4066
4072
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
4067
4073
|
"data-testid": "logic-picker-empty"
|
|
4068
|
-
},
|
|
4074
|
+
}, wl = {
|
|
4069
4075
|
key: 1,
|
|
4070
4076
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
4071
4077
|
"data-testid": "logic-picker-empty"
|
|
4072
|
-
},
|
|
4078
|
+
}, Tl = ["data-group-name"], El = [
|
|
4073
4079
|
"id",
|
|
4074
4080
|
"aria-selected",
|
|
4075
4081
|
"data-selected",
|
|
@@ -4077,19 +4083,19 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
4077
4083
|
"data-logic-kind",
|
|
4078
4084
|
"onMousemove",
|
|
4079
4085
|
"onClick"
|
|
4080
|
-
],
|
|
4086
|
+
], Dl = { class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-between tpl:gap-2" }, Ol = { class: "tpl:text-sm tpl:font-medium" }, kl = {
|
|
4081
4087
|
key: 0,
|
|
4082
4088
|
class: "tpl:flex tpl:items-center"
|
|
4083
|
-
},
|
|
4089
|
+
}, Al = {
|
|
4084
4090
|
key: 1,
|
|
4085
4091
|
class: "tpl:flex tpl:items-center tpl:gap-1"
|
|
4086
|
-
},
|
|
4092
|
+
}, jl = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, Ml = {
|
|
4087
4093
|
key: 0,
|
|
4088
4094
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
4089
|
-
},
|
|
4095
|
+
}, Nl = "tpl-logic-picker-list", Pl = /* @__PURE__ */ f({
|
|
4090
4096
|
__name: "LogicTagPickerModal",
|
|
4091
4097
|
setup(r) {
|
|
4092
|
-
let a =
|
|
4098
|
+
let a = He(st, "LogicTagPickerModal"), { t: o } = H(), u = D(et, ee.liquid), f = D(Ke, null), h = D(ze, null), _ = d(""), v = Fe(_, 200), b = d(null), S = w(() => v.value.trim().length > 0), O = d(0);
|
|
4093
4099
|
function M(e) {
|
|
4094
4100
|
let t = v.value.trim().toLowerCase();
|
|
4095
4101
|
return !t || e.filter(Boolean).join(" ").toLowerCase().includes(t);
|
|
@@ -4144,72 +4150,72 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
4144
4150
|
rows: e,
|
|
4145
4151
|
items: t
|
|
4146
4152
|
};
|
|
4147
|
-
}),
|
|
4153
|
+
}), B = w(() => z.value.items), te = w(() => a.tags.value.length === 0 && a.pairs.value.length === 0), ne = w(() => !te.value && B.value.length === 0);
|
|
4148
4154
|
i(() => a.isOpen.value, (e) => {
|
|
4149
4155
|
e && (_.value = "", O.value = 0, E(() => b.value?.focus()));
|
|
4150
|
-
}), i(
|
|
4156
|
+
}), i(B, (e) => {
|
|
4151
4157
|
O.value >= e.length && (O.value = Math.max(0, e.length - 1));
|
|
4152
4158
|
});
|
|
4153
|
-
let
|
|
4154
|
-
function
|
|
4159
|
+
let re = d(null);
|
|
4160
|
+
function ie(e) {
|
|
4155
4161
|
a.resolve(e);
|
|
4156
4162
|
}
|
|
4157
|
-
function
|
|
4163
|
+
function ae() {
|
|
4158
4164
|
a.resolve(null);
|
|
4159
4165
|
}
|
|
4160
|
-
function
|
|
4161
|
-
|
|
4162
|
-
|
|
4166
|
+
function V(e) {
|
|
4167
|
+
B.value.length !== 0 && (O.value = Math.max(0, Math.min(B.value.length - 1, O.value + e)), E(() => {
|
|
4168
|
+
re.value?.querySelector(`[data-logic-index="${O.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
4163
4169
|
}));
|
|
4164
4170
|
}
|
|
4165
|
-
function
|
|
4166
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
4167
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
4171
|
+
function oe(e) {
|
|
4172
|
+
if (e.key === "ArrowDown") e.preventDefault(), V(1);
|
|
4173
|
+
else if (e.key === "ArrowUp") e.preventDefault(), V(-1);
|
|
4168
4174
|
else if (e.key === "Enter") {
|
|
4169
4175
|
e.preventDefault();
|
|
4170
|
-
let t =
|
|
4171
|
-
t &&
|
|
4176
|
+
let t = B.value[O.value];
|
|
4177
|
+
t && ie(t);
|
|
4172
4178
|
}
|
|
4173
4179
|
}
|
|
4174
|
-
function
|
|
4175
|
-
return `${
|
|
4180
|
+
function se(e) {
|
|
4181
|
+
return `${Nl}-opt-${e}`;
|
|
4176
4182
|
}
|
|
4177
|
-
function
|
|
4178
|
-
return
|
|
4183
|
+
function ce() {
|
|
4184
|
+
return B.value.length === 0 ? void 0 : `${Nl}-opt-${O.value}`;
|
|
4179
4185
|
}
|
|
4180
|
-
return (r, i) => (s(), y(
|
|
4186
|
+
return (r, i) => (s(), y(qt, {
|
|
4181
4187
|
visible: x(a).isOpen.value,
|
|
4182
|
-
onClose:
|
|
4183
|
-
onKeydown:
|
|
4188
|
+
onClose: ae,
|
|
4189
|
+
onKeydown: oe
|
|
4184
4190
|
}, {
|
|
4185
4191
|
default: l(() => [p("div", {
|
|
4186
4192
|
role: "dialog",
|
|
4187
4193
|
"aria-modal": "true",
|
|
4188
|
-
"aria-labelledby": `${
|
|
4194
|
+
"aria-labelledby": `${Nl}-title`,
|
|
4189
4195
|
"data-tpl-theme": x(h),
|
|
4190
4196
|
"data-testid": "logic-picker-modal",
|
|
4191
4197
|
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)]",
|
|
4192
4198
|
style: t(x(f))
|
|
4193
4199
|
}, [
|
|
4194
|
-
p("header",
|
|
4195
|
-
id: `${
|
|
4200
|
+
p("header", _l, [p("h2", {
|
|
4201
|
+
id: `${Nl}-title`,
|
|
4196
4202
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
4197
|
-
}, c(x(o).logicTag.picker.title), 9,
|
|
4203
|
+
}, c(x(o).logicTag.picker.title), 9, vl), p("button", {
|
|
4198
4204
|
type: "button",
|
|
4199
4205
|
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)]",
|
|
4200
4206
|
"aria-label": x(o).logicTag.picker.close,
|
|
4201
4207
|
"data-testid": "logic-picker-close",
|
|
4202
|
-
onClick:
|
|
4203
|
-
}, [g(x(
|
|
4208
|
+
onClick: ae
|
|
4209
|
+
}, [g(x(At), {
|
|
4204
4210
|
size: 16,
|
|
4205
4211
|
"stroke-width": 2
|
|
4206
|
-
})], 8,
|
|
4207
|
-
p("div",
|
|
4212
|
+
})], 8, yl)]),
|
|
4213
|
+
p("div", bl, [g(x(mt), {
|
|
4208
4214
|
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)]",
|
|
4209
4215
|
size: 14,
|
|
4210
4216
|
"stroke-width": 2
|
|
4211
4217
|
}), k(p("input", {
|
|
4212
|
-
id: `${
|
|
4218
|
+
id: `${Nl}-search`,
|
|
4213
4219
|
ref_key: "searchInputRef",
|
|
4214
4220
|
ref: b,
|
|
4215
4221
|
"onUpdate:modelValue": i[0] ||= (e) => _.value = e,
|
|
@@ -4217,27 +4223,27 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
4217
4223
|
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)]",
|
|
4218
4224
|
placeholder: x(o).logicTag.picker.searchPlaceholder,
|
|
4219
4225
|
"aria-label": x(o).logicTag.picker.searchAriaLabel,
|
|
4220
|
-
"aria-controls":
|
|
4221
|
-
"aria-activedescendant":
|
|
4226
|
+
"aria-controls": Nl,
|
|
4227
|
+
"aria-activedescendant": ce(),
|
|
4222
4228
|
"data-testid": "logic-picker-search",
|
|
4223
4229
|
onKeydown: i[1] ||= N(j(() => {}, ["prevent"]), ["enter"])
|
|
4224
|
-
}, null, 40,
|
|
4230
|
+
}, null, 40, xl), [[A, _.value]])]),
|
|
4225
4231
|
p("div", {
|
|
4226
|
-
id:
|
|
4232
|
+
id: Nl,
|
|
4227
4233
|
ref_key: "listRef",
|
|
4228
|
-
ref:
|
|
4234
|
+
ref: re,
|
|
4229
4235
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
4230
4236
|
role: "listbox",
|
|
4231
4237
|
"aria-label": x(o).logicTag.picker.title,
|
|
4232
4238
|
"data-testid": "logic-picker-list"
|
|
4233
|
-
}, [
|
|
4239
|
+
}, [te.value ? (s(), m("div", Cl, c(x(o).logicTag.picker.empty), 1)) : ne.value ? (s(), m("div", wl, c(x(o).logicTag.picker.noResults), 1)) : (s(!0), m(C, { key: 2 }, e(z.value.rows, (e, t) => (s(), m(C, { key: t }, [e.kind === "header" ? (s(), m("div", {
|
|
4234
4240
|
key: 0,
|
|
4235
4241
|
class: "tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]",
|
|
4236
4242
|
"data-testid": "logic-picker-header",
|
|
4237
4243
|
"data-group-name": e.label
|
|
4238
|
-
}, c(e.label), 9,
|
|
4244
|
+
}, c(e.label), 9, Tl)) : (s(), m("button", {
|
|
4239
4245
|
key: 1,
|
|
4240
|
-
id:
|
|
4246
|
+
id: se(e.index),
|
|
4241
4247
|
type: "button",
|
|
4242
4248
|
role: "option",
|
|
4243
4249
|
"aria-selected": e.index === O.value,
|
|
@@ -4247,29 +4253,29 @@ var vo = { class: "tpl:mb-3.5" }, yo = ["value"], bo = ["value"], xo = {
|
|
|
4247
4253
|
class: n(["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 === O.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)]"]),
|
|
4248
4254
|
"data-testid": "logic-picker-item",
|
|
4249
4255
|
onMousemove: (t) => O.value = e.index,
|
|
4250
|
-
onClick: (t) =>
|
|
4256
|
+
onClick: (t) => ie(e.kind === "tag" ? e.tag : e.pair)
|
|
4251
4257
|
}, [
|
|
4252
|
-
p("span",
|
|
4258
|
+
p("span", Dl, [p("span", Ol, c(e.kind === "tag" ? e.tag.label : e.pair.label), 1), e.kind === "tag" ? (s(), m("span", kl, [g(hl, {
|
|
4253
4259
|
value: e.tag.value,
|
|
4254
4260
|
syntax: x(u)
|
|
4255
|
-
}, null, 8, ["value", "syntax"])])) : (s(), m("span",
|
|
4256
|
-
g(
|
|
4261
|
+
}, null, 8, ["value", "syntax"])])) : (s(), m("span", Al, [
|
|
4262
|
+
g(hl, {
|
|
4257
4263
|
value: e.pair.before,
|
|
4258
4264
|
syntax: x(u)
|
|
4259
4265
|
}, null, 8, ["value", "syntax"]),
|
|
4260
4266
|
i[2] ||= p("span", { class: "tpl:text-[var(--tpl-text-dim)]" }, "…", -1),
|
|
4261
|
-
g(
|
|
4267
|
+
g(hl, {
|
|
4262
4268
|
value: e.pair.after,
|
|
4263
4269
|
syntax: x(u)
|
|
4264
4270
|
}, null, 8, ["value", "syntax"])
|
|
4265
4271
|
]))]),
|
|
4266
|
-
p("span",
|
|
4267
|
-
(e.kind === "tag" ? e.tag.description : e.pair.description) ? (s(), m("span",
|
|
4268
|
-
], 42,
|
|
4269
|
-
], 12,
|
|
4272
|
+
p("span", jl, c(e.kind === "tag" ? e.tag.value : `${e.pair.before} … ${e.pair.after}`), 1),
|
|
4273
|
+
(e.kind === "tag" ? e.tag.description : e.pair.description) ? (s(), m("span", Ml, c(e.kind === "tag" ? e.tag.description : e.pair.description), 1)) : T("", !0)
|
|
4274
|
+
], 42, El))], 64))), 128))], 8, Sl)
|
|
4275
|
+
], 12, gl)]),
|
|
4270
4276
|
_: 1
|
|
4271
4277
|
}, 8, ["visible"]));
|
|
4272
4278
|
}
|
|
4273
4279
|
});
|
|
4274
4280
|
//#endregion
|
|
4275
|
-
export {
|
|
4281
|
+
export { Hc as a, Nn as c, fn as d, dn as f, tn as h, Wc as i, wn as l, sn as m, pl as n, Bc as o, ln as p, qc as r, Fc as s, Pl as t, Cn as u };
|