@templatical/editor 0.46.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-DGcH4Lyo.js → AiChatSidebar-DxPHFNoT.js} +14 -14
- package/dist/{AiFeatureMenu-B4q-0g1S.js → AiFeatureMenu-C8GVqu1d.js} +7 -7
- package/dist/{BlockIssueBadge-CZA1XvAh.js → BlockIssueBadge-BShkuJis.js} +5 -5
- package/dist/BlockPreviewCanvas-tzAtDkXH.js +141 -0
- package/dist/{CloudHeaderExtras-ehMYJP68.js → CloudHeaderExtras-CUSftQdm.js} +5 -5
- package/dist/{CloudPanels-BwOaAlKz.js → CloudPanels-Dgw7tb4R.js} +9 -9
- package/dist/{CollaboratorBar-qOZFRNPx.js → CollaboratorBar-5rfopCPx.js} +4 -4
- package/dist/{CommentsPanel-Bn6P5crU.js → CommentsPanel-DiWzYtnZ.js} +2 -2
- package/dist/{CommentsSidebar-B8wT932T.js → CommentsSidebar-BOqj16Al.js} +14 -14
- package/dist/CountdownBlock-zx39Dyby.js +92 -0
- package/dist/{CountdownToolbar-BeF21SeB.js → CountdownToolbar-C4y3Ft7H.js} +7 -7
- package/dist/{DesignReferenceSidebar-zH93uB15.js → DesignReferenceSidebar-BWAi3eQQ.js} +13 -13
- package/dist/{IssuesPanel-Dltw9haP.js → IssuesPanel-C-x3I012.js} +8 -8
- package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
- package/dist/{LogicTagInsertButton-CHa-UD76.js → LogicTagInsertButton-B1_Wy0AN.js} +13 -13
- package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-ByOvznRC.js} +4 -4
- package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-9mDBv4aL.js} +2 -2
- package/dist/{MergeTagInput-B3ntd4dN.js → MergeTagInput-fOewuF27.js} +3 -3
- package/dist/{MergeTagModeToggle-C_06ZL0Q.js → MergeTagModeToggle-BXamLcv7.js} +7 -7
- package/dist/{ParagraphEditor-CxuW3TV0.js → ParagraphEditor-BVjOwwHx.js} +100 -85
- package/dist/{RestoreVersionDialog-B1n37M1Z.js → RestoreVersionDialog-BEKXx9xk.js} +6 -6
- package/dist/{RichTextEditorContent-CP_uULWB.js → RichTextEditorContent-D7kp7iig.js} +12 -12
- package/dist/{SaveBlockDialog-BSKX_7_v.js → SaveBlockDialog-SJu0lecx.js} +34 -35
- package/dist/{SavedBlocksBrowserModal-CHKrH1gO.js → SavedBlocksBrowserModal-DbmIS5uK.js} +14 -14
- package/dist/{SavedBlocksPanels-B-xDqBcz.js → SavedBlocksPanels-Dr5Fxx9Z.js} +2 -2
- package/dist/{SavedBlocksPickBar-D2J-g82g.js → SavedBlocksPickBar-DnEWBZJy.js} +5 -5
- package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-ynbGl-sr.js} +16 -16
- package/dist/{TemplateSettings-D07K_Y4m.js → TemplateSettings-Bi01S3H3.js} +12 -12
- package/dist/{TestEmailModal-BNPw_lID.js → TestEmailModal-CbRY8HQx.js} +14 -14
- package/dist/{TestEmailPanel-8klWo8hE.js → TestEmailPanel-NAOmt3xi.js} +2 -2
- package/dist/{TitleEditor-CmC9OuhA.js → TitleEditor-Cc3DHbuN.js} +15 -15
- package/dist/{ToggleSwitch-COeyWGfT.js → ToggleSwitch-Ozc7YU38.js} +2 -2
- package/dist/Toolbar-B-2lO0I8.js +3156 -0
- package/dist/{TplModal-BGFawHY9.js → TplModal-Bz4-IZ9R.js} +6 -6
- package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-CjV1d1zk.js} +10 -10
- package/dist/{VersionHistoryPanels-DdbGjEOR.js → VersionHistoryPanels-BtwxrKJn.js} +2 -2
- package/dist/{VersionPreviewBanner-BUKb9gc6.js → VersionPreviewBanner-BLAei1kj.js} +4 -4
- package/dist/WrapperBlock-D0qgNqjD.js +45 -0
- package/dist/{blockTypeIcons-CVKo6V_v.js → blockTypeIcons-CEDZytqP.js} +50 -20
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +38 -1
- package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js → AiChatSidebar-Dk0rJBQN.js} +8 -8
- package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js.map → AiChatSidebar-Dk0rJBQN.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js → AiFeatureMenu-B7b0w8ZS.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js.map → AiFeatureMenu-B7b0w8ZS.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js → BlockIssueBadge-C7sdnkrF.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js.map → BlockIssueBadge-C7sdnkrF.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js +143 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js → CloudHeaderExtras-B4fhuwc_.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js.map → CloudHeaderExtras-B4fhuwc_.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js → CloudPanels-awqHfJqC.js} +8 -8
- package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js.map → CloudPanels-awqHfJqC.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js → CollaboratorBar-CS0ivqkr.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js.map → CollaboratorBar-CS0ivqkr.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js → CommentsPanel-CbzxwsyI.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js.map → CommentsPanel-CbzxwsyI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js → CommentsSidebar-DWPHZuQm.js} +8 -8
- package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js.map → CommentsSidebar-DWPHZuQm.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-Dasj191h.js +94 -0
- package/dist/cdn/chunks/CountdownBlock-Dasj191h.js.map +1 -0
- package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js → CountdownToolbar-Cqg8FUH-.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js.map → CountdownToolbar-Cqg8FUH-.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js → DesignReferenceSidebar-BW9cHnA9.js} +12 -12
- package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js.map → DesignReferenceSidebar-BW9cHnA9.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js → IssuesPanel-cXf9ywA4.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js.map → IssuesPanel-cXf9ywA4.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js → LoadingTrack-DbH97JR9.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js.map → LoadingTrack-DbH97JR9.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js → LogicTagInsertButton-BMB9vShs.js} +89 -89
- package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js.map → LogicTagInsertButton-BMB9vShs.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js → MediaEditModal-zXfcArr4.js} +4 -4
- package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js.map → MediaEditModal-zXfcArr4.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js → MediaPanels-Cp4XB_dH.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js.map → MediaPanels-Cp4XB_dH.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js → MergeTagInput-DLqrA9co.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js.map → MergeTagInput-DLqrA9co.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js → MergeTagModeToggle-BRiJzzn5.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js.map → MergeTagModeToggle-BRiJzzn5.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DndEFXmR.js → ParagraphEditor-D4aq9eeC.js} +116 -101
- package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js → RestoreVersionDialog-BgR6RXSb.js} +6 -6
- package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js.map → RestoreVersionDialog-BgR6RXSb.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js → RichTextEditorContent-C4DMAn0g.js} +11 -11
- package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js.map → RichTextEditorContent-C4DMAn0g.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js → SaveBlockDialog-BaIsQd09.js} +41 -42
- package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js.map → SaveBlockDialog-BaIsQd09.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js → SavedBlocksBrowserModal-CtnB58p_.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js.map → SavedBlocksBrowserModal-CtnB58p_.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js → SavedBlocksPanels-BhEOMzEQ.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js.map → SavedBlocksPanels-BhEOMzEQ.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js → SavedBlocksPickBar-CcdqTEIp.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js.map → SavedBlocksPickBar-CcdqTEIp.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js → TemplateScoringPanel-BrWqJCSP.js} +9 -9
- package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js.map → TemplateScoringPanel-BrWqJCSP.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-rZiHmq24.js → TemplateSettings-BkkWTDHD.js} +14 -14
- package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js → TestEmailModal-V5mwHsUV.js} +13 -13
- package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js.map → TestEmailModal-V5mwHsUV.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js → TestEmailPanel-DxrKuctP.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js.map → TestEmailPanel-DxrKuctP.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js → TitleEditor-CsZiG3TT.js} +19 -19
- package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js.map → TitleEditor-CsZiG3TT.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js → ToggleSwitch-BB-bQADJ.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js.map → ToggleSwitch-BB-bQADJ.js.map} +1 -1
- package/dist/cdn/chunks/Toolbar-C_x2TfFk.js +3073 -0
- package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CYBbPCHL.js → TplModal-DC_eodTV.js} +6 -6
- package/dist/cdn/chunks/TplModal-DC_eodTV.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js → VersionHistoryMenu-DXnM5Df2.js} +11 -11
- package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js.map → VersionHistoryMenu-DXnM5Df2.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js → VersionHistoryPanels-DXSqmaLS.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js.map → VersionHistoryPanels-DXSqmaLS.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js → VersionPreviewBanner-DKyN6BhO.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js.map → VersionPreviewBanner-DKyN6BhO.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +47 -0
- package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js.map +1 -0
- package/dist/cdn/chunks/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +39 -2
- package/dist/cdn/chunks/ca-CbNzJM3I.js.map +1 -0
- package/dist/cdn/chunks/{cloud-h1vaHp2p.js → cloud-BHClP3e2.js} +3 -3
- package/dist/cdn/chunks/{cloud-h1vaHp2p.js.map → cloud-BHClP3e2.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-bJN9EM1H.js → createCloudRuntime-Vd0N4elZ.js} +18 -9
- package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +1 -0
- package/dist/cdn/chunks/{de-CGjbQ2mt.js → de-DMquBpZM.js} +39 -2
- package/dist/cdn/chunks/de-DMquBpZM.js.map +1 -0
- package/dist/cdn/chunks/{dist-B7W-Lb65.js → dist-CjL6JHML.js} +3 -3
- package/dist/cdn/chunks/{dist-B7W-Lb65.js.map → dist-CjL6JHML.js.map} +1 -1
- package/dist/cdn/chunks/{dist-C5nRd_ua.js → dist-MNQYSEWU.js} +4 -4
- package/dist/cdn/chunks/{dist-C5nRd_ua.js.map → dist-MNQYSEWU.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-BUTN5vZC.js → draggable-DrsNwZuB.js} +1673 -1595
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js → editor-modal-vEEmZ8Tu.js} +93 -93
- package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js.map → editor-modal-vEEmZ8Tu.js.map} +1 -1
- package/dist/cdn/chunks/{en-BTiiAC-B.js → en-C8Mp71sO.js} +39 -2
- package/dist/cdn/chunks/en-C8Mp71sO.js.map +1 -0
- package/dist/cdn/chunks/en-eWpiXyZu.js +1 -0
- package/dist/cdn/chunks/{es-CdTOcSTf.js → es-Byq4tthI.js} +39 -2
- package/dist/cdn/chunks/es-Byq4tthI.js.map +1 -0
- package/dist/cdn/chunks/{extensions-CrmXF4MW.js → extensions-hJ9VqzDc.js} +7 -7
- package/dist/cdn/chunks/{extensions-CrmXF4MW.js.map → extensions-hJ9VqzDc.js.map} +1 -1
- package/dist/cdn/chunks/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +39 -2
- package/dist/cdn/chunks/fr-B3j35HEw.js.map +1 -0
- package/dist/cdn/chunks/{icons-Dr9erFGs.js → icons-aTYwH5-g.js} +107 -78
- package/dist/cdn/chunks/icons-aTYwH5-g.js.map +1 -0
- package/dist/{ja-BhdkqENz.js → cdn/chunks/ja-D7txAuGS.js} +40 -1
- package/dist/cdn/chunks/ja-D7txAuGS.js.map +1 -0
- package/dist/cdn/chunks/{keys-BKu-LOk5.js → keys-HI-INbkz.js} +2 -2
- package/dist/cdn/chunks/{keys-BKu-LOk5.js.map → keys-HI-INbkz.js.map} +1 -1
- package/dist/{nl-CE3YItYg.js → cdn/chunks/nl-ClJ3BY3F.js} +40 -1
- package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-CyGB3lZr.js → preRenderCustomBlocks-ByfuSjtL.js} +4 -2
- package/dist/cdn/chunks/preRenderCustomBlocks-ByfuSjtL.js.map +1 -0
- package/dist/{pt-BR-CUIT4rq4.js → cdn/chunks/pt-BR-DibcXcmv.js} +40 -1
- package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +1279 -0
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +1 -0
- package/dist/{dist-BI_LeQGl.js → cdn/chunks/src-DYCDeBDM.js} +437 -256
- package/dist/cdn/chunks/src-DYCDeBDM.js.map +1 -0
- package/dist/cdn/chunks/{src-B0pZeTYO.js → src-DlFlC9Tt.js} +334 -268
- package/dist/cdn/chunks/src-DlFlC9Tt.js.map +1 -0
- package/dist/cdn/chunks/src-dZ4D_tuP.js +649 -0
- package/dist/cdn/chunks/src-dZ4D_tuP.js.map +1 -0
- package/dist/{styleConstants-C_YAPdQS.js → cdn/chunks/styleConstants-D1Jz-TFU.js} +9 -28
- package/dist/cdn/chunks/{styleConstants-C_YAPdQS.js.map → styleConstants-D1Jz-TFU.js.map} +1 -1
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js +6 -0
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CYDXLO17.js → tiptap-BPigZk5G.js} +3258 -3098
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js → useAliveFlag-DCB96vzR.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js.map → useAliveFlag-DCB96vzR.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js → useCloudI18n-BBF4waXO.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js.map → useCloudI18n-BBF4waXO.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-DuC7kVti.js → useEditorCore-Bb2UcB20.js} +780 -764
- package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-DDPIcEOO.js.map → useEditorRoot-CTc6O8al.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DO4NTunW.js → useI18n-DUlyyIJJ.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DO4NTunW.js.map → useI18n-DUlyyIJJ.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js → useLogicTag-HsyUCQtl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js.map → useLogicTag-HsyUCQtl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js → useMergeTag-Dg9pE85U.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js.map → useMergeTag-Dg9pE85U.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js → usePopoverPosition-IbaW6-Ao.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js.map → usePopoverPosition-IbaW6-Ao.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js → useScrollToBlock-uUa601I4.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js.map → useScrollToBlock-uUa601I4.js.map} +1 -1
- package/dist/cdn/chunks/withCurrentFont-oLcATrQ8.js +21 -0
- package/dist/cdn/chunks/{withCurrentFont-isIyuezD.js.map → withCurrentFont-oLcATrQ8.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +641 -631
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ZKvtMdpe.js → check-ClwqRMgv.js} +1 -1
- package/dist/{chevron-down-RrwkYMlp.js → chevron-down-te6qn-zE.js} +1 -1
- package/dist/{chevron-right-CklHaa1U.js → chevron-right-W2hbH1FM.js} +1 -1
- package/dist/{chevron-up-DjN2NTbo.js → chevron-up-Bf5Zo7o4.js} +1 -1
- package/dist/{circle-alert-BR1_Yfb-.js → circle-alert-CIEGV5DN.js} +1 -1
- package/dist/{clock-BEagNj21.js → clock-Y4cx0gkJ.js} +1 -1
- package/dist/{cloud-DPGjMGfv.js → cloud-B5xwm_4X.js} +2 -2
- package/dist/{copy-D6DNoSq1.js → copy-BEcsAlfB.js} +1 -1
- package/dist/{createCloudRuntime-D0RRgWab.js → createCloudRuntime-zNPkF6T9.js} +17 -8
- package/dist/{createLucideIcon-BAPyioGd.js → createLucideIcon-CYHXK9hn.js} +6 -6
- package/dist/{de-CGjbQ2mt.js → de-DMquBpZM.js} +38 -1
- package/dist/{dist-Bd7khQsg.js → dist-3HpYixwF.js} +2 -2
- package/dist/{dist-lL3nVbxV.js → dist-BC-ZEYLd.js} +2 -2
- package/dist/dist-BPFcLKTw.js +5 -0
- package/dist/{dist-C-VFTX82.js → dist-CUWI-IvA.js} +2 -2
- package/dist/{dist-Bc30883t.js → dist-Cr7RPxI9.js} +5 -5
- package/dist/{dist-DapsJxn_.js → dist-CuLwJF7H.js} +2 -2
- package/dist/{dist-5KNKxglR.js → dist-CyBwSiAa.js} +2 -2
- package/dist/dist-D7Yj7E-F.js +5 -0
- package/dist/{dist-B_vYjCsk.js → dist-DAAJogrx.js} +3 -3
- package/dist/{dist-CMcFD7gP.js → dist-DBxgrOeo.js} +1906 -1746
- package/dist/{dist-DHensKDY.js → dist-DPcf6XZ8.js} +2 -2
- package/dist/{dist-5DAb7bYT.js → dist-DVNjPKsH.js} +2 -2
- package/dist/{dist-C3eH9-N2.js → dist-DXyGqIDE.js} +2 -2
- package/dist/{dist-1H4cnaoD.js → dist-DuufrR8O.js} +4 -4
- package/dist/{cdn/chunks/src-Bh0MoJ67.js → dist-tsmnQugO.js} +207 -174
- package/dist/{editor-modal-oRmkDlUs.js → editor-modal-AlVLkU91.js} +20 -20
- package/dist/en-B0FUfNwz.js +1 -0
- package/dist/{en-BTiiAC-B.js → en-C8Mp71sO.js} +38 -1
- package/dist/{es-CdTOcSTf.js → es-Byq4tthI.js} +38 -1
- package/dist/{extensions-CYigjb1g.js → extensions-pjO8VGkM.js} +9 -9
- package/dist/{eye-DvsTBI57.js → eye-Ddnz8nnm.js} +1 -1
- package/dist/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +38 -1
- package/dist/{image-up-BoFGZm5Q.js → image-up-CM_HC0Dx.js} +1 -1
- package/dist/index.d.ts +124 -11
- package/dist/{info-0bQQGjTV.js → info-DXLmzoeY.js} +1 -1
- package/dist/{cdn/chunks/ja-BhdkqENz.js → ja-D7txAuGS.js} +38 -3
- package/dist/{keys-injl74ob.js → keys-BKFq19a2.js} +1 -1
- package/dist/{link-Cstrr3Ep.js → link-Cel46wgo.js} +1 -1
- package/dist/{list-Dx9Rmy5s.js → list-Cl0GwiV9.js} +1 -1
- package/dist/{loader-circle-D8Qqs0MG.js → loader-circle-uAwpvfys.js} +1 -1
- package/dist/{message-circle-D78ELX6I.js → message-circle-DWU1pTM_.js} +1 -1
- package/dist/{cdn/chunks/nl-CE3YItYg.js → nl-ClJ3BY3F.js} +38 -3
- package/dist/{package-DOvM9sHE.js → package-CbyG_yU_.js} +1 -1
- package/dist/{pencil-B6m0OG0n.js → pencil-BzoDcwKu.js} +1 -1
- package/dist/{plus-D-nEKxTc.js → plus-8cDvoCjZ.js} +1 -1
- package/dist/{preRenderCustomBlocks-DokBGA_M.js → preRenderCustomBlocks-DMP5RuHl.js} +6 -4
- package/dist/{cdn/chunks/pt-BR-CUIT4rq4.js → pt-BR-DibcXcmv.js} +38 -3
- package/dist/{refresh-cw-CXZS-R1U.js → refresh-cw-9WinWixo.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-CO67ema2.js → runtime-dom.esm-bundler-lFF-QG3j.js} +3 -3
- package/dist/{search-DSvil0jo.js → search-CqgGq1gG.js} +1 -1
- package/dist/{send-BBR28V94.js → send-Ceo3c9Db.js} +1 -1
- package/dist/{shield-check-ByxUnaU9.js → shield-check-uDAwur5D.js} +1 -1
- package/dist/{smartphone-CNOwGf5T.js → smartphone-CcLaCpGK.js} +1 -1
- package/dist/socialIcons-PTiwhLoC.js +1359 -0
- package/dist/{sparkles-DO1hzwzf.js → sparkles-Do9XjAuT.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{cdn/chunks/styleConstants-C_YAPdQS.js → styleConstants-D1Jz-TFU.js} +7 -30
- package/dist/templatical-editor.js +519 -509
- package/dist/{text-align-start-BKEKMheq.js → text-align-start-DvzC0HQA.js} +1 -1
- package/dist/timeouts-Cv2jvusx.js +4 -0
- package/dist/{trash-CKEQH4vH.js → trash-vlINTx32.js} +1 -1
- package/dist/{triangle-alert-BHnfd3fV.js → triangle-alert-MRYSJ9T2.js} +1 -1
- package/dist/{upload-C8uO7KsR.js → upload-CtNOI6J2.js} +1 -1
- package/dist/{useAliveFlag-6PtarpNZ.js → useAliveFlag-Dd06mRxe.js} +1 -1
- package/dist/{useCloudI18n-GvIOLziA.js → useCloudI18n-Nwqo7pI_.js} +2 -2
- package/dist/{useEditorCore-BJAQMvNW.js → useEditorCore-PvErWWsp.js} +1002 -991
- package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
- package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
- package/dist/{useLogicTag-B5gjcMzn.js → useLogicTag-BHn67tDd.js} +3 -3
- package/dist/{useMergeTag-BwsBIDzR.js → useMergeTag-CRkm5Ig6.js} +5 -5
- package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
- package/dist/{useScrollToBlock-JRxhT1u_.js → useScrollToBlock-CXmcHQQN.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
- package/dist/{withCurrentFont-C9vqrduu.js → withCurrentFont-CxRGeHO3.js} +1 -1
- package/dist/{x-gEC0yMci.js → x-Cd6SFw8r.js} +1 -1
- package/package.json +23 -23
- package/dist/BlockPreviewCanvas-DIZ0KgUD.js +0 -133
- package/dist/CountdownBlock-RNx3hIu0.js +0 -91
- package/dist/Toolbar-CqhRb6EM.js +0 -2732
- package/dist/WrapperBlock-CTkmA887.js +0 -34
- package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js +0 -135
- package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DndEFXmR.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-rZiHmq24.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-C_5HfUQq.js +0 -2646
- package/dist/cdn/chunks/Toolbar-C_5HfUQq.js.map +0 -1
- package/dist/cdn/chunks/TplModal-CYBbPCHL.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js +0 -36
- package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js.map +0 -1
- package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-bJN9EM1H.js.map +0 -1
- package/dist/cdn/chunks/de-CGjbQ2mt.js.map +0 -1
- package/dist/cdn/chunks/draggable-BUTN5vZC.js.map +0 -1
- package/dist/cdn/chunks/en-BTiiAC-B.js.map +0 -1
- package/dist/cdn/chunks/en-CAt6y87e.js +0 -1
- package/dist/cdn/chunks/es-CdTOcSTf.js.map +0 -1
- package/dist/cdn/chunks/fr-B6lcLLzC.js.map +0 -1
- package/dist/cdn/chunks/icons-Dr9erFGs.js.map +0 -1
- package/dist/cdn/chunks/ja-BhdkqENz.js.map +0 -1
- package/dist/cdn/chunks/nl-CE3YItYg.js.map +0 -1
- package/dist/cdn/chunks/preRenderCustomBlocks-CyGB3lZr.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-ClJVDZwt.js +0 -1031
- package/dist/cdn/chunks/socialIcons-ClJVDZwt.js.map +0 -1
- package/dist/cdn/chunks/src-B0pZeTYO.js.map +0 -1
- package/dist/cdn/chunks/src-BMw3u-iV.js +0 -614
- package/dist/cdn/chunks/src-BMw3u-iV.js.map +0 -1
- package/dist/cdn/chunks/src-Bh0MoJ67.js.map +0 -1
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +0 -6
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DuC7kVti.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
- package/dist/cdn/chunks/withCurrentFont-isIyuezD.js +0 -21
- package/dist/dist-CFC4pg2o.js +0 -5
- package/dist/dist-j2FavQmU.js +0 -5
- package/dist/en-Bk4iCfjp.js +0 -1
- package/dist/socialIcons-Ct_IoqPQ.js +0 -1107
- package/dist/timeouts-DHPZQ0G3.js +0 -4
|
@@ -1,35 +1,33 @@
|
|
|
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 { $ as z, B,
|
|
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 Sn } from "./useLogicTag-B3uV3XHG.js";
|
|
19
|
-
import { t as Cn } from "./useAliveFlag-DzyXG-8A.js";
|
|
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-DrsNwZuB.js";
|
|
2
|
+
import { $ as R, At as z, B, Dt as V, Et as H, F as ee, Ft as U, G as W, H as te, I as ne, K as re, L as ie, M as ae, Mt as oe, N as se, Nt as ce, P as le, Pt as ue, Q as de, R as fe, St as pe, T as me, U as he, W as ge, X as _e, Y as ve, _ as ye, a as be, b as xe, bt as Se, d as Ce, et as we, f as Te, g as Ee, h as De, ht as Oe, i as ke, j as Ae, jt as je, l as Me, m as Ne, n as Pe, nt as Fe, o as Ie, p as Le, r as Re, s as ze, u as Be, vt as Ve, x as He, yt as Ue, z as We } from "./src-DYCDeBDM.js";
|
|
3
|
+
import { A as Ge, C as G, F as Ke, I as qe, M as Je, P 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-C_lnkpG6.js";
|
|
4
|
+
import { _ as lt, h as ut, v as dt, y as ft } from "./dist-CjL6JHML.js";
|
|
5
|
+
import { a as pt, c as mt, i as ht } from "./dist-MNQYSEWU.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-HI-INbkz.js";
|
|
7
|
+
import { t as X } from "./useI18n-DUlyyIJJ.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-IbaW6-Ao.js";
|
|
10
|
+
import { r as dn, t as fn } from "./templateSettingsFields-YCFVBVYh.js";
|
|
11
|
+
import { At as pn, Et 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-aTYwH5-g.js";
|
|
12
|
+
import { t as kn } from "./LoadingTrack-DbH97JR9.js";
|
|
13
|
+
import { t as An } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
|
+
import { t as jn } from "./useEditorRoot-CTc6O8al.js";
|
|
15
|
+
import "./useCloudI18n-BBF4waXO.js";
|
|
16
|
+
import { t as Mn } from "./useMergeTag-Dg9pE85U.js";
|
|
17
|
+
import { t as Nn } from "./useLogicTag-HsyUCQtl.js";
|
|
20
18
|
//#region src/utils/activeEditorTracker.ts
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
let e = ++
|
|
24
|
-
return
|
|
19
|
+
var Pn = /* @__PURE__ */ new Set(), Q = 0, Fn = 0;
|
|
20
|
+
function In() {
|
|
21
|
+
let e = ++Fn;
|
|
22
|
+
return Pn.add(e), Q === 0 && (Q = e), {
|
|
25
23
|
id: e,
|
|
26
|
-
isActive: () =>
|
|
24
|
+
isActive: () => Pn.size <= 1 || Q === e,
|
|
27
25
|
claim: () => {
|
|
28
26
|
Q = e;
|
|
29
27
|
},
|
|
30
28
|
dispose: () => {
|
|
31
|
-
if (
|
|
32
|
-
let e = Array.from(
|
|
29
|
+
if (Pn.delete(e), Q === e) {
|
|
30
|
+
let e = Array.from(Pn);
|
|
33
31
|
Q = e[e.length - 1] ?? 0;
|
|
34
32
|
}
|
|
35
33
|
}
|
|
@@ -37,8 +35,8 @@ function En() {
|
|
|
37
35
|
}
|
|
38
36
|
//#endregion
|
|
39
37
|
//#region src/composables/usePreviewResolution.ts
|
|
40
|
-
var
|
|
41
|
-
function
|
|
38
|
+
var Ln = 500;
|
|
39
|
+
function Rn(e) {
|
|
42
40
|
let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
|
|
43
41
|
function c() {
|
|
44
42
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -49,13 +47,13 @@ function On(e) {
|
|
|
49
47
|
let n = ++o;
|
|
50
48
|
i.value = !0;
|
|
51
49
|
let s = {
|
|
52
|
-
content:
|
|
50
|
+
content: ve(e.getContent()),
|
|
53
51
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
54
52
|
};
|
|
55
53
|
try {
|
|
56
54
|
let e = await t(s);
|
|
57
55
|
if (n !== o) return;
|
|
58
|
-
if (!
|
|
56
|
+
if (!Pe(e)) {
|
|
59
57
|
a.value = !0;
|
|
60
58
|
return;
|
|
61
59
|
}
|
|
@@ -70,77 +68,24 @@ function On(e) {
|
|
|
70
68
|
function d() {
|
|
71
69
|
n && (c(), r.value === null ? u() : s = setTimeout(() => {
|
|
72
70
|
s = null, u();
|
|
73
|
-
},
|
|
71
|
+
}, Ln));
|
|
74
72
|
}
|
|
75
73
|
return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
76
74
|
e ? d() : (c(), o++, i.value = !1, r.value = null, a.value = !1);
|
|
77
|
-
}, { immediate: !0 }),
|
|
75
|
+
}, { immediate: !0 }), p(() => {
|
|
78
76
|
c(), o++;
|
|
79
77
|
}), {
|
|
80
78
|
isConfigured: n,
|
|
81
|
-
content:
|
|
79
|
+
content: y(() => r.value ?? e.getContent()),
|
|
82
80
|
isResolving: i,
|
|
83
|
-
isInitialResolve:
|
|
81
|
+
isInitialResolve: y(() => i.value && r.value === null),
|
|
84
82
|
hasFailed: a,
|
|
85
|
-
supersedesSamples:
|
|
83
|
+
supersedesSamples: y(() => n)
|
|
86
84
|
};
|
|
87
85
|
}
|
|
88
86
|
//#endregion
|
|
89
|
-
//#region src/composables/useImageUrlResolver.ts
|
|
90
|
-
function kn(e) {
|
|
91
|
-
let t = p(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
92
|
-
function r(e) {
|
|
93
|
-
return t.get(e);
|
|
94
|
-
}
|
|
95
|
-
function i(e) {
|
|
96
|
-
return t.has(e) || n.has(e);
|
|
97
|
-
}
|
|
98
|
-
function a(r) {
|
|
99
|
-
if (i(r)) return;
|
|
100
|
-
let a;
|
|
101
|
-
try {
|
|
102
|
-
a = e(r);
|
|
103
|
-
} catch {
|
|
104
|
-
t.set(r, null);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
a === null || typeof a == "string" ? t.set(r, a) : (n.add(r), Promise.resolve(a).then((e) => {
|
|
108
|
-
t.set(r, typeof e == "string" ? e : null);
|
|
109
|
-
}, () => {
|
|
110
|
-
t.set(r, null);
|
|
111
|
-
}).finally(() => n.delete(r)));
|
|
112
|
-
}
|
|
113
|
-
return {
|
|
114
|
-
get: r,
|
|
115
|
-
has: i,
|
|
116
|
-
lookup: a
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
function An(e) {
|
|
120
|
-
let r = n(Gt, null), i = b(e);
|
|
121
|
-
if (!r) return i;
|
|
122
|
-
let a;
|
|
123
|
-
function s() {
|
|
124
|
-
a !== void 0 && (clearTimeout(a), a = void 0);
|
|
125
|
-
}
|
|
126
|
-
o() && m(s);
|
|
127
|
-
let c = !0;
|
|
128
|
-
return t(i, (e) => {
|
|
129
|
-
s();
|
|
130
|
-
let t = c;
|
|
131
|
-
c = !1, e && !r.has(e) && (t ? r.lookup(e) : a = setTimeout(() => {
|
|
132
|
-
a = void 0, r.lookup(e);
|
|
133
|
-
}, 300));
|
|
134
|
-
}, { immediate: !0 }), b(() => {
|
|
135
|
-
let e = i.value;
|
|
136
|
-
if (!e) return e;
|
|
137
|
-
let t = r.get(e);
|
|
138
|
-
return typeof t == "string" && t.length > 0 ? t : e;
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
//#endregion
|
|
142
87
|
//#region src/composables/useMergeTagPicker.ts
|
|
143
|
-
function
|
|
88
|
+
function zn() {
|
|
144
89
|
let e = l(!1), t = l([]), n = l(null), r = null;
|
|
145
90
|
function i(i, a) {
|
|
146
91
|
if (r) {
|
|
@@ -155,7 +100,7 @@ function jn() {
|
|
|
155
100
|
let a = r;
|
|
156
101
|
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
157
102
|
}
|
|
158
|
-
return o() &&
|
|
103
|
+
return o() && p(() => {
|
|
159
104
|
if (r) {
|
|
160
105
|
let e = r;
|
|
161
106
|
r = null, e(null);
|
|
@@ -171,7 +116,7 @@ function jn() {
|
|
|
171
116
|
}
|
|
172
117
|
//#endregion
|
|
173
118
|
//#region src/composables/useLogicTagPicker.ts
|
|
174
|
-
function
|
|
119
|
+
function Bn() {
|
|
175
120
|
let e = l(!1), t = l([]), n = l([]), r = null;
|
|
176
121
|
function i(i, a) {
|
|
177
122
|
if (r) {
|
|
@@ -186,7 +131,7 @@ function Mn() {
|
|
|
186
131
|
let a = r;
|
|
187
132
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
188
133
|
}
|
|
189
|
-
return o() &&
|
|
134
|
+
return o() && p(() => {
|
|
190
135
|
if (r) {
|
|
191
136
|
let e = r;
|
|
192
137
|
r = null, e(null);
|
|
@@ -202,17 +147,17 @@ function Mn() {
|
|
|
202
147
|
}
|
|
203
148
|
//#endregion
|
|
204
149
|
//#region src/composables/useTemplateLint.ts
|
|
205
|
-
function
|
|
150
|
+
function Vn(e) {
|
|
206
151
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
207
152
|
}
|
|
208
|
-
function
|
|
209
|
-
let n = l([]), r = l(!1), i = l(!1), a =
|
|
153
|
+
function Hn(e) {
|
|
154
|
+
let n = l([]), r = l(!1), i = l(!1), a = v(null), o = Vn(e.options), s = null, c = !1;
|
|
210
155
|
o || u();
|
|
211
156
|
async function u() {
|
|
212
157
|
try {
|
|
213
|
-
let t = await import("./src-
|
|
158
|
+
let t = await import("./src-DlFlC9Tt.js");
|
|
214
159
|
if (c) return;
|
|
215
|
-
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s =
|
|
160
|
+
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = ft(e.content, d, {
|
|
216
161
|
debounce: e.debounce ?? 500,
|
|
217
162
|
deep: !0
|
|
218
163
|
});
|
|
@@ -247,7 +192,7 @@ function Pn(e) {
|
|
|
247
192
|
}
|
|
248
193
|
//#endregion
|
|
249
194
|
//#region src/composables/useKeyboardReorder.ts
|
|
250
|
-
function
|
|
195
|
+
function Un(e, t, n = []) {
|
|
251
196
|
let r = l(null), i = l(""), a = null;
|
|
252
197
|
function o(t) {
|
|
253
198
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -274,7 +219,7 @@ function Fn(e, t, n = []) {
|
|
|
274
219
|
let i = o(r);
|
|
275
220
|
if (!i) return "";
|
|
276
221
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
277
|
-
return a ?
|
|
222
|
+
return a ? Ze(a, t.t, n) : "";
|
|
278
223
|
}
|
|
279
224
|
function c(t, n) {
|
|
280
225
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -343,13 +288,13 @@ function Fn(e, t, n = []) {
|
|
|
343
288
|
}
|
|
344
289
|
//#endregion
|
|
345
290
|
//#region src/composables/useUiTheme.ts
|
|
346
|
-
function
|
|
347
|
-
let t =
|
|
348
|
-
return { resolvedTheme:
|
|
291
|
+
function Wn(e) {
|
|
292
|
+
let t = mt("(prefers-color-scheme: dark)");
|
|
293
|
+
return { resolvedTheme: y(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
349
294
|
}
|
|
350
295
|
//#endregion
|
|
351
296
|
//#region src/composables/useThemeStyles.ts
|
|
352
|
-
var
|
|
297
|
+
var Gn = {
|
|
353
298
|
bg: "--tpl-bg",
|
|
354
299
|
bgElevated: "--tpl-bg-elevated",
|
|
355
300
|
bgHover: "--tpl-bg-hover",
|
|
@@ -373,10 +318,10 @@ var Ln = {
|
|
|
373
318
|
dangerLight: "--tpl-danger-light",
|
|
374
319
|
canvasBg: "--tpl-canvas-bg"
|
|
375
320
|
};
|
|
376
|
-
function
|
|
377
|
-
return { themeStyles:
|
|
321
|
+
function Kn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
322
|
+
return { themeStyles: y(() => {
|
|
378
323
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
379
|
-
if (a) for (let [e, t] of Object.entries(
|
|
324
|
+
if (a) for (let [e, t] of Object.entries(Gn)) {
|
|
380
325
|
let n = a[e];
|
|
381
326
|
n && (r[t] = n);
|
|
382
327
|
}
|
|
@@ -385,10 +330,10 @@ function Rn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
385
330
|
}
|
|
386
331
|
//#endregion
|
|
387
332
|
//#region src/composables/useBlockRegistry.ts
|
|
388
|
-
function
|
|
389
|
-
let e =
|
|
333
|
+
function qn() {
|
|
334
|
+
let e = v(/* @__PURE__ */ new Map());
|
|
390
335
|
function t(t, n) {
|
|
391
|
-
e.value.set(t, n),
|
|
336
|
+
e.value.set(t, n), S(e);
|
|
392
337
|
}
|
|
393
338
|
function n(t, n) {
|
|
394
339
|
let r = `custom:${t.type}`;
|
|
@@ -396,7 +341,7 @@ function zn() {
|
|
|
396
341
|
component: n,
|
|
397
342
|
createBlock: () => le(t),
|
|
398
343
|
definition: t
|
|
399
|
-
}),
|
|
344
|
+
}), S(e);
|
|
400
345
|
}
|
|
401
346
|
function r(t) {
|
|
402
347
|
if (t.type === "custom") {
|
|
@@ -425,7 +370,7 @@ function zn() {
|
|
|
425
370
|
strictFilters: !1
|
|
426
371
|
}).parseAndRender(t.template, e.fieldValues);
|
|
427
372
|
} catch (t) {
|
|
428
|
-
return
|
|
373
|
+
return Z.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
429
374
|
}
|
|
430
375
|
}
|
|
431
376
|
function c(t) {
|
|
@@ -443,9 +388,9 @@ function zn() {
|
|
|
443
388
|
}
|
|
444
389
|
//#endregion
|
|
445
390
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
446
|
-
function
|
|
447
|
-
return
|
|
448
|
-
let n =
|
|
391
|
+
function Jn(e, t) {
|
|
392
|
+
return y(() => {
|
|
393
|
+
let n = Yn(e.value.blocks);
|
|
449
394
|
if (n.size === 0) return [];
|
|
450
395
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
451
396
|
for (let e of n) {
|
|
@@ -457,76 +402,76 @@ function Bn(e, t) {
|
|
|
457
402
|
return i;
|
|
458
403
|
});
|
|
459
404
|
}
|
|
460
|
-
function
|
|
405
|
+
function Yn(e) {
|
|
461
406
|
let t = /* @__PURE__ */ new Set();
|
|
462
|
-
return
|
|
407
|
+
return Xn(e, t), t;
|
|
463
408
|
}
|
|
464
|
-
function
|
|
465
|
-
for (let n of e) if (
|
|
409
|
+
function Xn(e, t) {
|
|
410
|
+
for (let n of e) if (Fe(n)) t.add(n.customType);
|
|
466
411
|
else if (n.type === "section") {
|
|
467
412
|
let e = n.children;
|
|
468
413
|
if (!e) continue;
|
|
469
|
-
for (let n of e)
|
|
470
|
-
} else
|
|
414
|
+
for (let n of e) Xn(n, t);
|
|
415
|
+
} else Oe(n) && Xn(n.children, t);
|
|
471
416
|
}
|
|
472
417
|
//#endregion
|
|
473
418
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
474
|
-
var
|
|
419
|
+
var Zn = [
|
|
475
420
|
{
|
|
476
421
|
type: "section",
|
|
477
422
|
createBlock: B
|
|
478
423
|
},
|
|
479
424
|
{
|
|
480
425
|
type: "title",
|
|
481
|
-
createBlock:
|
|
426
|
+
createBlock: W
|
|
482
427
|
},
|
|
483
428
|
{
|
|
484
429
|
type: "paragraph",
|
|
485
|
-
createBlock:
|
|
430
|
+
createBlock: We
|
|
486
431
|
},
|
|
487
432
|
{
|
|
488
433
|
type: "image",
|
|
489
|
-
createBlock:
|
|
434
|
+
createBlock: ie
|
|
490
435
|
},
|
|
491
436
|
{
|
|
492
437
|
type: "button",
|
|
493
|
-
createBlock:
|
|
438
|
+
createBlock: ae
|
|
494
439
|
},
|
|
495
440
|
{
|
|
496
441
|
type: "divider",
|
|
497
|
-
createBlock:
|
|
442
|
+
createBlock: ee
|
|
498
443
|
},
|
|
499
444
|
{
|
|
500
445
|
type: "video",
|
|
501
|
-
createBlock:
|
|
446
|
+
createBlock: re
|
|
502
447
|
},
|
|
503
448
|
{
|
|
504
449
|
type: "social",
|
|
505
|
-
createBlock:
|
|
450
|
+
createBlock: te
|
|
506
451
|
},
|
|
507
452
|
{
|
|
508
453
|
type: "menu",
|
|
509
|
-
createBlock:
|
|
454
|
+
createBlock: fe
|
|
510
455
|
},
|
|
511
456
|
{
|
|
512
457
|
type: "table",
|
|
513
|
-
createBlock:
|
|
458
|
+
createBlock: ge
|
|
514
459
|
},
|
|
515
460
|
{
|
|
516
461
|
type: "spacer",
|
|
517
|
-
createBlock:
|
|
462
|
+
createBlock: he
|
|
518
463
|
},
|
|
519
464
|
{
|
|
520
465
|
type: "html",
|
|
521
|
-
createBlock:
|
|
466
|
+
createBlock: ne
|
|
522
467
|
},
|
|
523
468
|
{
|
|
524
469
|
type: "countdown",
|
|
525
|
-
createBlock:
|
|
470
|
+
createBlock: se
|
|
526
471
|
}
|
|
527
472
|
];
|
|
528
|
-
function
|
|
529
|
-
for (let n of
|
|
473
|
+
function Qn(e, t) {
|
|
474
|
+
for (let n of Zn) {
|
|
530
475
|
let r = t[n.type];
|
|
531
476
|
r && e.registerBuiltIn(n.type, {
|
|
532
477
|
component: r,
|
|
@@ -536,33 +481,33 @@ function Wn(e, t) {
|
|
|
536
481
|
}
|
|
537
482
|
//#endregion
|
|
538
483
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
539
|
-
function
|
|
484
|
+
function $n(e) {
|
|
540
485
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
541
486
|
}
|
|
542
487
|
//#endregion
|
|
543
488
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
544
|
-
function
|
|
489
|
+
function er(e) {
|
|
545
490
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
546
491
|
}
|
|
547
|
-
function
|
|
548
|
-
let r = new Set(e.map((e) =>
|
|
549
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
492
|
+
function tr(e, t, n) {
|
|
493
|
+
let r = new Set(e.map((e) => cn(e))), i = [], a = (e, t) => {
|
|
494
|
+
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}`) : er(o) && a(o, `${t}.${n}`);
|
|
550
495
|
}, o = t;
|
|
551
|
-
for (let [e, t] of Object.entries(
|
|
496
|
+
for (let [e, t] of Object.entries(de)) {
|
|
552
497
|
let n = o?.[e];
|
|
553
498
|
a({
|
|
554
499
|
...t,
|
|
555
|
-
...
|
|
500
|
+
...er(n) ? n : {}
|
|
556
501
|
}, e);
|
|
557
502
|
}
|
|
558
503
|
return a({
|
|
559
|
-
...
|
|
504
|
+
...R,
|
|
560
505
|
...n ?? {}
|
|
561
506
|
}, "template"), i;
|
|
562
507
|
}
|
|
563
508
|
//#endregion
|
|
564
509
|
//#region src/utils/localizedBlockDefaults.ts
|
|
565
|
-
function
|
|
510
|
+
function nr(e) {
|
|
566
511
|
return {
|
|
567
512
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
568
513
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -571,59 +516,59 @@ function Jn(e) {
|
|
|
571
516
|
}
|
|
572
517
|
//#endregion
|
|
573
518
|
//#region src/i18n/index.ts
|
|
574
|
-
var
|
|
575
|
-
"./locales/ca.ts": () => import("./ca-
|
|
576
|
-
"./locales/de.ts": () => import("./de-
|
|
577
|
-
"./locales/en.ts": () => import("./en-
|
|
578
|
-
"./locales/es.ts": () => import("./es-
|
|
579
|
-
"./locales/fr.ts": () => import("./fr-
|
|
580
|
-
"./locales/ja.ts": () => import("./ja-
|
|
581
|
-
"./locales/nl.ts": () => import("./nl-
|
|
582
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
583
|
-
}),
|
|
519
|
+
var rr = /* #__PURE__ */ Object.assign({
|
|
520
|
+
"./locales/ca.ts": () => import("./ca-CbNzJM3I.js"),
|
|
521
|
+
"./locales/de.ts": () => import("./de-DMquBpZM.js"),
|
|
522
|
+
"./locales/en.ts": () => import("./en-C8Mp71sO.js"),
|
|
523
|
+
"./locales/es.ts": () => import("./es-Byq4tthI.js"),
|
|
524
|
+
"./locales/fr.ts": () => import("./fr-B3j35HEw.js"),
|
|
525
|
+
"./locales/ja.ts": () => import("./ja-D7txAuGS.js"),
|
|
526
|
+
"./locales/nl.ts": () => import("./nl-ClJ3BY3F.js"),
|
|
527
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-DibcXcmv.js")
|
|
528
|
+
}), ir = /* #__PURE__ */ Object.assign({
|
|
584
529
|
"./locales/cloud/de.ts": () => import("./de-mMY5yQJu.js"),
|
|
585
530
|
"./locales/cloud/en.ts": () => import("./en-ChVeGQBY.js"),
|
|
586
531
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-CoCwRUi0.js")
|
|
587
532
|
});
|
|
588
|
-
function
|
|
533
|
+
function ar(e) {
|
|
589
534
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
590
535
|
}
|
|
591
|
-
var
|
|
592
|
-
function
|
|
536
|
+
var or = ar(rr), sr = ar(ir);
|
|
537
|
+
function cr(e) {
|
|
593
538
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
594
539
|
}
|
|
595
|
-
function
|
|
596
|
-
let n =
|
|
597
|
-
return t.find((e) =>
|
|
540
|
+
function lr(e, t) {
|
|
541
|
+
let n = cr(e);
|
|
542
|
+
return t.find((e) => cr(e) === n);
|
|
598
543
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
544
|
+
function ur(e) {
|
|
545
|
+
return cr(e).split("-")[0];
|
|
601
546
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
547
|
+
function dr(e, t) {
|
|
548
|
+
return lr(e, t) ?? lr(ur(e), t);
|
|
604
549
|
}
|
|
605
|
-
function
|
|
606
|
-
return
|
|
550
|
+
function fr(e, t) {
|
|
551
|
+
return dr(e, t) ?? "en";
|
|
607
552
|
}
|
|
608
|
-
async function
|
|
609
|
-
let t =
|
|
553
|
+
async function pr(e) {
|
|
554
|
+
let t = rr[`./locales/${fr(e, or)}.ts`];
|
|
610
555
|
return (await t()).default;
|
|
611
556
|
}
|
|
612
|
-
async function
|
|
613
|
-
let t =
|
|
557
|
+
async function mr(e) {
|
|
558
|
+
let t = ir[`./locales/cloud/${fr(e, sr)}.ts`];
|
|
614
559
|
return (await t()).default;
|
|
615
560
|
}
|
|
616
|
-
function
|
|
617
|
-
return
|
|
561
|
+
function hr(e) {
|
|
562
|
+
return dr(e, or) !== void 0;
|
|
618
563
|
}
|
|
619
|
-
function
|
|
620
|
-
return
|
|
564
|
+
function gr(e) {
|
|
565
|
+
return dr(e, sr) !== void 0;
|
|
621
566
|
}
|
|
622
|
-
function
|
|
623
|
-
return [...
|
|
567
|
+
function _r() {
|
|
568
|
+
return [...or];
|
|
624
569
|
}
|
|
625
|
-
function
|
|
626
|
-
return [
|
|
570
|
+
function vr() {
|
|
571
|
+
return [...sr];
|
|
627
572
|
}
|
|
628
573
|
//#endregion
|
|
629
574
|
//#region src/i18n/contentDefaults.ts
|
|
@@ -692,16 +637,16 @@ var $ = {
|
|
|
692
637
|
seconds: "秒",
|
|
693
638
|
expired: "このオファーは終了しました"
|
|
694
639
|
}
|
|
695
|
-
},
|
|
696
|
-
function
|
|
640
|
+
}, yr = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
|
|
641
|
+
function br(e) {
|
|
697
642
|
if (!e) return $.en;
|
|
698
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
643
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = yr.get(t);
|
|
699
644
|
if (n) return $[n];
|
|
700
|
-
let r =
|
|
645
|
+
let r = yr.get(ur(t));
|
|
701
646
|
return r ? $[r] : $.en;
|
|
702
647
|
}
|
|
703
|
-
function
|
|
704
|
-
let t =
|
|
648
|
+
function xr(e) {
|
|
649
|
+
let t = br(e);
|
|
705
650
|
return {
|
|
706
651
|
video: { alt: t.video },
|
|
707
652
|
countdown: {
|
|
@@ -715,9 +660,9 @@ function pr(e) {
|
|
|
715
660
|
}
|
|
716
661
|
//#endregion
|
|
717
662
|
//#region src/utils/collectColorFieldIssues.ts
|
|
718
|
-
function
|
|
663
|
+
function Sr(e, t) {
|
|
719
664
|
let n = [], r = (r, i) => {
|
|
720
|
-
let a =
|
|
665
|
+
let a = $e(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
721
666
|
if (a.invalidPresets.length > 0 && n.push({
|
|
722
667
|
id: s("invalid-presets"),
|
|
723
668
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -728,8 +673,8 @@ function mr(e, t) {
|
|
|
728
673
|
id: s("allow-custom-ignored"),
|
|
729
674
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
730
675
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
731
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
732
|
-
e !== "" && !t.has(
|
|
676
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => cn(e)));
|
|
677
|
+
e !== "" && !t.has(cn(e)) && n.push({
|
|
733
678
|
id: s("off-palette-default"),
|
|
734
679
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
735
680
|
});
|
|
@@ -741,7 +686,7 @@ function mr(e, t) {
|
|
|
741
686
|
}
|
|
742
687
|
//#endregion
|
|
743
688
|
//#region src/utils/keyboardShortcuts.ts
|
|
744
|
-
function
|
|
689
|
+
function Cr(e) {
|
|
745
690
|
for (let t of e.composedPath()) {
|
|
746
691
|
if (!(t instanceof HTMLElement)) continue;
|
|
747
692
|
if (t.isContentEditable) return !0;
|
|
@@ -750,14 +695,14 @@ function hr(e) {
|
|
|
750
695
|
}
|
|
751
696
|
return !1;
|
|
752
697
|
}
|
|
753
|
-
function
|
|
698
|
+
function wr(e, t) {
|
|
754
699
|
let n = e.metaKey || e.ctrlKey;
|
|
755
700
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
756
701
|
else if (n && e.key.toLowerCase() === "z") {
|
|
757
|
-
if (
|
|
702
|
+
if (Cr(e)) return;
|
|
758
703
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
759
704
|
} else {
|
|
760
|
-
if (t.isPicking?.() && !
|
|
705
|
+
if (t.isPicking?.() && !Cr(e)) {
|
|
761
706
|
if (e.key === "Escape") {
|
|
762
707
|
e.preventDefault(), t.onCancelPick?.();
|
|
763
708
|
return;
|
|
@@ -771,58 +716,105 @@ function gr(e, t) {
|
|
|
771
716
|
return;
|
|
772
717
|
}
|
|
773
718
|
}
|
|
774
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
719
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Cr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
775
720
|
}
|
|
776
721
|
}
|
|
777
722
|
//#endregion
|
|
778
723
|
//#region src/utils/blockComponentResolver.ts
|
|
779
|
-
function
|
|
780
|
-
let
|
|
781
|
-
return e.textColor && (
|
|
724
|
+
function Tr(e, t) {
|
|
725
|
+
let n = { fontFamily: t(e.fontFamily) };
|
|
726
|
+
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
782
727
|
}
|
|
783
|
-
function
|
|
728
|
+
function Er(e, t, n) {
|
|
784
729
|
if (t) {
|
|
785
730
|
let n = t.getComponent(e);
|
|
786
731
|
if (n) return n;
|
|
787
732
|
}
|
|
788
733
|
return n[e.type] ?? null;
|
|
789
734
|
}
|
|
790
|
-
|
|
735
|
+
var Dr = "--tpl-block-bg-layer", Or = "tpl-has-bg-image";
|
|
736
|
+
function kr(e, t) {
|
|
737
|
+
if (t === null) return {};
|
|
738
|
+
let n = V(e);
|
|
739
|
+
if (n === null) return {};
|
|
740
|
+
let r = t?.trim(), i = r ? H(r) : n.url;
|
|
741
|
+
return {
|
|
742
|
+
backgroundImage: `url("${i}")`,
|
|
743
|
+
backgroundSize: n.size,
|
|
744
|
+
backgroundPosition: n.position,
|
|
745
|
+
backgroundRepeat: n.repeat,
|
|
746
|
+
[Dr]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
function Ar(e) {
|
|
750
|
+
return e && Dr in e ? Or : void 0;
|
|
751
|
+
}
|
|
752
|
+
var jr = {
|
|
753
|
+
top: "flex-start",
|
|
754
|
+
middle: "center",
|
|
755
|
+
bottom: "flex-end"
|
|
756
|
+
};
|
|
757
|
+
function Mr(e, t) {
|
|
758
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Nr(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
759
|
+
return {
|
|
760
|
+
display: "flex",
|
|
761
|
+
flexDirection: "column",
|
|
762
|
+
justifyContent: jr[e.verticalAlign],
|
|
763
|
+
boxSizing: "border-box",
|
|
764
|
+
...n
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
function Nr(e, t) {
|
|
768
|
+
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
769
|
+
}
|
|
770
|
+
function Pr(e, t = {}) {
|
|
791
771
|
if (e.type === "wrapper") return {};
|
|
792
|
-
let { padding:
|
|
793
|
-
padding: `${
|
|
794
|
-
backgroundColor:
|
|
772
|
+
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
773
|
+
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
774
|
+
backgroundColor: r || "transparent"
|
|
795
775
|
};
|
|
796
|
-
if ((e.type === "paragraph" || e.type === "title") && (
|
|
797
|
-
let
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
776
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? je.paragraphGap : je.paragraphGap}px`), e.type === "section") {
|
|
777
|
+
let n = U(e.borderRadius);
|
|
778
|
+
n !== null && (i.borderRadius = n);
|
|
779
|
+
let r = pe(e);
|
|
780
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Mr(r, t.heroBoxWidth)), Object.assign(i, kr({
|
|
781
|
+
...e.backgroundImage,
|
|
782
|
+
size: "cover",
|
|
783
|
+
repeat: !1
|
|
784
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, Ir(e.border)), Object.assign(i, kr(e.backgroundImage, t.backgroundImageUrl)));
|
|
785
|
+
}
|
|
786
|
+
return i;
|
|
787
|
+
}
|
|
788
|
+
function Fr(e, t, n, r) {
|
|
789
|
+
return e.type === "section" ? Pr(e, {
|
|
790
|
+
backgroundImageUrl: st(t, e.backgroundImage, n),
|
|
791
|
+
heroBoxWidth: r
|
|
792
|
+
}) : Pr(e);
|
|
801
793
|
}
|
|
802
|
-
function
|
|
794
|
+
function Ir(e) {
|
|
803
795
|
let t = {};
|
|
804
|
-
for (let [n, r] of Object.entries(
|
|
796
|
+
for (let [n, r] of Object.entries(ue(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
805
797
|
return t;
|
|
806
798
|
}
|
|
807
|
-
function
|
|
799
|
+
function Lr(e, t = {}) {
|
|
808
800
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
809
|
-
let
|
|
810
|
-
|
|
811
|
-
let
|
|
812
|
-
return
|
|
801
|
+
let n = e.wrapper, r = {};
|
|
802
|
+
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`);
|
|
803
|
+
let i = U(n.borderRadius);
|
|
804
|
+
return i !== null && (r.borderRadius = i), Object.assign(r, kr(n.backgroundImage, t.backgroundImageUrl)), r;
|
|
813
805
|
}
|
|
814
|
-
function
|
|
806
|
+
function Rr(e, t = {}) {
|
|
815
807
|
if (e.type !== "wrapper") return null;
|
|
816
|
-
let
|
|
817
|
-
if (e.styles.backgroundColor && (
|
|
818
|
-
let
|
|
819
|
-
|
|
808
|
+
let n = {};
|
|
809
|
+
if (e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
810
|
+
let t = e.styles.padding;
|
|
811
|
+
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
820
812
|
}
|
|
821
|
-
return e.borderRadius && e.borderRadius > 0 && (
|
|
813
|
+
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, kr(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
822
814
|
}
|
|
823
815
|
//#endregion
|
|
824
816
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
825
|
-
function
|
|
817
|
+
function zr(e, t, n, r = !1) {
|
|
826
818
|
if (!e) return [];
|
|
827
819
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
828
820
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -831,18 +823,18 @@ function Cr(e, t, n, r = !1) {
|
|
|
831
823
|
value: e.slice(o, s.index)
|
|
832
824
|
});
|
|
833
825
|
let i = s[0];
|
|
834
|
-
if (
|
|
835
|
-
let e = r ?
|
|
826
|
+
if (Te(i, n)) {
|
|
827
|
+
let e = r ? ze(i, t) : void 0;
|
|
836
828
|
a.push(e === void 0 ? {
|
|
837
829
|
type: "tag",
|
|
838
|
-
value:
|
|
830
|
+
value: Ie(i, t)
|
|
839
831
|
} : {
|
|
840
832
|
type: "text",
|
|
841
833
|
value: e
|
|
842
834
|
});
|
|
843
|
-
} else
|
|
835
|
+
} else Ce(i, n) ? a.push({
|
|
844
836
|
type: "tag",
|
|
845
|
-
value:
|
|
837
|
+
value: be(i, n)
|
|
846
838
|
}) : a.push({
|
|
847
839
|
type: "text",
|
|
848
840
|
value: i
|
|
@@ -856,27 +848,27 @@ function Cr(e, t, n, r = !1) {
|
|
|
856
848
|
}
|
|
857
849
|
//#endregion
|
|
858
850
|
//#region src/components/MergeTagPreviewText.vue
|
|
859
|
-
var
|
|
851
|
+
var Br = d({
|
|
860
852
|
name: "MergeTagPreviewText",
|
|
861
853
|
props: { text: {
|
|
862
854
|
type: String,
|
|
863
855
|
required: !0
|
|
864
856
|
} },
|
|
865
857
|
setup(e) {
|
|
866
|
-
let t = n(
|
|
867
|
-
return () => a.value.map((e, t) => e.type === "tag" ?
|
|
858
|
+
let t = n(q, xt), r = n(At, Re.liquid), i = n(jt, null), a = y(() => zr(e.text, t.value, r, i?.value ?? !1));
|
|
859
|
+
return () => a.value.map((e, t) => e.type === "tag" ? F("span", {
|
|
868
860
|
key: t,
|
|
869
861
|
class: "tpl-merge-tag-label"
|
|
870
862
|
}, e.value) : e.value);
|
|
871
863
|
}
|
|
872
|
-
}),
|
|
864
|
+
}), Vr = ["href"], Hr = /* @__PURE__ */ d({
|
|
873
865
|
__name: "ButtonBlock",
|
|
874
866
|
props: {
|
|
875
867
|
block: {},
|
|
876
868
|
viewport: {}
|
|
877
869
|
},
|
|
878
870
|
setup(e) {
|
|
879
|
-
let t = e, n =
|
|
871
|
+
let t = e, n = K(Y, "ButtonBlock"), r = y(() => {
|
|
880
872
|
let e = {
|
|
881
873
|
display: "inline-block",
|
|
882
874
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -885,56 +877,56 @@ var wr = d({
|
|
|
885
877
|
fontSize: `${t.block.fontSize}px`,
|
|
886
878
|
fontWeight: "bold",
|
|
887
879
|
textDecoration: "none",
|
|
888
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
880
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : U(t.block.borderRadius) ?? "0px",
|
|
889
881
|
textAlign: "center"
|
|
890
882
|
};
|
|
891
|
-
return Object.assign(e,
|
|
892
|
-
}),
|
|
893
|
-
return (t,
|
|
883
|
+
return Object.assign(e, Ir(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;
|
|
884
|
+
}), i = y(() => ({ textAlign: t.block.align ?? "center" }));
|
|
885
|
+
return (t, n) => (s(), b("div", { style: E(i.value) }, [O("a", {
|
|
894
886
|
href: e.block.url || "#",
|
|
895
|
-
style:
|
|
887
|
+
style: E(r.value),
|
|
896
888
|
class: "tpl:cursor-default",
|
|
897
|
-
onClick:
|
|
898
|
-
}, [
|
|
889
|
+
onClick: n[0] ||= T(() => {}, ["prevent"])
|
|
890
|
+
}, [h(Br, { text: e.block.text }, null, 8, ["text"])], 12, Vr)], 4));
|
|
899
891
|
}
|
|
900
|
-
}),
|
|
892
|
+
}), Ur = ["innerHTML"], Wr = [
|
|
901
893
|
"src",
|
|
902
894
|
"width",
|
|
903
895
|
"height"
|
|
904
|
-
],
|
|
896
|
+
], Gr = /* @__PURE__ */ d({
|
|
905
897
|
__name: "CustomBlockIcon",
|
|
906
898
|
props: {
|
|
907
899
|
icon: {},
|
|
908
900
|
size: {}
|
|
909
901
|
},
|
|
910
902
|
setup(e) {
|
|
911
|
-
let t = e, n =
|
|
912
|
-
return (t, a) => r.value ? (s(),
|
|
903
|
+
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("/")));
|
|
904
|
+
return (t, a) => r.value ? (s(), b("span", {
|
|
913
905
|
key: 0,
|
|
914
906
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
915
|
-
style:
|
|
907
|
+
style: E({
|
|
916
908
|
width: `${n.value}px`,
|
|
917
909
|
height: `${n.value}px`
|
|
918
910
|
}),
|
|
919
911
|
innerHTML: e.icon
|
|
920
|
-
}, null, 12,
|
|
912
|
+
}, null, 12, Ur)) : i.value ? (s(), b("img", {
|
|
921
913
|
key: 1,
|
|
922
914
|
src: e.icon,
|
|
923
915
|
width: n.value,
|
|
924
916
|
height: n.value,
|
|
925
917
|
class: "tpl:inline-block",
|
|
926
918
|
alt: ""
|
|
927
|
-
}, null, 8,
|
|
919
|
+
}, null, 8, Wr)) : (s(), D(m(vn), {
|
|
928
920
|
key: 2,
|
|
929
921
|
size: n.value,
|
|
930
922
|
"stroke-width": 1.5
|
|
931
923
|
}, null, 8, ["size"]));
|
|
932
924
|
}
|
|
933
|
-
}),
|
|
934
|
-
function
|
|
935
|
-
let r =
|
|
925
|
+
}), Kr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
926
|
+
function qr(e, n) {
|
|
927
|
+
let r = jn(), i = null, a = null, o = null;
|
|
936
928
|
function s() {
|
|
937
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
929
|
+
return e.value ? Array.from(e.value.querySelectorAll(Kr)).filter((e) => e.offsetParent !== null) : [];
|
|
938
930
|
}
|
|
939
931
|
function c(e) {
|
|
940
932
|
if (e.key !== "Tab") return;
|
|
@@ -949,7 +941,7 @@ function jr(e, n) {
|
|
|
949
941
|
o = null;
|
|
950
942
|
let t = s();
|
|
951
943
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
952
|
-
}), a =
|
|
944
|
+
}), a = pt(e, "keydown", c);
|
|
953
945
|
}
|
|
954
946
|
function u(e = {}) {
|
|
955
947
|
let t = e.restoreFocus !== !1;
|
|
@@ -958,15 +950,15 @@ function jr(e, n) {
|
|
|
958
950
|
let d = t([n, e], ([e, t]) => {
|
|
959
951
|
e && t ? l() : u();
|
|
960
952
|
}, { flush: "post" });
|
|
961
|
-
|
|
953
|
+
p(() => {
|
|
962
954
|
d(), u();
|
|
963
955
|
});
|
|
964
956
|
}
|
|
965
957
|
//#endregion
|
|
966
958
|
//#region src/composables/useEmoji.ts
|
|
967
|
-
function
|
|
968
|
-
let [e, n] =
|
|
969
|
-
|
|
959
|
+
function Jr() {
|
|
960
|
+
let [e, n] = dt(!1), r = v([]), i = !1;
|
|
961
|
+
p(() => {
|
|
970
962
|
i = !0;
|
|
971
963
|
}), t(e, async (e) => {
|
|
972
964
|
if (e && r.value.length === 0) {
|
|
@@ -990,7 +982,7 @@ function Mr() {
|
|
|
990
982
|
}
|
|
991
983
|
//#endregion
|
|
992
984
|
//#region src/composables/useFonts.ts
|
|
993
|
-
var
|
|
985
|
+
var Yr = [
|
|
994
986
|
{
|
|
995
987
|
value: "Arial",
|
|
996
988
|
label: "Arial"
|
|
@@ -1019,19 +1011,19 @@ var Nr = [
|
|
|
1019
1011
|
value: "Courier New",
|
|
1020
1012
|
label: "Courier New"
|
|
1021
1013
|
}
|
|
1022
|
-
],
|
|
1023
|
-
function
|
|
1024
|
-
if (e === void 0 || e === !0) return [...
|
|
1014
|
+
], Xr = "Arial, sans-serif";
|
|
1015
|
+
function Zr(e) {
|
|
1016
|
+
if (e === void 0 || e === !0) return [...Yr];
|
|
1025
1017
|
if (e === !1) return [];
|
|
1026
1018
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1027
1019
|
for (let i of e) {
|
|
1028
|
-
let e = i.toLowerCase(), a =
|
|
1029
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
1020
|
+
let e = i.toLowerCase(), a = Yr.find((t) => t.value.toLowerCase() === e);
|
|
1021
|
+
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: ${Yr.map((e) => e.value).join(", ")}.`));
|
|
1030
1022
|
}
|
|
1031
1023
|
return t;
|
|
1032
1024
|
}
|
|
1033
|
-
function
|
|
1034
|
-
let t = l(e?.customFonts ?? []), n = l(!1), r =
|
|
1025
|
+
function Qr(e) {
|
|
1026
|
+
let t = l(e?.customFonts ?? []), n = l(!1), r = Zr(e?.builtIns), i = y(() => e?.defaultFallback ?? Xr), a = y(() => {
|
|
1035
1027
|
let e = [...r], n = t.value.map((e) => ({
|
|
1036
1028
|
value: e.name,
|
|
1037
1029
|
label: e.name,
|
|
@@ -1042,22 +1034,23 @@ function Ir(e) {
|
|
|
1042
1034
|
function s(e) {
|
|
1043
1035
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1044
1036
|
}
|
|
1045
|
-
let c = e?.defaultFont ??
|
|
1046
|
-
s(c) ||
|
|
1037
|
+
let c = e?.defaultFont ?? Xr.split(",")[0].trim();
|
|
1038
|
+
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.`);
|
|
1047
1039
|
function u() {
|
|
1048
1040
|
if (e?.defaultFont && s(e.defaultFont)) {
|
|
1049
1041
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1050
1042
|
if (t) return t.value;
|
|
1051
1043
|
}
|
|
1052
|
-
return
|
|
1044
|
+
return Xr;
|
|
1053
1045
|
}
|
|
1054
|
-
let d =
|
|
1046
|
+
let d = y(() => u());
|
|
1055
1047
|
function f(e) {
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1048
|
+
return xe(e, {
|
|
1049
|
+
customFonts: t.value,
|
|
1050
|
+
defaultFallback: i.value
|
|
1051
|
+
});
|
|
1059
1052
|
}
|
|
1060
|
-
let
|
|
1053
|
+
let m = [], h = !1;
|
|
1061
1054
|
async function g() {
|
|
1062
1055
|
if (t.value.length === 0) {
|
|
1063
1056
|
h || (n.value = !0);
|
|
@@ -1067,20 +1060,20 @@ function Ir(e) {
|
|
|
1067
1060
|
try {
|
|
1068
1061
|
if (document.querySelector(`link[data-custom-font="${CSS.escape(e.name)}"]`)) return;
|
|
1069
1062
|
let t = document.createElement("link");
|
|
1070
|
-
t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name),
|
|
1063
|
+
t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), m.push(t), await new Promise((n, r) => {
|
|
1071
1064
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1072
1065
|
});
|
|
1073
1066
|
} catch (t) {
|
|
1074
|
-
|
|
1067
|
+
Z.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1075
1068
|
}
|
|
1076
1069
|
});
|
|
1077
1070
|
await Promise.allSettled(e), !h && (n.value = !0);
|
|
1078
1071
|
}
|
|
1079
1072
|
function _() {
|
|
1080
|
-
for (let e of
|
|
1081
|
-
|
|
1073
|
+
for (let e of m) e.remove();
|
|
1074
|
+
m.length = 0;
|
|
1082
1075
|
}
|
|
1083
|
-
return o() &&
|
|
1076
|
+
return o() && p(() => {
|
|
1084
1077
|
h = !0, _();
|
|
1085
1078
|
}), {
|
|
1086
1079
|
fonts: a,
|
|
@@ -1090,18 +1083,18 @@ function Ir(e) {
|
|
|
1090
1083
|
isLoaded: n,
|
|
1091
1084
|
loadCustomFonts: g,
|
|
1092
1085
|
cleanupFontLinks: _,
|
|
1093
|
-
|
|
1086
|
+
resolveFontFamily: f,
|
|
1094
1087
|
getDefaultFont: u
|
|
1095
1088
|
};
|
|
1096
1089
|
}
|
|
1097
1090
|
//#endregion
|
|
1098
1091
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1099
|
-
function
|
|
1100
|
-
return
|
|
1092
|
+
function $r(e, t, n) {
|
|
1093
|
+
return Ce(e, n) ? {
|
|
1101
1094
|
type: "logicMergeTagNode",
|
|
1102
1095
|
attrs: {
|
|
1103
1096
|
value: e,
|
|
1104
|
-
keyword:
|
|
1097
|
+
keyword: be(e, n)
|
|
1105
1098
|
}
|
|
1106
1099
|
} : {
|
|
1107
1100
|
type: "mergeTagNode",
|
|
@@ -1113,33 +1106,33 @@ function Lr(e, t, n) {
|
|
|
1113
1106
|
}
|
|
1114
1107
|
//#endregion
|
|
1115
1108
|
//#region src/utils/insertLogicTag.ts
|
|
1116
|
-
function
|
|
1109
|
+
function ei(e) {
|
|
1117
1110
|
return "before" in e && "after" in e;
|
|
1118
1111
|
}
|
|
1119
|
-
function
|
|
1120
|
-
if (!
|
|
1121
|
-
e.chain().focus().insertContent(
|
|
1112
|
+
function ti(e, t, n) {
|
|
1113
|
+
if (!ei(t)) {
|
|
1114
|
+
e.chain().focus().insertContent($r(t.value, t.label, n)).run();
|
|
1122
1115
|
return;
|
|
1123
1116
|
}
|
|
1124
|
-
let r =
|
|
1117
|
+
let r = $r(t.before, t.label, n), i = $r(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1125
1118
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1126
1119
|
}
|
|
1127
1120
|
//#endregion
|
|
1128
1121
|
//#region src/utils/linkColorExtension.ts
|
|
1129
|
-
function
|
|
1122
|
+
function ni(e) {
|
|
1130
1123
|
if (!e) return null;
|
|
1131
1124
|
let t = e.trim();
|
|
1132
1125
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
1133
1126
|
}
|
|
1134
|
-
function
|
|
1127
|
+
function ri(e) {
|
|
1135
1128
|
return e.extend({ addAttributes() {
|
|
1136
1129
|
return {
|
|
1137
1130
|
...this.parent?.(),
|
|
1138
1131
|
color: {
|
|
1139
1132
|
default: null,
|
|
1140
|
-
parseHTML: (e) =>
|
|
1133
|
+
parseHTML: (e) => ni(sn(e.style.color)),
|
|
1141
1134
|
renderHTML: (e) => {
|
|
1142
|
-
let t =
|
|
1135
|
+
let t = ni(e.color);
|
|
1143
1136
|
return t ? { style: `color: ${t}` } : {};
|
|
1144
1137
|
}
|
|
1145
1138
|
}
|
|
@@ -1148,9 +1141,9 @@ function Vr(e) {
|
|
|
1148
1141
|
}
|
|
1149
1142
|
//#endregion
|
|
1150
1143
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1151
|
-
function
|
|
1144
|
+
function ii(e, t = Re.liquid) {
|
|
1152
1145
|
let n = l(!1), r = l(""), i = l(""), a = l(null);
|
|
1153
|
-
|
|
1146
|
+
qr(a, n);
|
|
1154
1147
|
function o() {
|
|
1155
1148
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1156
1149
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -1159,7 +1152,7 @@ function Hr(e, t = Ne.liquid) {
|
|
|
1159
1152
|
if (r.value) {
|
|
1160
1153
|
let t = f(r.value);
|
|
1161
1154
|
if (t !== null) {
|
|
1162
|
-
let n =
|
|
1155
|
+
let n = ni(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1163
1156
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1164
1157
|
}
|
|
1165
1158
|
}
|
|
@@ -1211,13 +1204,13 @@ function Hr(e, t = Ne.liquid) {
|
|
|
1211
1204
|
}
|
|
1212
1205
|
//#endregion
|
|
1213
1206
|
//#region src/composables/useRichTextEditor.ts
|
|
1214
|
-
function
|
|
1215
|
-
let i = n(J, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } =
|
|
1207
|
+
function ai(r) {
|
|
1208
|
+
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", _ = Me(u), y = v(null), b = () => _e(i?.content?.value?.settings ?? { locale: "en" });
|
|
1216
1209
|
t(b, (e) => {
|
|
1217
|
-
let t =
|
|
1210
|
+
let t = y.value?.view.dom;
|
|
1218
1211
|
t && t.setAttribute("dir", e);
|
|
1219
1212
|
});
|
|
1220
|
-
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown:
|
|
1213
|
+
let { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: A } = ii(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;
|
|
1221
1214
|
async function R() {
|
|
1222
1215
|
F.value = null, P.value = !0;
|
|
1223
1216
|
try {
|
|
@@ -1245,18 +1238,18 @@ function Ur(r) {
|
|
|
1245
1238
|
s.destroy();
|
|
1246
1239
|
return;
|
|
1247
1240
|
}
|
|
1248
|
-
|
|
1241
|
+
y.value = s, P.value = !1, j();
|
|
1249
1242
|
} catch (e) {
|
|
1250
1243
|
if (I) return;
|
|
1251
|
-
|
|
1244
|
+
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;
|
|
1252
1245
|
}
|
|
1253
1246
|
}
|
|
1254
1247
|
function z() {
|
|
1255
|
-
|
|
1248
|
+
y.value?.destroy(), y.value = null, R();
|
|
1256
1249
|
}
|
|
1257
1250
|
R();
|
|
1258
1251
|
let B = t(() => r.blockContent(), (e) => {
|
|
1259
|
-
|
|
1252
|
+
y.value && e !== L && (L = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
1260
1253
|
});
|
|
1261
1254
|
function V(e) {
|
|
1262
1255
|
if (s.value || p.value) return;
|
|
@@ -1266,22 +1259,22 @@ function Ur(r) {
|
|
|
1266
1259
|
let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1267
1260
|
n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
|
|
1268
1261
|
}
|
|
1269
|
-
|
|
1270
|
-
I = !0, B(), M(),
|
|
1262
|
+
pt(document, "mousedown", V), e(() => {
|
|
1263
|
+
I = !0, B(), M(), y.value?.destroy();
|
|
1271
1264
|
});
|
|
1272
1265
|
async function H() {
|
|
1273
1266
|
let e = await c();
|
|
1274
|
-
I || (e &&
|
|
1267
|
+
I || (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
1275
1268
|
label: e.label,
|
|
1276
1269
|
value: e.value
|
|
1277
|
-
}).run() :
|
|
1270
|
+
}).run() : y.value?.commands.focus());
|
|
1278
1271
|
}
|
|
1279
1272
|
async function ee() {
|
|
1280
1273
|
let e = await m();
|
|
1281
|
-
I || (e &&
|
|
1274
|
+
I || (e && y.value ? ti(y.value, e, u) : y.value?.commands.focus());
|
|
1282
1275
|
}
|
|
1283
1276
|
return {
|
|
1284
|
-
editor:
|
|
1277
|
+
editor: y,
|
|
1285
1278
|
EditorContent: N,
|
|
1286
1279
|
isLoading: P,
|
|
1287
1280
|
initError: F,
|
|
@@ -1300,37 +1293,37 @@ function Ur(r) {
|
|
|
1300
1293
|
insertLink: E,
|
|
1301
1294
|
removeLink: D,
|
|
1302
1295
|
closeLinkDialog: O,
|
|
1303
|
-
handleLinkKeydown:
|
|
1296
|
+
handleLinkKeydown: A,
|
|
1304
1297
|
handleAddMergeTag: H,
|
|
1305
1298
|
handleAddLogicTag: ee
|
|
1306
1299
|
};
|
|
1307
1300
|
}
|
|
1308
1301
|
//#endregion
|
|
1309
1302
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1310
|
-
var
|
|
1311
|
-
function
|
|
1312
|
-
let t =
|
|
1303
|
+
var oi = "(max-width: 767px)";
|
|
1304
|
+
function si(e) {
|
|
1305
|
+
let t = mt(oi);
|
|
1313
1306
|
return {
|
|
1314
1307
|
isSmallScreen: t,
|
|
1315
|
-
showNotice:
|
|
1308
|
+
showNotice: y(() => (A(e) ?? !0) && t.value)
|
|
1316
1309
|
};
|
|
1317
1310
|
}
|
|
1318
1311
|
//#endregion
|
|
1319
1312
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1320
|
-
var
|
|
1313
|
+
var ci = { class: "tpl:w-full" }, li = {
|
|
1321
1314
|
key: 0,
|
|
1322
|
-
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1323
|
-
},
|
|
1315
|
+
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)]"
|
|
1316
|
+
}, ui = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, di = {
|
|
1324
1317
|
key: 1,
|
|
1325
|
-
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1326
|
-
},
|
|
1318
|
+
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)]"
|
|
1319
|
+
}, fi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, pi = {
|
|
1327
1320
|
key: 2,
|
|
1328
1321
|
class: "tpl:relative"
|
|
1329
|
-
},
|
|
1322
|
+
}, mi = ["innerHTML"], hi = {
|
|
1330
1323
|
key: 0,
|
|
1331
1324
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1332
1325
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1333
|
-
},
|
|
1326
|
+
}, gi = /* @__PURE__ */ d({
|
|
1334
1327
|
__name: "CustomBlock",
|
|
1335
1328
|
props: {
|
|
1336
1329
|
block: {},
|
|
@@ -1338,19 +1331,19 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1338
1331
|
},
|
|
1339
1332
|
emits: ["fetchData"],
|
|
1340
1333
|
setup(e, { emit: r }) {
|
|
1341
|
-
let i = e, a = r, { t: o } =
|
|
1334
|
+
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 } = tt({
|
|
1342
1335
|
definition: f,
|
|
1343
|
-
block:
|
|
1336
|
+
block: g,
|
|
1344
1337
|
onUpdate: (e, t) => {
|
|
1345
1338
|
a("fetchData", {
|
|
1346
1339
|
fieldValues: e,
|
|
1347
1340
|
dataSourceFetched: t
|
|
1348
1341
|
});
|
|
1349
1342
|
}
|
|
1350
|
-
}),
|
|
1351
|
-
if (!
|
|
1343
|
+
}), E = n(q, xt), k = n(jt, null), A = y(() => {
|
|
1344
|
+
if (!k?.value) return i.block;
|
|
1352
1345
|
let e = {};
|
|
1353
|
-
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1346
|
+
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ye(n, E.value) : n;
|
|
1354
1347
|
return {
|
|
1355
1348
|
...i.block,
|
|
1356
1349
|
fieldValues: e
|
|
@@ -1367,106 +1360,102 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1367
1360
|
}
|
|
1368
1361
|
}
|
|
1369
1362
|
}
|
|
1370
|
-
let M =
|
|
1371
|
-
return
|
|
1363
|
+
let M = ut(j, 150);
|
|
1364
|
+
return C(() => {
|
|
1372
1365
|
j();
|
|
1373
1366
|
}), t(() => i.block.fieldValues, () => {
|
|
1374
1367
|
M();
|
|
1375
|
-
}, { deep: !0 }), t(() =>
|
|
1368
|
+
}, { deep: !0 }), t(() => k?.value, () => {
|
|
1376
1369
|
M();
|
|
1377
|
-
}), (e, t) => (s(),
|
|
1370
|
+
}), (e, t) => (s(), b("div", ci, [p.value ? d.value ? (s(), b("div", di, [h(m(Sn), {
|
|
1378
1371
|
size: 24,
|
|
1379
1372
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1380
|
-
}),
|
|
1373
|
+
}), O("span", fi, P(m(o).customBlocks.renderError), 1)])) : (s(), b("div", pi, [O("div", { innerHTML: u.value }, null, 8, mi), m(w) && m(S) ? (s(), b("div", hi, [m(_) ? (s(), D(kn, {
|
|
1381
1374
|
key: 1,
|
|
1382
1375
|
class: "tpl:w-48"
|
|
1383
|
-
})) : (s(),
|
|
1376
|
+
})) : (s(), b("button", {
|
|
1384
1377
|
key: 0,
|
|
1385
1378
|
type: "button",
|
|
1386
1379
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1387
|
-
onClick: t[0] ||=
|
|
1388
|
-
}, [f.value?.icon ? (s(),
|
|
1380
|
+
onClick: t[0] ||= T((...e) => m(v) && m(v)(...e), ["stop"])
|
|
1381
|
+
}, [f.value?.icon ? (s(), D(Gr, {
|
|
1389
1382
|
key: 0,
|
|
1390
1383
|
icon: f.value.icon,
|
|
1391
1384
|
size: 16
|
|
1392
|
-
}, null, 8, ["icon"])) :
|
|
1385
|
+
}, null, 8, ["icon"])) : x("", !0), L(" " + P(f.value?.dataSource?.label || m(o).customBlocks.dataSource.fetchButton), 1)]))])) : x("", !0)])) : (s(), b("div", li, [h(m(_n), {
|
|
1393
1386
|
size: 24,
|
|
1394
1387
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1395
|
-
}),
|
|
1388
|
+
}), O("span", ui, P(m(o).customBlocks.definitionNotFound), 1)]))]));
|
|
1396
1389
|
}
|
|
1397
|
-
}),
|
|
1390
|
+
}), _i = { class: "tpl:w-full" }, vi = /* @__PURE__ */ d({
|
|
1398
1391
|
__name: "DividerBlock",
|
|
1399
1392
|
props: {
|
|
1400
1393
|
block: {},
|
|
1401
1394
|
viewport: {}
|
|
1402
1395
|
},
|
|
1403
1396
|
setup(e) {
|
|
1404
|
-
let t = e, n =
|
|
1397
|
+
let t = e, n = y(() => ({
|
|
1405
1398
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1406
1399
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1407
1400
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1408
1401
|
}));
|
|
1409
|
-
return (e, t) => (s(),
|
|
1402
|
+
return (e, t) => (s(), b("div", _i, [O("hr", {
|
|
1410
1403
|
class: "tpl:m-0 tpl:border-none",
|
|
1411
|
-
style:
|
|
1404
|
+
style: E(n.value)
|
|
1412
1405
|
}, null, 4)]));
|
|
1413
1406
|
}
|
|
1414
|
-
}),
|
|
1407
|
+
}), yi = { class: "tpl:w-full" }, bi = ["srcdoc", "title"], xi = {
|
|
1415
1408
|
key: 1,
|
|
1416
|
-
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
1417
|
-
},
|
|
1409
|
+
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)]"
|
|
1410
|
+
}, Si = {
|
|
1418
1411
|
key: 0,
|
|
1419
1412
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1420
|
-
},
|
|
1413
|
+
}, Ci = {
|
|
1421
1414
|
key: 1,
|
|
1422
1415
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1423
|
-
},
|
|
1416
|
+
}, wi = /* @__PURE__ */ d({
|
|
1424
1417
|
__name: "HtmlBlock",
|
|
1425
1418
|
props: {
|
|
1426
1419
|
block: {},
|
|
1427
1420
|
viewport: {}
|
|
1428
1421
|
},
|
|
1429
1422
|
setup(r) {
|
|
1430
|
-
let i = r, { t: a } =
|
|
1431
|
-
function
|
|
1432
|
-
let e =
|
|
1423
|
+
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 ? ye(i.block.content, d.value) : i.block.content), g = l(null), _ = l(60), v = null;
|
|
1424
|
+
function x() {
|
|
1425
|
+
let e = g.value?.contentDocument;
|
|
1433
1426
|
e && (_.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
1434
1427
|
}
|
|
1435
1428
|
function S() {
|
|
1436
|
-
v?.disconnect(), v = null,
|
|
1437
|
-
let e =
|
|
1438
|
-
e && typeof ResizeObserver < "u" && (v = new ResizeObserver(() =>
|
|
1429
|
+
v?.disconnect(), v = null, x();
|
|
1430
|
+
let e = g.value?.contentDocument?.documentElement;
|
|
1431
|
+
e && typeof ResizeObserver < "u" && (v = new ResizeObserver(() => x()), v.observe(e));
|
|
1439
1432
|
}
|
|
1440
1433
|
return t(u, (e) => {
|
|
1441
1434
|
e || (v?.disconnect(), v = null);
|
|
1442
1435
|
}), e(() => {
|
|
1443
1436
|
v?.disconnect(), v = null;
|
|
1444
|
-
}), (e, t) => (s(),
|
|
1437
|
+
}), (e, t) => (s(), b("div", yi, [u.value ? (s(), b("iframe", {
|
|
1445
1438
|
key: 0,
|
|
1446
1439
|
ref_key: "iframeRef",
|
|
1447
|
-
ref:
|
|
1440
|
+
ref: g,
|
|
1448
1441
|
srcdoc: p.value,
|
|
1449
1442
|
sandbox: "allow-same-origin",
|
|
1450
|
-
title:
|
|
1443
|
+
title: m(a).html.preview,
|
|
1451
1444
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1452
|
-
style:
|
|
1445
|
+
style: E({ height: `${_.value}px` }),
|
|
1453
1446
|
onLoad: S
|
|
1454
|
-
}, null, 44,
|
|
1447
|
+
}, null, 44, bi)) : (s(), b("div", xi, [h(m(pn), {
|
|
1455
1448
|
size: 24,
|
|
1456
1449
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1457
|
-
}), c.value ? (s(),
|
|
1450
|
+
}), c.value ? (s(), b("span", Si, P(m(a).html.preview), 1)) : (s(), b("span", Ci, P(m(a).html.empty), 1))]))]));
|
|
1458
1451
|
}
|
|
1459
|
-
}),
|
|
1460
|
-
key: 0,
|
|
1461
|
-
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1462
|
-
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1463
|
-
}, di = ["href"], fi = ["src", "alt"], pi = ["src", "alt"], mi = {
|
|
1452
|
+
}), Ti = ["data-drop-enabled"], Ei = ["href"], Di = ["src", "alt"], Oi = ["src", "alt"], ki = {
|
|
1464
1453
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1465
1454
|
style: { opacity: "0.7" }
|
|
1466
|
-
},
|
|
1455
|
+
}, Ai = ["href"], ji = ["src", "alt"], Mi = ["src", "alt"], Ni = {
|
|
1467
1456
|
key: 4,
|
|
1468
|
-
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1469
|
-
},
|
|
1457
|
+
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)]"
|
|
1458
|
+
}, Pi = ["aria-label"], Fi = { key: 1 }, Ii = /* @__PURE__ */ d({
|
|
1470
1459
|
__name: "ImageBlock",
|
|
1471
1460
|
props: {
|
|
1472
1461
|
block: {},
|
|
@@ -1474,165 +1463,143 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1474
1463
|
},
|
|
1475
1464
|
emits: ["update"],
|
|
1476
1465
|
setup(e, { emit: t }) {
|
|
1477
|
-
let
|
|
1478
|
-
|
|
1479
|
-
let
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
}
|
|
1485
|
-
let m = l(), _ = l(!1), v = b(() => (u?.value ?? !!c) && !_.value && !A.value);
|
|
1486
|
-
async function y(e) {
|
|
1487
|
-
if (c) {
|
|
1488
|
-
_.value = !0;
|
|
1489
|
-
try {
|
|
1490
|
-
let t = await c({
|
|
1491
|
-
accept: ["images"],
|
|
1492
|
-
files: e
|
|
1493
|
-
});
|
|
1494
|
-
if (!f.alive) return;
|
|
1495
|
-
if (t) {
|
|
1496
|
-
let e = { src: t.url };
|
|
1497
|
-
t.alt && (e.alt = t.alt), i("update", e);
|
|
1498
|
-
}
|
|
1499
|
-
} finally {
|
|
1500
|
-
f.alive && (_.value = !1);
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1466
|
+
let n = e, r = t, { t: i } = X(), { syntax: a } = Mn(), o = y(() => ke(n.block.src, a));
|
|
1467
|
+
function c(e) {
|
|
1468
|
+
let t = {
|
|
1469
|
+
src: e.url,
|
|
1470
|
+
...it(et(e.width, e.height))
|
|
1471
|
+
};
|
|
1472
|
+
e.alt && (t.alt = e.alt), r("update", t);
|
|
1503
1473
|
}
|
|
1504
|
-
let {
|
|
1505
|
-
target:
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
}),
|
|
1509
|
-
let e =
|
|
1474
|
+
let u = l(), { canBrowse: d, dropEnabled: f, isUploading: p, showOverlay: g, openMediaBrowser: _ } = nt({
|
|
1475
|
+
target: u,
|
|
1476
|
+
blocked: o,
|
|
1477
|
+
apply: c
|
|
1478
|
+
}), v = y(() => ({ textAlign: n.block.align })), S = y(() => {
|
|
1479
|
+
let e = n.block.border, t = ["left", "right"].map((t) => ce(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1510
1480
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1511
|
-
}),
|
|
1512
|
-
let e =
|
|
1481
|
+
}), C = y(() => {
|
|
1482
|
+
let e = n.block.align;
|
|
1513
1483
|
return {
|
|
1514
1484
|
maxWidth: "100%",
|
|
1515
|
-
width:
|
|
1516
|
-
height:
|
|
1517
|
-
borderRadius:
|
|
1518
|
-
...
|
|
1485
|
+
width: n.block.width === "full" ? S.value : `${n.block.width}px`,
|
|
1486
|
+
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1487
|
+
borderRadius: U(n.block.borderRadius) ?? void 0,
|
|
1488
|
+
...Ir(n.block.border),
|
|
1519
1489
|
display: "block",
|
|
1520
1490
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1521
1491
|
marginRight: e === "center" ? "auto" : void 0
|
|
1522
1492
|
};
|
|
1523
|
-
}),
|
|
1524
|
-
return (t, n) => (s(),
|
|
1493
|
+
}), w = G(() => o.value ? void 0 : n.block.src), k = G(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1494
|
+
return (t, n) => (s(), b("div", {
|
|
1525
1495
|
ref_key: "dropZoneRef",
|
|
1526
|
-
ref:
|
|
1496
|
+
ref: u,
|
|
1527
1497
|
"data-testid": "image-drop-zone",
|
|
1528
|
-
"data-drop-enabled":
|
|
1498
|
+
"data-drop-enabled": m(f),
|
|
1529
1499
|
class: "tpl:relative tpl:w-full",
|
|
1530
|
-
style:
|
|
1531
|
-
}, [
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
"
|
|
1535
|
-
}
|
|
1536
|
-
size: 20,
|
|
1537
|
-
"stroke-width": 1.5
|
|
1538
|
-
}), R(" " + F(h(a).image.dropToUpload), 1)], 64))])) : S("", !0), e.block.src && A.value && e.block.placeholderUrl ? (s(), x(P, { key: 1 }, [e.block.linkUrl ? (s(), x("a", {
|
|
1500
|
+
style: E(v.value)
|
|
1501
|
+
}, [m(g) ? (s(), D(ot, {
|
|
1502
|
+
key: 0,
|
|
1503
|
+
uploading: m(p),
|
|
1504
|
+
size: "canvas"
|
|
1505
|
+
}, null, 8, ["uploading"])) : x("", !0), e.block.src && o.value && e.block.placeholderUrl ? (s(), b(N, { key: 1 }, [e.block.linkUrl ? (s(), b("a", {
|
|
1539
1506
|
key: 0,
|
|
1540
1507
|
href: e.block.linkUrl,
|
|
1541
1508
|
target: "_blank",
|
|
1542
1509
|
rel: "noopener noreferrer",
|
|
1543
|
-
onClick: n[0] ||=
|
|
1544
|
-
}, [
|
|
1510
|
+
onClick: n[0] ||= T(() => {}, ["prevent"])
|
|
1511
|
+
}, [O("img", {
|
|
1545
1512
|
class: "tpl:border-0",
|
|
1546
1513
|
loading: "lazy",
|
|
1547
|
-
src:
|
|
1548
|
-
alt: e.block.alt ||
|
|
1549
|
-
style:
|
|
1550
|
-
}, null, 12,
|
|
1514
|
+
src: m(k),
|
|
1515
|
+
alt: e.block.alt || m(i).image.altTextPlaceholder,
|
|
1516
|
+
style: E(C.value)
|
|
1517
|
+
}, null, 12, Di)], 8, Ei)) : (s(), b("img", {
|
|
1551
1518
|
key: 1,
|
|
1552
1519
|
class: "tpl:border-0",
|
|
1553
|
-
src:
|
|
1520
|
+
src: m(k),
|
|
1554
1521
|
alt: e.block.alt,
|
|
1555
|
-
style:
|
|
1556
|
-
}, null, 12,
|
|
1522
|
+
style: E(C.value)
|
|
1523
|
+
}, null, 12, Oi))], 64)) : e.block.src && o.value ? (s(), b("div", {
|
|
1557
1524
|
key: 2,
|
|
1558
|
-
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1559
|
-
style:
|
|
1560
|
-
}, [
|
|
1525
|
+
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)]",
|
|
1526
|
+
style: E([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, C.value])
|
|
1527
|
+
}, [h(m(Tn), {
|
|
1561
1528
|
size: 32,
|
|
1562
1529
|
"stroke-width": 1.5,
|
|
1563
1530
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1564
1531
|
style: { opacity: "0.5" }
|
|
1565
|
-
}),
|
|
1532
|
+
}), O("span", ki, [h(Br, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), b(N, { key: 3 }, [e.block.linkUrl ? (s(), b("a", {
|
|
1566
1533
|
key: 0,
|
|
1567
1534
|
href: e.block.linkUrl,
|
|
1568
1535
|
target: "_blank",
|
|
1569
1536
|
rel: "noopener noreferrer",
|
|
1570
|
-
onClick: n[1] ||=
|
|
1571
|
-
}, [
|
|
1537
|
+
onClick: n[1] ||= T(() => {}, ["prevent"])
|
|
1538
|
+
}, [O("img", {
|
|
1572
1539
|
class: "tpl:border-0",
|
|
1573
1540
|
loading: "lazy",
|
|
1574
|
-
src:
|
|
1575
|
-
alt: e.block.alt ||
|
|
1576
|
-
style:
|
|
1577
|
-
}, null, 12,
|
|
1541
|
+
src: m(w),
|
|
1542
|
+
alt: e.block.alt || m(i).image.altTextPlaceholder,
|
|
1543
|
+
style: E(C.value)
|
|
1544
|
+
}, null, 12, ji)], 8, Ai)) : (s(), b("img", {
|
|
1578
1545
|
key: 1,
|
|
1579
1546
|
class: "tpl:border-0",
|
|
1580
|
-
src:
|
|
1547
|
+
src: m(w),
|
|
1581
1548
|
alt: e.block.alt,
|
|
1582
|
-
style:
|
|
1583
|
-
}, null, 12,
|
|
1549
|
+
style: E(C.value)
|
|
1550
|
+
}, null, 12, Mi))], 64)) : (s(), b("div", Ni, [m(d) ? (s(), b("button", {
|
|
1584
1551
|
key: 0,
|
|
1585
|
-
"aria-label":
|
|
1552
|
+
"aria-label": m(i).image.browseMedia,
|
|
1586
1553
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1587
|
-
onClick:
|
|
1588
|
-
}, [
|
|
1554
|
+
onClick: n[2] ||= T((...e) => m(_) && m(_)(...e), ["stop"])
|
|
1555
|
+
}, [h(m(Tn), {
|
|
1589
1556
|
size: 14,
|
|
1590
1557
|
"stroke-width": 1.5
|
|
1591
|
-
}),
|
|
1558
|
+
}), L(" " + P(m(i).image.browseMedia), 1)], 8, Pi)) : (s(), b("span", Fi, P(m(i).image.clickToAdd), 1))]))], 12, Ti));
|
|
1592
1559
|
}
|
|
1593
|
-
}),
|
|
1560
|
+
}), Li = { class: "tpl:w-full" }, Ri = ["href"], zi = {
|
|
1594
1561
|
key: 1,
|
|
1595
1562
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
1596
|
-
},
|
|
1563
|
+
}, Bi = /* @__PURE__ */ d({
|
|
1597
1564
|
__name: "MenuBlock",
|
|
1598
1565
|
props: {
|
|
1599
1566
|
block: {},
|
|
1600
1567
|
viewport: {}
|
|
1601
1568
|
},
|
|
1602
1569
|
setup(e) {
|
|
1603
|
-
let t = e, { t: n } =
|
|
1570
|
+
let t = e, { t: n } = X(), i = K(Y, "MenuBlock"), a = y(() => ({
|
|
1604
1571
|
display: "flex",
|
|
1605
1572
|
flexWrap: "wrap",
|
|
1606
1573
|
gap: `0 ${t.block.spacing}px`,
|
|
1607
1574
|
justifyContent: t.block.textAlign === "left" ? "flex-start" : t.block.textAlign === "right" ? "flex-end" : "center",
|
|
1608
1575
|
fontSize: `${t.block.fontSize}px`,
|
|
1609
|
-
fontFamily: t.block.fontFamily
|
|
1576
|
+
fontFamily: t.block.fontFamily ? i.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1610
1577
|
alignItems: "center"
|
|
1611
|
-
})),
|
|
1612
|
-
function
|
|
1578
|
+
})), o = y(() => t.block.items.length > 0);
|
|
1579
|
+
function c(e) {
|
|
1613
1580
|
return e || t.block.linkColor || t.block.color;
|
|
1614
1581
|
}
|
|
1615
|
-
return (t,
|
|
1582
|
+
return (t, i) => (s(), b("div", Li, [o.value ? (s(), b("div", {
|
|
1616
1583
|
key: 0,
|
|
1617
|
-
style:
|
|
1618
|
-
}, [(s(!0),
|
|
1584
|
+
style: E(a.value)
|
|
1585
|
+
}, [(s(!0), b(N, null, r(e.block.items, (t, n) => (s(), b(N, { key: t.id }, [O("a", {
|
|
1619
1586
|
href: t.url || "#",
|
|
1620
1587
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1621
|
-
style:
|
|
1622
|
-
color:
|
|
1588
|
+
style: E({
|
|
1589
|
+
color: c(t.color),
|
|
1623
1590
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1624
1591
|
textDecoration: t.underline ? "underline" : "none"
|
|
1625
1592
|
}),
|
|
1626
|
-
onClick:
|
|
1627
|
-
}, [
|
|
1593
|
+
onClick: i[0] ||= T(() => {}, ["prevent"])
|
|
1594
|
+
}, [h(Br, { text: t.text || "..." }, null, 8, ["text"])], 12, Ri), n < e.block.items.length - 1 ? (s(), b("span", {
|
|
1628
1595
|
key: 0,
|
|
1629
|
-
style:
|
|
1596
|
+
style: E({
|
|
1630
1597
|
color: e.block.separatorColor,
|
|
1631
1598
|
padding: `0 ${e.block.spacing}px`
|
|
1632
1599
|
})
|
|
1633
|
-
},
|
|
1600
|
+
}, P(e.block.separator), 5)) : x("", !0)], 64))), 128))], 4)) : (s(), b("div", zi, [h(m(yn), { size: 16 }), O("span", null, P(m(n).menu.addLinks), 1)]))]));
|
|
1634
1601
|
}
|
|
1635
|
-
}),
|
|
1602
|
+
}), Vi = /* @__PURE__ */ new Set([
|
|
1636
1603
|
"http",
|
|
1637
1604
|
"https",
|
|
1638
1605
|
"mailto",
|
|
@@ -1642,7 +1609,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1642
1609
|
"sms",
|
|
1643
1610
|
"xmpp",
|
|
1644
1611
|
"cid"
|
|
1645
|
-
]),
|
|
1612
|
+
]), Hi = /* @__PURE__ */ new Set([
|
|
1646
1613
|
"SCRIPT",
|
|
1647
1614
|
"STYLE",
|
|
1648
1615
|
"IFRAME",
|
|
@@ -1652,7 +1619,7 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1652
1619
|
"META",
|
|
1653
1620
|
"BASE",
|
|
1654
1621
|
"FORM"
|
|
1655
|
-
]),
|
|
1622
|
+
]), Ui = /* @__PURE__ */ new Set([
|
|
1656
1623
|
"href",
|
|
1657
1624
|
"xlink:href",
|
|
1658
1625
|
"formaction",
|
|
@@ -1661,16 +1628,16 @@ var Kr = { class: "tpl:w-full" }, qr = {
|
|
|
1661
1628
|
"background",
|
|
1662
1629
|
"poster"
|
|
1663
1630
|
]);
|
|
1664
|
-
function
|
|
1631
|
+
function Wi(e, t) {
|
|
1665
1632
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1666
1633
|
if (!n || n.startsWith("#")) return !0;
|
|
1667
1634
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1668
1635
|
if (!r) return !0;
|
|
1669
1636
|
let i = r[1].toLowerCase();
|
|
1670
|
-
return
|
|
1637
|
+
return Vi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1671
1638
|
}
|
|
1672
|
-
function
|
|
1673
|
-
if (
|
|
1639
|
+
function Gi(e) {
|
|
1640
|
+
if (Hi.has(e.tagName)) {
|
|
1674
1641
|
e.remove();
|
|
1675
1642
|
return;
|
|
1676
1643
|
}
|
|
@@ -1678,21 +1645,21 @@ function Ai(e) {
|
|
|
1678
1645
|
for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
|
|
1679
1646
|
for (let n of t) {
|
|
1680
1647
|
let t = n.toLowerCase();
|
|
1681
|
-
t.startsWith("on") ? e.removeAttribute(n) :
|
|
1648
|
+
t.startsWith("on") ? e.removeAttribute(n) : Ui.has(t) ? Wi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n) : t === "src" ? Wi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n) : t === "srcdoc" && e.removeAttribute(n);
|
|
1682
1649
|
}
|
|
1683
1650
|
let n = Array.from(e.children);
|
|
1684
|
-
for (let e of n)
|
|
1651
|
+
for (let e of n) Gi(e);
|
|
1685
1652
|
}
|
|
1686
|
-
function
|
|
1653
|
+
function Ki(e) {
|
|
1687
1654
|
if (typeof DOMParser > "u") return e;
|
|
1688
1655
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1689
|
-
for (let e of n)
|
|
1656
|
+
for (let e of n) Gi(e);
|
|
1690
1657
|
return t.innerHTML;
|
|
1691
1658
|
}
|
|
1692
1659
|
//#endregion
|
|
1693
1660
|
//#region src/composables/useEditableTextBlock.ts
|
|
1694
|
-
function
|
|
1695
|
-
let t = n(
|
|
1661
|
+
function qi(e) {
|
|
1662
|
+
let t = n(q, xt), r = n(jt, null), { syntax: i } = Mn(), a = y(() => r?.value ? Ee(e(), t.value) : Ne(e(), t.value)), o = y(() => He(Ki(Le(a.value, i)))), s = l(!1), c = l(null), { top: u, left: d } = ht(c), { toLocal: f } = un(), p = y(() => f({
|
|
1696
1663
|
top: u.value - 8,
|
|
1697
1664
|
left: d.value
|
|
1698
1665
|
}));
|
|
@@ -1713,52 +1680,52 @@ function Mi(e) {
|
|
|
1713
1680
|
}
|
|
1714
1681
|
//#endregion
|
|
1715
1682
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1716
|
-
var
|
|
1683
|
+
var Ji = ["innerHTML"], Yi = /* @__PURE__ */ d({
|
|
1717
1684
|
__name: "ParagraphBlock",
|
|
1718
1685
|
props: {
|
|
1719
1686
|
block: {},
|
|
1720
1687
|
viewport: {}
|
|
1721
1688
|
},
|
|
1722
1689
|
setup(e) {
|
|
1723
|
-
let t = e, n =
|
|
1724
|
-
return (t, u) => (s(),
|
|
1690
|
+
let t = e, n = I(() => import("./ParagraphEditor-D4aq9eeC.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = qi(() => t.block.content);
|
|
1691
|
+
return (t, u) => (s(), b("div", {
|
|
1725
1692
|
ref_key: "blockRef",
|
|
1726
1693
|
ref: i,
|
|
1727
1694
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1728
|
-
onDblclick: u[0] ||= (...e) =>
|
|
1729
|
-
}, [
|
|
1695
|
+
onDblclick: u[0] ||= (...e) => m(c) && m(c)(...e)
|
|
1696
|
+
}, [m(r) ? (s(), D(m(n), {
|
|
1730
1697
|
key: 0,
|
|
1731
1698
|
block: e.block,
|
|
1732
|
-
"toolbar-position":
|
|
1733
|
-
onDone:
|
|
1699
|
+
"toolbar-position": m(a),
|
|
1700
|
+
onDone: m(l)
|
|
1734
1701
|
}, null, 8, [
|
|
1735
1702
|
"block",
|
|
1736
1703
|
"toolbar-position",
|
|
1737
1704
|
"onDone"
|
|
1738
|
-
])) : (s(),
|
|
1705
|
+
])) : (s(), b("div", {
|
|
1739
1706
|
key: 1,
|
|
1740
1707
|
class: "tpl-text-content tpl:outline-none",
|
|
1741
|
-
innerHTML:
|
|
1742
|
-
}, null, 8,
|
|
1708
|
+
innerHTML: m(o)
|
|
1709
|
+
}, null, 8, Ji))], 544));
|
|
1743
1710
|
}
|
|
1744
|
-
}),
|
|
1711
|
+
}), Xi = [
|
|
1745
1712
|
"data-block-id",
|
|
1746
1713
|
"data-block-type",
|
|
1747
1714
|
"data-tpl-picked"
|
|
1748
|
-
],
|
|
1715
|
+
], Zi = ["aria-label"], Qi = [
|
|
1749
1716
|
"aria-label",
|
|
1750
1717
|
"aria-pressed",
|
|
1751
1718
|
"title"
|
|
1752
|
-
],
|
|
1719
|
+
], $i = ["aria-label", "title"], ea = ["aria-label", "title"], ta = ["aria-label", "title"], na = {
|
|
1753
1720
|
key: 1,
|
|
1754
1721
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
1755
|
-
},
|
|
1722
|
+
}, ra = { 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)]" }, ia = {
|
|
1756
1723
|
key: 2,
|
|
1757
1724
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1758
|
-
},
|
|
1725
|
+
}, aa = ["aria-label", "title"], oa = {
|
|
1759
1726
|
key: 3,
|
|
1760
1727
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1761
|
-
},
|
|
1728
|
+
}, sa = ["aria-label"], ca = /*#__PURE__*/ An(/* @__PURE__ */ d({
|
|
1762
1729
|
__name: "BlockWrapper",
|
|
1763
1730
|
props: {
|
|
1764
1731
|
block: {},
|
|
@@ -1770,35 +1737,38 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1770
1737
|
},
|
|
1771
1738
|
emits: ["select"],
|
|
1772
1739
|
setup(e, { emit: t }) {
|
|
1773
|
-
let r =
|
|
1774
|
-
async function
|
|
1775
|
-
await
|
|
1740
|
+
let r = I(() => import("./BlockIssueBadge-C7sdnkrF.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);
|
|
1741
|
+
async function v() {
|
|
1742
|
+
await w(), f.value?.focus();
|
|
1776
1743
|
}
|
|
1777
|
-
function
|
|
1778
|
-
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(),
|
|
1744
|
+
function S(e) {
|
|
1745
|
+
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())));
|
|
1779
1746
|
}
|
|
1780
|
-
let C =
|
|
1747
|
+
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 ? {
|
|
1781
1748
|
desktop: c.viewport.desktop,
|
|
1782
1749
|
mobile: c.viewport.mobile
|
|
1783
|
-
}[i.viewport] ?? i.viewport : ""), A =
|
|
1784
|
-
|
|
1750
|
+
}[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 = Xe(() => i.block.type === "section" ? i.block.backgroundImage : void 0), H = Xe(() => i.block.type === "section" ? i.block.wrapper?.backgroundImage : void 0), ee = n(J, null), U = n(vt, void 0), W = y(() => Pr(i.block, {
|
|
1751
|
+
backgroundImageUrl: V.value,
|
|
1752
|
+
heroBoxWidth: Qe(i.block, ee?.content.value, U)
|
|
1753
|
+
})), te = y(() => Lr(i.block, { backgroundImageUrl: H.value }));
|
|
1754
|
+
function ne(e) {
|
|
1785
1755
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
|
|
1786
1756
|
}
|
|
1787
|
-
function
|
|
1757
|
+
function re() {
|
|
1788
1758
|
j?.deleteBlock(i.block.id);
|
|
1789
1759
|
}
|
|
1790
|
-
function
|
|
1760
|
+
function ie() {
|
|
1791
1761
|
j?.duplicateBlock(i.block);
|
|
1792
1762
|
}
|
|
1793
|
-
function
|
|
1763
|
+
function ae() {
|
|
1794
1764
|
N.savedBlocks?.startPicking(i.block.id);
|
|
1795
1765
|
}
|
|
1796
|
-
function
|
|
1766
|
+
function oe() {
|
|
1797
1767
|
M?.toggleBlock(i.block.id);
|
|
1798
1768
|
}
|
|
1799
|
-
return (t, n) =>
|
|
1769
|
+
return (t, n) => D.value ? x("", !0) : (s(), b("div", {
|
|
1800
1770
|
key: 0,
|
|
1801
|
-
class:
|
|
1771
|
+
class: _(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
1802
1772
|
"tpl-block--selected": e.isSelected,
|
|
1803
1773
|
"tpl-block--picked": e.picked,
|
|
1804
1774
|
"tpl-block--idle": !e.isSelected && !e.picked,
|
|
@@ -1807,151 +1777,192 @@ var Ni = ["innerHTML"], Pi = /* @__PURE__ */ d({
|
|
|
1807
1777
|
"data-block-id": e.block.id,
|
|
1808
1778
|
"data-block-type": e.block.type,
|
|
1809
1779
|
"data-tpl-picked": e.picked || void 0,
|
|
1810
|
-
onClick:
|
|
1780
|
+
onClick: ne
|
|
1811
1781
|
}, [
|
|
1812
|
-
|
|
1813
|
-
z.value ? (s(),
|
|
1782
|
+
h(m(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1783
|
+
z.value ? (s(), b("div", {
|
|
1814
1784
|
key: 0,
|
|
1815
1785
|
role: "toolbar",
|
|
1816
|
-
"aria-label":
|
|
1786
|
+
"aria-label": m(c).blockActions.drag,
|
|
1817
1787
|
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)]"
|
|
1818
1788
|
}, [
|
|
1819
|
-
|
|
1789
|
+
O("button", {
|
|
1820
1790
|
ref_key: "dragButtonRef",
|
|
1821
1791
|
ref: f,
|
|
1822
1792
|
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",
|
|
1823
|
-
"aria-label":
|
|
1793
|
+
"aria-label": g.value,
|
|
1824
1794
|
"aria-pressed": p.value,
|
|
1825
1795
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1826
|
-
title:
|
|
1827
|
-
onKeydown:
|
|
1828
|
-
}, [
|
|
1796
|
+
title: m(c).blockActions.drag,
|
|
1797
|
+
onKeydown: S
|
|
1798
|
+
}, [h(m(bn), {
|
|
1829
1799
|
size: 14,
|
|
1830
1800
|
"stroke-width": 1.5
|
|
1831
|
-
})], 40,
|
|
1832
|
-
|
|
1801
|
+
})], 40, Qi),
|
|
1802
|
+
O("button", {
|
|
1833
1803
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
1834
|
-
"aria-label":
|
|
1835
|
-
title:
|
|
1836
|
-
onClick:
|
|
1837
|
-
}, [
|
|
1804
|
+
"aria-label": m(c).blockActions.duplicate,
|
|
1805
|
+
title: m(c).blockActions.duplicate,
|
|
1806
|
+
onClick: T(ie, ["stop"])
|
|
1807
|
+
}, [h(m(gn), {
|
|
1838
1808
|
size: 14,
|
|
1839
1809
|
"stroke-width": 1.5
|
|
1840
|
-
})], 8,
|
|
1841
|
-
|
|
1810
|
+
})], 8, $i),
|
|
1811
|
+
R.value ? (s(), b("button", {
|
|
1842
1812
|
key: 0,
|
|
1843
1813
|
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
|
-
}, [
|
|
1814
|
+
"aria-label": m(c).blockActions.saveAsBlock,
|
|
1815
|
+
title: m(c).blockActions.saveAsBlock,
|
|
1816
|
+
onClick: T(ae, ["stop"])
|
|
1817
|
+
}, [h(m(hn), {
|
|
1848
1818
|
size: 14,
|
|
1849
1819
|
"stroke-width": 1.5
|
|
1850
|
-
})], 8,
|
|
1851
|
-
|
|
1820
|
+
})], 8, ea)) : x("", !0),
|
|
1821
|
+
O("button", {
|
|
1852
1822
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
1853
|
-
"aria-label":
|
|
1854
|
-
title:
|
|
1855
|
-
onClick:
|
|
1856
|
-
}, [
|
|
1823
|
+
"aria-label": m(c).blockActions.delete,
|
|
1824
|
+
title: m(c).blockActions.delete,
|
|
1825
|
+
onClick: T(re, ["stop"])
|
|
1826
|
+
}, [h(m(Cn), {
|
|
1857
1827
|
size: 14,
|
|
1858
1828
|
"stroke-width": 1.5
|
|
1859
|
-
})], 8,
|
|
1860
|
-
], 8,
|
|
1861
|
-
C.value ? (s(),
|
|
1829
|
+
})], 8, ta)
|
|
1830
|
+
], 8, Zi)) : x("", !0),
|
|
1831
|
+
C.value ? (s(), b("div", na, [O("span", ra, [h(m(mn), {
|
|
1862
1832
|
size: 12,
|
|
1863
1833
|
"stroke-width": 1.5
|
|
1864
|
-
}),
|
|
1865
|
-
A.value && !C.value ? (s(),
|
|
1834
|
+
}), L(" " + P(m(u)(m(c).blockActions.hiddenOnViewport, { viewport: k.value })), 1)])])) : x("", !0),
|
|
1835
|
+
A.value && !C.value ? (s(), b("div", ia, [O("button", {
|
|
1866
1836
|
"data-testid": "condition-toggle",
|
|
1867
1837
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
1868
|
-
"aria-label":
|
|
1838
|
+
"aria-label": m(c).blockActions.conditionToggle,
|
|
1869
1839
|
title: e.block.displayCondition?.label,
|
|
1870
|
-
onClick:
|
|
1871
|
-
}, [
|
|
1840
|
+
onClick: T(oe, ["stop"])
|
|
1841
|
+
}, [h(m(xn), {
|
|
1872
1842
|
size: 12,
|
|
1873
1843
|
"stroke-width": 2
|
|
1874
|
-
})], 8,
|
|
1875
|
-
B.value > 0 && !C.value ? (s(),
|
|
1844
|
+
})], 8, aa)])) : x("", !0),
|
|
1845
|
+
B.value > 0 && !C.value ? (s(), b("div", oa, [O("button", {
|
|
1876
1846
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
1877
|
-
"aria-label":
|
|
1878
|
-
onClick: n[0] ||=
|
|
1879
|
-
}, [
|
|
1847
|
+
"aria-label": m(u)(m(c).blockActions.comments, { count: String(B.value) }),
|
|
1848
|
+
onClick: n[0] ||= T((t) => m(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
1849
|
+
}, [h(m(En), {
|
|
1880
1850
|
size: 12,
|
|
1881
1851
|
"stroke-width": 2.5
|
|
1882
|
-
}),
|
|
1883
|
-
|
|
1852
|
+
}), L(" " + P(B.value), 1)], 8, sa)])) : x("", !0),
|
|
1853
|
+
te.value ? (s(), b("div", {
|
|
1884
1854
|
key: 4,
|
|
1885
|
-
class: "tpl-section-wrapper",
|
|
1886
|
-
style:
|
|
1887
|
-
}, [
|
|
1888
|
-
class: "tpl-block-content",
|
|
1889
|
-
style:
|
|
1890
|
-
}, [a(t.$slots, "default", {}, void 0, !0)],
|
|
1855
|
+
class: _(["tpl-section-wrapper tpl-email-surface", m(Ar)(te.value)]),
|
|
1856
|
+
style: E(te.value)
|
|
1857
|
+
}, [O("div", {
|
|
1858
|
+
class: _(["tpl-block-content tpl-email-surface", m(Ar)(W.value)]),
|
|
1859
|
+
style: E(W.value)
|
|
1860
|
+
}, [a(t.$slots, "default", {}, void 0, !0)], 6)], 6)) : (s(), b("div", {
|
|
1891
1861
|
key: 5,
|
|
1892
|
-
class: "tpl-block-content",
|
|
1893
|
-
style:
|
|
1894
|
-
}, [a(t.$slots, "default", {}, void 0, !0)],
|
|
1895
|
-
], 10,
|
|
1862
|
+
class: _(["tpl-block-content tpl-email-surface", m(Ar)(W.value)]),
|
|
1863
|
+
style: E(W.value)
|
|
1864
|
+
}, [a(t.$slots, "default", {}, void 0, !0)], 6))
|
|
1865
|
+
], 10, Xi));
|
|
1896
1866
|
}
|
|
1897
|
-
}), [["__scopeId", "data-v-
|
|
1867
|
+
}), [["__scopeId", "data-v-254ef206"]]);
|
|
1898
1868
|
//#endregion
|
|
1899
1869
|
//#region src/utils/unwrapParagraph.ts
|
|
1900
|
-
function
|
|
1870
|
+
function la(e) {
|
|
1901
1871
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1902
1872
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1903
1873
|
}
|
|
1904
1874
|
//#endregion
|
|
1905
1875
|
//#region src/components/blocks/TitleBlock.vue
|
|
1906
|
-
var
|
|
1876
|
+
var ua = /* @__PURE__ */ d({
|
|
1907
1877
|
__name: "TitleBlock",
|
|
1908
1878
|
props: {
|
|
1909
1879
|
block: {},
|
|
1910
1880
|
viewport: {}
|
|
1911
1881
|
},
|
|
1912
1882
|
setup(e) {
|
|
1913
|
-
let t = e, n =
|
|
1883
|
+
let t = e, n = I(() => import("./TitleEditor-CsZiG3TT.js")), r = K(Y, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: c, handleDoubleClick: l, handleEditorDone: d } = qi(() => t.block.content), f = y(() => {
|
|
1914
1884
|
let e = {
|
|
1915
|
-
fontSize: `${
|
|
1885
|
+
fontSize: `${z[t.block.level]}px`,
|
|
1886
|
+
lineHeight: String(oe),
|
|
1887
|
+
fontWeight: "700",
|
|
1916
1888
|
textAlign: t.block.textAlign
|
|
1917
1889
|
};
|
|
1918
|
-
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1919
|
-
}),
|
|
1920
|
-
return (t,
|
|
1890
|
+
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
1891
|
+
}), p = y(() => `h${t.block.level}`), h = y(() => la(c.value));
|
|
1892
|
+
return (t, r) => (s(), b("div", {
|
|
1921
1893
|
ref_key: "blockRef",
|
|
1922
|
-
ref:
|
|
1894
|
+
ref: a,
|
|
1923
1895
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1924
|
-
style:
|
|
1925
|
-
onDblclick:
|
|
1926
|
-
}, [
|
|
1896
|
+
style: E(f.value),
|
|
1897
|
+
onDblclick: r[0] ||= (...e) => m(l) && m(l)(...e)
|
|
1898
|
+
}, [m(i) ? (s(), D(m(n), {
|
|
1927
1899
|
key: 0,
|
|
1928
1900
|
block: e.block,
|
|
1929
|
-
"toolbar-position":
|
|
1930
|
-
onDone:
|
|
1901
|
+
"toolbar-position": m(o),
|
|
1902
|
+
onDone: m(d)
|
|
1931
1903
|
}, null, 8, [
|
|
1932
1904
|
"block",
|
|
1933
1905
|
"toolbar-position",
|
|
1934
1906
|
"onDone"
|
|
1935
|
-
])) : (s(),
|
|
1907
|
+
])) : (s(), D(u(p.value), {
|
|
1936
1908
|
key: 1,
|
|
1937
|
-
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-
|
|
1938
|
-
style: {
|
|
1939
|
-
|
|
1909
|
+
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
1910
|
+
style: {
|
|
1911
|
+
color: "inherit",
|
|
1912
|
+
fontWeight: "inherit"
|
|
1913
|
+
},
|
|
1914
|
+
innerHTML: h.value
|
|
1940
1915
|
}, null, 8, ["innerHTML"]))], 36));
|
|
1941
1916
|
}
|
|
1942
|
-
});
|
|
1917
|
+
}), da = "hero", fa = "#1f2937", pa = "#ffffff";
|
|
1918
|
+
function ma(e, t) {
|
|
1919
|
+
let n = Ae("title", e);
|
|
1920
|
+
n.color = pa, n.textAlign = "center";
|
|
1921
|
+
let r = Ae("paragraph", e);
|
|
1922
|
+
r.content = `<p style="text-align: center"><span style="color: ${pa}">${ha(t)}</span></p>`;
|
|
1923
|
+
let i = Ae("button", e);
|
|
1924
|
+
return i.align = "center", B({
|
|
1925
|
+
columns: "1",
|
|
1926
|
+
children: [[
|
|
1927
|
+
n,
|
|
1928
|
+
r,
|
|
1929
|
+
i
|
|
1930
|
+
]],
|
|
1931
|
+
hero: {
|
|
1932
|
+
height: "image",
|
|
1933
|
+
verticalAlign: "middle"
|
|
1934
|
+
},
|
|
1935
|
+
styles: {
|
|
1936
|
+
padding: {
|
|
1937
|
+
top: 48,
|
|
1938
|
+
right: 24,
|
|
1939
|
+
bottom: 48,
|
|
1940
|
+
left: 24
|
|
1941
|
+
},
|
|
1942
|
+
backgroundColor: fa
|
|
1943
|
+
}
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
function ha(e) {
|
|
1947
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1948
|
+
}
|
|
1943
1949
|
//#endregion
|
|
1944
1950
|
//#region src/utils/sectionColumnDrop.ts
|
|
1945
|
-
|
|
1946
|
-
|
|
1951
|
+
var ga = /* @__PURE__ */ new Set(["section", da]);
|
|
1952
|
+
function _a(e) {
|
|
1953
|
+
return e.dataset.blockType !== "section" && !ga.has(e.dataset.paletteType ?? "");
|
|
1947
1954
|
}
|
|
1948
1955
|
//#endregion
|
|
1949
1956
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1950
|
-
var
|
|
1957
|
+
var va = { class: "tpl:relative tpl:w-full" }, ya = {
|
|
1958
|
+
key: 0,
|
|
1959
|
+
"data-testid": "hero-image-hint",
|
|
1960
|
+
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)]"
|
|
1961
|
+
}, ba = {
|
|
1951
1962
|
key: 0,
|
|
1952
1963
|
"data-testid": "section-drop-hint",
|
|
1953
1964
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
1954
|
-
},
|
|
1965
|
+
}, xa = /* @__PURE__ */ d({
|
|
1955
1966
|
__name: "SectionBlock",
|
|
1956
1967
|
props: {
|
|
1957
1968
|
block: {},
|
|
@@ -1959,18 +1970,18 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
1959
1970
|
},
|
|
1960
1971
|
setup(e) {
|
|
1961
1972
|
let t = {
|
|
1962
|
-
title:
|
|
1963
|
-
paragraph:
|
|
1964
|
-
image:
|
|
1965
|
-
button:
|
|
1966
|
-
divider:
|
|
1967
|
-
custom:
|
|
1968
|
-
}, a = e, { t: o } =
|
|
1969
|
-
function
|
|
1970
|
-
let t =
|
|
1973
|
+
title: ua,
|
|
1974
|
+
paragraph: Yi,
|
|
1975
|
+
image: Ii,
|
|
1976
|
+
button: Hr,
|
|
1977
|
+
divider: vi,
|
|
1978
|
+
custom: gi
|
|
1979
|
+
}, a = e, { t: o } = X(), c = K(J, "SectionBlock"), d = n(Wt, null), p = n(tn, null), g = n(Jt, {}), v = n(en, null);
|
|
1980
|
+
function S(e) {
|
|
1981
|
+
let t = g.savedBlocks;
|
|
1971
1982
|
t?.isPicking.value ? t.togglePick(a.block.id) : c.selectBlock(e);
|
|
1972
1983
|
}
|
|
1973
|
-
let C =
|
|
1984
|
+
let C = y(() => {
|
|
1974
1985
|
switch (a.block.columns) {
|
|
1975
1986
|
case "2": return ["50%", "50%"];
|
|
1976
1987
|
case "3": return [
|
|
@@ -1982,54 +1993,59 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
1982
1993
|
case "2-1": return ["66.67%", "33.33%"];
|
|
1983
1994
|
default: return ["100%"];
|
|
1984
1995
|
}
|
|
1985
|
-
}), w =
|
|
1996
|
+
}), w = y(() => {
|
|
1986
1997
|
let e = C.value.length, t = [...a.block.children];
|
|
1987
1998
|
for (; t.length < e;) t.push([]);
|
|
1988
1999
|
return t.slice(0, e);
|
|
1989
|
-
}), T =
|
|
1990
|
-
function
|
|
2000
|
+
}), T = y(() => a.viewport === "mobile" && a.block.stackOnMobile !== !1);
|
|
2001
|
+
function k(e) {
|
|
1991
2002
|
return w.value[e] || [];
|
|
1992
2003
|
}
|
|
1993
2004
|
function A(e) {
|
|
1994
|
-
return
|
|
2005
|
+
return v?.value === !1 || !d?.isHidden(e);
|
|
1995
2006
|
}
|
|
1996
|
-
function
|
|
1997
|
-
return !
|
|
2007
|
+
function F(e) {
|
|
2008
|
+
return !k(e).some((e) => A(e.id));
|
|
1998
2009
|
}
|
|
1999
2010
|
let I = l(null);
|
|
2000
2011
|
function L(e) {
|
|
2001
|
-
return c.state.previewMode ? !1 :
|
|
2002
|
-
}
|
|
2003
|
-
function R(e) {
|
|
2004
|
-
return E(e).length === 0 && !c.state.previewMode;
|
|
2012
|
+
return c.state.previewMode ? !1 : F(e) ? !0 : I.value === e && k(e).filter((e) => A(e.id)).length <= 1;
|
|
2005
2013
|
}
|
|
2014
|
+
let R = y(() => {
|
|
2015
|
+
if (c.state.previewMode) return !1;
|
|
2016
|
+
let e = pe(a.block);
|
|
2017
|
+
return e !== null && !e.applied && e.reason === "image";
|
|
2018
|
+
});
|
|
2006
2019
|
function z(e) {
|
|
2007
|
-
return
|
|
2020
|
+
return k(e).length === 0 && !c.state.previewMode;
|
|
2021
|
+
}
|
|
2022
|
+
function B(e) {
|
|
2023
|
+
return k(e).length === 0 && c.state.previewMode;
|
|
2008
2024
|
}
|
|
2009
|
-
function
|
|
2025
|
+
function V(e, t) {
|
|
2010
2026
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
|
|
2011
2027
|
for (; r.length <= e;) r.push([]);
|
|
2012
2028
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
2013
2029
|
}
|
|
2014
|
-
function
|
|
2015
|
-
return
|
|
2030
|
+
function H(e) {
|
|
2031
|
+
return Er(e, p, t);
|
|
2016
2032
|
}
|
|
2017
|
-
function
|
|
2033
|
+
function ee(e, t) {
|
|
2018
2034
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
2019
2035
|
fieldValues: t.fieldValues,
|
|
2020
2036
|
dataSourceFetched: t.dataSourceFetched
|
|
2021
2037
|
});
|
|
2022
2038
|
}
|
|
2023
|
-
return (t, n) => (s(),
|
|
2039
|
+
return (t, n) => (s(), b("div", va, [R.value ? (s(), b("div", ya, [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", {
|
|
2024
2040
|
key: a,
|
|
2025
|
-
class:
|
|
2026
|
-
style:
|
|
2027
|
-
}, [
|
|
2028
|
-
"model-value":
|
|
2041
|
+
class: _(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", z(a) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2042
|
+
style: E({ width: T.value ? "100%" : C.value[a] })
|
|
2043
|
+
}, [h(m(M), {
|
|
2044
|
+
"model-value": k(a),
|
|
2029
2045
|
group: {
|
|
2030
2046
|
name: "blocks",
|
|
2031
2047
|
pull: !0,
|
|
2032
|
-
put: (e, t, n) =>
|
|
2048
|
+
put: (e, t, n) => m(_a)(n)
|
|
2033
2049
|
},
|
|
2034
2050
|
animation: 150,
|
|
2035
2051
|
"ghost-class": "tpl-ghost",
|
|
@@ -2039,27 +2055,27 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2039
2055
|
"inverted-swap-threshold": .65,
|
|
2040
2056
|
"empty-insert-threshold": 20,
|
|
2041
2057
|
"force-fallback": !0,
|
|
2042
|
-
class:
|
|
2058
|
+
class: _(["tpl:grow", {
|
|
2043
2059
|
"tpl:min-h-[60px]": L(a),
|
|
2044
|
-
"tpl:min-h-[34px]":
|
|
2060
|
+
"tpl:min-h-[34px]": B(a)
|
|
2045
2061
|
}]),
|
|
2046
2062
|
onStart: (e) => I.value = a,
|
|
2047
2063
|
onEnd: n[0] ||= (e) => I.value = null,
|
|
2048
|
-
"onUpdate:modelValue": (e) =>
|
|
2064
|
+
"onUpdate:modelValue": (e) => V(a, e)
|
|
2049
2065
|
}, {
|
|
2050
|
-
default: i(() => [(s(!0),
|
|
2066
|
+
default: i(() => [(s(!0), b(N, null, r(k(a), (t) => f((s(), b("div", { key: t.id }, [h(ca, {
|
|
2051
2067
|
block: t,
|
|
2052
|
-
"is-selected":
|
|
2068
|
+
"is-selected": m(c).state.selectedBlockId === t.id,
|
|
2053
2069
|
viewport: e.viewport,
|
|
2054
|
-
"preview-mode":
|
|
2070
|
+
"preview-mode": m(c).state.previewMode,
|
|
2055
2071
|
nested: "",
|
|
2056
|
-
onSelect: (e) =>
|
|
2072
|
+
onSelect: (e) => S(t.id)
|
|
2057
2073
|
}, {
|
|
2058
|
-
default: i(() => [(s(),
|
|
2074
|
+
default: i(() => [(s(), D(u(H(t)), {
|
|
2059
2075
|
block: t,
|
|
2060
2076
|
viewport: e.viewport,
|
|
2061
|
-
onFetchData: (e) =>
|
|
2062
|
-
onUpdate: (e) =>
|
|
2077
|
+
onFetchData: (e) => ee(t, e),
|
|
2078
|
+
onUpdate: (e) => m(c).updateBlock(t.id, e)
|
|
2063
2079
|
}, null, 40, [
|
|
2064
2080
|
"block",
|
|
2065
2081
|
"viewport",
|
|
@@ -2073,7 +2089,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2073
2089
|
"viewport",
|
|
2074
2090
|
"preview-mode",
|
|
2075
2091
|
"onSelect"
|
|
2076
|
-
])])), [[
|
|
2092
|
+
])])), [[j, A(t.id)]])), 128))]),
|
|
2077
2093
|
_: 2
|
|
2078
2094
|
}, 1032, [
|
|
2079
2095
|
"model-value",
|
|
@@ -2081,14 +2097,14 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2081
2097
|
"class",
|
|
2082
2098
|
"onStart",
|
|
2083
2099
|
"onUpdate:modelValue"
|
|
2084
|
-
]),
|
|
2100
|
+
]), z(a) ? (s(), b("div", ba, [O("span", null, P(m(o).section.dropHere), 1)])) : x("", !0)], 6))), 128))], 2)]));
|
|
2085
2101
|
}
|
|
2086
|
-
}),
|
|
2102
|
+
}), Sa = ["width", "height"], Ca = [
|
|
2087
2103
|
"d",
|
|
2088
2104
|
"stroke",
|
|
2089
2105
|
"stroke-opacity",
|
|
2090
2106
|
"stroke-width"
|
|
2091
|
-
],
|
|
2107
|
+
], wa = ["d", "fill"], Ta = /* @__PURE__ */ d({
|
|
2092
2108
|
__name: "SocialIconSvg",
|
|
2093
2109
|
props: {
|
|
2094
2110
|
platform: {},
|
|
@@ -2097,7 +2113,7 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2097
2113
|
iconSize: {}
|
|
2098
2114
|
},
|
|
2099
2115
|
setup(e) {
|
|
2100
|
-
let t = e, n =
|
|
2116
|
+
let t = e, n = y(() => rt[t.platform]), r = y(() => at[t.iconSize]), i = y(() => Ve(t.platform, t.iconTone)), a = y(() => Se(t.iconStyle, t.iconTone)), o = y(() => {
|
|
2101
2117
|
let e = {
|
|
2102
2118
|
display: "inline-flex",
|
|
2103
2119
|
alignItems: "center",
|
|
@@ -2135,19 +2151,19 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2135
2151
|
};
|
|
2136
2152
|
default: return e;
|
|
2137
2153
|
}
|
|
2138
|
-
}), c =
|
|
2154
|
+
}), c = y(() => Ue(t.iconStyle)), l = y(() => Math.floor(r.value * c.value));
|
|
2139
2155
|
function u(e) {
|
|
2140
2156
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2141
2157
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
2142
2158
|
}
|
|
2143
|
-
let d =
|
|
2144
|
-
return (e, t) => (s(),
|
|
2159
|
+
let d = y(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
|
|
2160
|
+
return (e, t) => (s(), b("span", { style: E(o.value) }, [(s(), b("svg", {
|
|
2145
2161
|
width: l.value,
|
|
2146
2162
|
height: l.value,
|
|
2147
2163
|
viewBox: "0 0 24 24",
|
|
2148
2164
|
overflow: "visible",
|
|
2149
2165
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2150
|
-
}, [a.value ? (s(),
|
|
2166
|
+
}, [a.value ? (s(), b("path", {
|
|
2151
2167
|
key: 0,
|
|
2152
2168
|
"data-testid": "social-icon-halo",
|
|
2153
2169
|
d: n.value.path,
|
|
@@ -2156,36 +2172,36 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2156
2172
|
"stroke-opacity": a.value.opacity,
|
|
2157
2173
|
"stroke-width": a.value.width / c.value,
|
|
2158
2174
|
"stroke-linejoin": "round"
|
|
2159
|
-
}, null, 8,
|
|
2175
|
+
}, null, 8, Ca)) : x("", !0), O("path", {
|
|
2160
2176
|
d: n.value.path,
|
|
2161
2177
|
fill: d.value
|
|
2162
|
-
}, null, 8,
|
|
2178
|
+
}, null, 8, wa)], 8, Sa))], 4));
|
|
2163
2179
|
}
|
|
2164
|
-
}),
|
|
2180
|
+
}), Ea = { class: "tpl:w-full" }, Da = ["href"], Oa = {
|
|
2165
2181
|
key: 1,
|
|
2166
2182
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2167
|
-
},
|
|
2183
|
+
}, ka = /* @__PURE__ */ d({
|
|
2168
2184
|
__name: "SocialIconsBlock",
|
|
2169
2185
|
props: {
|
|
2170
2186
|
block: {},
|
|
2171
2187
|
viewport: {}
|
|
2172
2188
|
},
|
|
2173
2189
|
setup(e) {
|
|
2174
|
-
let t = e, { t: n } =
|
|
2190
|
+
let t = e, { t: n } = X(), i = y(() => ({
|
|
2175
2191
|
display: "flex",
|
|
2176
2192
|
flexWrap: "wrap",
|
|
2177
2193
|
gap: `${t.block.spacing}px`,
|
|
2178
2194
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2179
|
-
})), a =
|
|
2180
|
-
return (t, o) => (s(),
|
|
2195
|
+
})), a = y(() => t.block.icons.length > 0);
|
|
2196
|
+
return (t, o) => (s(), b("div", Ea, [a.value ? (s(), b("div", {
|
|
2181
2197
|
key: 0,
|
|
2182
|
-
style:
|
|
2183
|
-
}, [(s(!0),
|
|
2198
|
+
style: E(i.value)
|
|
2199
|
+
}, [(s(!0), b(N, null, r(e.block.icons, (t) => (s(), b("a", {
|
|
2184
2200
|
key: t.id,
|
|
2185
2201
|
href: t.url || "#",
|
|
2186
2202
|
class: "tpl:cursor-default",
|
|
2187
|
-
onClick: o[0] ||=
|
|
2188
|
-
}, [
|
|
2203
|
+
onClick: o[0] ||= T(() => {}, ["prevent"])
|
|
2204
|
+
}, [h(Ta, {
|
|
2189
2205
|
platform: t.platform,
|
|
2190
2206
|
"icon-style": e.block.iconStyle,
|
|
2191
2207
|
"icon-tone": e.block.iconTone,
|
|
@@ -2195,44 +2211,44 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2195
2211
|
"icon-style",
|
|
2196
2212
|
"icon-tone",
|
|
2197
2213
|
"icon-size"
|
|
2198
|
-
])], 8,
|
|
2214
|
+
])], 8, Da))), 128))], 4)) : (s(), b("div", Oa, [h(m(wn), { size: 16 }), O("span", null, P(m(n).social.addIcons), 1)]))]));
|
|
2199
2215
|
}
|
|
2200
|
-
}),
|
|
2216
|
+
}), Aa = { class: "tpl:w-full" }, ja = {
|
|
2201
2217
|
key: 0,
|
|
2202
2218
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2203
2219
|
style: {
|
|
2204
2220
|
"background-color": "var(--tpl-bg-hover)",
|
|
2205
2221
|
color: "var(--tpl-text-dim)"
|
|
2206
2222
|
}
|
|
2207
|
-
},
|
|
2223
|
+
}, Ma = /* @__PURE__ */ d({
|
|
2208
2224
|
__name: "SpacerBlock",
|
|
2209
2225
|
props: {
|
|
2210
2226
|
block: {},
|
|
2211
2227
|
viewport: {}
|
|
2212
2228
|
},
|
|
2213
2229
|
setup(e) {
|
|
2214
|
-
let t = e, n =
|
|
2230
|
+
let t = e, n = K(J, "SpacerBlock"), r = y(() => ({
|
|
2215
2231
|
height: `${t.block.height}px`,
|
|
2216
2232
|
minHeight: `${t.block.height}px`,
|
|
2217
2233
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2218
2234
|
}));
|
|
2219
|
-
return (t, i) => (s(),
|
|
2220
|
-
style:
|
|
2221
|
-
class:
|
|
2222
|
-
}, [
|
|
2235
|
+
return (t, i) => (s(), b("div", Aa, [O("div", {
|
|
2236
|
+
style: E(r.value),
|
|
2237
|
+
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 }])
|
|
2238
|
+
}, [m(n).state.previewMode ? x("", !0) : (s(), b("span", ja, P(e.block.height) + "px ", 1))], 6)]));
|
|
2223
2239
|
}
|
|
2224
|
-
}),
|
|
2240
|
+
}), Na = { class: "tpl:w-full" }, Pa = { key: 0 }, Fa = [
|
|
2225
2241
|
"aria-label",
|
|
2226
2242
|
"data-placeholder",
|
|
2227
2243
|
"onBlur"
|
|
2228
|
-
],
|
|
2244
|
+
], Ia = [
|
|
2229
2245
|
"aria-label",
|
|
2230
2246
|
"data-placeholder",
|
|
2231
2247
|
"onBlur"
|
|
2232
|
-
],
|
|
2248
|
+
], La = {
|
|
2233
2249
|
key: 1,
|
|
2234
2250
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2235
|
-
},
|
|
2251
|
+
}, Ra = /*#__PURE__*/ An(/* @__PURE__ */ d({
|
|
2236
2252
|
__name: "TableBlock",
|
|
2237
2253
|
props: {
|
|
2238
2254
|
block: {},
|
|
@@ -2246,28 +2262,28 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2246
2262
|
updated(e, t) {
|
|
2247
2263
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2248
2264
|
}
|
|
2249
|
-
}, n = e, { t: i } =
|
|
2265
|
+
}, n = e, { t: i } = X(), a = K(J, "TableBlock"), o = K(Y, "TableBlock"), c = y(() => n.block.rows.length > 0), l = y(() => {
|
|
2250
2266
|
let e = {
|
|
2251
2267
|
width: "100%",
|
|
2252
2268
|
borderCollapse: "collapse",
|
|
2253
2269
|
fontSize: `${n.block.fontSize}px`,
|
|
2254
2270
|
textAlign: n.block.textAlign,
|
|
2255
|
-
fontFamily: n.block.fontFamily
|
|
2271
|
+
fontFamily: n.block.fontFamily ? o.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
2256
2272
|
};
|
|
2257
2273
|
return n.block.color && (e.color = n.block.color), e;
|
|
2258
|
-
}),
|
|
2274
|
+
}), u = y(() => ({
|
|
2259
2275
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
2260
2276
|
padding: `${n.block.cellPadding}px`,
|
|
2261
2277
|
textAlign: n.block.textAlign
|
|
2262
|
-
})),
|
|
2263
|
-
...
|
|
2278
|
+
})), d = y(() => ({
|
|
2279
|
+
...u.value,
|
|
2264
2280
|
fontWeight: "bold",
|
|
2265
2281
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
2266
|
-
})),
|
|
2267
|
-
function
|
|
2282
|
+
})), 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);
|
|
2283
|
+
function v() {
|
|
2268
2284
|
a.selectBlock(n.block.id);
|
|
2269
2285
|
}
|
|
2270
|
-
function
|
|
2286
|
+
function S(e, t, r) {
|
|
2271
2287
|
let i = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
2272
2288
|
...n,
|
|
2273
2289
|
cells: n.cells.map((e) => e.id === t ? {
|
|
@@ -2277,49 +2293,49 @@ var Zi = { class: "tpl:w-full" }, Qi = {
|
|
|
2277
2293
|
} : n);
|
|
2278
2294
|
a.updateBlock(n.block.id, { rows: o });
|
|
2279
2295
|
}
|
|
2280
|
-
return (e, n) => (s(),
|
|
2296
|
+
return (e, n) => (s(), b("div", Na, [c.value ? (s(), b("table", {
|
|
2281
2297
|
key: 0,
|
|
2282
|
-
style:
|
|
2298
|
+
style: E(l.value),
|
|
2283
2299
|
class: "tpl-table-editable"
|
|
2284
|
-
}, [
|
|
2300
|
+
}, [p.value ? (s(), b("thead", Pa, [O("tr", null, [(s(!0), b(N, null, r(p.value.cells, (e) => f((s(), b("th", {
|
|
2285
2301
|
key: e.id,
|
|
2286
|
-
style:
|
|
2287
|
-
"aria-label":
|
|
2302
|
+
style: E(d.value),
|
|
2303
|
+
"aria-label": m(i).table.cellPlaceholder,
|
|
2288
2304
|
contenteditable: "true",
|
|
2289
|
-
"data-placeholder":
|
|
2290
|
-
onBlur: (t) =>
|
|
2291
|
-
onKeydown: n[0] ||=
|
|
2292
|
-
onClick:
|
|
2293
|
-
}, null, 44,
|
|
2305
|
+
"data-placeholder": m(i).table.cellPlaceholder,
|
|
2306
|
+
onBlur: (t) => S(p.value.id, e.id, t),
|
|
2307
|
+
onKeydown: n[0] ||= g(T((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2308
|
+
onClick: T(v, ["stop"])
|
|
2309
|
+
}, null, 44, Fa)), [[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", {
|
|
2294
2310
|
key: r.id,
|
|
2295
|
-
style:
|
|
2296
|
-
"aria-label":
|
|
2311
|
+
style: E(u.value),
|
|
2312
|
+
"aria-label": m(i).table.cellPlaceholder,
|
|
2297
2313
|
contenteditable: "true",
|
|
2298
|
-
"data-placeholder":
|
|
2299
|
-
onBlur: (t) =>
|
|
2300
|
-
onKeydown: n[1] ||=
|
|
2301
|
-
onClick:
|
|
2302
|
-
}, null, 44,
|
|
2314
|
+
"data-placeholder": m(i).table.cellPlaceholder,
|
|
2315
|
+
onBlur: (t) => S(e.id, r.id, t),
|
|
2316
|
+
onKeydown: n[1] ||= g(T((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2317
|
+
onClick: T(v, ["stop"])
|
|
2318
|
+
}, null, 44, Ia)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), b("div", La, [h(m(On), { size: 16 }), O("span", null, P(m(i).table.empty), 1)]))]));
|
|
2303
2319
|
}
|
|
2304
|
-
}), [["__scopeId", "data-v-
|
|
2320
|
+
}), [["__scopeId", "data-v-6751d456"]]), za = /* @__PURE__ */ d({
|
|
2305
2321
|
__name: "VideoPlayButton",
|
|
2306
2322
|
props: { hoverEffect: {
|
|
2307
2323
|
type: Boolean,
|
|
2308
2324
|
default: !1
|
|
2309
2325
|
} },
|
|
2310
2326
|
setup(e) {
|
|
2311
|
-
return (t, n) => (s(),
|
|
2327
|
+
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", {
|
|
2312
2328
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
2313
2329
|
width: "28",
|
|
2314
2330
|
height: "28",
|
|
2315
2331
|
viewBox: "0 0 24 24",
|
|
2316
2332
|
fill: "currentColor"
|
|
2317
|
-
}, [
|
|
2333
|
+
}, [O("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
2318
2334
|
}
|
|
2319
2335
|
});
|
|
2320
2336
|
//#endregion
|
|
2321
2337
|
//#region src/utils/videoThumbnail.ts
|
|
2322
|
-
function
|
|
2338
|
+
function Ba(e) {
|
|
2323
2339
|
if (!e) return {
|
|
2324
2340
|
platform: "unknown",
|
|
2325
2341
|
videoId: null,
|
|
@@ -2351,25 +2367,25 @@ function va(e) {
|
|
|
2351
2367
|
thumbnailUrl: null
|
|
2352
2368
|
};
|
|
2353
2369
|
}
|
|
2354
|
-
function
|
|
2355
|
-
return t ||
|
|
2370
|
+
function Va(e, t) {
|
|
2371
|
+
return t || Ba(e).thumbnailUrl;
|
|
2356
2372
|
}
|
|
2357
2373
|
//#endregion
|
|
2358
2374
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2359
|
-
var
|
|
2375
|
+
var Ha = ["src", "alt"], Ua = {
|
|
2360
2376
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2361
2377
|
style: { opacity: "0.7" }
|
|
2362
|
-
},
|
|
2378
|
+
}, Wa = ["href"], Ga = ["src", "alt"], Ka = ["src", "alt"], qa = {
|
|
2363
2379
|
key: 3,
|
|
2364
|
-
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2365
|
-
},
|
|
2380
|
+
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)]"
|
|
2381
|
+
}, Ja = /* @__PURE__ */ d({
|
|
2366
2382
|
__name: "VideoBlock",
|
|
2367
2383
|
props: {
|
|
2368
2384
|
block: {},
|
|
2369
2385
|
viewport: {}
|
|
2370
2386
|
},
|
|
2371
2387
|
setup(e) {
|
|
2372
|
-
let t = e, { t: n } =
|
|
2388
|
+
let t = e, { t: n } = X(), { syntax: r } = Mn(), i = y(() => ke(t.block.url, r) || ke(t.block.thumbnailUrl, r)), a = G(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = G(() => i.value ? t.block.placeholderUrl : void 0), c = y(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Va(t.block.url)), l = y(() => ({ textAlign: t.block.align })), u = y(() => {
|
|
2373
2389
|
let e = t.block.align;
|
|
2374
2390
|
return {
|
|
2375
2391
|
maxWidth: "100%",
|
|
@@ -2379,98 +2395,98 @@ var ba = ["src", "alt"], xa = {
|
|
|
2379
2395
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2380
2396
|
marginRight: e === "center" ? "auto" : void 0
|
|
2381
2397
|
};
|
|
2382
|
-
}), d =
|
|
2383
|
-
return (t, r) => (s(),
|
|
2398
|
+
}), d = y(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = y(() => ke(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2399
|
+
return (t, r) => (s(), b("div", {
|
|
2384
2400
|
class: "tpl:w-full",
|
|
2385
|
-
style:
|
|
2386
|
-
}, [i.value && e.block.placeholderUrl ? (s(),
|
|
2401
|
+
style: E(l.value)
|
|
2402
|
+
}, [i.value && e.block.placeholderUrl ? (s(), b("div", {
|
|
2387
2403
|
key: 0,
|
|
2388
2404
|
class: "tpl:relative tpl:inline-block",
|
|
2389
|
-
style:
|
|
2390
|
-
}, [
|
|
2391
|
-
class: "tpl:w-full tpl:border-0",
|
|
2392
|
-
src:
|
|
2405
|
+
style: E(u.value)
|
|
2406
|
+
}, [O("img", {
|
|
2407
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2408
|
+
src: m(o),
|
|
2393
2409
|
alt: e.block.alt,
|
|
2394
|
-
style:
|
|
2395
|
-
}, null, 12,
|
|
2410
|
+
style: E(d.value)
|
|
2411
|
+
}, null, 12, Ha), h(za)], 4)) : i.value ? (s(), b("div", {
|
|
2396
2412
|
key: 1,
|
|
2397
|
-
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2398
|
-
style:
|
|
2399
|
-
}, [
|
|
2413
|
+
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)]",
|
|
2414
|
+
style: E([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2415
|
+
}, [h(m(Dn), {
|
|
2400
2416
|
size: 36,
|
|
2401
2417
|
"stroke-width": 1.5,
|
|
2402
2418
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2403
2419
|
style: { opacity: "0.5" }
|
|
2404
|
-
}),
|
|
2420
|
+
}), O("span", Ua, [h(Br, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), b(N, { key: 2 }, [e.block.url ? (s(), b("a", {
|
|
2405
2421
|
key: 0,
|
|
2406
2422
|
href: e.block.url,
|
|
2407
2423
|
target: "_blank",
|
|
2408
2424
|
rel: "noopener noreferrer",
|
|
2409
2425
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
2410
|
-
style:
|
|
2411
|
-
onClick: r[0] ||=
|
|
2412
|
-
}, [
|
|
2413
|
-
class: "tpl:w-full tpl:border-0",
|
|
2426
|
+
style: E(u.value),
|
|
2427
|
+
onClick: r[0] ||= T(() => {}, ["prevent"])
|
|
2428
|
+
}, [O("img", {
|
|
2429
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2414
2430
|
src: c.value,
|
|
2415
2431
|
alt: e.block.alt,
|
|
2416
|
-
style:
|
|
2417
|
-
}, null, 12,
|
|
2432
|
+
style: E(d.value)
|
|
2433
|
+
}, null, 12, Ga), h(za, { "hover-effect": "" })], 12, Wa)) : (s(), b("div", {
|
|
2418
2434
|
key: 1,
|
|
2419
2435
|
class: "tpl:relative tpl:inline-block",
|
|
2420
|
-
style:
|
|
2421
|
-
}, [
|
|
2422
|
-
class: "tpl:w-full tpl:border-0",
|
|
2436
|
+
style: E(u.value)
|
|
2437
|
+
}, [O("img", {
|
|
2438
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2423
2439
|
src: c.value,
|
|
2424
2440
|
alt: e.block.alt,
|
|
2425
|
-
style:
|
|
2426
|
-
}, null, 12,
|
|
2441
|
+
style: E(d.value)
|
|
2442
|
+
}, null, 12, Ka), h(za)], 4))], 64)) : (s(), b("div", qa, [h(m(Dn), {
|
|
2427
2443
|
size: 40,
|
|
2428
2444
|
"stroke-width": 1.5,
|
|
2429
2445
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2430
|
-
}),
|
|
2431
|
-
}
|
|
2432
|
-
}),
|
|
2433
|
-
section:
|
|
2434
|
-
title:
|
|
2435
|
-
paragraph:
|
|
2436
|
-
image:
|
|
2437
|
-
button:
|
|
2438
|
-
divider:
|
|
2439
|
-
video:
|
|
2440
|
-
social:
|
|
2441
|
-
menu:
|
|
2442
|
-
table:
|
|
2443
|
-
spacer:
|
|
2444
|
-
html:
|
|
2445
|
-
countdown:
|
|
2446
|
+
}), O("span", null, P(m(n).video.addVideo), 1)]))], 4));
|
|
2447
|
+
}
|
|
2448
|
+
}), Ya = {
|
|
2449
|
+
section: xa,
|
|
2450
|
+
title: ua,
|
|
2451
|
+
paragraph: Yi,
|
|
2452
|
+
image: Ii,
|
|
2453
|
+
button: Hr,
|
|
2454
|
+
divider: vi,
|
|
2455
|
+
video: Ja,
|
|
2456
|
+
social: ka,
|
|
2457
|
+
menu: Bi,
|
|
2458
|
+
table: Ra,
|
|
2459
|
+
spacer: Ma,
|
|
2460
|
+
html: wi,
|
|
2461
|
+
countdown: I(() => import("./CountdownBlock-Dasj191h.js"))
|
|
2446
2462
|
};
|
|
2447
|
-
function
|
|
2448
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } =
|
|
2463
|
+
function Xa(e) {
|
|
2464
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = X(i), d = y(() => we(we(we(nr(i), xr(n.content.value.settings?.locale)), _e(n.content.value.settings) === "rtl" ? {
|
|
2449
2465
|
title: { textAlign: "right" },
|
|
2450
2466
|
table: { textAlign: "right" }
|
|
2451
2467
|
} : {}), r.blockDefaults ?? {}));
|
|
2452
2468
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2453
|
-
let { resolvedTheme: f } =
|
|
2454
|
-
themeOverrides:
|
|
2469
|
+
let { resolvedTheme: f } = Wn(y(() => n.state.uiTheme)), m = l(r.theme ?? {}), { themeStyles: h } = Kn({
|
|
2470
|
+
themeOverrides: m,
|
|
2455
2471
|
resolvedTheme: f,
|
|
2456
2472
|
extraStyles: () => ({
|
|
2457
2473
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2458
2474
|
...e.themeExtraStyles?.()
|
|
2459
2475
|
})
|
|
2460
|
-
}), g =
|
|
2476
|
+
}), g = qe({
|
|
2461
2477
|
content: n.content,
|
|
2462
2478
|
setContent: (e, t) => n.setContent(e, t),
|
|
2463
2479
|
...e.historyOptions
|
|
2464
2480
|
});
|
|
2465
|
-
|
|
2466
|
-
let _ =
|
|
2481
|
+
Ge(n, g);
|
|
2482
|
+
let _ = Ke({
|
|
2467
2483
|
addBlock: n.addBlock,
|
|
2468
2484
|
removeBlock: n.removeBlock,
|
|
2469
2485
|
updateBlock: n.updateBlock,
|
|
2470
2486
|
selectBlock: n.selectBlock,
|
|
2471
2487
|
findBlockLocation: n.findBlockLocation,
|
|
2472
2488
|
blockDefaults: () => d.value
|
|
2473
|
-
}),
|
|
2489
|
+
}), b = Je(n), x = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Ye({
|
|
2474
2490
|
content: n.content,
|
|
2475
2491
|
isDirty: () => n.state.isDirty,
|
|
2476
2492
|
...e.autoSaveOptions
|
|
@@ -2478,30 +2494,30 @@ function Oa(e) {
|
|
|
2478
2494
|
x && (S = t(g.isNavigating, (e) => {
|
|
2479
2495
|
e ? x.pause() : x.resume();
|
|
2480
2496
|
}));
|
|
2481
|
-
let C =
|
|
2497
|
+
let C = Un(n, {
|
|
2482
2498
|
t: s,
|
|
2483
2499
|
format: u
|
|
2484
|
-
}, r.customBlocks ?? []), w =
|
|
2485
|
-
if (w.allowCustomIgnored &&
|
|
2486
|
-
let e =
|
|
2487
|
-
e.length > 0 &&
|
|
2488
|
-
}
|
|
2489
|
-
let T =
|
|
2490
|
-
for (let e of T.unknown)
|
|
2491
|
-
let E =
|
|
2492
|
-
|
|
2500
|
+
}, r.customBlocks ?? []), w = ln(r.colors);
|
|
2501
|
+
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) {
|
|
2502
|
+
let e = tr(w.presets, r.blockDefaults, r.templateDefaults);
|
|
2503
|
+
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.`);
|
|
2504
|
+
}
|
|
2505
|
+
let T = dn(r.templateSettings);
|
|
2506
|
+
for (let e of T.unknown) Z.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${fn.join(", ")}) — skipping it.`);
|
|
2507
|
+
let E = qn();
|
|
2508
|
+
Qn(E, Ya);
|
|
2493
2509
|
let D = /* @__PURE__ */ new Set();
|
|
2494
2510
|
function O(e) {
|
|
2495
2511
|
for (let t of e) {
|
|
2496
|
-
E.registerCustom(t,
|
|
2497
|
-
for (let e of
|
|
2512
|
+
E.registerCustom(t, gi);
|
|
2513
|
+
for (let e of Sr(t, w)) D.has(e.id) || (D.add(e.id), Z.warn(e.message));
|
|
2498
2514
|
}
|
|
2499
2515
|
}
|
|
2500
2516
|
r.customBlocks?.length && O(r.customBlocks);
|
|
2501
|
-
let k =
|
|
2502
|
-
if (o() &&
|
|
2517
|
+
let k = In();
|
|
2518
|
+
if (o() && p(k.dispose), e.containerEl) {
|
|
2503
2519
|
let t = e.containerEl;
|
|
2504
|
-
|
|
2520
|
+
pt(document, "pointerdown", (e) => {
|
|
2505
2521
|
let n = t.value;
|
|
2506
2522
|
n && (e.composedPath?.() ?? []).includes(n) && k.claim();
|
|
2507
2523
|
}, { capture: !0 });
|
|
@@ -2511,7 +2527,7 @@ function Oa(e) {
|
|
|
2511
2527
|
t ? t.save() : x?.flush();
|
|
2512
2528
|
}
|
|
2513
2529
|
function j(t) {
|
|
2514
|
-
k.isActive() &&
|
|
2530
|
+
k.isActive() && wr(t, {
|
|
2515
2531
|
history: g,
|
|
2516
2532
|
selectBlock: (e) => n.selectBlock(e),
|
|
2517
2533
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -2523,37 +2539,37 @@ function Oa(e) {
|
|
|
2523
2539
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
2524
2540
|
});
|
|
2525
2541
|
}
|
|
2526
|
-
|
|
2542
|
+
pt(document, "keydown", j);
|
|
2527
2543
|
let M = l(null), N = e.editorRoot ?? document;
|
|
2528
|
-
c(
|
|
2529
|
-
let P =
|
|
2544
|
+
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, $n(r.htmlBlockPreview)), c(vt, r.layout), c(St, r.sectionWrapper), c(Ut, w), c($t, T.fields), c(Yt, Jn(n.content, E));
|
|
2545
|
+
let P = De(r.mergeTags?.syntax), F = v(r.mergeTags?.tags ?? []);
|
|
2530
2546
|
function I(e) {
|
|
2531
|
-
Array.isArray(e) ? F.value = e :
|
|
2547
|
+
Array.isArray(e) ? F.value = e : Z.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
2532
2548
|
}
|
|
2533
|
-
c(
|
|
2534
|
-
let L = l(
|
|
2535
|
-
c(
|
|
2536
|
-
let R =
|
|
2549
|
+
c(q, F), c(At, P), c(Mt, r.mergeTags?.onRequest ?? null), c(qt, r.mergeTags?.autocomplete !== !1), c(kt, r.mergeTags?.showRawValue !== !1);
|
|
2550
|
+
let L = l(Be(r.mergeTags?.tags ?? []));
|
|
2551
|
+
c(Ot, L);
|
|
2552
|
+
let R = Rn({
|
|
2537
2553
|
resolvePreview: r.resolvePreview,
|
|
2538
2554
|
getContent: () => {
|
|
2539
2555
|
let e = n.content.value;
|
|
2540
|
-
return r.layout && n.state.previewMode ?
|
|
2556
|
+
return r.layout && n.state.previewMode ? me(r.layout, e) : e;
|
|
2541
2557
|
},
|
|
2542
2558
|
isActive: () => n.state.previewMode
|
|
2543
2559
|
});
|
|
2544
|
-
c(
|
|
2545
|
-
let z =
|
|
2546
|
-
c(
|
|
2547
|
-
let B =
|
|
2548
|
-
c(
|
|
2549
|
-
let V =
|
|
2560
|
+
c(Ft, R), c(Ct, r.resolvePreview);
|
|
2561
|
+
let z = y(() => !(n.state.previewMode && R.isConfigured));
|
|
2562
|
+
c(en, z);
|
|
2563
|
+
let B = zn();
|
|
2564
|
+
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, Bn()), 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);
|
|
2565
|
+
let V = Vn(r.lint) ? null : Hn({
|
|
2550
2566
|
content: n.content,
|
|
2551
2567
|
options: r.lint ?? {},
|
|
2552
2568
|
updateBlock: n.updateBlock,
|
|
2553
2569
|
updateSettings: n.updateSettings,
|
|
2554
2570
|
removeBlock: n.removeBlock
|
|
2555
2571
|
});
|
|
2556
|
-
c(
|
|
2572
|
+
c(Et, V);
|
|
2557
2573
|
function H() {
|
|
2558
2574
|
S?.(), V?.destroy(), x?.destroy(), g.destroy();
|
|
2559
2575
|
}
|
|
@@ -2563,11 +2579,11 @@ function Oa(e) {
|
|
|
2563
2579
|
editorRoot: N,
|
|
2564
2580
|
history: g,
|
|
2565
2581
|
blockActions: _,
|
|
2566
|
-
conditionPreview:
|
|
2582
|
+
conditionPreview: b,
|
|
2567
2583
|
autoSave: x,
|
|
2568
2584
|
resolvedTheme: f,
|
|
2569
2585
|
themeStyles: h,
|
|
2570
|
-
themeOverrides:
|
|
2586
|
+
themeOverrides: m,
|
|
2571
2587
|
registry: E,
|
|
2572
2588
|
keyboardReorder: C,
|
|
2573
2589
|
templateLint: V,
|
|
@@ -2581,6 +2597,6 @@ function Oa(e) {
|
|
|
2581
2597
|
};
|
|
2582
2598
|
}
|
|
2583
2599
|
//#endregion
|
|
2584
|
-
export {
|
|
2600
|
+
export { Er as A, Gr as C, Fr as D, Pr as E, hr as F, mr as I, pr as L, vr as M, _r as N, Tr as O, gr as P, Rn as R, qr as S, Ar as T, si as _, ka as a, Qr as b, ma as c, Yi as d, Bi as f, gi as g, vi as h, Ma as i, ur as j, Rr as k, ua as l, wi as m, Ja as n, xa as o, Ii as p, Ra as r, da as s, Xa as t, ca as u, ai as v, Hr as w, Jr as x, ri as y };
|
|
2585
2601
|
|
|
2586
|
-
//# sourceMappingURL=useEditorCore-
|
|
2602
|
+
//# sourceMappingURL=useEditorCore-Bb2UcB20.js.map
|