@templatical/editor 0.35.0 → 0.36.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-DPHbCGu4.js → AiChatSidebar-tu4eLcf_.js} +57 -57
- package/dist/{AiFeatureMenu--8z7qvg1.js → AiFeatureMenu-BF0i0vA4.js} +17 -17
- package/dist/{BlockIssueBadge-BGCsJqqM.js → BlockIssueBadge-DT-FqKeC.js} +9 -9
- package/dist/{BlockPreviewCanvas-DKspIy8V.js → BlockPreviewCanvas-DDCmMram.js} +28 -28
- package/dist/CloudHeaderExtras-NPhudovT.js +59 -0
- package/dist/{CloudPanels-Bp5gFtaL.js → CloudPanels-Iwnky0iA.js} +78 -108
- package/dist/{CollaboratorBar-DvwZm5u7.js → CollaboratorBar-DAITu0hz.js} +17 -17
- package/dist/{ColorPicker-DtozuN75.js → ColorPicker-BqlZ_TqG.js} +193 -193
- package/dist/{CommentsPanel-3C-DsEjy.js → CommentsPanel-CDvgmWP1.js} +3 -3
- package/dist/{CommentsSidebar-go1FnjDW.js → CommentsSidebar-X_xqM3dR.js} +158 -158
- package/dist/{CountdownBlock-D1fsNsyS.js → CountdownBlock-ZFJIdbP6.js} +12 -12
- package/dist/{CountdownToolbar-SLBuij7Q.js → CountdownToolbar-DBFoG3a6.js} +67 -67
- package/dist/{DesignReferenceSidebar-rcE_BvUd.js → DesignReferenceSidebar--QtXjLrw.js} +57 -57
- package/dist/{FieldRow-BWt7ECqo.js → FieldRow-C8nOknr_.js} +39 -39
- package/dist/{IssuesPanel-Cig46N1i.js → IssuesPanel-BLbNFMSX.js} +38 -38
- package/dist/{LoadingTrack-SQXoZVf2.js → LoadingTrack-BlTL4zFv.js} +2 -2
- package/dist/MediaPanels-CMTAhDXB.js +43 -0
- package/dist/{MergeTagInput-D1hzsn2b.js → MergeTagInput-BEjzj4Iu.js} +115 -115
- package/dist/{MergeTagModeToggle-CH9wR5YF.js → MergeTagModeToggle-DKN6ihI5.js} +40 -40
- package/dist/{MergeTagSuggestion-CoCuzEmW.js → MergeTagSuggestion-DKoLEeoj.js} +21 -21
- package/dist/{ParagraphEditor-CT2AdMdZ.js → ParagraphEditor-1E9yzOfk.js} +231 -258
- package/dist/{RestoreVersionDialog-mdqgQxFR.js → RestoreVersionDialog-BMGUkcd8.js} +28 -28
- package/dist/{RichTextEditorContent-riOB-rKD.js → RichTextEditorContent-BnxbQUV9.js} +49 -59
- package/dist/{SaveBlockDialog-Cn2v4Lpj.js → SaveBlockDialog-WKASpCCT.js} +78 -78
- package/dist/SavedBlocksBrowserModal-AYEXTMtQ.js +323 -0
- package/dist/{SavedBlocksPanels-ffBnWuVU.js → SavedBlocksPanels-D_CpacTl.js} +6 -6
- package/dist/{SavedBlocksPickBar-BmQC2tWN.js → SavedBlocksPickBar-BHMwg-1G.js} +11 -11
- package/dist/{TemplateScoringPanel-CxAtdreR.js → TemplateScoringPanel-CSin43YM.js} +99 -98
- package/dist/{TestEmailModal-Cjn1padY.js → TestEmailModal-BxizsRCd.js} +59 -59
- package/dist/{TestEmailPanel-Bf3XZ1jn.js → TestEmailPanel-vd2e5HzT.js} +3 -3
- package/dist/TitleEditor-CLJ68Ty4.js +199 -0
- package/dist/TplModal-Q9fDgS1M.js +51 -0
- package/dist/{VersionHistoryMenu-CrNrGsaa.js → VersionHistoryMenu-eGYVhM4H.js} +41 -47
- package/dist/{VersionHistoryPanels-CsuQk6W3.js → VersionHistoryPanels-C7Ntrrfq.js} +4 -4
- package/dist/{VersionPreviewBanner-BqbO0Zss.js → VersionPreviewBanner-BbQXnR0M.js} +9 -9
- package/dist/{blockTypeIcons-D_4HdaY9.js → blockTypeIcons-5qD4bB76.js} +5 -17
- package/dist/bundle-stats.json +8 -8
- package/dist/ca-Jx2CDwtn.js +83 -0
- package/dist/cdn/chunks/{AiChatSidebar-D0f74_nS.js → AiChatSidebar-dyqqHAcI.js} +4 -4
- package/dist/cdn/chunks/{AiChatSidebar-D0f74_nS.js.map → AiChatSidebar-dyqqHAcI.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-DwGb3eF9.js → AiFeatureMenu-BjVMwhW8.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-DwGb3eF9.js.map → AiFeatureMenu-BjVMwhW8.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CosQgeJ-.js → BlockIssueBadge-BJ__oEtm.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-CosQgeJ-.js.map → BlockIssueBadge-BJ__oEtm.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CIpZ2a6g.js → BlockPreviewCanvas-B5f26eLE.js} +5 -5
- package/dist/cdn/chunks/{BlockPreviewCanvas-CIpZ2a6g.js.map → BlockPreviewCanvas-B5f26eLE.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-CQzQwKFB.js → CloudHeaderExtras-D5P5IEKA.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-CQzQwKFB.js.map → CloudHeaderExtras-D5P5IEKA.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BmexuLOU.js → CloudPanels-DkmR05nB.js} +15 -45
- package/dist/cdn/chunks/{CloudPanels-BmexuLOU.js.map → CloudPanels-DkmR05nB.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DEICobpp.js → CollaboratorBar-Yn7KSpt4.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DEICobpp.js.map → CollaboratorBar-Yn7KSpt4.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-C7yC58FK.js → ColorPicker-LcrzgMoW.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-C7yC58FK.js.map → ColorPicker-LcrzgMoW.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-OjmKxLL7.js → CommentsPanel-CntwwocI.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-OjmKxLL7.js.map → CommentsPanel-CntwwocI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-C4pWZGpy.js → CommentsSidebar-BLDKnKy7.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-C4pWZGpy.js.map → CommentsSidebar-BLDKnKy7.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js → CountdownBlock-B4AfqJwb.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js.map → CountdownBlock-B4AfqJwb.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-wlJOxyAl.js → CountdownToolbar-CA1dpuOI.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-wlJOxyAl.js.map → CountdownToolbar-CA1dpuOI.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-DELhnh8h.js → DesignReferenceSidebar-D1Y9Hswe.js} +5 -5
- package/dist/cdn/chunks/{DesignReferenceSidebar-DELhnh8h.js.map → DesignReferenceSidebar-D1Y9Hswe.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C9i3o8aE.js → IssuesPanel-Q62LTqvd.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-C9i3o8aE.js.map → IssuesPanel-Q62LTqvd.js.map} +1 -1
- package/dist/cdn/chunks/MediaPanels-D21M6shx.js +45 -0
- package/dist/cdn/chunks/MediaPanels-D21M6shx.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-D76Kyvgu.js → MergeTagInput-l7paaAml.js} +7 -7
- package/dist/cdn/chunks/{MergeTagInput-D76Kyvgu.js.map → MergeTagInput-l7paaAml.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Dz3gxN2y.js → MergeTagModeToggle-DYxkAGtA.js} +4 -4
- package/dist/cdn/chunks/{MergeTagModeToggle-Dz3gxN2y.js.map → MergeTagModeToggle-DYxkAGtA.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DQn0HMfV.js → ParagraphEditor-Bd-GQXee.js} +15 -15
- package/dist/cdn/chunks/{ParagraphEditor-DQn0HMfV.js.map → ParagraphEditor-Bd-GQXee.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BdjOL8Oy.js → RestoreVersionDialog-2X9RpM9A.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-BdjOL8Oy.js.map → RestoreVersionDialog-2X9RpM9A.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Drzwgh0J.js → RichTextEditorContent-D_rb0rmU.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-Drzwgh0J.js.map → RichTextEditorContent-D_rb0rmU.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B3rbmXSM.js → SaveBlockDialog-CufdTomT.js} +15 -15
- package/dist/cdn/chunks/{SaveBlockDialog-B3rbmXSM.js.map → SaveBlockDialog-CufdTomT.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CkUXlnd2.js → SavedBlocksBrowserModal-CqpaNsk7.js} +8 -8
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CkUXlnd2.js.map → SavedBlocksBrowserModal-CqpaNsk7.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BPi3PZKP.js → SavedBlocksPanels-DpxYxddo.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-BPi3PZKP.js.map → SavedBlocksPanels-DpxYxddo.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvB9A5W2.js → SavedBlocksPickBar-Drpoav1B.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvB9A5W2.js.map → SavedBlocksPickBar-Drpoav1B.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-BBCyLnOi.js → TemplateScoringPanel-DBjUNULq.js} +5 -5
- package/dist/cdn/chunks/{TemplateScoringPanel-BBCyLnOi.js.map → TemplateScoringPanel-DBjUNULq.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DAGTsBqi.js → TestEmailModal-BTNlSW6f.js} +10 -10
- package/dist/cdn/chunks/{TestEmailModal-DAGTsBqi.js.map → TestEmailModal-BTNlSW6f.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BfenVvfx.js → TestEmailPanel-D0A9Zgxr.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-BfenVvfx.js.map → TestEmailPanel-D0A9Zgxr.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-oQ4gr6wS.js → TitleEditor-CrnuIq62.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-oQ4gr6wS.js.map → TitleEditor-CrnuIq62.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DxOMcVwp.js → TplModal-DYXrTz42.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DxOMcVwp.js.map → TplModal-DYXrTz42.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BfVUvWHT.js → VersionHistoryMenu-bDGnE4hb.js} +4 -4
- package/dist/cdn/chunks/VersionHistoryMenu-bDGnE4hb.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-NpDb641L.js → VersionHistoryPanels-82P0Q0HM.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-NpDb641L.js.map → VersionHistoryPanels-82P0Q0HM.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-Cpgt4xHc.js → VersionPreviewBanner-BJiwKkVC.js} +3 -3
- package/dist/cdn/chunks/{VersionPreviewBanner-Cpgt4xHc.js.map → VersionPreviewBanner-BJiwKkVC.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-t9vvaiuH.js → blockTypeIcons-CNjJSFun.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-t9vvaiuH.js.map → blockTypeIcons-CNjJSFun.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CNRWAMHI.js → ca-Jx2CDwtn.js} +2 -6
- package/dist/cdn/chunks/ca-Jx2CDwtn.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CullB76F.js → cloud-BLgCKP7Z.js} +452 -227
- package/dist/cdn/chunks/cloud-BLgCKP7Z.js.map +1 -0
- package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js +385 -0
- package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js.map +1 -0
- package/dist/cdn/chunks/{de-DFYCT4QU.js → de-Ck0pBGHu.js} +2 -6
- package/dist/cdn/chunks/de-Ck0pBGHu.js.map +1 -0
- package/dist/cdn/chunks/{src-CaXeO-gG.js → editor-modal-MXgtarMl.js} +1474 -1935
- package/dist/cdn/chunks/editor-modal-MXgtarMl.js.map +1 -0
- package/dist/cdn/chunks/en-C9U7N77n.js +2 -0
- package/dist/cdn/chunks/{es-OgkdMZGX.js → es-lagTvUfX.js} +2 -6
- package/dist/cdn/chunks/es-lagTvUfX.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BpXY7jO5.js → extensions-B8_jnIkD.js} +3 -3
- package/dist/cdn/chunks/{extensions-BpXY7jO5.js.map → extensions-B8_jnIkD.js.map} +1 -1
- package/dist/cdn/chunks/{fr-Dswns199.js → fr-C4hVl5Lk.js} +2 -6
- package/dist/cdn/chunks/fr-C4hVl5Lk.js.map +1 -0
- package/dist/cdn/chunks/{icons-BLxcQUck.js → icons-BUlqGSgd.js} +24 -24
- package/dist/cdn/chunks/{icons-BLxcQUck.js.map → icons-BUlqGSgd.js.map} +1 -1
- package/dist/cdn/chunks/{keys-DQp8x7Nx.js → keys-DBFhDFng.js} +4 -4
- package/dist/cdn/chunks/{keys-DQp8x7Nx.js.map → keys-DBFhDFng.js.map} +1 -1
- package/dist/cdn/chunks/{nl-CbcPJlrL.js → nl-CReD7Apd.js} +2 -6
- package/dist/cdn/chunks/nl-CReD7Apd.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-BibOQm-o.js → pt-BR-BRA0-vGP.js} +2 -6
- package/dist/cdn/chunks/pt-BR-BRA0-vGP.js.map +1 -0
- package/dist/cdn/chunks/{src-BC-eolWY.js → src-DZ0C9mH7.js} +2 -2
- package/dist/cdn/chunks/{src-BC-eolWY.js.map → src-DZ0C9mH7.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js → useCloudI18n-DSWSGj-A.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js.map → useCloudI18n-DSWSGj-A.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-D4MytYB9.js → useEditorCore-Cs7rYVBo.js} +488 -406
- package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +1 -0
- package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js → useEditorRoot-B0zW2nT4.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js.map → useEditorRoot-B0zW2nT4.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js → useI18n-Dlo7R9RA.js} +2 -2
- package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js.map → useI18n-Dlo7R9RA.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-CSocWpxV.js → useMergeTag-BYAifvh8.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-CSocWpxV.js.map → useMergeTag-BYAifvh8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js → usePopoverPosition-ElP3ABaV.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js.map → usePopoverPosition-ElP3ABaV.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js → useScrollToBlock-nTbWkgaU.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js.map → useScrollToBlock-nTbWkgaU.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1091 -1004
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CY-Ec6FV.js → check-DWtkBzBU.js} +1 -1
- package/dist/{chevron-down-BghbWA9p.js → chevron-down-C-Fjxcqj.js} +1 -1
- package/dist/chevron-right-SOkn2d4P.js +11 -0
- package/dist/{chevron-up-n3qFAPS3.js → chevron-up-lntU1ypp.js} +1 -1
- package/dist/{circle-alert-L5uGGFRP.js → circle-alert-CjzUTwy3.js} +1 -1
- package/dist/{clock-Dgnwp18n.js → clock-pB2QKPsJ.js} +1 -1
- package/dist/{cloud-B1c4XIsn.js → cloud-DdidMW6f.js} +445 -200
- package/dist/copy-CId1E038.js +19 -0
- package/dist/createCloudRuntime-x5WZm3p8.js +383 -0
- package/dist/{createLucideIcon-05lB8iWe.js → createLucideIcon-Cwf_nTzE.js} +6 -6
- package/dist/de-Ck0pBGHu.js +83 -0
- package/dist/{dist-BxFbxpgW.js → dist-BVqAYoRB.js} +125 -125
- package/dist/dist-D8i1ixHK.js +177 -0
- package/dist/dist-DBirAJIs.js +410 -0
- package/dist/editor-modal-B_LaQf0s.js +5998 -0
- package/dist/en-DcmpWV53.js +2 -0
- package/dist/es-lagTvUfX.js +83 -0
- package/dist/{extensions-Bawm4BOM.js → extensions-CHOBZRab.js} +42 -42
- package/dist/eye-BuGtFUoJ.js +16 -0
- package/dist/fr-C4hVl5Lk.js +83 -0
- package/dist/{image-up-ovhjl9u9.js → image-up-gH4JEpU5.js} +1 -1
- package/dist/index.d.ts +77 -11
- package/dist/{info-c3KI927I.js → info-BQ60P82u.js} +1 -1
- package/dist/{keys-C3P1yxnr.js → keys-DQA2i1k1.js} +4 -4
- package/dist/link-3R8it3J7.js +14 -0
- package/dist/list-Ccdgj46T.js +33 -0
- package/dist/{loader-circle-B2Y8xZQb.js → loader-circle-B_tAD4k6.js} +1 -1
- package/dist/{message-circle-B7K-naUa.js → message-circle-P-KSc6V0.js} +1 -1
- package/dist/nl-CReD7Apd.js +83 -0
- package/dist/{pencil-BhWTFcp4.js → pencil-9ZiwqS4r.js} +1 -1
- package/dist/plus-BwJEzCaO.js +14 -0
- package/dist/pt-BR-BRA0-vGP.js +83 -0
- package/dist/{refresh-cw-BqUR5vgO.js → refresh-cw-DEgfb2FK.js} +2 -14
- package/dist/{runtime-dom.esm-bundler-BuG03jBM.js → runtime-dom.esm-bundler-PnoZU512.js} +106 -106
- package/dist/search-DqQ8Li5E.js +16 -0
- package/dist/{send-D1vvuW79.js → send-CE6uvqop.js} +1 -1
- package/dist/{shield-check-DjK54PnW.js → shield-check-DhD1Z3rd.js} +1 -1
- package/dist/{sparkles-DNdS9V_3.js → sparkles-R0ZQHa6F.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +2488 -2407
- package/dist/{text-align-start-Bcmo_VUY.js → text-align-start-DSux2UNn.js} +1 -1
- package/dist/{trash-C9bMXvw4.js → trash-Cf_SqsER.js} +1 -1
- package/dist/{triangle-alert-Bn8Bd2Yv.js → triangle-alert-C6tGa6jw.js} +1 -1
- package/dist/{upload-DKgg1gno.js → upload-DusKjpVr.js} +1 -1
- package/dist/{useAliveFlag-PVmp95MT.js → useAliveFlag-oyByIcjy.js} +1 -1
- package/dist/{useCloudI18n-BKoiYsWZ.js → useCloudI18n-BLyh_e2T.js} +2 -2
- package/dist/{useEditorCore-CYGvurZa.js → useEditorCore-DhlKOYwe.js} +1552 -1486
- package/dist/{useEditorRoot-DkRGTQRs.js → useEditorRoot-ds57-l6F.js} +2 -2
- package/dist/{useI18n-CL6RfPzK.js → useI18n-BbdxxpOE.js} +2 -2
- package/dist/{useMergeTag-C9GEpljB.js → useMergeTag-DlvOBW_B.js} +3 -3
- package/dist/{usePopoverPosition-CWxaIWd3.js → usePopoverPosition-CprM5p-c.js} +2 -2
- package/dist/{useScrollToBlock-oUx1HIZ2.js → useScrollToBlock-BTFw0b9O.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-D9JUcKrV.js → vue.runtime.esm-bundler-DShF3P6k.js} +1192 -1181
- package/dist/{x-BPKoRPTG.js → x-D_-42Ukq.js} +1 -1
- package/package.json +9 -12
- package/dist/CloudHeaderExtras-CRUQvgSV.js +0 -59
- package/dist/SavedBlocksBrowserModal-BORqqASb.js +0 -322
- package/dist/TitleEditor-pYEUX6lR.js +0 -198
- package/dist/TplModal-DRx4ytx8.js +0 -51
- package/dist/cdn/chunks/VersionHistoryMenu-BfVUvWHT.js.map +0 -1
- package/dist/cdn/chunks/ca-CNRWAMHI.js.map +0 -1
- package/dist/cdn/chunks/cloud-CullB76F.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-Cx2JpUYU.js +0 -443
- package/dist/cdn/chunks/createCloudRuntime-Cx2JpUYU.js.map +0 -1
- package/dist/cdn/chunks/de-DFYCT4QU.js.map +0 -1
- package/dist/cdn/chunks/en-rGHphLWo.js +0 -2
- package/dist/cdn/chunks/es-OgkdMZGX.js.map +0 -1
- package/dist/cdn/chunks/fr-Dswns199.js.map +0 -1
- package/dist/cdn/chunks/nl-CbcPJlrL.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BibOQm-o.js.map +0 -1
- package/dist/cdn/chunks/src-CaXeO-gG.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-D4MytYB9.js.map +0 -1
- package/dist/createCloudRuntime-PevFSH74.js +0 -441
- package/dist/dist-dNiknO7j.js +0 -251
- package/dist/dist-heatwAdo.js +0 -150
|
@@ -2,35 +2,35 @@ 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,
|
|
|
2
2
|
import { A as H, B as ee, C as te, D as ne, E as re, F as ie, H as ae, I as oe, L as U, M as se, N as ce, O as le, P as ue, R as de, S as fe, T as pe, V as me, W as he, _ as ge, a as _e, b as ve, d as ye, f as be, g as xe, h as Se, i as W, it as Ce, j as we, k as Te, l as Ee, m as De, n as Oe, nt as ke, o as Ae, p as je, r as Me, rt as Ne, s as Pe, t as G, u as Fe, w as Ie, z as Le } from "./src-Dwgq7hf4.js";
|
|
3
3
|
import { _ as Re, h as ze, v as Be, y as Ve } from "./dist-BW6Y49zE.js";
|
|
4
4
|
import { a as K, c as He, i as Ue, r as We } from "./dist-CAFTQ6Y2.js";
|
|
5
|
-
import { A as Ge, C as Ke, D as
|
|
5
|
+
import { A as Ge, C as Ke, D as q, E as qe, F as Je, G as Ye, H as Xe, I as Ze, J, K as Qe, L as $e, M as et, N as tt, O as nt, P as rt, R as it, S as at, T as ot, U as st, W as ct, Y as lt, _ as ut, a as dt, b as ft, c as pt, d as mt, f as ht, g as Y, h as gt, j as _t, k as vt, l as yt, m as bt, n as xt, o as St, p as Ct, q as wt, r as Tt, s as Et, v as Dt, w as Ot, x as kt, y as At, z as jt } from "./keys-DBFhDFng.js";
|
|
6
6
|
import "./timeouts-DHPZQ0G3.js";
|
|
7
|
-
import { t as X } from "./useI18n-
|
|
7
|
+
import { t as X } from "./useI18n-Dlo7R9RA.js";
|
|
8
8
|
import { t as Z } from "./logger-ByvdoAwq.js";
|
|
9
|
-
import { a as
|
|
10
|
-
import { A as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import "./useCloudI18n-
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
9
|
+
import { a as Mt, i as Nt, o as Pt, r as Ft, t as It } from "./usePopoverPosition-ElP3ABaV.js";
|
|
10
|
+
import { A as Lt, Bt as Rt, Et as zt, H as Bt, Ot as Vt, Tt as Ht, X as Ut, d as Wt, ft as Gt, ht as Kt, it as qt, o as Jt, s as Yt, tt as Xt, u as Zt, v as Qt, vt as $t, zt as en } from "./icons-BUlqGSgd.js";
|
|
11
|
+
import { t as tn } from "./LoadingTrack-Cm3TDKb3.js";
|
|
12
|
+
import { t as nn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { t as rn } from "./useEditorRoot-B0zW2nT4.js";
|
|
14
|
+
import "./useCloudI18n-DSWSGj-A.js";
|
|
15
|
+
import { t as an } from "./useMergeTag-BYAifvh8.js";
|
|
16
|
+
import { t as on } from "./useAliveFlag-CT9gjvO_.js";
|
|
17
17
|
//#region ../core/src/error-reporting.ts
|
|
18
|
-
function
|
|
18
|
+
function sn(e) {
|
|
19
19
|
return e instanceof Error ? e : Error(String(e), { cause: e });
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function cn(e, t) {
|
|
22
22
|
try {
|
|
23
23
|
t();
|
|
24
24
|
} catch (t) {
|
|
25
|
-
e?.(
|
|
25
|
+
e?.(sn(t));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region ../core/src/editor.ts
|
|
30
|
-
function
|
|
30
|
+
function ln(e) {
|
|
31
31
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function un(e) {
|
|
34
34
|
let t = m({
|
|
35
35
|
template: null,
|
|
36
36
|
content: e.content ?? Le(e.defaultFontFamily, e.templateDefaults),
|
|
@@ -128,7 +128,7 @@ function ln(e) {
|
|
|
128
128
|
if (l(n)) return;
|
|
129
129
|
let r = o(t.content.blocks, n);
|
|
130
130
|
if (r && r.type === "section") {
|
|
131
|
-
if (i < 0 || i >=
|
|
131
|
+
if (i < 0 || i >= ln(r.columns)) return;
|
|
132
132
|
r.children[i] = r.children[i] || [];
|
|
133
133
|
let t = r.children[i];
|
|
134
134
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -161,7 +161,7 @@ function ln(e) {
|
|
|
161
161
|
let d;
|
|
162
162
|
if (i) {
|
|
163
163
|
let e = o(t.content.blocks, i);
|
|
164
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
164
|
+
if (!e || e.type !== "section" || a < 0 || a >= ln(e.columns)) return;
|
|
165
165
|
e.children[a] = e.children[a] || [], d = e.children[a];
|
|
166
166
|
} else d = t.content.blocks;
|
|
167
167
|
let [f] = s.blocks.splice(u, 1);
|
|
@@ -174,7 +174,7 @@ function ln(e) {
|
|
|
174
174
|
throw new G(`[Templatical] Templates: ${e} ${t}`);
|
|
175
175
|
}
|
|
176
176
|
function D(t) {
|
|
177
|
-
|
|
177
|
+
cn(e.onError, t);
|
|
178
178
|
}
|
|
179
179
|
function O(t) {
|
|
180
180
|
let { templates: n } = e;
|
|
@@ -274,9 +274,9 @@ function ln(e) {
|
|
|
274
274
|
}
|
|
275
275
|
//#endregion
|
|
276
276
|
//#region ../core/src/history.ts
|
|
277
|
-
var
|
|
278
|
-
function
|
|
279
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
277
|
+
var dn = 50, fn = 300, pn = 1500;
|
|
278
|
+
function mn(e) {
|
|
279
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = dn } = e, a = l([]), o = l([]), s = l(!1), c = null, u = null, d = p(() => a.value.length > 0), f = p(() => o.value.length > 0);
|
|
280
280
|
function m() {
|
|
281
281
|
return ve(t.value);
|
|
282
282
|
}
|
|
@@ -294,21 +294,21 @@ function pn(e) {
|
|
|
294
294
|
if (u && u.blockId === e) {
|
|
295
295
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
296
296
|
u = null;
|
|
297
|
-
},
|
|
297
|
+
}, fn);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
g(), h(m()), o.value = [], u = {
|
|
301
301
|
blockId: e,
|
|
302
302
|
timeoutId: setTimeout(() => {
|
|
303
303
|
u = null;
|
|
304
|
-
},
|
|
304
|
+
}, fn)
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function y() {
|
|
309
309
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
310
310
|
s.value = !1, c = null;
|
|
311
|
-
},
|
|
311
|
+
}, pn);
|
|
312
312
|
}
|
|
313
313
|
function b() {
|
|
314
314
|
if (a.value.length === 0) return;
|
|
@@ -342,7 +342,7 @@ function pn(e) {
|
|
|
342
342
|
}
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region ../core/src/block-actions.ts
|
|
345
|
-
function
|
|
345
|
+
function hn(e) {
|
|
346
346
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
347
347
|
...e,
|
|
348
348
|
id: U(),
|
|
@@ -358,7 +358,7 @@ function mn(e) {
|
|
|
358
358
|
id: U()
|
|
359
359
|
})));
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function gn(e) {
|
|
362
362
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
363
363
|
function o(n, r, a) {
|
|
364
364
|
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = fe(n, o);
|
|
@@ -366,9 +366,9 @@ function hn(e) {
|
|
|
366
366
|
}
|
|
367
367
|
function s(e, n, r) {
|
|
368
368
|
let o = JSON.parse(JSON.stringify(e));
|
|
369
|
-
if (o.id = U(),
|
|
369
|
+
if (o.id = U(), hn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
370
370
|
let t = JSON.parse(JSON.stringify(e));
|
|
371
|
-
return t.id = U(),
|
|
371
|
+
return t.id = U(), hn(t), t;
|
|
372
372
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
373
373
|
else {
|
|
374
374
|
let i = a?.(e.id) ?? null;
|
|
@@ -391,9 +391,9 @@ function hn(e) {
|
|
|
391
391
|
}
|
|
392
392
|
//#endregion
|
|
393
393
|
//#region ../core/src/auto-save.ts
|
|
394
|
-
var
|
|
395
|
-
function
|
|
396
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
394
|
+
var _n = 2e3;
|
|
395
|
+
function vn(e) {
|
|
396
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = _n, enabled: a = !0 } = e, o = null, s = !1;
|
|
397
397
|
function c() {
|
|
398
398
|
return typeof a == "function" ? a() : a;
|
|
399
399
|
}
|
|
@@ -430,7 +430,7 @@ function _n(e) {
|
|
|
430
430
|
}
|
|
431
431
|
//#endregion
|
|
432
432
|
//#region ../core/src/condition-preview.ts
|
|
433
|
-
function
|
|
433
|
+
function yn(e) {
|
|
434
434
|
let t = m(/* @__PURE__ */ new Set()), n = p(() => t.size > 0);
|
|
435
435
|
function r(e) {
|
|
436
436
|
return t.has(e);
|
|
@@ -450,7 +450,7 @@ function vn(e) {
|
|
|
450
450
|
}
|
|
451
451
|
//#endregion
|
|
452
452
|
//#region ../core/src/data-source-fetch.ts
|
|
453
|
-
function
|
|
453
|
+
function bn(e) {
|
|
454
454
|
let t = l(!1), n = l(!1), r = p(() => !!e.definition.value?.dataSource), i = p(() => r.value && !e.block.value.dataSourceFetched);
|
|
455
455
|
async function a() {
|
|
456
456
|
let r = e.definition.value;
|
|
@@ -482,7 +482,7 @@ function yn(e) {
|
|
|
482
482
|
}
|
|
483
483
|
//#endregion
|
|
484
484
|
//#region ../core/src/history-interceptor.ts
|
|
485
|
-
function
|
|
485
|
+
function xn(e, t) {
|
|
486
486
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
487
487
|
e.addBlock = (r, i, a, o) => {
|
|
488
488
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -498,7 +498,7 @@ function bn(e, t) {
|
|
|
498
498
|
}
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region ../core/src/saved-blocks.ts
|
|
501
|
-
function
|
|
501
|
+
function Sn(e) {
|
|
502
502
|
let { provider: t } = e, n = l([]), r = l(!1), i = S(() => {
|
|
503
503
|
let e = /* @__PURE__ */ new Set();
|
|
504
504
|
for (let t of n.value) {
|
|
@@ -517,7 +517,7 @@ function xn(e) {
|
|
|
517
517
|
throw new G(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
518
518
|
}
|
|
519
519
|
function f(t) {
|
|
520
|
-
|
|
520
|
+
cn(e.onError, t);
|
|
521
521
|
}
|
|
522
522
|
async function p(i) {
|
|
523
523
|
r.value = !0;
|
|
@@ -586,9 +586,9 @@ function xn(e) {
|
|
|
586
586
|
}
|
|
587
587
|
//#endregion
|
|
588
588
|
//#region ../core/src/saved-blocks-local.ts
|
|
589
|
-
var
|
|
590
|
-
function
|
|
591
|
-
let t = e.key ??
|
|
589
|
+
var Cn = "templatical:saved-blocks";
|
|
590
|
+
function wn(e = {}) {
|
|
591
|
+
let t = e.key ?? Cn;
|
|
592
592
|
function n() {
|
|
593
593
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
594
594
|
return localStorage;
|
|
@@ -640,8 +640,89 @@ function Cn(e = {}) {
|
|
|
640
640
|
};
|
|
641
641
|
}
|
|
642
642
|
//#endregion
|
|
643
|
+
//#region ../core/src/media-local.ts
|
|
644
|
+
var Tn = "templatical:media", En = 50;
|
|
645
|
+
function Dn(e = {}) {
|
|
646
|
+
let t = e.key ?? Tn;
|
|
647
|
+
function n() {
|
|
648
|
+
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with localStorage. Supply your own MediaProvider for server-side or non-browser use.");
|
|
649
|
+
return localStorage;
|
|
650
|
+
}
|
|
651
|
+
function r() {
|
|
652
|
+
let e = n().getItem(t);
|
|
653
|
+
if (!e) return [];
|
|
654
|
+
try {
|
|
655
|
+
let t = JSON.parse(e);
|
|
656
|
+
return Array.isArray(t) ? t : [];
|
|
657
|
+
} catch {
|
|
658
|
+
return [];
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
function i(e) {
|
|
662
|
+
n().setItem(t, JSON.stringify(e));
|
|
663
|
+
}
|
|
664
|
+
function a(e) {
|
|
665
|
+
return typeof FileReader > "u" ? Promise.reject(/* @__PURE__ */ Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with FileReader.")) : new Promise((t, n) => {
|
|
666
|
+
let r = new FileReader();
|
|
667
|
+
r.onload = () => {
|
|
668
|
+
if (typeof r.result != "string") {
|
|
669
|
+
n(/* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
t(r.result);
|
|
673
|
+
}, r.onerror = () => {
|
|
674
|
+
n(r.error ?? /* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
|
|
675
|
+
}, r.readAsDataURL(e);
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
return {
|
|
679
|
+
async list(e) {
|
|
680
|
+
let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
|
|
681
|
+
let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
|
|
682
|
+
return t.includes(n) || r.includes(n);
|
|
683
|
+
}) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + En), c = { items: s }, l = o + s.length;
|
|
684
|
+
return l < i.length && (c.nextCursor = String(l)), c;
|
|
685
|
+
},
|
|
686
|
+
async create(e) {
|
|
687
|
+
let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
|
|
688
|
+
id: U(),
|
|
689
|
+
url: t,
|
|
690
|
+
filename: e.filename || e.file.name,
|
|
691
|
+
createdAt: n,
|
|
692
|
+
updatedAt: n,
|
|
693
|
+
size: e.file.size
|
|
694
|
+
};
|
|
695
|
+
return e.alt !== void 0 && (o.alt = e.alt), e.file.type && (o.mimeType = e.file.type), e.folderId !== void 0 && (o.folderId = e.folderId), i([o, ...r()]), o;
|
|
696
|
+
},
|
|
697
|
+
async update(e, t) {
|
|
698
|
+
let n = r(), a = n.findIndex((t) => t.id === e);
|
|
699
|
+
if (a === -1) throw Error(`[Templatical] Media asset not found: ${e}`);
|
|
700
|
+
let o = n[a], s = {
|
|
701
|
+
...o,
|
|
702
|
+
...t,
|
|
703
|
+
id: o.id,
|
|
704
|
+
url: o.url,
|
|
705
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
706
|
+
}, c = [...n];
|
|
707
|
+
return c[a] = s, i(c), s;
|
|
708
|
+
},
|
|
709
|
+
async delete(e) {
|
|
710
|
+
let t = r();
|
|
711
|
+
for (let n of e) if (!t.some((e) => e.id === n)) throw Error(`[Templatical] Media asset not found: ${n}`);
|
|
712
|
+
let n = new Set(e);
|
|
713
|
+
i(t.filter((e) => !n.has(e.id)));
|
|
714
|
+
},
|
|
715
|
+
folders: !1,
|
|
716
|
+
replace: !1,
|
|
717
|
+
importFromUrl: !1,
|
|
718
|
+
checkUsage: !1,
|
|
719
|
+
frequentlyUsed: !1,
|
|
720
|
+
storage: !1
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
//#endregion
|
|
643
724
|
//#region ../core/src/version-history.ts
|
|
644
|
-
function
|
|
725
|
+
function On(e) {
|
|
645
726
|
let { provider: t, getTemplateId: n } = e, r = l([]), i = l(!1), a = l(void 0), o = l(!1), s = /* @__PURE__ */ new Map(), c = S(() => typeof t.create == "function"), u = S(() => typeof t.restore == "function");
|
|
646
727
|
function d(e) {
|
|
647
728
|
let t = n();
|
|
@@ -652,7 +733,7 @@ function wn(e) {
|
|
|
652
733
|
throw new G(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
653
734
|
}
|
|
654
735
|
function p(t) {
|
|
655
|
-
|
|
736
|
+
cn(e.onError, t);
|
|
656
737
|
}
|
|
657
738
|
async function m(n) {
|
|
658
739
|
let o = d("list");
|
|
@@ -721,7 +802,7 @@ function wn(e) {
|
|
|
721
802
|
}
|
|
722
803
|
//#endregion
|
|
723
804
|
//#region ../core/src/comments.ts
|
|
724
|
-
function
|
|
805
|
+
function kn(e) {
|
|
725
806
|
let { provider: t, getTemplateId: n, getUser: r } = e, i = l([]), a = l(!1), o = l(!1), s = S(() => typeof t.create == "function"), c = S(() => typeof t.update == "function"), u = S(() => typeof t.delete == "function"), d = S(() => typeof t.setResolved == "function"), f = S(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), p = S(() => i.value.filter((e) => !e.resolvedAt).length), m = S(() => {
|
|
726
807
|
let e = /* @__PURE__ */ new Map();
|
|
727
808
|
for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
@@ -752,11 +833,11 @@ function Tn(e) {
|
|
|
752
833
|
return t !== null && e.author.id === t.id;
|
|
753
834
|
}
|
|
754
835
|
function b(t) {
|
|
755
|
-
let n =
|
|
836
|
+
let n = sn(t);
|
|
756
837
|
throw e.onError?.(n), n;
|
|
757
838
|
}
|
|
758
839
|
function x(t) {
|
|
759
|
-
|
|
840
|
+
cn(e.onError, t);
|
|
760
841
|
}
|
|
761
842
|
function C(e, t, n) {
|
|
762
843
|
return [
|
|
@@ -896,7 +977,7 @@ function Tn(e) {
|
|
|
896
977
|
applyRemoteDelete: P
|
|
897
978
|
};
|
|
898
979
|
}
|
|
899
|
-
function
|
|
980
|
+
function An(e) {
|
|
900
981
|
let { comments: n, provider: r, getTemplateId: i } = e, { subscribe: a } = r;
|
|
901
982
|
if (typeof a != "function") return;
|
|
902
983
|
let o = null;
|
|
@@ -919,18 +1000,18 @@ function En(e) {
|
|
|
919
1000
|
}
|
|
920
1001
|
//#endregion
|
|
921
1002
|
//#region src/utils/activeEditorTracker.ts
|
|
922
|
-
var
|
|
923
|
-
function
|
|
924
|
-
let e = ++
|
|
925
|
-
return
|
|
1003
|
+
var jn = /* @__PURE__ */ new Set(), Q = 0, Mn = 0;
|
|
1004
|
+
function Nn() {
|
|
1005
|
+
let e = ++Mn;
|
|
1006
|
+
return jn.add(e), Q === 0 && (Q = e), {
|
|
926
1007
|
id: e,
|
|
927
|
-
isActive: () =>
|
|
1008
|
+
isActive: () => jn.size <= 1 || Q === e,
|
|
928
1009
|
claim: () => {
|
|
929
1010
|
Q = e;
|
|
930
1011
|
},
|
|
931
1012
|
dispose: () => {
|
|
932
|
-
if (
|
|
933
|
-
let e = Array.from(
|
|
1013
|
+
if (jn.delete(e), Q === e) {
|
|
1014
|
+
let e = Array.from(jn);
|
|
934
1015
|
Q = e[e.length - 1] ?? 0;
|
|
935
1016
|
}
|
|
936
1017
|
}
|
|
@@ -938,8 +1019,8 @@ function kn() {
|
|
|
938
1019
|
}
|
|
939
1020
|
//#endregion
|
|
940
1021
|
//#region src/composables/usePreviewResolution.ts
|
|
941
|
-
var
|
|
942
|
-
function
|
|
1022
|
+
var Pn = 500;
|
|
1023
|
+
function Fn(e) {
|
|
943
1024
|
let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
|
|
944
1025
|
function c() {
|
|
945
1026
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -976,7 +1057,7 @@ function jn(e) {
|
|
|
976
1057
|
}
|
|
977
1058
|
s = setTimeout(() => {
|
|
978
1059
|
s = null, u();
|
|
979
|
-
},
|
|
1060
|
+
}, Pn);
|
|
980
1061
|
}
|
|
981
1062
|
}
|
|
982
1063
|
return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -998,7 +1079,7 @@ function jn(e) {
|
|
|
998
1079
|
}
|
|
999
1080
|
//#endregion
|
|
1000
1081
|
//#region src/composables/useImageUrlResolver.ts
|
|
1001
|
-
function
|
|
1082
|
+
function In(e) {
|
|
1002
1083
|
let t = m(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
1003
1084
|
function r(e) {
|
|
1004
1085
|
return t.get(e);
|
|
@@ -1031,8 +1112,8 @@ function Mn(e) {
|
|
|
1031
1112
|
lookup: a
|
|
1032
1113
|
};
|
|
1033
1114
|
}
|
|
1034
|
-
function
|
|
1035
|
-
let r = n(
|
|
1115
|
+
function Ln(e) {
|
|
1116
|
+
let r = n(kt, null), i = S(e);
|
|
1036
1117
|
if (!r) return i;
|
|
1037
1118
|
let a;
|
|
1038
1119
|
function s() {
|
|
@@ -1061,7 +1142,7 @@ function Nn(e) {
|
|
|
1061
1142
|
}
|
|
1062
1143
|
//#endregion
|
|
1063
1144
|
//#region src/composables/useMergeTagPicker.ts
|
|
1064
|
-
function
|
|
1145
|
+
function Rn() {
|
|
1065
1146
|
let e = l(!1), t = l([]), n = null;
|
|
1066
1147
|
function r(r) {
|
|
1067
1148
|
if (n) {
|
|
@@ -1091,7 +1172,7 @@ function Pn() {
|
|
|
1091
1172
|
}
|
|
1092
1173
|
//#endregion
|
|
1093
1174
|
//#region src/composables/useLogicTagPicker.ts
|
|
1094
|
-
function
|
|
1175
|
+
function zn() {
|
|
1095
1176
|
let e = l(!1), t = l([]), n = l([]), r = null;
|
|
1096
1177
|
function i(i, a) {
|
|
1097
1178
|
if (r) {
|
|
@@ -1122,11 +1203,11 @@ function Fn() {
|
|
|
1122
1203
|
}
|
|
1123
1204
|
//#endregion
|
|
1124
1205
|
//#region src/composables/useTemplateLint.ts
|
|
1125
|
-
function
|
|
1206
|
+
function Bn(e) {
|
|
1126
1207
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1127
1208
|
}
|
|
1128
|
-
function
|
|
1129
|
-
let n = l([]), r = l(!1), i = l(!1), a = x(null), o =
|
|
1209
|
+
function Vn(e) {
|
|
1210
|
+
let n = l([]), r = l(!1), i = l(!1), a = x(null), o = Bn(e.options), s = null, c = !1;
|
|
1130
1211
|
o || u();
|
|
1131
1212
|
async function u() {
|
|
1132
1213
|
try {
|
|
@@ -1167,17 +1248,17 @@ function Ln(e) {
|
|
|
1167
1248
|
}
|
|
1168
1249
|
//#endregion
|
|
1169
1250
|
//#region src/utils/blockTypeLabels.ts
|
|
1170
|
-
function
|
|
1251
|
+
function Hn(e, t) {
|
|
1171
1252
|
return t.blocks[e] ?? e;
|
|
1172
1253
|
}
|
|
1173
|
-
function
|
|
1174
|
-
if (e.type !== "custom") return
|
|
1254
|
+
function Un(e, t, n = []) {
|
|
1255
|
+
if (e.type !== "custom") return Hn(e.type, t);
|
|
1175
1256
|
let { customType: r } = e;
|
|
1176
1257
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
1177
1258
|
}
|
|
1178
1259
|
//#endregion
|
|
1179
1260
|
//#region src/composables/useKeyboardReorder.ts
|
|
1180
|
-
function
|
|
1261
|
+
function Wn(e, t, n = []) {
|
|
1181
1262
|
let r = l(null), i = l(""), a = null;
|
|
1182
1263
|
function o(t) {
|
|
1183
1264
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1204,7 +1285,7 @@ function Bn(e, t, n = []) {
|
|
|
1204
1285
|
let i = o(r);
|
|
1205
1286
|
if (!i) return "";
|
|
1206
1287
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
1207
|
-
return a ?
|
|
1288
|
+
return a ? Un(a, t.t, n) : "";
|
|
1208
1289
|
}
|
|
1209
1290
|
function c(t, n) {
|
|
1210
1291
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1273,13 +1354,13 @@ function Bn(e, t, n = []) {
|
|
|
1273
1354
|
}
|
|
1274
1355
|
//#endregion
|
|
1275
1356
|
//#region src/composables/useUiTheme.ts
|
|
1276
|
-
function
|
|
1357
|
+
function Gn(e) {
|
|
1277
1358
|
let t = He("(prefers-color-scheme: dark)");
|
|
1278
1359
|
return { resolvedTheme: S(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1279
1360
|
}
|
|
1280
1361
|
//#endregion
|
|
1281
1362
|
//#region src/composables/useThemeStyles.ts
|
|
1282
|
-
var
|
|
1363
|
+
var Kn = {
|
|
1283
1364
|
bg: "--tpl-bg",
|
|
1284
1365
|
bgElevated: "--tpl-bg-elevated",
|
|
1285
1366
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1303,10 +1384,10 @@ var Hn = {
|
|
|
1303
1384
|
dangerLight: "--tpl-danger-light",
|
|
1304
1385
|
canvasBg: "--tpl-canvas-bg"
|
|
1305
1386
|
};
|
|
1306
|
-
function
|
|
1387
|
+
function qn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1307
1388
|
return { themeStyles: S(() => {
|
|
1308
1389
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1309
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1390
|
+
if (a) for (let [e, t] of Object.entries(Kn)) {
|
|
1310
1391
|
let n = a[e];
|
|
1311
1392
|
n && (r[t] = n);
|
|
1312
1393
|
}
|
|
@@ -1315,7 +1396,7 @@ function Un({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1315
1396
|
}
|
|
1316
1397
|
//#endregion
|
|
1317
1398
|
//#region src/composables/useBlockRegistry.ts
|
|
1318
|
-
function
|
|
1399
|
+
function Jn() {
|
|
1319
1400
|
let e = x(/* @__PURE__ */ new Map());
|
|
1320
1401
|
function t(t, n) {
|
|
1321
1402
|
e.value.set(t, n), T(e);
|
|
@@ -1373,9 +1454,9 @@ function Wn() {
|
|
|
1373
1454
|
}
|
|
1374
1455
|
//#endregion
|
|
1375
1456
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1376
|
-
function
|
|
1457
|
+
function Yn(e, t) {
|
|
1377
1458
|
return S(() => {
|
|
1378
|
-
let n =
|
|
1459
|
+
let n = Xn(e.value.blocks);
|
|
1379
1460
|
if (n.size === 0) return [];
|
|
1380
1461
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1381
1462
|
for (let e of n) {
|
|
@@ -1387,11 +1468,11 @@ function Gn(e, t) {
|
|
|
1387
1468
|
return i;
|
|
1388
1469
|
});
|
|
1389
1470
|
}
|
|
1390
|
-
function
|
|
1471
|
+
function Xn(e) {
|
|
1391
1472
|
let t = /* @__PURE__ */ new Set();
|
|
1392
|
-
return
|
|
1473
|
+
return Zn(e, t), t;
|
|
1393
1474
|
}
|
|
1394
|
-
function
|
|
1475
|
+
function Zn(e, t) {
|
|
1395
1476
|
for (let n of e) {
|
|
1396
1477
|
if (he(n)) {
|
|
1397
1478
|
t.add(n.customType);
|
|
@@ -1400,13 +1481,13 @@ function qn(e, t) {
|
|
|
1400
1481
|
if (n.type === "section") {
|
|
1401
1482
|
let e = n.children;
|
|
1402
1483
|
if (!e) continue;
|
|
1403
|
-
for (let n of e)
|
|
1484
|
+
for (let n of e) Zn(n, t);
|
|
1404
1485
|
}
|
|
1405
1486
|
}
|
|
1406
1487
|
}
|
|
1407
1488
|
//#endregion
|
|
1408
1489
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1409
|
-
var
|
|
1490
|
+
var Qn = [
|
|
1410
1491
|
{
|
|
1411
1492
|
type: "section",
|
|
1412
1493
|
createBlock: we
|
|
@@ -1460,8 +1541,8 @@ var Jn = [
|
|
|
1460
1541
|
createBlock: Ie
|
|
1461
1542
|
}
|
|
1462
1543
|
];
|
|
1463
|
-
function
|
|
1464
|
-
for (let n of
|
|
1544
|
+
function $n(e, t) {
|
|
1545
|
+
for (let n of Qn) {
|
|
1465
1546
|
let r = t[n.type];
|
|
1466
1547
|
r && e.registerBuiltIn(n.type, {
|
|
1467
1548
|
component: r,
|
|
@@ -1471,12 +1552,12 @@ function Yn(e, t) {
|
|
|
1471
1552
|
}
|
|
1472
1553
|
//#endregion
|
|
1473
1554
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1474
|
-
function
|
|
1555
|
+
function er(e) {
|
|
1475
1556
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1476
1557
|
}
|
|
1477
1558
|
//#endregion
|
|
1478
1559
|
//#region src/utils/templateSettingsFields.ts
|
|
1479
|
-
var
|
|
1560
|
+
var tr = {
|
|
1480
1561
|
width: "layout",
|
|
1481
1562
|
backgroundColor: "appearance",
|
|
1482
1563
|
textColor: "appearance",
|
|
@@ -1486,14 +1567,14 @@ var Zn = {
|
|
|
1486
1567
|
locale: "language",
|
|
1487
1568
|
direction: "language",
|
|
1488
1569
|
preheaderText: "preheader"
|
|
1489
|
-
},
|
|
1490
|
-
function
|
|
1491
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1570
|
+
}, nr = Object.keys(tr);
|
|
1571
|
+
function rr(e) {
|
|
1572
|
+
return Object.prototype.hasOwnProperty.call(tr, e);
|
|
1492
1573
|
}
|
|
1493
|
-
function
|
|
1574
|
+
function ir(e) {
|
|
1494
1575
|
let t = e?.fields;
|
|
1495
1576
|
if (t === void 0 || t === !0) return {
|
|
1496
|
-
fields: new Set(
|
|
1577
|
+
fields: new Set(nr),
|
|
1497
1578
|
unknown: []
|
|
1498
1579
|
};
|
|
1499
1580
|
if (t === !1) return {
|
|
@@ -1501,7 +1582,7 @@ function er(e) {
|
|
|
1501
1582
|
unknown: []
|
|
1502
1583
|
};
|
|
1503
1584
|
let n = /* @__PURE__ */ new Set(), r = [];
|
|
1504
|
-
for (let e of t)
|
|
1585
|
+
for (let e of t) rr(e) ? n.add(e) : r.push(String(e));
|
|
1505
1586
|
return {
|
|
1506
1587
|
fields: n,
|
|
1507
1588
|
unknown: r
|
|
@@ -1509,18 +1590,18 @@ function er(e) {
|
|
|
1509
1590
|
}
|
|
1510
1591
|
//#endregion
|
|
1511
1592
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1512
|
-
function
|
|
1593
|
+
function ar(e) {
|
|
1513
1594
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1514
1595
|
}
|
|
1515
|
-
function
|
|
1516
|
-
let r = new Set(e.map((e) =>
|
|
1517
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1596
|
+
function or(e, t, n) {
|
|
1597
|
+
let r = new Set(e.map((e) => Ft(e))), i = [], a = (e, t) => {
|
|
1598
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Ft(o)) && i.push(`${t}.${n}: ${o}`) : ar(o) && a(o, `${t}.${n}`);
|
|
1518
1599
|
}, o = t;
|
|
1519
1600
|
for (let [e, t] of Object.entries(ee)) {
|
|
1520
1601
|
let n = o?.[e];
|
|
1521
1602
|
a({
|
|
1522
1603
|
...t,
|
|
1523
|
-
...
|
|
1604
|
+
...ar(n) ? n : {}
|
|
1524
1605
|
}, e);
|
|
1525
1606
|
}
|
|
1526
1607
|
return a({
|
|
@@ -1530,7 +1611,7 @@ function nr(e, t, n) {
|
|
|
1530
1611
|
}
|
|
1531
1612
|
//#endregion
|
|
1532
1613
|
//#region src/utils/localizedBlockDefaults.ts
|
|
1533
|
-
function
|
|
1614
|
+
function sr(e) {
|
|
1534
1615
|
return {
|
|
1535
1616
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1536
1617
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -1539,7 +1620,7 @@ function rr(e) {
|
|
|
1539
1620
|
}
|
|
1540
1621
|
//#endregion
|
|
1541
1622
|
//#region src/i18n/index.ts
|
|
1542
|
-
var
|
|
1623
|
+
var cr = /* #__PURE__ */ Object.assign({
|
|
1543
1624
|
"./locales/ca.ts": () => import("./ca-D9S-UCfZ.js"),
|
|
1544
1625
|
"./locales/de.ts": () => import("./de-BUPszLpi.js"),
|
|
1545
1626
|
"./locales/en.ts": () => import("./en-BbOC5x3w.js"),
|
|
@@ -1547,50 +1628,50 @@ var ir = /* #__PURE__ */ Object.assign({
|
|
|
1547
1628
|
"./locales/fr.ts": () => import("./fr-Brr8mJ9e.js"),
|
|
1548
1629
|
"./locales/nl.ts": () => import("./nl-Co3_RL0M.js"),
|
|
1549
1630
|
"./locales/pt-BR.ts": () => import("./pt-BR-BECez5b0.js")
|
|
1550
|
-
}),
|
|
1631
|
+
}), lr = /* #__PURE__ */ Object.assign({
|
|
1551
1632
|
"./locales/cloud/de.ts": () => import("./de-BytZwgn6.js"),
|
|
1552
1633
|
"./locales/cloud/en.ts": () => import("./en-DyOSV0lY.js"),
|
|
1553
1634
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-C1WLSGDh.js")
|
|
1554
1635
|
});
|
|
1555
|
-
function
|
|
1636
|
+
function ur(e) {
|
|
1556
1637
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1557
1638
|
}
|
|
1558
|
-
var
|
|
1559
|
-
function
|
|
1639
|
+
var dr = ur(cr), fr = ur(lr);
|
|
1640
|
+
function pr(e) {
|
|
1560
1641
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1561
1642
|
}
|
|
1562
|
-
function
|
|
1563
|
-
let n =
|
|
1564
|
-
return t.find((e) =>
|
|
1643
|
+
function mr(e, t) {
|
|
1644
|
+
let n = pr(e);
|
|
1645
|
+
return t.find((e) => pr(e) === n);
|
|
1565
1646
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return
|
|
1647
|
+
function hr(e) {
|
|
1648
|
+
return pr(e).split("-")[0];
|
|
1568
1649
|
}
|
|
1569
|
-
function
|
|
1570
|
-
return
|
|
1650
|
+
function gr(e, t) {
|
|
1651
|
+
return mr(e, t) ?? mr(hr(e), t);
|
|
1571
1652
|
}
|
|
1572
|
-
function
|
|
1573
|
-
return
|
|
1653
|
+
function _r(e, t) {
|
|
1654
|
+
return gr(e, t) ?? "en";
|
|
1574
1655
|
}
|
|
1575
|
-
async function
|
|
1576
|
-
let t =
|
|
1656
|
+
async function vr(e) {
|
|
1657
|
+
let t = cr[`./locales/${_r(e, dr)}.ts`];
|
|
1577
1658
|
return (await t()).default;
|
|
1578
1659
|
}
|
|
1579
|
-
async function
|
|
1580
|
-
let t =
|
|
1660
|
+
async function yr(e) {
|
|
1661
|
+
let t = lr[`./locales/cloud/${_r(e, fr)}.ts`];
|
|
1581
1662
|
return (await t()).default;
|
|
1582
1663
|
}
|
|
1583
|
-
function
|
|
1584
|
-
return
|
|
1664
|
+
function br(e) {
|
|
1665
|
+
return gr(e, dr) !== void 0;
|
|
1585
1666
|
}
|
|
1586
|
-
function
|
|
1587
|
-
return
|
|
1667
|
+
function xr(e) {
|
|
1668
|
+
return gr(e, fr) !== void 0;
|
|
1588
1669
|
}
|
|
1589
|
-
function
|
|
1590
|
-
return [...
|
|
1670
|
+
function Sr() {
|
|
1671
|
+
return [...dr];
|
|
1591
1672
|
}
|
|
1592
|
-
function
|
|
1593
|
-
return [...
|
|
1673
|
+
function Cr() {
|
|
1674
|
+
return [...fr];
|
|
1594
1675
|
}
|
|
1595
1676
|
//#endregion
|
|
1596
1677
|
//#region src/i18n/contentDefaults.ts
|
|
@@ -1651,16 +1732,16 @@ var $ = {
|
|
|
1651
1732
|
seconds: "Segons",
|
|
1652
1733
|
expired: "Aquesta oferta ha caducat"
|
|
1653
1734
|
}
|
|
1654
|
-
},
|
|
1655
|
-
function
|
|
1735
|
+
}, wr = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
|
|
1736
|
+
function Tr(e) {
|
|
1656
1737
|
if (!e) return $.en;
|
|
1657
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1738
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = wr.get(t);
|
|
1658
1739
|
if (n) return $[n];
|
|
1659
|
-
let r =
|
|
1740
|
+
let r = wr.get(hr(t));
|
|
1660
1741
|
return r ? $[r] : $.en;
|
|
1661
1742
|
}
|
|
1662
|
-
function
|
|
1663
|
-
let t =
|
|
1743
|
+
function Er(e) {
|
|
1744
|
+
let t = Tr(e);
|
|
1664
1745
|
return {
|
|
1665
1746
|
video: { alt: t.video },
|
|
1666
1747
|
countdown: {
|
|
@@ -1674,8 +1755,8 @@ function Sr(e) {
|
|
|
1674
1755
|
}
|
|
1675
1756
|
//#endregion
|
|
1676
1757
|
//#region src/utils/resolveFieldColors.ts
|
|
1677
|
-
function
|
|
1678
|
-
let n =
|
|
1758
|
+
function Dr(e, t) {
|
|
1759
|
+
let n = Pt({ presets: e.presets }, Mt), r = n.presets.length === 0;
|
|
1679
1760
|
return {
|
|
1680
1761
|
presets: r ? t.presets : n.presets,
|
|
1681
1762
|
allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
|
|
@@ -1687,9 +1768,9 @@ function Cr(e, t) {
|
|
|
1687
1768
|
}
|
|
1688
1769
|
//#endregion
|
|
1689
1770
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1690
|
-
function
|
|
1771
|
+
function Or(e, t) {
|
|
1691
1772
|
let n = [], r = (r, i) => {
|
|
1692
|
-
let a =
|
|
1773
|
+
let a = Dr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1693
1774
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1694
1775
|
id: s("invalid-presets"),
|
|
1695
1776
|
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." : "")
|
|
@@ -1700,8 +1781,8 @@ function wr(e, t) {
|
|
|
1700
1781
|
id: s("allow-custom-ignored"),
|
|
1701
1782
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1702
1783
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1703
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1704
|
-
e !== "" && !t.has(
|
|
1784
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Ft(e)));
|
|
1785
|
+
e !== "" && !t.has(Ft(e)) && n.push({
|
|
1705
1786
|
id: s("off-palette-default"),
|
|
1706
1787
|
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.`
|
|
1707
1788
|
});
|
|
@@ -1713,7 +1794,7 @@ function wr(e, t) {
|
|
|
1713
1794
|
}
|
|
1714
1795
|
//#endregion
|
|
1715
1796
|
//#region src/utils/keyboardShortcuts.ts
|
|
1716
|
-
function
|
|
1797
|
+
function kr(e) {
|
|
1717
1798
|
for (let t of e.composedPath()) {
|
|
1718
1799
|
if (!(t instanceof HTMLElement)) continue;
|
|
1719
1800
|
if (t.isContentEditable) return !0;
|
|
@@ -1722,18 +1803,18 @@ function Tr(e) {
|
|
|
1722
1803
|
}
|
|
1723
1804
|
return !1;
|
|
1724
1805
|
}
|
|
1725
|
-
function
|
|
1806
|
+
function Ar(e, t) {
|
|
1726
1807
|
let n = e.metaKey || e.ctrlKey;
|
|
1727
1808
|
if (n && e.key.toLowerCase() === "s") {
|
|
1728
1809
|
e.preventDefault(), t.onSave?.();
|
|
1729
1810
|
return;
|
|
1730
1811
|
}
|
|
1731
1812
|
if (n && e.key.toLowerCase() === "z") {
|
|
1732
|
-
if (
|
|
1813
|
+
if (kr(e)) return;
|
|
1733
1814
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1734
1815
|
return;
|
|
1735
1816
|
}
|
|
1736
|
-
if (t.isPicking?.() && !
|
|
1817
|
+
if (t.isPicking?.() && !kr(e)) {
|
|
1737
1818
|
if (e.key === "Escape") {
|
|
1738
1819
|
e.preventDefault(), t.onCancelPick?.();
|
|
1739
1820
|
return;
|
|
@@ -1751,11 +1832,11 @@ function Er(e, t) {
|
|
|
1751
1832
|
t.selectBlock(null);
|
|
1752
1833
|
return;
|
|
1753
1834
|
}
|
|
1754
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1835
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !kr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1755
1836
|
}
|
|
1756
1837
|
//#endregion
|
|
1757
1838
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1758
|
-
function
|
|
1839
|
+
function jr(e, t, n, r = !1) {
|
|
1759
1840
|
if (!e) return [];
|
|
1760
1841
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1761
1842
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1789,20 +1870,20 @@ function Dr(e, t, n, r = !1) {
|
|
|
1789
1870
|
}
|
|
1790
1871
|
//#endregion
|
|
1791
1872
|
//#region src/components/MergeTagPreviewText.vue
|
|
1792
|
-
var
|
|
1873
|
+
var Mr = d({
|
|
1793
1874
|
name: "MergeTagPreviewText",
|
|
1794
1875
|
props: { text: {
|
|
1795
1876
|
type: String,
|
|
1796
1877
|
required: !0
|
|
1797
1878
|
} },
|
|
1798
1879
|
setup(e) {
|
|
1799
|
-
let t = n(q, []), r = n(
|
|
1880
|
+
let t = n(q, []), r = n(et, Me.liquid), i = n(J, null), a = S(() => jr(e.text, t, r, i?.value ?? !1));
|
|
1800
1881
|
return () => a.value.map((e, t) => e.type === "tag" ? z("span", {
|
|
1801
1882
|
key: t,
|
|
1802
1883
|
class: "tpl-merge-tag-label"
|
|
1803
1884
|
}, e.value) : e.value);
|
|
1804
1885
|
}
|
|
1805
|
-
}),
|
|
1886
|
+
}), Nr = ["href"], Pr = /* @__PURE__ */ d({
|
|
1806
1887
|
__name: "ButtonBlock",
|
|
1807
1888
|
props: {
|
|
1808
1889
|
block: {},
|
|
@@ -1828,13 +1909,13 @@ var Or = d({
|
|
|
1828
1909
|
style: k(n.value),
|
|
1829
1910
|
class: "tpl:cursor-default",
|
|
1830
1911
|
onClick: i[0] ||= O(() => {}, ["prevent"])
|
|
1831
|
-
}, [v(
|
|
1912
|
+
}, [v(Mr, { text: e.block.text }, null, 8, ["text"])], 12, Nr)], 4));
|
|
1832
1913
|
}
|
|
1833
|
-
}),
|
|
1914
|
+
}), Fr = ["innerHTML"], Ir = [
|
|
1834
1915
|
"src",
|
|
1835
1916
|
"width",
|
|
1836
1917
|
"height"
|
|
1837
|
-
],
|
|
1918
|
+
], Lr = /* @__PURE__ */ d({
|
|
1838
1919
|
__name: "CustomBlockIcon",
|
|
1839
1920
|
props: {
|
|
1840
1921
|
icon: {},
|
|
@@ -1850,24 +1931,24 @@ var Or = d({
|
|
|
1850
1931
|
height: `${n.value}px`
|
|
1851
1932
|
}),
|
|
1852
1933
|
innerHTML: e.icon
|
|
1853
|
-
}, null, 12,
|
|
1934
|
+
}, null, 12, Fr)) : i.value ? (s(), C("img", {
|
|
1854
1935
|
key: 1,
|
|
1855
1936
|
src: e.icon,
|
|
1856
1937
|
width: n.value,
|
|
1857
1938
|
height: n.value,
|
|
1858
1939
|
class: "tpl:inline-block",
|
|
1859
1940
|
alt: ""
|
|
1860
|
-
}, null, 8,
|
|
1941
|
+
}, null, 8, Ir)) : (s(), A(_(en), {
|
|
1861
1942
|
key: 2,
|
|
1862
1943
|
size: n.value,
|
|
1863
1944
|
"stroke-width": 1.5
|
|
1864
1945
|
}, null, 8, ["size"]));
|
|
1865
1946
|
}
|
|
1866
|
-
}),
|
|
1867
|
-
function
|
|
1868
|
-
let r =
|
|
1947
|
+
}), Rr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1948
|
+
function zr(e, n) {
|
|
1949
|
+
let r = rn(), i = null, a = null, o = null;
|
|
1869
1950
|
function s() {
|
|
1870
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1951
|
+
return e.value ? Array.from(e.value.querySelectorAll(Rr)).filter((e) => e.offsetParent !== null) : [];
|
|
1871
1952
|
}
|
|
1872
1953
|
function c(e) {
|
|
1873
1954
|
if (e.key !== "Tab") return;
|
|
@@ -1897,7 +1978,7 @@ function Fr(e, n) {
|
|
|
1897
1978
|
}
|
|
1898
1979
|
//#endregion
|
|
1899
1980
|
//#region src/composables/useEmoji.ts
|
|
1900
|
-
function
|
|
1981
|
+
function Br() {
|
|
1901
1982
|
let [e, n] = Be(!1), r = x([]), i = !1;
|
|
1902
1983
|
h(() => {
|
|
1903
1984
|
i = !0;
|
|
@@ -1923,7 +2004,7 @@ function Ir() {
|
|
|
1923
2004
|
}
|
|
1924
2005
|
//#endregion
|
|
1925
2006
|
//#region src/composables/useFonts.ts
|
|
1926
|
-
var
|
|
2007
|
+
var Vr = [
|
|
1927
2008
|
{
|
|
1928
2009
|
value: "Arial",
|
|
1929
2010
|
label: "Arial"
|
|
@@ -1952,7 +2033,7 @@ var Lr = [
|
|
|
1952
2033
|
value: "Courier New",
|
|
1953
2034
|
label: "Courier New"
|
|
1954
2035
|
}
|
|
1955
|
-
],
|
|
2036
|
+
], Hr = {
|
|
1956
2037
|
arial: "Arial, sans-serif",
|
|
1957
2038
|
helvetica: "Helvetica, sans-serif",
|
|
1958
2039
|
georgia: "Georgia, serif",
|
|
@@ -1960,23 +2041,23 @@ var Lr = [
|
|
|
1960
2041
|
verdana: "Verdana, sans-serif",
|
|
1961
2042
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1962
2043
|
"courier new": "'Courier New', monospace"
|
|
1963
|
-
},
|
|
1964
|
-
function
|
|
1965
|
-
if (e === void 0 || e === !0) return [...
|
|
2044
|
+
}, Ur = "Arial, sans-serif";
|
|
2045
|
+
function Wr(e) {
|
|
2046
|
+
if (e === void 0 || e === !0) return [...Vr];
|
|
1966
2047
|
if (e === !1) return [];
|
|
1967
2048
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1968
2049
|
for (let i of e) {
|
|
1969
|
-
let e = i.toLowerCase(), a =
|
|
2050
|
+
let e = i.toLowerCase(), a = Vr.find((t) => t.value.toLowerCase() === e);
|
|
1970
2051
|
if (!a) {
|
|
1971
|
-
r.has(e) || (r.add(e), Z.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${
|
|
2052
|
+
r.has(e) || (r.add(e), Z.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Vr.map((e) => e.value).join(", ")}.`));
|
|
1972
2053
|
continue;
|
|
1973
2054
|
}
|
|
1974
2055
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1975
2056
|
}
|
|
1976
2057
|
return t;
|
|
1977
2058
|
}
|
|
1978
|
-
function
|
|
1979
|
-
let t = l(e?.customFonts ?? []), n = l(!1), r =
|
|
2059
|
+
function Gr(e) {
|
|
2060
|
+
let t = l(e?.customFonts ?? []), n = l(!1), r = Wr(e?.builtIns), i = S(() => e?.defaultFallback ?? Ur), a = S(() => {
|
|
1980
2061
|
let e = [...r], n = t.value.map((e) => ({
|
|
1981
2062
|
value: e.name,
|
|
1982
2063
|
label: e.name,
|
|
@@ -1987,20 +2068,20 @@ function Vr(e) {
|
|
|
1987
2068
|
function s(e) {
|
|
1988
2069
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1989
2070
|
}
|
|
1990
|
-
let c = e?.defaultFont ??
|
|
2071
|
+
let c = e?.defaultFont ?? Ur.split(",")[0].trim();
|
|
1991
2072
|
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.`);
|
|
1992
2073
|
function u() {
|
|
1993
2074
|
if (e?.defaultFont && s(e.defaultFont)) {
|
|
1994
2075
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1995
2076
|
if (t) return t.value;
|
|
1996
2077
|
}
|
|
1997
|
-
return
|
|
2078
|
+
return Ur;
|
|
1998
2079
|
}
|
|
1999
2080
|
let d = S(() => u());
|
|
2000
2081
|
function f(e) {
|
|
2001
2082
|
if (!e) return i.value;
|
|
2002
2083
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2003
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2084
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Hr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2004
2085
|
}
|
|
2005
2086
|
let p = [], m = !1;
|
|
2006
2087
|
async function g() {
|
|
@@ -2041,8 +2122,8 @@ function Vr(e) {
|
|
|
2041
2122
|
}
|
|
2042
2123
|
//#endregion
|
|
2043
2124
|
//#region src/composables/useLogicTag.ts
|
|
2044
|
-
function
|
|
2045
|
-
let e = n(
|
|
2125
|
+
function Kr() {
|
|
2126
|
+
let e = n(Ot, []), t = n(Ke, []), r = n(et, Me.liquid), i = n(tt, null), a = n(ot, null), o = n(qe, null) ?? l(!1), s = !!i || e.length > 0 || t.length > 0, c = e.length > 0 || t.length > 0;
|
|
2046
2127
|
async function u() {
|
|
2047
2128
|
if (i) {
|
|
2048
2129
|
o.value = !0;
|
|
@@ -2073,7 +2154,7 @@ function Hr() {
|
|
|
2073
2154
|
}
|
|
2074
2155
|
//#endregion
|
|
2075
2156
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
2076
|
-
function
|
|
2157
|
+
function qr(e, t, n) {
|
|
2077
2158
|
return ye(e, n) ? {
|
|
2078
2159
|
type: "logicMergeTagNode",
|
|
2079
2160
|
attrs: {
|
|
@@ -2090,15 +2171,15 @@ function Ur(e, t, n) {
|
|
|
2090
2171
|
}
|
|
2091
2172
|
//#endregion
|
|
2092
2173
|
//#region src/utils/insertLogicTag.ts
|
|
2093
|
-
function
|
|
2174
|
+
function Jr(e) {
|
|
2094
2175
|
return "before" in e && "after" in e;
|
|
2095
2176
|
}
|
|
2096
|
-
function
|
|
2097
|
-
if (!
|
|
2098
|
-
e.chain().focus().insertContent(
|
|
2177
|
+
function Yr(e, t, n) {
|
|
2178
|
+
if (!Jr(t)) {
|
|
2179
|
+
e.chain().focus().insertContent(qr(t.value, t.label, n)).run();
|
|
2099
2180
|
return;
|
|
2100
2181
|
}
|
|
2101
|
-
let r =
|
|
2182
|
+
let r = qr(t.before, t.label, n), i = qr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
2102
2183
|
if (a !== o) {
|
|
2103
2184
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
2104
2185
|
return;
|
|
@@ -2107,20 +2188,20 @@ function Gr(e, t, n) {
|
|
|
2107
2188
|
}
|
|
2108
2189
|
//#endregion
|
|
2109
2190
|
//#region src/utils/linkColorExtension.ts
|
|
2110
|
-
function
|
|
2191
|
+
function Xr(e) {
|
|
2111
2192
|
if (!e) return null;
|
|
2112
2193
|
let t = e.trim();
|
|
2113
2194
|
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;
|
|
2114
2195
|
}
|
|
2115
|
-
function
|
|
2196
|
+
function Zr(e) {
|
|
2116
2197
|
return e.extend({ addAttributes() {
|
|
2117
2198
|
return {
|
|
2118
2199
|
...this.parent?.(),
|
|
2119
2200
|
color: {
|
|
2120
2201
|
default: null,
|
|
2121
|
-
parseHTML: (e) =>
|
|
2202
|
+
parseHTML: (e) => Xr(Nt(e.style.color)),
|
|
2122
2203
|
renderHTML: (e) => {
|
|
2123
|
-
let t =
|
|
2204
|
+
let t = Xr(e.color);
|
|
2124
2205
|
return t ? { style: `color: ${t}` } : {};
|
|
2125
2206
|
}
|
|
2126
2207
|
}
|
|
@@ -2129,9 +2210,9 @@ function qr(e) {
|
|
|
2129
2210
|
}
|
|
2130
2211
|
//#endregion
|
|
2131
2212
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2132
|
-
function
|
|
2213
|
+
function Qr(e, t = Me.liquid) {
|
|
2133
2214
|
let n = l(!1), r = l(""), i = l(""), a = l(null);
|
|
2134
|
-
|
|
2215
|
+
zr(a, n);
|
|
2135
2216
|
function o() {
|
|
2136
2217
|
let t = e.value?.getAttributes("link") ?? {};
|
|
2137
2218
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -2140,7 +2221,7 @@ function Jr(e, t = Me.liquid) {
|
|
|
2140
2221
|
if (r.value) {
|
|
2141
2222
|
let t = d(r.value);
|
|
2142
2223
|
if (t !== null) {
|
|
2143
|
-
let n =
|
|
2224
|
+
let n = Xr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
2144
2225
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
2145
2226
|
}
|
|
2146
2227
|
}
|
|
@@ -2190,13 +2271,13 @@ function Jr(e, t = Me.liquid) {
|
|
|
2190
2271
|
}
|
|
2191
2272
|
//#endregion
|
|
2192
2273
|
//#region src/composables/useRichTextEditor.ts
|
|
2193
|
-
function
|
|
2194
|
-
let i = n(
|
|
2274
|
+
function $r(r) {
|
|
2275
|
+
let i = n(Y, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = an(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Kr(), h = n(Ye, null), g = (N(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = Ee(u), v = x(null), y = () => de(i?.content?.value?.settings ?? { locale: "en" });
|
|
2195
2276
|
t(y, (e) => {
|
|
2196
2277
|
let t = v.value?.view.dom;
|
|
2197
2278
|
t && t.setAttribute("dir", e);
|
|
2198
2279
|
});
|
|
2199
|
-
let { showLinkDialog: b, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } =
|
|
2280
|
+
let { showLinkDialog: b, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Qr(v, u), { start: A, stop: j } = Re(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), M = x(null), P = l(!0), F = l(null), I = !1;
|
|
2200
2281
|
async function L() {
|
|
2201
2282
|
F.value = null, P.value = !0;
|
|
2202
2283
|
try {
|
|
@@ -2257,7 +2338,7 @@ function Yr(r) {
|
|
|
2257
2338
|
}
|
|
2258
2339
|
async function H() {
|
|
2259
2340
|
let e = await m();
|
|
2260
|
-
I || (e && v.value ?
|
|
2341
|
+
I || (e && v.value ? Yr(v.value, e, u) : v.value?.commands.focus());
|
|
2261
2342
|
}
|
|
2262
2343
|
return {
|
|
2263
2344
|
editor: v,
|
|
@@ -2286,9 +2367,9 @@ function Yr(r) {
|
|
|
2286
2367
|
}
|
|
2287
2368
|
//#endregion
|
|
2288
2369
|
//#region src/composables/useSmallScreenNotice.ts
|
|
2289
|
-
var
|
|
2290
|
-
function
|
|
2291
|
-
let t = He(
|
|
2370
|
+
var ei = "(max-width: 767px)";
|
|
2371
|
+
function ti(e) {
|
|
2372
|
+
let t = He(ei);
|
|
2292
2373
|
return {
|
|
2293
2374
|
isSmallScreen: t,
|
|
2294
2375
|
showNotice: S(() => (P(e) ?? !0) && t.value)
|
|
@@ -2296,20 +2377,20 @@ function Zr(e) {
|
|
|
2296
2377
|
}
|
|
2297
2378
|
//#endregion
|
|
2298
2379
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2299
|
-
var
|
|
2380
|
+
var ni = { class: "tpl:w-full" }, ri = {
|
|
2300
2381
|
key: 0,
|
|
2301
2382
|
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)]"
|
|
2302
|
-
},
|
|
2383
|
+
}, ii = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ai = {
|
|
2303
2384
|
key: 1,
|
|
2304
2385
|
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)]"
|
|
2305
|
-
},
|
|
2386
|
+
}, oi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, si = {
|
|
2306
2387
|
key: 2,
|
|
2307
2388
|
class: "tpl:relative"
|
|
2308
|
-
},
|
|
2389
|
+
}, ci = ["innerHTML"], li = {
|
|
2309
2390
|
key: 0,
|
|
2310
2391
|
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]",
|
|
2311
2392
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2312
|
-
},
|
|
2393
|
+
}, ui = /* @__PURE__ */ d({
|
|
2313
2394
|
__name: "CustomBlock",
|
|
2314
2395
|
props: {
|
|
2315
2396
|
block: {},
|
|
@@ -2317,7 +2398,7 @@ var Qr = { class: "tpl:w-full" }, $r = {
|
|
|
2317
2398
|
},
|
|
2318
2399
|
emits: ["fetchData"],
|
|
2319
2400
|
setup(e, { emit: r }) {
|
|
2320
|
-
let i = e, a = r, { t: o } = X(), c = n(
|
|
2401
|
+
let i = e, a = r, { t: o } = X(), c = n(Et, null), u = l(""), d = l(!1), f = S(() => c?.getDefinition(i.block.customType)), p = S(() => !!f.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: y } = bn({
|
|
2321
2402
|
definition: f,
|
|
2322
2403
|
block: S(() => i.block),
|
|
2323
2404
|
onUpdate: (e, t) => {
|
|
@@ -2326,7 +2407,7 @@ var Qr = { class: "tpl:w-full" }, $r = {
|
|
|
2326
2407
|
dataSourceFetched: t
|
|
2327
2408
|
});
|
|
2328
2409
|
}
|
|
2329
|
-
}), b = n(q, []), x = n(
|
|
2410
|
+
}), b = n(q, []), x = n(J, null), T = S(() => {
|
|
2330
2411
|
if (!x?.value) return i.block;
|
|
2331
2412
|
let e = {};
|
|
2332
2413
|
for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ge(n, b) : n;
|
|
@@ -2353,10 +2434,10 @@ var Qr = { class: "tpl:w-full" }, $r = {
|
|
|
2353
2434
|
k();
|
|
2354
2435
|
}, { deep: !0 }), t(() => x?.value, () => {
|
|
2355
2436
|
k();
|
|
2356
|
-
}), (e, t) => (s(), C("div",
|
|
2437
|
+
}), (e, t) => (s(), C("div", ni, [p.value ? d.value ? (s(), C("div", ai, [v(_(Zt), {
|
|
2357
2438
|
size: 24,
|
|
2358
2439
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2359
|
-
}), M("span",
|
|
2440
|
+
}), M("span", oi, R(_(o).customBlocks.renderError), 1)])) : (s(), C("div", si, [M("div", { innerHTML: u.value }, null, 8, ci), _(y) && _(g) ? (s(), C("div", li, [_(m) ? (s(), A(tn, {
|
|
2360
2441
|
key: 1,
|
|
2361
2442
|
class: "tpl:w-48"
|
|
2362
2443
|
})) : (s(), C("button", {
|
|
@@ -2364,16 +2445,16 @@ var Qr = { class: "tpl:w-full" }, $r = {
|
|
|
2364
2445
|
type: "button",
|
|
2365
2446
|
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)]",
|
|
2366
2447
|
onClick: t[0] ||= O((...e) => _(h) && _(h)(...e), ["stop"])
|
|
2367
|
-
}, [f.value?.icon ? (s(), A(
|
|
2448
|
+
}, [f.value?.icon ? (s(), A(Lr, {
|
|
2368
2449
|
key: 0,
|
|
2369
2450
|
icon: f.value.icon,
|
|
2370
2451
|
size: 16
|
|
2371
|
-
}, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div",
|
|
2452
|
+
}, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div", ri, [v(_(Bt), {
|
|
2372
2453
|
size: 24,
|
|
2373
2454
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2374
|
-
}), M("span",
|
|
2455
|
+
}), M("span", ii, R(_(o).customBlocks.definitionNotFound), 1)]))]));
|
|
2375
2456
|
}
|
|
2376
|
-
}),
|
|
2457
|
+
}), di = { class: "tpl:w-full" }, fi = /* @__PURE__ */ d({
|
|
2377
2458
|
__name: "DividerBlock",
|
|
2378
2459
|
props: {
|
|
2379
2460
|
block: {},
|
|
@@ -2385,28 +2466,28 @@ var Qr = { class: "tpl:w-full" }, $r = {
|
|
|
2385
2466
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2386
2467
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2387
2468
|
}));
|
|
2388
|
-
return (e, t) => (s(), C("div",
|
|
2469
|
+
return (e, t) => (s(), C("div", di, [M("hr", {
|
|
2389
2470
|
class: "tpl:m-0 tpl:border-none",
|
|
2390
2471
|
style: k(n.value)
|
|
2391
2472
|
}, null, 4)]));
|
|
2392
2473
|
}
|
|
2393
|
-
}),
|
|
2474
|
+
}), pi = { class: "tpl:w-full" }, mi = ["srcdoc", "title"], hi = {
|
|
2394
2475
|
key: 1,
|
|
2395
2476
|
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)]"
|
|
2396
|
-
},
|
|
2477
|
+
}, gi = {
|
|
2397
2478
|
key: 0,
|
|
2398
2479
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2399
|
-
},
|
|
2480
|
+
}, _i = {
|
|
2400
2481
|
key: 1,
|
|
2401
2482
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2402
|
-
},
|
|
2483
|
+
}, vi = /* @__PURE__ */ d({
|
|
2403
2484
|
__name: "HtmlBlock",
|
|
2404
2485
|
props: {
|
|
2405
2486
|
block: {},
|
|
2406
2487
|
viewport: {}
|
|
2407
2488
|
},
|
|
2408
2489
|
setup(r) {
|
|
2409
|
-
let i = r, { t: a } = X(), o = n(
|
|
2490
|
+
let i = r, { t: a } = X(), o = n(ft, !1), c = S(() => i.block.content.trim().length > 0), u = S(() => o && c.value), d = n(q, []), f = n(J, null), p = S(() => f?.value ? ge(i.block.content, d) : i.block.content), m = l(null), h = l(60), g = null;
|
|
2410
2491
|
function y() {
|
|
2411
2492
|
let e = m.value?.contentDocument;
|
|
2412
2493
|
e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -2420,7 +2501,7 @@ var Qr = { class: "tpl:w-full" }, $r = {
|
|
|
2420
2501
|
e || (g?.disconnect(), g = null);
|
|
2421
2502
|
}), e(() => {
|
|
2422
2503
|
g?.disconnect(), g = null;
|
|
2423
|
-
}), (e, t) => (s(), C("div",
|
|
2504
|
+
}), (e, t) => (s(), C("div", pi, [u.value ? (s(), C("iframe", {
|
|
2424
2505
|
key: 0,
|
|
2425
2506
|
ref_key: "iframeRef",
|
|
2426
2507
|
ref: m,
|
|
@@ -2430,18 +2511,18 @@ var Qr = { class: "tpl:w-full" }, $r = {
|
|
|
2430
2511
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2431
2512
|
style: k({ height: `${h.value}px` }),
|
|
2432
2513
|
onLoad: b
|
|
2433
|
-
}, null, 44,
|
|
2514
|
+
}, null, 44, mi)) : (s(), C("div", hi, [v(_(Vt), {
|
|
2434
2515
|
size: 24,
|
|
2435
2516
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2436
|
-
}), c.value ? (s(), C("span",
|
|
2517
|
+
}), c.value ? (s(), C("span", gi, R(_(a).html.preview), 1)) : (s(), C("span", _i, R(_(a).html.empty), 1))]))]));
|
|
2437
2518
|
}
|
|
2438
|
-
}),
|
|
2439
|
-
function
|
|
2519
|
+
}), yi = "image/";
|
|
2520
|
+
function bi(e) {
|
|
2440
2521
|
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = We(t, {
|
|
2441
2522
|
preventDefaultForUnhandled: !0,
|
|
2442
2523
|
onDrop: (e) => {
|
|
2443
2524
|
if (!i()) return;
|
|
2444
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2525
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(yi));
|
|
2445
2526
|
t.length > 0 && n([t[0]]);
|
|
2446
2527
|
}
|
|
2447
2528
|
});
|
|
@@ -2449,17 +2530,17 @@ function gi(e) {
|
|
|
2449
2530
|
}
|
|
2450
2531
|
//#endregion
|
|
2451
2532
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2452
|
-
var
|
|
2533
|
+
var xi = ["data-drop-enabled"], Si = {
|
|
2453
2534
|
key: 0,
|
|
2454
2535
|
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)]",
|
|
2455
2536
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
2456
|
-
},
|
|
2537
|
+
}, Ci = ["href"], wi = ["src", "alt"], Ti = ["src", "alt"], Ei = {
|
|
2457
2538
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2458
2539
|
style: { opacity: "0.7" }
|
|
2459
|
-
},
|
|
2540
|
+
}, Di = ["href"], Oi = ["src", "alt"], ki = ["src", "alt"], Ai = {
|
|
2460
2541
|
key: 4,
|
|
2461
2542
|
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)]"
|
|
2462
|
-
},
|
|
2543
|
+
}, ji = ["aria-label"], Mi = { key: 1 }, Ni = /* @__PURE__ */ d({
|
|
2463
2544
|
__name: "ImageBlock",
|
|
2464
2545
|
props: {
|
|
2465
2546
|
block: {},
|
|
@@ -2467,38 +2548,38 @@ var _i = {
|
|
|
2467
2548
|
},
|
|
2468
2549
|
emits: ["update"],
|
|
2469
2550
|
setup(e, { emit: t }) {
|
|
2470
|
-
let r = e, i = t, { t: a } = X(), { syntax: o } =
|
|
2471
|
-
async function
|
|
2551
|
+
let r = e, i = t, { t: a } = X(), { syntax: o } = an(), c = n(rt, null), u = n(pt, null), d = S(() => !!c), f = on();
|
|
2552
|
+
async function p() {
|
|
2472
2553
|
let e = await c?.({ accept: ["images"] });
|
|
2473
|
-
if (
|
|
2554
|
+
if (f.alive && e) {
|
|
2474
2555
|
let t = { src: e.url };
|
|
2475
2556
|
e.alt && (t.alt = e.alt), i("update", t);
|
|
2476
2557
|
}
|
|
2477
2558
|
}
|
|
2478
|
-
let
|
|
2479
|
-
async function
|
|
2559
|
+
let m = l(), h = l(!1), g = S(() => (u?.value ?? !!c) && !h.value && !E.value);
|
|
2560
|
+
async function y(e) {
|
|
2480
2561
|
if (c) {
|
|
2481
|
-
|
|
2562
|
+
h.value = !0;
|
|
2482
2563
|
try {
|
|
2483
2564
|
let t = await c({
|
|
2484
2565
|
accept: ["images"],
|
|
2485
2566
|
files: e
|
|
2486
2567
|
});
|
|
2487
|
-
if (!
|
|
2568
|
+
if (!f.alive) return;
|
|
2488
2569
|
if (t) {
|
|
2489
2570
|
let e = { src: t.url };
|
|
2490
2571
|
t.alt && (e.alt = t.alt), i("update", e);
|
|
2491
2572
|
}
|
|
2492
2573
|
} finally {
|
|
2493
|
-
|
|
2574
|
+
f.alive && (h.value = !1);
|
|
2494
2575
|
}
|
|
2495
2576
|
}
|
|
2496
2577
|
}
|
|
2497
|
-
let { isOver:
|
|
2498
|
-
target:
|
|
2499
|
-
enabled:
|
|
2500
|
-
onFiles:
|
|
2501
|
-
}),
|
|
2578
|
+
let { isOver: b } = bi({
|
|
2579
|
+
target: m,
|
|
2580
|
+
enabled: g,
|
|
2581
|
+
onFiles: y
|
|
2582
|
+
}), x = S(() => ({ textAlign: r.block.align })), T = S(() => {
|
|
2502
2583
|
let e = r.block.align;
|
|
2503
2584
|
return {
|
|
2504
2585
|
maxWidth: "100%",
|
|
@@ -2509,21 +2590,22 @@ var _i = {
|
|
|
2509
2590
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2510
2591
|
marginRight: e === "center" ? "auto" : void 0
|
|
2511
2592
|
};
|
|
2512
|
-
}),
|
|
2593
|
+
}), E = S(() => W(r.block.src, o)), D = Ln(() => E.value ? void 0 : r.block.src), A = Ln(() => E.value ? r.block.placeholderUrl : void 0);
|
|
2513
2594
|
return (t, n) => (s(), C("div", {
|
|
2514
2595
|
ref_key: "dropZoneRef",
|
|
2515
|
-
ref:
|
|
2596
|
+
ref: m,
|
|
2516
2597
|
"data-testid": "image-drop-zone",
|
|
2598
|
+
"data-drop-enabled": g.value,
|
|
2517
2599
|
class: "tpl:relative tpl:w-full",
|
|
2518
|
-
style: k(
|
|
2519
|
-
}, [
|
|
2600
|
+
style: k(x.value)
|
|
2601
|
+
}, [g.value && (_(b) || h.value) ? (s(), C("div", Si, [h.value ? (s(), C(L, { key: 0 }, [v(_(qt), {
|
|
2520
2602
|
class: "tpl-spinner",
|
|
2521
2603
|
size: 20,
|
|
2522
2604
|
"stroke-width": 2
|
|
2523
|
-
}), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(
|
|
2605
|
+
}), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(Yt), {
|
|
2524
2606
|
size: 20,
|
|
2525
2607
|
"stroke-width": 1.5
|
|
2526
|
-
}), V(" " + R(_(a).image.dropToUpload), 1)], 64))])) : w("", !0), e.block.src &&
|
|
2608
|
+
}), V(" " + R(_(a).image.dropToUpload), 1)], 64))])) : w("", !0), e.block.src && E.value && e.block.placeholderUrl ? (s(), C(L, { key: 1 }, [e.block.linkUrl ? (s(), C("a", {
|
|
2527
2609
|
key: 0,
|
|
2528
2610
|
href: e.block.linkUrl,
|
|
2529
2611
|
target: "_blank",
|
|
@@ -2532,25 +2614,25 @@ var _i = {
|
|
|
2532
2614
|
}, [M("img", {
|
|
2533
2615
|
class: "tpl:border-0",
|
|
2534
2616
|
loading: "lazy",
|
|
2535
|
-
src: _(
|
|
2617
|
+
src: _(A),
|
|
2536
2618
|
alt: e.block.alt || _(a).image.altTextPlaceholder,
|
|
2537
|
-
style: k(
|
|
2538
|
-
}, null, 12,
|
|
2619
|
+
style: k(T.value)
|
|
2620
|
+
}, null, 12, wi)], 8, Ci)) : (s(), C("img", {
|
|
2539
2621
|
key: 1,
|
|
2540
2622
|
class: "tpl:border-0",
|
|
2541
|
-
src: _(
|
|
2623
|
+
src: _(A),
|
|
2542
2624
|
alt: e.block.alt,
|
|
2543
|
-
style: k(
|
|
2544
|
-
}, null, 12,
|
|
2625
|
+
style: k(T.value)
|
|
2626
|
+
}, null, 12, Ti))], 64)) : e.block.src && E.value ? (s(), C("div", {
|
|
2545
2627
|
key: 2,
|
|
2546
2628
|
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)]",
|
|
2547
|
-
style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" },
|
|
2548
|
-
}, [v(_(
|
|
2629
|
+
style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, T.value])
|
|
2630
|
+
}, [v(_(Gt), {
|
|
2549
2631
|
size: 32,
|
|
2550
2632
|
"stroke-width": 1.5,
|
|
2551
2633
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2552
2634
|
style: { opacity: "0.5" }
|
|
2553
|
-
}), M("span",
|
|
2635
|
+
}), M("span", Ei, [v(Mr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), C(L, { key: 3 }, [e.block.linkUrl ? (s(), C("a", {
|
|
2554
2636
|
key: 0,
|
|
2555
2637
|
href: e.block.linkUrl,
|
|
2556
2638
|
target: "_blank",
|
|
@@ -2559,29 +2641,29 @@ var _i = {
|
|
|
2559
2641
|
}, [M("img", {
|
|
2560
2642
|
class: "tpl:border-0",
|
|
2561
2643
|
loading: "lazy",
|
|
2562
|
-
src: _(
|
|
2644
|
+
src: _(D),
|
|
2563
2645
|
alt: e.block.alt || _(a).image.altTextPlaceholder,
|
|
2564
|
-
style: k(
|
|
2565
|
-
}, null, 12,
|
|
2646
|
+
style: k(T.value)
|
|
2647
|
+
}, null, 12, Oi)], 8, Di)) : (s(), C("img", {
|
|
2566
2648
|
key: 1,
|
|
2567
2649
|
class: "tpl:border-0",
|
|
2568
|
-
src: _(
|
|
2650
|
+
src: _(D),
|
|
2569
2651
|
alt: e.block.alt,
|
|
2570
|
-
style: k(
|
|
2571
|
-
}, null, 12,
|
|
2652
|
+
style: k(T.value)
|
|
2653
|
+
}, null, 12, ki))], 64)) : (s(), C("div", Ai, [d.value ? (s(), C("button", {
|
|
2572
2654
|
key: 0,
|
|
2573
2655
|
"aria-label": _(a).image.browseMedia,
|
|
2574
2656
|
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)]",
|
|
2575
|
-
onClick: O(
|
|
2576
|
-
}, [v(_(
|
|
2657
|
+
onClick: O(p, ["stop"])
|
|
2658
|
+
}, [v(_(Gt), {
|
|
2577
2659
|
size: 14,
|
|
2578
2660
|
"stroke-width": 1.5
|
|
2579
|
-
}), V(" " + R(_(a).image.browseMedia), 1)], 8,
|
|
2661
|
+
}), V(" " + R(_(a).image.browseMedia), 1)], 8, ji)) : (s(), C("span", Mi, R(_(a).image.clickToAdd), 1))]))], 12, xi));
|
|
2580
2662
|
}
|
|
2581
|
-
}),
|
|
2663
|
+
}), Pi = { class: "tpl:w-full" }, Fi = ["href"], Ii = {
|
|
2582
2664
|
key: 1,
|
|
2583
2665
|
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)]"
|
|
2584
|
-
},
|
|
2666
|
+
}, Li = /* @__PURE__ */ d({
|
|
2585
2667
|
__name: "MenuBlock",
|
|
2586
2668
|
props: {
|
|
2587
2669
|
block: {},
|
|
@@ -2600,7 +2682,7 @@ var _i = {
|
|
|
2600
2682
|
function o(e) {
|
|
2601
2683
|
return e || t.block.linkColor || t.block.color;
|
|
2602
2684
|
}
|
|
2603
|
-
return (t, c) => (s(), C("div",
|
|
2685
|
+
return (t, c) => (s(), C("div", Pi, [a.value ? (s(), C("div", {
|
|
2604
2686
|
key: 0,
|
|
2605
2687
|
style: k(i.value)
|
|
2606
2688
|
}, [(s(!0), C(L, null, r(e.block.items, (t, n) => (s(), C(L, { key: t.id }, [M("a", {
|
|
@@ -2612,15 +2694,15 @@ var _i = {
|
|
|
2612
2694
|
textDecoration: t.underline ? "underline" : "none"
|
|
2613
2695
|
}),
|
|
2614
2696
|
onClick: c[0] ||= O(() => {}, ["prevent"])
|
|
2615
|
-
}, [v(
|
|
2697
|
+
}, [v(Mr, { text: t.text || "..." }, null, 8, ["text"])], 12, Fi), n < e.block.items.length - 1 ? (s(), C("span", {
|
|
2616
2698
|
key: 0,
|
|
2617
2699
|
style: k({
|
|
2618
2700
|
color: e.block.separatorColor,
|
|
2619
2701
|
padding: `0 ${e.block.spacing}px`
|
|
2620
2702
|
})
|
|
2621
|
-
}, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div",
|
|
2703
|
+
}, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div", Ii, [v(_(Ut), { size: 16 }), M("span", null, R(_(n).menu.addLinks), 1)]))]));
|
|
2622
2704
|
}
|
|
2623
|
-
}),
|
|
2705
|
+
}), Ri = /* @__PURE__ */ new Set([
|
|
2624
2706
|
"http",
|
|
2625
2707
|
"https",
|
|
2626
2708
|
"mailto",
|
|
@@ -2630,7 +2712,7 @@ var _i = {
|
|
|
2630
2712
|
"sms",
|
|
2631
2713
|
"xmpp",
|
|
2632
2714
|
"cid"
|
|
2633
|
-
]),
|
|
2715
|
+
]), zi = /* @__PURE__ */ new Set([
|
|
2634
2716
|
"SCRIPT",
|
|
2635
2717
|
"STYLE",
|
|
2636
2718
|
"IFRAME",
|
|
@@ -2640,7 +2722,7 @@ var _i = {
|
|
|
2640
2722
|
"META",
|
|
2641
2723
|
"BASE",
|
|
2642
2724
|
"FORM"
|
|
2643
|
-
]),
|
|
2725
|
+
]), Bi = /* @__PURE__ */ new Set([
|
|
2644
2726
|
"href",
|
|
2645
2727
|
"xlink:href",
|
|
2646
2728
|
"formaction",
|
|
@@ -2649,16 +2731,16 @@ var _i = {
|
|
|
2649
2731
|
"background",
|
|
2650
2732
|
"poster"
|
|
2651
2733
|
]);
|
|
2652
|
-
function
|
|
2734
|
+
function Vi(e, t) {
|
|
2653
2735
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2654
2736
|
if (!n || n.startsWith("#")) return !0;
|
|
2655
2737
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2656
2738
|
if (!r) return !0;
|
|
2657
2739
|
let i = r[1].toLowerCase();
|
|
2658
|
-
return
|
|
2740
|
+
return Ri.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2659
2741
|
}
|
|
2660
|
-
function
|
|
2661
|
-
if (
|
|
2742
|
+
function Hi(e) {
|
|
2743
|
+
if (zi.has(e.tagName)) {
|
|
2662
2744
|
e.remove();
|
|
2663
2745
|
return;
|
|
2664
2746
|
}
|
|
@@ -2670,29 +2752,29 @@ function Li(e) {
|
|
|
2670
2752
|
e.removeAttribute(n);
|
|
2671
2753
|
continue;
|
|
2672
2754
|
}
|
|
2673
|
-
if (
|
|
2674
|
-
|
|
2755
|
+
if (Bi.has(t)) {
|
|
2756
|
+
Vi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2675
2757
|
continue;
|
|
2676
2758
|
}
|
|
2677
2759
|
if (t === "src") {
|
|
2678
|
-
|
|
2760
|
+
Vi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2679
2761
|
continue;
|
|
2680
2762
|
}
|
|
2681
2763
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2682
2764
|
}
|
|
2683
2765
|
let n = Array.from(e.children);
|
|
2684
|
-
for (let e of n)
|
|
2766
|
+
for (let e of n) Hi(e);
|
|
2685
2767
|
}
|
|
2686
|
-
function
|
|
2768
|
+
function Ui(e) {
|
|
2687
2769
|
if (typeof DOMParser > "u") return e;
|
|
2688
2770
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2689
|
-
for (let e of n)
|
|
2771
|
+
for (let e of n) Hi(e);
|
|
2690
2772
|
return t.innerHTML;
|
|
2691
2773
|
}
|
|
2692
2774
|
//#endregion
|
|
2693
2775
|
//#region src/composables/useEditableTextBlock.ts
|
|
2694
|
-
function
|
|
2695
|
-
let t = n(q, []), r = n(
|
|
2776
|
+
function Wi(e) {
|
|
2777
|
+
let t = n(q, []), r = n(J, null), { syntax: i } = an(), a = S(() => r?.value ? xe(e(), t) : De(e(), t)), o = S(() => Ui(je(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = Ue(c), { toLocal: f } = It(), p = S(() => f({
|
|
2696
2778
|
top: u.value - 8,
|
|
2697
2779
|
left: d.value
|
|
2698
2780
|
}));
|
|
@@ -2713,14 +2795,14 @@ function zi(e) {
|
|
|
2713
2795
|
}
|
|
2714
2796
|
//#endregion
|
|
2715
2797
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2716
|
-
var
|
|
2798
|
+
var Gi = ["innerHTML"], Ki = /* @__PURE__ */ d({
|
|
2717
2799
|
__name: "ParagraphBlock",
|
|
2718
2800
|
props: {
|
|
2719
2801
|
block: {},
|
|
2720
2802
|
viewport: {}
|
|
2721
2803
|
},
|
|
2722
2804
|
setup(e) {
|
|
2723
|
-
let t = e, n = B(() => import("./ParagraphEditor-
|
|
2805
|
+
let t = e, n = B(() => import("./ParagraphEditor-Bd-GQXee.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Wi(() => t.block.content);
|
|
2724
2806
|
return (t, u) => (s(), C("div", {
|
|
2725
2807
|
ref_key: "blockRef",
|
|
2726
2808
|
ref: i,
|
|
@@ -2739,54 +2821,54 @@ var Bi = ["innerHTML"], Vi = /* @__PURE__ */ d({
|
|
|
2739
2821
|
key: 1,
|
|
2740
2822
|
class: "tpl-text-content tpl:outline-none",
|
|
2741
2823
|
innerHTML: _(o)
|
|
2742
|
-
}, null, 8,
|
|
2824
|
+
}, null, 8, Gi))], 544));
|
|
2743
2825
|
}
|
|
2744
2826
|
});
|
|
2745
2827
|
//#endregion
|
|
2746
2828
|
//#region src/utils/blockComponentResolver.ts
|
|
2747
|
-
function
|
|
2829
|
+
function qi(e) {
|
|
2748
2830
|
let t = { fontFamily: e.fontFamily };
|
|
2749
2831
|
return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
|
|
2750
2832
|
}
|
|
2751
|
-
function
|
|
2833
|
+
function Ji(e, t, n) {
|
|
2752
2834
|
if (t) {
|
|
2753
2835
|
let n = t.getComponent(e);
|
|
2754
2836
|
if (n) return n;
|
|
2755
2837
|
}
|
|
2756
2838
|
return n[e.type] ?? null;
|
|
2757
2839
|
}
|
|
2758
|
-
function
|
|
2840
|
+
function Yi(e) {
|
|
2759
2841
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2760
2842
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2761
2843
|
backgroundColor: n || "transparent"
|
|
2762
2844
|
};
|
|
2763
2845
|
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ce.paragraphGap : Ce.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2764
2846
|
}
|
|
2765
|
-
function
|
|
2847
|
+
function Xi(e) {
|
|
2766
2848
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2767
2849
|
let t = e.wrapper, n = {};
|
|
2768
2850
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
2769
2851
|
}
|
|
2770
2852
|
//#endregion
|
|
2771
2853
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2772
|
-
var
|
|
2854
|
+
var Zi = [
|
|
2773
2855
|
"data-block-id",
|
|
2774
2856
|
"data-block-type",
|
|
2775
2857
|
"data-tpl-picked"
|
|
2776
|
-
],
|
|
2858
|
+
], Qi = ["aria-label"], $i = [
|
|
2777
2859
|
"aria-label",
|
|
2778
2860
|
"aria-pressed",
|
|
2779
2861
|
"title"
|
|
2780
|
-
],
|
|
2862
|
+
], ea = ["aria-label", "title"], ta = ["aria-label", "title"], na = ["aria-label", "title"], ra = {
|
|
2781
2863
|
key: 1,
|
|
2782
2864
|
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"
|
|
2783
|
-
},
|
|
2865
|
+
}, ia = { 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)]" }, aa = {
|
|
2784
2866
|
key: 2,
|
|
2785
2867
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2786
|
-
},
|
|
2868
|
+
}, oa = ["aria-label", "title"], sa = {
|
|
2787
2869
|
key: 3,
|
|
2788
2870
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2789
|
-
},
|
|
2871
|
+
}, ca = ["aria-label"], la = /*#__PURE__*/ nn(/* @__PURE__ */ d({
|
|
2790
2872
|
__name: "BlockWrapper",
|
|
2791
2873
|
props: {
|
|
2792
2874
|
block: {},
|
|
@@ -2798,7 +2880,7 @@ var Ki = [
|
|
|
2798
2880
|
},
|
|
2799
2881
|
emits: ["select"],
|
|
2800
2882
|
setup(e, { emit: t }) {
|
|
2801
|
-
let r = B(() => import("./BlockIssueBadge-
|
|
2883
|
+
let r = B(() => import("./BlockIssueBadge-BJ__oEtm.js")), i = e, o = t, { t: c, format: u } = X(), d = n(at, null), f = l(null), p = S(() => d?.liftedBlockId.value === i.block.id), m = S(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
|
|
2802
2884
|
async function h() {
|
|
2803
2885
|
await D(), f.value?.focus();
|
|
2804
2886
|
}
|
|
@@ -2824,7 +2906,7 @@ var Ki = [
|
|
|
2824
2906
|
let y = S(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), x = S(() => i.previewMode === !0 && y.value), T = S(() => i.viewport ? {
|
|
2825
2907
|
desktop: c.viewport.desktop,
|
|
2826
2908
|
mobile: c.viewport.mobile
|
|
2827
|
-
}[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(
|
|
2909
|
+
}[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(dt, null), j = n(ht, null), N = n(yt, {}), P = S(() => N.savedBlocks?.isPicking.value === !0), F = S(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = S(() => i.isSelected && !P.value), L = S(() => N.comments?.getBlockCount(i.block.id) ?? 0), z = S(() => Yi(i.block)), H = S(() => Xi(i.block));
|
|
2828
2910
|
function ee(e) {
|
|
2829
2911
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
|
|
2830
2912
|
}
|
|
@@ -2869,61 +2951,61 @@ var Ki = [
|
|
|
2869
2951
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2870
2952
|
title: _(c).blockActions.drag,
|
|
2871
2953
|
onKeydown: g
|
|
2872
|
-
}, [v(_(
|
|
2954
|
+
}, [v(_(Kt), {
|
|
2873
2955
|
size: 14,
|
|
2874
2956
|
"stroke-width": 1.5
|
|
2875
|
-
})], 40,
|
|
2957
|
+
})], 40, $i),
|
|
2876
2958
|
M("button", {
|
|
2877
2959
|
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",
|
|
2878
2960
|
"aria-label": _(c).blockActions.duplicate,
|
|
2879
2961
|
title: _(c).blockActions.duplicate,
|
|
2880
2962
|
onClick: O(ne, ["stop"])
|
|
2881
|
-
}, [v(_(
|
|
2963
|
+
}, [v(_(zt), {
|
|
2882
2964
|
size: 14,
|
|
2883
2965
|
"stroke-width": 1.5
|
|
2884
|
-
})], 8,
|
|
2966
|
+
})], 8, ea),
|
|
2885
2967
|
F.value ? (s(), C("button", {
|
|
2886
2968
|
key: 0,
|
|
2887
2969
|
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",
|
|
2888
2970
|
"aria-label": _(c).blockActions.saveAsBlock,
|
|
2889
2971
|
title: _(c).blockActions.saveAsBlock,
|
|
2890
2972
|
onClick: O(re, ["stop"])
|
|
2891
|
-
}, [v(_(
|
|
2973
|
+
}, [v(_(Rt), {
|
|
2892
2974
|
size: 14,
|
|
2893
2975
|
"stroke-width": 1.5
|
|
2894
|
-
})], 8,
|
|
2976
|
+
})], 8, ta)) : w("", !0),
|
|
2895
2977
|
M("button", {
|
|
2896
2978
|
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",
|
|
2897
2979
|
"aria-label": _(c).blockActions.delete,
|
|
2898
2980
|
title: _(c).blockActions.delete,
|
|
2899
2981
|
onClick: O(te, ["stop"])
|
|
2900
|
-
}, [v(_(
|
|
2982
|
+
}, [v(_(Wt), {
|
|
2901
2983
|
size: 14,
|
|
2902
2984
|
"stroke-width": 1.5
|
|
2903
|
-
})], 8,
|
|
2904
|
-
], 8,
|
|
2905
|
-
y.value ? (s(), C("div",
|
|
2985
|
+
})], 8, na)
|
|
2986
|
+
], 8, Qi)) : w("", !0),
|
|
2987
|
+
y.value ? (s(), C("div", ra, [M("span", ia, [v(_(Ht), {
|
|
2906
2988
|
size: 12,
|
|
2907
2989
|
"stroke-width": 1.5
|
|
2908
2990
|
}), V(" " + R(_(u)(_(c).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : w("", !0),
|
|
2909
|
-
E.value && !y.value ? (s(), C("div",
|
|
2991
|
+
E.value && !y.value ? (s(), C("div", aa, [M("button", {
|
|
2910
2992
|
"data-testid": "condition-toggle",
|
|
2911
2993
|
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)]",
|
|
2912
2994
|
"aria-label": _(c).blockActions.conditionToggle,
|
|
2913
2995
|
title: e.block.displayCondition?.label,
|
|
2914
2996
|
onClick: O(ie, ["stop"])
|
|
2915
|
-
}, [v(_(
|
|
2997
|
+
}, [v(_($t), {
|
|
2916
2998
|
size: 12,
|
|
2917
2999
|
"stroke-width": 2
|
|
2918
|
-
})], 8,
|
|
2919
|
-
L.value > 0 && !y.value ? (s(), C("div",
|
|
3000
|
+
})], 8, oa)])) : w("", !0),
|
|
3001
|
+
L.value > 0 && !y.value ? (s(), C("div", sa, [M("button", {
|
|
2920
3002
|
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)]",
|
|
2921
3003
|
"aria-label": _(u)(_(c).blockActions.comments, { count: String(L.value) }),
|
|
2922
3004
|
onClick: n[0] ||= O((t) => _(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
2923
|
-
}, [v(_(
|
|
3005
|
+
}, [v(_(Xt), {
|
|
2924
3006
|
size: 12,
|
|
2925
3007
|
"stroke-width": 2.5
|
|
2926
|
-
}), V(" " + R(L.value), 1)], 8,
|
|
3008
|
+
}), V(" " + R(L.value), 1)], 8, ca)])) : w("", !0),
|
|
2927
3009
|
H.value ? (s(), C("div", {
|
|
2928
3010
|
key: 4,
|
|
2929
3011
|
class: "tpl-section-wrapper",
|
|
@@ -2936,31 +3018,31 @@ var Ki = [
|
|
|
2936
3018
|
class: "tpl-block-content",
|
|
2937
3019
|
style: k(z.value)
|
|
2938
3020
|
}, [a(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2939
|
-
], 10,
|
|
3021
|
+
], 10, Zi));
|
|
2940
3022
|
}
|
|
2941
3023
|
}), [["__scopeId", "data-v-2c239048"]]);
|
|
2942
3024
|
//#endregion
|
|
2943
3025
|
//#region src/utils/unwrapParagraph.ts
|
|
2944
|
-
function
|
|
3026
|
+
function ua(e) {
|
|
2945
3027
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2946
3028
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2947
3029
|
}
|
|
2948
3030
|
//#endregion
|
|
2949
3031
|
//#region src/components/blocks/TitleBlock.vue
|
|
2950
|
-
var
|
|
3032
|
+
var da = /* @__PURE__ */ d({
|
|
2951
3033
|
__name: "TitleBlock",
|
|
2952
3034
|
props: {
|
|
2953
3035
|
block: {},
|
|
2954
3036
|
viewport: {}
|
|
2955
3037
|
},
|
|
2956
3038
|
setup(e) {
|
|
2957
|
-
let t = e, n = B(() => import("./TitleEditor-
|
|
3039
|
+
let t = e, n = B(() => import("./TitleEditor-CrnuIq62.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Wi(() => t.block.content), d = S(() => {
|
|
2958
3040
|
let e = {
|
|
2959
3041
|
fontSize: `${Ne[t.block.level]}px`,
|
|
2960
3042
|
textAlign: t.block.textAlign
|
|
2961
3043
|
};
|
|
2962
3044
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2963
|
-
}), f = S(() => `h${t.block.level}`), p = S(() =>
|
|
3045
|
+
}), f = S(() => `h${t.block.level}`), p = S(() => ua(o.value));
|
|
2964
3046
|
return (t, o) => (s(), C("div", {
|
|
2965
3047
|
ref_key: "blockRef",
|
|
2966
3048
|
ref: i,
|
|
@@ -2986,16 +3068,16 @@ var oa = /* @__PURE__ */ d({
|
|
|
2986
3068
|
});
|
|
2987
3069
|
//#endregion
|
|
2988
3070
|
//#region src/utils/sectionColumnDrop.ts
|
|
2989
|
-
function
|
|
3071
|
+
function fa(e) {
|
|
2990
3072
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2991
3073
|
}
|
|
2992
3074
|
//#endregion
|
|
2993
3075
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2994
|
-
var
|
|
3076
|
+
var pa = { class: "tpl:w-full" }, ma = {
|
|
2995
3077
|
key: 0,
|
|
2996
3078
|
"data-testid": "section-drop-hint",
|
|
2997
3079
|
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)]"
|
|
2998
|
-
},
|
|
3080
|
+
}, ha = /* @__PURE__ */ d({
|
|
2999
3081
|
__name: "SectionBlock",
|
|
3000
3082
|
props: {
|
|
3001
3083
|
block: {},
|
|
@@ -3003,13 +3085,13 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3003
3085
|
},
|
|
3004
3086
|
setup(e) {
|
|
3005
3087
|
let t = {
|
|
3006
|
-
title:
|
|
3007
|
-
paragraph:
|
|
3008
|
-
image:
|
|
3009
|
-
button:
|
|
3010
|
-
divider:
|
|
3011
|
-
custom:
|
|
3012
|
-
}, a = e, { t: o } = X(), c =
|
|
3088
|
+
title: da,
|
|
3089
|
+
paragraph: Ki,
|
|
3090
|
+
image: Ni,
|
|
3091
|
+
button: Pr,
|
|
3092
|
+
divider: fi,
|
|
3093
|
+
custom: ui
|
|
3094
|
+
}, a = e, { t: o } = X(), c = lt(Y, "SectionBlock"), l = n(ht, null), d = n(Et, null), p = n(yt, {}), m = n(Tt, null);
|
|
3013
3095
|
function h(e) {
|
|
3014
3096
|
let t = p.savedBlocks;
|
|
3015
3097
|
if (t?.isPicking.value) {
|
|
@@ -3044,7 +3126,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3044
3126
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
3045
3127
|
}
|
|
3046
3128
|
function D(e) {
|
|
3047
|
-
return
|
|
3129
|
+
return Ji(e, d, t);
|
|
3048
3130
|
}
|
|
3049
3131
|
function O(e, t) {
|
|
3050
3132
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
@@ -3052,7 +3134,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3052
3134
|
dataSourceFetched: t.dataSourceFetched
|
|
3053
3135
|
});
|
|
3054
3136
|
}
|
|
3055
|
-
return (t, n) => (s(), C("div",
|
|
3137
|
+
return (t, n) => (s(), C("div", pa, [M("div", { class: b(["tpl:flex tpl:gap-0", { "tpl:flex-col": x.value }]) }, [(s(!0), C(L, null, r(y.value, (t, n) => (s(), C("div", {
|
|
3056
3138
|
key: n,
|
|
3057
3139
|
class: b(["tpl:relative tpl:min-h-[60px] tpl:rounded", T(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3058
3140
|
style: k({ width: x.value ? "100%" : g.value[n] })
|
|
@@ -3061,7 +3143,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3061
3143
|
group: {
|
|
3062
3144
|
name: "blocks",
|
|
3063
3145
|
pull: !0,
|
|
3064
|
-
put: (e, t, n) => _(
|
|
3146
|
+
put: (e, t, n) => _(fa)(n)
|
|
3065
3147
|
},
|
|
3066
3148
|
animation: 150,
|
|
3067
3149
|
"ghost-class": "tpl-ghost",
|
|
@@ -3074,7 +3156,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3074
3156
|
class: "tpl:min-h-[60px]",
|
|
3075
3157
|
"onUpdate:modelValue": (e) => E(n, e)
|
|
3076
3158
|
}, {
|
|
3077
|
-
default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(
|
|
3159
|
+
default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(la, {
|
|
3078
3160
|
block: t,
|
|
3079
3161
|
"is-selected": _(c).state.selectedBlockId === t.id,
|
|
3080
3162
|
viewport: e.viewport,
|
|
@@ -3106,13 +3188,13 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3106
3188
|
"model-value",
|
|
3107
3189
|
"group",
|
|
3108
3190
|
"onUpdate:modelValue"
|
|
3109
|
-
]), T(n).length === 0 ? (s(), C("div",
|
|
3191
|
+
]), T(n).length === 0 ? (s(), C("div", ma, [M("span", null, R(_(o).section.dropHere), 1)])) : w("", !0)], 6))), 128))], 2)]));
|
|
3110
3192
|
}
|
|
3111
|
-
}),
|
|
3193
|
+
}), ga = ke, _a = {
|
|
3112
3194
|
small: 24,
|
|
3113
3195
|
medium: 32,
|
|
3114
3196
|
large: 48
|
|
3115
|
-
},
|
|
3197
|
+
}, va = [
|
|
3116
3198
|
"facebook",
|
|
3117
3199
|
"twitter",
|
|
3118
3200
|
"instagram",
|
|
@@ -3130,11 +3212,11 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3130
3212
|
"github",
|
|
3131
3213
|
"dribbble",
|
|
3132
3214
|
"behance"
|
|
3133
|
-
],
|
|
3215
|
+
], ya = [
|
|
3134
3216
|
"width",
|
|
3135
3217
|
"height",
|
|
3136
3218
|
"fill"
|
|
3137
|
-
],
|
|
3219
|
+
], ba = ["d"], xa = /* @__PURE__ */ d({
|
|
3138
3220
|
__name: "SocialIconSvg",
|
|
3139
3221
|
props: {
|
|
3140
3222
|
platform: {},
|
|
@@ -3142,7 +3224,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3142
3224
|
iconSize: {}
|
|
3143
3225
|
},
|
|
3144
3226
|
setup(e) {
|
|
3145
|
-
let t = e, n = S(() =>
|
|
3227
|
+
let t = e, n = S(() => ga[t.platform]), r = S(() => _a[t.iconSize]), i = S(() => {
|
|
3146
3228
|
let e = {
|
|
3147
3229
|
display: "inline-flex",
|
|
3148
3230
|
alignItems: "center",
|
|
@@ -3186,12 +3268,12 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3186
3268
|
viewBox: "0 0 24 24",
|
|
3187
3269
|
fill: o.value,
|
|
3188
3270
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3189
|
-
}, [M("path", { d: n.value.path }, null, 8,
|
|
3271
|
+
}, [M("path", { d: n.value.path }, null, 8, ba)], 8, ya))], 4));
|
|
3190
3272
|
}
|
|
3191
|
-
}),
|
|
3273
|
+
}), Sa = { class: "tpl:w-full" }, Ca = ["href"], wa = {
|
|
3192
3274
|
key: 1,
|
|
3193
3275
|
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)]"
|
|
3194
|
-
},
|
|
3276
|
+
}, Ta = /* @__PURE__ */ d({
|
|
3195
3277
|
__name: "SocialIconsBlock",
|
|
3196
3278
|
props: {
|
|
3197
3279
|
block: {},
|
|
@@ -3204,7 +3286,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3204
3286
|
gap: `${t.block.spacing}px`,
|
|
3205
3287
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3206
3288
|
})), a = S(() => t.block.icons.length > 0);
|
|
3207
|
-
return (t, o) => (s(), C("div",
|
|
3289
|
+
return (t, o) => (s(), C("div", Sa, [a.value ? (s(), C("div", {
|
|
3208
3290
|
key: 0,
|
|
3209
3291
|
style: k(i.value)
|
|
3210
3292
|
}, [(s(!0), C(L, null, r(e.block.icons, (t) => (s(), C("a", {
|
|
@@ -3212,7 +3294,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3212
3294
|
href: t.url || "#",
|
|
3213
3295
|
class: "tpl:cursor-default",
|
|
3214
3296
|
onClick: o[0] ||= O(() => {}, ["prevent"])
|
|
3215
|
-
}, [v(
|
|
3297
|
+
}, [v(xa, {
|
|
3216
3298
|
platform: t.platform,
|
|
3217
3299
|
"icon-style": e.block.iconStyle,
|
|
3218
3300
|
"icon-size": e.block.iconSize
|
|
@@ -3220,44 +3302,44 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3220
3302
|
"platform",
|
|
3221
3303
|
"icon-style",
|
|
3222
3304
|
"icon-size"
|
|
3223
|
-
])], 8,
|
|
3305
|
+
])], 8, Ca))), 128))], 4)) : (s(), C("div", wa, [v(_(Lt), { size: 16 }), M("span", null, R(_(n).social.addIcons), 1)]))]));
|
|
3224
3306
|
}
|
|
3225
|
-
}),
|
|
3307
|
+
}), Ea = { class: "tpl:w-full" }, Da = {
|
|
3226
3308
|
key: 0,
|
|
3227
3309
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3228
3310
|
style: {
|
|
3229
3311
|
"background-color": "var(--tpl-bg-hover)",
|
|
3230
3312
|
color: "var(--tpl-text-dim)"
|
|
3231
3313
|
}
|
|
3232
|
-
},
|
|
3314
|
+
}, Oa = /* @__PURE__ */ d({
|
|
3233
3315
|
__name: "SpacerBlock",
|
|
3234
3316
|
props: {
|
|
3235
3317
|
block: {},
|
|
3236
3318
|
viewport: {}
|
|
3237
3319
|
},
|
|
3238
3320
|
setup(e) {
|
|
3239
|
-
let t = e, n =
|
|
3321
|
+
let t = e, n = lt(Y, "SpacerBlock"), r = S(() => ({
|
|
3240
3322
|
height: `${t.block.height}px`,
|
|
3241
3323
|
minHeight: `${t.block.height}px`,
|
|
3242
3324
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3243
3325
|
}));
|
|
3244
|
-
return (t, i) => (s(), C("div",
|
|
3326
|
+
return (t, i) => (s(), C("div", Ea, [M("div", {
|
|
3245
3327
|
style: k(r.value),
|
|
3246
3328
|
class: b(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !_(n).state.previewMode }])
|
|
3247
|
-
}, [_(n).state.previewMode ? w("", !0) : (s(), C("span",
|
|
3329
|
+
}, [_(n).state.previewMode ? w("", !0) : (s(), C("span", Da, R(e.block.height) + "px ", 1))], 6)]));
|
|
3248
3330
|
}
|
|
3249
|
-
}),
|
|
3331
|
+
}), ka = { class: "tpl:w-full" }, Aa = { key: 0 }, ja = [
|
|
3250
3332
|
"aria-label",
|
|
3251
3333
|
"data-placeholder",
|
|
3252
3334
|
"onBlur"
|
|
3253
|
-
],
|
|
3335
|
+
], Ma = [
|
|
3254
3336
|
"aria-label",
|
|
3255
3337
|
"data-placeholder",
|
|
3256
3338
|
"onBlur"
|
|
3257
|
-
],
|
|
3339
|
+
], Na = {
|
|
3258
3340
|
key: 1,
|
|
3259
3341
|
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)]"
|
|
3260
|
-
},
|
|
3342
|
+
}, Pa = /*#__PURE__*/ nn(/* @__PURE__ */ d({
|
|
3261
3343
|
__name: "TableBlock",
|
|
3262
3344
|
props: {
|
|
3263
3345
|
block: {},
|
|
@@ -3271,7 +3353,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3271
3353
|
updated(e, t) {
|
|
3272
3354
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3273
3355
|
}
|
|
3274
|
-
}, n = e, { t: i } = X(), a =
|
|
3356
|
+
}, n = e, { t: i } = X(), a = lt(Y, "TableBlock"), o = S(() => n.block.rows.length > 0), c = S(() => {
|
|
3275
3357
|
let e = {
|
|
3276
3358
|
width: "100%",
|
|
3277
3359
|
borderCollapse: "collapse",
|
|
@@ -3302,11 +3384,11 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3302
3384
|
} : n);
|
|
3303
3385
|
a.updateBlock(n.block.id, { rows: o });
|
|
3304
3386
|
}
|
|
3305
|
-
return (e, n) => (s(), C("div",
|
|
3387
|
+
return (e, n) => (s(), C("div", ka, [o.value ? (s(), C("table", {
|
|
3306
3388
|
key: 0,
|
|
3307
3389
|
style: k(c.value),
|
|
3308
3390
|
class: "tpl-table-editable"
|
|
3309
|
-
}, [d.value ? (s(), C("thead",
|
|
3391
|
+
}, [d.value ? (s(), C("thead", Aa, [M("tr", null, [(s(!0), C(L, null, r(d.value.cells, (e) => f((s(), C("th", {
|
|
3310
3392
|
key: e.id,
|
|
3311
3393
|
style: k(u.value),
|
|
3312
3394
|
"aria-label": _(i).table.cellPlaceholder,
|
|
@@ -3315,7 +3397,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3315
3397
|
onBlur: (t) => h(d.value.id, e.id, t),
|
|
3316
3398
|
onKeydown: n[0] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3317
3399
|
onClick: O(m, ["stop"])
|
|
3318
|
-
}, null, 44,
|
|
3400
|
+
}, null, 44, ja)), [[t, e.content]])), 128))])])) : w("", !0), M("tbody", null, [(s(!0), C(L, null, r(p.value, (e) => (s(), C("tr", { key: e.id }, [(s(!0), C(L, null, r(e.cells, (r) => f((s(), C("td", {
|
|
3319
3401
|
key: r.id,
|
|
3320
3402
|
style: k(l.value),
|
|
3321
3403
|
"aria-label": _(i).table.cellPlaceholder,
|
|
@@ -3324,9 +3406,9 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3324
3406
|
onBlur: (t) => h(e.id, r.id, t),
|
|
3325
3407
|
onKeydown: n[1] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3326
3408
|
onClick: O(m, ["stop"])
|
|
3327
|
-
}, null, 44,
|
|
3409
|
+
}, null, 44, Ma)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), C("div", Na, [v(_(Qt), { size: 16 }), M("span", null, R(_(i).table.empty), 1)]))]));
|
|
3328
3410
|
}
|
|
3329
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
3411
|
+
}), [["__scopeId", "data-v-963ac422"]]), Fa = /* @__PURE__ */ d({
|
|
3330
3412
|
__name: "VideoPlayButton",
|
|
3331
3413
|
props: { hoverEffect: {
|
|
3332
3414
|
type: Boolean,
|
|
@@ -3344,7 +3426,7 @@ var ca = { class: "tpl:w-full" }, la = {
|
|
|
3344
3426
|
});
|
|
3345
3427
|
//#endregion
|
|
3346
3428
|
//#region src/utils/videoThumbnail.ts
|
|
3347
|
-
function
|
|
3429
|
+
function Ia(e) {
|
|
3348
3430
|
if (!e) return {
|
|
3349
3431
|
platform: "unknown",
|
|
3350
3432
|
videoId: null,
|
|
@@ -3376,25 +3458,25 @@ function ja(e) {
|
|
|
3376
3458
|
thumbnailUrl: null
|
|
3377
3459
|
};
|
|
3378
3460
|
}
|
|
3379
|
-
function
|
|
3380
|
-
return t ||
|
|
3461
|
+
function La(e, t) {
|
|
3462
|
+
return t || Ia(e).thumbnailUrl;
|
|
3381
3463
|
}
|
|
3382
3464
|
//#endregion
|
|
3383
3465
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3384
|
-
var
|
|
3466
|
+
var Ra = ["src", "alt"], za = {
|
|
3385
3467
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3386
3468
|
style: { opacity: "0.7" }
|
|
3387
|
-
},
|
|
3469
|
+
}, Ba = ["href"], Va = ["src", "alt"], Ha = ["src", "alt"], Ua = {
|
|
3388
3470
|
key: 3,
|
|
3389
3471
|
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)]"
|
|
3390
|
-
},
|
|
3472
|
+
}, Wa = /* @__PURE__ */ d({
|
|
3391
3473
|
__name: "VideoBlock",
|
|
3392
3474
|
props: {
|
|
3393
3475
|
block: {},
|
|
3394
3476
|
viewport: {}
|
|
3395
3477
|
},
|
|
3396
3478
|
setup(e) {
|
|
3397
|
-
let t = e, { t: n } = X(), { syntax: r } =
|
|
3479
|
+
let t = e, { t: n } = X(), { syntax: r } = an(), i = S(() => W(t.block.url, r) || W(t.block.thumbnailUrl, r)), a = Ln(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Ln(() => i.value ? t.block.placeholderUrl : void 0), c = S(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : La(t.block.url)), l = S(() => ({ textAlign: t.block.align })), u = S(() => {
|
|
3398
3480
|
let e = t.block.align;
|
|
3399
3481
|
return {
|
|
3400
3482
|
maxWidth: "100%",
|
|
@@ -3417,16 +3499,16 @@ var Na = ["src", "alt"], Pa = {
|
|
|
3417
3499
|
src: _(o),
|
|
3418
3500
|
alt: e.block.alt,
|
|
3419
3501
|
style: k(d.value)
|
|
3420
|
-
}, null, 12,
|
|
3502
|
+
}, null, 12, Ra), v(Fa)], 4)) : i.value ? (s(), C("div", {
|
|
3421
3503
|
key: 1,
|
|
3422
3504
|
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)]",
|
|
3423
3505
|
style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
3424
|
-
}, [v(_(
|
|
3506
|
+
}, [v(_(Jt), {
|
|
3425
3507
|
size: 36,
|
|
3426
3508
|
"stroke-width": 1.5,
|
|
3427
3509
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3428
3510
|
style: { opacity: "0.5" }
|
|
3429
|
-
}), M("span",
|
|
3511
|
+
}), M("span", za, [v(Mr, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), C(L, { key: 2 }, [e.block.url ? (s(), C("a", {
|
|
3430
3512
|
key: 0,
|
|
3431
3513
|
href: e.block.url,
|
|
3432
3514
|
target: "_blank",
|
|
@@ -3439,7 +3521,7 @@ var Na = ["src", "alt"], Pa = {
|
|
|
3439
3521
|
src: c.value,
|
|
3440
3522
|
alt: e.block.alt,
|
|
3441
3523
|
style: k(d.value)
|
|
3442
|
-
}, null, 12,
|
|
3524
|
+
}, null, 12, Va), v(Fa, { "hover-effect": "" })], 12, Ba)) : (s(), C("div", {
|
|
3443
3525
|
key: 1,
|
|
3444
3526
|
class: "tpl:relative tpl:inline-block",
|
|
3445
3527
|
style: k(u.value)
|
|
@@ -3448,54 +3530,54 @@ var Na = ["src", "alt"], Pa = {
|
|
|
3448
3530
|
src: c.value,
|
|
3449
3531
|
alt: e.block.alt,
|
|
3450
3532
|
style: k(d.value)
|
|
3451
|
-
}, null, 12,
|
|
3533
|
+
}, null, 12, Ha), v(Fa)], 4))], 64)) : (s(), C("div", Ua, [v(_(Jt), {
|
|
3452
3534
|
size: 40,
|
|
3453
3535
|
"stroke-width": 1.5,
|
|
3454
3536
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3455
3537
|
}), M("span", null, R(_(n).video.addVideo), 1)]))], 4));
|
|
3456
3538
|
}
|
|
3457
|
-
}),
|
|
3458
|
-
section:
|
|
3459
|
-
title:
|
|
3460
|
-
paragraph:
|
|
3461
|
-
image:
|
|
3462
|
-
button:
|
|
3463
|
-
divider:
|
|
3464
|
-
video:
|
|
3465
|
-
social:
|
|
3466
|
-
menu:
|
|
3467
|
-
table:
|
|
3468
|
-
spacer:
|
|
3469
|
-
html:
|
|
3470
|
-
countdown: B(() => import("./CountdownBlock-
|
|
3539
|
+
}), Ga = {
|
|
3540
|
+
section: ha,
|
|
3541
|
+
title: da,
|
|
3542
|
+
paragraph: Ki,
|
|
3543
|
+
image: Ni,
|
|
3544
|
+
button: Pr,
|
|
3545
|
+
divider: fi,
|
|
3546
|
+
video: Wa,
|
|
3547
|
+
social: Ta,
|
|
3548
|
+
menu: Li,
|
|
3549
|
+
table: Pa,
|
|
3550
|
+
spacer: Oa,
|
|
3551
|
+
html: vi,
|
|
3552
|
+
countdown: B(() => import("./CountdownBlock-B4AfqJwb.js"))
|
|
3471
3553
|
};
|
|
3472
|
-
function
|
|
3473
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = X(i), d = S(() => ae(ae(ae(
|
|
3554
|
+
function Ka(e) {
|
|
3555
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = X(i), d = S(() => ae(ae(ae(sr(i), Er(n.content.value.settings?.locale)), de(n.content.value.settings) === "rtl" ? {
|
|
3474
3556
|
title: { textAlign: "right" },
|
|
3475
3557
|
table: { textAlign: "right" }
|
|
3476
3558
|
} : {}), r.blockDefaults ?? {}));
|
|
3477
3559
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
3478
|
-
let { resolvedTheme: f } =
|
|
3560
|
+
let { resolvedTheme: f } = Gn(S(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: m } = qn({
|
|
3479
3561
|
themeOverrides: p,
|
|
3480
3562
|
resolvedTheme: f,
|
|
3481
3563
|
extraStyles: () => ({
|
|
3482
3564
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
3483
3565
|
...e.themeExtraStyles?.()
|
|
3484
3566
|
})
|
|
3485
|
-
}), g =
|
|
3567
|
+
}), g = mn({
|
|
3486
3568
|
content: n.content,
|
|
3487
3569
|
setContent: (e, t) => n.setContent(e, t),
|
|
3488
3570
|
...e.historyOptions
|
|
3489
3571
|
});
|
|
3490
|
-
|
|
3491
|
-
let _ =
|
|
3572
|
+
xn(n, g);
|
|
3573
|
+
let _ = gn({
|
|
3492
3574
|
addBlock: n.addBlock,
|
|
3493
3575
|
removeBlock: n.removeBlock,
|
|
3494
3576
|
updateBlock: n.updateBlock,
|
|
3495
3577
|
selectBlock: n.selectBlock,
|
|
3496
3578
|
findBlockLocation: n.findBlockLocation,
|
|
3497
3579
|
blockDefaults: () => d.value
|
|
3498
|
-
}), v =
|
|
3580
|
+
}), v = yn(n), y = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? vn({
|
|
3499
3581
|
content: n.content,
|
|
3500
3582
|
isDirty: () => n.state.isDirty,
|
|
3501
3583
|
...e.autoSaveOptions
|
|
@@ -3503,27 +3585,27 @@ function Va(e) {
|
|
|
3503
3585
|
y && (b = t(g.isNavigating, (e) => {
|
|
3504
3586
|
e ? y.pause() : y.resume();
|
|
3505
3587
|
}));
|
|
3506
|
-
let x =
|
|
3588
|
+
let x = Wn(n, {
|
|
3507
3589
|
t: s,
|
|
3508
3590
|
format: u
|
|
3509
|
-
}, r.customBlocks ?? []), C =
|
|
3591
|
+
}, r.customBlocks ?? []), C = Pt(r.colors);
|
|
3510
3592
|
if (C.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."), C.invalidPresets.length > 0 && Z.warn(`config.colors.presets skipped invalid entries: ${C.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), C.allowCustom === !1) {
|
|
3511
|
-
let e =
|
|
3593
|
+
let e = or(C.presets, r.blockDefaults, r.templateDefaults);
|
|
3512
3594
|
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.`);
|
|
3513
3595
|
}
|
|
3514
|
-
let w =
|
|
3515
|
-
for (let e of w.unknown) Z.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${
|
|
3516
|
-
let T =
|
|
3517
|
-
|
|
3596
|
+
let w = ir(r.templateSettings);
|
|
3597
|
+
for (let e of w.unknown) Z.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${nr.join(", ")}) — skipping it.`);
|
|
3598
|
+
let T = Jn();
|
|
3599
|
+
$n(T, Ga);
|
|
3518
3600
|
let E = /* @__PURE__ */ new Set();
|
|
3519
3601
|
function D(e) {
|
|
3520
3602
|
for (let t of e) {
|
|
3521
|
-
T.registerCustom(t,
|
|
3522
|
-
for (let e of
|
|
3603
|
+
T.registerCustom(t, ui);
|
|
3604
|
+
for (let e of Or(t, C)) E.has(e.id) || (E.add(e.id), Z.warn(e.message));
|
|
3523
3605
|
}
|
|
3524
3606
|
}
|
|
3525
3607
|
r.customBlocks?.length && D(r.customBlocks);
|
|
3526
|
-
let O =
|
|
3608
|
+
let O = Nn();
|
|
3527
3609
|
if (o() && h(O.dispose), e.containerEl) {
|
|
3528
3610
|
let t = e.containerEl;
|
|
3529
3611
|
K(document, "pointerdown", (e) => {
|
|
@@ -3540,7 +3622,7 @@ function Va(e) {
|
|
|
3540
3622
|
y?.flush();
|
|
3541
3623
|
}
|
|
3542
3624
|
function A(t) {
|
|
3543
|
-
O.isActive() &&
|
|
3625
|
+
O.isActive() && Ar(t, {
|
|
3544
3626
|
history: g,
|
|
3545
3627
|
selectBlock: (e) => n.selectBlock(e),
|
|
3546
3628
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -3554,29 +3636,29 @@ function Va(e) {
|
|
|
3554
3636
|
}
|
|
3555
3637
|
K(document, "keydown", A);
|
|
3556
3638
|
let j = l(null);
|
|
3557
|
-
c(
|
|
3639
|
+
c(ut, e.editorRoot ?? document), c($e, j), c(Ye, i), c(Y, n), c(At, g), c(dt, _), c(ht, v), c(Dt, a), c(ct, m), c(wt, f), c(St, d), c(Qe, r.locale), c(Et, T), c(Ct, r.customBlocks ?? []), c(Ze, r.paletteBlocks), c(ft, er(r.htmlBlockPreview)), c(mt, C), c(st, w.fields), c(bt, Yn(n.content, T));
|
|
3558
3640
|
let M = Se(r.mergeTags?.syntax);
|
|
3559
|
-
c(q, r.mergeTags?.tags ?? []), c(
|
|
3641
|
+
c(q, r.mergeTags?.tags ?? []), c(et, M), c(Je, r.mergeTags?.onRequest ?? null), c(nt, r.mergeTags?.autocomplete !== !1);
|
|
3560
3642
|
let N = l(Fe(r.mergeTags?.tags ?? []));
|
|
3561
|
-
c(
|
|
3562
|
-
let P =
|
|
3643
|
+
c(_t, N);
|
|
3644
|
+
let P = Fn({
|
|
3563
3645
|
resolvePreview: r.resolvePreview,
|
|
3564
3646
|
getContent: () => n.content.value,
|
|
3565
3647
|
isActive: () => n.state.previewMode
|
|
3566
3648
|
});
|
|
3567
|
-
c(
|
|
3649
|
+
c(it, P), c(jt, r.resolvePreview);
|
|
3568
3650
|
let F = S(() => !(n.state.previewMode && P.isConfigured));
|
|
3569
|
-
c(
|
|
3570
|
-
let I =
|
|
3571
|
-
c(
|
|
3572
|
-
let L =
|
|
3651
|
+
c(Tt, F);
|
|
3652
|
+
let I = Rn();
|
|
3653
|
+
c(vt, I), c(Ge, l(!1)), c(qe, l(!1)), c(Ot, r.logicTags?.tags ?? []), c(Ke, r.logicTags?.pairs ?? []), c(tt, r.logicTags?.onRequest ?? null), c(ot, zn()), c(rt, r.onRequestMedia ?? null), c(pt, r.canDropMedia ?? null), c(kt, r.resolveImageUrl ? In(r.resolveImageUrl) : null), c(gt, r.displayConditions?.conditions ?? []), c(xt, r.displayConditions?.allowCustom ?? !1), c(yt, e.capabilities ?? {}), c(at, x);
|
|
3654
|
+
let L = Bn(r.lint) ? null : Vn({
|
|
3573
3655
|
content: n.content,
|
|
3574
3656
|
options: r.lint ?? {},
|
|
3575
3657
|
updateBlock: n.updateBlock,
|
|
3576
3658
|
updateSettings: n.updateSettings,
|
|
3577
3659
|
removeBlock: n.removeBlock
|
|
3578
3660
|
});
|
|
3579
|
-
c(
|
|
3661
|
+
c(Xe, L);
|
|
3580
3662
|
function R() {
|
|
3581
3663
|
b?.(), L?.destroy(), y?.destroy(), g.destroy();
|
|
3582
3664
|
}
|
|
@@ -3602,6 +3684,6 @@ function Va(e) {
|
|
|
3602
3684
|
};
|
|
3603
3685
|
}
|
|
3604
3686
|
//#endregion
|
|
3605
|
-
export {
|
|
3687
|
+
export { hr as A, Hn as B, Kr as C, Lr as D, zr as E, yr as F, Dn as G, An as H, vr as I, bn as J, wn as K, nr as L, Sr as M, xr as N, Pr as O, br as P, tr as R, Zr as S, Br as T, kn as U, Fn as V, On as W, un as X, _n as Y, vi as _, Ta as a, ti as b, da as c, qi as d, Ji as f, bi as g, Ni as h, Oa as i, Cr as j, Dr as k, la as l, Li as m, Wa as n, va as o, Ki as p, Sn as q, Pa as r, ha as s, Ka as t, Yi as u, fi as v, Gr as w, $r as x, ui as y, Un as z };
|
|
3606
3688
|
|
|
3607
|
-
//# sourceMappingURL=useEditorCore-
|
|
3689
|
+
//# sourceMappingURL=useEditorCore-Cs7rYVBo.js.map
|