@templatical/editor 0.56.0 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-DdsvhE78.js → AiAltTextPopover-CpZ7UeAZ.js} +3 -3
- package/dist/{AiAltTextReview-P6to1_0t.js → AiAltTextReview-LYxvn7Qe.js} +4 -4
- package/dist/{AiChatPanel-BSlmzMRC.js → AiChatPanel-Cy05P-iO.js} +53 -53
- package/dist/{AiPanels-DAsnX-a3.js → AiPanels-CwKmXzyr.js} +1 -1
- package/dist/{AiRewriteMenu-DIISOR6U.js → AiRewriteMenu-DgqJHnza.js} +8 -8
- package/dist/{BlockIssueBadge-Bmtc50BQ.js → BlockIssueBadge-CxHJmuOh.js} +3 -3
- package/dist/{BlockPreviewCanvas-BYIzNn-9.js → BlockPreviewCanvas-DEmNZkEG.js} +44 -44
- package/dist/{CloudPanels-w34W8_BP.js → CloudPanels-Bmlf05Il.js} +11 -11
- package/dist/{CollaborationNotices-HTbCebjV.js → CollaborationNotices-C27GCMvK.js} +7 -7
- package/dist/{CommentsPanel-C5qG17Ki.js → CommentsPanel-B5NqPMmY.js} +1 -1
- package/dist/{CommentsSidebar-C7CWcUYZ.js → CommentsSidebar-BDrcrDxS.js} +42 -42
- package/dist/{CountdownBlock-BTXcCvjZ.js → CountdownBlock-D8dqjm3F.js} +6 -6
- package/dist/{CountdownToolbar-CP-pkntQ.js → CountdownToolbar-IjpCOjCd.js} +30 -30
- package/dist/{IssuesPanel-CiiNBzH0.js → IssuesPanel-uwuzeMSW.js} +87 -87
- package/dist/LanguageMenu-C-eQ0lFy.js +403 -0
- package/dist/{LocaleNotices-CTCZ7BYv.js → LocaleNotices-CDK_9D7P.js} +8 -8
- package/dist/{LogicTagInsertButton-DEOPc4RC.js → LogicTagInsertButton-BSolF7Fd.js} +3 -3
- package/dist/{MediaEditModal-DJsPLTwP.js → MediaEditModal-C8yc9dxt.js} +7 -7
- package/dist/{MediaPanels-D2WD2aE2.js → MediaPanels-FI4I8asn.js} +1 -1
- package/dist/{MergeTagInput-C9icdxw7.js → MergeTagInput-B1nl2ZMT.js} +12 -12
- package/dist/{MergeTagTextarea-CrAcmT3A.js → MergeTagTextarea-DJlf3VbS.js} +1 -1
- package/dist/{ParagraphEditor-BWBQ3jKz.js → ParagraphEditor-Dqco128s.js} +156 -156
- package/dist/{RestoreVersionDialog-CqAp16yQ.js → RestoreVersionDialog-hqLCuGV5.js} +12 -12
- package/dist/{RichTextEditorContent-xbBjVPVQ.js → RichTextEditorContent-xIEF0Y3Z.js} +2 -2
- package/dist/{SaveBlockDialog-pebNJBTc.js → SaveBlockDialog-CQlCP_XC.js} +46 -46
- package/dist/{SavedBlocksBrowserModal-CvagMcv7.js → SavedBlocksBrowserModal-BXA32Fx6.js} +23 -23
- package/dist/{SavedBlocksPanels-B9AAVBDm.js → SavedBlocksPanels-BKUzbamj.js} +1 -1
- package/dist/{SavedBlocksPickBar-BIANWe3i.js → SavedBlocksPickBar-BlvF-4UF.js} +9 -9
- package/dist/{TemplateSettings-ORq4PbCN.js → TemplateSettings-CYFtR8zv.js} +41 -41
- package/dist/{TestEmailModal-DRjCpcPl.js → TestEmailModal-BbaL17HO.js} +20 -20
- package/dist/{TestEmailPanel-H0v8El__.js → TestEmailPanel-DhB1CSpg.js} +1 -1
- package/dist/{TitleEditor-CEGbJXeU.js → TitleEditor-3BRl8u5l.js} +21 -21
- package/dist/{Toolbar-XT-uGA9J.js → Toolbar-pzNIakGM.js} +656 -656
- package/dist/{TplModal-7NQq5-VW.js → TplModal-WNuWhHZm.js} +4 -4
- package/dist/{VersionHistoryMenu-C8BE3Pr-.js → VersionHistoryMenu--T-Qp_mH.js} +15 -15
- package/dist/{VersionHistoryPanels-CuKuOSJG.js → VersionHistoryPanels-BPubvYIE.js} +1 -1
- package/dist/{VersionPreviewBanner-BVFBkveR.js → VersionPreviewBanner-ClL3Wkln.js} +7 -7
- package/dist/{WrapperBlock-Bdw-072t.js → WrapperBlock-CjfCPceb.js} +11 -11
- package/dist/{blockTypeIcons-CGplGmmr.js → blockTypeIcons-12OMwVyN.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js → AiAltTextPopover-PFjTrl0y.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js.map → AiAltTextPopover-PFjTrl0y.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js → AiAltTextReview-BMjzvApH.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js.map → AiAltTextReview-BMjzvApH.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js → AiChatPanel-C2gpq4kP.js} +107 -107
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js.map → AiChatPanel-C2gpq4kP.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js → AiPanels-Cx3PE2mE.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js.map → AiPanels-Cx3PE2mE.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js → AiRewriteMenu-CnkyjPEu.js} +11 -11
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js.map → AiRewriteMenu-CnkyjPEu.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js → BlockIssueBadge-DncZ-HDf.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js.map → BlockIssueBadge-DncZ-HDf.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js +156 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-B3HkuENF.js.map → BlockPreviewCanvas-CCSEzL46.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js → CloudPanels-CRztnw4M.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js.map → CloudPanels-CRztnw4M.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js → CollaborationNotices-IuLYT2x7.js} +8 -8
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js.map → CollaborationNotices-IuLYT2x7.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js → CommentsPanel-lgjJNrrY.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js.map → CommentsPanel-lgjJNrrY.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js → CommentsSidebar-DTold7iy.js} +214 -214
- package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js.map → CommentsSidebar-DTold7iy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js → CountdownBlock-8aPSExrv.js} +7 -7
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js.map → CountdownBlock-8aPSExrv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js → CountdownToolbar-CnWQEW5g.js} +50 -50
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js.map → CountdownToolbar-CnWQEW5g.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js → IssuesPanel-CrplCzo8.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js.map → IssuesPanel-CrplCzo8.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js → LanguageMenu-B6MNInCL.js} +110 -110
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js.map → LanguageMenu-B6MNInCL.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js → LocaleNotices-TxeAl8Iq.js} +9 -9
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js.map → LocaleNotices-TxeAl8Iq.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js → LogicTagInsertButton-DvSVx2DB.js} +4 -4
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js.map → LogicTagInsertButton-DvSVx2DB.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js → MediaEditModal-tGK6htBl.js} +8 -8
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js.map → MediaEditModal-tGK6htBl.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js → MediaPanels-BVrQYz2C.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js.map → MediaPanels-BVrQYz2C.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js → MergeTagInput-DeuNH3re.js} +13 -13
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js.map → MergeTagInput-DeuNH3re.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js → MergeTagTextarea-B2xxIU3e.js} +2 -2
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js.map → MergeTagTextarea-B2xxIU3e.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js → ParagraphEditor-Bx_Hlw8d.js} +106 -106
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js.map → ParagraphEditor-Bx_Hlw8d.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js → RestoreVersionDialog-CPrrWTsT.js} +12 -12
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js.map → RestoreVersionDialog-CPrrWTsT.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js → RichTextEditorContent-Dze4C9VI.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js.map → RichTextEditorContent-Dze4C9VI.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js → SaveBlockDialog-CXVwnfsy.js} +51 -51
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js.map → SaveBlockDialog-CXVwnfsy.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js → SavedBlocksBrowserModal-BDTmenOE.js} +23 -23
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js.map → SavedBlocksBrowserModal-BDTmenOE.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js → SavedBlocksPanels-B41Rk_v1.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js.map → SavedBlocksPanels-B41Rk_v1.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js → SavedBlocksPickBar-B97z_rFH.js} +11 -11
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js.map → SavedBlocksPickBar-B97z_rFH.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js → TemplateSettings-YwwRbxPc.js} +102 -102
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js.map → TemplateSettings-YwwRbxPc.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js → TestEmailModal-BiFP2Cbx.js} +20 -20
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js.map → TestEmailModal-BiFP2Cbx.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js → TestEmailPanel-BrivPMk2.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js.map → TestEmailPanel-BrivPMk2.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js → TitleEditor-CzPkkL2s.js} +19 -19
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js.map → TitleEditor-CzPkkL2s.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js → Toolbar-VH07SzX7.js} +550 -550
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js.map → Toolbar-VH07SzX7.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js → TplModal-DMe6J811.js} +6 -6
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js.map → TplModal-DMe6J811.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js → VersionHistoryMenu-DkwbKhBl.js} +15 -15
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js.map → VersionHistoryMenu-DkwbKhBl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js → VersionHistoryPanels-CgxhMRAl.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js.map → VersionHistoryPanels-CgxhMRAl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js → VersionPreviewBanner-WVBDBrwQ.js} +8 -8
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js.map → VersionPreviewBanner-WVBDBrwQ.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js → WrapperBlock-CCCIcqe2.js} +12 -12
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js.map → WrapperBlock-CCCIcqe2.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CsfQlmcf.js → composables-D3lsO7Io.js} +925 -925
- package/dist/cdn/chunks/composables-D3lsO7Io.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js → createCloudRuntime-CE79GB1H.js} +15 -15
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js.map → createCloudRuntime-CE79GB1H.js.map} +1 -1
- package/dist/cdn/chunks/dist-Cf1pSluo.js +405 -0
- package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-Cf1pSluo.js.map} +1 -1
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js → editor-modal-CN69NlOK.js} +170 -170
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js.map → editor-modal-CN69NlOK.js.map} +1 -1
- package/dist/cdn/chunks/en-Bcz4gS9U.js +1 -0
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js → extensions-8dlM-fU4.js} +96 -96
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js.map → extensions-8dlM-fU4.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js → sanitizeHtml-B3njfkSy.js} +11 -11
- package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js.map → sanitizeHtml-B3njfkSy.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js → socialIcons-BFgc3qqJ.js} +2 -2
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js.map → socialIcons-BFgc3qqJ.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bfj1jHnn.js → src-GgKlXNxy.js} +2 -2
- package/dist/cdn/chunks/{src-Bfj1jHnn.js.map → src-GgKlXNxy.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-C940SvId.js} +3 -3
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js.map → tiptap-C940SvId.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js → useLogicTag-B0PDeDxl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js.map → useLogicTag-B0PDeDxl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js → useMergeTag-BSU75bKk.js} +7 -7
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js.map → useMergeTag-BSU75bKk.js.map} +1 -1
- package/dist/cdn/editor.js +325 -325
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-CRX6rncm.js → composables-DreAt_0A.js} +1031 -1031
- package/dist/{createCloudRuntime-DplyIlsy.js → createCloudRuntime-CL4tUlDC.js} +14 -14
- package/dist/{dist-ChOb5XHW.js → dist-0GWMyHtM.js} +1 -1
- package/dist/{dist-6DU0me3E.js → dist-B_0FPmoy.js} +1 -1
- package/dist/{dist-B8dY8drK.js → dist-BjzK1g4Z.js} +1 -1
- package/dist/{dist-54VCNoC0.js → dist-BsumKKh9.js} +1 -1
- package/dist/{dist-BWflWcpW.js → dist-C3avsUq9.js} +2 -2
- package/dist/{dist-fqSers8_.js → dist-CCLRTtJP.js} +197 -197
- package/dist/dist-CiYotUR8.js +406 -0
- package/dist/{dist-C3hu_C3w.js → dist-Cr1CLCmx.js} +1 -1
- package/dist/{dist-D_XrUEET.js → dist-CsknfjrZ.js} +3 -3
- package/dist/{dist-TAv500j6.js → dist-DDytHU_6.js} +1 -1
- package/dist/{dist-CcOn7WCo.js → dist-DKV9m4Uu.js} +1 -1
- package/dist/{dist-B9a7iVye.js → dist-Dq9VnANT.js} +1 -1
- package/dist/{dist-DZ3X-uB8.js → dist-ZrT0vAB6.js} +1 -1
- package/dist/{editor-modal-D9HT9bD6.js → editor-modal-BD32TXws.js} +106 -106
- package/dist/en-Dgs_-NBw.js +1 -0
- package/dist/{extensions-Cm6K4SRX.js → extensions-DKxHlSd7.js} +179 -179
- package/dist/{socialIcons-CJD6OsI7.js → socialIcons-oo4uL16Y.js} +1 -1
- package/dist/templatical-editor.js +526 -526
- package/dist/{useLogicTag-DLkYos2Q.js → useLogicTag-B4Zpk3eo.js} +3 -3
- package/dist/{useMergeTag-IoWOO679.js → useMergeTag-B5qlq8px.js} +7 -7
- package/package.json +7 -7
- package/dist/LanguageMenu-B981Av-6.js +0 -403
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js +0 -156
- package/dist/cdn/chunks/composables-CsfQlmcf.js.map +0 -1
- package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
- package/dist/cdn/chunks/en-CVxNoHww.js +0 -1
- package/dist/dist-0alKVRc_.js +0 -406
- package/dist/en-De3uAutQ.js +0 -1
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { At as Ct, G as wt, Mt as Tt, Nt as Et, Ot as Dt, St as Ot, Ut as kt, V as At, Wt as jt, X as Mt, _t as Nt, d as Pt, f as Ft, k as It, mt as Lt, nt as Rt, o as zt, y as Bt, yt as Vt } from "./icons-DHExFLlT.js";
|
|
6
|
-
import { $ as Ht, A as Ut, B as Wt, C as Gt, D as Kt, F as qt, G as Jt, H as Yt, I as Xt, J as Zt, K as Qt, L as $t, M as en, N as tn, O as nn, P as rn, R as an, S as on, T as sn, U as cn, V as ln, W as un, Y as dn, Z as fn, _ as pn, a as mn, at as hn, b as gn, c as _n, d as vn, et as yn, g as bn, h as xn, i as Sn, it as Cn, j as wn, k as Tn, l as En, m as Dn, nt as On, ot as kn, p as An, q as jn, r as Mn, rt as Nn, s as Pn, st as Fn, tt as In, u as Ln, v as Rn, w as zn, x as Bn, y as Vn, z as Hn } from "./keys-BUmIvYy3.js";
|
|
7
|
-
import { t as Q } from "./useI18n-D8s7HtTn.js";
|
|
8
|
-
import { n as Un } from "./useLocalizedDisplay-Bgg4qpev.js";
|
|
9
|
-
import { t as Wn } from "./plural-CyxrJXL1.js";
|
|
10
|
-
import { t as Gn } from "./languageName-DEEOhDWI.js";
|
|
11
|
-
import { m as Kn, w as qn, x as Jn } from "./styleConstants-CgiNKdnc.js";
|
|
12
|
-
import { _ as Yn, h as Xn, v as Zn, y as Qn } from "./dist-BzXULHvI.js";
|
|
13
|
-
import { a as $n, c as er, i as tr, l as nr } from "./dist-DqGgijFI.js";
|
|
14
|
-
import { t as rr } from "./useEditorRoot-Beau2Z_T.js";
|
|
1
|
+
import { a as e, c as t, i as n, l as r } from "./dist-Cf1pSluo.js";
|
|
2
|
+
import { A as i, B as a, C as o, E as s, F as c, G as l, H as u, I as d, K as f, L as p, M as m, N as h, O as g, P as _, Q as v, R as y, S as b, W as x, X as S, Y as C, _ as w, b as T, c as E, ct as D, dt as O, f as ee, g as k, h as A, j, l as M, m as N, mt as P, ot as F, p as I, pt as L, rt as R, s as z, st as B, t as te, tt as V, u as H, x as U } from "./draggable-DepKdldn.js";
|
|
3
|
+
import { t as ne } from "./useEditorRoot-Beau2Z_T.js";
|
|
4
|
+
import { t as W } from "./useI18n-D8s7HtTn.js";
|
|
15
5
|
import "./useCloudI18n-Xsih9yRH.js";
|
|
16
|
-
import { t as
|
|
6
|
+
import { t as G } from "./useMergeTag-BSU75bKk.js";
|
|
7
|
+
import { _ as re, h as K, v as ie, y as ae } from "./dist-BzXULHvI.js";
|
|
8
|
+
import { $ as oe, A as se, B as q, C as J, Cn as Y, D as X, E as ce, G as le, H as ue, I as de, K as Z, Kt as fe, L as pe, M as me, N as Q, O as he, P as ge, Q as _e, Qt as ve, R as ye, S as be, Sn as xe, T as Se, W as Ce, X as we, Y as Te, Z as Ee, Zt as De, a as Oe, at as ke, b as Ae, bn as je, cn as Me, ct as Ne, d as Pe, dt as Fe, et as Ie, hn as Le, ht as Re, i as ze, it as Be, j as Ve, jt as He, lt as Ue, mn as We, mt as Ge, nt as Ke, on as qe, p as Je, pt as Ye, q as Xe, rn as Ze, rt as Qe, sn as $e, st as et, t as tt, tt as nt, u as rt, un as it, vn as at, vt as ot, w as st, x as ct, xn as lt, y as ut, yn as dt } from "./src-mXG-Of9A.js";
|
|
17
9
|
import { t as $ } from "./logger-CqQTfJGx.js";
|
|
18
|
-
import { a as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { t as
|
|
10
|
+
import { a as ft, c as pt, i as mt, n as ht, o as gt, t as _t } from "./usePopoverPosition-esO6wjvU.js";
|
|
11
|
+
import { n as vt } from "./useLocalizedDisplay-Bgg4qpev.js";
|
|
12
|
+
import { $ as yt, A as bt, B as xt, C as St, D as Ct, F as wt, G as Tt, H as Et, I as Dt, J as Ot, K as kt, L as At, M as jt, N as Mt, O as Nt, P as Pt, R as Ft, S as It, T as Lt, U as Rt, V as zt, W as Bt, Y as Vt, Z as Ht, _ as Ut, a as Wt, at as Gt, b as Kt, c as qt, d as Jt, et as Yt, g as Xt, h as Zt, i as Qt, it as $t, j as en, k as tn, l as nn, m as rn, nt as an, ot as on, p as sn, q as cn, r as ln, rt as un, s as dn, st as fn, tt as pn, u as mn, v as hn, w as gn, x as _n, y as vn, z as yn } from "./keys-BUmIvYy3.js";
|
|
13
|
+
import { t as bn } from "./useLogicTag-B0PDeDxl.js";
|
|
14
|
+
import { B as xn, C as Sn, F as Cn, I as wn, P as Tn, R as En, T as Dn, _ as On, a as kn, f as An, h as jn, n as Mn, o as Nn, t as Pn, u as Fn, v as In, w as Ln, x as Rn, y as zn, z as Bn } from "./socialIcons-BFgc3qqJ.js";
|
|
15
|
+
import { r as Vn, t as Hn } from "./templateSettingsFields-cjlP-jdw.js";
|
|
16
|
+
import { n as Un, t as Wn } from "./sanitizeHtml-B3njfkSy.js";
|
|
17
|
+
import { At as Gn, G as Kn, Mt as qn, Nt as Jn, Ot as Yn, St as Xn, Ut as Zn, V as Qn, Wt as $n, X as er, _t as tr, d as nr, f as rr, k as ir, mt as ar, nt as or, o as sr, y as cr, yt as lr } from "./icons-DHExFLlT.js";
|
|
18
|
+
import { t as ur } from "./LoadingTrack-DUYcDHOV.js";
|
|
19
|
+
import { t as dr } from "./languageName-DEEOhDWI.js";
|
|
20
|
+
import { t as fr } from "./plural-CyxrJXL1.js";
|
|
21
|
+
import { m as pr, w as mr, x as hr } from "./styleConstants-CgiNKdnc.js";
|
|
22
|
+
import { t as gr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
23
23
|
import { t as _r } from "./readableTextColor-BfZUGnVj.js";
|
|
24
24
|
// src/composables/useFocusTrap.ts
|
|
25
25
|
var vr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
26
|
-
function yr(
|
|
27
|
-
let
|
|
26
|
+
function yr(t, n) {
|
|
27
|
+
let r = ne(), i = null, a = null, o = null;
|
|
28
28
|
function s() {
|
|
29
|
-
return
|
|
29
|
+
return t.value ? Array.from(t.value.querySelectorAll(vr)).filter((e) => e.offsetParent !== null) : [];
|
|
30
30
|
}
|
|
31
31
|
function c(e) {
|
|
32
32
|
if (e.key !== "Tab") return;
|
|
33
33
|
let t = s();
|
|
34
34
|
if (t.length === 0) return;
|
|
35
|
-
let
|
|
36
|
-
e.shiftKey ?
|
|
35
|
+
let n = t[0], i = t[t.length - 1];
|
|
36
|
+
e.shiftKey ? r.activeElement === n && (e.preventDefault(), i.focus()) : r.activeElement === i && (e.preventDefault(), n.focus());
|
|
37
37
|
}
|
|
38
38
|
function l() {
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
}),
|
|
45
|
-
}
|
|
46
|
-
function
|
|
39
|
+
let n = a !== null || o !== null;
|
|
40
|
+
n && d({ restoreFocus: !1 }), n || (i = r.activeElement), o = requestAnimationFrame(() => {
|
|
41
|
+
o = null;
|
|
42
|
+
let e = s();
|
|
43
|
+
e.length > 0 && (t.value?.querySelector("[autofocus], input:not([disabled])") ?? e[0]).focus();
|
|
44
|
+
}), a = e(t, "keydown", c);
|
|
45
|
+
}
|
|
46
|
+
function d(e = {}) {
|
|
47
47
|
let t = e.restoreFocus !== !1;
|
|
48
|
-
|
|
48
|
+
o !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(o), o = null), a?.(), a = null, t && i && i.focus && (i.focus(), i = null);
|
|
49
49
|
}
|
|
50
|
-
let
|
|
51
|
-
e && t ? l() :
|
|
50
|
+
let f = u([n, t], ([e, t]) => {
|
|
51
|
+
e && t ? l() : d();
|
|
52
52
|
}, { flush: "post" });
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
v(() => {
|
|
54
|
+
f(), d();
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
// src/composables/useEmoji.ts
|
|
58
58
|
function br() {
|
|
59
|
-
let [e, t] =
|
|
60
|
-
|
|
59
|
+
let [e, t] = ie(!1), n = R([]), r = !1;
|
|
60
|
+
v(() => {
|
|
61
61
|
r = !0;
|
|
62
|
-
}),
|
|
62
|
+
}), u(e, async (e) => {
|
|
63
63
|
if (e && n.value.length === 0) {
|
|
64
64
|
let { emojiCategories: e } = await import("./emojiData-CBNuCfum.js");
|
|
65
65
|
if (r) return;
|
|
@@ -81,17 +81,17 @@ function br() {
|
|
|
81
81
|
}
|
|
82
82
|
// src/composables/useBlockRegistry.ts
|
|
83
83
|
function xr() {
|
|
84
|
-
let e =
|
|
84
|
+
let e = R(/* @__PURE__ */ new Map());
|
|
85
85
|
function t(t, n) {
|
|
86
|
-
e.value.set(t, n),
|
|
86
|
+
e.value.set(t, n), B(e);
|
|
87
87
|
}
|
|
88
88
|
function n(t, n) {
|
|
89
89
|
let r = `custom:${t.type}`;
|
|
90
90
|
e.value.set(r, {
|
|
91
91
|
component: n,
|
|
92
|
-
createBlock: () =>
|
|
92
|
+
createBlock: () => be(t),
|
|
93
93
|
definition: t
|
|
94
|
-
}),
|
|
94
|
+
}), B(e);
|
|
95
95
|
}
|
|
96
96
|
function r(t) {
|
|
97
97
|
if (t.type === "custom") {
|
|
@@ -114,7 +114,7 @@ function xr() {
|
|
|
114
114
|
let t = a(e.customType);
|
|
115
115
|
if (!t) return o("Block definition not found");
|
|
116
116
|
try {
|
|
117
|
-
return await
|
|
117
|
+
return await pe(await import("./liquid.browser-rubac0VA.js")).parseAndRender(t.template, e.fieldValues);
|
|
118
118
|
} catch (t) {
|
|
119
119
|
return $.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
120
120
|
}
|
|
@@ -174,7 +174,7 @@ function wr(e) {
|
|
|
174
174
|
return t;
|
|
175
175
|
}
|
|
176
176
|
function Tr(e) {
|
|
177
|
-
let t =
|
|
177
|
+
let t = V(e?.customFonts ?? []), n = V(!1), r = wr(e?.builtIns), i = I(() => e?.defaultFallback ?? Cr), a = I(() => {
|
|
178
178
|
let e = [...r], n = t.value.map((e) => ({
|
|
179
179
|
value: e.name,
|
|
180
180
|
label: e.name,
|
|
@@ -194,9 +194,9 @@ function Tr(e) {
|
|
|
194
194
|
}
|
|
195
195
|
return Cr;
|
|
196
196
|
}
|
|
197
|
-
let l =
|
|
197
|
+
let l = I(() => c());
|
|
198
198
|
function u(e) {
|
|
199
|
-
return
|
|
199
|
+
return ze(e, {
|
|
200
200
|
customFonts: t.value,
|
|
201
201
|
defaultFallback: i.value
|
|
202
202
|
});
|
|
@@ -218,14 +218,14 @@ function Tr(e) {
|
|
|
218
218
|
$.warn(`Failed to load custom font "${e.name}":`, t);
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
|
-
await Promise.allSettled(e),
|
|
221
|
+
await Promise.allSettled(e), f || (n.value = !0);
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function m() {
|
|
224
224
|
for (let e of d) e.remove();
|
|
225
225
|
d.length = 0;
|
|
226
226
|
}
|
|
227
|
-
return
|
|
228
|
-
f = !0,
|
|
227
|
+
return C() && v(() => {
|
|
228
|
+
f = !0, m();
|
|
229
229
|
}), {
|
|
230
230
|
fonts: a,
|
|
231
231
|
defaultFont: l,
|
|
@@ -233,7 +233,7 @@ function Tr(e) {
|
|
|
233
233
|
customFonts: t,
|
|
234
234
|
isLoaded: n,
|
|
235
235
|
loadCustomFonts: p,
|
|
236
|
-
cleanupFontLinks:
|
|
236
|
+
cleanupFontLinks: m,
|
|
237
237
|
resolveFontFamily: u,
|
|
238
238
|
getDefaultFont: c
|
|
239
239
|
};
|
|
@@ -264,7 +264,7 @@ var Er = {
|
|
|
264
264
|
canvasBg: "--tpl-canvas-bg"
|
|
265
265
|
};
|
|
266
266
|
function Dr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
267
|
-
return { themeStyles:
|
|
267
|
+
return { themeStyles: I(() => {
|
|
268
268
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
269
269
|
if (a) for (let [e, t] of Object.entries(Er)) {
|
|
270
270
|
let n = a[e];
|
|
@@ -275,11 +275,11 @@ function Dr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
275
275
|
}
|
|
276
276
|
// src/utils/mergeTagNodeSpec.ts
|
|
277
277
|
function Or(e, t, n) {
|
|
278
|
-
return
|
|
278
|
+
return Ee(e, n) ? {
|
|
279
279
|
type: "logicMergeTagNode",
|
|
280
280
|
attrs: {
|
|
281
281
|
value: e,
|
|
282
|
-
keyword:
|
|
282
|
+
keyword: le(e, n)
|
|
283
283
|
}
|
|
284
284
|
} : {
|
|
285
285
|
type: "mergeTagNode",
|
|
@@ -313,7 +313,7 @@ function Mr(e) {
|
|
|
313
313
|
...this.parent?.(),
|
|
314
314
|
color: {
|
|
315
315
|
default: null,
|
|
316
|
-
parseHTML: (e) => jr(
|
|
316
|
+
parseHTML: (e) => jr(gt(e.style.color)),
|
|
317
317
|
renderHTML: (e) => {
|
|
318
318
|
let t = jr(e.color);
|
|
319
319
|
return t ? { style: `color: ${t}` } : {};
|
|
@@ -323,8 +323,8 @@ function Mr(e) {
|
|
|
323
323
|
} });
|
|
324
324
|
}
|
|
325
325
|
// src/composables/useRichTextLinkDialog.ts
|
|
326
|
-
function Nr(e, t =
|
|
327
|
-
let r =
|
|
326
|
+
function Nr(e, t = ue.liquid, n = () => !0) {
|
|
327
|
+
let r = V(!1), i = V(""), a = V(""), o = V(null);
|
|
328
328
|
yr(o, r);
|
|
329
329
|
function s() {
|
|
330
330
|
if (!n()) return;
|
|
@@ -353,8 +353,8 @@ function Nr(e, t = te.liquid, n = () => !0) {
|
|
|
353
353
|
if (t.startsWith("#")) return t;
|
|
354
354
|
if (t.startsWith("//")) return `https:${t}`;
|
|
355
355
|
if (l.test(t)) return t;
|
|
356
|
-
let n =
|
|
357
|
-
return n ?
|
|
356
|
+
let n = Pe(t);
|
|
357
|
+
return n ? rt.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
358
358
|
}
|
|
359
359
|
function f() {
|
|
360
360
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -378,109 +378,109 @@ function Nr(e, t = te.liquid, n = () => !0) {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
// src/composables/useRichTextEditor.ts
|
|
381
|
-
function Pr(
|
|
382
|
-
let
|
|
383
|
-
|
|
381
|
+
function Pr(t) {
|
|
382
|
+
let n = g(hn, null), r = pt(), { mergeTags: i, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: c, autocomplete: l } = G(), { canInsertLogicTag: d, isRequesting: f, requestLogicTag: p } = bn(), h = g(an, null), _ = (S(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = Te(c), y = R(null), b = n?.content ? vt(n) : null, x = () => Fe(b?.settings.value ?? { locale: "en" });
|
|
383
|
+
u(x, (e) => {
|
|
384
384
|
let t = y.value?.view.dom;
|
|
385
385
|
t && t.setAttribute("dir", e);
|
|
386
386
|
});
|
|
387
|
-
let { showLinkDialog:
|
|
388
|
-
|
|
387
|
+
let { showLinkDialog: C, linkUrl: w, linkColor: T, linkDialogRef: E, openLinkDialog: D, insertLink: O, removeLink: ee, closeLinkDialog: k, handleLinkKeydown: A } = Nr(y, c, () => r.value);
|
|
388
|
+
u(r, (e) => {
|
|
389
389
|
if (y.value?.setEditable(e, !1), !e) {
|
|
390
390
|
k();
|
|
391
391
|
let e = y.value;
|
|
392
392
|
e && e.view.dispatch(e.state.tr);
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
|
-
let { start: j, stop: M } =
|
|
396
|
-
async function
|
|
397
|
-
|
|
395
|
+
let { start: j, stop: M } = re(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), N = R(null), P = V(!0), F = V(null), I = !1, L = null;
|
|
396
|
+
async function z() {
|
|
397
|
+
F.value = null, P.value = !0;
|
|
398
398
|
try {
|
|
399
|
-
let { TiptapEditor:
|
|
400
|
-
mergeTags:
|
|
399
|
+
let { TiptapEditor: e, EC: a, extensions: o } = await t.loadExtensions({
|
|
400
|
+
mergeTags: i,
|
|
401
401
|
syntax: c,
|
|
402
|
-
triggerChar:
|
|
402
|
+
triggerChar: v,
|
|
403
403
|
autocompleteEnabled: l,
|
|
404
|
-
suggestionEmptyText:
|
|
404
|
+
suggestionEmptyText: _
|
|
405
405
|
});
|
|
406
|
-
if (
|
|
406
|
+
if (I) return;
|
|
407
407
|
N.value = a;
|
|
408
408
|
let s = /* @__PURE__ */ new Map();
|
|
409
409
|
o.forEach((e, t) => s.set(e.name, t));
|
|
410
|
-
let u = new
|
|
410
|
+
let u = new e({
|
|
411
411
|
extensions: o.filter((e, t) => s.get(e.name) === t),
|
|
412
|
-
content:
|
|
413
|
-
editable:
|
|
412
|
+
content: t.blockContent(),
|
|
413
|
+
editable: r.value,
|
|
414
414
|
editorProps: { attributes: { dir: x() } },
|
|
415
|
-
onUpdate: ({ editor:
|
|
416
|
-
!
|
|
415
|
+
onUpdate: ({ editor: e }) => {
|
|
416
|
+
!I && r.value && n && (L = e.getHTML(), n.updateBlock(t.blockId(), { content: L }));
|
|
417
417
|
}
|
|
418
418
|
});
|
|
419
|
-
if (
|
|
419
|
+
if (I) {
|
|
420
420
|
u.destroy();
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
423
|
y.value = u, P.value = !1, j();
|
|
424
|
-
} catch (
|
|
425
|
-
if (
|
|
426
|
-
$.error(`[${
|
|
424
|
+
} catch (e) {
|
|
425
|
+
if (I) return;
|
|
426
|
+
$.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
y.value?.destroy(), y.value = null,
|
|
429
|
+
function B() {
|
|
430
|
+
y.value?.destroy(), y.value = null, z();
|
|
431
431
|
}
|
|
432
|
-
|
|
433
|
-
let
|
|
434
|
-
y.value && e !==
|
|
432
|
+
z();
|
|
433
|
+
let te = u(() => t.blockContent(), (e) => {
|
|
434
|
+
y.value && e !== L && (L = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
435
435
|
});
|
|
436
|
-
function
|
|
437
|
-
if (
|
|
438
|
-
let n =
|
|
436
|
+
function H(e) {
|
|
437
|
+
if (o.value || f.value) return;
|
|
438
|
+
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
439
439
|
if (!r) return;
|
|
440
|
-
|
|
440
|
+
t.onClickOutsideSideEffect?.(r);
|
|
441
441
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
442
|
-
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i ||
|
|
442
|
+
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
443
443
|
}
|
|
444
|
-
|
|
445
|
-
|
|
444
|
+
e(document, "mousedown", H), m(() => {
|
|
445
|
+
I = !0, te(), M(), y.value?.destroy();
|
|
446
446
|
});
|
|
447
|
-
async function
|
|
448
|
-
if (!
|
|
447
|
+
async function U() {
|
|
448
|
+
if (!r.value) return;
|
|
449
449
|
let e = await s();
|
|
450
|
-
!
|
|
450
|
+
!I && r.value && (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
451
451
|
label: e.label,
|
|
452
452
|
value: e.value
|
|
453
453
|
}).run() : y.value?.commands.focus());
|
|
454
454
|
}
|
|
455
|
-
async function
|
|
456
|
-
if (!
|
|
457
|
-
let e = await
|
|
458
|
-
!
|
|
455
|
+
async function ne() {
|
|
456
|
+
if (!r.value) return;
|
|
457
|
+
let e = await p();
|
|
458
|
+
!I && r.value && (e && y.value ? Ar(y.value, e, c) : y.value?.commands.focus());
|
|
459
459
|
}
|
|
460
460
|
return {
|
|
461
461
|
editor: y,
|
|
462
462
|
EditorContent: N,
|
|
463
463
|
isLoading: P,
|
|
464
|
-
isEditable:
|
|
465
|
-
initError:
|
|
466
|
-
retry:
|
|
467
|
-
showLinkDialog:
|
|
468
|
-
linkUrl:
|
|
469
|
-
linkColor:
|
|
470
|
-
linkDialogRef:
|
|
471
|
-
mergeTags:
|
|
472
|
-
canRequestMergeTag:
|
|
473
|
-
isRequestingMergeTag:
|
|
464
|
+
isEditable: r,
|
|
465
|
+
initError: F,
|
|
466
|
+
retry: B,
|
|
467
|
+
showLinkDialog: C,
|
|
468
|
+
linkUrl: w,
|
|
469
|
+
linkColor: T,
|
|
470
|
+
linkDialogRef: E,
|
|
471
|
+
mergeTags: i,
|
|
472
|
+
canRequestMergeTag: a,
|
|
473
|
+
isRequestingMergeTag: o,
|
|
474
474
|
syntax: c,
|
|
475
475
|
canInsertLogicTag: d,
|
|
476
|
-
isRequestingLogicTag:
|
|
477
|
-
openLinkDialog:
|
|
478
|
-
insertLink:
|
|
479
|
-
removeLink:
|
|
476
|
+
isRequestingLogicTag: f,
|
|
477
|
+
openLinkDialog: D,
|
|
478
|
+
insertLink: O,
|
|
479
|
+
removeLink: ee,
|
|
480
480
|
closeLinkDialog: k,
|
|
481
481
|
handleLinkKeydown: A,
|
|
482
|
-
handleAddMergeTag:
|
|
483
|
-
handleAddLogicTag:
|
|
482
|
+
handleAddMergeTag: U,
|
|
483
|
+
handleAddLogicTag: ne
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
// src/utils/activeEditorTracker.ts
|
|
@@ -513,23 +513,23 @@ function zr(e) {
|
|
|
513
513
|
// src/composables/usePreviewResolution.ts
|
|
514
514
|
var Br = 500;
|
|
515
515
|
function Vr(e) {
|
|
516
|
-
let t = typeof e.resolvePreview == "function", n =
|
|
517
|
-
function
|
|
518
|
-
|
|
516
|
+
let t = typeof e.resolvePreview == "function", n = V(null), r = V(!1), i = V(!1), a = 0, o = null;
|
|
517
|
+
function s() {
|
|
518
|
+
o !== null && (clearTimeout(o), o = null);
|
|
519
519
|
}
|
|
520
|
-
async function
|
|
520
|
+
async function c() {
|
|
521
521
|
let t = e.resolvePreview;
|
|
522
522
|
if (!t) return;
|
|
523
523
|
let o = ++a;
|
|
524
524
|
r.value = !0;
|
|
525
525
|
let s = {
|
|
526
|
-
content:
|
|
526
|
+
content: Ze(e.getContent()),
|
|
527
527
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
528
528
|
};
|
|
529
529
|
try {
|
|
530
530
|
let e = await t(s);
|
|
531
531
|
if (o !== a) return;
|
|
532
|
-
if (!
|
|
532
|
+
if (!tt(e)) {
|
|
533
533
|
i.value = !0;
|
|
534
534
|
return;
|
|
535
535
|
}
|
|
@@ -541,34 +541,34 @@ function Vr(e) {
|
|
|
541
541
|
o === a && (r.value = !1);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
t && (
|
|
546
|
-
|
|
544
|
+
function l() {
|
|
545
|
+
t && (s(), n.value === null ? c() : o = setTimeout(() => {
|
|
546
|
+
o = null, c();
|
|
547
547
|
}, Br));
|
|
548
548
|
}
|
|
549
|
-
return
|
|
549
|
+
return u(() => [
|
|
550
550
|
e.isActive(),
|
|
551
551
|
e.getRecipient?.(),
|
|
552
552
|
e.getLocale?.()
|
|
553
553
|
], ([e, , t], o) => {
|
|
554
|
-
o && t !== o[2] && (
|
|
554
|
+
o && t !== o[2] && (s(), a++, n.value = null, r.value = !1, i.value = !1), e ? l() : (s(), a++, r.value = !1, n.value = null, i.value = !1);
|
|
555
555
|
}, {
|
|
556
556
|
immediate: !0,
|
|
557
557
|
flush: "sync"
|
|
558
|
-
}),
|
|
559
|
-
|
|
558
|
+
}), v(() => {
|
|
559
|
+
s(), a++;
|
|
560
560
|
}), {
|
|
561
561
|
isConfigured: t,
|
|
562
|
-
content:
|
|
562
|
+
content: I(() => n.value ?? e.getContent()),
|
|
563
563
|
isResolving: r,
|
|
564
|
-
isInitialResolve:
|
|
564
|
+
isInitialResolve: I(() => r.value && n.value === null),
|
|
565
565
|
hasFailed: i,
|
|
566
|
-
supersedesSamples:
|
|
566
|
+
supersedesSamples: I(() => t)
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
569
|
// src/composables/useMergeTagPicker.ts
|
|
570
570
|
function Hr() {
|
|
571
|
-
let e =
|
|
571
|
+
let e = V(!1), t = V([]), n = V(null), r = null;
|
|
572
572
|
function i(i, a) {
|
|
573
573
|
if (r) {
|
|
574
574
|
let e = r;
|
|
@@ -582,7 +582,7 @@ function Hr() {
|
|
|
582
582
|
let a = r;
|
|
583
583
|
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
584
584
|
}
|
|
585
|
-
return
|
|
585
|
+
return C() && v(() => {
|
|
586
586
|
if (r) {
|
|
587
587
|
let e = r;
|
|
588
588
|
r = null, e(null);
|
|
@@ -598,7 +598,7 @@ function Hr() {
|
|
|
598
598
|
}
|
|
599
599
|
// src/composables/useLogicTagPicker.ts
|
|
600
600
|
function Ur() {
|
|
601
|
-
let e =
|
|
601
|
+
let e = V(!1), t = V([]), n = V([]), r = null;
|
|
602
602
|
function i(i, a) {
|
|
603
603
|
if (r) {
|
|
604
604
|
let e = r;
|
|
@@ -612,7 +612,7 @@ function Ur() {
|
|
|
612
612
|
let a = r;
|
|
613
613
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
614
614
|
}
|
|
615
|
-
return
|
|
615
|
+
return C() && v(() => {
|
|
616
616
|
if (r) {
|
|
617
617
|
let e = r;
|
|
618
618
|
r = null, e(null);
|
|
@@ -632,31 +632,31 @@ function Wr(e) {
|
|
|
632
632
|
}
|
|
633
633
|
var Gr = !1;
|
|
634
634
|
function Kr(e) {
|
|
635
|
-
let t =
|
|
635
|
+
let t = V([]), n = V(0), r = V(-1), i = u(e.content, () => {
|
|
636
636
|
n.value++;
|
|
637
|
-
}, { deep: !0 }), a =
|
|
638
|
-
|
|
637
|
+
}, { deep: !0 }), a = V(!1), o = V(!1), s = R(null), c = Wr(e.options), l = null, d = !1;
|
|
638
|
+
c || f();
|
|
639
639
|
async function f() {
|
|
640
640
|
try {
|
|
641
641
|
let t = await import("./src-C9JWWxAk.js");
|
|
642
642
|
if (d) return;
|
|
643
|
-
|
|
643
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l = ae(n, p, { debounce: e.debounce ?? 500 });
|
|
644
644
|
} catch {
|
|
645
645
|
if (d) return;
|
|
646
|
-
|
|
646
|
+
o.value = !0, Gr || (Gr = !0, $.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
function p() {
|
|
650
|
-
if (!
|
|
651
|
-
let i =
|
|
650
|
+
if (!s.value) return;
|
|
651
|
+
let i = s.value.lintTemplate(e.content.value, {
|
|
652
652
|
...e.options,
|
|
653
653
|
...e.customBlocks === void 0 ? {} : { customBlocks: e.customBlocks },
|
|
654
654
|
...e.mergeTagSyntax === void 0 ? {} : { mergeTagSyntax: e.mergeTagSyntax }
|
|
655
655
|
});
|
|
656
656
|
r.value = n.value, t.value = i;
|
|
657
657
|
}
|
|
658
|
-
let m =
|
|
659
|
-
|
|
658
|
+
let m = u(() => e.options, () => {
|
|
659
|
+
s.value && p();
|
|
660
660
|
}, { deep: !0 });
|
|
661
661
|
function h(t) {
|
|
662
662
|
t.fix && t.fix.apply({
|
|
@@ -669,21 +669,21 @@ function Kr(e) {
|
|
|
669
669
|
});
|
|
670
670
|
}
|
|
671
671
|
function g() {
|
|
672
|
-
d = !0,
|
|
672
|
+
d = !0, l?.(), i(), m();
|
|
673
673
|
}
|
|
674
674
|
return {
|
|
675
675
|
issues: t,
|
|
676
676
|
contentVersion: n,
|
|
677
677
|
lintVersion: r,
|
|
678
678
|
ready: a,
|
|
679
|
-
unavailable:
|
|
679
|
+
unavailable: o,
|
|
680
680
|
applyFix: h,
|
|
681
681
|
destroy: g
|
|
682
682
|
};
|
|
683
683
|
}
|
|
684
684
|
// src/composables/useKeyboardReorder.ts
|
|
685
685
|
function qr(e, t, n = []) {
|
|
686
|
-
let r =
|
|
686
|
+
let r = V(null), i = V(""), a = null;
|
|
687
687
|
function o(t) {
|
|
688
688
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
689
689
|
if (r !== -1) return {
|
|
@@ -709,7 +709,7 @@ function qr(e, t, n = []) {
|
|
|
709
709
|
let i = o(r);
|
|
710
710
|
if (!i) return "";
|
|
711
711
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
712
|
-
return a ?
|
|
712
|
+
return a ? zn(a, t.t, n) : "";
|
|
713
713
|
}
|
|
714
714
|
function c(t, n) {
|
|
715
715
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -778,12 +778,12 @@ function qr(e, t, n = []) {
|
|
|
778
778
|
}
|
|
779
779
|
// src/composables/useUiTheme.ts
|
|
780
780
|
function Jr(e) {
|
|
781
|
-
let
|
|
782
|
-
return { resolvedTheme:
|
|
781
|
+
let n = t("(prefers-color-scheme: dark)");
|
|
782
|
+
return { resolvedTheme: I(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
|
|
783
783
|
}
|
|
784
784
|
// src/composables/useCustomBlockStylesheets.ts
|
|
785
785
|
function Yr(e, t) {
|
|
786
|
-
return
|
|
786
|
+
return I(() => {
|
|
787
787
|
let n = Xr(e.value.blocks);
|
|
788
788
|
if (n.size === 0) return [];
|
|
789
789
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
@@ -801,66 +801,66 @@ function Xr(e) {
|
|
|
801
801
|
return Zr(e, t), t;
|
|
802
802
|
}
|
|
803
803
|
function Zr(e, t) {
|
|
804
|
-
for (let n of e) if (
|
|
804
|
+
for (let n of e) if (ot(n)) t.add(n.customType);
|
|
805
805
|
else if (n.type === "section") {
|
|
806
806
|
let e = n.children;
|
|
807
807
|
if (!e) continue;
|
|
808
808
|
for (let n of e) Zr(n, t);
|
|
809
|
-
} else
|
|
809
|
+
} else He(n) && Zr(n.children, t);
|
|
810
810
|
}
|
|
811
811
|
// src/utils/registerBuiltInBlocks.ts
|
|
812
812
|
var Qr = [
|
|
813
813
|
{
|
|
814
814
|
type: "section",
|
|
815
|
-
createBlock:
|
|
815
|
+
createBlock: he
|
|
816
816
|
},
|
|
817
817
|
{
|
|
818
818
|
type: "title",
|
|
819
|
-
createBlock:
|
|
819
|
+
createBlock: Q
|
|
820
820
|
},
|
|
821
821
|
{
|
|
822
822
|
type: "paragraph",
|
|
823
|
-
createBlock:
|
|
823
|
+
createBlock: X
|
|
824
824
|
},
|
|
825
825
|
{
|
|
826
826
|
type: "image",
|
|
827
|
-
createBlock:
|
|
827
|
+
createBlock: Se
|
|
828
828
|
},
|
|
829
829
|
{
|
|
830
830
|
type: "button",
|
|
831
|
-
createBlock:
|
|
831
|
+
createBlock: Ae
|
|
832
832
|
},
|
|
833
833
|
{
|
|
834
834
|
type: "divider",
|
|
835
|
-
createBlock:
|
|
835
|
+
createBlock: J
|
|
836
836
|
},
|
|
837
837
|
{
|
|
838
838
|
type: "video",
|
|
839
|
-
createBlock:
|
|
839
|
+
createBlock: ge
|
|
840
840
|
},
|
|
841
841
|
{
|
|
842
842
|
type: "social",
|
|
843
|
-
createBlock:
|
|
843
|
+
createBlock: se
|
|
844
844
|
},
|
|
845
845
|
{
|
|
846
846
|
type: "menu",
|
|
847
|
-
createBlock:
|
|
847
|
+
createBlock: ce
|
|
848
848
|
},
|
|
849
849
|
{
|
|
850
850
|
type: "table",
|
|
851
|
-
createBlock:
|
|
851
|
+
createBlock: me
|
|
852
852
|
},
|
|
853
853
|
{
|
|
854
854
|
type: "spacer",
|
|
855
|
-
createBlock:
|
|
855
|
+
createBlock: Ve
|
|
856
856
|
},
|
|
857
857
|
{
|
|
858
858
|
type: "html",
|
|
859
|
-
createBlock:
|
|
859
|
+
createBlock: st
|
|
860
860
|
},
|
|
861
861
|
{
|
|
862
862
|
type: "countdown",
|
|
863
|
-
createBlock:
|
|
863
|
+
createBlock: ct
|
|
864
864
|
}
|
|
865
865
|
];
|
|
866
866
|
function $r(e, t) {
|
|
@@ -881,10 +881,10 @@ function ti(e) {
|
|
|
881
881
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
882
882
|
}
|
|
883
883
|
function ni(e, t, n) {
|
|
884
|
-
let r = new Set(e.map((e) =>
|
|
885
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
884
|
+
let r = new Set(e.map((e) => ft(e))), i = [], a = (e, t) => {
|
|
885
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(ft(o)) && i.push(`${t}.${n}: ${o}`) : ti(o) && a(o, `${t}.${n}`);
|
|
886
886
|
}, o = t;
|
|
887
|
-
for (let [e, t] of Object.entries(
|
|
887
|
+
for (let [e, t] of Object.entries(Ye)) {
|
|
888
888
|
let n = o?.[e];
|
|
889
889
|
a({
|
|
890
890
|
...t,
|
|
@@ -892,7 +892,7 @@ function ni(e, t, n) {
|
|
|
892
892
|
}, e);
|
|
893
893
|
}
|
|
894
894
|
return a({
|
|
895
|
-
...
|
|
895
|
+
...Ge,
|
|
896
896
|
...n ?? {}
|
|
897
897
|
}, "template"), i;
|
|
898
898
|
}
|
|
@@ -1049,7 +1049,7 @@ function Ci(e) {
|
|
|
1049
1049
|
// src/utils/collectColorFieldIssues.ts
|
|
1050
1050
|
function wi(e, t) {
|
|
1051
1051
|
let n = [], r = (r, i) => {
|
|
1052
|
-
let a =
|
|
1052
|
+
let a = In(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1053
1053
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1054
1054
|
id: s("invalid-presets"),
|
|
1055
1055
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -1060,8 +1060,8 @@ function wi(e, t) {
|
|
|
1060
1060
|
id: s("allow-custom-ignored"),
|
|
1061
1061
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1062
1062
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1063
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1064
|
-
e !== "" && !t.has(
|
|
1063
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => ft(e)));
|
|
1064
|
+
e !== "" && !t.has(ft(e)) && n.push({
|
|
1065
1065
|
id: s("off-palette-default"),
|
|
1066
1066
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1067
1067
|
});
|
|
@@ -1120,9 +1120,9 @@ function Oi(e, t, n) {
|
|
|
1120
1120
|
var ki = "--tpl-block-bg-layer", Ai = "--tpl-email-frame-width", ji = "tpl-has-bg-image";
|
|
1121
1121
|
function Mi(e, t) {
|
|
1122
1122
|
if (t === null) return {};
|
|
1123
|
-
let n =
|
|
1123
|
+
let n = Le(e);
|
|
1124
1124
|
if (n === null) return {};
|
|
1125
|
-
let r = t?.trim(), i = r ?
|
|
1125
|
+
let r = t?.trim(), i = r ? We(r) : n.url;
|
|
1126
1126
|
return {
|
|
1127
1127
|
backgroundImage: `url("${i}")`,
|
|
1128
1128
|
backgroundSize: n.size,
|
|
@@ -1158,10 +1158,10 @@ function Li(e, t = {}) {
|
|
|
1158
1158
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1159
1159
|
backgroundColor: r || "transparent"
|
|
1160
1160
|
};
|
|
1161
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1162
|
-
let n =
|
|
1161
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? dt.paragraphGap : dt.paragraphGap}px`), e.type === "section") {
|
|
1162
|
+
let n = Y(e.borderRadius);
|
|
1163
1163
|
n !== null && (i.borderRadius = n);
|
|
1164
|
-
let r =
|
|
1164
|
+
let r = it(e);
|
|
1165
1165
|
r?.applied && e.backgroundImage ? (Object.assign(i, Fi(r, t.heroBoxWidth)), Object.assign(i, Mi({
|
|
1166
1166
|
...e.backgroundImage,
|
|
1167
1167
|
size: "cover",
|
|
@@ -1172,13 +1172,13 @@ function Li(e, t = {}) {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
function Ri(e, t, n, r) {
|
|
1174
1174
|
return e.type === "section" ? Li(e, {
|
|
1175
|
-
backgroundImageUrl:
|
|
1175
|
+
backgroundImageUrl: Sn(t, e.backgroundImage, n),
|
|
1176
1176
|
heroBoxWidth: r
|
|
1177
1177
|
}) : Li(e);
|
|
1178
1178
|
}
|
|
1179
1179
|
function zi(e) {
|
|
1180
1180
|
let t = {};
|
|
1181
|
-
for (let [n, r] of Object.entries(
|
|
1181
|
+
for (let [n, r] of Object.entries(xe(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1182
1182
|
return t;
|
|
1183
1183
|
}
|
|
1184
1184
|
var Bi = {
|
|
@@ -1203,7 +1203,7 @@ function Ui(e, t = {}) {
|
|
|
1203
1203
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1204
1204
|
let n = e.wrapper, r = {};
|
|
1205
1205
|
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = Vi(n.padding)), !n.fullWidth) {
|
|
1206
|
-
let e =
|
|
1206
|
+
let e = Y(n.borderRadius);
|
|
1207
1207
|
e !== null && (r.borderRadius = e);
|
|
1208
1208
|
}
|
|
1209
1209
|
return Object.assign(r, Mi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, Bi), r;
|
|
@@ -1217,24 +1217,24 @@ function Wi(e, t = {}) {
|
|
|
1217
1217
|
function Gi(e, t, n, r = !1) {
|
|
1218
1218
|
if (!e) return [];
|
|
1219
1219
|
let i = [], a = 0;
|
|
1220
|
-
for (let o of
|
|
1220
|
+
for (let o of Ke(e, n)) {
|
|
1221
1221
|
o.index > a && i.push({
|
|
1222
1222
|
type: "text",
|
|
1223
1223
|
value: e.slice(a, o.index)
|
|
1224
1224
|
});
|
|
1225
1225
|
let s = o.value;
|
|
1226
|
-
if (
|
|
1227
|
-
let e = r ?
|
|
1226
|
+
if (_e(s, n)) {
|
|
1227
|
+
let e = r ? Xe(s, t) : void 0;
|
|
1228
1228
|
i.push(e === void 0 ? {
|
|
1229
1229
|
type: "tag",
|
|
1230
|
-
value:
|
|
1230
|
+
value: Z(s, t)
|
|
1231
1231
|
} : {
|
|
1232
1232
|
type: "text",
|
|
1233
1233
|
value: e
|
|
1234
1234
|
});
|
|
1235
|
-
} else
|
|
1235
|
+
} else Ee(s, n) ? i.push({
|
|
1236
1236
|
type: "tag",
|
|
1237
|
-
value:
|
|
1237
|
+
value: le(s, n)
|
|
1238
1238
|
}) : i.push({
|
|
1239
1239
|
type: "text",
|
|
1240
1240
|
value: s
|
|
@@ -1247,31 +1247,31 @@ function Gi(e, t, n, r = !1) {
|
|
|
1247
1247
|
}), i;
|
|
1248
1248
|
}
|
|
1249
1249
|
// src/components/MergeTagPreviewText.vue
|
|
1250
|
-
var Ki =
|
|
1250
|
+
var Ki = o({
|
|
1251
1251
|
name: "MergeTagPreviewText",
|
|
1252
1252
|
props: { text: {
|
|
1253
1253
|
type: String,
|
|
1254
1254
|
required: !0
|
|
1255
1255
|
} },
|
|
1256
1256
|
setup(e) {
|
|
1257
|
-
let t =
|
|
1258
|
-
return () =>
|
|
1257
|
+
let t = g(Pt, zt), n = g(xt, ue.liquid), r = g(on, null), i = I(() => Gi(e.text, t.value, n, r?.value ?? !1));
|
|
1258
|
+
return () => i.value.map((e, t) => e.type === "tag" ? s("span", {
|
|
1259
1259
|
key: t,
|
|
1260
1260
|
class: "tpl-merge-tag-label"
|
|
1261
1261
|
}, e.value) : e.value);
|
|
1262
1262
|
}
|
|
1263
|
-
}), qi = ["href"], Ji = /* @__PURE__ */
|
|
1263
|
+
}), qi = ["href"], Ji = /* @__PURE__ */ o({
|
|
1264
1264
|
__name: "ButtonBlock",
|
|
1265
1265
|
props: {
|
|
1266
1266
|
block: {},
|
|
1267
1267
|
viewport: {}
|
|
1268
1268
|
},
|
|
1269
1269
|
setup(e) {
|
|
1270
|
-
let t = e, n =
|
|
1270
|
+
let t = e, n = fn(Kt, "ButtonBlock");
|
|
1271
1271
|
function r(e) {
|
|
1272
1272
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1273
1273
|
}
|
|
1274
|
-
let
|
|
1274
|
+
let i = I(() => {
|
|
1275
1275
|
let e = {
|
|
1276
1276
|
display: "inline-block",
|
|
1277
1277
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -1280,46 +1280,46 @@ var Ki = n({
|
|
|
1280
1280
|
fontSize: `${t.block.fontSize}px`,
|
|
1281
1281
|
fontWeight: r(t.block.fontWeight),
|
|
1282
1282
|
textDecoration: "none",
|
|
1283
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1283
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : Y(t.block.borderRadius) ?? "0px",
|
|
1284
1284
|
textAlign: "center"
|
|
1285
1285
|
};
|
|
1286
1286
|
return Object.assign(e, zi(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1287
|
-
}),
|
|
1288
|
-
return (t, n) => (
|
|
1287
|
+
}), a = I(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1288
|
+
return (t, n) => (c(), w("div", { style: L(a.value) }, [N("a", {
|
|
1289
1289
|
href: e.block.url || "#",
|
|
1290
|
-
style:
|
|
1290
|
+
style: L(i.value),
|
|
1291
1291
|
class: "tpl:cursor-default",
|
|
1292
|
-
onClick: n[0] ||=
|
|
1293
|
-
}, [
|
|
1292
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
1293
|
+
}, [U(Ki, { text: e.block.text }, null, 8, ["text"])], 12, qi)], 4));
|
|
1294
1294
|
}
|
|
1295
1295
|
}), Yi = ["innerHTML"], Xi = [
|
|
1296
1296
|
"src",
|
|
1297
1297
|
"width",
|
|
1298
1298
|
"height"
|
|
1299
|
-
], Zi = /* @__PURE__ */
|
|
1299
|
+
], Zi = /* @__PURE__ */ o({
|
|
1300
1300
|
__name: "CustomBlockIcon",
|
|
1301
1301
|
props: {
|
|
1302
1302
|
icon: {},
|
|
1303
1303
|
size: {}
|
|
1304
1304
|
},
|
|
1305
1305
|
setup(e) {
|
|
1306
|
-
let t = e, n =
|
|
1307
|
-
return (t,
|
|
1306
|
+
let t = e, n = I(() => t.size ?? 20), r = I(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = I(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = I(() => r.value ? Un(t.icon ?? "") : "");
|
|
1307
|
+
return (t, o) => r.value ? (c(), w("span", {
|
|
1308
1308
|
key: 0,
|
|
1309
1309
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
1310
|
-
style:
|
|
1310
|
+
style: L({
|
|
1311
1311
|
width: `${n.value}px`,
|
|
1312
1312
|
height: `${n.value}px`
|
|
1313
1313
|
}),
|
|
1314
|
-
innerHTML:
|
|
1315
|
-
}, null, 12, Yi)) :
|
|
1314
|
+
innerHTML: a.value
|
|
1315
|
+
}, null, 12, Yi)) : i.value ? (c(), w("img", {
|
|
1316
1316
|
key: 1,
|
|
1317
1317
|
src: e.icon,
|
|
1318
1318
|
width: n.value,
|
|
1319
1319
|
height: n.value,
|
|
1320
1320
|
class: "tpl:inline-block",
|
|
1321
1321
|
alt: ""
|
|
1322
|
-
}, null, 8, Xi)) : (
|
|
1322
|
+
}, null, 8, Xi)) : (c(), A(D(Zn), {
|
|
1323
1323
|
key: 2,
|
|
1324
1324
|
size: n.value,
|
|
1325
1325
|
"stroke-width": 1.5
|
|
@@ -1338,7 +1338,7 @@ var Ki = n({
|
|
|
1338
1338
|
key: 0,
|
|
1339
1339
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1340
1340
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1341
|
-
}, oa = /* @__PURE__ */
|
|
1341
|
+
}, oa = /* @__PURE__ */ o({
|
|
1342
1342
|
__name: "CustomBlock",
|
|
1343
1343
|
props: {
|
|
1344
1344
|
block: {},
|
|
@@ -1346,77 +1346,77 @@ var Ki = n({
|
|
|
1346
1346
|
},
|
|
1347
1347
|
emits: ["fetchData"],
|
|
1348
1348
|
setup(e, { emit: t }) {
|
|
1349
|
-
let n = e, r = t, { t:
|
|
1350
|
-
definition:
|
|
1351
|
-
block:
|
|
1349
|
+
let n = e, r = t, { t: i } = W(), a = g(nn, null), o = V(""), s = I(() => Wn(o.value)), l = V(!1), d = I(() => a?.getDefinition(n.block.customType)), f = I(() => !!d.value), p = I(() => n.block), { isFetching: m, fetch: _, needsFetch: v, hasDataSource: y } = Cn({
|
|
1350
|
+
definition: d,
|
|
1351
|
+
block: p,
|
|
1352
1352
|
onUpdate: (e, t) => {
|
|
1353
1353
|
r("fetchData", {
|
|
1354
1354
|
fieldValues: e,
|
|
1355
1355
|
dataSourceFetched: t
|
|
1356
1356
|
});
|
|
1357
1357
|
}
|
|
1358
|
-
}),
|
|
1359
|
-
if (!
|
|
1358
|
+
}), b = g(Pt, zt), x = g(on, null), S = I(() => {
|
|
1359
|
+
if (!x?.value) return n.block;
|
|
1360
1360
|
let e = {};
|
|
1361
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1361
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? ke(r, b.value) : r;
|
|
1362
1362
|
return {
|
|
1363
1363
|
...n.block,
|
|
1364
1364
|
fieldValues: e
|
|
1365
1365
|
};
|
|
1366
1366
|
});
|
|
1367
|
-
async function
|
|
1368
|
-
if (
|
|
1369
|
-
|
|
1367
|
+
async function C() {
|
|
1368
|
+
if (a) {
|
|
1369
|
+
l.value = !1;
|
|
1370
1370
|
try {
|
|
1371
|
-
let e = await
|
|
1372
|
-
e.includes("Template render error:") && (
|
|
1371
|
+
let e = await a.renderCustomBlock(S.value);
|
|
1372
|
+
e.includes("Template render error:") && (l.value = !0), o.value = e;
|
|
1373
1373
|
} catch {
|
|
1374
|
-
|
|
1374
|
+
l.value = !0, o.value = "";
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
1378
|
-
let
|
|
1379
|
-
return
|
|
1380
|
-
|
|
1381
|
-
}),
|
|
1382
|
-
|
|
1383
|
-
}, { deep: !0 }),
|
|
1384
|
-
|
|
1385
|
-
}), (e, t) => (
|
|
1378
|
+
let E = K(C, 150);
|
|
1379
|
+
return h(() => {
|
|
1380
|
+
C();
|
|
1381
|
+
}), u(() => n.block.fieldValues, () => {
|
|
1382
|
+
E();
|
|
1383
|
+
}, { deep: !0 }), u(() => x?.value, () => {
|
|
1384
|
+
E();
|
|
1385
|
+
}), (e, t) => (c(), w("div", Qi, [f.value ? l.value ? (c(), w("div", ta, [U(D(nr), {
|
|
1386
1386
|
size: 24,
|
|
1387
1387
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1388
|
-
}),
|
|
1388
|
+
}), N("span", na, P(D(i).customBlocks.renderError), 1)])) : (c(), w("div", ra, [N("div", { innerHTML: s.value }, null, 8, ia), D(y) && D(v) ? (c(), w("div", aa, [D(m) ? (c(), A(ur, {
|
|
1389
1389
|
key: 1,
|
|
1390
1390
|
class: "tpl:w-48"
|
|
1391
|
-
})) : (
|
|
1391
|
+
})) : (c(), w("button", {
|
|
1392
1392
|
key: 0,
|
|
1393
1393
|
type: "button",
|
|
1394
1394
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1395
|
-
onClick: t[0] ||=
|
|
1396
|
-
}, [
|
|
1395
|
+
onClick: t[0] ||= M((...e) => D(_) && D(_)(...e), ["stop"])
|
|
1396
|
+
}, [d.value?.icon ? (c(), A(Zi, {
|
|
1397
1397
|
key: 0,
|
|
1398
|
-
icon:
|
|
1398
|
+
icon: d.value.icon,
|
|
1399
1399
|
size: 16
|
|
1400
|
-
}, null, 8, ["icon"])) :
|
|
1400
|
+
}, null, 8, ["icon"])) : k("", !0), T(" " + P(d.value?.dataSource?.label || D(i).customBlocks.dataSource.fetchButton), 1)]))])) : k("", !0)])) : (c(), w("div", $i, [U(D(Qn), {
|
|
1401
1401
|
size: 24,
|
|
1402
1402
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1403
|
-
}),
|
|
1403
|
+
}), N("span", ea, P(D(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1404
1404
|
}
|
|
1405
|
-
}), sa = { class: "tpl:w-full" }, ca = /* @__PURE__ */
|
|
1405
|
+
}), sa = { class: "tpl:w-full" }, ca = /* @__PURE__ */ o({
|
|
1406
1406
|
__name: "DividerBlock",
|
|
1407
1407
|
props: {
|
|
1408
1408
|
block: {},
|
|
1409
1409
|
viewport: {}
|
|
1410
1410
|
},
|
|
1411
1411
|
setup(e) {
|
|
1412
|
-
let t = e, n =
|
|
1412
|
+
let t = e, n = I(() => ({
|
|
1413
1413
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1414
1414
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1415
1415
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1416
1416
|
}));
|
|
1417
|
-
return (e, t) => (
|
|
1417
|
+
return (e, t) => (c(), w("div", sa, [N("hr", {
|
|
1418
1418
|
class: "tpl:m-0 tpl:border-none",
|
|
1419
|
-
style:
|
|
1419
|
+
style: L(n.value)
|
|
1420
1420
|
}, null, 4)]));
|
|
1421
1421
|
}
|
|
1422
1422
|
}), la = { class: "tpl:w-full" }, ua = ["srcdoc", "title"], da = {
|
|
@@ -1428,41 +1428,41 @@ var Ki = n({
|
|
|
1428
1428
|
}, pa = {
|
|
1429
1429
|
key: 1,
|
|
1430
1430
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1431
|
-
}, ma = /* @__PURE__ */
|
|
1431
|
+
}, ma = /* @__PURE__ */ o({
|
|
1432
1432
|
__name: "HtmlBlock",
|
|
1433
1433
|
props: {
|
|
1434
1434
|
block: {},
|
|
1435
1435
|
viewport: {}
|
|
1436
1436
|
},
|
|
1437
1437
|
setup(e) {
|
|
1438
|
-
let t = e, { t: n } =
|
|
1439
|
-
function
|
|
1440
|
-
let e =
|
|
1441
|
-
e && (
|
|
1438
|
+
let t = e, { t: n } = W(), r = g(It, !1), i = I(() => t.block.content.trim().length > 0), a = I(() => r && i.value), o = g(Pt, zt), s = g(on, null), l = I(() => s?.value ? ke(t.block.content, o.value) : t.block.content), d = V(null), f = V(60), p = null;
|
|
1439
|
+
function h() {
|
|
1440
|
+
let e = d.value?.contentDocument;
|
|
1441
|
+
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
1442
1442
|
}
|
|
1443
1443
|
function _() {
|
|
1444
|
-
|
|
1445
|
-
let e =
|
|
1446
|
-
e && typeof ResizeObserver < "u" && (
|
|
1447
|
-
}
|
|
1448
|
-
return
|
|
1449
|
-
e || (
|
|
1450
|
-
}),
|
|
1451
|
-
|
|
1452
|
-
}), (e, t) => (
|
|
1444
|
+
p?.disconnect(), p = null, h();
|
|
1445
|
+
let e = d.value?.contentDocument?.documentElement;
|
|
1446
|
+
e && typeof ResizeObserver < "u" && (p = new ResizeObserver(() => h()), p.observe(e));
|
|
1447
|
+
}
|
|
1448
|
+
return u(a, (e) => {
|
|
1449
|
+
e || (p?.disconnect(), p = null);
|
|
1450
|
+
}), m(() => {
|
|
1451
|
+
p?.disconnect(), p = null;
|
|
1452
|
+
}), (e, t) => (c(), w("div", la, [a.value ? (c(), w("iframe", {
|
|
1453
1453
|
key: 0,
|
|
1454
1454
|
ref_key: "iframeRef",
|
|
1455
|
-
ref:
|
|
1456
|
-
srcdoc:
|
|
1455
|
+
ref: d,
|
|
1456
|
+
srcdoc: l.value,
|
|
1457
1457
|
sandbox: "allow-same-origin",
|
|
1458
|
-
title:
|
|
1458
|
+
title: D(n).html.preview,
|
|
1459
1459
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1460
|
-
style:
|
|
1460
|
+
style: L({ height: `${f.value}px` }),
|
|
1461
1461
|
onLoad: _
|
|
1462
|
-
}, null, 44, ua)) : (
|
|
1462
|
+
}, null, 44, ua)) : (c(), w("div", da, [U(D(qn), {
|
|
1463
1463
|
size: 24,
|
|
1464
1464
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1465
|
-
}),
|
|
1465
|
+
}), i.value ? (c(), w("span", fa, P(D(n).html.preview), 1)) : (c(), w("span", pa, P(D(n).html.empty), 1))]))]));
|
|
1466
1466
|
}
|
|
1467
1467
|
}), ha = ["data-drop-enabled"], ga = ["href"], _a = ["src", "alt"], va = ["src", "alt"], ya = {
|
|
1468
1468
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
@@ -1470,7 +1470,7 @@ var Ki = n({
|
|
|
1470
1470
|
}, ba = ["href"], xa = ["src", "alt"], Sa = ["src", "alt"], Ca = {
|
|
1471
1471
|
key: 4,
|
|
1472
1472
|
class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1473
|
-
}, wa = ["aria-label"], Ta = { key: 1 }, Ea = /* @__PURE__ */
|
|
1473
|
+
}, wa = ["aria-label"], Ta = { key: 1 }, Ea = /* @__PURE__ */ o({
|
|
1474
1474
|
__name: "ImageBlock",
|
|
1475
1475
|
props: {
|
|
1476
1476
|
block: {},
|
|
@@ -1478,111 +1478,111 @@ var Ki = n({
|
|
|
1478
1478
|
},
|
|
1479
1479
|
emits: ["update"],
|
|
1480
1480
|
setup(e, { emit: t }) {
|
|
1481
|
-
let n = e, r = t, { t:
|
|
1482
|
-
function
|
|
1481
|
+
let n = e, r = t, { t: i } = W(), { syntax: a } = G(), o = I(() => Ce(n.block.src, a));
|
|
1482
|
+
function s(e) {
|
|
1483
1483
|
let t = {
|
|
1484
1484
|
src: e.url,
|
|
1485
|
-
...
|
|
1485
|
+
...jn(On(e.width, e.height))
|
|
1486
1486
|
};
|
|
1487
1487
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1488
1488
|
}
|
|
1489
|
-
let l =
|
|
1489
|
+
let l = V(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } = Fn({
|
|
1490
1490
|
target: l,
|
|
1491
|
-
blocked:
|
|
1492
|
-
apply:
|
|
1493
|
-
}), h =
|
|
1494
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1491
|
+
blocked: o,
|
|
1492
|
+
apply: s
|
|
1493
|
+
}), h = I(() => ({ textAlign: n.block.align })), g = I(() => {
|
|
1494
|
+
let e = n.block.border, t = ["left", "right"].map((t) => lt(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1495
1495
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1496
|
-
}), _ =
|
|
1496
|
+
}), _ = I(() => {
|
|
1497
1497
|
let e = n.block.align;
|
|
1498
1498
|
return {
|
|
1499
1499
|
maxWidth: "100%",
|
|
1500
1500
|
width: n.block.width === "full" ? g.value : `${n.block.width}px`,
|
|
1501
1501
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1502
|
-
borderRadius:
|
|
1502
|
+
borderRadius: Y(n.block.borderRadius) ?? void 0,
|
|
1503
1503
|
...zi(n.block.border),
|
|
1504
1504
|
display: "block",
|
|
1505
1505
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1506
1506
|
marginRight: e === "center" ? "auto" : void 0
|
|
1507
1507
|
};
|
|
1508
|
-
}), v =
|
|
1509
|
-
return (t, n) => (
|
|
1508
|
+
}), v = Dn(() => o.value ? void 0 : n.block.src), y = Dn(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1509
|
+
return (t, n) => (c(), w("div", {
|
|
1510
1510
|
ref_key: "dropZoneRef",
|
|
1511
1511
|
ref: l,
|
|
1512
1512
|
"data-testid": "image-drop-zone",
|
|
1513
|
-
"data-drop-enabled":
|
|
1513
|
+
"data-drop-enabled": D(d),
|
|
1514
1514
|
class: "tpl:relative tpl:w-full",
|
|
1515
|
-
style:
|
|
1516
|
-
}, [
|
|
1515
|
+
style: L(h.value)
|
|
1516
|
+
}, [D(p) ? (c(), A(An, {
|
|
1517
1517
|
key: 0,
|
|
1518
|
-
uploading:
|
|
1518
|
+
uploading: D(f),
|
|
1519
1519
|
size: "canvas"
|
|
1520
|
-
}, null, 8, ["uploading"])) :
|
|
1520
|
+
}, null, 8, ["uploading"])) : k("", !0), e.block.src && o.value && e.block.placeholderUrl ? (c(), w(H, { key: 1 }, [e.block.linkUrl ? (c(), w("a", {
|
|
1521
1521
|
key: 0,
|
|
1522
1522
|
href: e.block.linkUrl,
|
|
1523
1523
|
target: "_blank",
|
|
1524
1524
|
rel: "noopener noreferrer",
|
|
1525
|
-
onClick: n[0] ||=
|
|
1526
|
-
}, [
|
|
1525
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
1526
|
+
}, [N("img", {
|
|
1527
1527
|
class: "tpl:border-0",
|
|
1528
1528
|
loading: "lazy",
|
|
1529
|
-
src:
|
|
1530
|
-
alt: e.block.alt ||
|
|
1531
|
-
style:
|
|
1532
|
-
}, null, 12, _a)], 8, ga)) : (
|
|
1529
|
+
src: D(y),
|
|
1530
|
+
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1531
|
+
style: L(_.value)
|
|
1532
|
+
}, null, 12, _a)], 8, ga)) : (c(), w("img", {
|
|
1533
1533
|
key: 1,
|
|
1534
1534
|
class: "tpl:border-0",
|
|
1535
|
-
src:
|
|
1535
|
+
src: D(y),
|
|
1536
1536
|
alt: e.block.alt,
|
|
1537
|
-
style:
|
|
1538
|
-
}, null, 12, va))], 64)) : e.block.src &&
|
|
1537
|
+
style: L(_.value)
|
|
1538
|
+
}, null, 12, va))], 64)) : e.block.src && o.value ? (c(), w("div", {
|
|
1539
1539
|
key: 2,
|
|
1540
1540
|
class: "tpl:!flex tpl:box-border tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1541
|
-
style:
|
|
1542
|
-
}, [
|
|
1541
|
+
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
|
|
1542
|
+
}, [U(D(tr), {
|
|
1543
1543
|
size: 32,
|
|
1544
1544
|
"stroke-width": 1.5,
|
|
1545
1545
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1546
1546
|
style: { opacity: "0.5" }
|
|
1547
|
-
}),
|
|
1547
|
+
}), N("span", ya, [U(Ki, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (c(), w(H, { key: 3 }, [e.block.linkUrl ? (c(), w("a", {
|
|
1548
1548
|
key: 0,
|
|
1549
1549
|
href: e.block.linkUrl,
|
|
1550
1550
|
target: "_blank",
|
|
1551
1551
|
rel: "noopener noreferrer",
|
|
1552
|
-
onClick: n[1] ||=
|
|
1553
|
-
}, [
|
|
1552
|
+
onClick: n[1] ||= M(() => {}, ["prevent"])
|
|
1553
|
+
}, [N("img", {
|
|
1554
1554
|
class: "tpl:border-0",
|
|
1555
1555
|
loading: "lazy",
|
|
1556
|
-
src:
|
|
1557
|
-
alt: e.block.alt ||
|
|
1558
|
-
style:
|
|
1559
|
-
}, null, 12, xa)], 8, ba)) : (
|
|
1556
|
+
src: D(v),
|
|
1557
|
+
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1558
|
+
style: L(_.value)
|
|
1559
|
+
}, null, 12, xa)], 8, ba)) : (c(), w("img", {
|
|
1560
1560
|
key: 1,
|
|
1561
1561
|
class: "tpl:border-0",
|
|
1562
|
-
src:
|
|
1562
|
+
src: D(v),
|
|
1563
1563
|
alt: e.block.alt,
|
|
1564
|
-
style:
|
|
1565
|
-
}, null, 12, Sa))], 64)) : (
|
|
1564
|
+
style: L(_.value)
|
|
1565
|
+
}, null, 12, Sa))], 64)) : (c(), w("div", Ca, [D(u) ? (c(), w("button", {
|
|
1566
1566
|
key: 0,
|
|
1567
|
-
"aria-label":
|
|
1567
|
+
"aria-label": D(i).image.browseMedia,
|
|
1568
1568
|
class: "tpl:flex tpl:items-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:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1569
|
-
onClick: n[2] ||=
|
|
1570
|
-
}, [
|
|
1569
|
+
onClick: n[2] ||= M((...e) => D(m) && D(m)(...e), ["stop"])
|
|
1570
|
+
}, [U(D(tr), {
|
|
1571
1571
|
size: 14,
|
|
1572
1572
|
"stroke-width": 1.5
|
|
1573
|
-
}),
|
|
1573
|
+
}), T(" " + P(D(i).image.browseMedia), 1)], 8, wa)) : (c(), w("span", Ta, P(D(i).image.clickToAdd), 1))]))], 12, ha));
|
|
1574
1574
|
}
|
|
1575
1575
|
}), Da = { class: "tpl:w-full" }, Oa = ["href"], ka = {
|
|
1576
1576
|
key: 1,
|
|
1577
1577
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
1578
|
-
}, Aa = /* @__PURE__ */
|
|
1578
|
+
}, Aa = /* @__PURE__ */ o({
|
|
1579
1579
|
__name: "MenuBlock",
|
|
1580
1580
|
props: {
|
|
1581
1581
|
block: {},
|
|
1582
1582
|
viewport: {}
|
|
1583
1583
|
},
|
|
1584
1584
|
setup(e) {
|
|
1585
|
-
let t = e, { t: n } =
|
|
1585
|
+
let t = e, { t: n } = W(), r = fn(Kt, "MenuBlock"), i = I(() => ({
|
|
1586
1586
|
display: "flex",
|
|
1587
1587
|
flexWrap: "wrap",
|
|
1588
1588
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1590,79 +1590,79 @@ var Ki = n({
|
|
|
1590
1590
|
fontSize: `${t.block.fontSize}px`,
|
|
1591
1591
|
fontFamily: t.block.fontFamily ? r.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1592
1592
|
alignItems: "center"
|
|
1593
|
-
})),
|
|
1594
|
-
function
|
|
1593
|
+
})), a = I(() => t.block.items.length > 0);
|
|
1594
|
+
function o(e) {
|
|
1595
1595
|
return e || t.block.linkColor || t.block.color;
|
|
1596
1596
|
}
|
|
1597
|
-
return (t, r) => (
|
|
1597
|
+
return (t, r) => (c(), w("div", Da, [a.value ? (c(), w("div", {
|
|
1598
1598
|
key: 0,
|
|
1599
|
-
style:
|
|
1600
|
-
}, [(
|
|
1599
|
+
style: L(i.value)
|
|
1600
|
+
}, [(c(!0), w(H, null, p(e.block.items, (t, n) => (c(), w(H, { key: t.id }, [N("a", {
|
|
1601
1601
|
href: t.url || "#",
|
|
1602
1602
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1603
|
-
style:
|
|
1604
|
-
color:
|
|
1603
|
+
style: L({
|
|
1604
|
+
color: o(t.color),
|
|
1605
1605
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1606
1606
|
textDecoration: t.underline ? "underline" : "none"
|
|
1607
1607
|
}),
|
|
1608
|
-
onClick: r[0] ||=
|
|
1609
|
-
}, [
|
|
1608
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1609
|
+
}, [U(Ki, { text: t.text || "..." }, null, 8, ["text"])], 12, Oa), n < e.block.items.length - 1 ? (c(), w("span", {
|
|
1610
1610
|
key: 0,
|
|
1611
|
-
style:
|
|
1611
|
+
style: L({
|
|
1612
1612
|
color: e.block.separatorColor,
|
|
1613
1613
|
padding: `0 ${e.block.spacing}px`
|
|
1614
1614
|
})
|
|
1615
|
-
},
|
|
1615
|
+
}, P(e.block.separator), 5)) : k("", !0)], 64))), 128))], 4)) : (c(), w("div", ka, [U(D(er), { size: 16 }), N("span", null, P(D(n).menu.addLinks), 1)]))]));
|
|
1616
1616
|
}
|
|
1617
1617
|
});
|
|
1618
1618
|
// src/composables/useEditableTextBlock.ts
|
|
1619
1619
|
function ja(e) {
|
|
1620
|
-
let t =
|
|
1621
|
-
top:
|
|
1622
|
-
left:
|
|
1620
|
+
let t = g(Pt, zt), r = g(on, null), { syntax: i } = G(), a = I(() => r?.value ? Be(e(), t.value) : Ie(e(), t.value)), o = I(() => Oe(Wn(oe(a.value, i)))), s = V(!1), c = V(null), { top: l, left: u } = n(c), { toLocal: d } = _t(), f = I(() => d({
|
|
1621
|
+
top: l.value - 8,
|
|
1622
|
+
left: u.value
|
|
1623
1623
|
}));
|
|
1624
1624
|
function p() {
|
|
1625
|
-
|
|
1625
|
+
s.value = !0;
|
|
1626
1626
|
}
|
|
1627
1627
|
function m() {
|
|
1628
|
-
|
|
1628
|
+
s.value = !1;
|
|
1629
1629
|
}
|
|
1630
1630
|
return {
|
|
1631
|
-
isEditing:
|
|
1632
|
-
blockRef:
|
|
1633
|
-
toolbarPosition:
|
|
1634
|
-
resolvedContent:
|
|
1631
|
+
isEditing: s,
|
|
1632
|
+
blockRef: c,
|
|
1633
|
+
toolbarPosition: f,
|
|
1634
|
+
resolvedContent: o,
|
|
1635
1635
|
handleDoubleClick: p,
|
|
1636
1636
|
handleEditorDone: m
|
|
1637
1637
|
};
|
|
1638
1638
|
}
|
|
1639
1639
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1640
|
-
var Ma = ["innerHTML"], Na = /* @__PURE__ */
|
|
1640
|
+
var Ma = ["innerHTML"], Na = /* @__PURE__ */ o({
|
|
1641
1641
|
__name: "ParagraphBlock",
|
|
1642
1642
|
props: {
|
|
1643
1643
|
block: {},
|
|
1644
1644
|
viewport: {}
|
|
1645
1645
|
},
|
|
1646
1646
|
setup(e) {
|
|
1647
|
-
let t = e, n =
|
|
1648
|
-
return (t, u) => (
|
|
1647
|
+
let t = e, n = b(() => import("./ParagraphEditor-Bx_Hlw8d.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = ja(() => t.block.content);
|
|
1648
|
+
return (t, u) => (c(), w("div", {
|
|
1649
1649
|
ref_key: "blockRef",
|
|
1650
|
-
ref:
|
|
1650
|
+
ref: i,
|
|
1651
1651
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1652
|
-
onDblclick: u[0] ||= (...e) =>
|
|
1653
|
-
}, [
|
|
1652
|
+
onDblclick: u[0] ||= (...e) => D(s) && D(s)(...e)
|
|
1653
|
+
}, [D(r) ? (c(), A(D(n), {
|
|
1654
1654
|
key: 0,
|
|
1655
1655
|
block: e.block,
|
|
1656
|
-
"toolbar-position":
|
|
1657
|
-
onDone:
|
|
1656
|
+
"toolbar-position": D(a),
|
|
1657
|
+
onDone: D(l)
|
|
1658
1658
|
}, null, 8, [
|
|
1659
1659
|
"block",
|
|
1660
1660
|
"toolbar-position",
|
|
1661
1661
|
"onDone"
|
|
1662
|
-
])) : (
|
|
1662
|
+
])) : (c(), w("div", {
|
|
1663
1663
|
key: 1,
|
|
1664
1664
|
class: "tpl-text-content tpl:outline-none",
|
|
1665
|
-
innerHTML:
|
|
1665
|
+
innerHTML: D(o)
|
|
1666
1666
|
}, null, 8, Ma))], 544));
|
|
1667
1667
|
}
|
|
1668
1668
|
});
|
|
@@ -1683,16 +1683,16 @@ function Pa(e, t, n, r = 0, i) {
|
|
|
1683
1683
|
function Fa(e, t, n) {
|
|
1684
1684
|
let r = [], i = "\0MT";
|
|
1685
1685
|
for (; e.includes(i);) i += "_";
|
|
1686
|
-
let a = n === "html" ?
|
|
1686
|
+
let a = n === "html" ? et(e, (e) => {
|
|
1687
1687
|
let t = r.push(e) - 1;
|
|
1688
1688
|
return `${i}${t}\u0000`;
|
|
1689
1689
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1690
1690
|
start: e.index,
|
|
1691
1691
|
end: e.index + e[0].length
|
|
1692
|
-
})), s = [], c =
|
|
1692
|
+
})), s = [], c = Qe(a, t, "logic"), l = [], u = 0;
|
|
1693
1693
|
for (let e of ["logic", "value"]) {
|
|
1694
1694
|
let r = 0;
|
|
1695
|
-
for (let i of e === "logic" ? c :
|
|
1695
|
+
for (let i of e === "logic" ? c : Qe(a, t, "value")) {
|
|
1696
1696
|
let t = i.index, a = t + i.value.length;
|
|
1697
1697
|
for (; o[r]?.end <= t;) r++;
|
|
1698
1698
|
let c = o[r];
|
|
@@ -1708,7 +1708,7 @@ function Fa(e, t, n) {
|
|
|
1708
1708
|
}), s.push({
|
|
1709
1709
|
start: t,
|
|
1710
1710
|
end: a,
|
|
1711
|
-
value: n === "html" ?
|
|
1711
|
+
value: n === "html" ? Ne(i.value) : i.value
|
|
1712
1712
|
});
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
@@ -1752,7 +1752,7 @@ var La = [
|
|
|
1752
1752
|
}, Za = ["onClick"], Qa = {
|
|
1753
1753
|
key: 7,
|
|
1754
1754
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1755
|
-
}, $a = ["data-testid", "disabled"], eo = /*#__PURE__*/
|
|
1755
|
+
}, $a = ["data-testid", "disabled"], eo = /*#__PURE__*/ gr(/* @__PURE__ */ o({
|
|
1756
1756
|
__name: "LocaleStatusChip",
|
|
1757
1757
|
props: {
|
|
1758
1758
|
blockId: {},
|
|
@@ -1771,233 +1771,233 @@ var La = [
|
|
|
1771
1771
|
editable: { type: Boolean }
|
|
1772
1772
|
},
|
|
1773
1773
|
emits: ["target"],
|
|
1774
|
-
setup(e, { emit:
|
|
1775
|
-
let
|
|
1774
|
+
setup(e, { emit: t }) {
|
|
1775
|
+
let n = e, r = t, i = g(hn, null), o = g(un, null), s = g(Ct, null), l = g($t, "en") ?? "en", { t: d, format: f } = W(), m = ne(), h = ht(), { toLocal: v } = _t(), y = V(null), b = V(null), x = V(!1), S = V(!1), C = V(null), T = V(null), F = null, R = V({
|
|
1776
1776
|
top: 0,
|
|
1777
1777
|
left: 0
|
|
1778
|
-
}),
|
|
1778
|
+
}), z = V({
|
|
1779
1779
|
maxHeight: 0,
|
|
1780
1780
|
maxWidth: 0
|
|
1781
|
-
}),
|
|
1782
|
-
function
|
|
1781
|
+
}), B = `tpl-locale-popover-${de()}`, te = I(() => dr(i?.activeLocale?.value ?? "")), U = I(() => dr(i?.content.value.settings.locale ?? "en"));
|
|
1782
|
+
function G(e, t) {
|
|
1783
1783
|
switch (e) {
|
|
1784
|
-
case "tags-differ": return
|
|
1785
|
-
case "hidden": return
|
|
1786
|
-
case "changed": return
|
|
1787
|
-
case "default-stale": return
|
|
1788
|
-
case "missing": return t === 1 ?
|
|
1789
|
-
default: return t === 1 ?
|
|
1784
|
+
case "tags-differ": return d.localization.tagsDiffer;
|
|
1785
|
+
case "hidden": return f(d.localization.hidden, { language: te.value });
|
|
1786
|
+
case "changed": return f(d.localization.changed, { language: te.value });
|
|
1787
|
+
case "default-stale": return fr(d.localization.staleLanguages, t, l);
|
|
1788
|
+
case "missing": return t === 1 ? d.localization.notTranslated : fr(d.localization.notTranslatedCount, t, l);
|
|
1789
|
+
default: return t === 1 ? d.localization.outOfDate : fr(d.localization.staleCount, t, l);
|
|
1790
1790
|
}
|
|
1791
1791
|
}
|
|
1792
|
-
let
|
|
1793
|
-
function
|
|
1794
|
-
|
|
1792
|
+
let re = I(() => G(n.state, n.count)), K = I(() => n.popoverState ?? n.state), ie = I(() => n.popoverCount ?? n.count), ae = I(() => G(K.value, ie.value)), oe = I(() => n.state === "hidden" ? Yn : n.state === "changed" ? Kn : n.state === "default-stale" ? ar : n.state === "stale" ? Jn : nr), se = I(() => K.value === "default-stale" || (K.value === "missing" || K.value === "stale") && ie.value > 1), q = I(() => n.editable && n.eligibleGaps && o?.isAvailable.value);
|
|
1793
|
+
function J(e = !1) {
|
|
1794
|
+
x.value = !1, S.value = !1, F = null, e && y.value?.focus({ preventScroll: !0 });
|
|
1795
1795
|
}
|
|
1796
|
-
async function
|
|
1797
|
-
if (
|
|
1798
|
-
|
|
1796
|
+
async function Y() {
|
|
1797
|
+
if (x.value) return J();
|
|
1798
|
+
h.value && (x.value = !0, await X());
|
|
1799
1799
|
}
|
|
1800
|
-
async function
|
|
1801
|
-
let e =
|
|
1802
|
-
if (!e || !
|
|
1800
|
+
async function X() {
|
|
1801
|
+
let e = h.value;
|
|
1802
|
+
if (!e || !x.value) return;
|
|
1803
1803
|
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
|
|
1804
|
-
|
|
1804
|
+
z.value = {
|
|
1805
1805
|
maxHeight: u - c,
|
|
1806
1806
|
maxWidth: d - l
|
|
1807
1807
|
};
|
|
1808
1808
|
let f = y.value.getBoundingClientRect();
|
|
1809
|
-
if (
|
|
1809
|
+
if (F = f, R.value = v({
|
|
1810
1810
|
top: c,
|
|
1811
1811
|
left: l
|
|
1812
|
-
}), await
|
|
1813
|
-
let p =
|
|
1814
|
-
|
|
1815
|
-
top: Math.max(c, Math.min(
|
|
1816
|
-
left: Math.max(l, Math.min(f.left, d -
|
|
1817
|
-
}), await
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
|
|
1812
|
+
}), await j(), !x.value || !b.value) return;
|
|
1813
|
+
let p = b.value.getBoundingClientRect(), m = Math.min(p.height, z.value.maxHeight), g = Math.min(p.width, z.value.maxWidth), _ = f.bottom + 4, C = _ + m <= u ? _ : f.top - m - 4;
|
|
1814
|
+
R.value = v({
|
|
1815
|
+
top: Math.max(c, Math.min(C, u - m)),
|
|
1816
|
+
left: Math.max(l, Math.min(f.left, d - g))
|
|
1817
|
+
}), await j(), x.value && (S.value ? T.value : b.value)?.focus({ preventScroll: !0 });
|
|
1818
|
+
}
|
|
1819
|
+
u(S, async () => {
|
|
1820
|
+
x.value && (await X(), x.value && !S.value && C.value?.focus({ preventScroll: !0 }));
|
|
1821
1821
|
});
|
|
1822
|
-
function
|
|
1822
|
+
function ce(e) {
|
|
1823
1823
|
let t = e.composedPath();
|
|
1824
|
-
!t.includes(y.value) && !t.includes(
|
|
1824
|
+
!t.includes(y.value) && !t.includes(b.value) && J();
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1827
|
-
if (e.composedPath().includes(
|
|
1826
|
+
function le(e) {
|
|
1827
|
+
if (e.composedPath().includes(b.value)) return;
|
|
1828
1828
|
let t = y.value?.getBoundingClientRect();
|
|
1829
|
-
t &&
|
|
1830
|
-
}
|
|
1831
|
-
function
|
|
1832
|
-
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
}, { flush: "sync" }),
|
|
1837
|
-
|
|
1838
|
-
}),
|
|
1839
|
-
() =>
|
|
1840
|
-
() =>
|
|
1841
|
-
() =>
|
|
1842
|
-
() =>
|
|
1843
|
-
() =>
|
|
1844
|
-
], () =>
|
|
1845
|
-
let
|
|
1846
|
-
(
|
|
1829
|
+
t && F && t.top === F.top && t.right === F.right || J();
|
|
1830
|
+
}
|
|
1831
|
+
function ue() {
|
|
1832
|
+
m.removeEventListener("click", ce, !0), m.removeEventListener("scroll", le, !0);
|
|
1833
|
+
}
|
|
1834
|
+
u(x, (e) => {
|
|
1835
|
+
ue(), e ? (m.addEventListener("click", ce, !0), m.addEventListener("scroll", le, !0)) : r("target", null);
|
|
1836
|
+
}, { flush: "sync" }), u(K, () => {
|
|
1837
|
+
S.value = !1, x.value && X();
|
|
1838
|
+
}), u([
|
|
1839
|
+
() => n.blockId,
|
|
1840
|
+
() => n.state,
|
|
1841
|
+
() => i?.activeLocale?.value,
|
|
1842
|
+
() => i?.state.template?.id,
|
|
1843
|
+
() => i?.loadVersion?.value
|
|
1844
|
+
], () => J()), _(ue);
|
|
1845
|
+
let Z = (e) => {
|
|
1846
|
+
(x.value || h.value) && (r("target", e ?? null), x.value || Y());
|
|
1847
1847
|
};
|
|
1848
|
-
|
|
1849
|
-
t &&
|
|
1850
|
-
}, { immediate: !0 }),
|
|
1851
|
-
|
|
1848
|
+
u(() => n.blockId, (e, t) => {
|
|
1849
|
+
t && s?.get(t) === Z && s.delete(t), s?.set(e, Z);
|
|
1850
|
+
}, { immediate: !0 }), _(() => {
|
|
1851
|
+
s?.get(n.blockId) === Z && s.delete(n.blockId);
|
|
1852
1852
|
});
|
|
1853
|
-
function ue() {
|
|
1854
|
-
s?.keepTranslations?.(r.blockId, r.stale), X(!0);
|
|
1855
|
-
}
|
|
1856
|
-
function de(e) {
|
|
1857
|
-
s?.resetLocaleFields?.(r.blockId, e), X(!0);
|
|
1858
|
-
}
|
|
1859
1853
|
function fe() {
|
|
1860
|
-
|
|
1854
|
+
i?.keepTranslations?.(n.blockId, n.stale), J(!0);
|
|
1861
1855
|
}
|
|
1862
1856
|
function pe(e) {
|
|
1863
|
-
|
|
1857
|
+
i?.resetLocaleFields?.(n.blockId, e), J(!0);
|
|
1864
1858
|
}
|
|
1865
1859
|
function me() {
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1860
|
+
i?.setBlockHidden?.(n.blockId, !1), J(!0);
|
|
1861
|
+
}
|
|
1862
|
+
function Q(e) {
|
|
1863
|
+
i?.setActiveLocale?.(e), J();
|
|
1870
1864
|
}
|
|
1871
1865
|
function he() {
|
|
1872
|
-
|
|
1866
|
+
q.value && !o?.running.value && (K.value === "tags-differ" && n.replacesCurrent ? S.value = !0 : o?.translate({
|
|
1867
|
+
only: K.value === "tags-differ" ? "all" : "gaps",
|
|
1868
|
+
blockId: n.blockId
|
|
1869
|
+
}));
|
|
1873
1870
|
}
|
|
1874
1871
|
function ge() {
|
|
1875
|
-
|
|
1872
|
+
S.value = !1;
|
|
1876
1873
|
}
|
|
1877
1874
|
function _e() {
|
|
1878
|
-
|
|
1875
|
+
S.value ? ge() : J(!0);
|
|
1876
|
+
}
|
|
1877
|
+
function ve() {
|
|
1878
|
+
q.value && !o?.running.value && n.translationCount && (S.value = !1, o?.translate({
|
|
1879
1879
|
only: "all",
|
|
1880
|
-
blockId:
|
|
1880
|
+
blockId: n.blockId
|
|
1881
1881
|
}));
|
|
1882
1882
|
}
|
|
1883
|
-
return (
|
|
1883
|
+
return (t, n) => (c(), w(H, null, [N("button", {
|
|
1884
1884
|
ref_key: "trigger",
|
|
1885
1885
|
ref: y,
|
|
1886
1886
|
type: "button",
|
|
1887
1887
|
"data-testid": "locale-chip",
|
|
1888
1888
|
"data-state": e.state,
|
|
1889
|
-
"aria-label":
|
|
1890
|
-
title:
|
|
1891
|
-
"aria-expanded":
|
|
1892
|
-
"aria-controls":
|
|
1889
|
+
"aria-label": re.value,
|
|
1890
|
+
title: re.value,
|
|
1891
|
+
"aria-expanded": x.value,
|
|
1892
|
+
"aria-controls": x.value ? B : void 0,
|
|
1893
1893
|
"aria-haspopup": "dialog",
|
|
1894
1894
|
class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
|
|
1895
|
-
onClick:
|
|
1896
|
-
onKeydown: [
|
|
1897
|
-
}, [(
|
|
1895
|
+
onClick: M(Y, ["stop"]),
|
|
1896
|
+
onKeydown: [E(M(Y, ["stop", "prevent"]), ["enter"]), E(M(_e, ["stop", "prevent"]), ["esc"])]
|
|
1897
|
+
}, [(c(), A(a(oe.value), {
|
|
1898
1898
|
size: 12,
|
|
1899
1899
|
"stroke-width": 2,
|
|
1900
1900
|
"aria-hidden": "true"
|
|
1901
|
-
}))], 40, La),
|
|
1901
|
+
}))], 40, La), D(h) && x.value ? (c(), A(ee, {
|
|
1902
1902
|
key: 0,
|
|
1903
|
-
to:
|
|
1904
|
-
}, [
|
|
1905
|
-
id:
|
|
1903
|
+
to: D(h)
|
|
1904
|
+
}, [N("div", {
|
|
1905
|
+
id: B,
|
|
1906
1906
|
ref_key: "popover",
|
|
1907
|
-
ref:
|
|
1907
|
+
ref: b,
|
|
1908
1908
|
role: "dialog",
|
|
1909
|
-
"aria-label":
|
|
1910
|
-
"aria-labelledby":
|
|
1911
|
-
"aria-describedby":
|
|
1909
|
+
"aria-label": S.value ? void 0 : ae.value,
|
|
1910
|
+
"aria-labelledby": S.value ? `${B}-question` : void 0,
|
|
1911
|
+
"aria-describedby": S.value ? `${B}-warning` : void 0,
|
|
1912
1912
|
tabindex: "-1",
|
|
1913
1913
|
"data-testid": "locale-popover",
|
|
1914
1914
|
class: "tpl-locale-popover tpl:absolute tpl:z-[10000] tpl:w-[300px] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-sm tpl:text-[var(--tpl-chrome-text)] tpl:shadow-[var(--tpl-shadow-md)] tpl:outline-none",
|
|
1915
|
-
style:
|
|
1916
|
-
top: `${
|
|
1917
|
-
left: `${
|
|
1918
|
-
maxHeight: `${
|
|
1919
|
-
maxWidth: `${
|
|
1915
|
+
style: L({
|
|
1916
|
+
top: `${R.value.top}px`,
|
|
1917
|
+
left: `${R.value.left}px`,
|
|
1918
|
+
maxHeight: `${z.value.maxHeight}px`,
|
|
1919
|
+
maxWidth: `${z.value.maxWidth}px`
|
|
1920
1920
|
}),
|
|
1921
|
-
onClick:
|
|
1922
|
-
onKeydown:
|
|
1923
|
-
}, [
|
|
1924
|
-
|
|
1925
|
-
id: `${
|
|
1921
|
+
onClick: n[2] ||= M(() => {}, ["stop"]),
|
|
1922
|
+
onKeydown: E(M(_e, ["stop", "prevent"]), ["esc"])
|
|
1923
|
+
}, [S.value ? (c(), w(H, { key: 0 }, [
|
|
1924
|
+
N("h3", {
|
|
1925
|
+
id: `${B}-question`,
|
|
1926
1926
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
1927
|
-
},
|
|
1928
|
-
|
|
1929
|
-
id: `${
|
|
1927
|
+
}, P(D(fr)(D(d).localization.translationConfirmation, e.translationCount ?? 0, D(l))), 9, za),
|
|
1928
|
+
N("p", {
|
|
1929
|
+
id: `${B}-warning`,
|
|
1930
1930
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
1931
|
-
},
|
|
1932
|
-
|
|
1931
|
+
}, P(D(f)(D(d).localization.translationDescription, { language: te.value })), 9, Ba),
|
|
1932
|
+
N("div", Va, [N("button", {
|
|
1933
1933
|
ref_key: "confirmationCancel",
|
|
1934
|
-
ref:
|
|
1934
|
+
ref: T,
|
|
1935
1935
|
type: "button",
|
|
1936
1936
|
"data-testid": "translation-confirm-cancel",
|
|
1937
|
-
class:
|
|
1938
|
-
onClick:
|
|
1939
|
-
},
|
|
1937
|
+
class: O(D(mr)),
|
|
1938
|
+
onClick: ge
|
|
1939
|
+
}, P(D(d).localization.cancel), 3), N("button", {
|
|
1940
1940
|
type: "button",
|
|
1941
1941
|
"data-testid": "translation-confirm",
|
|
1942
|
-
class:
|
|
1943
|
-
disabled: !
|
|
1944
|
-
onClick:
|
|
1945
|
-
},
|
|
1946
|
-
], 64)) : (
|
|
1947
|
-
|
|
1948
|
-
|
|
1942
|
+
class: O(D(hr)),
|
|
1943
|
+
disabled: !q.value || !!D(o)?.running.value || !e.translationCount,
|
|
1944
|
+
onClick: ve
|
|
1945
|
+
}, P(D(fr)(D(d).localization.translateAllFields, e.translationCount ?? 0, D(l))), 11, Ha)])
|
|
1946
|
+
], 64)) : (c(), w(H, { key: 1 }, [
|
|
1947
|
+
se.value ? (c(), w("p", Ua, P(ae.value), 1)) : k("", !0),
|
|
1948
|
+
K.value === "missing" ? (c(), w("p", Wa, P(D(f)(D(d).localization.missingExplanation, { default: U.value })), 1)) : K.value === "stale" ? (c(), w(H, { key: 2 }, [N("p", Ga, P(D(f)(D(d).localization.staleExplanation, { default: U.value })), 1), N("p", Ka, P(D(f)(D(d).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : K.value === "tags-differ" ? (c(), w("p", qa, P(D(f)(D(d).localization.tagsDifferExplanation, { default: U.value })), 1)) : K.value === "changed" ? (c(), w("p", Ja, P(D(fr)(D(d).localization.changedProperties, ie.value, D(l), { default: U.value })), 1)) : K.value === "hidden" ? (c(), w("p", Ya, P(D(f)(D(d).localization.hiddenExplanation, { language: te.value })), 1)) : (c(), w("ul", Xa, [(c(!0), w(H, null, p(e.staleLocales, (e) => (c(), w("li", {
|
|
1949
1949
|
key: e,
|
|
1950
1950
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
1951
|
-
}, [
|
|
1951
|
+
}, [N("span", null, P(D(dr)(e)), 1), N("button", {
|
|
1952
1952
|
type: "button",
|
|
1953
|
-
class:
|
|
1954
|
-
onClick: (t) =>
|
|
1955
|
-
},
|
|
1956
|
-
e.editable &&
|
|
1957
|
-
|
|
1953
|
+
class: O(D(pr)),
|
|
1954
|
+
onClick: (t) => Q(e)
|
|
1955
|
+
}, P(D(d).localization.open), 11, Za)]))), 128))])),
|
|
1956
|
+
e.editable && K.value !== "default-stale" ? (c(), w("div", Qa, [
|
|
1957
|
+
q.value && (K.value === "missing" || K.value === "stale" || K.value === "tags-differ") ? (c(), w("button", {
|
|
1958
1958
|
key: 0,
|
|
1959
1959
|
type: "button",
|
|
1960
1960
|
ref_key: "retranslate",
|
|
1961
|
-
ref:
|
|
1962
|
-
"data-testid":
|
|
1963
|
-
class:
|
|
1964
|
-
disabled: !!
|
|
1965
|
-
onClick:
|
|
1966
|
-
},
|
|
1967
|
-
|
|
1961
|
+
ref: C,
|
|
1962
|
+
"data-testid": K.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
1963
|
+
class: O(D(mr)),
|
|
1964
|
+
disabled: !!D(o)?.running.value,
|
|
1965
|
+
onClick: he
|
|
1966
|
+
}, P(K.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11, $a)) : k("", !0),
|
|
1967
|
+
K.value === "stale" || K.value === "tags-differ" ? (c(), w(H, { key: 1 }, [K.value === "stale" ? (c(), w("button", {
|
|
1968
1968
|
key: 0,
|
|
1969
1969
|
type: "button",
|
|
1970
1970
|
"data-testid": "locale-keep",
|
|
1971
|
-
class:
|
|
1972
|
-
onClick:
|
|
1973
|
-
},
|
|
1971
|
+
class: O(D(q.value ? pr : mr)),
|
|
1972
|
+
onClick: fe
|
|
1973
|
+
}, P(D(d).localization.keep), 3)) : k("", !0), N("button", {
|
|
1974
1974
|
type: "button",
|
|
1975
1975
|
"data-testid": "locale-use-default",
|
|
1976
|
-
class:
|
|
1977
|
-
onClick:
|
|
1978
|
-
},
|
|
1979
|
-
|
|
1976
|
+
class: O(D(K.value === "tags-differ" && !q.value ? mr : pr)),
|
|
1977
|
+
onClick: n[0] ||= (t) => pe(K.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
1978
|
+
}, P(D(f)(D(d).localization.useDefaultLanguage, { default: U.value })), 3)], 64)) : k("", !0),
|
|
1979
|
+
K.value === "changed" ? (c(), w("button", {
|
|
1980
1980
|
key: 2,
|
|
1981
1981
|
type: "button",
|
|
1982
1982
|
"data-testid": "locale-reset",
|
|
1983
|
-
class:
|
|
1984
|
-
onClick:
|
|
1985
|
-
},
|
|
1986
|
-
|
|
1983
|
+
class: O(D(mr)),
|
|
1984
|
+
onClick: n[1] ||= (t) => pe(e.setPaths)
|
|
1985
|
+
}, P(D(d).localization.resetChanges), 3)) : k("", !0),
|
|
1986
|
+
K.value === "hidden" ? (c(), w("button", {
|
|
1987
1987
|
key: 3,
|
|
1988
1988
|
type: "button",
|
|
1989
1989
|
"data-testid": "locale-show",
|
|
1990
|
-
class:
|
|
1991
|
-
onClick:
|
|
1992
|
-
},
|
|
1993
|
-
])) :
|
|
1994
|
-
], 64))], 44, Ra)], 8, ["to"])) :
|
|
1990
|
+
class: O(D(mr)),
|
|
1991
|
+
onClick: me
|
|
1992
|
+
}, P(D(d).localization.show), 3)) : k("", !0)
|
|
1993
|
+
])) : k("", !0)
|
|
1994
|
+
], 64))], 44, Ra)], 8, ["to"])) : k("", !0)], 64));
|
|
1995
1995
|
}
|
|
1996
|
-
}), [["__scopeId", "data-v-3343ae7d"]]), to = /* @__PURE__ */
|
|
1996
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), to = /* @__PURE__ */ o({
|
|
1997
1997
|
__name: "LocaleMarkers",
|
|
1998
1998
|
props: { block: {} },
|
|
1999
1999
|
setup(e) {
|
|
2000
|
-
let t = e, n =
|
|
2000
|
+
let t = e, n = g(hn, null), r = g(Nt, void 0), i = g(Zt, []), a = g(xt, ue.liquid), o = g(Qt, I(() => /* @__PURE__ */ new Set())), s = I(() => n?.activeLocale?.value), l = I(() => s.value ? t.block.l10n?.[s.value] : void 0), d = I(() => ({
|
|
2001
2001
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2002
2002
|
...t.block,
|
|
2003
2003
|
children: []
|
|
@@ -2006,56 +2006,56 @@ var La = [
|
|
|
2006
2006
|
locale: n.content.value.settings.locale,
|
|
2007
2007
|
locales: n.content.value.settings.locales
|
|
2008
2008
|
}
|
|
2009
|
-
})),
|
|
2009
|
+
})), f = I(() => n && s.value && !o.value.has(s.value) ? fe(d.value, s.value, i) : {
|
|
2010
2010
|
missing: [],
|
|
2011
2011
|
stale: [],
|
|
2012
2012
|
translated: []
|
|
2013
|
-
}),
|
|
2014
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2015
|
-
return typeof r == "string" && i !== void 0 && Ia(r, i,
|
|
2016
|
-
})),
|
|
2017
|
-
syntax:
|
|
2018
|
-
definitions:
|
|
2013
|
+
}), p = I(() => f.value.stale.map((e) => e.slice(t.block.id.length + 1))), m = I(() => f.value.translated.flatMap((e) => {
|
|
2014
|
+
let n = e.slice(t.block.id.length + 1), r = De(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || ye[t.block.type]?.includes(n) ? "html" : "text";
|
|
2015
|
+
return typeof r == "string" && i !== void 0 && Ia(r, i, a, o) ? [n] : [];
|
|
2016
|
+
})), h = V(null), _ = I(() => n && s.value && !o.value.has(s.value) ? q(d.value, s.value, {
|
|
2017
|
+
syntax: a,
|
|
2018
|
+
definitions: i,
|
|
2019
2019
|
doNotTranslate: r?.doNotTranslate,
|
|
2020
2020
|
blockId: t.block.id,
|
|
2021
|
-
only:
|
|
2022
|
-
}).strings : []), v =
|
|
2021
|
+
only: w.value === "tags-differ" ? "all" : "gaps"
|
|
2022
|
+
}).strings : []), v = I(() => _.value.some(({ id: e }) => {
|
|
2023
2023
|
let n = e.slice(t.block.id.length + 1);
|
|
2024
|
-
return
|
|
2025
|
-
})), y =
|
|
2026
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2027
|
-
return Array.isArray(i) ?
|
|
2028
|
-
})), b =
|
|
2024
|
+
return f.value.translated.includes(e) && !m.value.includes(n);
|
|
2025
|
+
})), y = I(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2026
|
+
let n = e.split("."), r = n.pop(), i = n.length ? De(t.block, n.join(".")) : t.block;
|
|
2027
|
+
return Array.isArray(i) ? De(i, r) !== void 0 : i !== void 0;
|
|
2028
|
+
})), b = I(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && fe(d.value, e, i).stale.length > 0) : []), x = I(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : f.value.missing.length ? "missing" : p.value.length ? "stale" : m.value.length ? "tags-differ" : y.value.length ? "changed" : null : b.value.length ? "default-stale" : null);
|
|
2029
2029
|
function S(e) {
|
|
2030
|
-
return e === "missing" ?
|
|
2030
|
+
return e === "missing" ? f.value.missing.length : e === "stale" ? p.value.length : e === "tags-differ" ? m.value.length : e === "default-stale" ? b.value.length : y.value.length;
|
|
2031
2031
|
}
|
|
2032
|
-
let
|
|
2033
|
-
|
|
2034
|
-
|
|
2032
|
+
let C = I(() => S(x.value)), w = I(() => h.value && S(h.value) > 0 ? h.value : x.value), T = I(() => S(w.value));
|
|
2033
|
+
u([x, () => w.value !== (h.value ?? x.value)], () => {
|
|
2034
|
+
h.value = null;
|
|
2035
2035
|
});
|
|
2036
|
-
let
|
|
2037
|
-
let e =
|
|
2036
|
+
let E = I(() => {
|
|
2037
|
+
let e = De(t.block, p.value[0] ?? "");
|
|
2038
2038
|
if (typeof e != "string") return "";
|
|
2039
2039
|
let n = e.split(/<[^>]*>/).join("");
|
|
2040
2040
|
return Array.from(n).slice(0, 60).join("");
|
|
2041
2041
|
});
|
|
2042
|
-
return (t, n) =>
|
|
2042
|
+
return (t, n) => D(r) && x.value ? (c(), A(eo, {
|
|
2043
2043
|
key: 0,
|
|
2044
2044
|
"block-id": e.block.id,
|
|
2045
2045
|
state: x.value,
|
|
2046
|
-
count:
|
|
2047
|
-
"popover-state":
|
|
2048
|
-
"popover-count":
|
|
2049
|
-
stale:
|
|
2050
|
-
"tags-differ":
|
|
2046
|
+
count: C.value,
|
|
2047
|
+
"popover-state": w.value ?? void 0,
|
|
2048
|
+
"popover-count": T.value,
|
|
2049
|
+
stale: p.value,
|
|
2050
|
+
"tags-differ": m.value,
|
|
2051
2051
|
"set-paths": y.value,
|
|
2052
2052
|
"stale-locales": b.value,
|
|
2053
|
-
excerpt:
|
|
2053
|
+
excerpt: E.value,
|
|
2054
2054
|
"eligible-gaps": _.value.length > 0,
|
|
2055
2055
|
"translation-count": _.value.length,
|
|
2056
2056
|
"replaces-current": v.value,
|
|
2057
|
-
editable: !!
|
|
2058
|
-
onTarget: n[0] ||= (e) =>
|
|
2057
|
+
editable: !!s.value && D(r).locales.includes(s.value),
|
|
2058
|
+
onTarget: n[0] ||= (e) => h.value = e
|
|
2059
2059
|
}, null, 8, [
|
|
2060
2060
|
"block-id",
|
|
2061
2061
|
"state",
|
|
@@ -2071,7 +2071,7 @@ var La = [
|
|
|
2071
2071
|
"translation-count",
|
|
2072
2072
|
"replaces-current",
|
|
2073
2073
|
"editable"
|
|
2074
|
-
])) :
|
|
2074
|
+
])) : k("", !0);
|
|
2075
2075
|
}
|
|
2076
2076
|
}), no = [
|
|
2077
2077
|
"data-block-id",
|
|
@@ -2087,7 +2087,7 @@ var La = [
|
|
|
2087
2087
|
}, fo = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, po = {
|
|
2088
2088
|
key: 4,
|
|
2089
2089
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2090
|
-
}, mo = ["aria-label", "title"], ho = /*#__PURE__*/
|
|
2090
|
+
}, mo = ["aria-label", "title"], ho = /*#__PURE__*/ gr(/* @__PURE__ */ o({
|
|
2091
2091
|
__name: "BlockWrapper",
|
|
2092
2092
|
props: {
|
|
2093
2093
|
block: {},
|
|
@@ -2099,34 +2099,34 @@ var La = [
|
|
|
2099
2099
|
picked: { type: Boolean }
|
|
2100
2100
|
},
|
|
2101
2101
|
emits: ["select"],
|
|
2102
|
-
setup(
|
|
2103
|
-
let
|
|
2104
|
-
async function
|
|
2105
|
-
await
|
|
2106
|
-
}
|
|
2107
|
-
function
|
|
2108
|
-
|
|
2109
|
-
}
|
|
2110
|
-
let S =
|
|
2111
|
-
desktop:
|
|
2112
|
-
mobile:
|
|
2113
|
-
}[
|
|
2102
|
+
setup(t, { emit: n }) {
|
|
2103
|
+
let i = b(() => import("./BlockIssueBadge-DncZ-HDf.js")), a = t, o = I(() => a.displayBlock ?? a.block), s = n, { t: l, format: d } = W(), f = g(gn, null), p = V(null), m = I(() => f?.liftedBlockId.value === a.block.id), h = I(() => m.value ? d(l.blockActions.dragLifted, { block: a.block.type }) : l.blockActions.drag);
|
|
2104
|
+
async function _() {
|
|
2105
|
+
await j(), p.value?.focus();
|
|
2106
|
+
}
|
|
2107
|
+
function v(e) {
|
|
2108
|
+
f && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), m.value ? f.drop(a.block.id) : f.lift(a.block.id)) : m.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f.cancel(), _()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), f.moveUp(a.block.id), _()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), f.moveDown(a.block.id), _())));
|
|
2109
|
+
}
|
|
2110
|
+
let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(Z?.activeLocale?.value && a.block.l10n?.[Z.activeLocale.value]?.hidden)), E = I(() => a.previewMode === !0 && (S.value || C.value)), ee = I(() => a.viewport ? {
|
|
2111
|
+
desktop: l.viewport.desktop,
|
|
2112
|
+
mobile: l.viewport.mobile
|
|
2113
|
+
}[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(dn, null), z = g(rn, null), B = g(Jt, {}), te = I(() => B.savedBlocks?.isPicking.value === !0), H = I(() => !a.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), ne = I(() => a.isSelected && !te.value), G = I(() => B.comments?.getBlockCount(a.block.id) ?? 0), re = V(null), K = V(null), ie = V(null), ae = V(null), oe = V({
|
|
2114
2114
|
left: "calc(100% + 8px)",
|
|
2115
2115
|
top: "50%"
|
|
2116
|
-
}),
|
|
2116
|
+
}), se = V(!1), q = I(() => K.value ?? ae.value), J = I(() => q.value?.closest(".tpl-body"));
|
|
2117
2117
|
function Y() {
|
|
2118
|
-
let e =
|
|
2118
|
+
let e = se.value, t = K.value, n = ae.value, r = re.value;
|
|
2119
2119
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2120
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2120
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = J.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2121
2121
|
if (n?.offsetWidth) {
|
|
2122
2122
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2123
2123
|
if (e === i) {
|
|
2124
|
-
|
|
2124
|
+
se.value = !i, j(Y);
|
|
2125
2125
|
return;
|
|
2126
2126
|
}
|
|
2127
2127
|
}
|
|
2128
2128
|
if (!t?.offsetWidth) return;
|
|
2129
|
-
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d =
|
|
2129
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = ie.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
|
|
2130
2130
|
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2131
2131
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2132
2132
|
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
@@ -2138,187 +2138,187 @@ var La = [
|
|
|
2138
2138
|
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
2141
|
-
(
|
|
2141
|
+
(oe.value.left !== `${u}px` || oe.value.top !== m) && (oe.value = {
|
|
2142
2142
|
left: `${u}px`,
|
|
2143
2143
|
top: m
|
|
2144
2144
|
});
|
|
2145
2145
|
}
|
|
2146
|
-
|
|
2146
|
+
x(Y), r(I(() => q.value ? [
|
|
2147
|
+
re.value,
|
|
2147
2148
|
K.value,
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
J.value
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
let e = a.value;
|
|
2149
|
+
ie.value,
|
|
2150
|
+
ae.value,
|
|
2151
|
+
J.value
|
|
2152
|
+
].filter((e) => !!e) : []), Y), e(J, "scroll", Y, { passive: !0 });
|
|
2153
|
+
let X = I(() => B.collaboration?.lockOf(a.block.id) ?? null), ce = I(() => X.value?.holder.type === "guest" ? l.collaboration.guest : X.value?.holder.name ?? ""), le = I(() => B.collaboration?.agentHighlightOf(a.block.id) ?? B.ai?.highlightOf(a.block.id) ?? null), ue = Ln(() => o.value.type === "section" ? o.value.backgroundImage : void 0), de = Ln(() => o.value.type === "section" ? o.value.wrapper?.backgroundImage : void 0), Z = g(hn, null), fe = Z ? vt(Z) : null, pe = g(tn, null) ?? fe?.content ?? null;
|
|
2154
|
+
u([() => Z?.activeLocale?.value, () => fe && Fe(fe.settings.value)], Y, { flush: "post" });
|
|
2155
|
+
let me = g(Lt, void 0), Q = I(() => Li(o.value, {
|
|
2156
|
+
backgroundImageUrl: ue.value,
|
|
2157
|
+
heroBoxWidth: kn(o.value) ? Nn(o.value, pe?.value, me) : void 0
|
|
2158
|
+
})), he = I(() => Ui(o.value, { backgroundImageUrl: de.value })), ge = I(() => {
|
|
2159
|
+
let e = o.value;
|
|
2160
2160
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2161
|
-
}),
|
|
2162
|
-
function
|
|
2163
|
-
|
|
2164
|
-
}
|
|
2165
|
-
function _e() {
|
|
2166
|
-
L?.deleteBlock(r.block.id);
|
|
2167
|
-
}
|
|
2168
|
-
function ve() {
|
|
2169
|
-
L?.duplicateBlock(r.block);
|
|
2161
|
+
}), _e = I(() => Hi(ge.value?.wrapper?.padding));
|
|
2162
|
+
function ve(e) {
|
|
2163
|
+
a.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
2170
2164
|
}
|
|
2171
2165
|
function ye() {
|
|
2172
|
-
|
|
2166
|
+
R?.deleteBlock(a.block.id);
|
|
2173
2167
|
}
|
|
2174
2168
|
function be() {
|
|
2175
|
-
R?.
|
|
2169
|
+
R?.duplicateBlock(a.block);
|
|
2176
2170
|
}
|
|
2177
|
-
|
|
2171
|
+
function xe() {
|
|
2172
|
+
B.savedBlocks?.startPicking(a.block.id);
|
|
2173
|
+
}
|
|
2174
|
+
function Se() {
|
|
2175
|
+
z?.toggleBlock(a.block.id);
|
|
2176
|
+
}
|
|
2177
|
+
return (e, n) => E.value ? k("", !0) : (c(), w("div", {
|
|
2178
2178
|
key: 0,
|
|
2179
2179
|
ref_key: "blockElement",
|
|
2180
|
-
ref:
|
|
2181
|
-
class:
|
|
2182
|
-
"tpl-block--selected":
|
|
2183
|
-
"tpl-block--locale-hidden":
|
|
2184
|
-
"tpl-block--picked":
|
|
2185
|
-
"tpl-block--idle": !
|
|
2186
|
-
"tpl-block--lifted":
|
|
2180
|
+
ref: re,
|
|
2181
|
+
class: O(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2182
|
+
"tpl-block--selected": t.isSelected,
|
|
2183
|
+
"tpl-block--locale-hidden": C.value,
|
|
2184
|
+
"tpl-block--picked": t.picked,
|
|
2185
|
+
"tpl-block--idle": !t.isSelected && !t.picked,
|
|
2186
|
+
"tpl-block--lifted": m.value
|
|
2187
2187
|
}]),
|
|
2188
|
-
"data-block-id":
|
|
2189
|
-
"data-block-type":
|
|
2190
|
-
"data-tpl-picked":
|
|
2191
|
-
onClick:
|
|
2188
|
+
"data-block-id": t.block.id,
|
|
2189
|
+
"data-block-type": t.block.type,
|
|
2190
|
+
"data-tpl-picked": t.picked || void 0,
|
|
2191
|
+
onClick: ve
|
|
2192
2192
|
}, [
|
|
2193
|
-
|
|
2193
|
+
N("div", {
|
|
2194
2194
|
ref_key: "badgesElement",
|
|
2195
|
-
ref:
|
|
2195
|
+
ref: ie,
|
|
2196
2196
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2197
2197
|
}, [
|
|
2198
|
-
G.value > 0 && !S.value ? (
|
|
2198
|
+
G.value > 0 && !S.value ? (c(), w("button", {
|
|
2199
2199
|
key: 0,
|
|
2200
2200
|
ref_key: "commentElement",
|
|
2201
|
-
ref:
|
|
2202
|
-
class:
|
|
2203
|
-
"aria-label":
|
|
2204
|
-
onClick:
|
|
2205
|
-
}, [
|
|
2201
|
+
ref: ae,
|
|
2202
|
+
class: O(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", se.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2203
|
+
"aria-label": D(d)(D(l).blockActions.comments, { count: String(G.value) }),
|
|
2204
|
+
onClick: n[0] ||= M((e) => D(B).comments?.openForBlock(t.block.id), ["stop"])
|
|
2205
|
+
}, [U(D(or), {
|
|
2206
2206
|
size: 12,
|
|
2207
2207
|
"stroke-width": 2.5
|
|
2208
|
-
}),
|
|
2209
|
-
|
|
2210
|
-
|
|
2208
|
+
}), T(" " + P(G.value), 1)], 10, ro)) : k("", !0),
|
|
2209
|
+
U(D(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2210
|
+
t.previewMode ? k("", !0) : (c(), A(to, {
|
|
2211
2211
|
key: 1,
|
|
2212
|
-
block:
|
|
2212
|
+
block: t.block
|
|
2213
2213
|
}, null, 8, ["block"]))
|
|
2214
2214
|
], 512),
|
|
2215
|
-
X.value ? (
|
|
2215
|
+
X.value ? (c(), w("div", {
|
|
2216
2216
|
key: 0,
|
|
2217
2217
|
"data-testid": "block-lock",
|
|
2218
2218
|
"data-lock-holder": X.value.holder.sessionId,
|
|
2219
2219
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2220
|
-
style:
|
|
2220
|
+
style: L({
|
|
2221
2221
|
outline: `2px solid ${X.value.holder.color}`,
|
|
2222
2222
|
outlineOffset: "-1px"
|
|
2223
2223
|
})
|
|
2224
|
-
}, [
|
|
2224
|
+
}, [N("span", {
|
|
2225
2225
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2226
|
-
style:
|
|
2226
|
+
style: L({
|
|
2227
2227
|
backgroundColor: X.value.holder.color,
|
|
2228
|
-
color:
|
|
2228
|
+
color: D(_r)(X.value.holder.color)
|
|
2229
2229
|
})
|
|
2230
|
-
},
|
|
2231
|
-
|
|
2232
|
-
key:
|
|
2230
|
+
}, P(D(d)(D(l).collaboration.editing, { name: ce.value })), 5)], 12, io)) : k("", !0),
|
|
2231
|
+
le.value === null ? k("", !0) : (c(), w("div", {
|
|
2232
|
+
key: le.value,
|
|
2233
2233
|
"data-testid": "block-agent-highlight",
|
|
2234
2234
|
"aria-hidden": "true",
|
|
2235
2235
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
2236
2236
|
})),
|
|
2237
|
-
|
|
2237
|
+
ne.value ? (c(), w("div", {
|
|
2238
2238
|
key: 2,
|
|
2239
2239
|
ref_key: "actionsElement",
|
|
2240
|
-
ref:
|
|
2241
|
-
style:
|
|
2240
|
+
ref: K,
|
|
2241
|
+
style: L(oe.value),
|
|
2242
2242
|
role: "toolbar",
|
|
2243
|
-
"aria-label":
|
|
2243
|
+
"aria-label": D(l).blockActions.drag,
|
|
2244
2244
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2245
2245
|
}, [
|
|
2246
|
-
|
|
2246
|
+
N("button", {
|
|
2247
2247
|
ref_key: "dragButtonRef",
|
|
2248
|
-
ref:
|
|
2248
|
+
ref: p,
|
|
2249
2249
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
|
|
2250
|
-
"aria-label":
|
|
2251
|
-
"aria-pressed":
|
|
2250
|
+
"aria-label": h.value,
|
|
2251
|
+
"aria-pressed": m.value,
|
|
2252
2252
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2253
|
-
title:
|
|
2254
|
-
onKeydown:
|
|
2255
|
-
}, [
|
|
2253
|
+
title: D(l).blockActions.drag,
|
|
2254
|
+
onKeydown: v
|
|
2255
|
+
}, [U(D(lr), {
|
|
2256
2256
|
size: 14,
|
|
2257
2257
|
"stroke-width": 1.5
|
|
2258
2258
|
})], 40, oo),
|
|
2259
|
-
|
|
2259
|
+
N("button", {
|
|
2260
2260
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2261
|
-
"aria-label":
|
|
2262
|
-
title:
|
|
2263
|
-
onClick:
|
|
2264
|
-
}, [
|
|
2261
|
+
"aria-label": D(l).blockActions.duplicate,
|
|
2262
|
+
title: D(l).blockActions.duplicate,
|
|
2263
|
+
onClick: M(be, ["stop"])
|
|
2264
|
+
}, [U(D(Gn), {
|
|
2265
2265
|
size: 14,
|
|
2266
2266
|
"stroke-width": 1.5
|
|
2267
2267
|
})], 8, so),
|
|
2268
|
-
|
|
2268
|
+
H.value ? (c(), w("button", {
|
|
2269
2269
|
key: 0,
|
|
2270
2270
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2271
|
-
"aria-label":
|
|
2272
|
-
title:
|
|
2273
|
-
onClick:
|
|
2274
|
-
}, [
|
|
2271
|
+
"aria-label": D(l).blockActions.saveAsBlock,
|
|
2272
|
+
title: D(l).blockActions.saveAsBlock,
|
|
2273
|
+
onClick: M(xe, ["stop"])
|
|
2274
|
+
}, [U(D($n), {
|
|
2275
2275
|
size: 14,
|
|
2276
2276
|
"stroke-width": 1.5
|
|
2277
|
-
})], 8, co)) :
|
|
2278
|
-
|
|
2277
|
+
})], 8, co)) : k("", !0),
|
|
2278
|
+
N("button", {
|
|
2279
2279
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2280
|
-
"aria-label":
|
|
2281
|
-
title:
|
|
2282
|
-
onClick:
|
|
2283
|
-
}, [
|
|
2280
|
+
"aria-label": D(l).blockActions.delete,
|
|
2281
|
+
title: D(l).blockActions.delete,
|
|
2282
|
+
onClick: M(ye, ["stop"])
|
|
2283
|
+
}, [U(D(rr), {
|
|
2284
2284
|
size: 14,
|
|
2285
2285
|
"stroke-width": 1.5
|
|
2286
2286
|
})], 8, lo)
|
|
2287
|
-
], 12, ao)) :
|
|
2288
|
-
S.value ? (
|
|
2287
|
+
], 12, ao)) : k("", !0),
|
|
2288
|
+
S.value ? (c(), w("div", uo, [N("span", fo, [U(D(Yn), {
|
|
2289
2289
|
size: 12,
|
|
2290
2290
|
"stroke-width": 1.5
|
|
2291
|
-
}),
|
|
2292
|
-
|
|
2291
|
+
}), T(" " + P(D(d)(D(l).blockActions.hiddenOnViewport, { viewport: ee.value })), 1)])])) : k("", !0),
|
|
2292
|
+
F.value && !S.value ? (c(), w("div", po, [N("button", {
|
|
2293
2293
|
"data-testid": "condition-toggle",
|
|
2294
2294
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2295
|
-
"aria-label":
|
|
2296
|
-
title:
|
|
2297
|
-
onClick:
|
|
2298
|
-
}, [
|
|
2295
|
+
"aria-label": D(l).blockActions.conditionToggle,
|
|
2296
|
+
title: t.block.displayCondition?.label,
|
|
2297
|
+
onClick: M(Se, ["stop"])
|
|
2298
|
+
}, [U(D(Xn), {
|
|
2299
2299
|
size: 12,
|
|
2300
2300
|
"stroke-width": 2
|
|
2301
|
-
})], 8, mo)])) :
|
|
2302
|
-
|
|
2301
|
+
})], 8, mo)])) : k("", !0),
|
|
2302
|
+
he.value ? (c(), w("div", {
|
|
2303
2303
|
key: 5,
|
|
2304
|
-
class:
|
|
2305
|
-
style:
|
|
2306
|
-
}, [
|
|
2304
|
+
class: O(["tpl-section-wrapper tpl-email-surface", D(Ni)(he.value)]),
|
|
2305
|
+
style: L(he.value)
|
|
2306
|
+
}, [ge.value ? (c(), w("div", {
|
|
2307
2307
|
key: 0,
|
|
2308
2308
|
class: "tpl-band-frame",
|
|
2309
|
-
style:
|
|
2310
|
-
}, [
|
|
2311
|
-
class:
|
|
2312
|
-
style:
|
|
2313
|
-
}, [
|
|
2309
|
+
style: L(_e.value)
|
|
2310
|
+
}, [N("div", {
|
|
2311
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
|
|
2312
|
+
style: L(Q.value)
|
|
2313
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (c(), w("div", {
|
|
2314
2314
|
key: 1,
|
|
2315
|
-
class:
|
|
2316
|
-
style:
|
|
2317
|
-
}, [
|
|
2315
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
|
|
2316
|
+
style: L(Q.value)
|
|
2317
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (c(), w("div", {
|
|
2318
2318
|
key: 6,
|
|
2319
|
-
class:
|
|
2320
|
-
style:
|
|
2321
|
-
}, [
|
|
2319
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
|
|
2320
|
+
style: L(Q.value)
|
|
2321
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2322
2322
|
], 10, no));
|
|
2323
2323
|
}
|
|
2324
2324
|
}), [["__scopeId", "data-v-872194d3"]]);
|
|
@@ -2326,7 +2326,7 @@ var La = [
|
|
|
2326
2326
|
function go(e) {
|
|
2327
2327
|
let t = /^\s*<p\b/.exec(e);
|
|
2328
2328
|
if (!t) return e;
|
|
2329
|
-
let n =
|
|
2329
|
+
let n = Ue(e, t[0].length);
|
|
2330
2330
|
if (n === -1) return e;
|
|
2331
2331
|
let r = /<\/p>\s*$/.exec(e);
|
|
2332
2332
|
if (!r || r.index <= n) return e;
|
|
@@ -2334,38 +2334,38 @@ function go(e) {
|
|
|
2334
2334
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2335
2335
|
}
|
|
2336
2336
|
// src/components/blocks/TitleBlock.vue
|
|
2337
|
-
var _o = /* @__PURE__ */
|
|
2337
|
+
var _o = /* @__PURE__ */ o({
|
|
2338
2338
|
__name: "TitleBlock",
|
|
2339
2339
|
props: {
|
|
2340
2340
|
block: {},
|
|
2341
2341
|
viewport: {}
|
|
2342
2342
|
},
|
|
2343
2343
|
setup(e) {
|
|
2344
|
-
let
|
|
2344
|
+
let t = e, n = b(() => import("./TitleEditor-CzPkkL2s.js")), r = fn(Kt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = ja(() => t.block.content), f = I(() => {
|
|
2345
2345
|
let e = {
|
|
2346
|
-
fontSize: `${
|
|
2347
|
-
lineHeight: String(
|
|
2346
|
+
fontSize: `${at[t.block.level]}px`,
|
|
2347
|
+
lineHeight: String(je),
|
|
2348
2348
|
fontWeight: "700",
|
|
2349
|
-
textAlign:
|
|
2349
|
+
textAlign: t.block.textAlign
|
|
2350
2350
|
};
|
|
2351
|
-
return
|
|
2352
|
-
}), p =
|
|
2353
|
-
return (
|
|
2351
|
+
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2352
|
+
}), p = I(() => `h${t.block.level}`), m = I(() => Wn(go(l.value)));
|
|
2353
|
+
return (t, r) => (c(), w("div", {
|
|
2354
2354
|
ref_key: "blockRef",
|
|
2355
|
-
ref:
|
|
2355
|
+
ref: o,
|
|
2356
2356
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2357
|
-
style:
|
|
2358
|
-
onDblclick:
|
|
2359
|
-
}, [
|
|
2357
|
+
style: L(f.value),
|
|
2358
|
+
onDblclick: r[0] ||= (...e) => D(u) && D(u)(...e)
|
|
2359
|
+
}, [D(i) ? (c(), A(D(n), {
|
|
2360
2360
|
key: 0,
|
|
2361
2361
|
block: e.block,
|
|
2362
|
-
"toolbar-position":
|
|
2363
|
-
onDone:
|
|
2362
|
+
"toolbar-position": D(s),
|
|
2363
|
+
onDone: D(d)
|
|
2364
2364
|
}, null, 8, [
|
|
2365
2365
|
"block",
|
|
2366
2366
|
"toolbar-position",
|
|
2367
2367
|
"onDone"
|
|
2368
|
-
])) : (
|
|
2368
|
+
])) : (c(), A(a(p.value), {
|
|
2369
2369
|
key: 1,
|
|
2370
2370
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
2371
2371
|
style: {
|
|
@@ -2377,12 +2377,12 @@ var _o = /* @__PURE__ */ n({
|
|
|
2377
2377
|
}
|
|
2378
2378
|
}), vo = "hero", yo = "#1f2937", bo = "#ffffff";
|
|
2379
2379
|
function xo(e, t) {
|
|
2380
|
-
let n =
|
|
2380
|
+
let n = ut("title", e);
|
|
2381
2381
|
n.color = bo, n.textAlign = "center";
|
|
2382
|
-
let r =
|
|
2382
|
+
let r = ut("paragraph", e);
|
|
2383
2383
|
r.content = `<p style="text-align: center"><span style="color: ${bo}">${So(t)}</span></p>`;
|
|
2384
|
-
let i =
|
|
2385
|
-
return i.align = "center",
|
|
2384
|
+
let i = ut("button", e);
|
|
2385
|
+
return i.align = "center", he({
|
|
2386
2386
|
columns: "1",
|
|
2387
2387
|
children: [[
|
|
2388
2388
|
n,
|
|
@@ -2421,30 +2421,30 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2421
2421
|
key: 0,
|
|
2422
2422
|
"data-testid": "section-drop-hint",
|
|
2423
2423
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
2424
|
-
}, Oo = /* @__PURE__ */
|
|
2424
|
+
}, Oo = /* @__PURE__ */ o({
|
|
2425
2425
|
__name: "SectionBlock",
|
|
2426
2426
|
props: {
|
|
2427
2427
|
block: {},
|
|
2428
2428
|
sourceBlock: {},
|
|
2429
2429
|
viewport: {}
|
|
2430
2430
|
},
|
|
2431
|
-
setup(
|
|
2432
|
-
let
|
|
2431
|
+
setup(e) {
|
|
2432
|
+
let t = {
|
|
2433
2433
|
title: _o,
|
|
2434
2434
|
paragraph: Na,
|
|
2435
2435
|
image: Ea,
|
|
2436
2436
|
button: Ji,
|
|
2437
2437
|
divider: ca,
|
|
2438
2438
|
custom: oa
|
|
2439
|
-
},
|
|
2440
|
-
|
|
2441
|
-
let
|
|
2442
|
-
function
|
|
2439
|
+
}, n = e, { t: r } = W(), o = fn(hn, "SectionBlock"), { displayBlock: s } = vt(o), u = I(() => n.sourceBlock ?? n.block), m = g(Qt, I(() => /* @__PURE__ */ new Set()));
|
|
2440
|
+
d(Qt, I(() => /* @__PURE__ */ new Set([...m.value, ...Object.entries(u.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
2441
|
+
let h = g(rn, null), _ = g(nn, null), v = g(Jt, {}), y = g(Wt, null);
|
|
2442
|
+
function b(e) {
|
|
2443
2443
|
let t = v.savedBlocks;
|
|
2444
|
-
t?.isPicking.value ? t.togglePick(
|
|
2444
|
+
t?.isPicking.value ? t.togglePick(n.block.id) : o.selectBlock(e);
|
|
2445
2445
|
}
|
|
2446
|
-
let
|
|
2447
|
-
switch (
|
|
2446
|
+
let x = I(() => {
|
|
2447
|
+
switch (n.block.columns) {
|
|
2448
2448
|
case "2": return ["50%", "50%"];
|
|
2449
2449
|
case "3": return [
|
|
2450
2450
|
"33.33%",
|
|
@@ -2468,57 +2468,57 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2468
2468
|
];
|
|
2469
2469
|
default: return ["100%"];
|
|
2470
2470
|
}
|
|
2471
|
-
}),
|
|
2472
|
-
let e =
|
|
2471
|
+
}), S = I(() => {
|
|
2472
|
+
let e = x.value.length, t = [...(o.state.previewMode ? n.block : u.value).children];
|
|
2473
2473
|
for (; t.length < e;) t.push([]);
|
|
2474
2474
|
return t.slice(0, e);
|
|
2475
|
-
}),
|
|
2476
|
-
function
|
|
2477
|
-
return
|
|
2475
|
+
}), C = I(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
|
|
2476
|
+
function T(e) {
|
|
2477
|
+
return S.value[e] || [];
|
|
2478
2478
|
}
|
|
2479
|
-
function
|
|
2480
|
-
return y?.value === !1 || !
|
|
2479
|
+
function E(e) {
|
|
2480
|
+
return y?.value === !1 || !h?.isHidden(e);
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2483
|
-
return !
|
|
2482
|
+
function ee(e) {
|
|
2483
|
+
return !T(e).some((e) => E(e.id));
|
|
2484
2484
|
}
|
|
2485
|
-
let
|
|
2486
|
-
function
|
|
2487
|
-
return
|
|
2485
|
+
let j = V(null);
|
|
2486
|
+
function M(e) {
|
|
2487
|
+
return o.state.previewMode ? !1 : ee(e) ? !0 : j.value === e && T(e).filter((e) => E(e.id)).length <= 1;
|
|
2488
2488
|
}
|
|
2489
|
-
let
|
|
2490
|
-
if (
|
|
2491
|
-
let e =
|
|
2489
|
+
let F = I(() => {
|
|
2490
|
+
if (o.state.previewMode) return !1;
|
|
2491
|
+
let e = it(n.block);
|
|
2492
2492
|
return e !== null && !e.applied && e.reason === "image";
|
|
2493
2493
|
});
|
|
2494
|
-
function
|
|
2495
|
-
return
|
|
2494
|
+
function R(e) {
|
|
2495
|
+
return T(e).length === 0 && !o.state.previewMode;
|
|
2496
2496
|
}
|
|
2497
|
-
function
|
|
2498
|
-
return
|
|
2497
|
+
function B(e) {
|
|
2498
|
+
return T(e).length === 0 && o.state.previewMode;
|
|
2499
2499
|
}
|
|
2500
|
-
function
|
|
2501
|
-
Pa(
|
|
2500
|
+
function ne(e, t) {
|
|
2501
|
+
Pa(o, t, n.block.id, e);
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2504
|
-
return Oi(e, _,
|
|
2503
|
+
function G(e) {
|
|
2504
|
+
return Oi(e, _, t);
|
|
2505
2505
|
}
|
|
2506
|
-
function
|
|
2507
|
-
e.type === "custom" &&
|
|
2506
|
+
function re(e, t) {
|
|
2507
|
+
e.type === "custom" && o.updateBlock(e.id, {
|
|
2508
2508
|
fieldValues: t.fieldValues,
|
|
2509
2509
|
dataSourceFetched: t.dataSourceFetched
|
|
2510
2510
|
});
|
|
2511
2511
|
}
|
|
2512
|
-
return (
|
|
2513
|
-
key:
|
|
2514
|
-
class:
|
|
2515
|
-
style:
|
|
2516
|
-
}, [
|
|
2517
|
-
"model-value":
|
|
2512
|
+
return (t, u) => (c(), w("div", To, [F.value ? (c(), w("div", Eo, [N("span", null, P(D(r).section.heroAddImage), 1)])) : k("", !0), N("div", { class: O(["tpl:flex tpl:gap-0", { "tpl:flex-col": C.value }]) }, [(c(!0), w(H, null, p(S.value, (t, d) => (c(), w("div", {
|
|
2513
|
+
key: d,
|
|
2514
|
+
class: O(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", R(d) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2515
|
+
style: L({ width: C.value ? "100%" : x.value[d] })
|
|
2516
|
+
}, [U(D(te), {
|
|
2517
|
+
"model-value": T(d),
|
|
2518
2518
|
group: {
|
|
2519
2519
|
name: "blocks",
|
|
2520
2520
|
pull: !0,
|
|
2521
|
-
put: (e, t, n) =>
|
|
2521
|
+
put: (e, t, n) => D(wo)(n)
|
|
2522
2522
|
},
|
|
2523
2523
|
animation: 150,
|
|
2524
2524
|
"ghost-class": "tpl-ghost",
|
|
@@ -2528,28 +2528,28 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2528
2528
|
"inverted-swap-threshold": .65,
|
|
2529
2529
|
"empty-insert-threshold": 20,
|
|
2530
2530
|
"force-fallback": !0,
|
|
2531
|
-
class:
|
|
2532
|
-
"tpl:min-h-[60px]":
|
|
2533
|
-
"tpl:min-h-[34px]":
|
|
2531
|
+
class: O(["tpl:grow", {
|
|
2532
|
+
"tpl:min-h-[60px]": M(d),
|
|
2533
|
+
"tpl:min-h-[34px]": B(d)
|
|
2534
2534
|
}]),
|
|
2535
|
-
onUpdate: (e) =>
|
|
2536
|
-
onStart: (e) =>
|
|
2537
|
-
onEnd:
|
|
2538
|
-
"onUpdate:modelValue": (e) =>
|
|
2535
|
+
onUpdate: (e) => D(Pa)(D(o), T(d), n.block.id, d, e),
|
|
2536
|
+
onStart: (e) => j.value = d,
|
|
2537
|
+
onEnd: u[0] ||= (e) => j.value = null,
|
|
2538
|
+
"onUpdate:modelValue": (e) => ne(d, e)
|
|
2539
2539
|
}, {
|
|
2540
|
-
default:
|
|
2541
|
-
block:
|
|
2542
|
-
"display-block":
|
|
2543
|
-
"is-selected":
|
|
2544
|
-
viewport:
|
|
2545
|
-
"preview-mode":
|
|
2540
|
+
default: l(() => [(c(!0), w(H, null, p(T(d), (t) => f((c(), w("div", { key: t.id }, [U(ho, {
|
|
2541
|
+
block: t,
|
|
2542
|
+
"display-block": D(s)(t),
|
|
2543
|
+
"is-selected": D(o).state.selectedBlockId === t.id,
|
|
2544
|
+
viewport: e.viewport,
|
|
2545
|
+
"preview-mode": D(o).state.previewMode,
|
|
2546
2546
|
nested: "",
|
|
2547
|
-
onSelect: (e) =>
|
|
2547
|
+
onSelect: (e) => b(t.id)
|
|
2548
2548
|
}, {
|
|
2549
|
-
default:
|
|
2550
|
-
viewport:
|
|
2551
|
-
onFetchData: (e) =>
|
|
2552
|
-
onUpdate: (e) =>
|
|
2549
|
+
default: l(() => [(c(), A(a(G(t)), i({ block: D(s)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
|
|
2550
|
+
viewport: e.viewport,
|
|
2551
|
+
onFetchData: (e) => re(t, e),
|
|
2552
|
+
onUpdate: (e) => D(o).updateBlock(t.id, e)
|
|
2553
2553
|
}), null, 16, [
|
|
2554
2554
|
"block",
|
|
2555
2555
|
"viewport",
|
|
@@ -2564,7 +2564,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2564
2564
|
"viewport",
|
|
2565
2565
|
"preview-mode",
|
|
2566
2566
|
"onSelect"
|
|
2567
|
-
])])), [[
|
|
2567
|
+
])])), [[z, E(t.id)]])), 128))]),
|
|
2568
2568
|
_: 2
|
|
2569
2569
|
}, 1032, [
|
|
2570
2570
|
"model-value",
|
|
@@ -2573,14 +2573,14 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2573
2573
|
"onUpdate",
|
|
2574
2574
|
"onStart",
|
|
2575
2575
|
"onUpdate:modelValue"
|
|
2576
|
-
]),
|
|
2576
|
+
]), R(d) ? (c(), w("div", Do, [N("span", null, P(D(r).section.dropHere), 1)])) : k("", !0)], 6))), 128))], 2)]));
|
|
2577
2577
|
}
|
|
2578
2578
|
}), ko = ["width", "height"], Ao = [
|
|
2579
2579
|
"d",
|
|
2580
2580
|
"stroke",
|
|
2581
2581
|
"stroke-opacity",
|
|
2582
2582
|
"stroke-width"
|
|
2583
|
-
], jo = ["d", "fill"], Mo = /* @__PURE__ */
|
|
2583
|
+
], jo = ["d", "fill"], Mo = /* @__PURE__ */ o({
|
|
2584
2584
|
__name: "SocialIconSvg",
|
|
2585
2585
|
props: {
|
|
2586
2586
|
platform: {},
|
|
@@ -2589,14 +2589,14 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2589
2589
|
iconSize: {}
|
|
2590
2590
|
},
|
|
2591
2591
|
setup(e) {
|
|
2592
|
-
let t = e, n =
|
|
2592
|
+
let t = e, n = I(() => Mn[t.platform]), r = I(() => Pn[t.iconSize]), i = I(() => qe(t.platform, t.iconTone)), a = I(() => Me(t.iconStyle, t.iconTone)), o = I(() => {
|
|
2593
2593
|
let e = {
|
|
2594
2594
|
display: "inline-flex",
|
|
2595
2595
|
alignItems: "center",
|
|
2596
2596
|
justifyContent: "center",
|
|
2597
2597
|
width: `${r.value}px`,
|
|
2598
2598
|
height: `${r.value}px`
|
|
2599
|
-
}, n =
|
|
2599
|
+
}, n = i.value.fill;
|
|
2600
2600
|
switch (t.iconStyle) {
|
|
2601
2601
|
case "solid": return {
|
|
2602
2602
|
...e,
|
|
@@ -2608,7 +2608,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2608
2608
|
backgroundColor: "transparent",
|
|
2609
2609
|
border: `2px solid ${n}`,
|
|
2610
2610
|
borderRadius: "4px",
|
|
2611
|
-
...
|
|
2611
|
+
...a.value && { boxShadow: u(a.value) }
|
|
2612
2612
|
};
|
|
2613
2613
|
case "rounded": return {
|
|
2614
2614
|
...e,
|
|
@@ -2627,28 +2627,28 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2627
2627
|
};
|
|
2628
2628
|
default: return e;
|
|
2629
2629
|
}
|
|
2630
|
-
}),
|
|
2630
|
+
}), s = I(() => $e(t.iconStyle)), l = I(() => Math.floor(r.value * s.value));
|
|
2631
2631
|
function u(e) {
|
|
2632
2632
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2633
2633
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
2634
2634
|
}
|
|
2635
|
-
let d =
|
|
2636
|
-
return (e, t) => (
|
|
2635
|
+
let d = I(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
|
|
2636
|
+
return (e, t) => (c(), w("span", { style: L(o.value) }, [(c(), w("svg", {
|
|
2637
2637
|
width: l.value,
|
|
2638
2638
|
height: l.value,
|
|
2639
2639
|
viewBox: "0 0 24 24",
|
|
2640
2640
|
overflow: "visible",
|
|
2641
2641
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2642
|
-
}, [
|
|
2642
|
+
}, [a.value ? (c(), w("path", {
|
|
2643
2643
|
key: 0,
|
|
2644
2644
|
"data-testid": "social-icon-halo",
|
|
2645
2645
|
d: n.value.path,
|
|
2646
2646
|
fill: "none",
|
|
2647
|
-
stroke:
|
|
2648
|
-
"stroke-opacity":
|
|
2649
|
-
"stroke-width":
|
|
2647
|
+
stroke: a.value.color,
|
|
2648
|
+
"stroke-opacity": a.value.opacity,
|
|
2649
|
+
"stroke-width": a.value.width / s.value,
|
|
2650
2650
|
"stroke-linejoin": "round"
|
|
2651
|
-
}, null, 8, Ao)) :
|
|
2651
|
+
}, null, 8, Ao)) : k("", !0), N("path", {
|
|
2652
2652
|
d: n.value.path,
|
|
2653
2653
|
fill: d.value
|
|
2654
2654
|
}, null, 8, jo)], 8, ko))], 4));
|
|
@@ -2656,28 +2656,28 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2656
2656
|
}), No = { class: "tpl:w-full" }, Po = ["href"], Fo = {
|
|
2657
2657
|
key: 1,
|
|
2658
2658
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2659
|
-
}, Io = /* @__PURE__ */
|
|
2659
|
+
}, Io = /* @__PURE__ */ o({
|
|
2660
2660
|
__name: "SocialIconsBlock",
|
|
2661
2661
|
props: {
|
|
2662
2662
|
block: {},
|
|
2663
2663
|
viewport: {}
|
|
2664
2664
|
},
|
|
2665
2665
|
setup(e) {
|
|
2666
|
-
let t = e, { t: n } =
|
|
2666
|
+
let t = e, { t: n } = W(), r = I(() => ({
|
|
2667
2667
|
display: "flex",
|
|
2668
2668
|
flexWrap: "wrap",
|
|
2669
2669
|
gap: `${t.block.spacing}px`,
|
|
2670
2670
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2671
|
-
})),
|
|
2672
|
-
return (t,
|
|
2671
|
+
})), i = I(() => t.block.icons.length > 0);
|
|
2672
|
+
return (t, a) => (c(), w("div", No, [i.value ? (c(), w("div", {
|
|
2673
2673
|
key: 0,
|
|
2674
|
-
style:
|
|
2675
|
-
}, [(
|
|
2674
|
+
style: L(r.value)
|
|
2675
|
+
}, [(c(!0), w(H, null, p(e.block.icons, (t) => (c(), w("a", {
|
|
2676
2676
|
key: t.id,
|
|
2677
2677
|
href: t.url || "#",
|
|
2678
2678
|
class: "tpl:cursor-default",
|
|
2679
|
-
onClick:
|
|
2680
|
-
}, [
|
|
2679
|
+
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
2680
|
+
}, [U(Mo, {
|
|
2681
2681
|
platform: t.platform,
|
|
2682
2682
|
"icon-style": e.block.iconStyle,
|
|
2683
2683
|
"icon-tone": e.block.iconTone,
|
|
@@ -2687,7 +2687,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2687
2687
|
"icon-style",
|
|
2688
2688
|
"icon-tone",
|
|
2689
2689
|
"icon-size"
|
|
2690
|
-
])], 8, Po))), 128))], 4)) : (
|
|
2690
|
+
])], 8, Po))), 128))], 4)) : (c(), w("div", Fo, [U(D(ir), { size: 16 }), N("span", null, P(D(n).social.addIcons), 1)]))]));
|
|
2691
2691
|
}
|
|
2692
2692
|
}), Lo = { class: "tpl:w-full" }, Ro = {
|
|
2693
2693
|
key: 0,
|
|
@@ -2696,22 +2696,22 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2696
2696
|
"background-color": "var(--tpl-bg-hover)",
|
|
2697
2697
|
color: "var(--tpl-text-dim)"
|
|
2698
2698
|
}
|
|
2699
|
-
}, zo = /* @__PURE__ */
|
|
2699
|
+
}, zo = /* @__PURE__ */ o({
|
|
2700
2700
|
__name: "SpacerBlock",
|
|
2701
2701
|
props: {
|
|
2702
2702
|
block: {},
|
|
2703
2703
|
viewport: {}
|
|
2704
2704
|
},
|
|
2705
2705
|
setup(e) {
|
|
2706
|
-
let t = e, n =
|
|
2706
|
+
let t = e, n = fn(hn, "SpacerBlock"), r = I(() => ({
|
|
2707
2707
|
height: `${t.block.height}px`,
|
|
2708
2708
|
minHeight: `${t.block.height}px`,
|
|
2709
2709
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2710
2710
|
}));
|
|
2711
|
-
return (t,
|
|
2712
|
-
style:
|
|
2713
|
-
class:
|
|
2714
|
-
}, [
|
|
2711
|
+
return (t, i) => (c(), w("div", Lo, [N("div", {
|
|
2712
|
+
style: L(r.value),
|
|
2713
|
+
class: O(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !D(n).state.previewMode }])
|
|
2714
|
+
}, [D(n).state.previewMode ? k("", !0) : (c(), w("span", Ro, P(e.block.height) + "px ", 1))], 6)]));
|
|
2715
2715
|
}
|
|
2716
2716
|
}), Bo = { class: "tpl:w-full" }, Vo = { key: 0 }, Ho = [
|
|
2717
2717
|
"aria-label",
|
|
@@ -2724,7 +2724,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2724
2724
|
], Wo = {
|
|
2725
2725
|
key: 1,
|
|
2726
2726
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2727
|
-
}, Go = /*#__PURE__*/
|
|
2727
|
+
}, Go = /*#__PURE__*/ gr(/* @__PURE__ */ o({
|
|
2728
2728
|
__name: "TableBlock",
|
|
2729
2729
|
props: {
|
|
2730
2730
|
block: {},
|
|
@@ -2738,75 +2738,75 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2738
2738
|
updated(e, t) {
|
|
2739
2739
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2740
2740
|
}
|
|
2741
|
-
}, n = e, { t: r } =
|
|
2741
|
+
}, n = e, { t: r } = W(), i = fn(hn, "TableBlock"), a = fn(Kt, "TableBlock"), o = I(() => n.block.rows.length > 0), s = I(() => {
|
|
2742
2742
|
let e = {
|
|
2743
2743
|
width: "100%",
|
|
2744
2744
|
borderCollapse: "collapse",
|
|
2745
2745
|
fontSize: `${n.block.fontSize}px`,
|
|
2746
2746
|
textAlign: n.block.textAlign,
|
|
2747
|
-
fontFamily: n.block.fontFamily ?
|
|
2747
|
+
fontFamily: n.block.fontFamily ? a.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
2748
2748
|
};
|
|
2749
2749
|
return n.block.color && (e.color = n.block.color), e;
|
|
2750
|
-
}),
|
|
2750
|
+
}), l = I(() => ({
|
|
2751
2751
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
2752
2752
|
padding: `${n.block.cellPadding}px`,
|
|
2753
2753
|
textAlign: n.block.textAlign
|
|
2754
|
-
})),
|
|
2755
|
-
...
|
|
2754
|
+
})), u = I(() => ({
|
|
2755
|
+
...l.value,
|
|
2756
2756
|
fontWeight: "bold",
|
|
2757
2757
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
2758
|
-
})),
|
|
2758
|
+
})), d = I(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), m = I(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
2759
2759
|
function h() {
|
|
2760
|
-
|
|
2760
|
+
i.selectBlock(n.block.id);
|
|
2761
2761
|
}
|
|
2762
2762
|
function g(e, t, r) {
|
|
2763
|
-
let
|
|
2763
|
+
let a = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
2764
2764
|
...n,
|
|
2765
2765
|
cells: n.cells.map((e) => e.id === t ? {
|
|
2766
2766
|
...e,
|
|
2767
|
-
content:
|
|
2767
|
+
content: a
|
|
2768
2768
|
} : e)
|
|
2769
2769
|
} : n);
|
|
2770
|
-
|
|
2770
|
+
i.updateBlock(n.block.id, { rows: o });
|
|
2771
2771
|
}
|
|
2772
|
-
return (e, n) => (
|
|
2772
|
+
return (e, n) => (c(), w("div", Bo, [o.value ? (c(), w("table", {
|
|
2773
2773
|
key: 0,
|
|
2774
|
-
style:
|
|
2774
|
+
style: L(s.value),
|
|
2775
2775
|
class: "tpl-table-editable"
|
|
2776
|
-
}, [
|
|
2776
|
+
}, [d.value ? (c(), w("thead", Vo, [N("tr", null, [(c(!0), w(H, null, p(d.value.cells, (e) => f((c(), w("th", {
|
|
2777
2777
|
key: e.id,
|
|
2778
|
-
style:
|
|
2779
|
-
"aria-label":
|
|
2778
|
+
style: L(u.value),
|
|
2779
|
+
"aria-label": D(r).table.cellPlaceholder,
|
|
2780
2780
|
contenteditable: "true",
|
|
2781
|
-
"data-placeholder":
|
|
2782
|
-
onBlur: (t) => g(
|
|
2783
|
-
onKeydown: n[0] ||=
|
|
2784
|
-
onClick:
|
|
2785
|
-
}, null, 44, Ho)), [[t, e.content]])), 128))])])) :
|
|
2786
|
-
key:
|
|
2787
|
-
style:
|
|
2788
|
-
"aria-label":
|
|
2781
|
+
"data-placeholder": D(r).table.cellPlaceholder,
|
|
2782
|
+
onBlur: (t) => g(d.value.id, e.id, t),
|
|
2783
|
+
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2784
|
+
onClick: M(h, ["stop"])
|
|
2785
|
+
}, null, 44, Ho)), [[t, e.content]])), 128))])])) : k("", !0), N("tbody", null, [(c(!0), w(H, null, p(m.value, (e) => (c(), w("tr", { key: e.id }, [(c(!0), w(H, null, p(e.cells, (i) => f((c(), w("td", {
|
|
2786
|
+
key: i.id,
|
|
2787
|
+
style: L(l.value),
|
|
2788
|
+
"aria-label": D(r).table.cellPlaceholder,
|
|
2789
2789
|
contenteditable: "true",
|
|
2790
|
-
"data-placeholder":
|
|
2791
|
-
onBlur: (t) => g(e.id,
|
|
2792
|
-
onKeydown: n[1] ||=
|
|
2793
|
-
onClick:
|
|
2794
|
-
}, null, 44, Uo)), [[t,
|
|
2790
|
+
"data-placeholder": D(r).table.cellPlaceholder,
|
|
2791
|
+
onBlur: (t) => g(e.id, i.id, t),
|
|
2792
|
+
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2793
|
+
onClick: M(h, ["stop"])
|
|
2794
|
+
}, null, 44, Uo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (c(), w("div", Wo, [U(D(cr), { size: 16 }), N("span", null, P(D(r).table.empty), 1)]))]));
|
|
2795
2795
|
}
|
|
2796
|
-
}), [["__scopeId", "data-v-6751d456"]]), Ko = /* @__PURE__ */
|
|
2796
|
+
}), [["__scopeId", "data-v-6751d456"]]), Ko = /* @__PURE__ */ o({
|
|
2797
2797
|
__name: "VideoPlayButton",
|
|
2798
2798
|
props: { hoverEffect: {
|
|
2799
2799
|
type: Boolean,
|
|
2800
2800
|
default: !1
|
|
2801
2801
|
} },
|
|
2802
2802
|
setup(e) {
|
|
2803
|
-
return (t, n) => (
|
|
2803
|
+
return (t, n) => (c(), w("div", { class: O(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [N("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [N("svg", {
|
|
2804
2804
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
2805
2805
|
width: "28",
|
|
2806
2806
|
height: "28",
|
|
2807
2807
|
viewBox: "0 0 24 24",
|
|
2808
2808
|
fill: "currentColor"
|
|
2809
|
-
}, [
|
|
2809
|
+
}, [N("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
2810
2810
|
}
|
|
2811
2811
|
});
|
|
2812
2812
|
// src/utils/videoThumbnail.ts
|
|
@@ -2852,14 +2852,14 @@ var Yo = ["src", "alt"], Xo = {
|
|
|
2852
2852
|
}, Zo = ["href"], Qo = ["src", "alt"], $o = ["src", "alt"], es = {
|
|
2853
2853
|
key: 3,
|
|
2854
2854
|
class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2855
|
-
}, ts = /* @__PURE__ */
|
|
2855
|
+
}, ts = /* @__PURE__ */ o({
|
|
2856
2856
|
__name: "VideoBlock",
|
|
2857
2857
|
props: {
|
|
2858
2858
|
block: {},
|
|
2859
2859
|
viewport: {}
|
|
2860
2860
|
},
|
|
2861
2861
|
setup(e) {
|
|
2862
|
-
let t = e, { t: n } =
|
|
2862
|
+
let t = e, { t: n } = W(), { syntax: r } = G(), i = I(() => Ce(t.block.url, r) || Ce(t.block.thumbnailUrl, r)), a = Dn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Dn(() => i.value ? t.block.placeholderUrl : void 0), s = I(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Jo(t.block.url)), l = I(() => ({ textAlign: t.block.align })), u = I(() => {
|
|
2863
2863
|
let e = t.block.align;
|
|
2864
2864
|
return {
|
|
2865
2865
|
maxWidth: "100%",
|
|
@@ -2869,55 +2869,55 @@ var Yo = ["src", "alt"], Xo = {
|
|
|
2869
2869
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2870
2870
|
marginRight: e === "center" ? "auto" : void 0
|
|
2871
2871
|
};
|
|
2872
|
-
}), d =
|
|
2873
|
-
return (t, r) => (
|
|
2872
|
+
}), d = I(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = I(() => Ce(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2873
|
+
return (t, r) => (c(), w("div", {
|
|
2874
2874
|
class: "tpl:w-full",
|
|
2875
|
-
style:
|
|
2876
|
-
}, [
|
|
2875
|
+
style: L(l.value)
|
|
2876
|
+
}, [i.value && e.block.placeholderUrl ? (c(), w("div", {
|
|
2877
2877
|
key: 0,
|
|
2878
2878
|
class: "tpl:relative tpl:inline-block",
|
|
2879
|
-
style:
|
|
2880
|
-
}, [
|
|
2879
|
+
style: L(u.value)
|
|
2880
|
+
}, [N("img", {
|
|
2881
2881
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2882
|
-
src:
|
|
2882
|
+
src: D(o),
|
|
2883
2883
|
alt: e.block.alt,
|
|
2884
|
-
style:
|
|
2885
|
-
}, null, 12, Yo),
|
|
2884
|
+
style: L(d.value)
|
|
2885
|
+
}, null, 12, Yo), U(Ko)], 4)) : i.value ? (c(), w("div", {
|
|
2886
2886
|
key: 1,
|
|
2887
2887
|
class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2888
|
-
style:
|
|
2889
|
-
}, [
|
|
2888
|
+
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2889
|
+
}, [U(D(sr), {
|
|
2890
2890
|
size: 36,
|
|
2891
2891
|
"stroke-width": 1.5,
|
|
2892
2892
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2893
2893
|
style: { opacity: "0.5" }
|
|
2894
|
-
}),
|
|
2894
|
+
}), N("span", Xo, [U(Ki, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (c(), w(H, { key: 2 }, [e.block.url ? (c(), w("a", {
|
|
2895
2895
|
key: 0,
|
|
2896
2896
|
href: e.block.url,
|
|
2897
2897
|
target: "_blank",
|
|
2898
2898
|
rel: "noopener noreferrer",
|
|
2899
2899
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
2900
|
-
style:
|
|
2901
|
-
onClick: r[0] ||=
|
|
2902
|
-
}, [
|
|
2900
|
+
style: L(u.value),
|
|
2901
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
2902
|
+
}, [N("img", {
|
|
2903
2903
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2904
|
-
src:
|
|
2904
|
+
src: s.value,
|
|
2905
2905
|
alt: e.block.alt,
|
|
2906
|
-
style:
|
|
2907
|
-
}, null, 12, Qo),
|
|
2906
|
+
style: L(d.value)
|
|
2907
|
+
}, null, 12, Qo), U(Ko, { "hover-effect": "" })], 12, Zo)) : (c(), w("div", {
|
|
2908
2908
|
key: 1,
|
|
2909
2909
|
class: "tpl:relative tpl:inline-block",
|
|
2910
|
-
style:
|
|
2911
|
-
}, [
|
|
2910
|
+
style: L(u.value)
|
|
2911
|
+
}, [N("img", {
|
|
2912
2912
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2913
|
-
src:
|
|
2913
|
+
src: s.value,
|
|
2914
2914
|
alt: e.block.alt,
|
|
2915
|
-
style:
|
|
2916
|
-
}, null, 12, $o),
|
|
2915
|
+
style: L(d.value)
|
|
2916
|
+
}, null, 12, $o), U(Ko)], 4))], 64)) : (c(), w("div", es, [U(D(sr), {
|
|
2917
2917
|
size: 40,
|
|
2918
2918
|
"stroke-width": 1.5,
|
|
2919
2919
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2920
|
-
}),
|
|
2920
|
+
}), N("span", null, P(D(n).video.addVideo), 1)]))], 4));
|
|
2921
2921
|
}
|
|
2922
2922
|
}), ns = {
|
|
2923
2923
|
section: Oo,
|
|
@@ -2932,170 +2932,170 @@ var Yo = ["src", "alt"], Xo = {
|
|
|
2932
2932
|
table: Go,
|
|
2933
2933
|
spacer: zo,
|
|
2934
2934
|
html: ma,
|
|
2935
|
-
countdown:
|
|
2935
|
+
countdown: b(() => import("./CountdownBlock-8aPSExrv.js"))
|
|
2936
2936
|
};
|
|
2937
|
-
function rs(
|
|
2938
|
-
let { editor:
|
|
2937
|
+
function rs(t) {
|
|
2938
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = W(i), c = I(() => Re(Re(Re(ri(i), Ci(n.content.value.settings?.locale)), Fe(n.content.value.settings) === "rtl" ? {
|
|
2939
2939
|
title: { textAlign: "right" },
|
|
2940
2940
|
table: { textAlign: "right" }
|
|
2941
|
-
} : {}),
|
|
2942
|
-
|
|
2943
|
-
let { resolvedTheme:
|
|
2944
|
-
themeOverrides:
|
|
2945
|
-
resolvedTheme:
|
|
2941
|
+
} : {}), r.blockDefaults ?? {}));
|
|
2942
|
+
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2943
|
+
let { resolvedTheme: l } = Jr(I(() => n.state.uiTheme)), f = V(r.theme ?? {}), { themeStyles: p } = Dr({
|
|
2944
|
+
themeOverrides: f,
|
|
2945
|
+
resolvedTheme: l,
|
|
2946
2946
|
extraStyles: () => ({
|
|
2947
|
-
"--tpl-drop-text": `"${
|
|
2948
|
-
...
|
|
2947
|
+
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2948
|
+
...t.themeExtraStyles?.()
|
|
2949
2949
|
})
|
|
2950
|
-
}),
|
|
2951
|
-
content:
|
|
2952
|
-
setContent: (e,
|
|
2950
|
+
}), m = t.history ?? xn({
|
|
2951
|
+
content: n.content,
|
|
2952
|
+
setContent: (e, t) => n.setContent(e, t)
|
|
2953
2953
|
});
|
|
2954
|
-
|
|
2955
|
-
let h =
|
|
2956
|
-
addBlock:
|
|
2957
|
-
removeBlock:
|
|
2958
|
-
updateBlock:
|
|
2959
|
-
selectBlock:
|
|
2960
|
-
findBlockLocation:
|
|
2961
|
-
blockDefaults: () =>
|
|
2962
|
-
}), g =
|
|
2963
|
-
content:
|
|
2964
|
-
isDirty: () =>
|
|
2965
|
-
...
|
|
2966
|
-
}) : null,
|
|
2967
|
-
_ && (
|
|
2954
|
+
t.history || Tn(n, m);
|
|
2955
|
+
let h = Bn({
|
|
2956
|
+
addBlock: n.addBlock,
|
|
2957
|
+
removeBlock: n.removeBlock,
|
|
2958
|
+
updateBlock: n.updateBlock,
|
|
2959
|
+
selectBlock: n.selectBlock,
|
|
2960
|
+
findBlockLocation: n.findBlockLocation,
|
|
2961
|
+
blockDefaults: () => c.value
|
|
2962
|
+
}), g = wn(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? En({
|
|
2963
|
+
content: n.content,
|
|
2964
|
+
isDirty: () => n.state.isDirty,
|
|
2965
|
+
...t.autoSaveOptions
|
|
2966
|
+
}) : null, y = null;
|
|
2967
|
+
_ && (y = u(m.isNavigating, (e) => {
|
|
2968
2968
|
e ? _.pause() : _.resume();
|
|
2969
2969
|
}));
|
|
2970
|
-
let b = qr(
|
|
2971
|
-
t:
|
|
2972
|
-
format:
|
|
2973
|
-
},
|
|
2970
|
+
let b = qr(n, {
|
|
2971
|
+
t: o,
|
|
2972
|
+
format: s
|
|
2973
|
+
}, r.customBlocks ?? []), x = mt(r.colors);
|
|
2974
2974
|
if (x.allowCustomIgnored && $.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), x.invalidPresets.length > 0 && $.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
|
|
2975
|
-
let e = ni(x.presets,
|
|
2975
|
+
let e = ni(x.presets, r.blockDefaults, r.templateDefaults);
|
|
2976
2976
|
e.length > 0 && $.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
2977
2977
|
}
|
|
2978
|
-
let S =
|
|
2979
|
-
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${
|
|
2980
|
-
let
|
|
2981
|
-
$r(
|
|
2982
|
-
let
|
|
2983
|
-
function
|
|
2978
|
+
let S = Vn(r.templateSettings);
|
|
2979
|
+
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Hn.join(", ")}) — skipping it.`);
|
|
2980
|
+
let w = xr();
|
|
2981
|
+
$r(w, ns);
|
|
2982
|
+
let T = /* @__PURE__ */ new Set();
|
|
2983
|
+
function E(e) {
|
|
2984
2984
|
for (let t of e) {
|
|
2985
|
-
|
|
2986
|
-
for (let e of wi(t, x))
|
|
2985
|
+
w.registerCustom(t, oa);
|
|
2986
|
+
for (let e of wi(t, x)) T.has(e.id) || (T.add(e.id), $.warn(e.message));
|
|
2987
2987
|
}
|
|
2988
2988
|
}
|
|
2989
|
-
|
|
2990
|
-
let
|
|
2991
|
-
if (
|
|
2992
|
-
let
|
|
2993
|
-
|
|
2994
|
-
let
|
|
2995
|
-
|
|
2989
|
+
r.customBlocks?.length && E(r.customBlocks);
|
|
2990
|
+
let D = Rr();
|
|
2991
|
+
if (C() && v(D.dispose), t.containerEl) {
|
|
2992
|
+
let n = t.containerEl;
|
|
2993
|
+
e(document, "pointerdown", (e) => {
|
|
2994
|
+
let t = n.value;
|
|
2995
|
+
t && (e.composedPath?.() ?? []).includes(t) && D.claim();
|
|
2996
2996
|
}, { capture: !0 });
|
|
2997
2997
|
}
|
|
2998
|
-
function
|
|
2999
|
-
let
|
|
3000
|
-
|
|
3001
|
-
}
|
|
3002
|
-
function
|
|
3003
|
-
|
|
3004
|
-
history:
|
|
3005
|
-
selectBlock: (e) =>
|
|
3006
|
-
getSelectedBlockId: () =>
|
|
3007
|
-
removeBlock: (e) =>
|
|
3008
|
-
onSave:
|
|
3009
|
-
isPicking: () =>
|
|
3010
|
-
onConfirmPick: () =>
|
|
3011
|
-
onCancelPick: () =>
|
|
2998
|
+
function O() {
|
|
2999
|
+
let e = t.capabilities?.templates;
|
|
3000
|
+
e ? e.save() : _?.flush();
|
|
3001
|
+
}
|
|
3002
|
+
function ee(e) {
|
|
3003
|
+
D.isActive() && Ei(e, {
|
|
3004
|
+
history: m,
|
|
3005
|
+
selectBlock: (e) => n.selectBlock(e),
|
|
3006
|
+
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
3007
|
+
removeBlock: (e) => n.removeBlock(e),
|
|
3008
|
+
onSave: O,
|
|
3009
|
+
isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
3010
|
+
onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
|
|
3011
|
+
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
3012
3012
|
});
|
|
3013
3013
|
}
|
|
3014
|
-
|
|
3015
|
-
let k =
|
|
3016
|
-
|
|
3017
|
-
let j =
|
|
3014
|
+
e(document, "keydown", ee);
|
|
3015
|
+
let k = V(null), A = t.editorRoot ?? document;
|
|
3016
|
+
d(vn, A), d(cn, k), d(Ct, /* @__PURE__ */ new Map()), d(an, i), d(hn, n), d(_n, m), d(dn, h), d(rn, g), d(Kt, a), d(pn, p), d(Gt, l), d(qt, c), d($t, r.locale), d(nn, w), d(Zt, r.customBlocks ?? []), d(kt, r.paletteBlocks), d(It, ei(r.htmlBlockPreview)), d(Lt, r.layout), d(Ht, r.sectionWrapper), d(sn, x), d(Yt, S.fields), d(Xt, Yr(n.content, w));
|
|
3017
|
+
let j = nt(r.mergeTags?.syntax);
|
|
3018
3018
|
for (let e of ["opener", "closer"]) {
|
|
3019
3019
|
let t = j[e];
|
|
3020
3020
|
typeof t == "string" && t.trim() === "" && $.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
3021
3021
|
}
|
|
3022
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
3023
|
-
let M =
|
|
3024
|
-
function
|
|
3022
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && Te(j) === null && $.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
3023
|
+
let M = R(r.mergeTags?.tags ?? []);
|
|
3024
|
+
function N(e) {
|
|
3025
3025
|
Array.isArray(e) ? M.value = e : $.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
3026
3026
|
}
|
|
3027
|
-
|
|
3028
|
-
let
|
|
3029
|
-
|
|
3030
|
-
let
|
|
3031
|
-
resolvePreview:
|
|
3027
|
+
d(Pt, M), d(xt, j), d(Tt, r.mergeTags?.onRequest ?? null), d(wt, r.mergeTags?.autocomplete !== !1), d(yn, r.mergeTags?.showRawValue !== !1);
|
|
3028
|
+
let P = V(we(r.mergeTags?.tags ?? []));
|
|
3029
|
+
d(Ft, P);
|
|
3030
|
+
let F = Vr({
|
|
3031
|
+
resolvePreview: r.resolvePreview,
|
|
3032
3032
|
getContent: () => {
|
|
3033
|
-
let e =
|
|
3034
|
-
if (!
|
|
3035
|
-
let
|
|
3036
|
-
return
|
|
3033
|
+
let e = n.content.value;
|
|
3034
|
+
if (!n.state.previewMode) return e;
|
|
3035
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = ve(e, t);
|
|
3036
|
+
return r.layout ? Je(ve(r.layout, t, { missing: "default" }), i) : i;
|
|
3037
3037
|
},
|
|
3038
|
-
isActive: () =>
|
|
3039
|
-
getLocale: () =>
|
|
3038
|
+
isActive: () => n.state.previewMode,
|
|
3039
|
+
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
3040
3040
|
});
|
|
3041
|
-
|
|
3042
|
-
let
|
|
3043
|
-
|
|
3044
|
-
let
|
|
3045
|
-
|
|
3046
|
-
let
|
|
3047
|
-
content:
|
|
3041
|
+
d(Ot, F), d(Vt, r.resolvePreview);
|
|
3042
|
+
let L = I(() => !(n.state.previewMode && F.isConfigured));
|
|
3043
|
+
d(Wt, L);
|
|
3044
|
+
let z = Hr();
|
|
3045
|
+
d(Dt, z), d(At, V(!1)), d(Mt, V(!1)), d(en, r.logicTags?.tags ?? []), d(bt, r.logicTags?.pairs ?? []), d(Rt, r.logicTags?.onRequest ?? null), d(jt, Ur()), d(Bt, r.onRequestMedia ?? null), d(mn, r.canDropMedia ?? null), d(St, r.resolveImageUrl ? Rn(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && $.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), d(Ut, r.displayConditions?.conditions ?? []), d(ln, r.displayConditions?.allowCustom ?? !1), d(Et, r.displayConditions?.onRequest ?? null), d(Jt, t.capabilities ?? {}), d(gn, b);
|
|
3046
|
+
let B = Wr(r.lint) ? null : Kr({
|
|
3047
|
+
content: n.content,
|
|
3048
3048
|
get options() {
|
|
3049
3049
|
return zr({
|
|
3050
|
-
...
|
|
3051
|
-
content:
|
|
3052
|
-
contentLocale:
|
|
3050
|
+
...r,
|
|
3051
|
+
content: n.content.value,
|
|
3052
|
+
contentLocale: n.activeLocale?.value ?? void 0
|
|
3053
3053
|
});
|
|
3054
3054
|
},
|
|
3055
|
-
customBlocks:
|
|
3055
|
+
customBlocks: r.customBlocks,
|
|
3056
3056
|
mergeTagSyntax: j,
|
|
3057
|
-
updateBlock:
|
|
3058
|
-
updateSettings:
|
|
3059
|
-
removeBlock:
|
|
3057
|
+
updateBlock: n.updateBlock,
|
|
3058
|
+
updateSettings: n.updateSettings,
|
|
3059
|
+
removeBlock: n.removeBlock
|
|
3060
3060
|
});
|
|
3061
|
-
|
|
3062
|
-
function
|
|
3063
|
-
|
|
3061
|
+
d(yt, B);
|
|
3062
|
+
function te() {
|
|
3063
|
+
y?.(), B?.destroy(), _?.destroy(), m.destroy();
|
|
3064
3064
|
}
|
|
3065
3065
|
return {
|
|
3066
|
-
t:
|
|
3067
|
-
format:
|
|
3066
|
+
t: o,
|
|
3067
|
+
format: s,
|
|
3068
3068
|
editorRoot: A,
|
|
3069
|
-
history:
|
|
3069
|
+
history: m,
|
|
3070
3070
|
blockActions: h,
|
|
3071
3071
|
conditionPreview: g,
|
|
3072
3072
|
autoSave: _,
|
|
3073
|
-
resolvedTheme:
|
|
3074
|
-
themeStyles:
|
|
3075
|
-
themeOverrides:
|
|
3076
|
-
registry:
|
|
3073
|
+
resolvedTheme: l,
|
|
3074
|
+
themeStyles: p,
|
|
3075
|
+
themeOverrides: f,
|
|
3076
|
+
registry: w,
|
|
3077
3077
|
keyboardReorder: b,
|
|
3078
|
-
templateLint:
|
|
3078
|
+
templateLint: B,
|
|
3079
3079
|
popoverRoot: k,
|
|
3080
|
-
mergeTagSampleMode:
|
|
3081
|
-
previewResolution:
|
|
3082
|
-
appliesConditionFilter:
|
|
3083
|
-
registerCustomBlocks:
|
|
3084
|
-
setMergeTags:
|
|
3080
|
+
mergeTagSampleMode: P,
|
|
3081
|
+
previewResolution: F,
|
|
3082
|
+
appliesConditionFilter: L,
|
|
3083
|
+
registerCustomBlocks: E,
|
|
3084
|
+
setMergeTags: N,
|
|
3085
3085
|
mergeTags: M,
|
|
3086
3086
|
mergeTagSyntax: j,
|
|
3087
|
-
destroy:
|
|
3087
|
+
destroy: te
|
|
3088
3088
|
};
|
|
3089
3089
|
}
|
|
3090
3090
|
// src/composables/useSmallScreenNotice.ts
|
|
3091
3091
|
var is = "(max-width: 767px)";
|
|
3092
3092
|
function as(e) {
|
|
3093
|
-
let
|
|
3093
|
+
let n = t(is);
|
|
3094
3094
|
return {
|
|
3095
|
-
isSmallScreen:
|
|
3096
|
-
showNotice:
|
|
3095
|
+
isSmallScreen: n,
|
|
3096
|
+
showNotice: I(() => (F(e) ?? !0) && n.value)
|
|
3097
3097
|
};
|
|
3098
3098
|
}
|
|
3099
3099
|
export { yi as A, Tr as B, Hi as C, Wi as D, Di as E, mi as F, yr as H, Vr as I, zr as L, _i as M, gi as N, Oi as O, hi as P, Pr as R, Ni as S, Ri as T, br as V, ca as _, zo as a, Ji as b, vo as c, ho as d, Pa as f, ma as g, Ea as h, Go as i, vi as j, di as k, xo as l, Aa as m, rs as n, Io as o, Na as p, ts as r, Oo as s, as as t, _o as u, oa as v, Li as w, Ai as x, Zi as y, Mr as z };
|
|
3100
3100
|
|
|
3101
|
-
//# sourceMappingURL=composables-
|
|
3101
|
+
//# sourceMappingURL=composables-D3lsO7Io.js.map
|