@templatical/editor 0.59.1 → 0.59.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-CwyKz_9U.js → AiAltTextPopover-BhWHOOKX.js} +3 -3
- package/dist/{AiAltTextReview-DNFnR1PN.js → AiAltTextReview-CmW7pLmo.js} +3 -3
- package/dist/{AiChatPanel-DWWVvJIP.js → AiChatPanel-CV0mCtad.js} +2 -2
- package/dist/{AiPanels-CESbBB63.js → AiPanels-C8M7q_vM.js} +1 -1
- package/dist/{AiRewriteMenu-DH6j1jOA.js → AiRewriteMenu-DC2ZLH5L.js} +7 -7
- package/dist/{BlockIssueBadge-3k568_Od.js → BlockIssueBadge-B8sl9BM1.js} +2 -2
- package/dist/{BlockPreviewCanvas-BLJxLwTT.js → BlockPreviewCanvas-yhOQAQhJ.js} +22 -18
- package/dist/{CloudHeaderExtras-xrHubAHL.js → CloudHeaderExtras-DC_oNrxz.js} +1 -1
- package/dist/{CloudPanels-qW-MObRD.js → CloudPanels-CD0lsL0R.js} +2 -2
- package/dist/{CollaborationNotices-D9GQ477K.js → CollaborationNotices-DrMrP73M.js} +1 -1
- package/dist/{CollaboratorBar-DsRjAaqd.js → CollaboratorBar-TsK872uC.js} +1 -1
- package/dist/{CommentsPanel-lb-IFzjl.js → CommentsPanel-BX8JVrXU.js} +1 -1
- package/dist/{CommentsSidebar-CVVTCWBH.js → CommentsSidebar-BUlseNwL.js} +2 -2
- package/dist/{CountdownBlock-CSEq79Nc.js → CountdownBlock-AYPypmcX.js} +2 -2
- package/dist/{CountdownToolbar-BV9yQi9k.js → CountdownToolbar-dx3FVRjh.js} +5 -5
- package/dist/{IssuesPanel-pxcWAQJM.js → IssuesPanel-BwnvXxBC.js} +5 -5
- package/dist/{LanguageMenu-D_xbvq3D.js → LanguageMenu-Cf5bKocE.js} +5 -5
- package/dist/{LocaleNotices-j4aMFfmc.js → LocaleNotices-CGEp0pQ8.js} +2 -2
- package/dist/{LogicTagInsertButton-BDIsyl3C.js → LogicTagInsertButton-BdDe-vrZ.js} +8 -8
- package/dist/{MergeTagInput-De1yWoc2.js → MergeTagInput-CTTi-eB0.js} +1 -1
- package/dist/{MergeTagModeToggle-CL96pI1E.js → MergeTagModeToggle-Bd0svGQm.js} +3 -3
- package/dist/{MergeTagTextarea-DDyV8U44.js → MergeTagTextarea-DiahMV-3.js} +4 -4
- package/dist/{ParagraphEditor-DpOsnnai.js → ParagraphEditor-Db1cmj8Y.js} +11 -11
- package/dist/{RestoreVersionDialog-JQEkVIh5.js → RestoreVersionDialog-DA1Z0q9Z.js} +2 -2
- package/dist/{RichTextEditorContent-C2Yj1-ZA.js → RichTextEditorContent-CyO6e4ZG.js} +6 -6
- package/dist/{SaveBlockDialog-BPf6tDhg.js → SaveBlockDialog-D7SaFxa_.js} +6 -6
- package/dist/{SavedBlocksBrowserModal-DnDCfwSv.js → SavedBlocksBrowserModal-B5r3LWWG.js} +6 -6
- package/dist/{SavedBlocksPanels-D5YaVCem.js → SavedBlocksPanels-BH2f7jm-.js} +1 -1
- package/dist/{SavedBlocksPickBar-OQ7ey3MD.js → SavedBlocksPickBar-B24TScw0.js} +2 -2
- package/dist/{TemplateSettings-CBCaybvd.js → TemplateSettings-CuN9Vkl_.js} +8 -8
- package/dist/{TestEmailModal-BDp85wIp.js → TestEmailModal-C4DAaohi.js} +11 -9
- package/dist/{TestEmailPanel-DkJx0Ptk.js → TestEmailPanel-DoMcVJSE.js} +1 -1
- package/dist/{TitleEditor-wzknZqu_.js → TitleEditor-b5Pr_m9j.js} +8 -8
- package/dist/{Toolbar-FIYSw3Us.js → Toolbar-BOf7Y862.js} +14 -14
- package/dist/{TplModal-C57J-uF0.js → TplModal-DAcXzBJh.js} +4 -4
- package/dist/{VersionHistoryMenu-6jMve6By.js → VersionHistoryMenu-TbIGteNi.js} +2 -2
- package/dist/{VersionHistoryPanels-BZ0GT52h.js → VersionHistoryPanels-Ia6ipOqG.js} +1 -1
- package/dist/{VersionPreviewBanner-Bq8z1SUc.js → VersionPreviewBanner-CRfu6quf.js} +1 -1
- package/dist/{WrapperBlock-C4XrJkx5.js → WrapperBlock-BZenrXM6.js} +4 -4
- package/dist/{blockTypeIcons-VX_8UQ21.js → blockTypeIcons-DdYZy8yG.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-Dj-VLU88.js → AiAltTextPopover-CcX_OMUU.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-Dj-VLU88.js.map → AiAltTextPopover-CcX_OMUU.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-tVkJPOk6.js → AiAltTextReview-Dmm3h0jd.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextReview-tVkJPOk6.js.map → AiAltTextReview-Dmm3h0jd.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-CYPvHQGQ.js → AiChatPanel-DV23DJ-2.js} +3 -3
- package/dist/cdn/chunks/{AiChatPanel-CYPvHQGQ.js.map → AiChatPanel-DV23DJ-2.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-ChTLCmMS.js → AiPanels-CxhOpMAp.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-ChTLCmMS.js.map → AiPanels-CxhOpMAp.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-B23ozFnP.js → AiRewriteMenu-87-O514r.js} +8 -8
- package/dist/cdn/chunks/{AiRewriteMenu-B23ozFnP.js.map → AiRewriteMenu-87-O514r.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BKO4Mr8f.js → BlockIssueBadge-Dp06vQd3.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-BKO4Mr8f.js.map → BlockIssueBadge-Dp06vQd3.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CaRneMZ8.js → BlockPreviewCanvas-DQGzUvZ5.js} +23 -19
- package/dist/cdn/chunks/BlockPreviewCanvas-DQGzUvZ5.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-O_K3jmgO.js → CloudHeaderExtras-Cd-ePldd.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-O_K3jmgO.js.map → CloudHeaderExtras-Cd-ePldd.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-xAEirqNC.js → CloudPanels-D8fchoYt.js} +3 -3
- package/dist/cdn/chunks/{CloudPanels-xAEirqNC.js.map → CloudPanels-D8fchoYt.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-CwAoa-73.js → CollaborationNotices-DNEs3g9B.js} +2 -2
- package/dist/cdn/chunks/{CollaborationNotices-CwAoa-73.js.map → CollaborationNotices-DNEs3g9B.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DdQQwtwd.js → CollaboratorBar-CN6XAlbn.js} +2 -2
- package/dist/cdn/chunks/{CollaboratorBar-DdQQwtwd.js.map → CollaboratorBar-CN6XAlbn.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-C8AKtxiG.js → CommentsPanel-CxZ1kFcK.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-C8AKtxiG.js.map → CommentsPanel-CxZ1kFcK.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-FxY0RHSq.js → CommentsSidebar-DCr2mV8b.js} +3 -3
- package/dist/cdn/chunks/{CommentsSidebar-FxY0RHSq.js.map → CommentsSidebar-DCr2mV8b.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DGgnPUlu.js → CountdownBlock--hlKE2aj.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DGgnPUlu.js.map → CountdownBlock--hlKE2aj.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-9PtYUgCW.js → CountdownToolbar-CUTbVPPV.js} +6 -6
- package/dist/cdn/chunks/{CountdownToolbar-9PtYUgCW.js.map → CountdownToolbar-CUTbVPPV.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Co-ffgWa.js → IssuesPanel-BhcSzwuL.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-Co-ffgWa.js.map → IssuesPanel-BhcSzwuL.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-Cl0ajnXZ.js → LanguageMenu-6wGhkyFT.js} +99 -99
- package/dist/cdn/chunks/{LanguageMenu-Cl0ajnXZ.js.map → LanguageMenu-6wGhkyFT.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-BVDJ7kyj.js → LocaleNotices-Br92Xueo.js} +3 -3
- package/dist/cdn/chunks/{LocaleNotices-BVDJ7kyj.js.map → LocaleNotices-Br92Xueo.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DPYA8LJW.js → LogicTagInsertButton-r2EVUtDU.js} +9 -9
- package/dist/cdn/chunks/{LogicTagInsertButton-DPYA8LJW.js.map → LogicTagInsertButton-r2EVUtDU.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-Cxfjq3tx.js → MergeTagInput-Dh3N6CEV.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-Cxfjq3tx.js.map → MergeTagInput-Dh3N6CEV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BmNGV3yc.js → MergeTagModeToggle-D6u3hMrI.js} +4 -4
- package/dist/cdn/chunks/{MergeTagModeToggle-BmNGV3yc.js.map → MergeTagModeToggle-D6u3hMrI.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DmwrPAss.js → MergeTagTextarea-BpVtpiNL.js} +8 -8
- package/dist/cdn/chunks/{MergeTagTextarea-DmwrPAss.js.map → MergeTagTextarea-BpVtpiNL.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BoGELRr-.js → ParagraphEditor-DGJmPAC1.js} +12 -12
- package/dist/cdn/chunks/{ParagraphEditor-BoGELRr-.js.map → ParagraphEditor-DGJmPAC1.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-CaKiSq-9.js → RestoreVersionDialog-D5qeCa0F.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-CaKiSq-9.js.map → RestoreVersionDialog-D5qeCa0F.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Dq4TROOg.js → RichTextEditorContent-DyGiXKKI.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-Dq4TROOg.js.map → RichTextEditorContent-DyGiXKKI.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BAR0G4UO.js → SaveBlockDialog-B0TJYxd8.js} +7 -7
- package/dist/cdn/chunks/{SaveBlockDialog-BAR0G4UO.js.map → SaveBlockDialog-B0TJYxd8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C-KYaLkQ.js → SavedBlocksBrowserModal-D8Ly7LrA.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C-KYaLkQ.js.map → SavedBlocksBrowserModal-D8Ly7LrA.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C3OF0EeB.js → SavedBlocksPanels-Co1cbWR8.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-C3OF0EeB.js.map → SavedBlocksPanels-Co1cbWR8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BnyPXw5W.js → SavedBlocksPickBar-DNtVbpm-.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-BnyPXw5W.js.map → SavedBlocksPickBar-DNtVbpm-.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-uoiUkd2l.js → TemplateSettings-BRc878ZF.js} +9 -9
- package/dist/cdn/chunks/{TemplateSettings-uoiUkd2l.js.map → TemplateSettings-BRc878ZF.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-B9d3ZsH7.js → TestEmailModal-CIui7VfS.js} +12 -10
- package/dist/cdn/chunks/TestEmailModal-CIui7VfS.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel--fPi6QjN.js → TestEmailPanel-vKvruW_r.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel--fPi6QjN.js.map → TestEmailPanel-vKvruW_r.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Cn4fnSpa.js → TitleEditor-BI-9Nnj3.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-Cn4fnSpa.js.map → TitleEditor-BI-9Nnj3.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BzAuH2G4.js → Toolbar-CYnnArxv.js} +418 -418
- package/dist/cdn/chunks/{Toolbar-BzAuH2G4.js.map → Toolbar-CYnnArxv.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-jMfK19PC.js → TplModal-B3nZeGWK.js} +5 -5
- package/dist/cdn/chunks/{TplModal-jMfK19PC.js.map → TplModal-B3nZeGWK.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DDqYMqC2.js → VersionHistoryMenu-CMGfAKuV.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-DDqYMqC2.js.map → VersionHistoryMenu-CMGfAKuV.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DJpySkvq.js → VersionHistoryPanels-Bb2ouQg7.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-DJpySkvq.js.map → VersionHistoryPanels-Bb2ouQg7.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CYT5QUoc.js → VersionPreviewBanner-573UP-g4.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-CYT5QUoc.js.map → VersionPreviewBanner-573UP-g4.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-Bi9XgDmX.js → WrapperBlock-DVu632LD.js} +5 -5
- package/dist/cdn/chunks/{WrapperBlock-Bi9XgDmX.js.map → WrapperBlock-DVu632LD.js.map} +1 -1
- package/dist/cdn/chunks/{composables-Cp6gZ7qV.js → composables-DY3anqHO.js} +572 -571
- package/dist/cdn/chunks/composables-DY3anqHO.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js → createCloudRuntime-B5numxlW.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js.map → createCloudRuntime-B5numxlW.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BYJPv1sA.js → extensions-BWVlr8Ga.js} +5 -5
- package/dist/cdn/chunks/{extensions-BYJPv1sA.js.map → extensions-BWVlr8Ga.js.map} +1 -1
- package/dist/cdn/chunks/keys-ywH4jHJ2.js +11 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js → normalizeMergeTagMarkup-Dw3rFvyd.js} +40 -40
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js.map → normalizeMergeTagMarkup-Dw3rFvyd.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-CxwYcAQe.js → preRenderCustomBlocks-BGtb8Xbp.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-CxwYcAQe.js.map → preRenderCustomBlocks-BGtb8Xbp.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js → sanitizeHtml-CLRY8s2s.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js.map → sanitizeHtml-CLRY8s2s.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-bvQ57o1m.js → socialIcons-kYhdXJ9P.js} +255 -255
- package/dist/cdn/chunks/{socialIcons-bvQ57o1m.js.map → socialIcons-kYhdXJ9P.js.map} +1 -1
- package/dist/cdn/chunks/{src-aFRxbwqP.js → src-B7X7x_ST.js} +154 -154
- package/dist/cdn/chunks/{src-aFRxbwqP.js.map → src-B7X7x_ST.js.map} +1 -1
- package/dist/cdn/chunks/{src-BRyzUujm.js → src-BmzzkUf7.js} +539 -539
- package/dist/cdn/chunks/{src-BRyzUujm.js.map → src-BmzzkUf7.js.map} +1 -1
- package/dist/cdn/chunks/{src-CVHGPKSW.js → src-DY2kMjoD.js} +593 -589
- package/dist/cdn/chunks/src-DY2kMjoD.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js → useCloudI18n-BTV9uu3c.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js.map → useCloudI18n-BTV9uu3c.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js → useEditorRoot-D0Lp2x4_.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js.map → useEditorRoot-D0Lp2x4_.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js → useI18n-DPg6rPbu.js} +2 -2
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js.map → useI18n-DPg6rPbu.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-B5wMJLru.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-7iwZ1UhB.js.map → useLocalizedDisplay-B5wMJLru.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js → useLogicTag-0wkSxy3z.js} +3 -3
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js.map → useLogicTag-0wkSxy3z.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js → useMergeTag-y3bX8M_6.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js.map → useMergeTag-y3bX8M_6.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js → usePopoverPosition-CBp9uwjV.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js.map → usePopoverPosition-CBp9uwjV.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js → useScrollToBlock-32EnuMwu.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js.map → useScrollToBlock-32EnuMwu.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js → withCurrentFont-B42BKo9N.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js.map → withCurrentFont-B42BKo9N.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +600 -600
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-jTnTSqdm.js → composables-CFTH0Nqb.js} +865 -864
- package/dist/{createCloudRuntime-DiUnYjKr.js → createCloudRuntime-BvWlm_38.js} +3 -3
- package/dist/{dist-BTjObRcv.js → dist-CMo4K5So.js} +277 -273
- package/dist/{extensions-CAuXwpbI.js → extensions-BPVackEE.js} +4 -4
- package/dist/keys-B4DimcgX.js +9 -0
- package/dist/{normalizeMergeTagMarkup-fgoVMKAc.js → normalizeMergeTagMarkup-PQqrbfmt.js} +1 -1
- package/dist/{preRenderCustomBlocks-CgPtlLGL.js → preRenderCustomBlocks-Dg5GBNi2.js} +1 -1
- package/dist/{sanitizeHtml-D2wueiEe.js → sanitizeHtml-DVdfdxOz.js} +1 -1
- package/dist/{socialIcons-RKdTgJip.js → socialIcons-DBHv_ntg.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +563 -563
- package/dist/{useCloudI18n-nMZ9f_4b.js → useCloudI18n-BnuOL1YS.js} +1 -1
- package/dist/{useEditorRoot-DpssP9rX.js → useEditorRoot-DWfC2CVC.js} +1 -1
- package/dist/{useI18n-C2p-qHeb.js → useI18n-Cx9W7OWb.js} +1 -1
- package/dist/{useLocalizedDisplay-9RqT2y_Y.js → useLocalizedDisplay-CbFM0cCV.js} +1 -1
- package/dist/{useLogicTag-59fmujI7.js → useLogicTag-CVOj0VUv.js} +2 -2
- package/dist/{useMergeTag-M1vauWet.js → useMergeTag-Bams_kam.js} +2 -2
- package/dist/{usePopoverPosition-L9MOHBM-.js → usePopoverPosition-DF0ZYH7g.js} +1 -1
- package/dist/{useScrollToBlock-BMF0Dt5l.js → useScrollToBlock-CwUQ_nKz.js} +1 -1
- package/dist/{withCurrentFont-BXZ7g-K6.js → withCurrentFont-y0O5kOLW.js} +1 -1
- package/package.json +7 -7
- package/dist/cdn/chunks/BlockPreviewCanvas-CaRneMZ8.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-B9d3ZsH7.js.map +0 -1
- package/dist/cdn/chunks/composables-Cp6gZ7qV.js.map +0 -1
- package/dist/cdn/chunks/keys-DNv3xXxI.js +0 -11
- package/dist/cdn/chunks/keys-DNv3xXxI.js.map +0 -1
- package/dist/cdn/chunks/src-CVHGPKSW.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-7iwZ1UhB.js +0 -33
- package/dist/keys-BeQy64On.js +0 -9
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, l as r } from "./dist-zu1jwYIS.js";
|
|
2
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 V, tt as H, u as U, x as W } from "./draggable-IRVFEZ-b.js";
|
|
3
|
-
import { t as te } from "./useEditorRoot-
|
|
4
|
-
import { t as G } from "./useI18n-
|
|
5
|
-
import "./useCloudI18n-
|
|
6
|
-
import { t as K } from "./useMergeTag-
|
|
7
|
-
import { _ as ne, h as q, v as
|
|
8
|
-
import { $ as
|
|
3
|
+
import { t as te } from "./useEditorRoot-D0Lp2x4_.js";
|
|
4
|
+
import { t as G } from "./useI18n-DPg6rPbu.js";
|
|
5
|
+
import "./useCloudI18n-BTV9uu3c.js";
|
|
6
|
+
import { t as K } from "./useMergeTag-y3bX8M_6.js";
|
|
7
|
+
import { _ as ne, h as q, v as re, y as ie } from "./dist-BtWMy7UQ.js";
|
|
8
|
+
import { $ as ae, $t as oe, A as J, B as Y, C as X, Cn as Z, D as se, E as ce, En as le, G as ue, H as Q, I as de, Jt as fe, K as pe, L as me, M as he, Mt as ge, N as _e, O as ve, P as ye, Q as be, R as xe, S as Se, Sn as Ce, T as we, Tn as Te, W as Ee, X as De, Y as Oe, Z as ke, _n as Ae, a as je, an as Me, at as Ne, b as Pe, bn as Fe, cn as Ie, ct as Le, d as Re, en as ze, et as Be, fn as Ve, ft as He, gn as Ue, gt as We, ht as Ge, i as Ke, it as qe, j as Je, ln as Ye, lt as Xe, mt as Ze, nt as Qe, ot as $e, p as et, q as tt, rt as nt, t as rt, tt as it, u as at, un as ot, ut as st, w as ct, wn as lt, x as ut, xn as dt, y as ft, yt as pt } from "./src-DY2kMjoD.js";
|
|
9
9
|
import { t as $ } from "./logger-CqQTfJGx.js";
|
|
10
|
-
import { a as
|
|
11
|
-
import { n as
|
|
12
|
-
import { $ as
|
|
13
|
-
import { t as
|
|
14
|
-
import { B as
|
|
15
|
-
import { r as
|
|
16
|
-
import { r as
|
|
17
|
-
import { At as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { m as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
10
|
+
import { a as mt, c as ht, i as gt, n as _t, o as vt, t as yt } from "./usePopoverPosition-CBp9uwjV.js";
|
|
11
|
+
import { n as bt } from "./useLocalizedDisplay-B5wMJLru.js";
|
|
12
|
+
import { $ as xt, A as St, B as Ct, C as wt, D as Tt, F as Et, G as Dt, H as Ot, I as kt, J as At, K as jt, L as Mt, M as Nt, N as Pt, O as Ft, P as It, R as Lt, S as Rt, T as zt, U as Bt, V as Vt, W as Ht, X as Ut, Y as Wt, Z as Gt, _ as Kt, a as qt, at as Jt, b as Yt, c as Xt, ct as Zt, d as Qt, et as $t, g as en, h as tn, i as nn, it as rn, j as an, k as on, l as sn, lt as cn, m as ln, nt as un, ot as dn, p as fn, q as pn, r as mn, rt as hn, s as gn, st as _n, u as vn, ut as yn, v as bn, w as xn, x as Sn, y as Cn, z as wn } from "./keys-ywH4jHJ2.js";
|
|
13
|
+
import { t as Tn } from "./useLogicTag-0wkSxy3z.js";
|
|
14
|
+
import { B as En, C as Dn, F as On, I as kn, P as An, R as jn, T as Mn, _ as Nn, a as Pn, f as Fn, h as In, n as Ln, o as Rn, t as zn, u as Bn, v as Vn, w as Hn, x as Un, y as Wn, z as Gn } from "./socialIcons-kYhdXJ9P.js";
|
|
15
|
+
import { r as Kn, t as qn } from "./templateSettingsFields-cjlP-jdw.js";
|
|
16
|
+
import { r as Jn, t as Yn } from "./sanitizeHtml-CLRY8s2s.js";
|
|
17
|
+
import { At as Xn, G as Zn, Mt as Qn, Nt as $n, Ot as er, St as tr, Ut as nr, V as rr, Wt as ir, X as ar, _t as or, d as sr, f as cr, k as lr, mt as ur, nt as dr, o as fr, y as pr, yt as mr } from "./icons-C7vjUBLn.js";
|
|
18
|
+
import { t as hr } from "./LoadingTrack-o-89hApJ.js";
|
|
19
|
+
import { t as gr } from "./languageName-DEEOhDWI.js";
|
|
20
|
+
import { t as _r } from "./plural-CyxrJXL1.js";
|
|
21
|
+
import { m as vr, w as yr, x as br } from "./styleConstants-Br6CIRoS.js";
|
|
22
|
+
import { t as xr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
23
|
+
import { t as Sr } from "./readableTextColor-BfZUGnVj.js";
|
|
24
24
|
// src/composables/useFocusTrap.ts
|
|
25
|
-
var
|
|
26
|
-
function
|
|
25
|
+
var Cr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
26
|
+
function wr(t, n) {
|
|
27
27
|
let r = te(), i = null, a = null, o = null;
|
|
28
28
|
function s() {
|
|
29
|
-
return t.value ? Array.from(t.value.querySelectorAll(
|
|
29
|
+
return t.value ? Array.from(t.value.querySelectorAll(Cr)).filter((e) => e.offsetParent !== null) : [];
|
|
30
30
|
}
|
|
31
31
|
function c(e) {
|
|
32
32
|
if (e.key !== "Tab") return;
|
|
@@ -55,8 +55,8 @@ function Sr(t, n) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
// src/composables/useEmoji.ts
|
|
58
|
-
function
|
|
59
|
-
let [e, t] =
|
|
58
|
+
function Tr() {
|
|
59
|
+
let [e, t] = re(!1), n = R([]), r = !1;
|
|
60
60
|
v(() => {
|
|
61
61
|
r = !0;
|
|
62
62
|
}), u(e, async (e) => {
|
|
@@ -80,7 +80,7 @@ function Cr() {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
// src/composables/useBlockRegistry.ts
|
|
83
|
-
function
|
|
83
|
+
function Er() {
|
|
84
84
|
let e = R(/* @__PURE__ */ new Map());
|
|
85
85
|
function t(t, n) {
|
|
86
86
|
e.value.set(t, n), B(e);
|
|
@@ -89,7 +89,7 @@ function wr() {
|
|
|
89
89
|
let r = `custom:${t.type}`;
|
|
90
90
|
e.value.set(r, {
|
|
91
91
|
component: n,
|
|
92
|
-
createBlock: () =>
|
|
92
|
+
createBlock: () => Se(t),
|
|
93
93
|
definition: t
|
|
94
94
|
}), B(e);
|
|
95
95
|
}
|
|
@@ -114,7 +114,7 @@ function wr() {
|
|
|
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 me(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
|
}
|
|
@@ -133,7 +133,7 @@ function wr() {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
// src/composables/useFonts.ts
|
|
136
|
-
var
|
|
136
|
+
var Dr = [
|
|
137
137
|
{
|
|
138
138
|
value: "Arial",
|
|
139
139
|
label: "Arial"
|
|
@@ -162,19 +162,19 @@ var Tr = [
|
|
|
162
162
|
value: "Courier New",
|
|
163
163
|
label: "Courier New"
|
|
164
164
|
}
|
|
165
|
-
],
|
|
166
|
-
function
|
|
167
|
-
if (e === void 0 || e === !0) return [...
|
|
165
|
+
], Or = "Arial, sans-serif";
|
|
166
|
+
function kr(e) {
|
|
167
|
+
if (e === void 0 || e === !0) return [...Dr];
|
|
168
168
|
if (e === !1) return [];
|
|
169
169
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
170
170
|
for (let i of e) {
|
|
171
|
-
let e = i.toLowerCase(), a =
|
|
172
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${
|
|
171
|
+
let e = i.toLowerCase(), a = Dr.find((t) => t.value.toLowerCase() === e);
|
|
172
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Dr.map((e) => e.value).join(", ")}.`));
|
|
173
173
|
}
|
|
174
174
|
return t;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
let t = H(e?.customFonts ?? []), n = H(!1), r =
|
|
176
|
+
function Ar(e) {
|
|
177
|
+
let t = H(e?.customFonts ?? []), n = H(!1), r = kr(e?.builtIns), i = I(() => e?.defaultFallback ?? Or), a = I(() => {
|
|
178
178
|
let e = [...r], n = t.value.map((e) => ({
|
|
179
179
|
value: e.name,
|
|
180
180
|
label: e.name,
|
|
@@ -185,18 +185,18 @@ function Or(e) {
|
|
|
185
185
|
function o(e) {
|
|
186
186
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
187
187
|
}
|
|
188
|
-
let s = e?.defaultFont ??
|
|
188
|
+
let s = e?.defaultFont ?? Or.split(",")[0].trim();
|
|
189
189
|
o(s) || $.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
190
190
|
function c() {
|
|
191
191
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
192
192
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
193
193
|
if (t) return t.value;
|
|
194
194
|
}
|
|
195
|
-
return
|
|
195
|
+
return Or;
|
|
196
196
|
}
|
|
197
197
|
let l = I(() => c());
|
|
198
198
|
function u(e) {
|
|
199
|
-
return
|
|
199
|
+
return Ke(e, {
|
|
200
200
|
customFonts: t.value,
|
|
201
201
|
defaultFallback: i.value
|
|
202
202
|
});
|
|
@@ -239,7 +239,7 @@ function Or(e) {
|
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
// src/composables/useThemeStyles.ts
|
|
242
|
-
var
|
|
242
|
+
var jr = {
|
|
243
243
|
bg: "--tpl-bg",
|
|
244
244
|
bgElevated: "--tpl-bg-elevated",
|
|
245
245
|
bgHover: "--tpl-bg-hover",
|
|
@@ -263,10 +263,10 @@ var kr = {
|
|
|
263
263
|
dangerLight: "--tpl-danger-light",
|
|
264
264
|
canvasBg: "--tpl-canvas-bg"
|
|
265
265
|
};
|
|
266
|
-
function
|
|
266
|
+
function Mr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
267
267
|
return { themeStyles: I(() => {
|
|
268
268
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
269
|
-
if (a) for (let [e, t] of Object.entries(
|
|
269
|
+
if (a) for (let [e, t] of Object.entries(jr)) {
|
|
270
270
|
let n = a[e];
|
|
271
271
|
n && (r[t] = n);
|
|
272
272
|
}
|
|
@@ -274,12 +274,12 @@ function Ar({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
274
274
|
}) };
|
|
275
275
|
}
|
|
276
276
|
// src/utils/mergeTagNodeSpec.ts
|
|
277
|
-
function
|
|
278
|
-
return
|
|
277
|
+
function Nr(e, t, n) {
|
|
278
|
+
return ke(e, n) ? {
|
|
279
279
|
type: "logicMergeTagNode",
|
|
280
280
|
attrs: {
|
|
281
281
|
value: e,
|
|
282
|
-
keyword:
|
|
282
|
+
keyword: ue(e, n)
|
|
283
283
|
}
|
|
284
284
|
} : {
|
|
285
285
|
type: "mergeTagNode",
|
|
@@ -290,32 +290,32 @@ function jr(e, t, n) {
|
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
// src/utils/insertLogicTag.ts
|
|
293
|
-
function
|
|
293
|
+
function Pr(e) {
|
|
294
294
|
return "before" in e && "after" in e;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
if (!
|
|
298
|
-
e.chain().focus().insertContent(
|
|
296
|
+
function Fr(e, t, n) {
|
|
297
|
+
if (!Pr(t)) {
|
|
298
|
+
e.chain().focus().insertContent(Nr(t.value, t.label, n)).run();
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
|
-
let r =
|
|
301
|
+
let r = Nr(t.before, t.label, n), i = Nr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
302
302
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
303
303
|
}
|
|
304
304
|
// src/utils/linkColorExtension.ts
|
|
305
|
-
function
|
|
305
|
+
function Ir(e) {
|
|
306
306
|
if (!e) return null;
|
|
307
307
|
let t = e.trim();
|
|
308
308
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Lr(e) {
|
|
311
311
|
return e.extend({ addAttributes() {
|
|
312
312
|
return {
|
|
313
313
|
...this.parent?.(),
|
|
314
314
|
color: {
|
|
315
315
|
default: null,
|
|
316
|
-
parseHTML: (e) =>
|
|
316
|
+
parseHTML: (e) => Ir(vt(e.style.color)),
|
|
317
317
|
renderHTML: (e) => {
|
|
318
|
-
let t =
|
|
318
|
+
let t = Ir(e.color);
|
|
319
319
|
return t ? { style: `color: ${t}` } : {};
|
|
320
320
|
}
|
|
321
321
|
}
|
|
@@ -323,9 +323,9 @@ function Fr(e) {
|
|
|
323
323
|
} });
|
|
324
324
|
}
|
|
325
325
|
// src/composables/useRichTextLinkDialog.ts
|
|
326
|
-
function
|
|
326
|
+
function Rr(e, t = Q.liquid, n = () => !0) {
|
|
327
327
|
let r = H(!1), i = H(""), a = H(""), o = H(null);
|
|
328
|
-
|
|
328
|
+
wr(o, r);
|
|
329
329
|
function s() {
|
|
330
330
|
if (!n()) return;
|
|
331
331
|
let t = e.value?.getAttributes("link") ?? {};
|
|
@@ -336,7 +336,7 @@ function Ir(e, t = le.liquid, n = () => !0) {
|
|
|
336
336
|
if (i.value) {
|
|
337
337
|
let t = d(i.value);
|
|
338
338
|
if (t !== null) {
|
|
339
|
-
let n =
|
|
339
|
+
let n = Ir(a.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
340
340
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -353,7 +353,7 @@ function Ir(e, t = le.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 =
|
|
356
|
+
let n = Re(t);
|
|
357
357
|
return n ? at.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
358
358
|
}
|
|
359
359
|
function f() {
|
|
@@ -378,13 +378,13 @@ function Ir(e, t = le.liquid, n = () => !0) {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
// src/composables/useRichTextEditor.ts
|
|
381
|
-
function
|
|
382
|
-
let n = g(
|
|
381
|
+
function zr(t) {
|
|
382
|
+
let n = g(bn, null), r = ht(), i = g(Wt, null), a = I(() => r.value && !i?.value), { mergeTags: o, canRequestMergeTag: s, isRequesting: c, requestMergeTag: l, syntax: d, autocomplete: f } = K(), { canInsertLogicTag: p, isRequesting: h, requestLogicTag: _ } = Tn(), v = g(Jt, null), y = (S(v) ? v.value : v)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", b = Oe(d), x = R(null), C = n?.content ? bt(n) : null, w = () => He(C?.settings.value ?? { locale: "en" });
|
|
383
383
|
u(w, (e) => {
|
|
384
384
|
let t = x.value?.view.dom;
|
|
385
385
|
t && t.setAttribute("dir", e);
|
|
386
386
|
});
|
|
387
|
-
let { showLinkDialog: T, linkUrl: E, linkColor: D, linkDialogRef: O, openLinkDialog: ee, insertLink: k, removeLink: A, closeLinkDialog: j, handleLinkKeydown: M } =
|
|
387
|
+
let { showLinkDialog: T, linkUrl: E, linkColor: D, linkDialogRef: O, openLinkDialog: ee, insertLink: k, removeLink: A, closeLinkDialog: j, handleLinkKeydown: M } = Rr(x, d, () => a.value);
|
|
388
388
|
u(a, (e) => {
|
|
389
389
|
if (x.value?.setEditable(e, !1), !e) {
|
|
390
390
|
j();
|
|
@@ -452,10 +452,10 @@ function Lr(t) {
|
|
|
452
452
|
value: e.value
|
|
453
453
|
}).run() : x.value?.commands.focus());
|
|
454
454
|
}
|
|
455
|
-
async function
|
|
455
|
+
async function re() {
|
|
456
456
|
if (!a.value) return;
|
|
457
457
|
let e = await _();
|
|
458
|
-
!B && a.value && (e && x.value ?
|
|
458
|
+
!B && a.value && (e && x.value ? Fr(x.value, e, d) : x.value?.commands.focus());
|
|
459
459
|
}
|
|
460
460
|
return {
|
|
461
461
|
editor: x,
|
|
@@ -480,29 +480,29 @@ function Lr(t) {
|
|
|
480
480
|
closeLinkDialog: j,
|
|
481
481
|
handleLinkKeydown: M,
|
|
482
482
|
handleAddMergeTag: q,
|
|
483
|
-
handleAddLogicTag:
|
|
483
|
+
handleAddLogicTag: re
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
// src/utils/activeEditorTracker.ts
|
|
487
|
-
var
|
|
488
|
-
function
|
|
489
|
-
let e = ++
|
|
490
|
-
return
|
|
487
|
+
var Br = /* @__PURE__ */ new Set(), Vr = 0, Hr = 0;
|
|
488
|
+
function Ur() {
|
|
489
|
+
let e = ++Hr;
|
|
490
|
+
return Br.add(e), Vr === 0 && (Vr = e), {
|
|
491
491
|
id: e,
|
|
492
|
-
isActive: () =>
|
|
492
|
+
isActive: () => Br.size <= 1 || Vr === e,
|
|
493
493
|
claim: () => {
|
|
494
|
-
|
|
494
|
+
Vr = e;
|
|
495
495
|
},
|
|
496
496
|
dispose: () => {
|
|
497
|
-
if (
|
|
498
|
-
let e = Array.from(
|
|
499
|
-
|
|
497
|
+
if (Br.delete(e), Vr === e) {
|
|
498
|
+
let e = Array.from(Br);
|
|
499
|
+
Vr = e[e.length - 1] ?? 0;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
504
|
// src/utils/resolveLintOptions.ts
|
|
505
|
-
function
|
|
505
|
+
function Wr(e) {
|
|
506
506
|
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
507
507
|
return {
|
|
508
508
|
...e.lint,
|
|
@@ -511,8 +511,8 @@ function Hr(e) {
|
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
513
|
// src/composables/usePreviewResolution.ts
|
|
514
|
-
var
|
|
515
|
-
function
|
|
514
|
+
var Gr = 500;
|
|
515
|
+
function Kr(e) {
|
|
516
516
|
let t = typeof e.resolvePreview == "function", n = H(null), r = H(!1), i = H(!1), a = H(!1), o = 0, s = null;
|
|
517
517
|
function c() {
|
|
518
518
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -523,7 +523,7 @@ function Wr(e) {
|
|
|
523
523
|
let c = ++o;
|
|
524
524
|
r.value = !0;
|
|
525
525
|
let l = {
|
|
526
|
-
content:
|
|
526
|
+
content: Me(e.getContent()),
|
|
527
527
|
surface: e.surface,
|
|
528
528
|
trigger: t,
|
|
529
529
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
@@ -546,7 +546,7 @@ function Wr(e) {
|
|
|
546
546
|
function d(e) {
|
|
547
547
|
t && (c(), !a.value && e !== "recipient" ? l(e) : s = setTimeout(() => {
|
|
548
548
|
s = null, l(e);
|
|
549
|
-
},
|
|
549
|
+
}, Gr));
|
|
550
550
|
}
|
|
551
551
|
function f() {
|
|
552
552
|
t && e.isActive() && (c(), l("refresh"));
|
|
@@ -573,12 +573,13 @@ function Wr(e) {
|
|
|
573
573
|
isResolving: r,
|
|
574
574
|
isInitialResolve: I(() => r.value && !a.value),
|
|
575
575
|
hasFailed: i,
|
|
576
|
+
isShowingResolved: I(() => n.value !== null),
|
|
576
577
|
supersedesSamples: I(() => t),
|
|
577
578
|
refresh: f
|
|
578
579
|
};
|
|
579
580
|
}
|
|
580
581
|
// src/composables/useMergeTagPicker.ts
|
|
581
|
-
function
|
|
582
|
+
function qr() {
|
|
582
583
|
let e = H(!1), t = H([]), n = H(null), r = null;
|
|
583
584
|
function i(i, a) {
|
|
584
585
|
if (r) {
|
|
@@ -608,7 +609,7 @@ function Gr() {
|
|
|
608
609
|
};
|
|
609
610
|
}
|
|
610
611
|
// src/composables/useLogicTagPicker.ts
|
|
611
|
-
function
|
|
612
|
+
function Jr() {
|
|
612
613
|
let e = H(!1), t = H([]), n = H([]), r = null;
|
|
613
614
|
function i(i, a) {
|
|
614
615
|
if (r) {
|
|
@@ -638,23 +639,23 @@ function Kr() {
|
|
|
638
639
|
};
|
|
639
640
|
}
|
|
640
641
|
// src/composables/useTemplateLint.ts
|
|
641
|
-
function
|
|
642
|
+
function Yr(e) {
|
|
642
643
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
643
644
|
}
|
|
644
|
-
var
|
|
645
|
-
function
|
|
645
|
+
var Xr = !1;
|
|
646
|
+
function Zr(e) {
|
|
646
647
|
let t = H([]), n = H(0), r = H(-1), i = u(e.content, () => {
|
|
647
648
|
n.value++;
|
|
648
|
-
}, { deep: !0 }), a = H(!1), o = H(!1), s = R(null), c =
|
|
649
|
+
}, { deep: !0 }), a = H(!1), o = H(!1), s = R(null), c = Yr(e.options), l = null, d = !1;
|
|
649
650
|
c || f();
|
|
650
651
|
async function f() {
|
|
651
652
|
try {
|
|
652
|
-
let t = await import("./src-
|
|
653
|
+
let t = await import("./src-BmzzkUf7.js");
|
|
653
654
|
if (d) return;
|
|
654
|
-
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l =
|
|
655
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l = ie(n, p, { debounce: e.debounce ?? 500 });
|
|
655
656
|
} catch {
|
|
656
657
|
if (d) return;
|
|
657
|
-
o.value = !0,
|
|
658
|
+
o.value = !0, Xr || (Xr = !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."));
|
|
658
659
|
}
|
|
659
660
|
}
|
|
660
661
|
function p() {
|
|
@@ -693,7 +694,7 @@ function Yr(e) {
|
|
|
693
694
|
};
|
|
694
695
|
}
|
|
695
696
|
// src/composables/useKeyboardReorder.ts
|
|
696
|
-
function
|
|
697
|
+
function Qr(e, t, n = []) {
|
|
697
698
|
let r = H(null), i = H(""), a = null;
|
|
698
699
|
function o(t) {
|
|
699
700
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -720,7 +721,7 @@ function Xr(e, t, n = []) {
|
|
|
720
721
|
let i = o(r);
|
|
721
722
|
if (!i) return "";
|
|
722
723
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
723
|
-
return a ?
|
|
724
|
+
return a ? Wn(a, t.t, n) : "";
|
|
724
725
|
}
|
|
725
726
|
function c(t, n) {
|
|
726
727
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -788,14 +789,14 @@ function Xr(e, t, n = []) {
|
|
|
788
789
|
};
|
|
789
790
|
}
|
|
790
791
|
// src/composables/useUiTheme.ts
|
|
791
|
-
function
|
|
792
|
+
function $r(e) {
|
|
792
793
|
let n = t("(prefers-color-scheme: dark)");
|
|
793
794
|
return { resolvedTheme: I(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
|
|
794
795
|
}
|
|
795
796
|
// src/composables/useCustomBlockStylesheets.ts
|
|
796
|
-
function
|
|
797
|
+
function ei(e, t) {
|
|
797
798
|
return I(() => {
|
|
798
|
-
let n =
|
|
799
|
+
let n = ti(e.value.blocks);
|
|
799
800
|
if (n.size === 0) return [];
|
|
800
801
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
801
802
|
for (let e of n) {
|
|
@@ -807,75 +808,75 @@ function Qr(e, t) {
|
|
|
807
808
|
return i;
|
|
808
809
|
});
|
|
809
810
|
}
|
|
810
|
-
function
|
|
811
|
+
function ti(e) {
|
|
811
812
|
let t = /* @__PURE__ */ new Set();
|
|
812
|
-
return
|
|
813
|
+
return ni(e, t), t;
|
|
813
814
|
}
|
|
814
|
-
function
|
|
815
|
-
for (let n of e) if (
|
|
815
|
+
function ni(e, t) {
|
|
816
|
+
for (let n of e) if (pt(n)) t.add(n.customType);
|
|
816
817
|
else if (n.type === "section") {
|
|
817
818
|
let e = n.children;
|
|
818
819
|
if (!e) continue;
|
|
819
|
-
for (let n of e)
|
|
820
|
-
} else
|
|
820
|
+
for (let n of e) ni(n, t);
|
|
821
|
+
} else ge(n) && ni(n.children, t);
|
|
821
822
|
}
|
|
822
823
|
// src/utils/registerBuiltInBlocks.ts
|
|
823
|
-
var
|
|
824
|
+
var ri = [
|
|
824
825
|
{
|
|
825
826
|
type: "section",
|
|
826
|
-
createBlock:
|
|
827
|
+
createBlock: ve
|
|
827
828
|
},
|
|
828
829
|
{
|
|
829
830
|
type: "title",
|
|
830
|
-
createBlock:
|
|
831
|
+
createBlock: _e
|
|
831
832
|
},
|
|
832
833
|
{
|
|
833
834
|
type: "paragraph",
|
|
834
|
-
createBlock:
|
|
835
|
+
createBlock: se
|
|
835
836
|
},
|
|
836
837
|
{
|
|
837
838
|
type: "image",
|
|
838
|
-
createBlock:
|
|
839
|
+
createBlock: we
|
|
839
840
|
},
|
|
840
841
|
{
|
|
841
842
|
type: "button",
|
|
842
|
-
createBlock:
|
|
843
|
+
createBlock: Pe
|
|
843
844
|
},
|
|
844
845
|
{
|
|
845
846
|
type: "divider",
|
|
846
|
-
createBlock:
|
|
847
|
+
createBlock: X
|
|
847
848
|
},
|
|
848
849
|
{
|
|
849
850
|
type: "video",
|
|
850
|
-
createBlock:
|
|
851
|
+
createBlock: ye
|
|
851
852
|
},
|
|
852
853
|
{
|
|
853
854
|
type: "social",
|
|
854
|
-
createBlock:
|
|
855
|
+
createBlock: J
|
|
855
856
|
},
|
|
856
857
|
{
|
|
857
858
|
type: "menu",
|
|
858
|
-
createBlock:
|
|
859
|
+
createBlock: ce
|
|
859
860
|
},
|
|
860
861
|
{
|
|
861
862
|
type: "table",
|
|
862
|
-
createBlock:
|
|
863
|
+
createBlock: he
|
|
863
864
|
},
|
|
864
865
|
{
|
|
865
866
|
type: "spacer",
|
|
866
|
-
createBlock:
|
|
867
|
+
createBlock: Je
|
|
867
868
|
},
|
|
868
869
|
{
|
|
869
870
|
type: "html",
|
|
870
|
-
createBlock:
|
|
871
|
+
createBlock: ct
|
|
871
872
|
},
|
|
872
873
|
{
|
|
873
874
|
type: "countdown",
|
|
874
|
-
createBlock:
|
|
875
|
+
createBlock: ut
|
|
875
876
|
}
|
|
876
877
|
];
|
|
877
|
-
function
|
|
878
|
-
for (let n of
|
|
878
|
+
function ii(e, t) {
|
|
879
|
+
for (let n of ri) {
|
|
879
880
|
let r = t[n.type];
|
|
880
881
|
r && e.registerBuiltIn(n.type, {
|
|
881
882
|
component: r,
|
|
@@ -884,31 +885,31 @@ function ni(e, t) {
|
|
|
884
885
|
}
|
|
885
886
|
}
|
|
886
887
|
// src/utils/resolveHtmlBlockPreview.ts
|
|
887
|
-
function
|
|
888
|
+
function ai(e) {
|
|
888
889
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
889
890
|
}
|
|
890
891
|
// src/utils/collectOffPaletteDefaults.ts
|
|
891
|
-
function
|
|
892
|
+
function oi(e) {
|
|
892
893
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
893
894
|
}
|
|
894
|
-
function
|
|
895
|
-
let r = new Set(e.map((e) =>
|
|
896
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
895
|
+
function si(e, t, n) {
|
|
896
|
+
let r = new Set(e.map((e) => mt(e))), i = [], a = (e, t) => {
|
|
897
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(mt(o)) && i.push(`${t}.${n}: ${o}`) : oi(o) && a(o, `${t}.${n}`);
|
|
897
898
|
}, o = t;
|
|
898
899
|
for (let [e, t] of Object.entries(Ze)) {
|
|
899
900
|
let n = o?.[e];
|
|
900
901
|
a({
|
|
901
902
|
...t,
|
|
902
|
-
...
|
|
903
|
+
...oi(n) ? n : {}
|
|
903
904
|
}, e);
|
|
904
905
|
}
|
|
905
906
|
return a({
|
|
906
|
-
...
|
|
907
|
+
...Ge,
|
|
907
908
|
...n ?? {}
|
|
908
909
|
}, "template"), i;
|
|
909
910
|
}
|
|
910
911
|
// src/utils/localizedBlockDefaults.ts
|
|
911
|
-
function
|
|
912
|
+
function ci(e) {
|
|
912
913
|
return {
|
|
913
914
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
914
915
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -916,7 +917,7 @@ function oi(e) {
|
|
|
916
917
|
};
|
|
917
918
|
}
|
|
918
919
|
// src/i18n/index.ts
|
|
919
|
-
var
|
|
920
|
+
var li = /* #__PURE__ */ Object.assign({
|
|
920
921
|
"./locales/ca.ts": () => import("./ca-YfIxwO1G.js"),
|
|
921
922
|
"./locales/da.ts": () => import("./da-CM6DCvRG.js"),
|
|
922
923
|
"./locales/de.ts": () => import("./de-Dugz1zXC.js"),
|
|
@@ -926,53 +927,53 @@ var si = /* #__PURE__ */ Object.assign({
|
|
|
926
927
|
"./locales/ja.ts": () => import("./ja-BH4MS1Ye.js"),
|
|
927
928
|
"./locales/nl.ts": () => import("./nl-BQl1_UHv.js"),
|
|
928
929
|
"./locales/pt-BR.ts": () => import("./pt-BR-eyzmU9Vs.js")
|
|
929
|
-
}),
|
|
930
|
+
}), ui = /* #__PURE__ */ Object.assign({
|
|
930
931
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
931
932
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
932
933
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
933
934
|
});
|
|
934
|
-
function
|
|
935
|
+
function di(e) {
|
|
935
936
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
936
937
|
}
|
|
937
|
-
var
|
|
938
|
-
function
|
|
938
|
+
var fi = di(li), pi = di(ui);
|
|
939
|
+
function mi(e) {
|
|
939
940
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
940
941
|
}
|
|
941
|
-
function
|
|
942
|
-
let n =
|
|
943
|
-
return t.find((e) =>
|
|
942
|
+
function hi(e, t) {
|
|
943
|
+
let n = mi(e);
|
|
944
|
+
return t.find((e) => mi(e) === n);
|
|
944
945
|
}
|
|
945
|
-
function
|
|
946
|
-
return
|
|
946
|
+
function gi(e) {
|
|
947
|
+
return mi(e).split("-")[0];
|
|
947
948
|
}
|
|
948
|
-
function
|
|
949
|
-
return
|
|
949
|
+
function _i(e, t) {
|
|
950
|
+
return hi(e, t) ?? hi(gi(e), t);
|
|
950
951
|
}
|
|
951
|
-
function
|
|
952
|
-
return
|
|
952
|
+
function vi(e, t) {
|
|
953
|
+
return _i(e, t) ?? "en";
|
|
953
954
|
}
|
|
954
|
-
async function
|
|
955
|
-
let t =
|
|
955
|
+
async function yi(e) {
|
|
956
|
+
let t = li[`./locales/${vi(e, fi)}.ts`];
|
|
956
957
|
return (await t()).default;
|
|
957
958
|
}
|
|
958
|
-
async function
|
|
959
|
-
let t =
|
|
959
|
+
async function bi(e) {
|
|
960
|
+
let t = ui[`./locales/cloud/${vi(e, pi)}.ts`];
|
|
960
961
|
return (await t()).default;
|
|
961
962
|
}
|
|
962
|
-
function
|
|
963
|
-
return
|
|
963
|
+
function xi(e) {
|
|
964
|
+
return _i(e, fi) !== void 0;
|
|
964
965
|
}
|
|
965
|
-
function
|
|
966
|
-
return
|
|
966
|
+
function Si(e) {
|
|
967
|
+
return _i(e, pi) !== void 0;
|
|
967
968
|
}
|
|
968
|
-
function
|
|
969
|
-
return [...
|
|
969
|
+
function Ci() {
|
|
970
|
+
return [...fi];
|
|
970
971
|
}
|
|
971
|
-
function
|
|
972
|
-
return [...
|
|
972
|
+
function wi() {
|
|
973
|
+
return [...pi];
|
|
973
974
|
}
|
|
974
975
|
// src/i18n/contentDefaults.ts
|
|
975
|
-
var
|
|
976
|
+
var Ti = {
|
|
976
977
|
en: {
|
|
977
978
|
video: "Video",
|
|
978
979
|
days: "Days",
|
|
@@ -1045,16 +1046,16 @@ var Ci = {
|
|
|
1045
1046
|
seconds: "Sekunder",
|
|
1046
1047
|
expired: "Dette tilbud er udløbet"
|
|
1047
1048
|
}
|
|
1048
|
-
},
|
|
1049
|
-
function
|
|
1050
|
-
if (!e) return
|
|
1051
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1052
|
-
if (n) return
|
|
1053
|
-
let r =
|
|
1054
|
-
return r ?
|
|
1049
|
+
}, Ei = new Map(Object.keys(Ti).map((e) => [e.toLowerCase(), e]));
|
|
1050
|
+
function Di(e) {
|
|
1051
|
+
if (!e) return Ti.en;
|
|
1052
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Ei.get(t);
|
|
1053
|
+
if (n) return Ti[n];
|
|
1054
|
+
let r = Ei.get(gi(t));
|
|
1055
|
+
return r ? Ti[r] : Ti.en;
|
|
1055
1056
|
}
|
|
1056
|
-
function
|
|
1057
|
-
let t =
|
|
1057
|
+
function Oi(e) {
|
|
1058
|
+
let t = Di(e);
|
|
1058
1059
|
return {
|
|
1059
1060
|
video: { alt: t.video },
|
|
1060
1061
|
countdown: {
|
|
@@ -1067,9 +1068,9 @@ function Ei(e) {
|
|
|
1067
1068
|
};
|
|
1068
1069
|
}
|
|
1069
1070
|
// src/utils/collectColorFieldIssues.ts
|
|
1070
|
-
function
|
|
1071
|
+
function ki(e, t) {
|
|
1071
1072
|
let n = [], r = (r, i) => {
|
|
1072
|
-
let a =
|
|
1073
|
+
let a = Vn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1073
1074
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1074
1075
|
id: s("invalid-presets"),
|
|
1075
1076
|
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." : "")
|
|
@@ -1080,8 +1081,8 @@ function Di(e, t) {
|
|
|
1080
1081
|
id: s("allow-custom-ignored"),
|
|
1081
1082
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1082
1083
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1083
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1084
|
-
e !== "" && !t.has(
|
|
1084
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => mt(e)));
|
|
1085
|
+
e !== "" && !t.has(mt(e)) && n.push({
|
|
1085
1086
|
id: s("off-palette-default"),
|
|
1086
1087
|
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.`
|
|
1087
1088
|
});
|
|
@@ -1092,7 +1093,7 @@ function Di(e, t) {
|
|
|
1092
1093
|
return n;
|
|
1093
1094
|
}
|
|
1094
1095
|
// src/utils/keyboardShortcuts.ts
|
|
1095
|
-
function
|
|
1096
|
+
function Ai(e) {
|
|
1096
1097
|
for (let t of e.composedPath()) {
|
|
1097
1098
|
if (!(t instanceof HTMLElement)) continue;
|
|
1098
1099
|
if (t.isContentEditable) return !0;
|
|
@@ -1101,14 +1102,14 @@ function Oi(e) {
|
|
|
1101
1102
|
}
|
|
1102
1103
|
return !1;
|
|
1103
1104
|
}
|
|
1104
|
-
function
|
|
1105
|
+
function ji(e, t) {
|
|
1105
1106
|
let n = e.metaKey || e.ctrlKey;
|
|
1106
1107
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1107
1108
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1108
|
-
if (
|
|
1109
|
+
if (Ai(e)) return;
|
|
1109
1110
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1110
1111
|
} else {
|
|
1111
|
-
if (t.isPicking?.() && !
|
|
1112
|
+
if (t.isPicking?.() && !Ai(e)) {
|
|
1112
1113
|
if (e.key === "Escape") {
|
|
1113
1114
|
e.preventDefault(), t.onCancelPick?.();
|
|
1114
1115
|
return;
|
|
@@ -1122,139 +1123,139 @@ function ki(e, t) {
|
|
|
1122
1123
|
return;
|
|
1123
1124
|
}
|
|
1124
1125
|
}
|
|
1125
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1126
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ai(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1126
1127
|
}
|
|
1127
1128
|
}
|
|
1128
1129
|
// src/utils/blockComponentResolver.ts
|
|
1129
|
-
function
|
|
1130
|
+
function Mi(e, t) {
|
|
1130
1131
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1131
1132
|
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
1132
1133
|
}
|
|
1133
|
-
function
|
|
1134
|
+
function Ni(e, t, n) {
|
|
1134
1135
|
if (t) {
|
|
1135
1136
|
let n = t.getComponent(e);
|
|
1136
1137
|
if (n) return n;
|
|
1137
1138
|
}
|
|
1138
1139
|
return n[e.type] ?? null;
|
|
1139
1140
|
}
|
|
1140
|
-
var
|
|
1141
|
-
function
|
|
1141
|
+
var Pi = "--tpl-block-bg-layer", Fi = "--tpl-email-frame-width", Ii = "tpl-has-bg-image";
|
|
1142
|
+
function Li(e, t) {
|
|
1142
1143
|
if (t === null) return {};
|
|
1143
|
-
let n =
|
|
1144
|
+
let n = Ae(e);
|
|
1144
1145
|
if (n === null) return {};
|
|
1145
|
-
let r = t?.trim(), i = r ?
|
|
1146
|
+
let r = t?.trim(), i = r ? Ue(r) : n.url;
|
|
1146
1147
|
return {
|
|
1147
1148
|
backgroundImage: `url("${i}")`,
|
|
1148
1149
|
backgroundSize: n.size,
|
|
1149
1150
|
backgroundPosition: n.position,
|
|
1150
1151
|
backgroundRepeat: n.repeat,
|
|
1151
|
-
[
|
|
1152
|
+
[Pi]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1152
1153
|
};
|
|
1153
1154
|
}
|
|
1154
|
-
function
|
|
1155
|
-
return e &&
|
|
1155
|
+
function Ri(e) {
|
|
1156
|
+
return e && Pi in e ? Ii : void 0;
|
|
1156
1157
|
}
|
|
1157
|
-
var
|
|
1158
|
+
var zi = {
|
|
1158
1159
|
top: "flex-start",
|
|
1159
1160
|
middle: "center",
|
|
1160
1161
|
bottom: "flex-end"
|
|
1161
1162
|
};
|
|
1162
|
-
function
|
|
1163
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1163
|
+
function Bi(e, t) {
|
|
1164
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Vi(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1164
1165
|
return {
|
|
1165
1166
|
display: "flex",
|
|
1166
1167
|
flexDirection: "column",
|
|
1167
|
-
justifyContent:
|
|
1168
|
+
justifyContent: zi[e.verticalAlign],
|
|
1168
1169
|
boxSizing: "border-box",
|
|
1169
1170
|
...n
|
|
1170
1171
|
};
|
|
1171
1172
|
}
|
|
1172
|
-
function
|
|
1173
|
+
function Vi(e, t) {
|
|
1173
1174
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1174
1175
|
}
|
|
1175
|
-
function
|
|
1176
|
+
function Hi(e, t = {}) {
|
|
1176
1177
|
if (e.type === "wrapper") return {};
|
|
1177
1178
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1178
1179
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1179
1180
|
backgroundColor: r || "transparent"
|
|
1180
1181
|
};
|
|
1181
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1182
|
-
let n =
|
|
1182
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ce.paragraphGap : Ce.paragraphGap}px`), e.type === "section") {
|
|
1183
|
+
let n = le(e.borderRadius);
|
|
1183
1184
|
n !== null && (i.borderRadius = n);
|
|
1184
|
-
let r =
|
|
1185
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1185
|
+
let r = Ve(e);
|
|
1186
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Bi(r, t.heroBoxWidth)), Object.assign(i, Li({
|
|
1186
1187
|
...e.backgroundImage,
|
|
1187
1188
|
size: "cover",
|
|
1188
1189
|
repeat: !1
|
|
1189
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1190
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, Wi(e.border)), Object.assign(i, Li(e.backgroundImage, t.backgroundImageUrl)));
|
|
1190
1191
|
}
|
|
1191
1192
|
return i;
|
|
1192
1193
|
}
|
|
1193
|
-
function
|
|
1194
|
-
return e.type === "section" ?
|
|
1195
|
-
backgroundImageUrl:
|
|
1194
|
+
function Ui(e, t, n, r) {
|
|
1195
|
+
return e.type === "section" ? Hi(e, {
|
|
1196
|
+
backgroundImageUrl: Dn(t, e.backgroundImage, n),
|
|
1196
1197
|
heroBoxWidth: r
|
|
1197
|
-
}) :
|
|
1198
|
+
}) : Hi(e);
|
|
1198
1199
|
}
|
|
1199
|
-
function
|
|
1200
|
+
function Wi(e) {
|
|
1200
1201
|
let t = {};
|
|
1201
|
-
for (let [n, r] of Object.entries(
|
|
1202
|
+
for (let [n, r] of Object.entries(Te(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1202
1203
|
return t;
|
|
1203
1204
|
}
|
|
1204
|
-
var
|
|
1205
|
+
var Gi = {
|
|
1205
1206
|
width: "100cqw",
|
|
1206
1207
|
maxWidth: "none",
|
|
1207
1208
|
marginInline: "calc(50% - 50cqw)",
|
|
1208
1209
|
boxSizing: "border-box"
|
|
1209
1210
|
};
|
|
1210
|
-
function
|
|
1211
|
+
function Ki(e) {
|
|
1211
1212
|
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1212
1213
|
}
|
|
1213
|
-
function
|
|
1214
|
+
function qi(e) {
|
|
1214
1215
|
let t = {
|
|
1215
1216
|
width: "var(--tpl-email-frame-width)",
|
|
1216
1217
|
maxWidth: "100%",
|
|
1217
1218
|
marginInline: "auto",
|
|
1218
1219
|
boxSizing: "border-box"
|
|
1219
1220
|
};
|
|
1220
|
-
return e && (t.padding =
|
|
1221
|
+
return e && (t.padding = Ki(e)), t;
|
|
1221
1222
|
}
|
|
1222
|
-
function
|
|
1223
|
+
function Ji(e, t = {}) {
|
|
1223
1224
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1224
1225
|
let n = e.wrapper, r = {};
|
|
1225
|
-
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding =
|
|
1226
|
-
let e =
|
|
1226
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = Ki(n.padding)), !n.fullWidth) {
|
|
1227
|
+
let e = le(n.borderRadius);
|
|
1227
1228
|
e !== null && (r.borderRadius = e);
|
|
1228
1229
|
}
|
|
1229
|
-
return Object.assign(r,
|
|
1230
|
+
return Object.assign(r, Li(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, Gi), r;
|
|
1230
1231
|
}
|
|
1231
|
-
function
|
|
1232
|
+
function Yi(e, t = {}) {
|
|
1232
1233
|
if (e.type !== "wrapper") return null;
|
|
1233
1234
|
let n = {};
|
|
1234
|
-
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding =
|
|
1235
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = Ki(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Li(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, Gi), n;
|
|
1235
1236
|
}
|
|
1236
1237
|
// src/utils/mergeTagLabelSegments.ts
|
|
1237
|
-
function
|
|
1238
|
+
function Xi(e, t, n, r = !1) {
|
|
1238
1239
|
if (!e) return [];
|
|
1239
1240
|
let i = [], a = 0;
|
|
1240
|
-
for (let o of
|
|
1241
|
+
for (let o of Qe(e, n)) {
|
|
1241
1242
|
o.index > a && i.push({
|
|
1242
1243
|
type: "text",
|
|
1243
1244
|
value: e.slice(a, o.index)
|
|
1244
1245
|
});
|
|
1245
1246
|
let s = o.value;
|
|
1246
|
-
if (
|
|
1247
|
-
let e = r ?
|
|
1247
|
+
if (be(s, n)) {
|
|
1248
|
+
let e = r ? tt(s, t) : void 0;
|
|
1248
1249
|
i.push(e === void 0 ? {
|
|
1249
1250
|
type: "tag",
|
|
1250
|
-
value:
|
|
1251
|
+
value: pe(s, t)
|
|
1251
1252
|
} : {
|
|
1252
1253
|
type: "text",
|
|
1253
1254
|
value: e
|
|
1254
1255
|
});
|
|
1255
|
-
} else
|
|
1256
|
+
} else ke(s, n) ? i.push({
|
|
1256
1257
|
type: "tag",
|
|
1257
|
-
value:
|
|
1258
|
+
value: ue(s, n)
|
|
1258
1259
|
}) : i.push({
|
|
1259
1260
|
type: "text",
|
|
1260
1261
|
value: s
|
|
@@ -1267,27 +1268,27 @@ function Ji(e, t, n, r = !1) {
|
|
|
1267
1268
|
}), i;
|
|
1268
1269
|
}
|
|
1269
1270
|
// src/components/MergeTagPreviewText.vue
|
|
1270
|
-
var
|
|
1271
|
+
var Zi = o({
|
|
1271
1272
|
name: "MergeTagPreviewText",
|
|
1272
1273
|
props: { text: {
|
|
1273
1274
|
type: String,
|
|
1274
1275
|
required: !0
|
|
1275
1276
|
} },
|
|
1276
1277
|
setup(e) {
|
|
1277
|
-
let t = g(
|
|
1278
|
+
let t = g(It, Vt), n = g(Ct, Q.liquid), r = g(cn, null), i = I(() => Xi(e.text, t.value, n, r?.value ?? !1));
|
|
1278
1279
|
return () => i.value.map((e, t) => e.type === "tag" ? s("span", {
|
|
1279
1280
|
key: t,
|
|
1280
1281
|
class: "tpl-merge-tag-label"
|
|
1281
1282
|
}, e.value) : e.value);
|
|
1282
1283
|
}
|
|
1283
|
-
}),
|
|
1284
|
+
}), Qi = ["href"], $i = /* @__PURE__ */ o({
|
|
1284
1285
|
__name: "ButtonBlock",
|
|
1285
1286
|
props: {
|
|
1286
1287
|
block: {},
|
|
1287
1288
|
viewport: {}
|
|
1288
1289
|
},
|
|
1289
1290
|
setup(e) {
|
|
1290
|
-
let t = e, n =
|
|
1291
|
+
let t = e, n = yn(Yt, "ButtonBlock");
|
|
1291
1292
|
function r(e) {
|
|
1292
1293
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1293
1294
|
}
|
|
@@ -1298,33 +1299,33 @@ var Yi = o({
|
|
|
1298
1299
|
backgroundColor: t.block.backgroundColor,
|
|
1299
1300
|
color: t.block.textColor,
|
|
1300
1301
|
fontSize: `${t.block.fontSize}px`,
|
|
1301
|
-
lineHeight: String(
|
|
1302
|
+
lineHeight: String(Fe),
|
|
1302
1303
|
fontWeight: r(t.block.fontWeight),
|
|
1303
1304
|
textDecoration: "none",
|
|
1304
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1305
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : le(t.block.borderRadius) ?? "0px",
|
|
1305
1306
|
textAlign: "center"
|
|
1306
1307
|
};
|
|
1307
|
-
return Object.assign(e,
|
|
1308
|
+
return Object.assign(e, Wi(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;
|
|
1308
1309
|
}), a = I(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1309
1310
|
return (t, n) => (c(), w("div", { style: L(a.value) }, [N("a", {
|
|
1310
1311
|
href: e.block.url || "#",
|
|
1311
1312
|
style: L(i.value),
|
|
1312
1313
|
class: "tpl:cursor-default",
|
|
1313
1314
|
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
1314
|
-
}, [W(
|
|
1315
|
+
}, [W(Zi, { text: e.block.text }, null, 8, ["text"])], 12, Qi)], 4));
|
|
1315
1316
|
}
|
|
1316
|
-
}),
|
|
1317
|
+
}), ea = ["innerHTML"], ta = [
|
|
1317
1318
|
"src",
|
|
1318
1319
|
"width",
|
|
1319
1320
|
"height"
|
|
1320
|
-
],
|
|
1321
|
+
], na = /* @__PURE__ */ o({
|
|
1321
1322
|
__name: "CustomBlockIcon",
|
|
1322
1323
|
props: {
|
|
1323
1324
|
icon: {},
|
|
1324
1325
|
size: {}
|
|
1325
1326
|
},
|
|
1326
1327
|
setup(e) {
|
|
1327
|
-
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 ?
|
|
1328
|
+
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 ? Jn(t.icon ?? "") : "");
|
|
1328
1329
|
return (t, o) => r.value ? (c(), w("span", {
|
|
1329
1330
|
key: 0,
|
|
1330
1331
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1333,33 +1334,33 @@ var Yi = o({
|
|
|
1333
1334
|
height: `${n.value}px`
|
|
1334
1335
|
}),
|
|
1335
1336
|
innerHTML: a.value
|
|
1336
|
-
}, null, 12,
|
|
1337
|
+
}, null, 12, ea)) : i.value ? (c(), w("img", {
|
|
1337
1338
|
key: 1,
|
|
1338
1339
|
src: e.icon,
|
|
1339
1340
|
width: n.value,
|
|
1340
1341
|
height: n.value,
|
|
1341
1342
|
class: "tpl:inline-block",
|
|
1342
1343
|
alt: ""
|
|
1343
|
-
}, null, 8,
|
|
1344
|
+
}, null, 8, ta)) : (c(), A(D(nr), {
|
|
1344
1345
|
key: 2,
|
|
1345
1346
|
size: n.value,
|
|
1346
1347
|
"stroke-width": 1.5
|
|
1347
1348
|
}, null, 8, ["size"]));
|
|
1348
1349
|
}
|
|
1349
|
-
}),
|
|
1350
|
+
}), ra = { class: "tpl:w-full" }, ia = {
|
|
1350
1351
|
key: 0,
|
|
1351
1352
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1352
|
-
},
|
|
1353
|
+
}, aa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, oa = {
|
|
1353
1354
|
key: 1,
|
|
1354
1355
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1355
|
-
},
|
|
1356
|
+
}, sa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ca = {
|
|
1356
1357
|
key: 2,
|
|
1357
1358
|
class: "tpl:relative"
|
|
1358
|
-
},
|
|
1359
|
+
}, la = ["innerHTML"], ua = {
|
|
1359
1360
|
key: 0,
|
|
1360
1361
|
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]",
|
|
1361
1362
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1362
|
-
},
|
|
1363
|
+
}, da = /* @__PURE__ */ o({
|
|
1363
1364
|
__name: "CustomBlock",
|
|
1364
1365
|
props: {
|
|
1365
1366
|
block: {},
|
|
@@ -1367,7 +1368,7 @@ var Yi = o({
|
|
|
1367
1368
|
},
|
|
1368
1369
|
emits: ["fetchData"],
|
|
1369
1370
|
setup(e, { emit: t }) {
|
|
1370
|
-
let n = e, r = t, { t: i } = G(), a = g(
|
|
1371
|
+
let n = e, r = t, { t: i } = G(), a = g(sn, null), o = H(""), s = I(() => Yn(o.value)), l = H(!1), d = I(() => a?.getDefinition(n.block.customType)), f = I(() => !!d.value), p = I(() => n.block), { isFetching: m, fetch: _, needsFetch: v, hasDataSource: y } = On({
|
|
1371
1372
|
definition: d,
|
|
1372
1373
|
block: p,
|
|
1373
1374
|
onUpdate: (e, t) => {
|
|
@@ -1376,10 +1377,10 @@ var Yi = o({
|
|
|
1376
1377
|
dataSourceFetched: t
|
|
1377
1378
|
});
|
|
1378
1379
|
}
|
|
1379
|
-
}), b = g(
|
|
1380
|
+
}), b = g(It, Vt), x = g(cn, null), S = I(() => {
|
|
1380
1381
|
if (!x?.value) return n.block;
|
|
1381
1382
|
let e = {};
|
|
1382
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1383
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? Ne(r, b.value) : r;
|
|
1383
1384
|
return {
|
|
1384
1385
|
...n.block,
|
|
1385
1386
|
fieldValues: e
|
|
@@ -1403,10 +1404,10 @@ var Yi = o({
|
|
|
1403
1404
|
E();
|
|
1404
1405
|
}, { deep: !0 }), u(() => x?.value, () => {
|
|
1405
1406
|
E();
|
|
1406
|
-
}), (e, t) => (c(), w("div",
|
|
1407
|
+
}), (e, t) => (c(), w("div", ra, [f.value ? l.value ? (c(), w("div", oa, [W(D(sr), {
|
|
1407
1408
|
size: 24,
|
|
1408
1409
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1409
|
-
}), N("span",
|
|
1410
|
+
}), N("span", sa, P(D(i).customBlocks.renderError), 1)])) : (c(), w("div", ca, [N("div", { innerHTML: s.value }, null, 8, la), D(y) && D(v) ? (c(), w("div", ua, [D(m) ? (c(), A(hr, {
|
|
1410
1411
|
key: 1,
|
|
1411
1412
|
class: "tpl:w-48"
|
|
1412
1413
|
})) : (c(), w("button", {
|
|
@@ -1414,16 +1415,16 @@ var Yi = o({
|
|
|
1414
1415
|
type: "button",
|
|
1415
1416
|
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)]",
|
|
1416
1417
|
onClick: t[0] ||= M((...e) => D(_) && D(_)(...e), ["stop"])
|
|
1417
|
-
}, [d.value?.icon ? (c(), A(
|
|
1418
|
+
}, [d.value?.icon ? (c(), A(na, {
|
|
1418
1419
|
key: 0,
|
|
1419
1420
|
icon: d.value.icon,
|
|
1420
1421
|
size: 16
|
|
1421
|
-
}, null, 8, ["icon"])) : k("", !0), T(" " + P(d.value?.dataSource?.label || D(i).customBlocks.dataSource.fetchButton), 1)]))])) : k("", !0)])) : (c(), w("div",
|
|
1422
|
+
}, null, 8, ["icon"])) : k("", !0), T(" " + P(d.value?.dataSource?.label || D(i).customBlocks.dataSource.fetchButton), 1)]))])) : k("", !0)])) : (c(), w("div", ia, [W(D(rr), {
|
|
1422
1423
|
size: 24,
|
|
1423
1424
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1424
|
-
}), N("span",
|
|
1425
|
+
}), N("span", aa, P(D(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1425
1426
|
}
|
|
1426
|
-
}),
|
|
1427
|
+
}), fa = { class: "tpl:w-full" }, pa = /* @__PURE__ */ o({
|
|
1427
1428
|
__name: "DividerBlock",
|
|
1428
1429
|
props: {
|
|
1429
1430
|
block: {},
|
|
@@ -1435,28 +1436,28 @@ var Yi = o({
|
|
|
1435
1436
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1436
1437
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1437
1438
|
}));
|
|
1438
|
-
return (e, t) => (c(), w("div",
|
|
1439
|
+
return (e, t) => (c(), w("div", fa, [N("hr", {
|
|
1439
1440
|
class: "tpl:m-0 tpl:border-none",
|
|
1440
1441
|
style: L(n.value)
|
|
1441
1442
|
}, null, 4)]));
|
|
1442
1443
|
}
|
|
1443
|
-
}),
|
|
1444
|
+
}), ma = { class: "tpl:w-full" }, ha = ["srcdoc", "title"], ga = {
|
|
1444
1445
|
key: 1,
|
|
1445
1446
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
1446
|
-
},
|
|
1447
|
+
}, _a = {
|
|
1447
1448
|
key: 0,
|
|
1448
1449
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1449
|
-
},
|
|
1450
|
+
}, va = {
|
|
1450
1451
|
key: 1,
|
|
1451
1452
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1452
|
-
},
|
|
1453
|
+
}, ya = /* @__PURE__ */ o({
|
|
1453
1454
|
__name: "HtmlBlock",
|
|
1454
1455
|
props: {
|
|
1455
1456
|
block: {},
|
|
1456
1457
|
viewport: {}
|
|
1457
1458
|
},
|
|
1458
1459
|
setup(e) {
|
|
1459
|
-
let t = e, { t: n } = G(), r = g(
|
|
1460
|
+
let t = e, { t: n } = G(), r = g(Rt, !1), i = I(() => t.block.content.trim().length > 0), a = I(() => r && i.value), o = g(It, Vt), s = g(cn, null), l = I(() => s?.value ? Ne(t.block.content, o.value) : t.block.content), d = H(null), f = H(60), p = null;
|
|
1460
1461
|
function h() {
|
|
1461
1462
|
let e = d.value?.contentDocument;
|
|
1462
1463
|
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1470,7 +1471,7 @@ var Yi = o({
|
|
|
1470
1471
|
e || (p?.disconnect(), p = null);
|
|
1471
1472
|
}), m(() => {
|
|
1472
1473
|
p?.disconnect(), p = null;
|
|
1473
|
-
}), (e, t) => (c(), w("div",
|
|
1474
|
+
}), (e, t) => (c(), w("div", ma, [a.value ? (c(), w("iframe", {
|
|
1474
1475
|
key: 0,
|
|
1475
1476
|
ref_key: "iframeRef",
|
|
1476
1477
|
ref: d,
|
|
@@ -1480,18 +1481,18 @@ var Yi = o({
|
|
|
1480
1481
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1481
1482
|
style: L({ height: `${f.value}px` }),
|
|
1482
1483
|
onLoad: _
|
|
1483
|
-
}, null, 44,
|
|
1484
|
+
}, null, 44, ha)) : (c(), w("div", ga, [W(D(Qn), {
|
|
1484
1485
|
size: 24,
|
|
1485
1486
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1486
|
-
}), i.value ? (c(), w("span",
|
|
1487
|
+
}), i.value ? (c(), w("span", _a, P(D(n).html.preview), 1)) : (c(), w("span", va, P(D(n).html.empty), 1))]))]));
|
|
1487
1488
|
}
|
|
1488
|
-
}),
|
|
1489
|
+
}), ba = ["data-drop-enabled"], xa = ["href"], Sa = ["src", "alt"], Ca = ["src", "alt"], wa = {
|
|
1489
1490
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1490
1491
|
style: { opacity: "0.7" }
|
|
1491
|
-
},
|
|
1492
|
+
}, Ta = ["href"], Ea = ["src", "alt"], Da = ["src", "alt"], Oa = {
|
|
1492
1493
|
key: 4,
|
|
1493
1494
|
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)]"
|
|
1494
|
-
},
|
|
1495
|
+
}, ka = ["aria-label"], Aa = { key: 1 }, ja = /* @__PURE__ */ o({
|
|
1495
1496
|
__name: "ImageBlock",
|
|
1496
1497
|
props: {
|
|
1497
1498
|
block: {},
|
|
@@ -1499,20 +1500,20 @@ var Yi = o({
|
|
|
1499
1500
|
},
|
|
1500
1501
|
emits: ["update"],
|
|
1501
1502
|
setup(e, { emit: t }) {
|
|
1502
|
-
let n = e, r = t, { t: i } = G(), { syntax: a } = K(), o = I(() =>
|
|
1503
|
+
let n = e, r = t, { t: i } = G(), { syntax: a } = K(), o = I(() => Ee(n.block.src, a));
|
|
1503
1504
|
function s(e) {
|
|
1504
1505
|
let t = {
|
|
1505
1506
|
src: e.url,
|
|
1506
|
-
...
|
|
1507
|
+
...In(Nn(e.width, e.height))
|
|
1507
1508
|
};
|
|
1508
1509
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1509
1510
|
}
|
|
1510
|
-
let l = H(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } =
|
|
1511
|
+
let l = H(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } = Bn({
|
|
1511
1512
|
target: l,
|
|
1512
1513
|
blocked: o,
|
|
1513
1514
|
apply: s
|
|
1514
1515
|
}), h = I(() => ({ textAlign: n.block.align })), g = I(() => {
|
|
1515
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1516
|
+
let e = n.block.border, t = ["left", "right"].map((t) => lt(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1516
1517
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1517
1518
|
}), _ = I(() => {
|
|
1518
1519
|
let e = n.block.align;
|
|
@@ -1520,13 +1521,13 @@ var Yi = o({
|
|
|
1520
1521
|
maxWidth: "100%",
|
|
1521
1522
|
width: n.block.width === "full" ? g.value : `${n.block.width}px`,
|
|
1522
1523
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1523
|
-
borderRadius:
|
|
1524
|
-
...
|
|
1524
|
+
borderRadius: le(n.block.borderRadius) ?? void 0,
|
|
1525
|
+
...Wi(n.block.border),
|
|
1525
1526
|
display: "block",
|
|
1526
1527
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1527
1528
|
marginRight: e === "center" ? "auto" : void 0
|
|
1528
1529
|
};
|
|
1529
|
-
}), v =
|
|
1530
|
+
}), v = Mn(() => o.value ? void 0 : n.block.src), y = Mn(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1530
1531
|
return (t, n) => (c(), w("div", {
|
|
1531
1532
|
ref_key: "dropZoneRef",
|
|
1532
1533
|
ref: l,
|
|
@@ -1534,7 +1535,7 @@ var Yi = o({
|
|
|
1534
1535
|
"data-drop-enabled": D(d),
|
|
1535
1536
|
class: "tpl:relative tpl:w-full",
|
|
1536
1537
|
style: L(h.value)
|
|
1537
|
-
}, [D(p) ? (c(), A(
|
|
1538
|
+
}, [D(p) ? (c(), A(Fn, {
|
|
1538
1539
|
key: 0,
|
|
1539
1540
|
uploading: D(f),
|
|
1540
1541
|
size: "canvas"
|
|
@@ -1550,22 +1551,22 @@ var Yi = o({
|
|
|
1550
1551
|
src: D(y),
|
|
1551
1552
|
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1552
1553
|
style: L(_.value)
|
|
1553
|
-
}, null, 12,
|
|
1554
|
+
}, null, 12, Sa)], 8, xa)) : (c(), w("img", {
|
|
1554
1555
|
key: 1,
|
|
1555
1556
|
class: "tpl:border-0",
|
|
1556
1557
|
src: D(y),
|
|
1557
1558
|
alt: e.block.alt,
|
|
1558
1559
|
style: L(_.value)
|
|
1559
|
-
}, null, 12,
|
|
1560
|
+
}, null, 12, Ca))], 64)) : e.block.src && o.value ? (c(), w("div", {
|
|
1560
1561
|
key: 2,
|
|
1561
1562
|
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)]",
|
|
1562
1563
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
|
|
1563
|
-
}, [W(D(
|
|
1564
|
+
}, [W(D(or), {
|
|
1564
1565
|
size: 32,
|
|
1565
1566
|
"stroke-width": 1.5,
|
|
1566
1567
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1567
1568
|
style: { opacity: "0.5" }
|
|
1568
|
-
}), N("span",
|
|
1569
|
+
}), N("span", wa, [W(Zi, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (c(), w(U, { key: 3 }, [e.block.linkUrl ? (c(), w("a", {
|
|
1569
1570
|
key: 0,
|
|
1570
1571
|
href: e.block.linkUrl,
|
|
1571
1572
|
target: "_blank",
|
|
@@ -1577,33 +1578,33 @@ var Yi = o({
|
|
|
1577
1578
|
src: D(v),
|
|
1578
1579
|
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1579
1580
|
style: L(_.value)
|
|
1580
|
-
}, null, 12,
|
|
1581
|
+
}, null, 12, Ea)], 8, Ta)) : (c(), w("img", {
|
|
1581
1582
|
key: 1,
|
|
1582
1583
|
class: "tpl:border-0",
|
|
1583
1584
|
src: D(v),
|
|
1584
1585
|
alt: e.block.alt,
|
|
1585
1586
|
style: L(_.value)
|
|
1586
|
-
}, null, 12,
|
|
1587
|
+
}, null, 12, Da))], 64)) : (c(), w("div", Oa, [D(u) ? (c(), w("button", {
|
|
1587
1588
|
key: 0,
|
|
1588
1589
|
"aria-label": D(i).image.browseMedia,
|
|
1589
1590
|
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)]",
|
|
1590
1591
|
onClick: n[2] ||= M((...e) => D(m) && D(m)(...e), ["stop"])
|
|
1591
|
-
}, [W(D(
|
|
1592
|
+
}, [W(D(or), {
|
|
1592
1593
|
size: 14,
|
|
1593
1594
|
"stroke-width": 1.5
|
|
1594
|
-
}), T(" " + P(D(i).image.browseMedia), 1)], 8,
|
|
1595
|
+
}), T(" " + P(D(i).image.browseMedia), 1)], 8, ka)) : (c(), w("span", Aa, P(D(i).image.clickToAdd), 1))]))], 12, ba));
|
|
1595
1596
|
}
|
|
1596
|
-
}),
|
|
1597
|
+
}), Ma = { class: "tpl:w-full" }, Na = ["href"], Pa = {
|
|
1597
1598
|
key: 1,
|
|
1598
1599
|
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)]"
|
|
1599
|
-
},
|
|
1600
|
+
}, Fa = /* @__PURE__ */ o({
|
|
1600
1601
|
__name: "MenuBlock",
|
|
1601
1602
|
props: {
|
|
1602
1603
|
block: {},
|
|
1603
1604
|
viewport: {}
|
|
1604
1605
|
},
|
|
1605
1606
|
setup(e) {
|
|
1606
|
-
let t = e, { t: n } = G(), r =
|
|
1607
|
+
let t = e, { t: n } = G(), r = yn(Yt, "MenuBlock"), i = I(() => ({
|
|
1607
1608
|
display: "flex",
|
|
1608
1609
|
flexWrap: "wrap",
|
|
1609
1610
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1615,7 +1616,7 @@ var Yi = o({
|
|
|
1615
1616
|
function o(e) {
|
|
1616
1617
|
return e || t.block.linkColor || t.block.color;
|
|
1617
1618
|
}
|
|
1618
|
-
return (t, r) => (c(), w("div",
|
|
1619
|
+
return (t, r) => (c(), w("div", Ma, [a.value ? (c(), w("div", {
|
|
1619
1620
|
key: 0,
|
|
1620
1621
|
style: L(i.value)
|
|
1621
1622
|
}, [(c(!0), w(U, null, p(e.block.items, (t, n) => (c(), w(U, { key: t.id }, [N("a", {
|
|
@@ -1627,49 +1628,49 @@ var Yi = o({
|
|
|
1627
1628
|
textDecoration: t.underline ? "underline" : "none"
|
|
1628
1629
|
}),
|
|
1629
1630
|
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1630
|
-
}, [W(
|
|
1631
|
+
}, [W(Zi, { text: t.text || "..." }, null, 8, ["text"])], 12, Na), n < e.block.items.length - 1 ? (c(), w("span", {
|
|
1631
1632
|
key: 0,
|
|
1632
1633
|
style: L({
|
|
1633
1634
|
color: e.block.separatorColor,
|
|
1634
1635
|
padding: `0 ${e.block.spacing}px`
|
|
1635
1636
|
})
|
|
1636
|
-
}, P(e.block.separator), 5)) : k("", !0)], 64))), 128))], 4)) : (c(), w("div",
|
|
1637
|
+
}, P(e.block.separator), 5)) : k("", !0)], 64))), 128))], 4)) : (c(), w("div", Pa, [W(D(ar), { size: 16 }), N("span", null, P(D(n).menu.addLinks), 1)]))]));
|
|
1637
1638
|
}
|
|
1638
1639
|
});
|
|
1639
1640
|
// src/composables/useEditableTextBlock.ts
|
|
1640
|
-
function
|
|
1641
|
-
let t = g(
|
|
1642
|
-
u(() =>
|
|
1643
|
-
e && (
|
|
1641
|
+
function Ia(e) {
|
|
1642
|
+
let t = g(It, Vt), r = g(cn, null), i = g($t, null), a = g(Wt, null), { syntax: o } = K(), s = I(() => r?.value ? qe(e(), t.value) : Be(e(), t.value)), c = I(() => i?.value ? $e(e(), t.value, o) : ae(s.value, o)), l = I(() => je(Yn(c.value))), d = H(!1);
|
|
1643
|
+
u(() => a?.value, (e) => {
|
|
1644
|
+
e && (d.value = !1);
|
|
1644
1645
|
});
|
|
1645
|
-
let
|
|
1646
|
-
top:
|
|
1647
|
-
left:
|
|
1646
|
+
let f = H(null), { top: p, left: m } = n(f), { toLocal: h } = yt(), _ = I(() => h({
|
|
1647
|
+
top: p.value - 8,
|
|
1648
|
+
left: m.value
|
|
1648
1649
|
}));
|
|
1649
|
-
function
|
|
1650
|
-
|
|
1650
|
+
function v() {
|
|
1651
|
+
a?.value || (d.value = !0);
|
|
1651
1652
|
}
|
|
1652
|
-
function
|
|
1653
|
-
|
|
1653
|
+
function y() {
|
|
1654
|
+
d.value = !1;
|
|
1654
1655
|
}
|
|
1655
1656
|
return {
|
|
1656
|
-
isEditing:
|
|
1657
|
-
blockRef:
|
|
1658
|
-
toolbarPosition:
|
|
1659
|
-
resolvedContent:
|
|
1660
|
-
handleDoubleClick:
|
|
1661
|
-
handleEditorDone:
|
|
1657
|
+
isEditing: d,
|
|
1658
|
+
blockRef: f,
|
|
1659
|
+
toolbarPosition: _,
|
|
1660
|
+
resolvedContent: l,
|
|
1661
|
+
handleDoubleClick: v,
|
|
1662
|
+
handleEditorDone: y
|
|
1662
1663
|
};
|
|
1663
1664
|
}
|
|
1664
1665
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1665
|
-
var
|
|
1666
|
+
var La = ["innerHTML"], Ra = /* @__PURE__ */ o({
|
|
1666
1667
|
__name: "ParagraphBlock",
|
|
1667
1668
|
props: {
|
|
1668
1669
|
block: {},
|
|
1669
1670
|
viewport: {}
|
|
1670
1671
|
},
|
|
1671
1672
|
setup(e) {
|
|
1672
|
-
let t = e, n = b(() => import("./ParagraphEditor-
|
|
1673
|
+
let t = e, n = b(() => import("./ParagraphEditor-DGJmPAC1.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = Ia(() => t.block.content);
|
|
1673
1674
|
return (t, u) => (c(), w("div", {
|
|
1674
1675
|
ref_key: "blockRef",
|
|
1675
1676
|
ref: i,
|
|
@@ -1688,11 +1689,11 @@ var Fa = ["innerHTML"], Ia = /* @__PURE__ */ o({
|
|
|
1688
1689
|
key: 1,
|
|
1689
1690
|
class: "tpl-text-content tpl:outline-none",
|
|
1690
1691
|
innerHTML: D(o)
|
|
1691
|
-
}, null, 8,
|
|
1692
|
+
}, null, 8, La))], 544));
|
|
1692
1693
|
}
|
|
1693
1694
|
});
|
|
1694
1695
|
// src/utils/updateBlockList.ts
|
|
1695
|
-
function
|
|
1696
|
+
function za(e, t, n, r = 0, i) {
|
|
1696
1697
|
let a = n ? e.content.value.blocks.find((e) => e.id === n) : void 0, o = n ? a?.type === "section" ? a.children[r] ?? [] : [] : e.content.value.blocks, s = t.map((e) => e.id);
|
|
1697
1698
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1698
1699
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1705,19 +1706,19 @@ function La(e, t, n, r = 0, i) {
|
|
|
1705
1706
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1706
1707
|
}
|
|
1707
1708
|
// src/utils/mergeTagTokens.ts
|
|
1708
|
-
function
|
|
1709
|
+
function Ba(e, t, n) {
|
|
1709
1710
|
let r = [], i = "\0MT";
|
|
1710
1711
|
for (; e.includes(i);) i += "_";
|
|
1711
|
-
let a = n === "html" ?
|
|
1712
|
+
let a = n === "html" ? Le(e, (e) => {
|
|
1712
1713
|
let t = r.push(e) - 1;
|
|
1713
1714
|
return `${i}${t}\u0000`;
|
|
1714
1715
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1715
1716
|
start: e.index,
|
|
1716
1717
|
end: e.index + e[0].length
|
|
1717
|
-
})), s = [], c =
|
|
1718
|
+
})), s = [], c = nt(a, t, "logic"), l = [], u = 0;
|
|
1718
1719
|
for (let e of ["logic", "value"]) {
|
|
1719
1720
|
let r = 0;
|
|
1720
|
-
for (let i of e === "logic" ? c :
|
|
1721
|
+
for (let i of e === "logic" ? c : nt(a, t, "value")) {
|
|
1721
1722
|
let t = i.index, a = t + i.value.length;
|
|
1722
1723
|
for (; o[r]?.end <= t;) r++;
|
|
1723
1724
|
let c = o[r];
|
|
@@ -1733,51 +1734,51 @@ function Ra(e, t, n) {
|
|
|
1733
1734
|
}), s.push({
|
|
1734
1735
|
start: t,
|
|
1735
1736
|
end: a,
|
|
1736
|
-
value: n === "html" ?
|
|
1737
|
+
value: n === "html" ? Xe(i.value) : i.value
|
|
1737
1738
|
});
|
|
1738
1739
|
}
|
|
1739
1740
|
}
|
|
1740
1741
|
}
|
|
1741
1742
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1742
1743
|
}
|
|
1743
|
-
function
|
|
1744
|
-
return JSON.stringify(
|
|
1744
|
+
function Va(e, t, n, r) {
|
|
1745
|
+
return JSON.stringify(Ba(e, n, r)) !== JSON.stringify(Ba(t, n, r));
|
|
1745
1746
|
}
|
|
1746
1747
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1747
|
-
var
|
|
1748
|
+
var Ha = [
|
|
1748
1749
|
"data-state",
|
|
1749
1750
|
"aria-label",
|
|
1750
1751
|
"title",
|
|
1751
1752
|
"aria-expanded",
|
|
1752
1753
|
"aria-controls",
|
|
1753
1754
|
"onKeydown"
|
|
1754
|
-
],
|
|
1755
|
+
], Ua = [
|
|
1755
1756
|
"aria-label",
|
|
1756
1757
|
"aria-labelledby",
|
|
1757
1758
|
"aria-describedby",
|
|
1758
1759
|
"onKeydown"
|
|
1759
|
-
],
|
|
1760
|
+
], Wa = ["id"], Ga = ["id"], Ka = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, qa = ["disabled"], Ja = {
|
|
1760
1761
|
key: 0,
|
|
1761
1762
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1762
|
-
},
|
|
1763
|
+
}, Ya = {
|
|
1763
1764
|
key: 1,
|
|
1764
1765
|
class: "tpl:m-0"
|
|
1765
|
-
},
|
|
1766
|
+
}, Xa = { class: "tpl:m-0" }, Za = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, Qa = {
|
|
1766
1767
|
key: 3,
|
|
1767
1768
|
class: "tpl:m-0"
|
|
1768
|
-
},
|
|
1769
|
+
}, $a = {
|
|
1769
1770
|
key: 4,
|
|
1770
1771
|
class: "tpl:m-0"
|
|
1771
|
-
},
|
|
1772
|
+
}, eo = {
|
|
1772
1773
|
key: 5,
|
|
1773
1774
|
class: "tpl:m-0"
|
|
1774
|
-
},
|
|
1775
|
+
}, to = {
|
|
1775
1776
|
key: 6,
|
|
1776
1777
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1777
|
-
},
|
|
1778
|
+
}, no = ["onClick"], ro = {
|
|
1778
1779
|
key: 7,
|
|
1779
1780
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1780
|
-
},
|
|
1781
|
+
}, io = ["data-testid", "disabled"], ao = /*#__PURE__*/ xr(/* @__PURE__ */ o({
|
|
1781
1782
|
__name: "LocaleStatusChip",
|
|
1782
1783
|
props: {
|
|
1783
1784
|
blockId: {},
|
|
@@ -1797,32 +1798,32 @@ var Ba = [
|
|
|
1797
1798
|
},
|
|
1798
1799
|
emits: ["target"],
|
|
1799
1800
|
setup(e, { emit: t }) {
|
|
1800
|
-
let n = e, r = t, i = g(
|
|
1801
|
+
let n = e, r = t, i = g(bn, null), o = g(dn, null), s = g(Tt, null), l = g(_n, "en") ?? "en", { t: d, format: f } = G(), m = te(), h = _t(), { toLocal: v } = yt(), y = H(null), b = H(null), x = H(!1), S = H(!1), C = H(null), T = H(null), F = null, R = H({
|
|
1801
1802
|
top: 0,
|
|
1802
1803
|
left: 0
|
|
1803
1804
|
}), z = H({
|
|
1804
1805
|
maxHeight: 0,
|
|
1805
1806
|
maxWidth: 0
|
|
1806
|
-
}), B = `tpl-locale-popover-${
|
|
1807
|
+
}), B = `tpl-locale-popover-${de()}`, V = I(() => gr(i?.activeLocale?.value ?? "")), W = I(() => gr(i?.content.value.settings.locale ?? "en"));
|
|
1807
1808
|
function K(e, t) {
|
|
1808
1809
|
switch (e) {
|
|
1809
1810
|
case "tags-differ": return d.localization.tagsDiffer;
|
|
1810
1811
|
case "hidden": return f(d.localization.hidden, { language: V.value });
|
|
1811
1812
|
case "changed": return f(d.localization.changed, { language: V.value });
|
|
1812
|
-
case "default-stale": return
|
|
1813
|
-
case "missing": return t === 1 ? d.localization.notTranslated :
|
|
1814
|
-
default: return t === 1 ? d.localization.outOfDate :
|
|
1813
|
+
case "default-stale": return _r(d.localization.staleLanguages, t, l);
|
|
1814
|
+
case "missing": return t === 1 ? d.localization.notTranslated : _r(d.localization.notTranslatedCount, t, l);
|
|
1815
|
+
default: return t === 1 ? d.localization.outOfDate : _r(d.localization.staleCount, t, l);
|
|
1815
1816
|
}
|
|
1816
1817
|
}
|
|
1817
|
-
let ne = I(() => K(n.state, n.count)), q = I(() => n.popoverState ?? n.state),
|
|
1818
|
-
function
|
|
1818
|
+
let ne = I(() => K(n.state, n.count)), q = I(() => n.popoverState ?? n.state), re = I(() => n.popoverCount ?? n.count), ie = I(() => K(q.value, re.value)), ae = I(() => n.state === "hidden" ? er : n.state === "changed" ? Zn : n.state === "default-stale" ? ur : n.state === "stale" ? $n : sr), oe = I(() => q.value === "default-stale" || (q.value === "missing" || q.value === "stale") && re.value > 1), J = I(() => n.editable && n.eligibleGaps && o?.isAvailable.value);
|
|
1819
|
+
function Y(e = !1) {
|
|
1819
1820
|
x.value = !1, S.value = !1, F = null, e && y.value?.focus({ preventScroll: !0 });
|
|
1820
1821
|
}
|
|
1821
|
-
async function
|
|
1822
|
-
if (x.value) return
|
|
1823
|
-
h.value && (x.value = !0, await
|
|
1822
|
+
async function X() {
|
|
1823
|
+
if (x.value) return Y();
|
|
1824
|
+
h.value && (x.value = !0, await Z());
|
|
1824
1825
|
}
|
|
1825
|
-
async function
|
|
1826
|
+
async function Z() {
|
|
1826
1827
|
let e = h.value;
|
|
1827
1828
|
if (!e || !x.value) return;
|
|
1828
1829
|
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);
|
|
@@ -1842,53 +1843,53 @@ var Ba = [
|
|
|
1842
1843
|
}), await j(), x.value && (S.value ? T.value : b.value)?.focus({ preventScroll: !0 });
|
|
1843
1844
|
}
|
|
1844
1845
|
u(S, async () => {
|
|
1845
|
-
x.value && (await
|
|
1846
|
+
x.value && (await Z(), x.value && !S.value && C.value?.focus({ preventScroll: !0 }));
|
|
1846
1847
|
});
|
|
1847
|
-
function
|
|
1848
|
+
function se(e) {
|
|
1848
1849
|
let t = e.composedPath();
|
|
1849
|
-
!t.includes(y.value) && !t.includes(b.value) &&
|
|
1850
|
+
!t.includes(y.value) && !t.includes(b.value) && Y();
|
|
1850
1851
|
}
|
|
1851
|
-
function
|
|
1852
|
+
function ce(e) {
|
|
1852
1853
|
if (e.composedPath().includes(b.value)) return;
|
|
1853
1854
|
let t = y.value?.getBoundingClientRect();
|
|
1854
|
-
t && F && t.top === F.top && t.right === F.right ||
|
|
1855
|
+
t && F && t.top === F.top && t.right === F.right || Y();
|
|
1855
1856
|
}
|
|
1856
|
-
function
|
|
1857
|
-
m.removeEventListener("click",
|
|
1857
|
+
function le() {
|
|
1858
|
+
m.removeEventListener("click", se, !0), m.removeEventListener("scroll", ce, !0);
|
|
1858
1859
|
}
|
|
1859
1860
|
u(x, (e) => {
|
|
1860
|
-
|
|
1861
|
+
le(), e ? (m.addEventListener("click", se, !0), m.addEventListener("scroll", ce, !0)) : r("target", null);
|
|
1861
1862
|
}, { flush: "sync" }), u(q, () => {
|
|
1862
|
-
S.value = !1, x.value &&
|
|
1863
|
+
S.value = !1, x.value && Z();
|
|
1863
1864
|
}), u([
|
|
1864
1865
|
() => n.blockId,
|
|
1865
1866
|
() => n.state,
|
|
1866
1867
|
() => i?.activeLocale?.value,
|
|
1867
1868
|
() => i?.state.template?.id,
|
|
1868
1869
|
() => i?.loadVersion?.value
|
|
1869
|
-
], () =>
|
|
1870
|
-
let
|
|
1871
|
-
(x.value || h.value) && (r("target", e ?? null), x.value ||
|
|
1870
|
+
], () => Y()), _(le);
|
|
1871
|
+
let ue = (e) => {
|
|
1872
|
+
(x.value || h.value) && (r("target", e ?? null), x.value || X());
|
|
1872
1873
|
};
|
|
1873
1874
|
u(() => n.blockId, (e, t) => {
|
|
1874
|
-
t && s?.get(t) ===
|
|
1875
|
+
t && s?.get(t) === ue && s.delete(t), s?.set(e, ue);
|
|
1875
1876
|
}, { immediate: !0 }), _(() => {
|
|
1876
|
-
s?.get(n.blockId) ===
|
|
1877
|
+
s?.get(n.blockId) === ue && s.delete(n.blockId);
|
|
1877
1878
|
});
|
|
1878
|
-
function
|
|
1879
|
-
i?.keepTranslations?.(n.blockId, n.stale),
|
|
1879
|
+
function Q() {
|
|
1880
|
+
i?.keepTranslations?.(n.blockId, n.stale), Y(!0);
|
|
1880
1881
|
}
|
|
1881
1882
|
function fe(e) {
|
|
1882
|
-
i?.resetLocaleFields?.(n.blockId, e),
|
|
1883
|
+
i?.resetLocaleFields?.(n.blockId, e), Y(!0);
|
|
1883
1884
|
}
|
|
1884
1885
|
function pe() {
|
|
1885
|
-
i?.setBlockHidden?.(n.blockId, !1),
|
|
1886
|
+
i?.setBlockHidden?.(n.blockId, !1), Y(!0);
|
|
1886
1887
|
}
|
|
1887
1888
|
function me(e) {
|
|
1888
|
-
i?.setActiveLocale?.(e),
|
|
1889
|
+
i?.setActiveLocale?.(e), Y();
|
|
1889
1890
|
}
|
|
1890
1891
|
function he() {
|
|
1891
|
-
|
|
1892
|
+
J.value && !o?.running.value && (q.value === "tags-differ" && n.replacesCurrent ? S.value = !0 : o?.translate({
|
|
1892
1893
|
only: q.value === "tags-differ" ? "all" : "gaps",
|
|
1893
1894
|
blockId: n.blockId
|
|
1894
1895
|
}));
|
|
@@ -1897,10 +1898,10 @@ var Ba = [
|
|
|
1897
1898
|
S.value = !1;
|
|
1898
1899
|
}
|
|
1899
1900
|
function _e() {
|
|
1900
|
-
S.value ? ge() :
|
|
1901
|
+
S.value ? ge() : Y(!0);
|
|
1901
1902
|
}
|
|
1902
1903
|
function ve() {
|
|
1903
|
-
|
|
1904
|
+
J.value && !o?.running.value && n.translationCount && (S.value = !1, o?.translate({
|
|
1904
1905
|
only: "all",
|
|
1905
1906
|
blockId: n.blockId
|
|
1906
1907
|
}));
|
|
@@ -1917,13 +1918,13 @@ var Ba = [
|
|
|
1917
1918
|
"aria-controls": x.value ? B : void 0,
|
|
1918
1919
|
"aria-haspopup": "dialog",
|
|
1919
1920
|
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)]",
|
|
1920
|
-
onClick: M(
|
|
1921
|
-
onKeydown: [E(M(
|
|
1922
|
-
}, [(c(), A(a(
|
|
1921
|
+
onClick: M(X, ["stop"]),
|
|
1922
|
+
onKeydown: [E(M(X, ["stop", "prevent"]), ["enter"]), E(M(_e, ["stop", "prevent"]), ["esc"])]
|
|
1923
|
+
}, [(c(), A(a(ae.value), {
|
|
1923
1924
|
size: 12,
|
|
1924
1925
|
"stroke-width": 2,
|
|
1925
1926
|
"aria-hidden": "true"
|
|
1926
|
-
}))], 40,
|
|
1927
|
+
}))], 40, Ha), D(h) && x.value ? (c(), A(ee, {
|
|
1927
1928
|
key: 0,
|
|
1928
1929
|
to: D(h)
|
|
1929
1930
|
}, [N("div", {
|
|
@@ -1931,7 +1932,7 @@ var Ba = [
|
|
|
1931
1932
|
ref_key: "popover",
|
|
1932
1933
|
ref: b,
|
|
1933
1934
|
role: "dialog",
|
|
1934
|
-
"aria-label": S.value ? void 0 :
|
|
1935
|
+
"aria-label": S.value ? void 0 : ie.value,
|
|
1935
1936
|
"aria-labelledby": S.value ? `${B}-question` : void 0,
|
|
1936
1937
|
"aria-describedby": S.value ? `${B}-warning` : void 0,
|
|
1937
1938
|
tabindex: "-1",
|
|
@@ -1949,80 +1950,80 @@ var Ba = [
|
|
|
1949
1950
|
N("h3", {
|
|
1950
1951
|
id: `${B}-question`,
|
|
1951
1952
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
1952
|
-
}, P(D(
|
|
1953
|
+
}, P(D(_r)(D(d).localization.translationConfirmation, e.translationCount ?? 0, D(l))), 9, Wa),
|
|
1953
1954
|
N("p", {
|
|
1954
1955
|
id: `${B}-warning`,
|
|
1955
1956
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
1956
|
-
}, P(D(f)(D(d).localization.translationDescription, { language: V.value })), 9,
|
|
1957
|
-
N("div",
|
|
1957
|
+
}, P(D(f)(D(d).localization.translationDescription, { language: V.value })), 9, Ga),
|
|
1958
|
+
N("div", Ka, [N("button", {
|
|
1958
1959
|
ref_key: "confirmationCancel",
|
|
1959
1960
|
ref: T,
|
|
1960
1961
|
type: "button",
|
|
1961
1962
|
"data-testid": "translation-confirm-cancel",
|
|
1962
|
-
class: O(D(
|
|
1963
|
+
class: O(D(yr)),
|
|
1963
1964
|
onClick: ge
|
|
1964
1965
|
}, P(D(d).localization.cancel), 3), N("button", {
|
|
1965
1966
|
type: "button",
|
|
1966
1967
|
"data-testid": "translation-confirm",
|
|
1967
|
-
class: O(D(
|
|
1968
|
-
disabled: !
|
|
1968
|
+
class: O(D(br)),
|
|
1969
|
+
disabled: !J.value || !!D(o)?.running.value || !e.translationCount,
|
|
1969
1970
|
onClick: ve
|
|
1970
|
-
}, P(D(
|
|
1971
|
+
}, P(D(_r)(D(d).localization.translateAllFields, e.translationCount ?? 0, D(l))), 11, qa)])
|
|
1971
1972
|
], 64)) : (c(), w(U, { key: 1 }, [
|
|
1972
|
-
|
|
1973
|
-
q.value === "missing" ? (c(), w("p",
|
|
1973
|
+
oe.value ? (c(), w("p", Ja, P(ie.value), 1)) : k("", !0),
|
|
1974
|
+
q.value === "missing" ? (c(), w("p", Ya, P(D(f)(D(d).localization.missingExplanation, { default: W.value })), 1)) : q.value === "stale" ? (c(), w(U, { key: 2 }, [N("p", Xa, P(D(f)(D(d).localization.staleExplanation, { default: W.value })), 1), N("p", Za, P(D(f)(D(d).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : q.value === "tags-differ" ? (c(), w("p", Qa, P(D(f)(D(d).localization.tagsDifferExplanation, { default: W.value })), 1)) : q.value === "changed" ? (c(), w("p", $a, P(D(_r)(D(d).localization.changedProperties, re.value, D(l), { default: W.value })), 1)) : q.value === "hidden" ? (c(), w("p", eo, P(D(f)(D(d).localization.hiddenExplanation, { language: V.value })), 1)) : (c(), w("ul", to, [(c(!0), w(U, null, p(e.staleLocales, (e) => (c(), w("li", {
|
|
1974
1975
|
key: e,
|
|
1975
1976
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
1976
|
-
}, [N("span", null, P(D(
|
|
1977
|
+
}, [N("span", null, P(D(gr)(e)), 1), N("button", {
|
|
1977
1978
|
type: "button",
|
|
1978
|
-
class: O(D(
|
|
1979
|
+
class: O(D(vr)),
|
|
1979
1980
|
onClick: (t) => me(e)
|
|
1980
|
-
}, P(D(d).localization.open), 11,
|
|
1981
|
-
e.editable && q.value !== "default-stale" ? (c(), w("div",
|
|
1982
|
-
|
|
1981
|
+
}, P(D(d).localization.open), 11, no)]))), 128))])),
|
|
1982
|
+
e.editable && q.value !== "default-stale" ? (c(), w("div", ro, [
|
|
1983
|
+
J.value && (q.value === "missing" || q.value === "stale" || q.value === "tags-differ") ? (c(), w("button", {
|
|
1983
1984
|
key: 0,
|
|
1984
1985
|
type: "button",
|
|
1985
1986
|
ref_key: "retranslate",
|
|
1986
1987
|
ref: C,
|
|
1987
1988
|
"data-testid": q.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
1988
|
-
class: O(D(
|
|
1989
|
+
class: O(D(yr)),
|
|
1989
1990
|
disabled: !!D(o)?.running.value,
|
|
1990
1991
|
onClick: he
|
|
1991
|
-
}, P(q.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11,
|
|
1992
|
+
}, P(q.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11, io)) : k("", !0),
|
|
1992
1993
|
q.value === "stale" || q.value === "tags-differ" ? (c(), w(U, { key: 1 }, [q.value === "stale" ? (c(), w("button", {
|
|
1993
1994
|
key: 0,
|
|
1994
1995
|
type: "button",
|
|
1995
1996
|
"data-testid": "locale-keep",
|
|
1996
|
-
class: O(D(
|
|
1997
|
-
onClick:
|
|
1997
|
+
class: O(D(J.value ? vr : yr)),
|
|
1998
|
+
onClick: Q
|
|
1998
1999
|
}, P(D(d).localization.keep), 3)) : k("", !0), N("button", {
|
|
1999
2000
|
type: "button",
|
|
2000
2001
|
"data-testid": "locale-use-default",
|
|
2001
|
-
class: O(D(q.value === "tags-differ" && !
|
|
2002
|
+
class: O(D(q.value === "tags-differ" && !J.value ? yr : vr)),
|
|
2002
2003
|
onClick: n[0] ||= (t) => fe(q.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2003
2004
|
}, P(D(f)(D(d).localization.useDefaultLanguage, { default: W.value })), 3)], 64)) : k("", !0),
|
|
2004
2005
|
q.value === "changed" ? (c(), w("button", {
|
|
2005
2006
|
key: 2,
|
|
2006
2007
|
type: "button",
|
|
2007
2008
|
"data-testid": "locale-reset",
|
|
2008
|
-
class: O(D(
|
|
2009
|
+
class: O(D(yr)),
|
|
2009
2010
|
onClick: n[1] ||= (t) => fe(e.setPaths)
|
|
2010
2011
|
}, P(D(d).localization.resetChanges), 3)) : k("", !0),
|
|
2011
2012
|
q.value === "hidden" ? (c(), w("button", {
|
|
2012
2013
|
key: 3,
|
|
2013
2014
|
type: "button",
|
|
2014
2015
|
"data-testid": "locale-show",
|
|
2015
|
-
class: O(D(
|
|
2016
|
+
class: O(D(yr)),
|
|
2016
2017
|
onClick: pe
|
|
2017
2018
|
}, P(D(d).localization.show), 3)) : k("", !0)
|
|
2018
2019
|
])) : k("", !0)
|
|
2019
|
-
], 64))], 44,
|
|
2020
|
+
], 64))], 44, Ua)], 8, ["to"])) : k("", !0)], 64));
|
|
2020
2021
|
}
|
|
2021
|
-
}), [["__scopeId", "data-v-3343ae7d"]]),
|
|
2022
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), oo = /* @__PURE__ */ o({
|
|
2022
2023
|
__name: "LocaleMarkers",
|
|
2023
2024
|
props: { block: {} },
|
|
2024
2025
|
setup(e) {
|
|
2025
|
-
let t = e, n = g(
|
|
2026
|
+
let t = e, n = g(bn, null), r = g(Ft, void 0), i = g(tn, []), a = g(Ct, Q.liquid), o = g(nn, I(() => /* @__PURE__ */ new Set())), s = I(() => n?.activeLocale?.value), l = I(() => s.value ? t.block.l10n?.[s.value] : void 0), d = I(() => ({
|
|
2026
2027
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2027
2028
|
...t.block,
|
|
2028
2029
|
children: []
|
|
@@ -2031,14 +2032,14 @@ var Ba = [
|
|
|
2031
2032
|
locale: n.content.value.settings.locale,
|
|
2032
2033
|
locales: n.content.value.settings.locales
|
|
2033
2034
|
}
|
|
2034
|
-
})), f = I(() => n && s.value && !o.value.has(s.value) ?
|
|
2035
|
+
})), f = I(() => n && s.value && !o.value.has(s.value) ? fe(d.value, s.value, i) : {
|
|
2035
2036
|
missing: [],
|
|
2036
2037
|
stale: [],
|
|
2037
2038
|
translated: []
|
|
2038
2039
|
}), p = I(() => f.value.stale.map((e) => e.slice(t.block.id.length + 1))), m = I(() => f.value.translated.flatMap((e) => {
|
|
2039
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2040
|
-
return typeof r == "string" && i !== void 0 &&
|
|
2041
|
-
})), h = H(null), _ = I(() => n && s.value && !o.value.has(s.value) ?
|
|
2040
|
+
let n = e.slice(t.block.id.length + 1), r = oe(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || xe[t.block.type]?.includes(n) ? "html" : "text";
|
|
2041
|
+
return typeof r == "string" && i !== void 0 && Va(r, i, a, o) ? [n] : [];
|
|
2042
|
+
})), h = H(null), _ = I(() => n && s.value && !o.value.has(s.value) ? Y(d.value, s.value, {
|
|
2042
2043
|
syntax: a,
|
|
2043
2044
|
definitions: i,
|
|
2044
2045
|
doNotTranslate: r?.doNotTranslate,
|
|
@@ -2048,9 +2049,9 @@ var Ba = [
|
|
|
2048
2049
|
let n = e.slice(t.block.id.length + 1);
|
|
2049
2050
|
return f.value.translated.includes(e) && !m.value.includes(n);
|
|
2050
2051
|
})), y = I(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2051
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2052
|
-
return Array.isArray(i) ?
|
|
2053
|
-
})), b = I(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) &&
|
|
2052
|
+
let n = e.split("."), r = n.pop(), i = n.length ? oe(t.block, n.join(".")) : t.block;
|
|
2053
|
+
return Array.isArray(i) ? oe(i, r) !== void 0 : i !== void 0;
|
|
2054
|
+
})), 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);
|
|
2054
2055
|
function S(e) {
|
|
2055
2056
|
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;
|
|
2056
2057
|
}
|
|
@@ -2059,12 +2060,12 @@ var Ba = [
|
|
|
2059
2060
|
h.value = null;
|
|
2060
2061
|
});
|
|
2061
2062
|
let E = I(() => {
|
|
2062
|
-
let e =
|
|
2063
|
+
let e = oe(t.block, p.value[0] ?? "");
|
|
2063
2064
|
if (typeof e != "string") return "";
|
|
2064
2065
|
let n = e.split(/<[^>]*>/).join("");
|
|
2065
2066
|
return Array.from(n).slice(0, 60).join("");
|
|
2066
2067
|
});
|
|
2067
|
-
return (t, n) => D(r) && x.value ? (c(), A(
|
|
2068
|
+
return (t, n) => D(r) && x.value ? (c(), A(ao, {
|
|
2068
2069
|
key: 0,
|
|
2069
2070
|
"block-id": e.block.id,
|
|
2070
2071
|
state: x.value,
|
|
@@ -2098,21 +2099,21 @@ var Ba = [
|
|
|
2098
2099
|
"editable"
|
|
2099
2100
|
])) : k("", !0);
|
|
2100
2101
|
}
|
|
2101
|
-
}),
|
|
2102
|
+
}), so = [
|
|
2102
2103
|
"data-block-id",
|
|
2103
2104
|
"data-block-type",
|
|
2104
2105
|
"data-tpl-picked"
|
|
2105
|
-
],
|
|
2106
|
+
], co = ["aria-label"], lo = ["data-lock-holder"], uo = ["aria-label"], fo = [
|
|
2106
2107
|
"aria-label",
|
|
2107
2108
|
"aria-pressed",
|
|
2108
2109
|
"title"
|
|
2109
|
-
],
|
|
2110
|
+
], po = ["aria-label", "title"], mo = ["aria-label", "title"], ho = ["aria-label", "title"], go = {
|
|
2110
2111
|
key: 3,
|
|
2111
2112
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2112
|
-
},
|
|
2113
|
+
}, _o = { 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)]" }, vo = {
|
|
2113
2114
|
key: 4,
|
|
2114
2115
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2115
|
-
},
|
|
2116
|
+
}, yo = ["aria-label", "title"], bo = /*#__PURE__*/ xr(/* @__PURE__ */ o({
|
|
2116
2117
|
__name: "BlockWrapper",
|
|
2117
2118
|
props: {
|
|
2118
2119
|
block: {},
|
|
@@ -2125,33 +2126,33 @@ var Ba = [
|
|
|
2125
2126
|
},
|
|
2126
2127
|
emits: ["select"],
|
|
2127
2128
|
setup(t, { emit: n }) {
|
|
2128
|
-
let i = b(() => import("./BlockIssueBadge-
|
|
2129
|
+
let i = b(() => import("./BlockIssueBadge-Dp06vQd3.js")), a = t, o = I(() => a.displayBlock ?? a.block), s = n, { t: l, format: d } = G(), f = g(xn, null), p = H(null), m = I(() => f?.liftedBlockId.value === a.block.id), h = I(() => m.value ? d(l.blockActions.dragLifted, { block: a.block.type }) : l.blockActions.drag);
|
|
2129
2130
|
async function _() {
|
|
2130
2131
|
await j(), p.value?.focus();
|
|
2131
2132
|
}
|
|
2132
2133
|
function v(e) {
|
|
2133
2134
|
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), _())));
|
|
2134
2135
|
}
|
|
2135
|
-
let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(
|
|
2136
|
+
let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(Q?.activeLocale?.value && a.block.l10n?.[Q.activeLocale.value]?.hidden)), E = I(() => a.previewMode === !0 && (S.value || C.value)), ee = I(() => a.viewport ? {
|
|
2136
2137
|
desktop: l.viewport.desktop,
|
|
2137
2138
|
mobile: l.viewport.mobile
|
|
2138
|
-
}[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(
|
|
2139
|
+
}[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(gn, null), z = g(ln, null), B = g(Qt, {}), V = I(() => B.savedBlocks?.isPicking.value === !0), U = I(() => !a.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), te = I(() => a.isSelected && !V.value), K = I(() => B.comments?.getBlockCount(a.block.id) ?? 0), ne = H(null), q = H(null), re = H(null), ie = H(null), ae = H({
|
|
2139
2140
|
left: "calc(100% + 8px)",
|
|
2140
2141
|
top: "50%"
|
|
2141
|
-
}),
|
|
2142
|
-
function
|
|
2143
|
-
let e =
|
|
2142
|
+
}), oe = H(!1), J = I(() => q.value ?? ie.value), Y = I(() => J.value?.closest(".tpl-body"));
|
|
2143
|
+
function X() {
|
|
2144
|
+
let e = oe.value, t = q.value, n = ie.value, r = ne.value;
|
|
2144
2145
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2145
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2146
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = Y.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2146
2147
|
if (n?.offsetWidth) {
|
|
2147
2148
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2148
2149
|
if (e === i) {
|
|
2149
|
-
|
|
2150
|
+
oe.value = !i, j(X);
|
|
2150
2151
|
return;
|
|
2151
2152
|
}
|
|
2152
2153
|
}
|
|
2153
2154
|
if (!t?.offsetWidth) return;
|
|
2154
|
-
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d =
|
|
2155
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = re.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%";
|
|
2155
2156
|
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2156
2157
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2157
2158
|
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
@@ -2163,27 +2164,27 @@ var Ba = [
|
|
|
2163
2164
|
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2164
2165
|
}
|
|
2165
2166
|
}
|
|
2166
|
-
(
|
|
2167
|
+
(ae.value.left !== `${u}px` || ae.value.top !== m) && (ae.value = {
|
|
2167
2168
|
left: `${u}px`,
|
|
2168
2169
|
top: m
|
|
2169
2170
|
});
|
|
2170
2171
|
}
|
|
2171
|
-
x(
|
|
2172
|
+
x(X), r(I(() => J.value ? [
|
|
2172
2173
|
ne.value,
|
|
2173
2174
|
q.value,
|
|
2174
|
-
J.value,
|
|
2175
2175
|
re.value,
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2176
|
+
ie.value,
|
|
2177
|
+
Y.value
|
|
2178
|
+
].filter((e) => !!e) : []), X), e(Y, "scroll", X, { passive: !0 });
|
|
2179
|
+
let Z = I(() => B.collaboration?.lockOf(a.block.id) ?? null), se = I(() => Z.value?.holder.type === "guest" ? l.collaboration.guest : Z.value?.holder.name ?? ""), ce = I(() => B.collaboration?.agentHighlightOf(a.block.id) ?? B.ai?.highlightOf(a.block.id) ?? null), le = Hn(() => o.value.type === "section" ? o.value.backgroundImage : void 0), ue = Hn(() => o.value.type === "section" ? o.value.wrapper?.backgroundImage : void 0), Q = g(bn, null), de = Q ? bt(Q) : null, fe = g(on, null) ?? de?.content ?? null;
|
|
2180
|
+
u([() => Q?.activeLocale?.value, () => de && He(de.settings.value)], X, { flush: "post" });
|
|
2181
|
+
let pe = g(zt, void 0), me = I(() => Hi(o.value, {
|
|
2182
|
+
backgroundImageUrl: le.value,
|
|
2183
|
+
heroBoxWidth: Pn(o.value) ? Rn(o.value, fe?.value, pe) : void 0
|
|
2184
|
+
})), he = I(() => Ji(o.value, { backgroundImageUrl: ue.value })), ge = I(() => {
|
|
2184
2185
|
let e = o.value;
|
|
2185
2186
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2186
|
-
}), _e = I(() =>
|
|
2187
|
+
}), _e = I(() => qi(ge.value?.wrapper?.padding));
|
|
2187
2188
|
function ve(e) {
|
|
2188
2189
|
a.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
2189
2190
|
}
|
|
@@ -2217,44 +2218,44 @@ var Ba = [
|
|
|
2217
2218
|
}, [
|
|
2218
2219
|
N("div", {
|
|
2219
2220
|
ref_key: "badgesElement",
|
|
2220
|
-
ref:
|
|
2221
|
+
ref: re,
|
|
2221
2222
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2222
2223
|
}, [
|
|
2223
2224
|
K.value > 0 && !S.value ? (c(), w("button", {
|
|
2224
2225
|
key: 0,
|
|
2225
2226
|
ref_key: "commentElement",
|
|
2226
|
-
ref:
|
|
2227
|
-
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)]",
|
|
2227
|
+
ref: ie,
|
|
2228
|
+
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)]", oe.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2228
2229
|
"aria-label": D(d)(D(l).blockActions.comments, { count: String(K.value) }),
|
|
2229
2230
|
onClick: n[0] ||= M((e) => D(B).comments?.openForBlock(t.block.id), ["stop"])
|
|
2230
|
-
}, [W(D(
|
|
2231
|
+
}, [W(D(dr), {
|
|
2231
2232
|
size: 12,
|
|
2232
2233
|
"stroke-width": 2.5
|
|
2233
|
-
}), T(" " + P(K.value), 1)], 10,
|
|
2234
|
+
}), T(" " + P(K.value), 1)], 10, co)) : k("", !0),
|
|
2234
2235
|
W(D(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2235
|
-
t.previewMode ? k("", !0) : (c(), A(
|
|
2236
|
+
t.previewMode ? k("", !0) : (c(), A(oo, {
|
|
2236
2237
|
key: 1,
|
|
2237
2238
|
block: t.block
|
|
2238
2239
|
}, null, 8, ["block"]))
|
|
2239
2240
|
], 512),
|
|
2240
|
-
|
|
2241
|
+
Z.value ? (c(), w("div", {
|
|
2241
2242
|
key: 0,
|
|
2242
2243
|
"data-testid": "block-lock",
|
|
2243
|
-
"data-lock-holder":
|
|
2244
|
+
"data-lock-holder": Z.value.holder.sessionId,
|
|
2244
2245
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2245
2246
|
style: L({
|
|
2246
|
-
outline: `2px solid ${
|
|
2247
|
+
outline: `2px solid ${Z.value.holder.color}`,
|
|
2247
2248
|
outlineOffset: "-1px"
|
|
2248
2249
|
})
|
|
2249
2250
|
}, [N("span", {
|
|
2250
2251
|
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",
|
|
2251
2252
|
style: L({
|
|
2252
|
-
backgroundColor:
|
|
2253
|
-
color: D(
|
|
2253
|
+
backgroundColor: Z.value.holder.color,
|
|
2254
|
+
color: D(Sr)(Z.value.holder.color)
|
|
2254
2255
|
})
|
|
2255
|
-
}, P(D(d)(D(l).collaboration.editing, { name:
|
|
2256
|
-
|
|
2257
|
-
key:
|
|
2256
|
+
}, P(D(d)(D(l).collaboration.editing, { name: se.value })), 5)], 12, lo)) : k("", !0),
|
|
2257
|
+
ce.value === null ? k("", !0) : (c(), w("div", {
|
|
2258
|
+
key: ce.value,
|
|
2258
2259
|
"data-testid": "block-agent-highlight",
|
|
2259
2260
|
"aria-hidden": "true",
|
|
2260
2261
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
@@ -2263,7 +2264,7 @@ var Ba = [
|
|
|
2263
2264
|
key: 2,
|
|
2264
2265
|
ref_key: "actionsElement",
|
|
2265
2266
|
ref: q,
|
|
2266
|
-
style: L(
|
|
2267
|
+
style: L(ae.value),
|
|
2267
2268
|
role: "toolbar",
|
|
2268
2269
|
"aria-label": D(l).blockActions.drag,
|
|
2269
2270
|
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)]"
|
|
@@ -2277,81 +2278,81 @@ var Ba = [
|
|
|
2277
2278
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2278
2279
|
title: D(l).blockActions.drag,
|
|
2279
2280
|
onKeydown: v
|
|
2280
|
-
}, [W(D(
|
|
2281
|
+
}, [W(D(mr), {
|
|
2281
2282
|
size: 14,
|
|
2282
2283
|
"stroke-width": 1.5
|
|
2283
|
-
})], 40,
|
|
2284
|
+
})], 40, fo),
|
|
2284
2285
|
N("button", {
|
|
2285
2286
|
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",
|
|
2286
2287
|
"aria-label": D(l).blockActions.duplicate,
|
|
2287
2288
|
title: D(l).blockActions.duplicate,
|
|
2288
2289
|
onClick: M(be, ["stop"])
|
|
2289
|
-
}, [W(D(
|
|
2290
|
+
}, [W(D(Xn), {
|
|
2290
2291
|
size: 14,
|
|
2291
2292
|
"stroke-width": 1.5
|
|
2292
|
-
})], 8,
|
|
2293
|
+
})], 8, po),
|
|
2293
2294
|
U.value ? (c(), w("button", {
|
|
2294
2295
|
key: 0,
|
|
2295
2296
|
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",
|
|
2296
2297
|
"aria-label": D(l).blockActions.saveAsBlock,
|
|
2297
2298
|
title: D(l).blockActions.saveAsBlock,
|
|
2298
2299
|
onClick: M(xe, ["stop"])
|
|
2299
|
-
}, [W(D(
|
|
2300
|
+
}, [W(D(ir), {
|
|
2300
2301
|
size: 14,
|
|
2301
2302
|
"stroke-width": 1.5
|
|
2302
|
-
})], 8,
|
|
2303
|
+
})], 8, mo)) : k("", !0),
|
|
2303
2304
|
N("button", {
|
|
2304
2305
|
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",
|
|
2305
2306
|
"aria-label": D(l).blockActions.delete,
|
|
2306
2307
|
title: D(l).blockActions.delete,
|
|
2307
2308
|
onClick: M(ye, ["stop"])
|
|
2308
|
-
}, [W(D(
|
|
2309
|
+
}, [W(D(cr), {
|
|
2309
2310
|
size: 14,
|
|
2310
2311
|
"stroke-width": 1.5
|
|
2311
|
-
})], 8,
|
|
2312
|
-
], 12,
|
|
2313
|
-
S.value ? (c(), w("div",
|
|
2312
|
+
})], 8, ho)
|
|
2313
|
+
], 12, uo)) : k("", !0),
|
|
2314
|
+
S.value ? (c(), w("div", go, [N("span", _o, [W(D(er), {
|
|
2314
2315
|
size: 12,
|
|
2315
2316
|
"stroke-width": 1.5
|
|
2316
2317
|
}), T(" " + P(D(d)(D(l).blockActions.hiddenOnViewport, { viewport: ee.value })), 1)])])) : k("", !0),
|
|
2317
|
-
F.value && !S.value ? (c(), w("div",
|
|
2318
|
+
F.value && !S.value ? (c(), w("div", vo, [N("button", {
|
|
2318
2319
|
"data-testid": "condition-toggle",
|
|
2319
2320
|
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)]",
|
|
2320
2321
|
"aria-label": D(l).blockActions.conditionToggle,
|
|
2321
2322
|
title: t.block.displayCondition?.label,
|
|
2322
2323
|
onClick: M(Se, ["stop"])
|
|
2323
|
-
}, [W(D(
|
|
2324
|
+
}, [W(D(tr), {
|
|
2324
2325
|
size: 12,
|
|
2325
2326
|
"stroke-width": 2
|
|
2326
|
-
})], 8,
|
|
2327
|
+
})], 8, yo)])) : k("", !0),
|
|
2327
2328
|
he.value ? (c(), w("div", {
|
|
2328
2329
|
key: 5,
|
|
2329
|
-
class: O(["tpl-section-wrapper tpl-email-surface", D(
|
|
2330
|
+
class: O(["tpl-section-wrapper tpl-email-surface", D(Ri)(he.value)]),
|
|
2330
2331
|
style: L(he.value)
|
|
2331
2332
|
}, [ge.value ? (c(), w("div", {
|
|
2332
2333
|
key: 0,
|
|
2333
2334
|
class: "tpl-band-frame",
|
|
2334
2335
|
style: L(_e.value)
|
|
2335
2336
|
}, [N("div", {
|
|
2336
|
-
class: O(["tpl-block-content tpl-email-surface", D(
|
|
2337
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ri)(me.value)]),
|
|
2337
2338
|
style: L(me.value)
|
|
2338
2339
|
}, [y(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (c(), w("div", {
|
|
2339
2340
|
key: 1,
|
|
2340
|
-
class: O(["tpl-block-content tpl-email-surface", D(
|
|
2341
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ri)(me.value)]),
|
|
2341
2342
|
style: L(me.value)
|
|
2342
2343
|
}, [y(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (c(), w("div", {
|
|
2343
2344
|
key: 6,
|
|
2344
|
-
class: O(["tpl-block-content tpl-email-surface", D(
|
|
2345
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ri)(me.value)]),
|
|
2345
2346
|
style: L(me.value)
|
|
2346
2347
|
}, [y(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2347
|
-
], 10,
|
|
2348
|
+
], 10, so));
|
|
2348
2349
|
}
|
|
2349
2350
|
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2350
2351
|
// src/utils/unwrapParagraph.ts
|
|
2351
|
-
function
|
|
2352
|
+
function xo(e) {
|
|
2352
2353
|
let t = /^\s*<p\b/.exec(e);
|
|
2353
2354
|
if (!t) return e;
|
|
2354
|
-
let n =
|
|
2355
|
+
let n = st(e, t[0].length);
|
|
2355
2356
|
if (n === -1) return e;
|
|
2356
2357
|
let r = /<\/p>\s*$/.exec(e);
|
|
2357
2358
|
if (!r || r.index <= n) return e;
|
|
@@ -2359,22 +2360,22 @@ function yo(e) {
|
|
|
2359
2360
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2360
2361
|
}
|
|
2361
2362
|
// src/components/blocks/TitleBlock.vue
|
|
2362
|
-
var
|
|
2363
|
+
var So = /* @__PURE__ */ o({
|
|
2363
2364
|
__name: "TitleBlock",
|
|
2364
2365
|
props: {
|
|
2365
2366
|
block: {},
|
|
2366
2367
|
viewport: {}
|
|
2367
2368
|
},
|
|
2368
2369
|
setup(e) {
|
|
2369
|
-
let t = e, n = b(() => import("./TitleEditor-
|
|
2370
|
+
let t = e, n = b(() => import("./TitleEditor-BI-9Nnj3.js")), r = yn(Yt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Ia(() => t.block.content), f = I(() => {
|
|
2370
2371
|
let e = {
|
|
2371
|
-
fontSize: `${
|
|
2372
|
-
lineHeight: String(
|
|
2372
|
+
fontSize: `${dt[t.block.level]}px`,
|
|
2373
|
+
lineHeight: String(Z),
|
|
2373
2374
|
fontWeight: "700",
|
|
2374
2375
|
textAlign: t.block.textAlign
|
|
2375
2376
|
};
|
|
2376
2377
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2377
|
-
}), p = I(() => `h${t.block.level}`), m = I(() =>
|
|
2378
|
+
}), p = I(() => `h${t.block.level}`), m = I(() => Yn(xo(l.value)));
|
|
2378
2379
|
return (t, r) => (c(), w("div", {
|
|
2379
2380
|
ref_key: "blockRef",
|
|
2380
2381
|
ref: o,
|
|
@@ -2400,14 +2401,14 @@ var bo = /* @__PURE__ */ o({
|
|
|
2400
2401
|
innerHTML: m.value
|
|
2401
2402
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2402
2403
|
}
|
|
2403
|
-
}),
|
|
2404
|
-
function
|
|
2405
|
-
let n =
|
|
2406
|
-
n.color =
|
|
2407
|
-
let r =
|
|
2408
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2409
|
-
let i =
|
|
2410
|
-
return i.align = "center",
|
|
2404
|
+
}), Co = "hero", wo = "#1f2937", To = "#ffffff";
|
|
2405
|
+
function Eo(e, t) {
|
|
2406
|
+
let n = ft("title", e);
|
|
2407
|
+
n.color = To, n.textAlign = "center";
|
|
2408
|
+
let r = ft("paragraph", e);
|
|
2409
|
+
r.content = `<p style="text-align: center"><span style="color: ${To}">${Do(t)}</span></p>`;
|
|
2410
|
+
let i = ft("button", e);
|
|
2411
|
+
return i.align = "center", ve({
|
|
2411
2412
|
columns: "1",
|
|
2412
2413
|
children: [[
|
|
2413
2414
|
n,
|
|
@@ -2425,28 +2426,28 @@ function wo(e, t) {
|
|
|
2425
2426
|
bottom: 48,
|
|
2426
2427
|
left: 24
|
|
2427
2428
|
},
|
|
2428
|
-
backgroundColor:
|
|
2429
|
+
backgroundColor: wo
|
|
2429
2430
|
}
|
|
2430
2431
|
});
|
|
2431
2432
|
}
|
|
2432
|
-
function
|
|
2433
|
+
function Do(e) {
|
|
2433
2434
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2434
2435
|
}
|
|
2435
2436
|
// src/utils/sectionColumnDrop.ts
|
|
2436
|
-
var
|
|
2437
|
-
function
|
|
2438
|
-
return e.dataset.blockType !== "section" && !
|
|
2437
|
+
var Oo = /* @__PURE__ */ new Set(["section", Co]);
|
|
2438
|
+
function ko(e) {
|
|
2439
|
+
return e.dataset.blockType !== "section" && !Oo.has(e.dataset.paletteType ?? "");
|
|
2439
2440
|
}
|
|
2440
2441
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2441
|
-
var
|
|
2442
|
+
var Ao = { class: "tpl:relative tpl:w-full" }, jo = {
|
|
2442
2443
|
key: 0,
|
|
2443
2444
|
"data-testid": "hero-image-hint",
|
|
2444
2445
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
2445
|
-
},
|
|
2446
|
+
}, Mo = {
|
|
2446
2447
|
key: 0,
|
|
2447
2448
|
"data-testid": "section-drop-hint",
|
|
2448
2449
|
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)]"
|
|
2449
|
-
},
|
|
2450
|
+
}, No = /* @__PURE__ */ o({
|
|
2450
2451
|
__name: "SectionBlock",
|
|
2451
2452
|
props: {
|
|
2452
2453
|
block: {},
|
|
@@ -2455,15 +2456,15 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2455
2456
|
},
|
|
2456
2457
|
setup(e) {
|
|
2457
2458
|
let t = {
|
|
2458
|
-
title:
|
|
2459
|
-
paragraph:
|
|
2460
|
-
image:
|
|
2461
|
-
button:
|
|
2462
|
-
divider:
|
|
2463
|
-
custom:
|
|
2464
|
-
}, n = e, { t: r } = G(), o =
|
|
2465
|
-
d(
|
|
2466
|
-
let h = g(
|
|
2459
|
+
title: So,
|
|
2460
|
+
paragraph: Ra,
|
|
2461
|
+
image: ja,
|
|
2462
|
+
button: $i,
|
|
2463
|
+
divider: pa,
|
|
2464
|
+
custom: da
|
|
2465
|
+
}, n = e, { t: r } = G(), o = yn(bn, "SectionBlock"), { displayBlock: s } = bt(o), u = I(() => n.sourceBlock ?? n.block), m = g(nn, I(() => /* @__PURE__ */ new Set()));
|
|
2466
|
+
d(nn, I(() => /* @__PURE__ */ new Set([...m.value, ...Object.entries(u.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
2467
|
+
let h = g(ln, null), _ = g(sn, null), v = g(Qt, {}), y = g(Wt, null), b = g(qt, null);
|
|
2467
2468
|
function x(e) {
|
|
2468
2469
|
if (y?.value) return;
|
|
2469
2470
|
let t = v.savedBlocks;
|
|
@@ -2514,7 +2515,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2514
2515
|
}
|
|
2515
2516
|
let R = I(() => {
|
|
2516
2517
|
if (o.state.previewMode) return !1;
|
|
2517
|
-
let e =
|
|
2518
|
+
let e = Ve(n.block);
|
|
2518
2519
|
return e !== null && !e.applied && e.reason === "image";
|
|
2519
2520
|
});
|
|
2520
2521
|
function B(e) {
|
|
@@ -2524,10 +2525,10 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2524
2525
|
return E(e).length === 0 && o.state.previewMode;
|
|
2525
2526
|
}
|
|
2526
2527
|
function K(e, t) {
|
|
2527
|
-
y?.value ||
|
|
2528
|
+
y?.value || za(o, t, n.block.id, e);
|
|
2528
2529
|
}
|
|
2529
2530
|
function ne(e) {
|
|
2530
|
-
return
|
|
2531
|
+
return Ni(e, _, t);
|
|
2531
2532
|
}
|
|
2532
2533
|
function q(e, t) {
|
|
2533
2534
|
y?.value || e.type !== "custom" || o.updateBlock(e.id, {
|
|
@@ -2535,7 +2536,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2535
2536
|
dataSourceFetched: t.dataSourceFetched
|
|
2536
2537
|
});
|
|
2537
2538
|
}
|
|
2538
|
-
return (t, u) => (c(), w("div",
|
|
2539
|
+
return (t, u) => (c(), w("div", Ao, [R.value ? (c(), w("div", jo, [N("span", null, P(D(r).section.heroAddImage), 1)])) : k("", !0), N("div", { class: O(["tpl:flex tpl:gap-0", { "tpl:flex-col": T.value }]) }, [(c(!0), w(U, null, p(C.value, (t, d) => (c(), w("div", {
|
|
2539
2540
|
key: d,
|
|
2540
2541
|
class: O(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", B(d) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2541
2542
|
style: L({ width: T.value ? "100%" : S.value[d] })
|
|
@@ -2545,7 +2546,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2545
2546
|
group: {
|
|
2546
2547
|
name: "blocks",
|
|
2547
2548
|
pull: !0,
|
|
2548
|
-
put: (e, t, n) => D(
|
|
2549
|
+
put: (e, t, n) => D(ko)(n)
|
|
2549
2550
|
},
|
|
2550
2551
|
animation: 150,
|
|
2551
2552
|
"ghost-class": "tpl-ghost",
|
|
@@ -2559,12 +2560,12 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2559
2560
|
"tpl:min-h-[60px]": F(d),
|
|
2560
2561
|
"tpl:min-h-[34px]": te(d)
|
|
2561
2562
|
}]),
|
|
2562
|
-
onUpdate: (e) => !D(y) && D(
|
|
2563
|
+
onUpdate: (e) => !D(y) && D(za)(D(o), E(d), n.block.id, d, e),
|
|
2563
2564
|
onStart: (e) => M.value = d,
|
|
2564
2565
|
onEnd: u[0] ||= (e) => M.value = null,
|
|
2565
2566
|
"onUpdate:modelValue": (e) => K(d, e)
|
|
2566
2567
|
}, {
|
|
2567
|
-
default: l(() => [(c(!0), w(U, null, p(E(d), (t) => f((c(), w("div", { key: t.id }, [W(
|
|
2568
|
+
default: l(() => [(c(!0), w(U, null, p(E(d), (t) => f((c(), w("div", { key: t.id }, [W(bo, {
|
|
2568
2569
|
block: t,
|
|
2569
2570
|
"display-block": D(s)(t),
|
|
2570
2571
|
"is-selected": D(o).state.selectedBlockId === t.id,
|
|
@@ -2601,14 +2602,14 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2601
2602
|
"onUpdate",
|
|
2602
2603
|
"onStart",
|
|
2603
2604
|
"onUpdate:modelValue"
|
|
2604
|
-
]), B(d) ? (c(), w("div",
|
|
2605
|
+
]), B(d) ? (c(), w("div", Mo, [N("span", null, P(D(r).section.dropHere), 1)])) : k("", !0)], 6))), 128))], 2)]));
|
|
2605
2606
|
}
|
|
2606
|
-
}),
|
|
2607
|
+
}), Po = ["width", "height"], Fo = [
|
|
2607
2608
|
"d",
|
|
2608
2609
|
"stroke",
|
|
2609
2610
|
"stroke-opacity",
|
|
2610
2611
|
"stroke-width"
|
|
2611
|
-
],
|
|
2612
|
+
], Io = ["d", "fill"], Lo = /* @__PURE__ */ o({
|
|
2612
2613
|
__name: "SocialIconSvg",
|
|
2613
2614
|
props: {
|
|
2614
2615
|
platform: {},
|
|
@@ -2617,7 +2618,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2617
2618
|
iconSize: {}
|
|
2618
2619
|
},
|
|
2619
2620
|
setup(e) {
|
|
2620
|
-
let t = e, n = I(() =>
|
|
2621
|
+
let t = e, n = I(() => Ln[t.platform]), r = I(() => zn[t.iconSize]), i = I(() => Ie(t.platform, t.iconTone)), a = I(() => ot(t.iconStyle, t.iconTone)), o = I(() => {
|
|
2621
2622
|
let e = {
|
|
2622
2623
|
display: "inline-flex",
|
|
2623
2624
|
alignItems: "center",
|
|
@@ -2655,7 +2656,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2655
2656
|
};
|
|
2656
2657
|
default: return e;
|
|
2657
2658
|
}
|
|
2658
|
-
}), s = I(() =>
|
|
2659
|
+
}), s = I(() => Ye(t.iconStyle)), l = I(() => Math.floor(r.value * s.value));
|
|
2659
2660
|
function u(e) {
|
|
2660
2661
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2661
2662
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -2676,15 +2677,15 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2676
2677
|
"stroke-opacity": a.value.opacity,
|
|
2677
2678
|
"stroke-width": a.value.width / s.value,
|
|
2678
2679
|
"stroke-linejoin": "round"
|
|
2679
|
-
}, null, 8,
|
|
2680
|
+
}, null, 8, Fo)) : k("", !0), N("path", {
|
|
2680
2681
|
d: n.value.path,
|
|
2681
2682
|
fill: d.value
|
|
2682
|
-
}, null, 8,
|
|
2683
|
+
}, null, 8, Io)], 8, Po))], 4));
|
|
2683
2684
|
}
|
|
2684
|
-
}),
|
|
2685
|
+
}), Ro = { class: "tpl:w-full" }, zo = ["href"], Bo = {
|
|
2685
2686
|
key: 1,
|
|
2686
2687
|
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)]"
|
|
2687
|
-
},
|
|
2688
|
+
}, Vo = /* @__PURE__ */ o({
|
|
2688
2689
|
__name: "SocialIconsBlock",
|
|
2689
2690
|
props: {
|
|
2690
2691
|
block: {},
|
|
@@ -2697,7 +2698,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2697
2698
|
gap: `${t.block.spacing}px`,
|
|
2698
2699
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2699
2700
|
})), i = I(() => t.block.icons.length > 0);
|
|
2700
|
-
return (t, a) => (c(), w("div",
|
|
2701
|
+
return (t, a) => (c(), w("div", Ro, [i.value ? (c(), w("div", {
|
|
2701
2702
|
key: 0,
|
|
2702
2703
|
style: L(r.value)
|
|
2703
2704
|
}, [(c(!0), w(U, null, p(e.block.icons, (t) => (c(), w("a", {
|
|
@@ -2705,7 +2706,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2705
2706
|
href: t.url || "#",
|
|
2706
2707
|
class: "tpl:cursor-default",
|
|
2707
2708
|
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
2708
|
-
}, [W(
|
|
2709
|
+
}, [W(Lo, {
|
|
2709
2710
|
platform: t.platform,
|
|
2710
2711
|
"icon-style": e.block.iconStyle,
|
|
2711
2712
|
"icon-tone": e.block.iconTone,
|
|
@@ -2715,46 +2716,46 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2715
2716
|
"icon-style",
|
|
2716
2717
|
"icon-tone",
|
|
2717
2718
|
"icon-size"
|
|
2718
|
-
])], 8,
|
|
2719
|
+
])], 8, zo))), 128))], 4)) : (c(), w("div", Bo, [W(D(lr), { size: 16 }), N("span", null, P(D(n).social.addIcons), 1)]))]));
|
|
2719
2720
|
}
|
|
2720
|
-
}),
|
|
2721
|
+
}), Ho = { class: "tpl:w-full" }, Uo = {
|
|
2721
2722
|
key: 0,
|
|
2722
2723
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2723
2724
|
style: {
|
|
2724
2725
|
"background-color": "var(--tpl-bg-hover)",
|
|
2725
2726
|
color: "var(--tpl-text-dim)"
|
|
2726
2727
|
}
|
|
2727
|
-
},
|
|
2728
|
+
}, Wo = /* @__PURE__ */ o({
|
|
2728
2729
|
__name: "SpacerBlock",
|
|
2729
2730
|
props: {
|
|
2730
2731
|
block: {},
|
|
2731
2732
|
viewport: {}
|
|
2732
2733
|
},
|
|
2733
2734
|
setup(e) {
|
|
2734
|
-
let t = e, n =
|
|
2735
|
+
let t = e, n = yn(bn, "SpacerBlock"), r = I(() => ({
|
|
2735
2736
|
height: `${t.block.height}px`,
|
|
2736
2737
|
minHeight: `${t.block.height}px`,
|
|
2737
2738
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2738
2739
|
}));
|
|
2739
|
-
return (t, i) => (c(), w("div",
|
|
2740
|
+
return (t, i) => (c(), w("div", Ho, [N("div", {
|
|
2740
2741
|
style: L(r.value),
|
|
2741
2742
|
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 }])
|
|
2742
|
-
}, [D(n).state.previewMode ? k("", !0) : (c(), w("span",
|
|
2743
|
+
}, [D(n).state.previewMode ? k("", !0) : (c(), w("span", Uo, P(e.block.height) + "px ", 1))], 6)]));
|
|
2743
2744
|
}
|
|
2744
|
-
}),
|
|
2745
|
+
}), Go = { class: "tpl:w-full" }, Ko = { key: 0 }, qo = [
|
|
2745
2746
|
"aria-label",
|
|
2746
2747
|
"contenteditable",
|
|
2747
2748
|
"data-placeholder",
|
|
2748
2749
|
"onBlur"
|
|
2749
|
-
],
|
|
2750
|
+
], Jo = [
|
|
2750
2751
|
"aria-label",
|
|
2751
2752
|
"contenteditable",
|
|
2752
2753
|
"data-placeholder",
|
|
2753
2754
|
"onBlur"
|
|
2754
|
-
],
|
|
2755
|
+
], Yo = {
|
|
2755
2756
|
key: 1,
|
|
2756
2757
|
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)]"
|
|
2757
|
-
},
|
|
2758
|
+
}, Xo = /*#__PURE__*/ xr(/* @__PURE__ */ o({
|
|
2758
2759
|
__name: "TableBlock",
|
|
2759
2760
|
props: {
|
|
2760
2761
|
block: {},
|
|
@@ -2768,7 +2769,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2768
2769
|
updated(e, t) {
|
|
2769
2770
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2770
2771
|
}
|
|
2771
|
-
}, n = e, { t: r } = G(), i =
|
|
2772
|
+
}, n = e, { t: r } = G(), i = yn(bn, "TableBlock"), a = yn(Yt, "TableBlock"), o = g(Wt, null), s = I(() => n.block.rows.length > 0), l = I(() => {
|
|
2772
2773
|
let e = {
|
|
2773
2774
|
width: "100%",
|
|
2774
2775
|
borderCollapse: "collapse",
|
|
@@ -2800,11 +2801,11 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2800
2801
|
} : n);
|
|
2801
2802
|
i.updateBlock(n.block.id, { rows: s });
|
|
2802
2803
|
}
|
|
2803
|
-
return (e, n) => (c(), w("div",
|
|
2804
|
+
return (e, n) => (c(), w("div", Go, [s.value ? (c(), w("table", {
|
|
2804
2805
|
key: 0,
|
|
2805
2806
|
style: L(l.value),
|
|
2806
2807
|
class: "tpl-table-editable"
|
|
2807
|
-
}, [m.value ? (c(), w("thead",
|
|
2808
|
+
}, [m.value ? (c(), w("thead", Ko, [N("tr", null, [(c(!0), w(U, null, p(m.value.cells, (e) => f((c(), w("th", {
|
|
2808
2809
|
key: e.id,
|
|
2809
2810
|
style: L(d.value),
|
|
2810
2811
|
"aria-label": D(r).table.cellPlaceholder,
|
|
@@ -2813,7 +2814,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2813
2814
|
onBlur: (t) => v(m.value.id, e.id, t),
|
|
2814
2815
|
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2815
2816
|
onClick: M(_, ["stop"])
|
|
2816
|
-
}, null, 44,
|
|
2817
|
+
}, null, 44, qo)), [[t, e.content]])), 128))])])) : k("", !0), N("tbody", null, [(c(!0), w(U, null, p(h.value, (e) => (c(), w("tr", { key: e.id }, [(c(!0), w(U, null, p(e.cells, (i) => f((c(), w("td", {
|
|
2817
2818
|
key: i.id,
|
|
2818
2819
|
style: L(u.value),
|
|
2819
2820
|
"aria-label": D(r).table.cellPlaceholder,
|
|
@@ -2822,9 +2823,9 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2822
2823
|
onBlur: (t) => v(e.id, i.id, t),
|
|
2823
2824
|
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2824
2825
|
onClick: M(_, ["stop"])
|
|
2825
|
-
}, null, 44,
|
|
2826
|
+
}, null, 44, Jo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (c(), w("div", Yo, [W(D(pr), { size: 16 }), N("span", null, P(D(r).table.empty), 1)]))]));
|
|
2826
2827
|
}
|
|
2827
|
-
}), [["__scopeId", "data-v-73b9f5e5"]]),
|
|
2828
|
+
}), [["__scopeId", "data-v-73b9f5e5"]]), Zo = /* @__PURE__ */ o({
|
|
2828
2829
|
__name: "VideoPlayButton",
|
|
2829
2830
|
props: { hoverEffect: {
|
|
2830
2831
|
type: Boolean,
|
|
@@ -2841,7 +2842,7 @@ var Oo = { class: "tpl:relative tpl:w-full" }, ko = {
|
|
|
2841
2842
|
}
|
|
2842
2843
|
});
|
|
2843
2844
|
// src/utils/videoThumbnail.ts
|
|
2844
|
-
function
|
|
2845
|
+
function Qo(e) {
|
|
2845
2846
|
if (!e) return {
|
|
2846
2847
|
platform: "unknown",
|
|
2847
2848
|
videoId: null,
|
|
@@ -2873,24 +2874,24 @@ function Xo(e) {
|
|
|
2873
2874
|
thumbnailUrl: null
|
|
2874
2875
|
};
|
|
2875
2876
|
}
|
|
2876
|
-
function
|
|
2877
|
-
return t ||
|
|
2877
|
+
function $o(e, t) {
|
|
2878
|
+
return t || Qo(e).thumbnailUrl;
|
|
2878
2879
|
}
|
|
2879
2880
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2880
|
-
var
|
|
2881
|
+
var es = ["src", "alt"], ts = {
|
|
2881
2882
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2882
2883
|
style: { opacity: "0.7" }
|
|
2883
|
-
},
|
|
2884
|
+
}, ns = ["href"], rs = ["src", "alt"], is = ["src", "alt"], as = {
|
|
2884
2885
|
key: 3,
|
|
2885
2886
|
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)]"
|
|
2886
|
-
},
|
|
2887
|
+
}, os = /* @__PURE__ */ o({
|
|
2887
2888
|
__name: "VideoBlock",
|
|
2888
2889
|
props: {
|
|
2889
2890
|
block: {},
|
|
2890
2891
|
viewport: {}
|
|
2891
2892
|
},
|
|
2892
2893
|
setup(e) {
|
|
2893
|
-
let t = e, { t: n } = G(), { syntax: r } = K(), i = I(() =>
|
|
2894
|
+
let t = e, { t: n } = G(), { syntax: r } = K(), i = I(() => Ee(t.block.url, r) || Ee(t.block.thumbnailUrl, r)), a = Mn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Mn(() => i.value ? t.block.placeholderUrl : void 0), s = I(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : $o(t.block.url)), l = I(() => ({ textAlign: t.block.align })), u = I(() => {
|
|
2894
2895
|
let e = t.block.align;
|
|
2895
2896
|
return {
|
|
2896
2897
|
maxWidth: "100%",
|
|
@@ -2900,7 +2901,7 @@ var Qo = ["src", "alt"], $o = {
|
|
|
2900
2901
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2901
2902
|
marginRight: e === "center" ? "auto" : void 0
|
|
2902
2903
|
};
|
|
2903
|
-
}), d = I(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = I(() =>
|
|
2904
|
+
}), d = I(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = I(() => Ee(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2904
2905
|
return (t, r) => (c(), w("div", {
|
|
2905
2906
|
class: "tpl:w-full",
|
|
2906
2907
|
style: L(l.value)
|
|
@@ -2913,16 +2914,16 @@ var Qo = ["src", "alt"], $o = {
|
|
|
2913
2914
|
src: D(o),
|
|
2914
2915
|
alt: e.block.alt,
|
|
2915
2916
|
style: L(d.value)
|
|
2916
|
-
}, null, 12,
|
|
2917
|
+
}, null, 12, es), W(Zo)], 4)) : i.value ? (c(), w("div", {
|
|
2917
2918
|
key: 1,
|
|
2918
2919
|
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)]",
|
|
2919
2920
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2920
|
-
}, [W(D(
|
|
2921
|
+
}, [W(D(fr), {
|
|
2921
2922
|
size: 36,
|
|
2922
2923
|
"stroke-width": 1.5,
|
|
2923
2924
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2924
2925
|
style: { opacity: "0.5" }
|
|
2925
|
-
}), N("span",
|
|
2926
|
+
}), N("span", ts, [W(Zi, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (c(), w(U, { key: 2 }, [e.block.url ? (c(), w("a", {
|
|
2926
2927
|
key: 0,
|
|
2927
2928
|
href: e.block.url,
|
|
2928
2929
|
target: "_blank",
|
|
@@ -2935,7 +2936,7 @@ var Qo = ["src", "alt"], $o = {
|
|
|
2935
2936
|
src: s.value,
|
|
2936
2937
|
alt: e.block.alt,
|
|
2937
2938
|
style: L(d.value)
|
|
2938
|
-
}, null, 12,
|
|
2939
|
+
}, null, 12, rs), W(Zo, { "hover-effect": "" })], 12, ns)) : (c(), w("div", {
|
|
2939
2940
|
key: 1,
|
|
2940
2941
|
class: "tpl:relative tpl:inline-block",
|
|
2941
2942
|
style: L(u.value)
|
|
@@ -2944,53 +2945,53 @@ var Qo = ["src", "alt"], $o = {
|
|
|
2944
2945
|
src: s.value,
|
|
2945
2946
|
alt: e.block.alt,
|
|
2946
2947
|
style: L(d.value)
|
|
2947
|
-
}, null, 12,
|
|
2948
|
+
}, null, 12, is), W(Zo)], 4))], 64)) : (c(), w("div", as, [W(D(fr), {
|
|
2948
2949
|
size: 40,
|
|
2949
2950
|
"stroke-width": 1.5,
|
|
2950
2951
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2951
2952
|
}), N("span", null, P(D(n).video.addVideo), 1)]))], 4));
|
|
2952
2953
|
}
|
|
2953
|
-
}),
|
|
2954
|
-
section:
|
|
2955
|
-
title:
|
|
2956
|
-
paragraph:
|
|
2957
|
-
image:
|
|
2958
|
-
button:
|
|
2959
|
-
divider:
|
|
2960
|
-
video:
|
|
2961
|
-
social:
|
|
2962
|
-
menu:
|
|
2963
|
-
table:
|
|
2964
|
-
spacer:
|
|
2965
|
-
html:
|
|
2966
|
-
countdown: b(() => import("./CountdownBlock
|
|
2954
|
+
}), ss = {
|
|
2955
|
+
section: No,
|
|
2956
|
+
title: So,
|
|
2957
|
+
paragraph: Ra,
|
|
2958
|
+
image: ja,
|
|
2959
|
+
button: $i,
|
|
2960
|
+
divider: pa,
|
|
2961
|
+
video: os,
|
|
2962
|
+
social: Vo,
|
|
2963
|
+
menu: Fa,
|
|
2964
|
+
table: Xo,
|
|
2965
|
+
spacer: Wo,
|
|
2966
|
+
html: ya,
|
|
2967
|
+
countdown: b(() => import("./CountdownBlock--hlKE2aj.js"))
|
|
2967
2968
|
};
|
|
2968
|
-
function
|
|
2969
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = G(i), c = I(() =>
|
|
2969
|
+
function cs(t) {
|
|
2970
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = G(i), c = I(() => We(We(We(ci(i), Oi(n.content.value.settings?.locale)), He(n.content.value.settings) === "rtl" ? {
|
|
2970
2971
|
title: { textAlign: "right" },
|
|
2971
2972
|
table: { textAlign: "right" }
|
|
2972
2973
|
} : {}), r.blockDefaults ?? {}));
|
|
2973
2974
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2974
|
-
let { resolvedTheme: l } =
|
|
2975
|
+
let { resolvedTheme: l } = $r(I(() => n.state.uiTheme)), f = H(r.theme ?? {}), { themeStyles: p } = Mr({
|
|
2975
2976
|
themeOverrides: f,
|
|
2976
2977
|
resolvedTheme: l,
|
|
2977
2978
|
extraStyles: () => ({
|
|
2978
2979
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2979
2980
|
...t.themeExtraStyles?.()
|
|
2980
2981
|
})
|
|
2981
|
-
}), m = t.history ??
|
|
2982
|
+
}), m = t.history ?? En({
|
|
2982
2983
|
content: n.content,
|
|
2983
2984
|
setContent: (e, t) => n.setContent(e, t)
|
|
2984
2985
|
});
|
|
2985
|
-
t.history ? n.contentReplaced && u(n.contentReplaced, () => m.clear(), { flush: "sync" }) :
|
|
2986
|
-
let h =
|
|
2986
|
+
t.history ? n.contentReplaced && u(n.contentReplaced, () => m.clear(), { flush: "sync" }) : An(n, m);
|
|
2987
|
+
let h = Gn({
|
|
2987
2988
|
addBlock: n.addBlock,
|
|
2988
2989
|
removeBlock: n.removeBlock,
|
|
2989
2990
|
updateBlock: n.updateBlock,
|
|
2990
2991
|
selectBlock: n.selectBlock,
|
|
2991
2992
|
findBlockLocation: n.findBlockLocation,
|
|
2992
2993
|
blockDefaults: () => c.value
|
|
2993
|
-
}), g =
|
|
2994
|
+
}), g = kn(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? jn({
|
|
2994
2995
|
content: n.content,
|
|
2995
2996
|
isDirty: () => n.state.isDirty,
|
|
2996
2997
|
...t.autoSaveOptions
|
|
@@ -2998,27 +2999,27 @@ function os(t) {
|
|
|
2998
2999
|
_ && (y = u(m.isNavigating, (e) => {
|
|
2999
3000
|
e ? _.pause() : _.resume();
|
|
3000
3001
|
}));
|
|
3001
|
-
let b =
|
|
3002
|
+
let b = Qr(n, {
|
|
3002
3003
|
t: o,
|
|
3003
3004
|
format: s
|
|
3004
|
-
}, r.customBlocks ?? []), x =
|
|
3005
|
+
}, r.customBlocks ?? []), x = gt(r.colors);
|
|
3005
3006
|
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) {
|
|
3006
|
-
let e =
|
|
3007
|
+
let e = si(x.presets, r.blockDefaults, r.templateDefaults);
|
|
3007
3008
|
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.`);
|
|
3008
3009
|
}
|
|
3009
|
-
let S =
|
|
3010
|
-
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${
|
|
3011
|
-
let w =
|
|
3012
|
-
|
|
3010
|
+
let S = Kn(r.templateSettings);
|
|
3011
|
+
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${qn.join(", ")}) — skipping it.`);
|
|
3012
|
+
let w = Er();
|
|
3013
|
+
ii(w, ss);
|
|
3013
3014
|
let T = /* @__PURE__ */ new Set();
|
|
3014
3015
|
function E(e) {
|
|
3015
3016
|
for (let t of e) {
|
|
3016
|
-
w.registerCustom(t,
|
|
3017
|
-
for (let e of
|
|
3017
|
+
w.registerCustom(t, da);
|
|
3018
|
+
for (let e of ki(t, x)) T.has(e.id) || (T.add(e.id), $.warn(e.message));
|
|
3018
3019
|
}
|
|
3019
3020
|
}
|
|
3020
3021
|
r.customBlocks?.length && E(r.customBlocks);
|
|
3021
|
-
let D =
|
|
3022
|
+
let D = Ur();
|
|
3022
3023
|
if (C() && v(D.dispose), t.containerEl) {
|
|
3023
3024
|
let n = t.containerEl;
|
|
3024
3025
|
e(document, "pointerdown", (e) => {
|
|
@@ -3031,7 +3032,7 @@ function os(t) {
|
|
|
3031
3032
|
e ? e.save() : _?.flush();
|
|
3032
3033
|
}
|
|
3033
3034
|
function ee(e) {
|
|
3034
|
-
D.isActive() &&
|
|
3035
|
+
D.isActive() && ji(e, {
|
|
3035
3036
|
history: m,
|
|
3036
3037
|
selectBlock: (e) => n.selectBlock(e),
|
|
3037
3038
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -3044,45 +3045,45 @@ function os(t) {
|
|
|
3044
3045
|
}
|
|
3045
3046
|
e(document, "keydown", ee);
|
|
3046
3047
|
let k = H(null), A = t.editorRoot ?? document;
|
|
3047
|
-
d(
|
|
3048
|
+
d(Cn, A), d(pn, k), d(Tt, /* @__PURE__ */ new Map()), d(Jt, i), d(bn, n), d(Sn, m), d(gn, h), d(ln, g), d(Yt, a), d(rn, p), d(Zt, l), d(Xt, c), d(_n, r.locale), d(sn, w), d(tn, r.customBlocks ?? []), d(jt, r.paletteBlocks), d(Rt, ai(r.htmlBlockPreview)), d(zt, r.layout), d(xt, r.sectionWrapper), d(fn, x), d(hn, S.fields), d(en, ei(n.content, w));
|
|
3048
3049
|
let j = it(r.mergeTags?.syntax);
|
|
3049
3050
|
for (let e of ["opener", "closer"]) {
|
|
3050
3051
|
let t = j[e];
|
|
3051
3052
|
typeof t == "string" && t.trim() === "" && $.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
3052
3053
|
}
|
|
3053
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
3054
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && Oe(j) === null && $.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
3054
3055
|
let M = R(r.mergeTags?.tags ?? []);
|
|
3055
3056
|
function N(e) {
|
|
3056
3057
|
Array.isArray(e) ? M.value = e : $.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
3057
3058
|
}
|
|
3058
|
-
d(
|
|
3059
|
-
let P = H(
|
|
3060
|
-
d(
|
|
3061
|
-
let F =
|
|
3059
|
+
d(It, M), d(Ct, j), d(Dt, r.mergeTags?.onRequest ?? null), d(Et, r.mergeTags?.autocomplete !== !1), d(wn, r.mergeTags?.showRawValue !== !1);
|
|
3060
|
+
let P = H(De(r.mergeTags?.tags ?? []));
|
|
3061
|
+
d(Lt, P);
|
|
3062
|
+
let F = Kr({
|
|
3062
3063
|
resolvePreview: r.resolvePreview,
|
|
3063
3064
|
surface: "preview",
|
|
3064
3065
|
getContent: () => {
|
|
3065
3066
|
let e = n.content.value;
|
|
3066
3067
|
if (!n.state.previewMode) return e;
|
|
3067
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
3068
|
-
return r.layout ?
|
|
3068
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = ze(e, t);
|
|
3069
|
+
return r.layout ? et(ze(r.layout, t, { missing: "default" }), i) : i;
|
|
3069
3070
|
},
|
|
3070
3071
|
isActive: () => n.state.previewMode,
|
|
3071
3072
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
3072
3073
|
});
|
|
3073
|
-
d(
|
|
3074
|
+
d(At, F), d(Gt, r.resolvePreview);
|
|
3074
3075
|
let L = null;
|
|
3075
|
-
d(
|
|
3076
|
+
d(Ut, (e) => (L = e, () => {
|
|
3076
3077
|
L === e && (L = null);
|
|
3077
3078
|
}));
|
|
3078
3079
|
let z = () => (L ?? F.refresh)(), B = I(() => !(n.state.previewMode && F.isConfigured));
|
|
3079
|
-
d(
|
|
3080
|
-
let V =
|
|
3081
|
-
d(
|
|
3082
|
-
let U =
|
|
3080
|
+
d(qt, B);
|
|
3081
|
+
let V = qr();
|
|
3082
|
+
d(kt, V), d(Mt, H(!1)), d(Pt, H(!1)), d(an, r.logicTags?.tags ?? []), d(St, r.logicTags?.pairs ?? []), d(Bt, r.logicTags?.onRequest ?? null), d(Nt, Jr()), d(Ht, r.onRequestMedia ?? null), d(vn, r.canDropMedia ?? null), d(wt, r.resolveImageUrl ? Un(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(Kt, r.displayConditions?.conditions ?? []), d(mn, r.displayConditions?.allowCustom ?? !1), d(Ot, r.displayConditions?.onRequest ?? null), d(Qt, t.capabilities ?? {}), d(xn, b);
|
|
3083
|
+
let U = Yr(r.lint) ? null : Zr({
|
|
3083
3084
|
content: n.content,
|
|
3084
3085
|
get options() {
|
|
3085
|
-
return
|
|
3086
|
+
return Wr({
|
|
3086
3087
|
...r,
|
|
3087
3088
|
content: n.content.value,
|
|
3088
3089
|
contentLocale: n.activeLocale?.value ?? void 0
|
|
@@ -3094,7 +3095,7 @@ function os(t) {
|
|
|
3094
3095
|
updateSettings: n.updateSettings,
|
|
3095
3096
|
removeBlock: n.removeBlock
|
|
3096
3097
|
});
|
|
3097
|
-
d(
|
|
3098
|
+
d(un, U);
|
|
3098
3099
|
function W() {
|
|
3099
3100
|
y?.(), U?.destroy(), _?.destroy(), m.destroy();
|
|
3100
3101
|
}
|
|
@@ -3125,14 +3126,14 @@ function os(t) {
|
|
|
3125
3126
|
};
|
|
3126
3127
|
}
|
|
3127
3128
|
// src/composables/useSmallScreenNotice.ts
|
|
3128
|
-
var
|
|
3129
|
-
function
|
|
3130
|
-
let n = t(
|
|
3129
|
+
var ls = "(max-width: 767px)";
|
|
3130
|
+
function us(e) {
|
|
3131
|
+
let n = t(ls);
|
|
3131
3132
|
return {
|
|
3132
3133
|
isSmallScreen: n,
|
|
3133
3134
|
showNotice: I(() => (F(e) ?? !0) && n.value)
|
|
3134
3135
|
};
|
|
3135
3136
|
}
|
|
3136
|
-
export {
|
|
3137
|
+
export { wi as A, Ar as B, qi as C, Yi as D, Mi as E, yi as F, wr as H, Kr as I, Wr as L, Si as M, xi as N, Ni as O, bi as P, zr as R, Ri as S, Ui as T, Tr as V, pa as _, Wo as a, $i as b, Co as c, bo as d, za as f, ya as g, ja as h, Xo as i, Ci as j, gi as k, Eo as l, Fa as m, cs as n, Vo as o, Ra as p, os as r, No as s, us as t, So as u, da as v, Hi as w, Fi as x, na as y, Lr as z };
|
|
3137
3138
|
|
|
3138
|
-
//# sourceMappingURL=composables-
|
|
3139
|
+
//# sourceMappingURL=composables-DY3anqHO.js.map
|