@templatical/editor 0.46.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-DGcH4Lyo.js → AiChatSidebar-BPOv5Ra8.js} +14 -14
- package/dist/{AiFeatureMenu-B4q-0g1S.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-ehMYJP68.js → CloudHeaderExtras-gXsTYoGG.js} +5 -5
- package/dist/{CloudPanels-BwOaAlKz.js → CloudPanels-H_GdbOfZ.js} +9 -9
- package/dist/{CollaboratorBar-qOZFRNPx.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-BeF21SeB.js → CountdownToolbar-DVuucA3v.js} +7 -7
- package/dist/{DesignReferenceSidebar-zH93uB15.js → DesignReferenceSidebar-DxNV4lQp.js} +12 -12
- package/dist/{IssuesPanel-Dltw9haP.js → IssuesPanel-CUpW54P4.js} +8 -8
- package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
- package/dist/{LogicTagInsertButton-CHa-UD76.js → LogicTagInsertButton-DDYKnqmj.js} +13 -13
- package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-D_we0Scr.js} +4 -4
- package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-L95BwWV1.js} +2 -2
- package/dist/{MergeTagInput-B3ntd4dN.js → MergeTagInput-DAL998tx.js} +3 -3
- package/dist/{MergeTagModeToggle-C_06ZL0Q.js → MergeTagModeToggle-CjHO26rb.js} +7 -7
- package/dist/{ParagraphEditor-CxuW3TV0.js → ParagraphEditor-CcEN1N6n.js} +165 -150
- package/dist/{RestoreVersionDialog-B1n37M1Z.js → RestoreVersionDialog-B2OH5rgs.js} +6 -6
- package/dist/{RichTextEditorContent-CP_uULWB.js → RichTextEditorContent-BGeTg-QL.js} +12 -12
- package/dist/{SaveBlockDialog-BSKX_7_v.js → SaveBlockDialog-CCVyU-7y.js} +13 -13
- package/dist/{SavedBlocksBrowserModal-CHKrH1gO.js → SavedBlocksBrowserModal-_WmSeqIh.js} +14 -14
- package/dist/{SavedBlocksPanels-B-xDqBcz.js → SavedBlocksPanels-DVX_ruQ7.js} +2 -2
- package/dist/{SavedBlocksPickBar-D2J-g82g.js → SavedBlocksPickBar-DVJC28hP.js} +5 -5
- package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-U0QFiwdI.js} +16 -16
- package/dist/{TemplateSettings-D07K_Y4m.js → TemplateSettings-CdhTm9JQ.js} +12 -12
- package/dist/{TestEmailModal-BNPw_lID.js → TestEmailModal-BqToA_ls.js} +14 -14
- package/dist/{TestEmailPanel-8klWo8hE.js → TestEmailPanel-Cn4Ptq0j.js} +2 -2
- package/dist/{TitleEditor-CmC9OuhA.js → TitleEditor-CZdqeltH.js} +13 -13
- package/dist/{ToggleSwitch-COeyWGfT.js → ToggleSwitch-BR8Sgzib.js} +2 -2
- package/dist/{Toolbar-CqhRb6EM.js → Toolbar-OGakTBEg.js} +747 -628
- package/dist/{TplModal-BGFawHY9.js → TplModal-CoczSDma.js} +6 -6
- package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-DY5z5FZr.js} +10 -10
- package/dist/{VersionHistoryPanels-DdbGjEOR.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-CVKo6V_v.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-kCK4NZM9.js → AiChatSidebar-B72rI0be.js} +12 -12
- package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js.map → AiChatSidebar-B72rI0be.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js → AiFeatureMenu-BqSG9iEd.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.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-5ONQ1RCa.js → CloudHeaderExtras-DJXLTUHc.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js.map → CloudHeaderExtras-DJXLTUHc.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js → CloudPanels-D1fPLjG8.js} +8 -8
- package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js.map → CloudPanels-D1fPLjG8.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js → CollaboratorBar-MeRQB1eN.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.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-BaXCefQM.js → CountdownToolbar-DPIOtlN0.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js.map → CountdownToolbar-DPIOtlN0.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js → DesignReferenceSidebar-BgTNqgCy.js} +8 -8
- package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js.map → DesignReferenceSidebar-BgTNqgCy.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js → IssuesPanel-BGjLcNpQ.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.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-BYjdrDnQ.js → LogicTagInsertButton-BEsqPhMr.js} +11 -11
- package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.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-Cx67J_vg.js → MergeTagInput-Dy13_OLc.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js.map → MergeTagInput-Dy13_OLc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js → MergeTagModeToggle-B2CPZOeF.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js.map → MergeTagModeToggle-B2CPZOeF.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DndEFXmR.js → ParagraphEditor-BGLIw7kg.js} +91 -76
- package/dist/cdn/chunks/ParagraphEditor-BGLIw7kg.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js → RestoreVersionDialog-BhykE8En.js} +8 -8
- package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js.map → RestoreVersionDialog-BhykE8En.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js → RichTextEditorContent-B-txUvPL.js} +11 -11
- package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js.map → RichTextEditorContent-B-txUvPL.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js → SaveBlockDialog-BHqEp7jw.js} +40 -40
- package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js.map → SaveBlockDialog-BHqEp7jw.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js → SavedBlocksBrowserModal-BhR6AI0f.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js.map → SavedBlocksBrowserModal-BhR6AI0f.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js → SavedBlocksPanels-YwffJtfY.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js.map → SavedBlocksPanels-YwffJtfY.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js → SavedBlocksPickBar-BtpFU7es.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.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-rZiHmq24.js → TemplateSettings-C7b5X34U.js} +13 -13
- package/dist/cdn/chunks/TemplateSettings-C7b5X34U.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js → TestEmailModal-DHJKI5y5.js} +11 -11
- package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js.map → TestEmailModal-DHJKI5y5.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js → TestEmailPanel-lYtzTXpR.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js.map → TestEmailPanel-lYtzTXpR.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js → TitleEditor-5eY01ypW.js} +15 -15
- package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js.map → TitleEditor-5eY01ypW.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js → ToggleSwitch-BN8rMC2m.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js.map → ToggleSwitch-BN8rMC2m.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-C_5HfUQq.js → Toolbar-Ik54UO_-.js} +696 -575
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CYBbPCHL.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-Dq12VsTX.js → VersionHistoryPanels-xjLSpR1e.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.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-h1vaHp2p.js → cloud-Cd7ptfhL.js} +3 -3
- package/dist/cdn/chunks/{cloud-h1vaHp2p.js.map → cloud-Cd7ptfhL.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-bJN9EM1H.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-CrmXF4MW.js → extensions-T-t8MKDb.js} +7 -7
- package/dist/cdn/chunks/{extensions-CrmXF4MW.js.map → extensions-T-t8MKDb.js.map} +1 -1
- 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/cdn/chunks/{preRenderCustomBlocks-CyGB3lZr.js → preRenderCustomBlocks-Co0oi0Jf.js} +4 -2
- 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/{dist-BI_LeQGl.js → cdn/chunks/src-BnJlDuyB.js} +392 -249
- package/dist/cdn/chunks/src-BnJlDuyB.js.map +1 -0
- package/dist/cdn/chunks/{src-BMw3u-iV.js → src-Bu0qBpbf.js} +214 -212
- package/dist/cdn/chunks/src-Bu0qBpbf.js.map +1 -0
- package/dist/cdn/chunks/{src-B0pZeTYO.js → src-CHlVFp7r.js} +308 -268
- 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-DuC7kVti.js → useEditorCore-Bf2d1DKI.js} +543 -532
- 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-B3uV3XHG.js → useLogicTag-3S63go4E.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js.map → useLogicTag-3S63go4E.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js → useMergeTag-BQtxUHq1.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.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-CpmB5KxW.js → useScrollToBlock-uUa601I4.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js.map → useScrollToBlock-uUa601I4.js.map} +1 -1
- package/dist/cdn/chunks/withCurrentFont-DwJd-lKc.js +21 -0
- package/dist/cdn/chunks/{withCurrentFont-isIyuezD.js.map → withCurrentFont-DwJd-lKc.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +614 -610
- 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-DPGjMGfv.js → cloud-DwjaAdwK.js} +2 -2
- package/dist/{copy-D6DNoSq1.js → copy-BsKl4dcy.js} +1 -1
- package/dist/{createCloudRuntime-D0RRgWab.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/{cdn/chunks/src-Bh0MoJ67.js → dist-C8koXLhl.js} +295 -298
- 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-CYigjb1g.js → extensions-DHyKjsNZ.js} +9 -9
- 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 +58 -8
- 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/{preRenderCustomBlocks-DokBGA_M.js → preRenderCustomBlocks-lFX0HHiV.js} +5 -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 +559 -555
- 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-BJAQMvNW.js → useEditorCore-BcT7UI4e.js} +1011 -1006
- package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
- package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
- package/dist/{useLogicTag-B5gjcMzn.js → useLogicTag-D-dI8H6p.js} +3 -3
- package/dist/{useMergeTag-BwsBIDzR.js → useMergeTag-5wMeDBi-.js} +5 -5
- package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
- package/dist/{useScrollToBlock-JRxhT1u_.js → useScrollToBlock-Do3suaqp.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
- package/dist/{withCurrentFont-C9vqrduu.js → withCurrentFont-B4YnsG_2.js} +1 -1
- package/dist/{x-gEC0yMci.js → x-CBFKGLB1.js} +1 -1
- package/package.json +23 -23
- package/dist/BlockPreviewCanvas-DIZ0KgUD.js +0 -133
- package/dist/CountdownBlock-RNx3hIu0.js +0 -91
- package/dist/WrapperBlock-CTkmA887.js +0 -34
- package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js +0 -135
- package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.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-DndEFXmR.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-rZiHmq24.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-C_5HfUQq.js.map +0 -1
- package/dist/cdn/chunks/TplModal-CYBbPCHL.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js +0 -36
- package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js.map +0 -1
- package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-bJN9EM1H.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/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-CyGB3lZr.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-ClJVDZwt.js +0 -1031
- package/dist/cdn/chunks/socialIcons-ClJVDZwt.js.map +0 -1
- package/dist/cdn/chunks/src-B0pZeTYO.js.map +0 -1
- package/dist/cdn/chunks/src-BMw3u-iV.js.map +0 -1
- package/dist/cdn/chunks/src-Bh0MoJ67.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DuC7kVti.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
- package/dist/cdn/chunks/withCurrentFont-isIyuezD.js +0 -21
- package/dist/dist-CFC4pg2o.js +0 -5
- package/dist/dist-j2FavQmU.js +0 -5
- package/dist/en-Bk4iCfjp.js +0 -1
- package/dist/socialIcons-Ct_IoqPQ.js +0 -1107
|
@@ -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 { $ as z, B,
|
|
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 Y } from "./useI18n-
|
|
8
|
+
import { t as Y } from "./useI18n-DUlyyIJJ.js";
|
|
9
9
|
import { t as X } from "./logger-ByvdoAwq.js";
|
|
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 Cn } from "./useAliveFlag-DzyXG-8A.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);
|
|
@@ -55,7 +54,7 @@ function On(e) {
|
|
|
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 On(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 On(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 kn(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 An(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 jn() {
|
|
|
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 Mn() {
|
|
|
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 Pn(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 Fn(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 Fn(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 Ln = {
|
|
|
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 Rn({ 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);
|
|
@@ -443,9 +461,9 @@ function zn() {
|
|
|
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,52 +475,52 @@ function Bn(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",
|
|
@@ -518,15 +536,15 @@ var Un = [
|
|
|
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,23 +554,23 @@ function Wn(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
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({
|
|
@@ -562,7 +580,7 @@ function qn(e, t, n) {
|
|
|
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 Jn(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 pr(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 mr(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 mr(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 hr(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 gr(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,16 +869,16 @@ function Cr(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
883
|
value: ye(i, n)
|
|
846
884
|
}) : a.push({
|
|
@@ -856,27 +894,27 @@ function Cr(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(K,
|
|
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 wr = 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 wr = 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 jr(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 jr(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 Mr() {
|
|
|
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,19 +1057,19 @@ var Nr = [
|
|
|
1019
1057
|
value: "Courier New",
|
|
1020
1058
|
label: "Courier New"
|
|
1021
1059
|
}
|
|
1022
|
-
],
|
|
1023
|
-
function
|
|
1024
|
-
if (e === void 0 || e === !0) return [...
|
|
1060
|
+
], Kr = "Arial, sans-serif";
|
|
1061
|
+
function qr(e) {
|
|
1062
|
+
if (e === void 0 || e === !0) return [...Gr];
|
|
1025
1063
|
if (e === !1) return [];
|
|
1026
1064
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1027
1065
|
for (let i of e) {
|
|
1028
|
-
let e = i.toLowerCase(), a =
|
|
1029
|
-
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: ${
|
|
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(", ")}.`));
|
|
1030
1068
|
}
|
|
1031
1069
|
return t;
|
|
1032
1070
|
}
|
|
1033
|
-
function
|
|
1034
|
-
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(() => {
|
|
1035
1073
|
let e = [...r], n = t.value.map((e) => ({
|
|
1036
1074
|
value: e.name,
|
|
1037
1075
|
label: e.name,
|
|
@@ -1042,20 +1080,21 @@ function Ir(e) {
|
|
|
1042
1080
|
function s(e) {
|
|
1043
1081
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1044
1082
|
}
|
|
1045
|
-
let c = e?.defaultFont ??
|
|
1083
|
+
let c = e?.defaultFont ?? Kr.split(",")[0].trim();
|
|
1046
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.`);
|
|
1047
1085
|
function u() {
|
|
1048
1086
|
if (e?.defaultFont && s(e.defaultFont)) {
|
|
1049
1087
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1050
1088
|
if (t) return t.value;
|
|
1051
1089
|
}
|
|
1052
|
-
return
|
|
1090
|
+
return Kr;
|
|
1053
1091
|
}
|
|
1054
1092
|
let d = b(() => u());
|
|
1055
1093
|
function f(e) {
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1094
|
+
return be(e, {
|
|
1095
|
+
customFonts: t.value,
|
|
1096
|
+
defaultFallback: i.value
|
|
1097
|
+
});
|
|
1059
1098
|
}
|
|
1060
1099
|
let p = [], h = !1;
|
|
1061
1100
|
async function g() {
|
|
@@ -1090,14 +1129,14 @@ function Ir(e) {
|
|
|
1090
1129
|
isLoaded: n,
|
|
1091
1130
|
loadCustomFonts: g,
|
|
1092
1131
|
cleanupFontLinks: _,
|
|
1093
|
-
|
|
1132
|
+
resolveFontFamily: f,
|
|
1094
1133
|
getDefaultFont: u
|
|
1095
1134
|
};
|
|
1096
1135
|
}
|
|
1097
1136
|
//#endregion
|
|
1098
1137
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1099
|
-
function
|
|
1100
|
-
return
|
|
1138
|
+
function Yr(e, t, n) {
|
|
1139
|
+
return Se(e, n) ? {
|
|
1101
1140
|
type: "logicMergeTagNode",
|
|
1102
1141
|
attrs: {
|
|
1103
1142
|
value: e,
|
|
@@ -1113,33 +1152,33 @@ function Lr(e, t, n) {
|
|
|
1113
1152
|
}
|
|
1114
1153
|
//#endregion
|
|
1115
1154
|
//#region src/utils/insertLogicTag.ts
|
|
1116
|
-
function
|
|
1155
|
+
function Xr(e) {
|
|
1117
1156
|
return "before" in e && "after" in e;
|
|
1118
1157
|
}
|
|
1119
|
-
function
|
|
1120
|
-
if (!
|
|
1121
|
-
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();
|
|
1122
1161
|
return;
|
|
1123
1162
|
}
|
|
1124
|
-
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;
|
|
1125
1164
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1126
1165
|
}
|
|
1127
1166
|
//#endregion
|
|
1128
1167
|
//#region src/utils/linkColorExtension.ts
|
|
1129
|
-
function
|
|
1168
|
+
function Qr(e) {
|
|
1130
1169
|
if (!e) return null;
|
|
1131
1170
|
let t = e.trim();
|
|
1132
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;
|
|
1133
1172
|
}
|
|
1134
|
-
function
|
|
1173
|
+
function $r(e) {
|
|
1135
1174
|
return e.extend({ addAttributes() {
|
|
1136
1175
|
return {
|
|
1137
1176
|
...this.parent?.(),
|
|
1138
1177
|
color: {
|
|
1139
1178
|
default: null,
|
|
1140
|
-
parseHTML: (e) =>
|
|
1179
|
+
parseHTML: (e) => Qr($t(e.style.color)),
|
|
1141
1180
|
renderHTML: (e) => {
|
|
1142
|
-
let t =
|
|
1181
|
+
let t = Qr(e.color);
|
|
1143
1182
|
return t ? { style: `color: ${t}` } : {};
|
|
1144
1183
|
}
|
|
1145
1184
|
}
|
|
@@ -1148,9 +1187,9 @@ function Vr(e) {
|
|
|
1148
1187
|
}
|
|
1149
1188
|
//#endregion
|
|
1150
1189
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1151
|
-
function
|
|
1190
|
+
function ei(e, t = Ie.liquid) {
|
|
1152
1191
|
let n = l(!1), r = l(""), i = l(""), a = l(null);
|
|
1153
|
-
|
|
1192
|
+
Ur(a, n);
|
|
1154
1193
|
function o() {
|
|
1155
1194
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1156
1195
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -1159,7 +1198,7 @@ function Hr(e, t = Ne.liquid) {
|
|
|
1159
1198
|
if (r.value) {
|
|
1160
1199
|
let t = f(r.value);
|
|
1161
1200
|
if (t !== null) {
|
|
1162
|
-
let n =
|
|
1201
|
+
let n = Qr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1163
1202
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1164
1203
|
}
|
|
1165
1204
|
}
|
|
@@ -1211,13 +1250,13 @@ function Hr(e, t = Ne.liquid) {
|
|
|
1211
1250
|
}
|
|
1212
1251
|
//#endregion
|
|
1213
1252
|
//#region src/composables/useRichTextEditor.ts
|
|
1214
|
-
function
|
|
1215
|
-
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" });
|
|
1216
1255
|
t(b, (e) => {
|
|
1217
1256
|
let t = v.value?.view.dom;
|
|
1218
1257
|
t && t.setAttribute("dir", e);
|
|
1219
1258
|
});
|
|
1220
|
-
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } =
|
|
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;
|
|
1221
1260
|
async function R() {
|
|
1222
1261
|
F.value = null, P.value = !0;
|
|
1223
1262
|
try {
|
|
@@ -1266,7 +1305,7 @@ function Ur(r) {
|
|
|
1266
1305
|
let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1267
1306
|
n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
|
|
1268
1307
|
}
|
|
1269
|
-
|
|
1308
|
+
ot(document, "mousedown", V), e(() => {
|
|
1270
1309
|
I = !0, B(), M(), v.value?.destroy();
|
|
1271
1310
|
});
|
|
1272
1311
|
async function H() {
|
|
@@ -1276,9 +1315,9 @@ function Ur(r) {
|
|
|
1276
1315
|
value: e.value
|
|
1277
1316
|
}).run() : v.value?.commands.focus());
|
|
1278
1317
|
}
|
|
1279
|
-
async function
|
|
1318
|
+
async function U() {
|
|
1280
1319
|
let e = await m();
|
|
1281
|
-
I || (e && v.value ?
|
|
1320
|
+
I || (e && v.value ? Zr(v.value, e, u) : v.value?.commands.focus());
|
|
1282
1321
|
}
|
|
1283
1322
|
return {
|
|
1284
1323
|
editor: v,
|
|
@@ -1302,14 +1341,14 @@ function Ur(r) {
|
|
|
1302
1341
|
closeLinkDialog: O,
|
|
1303
1342
|
handleLinkKeydown: k,
|
|
1304
1343
|
handleAddMergeTag: H,
|
|
1305
|
-
handleAddLogicTag:
|
|
1344
|
+
handleAddLogicTag: U
|
|
1306
1345
|
};
|
|
1307
1346
|
}
|
|
1308
1347
|
//#endregion
|
|
1309
1348
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1310
|
-
var
|
|
1311
|
-
function
|
|
1312
|
-
let t =
|
|
1349
|
+
var ni = "(max-width: 767px)";
|
|
1350
|
+
function ri(e) {
|
|
1351
|
+
let t = st(ni);
|
|
1313
1352
|
return {
|
|
1314
1353
|
isSmallScreen: t,
|
|
1315
1354
|
showNotice: b(() => (j(e) ?? !0) && t.value)
|
|
@@ -1317,20 +1356,20 @@ function Gr(e) {
|
|
|
1317
1356
|
}
|
|
1318
1357
|
//#endregion
|
|
1319
1358
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1320
|
-
var
|
|
1359
|
+
var ii = { class: "tpl:w-full" }, ai = {
|
|
1321
1360
|
key: 0,
|
|
1322
|
-
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)]"
|
|
1323
|
-
},
|
|
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 = {
|
|
1324
1363
|
key: 1,
|
|
1325
|
-
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)]"
|
|
1326
|
-
},
|
|
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 = {
|
|
1327
1366
|
key: 2,
|
|
1328
1367
|
class: "tpl:relative"
|
|
1329
|
-
},
|
|
1368
|
+
}, ui = ["innerHTML"], di = {
|
|
1330
1369
|
key: 0,
|
|
1331
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]",
|
|
1332
1371
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1333
|
-
},
|
|
1372
|
+
}, fi = /* @__PURE__ */ d({
|
|
1334
1373
|
__name: "CustomBlock",
|
|
1335
1374
|
props: {
|
|
1336
1375
|
block: {},
|
|
@@ -1338,7 +1377,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1338
1377
|
},
|
|
1339
1378
|
emits: ["fetchData"],
|
|
1340
1379
|
setup(e, { emit: r }) {
|
|
1341
|
-
let i = e, a = r, { t: o } = Y(), c = n(
|
|
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({
|
|
1342
1381
|
definition: f,
|
|
1343
1382
|
block: m,
|
|
1344
1383
|
onUpdate: (e, t) => {
|
|
@@ -1347,7 +1386,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1347
1386
|
dataSourceFetched: t
|
|
1348
1387
|
});
|
|
1349
1388
|
}
|
|
1350
|
-
}), T = n(K,
|
|
1389
|
+
}), T = n(K, mt), D = n(wt, null), A = b(() => {
|
|
1351
1390
|
if (!D?.value) return i.block;
|
|
1352
1391
|
let e = {};
|
|
1353
1392
|
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ve(n, T.value) : n;
|
|
@@ -1367,17 +1406,17 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1367
1406
|
}
|
|
1368
1407
|
}
|
|
1369
1408
|
}
|
|
1370
|
-
let M =
|
|
1409
|
+
let M = rt(j, 150);
|
|
1371
1410
|
return w(() => {
|
|
1372
1411
|
j();
|
|
1373
1412
|
}), t(() => i.block.fieldValues, () => {
|
|
1374
1413
|
M();
|
|
1375
1414
|
}, { deep: !0 }), t(() => D?.value, () => {
|
|
1376
1415
|
M();
|
|
1377
|
-
}), (e, t) => (s(), x("div",
|
|
1416
|
+
}), (e, t) => (s(), x("div", ii, [p.value ? d.value ? (s(), x("div", si, [g(h(fn), {
|
|
1378
1417
|
size: 24,
|
|
1379
1418
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1380
|
-
}), 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, {
|
|
1381
1420
|
key: 1,
|
|
1382
1421
|
class: "tpl:w-48"
|
|
1383
1422
|
})) : (s(), x("button", {
|
|
@@ -1385,16 +1424,16 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1385
1424
|
type: "button",
|
|
1386
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)]",
|
|
1387
1426
|
onClick: t[0] ||= E((...e) => h(v) && h(v)(...e), ["stop"])
|
|
1388
|
-
}, [f.value?.icon ? (s(), O(
|
|
1427
|
+
}, [f.value?.icon ? (s(), O(Vr, {
|
|
1389
1428
|
key: 0,
|
|
1390
1429
|
icon: f.value.icon,
|
|
1391
1430
|
size: 16
|
|
1392
|
-
}, 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), {
|
|
1393
1432
|
size: 24,
|
|
1394
1433
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1395
|
-
}), k("span",
|
|
1434
|
+
}), k("span", oi, F(h(o).customBlocks.definitionNotFound), 1)]))]));
|
|
1396
1435
|
}
|
|
1397
|
-
}),
|
|
1436
|
+
}), pi = { class: "tpl:w-full" }, mi = /* @__PURE__ */ d({
|
|
1398
1437
|
__name: "DividerBlock",
|
|
1399
1438
|
props: {
|
|
1400
1439
|
block: {},
|
|
@@ -1406,28 +1445,28 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1406
1445
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1407
1446
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1408
1447
|
}));
|
|
1409
|
-
return (e, t) => (s(), x("div",
|
|
1448
|
+
return (e, t) => (s(), x("div", pi, [k("hr", {
|
|
1410
1449
|
class: "tpl:m-0 tpl:border-none",
|
|
1411
1450
|
style: D(n.value)
|
|
1412
1451
|
}, null, 4)]));
|
|
1413
1452
|
}
|
|
1414
|
-
}),
|
|
1453
|
+
}), hi = { class: "tpl:w-full" }, gi = ["srcdoc", "title"], _i = {
|
|
1415
1454
|
key: 1,
|
|
1416
|
-
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)]"
|
|
1417
|
-
},
|
|
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 = {
|
|
1418
1457
|
key: 0,
|
|
1419
1458
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1420
|
-
},
|
|
1459
|
+
}, yi = {
|
|
1421
1460
|
key: 1,
|
|
1422
1461
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1423
|
-
},
|
|
1462
|
+
}, bi = /* @__PURE__ */ d({
|
|
1424
1463
|
__name: "HtmlBlock",
|
|
1425
1464
|
props: {
|
|
1426
1465
|
block: {},
|
|
1427
1466
|
viewport: {}
|
|
1428
1467
|
},
|
|
1429
1468
|
setup(r) {
|
|
1430
|
-
let i = r, { t: a } = Y(), o = n(
|
|
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;
|
|
1431
1470
|
function y() {
|
|
1432
1471
|
let e = m.value?.contentDocument;
|
|
1433
1472
|
e && (_.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1441,7 +1480,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1441
1480
|
e || (v?.disconnect(), v = null);
|
|
1442
1481
|
}), e(() => {
|
|
1443
1482
|
v?.disconnect(), v = null;
|
|
1444
|
-
}), (e, t) => (s(), x("div",
|
|
1483
|
+
}), (e, t) => (s(), x("div", hi, [u.value ? (s(), x("iframe", {
|
|
1445
1484
|
key: 0,
|
|
1446
1485
|
ref_key: "iframeRef",
|
|
1447
1486
|
ref: m,
|
|
@@ -1451,22 +1490,18 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1451
1490
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1452
1491
|
style: D({ height: `${_.value}px` }),
|
|
1453
1492
|
onLoad: S
|
|
1454
|
-
}, null, 44,
|
|
1493
|
+
}, null, 44, gi)) : (s(), x("div", _i, [g(h(gn), {
|
|
1455
1494
|
size: 24,
|
|
1456
1495
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1457
|
-
}), 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))]))]));
|
|
1458
1497
|
}
|
|
1459
|
-
}),
|
|
1460
|
-
key: 0,
|
|
1461
|
-
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)]",
|
|
1462
|
-
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1463
|
-
}, di = ["href"], fi = ["src", "alt"], pi = ["src", "alt"], mi = {
|
|
1498
|
+
}), xi = ["data-drop-enabled"], Si = ["href"], Ci = ["src", "alt"], wi = ["src", "alt"], Ti = {
|
|
1464
1499
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1465
1500
|
style: { opacity: "0.7" }
|
|
1466
|
-
},
|
|
1501
|
+
}, Ei = ["href"], Di = ["src", "alt"], Oi = ["src", "alt"], ki = {
|
|
1467
1502
|
key: 4,
|
|
1468
|
-
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)]"
|
|
1469
|
-
},
|
|
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({
|
|
1470
1505
|
__name: "ImageBlock",
|
|
1471
1506
|
props: {
|
|
1472
1507
|
block: {},
|
|
@@ -1474,68 +1509,43 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1474
1509
|
},
|
|
1475
1510
|
emits: ["update"],
|
|
1476
1511
|
setup(e, { emit: t }) {
|
|
1477
|
-
let
|
|
1478
|
-
|
|
1479
|
-
let
|
|
1480
|
-
|
|
1481
|
-
let t = { src: e.url };
|
|
1482
|
-
e.alt && (t.alt = e.alt), i("update", t);
|
|
1483
|
-
}
|
|
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);
|
|
1484
1516
|
}
|
|
1485
|
-
let
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
accept: ["images"],
|
|
1492
|
-
files: e
|
|
1493
|
-
});
|
|
1494
|
-
if (!f.alive) return;
|
|
1495
|
-
if (t) {
|
|
1496
|
-
let e = { src: t.url };
|
|
1497
|
-
t.alt && (e.alt = t.alt), i("update", e);
|
|
1498
|
-
}
|
|
1499
|
-
} finally {
|
|
1500
|
-
f.alive && (_.value = !1);
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
let { isOver: C } = Ge({
|
|
1505
|
-
target: m,
|
|
1506
|
-
enabled: v,
|
|
1507
|
-
onFiles: y
|
|
1508
|
-
}), w = b(() => ({ textAlign: r.block.align })), T = b(() => {
|
|
1509
|
-
let e = r.block.border, t = ["left", "right"].map((t) => pe(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);
|
|
1510
1523
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1511
|
-
}),
|
|
1512
|
-
let e =
|
|
1524
|
+
}), C = b(() => {
|
|
1525
|
+
let e = n.block.align;
|
|
1513
1526
|
return {
|
|
1514
1527
|
maxWidth: "100%",
|
|
1515
|
-
width:
|
|
1516
|
-
height:
|
|
1517
|
-
borderRadius:
|
|
1518
|
-
...
|
|
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),
|
|
1519
1532
|
display: "block",
|
|
1520
1533
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1521
1534
|
marginRight: e === "center" ? "auto" : void 0
|
|
1522
1535
|
};
|
|
1523
|
-
}),
|
|
1536
|
+
}), w = Q(() => o.value ? void 0 : n.block.src), T = Q(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1524
1537
|
return (t, n) => (s(), x("div", {
|
|
1525
1538
|
ref_key: "dropZoneRef",
|
|
1526
|
-
ref:
|
|
1539
|
+
ref: u,
|
|
1527
1540
|
"data-testid": "image-drop-zone",
|
|
1528
|
-
"data-drop-enabled":
|
|
1541
|
+
"data-drop-enabled": h(f),
|
|
1529
1542
|
class: "tpl:relative tpl:w-full",
|
|
1530
|
-
style: D(
|
|
1531
|
-
}, [
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
"
|
|
1535
|
-
}
|
|
1536
|
-
size: 20,
|
|
1537
|
-
"stroke-width": 1.5
|
|
1538
|
-
}), 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", {
|
|
1539
1549
|
key: 0,
|
|
1540
1550
|
href: e.block.linkUrl,
|
|
1541
1551
|
target: "_blank",
|
|
@@ -1544,25 +1554,25 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1544
1554
|
}, [k("img", {
|
|
1545
1555
|
class: "tpl:border-0",
|
|
1546
1556
|
loading: "lazy",
|
|
1547
|
-
src: h(
|
|
1548
|
-
alt: e.block.alt || h(
|
|
1549
|
-
style: D(
|
|
1550
|
-
}, 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", {
|
|
1551
1561
|
key: 1,
|
|
1552
1562
|
class: "tpl:border-0",
|
|
1553
|
-
src: h(
|
|
1563
|
+
src: h(T),
|
|
1554
1564
|
alt: e.block.alt,
|
|
1555
|
-
style: D(
|
|
1556
|
-
}, null, 12,
|
|
1565
|
+
style: D(C.value)
|
|
1566
|
+
}, null, 12, wi))], 64)) : e.block.src && o.value ? (s(), x("div", {
|
|
1557
1567
|
key: 2,
|
|
1558
|
-
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)]",
|
|
1559
|
-
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" },
|
|
1560
|
-
}, [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), {
|
|
1561
1571
|
size: 32,
|
|
1562
1572
|
"stroke-width": 1.5,
|
|
1563
1573
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1564
1574
|
style: { opacity: "0.5" }
|
|
1565
|
-
}), 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", {
|
|
1566
1576
|
key: 0,
|
|
1567
1577
|
href: e.block.linkUrl,
|
|
1568
1578
|
target: "_blank",
|
|
@@ -1571,68 +1581,68 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1571
1581
|
}, [k("img", {
|
|
1572
1582
|
class: "tpl:border-0",
|
|
1573
1583
|
loading: "lazy",
|
|
1574
|
-
src: h(
|
|
1575
|
-
alt: e.block.alt || h(
|
|
1576
|
-
style: D(
|
|
1577
|
-
}, 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", {
|
|
1578
1588
|
key: 1,
|
|
1579
1589
|
class: "tpl:border-0",
|
|
1580
|
-
src: h(
|
|
1590
|
+
src: h(w),
|
|
1581
1591
|
alt: e.block.alt,
|
|
1582
|
-
style: D(
|
|
1583
|
-
}, null, 12,
|
|
1592
|
+
style: D(C.value)
|
|
1593
|
+
}, null, 12, Oi))], 64)) : (s(), x("div", ki, [h(d) ? (s(), x("button", {
|
|
1584
1594
|
key: 0,
|
|
1585
|
-
"aria-label": h(
|
|
1595
|
+
"aria-label": h(i).image.browseMedia,
|
|
1586
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)]",
|
|
1587
|
-
onClick: E(
|
|
1588
|
-
}, [g(h(
|
|
1597
|
+
onClick: n[2] ||= E((...e) => h(_) && h(_)(...e), ["stop"])
|
|
1598
|
+
}, [g(h(yn), {
|
|
1589
1599
|
size: 14,
|
|
1590
1600
|
"stroke-width": 1.5
|
|
1591
|
-
}), 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));
|
|
1592
1602
|
}
|
|
1593
|
-
}),
|
|
1603
|
+
}), Ni = { class: "tpl:w-full" }, Pi = ["href"], Fi = {
|
|
1594
1604
|
key: 1,
|
|
1595
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)]"
|
|
1596
|
-
},
|
|
1606
|
+
}, Ii = /* @__PURE__ */ d({
|
|
1597
1607
|
__name: "MenuBlock",
|
|
1598
1608
|
props: {
|
|
1599
1609
|
block: {},
|
|
1600
1610
|
viewport: {}
|
|
1601
1611
|
},
|
|
1602
1612
|
setup(e) {
|
|
1603
|
-
let t = e, { t: n } = Y(), i = b(() => ({
|
|
1613
|
+
let t = e, { t: n } = Y(), i = G(J, "MenuBlock"), a = b(() => ({
|
|
1604
1614
|
display: "flex",
|
|
1605
1615
|
flexWrap: "wrap",
|
|
1606
1616
|
gap: `0 ${t.block.spacing}px`,
|
|
1607
1617
|
justifyContent: t.block.textAlign === "left" ? "flex-start" : t.block.textAlign === "right" ? "flex-end" : "center",
|
|
1608
1618
|
fontSize: `${t.block.fontSize}px`,
|
|
1609
|
-
fontFamily: t.block.fontFamily
|
|
1619
|
+
fontFamily: t.block.fontFamily ? i.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1610
1620
|
alignItems: "center"
|
|
1611
|
-
})),
|
|
1612
|
-
function
|
|
1621
|
+
})), o = b(() => t.block.items.length > 0);
|
|
1622
|
+
function c(e) {
|
|
1613
1623
|
return e || t.block.linkColor || t.block.color;
|
|
1614
1624
|
}
|
|
1615
|
-
return (t,
|
|
1625
|
+
return (t, i) => (s(), x("div", Ni, [o.value ? (s(), x("div", {
|
|
1616
1626
|
key: 0,
|
|
1617
|
-
style: D(
|
|
1627
|
+
style: D(a.value)
|
|
1618
1628
|
}, [(s(!0), x(P, null, r(e.block.items, (t, n) => (s(), x(P, { key: t.id }, [k("a", {
|
|
1619
1629
|
href: t.url || "#",
|
|
1620
1630
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1621
1631
|
style: D({
|
|
1622
|
-
color:
|
|
1632
|
+
color: c(t.color),
|
|
1623
1633
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1624
1634
|
textDecoration: t.underline ? "underline" : "none"
|
|
1625
1635
|
}),
|
|
1626
|
-
onClick:
|
|
1627
|
-
}, [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", {
|
|
1628
1638
|
key: 0,
|
|
1629
1639
|
style: D({
|
|
1630
1640
|
color: e.block.separatorColor,
|
|
1631
1641
|
padding: `0 ${e.block.spacing}px`
|
|
1632
1642
|
})
|
|
1633
|
-
}, 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)]))]));
|
|
1634
1644
|
}
|
|
1635
|
-
}),
|
|
1645
|
+
}), Li = /* @__PURE__ */ new Set([
|
|
1636
1646
|
"http",
|
|
1637
1647
|
"https",
|
|
1638
1648
|
"mailto",
|
|
@@ -1642,7 +1652,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1642
1652
|
"sms",
|
|
1643
1653
|
"xmpp",
|
|
1644
1654
|
"cid"
|
|
1645
|
-
]),
|
|
1655
|
+
]), Ri = /* @__PURE__ */ new Set([
|
|
1646
1656
|
"SCRIPT",
|
|
1647
1657
|
"STYLE",
|
|
1648
1658
|
"IFRAME",
|
|
@@ -1652,7 +1662,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1652
1662
|
"META",
|
|
1653
1663
|
"BASE",
|
|
1654
1664
|
"FORM"
|
|
1655
|
-
]),
|
|
1665
|
+
]), zi = /* @__PURE__ */ new Set([
|
|
1656
1666
|
"href",
|
|
1657
1667
|
"xlink:href",
|
|
1658
1668
|
"formaction",
|
|
@@ -1661,16 +1671,16 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1661
1671
|
"background",
|
|
1662
1672
|
"poster"
|
|
1663
1673
|
]);
|
|
1664
|
-
function
|
|
1674
|
+
function Bi(e, t) {
|
|
1665
1675
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1666
1676
|
if (!n || n.startsWith("#")) return !0;
|
|
1667
1677
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1668
1678
|
if (!r) return !0;
|
|
1669
1679
|
let i = r[1].toLowerCase();
|
|
1670
|
-
return
|
|
1680
|
+
return Li.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1671
1681
|
}
|
|
1672
|
-
function
|
|
1673
|
-
if (
|
|
1682
|
+
function Vi(e) {
|
|
1683
|
+
if (Ri.has(e.tagName)) {
|
|
1674
1684
|
e.remove();
|
|
1675
1685
|
return;
|
|
1676
1686
|
}
|
|
@@ -1678,21 +1688,21 @@ function Ai(e) {
|
|
|
1678
1688
|
for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
|
|
1679
1689
|
for (let n of t) {
|
|
1680
1690
|
let t = n.toLowerCase();
|
|
1681
|
-
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);
|
|
1682
1692
|
}
|
|
1683
1693
|
let n = Array.from(e.children);
|
|
1684
|
-
for (let e of n)
|
|
1694
|
+
for (let e of n) Vi(e);
|
|
1685
1695
|
}
|
|
1686
|
-
function
|
|
1696
|
+
function Hi(e) {
|
|
1687
1697
|
if (typeof DOMParser > "u") return e;
|
|
1688
1698
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1689
|
-
for (let e of n)
|
|
1699
|
+
for (let e of n) Vi(e);
|
|
1690
1700
|
return t.innerHTML;
|
|
1691
1701
|
}
|
|
1692
1702
|
//#endregion
|
|
1693
1703
|
//#region src/composables/useEditableTextBlock.ts
|
|
1694
|
-
function
|
|
1695
|
-
let t = n(K,
|
|
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({
|
|
1696
1706
|
top: u.value - 8,
|
|
1697
1707
|
left: d.value
|
|
1698
1708
|
}));
|
|
@@ -1713,14 +1723,14 @@ function Mi(e) {
|
|
|
1713
1723
|
}
|
|
1714
1724
|
//#endregion
|
|
1715
1725
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1716
|
-
var
|
|
1726
|
+
var Wi = ["innerHTML"], Gi = /* @__PURE__ */ d({
|
|
1717
1727
|
__name: "ParagraphBlock",
|
|
1718
1728
|
props: {
|
|
1719
1729
|
block: {},
|
|
1720
1730
|
viewport: {}
|
|
1721
1731
|
},
|
|
1722
1732
|
setup(e) {
|
|
1723
|
-
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);
|
|
1724
1734
|
return (t, u) => (s(), x("div", {
|
|
1725
1735
|
ref_key: "blockRef",
|
|
1726
1736
|
ref: i,
|
|
@@ -1739,26 +1749,26 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1739
1749
|
key: 1,
|
|
1740
1750
|
class: "tpl-text-content tpl:outline-none",
|
|
1741
1751
|
innerHTML: h(o)
|
|
1742
|
-
}, null, 8,
|
|
1752
|
+
}, null, 8, Wi))], 544));
|
|
1743
1753
|
}
|
|
1744
|
-
}),
|
|
1754
|
+
}), Ki = [
|
|
1745
1755
|
"data-block-id",
|
|
1746
1756
|
"data-block-type",
|
|
1747
1757
|
"data-tpl-picked"
|
|
1748
|
-
],
|
|
1758
|
+
], qi = ["aria-label"], Ji = [
|
|
1749
1759
|
"aria-label",
|
|
1750
1760
|
"aria-pressed",
|
|
1751
1761
|
"title"
|
|
1752
|
-
],
|
|
1762
|
+
], Yi = ["aria-label", "title"], Xi = ["aria-label", "title"], Zi = ["aria-label", "title"], Qi = {
|
|
1753
1763
|
key: 1,
|
|
1754
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"
|
|
1755
|
-
},
|
|
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 = {
|
|
1756
1766
|
key: 2,
|
|
1757
1767
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1758
|
-
},
|
|
1768
|
+
}, ta = ["aria-label", "title"], na = {
|
|
1759
1769
|
key: 3,
|
|
1760
1770
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1761
|
-
},
|
|
1771
|
+
}, ra = ["aria-label"], ia = /*#__PURE__*/ Cn(/* @__PURE__ */ d({
|
|
1762
1772
|
__name: "BlockWrapper",
|
|
1763
1773
|
props: {
|
|
1764
1774
|
block: {},
|
|
@@ -1770,7 +1780,7 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1770
1780
|
},
|
|
1771
1781
|
emits: ["select"],
|
|
1772
1782
|
setup(e, { emit: t }) {
|
|
1773
|
-
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);
|
|
1774
1784
|
async function _() {
|
|
1775
1785
|
await T(), f.value?.focus();
|
|
1776
1786
|
}
|
|
@@ -1780,20 +1790,20 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1780
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 ? {
|
|
1781
1791
|
desktop: c.viewport.desktop,
|
|
1782
1792
|
mobile: c.viewport.mobile
|
|
1783
|
-
}[i.viewport] ?? i.viewport : ""), A = b(() => !!i.block.displayCondition), j = n(
|
|
1784
|
-
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) {
|
|
1785
1795
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
|
|
1786
1796
|
}
|
|
1787
|
-
function
|
|
1797
|
+
function ne() {
|
|
1788
1798
|
j?.deleteBlock(i.block.id);
|
|
1789
1799
|
}
|
|
1790
|
-
function
|
|
1800
|
+
function re() {
|
|
1791
1801
|
j?.duplicateBlock(i.block);
|
|
1792
1802
|
}
|
|
1793
|
-
function
|
|
1803
|
+
function ie() {
|
|
1794
1804
|
N.savedBlocks?.startPicking(i.block.id);
|
|
1795
1805
|
}
|
|
1796
|
-
function
|
|
1806
|
+
function ae() {
|
|
1797
1807
|
M?.toggleBlock(i.block.id);
|
|
1798
1808
|
}
|
|
1799
1809
|
return (t, n) => w.value ? S("", !0) : (s(), x("div", {
|
|
@@ -1807,7 +1817,7 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1807
1817
|
"data-block-id": e.block.id,
|
|
1808
1818
|
"data-block-type": e.block.type,
|
|
1809
1819
|
"data-tpl-picked": e.picked || void 0,
|
|
1810
|
-
onClick:
|
|
1820
|
+
onClick: te
|
|
1811
1821
|
}, [
|
|
1812
1822
|
g(h(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1813
1823
|
z.value ? (s(), x("div", {
|
|
@@ -1825,133 +1835,134 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1825
1835
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1826
1836
|
title: h(c).blockActions.drag,
|
|
1827
1837
|
onKeydown: y
|
|
1828
|
-
}, [g(h(
|
|
1838
|
+
}, [g(h(mn), {
|
|
1829
1839
|
size: 14,
|
|
1830
1840
|
"stroke-width": 1.5
|
|
1831
|
-
})], 40,
|
|
1841
|
+
})], 40, Ji),
|
|
1832
1842
|
k("button", {
|
|
1833
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",
|
|
1834
1844
|
"aria-label": h(c).blockActions.duplicate,
|
|
1835
1845
|
title: h(c).blockActions.duplicate,
|
|
1836
|
-
onClick: E(
|
|
1837
|
-
}, [g(h(
|
|
1846
|
+
onClick: E(re, ["stop"])
|
|
1847
|
+
}, [g(h(sn), {
|
|
1838
1848
|
size: 14,
|
|
1839
1849
|
"stroke-width": 1.5
|
|
1840
|
-
})], 8,
|
|
1850
|
+
})], 8, Yi),
|
|
1841
1851
|
I.value ? (s(), x("button", {
|
|
1842
1852
|
key: 0,
|
|
1843
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",
|
|
1844
1854
|
"aria-label": h(c).blockActions.saveAsBlock,
|
|
1845
1855
|
title: h(c).blockActions.saveAsBlock,
|
|
1846
|
-
onClick: E(
|
|
1847
|
-
}, [g(h(
|
|
1856
|
+
onClick: E(ie, ["stop"])
|
|
1857
|
+
}, [g(h(un), {
|
|
1848
1858
|
size: 14,
|
|
1849
1859
|
"stroke-width": 1.5
|
|
1850
|
-
})], 8,
|
|
1860
|
+
})], 8, Xi)) : S("", !0),
|
|
1851
1861
|
k("button", {
|
|
1852
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",
|
|
1853
1863
|
"aria-label": h(c).blockActions.delete,
|
|
1854
1864
|
title: h(c).blockActions.delete,
|
|
1855
|
-
onClick: E(
|
|
1856
|
-
}, [g(h(
|
|
1865
|
+
onClick: E(ne, ["stop"])
|
|
1866
|
+
}, [g(h(pn), {
|
|
1857
1867
|
size: 14,
|
|
1858
1868
|
"stroke-width": 1.5
|
|
1859
|
-
})], 8,
|
|
1860
|
-
], 8,
|
|
1861
|
-
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), {
|
|
1862
1872
|
size: 12,
|
|
1863
1873
|
"stroke-width": 1.5
|
|
1864
1874
|
}), R(" " + F(h(u)(h(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : S("", !0),
|
|
1865
|
-
A.value && !C.value ? (s(), x("div",
|
|
1875
|
+
A.value && !C.value ? (s(), x("div", ea, [k("button", {
|
|
1866
1876
|
"data-testid": "condition-toggle",
|
|
1867
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)]",
|
|
1868
1878
|
"aria-label": h(c).blockActions.conditionToggle,
|
|
1869
1879
|
title: e.block.displayCondition?.label,
|
|
1870
|
-
onClick: E(
|
|
1871
|
-
}, [g(h(
|
|
1880
|
+
onClick: E(ae, ["stop"])
|
|
1881
|
+
}, [g(h(xn), {
|
|
1872
1882
|
size: 12,
|
|
1873
1883
|
"stroke-width": 2
|
|
1874
|
-
})], 8,
|
|
1875
|
-
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", {
|
|
1876
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)]",
|
|
1877
1887
|
"aria-label": h(u)(h(c).blockActions.comments, { count: String(B.value) }),
|
|
1878
1888
|
onClick: n[0] ||= E((t) => h(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
1879
|
-
}, [g(h(
|
|
1889
|
+
}, [g(h(_n), {
|
|
1880
1890
|
size: 12,
|
|
1881
1891
|
"stroke-width": 2.5
|
|
1882
|
-
}), R(" " + F(B.value), 1)], 8,
|
|
1883
|
-
|
|
1892
|
+
}), R(" " + F(B.value), 1)], 8, ra)])) : S("", !0),
|
|
1893
|
+
ee.value ? (s(), x("div", {
|
|
1884
1894
|
key: 4,
|
|
1885
|
-
class: "tpl-section-wrapper",
|
|
1886
|
-
style: D(
|
|
1895
|
+
class: v(["tpl-section-wrapper tpl-email-surface", h(kr)(ee.value)]),
|
|
1896
|
+
style: D(ee.value)
|
|
1887
1897
|
}, [k("div", {
|
|
1888
|
-
class: "tpl-block-content",
|
|
1889
|
-
style: D(
|
|
1890
|
-
}, [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", {
|
|
1891
1901
|
key: 5,
|
|
1892
|
-
class: "tpl-block-content",
|
|
1893
|
-
style: D(
|
|
1894
|
-
}, [a(t.$slots, "default", {}, void 0, !0)],
|
|
1895
|
-
], 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));
|
|
1896
1906
|
}
|
|
1897
|
-
}), [["__scopeId", "data-v-
|
|
1907
|
+
}), [["__scopeId", "data-v-d4623cf8"]]);
|
|
1898
1908
|
//#endregion
|
|
1899
1909
|
//#region src/utils/unwrapParagraph.ts
|
|
1900
|
-
function
|
|
1910
|
+
function aa(e) {
|
|
1901
1911
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1902
1912
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1903
1913
|
}
|
|
1904
1914
|
//#endregion
|
|
1905
1915
|
//#region src/components/blocks/TitleBlock.vue
|
|
1906
|
-
var
|
|
1916
|
+
var oa = /* @__PURE__ */ d({
|
|
1907
1917
|
__name: "TitleBlock",
|
|
1908
1918
|
props: {
|
|
1909
1919
|
block: {},
|
|
1910
1920
|
viewport: {}
|
|
1911
1921
|
},
|
|
1912
1922
|
setup(e) {
|
|
1913
|
-
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(() => {
|
|
1914
1924
|
let e = {
|
|
1915
|
-
fontSize: `${
|
|
1925
|
+
fontSize: `${ce[t.block.level]}px`,
|
|
1926
|
+
lineHeight: String(B),
|
|
1916
1927
|
textAlign: t.block.textAlign
|
|
1917
1928
|
};
|
|
1918
|
-
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1919
|
-
}),
|
|
1920
|
-
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", {
|
|
1921
1932
|
ref_key: "blockRef",
|
|
1922
|
-
ref:
|
|
1933
|
+
ref: a,
|
|
1923
1934
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1924
|
-
style: D(
|
|
1925
|
-
onDblclick:
|
|
1926
|
-
}, [h(
|
|
1935
|
+
style: D(f.value),
|
|
1936
|
+
onDblclick: r[0] ||= (...e) => h(l) && h(l)(...e)
|
|
1937
|
+
}, [h(i) ? (s(), O(h(n), {
|
|
1927
1938
|
key: 0,
|
|
1928
1939
|
block: e.block,
|
|
1929
|
-
"toolbar-position": h(
|
|
1930
|
-
onDone: h(
|
|
1940
|
+
"toolbar-position": h(o),
|
|
1941
|
+
onDone: h(d)
|
|
1931
1942
|
}, null, 8, [
|
|
1932
1943
|
"block",
|
|
1933
1944
|
"toolbar-position",
|
|
1934
1945
|
"onDone"
|
|
1935
|
-
])) : (s(), O(u(
|
|
1946
|
+
])) : (s(), O(u(p.value), {
|
|
1936
1947
|
key: 1,
|
|
1937
|
-
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",
|
|
1938
1949
|
style: { color: "inherit" },
|
|
1939
|
-
innerHTML:
|
|
1950
|
+
innerHTML: m.value
|
|
1940
1951
|
}, null, 8, ["innerHTML"]))], 36));
|
|
1941
1952
|
}
|
|
1942
1953
|
});
|
|
1943
1954
|
//#endregion
|
|
1944
1955
|
//#region src/utils/sectionColumnDrop.ts
|
|
1945
|
-
function
|
|
1956
|
+
function sa(e) {
|
|
1946
1957
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
1947
1958
|
}
|
|
1948
1959
|
//#endregion
|
|
1949
1960
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1950
|
-
var
|
|
1961
|
+
var ca = { class: "tpl:w-full" }, la = {
|
|
1951
1962
|
key: 0,
|
|
1952
1963
|
"data-testid": "section-drop-hint",
|
|
1953
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)]"
|
|
1954
|
-
},
|
|
1965
|
+
}, ua = /* @__PURE__ */ d({
|
|
1955
1966
|
__name: "SectionBlock",
|
|
1956
1967
|
props: {
|
|
1957
1968
|
block: {},
|
|
@@ -1959,13 +1970,13 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
1959
1970
|
},
|
|
1960
1971
|
setup(e) {
|
|
1961
1972
|
let t = {
|
|
1962
|
-
title:
|
|
1963
|
-
paragraph:
|
|
1964
|
-
image:
|
|
1965
|
-
button:
|
|
1966
|
-
divider:
|
|
1967
|
-
custom:
|
|
1968
|
-
}, a = e, { t: o } = Y(), c =
|
|
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);
|
|
1969
1980
|
function y(e) {
|
|
1970
1981
|
let t = m.savedBlocks;
|
|
1971
1982
|
t?.isPicking.value ? t.togglePick(a.block.id) : c.selectBlock(e);
|
|
@@ -2012,7 +2023,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2012
2023
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
2013
2024
|
}
|
|
2014
2025
|
function V(e) {
|
|
2015
|
-
return
|
|
2026
|
+
return Tr(e, p, t);
|
|
2016
2027
|
}
|
|
2017
2028
|
function H(e, t) {
|
|
2018
2029
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
@@ -2020,7 +2031,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
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
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] })
|
|
@@ -2029,7 +2040,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
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",
|
|
@@ -2047,7 +2058,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2047
2058
|
onEnd: n[0] ||= (e) => I.value = null,
|
|
2048
2059
|
"onUpdate:modelValue": (e) => B(a, e)
|
|
2049
2060
|
}, {
|
|
2050
|
-
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, {
|
|
2051
2062
|
block: t,
|
|
2052
2063
|
"is-selected": h(c).state.selectedBlockId === t.id,
|
|
2053
2064
|
viewport: e.viewport,
|
|
@@ -2081,14 +2092,14 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2081
2092
|
"class",
|
|
2082
2093
|
"onStart",
|
|
2083
2094
|
"onUpdate:modelValue"
|
|
2084
|
-
]), R(a) ? (s(), x("div",
|
|
2095
|
+
]), R(a) ? (s(), x("div", la, [k("span", null, F(h(o).section.dropHere), 1)])) : S("", !0)], 6))), 128))], 2)]));
|
|
2085
2096
|
}
|
|
2086
|
-
}),
|
|
2097
|
+
}), da = ["width", "height"], fa = [
|
|
2087
2098
|
"d",
|
|
2088
2099
|
"stroke",
|
|
2089
2100
|
"stroke-opacity",
|
|
2090
2101
|
"stroke-width"
|
|
2091
|
-
],
|
|
2102
|
+
], pa = ["d", "fill"], ma = /* @__PURE__ */ d({
|
|
2092
2103
|
__name: "SocialIconSvg",
|
|
2093
2104
|
props: {
|
|
2094
2105
|
platform: {},
|
|
@@ -2097,7 +2108,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2097
2108
|
iconSize: {}
|
|
2098
2109
|
},
|
|
2099
2110
|
setup(e) {
|
|
2100
|
-
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(() => {
|
|
2101
2112
|
let e = {
|
|
2102
2113
|
display: "inline-flex",
|
|
2103
2114
|
alignItems: "center",
|
|
@@ -2135,7 +2146,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2135
2146
|
};
|
|
2136
2147
|
default: return e;
|
|
2137
2148
|
}
|
|
2138
|
-
}), c = b(() =>
|
|
2149
|
+
}), c = b(() => He(t.iconStyle)), l = b(() => Math.floor(r.value * c.value));
|
|
2139
2150
|
function u(e) {
|
|
2140
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}`;
|
|
2141
2152
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -2156,15 +2167,15 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2156
2167
|
"stroke-opacity": a.value.opacity,
|
|
2157
2168
|
"stroke-width": a.value.width / c.value,
|
|
2158
2169
|
"stroke-linejoin": "round"
|
|
2159
|
-
}, null, 8,
|
|
2170
|
+
}, null, 8, fa)) : S("", !0), k("path", {
|
|
2160
2171
|
d: n.value.path,
|
|
2161
2172
|
fill: d.value
|
|
2162
|
-
}, null, 8,
|
|
2173
|
+
}, null, 8, pa)], 8, da))], 4));
|
|
2163
2174
|
}
|
|
2164
|
-
}),
|
|
2175
|
+
}), ha = { class: "tpl:w-full" }, ga = ["href"], _a = {
|
|
2165
2176
|
key: 1,
|
|
2166
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)]"
|
|
2167
|
-
},
|
|
2178
|
+
}, va = /* @__PURE__ */ d({
|
|
2168
2179
|
__name: "SocialIconsBlock",
|
|
2169
2180
|
props: {
|
|
2170
2181
|
block: {},
|
|
@@ -2177,7 +2188,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2177
2188
|
gap: `${t.block.spacing}px`,
|
|
2178
2189
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2179
2190
|
})), a = b(() => t.block.icons.length > 0);
|
|
2180
|
-
return (t, o) => (s(), x("div",
|
|
2191
|
+
return (t, o) => (s(), x("div", ha, [a.value ? (s(), x("div", {
|
|
2181
2192
|
key: 0,
|
|
2182
2193
|
style: D(i.value)
|
|
2183
2194
|
}, [(s(!0), x(P, null, r(e.block.icons, (t) => (s(), x("a", {
|
|
@@ -2185,7 +2196,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2185
2196
|
href: t.url || "#",
|
|
2186
2197
|
class: "tpl:cursor-default",
|
|
2187
2198
|
onClick: o[0] ||= E(() => {}, ["prevent"])
|
|
2188
|
-
}, [g(
|
|
2199
|
+
}, [g(ma, {
|
|
2189
2200
|
platform: t.platform,
|
|
2190
2201
|
"icon-style": e.block.iconStyle,
|
|
2191
2202
|
"icon-tone": e.block.iconTone,
|
|
@@ -2195,44 +2206,44 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2195
2206
|
"icon-style",
|
|
2196
2207
|
"icon-tone",
|
|
2197
2208
|
"icon-size"
|
|
2198
|
-
])], 8,
|
|
2209
|
+
])], 8, ga))), 128))], 4)) : (s(), x("div", _a, [g(h(hn), { size: 16 }), k("span", null, F(h(n).social.addIcons), 1)]))]));
|
|
2199
2210
|
}
|
|
2200
|
-
}),
|
|
2211
|
+
}), ya = { class: "tpl:w-full" }, ba = {
|
|
2201
2212
|
key: 0,
|
|
2202
2213
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2203
2214
|
style: {
|
|
2204
2215
|
"background-color": "var(--tpl-bg-hover)",
|
|
2205
2216
|
color: "var(--tpl-text-dim)"
|
|
2206
2217
|
}
|
|
2207
|
-
},
|
|
2218
|
+
}, xa = /* @__PURE__ */ d({
|
|
2208
2219
|
__name: "SpacerBlock",
|
|
2209
2220
|
props: {
|
|
2210
2221
|
block: {},
|
|
2211
2222
|
viewport: {}
|
|
2212
2223
|
},
|
|
2213
2224
|
setup(e) {
|
|
2214
|
-
let t = e, n =
|
|
2225
|
+
let t = e, n = G(q, "SpacerBlock"), r = b(() => ({
|
|
2215
2226
|
height: `${t.block.height}px`,
|
|
2216
2227
|
minHeight: `${t.block.height}px`,
|
|
2217
2228
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2218
2229
|
}));
|
|
2219
|
-
return (t, i) => (s(), x("div",
|
|
2230
|
+
return (t, i) => (s(), x("div", ya, [k("div", {
|
|
2220
2231
|
style: D(r.value),
|
|
2221
|
-
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !h(n).state.previewMode }])
|
|
2222
|
-
}, [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)]));
|
|
2223
2234
|
}
|
|
2224
|
-
}),
|
|
2235
|
+
}), Sa = { class: "tpl:w-full" }, Ca = { key: 0 }, wa = [
|
|
2225
2236
|
"aria-label",
|
|
2226
2237
|
"data-placeholder",
|
|
2227
2238
|
"onBlur"
|
|
2228
|
-
],
|
|
2239
|
+
], Ta = [
|
|
2229
2240
|
"aria-label",
|
|
2230
2241
|
"data-placeholder",
|
|
2231
2242
|
"onBlur"
|
|
2232
|
-
],
|
|
2243
|
+
], Ea = {
|
|
2233
2244
|
key: 1,
|
|
2234
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)]"
|
|
2235
|
-
},
|
|
2246
|
+
}, Da = /*#__PURE__*/ Cn(/* @__PURE__ */ d({
|
|
2236
2247
|
__name: "TableBlock",
|
|
2237
2248
|
props: {
|
|
2238
2249
|
block: {},
|
|
@@ -2246,28 +2257,28 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2246
2257
|
updated(e, t) {
|
|
2247
2258
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2248
2259
|
}
|
|
2249
|
-
}, n = e, { t: i } = Y(), a =
|
|
2260
|
+
}, n = e, { t: i } = Y(), a = G(q, "TableBlock"), o = G(J, "TableBlock"), c = b(() => n.block.rows.length > 0), l = b(() => {
|
|
2250
2261
|
let e = {
|
|
2251
2262
|
width: "100%",
|
|
2252
2263
|
borderCollapse: "collapse",
|
|
2253
2264
|
fontSize: `${n.block.fontSize}px`,
|
|
2254
2265
|
textAlign: n.block.textAlign,
|
|
2255
|
-
fontFamily: n.block.fontFamily
|
|
2266
|
+
fontFamily: n.block.fontFamily ? o.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
2256
2267
|
};
|
|
2257
2268
|
return n.block.color && (e.color = n.block.color), e;
|
|
2258
|
-
}),
|
|
2269
|
+
}), u = b(() => ({
|
|
2259
2270
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
2260
2271
|
padding: `${n.block.cellPadding}px`,
|
|
2261
2272
|
textAlign: n.block.textAlign
|
|
2262
|
-
})),
|
|
2263
|
-
...
|
|
2273
|
+
})), d = b(() => ({
|
|
2274
|
+
...u.value,
|
|
2264
2275
|
fontWeight: "bold",
|
|
2265
2276
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
2266
|
-
})),
|
|
2267
|
-
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() {
|
|
2268
2279
|
a.selectBlock(n.block.id);
|
|
2269
2280
|
}
|
|
2270
|
-
function
|
|
2281
|
+
function y(e, t, r) {
|
|
2271
2282
|
let i = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
2272
2283
|
...n,
|
|
2273
2284
|
cells: n.cells.map((e) => e.id === t ? {
|
|
@@ -2277,31 +2288,31 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2277
2288
|
} : n);
|
|
2278
2289
|
a.updateBlock(n.block.id, { rows: o });
|
|
2279
2290
|
}
|
|
2280
|
-
return (e, n) => (s(), x("div",
|
|
2291
|
+
return (e, n) => (s(), x("div", Sa, [c.value ? (s(), x("table", {
|
|
2281
2292
|
key: 0,
|
|
2282
|
-
style: D(
|
|
2293
|
+
style: D(l.value),
|
|
2283
2294
|
class: "tpl-table-editable"
|
|
2284
|
-
}, [
|
|
2295
|
+
}, [p.value ? (s(), x("thead", Ca, [k("tr", null, [(s(!0), x(P, null, r(p.value.cells, (e) => f((s(), x("th", {
|
|
2285
2296
|
key: e.id,
|
|
2286
|
-
style: D(
|
|
2297
|
+
style: D(d.value),
|
|
2287
2298
|
"aria-label": h(i).table.cellPlaceholder,
|
|
2288
2299
|
contenteditable: "true",
|
|
2289
2300
|
"data-placeholder": h(i).table.cellPlaceholder,
|
|
2290
|
-
onBlur: (t) =>
|
|
2301
|
+
onBlur: (t) => y(p.value.id, e.id, t),
|
|
2291
2302
|
onKeydown: n[0] ||= _(E((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2292
|
-
onClick: E(
|
|
2293
|
-
}, 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", {
|
|
2294
2305
|
key: r.id,
|
|
2295
|
-
style: D(
|
|
2306
|
+
style: D(u.value),
|
|
2296
2307
|
"aria-label": h(i).table.cellPlaceholder,
|
|
2297
2308
|
contenteditable: "true",
|
|
2298
2309
|
"data-placeholder": h(i).table.cellPlaceholder,
|
|
2299
|
-
onBlur: (t) =>
|
|
2310
|
+
onBlur: (t) => y(e.id, r.id, t),
|
|
2300
2311
|
onKeydown: n[1] ||= _(E((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2301
|
-
onClick: E(
|
|
2302
|
-
}, 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)]))]));
|
|
2303
2314
|
}
|
|
2304
|
-
}), [["__scopeId", "data-v-
|
|
2315
|
+
}), [["__scopeId", "data-v-6751d456"]]), Oa = /* @__PURE__ */ d({
|
|
2305
2316
|
__name: "VideoPlayButton",
|
|
2306
2317
|
props: { hoverEffect: {
|
|
2307
2318
|
type: Boolean,
|
|
@@ -2319,7 +2330,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2319
2330
|
});
|
|
2320
2331
|
//#endregion
|
|
2321
2332
|
//#region src/utils/videoThumbnail.ts
|
|
2322
|
-
function
|
|
2333
|
+
function ka(e) {
|
|
2323
2334
|
if (!e) return {
|
|
2324
2335
|
platform: "unknown",
|
|
2325
2336
|
videoId: null,
|
|
@@ -2351,25 +2362,25 @@ function va(e) {
|
|
|
2351
2362
|
thumbnailUrl: null
|
|
2352
2363
|
};
|
|
2353
2364
|
}
|
|
2354
|
-
function
|
|
2355
|
-
return t ||
|
|
2365
|
+
function Aa(e, t) {
|
|
2366
|
+
return t || ka(e).thumbnailUrl;
|
|
2356
2367
|
}
|
|
2357
2368
|
//#endregion
|
|
2358
2369
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2359
|
-
var
|
|
2370
|
+
var ja = ["src", "alt"], Ma = {
|
|
2360
2371
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2361
2372
|
style: { opacity: "0.7" }
|
|
2362
|
-
},
|
|
2373
|
+
}, Na = ["href"], Pa = ["src", "alt"], Fa = ["src", "alt"], Ia = {
|
|
2363
2374
|
key: 3,
|
|
2364
|
-
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)]"
|
|
2365
|
-
},
|
|
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({
|
|
2366
2377
|
__name: "VideoBlock",
|
|
2367
2378
|
props: {
|
|
2368
2379
|
block: {},
|
|
2369
2380
|
viewport: {}
|
|
2370
2381
|
},
|
|
2371
2382
|
setup(e) {
|
|
2372
|
-
let t = e, { t: n } = Y(), { syntax: r } =
|
|
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(() => {
|
|
2373
2384
|
let e = t.block.align;
|
|
2374
2385
|
return {
|
|
2375
2386
|
maxWidth: "100%",
|
|
@@ -2379,7 +2390,7 @@ var ba = ["src", "alt"], xa = {
|
|
|
2379
2390
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2380
2391
|
marginRight: e === "center" ? "auto" : void 0
|
|
2381
2392
|
};
|
|
2382
|
-
}), d = b(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = b(() =>
|
|
2393
|
+
}), d = b(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = b(() => W(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2383
2394
|
return (t, r) => (s(), x("div", {
|
|
2384
2395
|
class: "tpl:w-full",
|
|
2385
2396
|
style: D(l.value)
|
|
@@ -2388,20 +2399,20 @@ var ba = ["src", "alt"], xa = {
|
|
|
2388
2399
|
class: "tpl:relative tpl:inline-block",
|
|
2389
2400
|
style: D(u.value)
|
|
2390
2401
|
}, [k("img", {
|
|
2391
|
-
class: "tpl:w-full tpl:border-0",
|
|
2402
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2392
2403
|
src: h(o),
|
|
2393
2404
|
alt: e.block.alt,
|
|
2394
2405
|
style: D(d.value)
|
|
2395
|
-
}, null, 12,
|
|
2406
|
+
}, null, 12, ja), g(Oa)], 4)) : i.value ? (s(), x("div", {
|
|
2396
2407
|
key: 1,
|
|
2397
|
-
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)]",
|
|
2398
2409
|
style: D([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2399
|
-
}, [g(h(
|
|
2410
|
+
}, [g(h(vn), {
|
|
2400
2411
|
size: 36,
|
|
2401
2412
|
"stroke-width": 1.5,
|
|
2402
2413
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2403
2414
|
style: { opacity: "0.5" }
|
|
2404
|
-
}), 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", {
|
|
2405
2416
|
key: 0,
|
|
2406
2417
|
href: e.block.url,
|
|
2407
2418
|
target: "_blank",
|
|
@@ -2410,67 +2421,67 @@ var ba = ["src", "alt"], xa = {
|
|
|
2410
2421
|
style: D(u.value),
|
|
2411
2422
|
onClick: r[0] ||= E(() => {}, ["prevent"])
|
|
2412
2423
|
}, [k("img", {
|
|
2413
|
-
class: "tpl:w-full tpl:border-0",
|
|
2424
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2414
2425
|
src: c.value,
|
|
2415
2426
|
alt: e.block.alt,
|
|
2416
2427
|
style: D(d.value)
|
|
2417
|
-
}, null, 12,
|
|
2428
|
+
}, null, 12, Pa), g(Oa, { "hover-effect": "" })], 12, Na)) : (s(), x("div", {
|
|
2418
2429
|
key: 1,
|
|
2419
2430
|
class: "tpl:relative tpl:inline-block",
|
|
2420
2431
|
style: D(u.value)
|
|
2421
2432
|
}, [k("img", {
|
|
2422
|
-
class: "tpl:w-full tpl:border-0",
|
|
2433
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2423
2434
|
src: c.value,
|
|
2424
2435
|
alt: e.block.alt,
|
|
2425
2436
|
style: D(d.value)
|
|
2426
|
-
}, null, 12,
|
|
2437
|
+
}, null, 12, Fa), g(Oa)], 4))], 64)) : (s(), x("div", Ia, [g(h(vn), {
|
|
2427
2438
|
size: 40,
|
|
2428
2439
|
"stroke-width": 1.5,
|
|
2429
2440
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2430
2441
|
}), k("span", null, F(h(n).video.addVideo), 1)]))], 4));
|
|
2431
2442
|
}
|
|
2432
|
-
}),
|
|
2433
|
-
section:
|
|
2434
|
-
title:
|
|
2435
|
-
paragraph:
|
|
2436
|
-
image:
|
|
2437
|
-
button:
|
|
2438
|
-
divider:
|
|
2439
|
-
video:
|
|
2440
|
-
social:
|
|
2441
|
-
menu:
|
|
2442
|
-
table:
|
|
2443
|
-
spacer:
|
|
2444
|
-
html:
|
|
2445
|
-
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"))
|
|
2446
2457
|
};
|
|
2447
|
-
function
|
|
2448
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = Y(i), d = b(() =>
|
|
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" ? {
|
|
2449
2460
|
title: { textAlign: "right" },
|
|
2450
2461
|
table: { textAlign: "right" }
|
|
2451
2462
|
} : {}), r.blockDefaults ?? {}));
|
|
2452
2463
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2453
|
-
let { resolvedTheme: f } =
|
|
2464
|
+
let { resolvedTheme: f } = Un(b(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: h } = Gn({
|
|
2454
2465
|
themeOverrides: p,
|
|
2455
2466
|
resolvedTheme: f,
|
|
2456
2467
|
extraStyles: () => ({
|
|
2457
2468
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2458
2469
|
...e.themeExtraStyles?.()
|
|
2459
2470
|
})
|
|
2460
|
-
}), g =
|
|
2471
|
+
}), g = et({
|
|
2461
2472
|
content: n.content,
|
|
2462
2473
|
setContent: (e, t) => n.setContent(e, t),
|
|
2463
2474
|
...e.historyOptions
|
|
2464
2475
|
});
|
|
2465
|
-
|
|
2466
|
-
let _ =
|
|
2476
|
+
Je(n, g);
|
|
2477
|
+
let _ = Ke({
|
|
2467
2478
|
addBlock: n.addBlock,
|
|
2468
2479
|
removeBlock: n.removeBlock,
|
|
2469
2480
|
updateBlock: n.updateBlock,
|
|
2470
2481
|
selectBlock: n.selectBlock,
|
|
2471
2482
|
findBlockLocation: n.findBlockLocation,
|
|
2472
2483
|
blockDefaults: () => d.value
|
|
2473
|
-
}), v =
|
|
2484
|
+
}), v = We(n), x = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? tt({
|
|
2474
2485
|
content: n.content,
|
|
2475
2486
|
isDirty: () => n.state.isDirty,
|
|
2476
2487
|
...e.autoSaveOptions
|
|
@@ -2478,30 +2489,30 @@ function Oa(e) {
|
|
|
2478
2489
|
x && (S = t(g.isNavigating, (e) => {
|
|
2479
2490
|
e ? x.pause() : x.resume();
|
|
2480
2491
|
}));
|
|
2481
|
-
let C =
|
|
2492
|
+
let C = Hn(n, {
|
|
2482
2493
|
t: s,
|
|
2483
2494
|
format: u
|
|
2484
|
-
}, r.customBlocks ?? []), w =
|
|
2495
|
+
}, r.customBlocks ?? []), w = tn(r.colors);
|
|
2485
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) {
|
|
2486
|
-
let e =
|
|
2497
|
+
let e = er(w.presets, r.blockDefaults, r.templateDefaults);
|
|
2487
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.`);
|
|
2488
2499
|
}
|
|
2489
|
-
let T =
|
|
2490
|
-
for (let e of T.unknown) X.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${
|
|
2491
|
-
let E =
|
|
2492
|
-
|
|
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);
|
|
2493
2504
|
let D = /* @__PURE__ */ new Set();
|
|
2494
2505
|
function O(e) {
|
|
2495
2506
|
for (let t of e) {
|
|
2496
|
-
E.registerCustom(t,
|
|
2497
|
-
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));
|
|
2498
2509
|
}
|
|
2499
2510
|
}
|
|
2500
2511
|
r.customBlocks?.length && O(r.customBlocks);
|
|
2501
|
-
let k =
|
|
2512
|
+
let k = kn();
|
|
2502
2513
|
if (o() && m(k.dispose), e.containerEl) {
|
|
2503
2514
|
let t = e.containerEl;
|
|
2504
|
-
|
|
2515
|
+
ot(document, "pointerdown", (e) => {
|
|
2505
2516
|
let n = t.value;
|
|
2506
2517
|
n && (e.composedPath?.() ?? []).includes(n) && k.claim();
|
|
2507
2518
|
}, { capture: !0 });
|
|
@@ -2511,7 +2522,7 @@ function Oa(e) {
|
|
|
2511
2522
|
t ? t.save() : x?.flush();
|
|
2512
2523
|
}
|
|
2513
2524
|
function j(t) {
|
|
2514
|
-
k.isActive() &&
|
|
2525
|
+
k.isActive() && Cr(t, {
|
|
2515
2526
|
history: g,
|
|
2516
2527
|
selectBlock: (e) => n.selectBlock(e),
|
|
2517
2528
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -2523,17 +2534,17 @@ function Oa(e) {
|
|
|
2523
2534
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
2524
2535
|
});
|
|
2525
2536
|
}
|
|
2526
|
-
|
|
2537
|
+
ot(document, "keydown", j);
|
|
2527
2538
|
let M = l(null), N = e.editorRoot ?? document;
|
|
2528
|
-
c(
|
|
2529
|
-
let P =
|
|
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 ?? []);
|
|
2530
2541
|
function I(e) {
|
|
2531
2542
|
Array.isArray(e) ? F.value = e : X.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
2532
2543
|
}
|
|
2533
|
-
c(K, F), c(
|
|
2534
|
-
let L = l(
|
|
2535
|
-
c(
|
|
2536
|
-
let R =
|
|
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({
|
|
2537
2548
|
resolvePreview: r.resolvePreview,
|
|
2538
2549
|
getContent: () => {
|
|
2539
2550
|
let e = n.content.value;
|
|
@@ -2541,19 +2552,19 @@ function Oa(e) {
|
|
|
2541
2552
|
},
|
|
2542
2553
|
isActive: () => n.state.previewMode
|
|
2543
2554
|
});
|
|
2544
|
-
c(
|
|
2555
|
+
c(Ot, R), c(gt, r.resolvePreview);
|
|
2545
2556
|
let z = b(() => !(n.state.previewMode && R.isConfigured));
|
|
2546
|
-
c(
|
|
2547
|
-
let B =
|
|
2548
|
-
c(
|
|
2549
|
-
let V =
|
|
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({
|
|
2550
2561
|
content: n.content,
|
|
2551
2562
|
options: r.lint ?? {},
|
|
2552
2563
|
updateBlock: n.updateBlock,
|
|
2553
2564
|
updateSettings: n.updateSettings,
|
|
2554
2565
|
removeBlock: n.removeBlock
|
|
2555
2566
|
});
|
|
2556
|
-
c(
|
|
2567
|
+
c(yt, V);
|
|
2557
2568
|
function H() {
|
|
2558
2569
|
S?.(), V?.destroy(), x?.destroy(), g.destroy();
|
|
2559
2570
|
}
|
|
@@ -2581,6 +2592,6 @@ function Oa(e) {
|
|
|
2581
2592
|
};
|
|
2582
2593
|
}
|
|
2583
2594
|
//#endregion
|
|
2584
|
-
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 };
|
|
2585
2596
|
|
|
2586
|
-
//# sourceMappingURL=useEditorCore-
|
|
2597
|
+
//# sourceMappingURL=useEditorCore-Bf2d1DKI.js.map
|