@templatical/editor 0.45.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-BlFWWhBv.js → AiChatSidebar-BPOv5Ra8.js} +14 -14
- package/dist/{AiFeatureMenu-CvWygUmC.js → AiFeatureMenu-H_WT4YR8.js} +7 -7
- package/dist/{BlockIssueBadge-CZA1XvAh.js → BlockIssueBadge-AgO5abEB.js} +5 -5
- package/dist/BlockPreviewCanvas-CZDBSPoG.js +136 -0
- package/dist/{CloudHeaderExtras-BzM1QU1r.js → CloudHeaderExtras-gXsTYoGG.js} +5 -5
- package/dist/{CloudPanels-d36YXXyn.js → CloudPanels-H_GdbOfZ.js} +9 -9
- package/dist/{CollaboratorBar-rwXe_Qd2.js → CollaboratorBar-BazGNMqN.js} +4 -4
- package/dist/{CommentsPanel-Bn6P5crU.js → CommentsPanel-CMgsG_yh.js} +2 -2
- package/dist/{CommentsSidebar-B8wT932T.js → CommentsSidebar-DCh8DTP8.js} +14 -14
- package/dist/CountdownBlock-zx39Dyby.js +92 -0
- package/dist/{CountdownToolbar-lbjCc8ik.js → CountdownToolbar-DVuucA3v.js} +7 -7
- package/dist/{DesignReferenceSidebar-zlJQsP0X.js → DesignReferenceSidebar-DxNV4lQp.js} +12 -12
- package/dist/{IssuesPanel-CHx3m8SP.js → IssuesPanel-CUpW54P4.js} +8 -8
- package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
- package/dist/{LogicTagInsertButton-BvftbkL4.js → LogicTagInsertButton-DDYKnqmj.js} +22 -22
- package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-D_we0Scr.js} +4 -4
- package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-L95BwWV1.js} +2 -2
- package/dist/{MergeTagInput-CR1kcj8X.js → MergeTagInput-DAL998tx.js} +3 -3
- package/dist/{MergeTagModeToggle-DssKrVYb.js → MergeTagModeToggle-CjHO26rb.js} +7 -7
- package/dist/{ParagraphEditor-DFizsZRc.js → ParagraphEditor-CcEN1N6n.js} +165 -150
- package/dist/{RestoreVersionDialog-Cp3q2mU4.js → RestoreVersionDialog-B2OH5rgs.js} +6 -6
- package/dist/{RichTextEditorContent-Cj3oaPMk.js → RichTextEditorContent-BGeTg-QL.js} +12 -12
- package/dist/{SaveBlockDialog-BR8vW_XF.js → SaveBlockDialog-CCVyU-7y.js} +13 -13
- package/dist/{SavedBlocksBrowserModal-DmwbmKxI.js → SavedBlocksBrowserModal-_WmSeqIh.js} +14 -14
- package/dist/{SavedBlocksPanels-D4XKrs-a.js → SavedBlocksPanels-DVX_ruQ7.js} +2 -2
- package/dist/{SavedBlocksPickBar-gfc-o5sR.js → SavedBlocksPickBar-DVJC28hP.js} +5 -5
- package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-U0QFiwdI.js} +16 -16
- package/dist/{TemplateSettings-D7aNrd0d.js → TemplateSettings-CdhTm9JQ.js} +12 -12
- package/dist/{TestEmailModal-DUmtcSm-.js → TestEmailModal-BqToA_ls.js} +14 -14
- package/dist/{TestEmailPanel-s9gISTI8.js → TestEmailPanel-Cn4Ptq0j.js} +2 -2
- package/dist/{TitleEditor-C-uHqtml.js → TitleEditor-CZdqeltH.js} +13 -13
- package/dist/{ToggleSwitch-CTwwCIVA.js → ToggleSwitch-BR8Sgzib.js} +2 -2
- package/dist/{Toolbar-CLpA36RO.js → Toolbar-OGakTBEg.js} +748 -629
- package/dist/{TplModal-D6XtxusQ.js → TplModal-CoczSDma.js} +6 -6
- package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-DY5z5FZr.js} +10 -10
- package/dist/{VersionHistoryPanels-Dvowtt7V.js → VersionHistoryPanels-DowHeDAQ.js} +2 -2
- package/dist/{VersionPreviewBanner-BUKb9gc6.js → VersionPreviewBanner-Bo8NxBbh.js} +4 -4
- package/dist/WrapperBlock-BOABSX9W.js +46 -0
- package/dist/{blockTypeIcons-D3aj5u_5.js → blockTypeIcons-4E1U8f99.js} +5 -5
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-C__Dzq--.js → ca-DMoGGP9L.js} +21 -0
- package/dist/cdn/chunks/{AiChatSidebar-SRGBP-SL.js → AiChatSidebar-B72rI0be.js} +12 -12
- package/dist/cdn/chunks/{AiChatSidebar-SRGBP-SL.js.map → AiChatSidebar-B72rI0be.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-oZhlgsGh.js → AiFeatureMenu-BqSG9iEd.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-oZhlgsGh.js.map → AiFeatureMenu-BqSG9iEd.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js → BlockIssueBadge-CS7ytN-z.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js.map → BlockIssueBadge-CS7ytN-z.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +138 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-t-_ZlHwn.js → CloudHeaderExtras-DJXLTUHc.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-t-_ZlHwn.js.map → CloudHeaderExtras-DJXLTUHc.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DR2eEcpX.js → CloudPanels-D1fPLjG8.js} +8 -8
- package/dist/cdn/chunks/{CloudPanels-DR2eEcpX.js.map → CloudPanels-D1fPLjG8.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-w8_2WPE0.js → CollaboratorBar-MeRQB1eN.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-w8_2WPE0.js.map → CollaboratorBar-MeRQB1eN.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js → CommentsPanel-CmxPylNf.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js.map → CommentsPanel-CmxPylNf.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js → CommentsSidebar-CrleQTbo.js} +13 -13
- package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js.map → CommentsSidebar-CrleQTbo.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-Dasj191h.js +94 -0
- package/dist/cdn/chunks/CountdownBlock-Dasj191h.js.map +1 -0
- package/dist/cdn/chunks/{CountdownToolbar-CvNuDR5Z.js → CountdownToolbar-DPIOtlN0.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-CvNuDR5Z.js.map → CountdownToolbar-DPIOtlN0.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-CJg_5GXU.js → DesignReferenceSidebar-BgTNqgCy.js} +8 -8
- package/dist/cdn/chunks/{DesignReferenceSidebar-CJg_5GXU.js.map → DesignReferenceSidebar-BgTNqgCy.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DXqlRk19.js → IssuesPanel-BGjLcNpQ.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-DXqlRk19.js.map → IssuesPanel-BGjLcNpQ.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js → LoadingTrack-DbH97JR9.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js.map → LoadingTrack-DbH97JR9.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DnHghQHb.js → LogicTagInsertButton-BEsqPhMr.js} +11 -11
- package/dist/cdn/chunks/{LogicTagInsertButton-DnHghQHb.js.map → LogicTagInsertButton-BEsqPhMr.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js → MediaEditModal-C1Ao0i2c.js} +4 -4
- package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js.map → MediaEditModal-C1Ao0i2c.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js → MediaPanels-1GPYiZZ0.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js.map → MediaPanels-1GPYiZZ0.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-heTX9P_k.js → MergeTagInput-Dy13_OLc.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-heTX9P_k.js.map → MergeTagInput-Dy13_OLc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-C9EfuZIP.js → MergeTagModeToggle-B2CPZOeF.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-C9EfuZIP.js.map → MergeTagModeToggle-B2CPZOeF.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B5DN4Sy4.js → ParagraphEditor-BGLIw7kg.js} +91 -76
- package/dist/cdn/chunks/ParagraphEditor-BGLIw7kg.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-DBgJ-Nui.js → RestoreVersionDialog-BhykE8En.js} +8 -8
- package/dist/cdn/chunks/{RestoreVersionDialog-DBgJ-Nui.js.map → RestoreVersionDialog-BhykE8En.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-LOas4rfU.js → RichTextEditorContent-B-txUvPL.js} +11 -11
- package/dist/cdn/chunks/{RichTextEditorContent-LOas4rfU.js.map → RichTextEditorContent-B-txUvPL.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-Dx-QVQCX.js → SaveBlockDialog-BHqEp7jw.js} +40 -40
- package/dist/cdn/chunks/{SaveBlockDialog-Dx-QVQCX.js.map → SaveBlockDialog-BHqEp7jw.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C2RQ-JCc.js → SavedBlocksBrowserModal-BhR6AI0f.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C2RQ-JCc.js.map → SavedBlocksBrowserModal-BhR6AI0f.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BmRbvqqL.js → SavedBlocksPanels-YwffJtfY.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-BmRbvqqL.js.map → SavedBlocksPanels-YwffJtfY.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BzwKojoJ.js → SavedBlocksPickBar-BtpFU7es.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-BzwKojoJ.js.map → SavedBlocksPickBar-BtpFU7es.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js → TemplateScoringPanel-N4ySFh5w.js} +12 -12
- package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js.map → TemplateScoringPanel-N4ySFh5w.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-G-yV7C1C.js → TemplateSettings-C7b5X34U.js} +13 -13
- package/dist/cdn/chunks/TemplateSettings-C7b5X34U.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-lOeztfTN.js → TestEmailModal-DHJKI5y5.js} +11 -11
- package/dist/cdn/chunks/{TestEmailModal-lOeztfTN.js.map → TestEmailModal-DHJKI5y5.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CZswVkk_.js → TestEmailPanel-lYtzTXpR.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-CZswVkk_.js.map → TestEmailPanel-lYtzTXpR.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CnTT2Y3H.js → TitleEditor-5eY01ypW.js} +15 -15
- package/dist/cdn/chunks/{TitleEditor-CnTT2Y3H.js.map → TitleEditor-5eY01ypW.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-CLHteVMO.js → ToggleSwitch-BN8rMC2m.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-CLHteVMO.js.map → ToggleSwitch-BN8rMC2m.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-K4tIkpG1.js → Toolbar-Ik54UO_-.js} +696 -575
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-OOT36AjS.js → TplModal-WIBiBrGy.js} +6 -6
- package/dist/cdn/chunks/TplModal-WIBiBrGy.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js → VersionHistoryMenu-CZnlS9K5.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js.map → VersionHistoryMenu-CZnlS9K5.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BrpYRSfW.js → VersionHistoryPanels-xjLSpR1e.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-BrpYRSfW.js.map → VersionHistoryPanels-xjLSpR1e.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js → VersionPreviewBanner-sARpn4hh.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js.map → VersionPreviewBanner-sARpn4hh.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +48 -0
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DdZP-3FM.js → blockTypeIcons-D3g5QzdT.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-DdZP-3FM.js.map → blockTypeIcons-D3g5QzdT.js.map} +1 -1
- package/dist/cdn/chunks/{ca-C__Dzq--.js → ca-DMoGGP9L.js} +22 -1
- package/dist/cdn/chunks/ca-DMoGGP9L.js.map +1 -0
- package/dist/cdn/chunks/{cloud-bhW8qTnh.js → cloud-Cd7ptfhL.js} +3 -3
- package/dist/cdn/chunks/{cloud-bhW8qTnh.js.map → cloud-Cd7ptfhL.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-CeRJkLR2.js → createCloudRuntime-DtIZ2Lee.js} +17 -8
- package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +1 -0
- package/dist/cdn/chunks/{de-CGjbQ2mt.js → de-DgAelLbM.js} +22 -1
- package/dist/cdn/chunks/de-DgAelLbM.js.map +1 -0
- package/dist/cdn/chunks/{dist-B7W-Lb65.js → dist-CjL6JHML.js} +3 -3
- package/dist/cdn/chunks/{dist-B7W-Lb65.js.map → dist-CjL6JHML.js.map} +1 -1
- package/dist/cdn/chunks/{dist-C5nRd_ua.js → dist-MNQYSEWU.js} +4 -4
- package/dist/cdn/chunks/{dist-C5nRd_ua.js.map → dist-MNQYSEWU.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-BUTN5vZC.js → draggable-DrsNwZuB.js} +1673 -1595
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js → editor-modal-Bcwo0orC.js} +34 -34
- package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js.map → editor-modal-Bcwo0orC.js.map} +1 -1
- package/dist/cdn/chunks/en-BANFWZdr.js +1 -0
- package/dist/cdn/chunks/{en-BTiiAC-B.js → en-Dekrl7HA.js} +22 -1
- package/dist/cdn/chunks/en-Dekrl7HA.js.map +1 -0
- package/dist/cdn/chunks/{es-CdTOcSTf.js → es-BaZzyidV.js} +22 -1
- package/dist/cdn/chunks/es-BaZzyidV.js.map +1 -0
- package/dist/cdn/chunks/{extensions-xjRsIjMP.js → extensions-T-t8MKDb.js} +9 -9
- package/dist/cdn/chunks/extensions-T-t8MKDb.js.map +1 -0
- package/dist/cdn/chunks/{fr-B6lcLLzC.js → fr-C5ucb1HK.js} +22 -1
- package/dist/cdn/chunks/fr-C5ucb1HK.js.map +1 -0
- package/dist/cdn/chunks/{icons-Dr9erFGs.js → icons-C4fX9Bwy.js} +27 -27
- package/dist/cdn/chunks/{icons-Dr9erFGs.js.map → icons-C4fX9Bwy.js.map} +1 -1
- package/dist/cdn/chunks/{ja-BhdkqENz.js → ja-CUgR3mV0.js} +22 -1
- package/dist/cdn/chunks/ja-CUgR3mV0.js.map +1 -0
- package/dist/cdn/chunks/{keys-BKu-LOk5.js → keys-HI-INbkz.js} +2 -2
- package/dist/cdn/chunks/{keys-BKu-LOk5.js.map → keys-HI-INbkz.js.map} +1 -1
- package/dist/{nl-CE3YItYg.js → cdn/chunks/nl-qrLY7hMS.js} +23 -0
- package/dist/cdn/chunks/nl-qrLY7hMS.js.map +1 -0
- package/dist/{preRenderCustomBlocks-DAS48ZCp.js → cdn/chunks/preRenderCustomBlocks-Co0oi0Jf.js} +7 -3
- package/dist/cdn/chunks/preRenderCustomBlocks-Co0oi0Jf.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-CUIT4rq4.js → pt-BR-C6hMTQYi.js} +22 -1
- package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js +1103 -0
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +1 -0
- package/dist/cdn/chunks/{src-BcqNlDMe.js → src-BnJlDuyB.js} +361 -206
- package/dist/cdn/chunks/src-BnJlDuyB.js.map +1 -0
- package/dist/cdn/chunks/{src-CkXmV2I2.js → src-Bu0qBpbf.js} +202 -202
- package/dist/cdn/chunks/src-Bu0qBpbf.js.map +1 -0
- package/dist/cdn/chunks/{src-HA9F2kvk.js → src-CHlVFp7r.js} +368 -311
- package/dist/cdn/chunks/src-CHlVFp7r.js.map +1 -0
- package/dist/{styleConstants-C_YAPdQS.js → cdn/chunks/styleConstants-D1Jz-TFU.js} +9 -28
- package/dist/cdn/chunks/{styleConstants-C_YAPdQS.js.map → styleConstants-D1Jz-TFU.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-CYDXLO17.js → tiptap-BPigZk5G.js} +3258 -3098
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js → useAliveFlag-DCB96vzR.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js.map → useAliveFlag-DCB96vzR.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js → useCloudI18n-BBF4waXO.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js.map → useCloudI18n-BBF4waXO.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-BF1ZhcGu.js → useEditorCore-Bf2d1DKI.js} +622 -607
- package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-DDPIcEOO.js.map → useEditorRoot-CTc6O8al.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DO4NTunW.js → useI18n-DUlyyIJJ.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DO4NTunW.js.map → useI18n-DUlyyIJJ.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-91bO_SOi.js → useLogicTag-3S63go4E.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-91bO_SOi.js.map → useLogicTag-3S63go4E.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-hwifK582.js → useMergeTag-BQtxUHq1.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-hwifK582.js.map → useMergeTag-BQtxUHq1.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js → usePopoverPosition-IbaW6-Ao.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js.map → usePopoverPosition-IbaW6-Ao.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-BDNJ25X1.js → useScrollToBlock-uUa601I4.js} +4 -5
- package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js.map +1 -0
- package/dist/cdn/chunks/withCurrentFont-DwJd-lKc.js +21 -0
- package/dist/cdn/chunks/withCurrentFont-DwJd-lKc.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +602 -580
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ZKvtMdpe.js → check-B5R4zXr7.js} +1 -1
- package/dist/{chevron-down-RrwkYMlp.js → chevron-down-BKyl85NV.js} +1 -1
- package/dist/{chevron-right-CklHaa1U.js → chevron-right-BmToZ8qX.js} +1 -1
- package/dist/{chevron-up-DjN2NTbo.js → chevron-up-DNYdOxPC.js} +1 -1
- package/dist/{circle-alert-BR1_Yfb-.js → circle-alert-Dx9ju3YZ.js} +1 -1
- package/dist/{clock-BEagNj21.js → clock-Dv9bxsSH.js} +1 -1
- package/dist/{cloud-CVfwPu19.js → cloud-DwjaAdwK.js} +2 -2
- package/dist/{copy-D6DNoSq1.js → copy-BsKl4dcy.js} +1 -1
- package/dist/{createCloudRuntime-GRv_TDb2.js → createCloudRuntime-C8gpPsSi.js} +16 -7
- package/dist/{createLucideIcon-BAPyioGd.js → createLucideIcon-DziKp5iU.js} +6 -6
- package/dist/{de-CGjbQ2mt.js → de-DgAelLbM.js} +21 -0
- package/dist/{dist-Bd7khQsg.js → dist-3HpYixwF.js} +2 -2
- package/dist/{dist-lL3nVbxV.js → dist-BC-ZEYLd.js} +2 -2
- package/dist/dist-BPFcLKTw.js +5 -0
- package/dist/{dist-CSaWqmWM.js → dist-C8koXLhl.js} +390 -241
- package/dist/{dist-C-VFTX82.js → dist-CUWI-IvA.js} +2 -2
- package/dist/{dist-Bc30883t.js → dist-Cr7RPxI9.js} +5 -5
- package/dist/{dist-DapsJxn_.js → dist-CuLwJF7H.js} +2 -2
- package/dist/{dist-5KNKxglR.js → dist-CyBwSiAa.js} +2 -2
- package/dist/dist-D7Yj7E-F.js +5 -0
- package/dist/{dist-B_vYjCsk.js → dist-DAAJogrx.js} +3 -3
- package/dist/{dist-CMcFD7gP.js → dist-DBxgrOeo.js} +1906 -1746
- package/dist/{dist-DHensKDY.js → dist-DPcf6XZ8.js} +2 -2
- package/dist/{dist-5DAb7bYT.js → dist-DVNjPKsH.js} +2 -2
- package/dist/{dist-C3eH9-N2.js → dist-DXyGqIDE.js} +2 -2
- package/dist/{dist-1H4cnaoD.js → dist-DuufrR8O.js} +4 -4
- package/dist/{editor-modal-oRmkDlUs.js → editor-modal-BwyIUnV_.js} +27 -27
- package/dist/en-CC-57eC_.js +1 -0
- package/dist/{en-BTiiAC-B.js → en-Dekrl7HA.js} +21 -0
- package/dist/{es-CdTOcSTf.js → es-BaZzyidV.js} +21 -0
- package/dist/{extensions-B65sfZRk.js → extensions-DHyKjsNZ.js} +19 -19
- package/dist/{eye-DvsTBI57.js → eye-DQuinb9k.js} +1 -1
- package/dist/{fr-B6lcLLzC.js → fr-C5ucb1HK.js} +21 -0
- package/dist/{image-up-BoFGZm5Q.js → image-up-yTfLjOrj.js} +1 -1
- package/dist/index.d.ts +92 -20
- package/dist/{info-0bQQGjTV.js → info-C7OjlS11.js} +1 -1
- package/dist/{ja-BhdkqENz.js → ja-CUgR3mV0.js} +21 -0
- package/dist/{keys-injl74ob.js → keys-BKFq19a2.js} +1 -1
- package/dist/{link-Cstrr3Ep.js → link-CrUFaZ0t.js} +1 -1
- package/dist/{list-Dx9Rmy5s.js → list-CLgv6M-k.js} +1 -1
- package/dist/{loader-circle-D8Qqs0MG.js → loader-circle-BXM5VO0K.js} +1 -1
- package/dist/{message-circle-D78ELX6I.js → message-circle-BisdQ8H9.js} +1 -1
- package/dist/{cdn/chunks/nl-CE3YItYg.js → nl-qrLY7hMS.js} +21 -2
- package/dist/{package-DOvM9sHE.js → package-C1T4AxV1.js} +1 -1
- package/dist/{pencil-B6m0OG0n.js → pencil-oo2mwf4C.js} +1 -1
- package/dist/{plus-D-nEKxTc.js → plus-BIilXopD.js} +1 -1
- package/dist/{cdn/chunks/preRenderCustomBlocks-CFwa7nP9.js → preRenderCustomBlocks-lFX0HHiV.js} +3 -3
- package/dist/{pt-BR-CUIT4rq4.js → pt-BR-C6hMTQYi.js} +21 -0
- package/dist/{refresh-cw-CXZS-R1U.js → refresh-cw-DrLlkEVC.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-CO67ema2.js → runtime-dom.esm-bundler-lFF-QG3j.js} +3 -3
- package/dist/{search-DSvil0jo.js → search-DNu9lImk.js} +1 -1
- package/dist/{send-BBR28V94.js → send-DDNh3LoJ.js} +1 -1
- package/dist/{shield-check-ByxUnaU9.js → shield-check-aXM3o14f.js} +1 -1
- package/dist/{smartphone-CNOwGf5T.js → smartphone-isccgDee.js} +1 -1
- package/dist/socialIcons-BctavKBN.js +1180 -0
- package/dist/{sparkles-DO1hzwzf.js → sparkles-CIMfFxKv.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{cdn/chunks/styleConstants-C_YAPdQS.js → styleConstants-D1Jz-TFU.js} +7 -30
- package/dist/templatical-editor.js +509 -487
- package/dist/{text-align-start-BKEKMheq.js → text-align-start-C4JFeqsq.js} +1 -1
- package/dist/{trash-CKEQH4vH.js → trash-8ZD9pK_c.js} +1 -1
- package/dist/{triangle-alert-BHnfd3fV.js → triangle-alert-pq45xEHl.js} +1 -1
- package/dist/{upload-C8uO7KsR.js → upload-DrNFmVes.js} +1 -1
- package/dist/{useAliveFlag-6PtarpNZ.js → useAliveFlag-Dd06mRxe.js} +1 -1
- package/dist/{useCloudI18n-GvIOLziA.js → useCloudI18n-Nwqo7pI_.js} +2 -2
- package/dist/{useEditorCore-DQSeKPE9.js → useEditorCore-BcT7UI4e.js} +1027 -1018
- package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
- package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
- package/dist/{useLogicTag-BH87j1vZ.js → useLogicTag-D-dI8H6p.js} +3 -3
- package/dist/{useMergeTag-DfPKX2Tk.js → useMergeTag-5wMeDBi-.js} +3 -3
- package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
- package/dist/{useScrollToBlock-Dr7Sb6Tr.js → useScrollToBlock-Do3suaqp.js} +4 -5
- package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
- package/dist/withCurrentFont-B4YnsG_2.js +19 -0
- package/dist/{x-gEC0yMci.js → x-CBFKGLB1.js} +1 -1
- package/package.json +24 -24
- package/dist/BlockPreviewCanvas-DwxJOTzH.js +0 -133
- package/dist/CountdownBlock-RNx3hIu0.js +0 -91
- package/dist/WrapperBlock-CzJa2Mxw.js +0 -34
- package/dist/cdn/chunks/BlockPreviewCanvas-hKxE6f-k.js +0 -135
- package/dist/cdn/chunks/BlockPreviewCanvas-hKxE6f-k.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-B5DN4Sy4.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-G-yV7C1C.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-K4tIkpG1.js.map +0 -1
- package/dist/cdn/chunks/TplModal-OOT36AjS.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-DdrnwH80.js +0 -36
- package/dist/cdn/chunks/WrapperBlock-DdrnwH80.js.map +0 -1
- package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-CeRJkLR2.js.map +0 -1
- package/dist/cdn/chunks/de-CGjbQ2mt.js.map +0 -1
- package/dist/cdn/chunks/draggable-BUTN5vZC.js.map +0 -1
- package/dist/cdn/chunks/en-BTiiAC-B.js.map +0 -1
- package/dist/cdn/chunks/en-CAt6y87e.js +0 -1
- package/dist/cdn/chunks/es-CdTOcSTf.js.map +0 -1
- package/dist/cdn/chunks/extensions-xjRsIjMP.js.map +0 -1
- package/dist/cdn/chunks/fr-B6lcLLzC.js.map +0 -1
- package/dist/cdn/chunks/ja-BhdkqENz.js.map +0 -1
- package/dist/cdn/chunks/nl-CE3YItYg.js.map +0 -1
- package/dist/cdn/chunks/preRenderCustomBlocks-CFwa7nP9.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CsYnPPll.js +0 -1050
- package/dist/cdn/chunks/socialIcons-CsYnPPll.js.map +0 -1
- package/dist/cdn/chunks/src-BcqNlDMe.js.map +0 -1
- package/dist/cdn/chunks/src-CkXmV2I2.js.map +0 -1
- package/dist/cdn/chunks/src-HA9F2kvk.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-BF1ZhcGu.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-BDNJ25X1.js.map +0 -1
- package/dist/cdn/chunks/withCurrentFont-DeCbPVaE.js +0 -32
- package/dist/cdn/chunks/withCurrentFont-DeCbPVaE.js.map +0 -1
- package/dist/dist-CFC4pg2o.js +0 -5
- package/dist/dist-j2FavQmU.js +0 -5
- package/dist/en-Bk4iCfjp.js +0 -1
- package/dist/socialIcons-CvAixjj8.js +0 -1126
- package/dist/withCurrentFont-DeCbPVaE.js +0 -30
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c, Q as l, R as u, S as d, U as f, X as p, Y as m, at as h, b as g, c as _, ct as v, et as y, f as b, g as x, h as S, it as C, j as w, k as T, l as E, lt as D, m as O, p as k, q as A, rt as j, s as M, t as N, u as P, ut as F, w as I, x as L, y as R } from "./draggable-
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { a as
|
|
6
|
-
import { $ as
|
|
1
|
+
import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c, Q as l, R as u, S as d, U as f, X as p, Y as m, at as h, b as g, c as _, ct as v, et as y, f as b, g as x, h as S, it as C, j as w, k as T, l as E, lt as D, m as O, p as k, q as A, rt as j, s as M, t as N, u as P, ut as F, w as I, x as L, y as R } from "./draggable-DrsNwZuB.js";
|
|
2
|
+
import { $ as z, At as B, B as V, F as H, G as U, H as ee, I as te, K as ne, L as re, M as ie, Mt as ae, N as oe, Nt as se, Ot as ce, P as le, Q as ue, R as de, T as fe, Tt as pe, U as me, W as he, X as ge, Y as _e, _ as ve, a as ye, b as be, bt as xe, d as Se, et as Ce, f as we, g as Te, h as Ee, ht as De, i as W, jt as Oe, kt as ke, l as Ae, m as je, n as Me, nt as Ne, o as Pe, p as Fe, r as Ie, s as Le, u as Re, vt as ze, wt as Be, x as Ve, yt as He, z as Ue } from "./src-BnJlDuyB.js";
|
|
3
|
+
import { _ as We, a as Ge, b as Ke, g as qe, h as Je, i as Ye, n as Xe, o as Ze, s as Qe, t as $e, x as et, y as tt } from "./socialIcons-DACw1wA8.js";
|
|
4
|
+
import { _ as nt, h as rt, v as it, y as at } from "./dist-CjL6JHML.js";
|
|
5
|
+
import { a as ot, c as st, i as ct } from "./dist-MNQYSEWU.js";
|
|
6
|
+
import { $ as G, A as lt, B as ut, C as dt, D as ft, E as pt, F as mt, G as ht, H as gt, I as _t, J as vt, K as yt, L as bt, M as xt, N as St, O as K, P as Ct, Q as wt, R as Tt, S as Et, T as Dt, V as Ot, X as kt, Y as At, Z as jt, _ as Mt, a as Nt, b as Pt, c as Ft, d as It, f as Lt, g as q, h as Rt, j as zt, k as Bt, l as Vt, m as Ht, n as Ut, o as Wt, p as Gt, q as Kt, r as qt, s as Jt, v as J, w as Yt, x as Xt, y as Zt, z as Qt } from "./keys-HI-INbkz.js";
|
|
7
7
|
import "./timeouts-DHPZQ0G3.js";
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { i as
|
|
11
|
-
import { r as
|
|
12
|
-
import { Bt as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import "./useCloudI18n-
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as Sn } from "./useAliveFlag-DzyXG-8A.js";
|
|
8
|
+
import { t as Y } from "./useI18n-DUlyyIJJ.js";
|
|
9
|
+
import { t as X } from "./logger-ByvdoAwq.js";
|
|
10
|
+
import { i as $t, r as en, s as tn, t as nn } from "./usePopoverPosition-IbaW6-Ao.js";
|
|
11
|
+
import { r as rn, t as an } from "./templateSettingsFields-YCFVBVYh.js";
|
|
12
|
+
import { Bt as on, Dt as sn, Et as cn, U as ln, Vt as un, Z as dn, d as fn, f as pn, gt as mn, j as hn, kt as gn, nt as _n, o as vn, pt as yn, y as bn, yt as xn } from "./icons-C4fX9Bwy.js";
|
|
13
|
+
import { t as Sn } from "./LoadingTrack-DbH97JR9.js";
|
|
14
|
+
import { t as Cn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
15
|
+
import { t as wn } from "./useEditorRoot-CTc6O8al.js";
|
|
16
|
+
import "./useCloudI18n-BBF4waXO.js";
|
|
17
|
+
import { t as Tn } from "./useMergeTag-BQtxUHq1.js";
|
|
18
|
+
import { t as En } from "./useLogicTag-3S63go4E.js";
|
|
20
19
|
//#region src/utils/activeEditorTracker.ts
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
let e = ++
|
|
24
|
-
return
|
|
20
|
+
var Dn = /* @__PURE__ */ new Set(), Z = 0, On = 0;
|
|
21
|
+
function kn() {
|
|
22
|
+
let e = ++On;
|
|
23
|
+
return Dn.add(e), Z === 0 && (Z = e), {
|
|
25
24
|
id: e,
|
|
26
|
-
isActive: () =>
|
|
25
|
+
isActive: () => Dn.size <= 1 || Z === e,
|
|
27
26
|
claim: () => {
|
|
28
|
-
|
|
27
|
+
Z = e;
|
|
29
28
|
},
|
|
30
29
|
dispose: () => {
|
|
31
|
-
if (
|
|
32
|
-
let e = Array.from(
|
|
33
|
-
|
|
30
|
+
if (Dn.delete(e), Z === e) {
|
|
31
|
+
let e = Array.from(Dn);
|
|
32
|
+
Z = e[e.length - 1] ?? 0;
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
};
|
|
37
36
|
}
|
|
38
37
|
//#endregion
|
|
39
38
|
//#region src/composables/usePreviewResolution.ts
|
|
40
|
-
var
|
|
41
|
-
function
|
|
39
|
+
var An = 500;
|
|
40
|
+
function jn(e) {
|
|
42
41
|
let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
|
|
43
42
|
function c() {
|
|
44
43
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -49,13 +48,13 @@ function Dn(e) {
|
|
|
49
48
|
let n = ++o;
|
|
50
49
|
i.value = !0;
|
|
51
50
|
let s = {
|
|
52
|
-
content:
|
|
51
|
+
content: _e(e.getContent()),
|
|
53
52
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
54
53
|
};
|
|
55
54
|
try {
|
|
56
55
|
let e = await t(s);
|
|
57
56
|
if (n !== o) return;
|
|
58
|
-
if (!
|
|
57
|
+
if (!Me(e)) {
|
|
59
58
|
a.value = !0;
|
|
60
59
|
return;
|
|
61
60
|
}
|
|
@@ -70,7 +69,7 @@ function Dn(e) {
|
|
|
70
69
|
function d() {
|
|
71
70
|
n && (c(), r.value === null ? u() : s = setTimeout(() => {
|
|
72
71
|
s = null, u();
|
|
73
|
-
},
|
|
72
|
+
}, An));
|
|
74
73
|
}
|
|
75
74
|
return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
76
75
|
e ? d() : (c(), o++, i.value = !1, r.value = null, a.value = !1);
|
|
@@ -87,7 +86,7 @@ function Dn(e) {
|
|
|
87
86
|
}
|
|
88
87
|
//#endregion
|
|
89
88
|
//#region src/composables/useImageUrlResolver.ts
|
|
90
|
-
function
|
|
89
|
+
function Mn(e) {
|
|
91
90
|
let t = p(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
92
91
|
function r(e) {
|
|
93
92
|
return t.get(e);
|
|
@@ -116,8 +115,8 @@ function On(e) {
|
|
|
116
115
|
lookup: a
|
|
117
116
|
};
|
|
118
117
|
}
|
|
119
|
-
function
|
|
120
|
-
let r = n(
|
|
118
|
+
function Q(e) {
|
|
119
|
+
let r = n(Xt, null), i = b(e);
|
|
121
120
|
if (!r) return i;
|
|
122
121
|
let a;
|
|
123
122
|
function s() {
|
|
@@ -138,9 +137,28 @@ function kn(e) {
|
|
|
138
137
|
return typeof t == "string" && t.length > 0 ? t : e;
|
|
139
138
|
});
|
|
140
139
|
}
|
|
140
|
+
function Nn(e, t) {
|
|
141
|
+
if (!e || !t) return t;
|
|
142
|
+
let n = e.get(t);
|
|
143
|
+
return typeof n == "string" && n.length > 0 ? n : t;
|
|
144
|
+
}
|
|
145
|
+
function Pn(e, t) {
|
|
146
|
+
return typeof e?.url == "string" && W(e.url, t);
|
|
147
|
+
}
|
|
148
|
+
function Fn(e, t) {
|
|
149
|
+
let n = e?.url;
|
|
150
|
+
if (typeof n == "string" && n.trim() !== "") return W(n, t) ? void 0 : n;
|
|
151
|
+
}
|
|
152
|
+
function In(e) {
|
|
153
|
+
let t = n(Ct, Ie.liquid), r = Q(() => Fn(e(), t));
|
|
154
|
+
return b(() => Pn(e(), t) ? null : r.value);
|
|
155
|
+
}
|
|
156
|
+
function Ln(e, t, n) {
|
|
157
|
+
return Pn(t, n) ? null : Nn(e, Fn(t, n));
|
|
158
|
+
}
|
|
141
159
|
//#endregion
|
|
142
160
|
//#region src/composables/useMergeTagPicker.ts
|
|
143
|
-
function
|
|
161
|
+
function Rn() {
|
|
144
162
|
let e = l(!1), t = l([]), n = l(null), r = null;
|
|
145
163
|
function i(i, a) {
|
|
146
164
|
if (r) {
|
|
@@ -171,7 +189,7 @@ function An() {
|
|
|
171
189
|
}
|
|
172
190
|
//#endregion
|
|
173
191
|
//#region src/composables/useLogicTagPicker.ts
|
|
174
|
-
function
|
|
192
|
+
function zn() {
|
|
175
193
|
let e = l(!1), t = l([]), n = l([]), r = null;
|
|
176
194
|
function i(i, a) {
|
|
177
195
|
if (r) {
|
|
@@ -202,17 +220,17 @@ function jn() {
|
|
|
202
220
|
}
|
|
203
221
|
//#endregion
|
|
204
222
|
//#region src/composables/useTemplateLint.ts
|
|
205
|
-
function
|
|
223
|
+
function Bn(e) {
|
|
206
224
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
207
225
|
}
|
|
208
|
-
function
|
|
209
|
-
let n = l([]), r = l(!1), i = l(!1), a = y(null), o =
|
|
226
|
+
function Vn(e) {
|
|
227
|
+
let n = l([]), r = l(!1), i = l(!1), a = y(null), o = Bn(e.options), s = null, c = !1;
|
|
210
228
|
o || u();
|
|
211
229
|
async function u() {
|
|
212
230
|
try {
|
|
213
|
-
let t = await import("./src-
|
|
231
|
+
let t = await import("./src-CHlVFp7r.js");
|
|
214
232
|
if (c) return;
|
|
215
|
-
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s =
|
|
233
|
+
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = at(e.content, d, {
|
|
216
234
|
debounce: e.debounce ?? 500,
|
|
217
235
|
deep: !0
|
|
218
236
|
});
|
|
@@ -247,7 +265,7 @@ function Nn(e) {
|
|
|
247
265
|
}
|
|
248
266
|
//#endregion
|
|
249
267
|
//#region src/composables/useKeyboardReorder.ts
|
|
250
|
-
function
|
|
268
|
+
function Hn(e, t, n = []) {
|
|
251
269
|
let r = l(null), i = l(""), a = null;
|
|
252
270
|
function o(t) {
|
|
253
271
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -274,7 +292,7 @@ function Pn(e, t, n = []) {
|
|
|
274
292
|
let i = o(r);
|
|
275
293
|
if (!i) return "";
|
|
276
294
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
277
|
-
return a ?
|
|
295
|
+
return a ? Qe(a, t.t, n) : "";
|
|
278
296
|
}
|
|
279
297
|
function c(t, n) {
|
|
280
298
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -343,13 +361,13 @@ function Pn(e, t, n = []) {
|
|
|
343
361
|
}
|
|
344
362
|
//#endregion
|
|
345
363
|
//#region src/composables/useUiTheme.ts
|
|
346
|
-
function
|
|
347
|
-
let t =
|
|
364
|
+
function Un(e) {
|
|
365
|
+
let t = st("(prefers-color-scheme: dark)");
|
|
348
366
|
return { resolvedTheme: b(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
349
367
|
}
|
|
350
368
|
//#endregion
|
|
351
369
|
//#region src/composables/useThemeStyles.ts
|
|
352
|
-
var
|
|
370
|
+
var Wn = {
|
|
353
371
|
bg: "--tpl-bg",
|
|
354
372
|
bgElevated: "--tpl-bg-elevated",
|
|
355
373
|
bgHover: "--tpl-bg-hover",
|
|
@@ -373,10 +391,10 @@ var In = {
|
|
|
373
391
|
dangerLight: "--tpl-danger-light",
|
|
374
392
|
canvasBg: "--tpl-canvas-bg"
|
|
375
393
|
};
|
|
376
|
-
function
|
|
394
|
+
function Gn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
377
395
|
return { themeStyles: b(() => {
|
|
378
396
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
379
|
-
if (a) for (let [e, t] of Object.entries(
|
|
397
|
+
if (a) for (let [e, t] of Object.entries(Wn)) {
|
|
380
398
|
let n = a[e];
|
|
381
399
|
n && (r[t] = n);
|
|
382
400
|
}
|
|
@@ -385,7 +403,7 @@ function Ln({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
385
403
|
}
|
|
386
404
|
//#endregion
|
|
387
405
|
//#region src/composables/useBlockRegistry.ts
|
|
388
|
-
function
|
|
406
|
+
function Kn() {
|
|
389
407
|
let e = y(/* @__PURE__ */ new Map());
|
|
390
408
|
function t(t, n) {
|
|
391
409
|
e.value.set(t, n), C(e);
|
|
@@ -394,7 +412,7 @@ function Rn() {
|
|
|
394
412
|
let r = `custom:${t.type}`;
|
|
395
413
|
e.value.set(r, {
|
|
396
414
|
component: n,
|
|
397
|
-
createBlock: () =>
|
|
415
|
+
createBlock: () => le(t),
|
|
398
416
|
definition: t
|
|
399
417
|
}), C(e);
|
|
400
418
|
}
|
|
@@ -425,7 +443,7 @@ function Rn() {
|
|
|
425
443
|
strictFilters: !1
|
|
426
444
|
}).parseAndRender(t.template, e.fieldValues);
|
|
427
445
|
} catch (t) {
|
|
428
|
-
return
|
|
446
|
+
return X.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
429
447
|
}
|
|
430
448
|
}
|
|
431
449
|
function c(t) {
|
|
@@ -443,9 +461,9 @@ function Rn() {
|
|
|
443
461
|
}
|
|
444
462
|
//#endregion
|
|
445
463
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
446
|
-
function
|
|
464
|
+
function qn(e, t) {
|
|
447
465
|
return b(() => {
|
|
448
|
-
let n =
|
|
466
|
+
let n = Jn(e.value.blocks);
|
|
449
467
|
if (n.size === 0) return [];
|
|
450
468
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
451
469
|
for (let e of n) {
|
|
@@ -457,76 +475,76 @@ function zn(e, t) {
|
|
|
457
475
|
return i;
|
|
458
476
|
});
|
|
459
477
|
}
|
|
460
|
-
function
|
|
478
|
+
function Jn(e) {
|
|
461
479
|
let t = /* @__PURE__ */ new Set();
|
|
462
|
-
return
|
|
480
|
+
return Yn(e, t), t;
|
|
463
481
|
}
|
|
464
|
-
function
|
|
465
|
-
for (let n of e) if (
|
|
482
|
+
function Yn(e, t) {
|
|
483
|
+
for (let n of e) if (Ne(n)) t.add(n.customType);
|
|
466
484
|
else if (n.type === "section") {
|
|
467
485
|
let e = n.children;
|
|
468
486
|
if (!e) continue;
|
|
469
|
-
for (let n of e)
|
|
470
|
-
} else
|
|
487
|
+
for (let n of e) Yn(n, t);
|
|
488
|
+
} else De(n) && Yn(n.children, t);
|
|
471
489
|
}
|
|
472
490
|
//#endregion
|
|
473
491
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
474
|
-
var
|
|
492
|
+
var Xn = [
|
|
475
493
|
{
|
|
476
494
|
type: "section",
|
|
477
|
-
createBlock:
|
|
495
|
+
createBlock: V
|
|
478
496
|
},
|
|
479
497
|
{
|
|
480
498
|
type: "title",
|
|
481
|
-
createBlock:
|
|
499
|
+
createBlock: U
|
|
482
500
|
},
|
|
483
501
|
{
|
|
484
502
|
type: "paragraph",
|
|
485
|
-
createBlock:
|
|
503
|
+
createBlock: Ue
|
|
486
504
|
},
|
|
487
505
|
{
|
|
488
506
|
type: "image",
|
|
489
|
-
createBlock:
|
|
507
|
+
createBlock: re
|
|
490
508
|
},
|
|
491
509
|
{
|
|
492
510
|
type: "button",
|
|
493
|
-
createBlock:
|
|
511
|
+
createBlock: ie
|
|
494
512
|
},
|
|
495
513
|
{
|
|
496
514
|
type: "divider",
|
|
497
|
-
createBlock:
|
|
515
|
+
createBlock: H
|
|
498
516
|
},
|
|
499
517
|
{
|
|
500
518
|
type: "video",
|
|
501
|
-
createBlock:
|
|
519
|
+
createBlock: ne
|
|
502
520
|
},
|
|
503
521
|
{
|
|
504
522
|
type: "social",
|
|
505
|
-
createBlock:
|
|
523
|
+
createBlock: ee
|
|
506
524
|
},
|
|
507
525
|
{
|
|
508
526
|
type: "menu",
|
|
509
|
-
createBlock:
|
|
527
|
+
createBlock: de
|
|
510
528
|
},
|
|
511
529
|
{
|
|
512
530
|
type: "table",
|
|
513
|
-
createBlock:
|
|
531
|
+
createBlock: he
|
|
514
532
|
},
|
|
515
533
|
{
|
|
516
534
|
type: "spacer",
|
|
517
|
-
createBlock:
|
|
535
|
+
createBlock: me
|
|
518
536
|
},
|
|
519
537
|
{
|
|
520
538
|
type: "html",
|
|
521
|
-
createBlock:
|
|
539
|
+
createBlock: te
|
|
522
540
|
},
|
|
523
541
|
{
|
|
524
542
|
type: "countdown",
|
|
525
|
-
createBlock:
|
|
543
|
+
createBlock: oe
|
|
526
544
|
}
|
|
527
545
|
];
|
|
528
|
-
function
|
|
529
|
-
for (let n of
|
|
546
|
+
function Zn(e, t) {
|
|
547
|
+
for (let n of Xn) {
|
|
530
548
|
let r = t[n.type];
|
|
531
549
|
r && e.registerBuiltIn(n.type, {
|
|
532
550
|
component: r,
|
|
@@ -536,33 +554,33 @@ function Un(e, t) {
|
|
|
536
554
|
}
|
|
537
555
|
//#endregion
|
|
538
556
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
539
|
-
function
|
|
557
|
+
function Qn(e) {
|
|
540
558
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
541
559
|
}
|
|
542
560
|
//#endregion
|
|
543
561
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
544
|
-
function
|
|
562
|
+
function $n(e) {
|
|
545
563
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
546
564
|
}
|
|
547
|
-
function
|
|
548
|
-
let r = new Set(e.map((e) =>
|
|
549
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
565
|
+
function er(e, t, n) {
|
|
566
|
+
let r = new Set(e.map((e) => en(e))), i = [], a = (e, t) => {
|
|
567
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(en(o)) && i.push(`${t}.${n}: ${o}`) : $n(o) && a(o, `${t}.${n}`);
|
|
550
568
|
}, o = t;
|
|
551
|
-
for (let [e, t] of Object.entries(
|
|
569
|
+
for (let [e, t] of Object.entries(ue)) {
|
|
552
570
|
let n = o?.[e];
|
|
553
571
|
a({
|
|
554
572
|
...t,
|
|
555
|
-
|
|
573
|
+
...$n(n) ? n : {}
|
|
556
574
|
}, e);
|
|
557
575
|
}
|
|
558
576
|
return a({
|
|
559
|
-
...
|
|
577
|
+
...z,
|
|
560
578
|
...n ?? {}
|
|
561
579
|
}, "template"), i;
|
|
562
580
|
}
|
|
563
581
|
//#endregion
|
|
564
582
|
//#region src/utils/localizedBlockDefaults.ts
|
|
565
|
-
function
|
|
583
|
+
function tr(e) {
|
|
566
584
|
return {
|
|
567
585
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
568
586
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -571,59 +589,59 @@ function qn(e) {
|
|
|
571
589
|
}
|
|
572
590
|
//#endregion
|
|
573
591
|
//#region src/i18n/index.ts
|
|
574
|
-
var
|
|
575
|
-
"./locales/ca.ts": () => import("./ca-
|
|
576
|
-
"./locales/de.ts": () => import("./de-
|
|
577
|
-
"./locales/en.ts": () => import("./en-
|
|
578
|
-
"./locales/es.ts": () => import("./es-
|
|
579
|
-
"./locales/fr.ts": () => import("./fr-
|
|
580
|
-
"./locales/ja.ts": () => import("./ja-
|
|
581
|
-
"./locales/nl.ts": () => import("./nl-
|
|
582
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
583
|
-
}),
|
|
592
|
+
var nr = /* #__PURE__ */ Object.assign({
|
|
593
|
+
"./locales/ca.ts": () => import("./ca-DMoGGP9L.js"),
|
|
594
|
+
"./locales/de.ts": () => import("./de-DgAelLbM.js"),
|
|
595
|
+
"./locales/en.ts": () => import("./en-Dekrl7HA.js"),
|
|
596
|
+
"./locales/es.ts": () => import("./es-BaZzyidV.js"),
|
|
597
|
+
"./locales/fr.ts": () => import("./fr-C5ucb1HK.js"),
|
|
598
|
+
"./locales/ja.ts": () => import("./ja-CUgR3mV0.js"),
|
|
599
|
+
"./locales/nl.ts": () => import("./nl-qrLY7hMS.js"),
|
|
600
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-C6hMTQYi.js")
|
|
601
|
+
}), rr = /* #__PURE__ */ Object.assign({
|
|
584
602
|
"./locales/cloud/de.ts": () => import("./de-mMY5yQJu.js"),
|
|
585
603
|
"./locales/cloud/en.ts": () => import("./en-ChVeGQBY.js"),
|
|
586
604
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-CoCwRUi0.js")
|
|
587
605
|
});
|
|
588
|
-
function
|
|
606
|
+
function ir(e) {
|
|
589
607
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
590
608
|
}
|
|
591
|
-
var
|
|
592
|
-
function
|
|
609
|
+
var ar = ir(nr), or = ir(rr);
|
|
610
|
+
function sr(e) {
|
|
593
611
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
594
612
|
}
|
|
595
|
-
function
|
|
596
|
-
let n =
|
|
597
|
-
return t.find((e) =>
|
|
613
|
+
function cr(e, t) {
|
|
614
|
+
let n = sr(e);
|
|
615
|
+
return t.find((e) => sr(e) === n);
|
|
598
616
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
617
|
+
function lr(e) {
|
|
618
|
+
return sr(e).split("-")[0];
|
|
601
619
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
620
|
+
function ur(e, t) {
|
|
621
|
+
return cr(e, t) ?? cr(lr(e), t);
|
|
604
622
|
}
|
|
605
|
-
function
|
|
606
|
-
return
|
|
623
|
+
function dr(e, t) {
|
|
624
|
+
return ur(e, t) ?? "en";
|
|
607
625
|
}
|
|
608
|
-
async function
|
|
609
|
-
let t =
|
|
626
|
+
async function fr(e) {
|
|
627
|
+
let t = nr[`./locales/${dr(e, ar)}.ts`];
|
|
610
628
|
return (await t()).default;
|
|
611
629
|
}
|
|
612
|
-
async function
|
|
613
|
-
let t =
|
|
630
|
+
async function pr(e) {
|
|
631
|
+
let t = rr[`./locales/cloud/${dr(e, or)}.ts`];
|
|
614
632
|
return (await t()).default;
|
|
615
633
|
}
|
|
616
|
-
function
|
|
617
|
-
return
|
|
634
|
+
function mr(e) {
|
|
635
|
+
return ur(e, ar) !== void 0;
|
|
618
636
|
}
|
|
619
|
-
function
|
|
620
|
-
return
|
|
637
|
+
function hr(e) {
|
|
638
|
+
return ur(e, or) !== void 0;
|
|
621
639
|
}
|
|
622
|
-
function
|
|
623
|
-
return [...
|
|
640
|
+
function gr() {
|
|
641
|
+
return [...ar];
|
|
624
642
|
}
|
|
625
|
-
function
|
|
626
|
-
return [...
|
|
643
|
+
function _r() {
|
|
644
|
+
return [...or];
|
|
627
645
|
}
|
|
628
646
|
//#endregion
|
|
629
647
|
//#region src/i18n/contentDefaults.ts
|
|
@@ -692,16 +710,16 @@ var $ = {
|
|
|
692
710
|
seconds: "秒",
|
|
693
711
|
expired: "このオファーは終了しました"
|
|
694
712
|
}
|
|
695
|
-
},
|
|
696
|
-
function
|
|
713
|
+
}, vr = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
|
|
714
|
+
function yr(e) {
|
|
697
715
|
if (!e) return $.en;
|
|
698
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
716
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = vr.get(t);
|
|
699
717
|
if (n) return $[n];
|
|
700
|
-
let r =
|
|
718
|
+
let r = vr.get(lr(t));
|
|
701
719
|
return r ? $[r] : $.en;
|
|
702
720
|
}
|
|
703
|
-
function
|
|
704
|
-
let t =
|
|
721
|
+
function br(e) {
|
|
722
|
+
let t = yr(e);
|
|
705
723
|
return {
|
|
706
724
|
video: { alt: t.video },
|
|
707
725
|
countdown: {
|
|
@@ -715,9 +733,9 @@ function fr(e) {
|
|
|
715
733
|
}
|
|
716
734
|
//#endregion
|
|
717
735
|
//#region src/utils/collectColorFieldIssues.ts
|
|
718
|
-
function
|
|
736
|
+
function xr(e, t) {
|
|
719
737
|
let n = [], r = (r, i) => {
|
|
720
|
-
let a =
|
|
738
|
+
let a = Ze(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
721
739
|
if (a.invalidPresets.length > 0 && n.push({
|
|
722
740
|
id: s("invalid-presets"),
|
|
723
741
|
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." : "")
|
|
@@ -728,8 +746,8 @@ function pr(e, t) {
|
|
|
728
746
|
id: s("allow-custom-ignored"),
|
|
729
747
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
730
748
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
731
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
732
|
-
e !== "" && !t.has(
|
|
749
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => en(e)));
|
|
750
|
+
e !== "" && !t.has(en(e)) && n.push({
|
|
733
751
|
id: s("off-palette-default"),
|
|
734
752
|
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.`
|
|
735
753
|
});
|
|
@@ -741,7 +759,7 @@ function pr(e, t) {
|
|
|
741
759
|
}
|
|
742
760
|
//#endregion
|
|
743
761
|
//#region src/utils/keyboardShortcuts.ts
|
|
744
|
-
function
|
|
762
|
+
function Sr(e) {
|
|
745
763
|
for (let t of e.composedPath()) {
|
|
746
764
|
if (!(t instanceof HTMLElement)) continue;
|
|
747
765
|
if (t.isContentEditable) return !0;
|
|
@@ -750,14 +768,14 @@ function mr(e) {
|
|
|
750
768
|
}
|
|
751
769
|
return !1;
|
|
752
770
|
}
|
|
753
|
-
function
|
|
771
|
+
function Cr(e, t) {
|
|
754
772
|
let n = e.metaKey || e.ctrlKey;
|
|
755
773
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
756
774
|
else if (n && e.key.toLowerCase() === "z") {
|
|
757
|
-
if (
|
|
775
|
+
if (Sr(e)) return;
|
|
758
776
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
759
777
|
} else {
|
|
760
|
-
if (t.isPicking?.() && !
|
|
778
|
+
if (t.isPicking?.() && !Sr(e)) {
|
|
761
779
|
if (e.key === "Escape") {
|
|
762
780
|
e.preventDefault(), t.onCancelPick?.();
|
|
763
781
|
return;
|
|
@@ -771,58 +789,78 @@ function hr(e, t) {
|
|
|
771
789
|
return;
|
|
772
790
|
}
|
|
773
791
|
}
|
|
774
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
792
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Sr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
775
793
|
}
|
|
776
794
|
}
|
|
777
795
|
//#endregion
|
|
778
796
|
//#region src/utils/blockComponentResolver.ts
|
|
779
|
-
function
|
|
780
|
-
let
|
|
781
|
-
return e.textColor && (
|
|
797
|
+
function wr(e, t) {
|
|
798
|
+
let n = { fontFamily: t(e.fontFamily) };
|
|
799
|
+
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;
|
|
782
800
|
}
|
|
783
|
-
function
|
|
801
|
+
function Tr(e, t, n) {
|
|
784
802
|
if (t) {
|
|
785
803
|
let n = t.getComponent(e);
|
|
786
804
|
if (n) return n;
|
|
787
805
|
}
|
|
788
806
|
return n[e.type] ?? null;
|
|
789
807
|
}
|
|
790
|
-
|
|
808
|
+
var Er = "--tpl-block-bg-layer", Dr = "tpl-has-bg-image";
|
|
809
|
+
function Or(e, t) {
|
|
810
|
+
if (t === null) return {};
|
|
811
|
+
let n = pe(e);
|
|
812
|
+
if (n === null) return {};
|
|
813
|
+
let r = t?.trim(), i = r ? Be(r) : n.url;
|
|
814
|
+
return {
|
|
815
|
+
backgroundImage: `url("${i}")`,
|
|
816
|
+
backgroundSize: n.size,
|
|
817
|
+
backgroundPosition: n.position,
|
|
818
|
+
backgroundRepeat: n.repeat,
|
|
819
|
+
[Er]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
function kr(e) {
|
|
823
|
+
return e && Er in e ? Dr : void 0;
|
|
824
|
+
}
|
|
825
|
+
function Ar(e, t = {}) {
|
|
791
826
|
if (e.type === "wrapper") return {};
|
|
792
|
-
let { padding:
|
|
793
|
-
padding: `${
|
|
794
|
-
backgroundColor:
|
|
827
|
+
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
828
|
+
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
829
|
+
backgroundColor: r || "transparent"
|
|
795
830
|
};
|
|
796
|
-
if ((e.type === "paragraph" || e.type === "title") && (
|
|
797
|
-
let
|
|
798
|
-
|
|
831
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? ke.paragraphGap : ke.paragraphGap}px`), e.type === "section") {
|
|
832
|
+
let n = se(e.borderRadius);
|
|
833
|
+
n !== null && (i.borderRadius = n), Object.assign(i, Mr(e.border)), Object.assign(i, Or(e.backgroundImage, t.backgroundImageUrl));
|
|
799
834
|
}
|
|
800
|
-
return
|
|
835
|
+
return i;
|
|
801
836
|
}
|
|
802
|
-
function
|
|
837
|
+
function jr(e, t, n) {
|
|
838
|
+
return e.type === "section" ? Ar(e, { backgroundImageUrl: Ln(t, e.backgroundImage, n) }) : Ar(e);
|
|
839
|
+
}
|
|
840
|
+
function Mr(e) {
|
|
803
841
|
let t = {};
|
|
804
|
-
for (let [n, r] of Object.entries(
|
|
842
|
+
for (let [n, r] of Object.entries(ae(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
805
843
|
return t;
|
|
806
844
|
}
|
|
807
|
-
function
|
|
845
|
+
function Nr(e, t = {}) {
|
|
808
846
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
809
|
-
let
|
|
810
|
-
|
|
811
|
-
let
|
|
812
|
-
return
|
|
847
|
+
let n = e.wrapper, r = {};
|
|
848
|
+
n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && (r.padding = `${n.padding.top}px ${n.padding.right}px ${n.padding.bottom}px ${n.padding.left}px`);
|
|
849
|
+
let i = se(n.borderRadius);
|
|
850
|
+
return i !== null && (r.borderRadius = i), Object.assign(r, Or(n.backgroundImage, t.backgroundImageUrl)), r;
|
|
813
851
|
}
|
|
814
|
-
function
|
|
852
|
+
function Pr(e, t = {}) {
|
|
815
853
|
if (e.type !== "wrapper") return null;
|
|
816
|
-
let
|
|
817
|
-
if (e.styles.backgroundColor && (
|
|
818
|
-
let
|
|
819
|
-
|
|
854
|
+
let n = {};
|
|
855
|
+
if (e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
856
|
+
let t = e.styles.padding;
|
|
857
|
+
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
820
858
|
}
|
|
821
|
-
return e.borderRadius && e.borderRadius > 0 && (
|
|
859
|
+
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Or(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
822
860
|
}
|
|
823
861
|
//#endregion
|
|
824
862
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
825
|
-
function
|
|
863
|
+
function Fr(e, t, n, r = !1) {
|
|
826
864
|
if (!e) return [];
|
|
827
865
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
828
866
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -831,18 +869,18 @@ function Sr(e, t, n, r = !1) {
|
|
|
831
869
|
value: e.slice(o, s.index)
|
|
832
870
|
});
|
|
833
871
|
let i = s[0];
|
|
834
|
-
if (
|
|
835
|
-
let e = r ?
|
|
872
|
+
if (we(i, n)) {
|
|
873
|
+
let e = r ? Le(i, t) : void 0;
|
|
836
874
|
a.push(e === void 0 ? {
|
|
837
875
|
type: "tag",
|
|
838
|
-
value:
|
|
876
|
+
value: Pe(i, t)
|
|
839
877
|
} : {
|
|
840
878
|
type: "text",
|
|
841
879
|
value: e
|
|
842
880
|
});
|
|
843
|
-
} else
|
|
881
|
+
} else Se(i, n) ? a.push({
|
|
844
882
|
type: "tag",
|
|
845
|
-
value:
|
|
883
|
+
value: ye(i, n)
|
|
846
884
|
}) : a.push({
|
|
847
885
|
type: "text",
|
|
848
886
|
value: i
|
|
@@ -856,27 +894,27 @@ function Sr(e, t, n, r = !1) {
|
|
|
856
894
|
}
|
|
857
895
|
//#endregion
|
|
858
896
|
//#region src/components/MergeTagPreviewText.vue
|
|
859
|
-
var
|
|
897
|
+
var Ir = d({
|
|
860
898
|
name: "MergeTagPreviewText",
|
|
861
899
|
props: { text: {
|
|
862
900
|
type: String,
|
|
863
901
|
required: !0
|
|
864
902
|
} },
|
|
865
903
|
setup(e) {
|
|
866
|
-
let t = n(
|
|
904
|
+
let t = n(K, mt), r = n(Ct, Ie.liquid), i = n(wt, null), a = b(() => Fr(e.text, t.value, r, i?.value ?? !1));
|
|
867
905
|
return () => a.value.map((e, t) => e.type === "tag" ? I("span", {
|
|
868
906
|
key: t,
|
|
869
907
|
class: "tpl-merge-tag-label"
|
|
870
908
|
}, e.value) : e.value);
|
|
871
909
|
}
|
|
872
|
-
}),
|
|
910
|
+
}), Lr = ["href"], Rr = /* @__PURE__ */ d({
|
|
873
911
|
__name: "ButtonBlock",
|
|
874
912
|
props: {
|
|
875
913
|
block: {},
|
|
876
914
|
viewport: {}
|
|
877
915
|
},
|
|
878
916
|
setup(e) {
|
|
879
|
-
let t = e, n = b(() => {
|
|
917
|
+
let t = e, n = G(J, "ButtonBlock"), r = b(() => {
|
|
880
918
|
let e = {
|
|
881
919
|
display: "inline-block",
|
|
882
920
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -885,23 +923,23 @@ var Cr = d({
|
|
|
885
923
|
fontSize: `${t.block.fontSize}px`,
|
|
886
924
|
fontWeight: "bold",
|
|
887
925
|
textDecoration: "none",
|
|
888
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
926
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : se(t.block.borderRadius) ?? "0px",
|
|
889
927
|
textAlign: "center"
|
|
890
928
|
};
|
|
891
|
-
return Object.assign(e,
|
|
892
|
-
}),
|
|
893
|
-
return (t,
|
|
929
|
+
return Object.assign(e, Mr(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;
|
|
930
|
+
}), i = b(() => ({ textAlign: t.block.align ?? "center" }));
|
|
931
|
+
return (t, n) => (s(), x("div", { style: D(i.value) }, [k("a", {
|
|
894
932
|
href: e.block.url || "#",
|
|
895
|
-
style: D(
|
|
933
|
+
style: D(r.value),
|
|
896
934
|
class: "tpl:cursor-default",
|
|
897
|
-
onClick:
|
|
898
|
-
}, [g(
|
|
935
|
+
onClick: n[0] ||= E(() => {}, ["prevent"])
|
|
936
|
+
}, [g(Ir, { text: e.block.text }, null, 8, ["text"])], 12, Lr)], 4));
|
|
899
937
|
}
|
|
900
|
-
}),
|
|
938
|
+
}), zr = ["innerHTML"], Br = [
|
|
901
939
|
"src",
|
|
902
940
|
"width",
|
|
903
941
|
"height"
|
|
904
|
-
],
|
|
942
|
+
], Vr = /* @__PURE__ */ d({
|
|
905
943
|
__name: "CustomBlockIcon",
|
|
906
944
|
props: {
|
|
907
945
|
icon: {},
|
|
@@ -917,24 +955,24 @@ var Cr = d({
|
|
|
917
955
|
height: `${n.value}px`
|
|
918
956
|
}),
|
|
919
957
|
innerHTML: e.icon
|
|
920
|
-
}, null, 12,
|
|
958
|
+
}, null, 12, zr)) : i.value ? (s(), x("img", {
|
|
921
959
|
key: 1,
|
|
922
960
|
src: e.icon,
|
|
923
961
|
width: n.value,
|
|
924
962
|
height: n.value,
|
|
925
963
|
class: "tpl:inline-block",
|
|
926
964
|
alt: ""
|
|
927
|
-
}, null, 8,
|
|
965
|
+
}, null, 8, Br)) : (s(), O(h(on), {
|
|
928
966
|
key: 2,
|
|
929
967
|
size: n.value,
|
|
930
968
|
"stroke-width": 1.5
|
|
931
969
|
}, null, 8, ["size"]));
|
|
932
970
|
}
|
|
933
|
-
}),
|
|
934
|
-
function
|
|
935
|
-
let r =
|
|
971
|
+
}), Hr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
972
|
+
function Ur(e, n) {
|
|
973
|
+
let r = wn(), i = null, a = null, o = null;
|
|
936
974
|
function s() {
|
|
937
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
975
|
+
return e.value ? Array.from(e.value.querySelectorAll(Hr)).filter((e) => e.offsetParent !== null) : [];
|
|
938
976
|
}
|
|
939
977
|
function c(e) {
|
|
940
978
|
if (e.key !== "Tab") return;
|
|
@@ -949,7 +987,7 @@ function Ar(e, n) {
|
|
|
949
987
|
o = null;
|
|
950
988
|
let t = s();
|
|
951
989
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
952
|
-
}), a =
|
|
990
|
+
}), a = ot(e, "keydown", c);
|
|
953
991
|
}
|
|
954
992
|
function u(e = {}) {
|
|
955
993
|
let t = e.restoreFocus !== !1;
|
|
@@ -964,8 +1002,8 @@ function Ar(e, n) {
|
|
|
964
1002
|
}
|
|
965
1003
|
//#endregion
|
|
966
1004
|
//#region src/composables/useEmoji.ts
|
|
967
|
-
function
|
|
968
|
-
let [e, n] =
|
|
1005
|
+
function Wr() {
|
|
1006
|
+
let [e, n] = it(!1), r = y([]), i = !1;
|
|
969
1007
|
m(() => {
|
|
970
1008
|
i = !0;
|
|
971
1009
|
}), t(e, async (e) => {
|
|
@@ -990,7 +1028,7 @@ function jr() {
|
|
|
990
1028
|
}
|
|
991
1029
|
//#endregion
|
|
992
1030
|
//#region src/composables/useFonts.ts
|
|
993
|
-
var
|
|
1031
|
+
var Gr = [
|
|
994
1032
|
{
|
|
995
1033
|
value: "Arial",
|
|
996
1034
|
label: "Arial"
|
|
@@ -1019,27 +1057,19 @@ var Mr = [
|
|
|
1019
1057
|
value: "Courier New",
|
|
1020
1058
|
label: "Courier New"
|
|
1021
1059
|
}
|
|
1022
|
-
],
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
georgia: "Georgia, serif",
|
|
1026
|
-
"times new roman": "'Times New Roman', serif",
|
|
1027
|
-
verdana: "Verdana, sans-serif",
|
|
1028
|
-
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1029
|
-
"courier new": "'Courier New', monospace"
|
|
1030
|
-
}, Pr = "Arial, sans-serif";
|
|
1031
|
-
function Fr(e) {
|
|
1032
|
-
if (e === void 0 || e === !0) return [...Mr];
|
|
1060
|
+
], Kr = "Arial, sans-serif";
|
|
1061
|
+
function qr(e) {
|
|
1062
|
+
if (e === void 0 || e === !0) return [...Gr];
|
|
1033
1063
|
if (e === !1) return [];
|
|
1034
1064
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1035
1065
|
for (let i of e) {
|
|
1036
|
-
let e = i.toLowerCase(), a =
|
|
1037
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
1066
|
+
let e = i.toLowerCase(), a = Gr.find((t) => t.value.toLowerCase() === e);
|
|
1067
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), X.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Gr.map((e) => e.value).join(", ")}.`));
|
|
1038
1068
|
}
|
|
1039
1069
|
return t;
|
|
1040
1070
|
}
|
|
1041
|
-
function
|
|
1042
|
-
let t = l(e?.customFonts ?? []), n = l(!1), r =
|
|
1071
|
+
function Jr(e) {
|
|
1072
|
+
let t = l(e?.customFonts ?? []), n = l(!1), r = qr(e?.builtIns), i = b(() => e?.defaultFallback ?? Kr), a = b(() => {
|
|
1043
1073
|
let e = [...r], n = t.value.map((e) => ({
|
|
1044
1074
|
value: e.name,
|
|
1045
1075
|
label: e.name,
|
|
@@ -1050,20 +1080,21 @@ function Ir(e) {
|
|
|
1050
1080
|
function s(e) {
|
|
1051
1081
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1052
1082
|
}
|
|
1053
|
-
let c = e?.defaultFont ??
|
|
1054
|
-
s(c) ||
|
|
1083
|
+
let c = e?.defaultFont ?? Kr.split(",")[0].trim();
|
|
1084
|
+
s(c) || X.warn(`config.fonts: new templates seed "${c}", 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.`);
|
|
1055
1085
|
function u() {
|
|
1056
1086
|
if (e?.defaultFont && s(e.defaultFont)) {
|
|
1057
1087
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1058
1088
|
if (t) return t.value;
|
|
1059
1089
|
}
|
|
1060
|
-
return
|
|
1090
|
+
return Kr;
|
|
1061
1091
|
}
|
|
1062
1092
|
let d = b(() => u());
|
|
1063
1093
|
function f(e) {
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1094
|
+
return be(e, {
|
|
1095
|
+
customFonts: t.value,
|
|
1096
|
+
defaultFallback: i.value
|
|
1097
|
+
});
|
|
1067
1098
|
}
|
|
1068
1099
|
let p = [], h = !1;
|
|
1069
1100
|
async function g() {
|
|
@@ -1079,7 +1110,7 @@ function Ir(e) {
|
|
|
1079
1110
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1080
1111
|
});
|
|
1081
1112
|
} catch (t) {
|
|
1082
|
-
|
|
1113
|
+
X.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1083
1114
|
}
|
|
1084
1115
|
});
|
|
1085
1116
|
await Promise.allSettled(e), !h && (n.value = !0);
|
|
@@ -1098,18 +1129,18 @@ function Ir(e) {
|
|
|
1098
1129
|
isLoaded: n,
|
|
1099
1130
|
loadCustomFonts: g,
|
|
1100
1131
|
cleanupFontLinks: _,
|
|
1101
|
-
|
|
1132
|
+
resolveFontFamily: f,
|
|
1102
1133
|
getDefaultFont: u
|
|
1103
1134
|
};
|
|
1104
1135
|
}
|
|
1105
1136
|
//#endregion
|
|
1106
1137
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1107
|
-
function
|
|
1108
|
-
return
|
|
1138
|
+
function Yr(e, t, n) {
|
|
1139
|
+
return Se(e, n) ? {
|
|
1109
1140
|
type: "logicMergeTagNode",
|
|
1110
1141
|
attrs: {
|
|
1111
1142
|
value: e,
|
|
1112
|
-
keyword:
|
|
1143
|
+
keyword: ye(e, n)
|
|
1113
1144
|
}
|
|
1114
1145
|
} : {
|
|
1115
1146
|
type: "mergeTagNode",
|
|
@@ -1121,33 +1152,33 @@ function Lr(e, t, n) {
|
|
|
1121
1152
|
}
|
|
1122
1153
|
//#endregion
|
|
1123
1154
|
//#region src/utils/insertLogicTag.ts
|
|
1124
|
-
function
|
|
1155
|
+
function Xr(e) {
|
|
1125
1156
|
return "before" in e && "after" in e;
|
|
1126
1157
|
}
|
|
1127
|
-
function
|
|
1128
|
-
if (!
|
|
1129
|
-
e.chain().focus().insertContent(
|
|
1158
|
+
function Zr(e, t, n) {
|
|
1159
|
+
if (!Xr(t)) {
|
|
1160
|
+
e.chain().focus().insertContent(Yr(t.value, t.label, n)).run();
|
|
1130
1161
|
return;
|
|
1131
1162
|
}
|
|
1132
|
-
let r =
|
|
1163
|
+
let r = Yr(t.before, t.label, n), i = Yr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1133
1164
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1134
1165
|
}
|
|
1135
1166
|
//#endregion
|
|
1136
1167
|
//#region src/utils/linkColorExtension.ts
|
|
1137
|
-
function
|
|
1168
|
+
function Qr(e) {
|
|
1138
1169
|
if (!e) return null;
|
|
1139
1170
|
let t = e.trim();
|
|
1140
1171
|
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;
|
|
1141
1172
|
}
|
|
1142
|
-
function
|
|
1173
|
+
function $r(e) {
|
|
1143
1174
|
return e.extend({ addAttributes() {
|
|
1144
1175
|
return {
|
|
1145
1176
|
...this.parent?.(),
|
|
1146
1177
|
color: {
|
|
1147
1178
|
default: null,
|
|
1148
|
-
parseHTML: (e) =>
|
|
1179
|
+
parseHTML: (e) => Qr($t(e.style.color)),
|
|
1149
1180
|
renderHTML: (e) => {
|
|
1150
|
-
let t =
|
|
1181
|
+
let t = Qr(e.color);
|
|
1151
1182
|
return t ? { style: `color: ${t}` } : {};
|
|
1152
1183
|
}
|
|
1153
1184
|
}
|
|
@@ -1156,22 +1187,22 @@ function Vr(e) {
|
|
|
1156
1187
|
}
|
|
1157
1188
|
//#endregion
|
|
1158
1189
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1159
|
-
function
|
|
1190
|
+
function ei(e, t = Ie.liquid) {
|
|
1160
1191
|
let n = l(!1), r = l(""), i = l(""), a = l(null);
|
|
1161
|
-
|
|
1192
|
+
Ur(a, n);
|
|
1162
1193
|
function o() {
|
|
1163
1194
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1164
1195
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
1165
1196
|
}
|
|
1166
1197
|
function s() {
|
|
1167
1198
|
if (r.value) {
|
|
1168
|
-
let t =
|
|
1199
|
+
let t = f(r.value);
|
|
1169
1200
|
if (t !== null) {
|
|
1170
|
-
let n =
|
|
1201
|
+
let n = Qr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1171
1202
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1172
1203
|
}
|
|
1173
1204
|
}
|
|
1174
|
-
|
|
1205
|
+
m();
|
|
1175
1206
|
}
|
|
1176
1207
|
let c = /* @__PURE__ */ new Set([
|
|
1177
1208
|
"http",
|
|
@@ -1183,25 +1214,27 @@ function Hr(e, t = je.liquid) {
|
|
|
1183
1214
|
"sms",
|
|
1184
1215
|
"xmpp",
|
|
1185
1216
|
"cid"
|
|
1186
|
-
])
|
|
1187
|
-
function
|
|
1217
|
+
]), u = /^(?:\/|\.{1,2}\/|\?)/;
|
|
1218
|
+
function d(e) {
|
|
1188
1219
|
return RegExp(`^(?:${t.value.source})`).test(e);
|
|
1189
1220
|
}
|
|
1190
|
-
function
|
|
1221
|
+
function f(e) {
|
|
1191
1222
|
let t = e.trim();
|
|
1192
1223
|
if (!t) return null;
|
|
1193
1224
|
if (t.startsWith("#")) return t;
|
|
1225
|
+
if (t.startsWith("//")) return `https:${t}`;
|
|
1226
|
+
if (u.test(t)) return t;
|
|
1194
1227
|
let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
|
|
1195
|
-
return n ? c.has(n[1].toLowerCase()) ? t : null :
|
|
1196
|
-
}
|
|
1197
|
-
function f() {
|
|
1198
|
-
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p();
|
|
1228
|
+
return n ? c.has(n[1].toLowerCase()) ? t : null : d(t) ? t : `https://${t}`;
|
|
1199
1229
|
}
|
|
1200
1230
|
function p() {
|
|
1231
|
+
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), m();
|
|
1232
|
+
}
|
|
1233
|
+
function m() {
|
|
1201
1234
|
n.value = !1, r.value = "", i.value = "";
|
|
1202
1235
|
}
|
|
1203
|
-
function
|
|
1204
|
-
e.key === "Enter" ? (e.preventDefault(), s()) : e.key === "Escape" &&
|
|
1236
|
+
function h(e) {
|
|
1237
|
+
e.key === "Enter" ? (e.preventDefault(), s()) : e.key === "Escape" && m();
|
|
1205
1238
|
}
|
|
1206
1239
|
return {
|
|
1207
1240
|
showLinkDialog: n,
|
|
@@ -1210,21 +1243,21 @@ function Hr(e, t = je.liquid) {
|
|
|
1210
1243
|
linkDialogRef: a,
|
|
1211
1244
|
openLinkDialog: o,
|
|
1212
1245
|
insertLink: s,
|
|
1213
|
-
removeLink:
|
|
1214
|
-
closeLinkDialog:
|
|
1215
|
-
handleLinkKeydown:
|
|
1246
|
+
removeLink: p,
|
|
1247
|
+
closeLinkDialog: m,
|
|
1248
|
+
handleLinkKeydown: h
|
|
1216
1249
|
};
|
|
1217
1250
|
}
|
|
1218
1251
|
//#endregion
|
|
1219
1252
|
//#region src/composables/useRichTextEditor.ts
|
|
1220
|
-
function
|
|
1221
|
-
let i = n(
|
|
1253
|
+
function ti(r) {
|
|
1254
|
+
let i = n(q, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = Tn(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = En(), h = n(At, null), g = (A(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = Ae(u), v = y(null), b = () => ge(i?.content?.value?.settings ?? { locale: "en" });
|
|
1222
1255
|
t(b, (e) => {
|
|
1223
1256
|
let t = v.value?.view.dom;
|
|
1224
1257
|
t && t.setAttribute("dir", e);
|
|
1225
1258
|
});
|
|
1226
|
-
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } =
|
|
1227
|
-
async function
|
|
1259
|
+
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = ei(v, u), { start: j, stop: M } = nt(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), N = y(null), P = l(!0), F = l(null), I = !1, L = null;
|
|
1260
|
+
async function R() {
|
|
1228
1261
|
F.value = null, P.value = !0;
|
|
1229
1262
|
try {
|
|
1230
1263
|
let { TiptapEditor: e, EC: t, extensions: n } = await r.loadExtensions({
|
|
@@ -1244,7 +1277,7 @@ function Ur(r) {
|
|
|
1244
1277
|
editable: !0,
|
|
1245
1278
|
editorProps: { attributes: { dir: b() } },
|
|
1246
1279
|
onUpdate: ({ editor: e }) => {
|
|
1247
|
-
I || i && i.updateBlock(r.blockId(), { content:
|
|
1280
|
+
I || i && (L = e.getHTML(), i.updateBlock(r.blockId(), { content: L }));
|
|
1248
1281
|
}
|
|
1249
1282
|
});
|
|
1250
1283
|
if (I) {
|
|
@@ -1254,17 +1287,17 @@ function Ur(r) {
|
|
|
1254
1287
|
v.value = s, P.value = !1, j();
|
|
1255
1288
|
} catch (e) {
|
|
1256
1289
|
if (I) return;
|
|
1257
|
-
|
|
1290
|
+
X.error(`[${r.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
1258
1291
|
}
|
|
1259
1292
|
}
|
|
1260
|
-
function
|
|
1261
|
-
v.value?.destroy(), v.value = null,
|
|
1293
|
+
function z() {
|
|
1294
|
+
v.value?.destroy(), v.value = null, R();
|
|
1262
1295
|
}
|
|
1263
|
-
|
|
1264
|
-
let
|
|
1265
|
-
v.value && v.value.getHTML() !== e && v.value.commands.setContent(e, { emitUpdate: !1 });
|
|
1296
|
+
R();
|
|
1297
|
+
let B = t(() => r.blockContent(), (e) => {
|
|
1298
|
+
v.value && e !== L && (L = e, v.value.getHTML() !== e && v.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
1266
1299
|
});
|
|
1267
|
-
function
|
|
1300
|
+
function V(e) {
|
|
1268
1301
|
if (s.value || p.value) return;
|
|
1269
1302
|
let t = e.composedPath(), n = t.find((e) => e instanceof HTMLElement);
|
|
1270
1303
|
if (!n) return;
|
|
@@ -1272,26 +1305,26 @@ function Ur(r) {
|
|
|
1272
1305
|
let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1273
1306
|
n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
|
|
1274
1307
|
}
|
|
1275
|
-
|
|
1276
|
-
I = !0,
|
|
1308
|
+
ot(document, "mousedown", V), e(() => {
|
|
1309
|
+
I = !0, B(), M(), v.value?.destroy();
|
|
1277
1310
|
});
|
|
1278
|
-
async function
|
|
1311
|
+
async function H() {
|
|
1279
1312
|
let e = await c();
|
|
1280
1313
|
I || (e && v.value ? v.value.chain().focus().insertMergeTag({
|
|
1281
1314
|
label: e.label,
|
|
1282
1315
|
value: e.value
|
|
1283
1316
|
}).run() : v.value?.commands.focus());
|
|
1284
1317
|
}
|
|
1285
|
-
async function
|
|
1318
|
+
async function U() {
|
|
1286
1319
|
let e = await m();
|
|
1287
|
-
I || (e && v.value ?
|
|
1320
|
+
I || (e && v.value ? Zr(v.value, e, u) : v.value?.commands.focus());
|
|
1288
1321
|
}
|
|
1289
1322
|
return {
|
|
1290
1323
|
editor: v,
|
|
1291
1324
|
EditorContent: N,
|
|
1292
1325
|
isLoading: P,
|
|
1293
1326
|
initError: F,
|
|
1294
|
-
retry:
|
|
1327
|
+
retry: z,
|
|
1295
1328
|
showLinkDialog: x,
|
|
1296
1329
|
linkUrl: S,
|
|
1297
1330
|
linkColor: C,
|
|
@@ -1307,15 +1340,15 @@ function Ur(r) {
|
|
|
1307
1340
|
removeLink: D,
|
|
1308
1341
|
closeLinkDialog: O,
|
|
1309
1342
|
handleLinkKeydown: k,
|
|
1310
|
-
handleAddMergeTag:
|
|
1311
|
-
handleAddLogicTag:
|
|
1343
|
+
handleAddMergeTag: H,
|
|
1344
|
+
handleAddLogicTag: U
|
|
1312
1345
|
};
|
|
1313
1346
|
}
|
|
1314
1347
|
//#endregion
|
|
1315
1348
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1316
|
-
var
|
|
1317
|
-
function
|
|
1318
|
-
let t =
|
|
1349
|
+
var ni = "(max-width: 767px)";
|
|
1350
|
+
function ri(e) {
|
|
1351
|
+
let t = st(ni);
|
|
1319
1352
|
return {
|
|
1320
1353
|
isSmallScreen: t,
|
|
1321
1354
|
showNotice: b(() => (j(e) ?? !0) && t.value)
|
|
@@ -1323,20 +1356,20 @@ function Gr(e) {
|
|
|
1323
1356
|
}
|
|
1324
1357
|
//#endregion
|
|
1325
1358
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1326
|
-
var
|
|
1359
|
+
var ii = { class: "tpl:w-full" }, ai = {
|
|
1327
1360
|
key: 0,
|
|
1328
|
-
class: "tpl:flex 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)]"
|
|
1329
|
-
},
|
|
1361
|
+
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)]"
|
|
1362
|
+
}, oi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, si = {
|
|
1330
1363
|
key: 1,
|
|
1331
|
-
class: "tpl:flex 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)]"
|
|
1332
|
-
},
|
|
1364
|
+
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)]"
|
|
1365
|
+
}, ci = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, li = {
|
|
1333
1366
|
key: 2,
|
|
1334
1367
|
class: "tpl:relative"
|
|
1335
|
-
},
|
|
1368
|
+
}, ui = ["innerHTML"], di = {
|
|
1336
1369
|
key: 0,
|
|
1337
1370
|
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]",
|
|
1338
1371
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1339
|
-
},
|
|
1372
|
+
}, fi = /* @__PURE__ */ d({
|
|
1340
1373
|
__name: "CustomBlock",
|
|
1341
1374
|
props: {
|
|
1342
1375
|
block: {},
|
|
@@ -1344,7 +1377,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1344
1377
|
},
|
|
1345
1378
|
emits: ["fetchData"],
|
|
1346
1379
|
setup(e, { emit: r }) {
|
|
1347
|
-
let i = e, a = r, { t: o } =
|
|
1380
|
+
let i = e, a = r, { t: o } = Y(), c = n(Jt, null), u = l(""), d = l(!1), f = b(() => c?.getDefinition(i.block.customType)), p = b(() => !!f.value), m = b(() => i.block), { isFetching: _, fetch: v, needsFetch: y, hasDataSource: C } = qe({
|
|
1348
1381
|
definition: f,
|
|
1349
1382
|
block: m,
|
|
1350
1383
|
onUpdate: (e, t) => {
|
|
@@ -1353,10 +1386,10 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1353
1386
|
dataSourceFetched: t
|
|
1354
1387
|
});
|
|
1355
1388
|
}
|
|
1356
|
-
}), T = n(
|
|
1389
|
+
}), T = n(K, mt), D = n(wt, null), A = b(() => {
|
|
1357
1390
|
if (!D?.value) return i.block;
|
|
1358
1391
|
let e = {};
|
|
1359
|
-
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1392
|
+
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ve(n, T.value) : n;
|
|
1360
1393
|
return {
|
|
1361
1394
|
...i.block,
|
|
1362
1395
|
fieldValues: e
|
|
@@ -1373,17 +1406,17 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1373
1406
|
}
|
|
1374
1407
|
}
|
|
1375
1408
|
}
|
|
1376
|
-
let M =
|
|
1409
|
+
let M = rt(j, 150);
|
|
1377
1410
|
return w(() => {
|
|
1378
1411
|
j();
|
|
1379
1412
|
}), t(() => i.block.fieldValues, () => {
|
|
1380
1413
|
M();
|
|
1381
1414
|
}, { deep: !0 }), t(() => D?.value, () => {
|
|
1382
1415
|
M();
|
|
1383
|
-
}), (e, t) => (s(), x("div",
|
|
1416
|
+
}), (e, t) => (s(), x("div", ii, [p.value ? d.value ? (s(), x("div", si, [g(h(fn), {
|
|
1384
1417
|
size: 24,
|
|
1385
1418
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1386
|
-
}), k("span",
|
|
1419
|
+
}), k("span", ci, F(h(o).customBlocks.renderError), 1)])) : (s(), x("div", li, [k("div", { innerHTML: u.value }, null, 8, ui), h(C) && h(y) ? (s(), x("div", di, [h(_) ? (s(), O(Sn, {
|
|
1387
1420
|
key: 1,
|
|
1388
1421
|
class: "tpl:w-48"
|
|
1389
1422
|
})) : (s(), x("button", {
|
|
@@ -1391,16 +1424,16 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1391
1424
|
type: "button",
|
|
1392
1425
|
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)]",
|
|
1393
1426
|
onClick: t[0] ||= E((...e) => h(v) && h(v)(...e), ["stop"])
|
|
1394
|
-
}, [f.value?.icon ? (s(), O(
|
|
1427
|
+
}, [f.value?.icon ? (s(), O(Vr, {
|
|
1395
1428
|
key: 0,
|
|
1396
1429
|
icon: f.value.icon,
|
|
1397
1430
|
size: 16
|
|
1398
|
-
}, null, 8, ["icon"])) : S("", !0), R(" " + F(f.value?.dataSource?.label || h(o).customBlocks.dataSource.fetchButton), 1)]))])) : S("", !0)])) : (s(), x("div",
|
|
1431
|
+
}, null, 8, ["icon"])) : S("", !0), R(" " + F(f.value?.dataSource?.label || h(o).customBlocks.dataSource.fetchButton), 1)]))])) : S("", !0)])) : (s(), x("div", ai, [g(h(ln), {
|
|
1399
1432
|
size: 24,
|
|
1400
1433
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1401
|
-
}), k("span",
|
|
1434
|
+
}), k("span", oi, F(h(o).customBlocks.definitionNotFound), 1)]))]));
|
|
1402
1435
|
}
|
|
1403
|
-
}),
|
|
1436
|
+
}), pi = { class: "tpl:w-full" }, mi = /* @__PURE__ */ d({
|
|
1404
1437
|
__name: "DividerBlock",
|
|
1405
1438
|
props: {
|
|
1406
1439
|
block: {},
|
|
@@ -1412,28 +1445,28 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1412
1445
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1413
1446
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1414
1447
|
}));
|
|
1415
|
-
return (e, t) => (s(), x("div",
|
|
1448
|
+
return (e, t) => (s(), x("div", pi, [k("hr", {
|
|
1416
1449
|
class: "tpl:m-0 tpl:border-none",
|
|
1417
1450
|
style: D(n.value)
|
|
1418
1451
|
}, null, 4)]));
|
|
1419
1452
|
}
|
|
1420
|
-
}),
|
|
1453
|
+
}), hi = { class: "tpl:w-full" }, gi = ["srcdoc", "title"], _i = {
|
|
1421
1454
|
key: 1,
|
|
1422
|
-
class: "tpl:flex 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)]"
|
|
1423
|
-
},
|
|
1455
|
+
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)]"
|
|
1456
|
+
}, vi = {
|
|
1424
1457
|
key: 0,
|
|
1425
1458
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1426
|
-
},
|
|
1459
|
+
}, yi = {
|
|
1427
1460
|
key: 1,
|
|
1428
1461
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1429
|
-
},
|
|
1462
|
+
}, bi = /* @__PURE__ */ d({
|
|
1430
1463
|
__name: "HtmlBlock",
|
|
1431
1464
|
props: {
|
|
1432
1465
|
block: {},
|
|
1433
1466
|
viewport: {}
|
|
1434
1467
|
},
|
|
1435
1468
|
setup(r) {
|
|
1436
|
-
let i = r, { t: a } =
|
|
1469
|
+
let i = r, { t: a } = Y(), o = n(Pt, !1), c = b(() => i.block.content.trim().length > 0), u = b(() => o && c.value), d = n(K, mt), f = n(wt, null), p = b(() => f?.value ? ve(i.block.content, d.value) : i.block.content), m = l(null), _ = l(60), v = null;
|
|
1437
1470
|
function y() {
|
|
1438
1471
|
let e = m.value?.contentDocument;
|
|
1439
1472
|
e && (_.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1447,7 +1480,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1447
1480
|
e || (v?.disconnect(), v = null);
|
|
1448
1481
|
}), e(() => {
|
|
1449
1482
|
v?.disconnect(), v = null;
|
|
1450
|
-
}), (e, t) => (s(), x("div",
|
|
1483
|
+
}), (e, t) => (s(), x("div", hi, [u.value ? (s(), x("iframe", {
|
|
1451
1484
|
key: 0,
|
|
1452
1485
|
ref_key: "iframeRef",
|
|
1453
1486
|
ref: m,
|
|
@@ -1457,22 +1490,18 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1457
1490
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1458
1491
|
style: D({ height: `${_.value}px` }),
|
|
1459
1492
|
onLoad: S
|
|
1460
|
-
}, null, 44,
|
|
1493
|
+
}, null, 44, gi)) : (s(), x("div", _i, [g(h(gn), {
|
|
1461
1494
|
size: 24,
|
|
1462
1495
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1463
|
-
}), c.value ? (s(), x("span",
|
|
1496
|
+
}), c.value ? (s(), x("span", vi, F(h(a).html.preview), 1)) : (s(), x("span", yi, F(h(a).html.empty), 1))]))]));
|
|
1464
1497
|
}
|
|
1465
|
-
}),
|
|
1466
|
-
key: 0,
|
|
1467
|
-
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1468
|
-
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1469
|
-
}, di = ["href"], fi = ["src", "alt"], pi = ["src", "alt"], mi = {
|
|
1498
|
+
}), xi = ["data-drop-enabled"], Si = ["href"], Ci = ["src", "alt"], wi = ["src", "alt"], Ti = {
|
|
1470
1499
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1471
1500
|
style: { opacity: "0.7" }
|
|
1472
|
-
},
|
|
1501
|
+
}, Ei = ["href"], Di = ["src", "alt"], Oi = ["src", "alt"], ki = {
|
|
1473
1502
|
key: 4,
|
|
1474
|
-
class: "tpl:flex 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)]"
|
|
1475
|
-
},
|
|
1503
|
+
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)]"
|
|
1504
|
+
}, Ai = ["aria-label"], ji = { key: 1 }, Mi = /* @__PURE__ */ d({
|
|
1476
1505
|
__name: "ImageBlock",
|
|
1477
1506
|
props: {
|
|
1478
1507
|
block: {},
|
|
@@ -1480,68 +1509,43 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1480
1509
|
},
|
|
1481
1510
|
emits: ["update"],
|
|
1482
1511
|
setup(e, { emit: t }) {
|
|
1483
|
-
let
|
|
1484
|
-
|
|
1485
|
-
let
|
|
1486
|
-
|
|
1487
|
-
let t = { src: e.url };
|
|
1488
|
-
e.alt && (t.alt = e.alt), i("update", t);
|
|
1489
|
-
}
|
|
1512
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = Tn(), o = b(() => W(n.block.src, a));
|
|
1513
|
+
function c(e) {
|
|
1514
|
+
let t = { src: e.url };
|
|
1515
|
+
e.alt && (t.alt = e.alt), r("update", t);
|
|
1490
1516
|
}
|
|
1491
|
-
let
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
accept: ["images"],
|
|
1498
|
-
files: e
|
|
1499
|
-
});
|
|
1500
|
-
if (!f.alive) return;
|
|
1501
|
-
if (t) {
|
|
1502
|
-
let e = { src: t.url };
|
|
1503
|
-
t.alt && (e.alt = t.alt), i("update", e);
|
|
1504
|
-
}
|
|
1505
|
-
} finally {
|
|
1506
|
-
f.alive && (_.value = !1);
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
}
|
|
1510
|
-
let { isOver: C } = Ue({
|
|
1511
|
-
target: m,
|
|
1512
|
-
enabled: v,
|
|
1513
|
-
onFiles: y
|
|
1514
|
-
}), w = b(() => ({ textAlign: r.block.align })), T = b(() => {
|
|
1515
|
-
let e = r.block.border, t = ["left", "right"].map((t) => he(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1517
|
+
let u = l(), { canBrowse: d, dropEnabled: f, isUploading: p, showOverlay: m, openMediaBrowser: _ } = Ye({
|
|
1518
|
+
target: u,
|
|
1519
|
+
blocked: o,
|
|
1520
|
+
apply: c
|
|
1521
|
+
}), v = b(() => ({ textAlign: n.block.align })), y = b(() => {
|
|
1522
|
+
let e = n.block.border, t = ["left", "right"].map((t) => Oe(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1516
1523
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1517
|
-
}),
|
|
1518
|
-
let e =
|
|
1524
|
+
}), C = b(() => {
|
|
1525
|
+
let e = n.block.align;
|
|
1519
1526
|
return {
|
|
1520
1527
|
maxWidth: "100%",
|
|
1521
|
-
width:
|
|
1522
|
-
height:
|
|
1523
|
-
borderRadius:
|
|
1524
|
-
...
|
|
1528
|
+
width: n.block.width === "full" ? y.value : `${n.block.width}px`,
|
|
1529
|
+
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1530
|
+
borderRadius: se(n.block.borderRadius) ?? void 0,
|
|
1531
|
+
...Mr(n.block.border),
|
|
1525
1532
|
display: "block",
|
|
1526
1533
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1527
1534
|
marginRight: e === "center" ? "auto" : void 0
|
|
1528
1535
|
};
|
|
1529
|
-
}),
|
|
1536
|
+
}), w = Q(() => o.value ? void 0 : n.block.src), T = Q(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1530
1537
|
return (t, n) => (s(), x("div", {
|
|
1531
1538
|
ref_key: "dropZoneRef",
|
|
1532
|
-
ref:
|
|
1539
|
+
ref: u,
|
|
1533
1540
|
"data-testid": "image-drop-zone",
|
|
1534
|
-
"data-drop-enabled":
|
|
1541
|
+
"data-drop-enabled": h(f),
|
|
1535
1542
|
class: "tpl:relative tpl:w-full",
|
|
1536
|
-
style: D(
|
|
1537
|
-
}, [
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
"
|
|
1541
|
-
}
|
|
1542
|
-
size: 20,
|
|
1543
|
-
"stroke-width": 1.5
|
|
1544
|
-
}), R(" " + F(h(a).image.dropToUpload), 1)], 64))])) : S("", !0), e.block.src && A.value && e.block.placeholderUrl ? (s(), x(P, { key: 1 }, [e.block.linkUrl ? (s(), x("a", {
|
|
1543
|
+
style: D(v.value)
|
|
1544
|
+
}, [h(m) ? (s(), O(Ge, {
|
|
1545
|
+
key: 0,
|
|
1546
|
+
uploading: h(p),
|
|
1547
|
+
size: "canvas"
|
|
1548
|
+
}, null, 8, ["uploading"])) : S("", !0), e.block.src && o.value && e.block.placeholderUrl ? (s(), x(P, { key: 1 }, [e.block.linkUrl ? (s(), x("a", {
|
|
1545
1549
|
key: 0,
|
|
1546
1550
|
href: e.block.linkUrl,
|
|
1547
1551
|
target: "_blank",
|
|
@@ -1550,25 +1554,25 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1550
1554
|
}, [k("img", {
|
|
1551
1555
|
class: "tpl:border-0",
|
|
1552
1556
|
loading: "lazy",
|
|
1553
|
-
src: h(
|
|
1554
|
-
alt: e.block.alt || h(
|
|
1555
|
-
style: D(
|
|
1556
|
-
}, null, 12,
|
|
1557
|
+
src: h(T),
|
|
1558
|
+
alt: e.block.alt || h(i).image.altTextPlaceholder,
|
|
1559
|
+
style: D(C.value)
|
|
1560
|
+
}, null, 12, Ci)], 8, Si)) : (s(), x("img", {
|
|
1557
1561
|
key: 1,
|
|
1558
1562
|
class: "tpl:border-0",
|
|
1559
|
-
src: h(
|
|
1563
|
+
src: h(T),
|
|
1560
1564
|
alt: e.block.alt,
|
|
1561
|
-
style: D(
|
|
1562
|
-
}, null, 12,
|
|
1565
|
+
style: D(C.value)
|
|
1566
|
+
}, null, 12, wi))], 64)) : e.block.src && o.value ? (s(), x("div", {
|
|
1563
1567
|
key: 2,
|
|
1564
|
-
class: "tpl:!flex 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)]",
|
|
1565
|
-
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" },
|
|
1566
|
-
}, [g(h(
|
|
1568
|
+
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)]",
|
|
1569
|
+
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, C.value])
|
|
1570
|
+
}, [g(h(yn), {
|
|
1567
1571
|
size: 32,
|
|
1568
1572
|
"stroke-width": 1.5,
|
|
1569
1573
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1570
1574
|
style: { opacity: "0.5" }
|
|
1571
|
-
}), k("span",
|
|
1575
|
+
}), k("span", Ti, [g(Ir, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), x(P, { key: 3 }, [e.block.linkUrl ? (s(), x("a", {
|
|
1572
1576
|
key: 0,
|
|
1573
1577
|
href: e.block.linkUrl,
|
|
1574
1578
|
target: "_blank",
|
|
@@ -1577,68 +1581,68 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1577
1581
|
}, [k("img", {
|
|
1578
1582
|
class: "tpl:border-0",
|
|
1579
1583
|
loading: "lazy",
|
|
1580
|
-
src: h(
|
|
1581
|
-
alt: e.block.alt || h(
|
|
1582
|
-
style: D(
|
|
1583
|
-
}, null, 12,
|
|
1584
|
+
src: h(w),
|
|
1585
|
+
alt: e.block.alt || h(i).image.altTextPlaceholder,
|
|
1586
|
+
style: D(C.value)
|
|
1587
|
+
}, null, 12, Di)], 8, Ei)) : (s(), x("img", {
|
|
1584
1588
|
key: 1,
|
|
1585
1589
|
class: "tpl:border-0",
|
|
1586
|
-
src: h(
|
|
1590
|
+
src: h(w),
|
|
1587
1591
|
alt: e.block.alt,
|
|
1588
|
-
style: D(
|
|
1589
|
-
}, null, 12,
|
|
1592
|
+
style: D(C.value)
|
|
1593
|
+
}, null, 12, Oi))], 64)) : (s(), x("div", ki, [h(d) ? (s(), x("button", {
|
|
1590
1594
|
key: 0,
|
|
1591
|
-
"aria-label": h(
|
|
1595
|
+
"aria-label": h(i).image.browseMedia,
|
|
1592
1596
|
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)]",
|
|
1593
|
-
onClick: E(
|
|
1594
|
-
}, [g(h(
|
|
1597
|
+
onClick: n[2] ||= E((...e) => h(_) && h(_)(...e), ["stop"])
|
|
1598
|
+
}, [g(h(yn), {
|
|
1595
1599
|
size: 14,
|
|
1596
1600
|
"stroke-width": 1.5
|
|
1597
|
-
}), R(" " + F(h(
|
|
1601
|
+
}), R(" " + F(h(i).image.browseMedia), 1)], 8, Ai)) : (s(), x("span", ji, F(h(i).image.clickToAdd), 1))]))], 12, xi));
|
|
1598
1602
|
}
|
|
1599
|
-
}),
|
|
1603
|
+
}), Ni = { class: "tpl:w-full" }, Pi = ["href"], Fi = {
|
|
1600
1604
|
key: 1,
|
|
1601
1605
|
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)]"
|
|
1602
|
-
},
|
|
1606
|
+
}, Ii = /* @__PURE__ */ d({
|
|
1603
1607
|
__name: "MenuBlock",
|
|
1604
1608
|
props: {
|
|
1605
1609
|
block: {},
|
|
1606
1610
|
viewport: {}
|
|
1607
1611
|
},
|
|
1608
1612
|
setup(e) {
|
|
1609
|
-
let t = e, { t: n } =
|
|
1613
|
+
let t = e, { t: n } = Y(), i = G(J, "MenuBlock"), a = b(() => ({
|
|
1610
1614
|
display: "flex",
|
|
1611
1615
|
flexWrap: "wrap",
|
|
1612
1616
|
gap: `0 ${t.block.spacing}px`,
|
|
1613
1617
|
justifyContent: t.block.textAlign === "left" ? "flex-start" : t.block.textAlign === "right" ? "flex-end" : "center",
|
|
1614
1618
|
fontSize: `${t.block.fontSize}px`,
|
|
1615
|
-
fontFamily: t.block.fontFamily
|
|
1619
|
+
fontFamily: t.block.fontFamily ? i.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1616
1620
|
alignItems: "center"
|
|
1617
|
-
})),
|
|
1618
|
-
function
|
|
1621
|
+
})), o = b(() => t.block.items.length > 0);
|
|
1622
|
+
function c(e) {
|
|
1619
1623
|
return e || t.block.linkColor || t.block.color;
|
|
1620
1624
|
}
|
|
1621
|
-
return (t,
|
|
1625
|
+
return (t, i) => (s(), x("div", Ni, [o.value ? (s(), x("div", {
|
|
1622
1626
|
key: 0,
|
|
1623
|
-
style: D(
|
|
1627
|
+
style: D(a.value)
|
|
1624
1628
|
}, [(s(!0), x(P, null, r(e.block.items, (t, n) => (s(), x(P, { key: t.id }, [k("a", {
|
|
1625
1629
|
href: t.url || "#",
|
|
1626
1630
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1627
1631
|
style: D({
|
|
1628
|
-
color:
|
|
1632
|
+
color: c(t.color),
|
|
1629
1633
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1630
1634
|
textDecoration: t.underline ? "underline" : "none"
|
|
1631
1635
|
}),
|
|
1632
|
-
onClick:
|
|
1633
|
-
}, [g(
|
|
1636
|
+
onClick: i[0] ||= E(() => {}, ["prevent"])
|
|
1637
|
+
}, [g(Ir, { text: t.text || "..." }, null, 8, ["text"])], 12, Pi), n < e.block.items.length - 1 ? (s(), x("span", {
|
|
1634
1638
|
key: 0,
|
|
1635
1639
|
style: D({
|
|
1636
1640
|
color: e.block.separatorColor,
|
|
1637
1641
|
padding: `0 ${e.block.spacing}px`
|
|
1638
1642
|
})
|
|
1639
|
-
}, F(e.block.separator), 5)) : S("", !0)], 64))), 128))], 4)) : (s(), x("div",
|
|
1643
|
+
}, F(e.block.separator), 5)) : S("", !0)], 64))), 128))], 4)) : (s(), x("div", Fi, [g(h(dn), { size: 16 }), k("span", null, F(h(n).menu.addLinks), 1)]))]));
|
|
1640
1644
|
}
|
|
1641
|
-
}),
|
|
1645
|
+
}), Li = /* @__PURE__ */ new Set([
|
|
1642
1646
|
"http",
|
|
1643
1647
|
"https",
|
|
1644
1648
|
"mailto",
|
|
@@ -1648,7 +1652,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1648
1652
|
"sms",
|
|
1649
1653
|
"xmpp",
|
|
1650
1654
|
"cid"
|
|
1651
|
-
]),
|
|
1655
|
+
]), Ri = /* @__PURE__ */ new Set([
|
|
1652
1656
|
"SCRIPT",
|
|
1653
1657
|
"STYLE",
|
|
1654
1658
|
"IFRAME",
|
|
@@ -1658,7 +1662,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1658
1662
|
"META",
|
|
1659
1663
|
"BASE",
|
|
1660
1664
|
"FORM"
|
|
1661
|
-
]),
|
|
1665
|
+
]), zi = /* @__PURE__ */ new Set([
|
|
1662
1666
|
"href",
|
|
1663
1667
|
"xlink:href",
|
|
1664
1668
|
"formaction",
|
|
@@ -1667,16 +1671,16 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1667
1671
|
"background",
|
|
1668
1672
|
"poster"
|
|
1669
1673
|
]);
|
|
1670
|
-
function
|
|
1674
|
+
function Bi(e, t) {
|
|
1671
1675
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1672
1676
|
if (!n || n.startsWith("#")) return !0;
|
|
1673
1677
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1674
1678
|
if (!r) return !0;
|
|
1675
1679
|
let i = r[1].toLowerCase();
|
|
1676
|
-
return
|
|
1680
|
+
return Li.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1677
1681
|
}
|
|
1678
|
-
function
|
|
1679
|
-
if (
|
|
1682
|
+
function Vi(e) {
|
|
1683
|
+
if (Ri.has(e.tagName)) {
|
|
1680
1684
|
e.remove();
|
|
1681
1685
|
return;
|
|
1682
1686
|
}
|
|
@@ -1684,21 +1688,21 @@ function Ai(e) {
|
|
|
1684
1688
|
for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
|
|
1685
1689
|
for (let n of t) {
|
|
1686
1690
|
let t = n.toLowerCase();
|
|
1687
|
-
t.startsWith("on") ? e.removeAttribute(n) :
|
|
1691
|
+
t.startsWith("on") ? e.removeAttribute(n) : zi.has(t) ? Bi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n) : t === "src" ? Bi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n) : t === "srcdoc" && e.removeAttribute(n);
|
|
1688
1692
|
}
|
|
1689
1693
|
let n = Array.from(e.children);
|
|
1690
|
-
for (let e of n)
|
|
1694
|
+
for (let e of n) Vi(e);
|
|
1691
1695
|
}
|
|
1692
|
-
function
|
|
1696
|
+
function Hi(e) {
|
|
1693
1697
|
if (typeof DOMParser > "u") return e;
|
|
1694
1698
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1695
|
-
for (let e of n)
|
|
1699
|
+
for (let e of n) Vi(e);
|
|
1696
1700
|
return t.innerHTML;
|
|
1697
1701
|
}
|
|
1698
1702
|
//#endregion
|
|
1699
1703
|
//#region src/composables/useEditableTextBlock.ts
|
|
1700
|
-
function
|
|
1701
|
-
let t = n(
|
|
1704
|
+
function Ui(e) {
|
|
1705
|
+
let t = n(K, mt), r = n(wt, null), { syntax: i } = Tn(), a = b(() => r?.value ? Te(e(), t.value) : je(e(), t.value)), o = b(() => Ve(Hi(Fe(a.value, i)))), s = l(!1), c = l(null), { top: u, left: d } = ct(c), { toLocal: f } = nn(), p = b(() => f({
|
|
1702
1706
|
top: u.value - 8,
|
|
1703
1707
|
left: d.value
|
|
1704
1708
|
}));
|
|
@@ -1719,14 +1723,14 @@ function Mi(e) {
|
|
|
1719
1723
|
}
|
|
1720
1724
|
//#endregion
|
|
1721
1725
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1722
|
-
var
|
|
1726
|
+
var Wi = ["innerHTML"], Gi = /* @__PURE__ */ d({
|
|
1723
1727
|
__name: "ParagraphBlock",
|
|
1724
1728
|
props: {
|
|
1725
1729
|
block: {},
|
|
1726
1730
|
viewport: {}
|
|
1727
1731
|
},
|
|
1728
1732
|
setup(e) {
|
|
1729
|
-
let t = e, n = L(() => import("./ParagraphEditor-
|
|
1733
|
+
let t = e, n = L(() => import("./ParagraphEditor-BGLIw7kg.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ui(() => t.block.content);
|
|
1730
1734
|
return (t, u) => (s(), x("div", {
|
|
1731
1735
|
ref_key: "blockRef",
|
|
1732
1736
|
ref: i,
|
|
@@ -1745,26 +1749,26 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1745
1749
|
key: 1,
|
|
1746
1750
|
class: "tpl-text-content tpl:outline-none",
|
|
1747
1751
|
innerHTML: h(o)
|
|
1748
|
-
}, null, 8,
|
|
1752
|
+
}, null, 8, Wi))], 544));
|
|
1749
1753
|
}
|
|
1750
|
-
}),
|
|
1754
|
+
}), Ki = [
|
|
1751
1755
|
"data-block-id",
|
|
1752
1756
|
"data-block-type",
|
|
1753
1757
|
"data-tpl-picked"
|
|
1754
|
-
],
|
|
1758
|
+
], qi = ["aria-label"], Ji = [
|
|
1755
1759
|
"aria-label",
|
|
1756
1760
|
"aria-pressed",
|
|
1757
1761
|
"title"
|
|
1758
|
-
],
|
|
1762
|
+
], Yi = ["aria-label", "title"], Xi = ["aria-label", "title"], Zi = ["aria-label", "title"], Qi = {
|
|
1759
1763
|
key: 1,
|
|
1760
1764
|
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"
|
|
1761
|
-
},
|
|
1765
|
+
}, $i = { 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)]" }, ea = {
|
|
1762
1766
|
key: 2,
|
|
1763
1767
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1764
|
-
},
|
|
1768
|
+
}, ta = ["aria-label", "title"], na = {
|
|
1765
1769
|
key: 3,
|
|
1766
1770
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1767
|
-
},
|
|
1771
|
+
}, ra = ["aria-label"], ia = /*#__PURE__*/ Cn(/* @__PURE__ */ d({
|
|
1768
1772
|
__name: "BlockWrapper",
|
|
1769
1773
|
props: {
|
|
1770
1774
|
block: {},
|
|
@@ -1776,7 +1780,7 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1776
1780
|
},
|
|
1777
1781
|
emits: ["select"],
|
|
1778
1782
|
setup(e, { emit: t }) {
|
|
1779
|
-
let r = L(() => import("./BlockIssueBadge-
|
|
1783
|
+
let r = L(() => import("./BlockIssueBadge-CS7ytN-z.js")), i = e, o = t, { t: c, format: u } = Y(), d = n(Et, null), f = l(null), p = b(() => d?.liftedBlockId.value === i.block.id), m = b(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
|
|
1780
1784
|
async function _() {
|
|
1781
1785
|
await T(), f.value?.focus();
|
|
1782
1786
|
}
|
|
@@ -1786,20 +1790,20 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1786
1790
|
let C = b(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), w = b(() => i.previewMode === !0 && C.value), O = b(() => i.viewport ? {
|
|
1787
1791
|
desktop: c.viewport.desktop,
|
|
1788
1792
|
mobile: c.viewport.mobile
|
|
1789
|
-
}[i.viewport] ?? i.viewport : ""), A = b(() => !!i.block.displayCondition), j = n(
|
|
1790
|
-
function
|
|
1793
|
+
}[i.viewport] ?? i.viewport : ""), A = b(() => !!i.block.displayCondition), j = n(Nt, null), M = n(Lt, null), N = n(Vt, {}), P = b(() => N.savedBlocks?.isPicking.value === !0), I = b(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), z = b(() => i.isSelected && !P.value), B = b(() => N.comments?.getBlockCount(i.block.id) ?? 0), V = In(() => i.block.type === "section" ? i.block.backgroundImage : void 0), H = In(() => i.block.type === "section" ? i.block.wrapper?.backgroundImage : void 0), U = b(() => Ar(i.block, { backgroundImageUrl: V.value })), ee = b(() => Nr(i.block, { backgroundImageUrl: H.value }));
|
|
1794
|
+
function te(e) {
|
|
1791
1795
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
|
|
1792
1796
|
}
|
|
1793
|
-
function
|
|
1797
|
+
function ne() {
|
|
1794
1798
|
j?.deleteBlock(i.block.id);
|
|
1795
1799
|
}
|
|
1796
|
-
function
|
|
1800
|
+
function re() {
|
|
1797
1801
|
j?.duplicateBlock(i.block);
|
|
1798
1802
|
}
|
|
1799
|
-
function
|
|
1803
|
+
function ie() {
|
|
1800
1804
|
N.savedBlocks?.startPicking(i.block.id);
|
|
1801
1805
|
}
|
|
1802
|
-
function
|
|
1806
|
+
function ae() {
|
|
1803
1807
|
M?.toggleBlock(i.block.id);
|
|
1804
1808
|
}
|
|
1805
1809
|
return (t, n) => w.value ? S("", !0) : (s(), x("div", {
|
|
@@ -1813,7 +1817,7 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1813
1817
|
"data-block-id": e.block.id,
|
|
1814
1818
|
"data-block-type": e.block.type,
|
|
1815
1819
|
"data-tpl-picked": e.picked || void 0,
|
|
1816
|
-
onClick:
|
|
1820
|
+
onClick: te
|
|
1817
1821
|
}, [
|
|
1818
1822
|
g(h(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1819
1823
|
z.value ? (s(), x("div", {
|
|
@@ -1831,133 +1835,134 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1831
1835
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1832
1836
|
title: h(c).blockActions.drag,
|
|
1833
1837
|
onKeydown: y
|
|
1834
|
-
}, [g(h(
|
|
1838
|
+
}, [g(h(mn), {
|
|
1835
1839
|
size: 14,
|
|
1836
1840
|
"stroke-width": 1.5
|
|
1837
|
-
})], 40,
|
|
1841
|
+
})], 40, Ji),
|
|
1838
1842
|
k("button", {
|
|
1839
1843
|
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",
|
|
1840
1844
|
"aria-label": h(c).blockActions.duplicate,
|
|
1841
1845
|
title: h(c).blockActions.duplicate,
|
|
1842
|
-
onClick: E(
|
|
1843
|
-
}, [g(h(
|
|
1846
|
+
onClick: E(re, ["stop"])
|
|
1847
|
+
}, [g(h(sn), {
|
|
1844
1848
|
size: 14,
|
|
1845
1849
|
"stroke-width": 1.5
|
|
1846
|
-
})], 8,
|
|
1850
|
+
})], 8, Yi),
|
|
1847
1851
|
I.value ? (s(), x("button", {
|
|
1848
1852
|
key: 0,
|
|
1849
1853
|
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",
|
|
1850
1854
|
"aria-label": h(c).blockActions.saveAsBlock,
|
|
1851
1855
|
title: h(c).blockActions.saveAsBlock,
|
|
1852
|
-
onClick: E(
|
|
1853
|
-
}, [g(h(
|
|
1856
|
+
onClick: E(ie, ["stop"])
|
|
1857
|
+
}, [g(h(un), {
|
|
1854
1858
|
size: 14,
|
|
1855
1859
|
"stroke-width": 1.5
|
|
1856
|
-
})], 8,
|
|
1860
|
+
})], 8, Xi)) : S("", !0),
|
|
1857
1861
|
k("button", {
|
|
1858
1862
|
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",
|
|
1859
1863
|
"aria-label": h(c).blockActions.delete,
|
|
1860
1864
|
title: h(c).blockActions.delete,
|
|
1861
|
-
onClick: E(
|
|
1862
|
-
}, [g(h(
|
|
1865
|
+
onClick: E(ne, ["stop"])
|
|
1866
|
+
}, [g(h(pn), {
|
|
1863
1867
|
size: 14,
|
|
1864
1868
|
"stroke-width": 1.5
|
|
1865
|
-
})], 8,
|
|
1866
|
-
], 8,
|
|
1867
|
-
C.value ? (s(), x("div",
|
|
1869
|
+
})], 8, Zi)
|
|
1870
|
+
], 8, qi)) : S("", !0),
|
|
1871
|
+
C.value ? (s(), x("div", Qi, [k("span", $i, [g(h(cn), {
|
|
1868
1872
|
size: 12,
|
|
1869
1873
|
"stroke-width": 1.5
|
|
1870
1874
|
}), R(" " + F(h(u)(h(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : S("", !0),
|
|
1871
|
-
A.value && !C.value ? (s(), x("div",
|
|
1875
|
+
A.value && !C.value ? (s(), x("div", ea, [k("button", {
|
|
1872
1876
|
"data-testid": "condition-toggle",
|
|
1873
1877
|
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)]",
|
|
1874
1878
|
"aria-label": h(c).blockActions.conditionToggle,
|
|
1875
1879
|
title: e.block.displayCondition?.label,
|
|
1876
|
-
onClick: E(
|
|
1877
|
-
}, [g(h(
|
|
1880
|
+
onClick: E(ae, ["stop"])
|
|
1881
|
+
}, [g(h(xn), {
|
|
1878
1882
|
size: 12,
|
|
1879
1883
|
"stroke-width": 2
|
|
1880
|
-
})], 8,
|
|
1881
|
-
B.value > 0 && !C.value ? (s(), x("div",
|
|
1884
|
+
})], 8, ta)])) : S("", !0),
|
|
1885
|
+
B.value > 0 && !C.value ? (s(), x("div", na, [k("button", {
|
|
1882
1886
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 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)]",
|
|
1883
1887
|
"aria-label": h(u)(h(c).blockActions.comments, { count: String(B.value) }),
|
|
1884
1888
|
onClick: n[0] ||= E((t) => h(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
1885
|
-
}, [g(h(
|
|
1889
|
+
}, [g(h(_n), {
|
|
1886
1890
|
size: 12,
|
|
1887
1891
|
"stroke-width": 2.5
|
|
1888
|
-
}), R(" " + F(B.value), 1)], 8,
|
|
1889
|
-
|
|
1892
|
+
}), R(" " + F(B.value), 1)], 8, ra)])) : S("", !0),
|
|
1893
|
+
ee.value ? (s(), x("div", {
|
|
1890
1894
|
key: 4,
|
|
1891
|
-
class: "tpl-section-wrapper",
|
|
1892
|
-
style: D(
|
|
1895
|
+
class: v(["tpl-section-wrapper tpl-email-surface", h(kr)(ee.value)]),
|
|
1896
|
+
style: D(ee.value)
|
|
1893
1897
|
}, [k("div", {
|
|
1894
|
-
class: "tpl-block-content",
|
|
1895
|
-
style: D(
|
|
1896
|
-
}, [a(t.$slots, "default", {}, void 0, !0)],
|
|
1898
|
+
class: v(["tpl-block-content tpl-email-surface", h(kr)(U.value)]),
|
|
1899
|
+
style: D(U.value)
|
|
1900
|
+
}, [a(t.$slots, "default", {}, void 0, !0)], 6)], 6)) : (s(), x("div", {
|
|
1897
1901
|
key: 5,
|
|
1898
|
-
class: "tpl-block-content",
|
|
1899
|
-
style: D(
|
|
1900
|
-
}, [a(t.$slots, "default", {}, void 0, !0)],
|
|
1901
|
-
], 10,
|
|
1902
|
+
class: v(["tpl-block-content tpl-email-surface", h(kr)(U.value)]),
|
|
1903
|
+
style: D(U.value)
|
|
1904
|
+
}, [a(t.$slots, "default", {}, void 0, !0)], 6))
|
|
1905
|
+
], 10, Ki));
|
|
1902
1906
|
}
|
|
1903
|
-
}), [["__scopeId", "data-v-
|
|
1907
|
+
}), [["__scopeId", "data-v-d4623cf8"]]);
|
|
1904
1908
|
//#endregion
|
|
1905
1909
|
//#region src/utils/unwrapParagraph.ts
|
|
1906
|
-
function
|
|
1910
|
+
function aa(e) {
|
|
1907
1911
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1908
1912
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1909
1913
|
}
|
|
1910
1914
|
//#endregion
|
|
1911
1915
|
//#region src/components/blocks/TitleBlock.vue
|
|
1912
|
-
var
|
|
1916
|
+
var oa = /* @__PURE__ */ d({
|
|
1913
1917
|
__name: "TitleBlock",
|
|
1914
1918
|
props: {
|
|
1915
1919
|
block: {},
|
|
1916
1920
|
viewport: {}
|
|
1917
1921
|
},
|
|
1918
1922
|
setup(e) {
|
|
1919
|
-
let t = e, n = L(() => import("./TitleEditor-
|
|
1923
|
+
let t = e, n = L(() => import("./TitleEditor-5eY01ypW.js")), r = G(J, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: c, handleDoubleClick: l, handleEditorDone: d } = Ui(() => t.block.content), f = b(() => {
|
|
1920
1924
|
let e = {
|
|
1921
|
-
fontSize: `${
|
|
1925
|
+
fontSize: `${ce[t.block.level]}px`,
|
|
1926
|
+
lineHeight: String(B),
|
|
1922
1927
|
textAlign: t.block.textAlign
|
|
1923
1928
|
};
|
|
1924
|
-
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1925
|
-
}),
|
|
1926
|
-
return (t,
|
|
1929
|
+
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
1930
|
+
}), p = b(() => `h${t.block.level}`), m = b(() => aa(c.value));
|
|
1931
|
+
return (t, r) => (s(), x("div", {
|
|
1927
1932
|
ref_key: "blockRef",
|
|
1928
|
-
ref:
|
|
1933
|
+
ref: a,
|
|
1929
1934
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1930
|
-
style: D(
|
|
1931
|
-
onDblclick:
|
|
1932
|
-
}, [h(
|
|
1935
|
+
style: D(f.value),
|
|
1936
|
+
onDblclick: r[0] ||= (...e) => h(l) && h(l)(...e)
|
|
1937
|
+
}, [h(i) ? (s(), O(h(n), {
|
|
1933
1938
|
key: 0,
|
|
1934
1939
|
block: e.block,
|
|
1935
|
-
"toolbar-position": h(
|
|
1936
|
-
onDone: h(
|
|
1940
|
+
"toolbar-position": h(o),
|
|
1941
|
+
onDone: h(d)
|
|
1937
1942
|
}, null, 8, [
|
|
1938
1943
|
"block",
|
|
1939
1944
|
"toolbar-position",
|
|
1940
1945
|
"onDone"
|
|
1941
|
-
])) : (s(), O(u(
|
|
1946
|
+
])) : (s(), O(u(p.value), {
|
|
1942
1947
|
key: 1,
|
|
1943
|
-
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-
|
|
1948
|
+
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
1944
1949
|
style: { color: "inherit" },
|
|
1945
|
-
innerHTML:
|
|
1950
|
+
innerHTML: m.value
|
|
1946
1951
|
}, null, 8, ["innerHTML"]))], 36));
|
|
1947
1952
|
}
|
|
1948
1953
|
});
|
|
1949
1954
|
//#endregion
|
|
1950
1955
|
//#region src/utils/sectionColumnDrop.ts
|
|
1951
|
-
function
|
|
1956
|
+
function sa(e) {
|
|
1952
1957
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
1953
1958
|
}
|
|
1954
1959
|
//#endregion
|
|
1955
1960
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1956
|
-
var
|
|
1961
|
+
var ca = { class: "tpl:w-full" }, la = {
|
|
1957
1962
|
key: 0,
|
|
1958
1963
|
"data-testid": "section-drop-hint",
|
|
1959
1964
|
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)]"
|
|
1960
|
-
},
|
|
1965
|
+
}, ua = /* @__PURE__ */ d({
|
|
1961
1966
|
__name: "SectionBlock",
|
|
1962
1967
|
props: {
|
|
1963
1968
|
block: {},
|
|
@@ -1965,13 +1970,13 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
1965
1970
|
},
|
|
1966
1971
|
setup(e) {
|
|
1967
1972
|
let t = {
|
|
1968
|
-
title:
|
|
1969
|
-
paragraph:
|
|
1970
|
-
image:
|
|
1971
|
-
button:
|
|
1972
|
-
divider:
|
|
1973
|
-
custom:
|
|
1974
|
-
}, a = e, { t: o } =
|
|
1973
|
+
title: oa,
|
|
1974
|
+
paragraph: Gi,
|
|
1975
|
+
image: Mi,
|
|
1976
|
+
button: Rr,
|
|
1977
|
+
divider: mi,
|
|
1978
|
+
custom: fi
|
|
1979
|
+
}, a = e, { t: o } = Y(), c = G(q, "SectionBlock"), d = n(Lt, null), p = n(Jt, null), m = n(Vt, {}), _ = n(qt, null);
|
|
1975
1980
|
function y(e) {
|
|
1976
1981
|
let t = m.savedBlocks;
|
|
1977
1982
|
t?.isPicking.value ? t.togglePick(a.block.id) : c.selectBlock(e);
|
|
@@ -2004,32 +2009,38 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2004
2009
|
}
|
|
2005
2010
|
let I = l(null);
|
|
2006
2011
|
function L(e) {
|
|
2007
|
-
return j(e) ? !0 : I.value === e && E(e).filter((e) => A(e.id)).length <= 1;
|
|
2012
|
+
return c.state.previewMode ? !1 : j(e) ? !0 : I.value === e && E(e).filter((e) => A(e.id)).length <= 1;
|
|
2013
|
+
}
|
|
2014
|
+
function R(e) {
|
|
2015
|
+
return E(e).length === 0 && !c.state.previewMode;
|
|
2008
2016
|
}
|
|
2009
|
-
function
|
|
2017
|
+
function z(e) {
|
|
2018
|
+
return E(e).length === 0 && c.state.previewMode;
|
|
2019
|
+
}
|
|
2020
|
+
function B(e, t) {
|
|
2010
2021
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
|
|
2011
2022
|
for (; r.length <= e;) r.push([]);
|
|
2012
2023
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
2013
2024
|
}
|
|
2014
|
-
function
|
|
2015
|
-
return
|
|
2025
|
+
function V(e) {
|
|
2026
|
+
return Tr(e, p, t);
|
|
2016
2027
|
}
|
|
2017
|
-
function
|
|
2028
|
+
function H(e, t) {
|
|
2018
2029
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
2019
2030
|
fieldValues: t.fieldValues,
|
|
2020
2031
|
dataSourceFetched: t.dataSourceFetched
|
|
2021
2032
|
});
|
|
2022
2033
|
}
|
|
2023
|
-
return (t, n) => (s(), x("div",
|
|
2034
|
+
return (t, n) => (s(), x("div", ca, [k("div", { class: v(["tpl:flex tpl:gap-0", { "tpl:flex-col": T.value }]) }, [(s(!0), x(P, null, r(w.value, (t, a) => (s(), x("div", {
|
|
2024
2035
|
key: a,
|
|
2025
|
-
class: v(["tpl:relative tpl:flex tpl:flex-col tpl:rounded",
|
|
2036
|
+
class: v(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", R(a) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2026
2037
|
style: D({ width: T.value ? "100%" : C.value[a] })
|
|
2027
2038
|
}, [g(h(N), {
|
|
2028
2039
|
"model-value": E(a),
|
|
2029
2040
|
group: {
|
|
2030
2041
|
name: "blocks",
|
|
2031
2042
|
pull: !0,
|
|
2032
|
-
put: (e, t, n) => h(
|
|
2043
|
+
put: (e, t, n) => h(sa)(n)
|
|
2033
2044
|
},
|
|
2034
2045
|
animation: 150,
|
|
2035
2046
|
"ghost-class": "tpl-ghost",
|
|
@@ -2039,12 +2050,15 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2039
2050
|
"inverted-swap-threshold": .65,
|
|
2040
2051
|
"empty-insert-threshold": 20,
|
|
2041
2052
|
"force-fallback": !0,
|
|
2042
|
-
class: v(["tpl:grow", {
|
|
2053
|
+
class: v(["tpl:grow", {
|
|
2054
|
+
"tpl:min-h-[60px]": L(a),
|
|
2055
|
+
"tpl:min-h-[34px]": z(a)
|
|
2056
|
+
}]),
|
|
2043
2057
|
onStart: (e) => I.value = a,
|
|
2044
2058
|
onEnd: n[0] ||= (e) => I.value = null,
|
|
2045
|
-
"onUpdate:modelValue": (e) =>
|
|
2059
|
+
"onUpdate:modelValue": (e) => B(a, e)
|
|
2046
2060
|
}, {
|
|
2047
|
-
default: i(() => [(s(!0), x(P, null, r(E(a), (t) => f((s(), x("div", { key: t.id }, [g(
|
|
2061
|
+
default: i(() => [(s(!0), x(P, null, r(E(a), (t) => f((s(), x("div", { key: t.id }, [g(ia, {
|
|
2048
2062
|
block: t,
|
|
2049
2063
|
"is-selected": h(c).state.selectedBlockId === t.id,
|
|
2050
2064
|
viewport: e.viewport,
|
|
@@ -2052,10 +2066,10 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2052
2066
|
nested: "",
|
|
2053
2067
|
onSelect: (e) => y(t.id)
|
|
2054
2068
|
}, {
|
|
2055
|
-
default: i(() => [(s(), O(u(
|
|
2069
|
+
default: i(() => [(s(), O(u(V(t)), {
|
|
2056
2070
|
block: t,
|
|
2057
2071
|
viewport: e.viewport,
|
|
2058
|
-
onFetchData: (e) =>
|
|
2072
|
+
onFetchData: (e) => H(t, e),
|
|
2059
2073
|
onUpdate: (e) => h(c).updateBlock(t.id, e)
|
|
2060
2074
|
}, null, 40, [
|
|
2061
2075
|
"block",
|
|
@@ -2078,14 +2092,14 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2078
2092
|
"class",
|
|
2079
2093
|
"onStart",
|
|
2080
2094
|
"onUpdate:modelValue"
|
|
2081
|
-
]),
|
|
2095
|
+
]), R(a) ? (s(), x("div", la, [k("span", null, F(h(o).section.dropHere), 1)])) : S("", !0)], 6))), 128))], 2)]));
|
|
2082
2096
|
}
|
|
2083
|
-
}),
|
|
2097
|
+
}), da = ["width", "height"], fa = [
|
|
2084
2098
|
"d",
|
|
2085
2099
|
"stroke",
|
|
2086
2100
|
"stroke-opacity",
|
|
2087
2101
|
"stroke-width"
|
|
2088
|
-
],
|
|
2102
|
+
], pa = ["d", "fill"], ma = /* @__PURE__ */ d({
|
|
2089
2103
|
__name: "SocialIconSvg",
|
|
2090
2104
|
props: {
|
|
2091
2105
|
platform: {},
|
|
@@ -2094,7 +2108,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2094
2108
|
iconSize: {}
|
|
2095
2109
|
},
|
|
2096
2110
|
setup(e) {
|
|
2097
|
-
let t = e, n = b(() =>
|
|
2111
|
+
let t = e, n = b(() => Xe[t.platform]), r = b(() => $e[t.iconSize]), i = b(() => ze(t.platform, t.iconTone)), a = b(() => xe(t.iconStyle, t.iconTone)), o = b(() => {
|
|
2098
2112
|
let e = {
|
|
2099
2113
|
display: "inline-flex",
|
|
2100
2114
|
alignItems: "center",
|
|
@@ -2132,7 +2146,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2132
2146
|
};
|
|
2133
2147
|
default: return e;
|
|
2134
2148
|
}
|
|
2135
|
-
}), c = b(() =>
|
|
2149
|
+
}), c = b(() => He(t.iconStyle)), l = b(() => Math.floor(r.value * c.value));
|
|
2136
2150
|
function u(e) {
|
|
2137
2151
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2138
2152
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -2153,28 +2167,28 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2153
2167
|
"stroke-opacity": a.value.opacity,
|
|
2154
2168
|
"stroke-width": a.value.width / c.value,
|
|
2155
2169
|
"stroke-linejoin": "round"
|
|
2156
|
-
}, null, 8,
|
|
2170
|
+
}, null, 8, fa)) : S("", !0), k("path", {
|
|
2157
2171
|
d: n.value.path,
|
|
2158
2172
|
fill: d.value
|
|
2159
|
-
}, null, 8,
|
|
2173
|
+
}, null, 8, pa)], 8, da))], 4));
|
|
2160
2174
|
}
|
|
2161
|
-
}),
|
|
2175
|
+
}), ha = { class: "tpl:w-full" }, ga = ["href"], _a = {
|
|
2162
2176
|
key: 1,
|
|
2163
2177
|
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)]"
|
|
2164
|
-
},
|
|
2178
|
+
}, va = /* @__PURE__ */ d({
|
|
2165
2179
|
__name: "SocialIconsBlock",
|
|
2166
2180
|
props: {
|
|
2167
2181
|
block: {},
|
|
2168
2182
|
viewport: {}
|
|
2169
2183
|
},
|
|
2170
2184
|
setup(e) {
|
|
2171
|
-
let t = e, { t: n } =
|
|
2185
|
+
let t = e, { t: n } = Y(), i = b(() => ({
|
|
2172
2186
|
display: "flex",
|
|
2173
2187
|
flexWrap: "wrap",
|
|
2174
2188
|
gap: `${t.block.spacing}px`,
|
|
2175
2189
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2176
2190
|
})), a = b(() => t.block.icons.length > 0);
|
|
2177
|
-
return (t, o) => (s(), x("div",
|
|
2191
|
+
return (t, o) => (s(), x("div", ha, [a.value ? (s(), x("div", {
|
|
2178
2192
|
key: 0,
|
|
2179
2193
|
style: D(i.value)
|
|
2180
2194
|
}, [(s(!0), x(P, null, r(e.block.icons, (t) => (s(), x("a", {
|
|
@@ -2182,7 +2196,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2182
2196
|
href: t.url || "#",
|
|
2183
2197
|
class: "tpl:cursor-default",
|
|
2184
2198
|
onClick: o[0] ||= E(() => {}, ["prevent"])
|
|
2185
|
-
}, [g(
|
|
2199
|
+
}, [g(ma, {
|
|
2186
2200
|
platform: t.platform,
|
|
2187
2201
|
"icon-style": e.block.iconStyle,
|
|
2188
2202
|
"icon-tone": e.block.iconTone,
|
|
@@ -2192,44 +2206,44 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2192
2206
|
"icon-style",
|
|
2193
2207
|
"icon-tone",
|
|
2194
2208
|
"icon-size"
|
|
2195
|
-
])], 8,
|
|
2209
|
+
])], 8, ga))), 128))], 4)) : (s(), x("div", _a, [g(h(hn), { size: 16 }), k("span", null, F(h(n).social.addIcons), 1)]))]));
|
|
2196
2210
|
}
|
|
2197
|
-
}),
|
|
2211
|
+
}), ya = { class: "tpl:w-full" }, ba = {
|
|
2198
2212
|
key: 0,
|
|
2199
2213
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2200
2214
|
style: {
|
|
2201
2215
|
"background-color": "var(--tpl-bg-hover)",
|
|
2202
2216
|
color: "var(--tpl-text-dim)"
|
|
2203
2217
|
}
|
|
2204
|
-
},
|
|
2218
|
+
}, xa = /* @__PURE__ */ d({
|
|
2205
2219
|
__name: "SpacerBlock",
|
|
2206
2220
|
props: {
|
|
2207
2221
|
block: {},
|
|
2208
2222
|
viewport: {}
|
|
2209
2223
|
},
|
|
2210
2224
|
setup(e) {
|
|
2211
|
-
let t = e, n =
|
|
2225
|
+
let t = e, n = G(q, "SpacerBlock"), r = b(() => ({
|
|
2212
2226
|
height: `${t.block.height}px`,
|
|
2213
2227
|
minHeight: `${t.block.height}px`,
|
|
2214
2228
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2215
2229
|
}));
|
|
2216
|
-
return (t, i) => (s(), x("div",
|
|
2230
|
+
return (t, i) => (s(), x("div", ya, [k("div", {
|
|
2217
2231
|
style: D(r.value),
|
|
2218
|
-
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !h(n).state.previewMode }])
|
|
2219
|
-
}, [h(n).state.previewMode ? S("", !0) : (s(), x("span",
|
|
2232
|
+
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !h(n).state.previewMode }])
|
|
2233
|
+
}, [h(n).state.previewMode ? S("", !0) : (s(), x("span", ba, F(e.block.height) + "px ", 1))], 6)]));
|
|
2220
2234
|
}
|
|
2221
|
-
}),
|
|
2235
|
+
}), Sa = { class: "tpl:w-full" }, Ca = { key: 0 }, wa = [
|
|
2222
2236
|
"aria-label",
|
|
2223
2237
|
"data-placeholder",
|
|
2224
2238
|
"onBlur"
|
|
2225
|
-
],
|
|
2239
|
+
], Ta = [
|
|
2226
2240
|
"aria-label",
|
|
2227
2241
|
"data-placeholder",
|
|
2228
2242
|
"onBlur"
|
|
2229
|
-
],
|
|
2243
|
+
], Ea = {
|
|
2230
2244
|
key: 1,
|
|
2231
2245
|
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)]"
|
|
2232
|
-
},
|
|
2246
|
+
}, Da = /*#__PURE__*/ Cn(/* @__PURE__ */ d({
|
|
2233
2247
|
__name: "TableBlock",
|
|
2234
2248
|
props: {
|
|
2235
2249
|
block: {},
|
|
@@ -2243,28 +2257,28 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2243
2257
|
updated(e, t) {
|
|
2244
2258
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2245
2259
|
}
|
|
2246
|
-
}, n = e, { t: i } =
|
|
2260
|
+
}, n = e, { t: i } = Y(), a = G(q, "TableBlock"), o = G(J, "TableBlock"), c = b(() => n.block.rows.length > 0), l = b(() => {
|
|
2247
2261
|
let e = {
|
|
2248
2262
|
width: "100%",
|
|
2249
2263
|
borderCollapse: "collapse",
|
|
2250
2264
|
fontSize: `${n.block.fontSize}px`,
|
|
2251
2265
|
textAlign: n.block.textAlign,
|
|
2252
|
-
fontFamily: n.block.fontFamily
|
|
2266
|
+
fontFamily: n.block.fontFamily ? o.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
2253
2267
|
};
|
|
2254
2268
|
return n.block.color && (e.color = n.block.color), e;
|
|
2255
|
-
}),
|
|
2269
|
+
}), u = b(() => ({
|
|
2256
2270
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
2257
2271
|
padding: `${n.block.cellPadding}px`,
|
|
2258
2272
|
textAlign: n.block.textAlign
|
|
2259
|
-
})),
|
|
2260
|
-
...
|
|
2273
|
+
})), d = b(() => ({
|
|
2274
|
+
...u.value,
|
|
2261
2275
|
fontWeight: "bold",
|
|
2262
2276
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
2263
|
-
})),
|
|
2264
|
-
function
|
|
2277
|
+
})), p = b(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), m = b(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
2278
|
+
function v() {
|
|
2265
2279
|
a.selectBlock(n.block.id);
|
|
2266
2280
|
}
|
|
2267
|
-
function
|
|
2281
|
+
function y(e, t, r) {
|
|
2268
2282
|
let i = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
2269
2283
|
...n,
|
|
2270
2284
|
cells: n.cells.map((e) => e.id === t ? {
|
|
@@ -2274,31 +2288,31 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2274
2288
|
} : n);
|
|
2275
2289
|
a.updateBlock(n.block.id, { rows: o });
|
|
2276
2290
|
}
|
|
2277
|
-
return (e, n) => (s(), x("div",
|
|
2291
|
+
return (e, n) => (s(), x("div", Sa, [c.value ? (s(), x("table", {
|
|
2278
2292
|
key: 0,
|
|
2279
|
-
style: D(
|
|
2293
|
+
style: D(l.value),
|
|
2280
2294
|
class: "tpl-table-editable"
|
|
2281
|
-
}, [
|
|
2295
|
+
}, [p.value ? (s(), x("thead", Ca, [k("tr", null, [(s(!0), x(P, null, r(p.value.cells, (e) => f((s(), x("th", {
|
|
2282
2296
|
key: e.id,
|
|
2283
|
-
style: D(
|
|
2297
|
+
style: D(d.value),
|
|
2284
2298
|
"aria-label": h(i).table.cellPlaceholder,
|
|
2285
2299
|
contenteditable: "true",
|
|
2286
2300
|
"data-placeholder": h(i).table.cellPlaceholder,
|
|
2287
|
-
onBlur: (t) =>
|
|
2301
|
+
onBlur: (t) => y(p.value.id, e.id, t),
|
|
2288
2302
|
onKeydown: n[0] ||= _(E((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2289
|
-
onClick: E(
|
|
2290
|
-
}, null, 44,
|
|
2303
|
+
onClick: E(v, ["stop"])
|
|
2304
|
+
}, null, 44, wa)), [[t, e.content]])), 128))])])) : S("", !0), k("tbody", null, [(s(!0), x(P, null, r(m.value, (e) => (s(), x("tr", { key: e.id }, [(s(!0), x(P, null, r(e.cells, (r) => f((s(), x("td", {
|
|
2291
2305
|
key: r.id,
|
|
2292
|
-
style: D(
|
|
2306
|
+
style: D(u.value),
|
|
2293
2307
|
"aria-label": h(i).table.cellPlaceholder,
|
|
2294
2308
|
contenteditable: "true",
|
|
2295
2309
|
"data-placeholder": h(i).table.cellPlaceholder,
|
|
2296
|
-
onBlur: (t) =>
|
|
2310
|
+
onBlur: (t) => y(e.id, r.id, t),
|
|
2297
2311
|
onKeydown: n[1] ||= _(E((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2298
|
-
onClick: E(
|
|
2299
|
-
}, null, 44,
|
|
2312
|
+
onClick: E(v, ["stop"])
|
|
2313
|
+
}, null, 44, Ta)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), x("div", Ea, [g(h(bn), { size: 16 }), k("span", null, F(h(i).table.empty), 1)]))]));
|
|
2300
2314
|
}
|
|
2301
|
-
}), [["__scopeId", "data-v-
|
|
2315
|
+
}), [["__scopeId", "data-v-6751d456"]]), Oa = /* @__PURE__ */ d({
|
|
2302
2316
|
__name: "VideoPlayButton",
|
|
2303
2317
|
props: { hoverEffect: {
|
|
2304
2318
|
type: Boolean,
|
|
@@ -2316,7 +2330,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2316
2330
|
});
|
|
2317
2331
|
//#endregion
|
|
2318
2332
|
//#region src/utils/videoThumbnail.ts
|
|
2319
|
-
function
|
|
2333
|
+
function ka(e) {
|
|
2320
2334
|
if (!e) return {
|
|
2321
2335
|
platform: "unknown",
|
|
2322
2336
|
videoId: null,
|
|
@@ -2348,25 +2362,25 @@ function va(e) {
|
|
|
2348
2362
|
thumbnailUrl: null
|
|
2349
2363
|
};
|
|
2350
2364
|
}
|
|
2351
|
-
function
|
|
2352
|
-
return t ||
|
|
2365
|
+
function Aa(e, t) {
|
|
2366
|
+
return t || ka(e).thumbnailUrl;
|
|
2353
2367
|
}
|
|
2354
2368
|
//#endregion
|
|
2355
2369
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2356
|
-
var
|
|
2370
|
+
var ja = ["src", "alt"], Ma = {
|
|
2357
2371
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2358
2372
|
style: { opacity: "0.7" }
|
|
2359
|
-
},
|
|
2373
|
+
}, Na = ["href"], Pa = ["src", "alt"], Fa = ["src", "alt"], Ia = {
|
|
2360
2374
|
key: 3,
|
|
2361
|
-
class: "tpl:flex 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)]"
|
|
2362
|
-
},
|
|
2375
|
+
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)]"
|
|
2376
|
+
}, La = /* @__PURE__ */ d({
|
|
2363
2377
|
__name: "VideoBlock",
|
|
2364
2378
|
props: {
|
|
2365
2379
|
block: {},
|
|
2366
2380
|
viewport: {}
|
|
2367
2381
|
},
|
|
2368
2382
|
setup(e) {
|
|
2369
|
-
let t = e, { t: n } =
|
|
2383
|
+
let t = e, { t: n } = Y(), { syntax: r } = Tn(), i = b(() => W(t.block.url, r) || W(t.block.thumbnailUrl, r)), a = Q(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Q(() => i.value ? t.block.placeholderUrl : void 0), c = b(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Aa(t.block.url)), l = b(() => ({ textAlign: t.block.align })), u = b(() => {
|
|
2370
2384
|
let e = t.block.align;
|
|
2371
2385
|
return {
|
|
2372
2386
|
maxWidth: "100%",
|
|
@@ -2385,20 +2399,20 @@ var ba = ["src", "alt"], xa = {
|
|
|
2385
2399
|
class: "tpl:relative tpl:inline-block",
|
|
2386
2400
|
style: D(u.value)
|
|
2387
2401
|
}, [k("img", {
|
|
2388
|
-
class: "tpl:w-full tpl:border-0",
|
|
2402
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2389
2403
|
src: h(o),
|
|
2390
2404
|
alt: e.block.alt,
|
|
2391
2405
|
style: D(d.value)
|
|
2392
|
-
}, null, 12,
|
|
2406
|
+
}, null, 12, ja), g(Oa)], 4)) : i.value ? (s(), x("div", {
|
|
2393
2407
|
key: 1,
|
|
2394
|
-
class: "tpl:relative tpl:!flex 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)]",
|
|
2408
|
+
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)]",
|
|
2395
2409
|
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2396
|
-
}, [g(h(
|
|
2410
|
+
}, [g(h(vn), {
|
|
2397
2411
|
size: 36,
|
|
2398
2412
|
"stroke-width": 1.5,
|
|
2399
2413
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2400
2414
|
style: { opacity: "0.5" }
|
|
2401
|
-
}), k("span",
|
|
2415
|
+
}), k("span", Ma, [g(Ir, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), x(P, { key: 2 }, [e.block.url ? (s(), x("a", {
|
|
2402
2416
|
key: 0,
|
|
2403
2417
|
href: e.block.url,
|
|
2404
2418
|
target: "_blank",
|
|
@@ -2407,67 +2421,67 @@ var ba = ["src", "alt"], xa = {
|
|
|
2407
2421
|
style: D(u.value),
|
|
2408
2422
|
onClick: r[0] ||= E(() => {}, ["prevent"])
|
|
2409
2423
|
}, [k("img", {
|
|
2410
|
-
class: "tpl:w-full tpl:border-0",
|
|
2424
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2411
2425
|
src: c.value,
|
|
2412
2426
|
alt: e.block.alt,
|
|
2413
2427
|
style: D(d.value)
|
|
2414
|
-
}, null, 12,
|
|
2428
|
+
}, null, 12, Pa), g(Oa, { "hover-effect": "" })], 12, Na)) : (s(), x("div", {
|
|
2415
2429
|
key: 1,
|
|
2416
2430
|
class: "tpl:relative tpl:inline-block",
|
|
2417
2431
|
style: D(u.value)
|
|
2418
2432
|
}, [k("img", {
|
|
2419
|
-
class: "tpl:w-full tpl:border-0",
|
|
2433
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2420
2434
|
src: c.value,
|
|
2421
2435
|
alt: e.block.alt,
|
|
2422
2436
|
style: D(d.value)
|
|
2423
|
-
}, null, 12,
|
|
2437
|
+
}, null, 12, Fa), g(Oa)], 4))], 64)) : (s(), x("div", Ia, [g(h(vn), {
|
|
2424
2438
|
size: 40,
|
|
2425
2439
|
"stroke-width": 1.5,
|
|
2426
2440
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2427
2441
|
}), k("span", null, F(h(n).video.addVideo), 1)]))], 4));
|
|
2428
2442
|
}
|
|
2429
|
-
}),
|
|
2430
|
-
section:
|
|
2431
|
-
title:
|
|
2432
|
-
paragraph:
|
|
2433
|
-
image:
|
|
2434
|
-
button:
|
|
2435
|
-
divider:
|
|
2436
|
-
video:
|
|
2437
|
-
social:
|
|
2438
|
-
menu:
|
|
2439
|
-
table:
|
|
2440
|
-
spacer:
|
|
2441
|
-
html:
|
|
2442
|
-
countdown: L(() => import("./CountdownBlock-
|
|
2443
|
+
}), Ra = {
|
|
2444
|
+
section: ua,
|
|
2445
|
+
title: oa,
|
|
2446
|
+
paragraph: Gi,
|
|
2447
|
+
image: Mi,
|
|
2448
|
+
button: Rr,
|
|
2449
|
+
divider: mi,
|
|
2450
|
+
video: La,
|
|
2451
|
+
social: va,
|
|
2452
|
+
menu: Ii,
|
|
2453
|
+
table: Da,
|
|
2454
|
+
spacer: xa,
|
|
2455
|
+
html: bi,
|
|
2456
|
+
countdown: L(() => import("./CountdownBlock-Dasj191h.js"))
|
|
2443
2457
|
};
|
|
2444
|
-
function
|
|
2445
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } =
|
|
2458
|
+
function za(e) {
|
|
2459
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = Y(i), d = b(() => Ce(Ce(Ce(tr(i), br(n.content.value.settings?.locale)), ge(n.content.value.settings) === "rtl" ? {
|
|
2446
2460
|
title: { textAlign: "right" },
|
|
2447
2461
|
table: { textAlign: "right" }
|
|
2448
2462
|
} : {}), r.blockDefaults ?? {}));
|
|
2449
2463
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2450
|
-
let { resolvedTheme: f } =
|
|
2464
|
+
let { resolvedTheme: f } = Un(b(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: h } = Gn({
|
|
2451
2465
|
themeOverrides: p,
|
|
2452
2466
|
resolvedTheme: f,
|
|
2453
2467
|
extraStyles: () => ({
|
|
2454
2468
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2455
2469
|
...e.themeExtraStyles?.()
|
|
2456
2470
|
})
|
|
2457
|
-
}), g =
|
|
2471
|
+
}), g = et({
|
|
2458
2472
|
content: n.content,
|
|
2459
2473
|
setContent: (e, t) => n.setContent(e, t),
|
|
2460
2474
|
...e.historyOptions
|
|
2461
2475
|
});
|
|
2462
|
-
|
|
2463
|
-
let _ =
|
|
2476
|
+
Je(n, g);
|
|
2477
|
+
let _ = Ke({
|
|
2464
2478
|
addBlock: n.addBlock,
|
|
2465
2479
|
removeBlock: n.removeBlock,
|
|
2466
2480
|
updateBlock: n.updateBlock,
|
|
2467
2481
|
selectBlock: n.selectBlock,
|
|
2468
2482
|
findBlockLocation: n.findBlockLocation,
|
|
2469
2483
|
blockDefaults: () => d.value
|
|
2470
|
-
}), v =
|
|
2484
|
+
}), v = We(n), x = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? tt({
|
|
2471
2485
|
content: n.content,
|
|
2472
2486
|
isDirty: () => n.state.isDirty,
|
|
2473
2487
|
...e.autoSaveOptions
|
|
@@ -2475,30 +2489,30 @@ function Oa(e) {
|
|
|
2475
2489
|
x && (S = t(g.isNavigating, (e) => {
|
|
2476
2490
|
e ? x.pause() : x.resume();
|
|
2477
2491
|
}));
|
|
2478
|
-
let C =
|
|
2492
|
+
let C = Hn(n, {
|
|
2479
2493
|
t: s,
|
|
2480
2494
|
format: u
|
|
2481
|
-
}, r.customBlocks ?? []), w =
|
|
2482
|
-
if (w.allowCustomIgnored &&
|
|
2483
|
-
let e =
|
|
2484
|
-
e.length > 0 &&
|
|
2485
|
-
}
|
|
2486
|
-
let T =
|
|
2487
|
-
for (let e of T.unknown)
|
|
2488
|
-
let E =
|
|
2489
|
-
|
|
2495
|
+
}, r.customBlocks ?? []), w = tn(r.colors);
|
|
2496
|
+
if (w.allowCustomIgnored && X.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), w.invalidPresets.length > 0 && X.warn(`config.colors.presets skipped invalid entries: ${w.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), w.allowCustom === !1) {
|
|
2497
|
+
let e = er(w.presets, r.blockDefaults, r.templateDefaults);
|
|
2498
|
+
e.length > 0 && X.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.`);
|
|
2499
|
+
}
|
|
2500
|
+
let T = rn(r.templateSettings);
|
|
2501
|
+
for (let e of T.unknown) X.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${an.join(", ")}) — skipping it.`);
|
|
2502
|
+
let E = Kn();
|
|
2503
|
+
Zn(E, Ra);
|
|
2490
2504
|
let D = /* @__PURE__ */ new Set();
|
|
2491
2505
|
function O(e) {
|
|
2492
2506
|
for (let t of e) {
|
|
2493
|
-
E.registerCustom(t,
|
|
2494
|
-
for (let e of
|
|
2507
|
+
E.registerCustom(t, fi);
|
|
2508
|
+
for (let e of xr(t, w)) D.has(e.id) || (D.add(e.id), X.warn(e.message));
|
|
2495
2509
|
}
|
|
2496
2510
|
}
|
|
2497
2511
|
r.customBlocks?.length && O(r.customBlocks);
|
|
2498
|
-
let k =
|
|
2512
|
+
let k = kn();
|
|
2499
2513
|
if (o() && m(k.dispose), e.containerEl) {
|
|
2500
2514
|
let t = e.containerEl;
|
|
2501
|
-
|
|
2515
|
+
ot(document, "pointerdown", (e) => {
|
|
2502
2516
|
let n = t.value;
|
|
2503
2517
|
n && (e.composedPath?.() ?? []).includes(n) && k.claim();
|
|
2504
2518
|
}, { capture: !0 });
|
|
@@ -2508,7 +2522,7 @@ function Oa(e) {
|
|
|
2508
2522
|
t ? t.save() : x?.flush();
|
|
2509
2523
|
}
|
|
2510
2524
|
function j(t) {
|
|
2511
|
-
k.isActive() &&
|
|
2525
|
+
k.isActive() && Cr(t, {
|
|
2512
2526
|
history: g,
|
|
2513
2527
|
selectBlock: (e) => n.selectBlock(e),
|
|
2514
2528
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -2520,43 +2534,44 @@ function Oa(e) {
|
|
|
2520
2534
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
2521
2535
|
});
|
|
2522
2536
|
}
|
|
2523
|
-
|
|
2524
|
-
let M = l(null);
|
|
2525
|
-
c(
|
|
2526
|
-
let
|
|
2527
|
-
function
|
|
2528
|
-
Array.isArray(e) ?
|
|
2529
|
-
}
|
|
2530
|
-
c(
|
|
2531
|
-
let
|
|
2532
|
-
c(
|
|
2533
|
-
let
|
|
2537
|
+
ot(document, "keydown", j);
|
|
2538
|
+
let M = l(null), N = e.editorRoot ?? document;
|
|
2539
|
+
c(Mt, N), c(ut, M), c(At, i), c(q, n), c(Zt, g), c(Nt, _), c(Lt, v), c(J, a), c(vt, h), c(jt, f), c(Wt, d), c(kt, r.locale), c(Jt, E), c(Gt, r.customBlocks ?? []), c(Qt, r.paletteBlocks), c(Pt, Qn(r.htmlBlockPreview)), c(dt, r.layout), c(ht, r.sectionWrapper), c(It, w), c(Kt, T.fields), c(Ht, qn(n.content, E));
|
|
2540
|
+
let P = Ee(r.mergeTags?.syntax), F = y(r.mergeTags?.tags ?? []);
|
|
2541
|
+
function I(e) {
|
|
2542
|
+
Array.isArray(e) ? F.value = e : X.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
2543
|
+
}
|
|
2544
|
+
c(K, F), c(Ct, P), c(Tt, r.mergeTags?.onRequest ?? null), c(Bt, r.mergeTags?.autocomplete !== !1), c(St, r.mergeTags?.showRawValue !== !1);
|
|
2545
|
+
let L = l(Re(r.mergeTags?.tags ?? []));
|
|
2546
|
+
c(xt, L);
|
|
2547
|
+
let R = jn({
|
|
2534
2548
|
resolvePreview: r.resolvePreview,
|
|
2535
2549
|
getContent: () => {
|
|
2536
2550
|
let e = n.content.value;
|
|
2537
|
-
return r.layout && n.state.previewMode ?
|
|
2551
|
+
return r.layout && n.state.previewMode ? fe(r.layout, e) : e;
|
|
2538
2552
|
},
|
|
2539
2553
|
isActive: () => n.state.previewMode
|
|
2540
2554
|
});
|
|
2541
|
-
c(
|
|
2542
|
-
let
|
|
2543
|
-
c(
|
|
2544
|
-
let
|
|
2545
|
-
c(
|
|
2546
|
-
let
|
|
2555
|
+
c(Ot, R), c(gt, r.resolvePreview);
|
|
2556
|
+
let z = b(() => !(n.state.previewMode && R.isConfigured));
|
|
2557
|
+
c(qt, z);
|
|
2558
|
+
let B = Rn();
|
|
2559
|
+
c(lt, B), c(zt, l(!1)), c(ft, l(!1)), c(Dt, r.logicTags?.tags ?? []), c(Yt, r.logicTags?.pairs ?? []), c(_t, r.logicTags?.onRequest ?? null), c(pt, zn()), c(bt, r.onRequestMedia ?? null), c(Ft, r.canDropMedia ?? null), c(Xt, r.resolveImageUrl ? Mn(r.resolveImageUrl) : null), c(Rt, r.displayConditions?.conditions ?? []), c(Ut, r.displayConditions?.allowCustom ?? !1), c(Vt, e.capabilities ?? {}), c(Et, C);
|
|
2560
|
+
let V = Bn(r.lint) ? null : Vn({
|
|
2547
2561
|
content: n.content,
|
|
2548
2562
|
options: r.lint ?? {},
|
|
2549
2563
|
updateBlock: n.updateBlock,
|
|
2550
2564
|
updateSettings: n.updateSettings,
|
|
2551
2565
|
removeBlock: n.removeBlock
|
|
2552
2566
|
});
|
|
2553
|
-
c(
|
|
2554
|
-
function
|
|
2555
|
-
S?.(),
|
|
2567
|
+
c(yt, V);
|
|
2568
|
+
function H() {
|
|
2569
|
+
S?.(), V?.destroy(), x?.destroy(), g.destroy();
|
|
2556
2570
|
}
|
|
2557
2571
|
return {
|
|
2558
2572
|
t: s,
|
|
2559
2573
|
format: u,
|
|
2574
|
+
editorRoot: N,
|
|
2560
2575
|
history: g,
|
|
2561
2576
|
blockActions: _,
|
|
2562
2577
|
conditionPreview: v,
|
|
@@ -2566,17 +2581,17 @@ function Oa(e) {
|
|
|
2566
2581
|
themeOverrides: p,
|
|
2567
2582
|
registry: E,
|
|
2568
2583
|
keyboardReorder: C,
|
|
2569
|
-
templateLint:
|
|
2584
|
+
templateLint: V,
|
|
2570
2585
|
popoverRoot: M,
|
|
2571
|
-
mergeTagSampleMode:
|
|
2572
|
-
previewResolution:
|
|
2573
|
-
appliesConditionFilter:
|
|
2586
|
+
mergeTagSampleMode: L,
|
|
2587
|
+
previewResolution: R,
|
|
2588
|
+
appliesConditionFilter: z,
|
|
2574
2589
|
registerCustomBlocks: O,
|
|
2575
|
-
setMergeTags:
|
|
2576
|
-
destroy:
|
|
2590
|
+
setMergeTags: I,
|
|
2591
|
+
destroy: H
|
|
2577
2592
|
};
|
|
2578
2593
|
}
|
|
2579
2594
|
//#endregion
|
|
2580
|
-
export {
|
|
2595
|
+
export { _r as A, kr as C, Pr as D, wr as E, fr as F, Fn as I, In as L, hr as M, mr as N, Tr as O, pr as P, jn as R, Rr as S, jr as T, $r as _, va as a, Ur as b, ia as c, Mi as d, bi as f, ti as g, ri as h, xa as i, gr as j, lr as k, Gi as l, fi as m, La as n, ua as o, mi as p, Da as r, oa as s, za as t, Ii as u, Jr as v, Ar as w, Vr as x, Wr as y };
|
|
2581
2596
|
|
|
2582
|
-
//# sourceMappingURL=useEditorCore-
|
|
2597
|
+
//# sourceMappingURL=useEditorCore-Bf2d1DKI.js.map
|