@templatical/editor 0.47.0 → 0.49.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/README.md +1 -1
- package/dist/{AiChatSidebar-BPOv5Ra8.js → AiChatSidebar-CdjTb9ej.js} +14 -14
- package/dist/{AiFeatureMenu-H_WT4YR8.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
- package/dist/{BlockIssueBadge-AgO5abEB.js → BlockIssueBadge-BdpJwim0.js} +5 -5
- package/dist/BlockPreviewCanvas-D_sowkf0.js +141 -0
- package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
- package/dist/{CloudPanels-H_GdbOfZ.js → CloudPanels-1hwFiJ0G.js} +39 -68
- package/dist/CollaborationNotices-BWpKzueF.js +73 -0
- package/dist/CollaboratorBar-D87phJsw.js +123 -0
- package/dist/{CommentsPanel-CMgsG_yh.js → CommentsPanel-BUvUzO3T.js} +2 -2
- package/dist/{CommentsSidebar-DCh8DTP8.js → CommentsSidebar-J65znlrH.js} +14 -14
- package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
- package/dist/{CountdownToolbar-DVuucA3v.js → CountdownToolbar-CLMIwfK7.js} +7 -7
- package/dist/{DesignReferenceSidebar-DxNV4lQp.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
- package/dist/{IssuesPanel-CUpW54P4.js → IssuesPanel-DeeVsfG7.js} +8 -8
- package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
- package/dist/{LogicTagInsertButton-DDYKnqmj.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
- package/dist/{MediaEditModal-D_we0Scr.js → MediaEditModal-C_wxoUMG.js} +3 -3
- package/dist/{MediaPanels-L95BwWV1.js → MediaPanels-BVXDkqtH.js} +2 -2
- package/dist/{MergeTagInput-DAL998tx.js → MergeTagInput-BEw_r0PJ.js} +3 -3
- package/dist/{MergeTagModeToggle-CjHO26rb.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
- package/dist/{ParagraphEditor-CcEN1N6n.js → ParagraphEditor-zLV44z-R.js} +135 -135
- package/dist/{RestoreVersionDialog-B2OH5rgs.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
- package/dist/{RichTextEditorContent-BGeTg-QL.js → RichTextEditorContent-CsvniFlI.js} +9 -9
- package/dist/{SaveBlockDialog-CCVyU-7y.js → SaveBlockDialog-DzWURF_e.js} +34 -35
- package/dist/{SavedBlocksBrowserModal-_WmSeqIh.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
- package/dist/{SavedBlocksPanels-DVX_ruQ7.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
- package/dist/{SavedBlocksPickBar-DVJC28hP.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
- package/dist/{TemplateScoringPanel-U0QFiwdI.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
- package/dist/{TemplateSettings-CdhTm9JQ.js → TemplateSettings-Cu5X9DgA.js} +11 -11
- package/dist/{TestEmailModal-BqToA_ls.js → TestEmailModal-BeRYV3eg.js} +14 -14
- package/dist/{TestEmailPanel-Cn4Ptq0j.js → TestEmailPanel-B8c3fQi2.js} +2 -2
- package/dist/{TitleEditor-CZdqeltH.js → TitleEditor-CvpNUoAp.js} +13 -13
- package/dist/{ToggleSwitch-BR8Sgzib.js → ToggleSwitch-DHweVJOr.js} +2 -2
- package/dist/Toolbar-BadDSkkF.js +3153 -0
- package/dist/{TplModal-CoczSDma.js → TplModal-BZgi9Tes.js} +5 -5
- package/dist/{VersionHistoryMenu-DY5z5FZr.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
- package/dist/{VersionHistoryPanels-DowHeDAQ.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
- package/dist/{VersionPreviewBanner-Bo8NxBbh.js → VersionPreviewBanner-F-811aps.js} +4 -4
- package/dist/WrapperBlock-DiiaxpMb.js +45 -0
- package/dist/{blockTypeIcons-4E1U8f99.js → blockTypeIcons-CayLluou.js} +49 -19
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +40 -2
- package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js → AiChatSidebar-yXJ85Zcg.js} +12 -12
- package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js +143 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-DJXLTUHc.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-D1fPLjG8.js → CloudPanels-XufhBZYF.js} +38 -67
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js → CommentsPanel-R8YLLO3v.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js → CommentsSidebar-96NZHVq3.js} +16 -16
- package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js → CountdownToolbar-tmiTPEXm.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js → DesignReferenceSidebar-D14IIu_P.js} +40 -40
- package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js → IssuesPanel-BoPiCLGc.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js → LogicTagInsertButton-BJ2t2vxC.js} +98 -98
- package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js → MediaEditModal-DD0SZ-S3.js} +3 -3
- package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js → MediaPanels-CkdJ_kGp.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js → MergeTagInput-7wXX71DH.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js → ParagraphEditor-CJQjRHXV.js} +52 -52
- package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js → RestoreVersionDialog-C5cxBRKi.js} +8 -8
- package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js → SaveBlockDialog-BKbjUnPM.js} +25 -26
- package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js → TemplateScoringPanel-BBPnHILC.js} +10 -10
- package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js → TemplateSettings-CtrzzQWl.js} +14 -14
- package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js → TestEmailModal-DuZKYMWD.js} +15 -15
- package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js → TestEmailPanel-DERaCdpG.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js → TitleEditor-CEgxjtUX.js} +20 -20
- package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
- package/dist/cdn/chunks/Toolbar-GFIZQHzw.js +3070 -0
- package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-WIBiBrGy.js → TplModal-DDrbWJcE.js} +5 -5
- package/dist/cdn/chunks/{TplModal-WIBiBrGy.js.map → TplModal-DDrbWJcE.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js → VersionHistoryMenu-MlxsUmuT.js} +11 -11
- package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +47 -0
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js.map +1 -0
- package/dist/cdn/chunks/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +41 -3
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
- package/dist/{cloud-DwjaAdwK.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-DtIZ2Lee.js → createCloudRuntime-DiYCJ21w.js} +127 -169
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
- package/dist/{de-DgAelLbM.js → cdn/chunks/de-CBE6O79z.js} +42 -2
- package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
- package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
- package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
- package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
- package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
- package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js → editor-modal-HJBy9kLj.js} +69 -69
- package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
- package/dist/cdn/chunks/{en-Dekrl7HA.js → en-CDexnk0p.js} +41 -3
- package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
- package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
- package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
- package/dist/{es-BaZzyidV.js → cdn/chunks/es-BE42B6uN.js} +42 -2
- package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
- package/dist/cdn/chunks/{extensions-T-t8MKDb.js → extensions-koOuDeZS.js} +23 -23
- package/dist/cdn/chunks/{extensions-T-t8MKDb.js.map → extensions-koOuDeZS.js.map} +1 -1
- package/dist/{fr-C5ucb1HK.js → cdn/chunks/fr-DlJFPDQR.js} +42 -2
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
- package/dist/cdn/chunks/{icons-C4fX9Bwy.js → icons-CjlNV8xD.js} +121 -92
- package/dist/cdn/chunks/icons-CjlNV8xD.js.map +1 -0
- package/dist/{ja-CUgR3mV0.js → cdn/chunks/ja-CUT8gkNI.js} +42 -2
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
- package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
- package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
- package/dist/{nl-qrLY7hMS.js → cdn/chunks/nl-bXWqqRyS.js} +42 -2
- package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
- package/dist/{pt-BR-C6hMTQYi.js → cdn/chunks/pt-BR-2_H4-wlb.js} +42 -2
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
- package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
- package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
- package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
- package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
- package/dist/cdn/chunks/{src-CHlVFp7r.js → src-B1e5SSYP.js} +312 -286
- package/dist/cdn/chunks/src-B1e5SSYP.js.map +1 -0
- package/dist/cdn/chunks/src-B77z1iw4.js +649 -0
- package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
- package/dist/cdn/chunks/{src-BnJlDuyB.js → src-CvLTYGdO.js} +555 -283
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
- package/dist/cdn/chunks/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +2 -2
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
- package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-Bf2d1DKI.js → useEditorCore-DpCFvHg_.js} +758 -732
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-3S63go4E.js → useLogicTag-X8bc5qNl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-3S63go4E.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js → useMergeTag-DFoOexIQ.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js → withCurrentFont-D-f61ghC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1328 -1069
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B5R4zXr7.js → check-DQQzkmIC.js} +1 -1
- package/dist/{chevron-down-BKyl85NV.js → chevron-down-CIF4bdon.js} +1 -1
- package/dist/{chevron-right-BmToZ8qX.js → chevron-right-Cg7Xu-ev.js} +1 -1
- package/dist/{chevron-up-DNYdOxPC.js → chevron-up-Csu7ISD-.js} +1 -1
- package/dist/{circle-alert-Dx9ju3YZ.js → circle-alert-YUvIJAgY.js} +1 -1
- package/dist/{clock-Dv9bxsSH.js → clock-CnSIGKQW.js} +1 -1
- package/dist/{cdn/chunks/cloud-Cd7ptfhL.js → cloud-YUYDtdHt.js} +308 -569
- package/dist/{copy-BsKl4dcy.js → copy-CUC43md_.js} +1 -1
- package/dist/{createCloudRuntime-C8gpPsSi.js → createCloudRuntime-BMDRjL0k.js} +126 -168
- package/dist/{createLucideIcon-DziKp5iU.js → createLucideIcon-BcP1sjdp.js} +6 -6
- package/dist/{cdn/chunks/de-DgAelLbM.js → de-CBE6O79z.js} +40 -4
- package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
- package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
- package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
- package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
- package/dist/{dist-C8koXLhl.js → dist-DBG3nh3k.js} +550 -284
- package/dist/{editor-modal-BwyIUnV_.js → editor-modal--7_9A6j-.js} +27 -27
- package/dist/en-BHCMzqib.js +1 -0
- package/dist/{en-Dekrl7HA.js → en-CDexnk0p.js} +40 -2
- package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
- package/dist/{cdn/chunks/es-BaZzyidV.js → es-BE42B6uN.js} +40 -4
- package/dist/{extensions-DHyKjsNZ.js → extensions-zwsZlWjH.js} +23 -23
- package/dist/{eye-DQuinb9k.js → eye-B1bua-ck.js} +1 -1
- package/dist/{cdn/chunks/fr-C5ucb1HK.js → fr-DlJFPDQR.js} +40 -4
- package/dist/{image-up-yTfLjOrj.js → image-up-BqiO7KCO.js} +1 -1
- package/dist/index.d.ts +356 -38
- package/dist/{info-C7OjlS11.js → info-x26nGOo2.js} +1 -1
- package/dist/{cdn/chunks/ja-CUgR3mV0.js → ja-CUT8gkNI.js} +40 -4
- package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
- package/dist/{link-CrUFaZ0t.js → link-CezhndyR.js} +1 -1
- package/dist/{list-CLgv6M-k.js → list-DQqdptI0.js} +1 -1
- package/dist/{loader-circle-BXM5VO0K.js → loader-circle-DCEeoYoi.js} +1 -1
- package/dist/{message-circle-BisdQ8H9.js → message-circle-BLGzfv_7.js} +1 -1
- package/dist/{cdn/chunks/nl-qrLY7hMS.js → nl-bXWqqRyS.js} +40 -4
- package/dist/{package-C1T4AxV1.js → package-D_kEQCMU.js} +1 -1
- package/dist/{pencil-oo2mwf4C.js → pencil-Dct8zGLy.js} +1 -1
- package/dist/{plus-BIilXopD.js → plus-BDd0gTEm.js} +1 -1
- package/dist/{preRenderCustomBlocks-lFX0HHiV.js → preRenderCustomBlocks-CtKJecE-.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-C6hMTQYi.js → pt-BR-2_H4-wlb.js} +40 -4
- package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
- package/dist/{refresh-cw-DrLlkEVC.js → refresh-cw-tGMRDxr8.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
- package/dist/{search-DNu9lImk.js → search-Bm2cCQpe.js} +1 -1
- package/dist/{send-DDNh3LoJ.js → send-sVLaKZ7f.js} +1 -1
- package/dist/{shield-check-aXM3o14f.js → shield-check-YhsbXfQc.js} +1 -1
- package/dist/{smartphone-isccgDee.js → smartphone-B2W81p02.js} +1 -1
- package/dist/socialIcons-Bwv-49EB.js +2167 -0
- package/dist/{sparkles-CIMfFxKv.js → sparkles-a1qkBZ8X.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
- package/dist/templatical-editor.js +1448 -1189
- package/dist/{text-align-start-C4JFeqsq.js → text-align-start-CTuwQ5YW.js} +1 -1
- package/dist/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +1 -1
- package/dist/{trash-8ZD9pK_c.js → trash-I3D2peFQ.js} +1 -1
- package/dist/{triangle-alert-pq45xEHl.js → triangle-alert-CenxmLRE.js} +1 -1
- package/dist/{upload-DrNFmVes.js → upload-uU2cK0Ce.js} +1 -1
- package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
- package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
- package/dist/{useEditorCore-BcT7UI4e.js → useEditorCore-DRbMRe8F.js} +1103 -1076
- package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
- package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
- package/dist/{useLogicTag-D-dI8H6p.js → useLogicTag-zcI6BWIf.js} +3 -3
- package/dist/{useMergeTag-5wMeDBi-.js → useMergeTag-C-iBLlp0.js} +5 -5
- package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
- package/dist/{useScrollToBlock-Do3suaqp.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
- package/dist/{withCurrentFont-B4YnsG_2.js → withCurrentFont-D62njRLu.js} +1 -1
- package/dist/{x-CBFKGLB1.js → x-KFQ4S-Kz.js} +1 -1
- package/package.json +12 -12
- package/dist/BlockPreviewCanvas-CZDBSPoG.js +0 -136
- package/dist/CloudHeaderExtras-gXsTYoGG.js +0 -59
- package/dist/CollaboratorBar-BazGNMqN.js +0 -103
- package/dist/Toolbar-OGakTBEg.js +0 -2851
- package/dist/WrapperBlock-BOABSX9W.js +0 -46
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +0 -138
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DJXLTUHc.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-D1fPLjG8.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js +0 -52
- package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js +0 -2767
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js.map +0 -1
- package/dist/cdn/chunks/ca-DMoGGP9L.js.map +0 -1
- package/dist/cdn/chunks/cloud-Cd7ptfhL.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +0 -1
- package/dist/cdn/chunks/de-DgAelLbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
- package/dist/cdn/chunks/en-BANFWZdr.js +0 -1
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
- package/dist/cdn/chunks/en-Dekrl7HA.js.map +0 -1
- package/dist/cdn/chunks/es-BaZzyidV.js.map +0 -1
- package/dist/cdn/chunks/fr-C5ucb1HK.js.map +0 -1
- package/dist/cdn/chunks/icons-C4fX9Bwy.js.map +0 -1
- package/dist/cdn/chunks/ja-CUgR3mV0.js.map +0 -1
- package/dist/cdn/chunks/nl-qrLY7hMS.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +0 -1
- package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js +0 -1103
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +0 -1
- package/dist/cdn/chunks/src-BnJlDuyB.js.map +0 -1
- package/dist/cdn/chunks/src-Bu0qBpbf.js +0 -616
- package/dist/cdn/chunks/src-Bu0qBpbf.js.map +0 -1
- package/dist/cdn/chunks/src-CHlVFp7r.js.map +0 -1
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
- package/dist/en-CC-57eC_.js +0 -1
- package/dist/socialIcons-BctavKBN.js +0 -1180
|
@@ -1,43 +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,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
5
|
-
import { a as
|
|
6
|
-
import { $ as
|
|
7
|
-
import "./
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import
|
|
16
|
-
import "./
|
|
17
|
-
import { t as
|
|
18
|
-
import { t 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, Y as p, at as m, b as h, c as g, ct as _, et as v, f as y, g as b, h as x, it as S, j as C, k as w, l as T, lt as E, m as D, p as O, q as k, rt as A, s as j, t as M, u as N, ut as P, w as F, x as I, y as L } from "./draggable-akeQH_JP.js";
|
|
2
|
+
import { A as R, Bt as z, Ct as B, Dt as V, F as H, Ft as U, G as ee, H as te, I as ne, It as re, J as W, L as G, Lt as ie, M as ae, Mt as oe, N as se, P as ce, Q as le, R as ue, Rt as de, Tt as fe, U as pe, V as me, W as he, X as ge, Z as _e, a as ve, b as ye, bt as be, c as xe, d as Se, et as Ce, f as we, g as Te, h as Ee, i as De, j as Oe, jt as ke, l as Ae, m as je, n as Me, o as Ne, p as Pe, pt as Fe, r as Ie, t as Le, u as Re, w as ze, wt as Be, y as Ve, z as He, zt as Ue } from "./src-CvLTYGdO.js";
|
|
3
|
+
import { C as We, F as Ge, I as Ke, L as qe, M as Je, N as Ye, S as Xe, _ as Ze, a as Qe, g as $e, h as et, j as tt, l as nt, n as rt, p as it, t as at, u as ot, x as st, y as ct } from "./socialIcons-CkZSYpoG.js";
|
|
4
|
+
import { _ as lt, h as ut, v as dt, y as ft } from "./dist-Doy3r07H.js";
|
|
5
|
+
import { a as pt, c as mt, i as ht } from "./dist-DdwjXLme.js";
|
|
6
|
+
import { $ as K, A as gt, B as _t, C as vt, D as yt, E as bt, F as xt, G as St, H as Ct, I as wt, J as Tt, K as Et, L as Dt, M as Ot, N as kt, O as q, P as At, Q as jt, R as Mt, S as Nt, T as Pt, V as Ft, X as It, Y as Lt, Z as Rt, _ as zt, a as Bt, b as Vt, c as Ht, d as Ut, f as Wt, g as J, h as Gt, j as Kt, k as qt, l as Jt, m as Yt, n as Xt, o as Zt, p as Qt, q as $t, r as en, s as tn, v as Y, w as nn, x as rn, y as an, z as on } from "./keys-UAWhQ3zW.js";
|
|
7
|
+
import { t as X } from "./useI18n-DEqtEgOs.js";
|
|
8
|
+
import { t as Z } from "./logger-ByvdoAwq.js";
|
|
9
|
+
import { i as sn, r as cn, s as ln, t as un } from "./usePopoverPosition-Cz9-XiXR.js";
|
|
10
|
+
import { r as dn, t as fn } from "./templateSettingsFields-YCFVBVYh.js";
|
|
11
|
+
import { At as pn, Dt as mn, Ht as hn, Ot as gn, U as _n, Vt as vn, Z as yn, _t as bn, bt as xn, d as Sn, f as Cn, j as wn, mt as Tn, nt as En, o as Dn, y as On } from "./icons-CjlNV8xD.js";
|
|
12
|
+
import { t as kn } from "./LoadingTrack-YU44CM8X.js";
|
|
13
|
+
import { t as An } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
|
+
import { t as jn } from "./useEditorRoot-5SBqm90x.js";
|
|
15
|
+
import "./useCloudI18n-kp07GQmk.js";
|
|
16
|
+
import { t as Mn } from "./useMergeTag-DFoOexIQ.js";
|
|
17
|
+
import { t as Nn } from "./useLogicTag-X8bc5qNl.js";
|
|
18
|
+
import { t as Pn } from "./readableTextColor-f8Kykfnh.js";
|
|
19
19
|
//#region src/utils/activeEditorTracker.ts
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
let e = ++
|
|
23
|
-
return
|
|
20
|
+
var Fn = /* @__PURE__ */ new Set(), Q = 0, In = 0;
|
|
21
|
+
function Ln() {
|
|
22
|
+
let e = ++In;
|
|
23
|
+
return Fn.add(e), Q === 0 && (Q = e), {
|
|
24
24
|
id: e,
|
|
25
|
-
isActive: () =>
|
|
25
|
+
isActive: () => Fn.size <= 1 || Q === e,
|
|
26
26
|
claim: () => {
|
|
27
|
-
|
|
27
|
+
Q = e;
|
|
28
28
|
},
|
|
29
29
|
dispose: () => {
|
|
30
|
-
if (
|
|
31
|
-
let e = Array.from(
|
|
32
|
-
|
|
30
|
+
if (Fn.delete(e), Q === e) {
|
|
31
|
+
let e = Array.from(Fn);
|
|
32
|
+
Q = e[e.length - 1] ?? 0;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/composables/usePreviewResolution.ts
|
|
39
|
-
var
|
|
40
|
-
function
|
|
39
|
+
var Rn = 500;
|
|
40
|
+
function zn(e) {
|
|
41
41
|
let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
|
|
42
42
|
function c() {
|
|
43
43
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -48,13 +48,13 @@ function jn(e) {
|
|
|
48
48
|
let n = ++o;
|
|
49
49
|
i.value = !0;
|
|
50
50
|
let s = {
|
|
51
|
-
content:
|
|
51
|
+
content: be(e.getContent()),
|
|
52
52
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
53
53
|
};
|
|
54
54
|
try {
|
|
55
55
|
let e = await t(s);
|
|
56
56
|
if (n !== o) return;
|
|
57
|
-
if (!
|
|
57
|
+
if (!Le(e)) {
|
|
58
58
|
a.value = !0;
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
@@ -69,96 +69,24 @@ function jn(e) {
|
|
|
69
69
|
function d() {
|
|
70
70
|
n && (c(), r.value === null ? u() : s = setTimeout(() => {
|
|
71
71
|
s = null, u();
|
|
72
|
-
},
|
|
72
|
+
}, Rn));
|
|
73
73
|
}
|
|
74
74
|
return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
75
75
|
e ? d() : (c(), o++, i.value = !1, r.value = null, a.value = !1);
|
|
76
|
-
}, { immediate: !0 }),
|
|
76
|
+
}, { immediate: !0 }), p(() => {
|
|
77
77
|
c(), o++;
|
|
78
78
|
}), {
|
|
79
79
|
isConfigured: n,
|
|
80
|
-
content:
|
|
80
|
+
content: y(() => r.value ?? e.getContent()),
|
|
81
81
|
isResolving: i,
|
|
82
|
-
isInitialResolve:
|
|
82
|
+
isInitialResolve: y(() => i.value && r.value === null),
|
|
83
83
|
hasFailed: a,
|
|
84
|
-
supersedesSamples:
|
|
84
|
+
supersedesSamples: y(() => n)
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
|
-
//#region src/composables/useImageUrlResolver.ts
|
|
89
|
-
function Mn(e) {
|
|
90
|
-
let t = p(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
91
|
-
function r(e) {
|
|
92
|
-
return t.get(e);
|
|
93
|
-
}
|
|
94
|
-
function i(e) {
|
|
95
|
-
return t.has(e) || n.has(e);
|
|
96
|
-
}
|
|
97
|
-
function a(r) {
|
|
98
|
-
if (i(r)) return;
|
|
99
|
-
let a;
|
|
100
|
-
try {
|
|
101
|
-
a = e(r);
|
|
102
|
-
} catch {
|
|
103
|
-
t.set(r, null);
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
a === null || typeof a == "string" ? t.set(r, a) : (n.add(r), Promise.resolve(a).then((e) => {
|
|
107
|
-
t.set(r, typeof e == "string" ? e : null);
|
|
108
|
-
}, () => {
|
|
109
|
-
t.set(r, null);
|
|
110
|
-
}).finally(() => n.delete(r)));
|
|
111
|
-
}
|
|
112
|
-
return {
|
|
113
|
-
get: r,
|
|
114
|
-
has: i,
|
|
115
|
-
lookup: a
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function Q(e) {
|
|
119
|
-
let r = n(Xt, null), i = b(e);
|
|
120
|
-
if (!r) return i;
|
|
121
|
-
let a;
|
|
122
|
-
function s() {
|
|
123
|
-
a !== void 0 && (clearTimeout(a), a = void 0);
|
|
124
|
-
}
|
|
125
|
-
o() && m(s);
|
|
126
|
-
let c = !0;
|
|
127
|
-
return t(i, (e) => {
|
|
128
|
-
s();
|
|
129
|
-
let t = c;
|
|
130
|
-
c = !1, e && !r.has(e) && (t ? r.lookup(e) : a = setTimeout(() => {
|
|
131
|
-
a = void 0, r.lookup(e);
|
|
132
|
-
}, 300));
|
|
133
|
-
}, { immediate: !0 }), b(() => {
|
|
134
|
-
let e = i.value;
|
|
135
|
-
if (!e) return e;
|
|
136
|
-
let t = r.get(e);
|
|
137
|
-
return typeof t == "string" && t.length > 0 ? t : e;
|
|
138
|
-
});
|
|
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
|
-
}
|
|
159
|
-
//#endregion
|
|
160
88
|
//#region src/composables/useMergeTagPicker.ts
|
|
161
|
-
function
|
|
89
|
+
function Bn() {
|
|
162
90
|
let e = l(!1), t = l([]), n = l(null), r = null;
|
|
163
91
|
function i(i, a) {
|
|
164
92
|
if (r) {
|
|
@@ -173,7 +101,7 @@ function Rn() {
|
|
|
173
101
|
let a = r;
|
|
174
102
|
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
175
103
|
}
|
|
176
|
-
return o() &&
|
|
104
|
+
return o() && p(() => {
|
|
177
105
|
if (r) {
|
|
178
106
|
let e = r;
|
|
179
107
|
r = null, e(null);
|
|
@@ -189,7 +117,7 @@ function Rn() {
|
|
|
189
117
|
}
|
|
190
118
|
//#endregion
|
|
191
119
|
//#region src/composables/useLogicTagPicker.ts
|
|
192
|
-
function
|
|
120
|
+
function Vn() {
|
|
193
121
|
let e = l(!1), t = l([]), n = l([]), r = null;
|
|
194
122
|
function i(i, a) {
|
|
195
123
|
if (r) {
|
|
@@ -204,7 +132,7 @@ function zn() {
|
|
|
204
132
|
let a = r;
|
|
205
133
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
206
134
|
}
|
|
207
|
-
return o() &&
|
|
135
|
+
return o() && p(() => {
|
|
208
136
|
if (r) {
|
|
209
137
|
let e = r;
|
|
210
138
|
r = null, e(null);
|
|
@@ -220,17 +148,17 @@ function zn() {
|
|
|
220
148
|
}
|
|
221
149
|
//#endregion
|
|
222
150
|
//#region src/composables/useTemplateLint.ts
|
|
223
|
-
function
|
|
151
|
+
function Hn(e) {
|
|
224
152
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
225
153
|
}
|
|
226
|
-
function
|
|
227
|
-
let n = l([]), r = l(!1), i = l(!1), a =
|
|
154
|
+
function Un(e) {
|
|
155
|
+
let n = l([]), r = l(!1), i = l(!1), a = v(null), o = Hn(e.options), s = null, c = !1;
|
|
228
156
|
o || u();
|
|
229
157
|
async function u() {
|
|
230
158
|
try {
|
|
231
|
-
let t = await import("./src-
|
|
159
|
+
let t = await import("./src-B1e5SSYP.js");
|
|
232
160
|
if (c) return;
|
|
233
|
-
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s =
|
|
161
|
+
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = ft(e.content, d, {
|
|
234
162
|
debounce: e.debounce ?? 500,
|
|
235
163
|
deep: !0
|
|
236
164
|
});
|
|
@@ -265,7 +193,7 @@ function Vn(e) {
|
|
|
265
193
|
}
|
|
266
194
|
//#endregion
|
|
267
195
|
//#region src/composables/useKeyboardReorder.ts
|
|
268
|
-
function
|
|
196
|
+
function Wn(e, t, n = []) {
|
|
269
197
|
let r = l(null), i = l(""), a = null;
|
|
270
198
|
function o(t) {
|
|
271
199
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -292,7 +220,7 @@ function Hn(e, t, n = []) {
|
|
|
292
220
|
let i = o(r);
|
|
293
221
|
if (!i) return "";
|
|
294
222
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
295
|
-
return a ?
|
|
223
|
+
return a ? Ze(a, t.t, n) : "";
|
|
296
224
|
}
|
|
297
225
|
function c(t, n) {
|
|
298
226
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -361,13 +289,13 @@ function Hn(e, t, n = []) {
|
|
|
361
289
|
}
|
|
362
290
|
//#endregion
|
|
363
291
|
//#region src/composables/useUiTheme.ts
|
|
364
|
-
function
|
|
365
|
-
let t =
|
|
366
|
-
return { resolvedTheme:
|
|
292
|
+
function Gn(e) {
|
|
293
|
+
let t = mt("(prefers-color-scheme: dark)");
|
|
294
|
+
return { resolvedTheme: y(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
367
295
|
}
|
|
368
296
|
//#endregion
|
|
369
297
|
//#region src/composables/useThemeStyles.ts
|
|
370
|
-
var
|
|
298
|
+
var Kn = {
|
|
371
299
|
bg: "--tpl-bg",
|
|
372
300
|
bgElevated: "--tpl-bg-elevated",
|
|
373
301
|
bgHover: "--tpl-bg-hover",
|
|
@@ -391,10 +319,10 @@ var Wn = {
|
|
|
391
319
|
dangerLight: "--tpl-danger-light",
|
|
392
320
|
canvasBg: "--tpl-canvas-bg"
|
|
393
321
|
};
|
|
394
|
-
function
|
|
395
|
-
return { themeStyles:
|
|
322
|
+
function qn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
323
|
+
return { themeStyles: y(() => {
|
|
396
324
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
397
|
-
if (a) for (let [e, t] of Object.entries(
|
|
325
|
+
if (a) for (let [e, t] of Object.entries(Kn)) {
|
|
398
326
|
let n = a[e];
|
|
399
327
|
n && (r[t] = n);
|
|
400
328
|
}
|
|
@@ -403,18 +331,18 @@ function Gn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
403
331
|
}
|
|
404
332
|
//#endregion
|
|
405
333
|
//#region src/composables/useBlockRegistry.ts
|
|
406
|
-
function
|
|
407
|
-
let e =
|
|
334
|
+
function Jn() {
|
|
335
|
+
let e = v(/* @__PURE__ */ new Map());
|
|
408
336
|
function t(t, n) {
|
|
409
|
-
e.value.set(t, n),
|
|
337
|
+
e.value.set(t, n), S(e);
|
|
410
338
|
}
|
|
411
339
|
function n(t, n) {
|
|
412
340
|
let r = `custom:${t.type}`;
|
|
413
341
|
e.value.set(r, {
|
|
414
342
|
component: n,
|
|
415
|
-
createBlock: () =>
|
|
343
|
+
createBlock: () => se(t),
|
|
416
344
|
definition: t
|
|
417
|
-
}),
|
|
345
|
+
}), S(e);
|
|
418
346
|
}
|
|
419
347
|
function r(t) {
|
|
420
348
|
if (t.type === "custom") {
|
|
@@ -443,7 +371,7 @@ function Kn() {
|
|
|
443
371
|
strictFilters: !1
|
|
444
372
|
}).parseAndRender(t.template, e.fieldValues);
|
|
445
373
|
} catch (t) {
|
|
446
|
-
return
|
|
374
|
+
return Z.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
447
375
|
}
|
|
448
376
|
}
|
|
449
377
|
function c(t) {
|
|
@@ -461,9 +389,9 @@ function Kn() {
|
|
|
461
389
|
}
|
|
462
390
|
//#endregion
|
|
463
391
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
464
|
-
function
|
|
465
|
-
return
|
|
466
|
-
let n =
|
|
392
|
+
function Yn(e, t) {
|
|
393
|
+
return y(() => {
|
|
394
|
+
let n = Xn(e.value.blocks);
|
|
467
395
|
if (n.size === 0) return [];
|
|
468
396
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
469
397
|
for (let e of n) {
|
|
@@ -475,76 +403,76 @@ function qn(e, t) {
|
|
|
475
403
|
return i;
|
|
476
404
|
});
|
|
477
405
|
}
|
|
478
|
-
function
|
|
406
|
+
function Xn(e) {
|
|
479
407
|
let t = /* @__PURE__ */ new Set();
|
|
480
|
-
return
|
|
408
|
+
return Zn(e, t), t;
|
|
481
409
|
}
|
|
482
|
-
function
|
|
483
|
-
for (let n of e) if (
|
|
410
|
+
function Zn(e, t) {
|
|
411
|
+
for (let n of e) if (Ce(n)) t.add(n.customType);
|
|
484
412
|
else if (n.type === "section") {
|
|
485
413
|
let e = n.children;
|
|
486
414
|
if (!e) continue;
|
|
487
|
-
for (let n of e)
|
|
488
|
-
} else
|
|
415
|
+
for (let n of e) Zn(n, t);
|
|
416
|
+
} else Fe(n) && Zn(n.children, t);
|
|
489
417
|
}
|
|
490
418
|
//#endregion
|
|
491
419
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
492
|
-
var
|
|
420
|
+
var Qn = [
|
|
493
421
|
{
|
|
494
422
|
type: "section",
|
|
495
|
-
createBlock:
|
|
423
|
+
createBlock: He
|
|
496
424
|
},
|
|
497
425
|
{
|
|
498
426
|
type: "title",
|
|
499
|
-
createBlock:
|
|
427
|
+
createBlock: he
|
|
500
428
|
},
|
|
501
429
|
{
|
|
502
430
|
type: "paragraph",
|
|
503
|
-
createBlock:
|
|
431
|
+
createBlock: ue
|
|
504
432
|
},
|
|
505
433
|
{
|
|
506
434
|
type: "image",
|
|
507
|
-
createBlock:
|
|
435
|
+
createBlock: ne
|
|
508
436
|
},
|
|
509
437
|
{
|
|
510
438
|
type: "button",
|
|
511
|
-
createBlock:
|
|
439
|
+
createBlock: Oe
|
|
512
440
|
},
|
|
513
441
|
{
|
|
514
442
|
type: "divider",
|
|
515
|
-
createBlock:
|
|
443
|
+
createBlock: ce
|
|
516
444
|
},
|
|
517
445
|
{
|
|
518
446
|
type: "video",
|
|
519
|
-
createBlock:
|
|
447
|
+
createBlock: ee
|
|
520
448
|
},
|
|
521
449
|
{
|
|
522
450
|
type: "social",
|
|
523
|
-
createBlock:
|
|
451
|
+
createBlock: me
|
|
524
452
|
},
|
|
525
453
|
{
|
|
526
454
|
type: "menu",
|
|
527
|
-
createBlock:
|
|
455
|
+
createBlock: G
|
|
528
456
|
},
|
|
529
457
|
{
|
|
530
458
|
type: "table",
|
|
531
|
-
createBlock:
|
|
459
|
+
createBlock: pe
|
|
532
460
|
},
|
|
533
461
|
{
|
|
534
462
|
type: "spacer",
|
|
535
|
-
createBlock:
|
|
463
|
+
createBlock: te
|
|
536
464
|
},
|
|
537
465
|
{
|
|
538
466
|
type: "html",
|
|
539
|
-
createBlock:
|
|
467
|
+
createBlock: H
|
|
540
468
|
},
|
|
541
469
|
{
|
|
542
470
|
type: "countdown",
|
|
543
|
-
createBlock:
|
|
471
|
+
createBlock: ae
|
|
544
472
|
}
|
|
545
473
|
];
|
|
546
|
-
function
|
|
547
|
-
for (let n of
|
|
474
|
+
function $n(e, t) {
|
|
475
|
+
for (let n of Qn) {
|
|
548
476
|
let r = t[n.type];
|
|
549
477
|
r && e.registerBuiltIn(n.type, {
|
|
550
478
|
component: r,
|
|
@@ -554,33 +482,33 @@ function Zn(e, t) {
|
|
|
554
482
|
}
|
|
555
483
|
//#endregion
|
|
556
484
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
557
|
-
function
|
|
485
|
+
function er(e) {
|
|
558
486
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
559
487
|
}
|
|
560
488
|
//#endregion
|
|
561
489
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
562
|
-
function
|
|
490
|
+
function tr(e) {
|
|
563
491
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
564
492
|
}
|
|
565
|
-
function
|
|
566
|
-
let r = new Set(e.map((e) =>
|
|
567
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
493
|
+
function nr(e, t, n) {
|
|
494
|
+
let r = new Set(e.map((e) => cn(e))), i = [], a = (e, t) => {
|
|
495
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(cn(o)) && i.push(`${t}.${n}: ${o}`) : tr(o) && a(o, `${t}.${n}`);
|
|
568
496
|
}, o = t;
|
|
569
|
-
for (let [e, t] of Object.entries(
|
|
497
|
+
for (let [e, t] of Object.entries(ge)) {
|
|
570
498
|
let n = o?.[e];
|
|
571
499
|
a({
|
|
572
500
|
...t,
|
|
573
|
-
|
|
501
|
+
...tr(n) ? n : {}
|
|
574
502
|
}, e);
|
|
575
503
|
}
|
|
576
504
|
return a({
|
|
577
|
-
...
|
|
505
|
+
..._e,
|
|
578
506
|
...n ?? {}
|
|
579
507
|
}, "template"), i;
|
|
580
508
|
}
|
|
581
509
|
//#endregion
|
|
582
510
|
//#region src/utils/localizedBlockDefaults.ts
|
|
583
|
-
function
|
|
511
|
+
function rr(e) {
|
|
584
512
|
return {
|
|
585
513
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
586
514
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -589,59 +517,59 @@ function tr(e) {
|
|
|
589
517
|
}
|
|
590
518
|
//#endregion
|
|
591
519
|
//#region src/i18n/index.ts
|
|
592
|
-
var
|
|
593
|
-
"./locales/ca.ts": () => import("./ca-
|
|
594
|
-
"./locales/de.ts": () => import("./de-
|
|
595
|
-
"./locales/en.ts": () => import("./en-
|
|
596
|
-
"./locales/es.ts": () => import("./es-
|
|
597
|
-
"./locales/fr.ts": () => import("./fr-
|
|
598
|
-
"./locales/ja.ts": () => import("./ja-
|
|
599
|
-
"./locales/nl.ts": () => import("./nl-
|
|
600
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
601
|
-
}),
|
|
602
|
-
"./locales/cloud/de.ts": () => import("./de-
|
|
603
|
-
"./locales/cloud/en.ts": () => import("./en-
|
|
604
|
-
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-
|
|
520
|
+
var ir = /* #__PURE__ */ Object.assign({
|
|
521
|
+
"./locales/ca.ts": () => import("./ca-DSJwJ5ov.js"),
|
|
522
|
+
"./locales/de.ts": () => import("./de-CBE6O79z.js"),
|
|
523
|
+
"./locales/en.ts": () => import("./en-CDexnk0p.js"),
|
|
524
|
+
"./locales/es.ts": () => import("./es-BE42B6uN.js"),
|
|
525
|
+
"./locales/fr.ts": () => import("./fr-DlJFPDQR.js"),
|
|
526
|
+
"./locales/ja.ts": () => import("./ja-CUT8gkNI.js"),
|
|
527
|
+
"./locales/nl.ts": () => import("./nl-bXWqqRyS.js"),
|
|
528
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-2_H4-wlb.js")
|
|
529
|
+
}), ar = /* #__PURE__ */ Object.assign({
|
|
530
|
+
"./locales/cloud/de.ts": () => import("./de-D_atmUVB.js"),
|
|
531
|
+
"./locales/cloud/en.ts": () => import("./en-DhJLnaBx.js"),
|
|
532
|
+
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-BphMoUTw.js")
|
|
605
533
|
});
|
|
606
|
-
function
|
|
534
|
+
function or(e) {
|
|
607
535
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
608
536
|
}
|
|
609
|
-
var
|
|
610
|
-
function
|
|
537
|
+
var sr = or(ir), cr = or(ar);
|
|
538
|
+
function lr(e) {
|
|
611
539
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
612
540
|
}
|
|
613
|
-
function
|
|
614
|
-
let n =
|
|
615
|
-
return t.find((e) =>
|
|
541
|
+
function ur(e, t) {
|
|
542
|
+
let n = lr(e);
|
|
543
|
+
return t.find((e) => lr(e) === n);
|
|
616
544
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
545
|
+
function dr(e) {
|
|
546
|
+
return lr(e).split("-")[0];
|
|
619
547
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
548
|
+
function fr(e, t) {
|
|
549
|
+
return ur(e, t) ?? ur(dr(e), t);
|
|
622
550
|
}
|
|
623
|
-
function
|
|
624
|
-
return
|
|
551
|
+
function pr(e, t) {
|
|
552
|
+
return fr(e, t) ?? "en";
|
|
625
553
|
}
|
|
626
|
-
async function
|
|
627
|
-
let t =
|
|
554
|
+
async function mr(e) {
|
|
555
|
+
let t = ir[`./locales/${pr(e, sr)}.ts`];
|
|
628
556
|
return (await t()).default;
|
|
629
557
|
}
|
|
630
|
-
async function
|
|
631
|
-
let t =
|
|
558
|
+
async function hr(e) {
|
|
559
|
+
let t = ar[`./locales/cloud/${pr(e, cr)}.ts`];
|
|
632
560
|
return (await t()).default;
|
|
633
561
|
}
|
|
634
|
-
function
|
|
635
|
-
return
|
|
562
|
+
function gr(e) {
|
|
563
|
+
return fr(e, sr) !== void 0;
|
|
636
564
|
}
|
|
637
|
-
function
|
|
638
|
-
return
|
|
565
|
+
function _r(e) {
|
|
566
|
+
return fr(e, cr) !== void 0;
|
|
639
567
|
}
|
|
640
|
-
function
|
|
641
|
-
return [...
|
|
568
|
+
function vr() {
|
|
569
|
+
return [...sr];
|
|
642
570
|
}
|
|
643
|
-
function
|
|
644
|
-
return [...
|
|
571
|
+
function yr() {
|
|
572
|
+
return [...cr];
|
|
645
573
|
}
|
|
646
574
|
//#endregion
|
|
647
575
|
//#region src/i18n/contentDefaults.ts
|
|
@@ -710,16 +638,16 @@ var $ = {
|
|
|
710
638
|
seconds: "秒",
|
|
711
639
|
expired: "このオファーは終了しました"
|
|
712
640
|
}
|
|
713
|
-
},
|
|
714
|
-
function
|
|
641
|
+
}, br = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
|
|
642
|
+
function xr(e) {
|
|
715
643
|
if (!e) return $.en;
|
|
716
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
644
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = br.get(t);
|
|
717
645
|
if (n) return $[n];
|
|
718
|
-
let r =
|
|
646
|
+
let r = br.get(dr(t));
|
|
719
647
|
return r ? $[r] : $.en;
|
|
720
648
|
}
|
|
721
|
-
function
|
|
722
|
-
let t =
|
|
649
|
+
function Sr(e) {
|
|
650
|
+
let t = xr(e);
|
|
723
651
|
return {
|
|
724
652
|
video: { alt: t.video },
|
|
725
653
|
countdown: {
|
|
@@ -733,9 +661,9 @@ function br(e) {
|
|
|
733
661
|
}
|
|
734
662
|
//#endregion
|
|
735
663
|
//#region src/utils/collectColorFieldIssues.ts
|
|
736
|
-
function
|
|
664
|
+
function Cr(e, t) {
|
|
737
665
|
let n = [], r = (r, i) => {
|
|
738
|
-
let a =
|
|
666
|
+
let a = $e(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
739
667
|
if (a.invalidPresets.length > 0 && n.push({
|
|
740
668
|
id: s("invalid-presets"),
|
|
741
669
|
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." : "")
|
|
@@ -746,8 +674,8 @@ function xr(e, t) {
|
|
|
746
674
|
id: s("allow-custom-ignored"),
|
|
747
675
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
748
676
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
749
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
750
|
-
e !== "" && !t.has(
|
|
677
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => cn(e)));
|
|
678
|
+
e !== "" && !t.has(cn(e)) && n.push({
|
|
751
679
|
id: s("off-palette-default"),
|
|
752
680
|
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.`
|
|
753
681
|
});
|
|
@@ -759,7 +687,7 @@ function xr(e, t) {
|
|
|
759
687
|
}
|
|
760
688
|
//#endregion
|
|
761
689
|
//#region src/utils/keyboardShortcuts.ts
|
|
762
|
-
function
|
|
690
|
+
function wr(e) {
|
|
763
691
|
for (let t of e.composedPath()) {
|
|
764
692
|
if (!(t instanceof HTMLElement)) continue;
|
|
765
693
|
if (t.isContentEditable) return !0;
|
|
@@ -768,14 +696,14 @@ function Sr(e) {
|
|
|
768
696
|
}
|
|
769
697
|
return !1;
|
|
770
698
|
}
|
|
771
|
-
function
|
|
699
|
+
function Tr(e, t) {
|
|
772
700
|
let n = e.metaKey || e.ctrlKey;
|
|
773
701
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
774
702
|
else if (n && e.key.toLowerCase() === "z") {
|
|
775
|
-
if (
|
|
776
|
-
e.preventDefault(), e.shiftKey ? t.history.redo() :
|
|
703
|
+
if (wr(e)) return;
|
|
704
|
+
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
777
705
|
} else {
|
|
778
|
-
if (t.isPicking?.() && !
|
|
706
|
+
if (t.isPicking?.() && !wr(e)) {
|
|
779
707
|
if (e.key === "Escape") {
|
|
780
708
|
e.preventDefault(), t.onCancelPick?.();
|
|
781
709
|
return;
|
|
@@ -789,78 +717,105 @@ function Cr(e, t) {
|
|
|
789
717
|
return;
|
|
790
718
|
}
|
|
791
719
|
}
|
|
792
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
720
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !wr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
793
721
|
}
|
|
794
722
|
}
|
|
795
723
|
//#endregion
|
|
796
724
|
//#region src/utils/blockComponentResolver.ts
|
|
797
|
-
function
|
|
725
|
+
function Er(e, t) {
|
|
798
726
|
let n = { fontFamily: t(e.fontFamily) };
|
|
799
727
|
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;
|
|
800
728
|
}
|
|
801
|
-
function
|
|
729
|
+
function Dr(e, t, n) {
|
|
802
730
|
if (t) {
|
|
803
731
|
let n = t.getComponent(e);
|
|
804
732
|
if (n) return n;
|
|
805
733
|
}
|
|
806
734
|
return n[e.type] ?? null;
|
|
807
735
|
}
|
|
808
|
-
var
|
|
809
|
-
function
|
|
736
|
+
var Or = "--tpl-block-bg-layer", kr = "tpl-has-bg-image";
|
|
737
|
+
function Ar(e, t) {
|
|
810
738
|
if (t === null) return {};
|
|
811
|
-
let n =
|
|
739
|
+
let n = oe(e);
|
|
812
740
|
if (n === null) return {};
|
|
813
|
-
let r = t?.trim(), i = r ?
|
|
741
|
+
let r = t?.trim(), i = r ? ke(r) : n.url;
|
|
814
742
|
return {
|
|
815
743
|
backgroundImage: `url("${i}")`,
|
|
816
744
|
backgroundSize: n.size,
|
|
817
745
|
backgroundPosition: n.position,
|
|
818
746
|
backgroundRepeat: n.repeat,
|
|
819
|
-
[
|
|
747
|
+
[Or]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
function jr(e) {
|
|
751
|
+
return e && Or in e ? kr : void 0;
|
|
752
|
+
}
|
|
753
|
+
var Mr = {
|
|
754
|
+
top: "flex-start",
|
|
755
|
+
middle: "center",
|
|
756
|
+
bottom: "flex-end"
|
|
757
|
+
};
|
|
758
|
+
function Nr(e, t) {
|
|
759
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Pr(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
760
|
+
return {
|
|
761
|
+
display: "flex",
|
|
762
|
+
flexDirection: "column",
|
|
763
|
+
justifyContent: Mr[e.verticalAlign],
|
|
764
|
+
boxSizing: "border-box",
|
|
765
|
+
...n
|
|
820
766
|
};
|
|
821
767
|
}
|
|
822
|
-
function
|
|
823
|
-
return
|
|
768
|
+
function Pr(e, t) {
|
|
769
|
+
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
824
770
|
}
|
|
825
|
-
function
|
|
771
|
+
function Fr(e, t = {}) {
|
|
826
772
|
if (e.type === "wrapper") return {};
|
|
827
773
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
828
774
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
829
775
|
backgroundColor: r || "transparent"
|
|
830
776
|
};
|
|
831
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
832
|
-
let n =
|
|
833
|
-
n !== null && (i.borderRadius = n)
|
|
777
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? re.paragraphGap : re.paragraphGap}px`), e.type === "section") {
|
|
778
|
+
let n = z(e.borderRadius);
|
|
779
|
+
n !== null && (i.borderRadius = n);
|
|
780
|
+
let r = V(e);
|
|
781
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Nr(r, t.heroBoxWidth)), Object.assign(i, Ar({
|
|
782
|
+
...e.backgroundImage,
|
|
783
|
+
size: "cover",
|
|
784
|
+
repeat: !1
|
|
785
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, Lr(e.border)), Object.assign(i, Ar(e.backgroundImage, t.backgroundImageUrl)));
|
|
834
786
|
}
|
|
835
787
|
return i;
|
|
836
788
|
}
|
|
837
|
-
function
|
|
838
|
-
return e.type === "section" ?
|
|
789
|
+
function Ir(e, t, n, r) {
|
|
790
|
+
return e.type === "section" ? Fr(e, {
|
|
791
|
+
backgroundImageUrl: st(t, e.backgroundImage, n),
|
|
792
|
+
heroBoxWidth: r
|
|
793
|
+
}) : Fr(e);
|
|
839
794
|
}
|
|
840
|
-
function
|
|
795
|
+
function Lr(e) {
|
|
841
796
|
let t = {};
|
|
842
|
-
for (let [n, r] of Object.entries(
|
|
797
|
+
for (let [n, r] of Object.entries(Ue(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
843
798
|
return t;
|
|
844
799
|
}
|
|
845
|
-
function
|
|
800
|
+
function Rr(e, t = {}) {
|
|
846
801
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
847
802
|
let n = e.wrapper, r = {};
|
|
848
803
|
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 =
|
|
850
|
-
return i !== null && (r.borderRadius = i), Object.assign(r,
|
|
804
|
+
let i = z(n.borderRadius);
|
|
805
|
+
return i !== null && (r.borderRadius = i), Object.assign(r, Ar(n.backgroundImage, t.backgroundImageUrl)), r;
|
|
851
806
|
}
|
|
852
|
-
function
|
|
807
|
+
function zr(e, t = {}) {
|
|
853
808
|
if (e.type !== "wrapper") return null;
|
|
854
809
|
let n = {};
|
|
855
810
|
if (e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
856
811
|
let t = e.styles.padding;
|
|
857
812
|
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
858
813
|
}
|
|
859
|
-
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n,
|
|
814
|
+
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Ar(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
860
815
|
}
|
|
861
816
|
//#endregion
|
|
862
817
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
863
|
-
function
|
|
818
|
+
function Br(e, t, n, r = !1) {
|
|
864
819
|
if (!e) return [];
|
|
865
820
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
866
821
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -869,18 +824,18 @@ function Fr(e, t, n, r = !1) {
|
|
|
869
824
|
value: e.slice(o, s.index)
|
|
870
825
|
});
|
|
871
826
|
let i = s[0];
|
|
872
|
-
if (
|
|
873
|
-
let e = r ?
|
|
827
|
+
if (Se(i, n)) {
|
|
828
|
+
let e = r ? Ne(i, t) : void 0;
|
|
874
829
|
a.push(e === void 0 ? {
|
|
875
830
|
type: "tag",
|
|
876
|
-
value:
|
|
831
|
+
value: ve(i, t)
|
|
877
832
|
} : {
|
|
878
833
|
type: "text",
|
|
879
834
|
value: e
|
|
880
835
|
});
|
|
881
|
-
} else
|
|
836
|
+
} else Re(i, n) ? a.push({
|
|
882
837
|
type: "tag",
|
|
883
|
-
value:
|
|
838
|
+
value: De(i, n)
|
|
884
839
|
}) : a.push({
|
|
885
840
|
type: "text",
|
|
886
841
|
value: i
|
|
@@ -894,27 +849,27 @@ function Fr(e, t, n, r = !1) {
|
|
|
894
849
|
}
|
|
895
850
|
//#endregion
|
|
896
851
|
//#region src/components/MergeTagPreviewText.vue
|
|
897
|
-
var
|
|
852
|
+
var Vr = d({
|
|
898
853
|
name: "MergeTagPreviewText",
|
|
899
854
|
props: { text: {
|
|
900
855
|
type: String,
|
|
901
856
|
required: !0
|
|
902
857
|
} },
|
|
903
858
|
setup(e) {
|
|
904
|
-
let t = n(
|
|
905
|
-
return () => a.value.map((e, t) => e.type === "tag" ?
|
|
859
|
+
let t = n(q, xt), r = n(At, Me.liquid), i = n(jt, null), a = y(() => Br(e.text, t.value, r, i?.value ?? !1));
|
|
860
|
+
return () => a.value.map((e, t) => e.type === "tag" ? F("span", {
|
|
906
861
|
key: t,
|
|
907
862
|
class: "tpl-merge-tag-label"
|
|
908
863
|
}, e.value) : e.value);
|
|
909
864
|
}
|
|
910
|
-
}),
|
|
865
|
+
}), Hr = ["href"], Ur = /* @__PURE__ */ d({
|
|
911
866
|
__name: "ButtonBlock",
|
|
912
867
|
props: {
|
|
913
868
|
block: {},
|
|
914
869
|
viewport: {}
|
|
915
870
|
},
|
|
916
871
|
setup(e) {
|
|
917
|
-
let t = e, n =
|
|
872
|
+
let t = e, n = K(Y, "ButtonBlock"), r = y(() => {
|
|
918
873
|
let e = {
|
|
919
874
|
display: "inline-block",
|
|
920
875
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -923,56 +878,56 @@ var Ir = d({
|
|
|
923
878
|
fontSize: `${t.block.fontSize}px`,
|
|
924
879
|
fontWeight: "bold",
|
|
925
880
|
textDecoration: "none",
|
|
926
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
881
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : z(t.block.borderRadius) ?? "0px",
|
|
927
882
|
textAlign: "center"
|
|
928
883
|
};
|
|
929
|
-
return Object.assign(e,
|
|
930
|
-
}), i =
|
|
931
|
-
return (t, n) => (s(),
|
|
884
|
+
return Object.assign(e, Lr(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;
|
|
885
|
+
}), i = y(() => ({ textAlign: t.block.align ?? "center" }));
|
|
886
|
+
return (t, n) => (s(), b("div", { style: E(i.value) }, [O("a", {
|
|
932
887
|
href: e.block.url || "#",
|
|
933
|
-
style:
|
|
888
|
+
style: E(r.value),
|
|
934
889
|
class: "tpl:cursor-default",
|
|
935
|
-
onClick: n[0] ||=
|
|
936
|
-
}, [
|
|
890
|
+
onClick: n[0] ||= T(() => {}, ["prevent"])
|
|
891
|
+
}, [h(Vr, { text: e.block.text }, null, 8, ["text"])], 12, Hr)], 4));
|
|
937
892
|
}
|
|
938
|
-
}),
|
|
893
|
+
}), Wr = ["innerHTML"], Gr = [
|
|
939
894
|
"src",
|
|
940
895
|
"width",
|
|
941
896
|
"height"
|
|
942
|
-
],
|
|
897
|
+
], Kr = /* @__PURE__ */ d({
|
|
943
898
|
__name: "CustomBlockIcon",
|
|
944
899
|
props: {
|
|
945
900
|
icon: {},
|
|
946
901
|
size: {}
|
|
947
902
|
},
|
|
948
903
|
setup(e) {
|
|
949
|
-
let t = e, n =
|
|
950
|
-
return (t, a) => r.value ? (s(),
|
|
904
|
+
let t = e, n = y(() => t.size ?? 20), r = y(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = y(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
905
|
+
return (t, a) => r.value ? (s(), b("span", {
|
|
951
906
|
key: 0,
|
|
952
907
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
953
|
-
style:
|
|
908
|
+
style: E({
|
|
954
909
|
width: `${n.value}px`,
|
|
955
910
|
height: `${n.value}px`
|
|
956
911
|
}),
|
|
957
912
|
innerHTML: e.icon
|
|
958
|
-
}, null, 12,
|
|
913
|
+
}, null, 12, Wr)) : i.value ? (s(), b("img", {
|
|
959
914
|
key: 1,
|
|
960
915
|
src: e.icon,
|
|
961
916
|
width: n.value,
|
|
962
917
|
height: n.value,
|
|
963
918
|
class: "tpl:inline-block",
|
|
964
919
|
alt: ""
|
|
965
|
-
}, null, 8,
|
|
920
|
+
}, null, 8, Gr)) : (s(), D(m(vn), {
|
|
966
921
|
key: 2,
|
|
967
922
|
size: n.value,
|
|
968
923
|
"stroke-width": 1.5
|
|
969
924
|
}, null, 8, ["size"]));
|
|
970
925
|
}
|
|
971
|
-
}),
|
|
972
|
-
function
|
|
973
|
-
let r =
|
|
926
|
+
}), qr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
927
|
+
function Jr(e, n) {
|
|
928
|
+
let r = jn(), i = null, a = null, o = null;
|
|
974
929
|
function s() {
|
|
975
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
930
|
+
return e.value ? Array.from(e.value.querySelectorAll(qr)).filter((e) => e.offsetParent !== null) : [];
|
|
976
931
|
}
|
|
977
932
|
function c(e) {
|
|
978
933
|
if (e.key !== "Tab") return;
|
|
@@ -987,7 +942,7 @@ function Ur(e, n) {
|
|
|
987
942
|
o = null;
|
|
988
943
|
let t = s();
|
|
989
944
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
990
|
-
}), a =
|
|
945
|
+
}), a = pt(e, "keydown", c);
|
|
991
946
|
}
|
|
992
947
|
function u(e = {}) {
|
|
993
948
|
let t = e.restoreFocus !== !1;
|
|
@@ -996,15 +951,15 @@ function Ur(e, n) {
|
|
|
996
951
|
let d = t([n, e], ([e, t]) => {
|
|
997
952
|
e && t ? l() : u();
|
|
998
953
|
}, { flush: "post" });
|
|
999
|
-
|
|
954
|
+
p(() => {
|
|
1000
955
|
d(), u();
|
|
1001
956
|
});
|
|
1002
957
|
}
|
|
1003
958
|
//#endregion
|
|
1004
959
|
//#region src/composables/useEmoji.ts
|
|
1005
|
-
function
|
|
1006
|
-
let [e, n] =
|
|
1007
|
-
|
|
960
|
+
function Yr() {
|
|
961
|
+
let [e, n] = dt(!1), r = v([]), i = !1;
|
|
962
|
+
p(() => {
|
|
1008
963
|
i = !0;
|
|
1009
964
|
}), t(e, async (e) => {
|
|
1010
965
|
if (e && r.value.length === 0) {
|
|
@@ -1028,7 +983,7 @@ function Wr() {
|
|
|
1028
983
|
}
|
|
1029
984
|
//#endregion
|
|
1030
985
|
//#region src/composables/useFonts.ts
|
|
1031
|
-
var
|
|
986
|
+
var Xr = [
|
|
1032
987
|
{
|
|
1033
988
|
value: "Arial",
|
|
1034
989
|
label: "Arial"
|
|
@@ -1057,19 +1012,19 @@ var Gr = [
|
|
|
1057
1012
|
value: "Courier New",
|
|
1058
1013
|
label: "Courier New"
|
|
1059
1014
|
}
|
|
1060
|
-
],
|
|
1061
|
-
function
|
|
1062
|
-
if (e === void 0 || e === !0) return [...
|
|
1015
|
+
], Zr = "Arial, sans-serif";
|
|
1016
|
+
function Qr(e) {
|
|
1017
|
+
if (e === void 0 || e === !0) return [...Xr];
|
|
1063
1018
|
if (e === !1) return [];
|
|
1064
1019
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1065
1020
|
for (let i of e) {
|
|
1066
|
-
let e = i.toLowerCase(), a =
|
|
1067
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
1021
|
+
let e = i.toLowerCase(), a = Xr.find((t) => t.value.toLowerCase() === e);
|
|
1022
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), Z.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Xr.map((e) => e.value).join(", ")}.`));
|
|
1068
1023
|
}
|
|
1069
1024
|
return t;
|
|
1070
1025
|
}
|
|
1071
|
-
function
|
|
1072
|
-
let t = l(e?.customFonts ?? []), n = l(!1), r =
|
|
1026
|
+
function $r(e) {
|
|
1027
|
+
let t = l(e?.customFonts ?? []), n = l(!1), r = Qr(e?.builtIns), i = y(() => e?.defaultFallback ?? Zr), a = y(() => {
|
|
1073
1028
|
let e = [...r], n = t.value.map((e) => ({
|
|
1074
1029
|
value: e.name,
|
|
1075
1030
|
label: e.name,
|
|
@@ -1080,23 +1035,23 @@ function Jr(e) {
|
|
|
1080
1035
|
function s(e) {
|
|
1081
1036
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1082
1037
|
}
|
|
1083
|
-
let c = e?.defaultFont ??
|
|
1084
|
-
s(c) ||
|
|
1038
|
+
let c = e?.defaultFont ?? Zr.split(",")[0].trim();
|
|
1039
|
+
s(c) || Z.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.`);
|
|
1085
1040
|
function u() {
|
|
1086
1041
|
if (e?.defaultFont && s(e.defaultFont)) {
|
|
1087
1042
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1088
1043
|
if (t) return t.value;
|
|
1089
1044
|
}
|
|
1090
|
-
return
|
|
1045
|
+
return Zr;
|
|
1091
1046
|
}
|
|
1092
|
-
let d =
|
|
1047
|
+
let d = y(() => u());
|
|
1093
1048
|
function f(e) {
|
|
1094
|
-
return
|
|
1049
|
+
return Ve(e, {
|
|
1095
1050
|
customFonts: t.value,
|
|
1096
1051
|
defaultFallback: i.value
|
|
1097
1052
|
});
|
|
1098
1053
|
}
|
|
1099
|
-
let
|
|
1054
|
+
let m = [], h = !1;
|
|
1100
1055
|
async function g() {
|
|
1101
1056
|
if (t.value.length === 0) {
|
|
1102
1057
|
h || (n.value = !0);
|
|
@@ -1106,20 +1061,20 @@ function Jr(e) {
|
|
|
1106
1061
|
try {
|
|
1107
1062
|
if (document.querySelector(`link[data-custom-font="${CSS.escape(e.name)}"]`)) return;
|
|
1108
1063
|
let t = document.createElement("link");
|
|
1109
|
-
t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name),
|
|
1064
|
+
t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), m.push(t), await new Promise((n, r) => {
|
|
1110
1065
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1111
1066
|
});
|
|
1112
1067
|
} catch (t) {
|
|
1113
|
-
|
|
1068
|
+
Z.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1114
1069
|
}
|
|
1115
1070
|
});
|
|
1116
1071
|
await Promise.allSettled(e), !h && (n.value = !0);
|
|
1117
1072
|
}
|
|
1118
1073
|
function _() {
|
|
1119
|
-
for (let e of
|
|
1120
|
-
|
|
1074
|
+
for (let e of m) e.remove();
|
|
1075
|
+
m.length = 0;
|
|
1121
1076
|
}
|
|
1122
|
-
return o() &&
|
|
1077
|
+
return o() && p(() => {
|
|
1123
1078
|
h = !0, _();
|
|
1124
1079
|
}), {
|
|
1125
1080
|
fonts: a,
|
|
@@ -1135,12 +1090,12 @@ function Jr(e) {
|
|
|
1135
1090
|
}
|
|
1136
1091
|
//#endregion
|
|
1137
1092
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1138
|
-
function
|
|
1139
|
-
return
|
|
1093
|
+
function ei(e, t, n) {
|
|
1094
|
+
return Re(e, n) ? {
|
|
1140
1095
|
type: "logicMergeTagNode",
|
|
1141
1096
|
attrs: {
|
|
1142
1097
|
value: e,
|
|
1143
|
-
keyword:
|
|
1098
|
+
keyword: De(e, n)
|
|
1144
1099
|
}
|
|
1145
1100
|
} : {
|
|
1146
1101
|
type: "mergeTagNode",
|
|
@@ -1152,33 +1107,33 @@ function Yr(e, t, n) {
|
|
|
1152
1107
|
}
|
|
1153
1108
|
//#endregion
|
|
1154
1109
|
//#region src/utils/insertLogicTag.ts
|
|
1155
|
-
function
|
|
1110
|
+
function ti(e) {
|
|
1156
1111
|
return "before" in e && "after" in e;
|
|
1157
1112
|
}
|
|
1158
|
-
function
|
|
1159
|
-
if (!
|
|
1160
|
-
e.chain().focus().insertContent(
|
|
1113
|
+
function ni(e, t, n) {
|
|
1114
|
+
if (!ti(t)) {
|
|
1115
|
+
e.chain().focus().insertContent(ei(t.value, t.label, n)).run();
|
|
1161
1116
|
return;
|
|
1162
1117
|
}
|
|
1163
|
-
let r =
|
|
1118
|
+
let r = ei(t.before, t.label, n), i = ei(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1164
1119
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1165
1120
|
}
|
|
1166
1121
|
//#endregion
|
|
1167
1122
|
//#region src/utils/linkColorExtension.ts
|
|
1168
|
-
function
|
|
1123
|
+
function ri(e) {
|
|
1169
1124
|
if (!e) return null;
|
|
1170
1125
|
let t = e.trim();
|
|
1171
1126
|
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;
|
|
1172
1127
|
}
|
|
1173
|
-
function
|
|
1128
|
+
function ii(e) {
|
|
1174
1129
|
return e.extend({ addAttributes() {
|
|
1175
1130
|
return {
|
|
1176
1131
|
...this.parent?.(),
|
|
1177
1132
|
color: {
|
|
1178
1133
|
default: null,
|
|
1179
|
-
parseHTML: (e) =>
|
|
1134
|
+
parseHTML: (e) => ri(sn(e.style.color)),
|
|
1180
1135
|
renderHTML: (e) => {
|
|
1181
|
-
let t =
|
|
1136
|
+
let t = ri(e.color);
|
|
1182
1137
|
return t ? { style: `color: ${t}` } : {};
|
|
1183
1138
|
}
|
|
1184
1139
|
}
|
|
@@ -1187,9 +1142,9 @@ function $r(e) {
|
|
|
1187
1142
|
}
|
|
1188
1143
|
//#endregion
|
|
1189
1144
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1190
|
-
function
|
|
1145
|
+
function ai(e, t = Me.liquid) {
|
|
1191
1146
|
let n = l(!1), r = l(""), i = l(""), a = l(null);
|
|
1192
|
-
|
|
1147
|
+
Jr(a, n);
|
|
1193
1148
|
function o() {
|
|
1194
1149
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1195
1150
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -1198,7 +1153,7 @@ function ei(e, t = Ie.liquid) {
|
|
|
1198
1153
|
if (r.value) {
|
|
1199
1154
|
let t = f(r.value);
|
|
1200
1155
|
if (t !== null) {
|
|
1201
|
-
let n =
|
|
1156
|
+
let n = ri(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1202
1157
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1203
1158
|
}
|
|
1204
1159
|
}
|
|
@@ -1250,13 +1205,13 @@ function ei(e, t = Ie.liquid) {
|
|
|
1250
1205
|
}
|
|
1251
1206
|
//#endregion
|
|
1252
1207
|
//#region src/composables/useRichTextEditor.ts
|
|
1253
|
-
function
|
|
1254
|
-
let i = n(
|
|
1208
|
+
function oi(r) {
|
|
1209
|
+
let i = n(J, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = Mn(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Nn(), h = n(Lt, null), g = (k(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = xe(u), y = v(null), b = () => W(i?.content?.value?.settings ?? { locale: "en" });
|
|
1255
1210
|
t(b, (e) => {
|
|
1256
|
-
let t =
|
|
1211
|
+
let t = y.value?.view.dom;
|
|
1257
1212
|
t && t.setAttribute("dir", e);
|
|
1258
1213
|
});
|
|
1259
|
-
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown:
|
|
1214
|
+
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: A } = ai(y, u), { start: j, stop: M } = lt(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), N = v(null), P = l(!0), F = l(null), I = !1, L = null;
|
|
1260
1215
|
async function R() {
|
|
1261
1216
|
F.value = null, P.value = !0;
|
|
1262
1217
|
try {
|
|
@@ -1284,18 +1239,18 @@ function ti(r) {
|
|
|
1284
1239
|
s.destroy();
|
|
1285
1240
|
return;
|
|
1286
1241
|
}
|
|
1287
|
-
|
|
1242
|
+
y.value = s, P.value = !1, j();
|
|
1288
1243
|
} catch (e) {
|
|
1289
1244
|
if (I) return;
|
|
1290
|
-
|
|
1245
|
+
Z.error(`[${r.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
1291
1246
|
}
|
|
1292
1247
|
}
|
|
1293
1248
|
function z() {
|
|
1294
|
-
|
|
1249
|
+
y.value?.destroy(), y.value = null, R();
|
|
1295
1250
|
}
|
|
1296
1251
|
R();
|
|
1297
1252
|
let B = t(() => r.blockContent(), (e) => {
|
|
1298
|
-
|
|
1253
|
+
y.value && e !== L && (L = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
1299
1254
|
});
|
|
1300
1255
|
function V(e) {
|
|
1301
1256
|
if (s.value || p.value) return;
|
|
@@ -1305,22 +1260,22 @@ function ti(r) {
|
|
|
1305
1260
|
let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1306
1261
|
n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
|
|
1307
1262
|
}
|
|
1308
|
-
|
|
1309
|
-
I = !0, B(), M(),
|
|
1263
|
+
pt(document, "mousedown", V), e(() => {
|
|
1264
|
+
I = !0, B(), M(), y.value?.destroy();
|
|
1310
1265
|
});
|
|
1311
1266
|
async function H() {
|
|
1312
1267
|
let e = await c();
|
|
1313
|
-
I || (e &&
|
|
1268
|
+
I || (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
1314
1269
|
label: e.label,
|
|
1315
1270
|
value: e.value
|
|
1316
|
-
}).run() :
|
|
1271
|
+
}).run() : y.value?.commands.focus());
|
|
1317
1272
|
}
|
|
1318
1273
|
async function U() {
|
|
1319
1274
|
let e = await m();
|
|
1320
|
-
I || (e &&
|
|
1275
|
+
I || (e && y.value ? ni(y.value, e, u) : y.value?.commands.focus());
|
|
1321
1276
|
}
|
|
1322
1277
|
return {
|
|
1323
|
-
editor:
|
|
1278
|
+
editor: y,
|
|
1324
1279
|
EditorContent: N,
|
|
1325
1280
|
isLoading: P,
|
|
1326
1281
|
initError: F,
|
|
@@ -1339,37 +1294,37 @@ function ti(r) {
|
|
|
1339
1294
|
insertLink: E,
|
|
1340
1295
|
removeLink: D,
|
|
1341
1296
|
closeLinkDialog: O,
|
|
1342
|
-
handleLinkKeydown:
|
|
1297
|
+
handleLinkKeydown: A,
|
|
1343
1298
|
handleAddMergeTag: H,
|
|
1344
1299
|
handleAddLogicTag: U
|
|
1345
1300
|
};
|
|
1346
1301
|
}
|
|
1347
1302
|
//#endregion
|
|
1348
1303
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1349
|
-
var
|
|
1350
|
-
function
|
|
1351
|
-
let t =
|
|
1304
|
+
var si = "(max-width: 767px)";
|
|
1305
|
+
function ci(e) {
|
|
1306
|
+
let t = mt(si);
|
|
1352
1307
|
return {
|
|
1353
1308
|
isSmallScreen: t,
|
|
1354
|
-
showNotice:
|
|
1309
|
+
showNotice: y(() => (A(e) ?? !0) && t.value)
|
|
1355
1310
|
};
|
|
1356
1311
|
}
|
|
1357
1312
|
//#endregion
|
|
1358
1313
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1359
|
-
var
|
|
1314
|
+
var li = { class: "tpl:w-full" }, ui = {
|
|
1360
1315
|
key: 0,
|
|
1361
1316
|
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
|
-
},
|
|
1317
|
+
}, di = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fi = {
|
|
1363
1318
|
key: 1,
|
|
1364
1319
|
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
|
-
},
|
|
1320
|
+
}, pi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, mi = {
|
|
1366
1321
|
key: 2,
|
|
1367
1322
|
class: "tpl:relative"
|
|
1368
|
-
},
|
|
1323
|
+
}, hi = ["innerHTML"], gi = {
|
|
1369
1324
|
key: 0,
|
|
1370
1325
|
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]",
|
|
1371
1326
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1372
|
-
},
|
|
1327
|
+
}, _i = /* @__PURE__ */ d({
|
|
1373
1328
|
__name: "CustomBlock",
|
|
1374
1329
|
props: {
|
|
1375
1330
|
block: {},
|
|
@@ -1377,19 +1332,19 @@ var ii = { class: "tpl:w-full" }, ai = {
|
|
|
1377
1332
|
},
|
|
1378
1333
|
emits: ["fetchData"],
|
|
1379
1334
|
setup(e, { emit: r }) {
|
|
1380
|
-
let i = e, a = r, { t: o } =
|
|
1335
|
+
let i = e, a = r, { t: o } = X(), c = n(tn, null), u = l(""), d = l(!1), f = y(() => c?.getDefinition(i.block.customType)), p = y(() => !!f.value), g = y(() => i.block), { isFetching: _, fetch: v, needsFetch: S, hasDataSource: w } = Je({
|
|
1381
1336
|
definition: f,
|
|
1382
|
-
block:
|
|
1337
|
+
block: g,
|
|
1383
1338
|
onUpdate: (e, t) => {
|
|
1384
1339
|
a("fetchData", {
|
|
1385
1340
|
fieldValues: e,
|
|
1386
1341
|
dataSourceFetched: t
|
|
1387
1342
|
});
|
|
1388
1343
|
}
|
|
1389
|
-
}),
|
|
1390
|
-
if (!
|
|
1344
|
+
}), E = n(q, xt), k = n(jt, null), A = y(() => {
|
|
1345
|
+
if (!k?.value) return i.block;
|
|
1391
1346
|
let e = {};
|
|
1392
|
-
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1347
|
+
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? Te(n, E.value) : n;
|
|
1393
1348
|
return {
|
|
1394
1349
|
...i.block,
|
|
1395
1350
|
fieldValues: e
|
|
@@ -1406,102 +1361,102 @@ var ii = { class: "tpl:w-full" }, ai = {
|
|
|
1406
1361
|
}
|
|
1407
1362
|
}
|
|
1408
1363
|
}
|
|
1409
|
-
let M =
|
|
1410
|
-
return
|
|
1364
|
+
let M = ut(j, 150);
|
|
1365
|
+
return C(() => {
|
|
1411
1366
|
j();
|
|
1412
1367
|
}), t(() => i.block.fieldValues, () => {
|
|
1413
1368
|
M();
|
|
1414
|
-
}, { deep: !0 }), t(() =>
|
|
1369
|
+
}, { deep: !0 }), t(() => k?.value, () => {
|
|
1415
1370
|
M();
|
|
1416
|
-
}), (e, t) => (s(),
|
|
1371
|
+
}), (e, t) => (s(), b("div", li, [p.value ? d.value ? (s(), b("div", fi, [h(m(Sn), {
|
|
1417
1372
|
size: 24,
|
|
1418
1373
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1419
|
-
}),
|
|
1374
|
+
}), O("span", pi, P(m(o).customBlocks.renderError), 1)])) : (s(), b("div", mi, [O("div", { innerHTML: u.value }, null, 8, hi), m(w) && m(S) ? (s(), b("div", gi, [m(_) ? (s(), D(kn, {
|
|
1420
1375
|
key: 1,
|
|
1421
1376
|
class: "tpl:w-48"
|
|
1422
|
-
})) : (s(),
|
|
1377
|
+
})) : (s(), b("button", {
|
|
1423
1378
|
key: 0,
|
|
1424
1379
|
type: "button",
|
|
1425
1380
|
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)]",
|
|
1426
|
-
onClick: t[0] ||=
|
|
1427
|
-
}, [f.value?.icon ? (s(),
|
|
1381
|
+
onClick: t[0] ||= T((...e) => m(v) && m(v)(...e), ["stop"])
|
|
1382
|
+
}, [f.value?.icon ? (s(), D(Kr, {
|
|
1428
1383
|
key: 0,
|
|
1429
1384
|
icon: f.value.icon,
|
|
1430
1385
|
size: 16
|
|
1431
|
-
}, null, 8, ["icon"])) :
|
|
1386
|
+
}, null, 8, ["icon"])) : x("", !0), L(" " + P(f.value?.dataSource?.label || m(o).customBlocks.dataSource.fetchButton), 1)]))])) : x("", !0)])) : (s(), b("div", ui, [h(m(_n), {
|
|
1432
1387
|
size: 24,
|
|
1433
1388
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1434
|
-
}),
|
|
1389
|
+
}), O("span", di, P(m(o).customBlocks.definitionNotFound), 1)]))]));
|
|
1435
1390
|
}
|
|
1436
|
-
}),
|
|
1391
|
+
}), vi = { class: "tpl:w-full" }, yi = /* @__PURE__ */ d({
|
|
1437
1392
|
__name: "DividerBlock",
|
|
1438
1393
|
props: {
|
|
1439
1394
|
block: {},
|
|
1440
1395
|
viewport: {}
|
|
1441
1396
|
},
|
|
1442
1397
|
setup(e) {
|
|
1443
|
-
let t = e, n =
|
|
1398
|
+
let t = e, n = y(() => ({
|
|
1444
1399
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1445
1400
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1446
1401
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1447
1402
|
}));
|
|
1448
|
-
return (e, t) => (s(),
|
|
1403
|
+
return (e, t) => (s(), b("div", vi, [O("hr", {
|
|
1449
1404
|
class: "tpl:m-0 tpl:border-none",
|
|
1450
|
-
style:
|
|
1405
|
+
style: E(n.value)
|
|
1451
1406
|
}, null, 4)]));
|
|
1452
1407
|
}
|
|
1453
|
-
}),
|
|
1408
|
+
}), bi = { class: "tpl:w-full" }, xi = ["srcdoc", "title"], Si = {
|
|
1454
1409
|
key: 1,
|
|
1455
1410
|
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
|
-
},
|
|
1411
|
+
}, Ci = {
|
|
1457
1412
|
key: 0,
|
|
1458
1413
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1459
|
-
},
|
|
1414
|
+
}, wi = {
|
|
1460
1415
|
key: 1,
|
|
1461
1416
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1462
|
-
},
|
|
1417
|
+
}, Ti = /* @__PURE__ */ d({
|
|
1463
1418
|
__name: "HtmlBlock",
|
|
1464
1419
|
props: {
|
|
1465
1420
|
block: {},
|
|
1466
1421
|
viewport: {}
|
|
1467
1422
|
},
|
|
1468
1423
|
setup(r) {
|
|
1469
|
-
let i = r, { t: a } =
|
|
1470
|
-
function
|
|
1471
|
-
let e =
|
|
1424
|
+
let i = r, { t: a } = X(), o = n(Vt, !1), c = y(() => i.block.content.trim().length > 0), u = y(() => o && c.value), d = n(q, xt), f = n(jt, null), p = y(() => f?.value ? Te(i.block.content, d.value) : i.block.content), g = l(null), _ = l(60), v = null;
|
|
1425
|
+
function x() {
|
|
1426
|
+
let e = g.value?.contentDocument;
|
|
1472
1427
|
e && (_.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
1473
1428
|
}
|
|
1474
1429
|
function S() {
|
|
1475
|
-
v?.disconnect(), v = null,
|
|
1476
|
-
let e =
|
|
1477
|
-
e && typeof ResizeObserver < "u" && (v = new ResizeObserver(() =>
|
|
1430
|
+
v?.disconnect(), v = null, x();
|
|
1431
|
+
let e = g.value?.contentDocument?.documentElement;
|
|
1432
|
+
e && typeof ResizeObserver < "u" && (v = new ResizeObserver(() => x()), v.observe(e));
|
|
1478
1433
|
}
|
|
1479
1434
|
return t(u, (e) => {
|
|
1480
1435
|
e || (v?.disconnect(), v = null);
|
|
1481
1436
|
}), e(() => {
|
|
1482
1437
|
v?.disconnect(), v = null;
|
|
1483
|
-
}), (e, t) => (s(),
|
|
1438
|
+
}), (e, t) => (s(), b("div", bi, [u.value ? (s(), b("iframe", {
|
|
1484
1439
|
key: 0,
|
|
1485
1440
|
ref_key: "iframeRef",
|
|
1486
|
-
ref:
|
|
1441
|
+
ref: g,
|
|
1487
1442
|
srcdoc: p.value,
|
|
1488
1443
|
sandbox: "allow-same-origin",
|
|
1489
|
-
title:
|
|
1444
|
+
title: m(a).html.preview,
|
|
1490
1445
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1491
|
-
style:
|
|
1446
|
+
style: E({ height: `${_.value}px` }),
|
|
1492
1447
|
onLoad: S
|
|
1493
|
-
}, null, 44,
|
|
1448
|
+
}, null, 44, xi)) : (s(), b("div", Si, [h(m(pn), {
|
|
1494
1449
|
size: 24,
|
|
1495
1450
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1496
|
-
}), c.value ? (s(),
|
|
1451
|
+
}), c.value ? (s(), b("span", Ci, P(m(a).html.preview), 1)) : (s(), b("span", wi, P(m(a).html.empty), 1))]))]));
|
|
1497
1452
|
}
|
|
1498
|
-
}),
|
|
1453
|
+
}), Ei = ["data-drop-enabled"], Di = ["href"], Oi = ["src", "alt"], ki = ["src", "alt"], Ai = {
|
|
1499
1454
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1500
1455
|
style: { opacity: "0.7" }
|
|
1501
|
-
},
|
|
1456
|
+
}, ji = ["href"], Mi = ["src", "alt"], Ni = ["src", "alt"], Pi = {
|
|
1502
1457
|
key: 4,
|
|
1503
1458
|
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
|
-
},
|
|
1459
|
+
}, Fi = ["aria-label"], Ii = { key: 1 }, Li = /* @__PURE__ */ d({
|
|
1505
1460
|
__name: "ImageBlock",
|
|
1506
1461
|
props: {
|
|
1507
1462
|
block: {},
|
|
@@ -1509,108 +1464,111 @@ var ii = { class: "tpl:w-full" }, ai = {
|
|
|
1509
1464
|
},
|
|
1510
1465
|
emits: ["update"],
|
|
1511
1466
|
setup(e, { emit: t }) {
|
|
1512
|
-
let n = e, r = t, { t: i } =
|
|
1467
|
+
let n = e, r = t, { t: i } = X(), { syntax: a } = Mn(), o = y(() => Ie(n.block.src, a));
|
|
1513
1468
|
function c(e) {
|
|
1514
|
-
let t = {
|
|
1469
|
+
let t = {
|
|
1470
|
+
src: e.url,
|
|
1471
|
+
...it(et(e.width, e.height))
|
|
1472
|
+
};
|
|
1515
1473
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1516
1474
|
}
|
|
1517
|
-
let u = l(), { canBrowse: d, dropEnabled: f, isUploading: p, showOverlay:
|
|
1475
|
+
let u = l(), { canBrowse: d, dropEnabled: f, isUploading: p, showOverlay: g, openMediaBrowser: _ } = nt({
|
|
1518
1476
|
target: u,
|
|
1519
1477
|
blocked: o,
|
|
1520
1478
|
apply: c
|
|
1521
|
-
}), v =
|
|
1522
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1479
|
+
}), v = y(() => ({ textAlign: n.block.align })), S = y(() => {
|
|
1480
|
+
let e = n.block.border, t = ["left", "right"].map((t) => de(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1523
1481
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1524
|
-
}), C =
|
|
1482
|
+
}), C = y(() => {
|
|
1525
1483
|
let e = n.block.align;
|
|
1526
1484
|
return {
|
|
1527
1485
|
maxWidth: "100%",
|
|
1528
|
-
width: n.block.width === "full" ?
|
|
1486
|
+
width: n.block.width === "full" ? S.value : `${n.block.width}px`,
|
|
1529
1487
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1530
|
-
borderRadius:
|
|
1531
|
-
...
|
|
1488
|
+
borderRadius: z(n.block.borderRadius) ?? void 0,
|
|
1489
|
+
...Lr(n.block.border),
|
|
1532
1490
|
display: "block",
|
|
1533
1491
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1534
1492
|
marginRight: e === "center" ? "auto" : void 0
|
|
1535
1493
|
};
|
|
1536
|
-
}), w =
|
|
1537
|
-
return (t, n) => (s(),
|
|
1494
|
+
}), w = We(() => o.value ? void 0 : n.block.src), k = We(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1495
|
+
return (t, n) => (s(), b("div", {
|
|
1538
1496
|
ref_key: "dropZoneRef",
|
|
1539
1497
|
ref: u,
|
|
1540
1498
|
"data-testid": "image-drop-zone",
|
|
1541
|
-
"data-drop-enabled":
|
|
1499
|
+
"data-drop-enabled": m(f),
|
|
1542
1500
|
class: "tpl:relative tpl:w-full",
|
|
1543
|
-
style:
|
|
1544
|
-
}, [
|
|
1501
|
+
style: E(v.value)
|
|
1502
|
+
}, [m(g) ? (s(), D(ot, {
|
|
1545
1503
|
key: 0,
|
|
1546
|
-
uploading:
|
|
1504
|
+
uploading: m(p),
|
|
1547
1505
|
size: "canvas"
|
|
1548
|
-
}, null, 8, ["uploading"])) :
|
|
1506
|
+
}, null, 8, ["uploading"])) : x("", !0), e.block.src && o.value && e.block.placeholderUrl ? (s(), b(N, { key: 1 }, [e.block.linkUrl ? (s(), b("a", {
|
|
1549
1507
|
key: 0,
|
|
1550
1508
|
href: e.block.linkUrl,
|
|
1551
1509
|
target: "_blank",
|
|
1552
1510
|
rel: "noopener noreferrer",
|
|
1553
|
-
onClick: n[0] ||=
|
|
1554
|
-
}, [
|
|
1511
|
+
onClick: n[0] ||= T(() => {}, ["prevent"])
|
|
1512
|
+
}, [O("img", {
|
|
1555
1513
|
class: "tpl:border-0",
|
|
1556
1514
|
loading: "lazy",
|
|
1557
|
-
src:
|
|
1558
|
-
alt: e.block.alt ||
|
|
1559
|
-
style:
|
|
1560
|
-
}, null, 12,
|
|
1515
|
+
src: m(k),
|
|
1516
|
+
alt: e.block.alt || m(i).image.altTextPlaceholder,
|
|
1517
|
+
style: E(C.value)
|
|
1518
|
+
}, null, 12, Oi)], 8, Di)) : (s(), b("img", {
|
|
1561
1519
|
key: 1,
|
|
1562
1520
|
class: "tpl:border-0",
|
|
1563
|
-
src:
|
|
1521
|
+
src: m(k),
|
|
1564
1522
|
alt: e.block.alt,
|
|
1565
|
-
style:
|
|
1566
|
-
}, null, 12,
|
|
1523
|
+
style: E(C.value)
|
|
1524
|
+
}, null, 12, ki))], 64)) : e.block.src && o.value ? (s(), b("div", {
|
|
1567
1525
|
key: 2,
|
|
1568
1526
|
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:
|
|
1570
|
-
}, [
|
|
1527
|
+
style: E([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, C.value])
|
|
1528
|
+
}, [h(m(Tn), {
|
|
1571
1529
|
size: 32,
|
|
1572
1530
|
"stroke-width": 1.5,
|
|
1573
1531
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1574
1532
|
style: { opacity: "0.5" }
|
|
1575
|
-
}),
|
|
1533
|
+
}), O("span", Ai, [h(Vr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), b(N, { key: 3 }, [e.block.linkUrl ? (s(), b("a", {
|
|
1576
1534
|
key: 0,
|
|
1577
1535
|
href: e.block.linkUrl,
|
|
1578
1536
|
target: "_blank",
|
|
1579
1537
|
rel: "noopener noreferrer",
|
|
1580
|
-
onClick: n[1] ||=
|
|
1581
|
-
}, [
|
|
1538
|
+
onClick: n[1] ||= T(() => {}, ["prevent"])
|
|
1539
|
+
}, [O("img", {
|
|
1582
1540
|
class: "tpl:border-0",
|
|
1583
1541
|
loading: "lazy",
|
|
1584
|
-
src:
|
|
1585
|
-
alt: e.block.alt ||
|
|
1586
|
-
style:
|
|
1587
|
-
}, null, 12,
|
|
1542
|
+
src: m(w),
|
|
1543
|
+
alt: e.block.alt || m(i).image.altTextPlaceholder,
|
|
1544
|
+
style: E(C.value)
|
|
1545
|
+
}, null, 12, Mi)], 8, ji)) : (s(), b("img", {
|
|
1588
1546
|
key: 1,
|
|
1589
1547
|
class: "tpl:border-0",
|
|
1590
|
-
src:
|
|
1548
|
+
src: m(w),
|
|
1591
1549
|
alt: e.block.alt,
|
|
1592
|
-
style:
|
|
1593
|
-
}, null, 12,
|
|
1550
|
+
style: E(C.value)
|
|
1551
|
+
}, null, 12, Ni))], 64)) : (s(), b("div", Pi, [m(d) ? (s(), b("button", {
|
|
1594
1552
|
key: 0,
|
|
1595
|
-
"aria-label":
|
|
1553
|
+
"aria-label": m(i).image.browseMedia,
|
|
1596
1554
|
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)]",
|
|
1597
|
-
onClick: n[2] ||=
|
|
1598
|
-
}, [
|
|
1555
|
+
onClick: n[2] ||= T((...e) => m(_) && m(_)(...e), ["stop"])
|
|
1556
|
+
}, [h(m(Tn), {
|
|
1599
1557
|
size: 14,
|
|
1600
1558
|
"stroke-width": 1.5
|
|
1601
|
-
}),
|
|
1559
|
+
}), L(" " + P(m(i).image.browseMedia), 1)], 8, Fi)) : (s(), b("span", Ii, P(m(i).image.clickToAdd), 1))]))], 12, Ei));
|
|
1602
1560
|
}
|
|
1603
|
-
}),
|
|
1561
|
+
}), Ri = { class: "tpl:w-full" }, zi = ["href"], Bi = {
|
|
1604
1562
|
key: 1,
|
|
1605
1563
|
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)]"
|
|
1606
|
-
},
|
|
1564
|
+
}, Vi = /* @__PURE__ */ d({
|
|
1607
1565
|
__name: "MenuBlock",
|
|
1608
1566
|
props: {
|
|
1609
1567
|
block: {},
|
|
1610
1568
|
viewport: {}
|
|
1611
1569
|
},
|
|
1612
1570
|
setup(e) {
|
|
1613
|
-
let t = e, { t: n } =
|
|
1571
|
+
let t = e, { t: n } = X(), i = K(Y, "MenuBlock"), a = y(() => ({
|
|
1614
1572
|
display: "flex",
|
|
1615
1573
|
flexWrap: "wrap",
|
|
1616
1574
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1618,31 +1576,31 @@ var ii = { class: "tpl:w-full" }, ai = {
|
|
|
1618
1576
|
fontSize: `${t.block.fontSize}px`,
|
|
1619
1577
|
fontFamily: t.block.fontFamily ? i.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1620
1578
|
alignItems: "center"
|
|
1621
|
-
})), o =
|
|
1579
|
+
})), o = y(() => t.block.items.length > 0);
|
|
1622
1580
|
function c(e) {
|
|
1623
1581
|
return e || t.block.linkColor || t.block.color;
|
|
1624
1582
|
}
|
|
1625
|
-
return (t, i) => (s(),
|
|
1583
|
+
return (t, i) => (s(), b("div", Ri, [o.value ? (s(), b("div", {
|
|
1626
1584
|
key: 0,
|
|
1627
|
-
style:
|
|
1628
|
-
}, [(s(!0),
|
|
1585
|
+
style: E(a.value)
|
|
1586
|
+
}, [(s(!0), b(N, null, r(e.block.items, (t, n) => (s(), b(N, { key: t.id }, [O("a", {
|
|
1629
1587
|
href: t.url || "#",
|
|
1630
1588
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1631
|
-
style:
|
|
1589
|
+
style: E({
|
|
1632
1590
|
color: c(t.color),
|
|
1633
1591
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1634
1592
|
textDecoration: t.underline ? "underline" : "none"
|
|
1635
1593
|
}),
|
|
1636
|
-
onClick: i[0] ||=
|
|
1637
|
-
}, [
|
|
1594
|
+
onClick: i[0] ||= T(() => {}, ["prevent"])
|
|
1595
|
+
}, [h(Vr, { text: t.text || "..." }, null, 8, ["text"])], 12, zi), n < e.block.items.length - 1 ? (s(), b("span", {
|
|
1638
1596
|
key: 0,
|
|
1639
|
-
style:
|
|
1597
|
+
style: E({
|
|
1640
1598
|
color: e.block.separatorColor,
|
|
1641
1599
|
padding: `0 ${e.block.spacing}px`
|
|
1642
1600
|
})
|
|
1643
|
-
},
|
|
1601
|
+
}, P(e.block.separator), 5)) : x("", !0)], 64))), 128))], 4)) : (s(), b("div", Bi, [h(m(yn), { size: 16 }), O("span", null, P(m(n).menu.addLinks), 1)]))]));
|
|
1644
1602
|
}
|
|
1645
|
-
}),
|
|
1603
|
+
}), Hi = /* @__PURE__ */ new Set([
|
|
1646
1604
|
"http",
|
|
1647
1605
|
"https",
|
|
1648
1606
|
"mailto",
|
|
@@ -1652,7 +1610,7 @@ var ii = { class: "tpl:w-full" }, ai = {
|
|
|
1652
1610
|
"sms",
|
|
1653
1611
|
"xmpp",
|
|
1654
1612
|
"cid"
|
|
1655
|
-
]),
|
|
1613
|
+
]), Ui = /* @__PURE__ */ new Set([
|
|
1656
1614
|
"SCRIPT",
|
|
1657
1615
|
"STYLE",
|
|
1658
1616
|
"IFRAME",
|
|
@@ -1662,7 +1620,7 @@ var ii = { class: "tpl:w-full" }, ai = {
|
|
|
1662
1620
|
"META",
|
|
1663
1621
|
"BASE",
|
|
1664
1622
|
"FORM"
|
|
1665
|
-
]),
|
|
1623
|
+
]), Wi = /* @__PURE__ */ new Set([
|
|
1666
1624
|
"href",
|
|
1667
1625
|
"xlink:href",
|
|
1668
1626
|
"formaction",
|
|
@@ -1671,16 +1629,16 @@ var ii = { class: "tpl:w-full" }, ai = {
|
|
|
1671
1629
|
"background",
|
|
1672
1630
|
"poster"
|
|
1673
1631
|
]);
|
|
1674
|
-
function
|
|
1632
|
+
function Gi(e, t) {
|
|
1675
1633
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1676
1634
|
if (!n || n.startsWith("#")) return !0;
|
|
1677
1635
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1678
1636
|
if (!r) return !0;
|
|
1679
1637
|
let i = r[1].toLowerCase();
|
|
1680
|
-
return
|
|
1638
|
+
return Hi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1681
1639
|
}
|
|
1682
|
-
function
|
|
1683
|
-
if (
|
|
1640
|
+
function Ki(e) {
|
|
1641
|
+
if (Ui.has(e.tagName)) {
|
|
1684
1642
|
e.remove();
|
|
1685
1643
|
return;
|
|
1686
1644
|
}
|
|
@@ -1688,21 +1646,21 @@ function Vi(e) {
|
|
|
1688
1646
|
for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
|
|
1689
1647
|
for (let n of t) {
|
|
1690
1648
|
let t = n.toLowerCase();
|
|
1691
|
-
t.startsWith("on") ? e.removeAttribute(n) :
|
|
1649
|
+
t.startsWith("on") ? e.removeAttribute(n) : Wi.has(t) ? Gi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n) : t === "src" ? Gi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n) : t === "srcdoc" && e.removeAttribute(n);
|
|
1692
1650
|
}
|
|
1693
1651
|
let n = Array.from(e.children);
|
|
1694
|
-
for (let e of n)
|
|
1652
|
+
for (let e of n) Ki(e);
|
|
1695
1653
|
}
|
|
1696
|
-
function
|
|
1654
|
+
function qi(e) {
|
|
1697
1655
|
if (typeof DOMParser > "u") return e;
|
|
1698
1656
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1699
|
-
for (let e of n)
|
|
1657
|
+
for (let e of n) Ki(e);
|
|
1700
1658
|
return t.innerHTML;
|
|
1701
1659
|
}
|
|
1702
1660
|
//#endregion
|
|
1703
1661
|
//#region src/composables/useEditableTextBlock.ts
|
|
1704
|
-
function
|
|
1705
|
-
let t = n(
|
|
1662
|
+
function Ji(e) {
|
|
1663
|
+
let t = n(q, xt), r = n(jt, null), { syntax: i } = Mn(), a = y(() => r?.value ? Ee(e(), t.value) : Pe(e(), t.value)), o = y(() => ye(qi(we(a.value, i)))), s = l(!1), c = l(null), { top: u, left: d } = ht(c), { toLocal: f } = un(), p = y(() => f({
|
|
1706
1664
|
top: u.value - 8,
|
|
1707
1665
|
left: d.value
|
|
1708
1666
|
}));
|
|
@@ -1723,52 +1681,52 @@ function Ui(e) {
|
|
|
1723
1681
|
}
|
|
1724
1682
|
//#endregion
|
|
1725
1683
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1726
|
-
var
|
|
1684
|
+
var Yi = ["innerHTML"], Xi = /* @__PURE__ */ d({
|
|
1727
1685
|
__name: "ParagraphBlock",
|
|
1728
1686
|
props: {
|
|
1729
1687
|
block: {},
|
|
1730
1688
|
viewport: {}
|
|
1731
1689
|
},
|
|
1732
1690
|
setup(e) {
|
|
1733
|
-
let t = e, n =
|
|
1734
|
-
return (t, u) => (s(),
|
|
1691
|
+
let t = e, n = I(() => import("./ParagraphEditor-CJQjRHXV.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ji(() => t.block.content);
|
|
1692
|
+
return (t, u) => (s(), b("div", {
|
|
1735
1693
|
ref_key: "blockRef",
|
|
1736
1694
|
ref: i,
|
|
1737
1695
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1738
|
-
onDblclick: u[0] ||= (...e) =>
|
|
1739
|
-
}, [
|
|
1696
|
+
onDblclick: u[0] ||= (...e) => m(c) && m(c)(...e)
|
|
1697
|
+
}, [m(r) ? (s(), D(m(n), {
|
|
1740
1698
|
key: 0,
|
|
1741
1699
|
block: e.block,
|
|
1742
|
-
"toolbar-position":
|
|
1743
|
-
onDone:
|
|
1700
|
+
"toolbar-position": m(a),
|
|
1701
|
+
onDone: m(l)
|
|
1744
1702
|
}, null, 8, [
|
|
1745
1703
|
"block",
|
|
1746
1704
|
"toolbar-position",
|
|
1747
1705
|
"onDone"
|
|
1748
|
-
])) : (s(),
|
|
1706
|
+
])) : (s(), b("div", {
|
|
1749
1707
|
key: 1,
|
|
1750
1708
|
class: "tpl-text-content tpl:outline-none",
|
|
1751
|
-
innerHTML:
|
|
1752
|
-
}, null, 8,
|
|
1709
|
+
innerHTML: m(o)
|
|
1710
|
+
}, null, 8, Yi))], 544));
|
|
1753
1711
|
}
|
|
1754
|
-
}),
|
|
1712
|
+
}), Zi = [
|
|
1755
1713
|
"data-block-id",
|
|
1756
1714
|
"data-block-type",
|
|
1757
1715
|
"data-tpl-picked"
|
|
1758
|
-
],
|
|
1716
|
+
], Qi = ["data-lock-holder"], $i = ["aria-label"], ea = [
|
|
1759
1717
|
"aria-label",
|
|
1760
1718
|
"aria-pressed",
|
|
1761
1719
|
"title"
|
|
1762
|
-
],
|
|
1763
|
-
key:
|
|
1720
|
+
], ta = ["aria-label", "title"], na = ["aria-label", "title"], ra = ["aria-label", "title"], ia = {
|
|
1721
|
+
key: 3,
|
|
1764
1722
|
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"
|
|
1765
|
-
},
|
|
1766
|
-
key:
|
|
1723
|
+
}, aa = { 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)]" }, oa = {
|
|
1724
|
+
key: 4,
|
|
1767
1725
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1768
|
-
},
|
|
1769
|
-
key:
|
|
1726
|
+
}, sa = ["aria-label", "title"], ca = {
|
|
1727
|
+
key: 5,
|
|
1770
1728
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1771
|
-
},
|
|
1729
|
+
}, la = ["aria-label"], ua = /*#__PURE__*/ An(/* @__PURE__ */ d({
|
|
1772
1730
|
__name: "BlockWrapper",
|
|
1773
1731
|
props: {
|
|
1774
1732
|
block: {},
|
|
@@ -1780,35 +1738,38 @@ var Wi = ["innerHTML"], Gi = /* @__PURE__ */ d({
|
|
|
1780
1738
|
},
|
|
1781
1739
|
emits: ["select"],
|
|
1782
1740
|
setup(e, { emit: t }) {
|
|
1783
|
-
let r =
|
|
1784
|
-
async function
|
|
1785
|
-
await
|
|
1741
|
+
let r = I(() => import("./BlockIssueBadge-D1VBS_6x.js")), i = e, o = t, { t: c, format: u } = X(), d = n(Nt, null), f = l(null), p = y(() => d?.liftedBlockId.value === i.block.id), g = y(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
|
|
1742
|
+
async function v() {
|
|
1743
|
+
await w(), f.value?.focus();
|
|
1786
1744
|
}
|
|
1787
|
-
function
|
|
1788
|
-
d && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), p.value ? d.drop(i.block.id) : d.lift(i.block.id)) : p.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), d.cancel(),
|
|
1745
|
+
function S(e) {
|
|
1746
|
+
d && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), p.value ? d.drop(i.block.id) : d.lift(i.block.id)) : p.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), d.cancel(), v()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), d.moveUp(i.block.id), v()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), d.moveDown(i.block.id), v())));
|
|
1789
1747
|
}
|
|
1790
|
-
let C =
|
|
1748
|
+
let C = y(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), D = y(() => i.previewMode === !0 && C.value), k = y(() => i.viewport ? {
|
|
1791
1749
|
desktop: c.viewport.desktop,
|
|
1792
1750
|
mobile: c.viewport.mobile
|
|
1793
|
-
}[i.viewport] ?? i.viewport : ""), A =
|
|
1794
|
-
|
|
1751
|
+
}[i.viewport] ?? i.viewport : ""), A = y(() => !!i.block.displayCondition), j = n(Bt, null), M = n(Wt, null), N = n(Jt, {}), F = y(() => N.savedBlocks?.isPicking.value === !0), R = y(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), z = y(() => i.isSelected && !F.value), B = y(() => N.comments?.getBlockCount(i.block.id) ?? 0), V = y(() => N.collaboration?.lockOf(i.block.id) ?? null), H = y(() => V.value?.holder.type === "guest" ? c.collaboration.guest : V.value?.holder.name ?? ""), U = y(() => N.collaboration?.agentHighlightOf(i.block.id) ?? null), ee = Xe(() => i.block.type === "section" ? i.block.backgroundImage : void 0), te = Xe(() => i.block.type === "section" ? i.block.wrapper?.backgroundImage : void 0), ne = n(J, null), re = n(vt, void 0), W = y(() => Fr(i.block, {
|
|
1752
|
+
backgroundImageUrl: ee.value,
|
|
1753
|
+
heroBoxWidth: Qe(i.block, ne?.content.value, re)
|
|
1754
|
+
})), G = y(() => Rr(i.block, { backgroundImageUrl: te.value }));
|
|
1755
|
+
function ie(e) {
|
|
1795
1756
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
|
|
1796
1757
|
}
|
|
1797
|
-
function
|
|
1758
|
+
function ae() {
|
|
1798
1759
|
j?.deleteBlock(i.block.id);
|
|
1799
1760
|
}
|
|
1800
|
-
function
|
|
1761
|
+
function oe() {
|
|
1801
1762
|
j?.duplicateBlock(i.block);
|
|
1802
1763
|
}
|
|
1803
|
-
function
|
|
1764
|
+
function se() {
|
|
1804
1765
|
N.savedBlocks?.startPicking(i.block.id);
|
|
1805
1766
|
}
|
|
1806
|
-
function
|
|
1767
|
+
function ce() {
|
|
1807
1768
|
M?.toggleBlock(i.block.id);
|
|
1808
1769
|
}
|
|
1809
|
-
return (t, n) =>
|
|
1770
|
+
return (t, n) => D.value ? x("", !0) : (s(), b("div", {
|
|
1810
1771
|
key: 0,
|
|
1811
|
-
class:
|
|
1772
|
+
class: _(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
1812
1773
|
"tpl-block--selected": e.isSelected,
|
|
1813
1774
|
"tpl-block--picked": e.picked,
|
|
1814
1775
|
"tpl-block--idle": !e.isSelected && !e.picked,
|
|
@@ -1817,152 +1778,214 @@ var Wi = ["innerHTML"], Gi = /* @__PURE__ */ d({
|
|
|
1817
1778
|
"data-block-id": e.block.id,
|
|
1818
1779
|
"data-block-type": e.block.type,
|
|
1819
1780
|
"data-tpl-picked": e.picked || void 0,
|
|
1820
|
-
onClick:
|
|
1781
|
+
onClick: ie
|
|
1821
1782
|
}, [
|
|
1822
|
-
|
|
1823
|
-
|
|
1783
|
+
h(m(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1784
|
+
V.value ? (s(), b("div", {
|
|
1824
1785
|
key: 0,
|
|
1786
|
+
"data-testid": "block-lock",
|
|
1787
|
+
"data-lock-holder": V.value.holder.sessionId,
|
|
1788
|
+
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
1789
|
+
style: E({
|
|
1790
|
+
outline: `2px solid ${V.value.holder.color}`,
|
|
1791
|
+
outlineOffset: "-1px"
|
|
1792
|
+
})
|
|
1793
|
+
}, [O("span", {
|
|
1794
|
+
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
1795
|
+
style: E({
|
|
1796
|
+
backgroundColor: V.value.holder.color,
|
|
1797
|
+
color: m(Pn)(V.value.holder.color)
|
|
1798
|
+
})
|
|
1799
|
+
}, P(m(u)(m(c).collaboration.editing, { name: H.value })), 5)], 12, Qi)) : x("", !0),
|
|
1800
|
+
U.value === null ? x("", !0) : (s(), b("div", {
|
|
1801
|
+
key: U.value,
|
|
1802
|
+
"data-testid": "block-agent-highlight",
|
|
1803
|
+
"aria-hidden": "true",
|
|
1804
|
+
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
1805
|
+
})),
|
|
1806
|
+
z.value ? (s(), b("div", {
|
|
1807
|
+
key: 2,
|
|
1825
1808
|
role: "toolbar",
|
|
1826
|
-
"aria-label":
|
|
1809
|
+
"aria-label": m(c).blockActions.drag,
|
|
1827
1810
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
1828
1811
|
}, [
|
|
1829
|
-
|
|
1812
|
+
O("button", {
|
|
1830
1813
|
ref_key: "dragButtonRef",
|
|
1831
1814
|
ref: f,
|
|
1832
1815
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
|
|
1833
|
-
"aria-label":
|
|
1816
|
+
"aria-label": g.value,
|
|
1834
1817
|
"aria-pressed": p.value,
|
|
1835
1818
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1836
|
-
title:
|
|
1837
|
-
onKeydown:
|
|
1838
|
-
}, [
|
|
1819
|
+
title: m(c).blockActions.drag,
|
|
1820
|
+
onKeydown: S
|
|
1821
|
+
}, [h(m(bn), {
|
|
1839
1822
|
size: 14,
|
|
1840
1823
|
"stroke-width": 1.5
|
|
1841
|
-
})], 40,
|
|
1842
|
-
|
|
1824
|
+
})], 40, ea),
|
|
1825
|
+
O("button", {
|
|
1843
1826
|
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
|
-
"aria-label":
|
|
1845
|
-
title:
|
|
1846
|
-
onClick:
|
|
1847
|
-
}, [
|
|
1827
|
+
"aria-label": m(c).blockActions.duplicate,
|
|
1828
|
+
title: m(c).blockActions.duplicate,
|
|
1829
|
+
onClick: T(oe, ["stop"])
|
|
1830
|
+
}, [h(m(gn), {
|
|
1848
1831
|
size: 14,
|
|
1849
1832
|
"stroke-width": 1.5
|
|
1850
|
-
})], 8,
|
|
1851
|
-
|
|
1833
|
+
})], 8, ta),
|
|
1834
|
+
R.value ? (s(), b("button", {
|
|
1852
1835
|
key: 0,
|
|
1853
1836
|
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",
|
|
1854
|
-
"aria-label":
|
|
1855
|
-
title:
|
|
1856
|
-
onClick:
|
|
1857
|
-
}, [
|
|
1837
|
+
"aria-label": m(c).blockActions.saveAsBlock,
|
|
1838
|
+
title: m(c).blockActions.saveAsBlock,
|
|
1839
|
+
onClick: T(se, ["stop"])
|
|
1840
|
+
}, [h(m(hn), {
|
|
1858
1841
|
size: 14,
|
|
1859
1842
|
"stroke-width": 1.5
|
|
1860
|
-
})], 8,
|
|
1861
|
-
|
|
1843
|
+
})], 8, na)) : x("", !0),
|
|
1844
|
+
O("button", {
|
|
1862
1845
|
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",
|
|
1863
|
-
"aria-label":
|
|
1864
|
-
title:
|
|
1865
|
-
onClick:
|
|
1866
|
-
}, [
|
|
1846
|
+
"aria-label": m(c).blockActions.delete,
|
|
1847
|
+
title: m(c).blockActions.delete,
|
|
1848
|
+
onClick: T(ae, ["stop"])
|
|
1849
|
+
}, [h(m(Cn), {
|
|
1867
1850
|
size: 14,
|
|
1868
1851
|
"stroke-width": 1.5
|
|
1869
|
-
})], 8,
|
|
1870
|
-
], 8,
|
|
1871
|
-
C.value ? (s(),
|
|
1852
|
+
})], 8, ra)
|
|
1853
|
+
], 8, $i)) : x("", !0),
|
|
1854
|
+
C.value ? (s(), b("div", ia, [O("span", aa, [h(m(mn), {
|
|
1872
1855
|
size: 12,
|
|
1873
1856
|
"stroke-width": 1.5
|
|
1874
|
-
}),
|
|
1875
|
-
A.value && !C.value ? (s(),
|
|
1857
|
+
}), L(" " + P(m(u)(m(c).blockActions.hiddenOnViewport, { viewport: k.value })), 1)])])) : x("", !0),
|
|
1858
|
+
A.value && !C.value ? (s(), b("div", oa, [O("button", {
|
|
1876
1859
|
"data-testid": "condition-toggle",
|
|
1877
1860
|
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)]",
|
|
1878
|
-
"aria-label":
|
|
1861
|
+
"aria-label": m(c).blockActions.conditionToggle,
|
|
1879
1862
|
title: e.block.displayCondition?.label,
|
|
1880
|
-
onClick:
|
|
1881
|
-
}, [
|
|
1863
|
+
onClick: T(ce, ["stop"])
|
|
1864
|
+
}, [h(m(xn), {
|
|
1882
1865
|
size: 12,
|
|
1883
1866
|
"stroke-width": 2
|
|
1884
|
-
})], 8,
|
|
1885
|
-
B.value > 0 && !C.value ? (s(),
|
|
1867
|
+
})], 8, sa)])) : x("", !0),
|
|
1868
|
+
B.value > 0 && !C.value ? (s(), b("div", ca, [O("button", {
|
|
1886
1869
|
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)]",
|
|
1887
|
-
"aria-label":
|
|
1888
|
-
onClick: n[0] ||=
|
|
1889
|
-
}, [
|
|
1870
|
+
"aria-label": m(u)(m(c).blockActions.comments, { count: String(B.value) }),
|
|
1871
|
+
onClick: n[0] ||= T((t) => m(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
1872
|
+
}, [h(m(En), {
|
|
1890
1873
|
size: 12,
|
|
1891
1874
|
"stroke-width": 2.5
|
|
1892
|
-
}),
|
|
1893
|
-
|
|
1894
|
-
key:
|
|
1895
|
-
class:
|
|
1896
|
-
style:
|
|
1897
|
-
}, [
|
|
1898
|
-
class:
|
|
1899
|
-
style:
|
|
1900
|
-
}, [a(t.$slots, "default", {}, void 0, !0)], 6)], 6)) : (s(),
|
|
1901
|
-
key:
|
|
1902
|
-
class:
|
|
1903
|
-
style:
|
|
1875
|
+
}), L(" " + P(B.value), 1)], 8, la)])) : x("", !0),
|
|
1876
|
+
G.value ? (s(), b("div", {
|
|
1877
|
+
key: 6,
|
|
1878
|
+
class: _(["tpl-section-wrapper tpl-email-surface", m(jr)(G.value)]),
|
|
1879
|
+
style: E(G.value)
|
|
1880
|
+
}, [O("div", {
|
|
1881
|
+
class: _(["tpl-block-content tpl-email-surface", m(jr)(W.value)]),
|
|
1882
|
+
style: E(W.value)
|
|
1883
|
+
}, [a(t.$slots, "default", {}, void 0, !0)], 6)], 6)) : (s(), b("div", {
|
|
1884
|
+
key: 7,
|
|
1885
|
+
class: _(["tpl-block-content tpl-email-surface", m(jr)(W.value)]),
|
|
1886
|
+
style: E(W.value)
|
|
1904
1887
|
}, [a(t.$slots, "default", {}, void 0, !0)], 6))
|
|
1905
|
-
], 10,
|
|
1888
|
+
], 10, Zi));
|
|
1906
1889
|
}
|
|
1907
|
-
}), [["__scopeId", "data-v-
|
|
1890
|
+
}), [["__scopeId", "data-v-3c489db0"]]);
|
|
1908
1891
|
//#endregion
|
|
1909
1892
|
//#region src/utils/unwrapParagraph.ts
|
|
1910
|
-
function
|
|
1893
|
+
function da(e) {
|
|
1911
1894
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1912
1895
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1913
1896
|
}
|
|
1914
1897
|
//#endregion
|
|
1915
1898
|
//#region src/components/blocks/TitleBlock.vue
|
|
1916
|
-
var
|
|
1899
|
+
var fa = /* @__PURE__ */ d({
|
|
1917
1900
|
__name: "TitleBlock",
|
|
1918
1901
|
props: {
|
|
1919
1902
|
block: {},
|
|
1920
1903
|
viewport: {}
|
|
1921
1904
|
},
|
|
1922
1905
|
setup(e) {
|
|
1923
|
-
let t = e, n =
|
|
1906
|
+
let t = e, n = I(() => import("./TitleEditor-CEgxjtUX.js")), r = K(Y, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: c, handleDoubleClick: l, handleEditorDone: d } = Ji(() => t.block.content), f = y(() => {
|
|
1924
1907
|
let e = {
|
|
1925
|
-
fontSize: `${
|
|
1926
|
-
lineHeight: String(
|
|
1908
|
+
fontSize: `${U[t.block.level]}px`,
|
|
1909
|
+
lineHeight: String(ie),
|
|
1910
|
+
fontWeight: "700",
|
|
1927
1911
|
textAlign: t.block.textAlign
|
|
1928
1912
|
};
|
|
1929
1913
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
1930
|
-
}), p =
|
|
1931
|
-
return (t, r) => (s(),
|
|
1914
|
+
}), p = y(() => `h${t.block.level}`), h = y(() => da(c.value));
|
|
1915
|
+
return (t, r) => (s(), b("div", {
|
|
1932
1916
|
ref_key: "blockRef",
|
|
1933
1917
|
ref: a,
|
|
1934
1918
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1935
|
-
style:
|
|
1936
|
-
onDblclick: r[0] ||= (...e) =>
|
|
1937
|
-
}, [
|
|
1919
|
+
style: E(f.value),
|
|
1920
|
+
onDblclick: r[0] ||= (...e) => m(l) && m(l)(...e)
|
|
1921
|
+
}, [m(i) ? (s(), D(m(n), {
|
|
1938
1922
|
key: 0,
|
|
1939
1923
|
block: e.block,
|
|
1940
|
-
"toolbar-position":
|
|
1941
|
-
onDone:
|
|
1924
|
+
"toolbar-position": m(o),
|
|
1925
|
+
onDone: m(d)
|
|
1942
1926
|
}, null, 8, [
|
|
1943
1927
|
"block",
|
|
1944
1928
|
"toolbar-position",
|
|
1945
1929
|
"onDone"
|
|
1946
|
-
])) : (s(),
|
|
1930
|
+
])) : (s(), D(u(p.value), {
|
|
1947
1931
|
key: 1,
|
|
1948
1932
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
1949
|
-
style: {
|
|
1950
|
-
|
|
1933
|
+
style: {
|
|
1934
|
+
color: "inherit",
|
|
1935
|
+
fontWeight: "inherit"
|
|
1936
|
+
},
|
|
1937
|
+
innerHTML: h.value
|
|
1951
1938
|
}, null, 8, ["innerHTML"]))], 36));
|
|
1952
1939
|
}
|
|
1953
|
-
});
|
|
1940
|
+
}), pa = "hero", ma = "#1f2937", ha = "#ffffff";
|
|
1941
|
+
function ga(e, t) {
|
|
1942
|
+
let n = R("title", e);
|
|
1943
|
+
n.color = ha, n.textAlign = "center";
|
|
1944
|
+
let r = R("paragraph", e);
|
|
1945
|
+
r.content = `<p style="text-align: center"><span style="color: ${ha}">${_a(t)}</span></p>`;
|
|
1946
|
+
let i = R("button", e);
|
|
1947
|
+
return i.align = "center", He({
|
|
1948
|
+
columns: "1",
|
|
1949
|
+
children: [[
|
|
1950
|
+
n,
|
|
1951
|
+
r,
|
|
1952
|
+
i
|
|
1953
|
+
]],
|
|
1954
|
+
hero: {
|
|
1955
|
+
height: "image",
|
|
1956
|
+
verticalAlign: "middle"
|
|
1957
|
+
},
|
|
1958
|
+
styles: {
|
|
1959
|
+
padding: {
|
|
1960
|
+
top: 48,
|
|
1961
|
+
right: 24,
|
|
1962
|
+
bottom: 48,
|
|
1963
|
+
left: 24
|
|
1964
|
+
},
|
|
1965
|
+
backgroundColor: ma
|
|
1966
|
+
}
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
function _a(e) {
|
|
1970
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1971
|
+
}
|
|
1954
1972
|
//#endregion
|
|
1955
1973
|
//#region src/utils/sectionColumnDrop.ts
|
|
1956
|
-
|
|
1957
|
-
|
|
1974
|
+
var va = /* @__PURE__ */ new Set(["section", pa]);
|
|
1975
|
+
function ya(e) {
|
|
1976
|
+
return e.dataset.blockType !== "section" && !va.has(e.dataset.paletteType ?? "");
|
|
1958
1977
|
}
|
|
1959
1978
|
//#endregion
|
|
1960
1979
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1961
|
-
var
|
|
1980
|
+
var ba = { class: "tpl:relative tpl:w-full" }, xa = {
|
|
1981
|
+
key: 0,
|
|
1982
|
+
"data-testid": "hero-image-hint",
|
|
1983
|
+
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
1984
|
+
}, Sa = {
|
|
1962
1985
|
key: 0,
|
|
1963
1986
|
"data-testid": "section-drop-hint",
|
|
1964
1987
|
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)]"
|
|
1965
|
-
},
|
|
1988
|
+
}, Ca = /* @__PURE__ */ d({
|
|
1966
1989
|
__name: "SectionBlock",
|
|
1967
1990
|
props: {
|
|
1968
1991
|
block: {},
|
|
@@ -1970,18 +1993,18 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
1970
1993
|
},
|
|
1971
1994
|
setup(e) {
|
|
1972
1995
|
let t = {
|
|
1973
|
-
title:
|
|
1974
|
-
paragraph:
|
|
1975
|
-
image:
|
|
1976
|
-
button:
|
|
1977
|
-
divider:
|
|
1978
|
-
custom:
|
|
1979
|
-
}, a = e, { t: o } =
|
|
1980
|
-
function
|
|
1981
|
-
let t =
|
|
1996
|
+
title: fa,
|
|
1997
|
+
paragraph: Xi,
|
|
1998
|
+
image: Li,
|
|
1999
|
+
button: Ur,
|
|
2000
|
+
divider: yi,
|
|
2001
|
+
custom: _i
|
|
2002
|
+
}, a = e, { t: o } = X(), c = K(J, "SectionBlock"), d = n(Wt, null), p = n(tn, null), g = n(Jt, {}), v = n(en, null);
|
|
2003
|
+
function S(e) {
|
|
2004
|
+
let t = g.savedBlocks;
|
|
1982
2005
|
t?.isPicking.value ? t.togglePick(a.block.id) : c.selectBlock(e);
|
|
1983
2006
|
}
|
|
1984
|
-
let C =
|
|
2007
|
+
let C = y(() => {
|
|
1985
2008
|
switch (a.block.columns) {
|
|
1986
2009
|
case "2": return ["50%", "50%"];
|
|
1987
2010
|
case "3": return [
|
|
@@ -1993,54 +2016,59 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
1993
2016
|
case "2-1": return ["66.67%", "33.33%"];
|
|
1994
2017
|
default: return ["100%"];
|
|
1995
2018
|
}
|
|
1996
|
-
}), w =
|
|
2019
|
+
}), w = y(() => {
|
|
1997
2020
|
let e = C.value.length, t = [...a.block.children];
|
|
1998
2021
|
for (; t.length < e;) t.push([]);
|
|
1999
2022
|
return t.slice(0, e);
|
|
2000
|
-
}), T =
|
|
2001
|
-
function
|
|
2023
|
+
}), T = y(() => a.viewport === "mobile" && a.block.stackOnMobile !== !1);
|
|
2024
|
+
function k(e) {
|
|
2002
2025
|
return w.value[e] || [];
|
|
2003
2026
|
}
|
|
2004
2027
|
function A(e) {
|
|
2005
|
-
return
|
|
2028
|
+
return v?.value === !1 || !d?.isHidden(e);
|
|
2006
2029
|
}
|
|
2007
|
-
function
|
|
2008
|
-
return !
|
|
2030
|
+
function F(e) {
|
|
2031
|
+
return !k(e).some((e) => A(e.id));
|
|
2009
2032
|
}
|
|
2010
2033
|
let I = l(null);
|
|
2011
2034
|
function L(e) {
|
|
2012
|
-
return c.state.previewMode ? !1 :
|
|
2013
|
-
}
|
|
2014
|
-
function R(e) {
|
|
2015
|
-
return E(e).length === 0 && !c.state.previewMode;
|
|
2035
|
+
return c.state.previewMode ? !1 : F(e) ? !0 : I.value === e && k(e).filter((e) => A(e.id)).length <= 1;
|
|
2016
2036
|
}
|
|
2037
|
+
let R = y(() => {
|
|
2038
|
+
if (c.state.previewMode) return !1;
|
|
2039
|
+
let e = V(a.block);
|
|
2040
|
+
return e !== null && !e.applied && e.reason === "image";
|
|
2041
|
+
});
|
|
2017
2042
|
function z(e) {
|
|
2018
|
-
return
|
|
2043
|
+
return k(e).length === 0 && !c.state.previewMode;
|
|
2044
|
+
}
|
|
2045
|
+
function B(e) {
|
|
2046
|
+
return k(e).length === 0 && c.state.previewMode;
|
|
2019
2047
|
}
|
|
2020
|
-
function
|
|
2048
|
+
function H(e, t) {
|
|
2021
2049
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
|
|
2022
2050
|
for (; r.length <= e;) r.push([]);
|
|
2023
2051
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
2024
2052
|
}
|
|
2025
|
-
function
|
|
2026
|
-
return
|
|
2053
|
+
function U(e) {
|
|
2054
|
+
return Dr(e, p, t);
|
|
2027
2055
|
}
|
|
2028
|
-
function
|
|
2056
|
+
function ee(e, t) {
|
|
2029
2057
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
2030
2058
|
fieldValues: t.fieldValues,
|
|
2031
2059
|
dataSourceFetched: t.dataSourceFetched
|
|
2032
2060
|
});
|
|
2033
2061
|
}
|
|
2034
|
-
return (t, n) => (s(),
|
|
2062
|
+
return (t, n) => (s(), b("div", ba, [R.value ? (s(), b("div", xa, [O("span", null, P(m(o).section.heroAddImage), 1)])) : x("", !0), O("div", { class: _(["tpl:flex tpl:gap-0", { "tpl:flex-col": T.value }]) }, [(s(!0), b(N, null, r(w.value, (t, a) => (s(), b("div", {
|
|
2035
2063
|
key: a,
|
|
2036
|
-
class:
|
|
2037
|
-
style:
|
|
2038
|
-
}, [
|
|
2039
|
-
"model-value":
|
|
2064
|
+
class: _(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", z(a) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2065
|
+
style: E({ width: T.value ? "100%" : C.value[a] })
|
|
2066
|
+
}, [h(m(M), {
|
|
2067
|
+
"model-value": k(a),
|
|
2040
2068
|
group: {
|
|
2041
2069
|
name: "blocks",
|
|
2042
2070
|
pull: !0,
|
|
2043
|
-
put: (e, t, n) =>
|
|
2071
|
+
put: (e, t, n) => m(ya)(n)
|
|
2044
2072
|
},
|
|
2045
2073
|
animation: 150,
|
|
2046
2074
|
"ghost-class": "tpl-ghost",
|
|
@@ -2050,27 +2078,27 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2050
2078
|
"inverted-swap-threshold": .65,
|
|
2051
2079
|
"empty-insert-threshold": 20,
|
|
2052
2080
|
"force-fallback": !0,
|
|
2053
|
-
class:
|
|
2081
|
+
class: _(["tpl:grow", {
|
|
2054
2082
|
"tpl:min-h-[60px]": L(a),
|
|
2055
|
-
"tpl:min-h-[34px]":
|
|
2083
|
+
"tpl:min-h-[34px]": B(a)
|
|
2056
2084
|
}]),
|
|
2057
2085
|
onStart: (e) => I.value = a,
|
|
2058
2086
|
onEnd: n[0] ||= (e) => I.value = null,
|
|
2059
|
-
"onUpdate:modelValue": (e) =>
|
|
2087
|
+
"onUpdate:modelValue": (e) => H(a, e)
|
|
2060
2088
|
}, {
|
|
2061
|
-
default: i(() => [(s(!0),
|
|
2089
|
+
default: i(() => [(s(!0), b(N, null, r(k(a), (t) => f((s(), b("div", { key: t.id }, [h(ua, {
|
|
2062
2090
|
block: t,
|
|
2063
|
-
"is-selected":
|
|
2091
|
+
"is-selected": m(c).state.selectedBlockId === t.id,
|
|
2064
2092
|
viewport: e.viewport,
|
|
2065
|
-
"preview-mode":
|
|
2093
|
+
"preview-mode": m(c).state.previewMode,
|
|
2066
2094
|
nested: "",
|
|
2067
|
-
onSelect: (e) =>
|
|
2095
|
+
onSelect: (e) => S(t.id)
|
|
2068
2096
|
}, {
|
|
2069
|
-
default: i(() => [(s(),
|
|
2097
|
+
default: i(() => [(s(), D(u(U(t)), {
|
|
2070
2098
|
block: t,
|
|
2071
2099
|
viewport: e.viewport,
|
|
2072
|
-
onFetchData: (e) =>
|
|
2073
|
-
onUpdate: (e) =>
|
|
2100
|
+
onFetchData: (e) => ee(t, e),
|
|
2101
|
+
onUpdate: (e) => m(c).updateBlock(t.id, e)
|
|
2074
2102
|
}, null, 40, [
|
|
2075
2103
|
"block",
|
|
2076
2104
|
"viewport",
|
|
@@ -2084,7 +2112,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2084
2112
|
"viewport",
|
|
2085
2113
|
"preview-mode",
|
|
2086
2114
|
"onSelect"
|
|
2087
|
-
])])), [[
|
|
2115
|
+
])])), [[j, A(t.id)]])), 128))]),
|
|
2088
2116
|
_: 2
|
|
2089
2117
|
}, 1032, [
|
|
2090
2118
|
"model-value",
|
|
@@ -2092,14 +2120,14 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2092
2120
|
"class",
|
|
2093
2121
|
"onStart",
|
|
2094
2122
|
"onUpdate:modelValue"
|
|
2095
|
-
]),
|
|
2123
|
+
]), z(a) ? (s(), b("div", Sa, [O("span", null, P(m(o).section.dropHere), 1)])) : x("", !0)], 6))), 128))], 2)]));
|
|
2096
2124
|
}
|
|
2097
|
-
}),
|
|
2125
|
+
}), wa = ["width", "height"], Ta = [
|
|
2098
2126
|
"d",
|
|
2099
2127
|
"stroke",
|
|
2100
2128
|
"stroke-opacity",
|
|
2101
2129
|
"stroke-width"
|
|
2102
|
-
],
|
|
2130
|
+
], Ea = ["d", "fill"], Da = /* @__PURE__ */ d({
|
|
2103
2131
|
__name: "SocialIconSvg",
|
|
2104
2132
|
props: {
|
|
2105
2133
|
platform: {},
|
|
@@ -2108,7 +2136,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2108
2136
|
iconSize: {}
|
|
2109
2137
|
},
|
|
2110
2138
|
setup(e) {
|
|
2111
|
-
let t = e, n =
|
|
2139
|
+
let t = e, n = y(() => rt[t.platform]), r = y(() => at[t.iconSize]), i = y(() => B(t.platform, t.iconTone)), a = y(() => fe(t.iconStyle, t.iconTone)), o = y(() => {
|
|
2112
2140
|
let e = {
|
|
2113
2141
|
display: "inline-flex",
|
|
2114
2142
|
alignItems: "center",
|
|
@@ -2146,19 +2174,19 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2146
2174
|
};
|
|
2147
2175
|
default: return e;
|
|
2148
2176
|
}
|
|
2149
|
-
}), c =
|
|
2177
|
+
}), c = y(() => Be(t.iconStyle)), l = y(() => Math.floor(r.value * c.value));
|
|
2150
2178
|
function u(e) {
|
|
2151
2179
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2152
2180
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
2153
2181
|
}
|
|
2154
|
-
let d =
|
|
2155
|
-
return (e, t) => (s(),
|
|
2182
|
+
let d = y(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
|
|
2183
|
+
return (e, t) => (s(), b("span", { style: E(o.value) }, [(s(), b("svg", {
|
|
2156
2184
|
width: l.value,
|
|
2157
2185
|
height: l.value,
|
|
2158
2186
|
viewBox: "0 0 24 24",
|
|
2159
2187
|
overflow: "visible",
|
|
2160
2188
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2161
|
-
}, [a.value ? (s(),
|
|
2189
|
+
}, [a.value ? (s(), b("path", {
|
|
2162
2190
|
key: 0,
|
|
2163
2191
|
"data-testid": "social-icon-halo",
|
|
2164
2192
|
d: n.value.path,
|
|
@@ -2167,36 +2195,36 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2167
2195
|
"stroke-opacity": a.value.opacity,
|
|
2168
2196
|
"stroke-width": a.value.width / c.value,
|
|
2169
2197
|
"stroke-linejoin": "round"
|
|
2170
|
-
}, null, 8,
|
|
2198
|
+
}, null, 8, Ta)) : x("", !0), O("path", {
|
|
2171
2199
|
d: n.value.path,
|
|
2172
2200
|
fill: d.value
|
|
2173
|
-
}, null, 8,
|
|
2201
|
+
}, null, 8, Ea)], 8, wa))], 4));
|
|
2174
2202
|
}
|
|
2175
|
-
}),
|
|
2203
|
+
}), Oa = { class: "tpl:w-full" }, ka = ["href"], Aa = {
|
|
2176
2204
|
key: 1,
|
|
2177
2205
|
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)]"
|
|
2178
|
-
},
|
|
2206
|
+
}, ja = /* @__PURE__ */ d({
|
|
2179
2207
|
__name: "SocialIconsBlock",
|
|
2180
2208
|
props: {
|
|
2181
2209
|
block: {},
|
|
2182
2210
|
viewport: {}
|
|
2183
2211
|
},
|
|
2184
2212
|
setup(e) {
|
|
2185
|
-
let t = e, { t: n } =
|
|
2213
|
+
let t = e, { t: n } = X(), i = y(() => ({
|
|
2186
2214
|
display: "flex",
|
|
2187
2215
|
flexWrap: "wrap",
|
|
2188
2216
|
gap: `${t.block.spacing}px`,
|
|
2189
2217
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2190
|
-
})), a =
|
|
2191
|
-
return (t, o) => (s(),
|
|
2218
|
+
})), a = y(() => t.block.icons.length > 0);
|
|
2219
|
+
return (t, o) => (s(), b("div", Oa, [a.value ? (s(), b("div", {
|
|
2192
2220
|
key: 0,
|
|
2193
|
-
style:
|
|
2194
|
-
}, [(s(!0),
|
|
2221
|
+
style: E(i.value)
|
|
2222
|
+
}, [(s(!0), b(N, null, r(e.block.icons, (t) => (s(), b("a", {
|
|
2195
2223
|
key: t.id,
|
|
2196
2224
|
href: t.url || "#",
|
|
2197
2225
|
class: "tpl:cursor-default",
|
|
2198
|
-
onClick: o[0] ||=
|
|
2199
|
-
}, [
|
|
2226
|
+
onClick: o[0] ||= T(() => {}, ["prevent"])
|
|
2227
|
+
}, [h(Da, {
|
|
2200
2228
|
platform: t.platform,
|
|
2201
2229
|
"icon-style": e.block.iconStyle,
|
|
2202
2230
|
"icon-tone": e.block.iconTone,
|
|
@@ -2206,44 +2234,44 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2206
2234
|
"icon-style",
|
|
2207
2235
|
"icon-tone",
|
|
2208
2236
|
"icon-size"
|
|
2209
|
-
])], 8,
|
|
2237
|
+
])], 8, ka))), 128))], 4)) : (s(), b("div", Aa, [h(m(wn), { size: 16 }), O("span", null, P(m(n).social.addIcons), 1)]))]));
|
|
2210
2238
|
}
|
|
2211
|
-
}),
|
|
2239
|
+
}), Ma = { class: "tpl:w-full" }, Na = {
|
|
2212
2240
|
key: 0,
|
|
2213
2241
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2214
2242
|
style: {
|
|
2215
2243
|
"background-color": "var(--tpl-bg-hover)",
|
|
2216
2244
|
color: "var(--tpl-text-dim)"
|
|
2217
2245
|
}
|
|
2218
|
-
},
|
|
2246
|
+
}, Pa = /* @__PURE__ */ d({
|
|
2219
2247
|
__name: "SpacerBlock",
|
|
2220
2248
|
props: {
|
|
2221
2249
|
block: {},
|
|
2222
2250
|
viewport: {}
|
|
2223
2251
|
},
|
|
2224
2252
|
setup(e) {
|
|
2225
|
-
let t = e, n =
|
|
2253
|
+
let t = e, n = K(J, "SpacerBlock"), r = y(() => ({
|
|
2226
2254
|
height: `${t.block.height}px`,
|
|
2227
2255
|
minHeight: `${t.block.height}px`,
|
|
2228
2256
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2229
2257
|
}));
|
|
2230
|
-
return (t, i) => (s(),
|
|
2231
|
-
style:
|
|
2232
|
-
class:
|
|
2233
|
-
}, [
|
|
2258
|
+
return (t, i) => (s(), b("div", Ma, [O("div", {
|
|
2259
|
+
style: E(r.value),
|
|
2260
|
+
class: _(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !m(n).state.previewMode }])
|
|
2261
|
+
}, [m(n).state.previewMode ? x("", !0) : (s(), b("span", Na, P(e.block.height) + "px ", 1))], 6)]));
|
|
2234
2262
|
}
|
|
2235
|
-
}),
|
|
2263
|
+
}), Fa = { class: "tpl:w-full" }, Ia = { key: 0 }, La = [
|
|
2236
2264
|
"aria-label",
|
|
2237
2265
|
"data-placeholder",
|
|
2238
2266
|
"onBlur"
|
|
2239
|
-
],
|
|
2267
|
+
], Ra = [
|
|
2240
2268
|
"aria-label",
|
|
2241
2269
|
"data-placeholder",
|
|
2242
2270
|
"onBlur"
|
|
2243
|
-
],
|
|
2271
|
+
], za = {
|
|
2244
2272
|
key: 1,
|
|
2245
2273
|
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)]"
|
|
2246
|
-
},
|
|
2274
|
+
}, Ba = /*#__PURE__*/ An(/* @__PURE__ */ d({
|
|
2247
2275
|
__name: "TableBlock",
|
|
2248
2276
|
props: {
|
|
2249
2277
|
block: {},
|
|
@@ -2257,7 +2285,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2257
2285
|
updated(e, t) {
|
|
2258
2286
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2259
2287
|
}
|
|
2260
|
-
}, n = e, { t: i } =
|
|
2288
|
+
}, n = e, { t: i } = X(), a = K(J, "TableBlock"), o = K(Y, "TableBlock"), c = y(() => n.block.rows.length > 0), l = y(() => {
|
|
2261
2289
|
let e = {
|
|
2262
2290
|
width: "100%",
|
|
2263
2291
|
borderCollapse: "collapse",
|
|
@@ -2266,19 +2294,19 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2266
2294
|
fontFamily: n.block.fontFamily ? o.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
2267
2295
|
};
|
|
2268
2296
|
return n.block.color && (e.color = n.block.color), e;
|
|
2269
|
-
}), u =
|
|
2297
|
+
}), u = y(() => ({
|
|
2270
2298
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
2271
2299
|
padding: `${n.block.cellPadding}px`,
|
|
2272
2300
|
textAlign: n.block.textAlign
|
|
2273
|
-
})), d =
|
|
2301
|
+
})), d = y(() => ({
|
|
2274
2302
|
...u.value,
|
|
2275
2303
|
fontWeight: "bold",
|
|
2276
2304
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
2277
|
-
})), p =
|
|
2305
|
+
})), p = y(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), _ = y(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
2278
2306
|
function v() {
|
|
2279
2307
|
a.selectBlock(n.block.id);
|
|
2280
2308
|
}
|
|
2281
|
-
function
|
|
2309
|
+
function S(e, t, r) {
|
|
2282
2310
|
let i = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
2283
2311
|
...n,
|
|
2284
2312
|
cells: n.cells.map((e) => e.id === t ? {
|
|
@@ -2288,49 +2316,49 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
2288
2316
|
} : n);
|
|
2289
2317
|
a.updateBlock(n.block.id, { rows: o });
|
|
2290
2318
|
}
|
|
2291
|
-
return (e, n) => (s(),
|
|
2319
|
+
return (e, n) => (s(), b("div", Fa, [c.value ? (s(), b("table", {
|
|
2292
2320
|
key: 0,
|
|
2293
|
-
style:
|
|
2321
|
+
style: E(l.value),
|
|
2294
2322
|
class: "tpl-table-editable"
|
|
2295
|
-
}, [p.value ? (s(),
|
|
2323
|
+
}, [p.value ? (s(), b("thead", Ia, [O("tr", null, [(s(!0), b(N, null, r(p.value.cells, (e) => f((s(), b("th", {
|
|
2296
2324
|
key: e.id,
|
|
2297
|
-
style:
|
|
2298
|
-
"aria-label":
|
|
2325
|
+
style: E(d.value),
|
|
2326
|
+
"aria-label": m(i).table.cellPlaceholder,
|
|
2299
2327
|
contenteditable: "true",
|
|
2300
|
-
"data-placeholder":
|
|
2301
|
-
onBlur: (t) =>
|
|
2302
|
-
onKeydown: n[0] ||=
|
|
2303
|
-
onClick:
|
|
2304
|
-
}, null, 44,
|
|
2328
|
+
"data-placeholder": m(i).table.cellPlaceholder,
|
|
2329
|
+
onBlur: (t) => S(p.value.id, e.id, t),
|
|
2330
|
+
onKeydown: n[0] ||= g(T((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2331
|
+
onClick: T(v, ["stop"])
|
|
2332
|
+
}, null, 44, La)), [[t, e.content]])), 128))])])) : x("", !0), O("tbody", null, [(s(!0), b(N, null, r(_.value, (e) => (s(), b("tr", { key: e.id }, [(s(!0), b(N, null, r(e.cells, (r) => f((s(), b("td", {
|
|
2305
2333
|
key: r.id,
|
|
2306
|
-
style:
|
|
2307
|
-
"aria-label":
|
|
2334
|
+
style: E(u.value),
|
|
2335
|
+
"aria-label": m(i).table.cellPlaceholder,
|
|
2308
2336
|
contenteditable: "true",
|
|
2309
|
-
"data-placeholder":
|
|
2310
|
-
onBlur: (t) =>
|
|
2311
|
-
onKeydown: n[1] ||=
|
|
2312
|
-
onClick:
|
|
2313
|
-
}, null, 44,
|
|
2337
|
+
"data-placeholder": m(i).table.cellPlaceholder,
|
|
2338
|
+
onBlur: (t) => S(e.id, r.id, t),
|
|
2339
|
+
onKeydown: n[1] ||= g(T((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2340
|
+
onClick: T(v, ["stop"])
|
|
2341
|
+
}, null, 44, Ra)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), b("div", za, [h(m(On), { size: 16 }), O("span", null, P(m(i).table.empty), 1)]))]));
|
|
2314
2342
|
}
|
|
2315
|
-
}), [["__scopeId", "data-v-6751d456"]]),
|
|
2343
|
+
}), [["__scopeId", "data-v-6751d456"]]), Va = /* @__PURE__ */ d({
|
|
2316
2344
|
__name: "VideoPlayButton",
|
|
2317
2345
|
props: { hoverEffect: {
|
|
2318
2346
|
type: Boolean,
|
|
2319
2347
|
default: !1
|
|
2320
2348
|
} },
|
|
2321
2349
|
setup(e) {
|
|
2322
|
-
return (t, n) => (s(),
|
|
2350
|
+
return (t, n) => (s(), b("div", { class: _(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [O("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [O("svg", {
|
|
2323
2351
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
2324
2352
|
width: "28",
|
|
2325
2353
|
height: "28",
|
|
2326
2354
|
viewBox: "0 0 24 24",
|
|
2327
2355
|
fill: "currentColor"
|
|
2328
|
-
}, [
|
|
2356
|
+
}, [O("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
2329
2357
|
}
|
|
2330
2358
|
});
|
|
2331
2359
|
//#endregion
|
|
2332
2360
|
//#region src/utils/videoThumbnail.ts
|
|
2333
|
-
function
|
|
2361
|
+
function Ha(e) {
|
|
2334
2362
|
if (!e) return {
|
|
2335
2363
|
platform: "unknown",
|
|
2336
2364
|
videoId: null,
|
|
@@ -2362,25 +2390,25 @@ function ka(e) {
|
|
|
2362
2390
|
thumbnailUrl: null
|
|
2363
2391
|
};
|
|
2364
2392
|
}
|
|
2365
|
-
function
|
|
2366
|
-
return t ||
|
|
2393
|
+
function Ua(e, t) {
|
|
2394
|
+
return t || Ha(e).thumbnailUrl;
|
|
2367
2395
|
}
|
|
2368
2396
|
//#endregion
|
|
2369
2397
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2370
|
-
var
|
|
2398
|
+
var Wa = ["src", "alt"], Ga = {
|
|
2371
2399
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2372
2400
|
style: { opacity: "0.7" }
|
|
2373
|
-
},
|
|
2401
|
+
}, Ka = ["href"], qa = ["src", "alt"], Ja = ["src", "alt"], Ya = {
|
|
2374
2402
|
key: 3,
|
|
2375
2403
|
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
|
-
},
|
|
2404
|
+
}, Xa = /* @__PURE__ */ d({
|
|
2377
2405
|
__name: "VideoBlock",
|
|
2378
2406
|
props: {
|
|
2379
2407
|
block: {},
|
|
2380
2408
|
viewport: {}
|
|
2381
2409
|
},
|
|
2382
2410
|
setup(e) {
|
|
2383
|
-
let t = e, { t: n } =
|
|
2411
|
+
let t = e, { t: n } = X(), { syntax: r } = Mn(), i = y(() => Ie(t.block.url, r) || Ie(t.block.thumbnailUrl, r)), a = We(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = We(() => i.value ? t.block.placeholderUrl : void 0), c = y(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Ua(t.block.url)), l = y(() => ({ textAlign: t.block.align })), u = y(() => {
|
|
2384
2412
|
let e = t.block.align;
|
|
2385
2413
|
return {
|
|
2386
2414
|
maxWidth: "100%",
|
|
@@ -2390,90 +2418,89 @@ var ja = ["src", "alt"], Ma = {
|
|
|
2390
2418
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2391
2419
|
marginRight: e === "center" ? "auto" : void 0
|
|
2392
2420
|
};
|
|
2393
|
-
}), d =
|
|
2394
|
-
return (t, r) => (s(),
|
|
2421
|
+
}), d = y(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = y(() => Ie(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2422
|
+
return (t, r) => (s(), b("div", {
|
|
2395
2423
|
class: "tpl:w-full",
|
|
2396
|
-
style:
|
|
2397
|
-
}, [i.value && e.block.placeholderUrl ? (s(),
|
|
2424
|
+
style: E(l.value)
|
|
2425
|
+
}, [i.value && e.block.placeholderUrl ? (s(), b("div", {
|
|
2398
2426
|
key: 0,
|
|
2399
2427
|
class: "tpl:relative tpl:inline-block",
|
|
2400
|
-
style:
|
|
2401
|
-
}, [
|
|
2428
|
+
style: E(u.value)
|
|
2429
|
+
}, [O("img", {
|
|
2402
2430
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2403
|
-
src:
|
|
2431
|
+
src: m(o),
|
|
2404
2432
|
alt: e.block.alt,
|
|
2405
|
-
style:
|
|
2406
|
-
}, null, 12,
|
|
2433
|
+
style: E(d.value)
|
|
2434
|
+
}, null, 12, Wa), h(Va)], 4)) : i.value ? (s(), b("div", {
|
|
2407
2435
|
key: 1,
|
|
2408
2436
|
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)]",
|
|
2409
|
-
style:
|
|
2410
|
-
}, [
|
|
2437
|
+
style: E([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2438
|
+
}, [h(m(Dn), {
|
|
2411
2439
|
size: 36,
|
|
2412
2440
|
"stroke-width": 1.5,
|
|
2413
2441
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2414
2442
|
style: { opacity: "0.5" }
|
|
2415
|
-
}),
|
|
2443
|
+
}), O("span", Ga, [h(Vr, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), b(N, { key: 2 }, [e.block.url ? (s(), b("a", {
|
|
2416
2444
|
key: 0,
|
|
2417
2445
|
href: e.block.url,
|
|
2418
2446
|
target: "_blank",
|
|
2419
2447
|
rel: "noopener noreferrer",
|
|
2420
2448
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
2421
|
-
style:
|
|
2422
|
-
onClick: r[0] ||=
|
|
2423
|
-
}, [
|
|
2449
|
+
style: E(u.value),
|
|
2450
|
+
onClick: r[0] ||= T(() => {}, ["prevent"])
|
|
2451
|
+
}, [O("img", {
|
|
2424
2452
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2425
2453
|
src: c.value,
|
|
2426
2454
|
alt: e.block.alt,
|
|
2427
|
-
style:
|
|
2428
|
-
}, null, 12,
|
|
2455
|
+
style: E(d.value)
|
|
2456
|
+
}, null, 12, qa), h(Va, { "hover-effect": "" })], 12, Ka)) : (s(), b("div", {
|
|
2429
2457
|
key: 1,
|
|
2430
2458
|
class: "tpl:relative tpl:inline-block",
|
|
2431
|
-
style:
|
|
2432
|
-
}, [
|
|
2459
|
+
style: E(u.value)
|
|
2460
|
+
}, [O("img", {
|
|
2433
2461
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2434
2462
|
src: c.value,
|
|
2435
2463
|
alt: e.block.alt,
|
|
2436
|
-
style:
|
|
2437
|
-
}, null, 12,
|
|
2464
|
+
style: E(d.value)
|
|
2465
|
+
}, null, 12, Ja), h(Va)], 4))], 64)) : (s(), b("div", Ya, [h(m(Dn), {
|
|
2438
2466
|
size: 40,
|
|
2439
2467
|
"stroke-width": 1.5,
|
|
2440
2468
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2441
|
-
}),
|
|
2442
|
-
}
|
|
2443
|
-
}),
|
|
2444
|
-
section:
|
|
2445
|
-
title:
|
|
2446
|
-
paragraph:
|
|
2447
|
-
image:
|
|
2448
|
-
button:
|
|
2449
|
-
divider:
|
|
2450
|
-
video:
|
|
2451
|
-
social:
|
|
2452
|
-
menu:
|
|
2453
|
-
table:
|
|
2454
|
-
spacer:
|
|
2455
|
-
html:
|
|
2456
|
-
countdown:
|
|
2469
|
+
}), O("span", null, P(m(n).video.addVideo), 1)]))], 4));
|
|
2470
|
+
}
|
|
2471
|
+
}), Za = {
|
|
2472
|
+
section: Ca,
|
|
2473
|
+
title: fa,
|
|
2474
|
+
paragraph: Xi,
|
|
2475
|
+
image: Li,
|
|
2476
|
+
button: Ur,
|
|
2477
|
+
divider: yi,
|
|
2478
|
+
video: Xa,
|
|
2479
|
+
social: ja,
|
|
2480
|
+
menu: Vi,
|
|
2481
|
+
table: Ba,
|
|
2482
|
+
spacer: Pa,
|
|
2483
|
+
html: Ti,
|
|
2484
|
+
countdown: I(() => import("./CountdownBlock-DB4JNdqh.js"))
|
|
2457
2485
|
};
|
|
2458
|
-
function
|
|
2459
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } =
|
|
2486
|
+
function Qa(e) {
|
|
2487
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = X(i), d = y(() => le(le(le(rr(i), Sr(n.content.value.settings?.locale)), W(n.content.value.settings) === "rtl" ? {
|
|
2460
2488
|
title: { textAlign: "right" },
|
|
2461
2489
|
table: { textAlign: "right" }
|
|
2462
2490
|
} : {}), r.blockDefaults ?? {}));
|
|
2463
2491
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2464
|
-
let { resolvedTheme: f } =
|
|
2465
|
-
themeOverrides:
|
|
2492
|
+
let { resolvedTheme: f } = Gn(y(() => n.state.uiTheme)), m = l(r.theme ?? {}), { themeStyles: h } = qn({
|
|
2493
|
+
themeOverrides: m,
|
|
2466
2494
|
resolvedTheme: f,
|
|
2467
2495
|
extraStyles: () => ({
|
|
2468
2496
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2469
2497
|
...e.themeExtraStyles?.()
|
|
2470
2498
|
})
|
|
2471
|
-
}), g =
|
|
2499
|
+
}), g = e.history ?? qe({
|
|
2472
2500
|
content: n.content,
|
|
2473
|
-
setContent: (e, t) => n.setContent(e, t)
|
|
2474
|
-
...e.historyOptions
|
|
2501
|
+
setContent: (e, t) => n.setContent(e, t)
|
|
2475
2502
|
});
|
|
2476
|
-
|
|
2503
|
+
e.history || tt(n, g);
|
|
2477
2504
|
let _ = Ke({
|
|
2478
2505
|
addBlock: n.addBlock,
|
|
2479
2506
|
removeBlock: n.removeBlock,
|
|
@@ -2481,7 +2508,7 @@ function za(e) {
|
|
|
2481
2508
|
selectBlock: n.selectBlock,
|
|
2482
2509
|
findBlockLocation: n.findBlockLocation,
|
|
2483
2510
|
blockDefaults: () => d.value
|
|
2484
|
-
}),
|
|
2511
|
+
}), b = Ye(n), x = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Ge({
|
|
2485
2512
|
content: n.content,
|
|
2486
2513
|
isDirty: () => n.state.isDirty,
|
|
2487
2514
|
...e.autoSaveOptions
|
|
@@ -2489,30 +2516,30 @@ function za(e) {
|
|
|
2489
2516
|
x && (S = t(g.isNavigating, (e) => {
|
|
2490
2517
|
e ? x.pause() : x.resume();
|
|
2491
2518
|
}));
|
|
2492
|
-
let C =
|
|
2519
|
+
let C = Wn(n, {
|
|
2493
2520
|
t: s,
|
|
2494
2521
|
format: u
|
|
2495
|
-
}, r.customBlocks ?? []), w =
|
|
2496
|
-
if (w.allowCustomIgnored &&
|
|
2497
|
-
let e =
|
|
2498
|
-
e.length > 0 &&
|
|
2499
|
-
}
|
|
2500
|
-
let T =
|
|
2501
|
-
for (let e of T.unknown)
|
|
2502
|
-
let E =
|
|
2503
|
-
|
|
2522
|
+
}, r.customBlocks ?? []), w = ln(r.colors);
|
|
2523
|
+
if (w.allowCustomIgnored && Z.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 && Z.warn(`config.colors.presets skipped invalid entries: ${w.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), w.allowCustom === !1) {
|
|
2524
|
+
let e = nr(w.presets, r.blockDefaults, r.templateDefaults);
|
|
2525
|
+
e.length > 0 && Z.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.`);
|
|
2526
|
+
}
|
|
2527
|
+
let T = dn(r.templateSettings);
|
|
2528
|
+
for (let e of T.unknown) Z.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${fn.join(", ")}) — skipping it.`);
|
|
2529
|
+
let E = Jn();
|
|
2530
|
+
$n(E, Za);
|
|
2504
2531
|
let D = /* @__PURE__ */ new Set();
|
|
2505
2532
|
function O(e) {
|
|
2506
2533
|
for (let t of e) {
|
|
2507
|
-
E.registerCustom(t,
|
|
2508
|
-
for (let e of
|
|
2534
|
+
E.registerCustom(t, _i);
|
|
2535
|
+
for (let e of Cr(t, w)) D.has(e.id) || (D.add(e.id), Z.warn(e.message));
|
|
2509
2536
|
}
|
|
2510
2537
|
}
|
|
2511
2538
|
r.customBlocks?.length && O(r.customBlocks);
|
|
2512
|
-
let k =
|
|
2513
|
-
if (o() &&
|
|
2539
|
+
let k = Ln();
|
|
2540
|
+
if (o() && p(k.dispose), e.containerEl) {
|
|
2514
2541
|
let t = e.containerEl;
|
|
2515
|
-
|
|
2542
|
+
pt(document, "pointerdown", (e) => {
|
|
2516
2543
|
let n = t.value;
|
|
2517
2544
|
n && (e.composedPath?.() ?? []).includes(n) && k.claim();
|
|
2518
2545
|
}, { capture: !0 });
|
|
@@ -2522,49 +2549,48 @@ function za(e) {
|
|
|
2522
2549
|
t ? t.save() : x?.flush();
|
|
2523
2550
|
}
|
|
2524
2551
|
function j(t) {
|
|
2525
|
-
k.isActive() &&
|
|
2552
|
+
k.isActive() && Tr(t, {
|
|
2526
2553
|
history: g,
|
|
2527
2554
|
selectBlock: (e) => n.selectBlock(e),
|
|
2528
2555
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
2529
2556
|
removeBlock: (e) => n.removeBlock(e),
|
|
2530
2557
|
onSave: A,
|
|
2531
|
-
onBeforeUndo: e.keyboardOptions?.onBeforeUndo,
|
|
2532
2558
|
isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
2533
2559
|
onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
|
|
2534
2560
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
2535
2561
|
});
|
|
2536
2562
|
}
|
|
2537
|
-
|
|
2563
|
+
pt(document, "keydown", j);
|
|
2538
2564
|
let M = l(null), N = e.editorRoot ?? document;
|
|
2539
|
-
c(
|
|
2540
|
-
let P =
|
|
2565
|
+
c(zt, N), c(_t, M), c(Lt, i), c(J, n), c(an, g), c(Bt, _), c(Wt, b), c(Y, a), c(Tt, h), c(Rt, f), c(Zt, d), c(It, r.locale), c(tn, E), c(Qt, r.customBlocks ?? []), c(on, r.paletteBlocks), c(Vt, er(r.htmlBlockPreview)), c(vt, r.layout), c(St, r.sectionWrapper), c(Ut, w), c($t, T.fields), c(Yt, Yn(n.content, E));
|
|
2566
|
+
let P = je(r.mergeTags?.syntax), F = v(r.mergeTags?.tags ?? []);
|
|
2541
2567
|
function I(e) {
|
|
2542
|
-
Array.isArray(e) ? F.value = e :
|
|
2568
|
+
Array.isArray(e) ? F.value = e : Z.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
2543
2569
|
}
|
|
2544
|
-
c(
|
|
2545
|
-
let L = l(
|
|
2546
|
-
c(
|
|
2547
|
-
let R =
|
|
2570
|
+
c(q, F), c(At, P), c(Mt, r.mergeTags?.onRequest ?? null), c(qt, r.mergeTags?.autocomplete !== !1), c(kt, r.mergeTags?.showRawValue !== !1);
|
|
2571
|
+
let L = l(Ae(r.mergeTags?.tags ?? []));
|
|
2572
|
+
c(Ot, L);
|
|
2573
|
+
let R = zn({
|
|
2548
2574
|
resolvePreview: r.resolvePreview,
|
|
2549
2575
|
getContent: () => {
|
|
2550
2576
|
let e = n.content.value;
|
|
2551
|
-
return r.layout && n.state.previewMode ?
|
|
2577
|
+
return r.layout && n.state.previewMode ? ze(r.layout, e) : e;
|
|
2552
2578
|
},
|
|
2553
2579
|
isActive: () => n.state.previewMode
|
|
2554
2580
|
});
|
|
2555
|
-
c(
|
|
2556
|
-
let z =
|
|
2557
|
-
c(
|
|
2558
|
-
let B =
|
|
2559
|
-
c(
|
|
2560
|
-
let V =
|
|
2581
|
+
c(Ft, R), c(Ct, r.resolvePreview);
|
|
2582
|
+
let z = y(() => !(n.state.previewMode && R.isConfigured));
|
|
2583
|
+
c(en, z);
|
|
2584
|
+
let B = Bn();
|
|
2585
|
+
c(gt, B), c(Kt, l(!1)), c(yt, l(!1)), c(Pt, r.logicTags?.tags ?? []), c(nn, r.logicTags?.pairs ?? []), c(wt, r.logicTags?.onRequest ?? null), c(bt, Vn()), c(Dt, r.onRequestMedia ?? null), c(Ht, r.canDropMedia ?? null), c(rn, r.resolveImageUrl ? ct(r.resolveImageUrl) : null), c(Gt, r.displayConditions?.conditions ?? []), c(Xt, r.displayConditions?.allowCustom ?? !1), c(Jt, e.capabilities ?? {}), c(Nt, C);
|
|
2586
|
+
let V = Hn(r.lint) ? null : Un({
|
|
2561
2587
|
content: n.content,
|
|
2562
2588
|
options: r.lint ?? {},
|
|
2563
2589
|
updateBlock: n.updateBlock,
|
|
2564
2590
|
updateSettings: n.updateSettings,
|
|
2565
2591
|
removeBlock: n.removeBlock
|
|
2566
2592
|
});
|
|
2567
|
-
c(
|
|
2593
|
+
c(Et, V);
|
|
2568
2594
|
function H() {
|
|
2569
2595
|
S?.(), V?.destroy(), x?.destroy(), g.destroy();
|
|
2570
2596
|
}
|
|
@@ -2574,11 +2600,11 @@ function za(e) {
|
|
|
2574
2600
|
editorRoot: N,
|
|
2575
2601
|
history: g,
|
|
2576
2602
|
blockActions: _,
|
|
2577
|
-
conditionPreview:
|
|
2603
|
+
conditionPreview: b,
|
|
2578
2604
|
autoSave: x,
|
|
2579
2605
|
resolvedTheme: f,
|
|
2580
2606
|
themeStyles: h,
|
|
2581
|
-
themeOverrides:
|
|
2607
|
+
themeOverrides: m,
|
|
2582
2608
|
registry: E,
|
|
2583
2609
|
keyboardReorder: C,
|
|
2584
2610
|
templateLint: V,
|
|
@@ -2592,6 +2618,6 @@ function za(e) {
|
|
|
2592
2618
|
};
|
|
2593
2619
|
}
|
|
2594
2620
|
//#endregion
|
|
2595
|
-
export {
|
|
2621
|
+
export { Dr as A, Kr as C, Ir as D, Fr as E, gr as F, hr as I, mr as L, yr as M, vr as N, Er as O, _r as P, zn as R, Jr as S, jr as T, ci as _, ja as a, $r as b, ga as c, Xi as d, Vi as f, _i as g, yi as h, Pa as i, dr as j, zr as k, fa as l, Ti as m, Xa as n, Ca as o, Li as p, Ba as r, pa as s, Qa as t, ua as u, oi as v, Ur as w, Yr as x, ii as y };
|
|
2596
2622
|
|
|
2597
|
-
//# sourceMappingURL=useEditorCore-
|
|
2623
|
+
//# sourceMappingURL=useEditorCore-DpCFvHg_.js.map
|