@templatical/editor 0.31.0 → 0.32.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-DYDtzTDd.js → AiChatSidebar-ftdKHSR-.js} +15 -15
- package/dist/{AiFeatureMenu-BJ882XCi.js → AiFeatureMenu-aNeCRlil.js} +7 -7
- package/dist/{BlockIssueBadge-D6y8vQpL.js → BlockIssueBadge-bTDu6W_2.js} +5 -5
- package/dist/{BlockPreviewCanvas-DQNxLy7u.js → BlockPreviewCanvas-BsOuOfzB.js} +20 -19
- package/dist/{CloudHeaderExtras-CqG3RaKw.js → CloudHeaderExtras-BNpFohqt.js} +5 -5
- package/dist/{CloudPanels-B6xrk7kN.js → CloudPanels-xoGWwqSH.js} +7 -7
- package/dist/{CollaboratorBar-by16gXQH.js → CollaboratorBar-mEqXkdEi.js} +4 -4
- package/dist/{ColorPicker-E5gqlCZE.js → ColorPicker-FL5Vb9bE.js} +7 -7
- package/dist/{CommentsPanel-B_kzvTHR.js → CommentsPanel-slfi74ng.js} +2 -2
- package/dist/{CommentsSidebar-gfzUX7cd.js → CommentsSidebar-Dea4spMl.js} +14 -14
- package/dist/{CountdownBlock-BgNK7fZY.js → CountdownBlock-DQTwaRxP.js} +3 -3
- package/dist/{CountdownToolbar-DU8UHx9A.js → CountdownToolbar-C7xwJoqh.js} +4 -4
- package/dist/{DesignReferenceSidebar-DgndMB4H.js → DesignReferenceSidebar-BtBd7bbz.js} +11 -11
- package/dist/{FieldRow-0-UbQR4a.js → FieldRow-BWt7ECqo.js} +1 -1
- package/dist/{IssuesPanel-DmJTb_SZ.js → IssuesPanel-Ci2H36L2.js} +8 -8
- package/dist/{LoadingTrack-5KBr5cE8.js → LoadingTrack-SQXoZVf2.js} +1 -1
- package/dist/{MergeTagModeToggle-CZnJ2Gz_.js → MergeTagModeToggle-Cdi_DmVw.js} +6 -6
- package/dist/{MergeTagSuggestion-DyUcY_9e.js → MergeTagSuggestion-CoCuzEmW.js} +4 -4
- package/dist/{ParagraphEditor-CnB4kXle.js → ParagraphEditor-DQEOFc0K.js} +26 -26
- package/dist/{RestoreVersionDialog-BpOphPiE.js → RestoreVersionDialog-CHwngBae.js} +5 -5
- package/dist/{RichTextEditorContent-ChPNgHQ_.js → RichTextEditorContent-C_9xi7dD.js} +8 -8
- package/dist/{SaveBlockDialog-CKw4Va6j.js → SaveBlockDialog-tZqZzPjW.js} +21 -21
- package/dist/SavedBlocksBrowserModal-Bdj3GOD_.js +322 -0
- package/dist/{SavedBlocksPanels-ChV8bOgM.js → SavedBlocksPanels-2sBxAH9w.js} +2 -2
- package/dist/{SavedBlocksPickBar-BbEeD5RB.js → SavedBlocksPickBar-DTjQBR00.js} +4 -4
- package/dist/{TemplateScoringPanel-De8BZpRU.js → TemplateScoringPanel-B6nHSrBD.js} +15 -15
- package/dist/{TestEmailModal-4d2pXeHU.js → TestEmailModal-DuHbzO37.js} +11 -11
- package/dist/{TestEmailPanel-DEgCesNP.js → TestEmailPanel-TpwP-eK_.js} +2 -2
- package/dist/{TitleEditor-89pmKLVY.js → TitleEditor-C0JQJu38.js} +12 -12
- package/dist/{TplModal-DswccJRJ.js → TplModal-BMGmhquu.js} +5 -5
- package/dist/VersionHistoryMenu-D2x6MMYx.js +157 -0
- package/dist/{VersionHistoryPanels-CFLHDH9P.js → VersionHistoryPanels-aGlUVEGF.js} +2 -2
- package/dist/{VersionPreviewBanner-DhG5RcRt.js → VersionPreviewBanner-61t3_Z-a.js} +3 -3
- package/dist/{blockTypeIcons-dpKs5GQc.js → blockTypeIcons-BsNup009.js} +2 -2
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +5 -0
- package/dist/cdn/chunks/{AiChatSidebar-DmYDRmvX.js → AiChatSidebar-CqWvtRwB.js} +9 -9
- package/dist/cdn/chunks/{AiChatSidebar-DmYDRmvX.js.map → AiChatSidebar-CqWvtRwB.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-C0Rt08qb.js → AiFeatureMenu-DoFrLcXJ.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-C0Rt08qb.js.map → AiFeatureMenu-DoFrLcXJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BBog2CMy.js → BlockIssueBadge-B_mUH69a.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BBog2CMy.js.map → BlockIssueBadge-B_mUH69a.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DNBjBKBI.js → BlockPreviewCanvas-CSIxs7hr.js} +21 -20
- package/dist/cdn/chunks/BlockPreviewCanvas-CSIxs7hr.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-Ditfv7y9.js → CloudHeaderExtras-Dgtr7WaE.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-Ditfv7y9.js.map → CloudHeaderExtras-Dgtr7WaE.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-C4U5bJO6.js → CloudPanels-B91lUmof.js} +7 -7
- package/dist/cdn/chunks/{CloudPanels-C4U5bJO6.js.map → CloudPanels-B91lUmof.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-B79JR9NH.js → CollaboratorBar-CQwPWoFu.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-B79JR9NH.js.map → CollaboratorBar-CQwPWoFu.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-C-ZiwUV3.js → ColorPicker-CdrKX48J.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-C-ZiwUV3.js.map → ColorPicker-CdrKX48J.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-D1Ke8PbO.js → CommentsPanel-BJNgTmAA.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-D1Ke8PbO.js.map → CommentsPanel-BJNgTmAA.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-B-UyhIZN.js → CommentsSidebar-D6VIIPhB.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-B-UyhIZN.js.map → CommentsSidebar-D6VIIPhB.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js → CountdownBlock-BRwXUvGU.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js.map → CountdownBlock-BRwXUvGU.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DyOHOu44.js → CountdownToolbar-CVaU5WG6.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DyOHOu44.js.map → CountdownToolbar-CVaU5WG6.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BCCX1FtP.js → DesignReferenceSidebar-BvOwE1kg.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-BCCX1FtP.js.map → DesignReferenceSidebar-BvOwE1kg.js.map} +1 -1
- package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js → FieldRow-D9OJhYeb.js} +2 -2
- package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js.map → FieldRow-D9OJhYeb.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-3vD3ImHF.js → IssuesPanel-MJZxkScz.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-3vD3ImHF.js.map → IssuesPanel-MJZxkScz.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js → LoadingTrack-Cm3TDKb3.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js.map → LoadingTrack-Cm3TDKb3.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BU0SDRow.js → MergeTagModeToggle-bNuN6PTV.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-BU0SDRow.js.map → MergeTagModeToggle-bNuN6PTV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-B9vL0VaG.js → MergeTagSuggestion-t8Uj00Er.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-B9vL0VaG.js.map → MergeTagSuggestion-t8Uj00Er.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CSwIuvoF.js → ParagraphEditor-BU8tlFbL.js} +23 -23
- package/dist/cdn/chunks/{ParagraphEditor-CSwIuvoF.js.map → ParagraphEditor-BU8tlFbL.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-Bvg2WvJN.js → RestoreVersionDialog-vdRFfyy0.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-Bvg2WvJN.js.map → RestoreVersionDialog-vdRFfyy0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DdkmEEpK.js → RichTextEditorContent-C1-5I8Df.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-DdkmEEpK.js.map → RichTextEditorContent-C1-5I8Df.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-D-QO3LuR.js → SaveBlockDialog-DWaeqcM8.js} +9 -9
- package/dist/cdn/chunks/{SaveBlockDialog-D-QO3LuR.js.map → SaveBlockDialog-DWaeqcM8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BRdN56r7.js → SavedBlocksBrowserModal-qC7UhW74.js} +110 -111
- package/dist/cdn/chunks/SavedBlocksBrowserModal-qC7UhW74.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-D9GTlLgb.js → SavedBlocksPanels-BvtjtdsY.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-D9GTlLgb.js.map → SavedBlocksPanels-BvtjtdsY.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DSRcUeIo.js → SavedBlocksPickBar-CxXjF3RN.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-DSRcUeIo.js.map → SavedBlocksPickBar-CxXjF3RN.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-Dy5oOVhB.js → TemplateScoringPanel-CroWaWqy.js} +50 -50
- package/dist/cdn/chunks/{TemplateScoringPanel-Dy5oOVhB.js.map → TemplateScoringPanel-CroWaWqy.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-B4L2lmIV.js → TestEmailModal-iWxAZRRq.js} +10 -10
- package/dist/cdn/chunks/{TestEmailModal-B4L2lmIV.js.map → TestEmailModal-iWxAZRRq.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-cTPgEf-D.js → TestEmailPanel-CGUtEuwp.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-cTPgEf-D.js.map → TestEmailPanel-CGUtEuwp.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BKjL2Zs1.js → TitleEditor-DvXUW2j-.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-BKjL2Zs1.js.map → TitleEditor-DvXUW2j-.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DxrgNmt9.js → TplModal-X-qNoLGZ.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DxrgNmt9.js.map → TplModal-X-qNoLGZ.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryMenu-yKzwxf7n.js +150 -0
- package/dist/cdn/chunks/VersionHistoryMenu-yKzwxf7n.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-CxIFBJsz.js → VersionHistoryPanels--hQaanjH.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-CxIFBJsz.js.map → VersionHistoryPanels--hQaanjH.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CdsZvVYF.js → VersionPreviewBanner-DWU_SqMd.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-CdsZvVYF.js.map → VersionPreviewBanner-DWU_SqMd.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-DXPd_hd1.js → blockTypeIcons-ZEzEpCti.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-DXPd_hd1.js.map → blockTypeIcons-ZEzEpCti.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +6 -1
- package/dist/cdn/chunks/ca-C0hfqt4U.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CITqEHEc.js → cloud-BP5-6__d.js} +4 -4
- package/dist/cdn/chunks/{cloud-CITqEHEc.js.map → cloud-BP5-6__d.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-DwIXvrb0.js → createCloudRuntime-DD6ppb71.js} +10 -10
- package/dist/cdn/chunks/{createCloudRuntime-DwIXvrb0.js.map → createCloudRuntime-DD6ppb71.js.map} +1 -1
- package/dist/{de-DbayqpK-.js → cdn/chunks/de-C6J2Iae8.js} +7 -0
- package/dist/cdn/chunks/de-C6J2Iae8.js.map +1 -0
- package/dist/cdn/chunks/{dist-CgR3inPR.js → dist-BW6Y49zE.js} +2 -2
- package/dist/cdn/chunks/{dist-CgR3inPR.js.map → dist-BW6Y49zE.js.map} +1 -1
- package/dist/cdn/chunks/{dist-El3fQnfk.js → dist-CAFTQ6Y2.js} +5 -5
- package/dist/cdn/chunks/{dist-El3fQnfk.js.map → dist-CAFTQ6Y2.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-D2vo-aQI.js → draggable-kbOhCgnk.js} +12 -13
- package/dist/cdn/chunks/{draggable-D2vo-aQI.js.map → draggable-kbOhCgnk.js.map} +1 -1
- package/dist/cdn/chunks/{en-l0ib5X0f.js → en-BaUYOQi8.js} +6 -1
- package/dist/cdn/chunks/en-BaUYOQi8.js.map +1 -0
- package/dist/cdn/chunks/en-mEKGL1PX.js +2 -0
- package/dist/cdn/chunks/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +6 -1
- package/dist/cdn/chunks/es-CKDYfJYn.js.map +1 -0
- package/dist/cdn/chunks/{extensions-C87Z6_23.js → extensions-BUPHNpKD.js} +7 -7
- package/dist/cdn/chunks/{extensions-C87Z6_23.js.map → extensions-BUPHNpKD.js.map} +1 -1
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js +15 -0
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js.map +1 -0
- package/dist/{fr-DNXmZWAq.js → cdn/chunks/fr-L8DR73mK.js} +7 -0
- package/dist/cdn/chunks/fr-L8DR73mK.js.map +1 -0
- package/dist/cdn/chunks/{icons-ciivb5BS.js → icons-SP5Itd-A.js} +9 -9
- package/dist/cdn/chunks/icons-SP5Itd-A.js.map +1 -0
- package/dist/cdn/chunks/keys-BOn5i9jV.js +12 -0
- package/dist/cdn/chunks/keys-BOn5i9jV.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js → liquid.browser-BypTT2oc.js} +4 -4
- package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js.map → liquid.browser-BypTT2oc.js.map} +1 -1
- package/dist/{nl-BylRRHYJ.js → cdn/chunks/nl-GDWeuX18.js} +7 -0
- package/dist/cdn/chunks/nl-GDWeuX18.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js → preRenderCustomBlocks-LFB-e-0m.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js.map → preRenderCustomBlocks-LFB-e-0m.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +6 -1
- package/dist/cdn/chunks/pt-BR-B1AVVhWj.js.map +1 -0
- package/dist/cdn/chunks/{src-6J-yyZoD.js → src-BM3f9I7t.js} +268 -268
- package/dist/cdn/chunks/{src-6J-yyZoD.js.map → src-BM3f9I7t.js.map} +1 -1
- package/dist/cdn/chunks/{src-BD60gqPW.js → src-CLoCCDfs.js} +26 -26
- package/dist/cdn/chunks/{src-BD60gqPW.js.map → src-CLoCCDfs.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bid3cmHa.js → src-Cxl-9O-L.js} +699 -684
- package/dist/cdn/chunks/src-Cxl-9O-L.js.map +1 -0
- package/dist/cdn/chunks/{src-Cf0ohOog.js → src-DtnvR_Hl.js} +19 -19
- package/dist/cdn/chunks/src-DtnvR_Hl.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-Ey0FpaX7.js → tiptap-Epe8m3Vo.js} +2636 -2629
- package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js → useAliveFlag-CT9gjvO_.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js.map → useAliveFlag-CT9gjvO_.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js → useCloudI18n-DbsLlCbZ.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js.map → useCloudI18n-DbsLlCbZ.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CTNB2Mkl.js → useEditorCore-ChlgO2GN.js} +556 -412
- package/dist/cdn/chunks/useEditorCore-ChlgO2GN.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-BlF1WPeu.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-BFGRBGts.js.map → useEditorRoot-BlF1WPeu.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DIhawILp.js → useI18n-BdxNNw6j.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DIhawILp.js.map → useI18n-BdxNNw6j.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-lWo7So18.js → useMergeTag-CI2WUNrR.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-lWo7So18.js.map → useMergeTag-CI2WUNrR.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js → usePopoverPosition-Dw1nTSNx.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js.map → usePopoverPosition-Dw1nTSNx.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js → useScrollToBlock-BMis3-PR.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js.map → useScrollToBlock-BMis3-PR.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1099 -1143
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-80E6ZGin.js → check-JK8Uacq0.js} +1 -1
- package/dist/{chevron-down-BmkLsn2c.js → chevron-down-a-fb_Ijn.js} +1 -1
- package/dist/{chevron-up-DJSAzlUU.js → chevron-up-x4l0et_Y.js} +1 -1
- package/dist/{circle-alert-BsCfZryY.js → circle-alert-CJDW5LZo.js} +1 -1
- package/dist/{clock-BcLIngSK.js → clock-BW6rXk2f.js} +1 -1
- package/dist/{cloud-DwJ8ebNl.js → cloud-BMzRKCbk.js} +3 -3
- package/dist/{createCloudRuntime-CdXQdl34.js → createCloudRuntime-zNcMjRgb.js} +8 -8
- package/dist/{createLucideIcon-eeetEgBb.js → createLucideIcon-Bvw1Zx56.js} +3 -3
- package/dist/{cdn/chunks/de-DbayqpK-.js → de-C6J2Iae8.js} +5 -2
- package/dist/{dist-BFcAowKZ.js → dist-BxFbxpgW.js} +5 -5
- package/dist/{dist-Do83S47T.js → dist-ByT5fgKq.js} +2 -2
- package/dist/{dist-CQ9T1yi-.js → dist-C1tsW_99.js} +2 -2
- package/dist/{dist-Cd0LvUlh.js → dist-CtF9STPS.js} +2 -2
- package/dist/{dist-CvW1nNzy.js → dist-CtMXAH7a.js} +2 -2
- package/dist/dist-D08oVYhr.js +5 -0
- package/dist/{dist-prgdllHG.js → dist-D7WY8VPq.js} +2 -2
- package/dist/{dist-D8MekYFl.js → dist-DC-3T0ED.js} +2 -2
- package/dist/{dist-BC1y_U2m.js → dist-DL9334yz.js} +1418 -1411
- package/dist/{dist-BkAVGSRr.js → dist-DkcA6epL.js} +7 -7
- package/dist/dist-DzdeVn-W.js +5 -0
- package/dist/{dist-CzVIVbSa.js → dist-PL6vP4SC.js} +61 -61
- package/dist/{dist-CuuPnIMy.js → dist-dNiknO7j.js} +4 -4
- package/dist/{dist-CWC5t5J3.js → dist-f7HXo6j6.js} +2 -2
- package/dist/{dist-BUpBA58N.js → dist-heatwAdo.js} +1 -1
- package/dist/{en-l0ib5X0f.js → en-BaUYOQi8.js} +5 -0
- package/dist/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +5 -0
- package/dist/{extensions-BYImwYeO.js → extensions-kOYwOh72.js} +21 -21
- package/dist/formatAbsoluteDateTime-DMmop3C-.js +13 -0
- package/dist/{cdn/chunks/fr-DNXmZWAq.js → fr-L8DR73mK.js} +5 -2
- package/dist/{image-up-BfxY85ar.js → image-up-CuzFc1mu.js} +1 -1
- package/dist/{info-LX4QFBr6.js → info-DybAwcA3.js} +1 -1
- package/dist/keys-BOhFlHsv.js +10 -0
- package/dist/{liquid.browser-CJgDDvQz.js → liquid.browser-wPG0n4Cs.js} +3 -3
- package/dist/{loader-circle-Bwima0v8.js → loader-circle-t-SVgmJ3.js} +1 -1
- package/dist/{message-circle-Box-mf2k.js → message-circle-DtwKrlhN.js} +1 -1
- package/dist/{cdn/chunks/nl-BylRRHYJ.js → nl-GDWeuX18.js} +5 -2
- package/dist/{pencil-BM9gSq_J.js → pencil-2qhC-Y4q.js} +1 -1
- package/dist/{preRenderCustomBlocks-2KyBJocY.js → preRenderCustomBlocks-CSIF-HyJ.js} +1 -1
- package/dist/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +5 -0
- package/dist/{refresh-cw-BuzFX0wH.js → refresh-cw-C8SBuPdg.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-Co_SPqAz.js → runtime-dom.esm-bundler-BuG03jBM.js} +3 -3
- package/dist/{scan-line-Duq1WXoG.js → scan-line-E7w4yQyv.js} +1 -1
- package/dist/{send-DZ4nOnIA.js → send-BoqJliF6.js} +1 -1
- package/dist/{shield-check-Cz4BRYdv.js → shield-check-D0dMaHtE.js} +1 -1
- package/dist/{sparkles-DP8RqOeL.js → sparkles-Dy2BJjiX.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1236 -1281
- package/dist/{text-align-start-D7tXhjUP.js → text-align-start-DrxjxvIy.js} +1 -1
- package/dist/{trash-2-BS7lZeyb.js → trash-rYMzzHZd.js} +2 -2
- package/dist/{triangle-alert-Cx4mQGjx.js → triangle-alert-DxnFj4-B.js} +1 -1
- package/dist/{upload-L8tLVM10.js → upload-DZu1adQz.js} +1 -1
- package/dist/{useAliveFlag-AFbwfHlJ.js → useAliveFlag-PVmp95MT.js} +1 -1
- package/dist/{useCloudI18n-BA69BpQ_.js → useCloudI18n-BlMajbKp.js} +2 -2
- package/dist/{useEditorCore-CtR46sbJ.js → useEditorCore-CwQYCSXO.js} +1212 -1067
- package/dist/{useEditorRoot-Cdo8Vhxa.js → useEditorRoot-C92q8uV-.js} +2 -2
- package/dist/{useI18n-B135ASaG.js → useI18n-Ce_BRzYv.js} +2 -2
- package/dist/{useMergeTag-Cx36rtrt.js → useMergeTag-CrXJ49lr.js} +3 -3
- package/dist/{usePopoverPosition-DAOHr_iM.js → usePopoverPosition-CPk7Twye.js} +2 -2
- package/dist/{useScrollToBlock-tndC8vKo.js → useScrollToBlock-DvpMfWs2.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-BhOUdXMi.js → vue.runtime.esm-bundler-D9JUcKrV.js} +4 -4
- package/dist/{x-ChIQ7HwK.js → x-DJOd1hS4.js} +1 -1
- package/package.json +23 -23
- package/dist/SavedBlocksBrowserModal-SST-7EMK.js +0 -323
- package/dist/VersionHistoryMenu-DBxSJR1k.js +0 -155
- package/dist/cdn/chunks/BlockPreviewCanvas-DNBjBKBI.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BRdN56r7.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-CMqZFUHE.js +0 -148
- package/dist/cdn/chunks/VersionHistoryMenu-CMqZFUHE.js.map +0 -1
- package/dist/cdn/chunks/ca-DZSrLNXK.js.map +0 -1
- package/dist/cdn/chunks/de-DbayqpK-.js.map +0 -1
- package/dist/cdn/chunks/en-BzFt4b80.js +0 -2
- package/dist/cdn/chunks/en-l0ib5X0f.js.map +0 -1
- package/dist/cdn/chunks/es-CMQ-5PJP.js.map +0 -1
- package/dist/cdn/chunks/fr-DNXmZWAq.js.map +0 -1
- package/dist/cdn/chunks/icons-ciivb5BS.js.map +0 -1
- package/dist/cdn/chunks/keys-BJ770Mwm.js +0 -12
- package/dist/cdn/chunks/keys-BJ770Mwm.js.map +0 -1
- package/dist/cdn/chunks/nl-BylRRHYJ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BVoJhpie.js.map +0 -1
- package/dist/cdn/chunks/src-Bid3cmHa.js.map +0 -1
- package/dist/cdn/chunks/src-Cf0ohOog.js.map +0 -1
- package/dist/cdn/chunks/tiptap-Ey0FpaX7.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CTNB2Mkl.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BFGRBGts.js +0 -10
- package/dist/dist-BQqIUwvB.js +0 -5
- package/dist/dist-waDcdb1l.js +0 -5
- package/dist/keys-BJtoezGU.js +0 -10
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as e, P as t, Q as n, Y as r, f as i } from "./draggable-
|
|
2
|
-
import { _ as a } from "./dist-
|
|
3
|
-
import { t as o } from "./dist-
|
|
4
|
-
import { R as s, i as c, l, t as u } from "./keys-
|
|
1
|
+
import { B as e, P as t, Q as n, Y as r, f as i } from "./draggable-kbOhCgnk.js";
|
|
2
|
+
import { _ as a } from "./dist-BW6Y49zE.js";
|
|
3
|
+
import { t as o } from "./dist-CAFTQ6Y2.js";
|
|
4
|
+
import { R as s, i as c, l, t as u } from "./keys-BOn5i9jV.js";
|
|
5
5
|
import { t as d } from "./timeouts-DHPZQ0G3.js";
|
|
6
6
|
import { t as f } from "./logger-ByvdoAwq.js";
|
|
7
|
-
import { t as p } from "./preRenderCustomBlocks-
|
|
8
|
-
import { E as m, _ as h, a as g, b as ee, c as te, d as ne, f as _, h as v, i as y, l as b, m as x, n as S, o as C, p as re, r as ie, s as ae, t as oe, u as se, v as ce, w as le } from "./cloud-
|
|
7
|
+
import { t as p } from "./preRenderCustomBlocks-LFB-e-0m.js";
|
|
8
|
+
import { E as m, _ as h, a as g, b as ee, c as te, d as ne, f as _, h as v, i as y, l as b, m as x, n as S, o as C, p as re, r as ie, s as ae, t as oe, u as se, v as ce, w as le } from "./cloud-BP5-6__d.js";
|
|
9
9
|
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
10
10
|
function ue(e) {
|
|
11
11
|
let { planConfigInstance: t, aiConfig: n, getTemplateId: r } = e;
|
|
@@ -53,7 +53,7 @@ function de(e) {
|
|
|
53
53
|
let t = f(e);
|
|
54
54
|
if (t) return s?.(t), null;
|
|
55
55
|
try {
|
|
56
|
-
let { MediaApiClient: t } = await import("./src-
|
|
56
|
+
let { MediaApiClient: t } = await import("./src-Cxl-9O-L.js");
|
|
57
57
|
return l(await new t(a).uploadMedia(e));
|
|
58
58
|
} catch (e) {
|
|
59
59
|
return s?.(e), null;
|
|
@@ -157,7 +157,7 @@ function me(e) {
|
|
|
157
157
|
s.value = !1;
|
|
158
158
|
}, d, { immediate: !1 });
|
|
159
159
|
function l() {
|
|
160
|
-
o.value
|
|
160
|
+
!o.value && t.value && r() !== 0 && i.value && (o.value = !0, s.value = !0, c());
|
|
161
161
|
}
|
|
162
162
|
return {
|
|
163
163
|
collabUndoWarningVisible: s,
|
|
@@ -269,7 +269,7 @@ async function T(r) {
|
|
|
269
269
|
V.length > 0 && f.warn(`initCloud ignores ${w(V.map((e) => `comments.${e}`))} — a comment is keyed to a template id Cloud issued, and its author is signed by the auth token, so Cloud owns the conversation. Your event handlers were kept. Use init() to bring your own storage.`), a.render && f.warn("initCloud does not accept a `render` provider — Cloud renders server-side for test email, sends and exports, so a supplied renderer would change only what you preview and export, never what Cloud delivers. The supplied provider is ignored. For your own MJML, call renderToMjml(editor.getContent()) from @templatical/renderer.");
|
|
270
270
|
function H(e) {
|
|
271
271
|
let t = L.config.value?.websocket;
|
|
272
|
-
|
|
272
|
+
E && t && E.connect(e.id, ee(t));
|
|
273
273
|
}
|
|
274
274
|
let U = se(I), W = U.create, G = U.save, we = {
|
|
275
275
|
...ge(a.templates),
|
|
@@ -440,4 +440,4 @@ async function T(r) {
|
|
|
440
440
|
//#endregion
|
|
441
441
|
export { T as bootstrapCloud };
|
|
442
442
|
|
|
443
|
-
//# sourceMappingURL=createCloudRuntime-
|
|
443
|
+
//# sourceMappingURL=createCloudRuntime-DD6ppb71.js.map
|
package/dist/cdn/chunks/{createCloudRuntime-DwIXvrb0.js.map → createCloudRuntime-DD6ppb71.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCloudRuntime-DwIXvrb0.js","names":[],"sources":["../../../src/cloud/composables/useCloudFeatureFlags.ts","../../../src/cloud/composables/useCloudMediaLibrary.ts","../../../src/cloud/composables/useCloudPanelState.ts","../../../src/cloud/composables/useCloudSaveGate.ts","../../../src/cloud/composables/useCollabUndoWarning.ts","../../../src/cloud/collectSavedBlockIds.ts","../../../src/cloud/createCloudRuntime.ts"],"sourcesContent":["import { computed, type ComputedRef } from \"vue\";\nimport type {\n UsePlanConfigReturn,\n UseAiConfigReturn,\n} from \"@templatical/core/cloud\";\n\nexport interface UseCloudFeatureFlagsOptions {\n planConfigInstance: UsePlanConfigReturn;\n aiConfig: UseAiConfigReturn;\n /** The loaded template's id, or `null` before one exists. */\n getTemplateId: () => string | null;\n}\n\nexport interface UseCloudFeatureFlagsReturn {\n canUseAiGeneration: ComputedRef<boolean>;\n canSendTestEmail: ComputedRef<boolean>;\n hasTemplateSaved: ComputedRef<boolean>;\n templateLimit: ComputedRef<number | null>;\n templateCount: ComputedRef<number>;\n}\n\n/**\n * Every entitlement check Cloud makes, in one place.\n *\n * The containment rule this exists for: entitlement checks go through here,\n * never inline in a component and never across a package boundary. With five\n * plan features left there is little excuse to break it.\n *\n * Save status is deliberately not here — it lives on `useTemplatesFeature`, which\n * the one shared header reads, and was never an entitlement. Footer branding is\n * likewise not gated: `config.branding !== false` decides it on any plan.\n */\nexport function useCloudFeatureFlags(\n options: UseCloudFeatureFlagsOptions,\n): UseCloudFeatureFlagsReturn {\n const { planConfigInstance, aiConfig, getTemplateId } = options;\n\n const canUseAiGeneration = computed(\n () =>\n planConfigInstance.hasFeature(\"ai_generation\") &&\n aiConfig.hasAnyMenuFeature.value,\n );\n const canSendTestEmail = computed(() =>\n planConfigInstance.hasFeature(\"test_email\"),\n );\n const hasTemplateSaved = computed(() => getTemplateId() !== null);\n const templateLimit = computed(\n () => planConfigInstance.config.value?.limits.max_templates ?? null,\n );\n const templateCount = computed(\n () => planConfigInstance.config.value?.template_count ?? 0,\n );\n\n return {\n canUseAiGeneration,\n canSendTestEmail,\n hasTemplateSaved,\n templateLimit,\n templateCount,\n };\n}\n","import { onScopeDispose, type Ref } from \"vue\";\nimport type {\n MediaCategory,\n MediaConfig,\n MediaItem,\n MediaRequestContext,\n} from \"@templatical/media-library\";\nimport type { AuthManager } from \"@templatical/core/cloud\";\nimport type { MediaResult } from \"@templatical/types\";\n\nexport interface UseCloudMediaLibraryOptions {\n onRequestMedia?: (context: MediaRequestContext) => Promise<MediaItem | null>;\n mediaLibraryOpen: Ref<boolean>;\n mediaLibraryAccept: Ref<MediaCategory[] | undefined>;\n /** Auth used by the built-in drag-and-drop upload (#229). */\n authManager: AuthManager;\n /**\n * Active plan's media config, read at upload time for a client-side\n * pre-check (MIME + size) before hitting the network. Returns `null` until\n * the plan config has loaded; the server stays the authoritative validator.\n */\n getMediaConfig?: () => MediaConfig | null;\n /** Surface upload/validation failures to the consumer's error handler. */\n onError?: (error: Error) => void;\n}\n\nexport interface UseCloudMediaLibraryReturn {\n handleRequestMedia: (\n context?: MediaRequestContext,\n ) => Promise<MediaResult | null>;\n handleMediaSelect: (item: MediaItem) => void;\n handleMediaLibraryClose: () => void;\n}\n\nexport function useCloudMediaLibrary(\n options: UseCloudMediaLibraryOptions,\n): UseCloudMediaLibraryReturn {\n const {\n onRequestMedia,\n mediaLibraryOpen,\n mediaLibraryAccept,\n authManager,\n getMediaConfig,\n onError,\n } = options;\n\n let mediaResolve: ((result: MediaResult | null) => void) | null = null;\n\n function toMediaResult(item: MediaItem): MediaResult {\n return { url: item.url, alt: item.alt_text || undefined };\n }\n\n async function handleRequestMedia(\n context?: MediaRequestContext,\n ): Promise<MediaResult | null> {\n const accept = context?.accept ?? [\"images\"];\n\n // Drag-and-drop upload path (#229). A dropped file is forwarded to a\n // consumer handler if one is configured; otherwise it's uploaded directly\n // to the cloud and the resulting media item becomes the block's image.\n if (context?.files?.length) {\n if (onRequestMedia) {\n const item = await onRequestMedia({ accept, files: context.files });\n return item ? toMediaResult(item) : null;\n }\n return uploadDroppedFile(context.files[0]);\n }\n\n // If consumer provides a custom media handler, use it.\n if (onRequestMedia) {\n const item = await onRequestMedia({ accept });\n return item ? toMediaResult(item) : null;\n }\n\n // Otherwise open the built-in media library. If a previous request\n // is still pending (e.g. consumer fired two requests back-to-back),\n // settle it with null so its caller doesn't hang forever.\n if (mediaResolve) {\n mediaResolve(null);\n mediaResolve = null;\n }\n mediaLibraryAccept.value = accept;\n mediaLibraryOpen.value = true;\n return new Promise<MediaResult | null>((resolve) => {\n mediaResolve = (result) => {\n resolve(result);\n };\n });\n }\n\n async function uploadDroppedFile(file: File): Promise<MediaResult | null> {\n const validationError = validateFile(file);\n if (validationError) {\n onError?.(validationError);\n return null;\n }\n try {\n // media-library is an optional, cloud-only peer — import lazily so OSS\n // bundles never pull it in. Cloud consumers always have it installed.\n const { MediaApiClient } = await import(\"@templatical/media-library\");\n const item = await new MediaApiClient(authManager).uploadMedia(file);\n return toMediaResult(item);\n } catch (error) {\n onError?.(error as Error);\n return null;\n }\n }\n\n function validateFile(file: File): Error | null {\n const media = getMediaConfig?.() ?? null;\n if (!media) return null; // config not loaded yet → defer to server.\n const acceptedTypes = media.categories?.images?.mime_types ?? [];\n if (acceptedTypes.length > 0 && !acceptedTypes.includes(file.type)) {\n return new Error(\n `Unsupported image type: ${file.type || \"unknown\"}. Accepted: ${acceptedTypes.join(\", \")}.`,\n );\n }\n if (media.max_file_size > 0 && file.size > media.max_file_size) {\n return new Error(\n `Image is too large (${file.size} bytes). Maximum allowed is ${media.max_file_size} bytes.`,\n );\n }\n return null;\n }\n\n function handleMediaSelect(item: MediaItem): void {\n mediaLibraryOpen.value = false;\n mediaResolve?.(toMediaResult(item));\n mediaResolve = null;\n }\n\n function handleMediaLibraryClose(): void {\n mediaLibraryOpen.value = false;\n mediaResolve?.(null);\n mediaResolve = null;\n }\n\n onScopeDispose(() => {\n if (mediaResolve) {\n mediaResolve(null);\n mediaResolve = null;\n }\n });\n\n return {\n handleRequestMedia,\n handleMediaSelect,\n handleMediaLibraryClose,\n };\n}\n","import { computed, ref, type ComputedRef, type Ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport type { AiFeature } from \"../components/AiFeatureMenu.vue\";\nimport type { MediaCategory } from \"@templatical/media-library\";\n\nexport interface UseCloudPanelStateReturn {\n activePanel: Ref<RightPanel | null>;\n aiChatOpen: ComputedRef<boolean> & { value: boolean };\n scoringPanelOpen: ComputedRef<boolean> & { value: boolean };\n designReferenceOpen: ComputedRef<boolean> & { value: boolean };\n commentsOpen: ComputedRef<boolean> & { value: boolean };\n mediaLibraryOpen: Ref<boolean>;\n mediaLibraryAccept: Ref<MediaCategory[] | undefined>;\n aiMenuOpen: Ref<boolean>;\n aiMenuRef: Ref<HTMLElement | null>;\n rightPanelOpen: ComputedRef<boolean>;\n activeAiFeature: ComputedRef<AiFeature | null>;\n aiButtonActive: ComputedRef<boolean>;\n toggleAiMenu: () => void;\n handleAiFeatureSelect: (feature: AiFeature) => void;\n}\n\ntype RightPanel = \"ai-chat\" | \"scoring\" | \"design-reference\" | \"comments\";\n\nexport function useCloudPanelState(): UseCloudPanelStateReturn {\n const activePanel = ref<RightPanel | null>(null);\n\n const aiChatOpen = computed({\n get: () => activePanel.value === \"ai-chat\",\n set: (v) => (activePanel.value = v ? \"ai-chat\" : null),\n });\n const scoringPanelOpen = computed({\n get: () => activePanel.value === \"scoring\",\n set: (v) => (activePanel.value = v ? \"scoring\" : null),\n });\n const designReferenceOpen = computed({\n get: () => activePanel.value === \"design-reference\",\n set: (v) => (activePanel.value = v ? \"design-reference\" : null),\n });\n const commentsOpen = computed({\n get: () => activePanel.value === \"comments\",\n set: (v) => (activePanel.value = v ? \"comments\" : null),\n });\n\n const mediaLibraryOpen = ref(false);\n const mediaLibraryAccept = ref<MediaCategory[] | undefined>(undefined);\n const aiMenuOpen = ref(false);\n const aiMenuRef = ref<HTMLElement | null>(null);\n\n const rightPanelOpen = computed(() => activePanel.value !== null);\n\n const activeAiFeature = computed<AiFeature | null>(() => {\n const p = activePanel.value;\n if (p === \"ai-chat\" || p === \"design-reference\" || p === \"scoring\")\n return p;\n return null;\n });\n\n const aiButtonActive = computed(\n () =>\n aiMenuOpen.value ||\n activePanel.value === \"ai-chat\" ||\n activePanel.value === \"design-reference\" ||\n activePanel.value === \"scoring\",\n );\n\n function toggleAiMenu(): void {\n aiMenuOpen.value = !aiMenuOpen.value;\n }\n\n function handleAiFeatureSelect(feature: AiFeature): void {\n aiMenuOpen.value = false;\n activePanel.value = activePanel.value === feature ? null : feature;\n }\n\n onClickOutside(aiMenuRef, () => {\n aiMenuOpen.value = false;\n });\n\n return {\n activePanel,\n aiChatOpen,\n scoringPanelOpen,\n designReferenceOpen,\n commentsOpen,\n mediaLibraryOpen,\n mediaLibraryAccept,\n aiMenuOpen,\n aiMenuRef,\n rightPanelOpen,\n activeAiFeature,\n aiButtonActive,\n toggleAiMenu,\n handleAiFeatureSelect,\n };\n}\n","import { computed, ref, type ComputedRef, type Ref } from \"vue\";\nimport type { PlanConfig } from \"@templatical/types\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\nexport interface UseCloudSaveGateOptions {\n /** Reactive accessibility issues from `useTemplateLint`. */\n issues: Ref<LintIssue[]>;\n /** Reactive plan config from the server. */\n planConfig: Ref<PlanConfig | null>;\n}\n\nexport interface UseCloudSaveGateReturn {\n /** True when the gate would block a save click given current state. */\n shouldBlock: ComputedRef<boolean>;\n /** Errors that would block the save. Empty when `shouldBlock` is false. */\n blockingIssues: ComputedRef<LintIssue[]>;\n /** Modal visibility — toggled by `tryRunSave` and `cancel`. */\n modalOpen: Ref<boolean>;\n /**\n * Wraps a save callback. Returns `true` when the save was invoked\n * (blocking disabled or no errors), `false` when the modal opened\n * instead. Caller can `await` the returned promise to know when the\n * save settled.\n */\n tryRunSave: (run: () => Promise<unknown> | unknown) => Promise<boolean>;\n /**\n * Runs the save only when the gate would not block, and does **nothing** when\n * it would — no modal, no save, nothing pending. Returns whether it ran.\n *\n * This is the autosave path. A modal on a debounce timer would interrupt\n * typing, but simply saving anyway would demote `blockOnError` from a server\n * policy to a manual-save-only speed bump. Skipping leaves the template dirty\n * and the header saying \"unsaved\", which is true, and the reason stays visible\n * in the Issues panel. The next edit re-arms the debounce, so fixing the issue\n * is what lets the save through — no retry timer needed.\n */\n runUnlessBlocked: (run: () => Promise<unknown> | unknown) => Promise<boolean>;\n /** Force-run the pending save, bypassing the gate. */\n confirmAndSave: () => Promise<void>;\n /** Dismiss the modal without saving. */\n cancel: () => void;\n}\n\n/**\n * Cloud-only save-gate. When `planConfig.accessibility.blockOnError === true`\n * and the linter reports any error-severity issues, intercept the save\n * click and surface a confirmation modal listing the blockers. The user\n * can dismiss to fix issues, or click \"Save anyway\" to bypass — the gate\n * does NOT enforce a hard block, it surfaces a deliberate choice.\n *\n * Server policy is the source of truth for `blockOnError`; consumer-side\n * `accessibility` options can't override it.\n */\nexport function useCloudSaveGate(\n opts: UseCloudSaveGateOptions,\n): UseCloudSaveGateReturn {\n const modalOpen = ref(false);\n let pending: (() => Promise<unknown> | unknown) | null = null;\n\n const blockOnError = computed(\n () => opts.planConfig.value?.accessibility?.blockOnError === true,\n );\n\n const blockingIssues = computed(() =>\n blockOnError.value\n ? opts.issues.value.filter((i) => i.severity === \"error\")\n : [],\n );\n\n const shouldBlock = computed(() => blockingIssues.value.length > 0);\n\n async function tryRunSave(\n run: () => Promise<unknown> | unknown,\n ): Promise<boolean> {\n if (!shouldBlock.value) {\n await run();\n return true;\n }\n pending = run;\n modalOpen.value = true;\n return false;\n }\n\n async function runUnlessBlocked(\n run: () => Promise<unknown> | unknown,\n ): Promise<boolean> {\n if (shouldBlock.value) return false;\n await run();\n return true;\n }\n\n async function confirmAndSave(): Promise<void> {\n const run = pending;\n pending = null;\n modalOpen.value = false;\n if (run) {\n await run();\n }\n }\n\n function cancel(): void {\n pending = null;\n modalOpen.value = false;\n }\n\n return {\n shouldBlock,\n blockingIssues,\n modalOpen,\n tryRunSave,\n runUnlessBlocked,\n confirmAndSave,\n cancel,\n };\n}\n","import { type ComputedRef, type Ref, ref } from \"vue\";\nimport { useTimeoutFn } from \"@vueuse/core\";\nimport { COLLAB_UNDO_WARNING_MS } from \"../../constants/timeouts\";\n\nexport interface UseCollabUndoWarningOptions {\n /** Whether collaboration is currently enabled (reactive). */\n isCollaborationEnabled: ComputedRef<boolean>;\n /** Returns the current list of collaborators. */\n getCollaboratorCount: () => number;\n /** Whether the history stack has entries to undo. */\n canUndo: ComputedRef<boolean>;\n}\n\nexport interface UseCollabUndoWarningReturn {\n collabUndoWarningVisible: Ref<boolean>;\n showCollabUndoWarning: () => void;\n}\n\nexport function useCollabUndoWarning(\n options: UseCollabUndoWarningOptions,\n): UseCollabUndoWarningReturn {\n const { isCollaborationEnabled, getCollaboratorCount, canUndo } = options;\n\n const collabUndoWarningFired = ref(false);\n const collabUndoWarningVisible = ref(false);\n\n const { start: startCollabUndoWarningTimeout } = useTimeoutFn(\n () => {\n collabUndoWarningVisible.value = false;\n },\n COLLAB_UNDO_WARNING_MS,\n { immediate: false },\n );\n\n function showCollabUndoWarning(): void {\n if (\n collabUndoWarningFired.value ||\n !isCollaborationEnabled.value ||\n getCollaboratorCount() === 0 ||\n !canUndo.value\n ) {\n return;\n }\n\n collabUndoWarningFired.value = true;\n collabUndoWarningVisible.value = true;\n startCollabUndoWarningTimeout();\n }\n\n return {\n collabUndoWarningVisible,\n showCollabUndoWarning,\n };\n}\n","/**\n * Just enough of a stored template to walk its ids — deliberately structural\n * rather than `Template`, because the caller reads `editor.state`, which is\n * `DeepReadonly` and so not assignable to the mutable contract type.\n */\ninterface SavedBlockIdSource {\n content?: {\n blocks?: readonly {\n id: string;\n type: string;\n children?: readonly (readonly { id: string }[])[];\n }[];\n };\n}\n\n/**\n * Every block id present in the **stored** template, sections' children\n * included.\n *\n * This is the last thing the deleted Cloud editor core carried over the OSS one\n * (`savedBlockIds`), and it never belonged there: its only reader gates a\n * comment filter on whether the block exists server-side, which makes it a\n * *comments* dependency. It travels with that feature accordingly, and reaches\n * `CommentsSidebar` through `capabilities.comments.isBlockSaved`.\n *\n * Derived on demand rather than memoised: `state.template` only changes on a\n * create / load / save round-trip, and the one caller runs on a user filtering\n * the comments panel.\n */\nexport function collectSavedBlockIds(\n template: SavedBlockIdSource | null | undefined,\n): Set<string> {\n const ids = new Set<string>();\n const blocks = template?.content?.blocks;\n if (!blocks) return ids;\n\n for (const block of blocks) {\n ids.add(block.id);\n if (block.type === \"section\" && block.children) {\n for (const column of block.children) {\n for (const child of column) {\n ids.add(child.id);\n }\n }\n }\n }\n return ids;\n}\n","import { computed, provide, ref, watch } from \"vue\";\nimport {\n AuthManager,\n isFatalAuthError,\n performHealthCheck,\n useAiConfig,\n useCollaboration,\n useCollaborationBroadcast,\n useExport,\n useMcpListener,\n usePlanConfig,\n resolveExportFonts,\n resolveWebSocketConfig,\n createCloudCommentsProvider,\n createCloudRenderProvider,\n createCloudSavedBlocksProvider,\n createCloudTemplatesProvider,\n createCloudTestEmailProvider,\n createCloudVersionHistoryProvider,\n useTemplateScoring,\n useTestEmail,\n useWebSocket,\n type RealtimeChannel,\n} from \"@templatical/core/cloud\";\nimport type { UseEditorReturn } from \"@templatical/core\";\nimport type {\n CommentsOptions,\n CommentsProvider,\n EditorUser,\n RenderProvider,\n SavedBlocksOptions,\n SavedBlocksProvider,\n Template,\n TemplateContent,\n TemplatePatch,\n TemplatesOptions,\n TemplatesProvider,\n TestEmailOptions,\n TestEmailProvider,\n VersionHistoryOptions,\n VersionHistoryProvider,\n} from \"@templatical/types\";\n\nimport type { CloudTranslations } from \"../i18n\";\nimport { preRenderCustomBlocks } from \"../utils/preRenderCustomBlocks\";\nimport { logger } from \"../utils/logger\";\nimport type { UseEditorCoreReturn } from \"../composables/useEditorCore\";\nimport {\n AI_CONFIG_KEY,\n AUTH_MANAGER_KEY,\n CLOUD_TRANSLATIONS_KEY,\n SCORING_KEY,\n} from \"../keys\";\n\nimport { useCloudFeatureFlags } from \"./composables/useCloudFeatureFlags\";\nimport {\n useCloudMediaLibrary,\n type UseCloudMediaLibraryReturn,\n} from \"./composables/useCloudMediaLibrary\";\nimport { useCloudPanelState } from \"./composables/useCloudPanelState\";\nimport {\n useCloudSaveGate,\n type UseCloudSaveGateReturn,\n} from \"./composables/useCloudSaveGate\";\nimport {\n useCollabUndoWarning,\n type UseCollabUndoWarningReturn,\n} from \"./composables/useCollabUndoWarning\";\nimport { collectSavedBlockIds } from \"./collectSavedBlockIds\";\nimport type {\n CloudAttachContext,\n CloudAttachment,\n CloudCollaborationInstance,\n CloudReady,\n CloudReadyContext,\n CloudRuntime,\n} from \"./runtime\";\nimport type { TemplaticalCloudEditorConfig } from \"./cloudConfig\";\n\nexport interface BootstrapCloudOptions {\n config: TemplaticalCloudEditorConfig;\n cloudTranslations: CloudTranslations;\n}\n\n/**\n * What {@link bootstrapCloud} hands back: a set of ordinary `init()` config\n * values, plus the runtime for the few things that must run inside the editor\n * component's `setup()`.\n */\nexport interface CloudBootstrap {\n runtime: CloudRuntime;\n providers: {\n templates: TemplatesProvider;\n render: RenderProvider;\n versionHistory: VersionHistoryProvider;\n /** Absent when `savedBlocks: false` — the feature is then off entirely. */\n savedBlocks?: SavedBlocksProvider;\n testEmail: TestEmailProvider;\n comments: CommentsProvider;\n };\n /**\n * Who is editing, from the JWT — `init({ user })`'s value for a Cloud session.\n *\n * `undefined` when the project's token carries no `user` claim, which makes\n * comments unavailable rather than anonymous. Not a key `initCloud()` accepts:\n * Cloud's comment writes are signed against this same claim, so a\n * consumer-supplied identity would only be able to disagree with it.\n */\n user?: EditorUser;\n}\n\n/**\n * Pick only the event members off a consumer-supplied `templates` value.\n *\n * A whitelist, never a spread. The config type says `TemplatesOptions`, but a\n * JavaScript consumer is unchecked, so the object can carry anything —\n * `load`/`create`/`save` are already shadowed by the literal defining them\n * after the spread, and this drops everything else so the guarantee never\n * depends on that ordering surviving a later edit.\n *\n * Each member is also type-checked, not merely truthiness-checked: a value\n * like `onSaved: \"yes\"` would otherwise reach core and throw at save time,\n * inside a call the consumer never made.\n */\nfunction eventsOf(value: TemplatesOptions | undefined): TemplatesOptions {\n if (!value) return {};\n const { onSaved, onCreated, onLoaded } = value;\n return {\n ...(typeof onSaved === \"function\" ? { onSaved } : {}),\n ...(typeof onCreated === \"function\" ? { onCreated } : {}),\n ...(typeof onLoaded === \"function\" ? { onLoaded } : {}),\n };\n}\n\n/**\n * Fails to compile when `TemplatesOptions` gains a member outside the six\n * named below. Cloud picks that object apart by name in two places —\n * `eventsOf` above and `initCloud`'s merge in `index.ts` — so a seventh\n * member forces a **deliberate decision** about which of the two forwards\n * it. The check cannot make that decision itself: adding the new name to the\n * `Exclude` list below satisfies the compiler on its own and forwards\n * nothing by itself, and it has no way to tell an event (belongs in\n * `eventsOf`) from config (belongs in the `index.ts` merge).\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below\n * is what forces the check — it fails to compile the moment a member falls\n * outside the six named here.\n */\ntype _TemplatesOptionsForwarded =\n Exclude<\n keyof TemplatesOptions,\n | \"autoSave\"\n | \"unsavedChangesGuard\"\n | \"nameField\"\n | \"onSaved\"\n | \"onCreated\"\n | \"onLoaded\"\n > extends never\n ? true\n : never;\nconst _templatesOptionsForwarded: _TemplatesOptionsForwarded = true;\n\n/**\n * Pick only the event members off a consumer-supplied `comments` value.\n *\n * A whitelist, never a spread. The config type says `CommentsOptions`, but a\n * JavaScript consumer is unchecked, so the object can carry anything —\n * `list`/`create`/`update`/`delete`/`setResolved` are already shadowed by the\n * spread of Cloud's own adapter that follows this in the provider literal, and\n * this drops everything else so the guarantee never depends on that ordering\n * surviving a later edit.\n *\n * Each member is also type-checked, not merely truthiness-checked: a value\n * like `onCreated: \"yes\"` would otherwise reach core and throw at\n * comment-creation time, inside a call the consumer never made.\n */\nfunction commentEventsOf(\n value: false | CommentsOptions | undefined,\n): CommentsOptions {\n if (!value) return {};\n const { onCreated, onUpdated, onDeleted, onResolved, onUnresolved } = value;\n return {\n ...(typeof onCreated === \"function\" ? { onCreated } : {}),\n ...(typeof onUpdated === \"function\" ? { onUpdated } : {}),\n ...(typeof onDeleted === \"function\" ? { onDeleted } : {}),\n ...(typeof onResolved === \"function\" ? { onResolved } : {}),\n ...(typeof onUnresolved === \"function\" ? { onUnresolved } : {}),\n };\n}\n\n/**\n * Fails to compile when `CommentsOptions` gains a member outside the five\n * named below. Every member of `CommentsOptions` is an event, and\n * `commentEventsOf` above is the only place that forwards them — unlike\n * `TemplatesOptions`, there is no second merge in `index.ts`, since comments\n * carries no config booleans for that merge to combine. A sixth member has\n * exactly one place to be added: this list and `commentEventsOf`'s destructure,\n * together.\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below is\n * what forces the check — it fails to compile the moment a member falls\n * outside the five named here.\n */\ntype _CommentsOptionsForwarded =\n Exclude<\n keyof CommentsOptions,\n \"onCreated\" | \"onUpdated\" | \"onDeleted\" | \"onResolved\" | \"onUnresolved\"\n > extends never\n ? true\n : never;\nconst _commentsOptionsForwarded: _CommentsOptionsForwarded = true;\n\n/**\n * Pick only the event members off a consumer-supplied `savedBlocks` value.\n *\n * A whitelist, never a spread. `savedBlocks` accepts a boolean, an\n * events-only `SavedBlocksOptions`, or a full `SavedBlocksProvider` — this is\n * only ever called on the first two, since a full provider replaces Cloud's\n * adapter outright and is used as-is (see `consumerSavedBlocks` below). A\n * non-object value (`true`, `undefined`, `false`) carries no keys to pick, so\n * it returns `{}` rather than throwing on the destructure.\n *\n * Each member is also type-checked, not merely truthiness-checked: a value\n * like `onCreated: \"yes\"` would otherwise reach core and throw at\n * saved-block-creation time, inside a call the consumer never made.\n */\nfunction savedBlocksEventsOf(\n value: TemplaticalCloudEditorConfig[\"savedBlocks\"],\n): SavedBlocksOptions {\n if (typeof value !== \"object\" || value === null) return {};\n const { onCreated, onUpdated, onDeleted } = value;\n return {\n ...(typeof onCreated === \"function\" ? { onCreated } : {}),\n ...(typeof onUpdated === \"function\" ? { onUpdated } : {}),\n ...(typeof onDeleted === \"function\" ? { onDeleted } : {}),\n };\n}\n\n/**\n * Fails to compile when `SavedBlocksOptions` gains a member outside the three\n * named below. `savedBlocksEventsOf` above is the only place that forwards\n * them, so a fourth member has exactly one place to be added: this list and\n * that function's destructure, together.\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below\n * is what forces the check — it fails to compile the moment a member falls\n * outside the three named here.\n */\ntype _SavedBlocksOptionsForwarded =\n Exclude<\n keyof SavedBlocksOptions,\n \"onCreated\" | \"onUpdated\" | \"onDeleted\"\n > extends never\n ? true\n : never;\nconst _savedBlocksOptionsForwarded: _SavedBlocksOptionsForwarded = true;\n\n/**\n * Pick `onSent` and `defaultRecipient` off a consumer-supplied `testEmail`\n * value.\n *\n * A whitelist, like `savedBlocksEventsOf` — but note what it does NOT pick:\n * `includeMjml` and `allowedRecipients` stay Cloud's own whenever Cloud's\n * sender is in play, so they are never read here even though\n * `TestEmailOptions` declares them (see `_TestEmailOptionsForwarded` below).\n * `defaultRecipient` has no such conflict — Cloud's provider never defines\n * it, and `useTestEmailFeature` already discards a value outside\n * `allowedRecipients`, so a consumer's choice can only ever pre-fill an\n * address already on Cloud's own signed list, never smuggle in one outside\n * it. `onSent` is a plain notification with no conflict either, so both\n * cross over.\n *\n * The result is assigned ONTO Cloud's own provider with `Object.assign`\n * (never spread together with it) at the call site — that provider's\n * `allowedRecipients` is a live getter over the JWT-derived allowlist, and a\n * spread reads every own property through `[[Get]]`, freezing the getter's\n * current value into a plain property on the new object. `Object.assign`\n * with the cloud provider as the *target* only ever writes the keys this\n * function returns, so the getter is never read and never disturbed.\n */\nfunction testEmailEventsOf(\n value: TemplaticalCloudEditorConfig[\"testEmail\"],\n): Pick<TestEmailOptions, \"onSent\" | \"defaultRecipient\"> {\n if (typeof value !== \"object\" || value === null) return {};\n const { onSent, defaultRecipient } = value;\n return {\n ...(typeof onSent === \"function\" ? { onSent } : {}),\n ...(typeof defaultRecipient === \"string\" ? { defaultRecipient } : {}),\n };\n}\n\n/**\n * Fails to compile when `TestEmailOptions` gains a member outside the four\n * named below. `onSent` and `defaultRecipient` are forwarded by\n * `testEmailEventsOf` above; `includeMjml` and `allowedRecipients` stay\n * Cloud's own whenever Cloud's sender is in play (Cloud renders server-side\n * rather than from a client MJML pass, and the allowlist is the signed one\n * from the project's JWT, not a client-supplied one). A fifth member still\n * forces a deliberate decision the same way a fourth `SavedBlocksOptions`\n * member does: whether it joins the forwarded pair or stays excluded for the\n * same reason as the other two.\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below\n * is what forces the check — it fails to compile the moment a member falls\n * outside the four named here.\n */\ntype _TestEmailOptionsForwarded =\n Exclude<\n keyof TestEmailOptions,\n \"includeMjml\" | \"allowedRecipients\" | \"defaultRecipient\" | \"onSent\"\n > extends never\n ? true\n : never;\nconst _testEmailOptionsForwarded: _TestEmailOptionsForwarded = true;\n\n/**\n * Pick only the event members off a consumer-supplied `versionHistory`\n * value.\n *\n * A whitelist, never a spread — the config type says `VersionHistoryOptions`,\n * but a JavaScript consumer is unchecked, so the object can carry anything.\n * `versionHistory` never accepts a full provider (see the rejected-keys block\n * below), so unlike `savedBlocksEventsOf` / `testEmailEventsOf` this is\n * always called on the whole config value.\n */\nfunction versionHistoryEventsOf(\n value: VersionHistoryOptions | undefined,\n): VersionHistoryOptions {\n if (!value) return {};\n const { onCreated, onRestored } = value;\n return {\n ...(typeof onCreated === \"function\" ? { onCreated } : {}),\n ...(typeof onRestored === \"function\" ? { onRestored } : {}),\n };\n}\n\n/**\n * Fails to compile when `VersionHistoryOptions` gains a member outside the\n * two named below. `versionHistoryEventsOf` above is the only place that\n * forwards them, so a third member has exactly one place to be added: this\n * list and that function's destructure, together.\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below\n * is what forces the check — it fails to compile the moment a member falls\n * outside the two named here.\n */\ntype _VersionHistoryOptionsForwarded =\n Exclude<keyof VersionHistoryOptions, \"onCreated\" | \"onRestored\"> extends never\n ? true\n : never;\nconst _versionHistoryOptionsForwarded: _VersionHistoryOptionsForwarded = true;\n\n/**\n * A comma list with a final \"and\" — \"a\"; \"a and b\"; \"a, b and c\". The\n * ignored-methods warnings below each name however many storage methods a\n * consumer actually passed, and `Array.join(\" and \")` only reads correctly\n * for exactly two.\n */\nfunction joinWithAnd(items: string[]): string {\n if (items.length < 2) return items.join(\"\");\n if (items.length === 2) return items.join(\" and \");\n return `${items.slice(0, -1).join(\", \")} and ${items[items.length - 1]}`;\n}\n\n/**\n * Cloud's bootstrap and adapter wiring, in one place, run **before the editor\n * mounts**.\n *\n * This replaces `useCloudInitialization`, which owned a second `useEditor`, a\n * second `useEditorCore` and a post-mount async dance with its own loading and\n * error states. The dance is gone: auth, the health check and the plan fetch all\n * resolve here, and a failure rejects `initCloud()` rather than mounting an\n * editor that cannot work. What is left is adapter construction.\n *\n * Two things deliberately stay Cloud-only:\n *\n * - **Entitlements.** In an all-BYO world there are no plans, so `planConfig` is\n * Cloud's commercial layer above the provider set rather than a provider\n * itself. It is down to five booleans, each metering a resource Cloud buys.\n * - **Mid-session failure.** `init()` cannot fail after it mounts and should not\n * grow the ability, so the error overlay lives on this side of the seam.\n */\nexport async function bootstrapCloud(\n options: BootstrapCloudOptions,\n): Promise<CloudBootstrap> {\n const { config, cloudTranslations } = options;\n\n // --- Late-bound editor access ---------------------------------------------\n //\n // The providers below are built before there is an editor to read. Each\n // reaches it through these holders, filled by `attach()` / `ready()` — which is\n // what lets them be handed to `init()` as ordinary config keys.\n let editorRef: UseEditorReturn | null = null;\n let coreRef: UseEditorCoreReturn | null = null;\n let websocketRef: ReturnType<typeof useWebSocket> | null = null;\n let mediaLibRef: UseCloudMediaLibraryReturn | null = null;\n let collaboration: CloudCollaborationInstance | null = null;\n let collabWarning: UseCollabUndoWarningReturn | null = null;\n let saveGate: UseCloudSaveGateReturn | null = null;\n\n const sessionError = ref<Error | null>(null);\n const lockedBlocks = ref<Map<string, unknown>>(new Map());\n /**\n * Cloud's presence channel, forward-declared for the comments adapter's\n * `subscribe`. `useWebSocket` can only be built in `attach()` (it needs the\n * editor), while the provider is handed to `init()` before that — so the adapter\n * watches this and rebinds when the real channel lands.\n */\n const commentChannel = ref<RealtimeChannel | null>(null);\n\n function requireEditor(): UseEditorReturn {\n if (!editorRef) {\n throw new Error(\"[Templatical] The Cloud editor is not mounted yet.\");\n }\n return editorRef;\n }\n\n function getTemplateId(): string | null {\n return editorRef?.state.template?.id ?? null;\n }\n\n // --- Auth + plan ----------------------------------------------------------\n\n const authManager = new AuthManager({\n ...config.auth,\n // Only a *fatal* refusal raises the overlay. A 4xx means the endpoint\n // rejected the credentials, so every subsequent request fails the same way\n // and the session really is over. A network blip or a 5xx resolves on its\n // own, and blanking a mounted editor over one interrupts someone mid-edit on\n // a template that is probably unsaved — a worse outcome than the blip.\n //\n // The consumer hears about both: `onError` fires either way, and\n // `AuthManager` re-throws regardless, so a caller that cannot proceed still\n // finds out.\n onError: (error: Error) => {\n if (isFatalAuthError(error)) {\n sessionError.value = error;\n }\n config.onError?.(error);\n },\n });\n\n const planConfigInstance = usePlanConfig({\n authManager,\n onError: config.onError,\n });\n\n await authManager.initialize();\n\n const healthResult = await performHealthCheck({ authManager });\n if (!healthResult.api.ok) {\n throw new Error(\"Health check failed: API is not reachable\");\n }\n if (!healthResult.auth.ok) {\n throw new Error(\n `Health check failed: authentication error${healthResult.auth.error ? ` - ${healthResult.auth.error}` : \"\"}`,\n );\n }\n if (!healthResult.websocket.ok) {\n logger.warn(\n \"WebSocket health check failed:\",\n healthResult.websocket.error ?? \"unknown error\",\n \"-- real-time features will be disabled.\",\n );\n }\n\n await planConfigInstance.fetchConfig();\n\n // The bootstrap itself is what the overlay would have covered, and it just\n // succeeded — so anything `onError` recorded on the way here is stale.\n sessionError.value = null;\n\n // --- Rejected consumer keys ----------------------------------------------\n //\n // `render` is not declared on `TemplaticalCloudEditorConfig`, so it only\n // fires for JavaScript consumers — warned rather than silently dropped,\n // because the symptom (a store that stays empty while Cloud's fills up)\n // reads as a broken provider rather than a rejected one. `templates`,\n // `comments` and `versionHistory` ARE declared, but typed narrowly as\n // `TemplatesOptions`, `CommentsOptions` and `VersionHistoryOptions` — a\n // JavaScript consumer can still hand over a full provider, so its storage\n // methods are named and ignored the same way, while any events they carry\n // reach `eventsOf` / `commentEventsOf` / `versionHistoryEventsOf` below\n // regardless of this check.\n const consumerTemplates = (config as { templates?: Record<string, unknown> })\n .templates;\n // Presence, not `typeof === \"function\"` — see the matching comment on\n // `ignoredCommentMethods` below: a stated-but-ignored decision like\n // `save: false` is as much a signal as a stray function override.\n const ignoredTemplateMethods = [\"load\", \"create\", \"save\"].filter(\n (key) => typeof consumerTemplates?.[key] !== \"undefined\",\n );\n if (ignoredTemplateMethods.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredTemplateMethods.map((key) => `templates.${key}`),\n )} — the template id is the join key for collaboration, ` +\n \"version history, comments, AI rewrite, scoring and the server-side \" +\n \"export, so an id Cloud never issued would degrade all six. Your \" +\n \"event handlers were kept. Use init() to bring your own storage.\",\n );\n }\n const consumerVersionHistory = (\n config as { versionHistory?: Record<string, unknown> }\n ).versionHistory;\n // Presence, not `typeof === \"function\"`: a stated-but-ignored decision like\n // `restore: false` is as much a signal as a stray function override, and\n // both must be named here or the consumer never learns it was dropped.\n const ignoredVersionHistoryMethods = [\n \"list\",\n \"get\",\n \"create\",\n \"restore\",\n ].filter((key) => typeof consumerVersionHistory?.[key] !== \"undefined\");\n if (ignoredVersionHistoryMethods.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredVersionHistoryMethods.map((key) => `versionHistory.${key}`),\n )} — a version is keyed to a template id Cloud issued, so Cloud owns ` +\n \"its history. Your event handlers were kept. Use init() to bring \" +\n \"your own storage.\",\n );\n }\n const consumerComments = (config as { comments?: Record<string, unknown> })\n .comments;\n // Presence, not `typeof === \"function\"`: a stated-but-ignored decision like\n // `create: false` is as much a signal as a stray function override, and both\n // must be named here or the consumer never learns it was dropped.\n const ignoredCommentMethods = [\n \"list\",\n \"create\",\n \"update\",\n \"delete\",\n \"setResolved\",\n \"subscribe\",\n ].filter((key) => typeof consumerComments?.[key] !== \"undefined\");\n if (ignoredCommentMethods.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredCommentMethods.map((key) => `comments.${key}`),\n )} — a comment is keyed to a template id Cloud issued, and its ` +\n \"author is signed by the auth token, so Cloud owns the conversation. \" +\n \"Your event handlers were kept. Use init() to bring your own storage.\",\n );\n }\n // Rejected for a different reason than the three above: not the join key, but\n // because Cloud renders on its own for test email, scheduled sends and API\n // exports (`createCloudTestEmailProvider` calls `exportHtml` directly). A\n // consumer provider would have changed `toMjml()` / `toHtml()` and nothing\n // else, so what the user previewed and exported was not what Cloud delivered —\n // and Cloud's output is a deliberate superset (countdown GIFs, composited video\n // thumbnails), so the consumer's was also worse for those blocks.\n if ((config as { render?: unknown }).render) {\n logger.warn(\n \"initCloud does not accept a `render` provider — Cloud renders \" +\n \"server-side for test email, sends and exports, so a supplied renderer \" +\n \"would change only what you preview and export, never what Cloud \" +\n \"delivers. The supplied provider is ignored. For your own MJML, call \" +\n \"renderToMjml(editor.getContent()) from @templatical/renderer.\",\n );\n }\n\n // --- Providers ------------------------------------------------------------\n\n function connectRealtime(template: Template): void {\n const websocketConfig = planConfigInstance.config.value?.websocket;\n if (!websocketRef || !websocketConfig) return;\n websocketRef.connect(template.id, resolveWebSocketConfig(websocketConfig));\n }\n\n const baseTemplates = createCloudTemplatesProvider(authManager);\n const baseCreate = baseTemplates.create;\n const baseSave = baseTemplates.save;\n\n /**\n * Cloud's templates adapter plus the choreography the template id anchors:\n * the websocket joins the template's presence channel. The consumer's\n * `onSaved` / `onCreated` / `onLoaded` ride along via `eventsOf` — core calls\n * them once the editor has settled, so the adapter itself never invokes them.\n *\n * That choreography belongs in the adapter rather than in an editor-side\n * lifecycle composable, because it *is* adapter business — Cloud is what keys\n * realtime off the id it issued. `useCloudLifecycle` existed only to hold it.\n *\n * `save` pre-renders custom blocks, which is why it is wrapped too.\n */\n const templates: TemplatesProvider = {\n ...eventsOf(config.templates),\n load: async (id: string) => {\n const template = await baseTemplates.load(id);\n connectRealtime(template);\n return template;\n },\n create:\n typeof baseCreate === \"function\"\n ? async (input: { name?: string; content: TemplateContent }) => {\n const template = await baseCreate(input);\n connectRealtime(template);\n return template;\n }\n : false,\n save:\n typeof baseSave === \"function\"\n ? async (id: string, patch: TemplatePatch) => {\n if (coreRef && editorRef) {\n await preRenderCustomBlocks(\n editorRef.content.value,\n coreRef.registry,\n );\n }\n return baseSave(id, patch);\n }\n : false,\n };\n\n // Always Cloud's — see the rejected-keys block above. Cloud renders\n // independently for delivery, so a second renderer could only disagree with it.\n const render: RenderProvider = createCloudRenderProvider({\n authManager,\n getTemplateId,\n // Plain `editor.save()`: the templates adapter below already pre-renders\n // custom blocks on every save, which is exactly what the render endpoint\n // needs, since it exports from the stored copy rather than from\n // `payload.content`.\n save: () => requireEditor().save(),\n });\n\n // The consumer's `onCreated` / `onRestored` ride along via\n // `versionHistoryEventsOf` — core calls them once the editor has settled, so\n // the adapter itself never invokes them. `versionHistory` never accepts a\n // full provider (see the rejected-keys block above), so this always merges\n // onto Cloud's own adapter, never onto a consumer's.\n const versionHistory: VersionHistoryProvider = {\n ...versionHistoryEventsOf(config.versionHistory),\n ...createCloudVersionHistoryProvider(authManager),\n };\n\n // Realtime is the adapter's own business: `subscribe` binds the presence channel\n // above, so `useCommentListener` in `@templatical/core` never learns that Pusher\n // exists and a BYO provider with an SSE stream slots into the same seam. The\n // consumer's `onCreated` / `onUpdated` / `onDeleted` / `onResolved` /\n // `onUnresolved` ride along via `commentEventsOf` — core calls them once the\n // editor has settled, so the adapter itself never invokes them.\n const comments: CommentsProvider = {\n ...commentEventsOf(config.comments),\n ...createCloudCommentsProvider({\n authManager,\n channel: commentChannel,\n getSocketId: () => websocketRef?.getSocketId() ?? null,\n }),\n };\n\n // From the JWT, not from config. Cloud signs comment writes against this same\n // claim, so a consumer-supplied identity could only disagree with it — and a\n // token without the claim leaves comments unavailable rather than anonymous.\n const cloudUser: EditorUser | undefined = authManager.userConfig\n ? { id: authManager.userConfig.id, name: authManager.userConfig.name }\n : undefined;\n\n // A consumer may pass their own store instead of a boolean, in which case it\n // replaces Cloud's outright — discriminated on `list`, the one required\n // method every full provider carries, never on `typeof === \"object\"`: an\n // events-only `SavedBlocksOptions` (`{ onCreated }`) is an object too, and\n // reading it as the provider would leave `list` undefined and crash the\n // library on first browse. That path is deliberately NOT plan-gated:\n // `saved_modules` licenses Cloud's *storage*, and someone else's backend\n // isn't Cloud's to sell — `isSavedBlocksAvailable` below keys off this same\n // discriminated value for that reason.\n const consumerSavedBlocks =\n typeof (config.savedBlocks as SavedBlocksProvider | undefined)?.list ===\n \"function\"\n ? (config.savedBlocks as SavedBlocksProvider)\n : null;\n // A malformed provider — e.g. `create` / `update` / `delete` with no\n // working `list` — fails the discriminator above and falls through to\n // Cloud's own store, so those methods are silently unused rather than\n // replacing anything. Named here the same way `templates` / `comments` /\n // `versionHistory` name their own ignored methods, so the drop isn't a\n // console-free mystery.\n if (\n consumerSavedBlocks === null &&\n typeof config.savedBlocks === \"object\" &&\n config.savedBlocks !== null\n ) {\n const suppliedSavedBlocks = config.savedBlocks as Record<string, unknown>;\n const ignoredSavedBlocksMethods = [\n \"list\",\n \"create\",\n \"update\",\n \"delete\",\n ].filter((key) => typeof suppliedSavedBlocks[key] !== \"undefined\");\n if (ignoredSavedBlocksMethods.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredSavedBlocksMethods.map((key) => `savedBlocks.${key}`),\n )} — a provider needs a working list to replace Cloud's store, and ` +\n \"this value has none, so it configures Cloud's own store instead. \" +\n \"Your event handlers were kept. Use init() to bring your own storage.\",\n );\n }\n }\n // The consumer's `onCreated` / `onUpdated` / `onDeleted` ride along via\n // `savedBlocksEventsOf` when Cloud's own adapter is used — core calls them\n // once the editor has settled, so the adapter itself never invokes them. A\n // full consumer provider carries its own events already and is used as-is,\n // so this merge only ever runs on Cloud's side of the `??`.\n const savedBlocks: SavedBlocksProvider | undefined =\n config.savedBlocks === false\n ? undefined\n : (consumerSavedBlocks ?? {\n ...savedBlocksEventsOf(config.savedBlocks),\n ...createCloudSavedBlocksProvider(authManager),\n });\n\n // Cloud's test-email *config* — plan enablement plus the signed allowlist, both\n // carried by the JWT `authManager.initialize()` already resolved above. Hence\n // the constant `isAuthReady`: there is no window where it is false.\n const testEmailConfig = useTestEmail({\n authManager,\n isAuthReady: ref(true),\n });\n\n // Cloud's own send path renders through the export endpoint directly: the\n // adapter derives HTML from the *saved* template and applies\n // `onBeforeTestEmail` to it, which is a narrower job than the render contract.\n const exporter = useExport({ authManager });\n\n // Discriminated on `send`, the one required method every full provider\n // carries — never on raw truthiness, which an events-only `TestEmailOptions`\n // (`{ onSent }`) also satisfies and would leave `send` undefined, crashing\n // the dialog on send. `isTestEmailAvailable` below keys off this same\n // discriminated value so an events-only value stays plan-gated rather than\n // reading as \"consumer's own sender\".\n const consumerTestEmail =\n typeof (config.testEmail as TestEmailProvider | undefined)?.send ===\n \"function\"\n ? (config.testEmail as TestEmailProvider)\n : null;\n // `send` reaching here means it failed the discriminator above — e.g.\n // `send: null` — so it is named the same way a malformed `savedBlocks`\n // value's storage methods are. `includeMjml` / `allowedRecipients` are\n // named for a different reason: they are not part of this key's options\n // arm (see `cloudConfig.ts`), but TypeScript does not actually refuse\n // them — both are valid members of the sibling `TestEmailProvider` arm, so\n // the union's excess-property check passes them through regardless of\n // which arm the caller intended. All three log a warning naming them\n // rather than dropping with no console trace.\n if (\n consumerTestEmail === null &&\n typeof config.testEmail === \"object\" &&\n config.testEmail !== null\n ) {\n const suppliedTestEmail = config.testEmail as Record<string, unknown>;\n const ignoredTestEmailMembers = [\n \"send\",\n \"includeMjml\",\n \"allowedRecipients\",\n ].filter((key) => typeof suppliedTestEmail[key] !== \"undefined\");\n if (ignoredTestEmailMembers.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredTestEmailMembers.map((key) => `testEmail.${key}`),\n )} — a provider needs a working send to replace Cloud's sender ` +\n \"outright, and Cloud renders server-side with the signed \" +\n \"allowlist from your project's JWT either way, so none of these \" +\n \"apply here. Your event handlers were kept.\",\n );\n }\n }\n const testEmail: TestEmailProvider =\n consumerTestEmail ??\n // `Object.assign`, not a spread: `createCloudTestEmailProvider`'s\n // `allowedRecipients` is a live getter (see `testEmailEventsOf`'s doc\n // comment for why a spread would freeze it). The cloud provider is the\n // assignment *target* here, so its getter is never read — only the keys\n // `testEmailEventsOf` returns are ever written onto it.\n //\n // Asymmetric with `savedBlocks` / `versionHistory` on purpose, not by\n // drift: those two spread Cloud's provider LAST, so even a whitelist that\n // let something unexpected through could never displace a Cloud method —\n // two lines of defence. Here `testEmailEventsOf`'s return type is the\n // only barrier, because Cloud is the assignment target rather than a\n // second spread source. Copying the sibling shape (`{ ...events,\n // ...createCloudTestEmailProvider(...) }`) would reintroduce the exact\n // getter-freezing bug this construction exists to avoid.\n Object.assign(\n createCloudTestEmailProvider({\n authManager,\n getTemplateId,\n save: () => requireEditor().save(),\n exportHtml: (templateId: string) =>\n exporter.exportHtml(templateId, resolveExportFonts(config.fonts)),\n allowedEmails: testEmailConfig.allowedEmails,\n getSignature: testEmailConfig.getSignature,\n onBeforeTestEmail: config.onBeforeTestEmail,\n }),\n testEmailEventsOf(config.testEmail),\n );\n\n // --- Setup-time wiring ----------------------------------------------------\n\n const aiConfig = useAiConfig(config.ai);\n const scoringInstance = useTemplateScoring({ authManager, getTemplateId });\n\n const featureFlags = useCloudFeatureFlags({\n planConfigInstance,\n aiConfig,\n getTemplateId,\n });\n\n const isCollaborationEnabled = computed(\n () =>\n !!config.collaboration?.enabled &&\n planConfigInstance.hasFeature(\"collaboration\"),\n );\n\n function attach(context: CloudAttachContext): CloudAttachment {\n const editor = context.editor;\n editorRef = editor;\n\n provide(CLOUD_TRANSLATIONS_KEY, cloudTranslations);\n provide(AUTH_MANAGER_KEY, authManager);\n provide(AI_CONFIG_KEY, aiConfig);\n provide(SCORING_KEY, scoringInstance);\n\n const websocket = useWebSocket({ authManager, onError: config.onError });\n websocketRef = websocket;\n\n // Feeds the comments adapter's `subscribe`, which was handed to `init()` before\n // this socket existed.\n watch(\n websocket.channel,\n (channel) => {\n commentChannel.value = channel;\n },\n { immediate: true },\n );\n\n if (config.mcp?.enabled) {\n useMcpListener({\n editor,\n channel: websocket.channel,\n onOperation: config.mcp.onOperation,\n });\n }\n\n // Order matters: the broadcast wrapper replaces the editor's mutators so they\n // publish to peers, and `useEditorCore`'s history interceptor then wraps them\n // again to push history entries. Reversing it would push history for remote\n // operations and drift the two peers apart.\n if (config.collaboration?.enabled) {\n collaboration = useCollaboration({\n authManager,\n editor,\n channel: websocket.channel,\n onError: config.onError,\n onCollaboratorJoined: config.collaboration.onCollaboratorJoined,\n onCollaboratorLeft: config.collaboration.onCollaboratorLeft,\n onBlockLocked: config.collaboration.onBlockLocked,\n onBlockUnlocked: config.collaboration.onBlockUnlocked,\n }) as CloudCollaborationInstance;\n\n watch(\n () => collaboration!.lockedBlocks.value,\n (next) => {\n lockedBlocks.value = next;\n },\n { immediate: true },\n );\n\n useCollaborationBroadcast(editor, collaboration);\n }\n\n const panelState = useCloudPanelState();\n\n const mediaLib = useCloudMediaLibrary({\n onRequestMedia: config.onRequestMedia,\n mediaLibraryOpen: panelState.mediaLibraryOpen,\n mediaLibraryAccept: panelState.mediaLibraryAccept,\n authManager,\n getMediaConfig: () => planConfigInstance.config.value?.media ?? null,\n onError: config.onError,\n });\n mediaLibRef = mediaLib;\n\n return {\n websocket,\n panelState,\n mediaLib,\n // Handed to `MediaLibraryModal` as props by `CloudPanels`. A bare-string\n // injection would resolve to `undefined` silently; see\n // `CloudMediaBrowserContext`.\n mediaBrowser: {\n authManager,\n projectId: authManager.projectId,\n planConfig: planConfigInstance,\n },\n featureFlags,\n collaboration,\n isCollaborationEnabled,\n };\n }\n\n function ready(context: CloudReadyContext): CloudReady {\n const { core, capabilities } = context;\n coreRef = core;\n\n saveGate = useCloudSaveGate({\n issues: core.templateLint ? core.templateLint.issues : ref([]),\n planConfig: planConfigInstance.config,\n });\n\n collabWarning = useCollabUndoWarning({\n isCollaborationEnabled,\n getCollaboratorCount: () =>\n collaboration?.collaborators.value.length ?? 0,\n canUndo: core.history.canUndo,\n });\n\n // Mutated in place rather than re-provided: `useEditorCore` already provided\n // this exact object, so components injecting it see Cloud's entries on their\n // first render. Same pattern `versionHistory` uses in `Editor.vue`.\n //\n // `capabilities.comments` is *not* set here any more: comments became a shared\n // provider-backed feature, so `Editor.vue` builds the capability from\n // `useCommentsFeature` exactly as it does for saved blocks and test email, and\n // Cloud contributes only the two predicates below.\n capabilities.plan = planConfigInstance;\n capabilities.ai = aiConfig;\n\n // Registered unconditionally. `custom_blocks` and `theme_customization` used\n // to gate these — entitlements on editor capability the free editor grants,\n // and the only two things `applyPlanGates` would ever have had to do.\n if (config.customBlocks?.length) {\n core.registerCustomBlocks(config.customBlocks);\n }\n if (config.theme) {\n core.themeOverrides.value = config.theme;\n }\n\n return {\n saveGate,\n collabWarning,\n sessionError,\n retry: async () => {\n try {\n await authManager.initialize();\n sessionError.value = null;\n } catch (error) {\n sessionError.value =\n error instanceof Error ? error : new Error(\"Authentication failed\");\n }\n },\n };\n }\n\n const runtime: CloudRuntime = {\n lockedBlocks,\n onRequestMedia: (context) =>\n mediaLibRef\n ? mediaLibRef.handleRequestMedia(context)\n : Promise.resolve(null),\n isSavedBlocksAvailable: consumerSavedBlocks\n ? () => true\n : () =>\n config.savedBlocks !== false &&\n planConfigInstance.hasFeature(\"saved_modules\"),\n isTestEmailAvailable: consumerTestEmail\n ? // Their sender, their rules — the `test_email` plan feature licenses\n // Cloud's sending, and \"the template must be saved\" is a constraint of\n // Cloud's server-side render, not of an arbitrary backend.\n () => true\n : // All three matter and none implies another: the plan may grant the\n // feature while the project's token omits a recipient config, and Cloud\n // renders from the *saved* template so there must be one.\n () =>\n testEmailConfig.isEnabled.value &&\n featureFlags.canSendTestEmail.value &&\n featureFlags.hasTemplateSaved.value,\n // Three conditions, none implying another: the consumer may switch the feature\n // off, the plan meters comment storage and its realtime fan-out, and Cloud\n // anchors a comment to the *saved* template. (Whether a `user` exists is the\n // shared feature's own gate, not Cloud's.)\n isCommentsAvailable: () =>\n config.comments !== false &&\n planConfigInstance.hasFeature(\"commenting\") &&\n featureFlags.hasTemplateSaved.value,\n // A comment is anchored server-side, so a block that exists only on the canvas\n // has nothing stored to show. This is the last thing the deleted cloud editor\n // core carried (`savedBlockIds`), and it was always a comments concern rather\n // than an editor one.\n isBlockSaved: (blockId: string) =>\n collectSavedBlockIds(editorRef?.state.template ?? null).has(blockId),\n getSaveGate: () => saveGate,\n isRemoteOperation: () =>\n collaboration?._isProcessingRemoteOperation() ?? false,\n onBeforeUndo: () => collabWarning?.showCollabUndoWarning(),\n attach,\n ready,\n destroy() {\n websocketRef?.disconnect();\n config.onUnmount?.();\n },\n };\n\n return {\n runtime,\n providers: {\n templates,\n render,\n versionHistory,\n ...(savedBlocks ? { savedBlocks } : {}),\n testEmail,\n comments,\n },\n user: cloudUser,\n };\n}\n"],"mappings":";;;;;;;;;AAgCA,SAAgB,GACd,GAC4B;CAC5B,IAAM,EAAE,uBAAoB,aAAU,qBAAkB;CAkBxD,OAAO;EACL,oBAjByB,QAEvB,EAAmB,WAAW,eAAe,KAC7C,EAAS,kBAAkB,KAc7B;EACA,kBAbuB,QACvB,EAAmB,WAAW,YAAY,CAY1C;EACA,kBAXuB,QAAe,EAAc,MAAM,IAW1D;EACA,eAXoB,QACd,EAAmB,OAAO,OAAO,OAAO,iBAAiB,IAU/D;EACA,eAToB,QACd,EAAmB,OAAO,OAAO,kBAAkB,CAQzD;CACF;AACF;;;AC1BA,SAAgB,GACd,GAC4B;CAC5B,IAAM,EACJ,mBACA,qBACA,uBACA,gBACA,mBACA,eACE,GAEA,IAA8D;CAElE,SAAS,EAAc,GAA8B;EACnD,OAAO;GAAE,KAAK,EAAK;GAAK,KAAK,EAAK,YAAY,KAAA;EAAU;CAC1D;CAEA,eAAe,EACb,GAC6B;EAC7B,IAAM,IAAS,GAAS,UAAU,CAAC,QAAQ;EAK3C,IAAI,GAAS,OAAO,QAAQ;GAC1B,IAAI,GAAgB;IAClB,IAAM,IAAO,MAAM,EAAe;KAAE;KAAQ,OAAO,EAAQ;IAAM,CAAC;IAClE,OAAO,IAAO,EAAc,CAAI,IAAI;GACtC;GACA,OAAO,EAAkB,EAAQ,MAAM,EAAE;EAC3C;EAGA,IAAI,GAAgB;GAClB,IAAM,IAAO,MAAM,EAAe,EAAE,UAAO,CAAC;GAC5C,OAAO,IAAO,EAAc,CAAI,IAAI;EACtC;EAWA,OANA,AAEE,OADA,EAAa,IAAI,GACF,OAEjB,EAAmB,QAAQ,GAC3B,EAAiB,QAAQ,IAClB,IAAI,SAA6B,MAAY;GAClD,KAAgB,MAAW;IACzB,EAAQ,CAAM;GAChB;EACF,CAA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ACpB,EAAmB,WAAW,YAAY,KAC1C,EAAa,iBAAiB;GAKhC,eAAe,MACb,GAAqB,GAAW,MAAM,YAAY,IAAI,CAAC,CAAC,IAAI,CAAO;GACrE,mBAAmB;GACnB,yBACE,GAAe,6BAA6B,KAAK;GACnD,oBAAoB,GAAe,sBAAsB;GACzD;GACA;GACA,UAAU;IAER,AADA,GAAc,WAAW,GACzB,EAAO,YAAY;GACrB;EAIA;EACA,WAAW;GACT;GACA;GACA;GACA,GAAI,IAAc,EAAE,eAAY,IAAI,CAAC;GACrC;GACA;EACF;EACA,MAAM;CACR;AACF"}
|
|
1
|
+
{"version":3,"file":"createCloudRuntime-DD6ppb71.js","names":[],"sources":["../../../src/cloud/composables/useCloudFeatureFlags.ts","../../../src/cloud/composables/useCloudMediaLibrary.ts","../../../src/cloud/composables/useCloudPanelState.ts","../../../src/cloud/composables/useCloudSaveGate.ts","../../../src/cloud/composables/useCollabUndoWarning.ts","../../../src/cloud/collectSavedBlockIds.ts","../../../src/cloud/createCloudRuntime.ts"],"sourcesContent":["import { computed, type ComputedRef } from \"vue\";\nimport type {\n UsePlanConfigReturn,\n UseAiConfigReturn,\n} from \"@templatical/core/cloud\";\n\nexport interface UseCloudFeatureFlagsOptions {\n planConfigInstance: UsePlanConfigReturn;\n aiConfig: UseAiConfigReturn;\n /** The loaded template's id, or `null` before one exists. */\n getTemplateId: () => string | null;\n}\n\nexport interface UseCloudFeatureFlagsReturn {\n canUseAiGeneration: ComputedRef<boolean>;\n canSendTestEmail: ComputedRef<boolean>;\n hasTemplateSaved: ComputedRef<boolean>;\n templateLimit: ComputedRef<number | null>;\n templateCount: ComputedRef<number>;\n}\n\n/**\n * Every entitlement check Cloud makes, in one place.\n *\n * The containment rule this exists for: entitlement checks go through here,\n * never inline in a component and never across a package boundary. With five\n * plan features left there is little excuse to break it.\n *\n * Save status is deliberately not here — it lives on `useTemplatesFeature`, which\n * the one shared header reads, and was never an entitlement. Footer branding is\n * likewise not gated: `config.branding !== false` decides it on any plan.\n */\nexport function useCloudFeatureFlags(\n options: UseCloudFeatureFlagsOptions,\n): UseCloudFeatureFlagsReturn {\n const { planConfigInstance, aiConfig, getTemplateId } = options;\n\n const canUseAiGeneration = computed(\n () =>\n planConfigInstance.hasFeature(\"ai_generation\") &&\n aiConfig.hasAnyMenuFeature.value,\n );\n const canSendTestEmail = computed(() =>\n planConfigInstance.hasFeature(\"test_email\"),\n );\n const hasTemplateSaved = computed(() => getTemplateId() !== null);\n const templateLimit = computed(\n () => planConfigInstance.config.value?.limits.max_templates ?? null,\n );\n const templateCount = computed(\n () => planConfigInstance.config.value?.template_count ?? 0,\n );\n\n return {\n canUseAiGeneration,\n canSendTestEmail,\n hasTemplateSaved,\n templateLimit,\n templateCount,\n };\n}\n","import { onScopeDispose, type Ref } from \"vue\";\nimport type {\n MediaCategory,\n MediaConfig,\n MediaItem,\n MediaRequestContext,\n} from \"@templatical/media-library\";\nimport type { AuthManager } from \"@templatical/core/cloud\";\nimport type { MediaResult } from \"@templatical/types\";\n\nexport interface UseCloudMediaLibraryOptions {\n onRequestMedia?: (context: MediaRequestContext) => Promise<MediaItem | null>;\n mediaLibraryOpen: Ref<boolean>;\n mediaLibraryAccept: Ref<MediaCategory[] | undefined>;\n /** Auth used by the built-in drag-and-drop upload (#229). */\n authManager: AuthManager;\n /**\n * Active plan's media config, read at upload time for a client-side\n * pre-check (MIME + size) before hitting the network. Returns `null` until\n * the plan config has loaded; the server stays the authoritative validator.\n */\n getMediaConfig?: () => MediaConfig | null;\n /** Surface upload/validation failures to the consumer's error handler. */\n onError?: (error: Error) => void;\n}\n\nexport interface UseCloudMediaLibraryReturn {\n handleRequestMedia: (\n context?: MediaRequestContext,\n ) => Promise<MediaResult | null>;\n handleMediaSelect: (item: MediaItem) => void;\n handleMediaLibraryClose: () => void;\n}\n\nexport function useCloudMediaLibrary(\n options: UseCloudMediaLibraryOptions,\n): UseCloudMediaLibraryReturn {\n const {\n onRequestMedia,\n mediaLibraryOpen,\n mediaLibraryAccept,\n authManager,\n getMediaConfig,\n onError,\n } = options;\n\n let mediaResolve: ((result: MediaResult | null) => void) | null = null;\n\n function toMediaResult(item: MediaItem): MediaResult {\n return { url: item.url, alt: item.alt_text || undefined };\n }\n\n async function handleRequestMedia(\n context?: MediaRequestContext,\n ): Promise<MediaResult | null> {\n const accept = context?.accept ?? [\"images\"];\n\n // Drag-and-drop upload path (#229). A dropped file is forwarded to a\n // consumer handler if one is configured; otherwise it's uploaded directly\n // to the cloud and the resulting media item becomes the block's image.\n if (context?.files?.length) {\n if (onRequestMedia) {\n const item = await onRequestMedia({ accept, files: context.files });\n return item ? toMediaResult(item) : null;\n }\n return uploadDroppedFile(context.files[0]);\n }\n\n // If consumer provides a custom media handler, use it.\n if (onRequestMedia) {\n const item = await onRequestMedia({ accept });\n return item ? toMediaResult(item) : null;\n }\n\n // Otherwise open the built-in media library. If a previous request\n // is still pending (e.g. consumer fired two requests back-to-back),\n // settle it with null so its caller doesn't hang forever.\n if (mediaResolve) {\n mediaResolve(null);\n mediaResolve = null;\n }\n mediaLibraryAccept.value = accept;\n mediaLibraryOpen.value = true;\n return new Promise<MediaResult | null>((resolve) => {\n mediaResolve = (result) => {\n resolve(result);\n };\n });\n }\n\n async function uploadDroppedFile(file: File): Promise<MediaResult | null> {\n const validationError = validateFile(file);\n if (validationError) {\n onError?.(validationError);\n return null;\n }\n try {\n // media-library is an optional, cloud-only peer — import lazily so OSS\n // bundles never pull it in. Cloud consumers always have it installed.\n const { MediaApiClient } = await import(\"@templatical/media-library\");\n const item = await new MediaApiClient(authManager).uploadMedia(file);\n return toMediaResult(item);\n } catch (error) {\n onError?.(error as Error);\n return null;\n }\n }\n\n function validateFile(file: File): Error | null {\n const media = getMediaConfig?.() ?? null;\n if (!media) return null; // config not loaded yet → defer to server.\n const acceptedTypes = media.categories?.images?.mime_types ?? [];\n if (acceptedTypes.length > 0 && !acceptedTypes.includes(file.type)) {\n return new Error(\n `Unsupported image type: ${file.type || \"unknown\"}. Accepted: ${acceptedTypes.join(\", \")}.`,\n );\n }\n if (media.max_file_size > 0 && file.size > media.max_file_size) {\n return new Error(\n `Image is too large (${file.size} bytes). Maximum allowed is ${media.max_file_size} bytes.`,\n );\n }\n return null;\n }\n\n function handleMediaSelect(item: MediaItem): void {\n mediaLibraryOpen.value = false;\n mediaResolve?.(toMediaResult(item));\n mediaResolve = null;\n }\n\n function handleMediaLibraryClose(): void {\n mediaLibraryOpen.value = false;\n mediaResolve?.(null);\n mediaResolve = null;\n }\n\n onScopeDispose(() => {\n if (mediaResolve) {\n mediaResolve(null);\n mediaResolve = null;\n }\n });\n\n return {\n handleRequestMedia,\n handleMediaSelect,\n handleMediaLibraryClose,\n };\n}\n","import { computed, ref, type ComputedRef, type Ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport type { AiFeature } from \"../components/AiFeatureMenu.vue\";\nimport type { MediaCategory } from \"@templatical/media-library\";\n\nexport interface UseCloudPanelStateReturn {\n activePanel: Ref<RightPanel | null>;\n aiChatOpen: ComputedRef<boolean> & { value: boolean };\n scoringPanelOpen: ComputedRef<boolean> & { value: boolean };\n designReferenceOpen: ComputedRef<boolean> & { value: boolean };\n commentsOpen: ComputedRef<boolean> & { value: boolean };\n mediaLibraryOpen: Ref<boolean>;\n mediaLibraryAccept: Ref<MediaCategory[] | undefined>;\n aiMenuOpen: Ref<boolean>;\n aiMenuRef: Ref<HTMLElement | null>;\n rightPanelOpen: ComputedRef<boolean>;\n activeAiFeature: ComputedRef<AiFeature | null>;\n aiButtonActive: ComputedRef<boolean>;\n toggleAiMenu: () => void;\n handleAiFeatureSelect: (feature: AiFeature) => void;\n}\n\ntype RightPanel = \"ai-chat\" | \"scoring\" | \"design-reference\" | \"comments\";\n\nexport function useCloudPanelState(): UseCloudPanelStateReturn {\n const activePanel = ref<RightPanel | null>(null);\n\n const aiChatOpen = computed({\n get: () => activePanel.value === \"ai-chat\",\n set: (v) => (activePanel.value = v ? \"ai-chat\" : null),\n });\n const scoringPanelOpen = computed({\n get: () => activePanel.value === \"scoring\",\n set: (v) => (activePanel.value = v ? \"scoring\" : null),\n });\n const designReferenceOpen = computed({\n get: () => activePanel.value === \"design-reference\",\n set: (v) => (activePanel.value = v ? \"design-reference\" : null),\n });\n const commentsOpen = computed({\n get: () => activePanel.value === \"comments\",\n set: (v) => (activePanel.value = v ? \"comments\" : null),\n });\n\n const mediaLibraryOpen = ref(false);\n const mediaLibraryAccept = ref<MediaCategory[] | undefined>(undefined);\n const aiMenuOpen = ref(false);\n const aiMenuRef = ref<HTMLElement | null>(null);\n\n const rightPanelOpen = computed(() => activePanel.value !== null);\n\n const activeAiFeature = computed<AiFeature | null>(() => {\n const p = activePanel.value;\n if (p === \"ai-chat\" || p === \"design-reference\" || p === \"scoring\")\n return p;\n return null;\n });\n\n const aiButtonActive = computed(\n () =>\n aiMenuOpen.value ||\n activePanel.value === \"ai-chat\" ||\n activePanel.value === \"design-reference\" ||\n activePanel.value === \"scoring\",\n );\n\n function toggleAiMenu(): void {\n aiMenuOpen.value = !aiMenuOpen.value;\n }\n\n function handleAiFeatureSelect(feature: AiFeature): void {\n aiMenuOpen.value = false;\n activePanel.value = activePanel.value === feature ? null : feature;\n }\n\n onClickOutside(aiMenuRef, () => {\n aiMenuOpen.value = false;\n });\n\n return {\n activePanel,\n aiChatOpen,\n scoringPanelOpen,\n designReferenceOpen,\n commentsOpen,\n mediaLibraryOpen,\n mediaLibraryAccept,\n aiMenuOpen,\n aiMenuRef,\n rightPanelOpen,\n activeAiFeature,\n aiButtonActive,\n toggleAiMenu,\n handleAiFeatureSelect,\n };\n}\n","import { computed, ref, type ComputedRef, type Ref } from \"vue\";\nimport type { PlanConfig } from \"@templatical/types\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\nexport interface UseCloudSaveGateOptions {\n /** Reactive accessibility issues from `useTemplateLint`. */\n issues: Ref<LintIssue[]>;\n /** Reactive plan config from the server. */\n planConfig: Ref<PlanConfig | null>;\n}\n\nexport interface UseCloudSaveGateReturn {\n /** True when the gate would block a save click given current state. */\n shouldBlock: ComputedRef<boolean>;\n /** Errors that would block the save. Empty when `shouldBlock` is false. */\n blockingIssues: ComputedRef<LintIssue[]>;\n /** Modal visibility — toggled by `tryRunSave` and `cancel`. */\n modalOpen: Ref<boolean>;\n /**\n * Wraps a save callback. Returns `true` when the save was invoked\n * (blocking disabled or no errors), `false` when the modal opened\n * instead. Caller can `await` the returned promise to know when the\n * save settled.\n */\n tryRunSave: (run: () => Promise<unknown> | unknown) => Promise<boolean>;\n /**\n * Runs the save only when the gate would not block, and does **nothing** when\n * it would — no modal, no save, nothing pending. Returns whether it ran.\n *\n * This is the autosave path. A modal on a debounce timer would interrupt\n * typing, but simply saving anyway would demote `blockOnError` from a server\n * policy to a manual-save-only speed bump. Skipping leaves the template dirty\n * and the header saying \"unsaved\", which is true, and the reason stays visible\n * in the Issues panel. The next edit re-arms the debounce, so fixing the issue\n * is what lets the save through — no retry timer needed.\n */\n runUnlessBlocked: (run: () => Promise<unknown> | unknown) => Promise<boolean>;\n /** Force-run the pending save, bypassing the gate. */\n confirmAndSave: () => Promise<void>;\n /** Dismiss the modal without saving. */\n cancel: () => void;\n}\n\n/**\n * Cloud-only save-gate. When `planConfig.accessibility.blockOnError === true`\n * and the linter reports any error-severity issues, intercept the save\n * click and surface a confirmation modal listing the blockers. The user\n * can dismiss to fix issues, or click \"Save anyway\" to bypass — the gate\n * does NOT enforce a hard block, it surfaces a deliberate choice.\n *\n * Server policy is the source of truth for `blockOnError`; consumer-side\n * `accessibility` options can't override it.\n */\nexport function useCloudSaveGate(\n opts: UseCloudSaveGateOptions,\n): UseCloudSaveGateReturn {\n const modalOpen = ref(false);\n let pending: (() => Promise<unknown> | unknown) | null = null;\n\n const blockOnError = computed(\n () => opts.planConfig.value?.accessibility?.blockOnError === true,\n );\n\n const blockingIssues = computed(() =>\n blockOnError.value\n ? opts.issues.value.filter((i) => i.severity === \"error\")\n : [],\n );\n\n const shouldBlock = computed(() => blockingIssues.value.length > 0);\n\n async function tryRunSave(\n run: () => Promise<unknown> | unknown,\n ): Promise<boolean> {\n if (!shouldBlock.value) {\n await run();\n return true;\n }\n pending = run;\n modalOpen.value = true;\n return false;\n }\n\n async function runUnlessBlocked(\n run: () => Promise<unknown> | unknown,\n ): Promise<boolean> {\n if (shouldBlock.value) return false;\n await run();\n return true;\n }\n\n async function confirmAndSave(): Promise<void> {\n const run = pending;\n pending = null;\n modalOpen.value = false;\n if (run) {\n await run();\n }\n }\n\n function cancel(): void {\n pending = null;\n modalOpen.value = false;\n }\n\n return {\n shouldBlock,\n blockingIssues,\n modalOpen,\n tryRunSave,\n runUnlessBlocked,\n confirmAndSave,\n cancel,\n };\n}\n","import { type ComputedRef, type Ref, ref } from \"vue\";\nimport { useTimeoutFn } from \"@vueuse/core\";\nimport { COLLAB_UNDO_WARNING_MS } from \"../../constants/timeouts\";\n\nexport interface UseCollabUndoWarningOptions {\n /** Whether collaboration is currently enabled (reactive). */\n isCollaborationEnabled: ComputedRef<boolean>;\n /** Returns the current list of collaborators. */\n getCollaboratorCount: () => number;\n /** Whether the history stack has entries to undo. */\n canUndo: ComputedRef<boolean>;\n}\n\nexport interface UseCollabUndoWarningReturn {\n collabUndoWarningVisible: Ref<boolean>;\n showCollabUndoWarning: () => void;\n}\n\nexport function useCollabUndoWarning(\n options: UseCollabUndoWarningOptions,\n): UseCollabUndoWarningReturn {\n const { isCollaborationEnabled, getCollaboratorCount, canUndo } = options;\n\n const collabUndoWarningFired = ref(false);\n const collabUndoWarningVisible = ref(false);\n\n const { start: startCollabUndoWarningTimeout } = useTimeoutFn(\n () => {\n collabUndoWarningVisible.value = false;\n },\n COLLAB_UNDO_WARNING_MS,\n { immediate: false },\n );\n\n function showCollabUndoWarning(): void {\n if (\n collabUndoWarningFired.value ||\n !isCollaborationEnabled.value ||\n getCollaboratorCount() === 0 ||\n !canUndo.value\n ) {\n return;\n }\n\n collabUndoWarningFired.value = true;\n collabUndoWarningVisible.value = true;\n startCollabUndoWarningTimeout();\n }\n\n return {\n collabUndoWarningVisible,\n showCollabUndoWarning,\n };\n}\n","/**\n * Just enough of a stored template to walk its ids — deliberately structural\n * rather than `Template`, because the caller reads `editor.state`, which is\n * `DeepReadonly` and so not assignable to the mutable contract type.\n */\ninterface SavedBlockIdSource {\n content?: {\n blocks?: readonly {\n id: string;\n type: string;\n children?: readonly (readonly { id: string }[])[];\n }[];\n };\n}\n\n/**\n * Every block id present in the **stored** template, sections' children\n * included.\n *\n * This is the last thing the deleted Cloud editor core carried over the OSS one\n * (`savedBlockIds`), and it never belonged there: its only reader gates a\n * comment filter on whether the block exists server-side, which makes it a\n * *comments* dependency. It travels with that feature accordingly, and reaches\n * `CommentsSidebar` through `capabilities.comments.isBlockSaved`.\n *\n * Derived on demand rather than memoised: `state.template` only changes on a\n * create / load / save round-trip, and the one caller runs on a user filtering\n * the comments panel.\n */\nexport function collectSavedBlockIds(\n template: SavedBlockIdSource | null | undefined,\n): Set<string> {\n const ids = new Set<string>();\n const blocks = template?.content?.blocks;\n if (!blocks) return ids;\n\n for (const block of blocks) {\n ids.add(block.id);\n if (block.type === \"section\" && block.children) {\n for (const column of block.children) {\n for (const child of column) {\n ids.add(child.id);\n }\n }\n }\n }\n return ids;\n}\n","import { computed, provide, ref, watch } from \"vue\";\nimport {\n AuthManager,\n isFatalAuthError,\n performHealthCheck,\n useAiConfig,\n useCollaboration,\n useCollaborationBroadcast,\n useExport,\n useMcpListener,\n usePlanConfig,\n resolveExportFonts,\n resolveWebSocketConfig,\n createCloudCommentsProvider,\n createCloudRenderProvider,\n createCloudSavedBlocksProvider,\n createCloudTemplatesProvider,\n createCloudTestEmailProvider,\n createCloudVersionHistoryProvider,\n useTemplateScoring,\n useTestEmail,\n useWebSocket,\n type RealtimeChannel,\n} from \"@templatical/core/cloud\";\nimport type { UseEditorReturn } from \"@templatical/core\";\nimport type {\n CommentsOptions,\n CommentsProvider,\n EditorUser,\n RenderProvider,\n SavedBlocksOptions,\n SavedBlocksProvider,\n Template,\n TemplateContent,\n TemplatePatch,\n TemplatesOptions,\n TemplatesProvider,\n TestEmailOptions,\n TestEmailProvider,\n VersionHistoryOptions,\n VersionHistoryProvider,\n} from \"@templatical/types\";\n\nimport type { CloudTranslations } from \"../i18n\";\nimport { preRenderCustomBlocks } from \"../utils/preRenderCustomBlocks\";\nimport { logger } from \"../utils/logger\";\nimport type { UseEditorCoreReturn } from \"../composables/useEditorCore\";\nimport {\n AI_CONFIG_KEY,\n AUTH_MANAGER_KEY,\n CLOUD_TRANSLATIONS_KEY,\n SCORING_KEY,\n} from \"../keys\";\n\nimport { useCloudFeatureFlags } from \"./composables/useCloudFeatureFlags\";\nimport {\n useCloudMediaLibrary,\n type UseCloudMediaLibraryReturn,\n} from \"./composables/useCloudMediaLibrary\";\nimport { useCloudPanelState } from \"./composables/useCloudPanelState\";\nimport {\n useCloudSaveGate,\n type UseCloudSaveGateReturn,\n} from \"./composables/useCloudSaveGate\";\nimport {\n useCollabUndoWarning,\n type UseCollabUndoWarningReturn,\n} from \"./composables/useCollabUndoWarning\";\nimport { collectSavedBlockIds } from \"./collectSavedBlockIds\";\nimport type {\n CloudAttachContext,\n CloudAttachment,\n CloudCollaborationInstance,\n CloudReady,\n CloudReadyContext,\n CloudRuntime,\n} from \"./runtime\";\nimport type { TemplaticalCloudEditorConfig } from \"./cloudConfig\";\n\nexport interface BootstrapCloudOptions {\n config: TemplaticalCloudEditorConfig;\n cloudTranslations: CloudTranslations;\n}\n\n/**\n * What {@link bootstrapCloud} hands back: a set of ordinary `init()` config\n * values, plus the runtime for the few things that must run inside the editor\n * component's `setup()`.\n */\nexport interface CloudBootstrap {\n runtime: CloudRuntime;\n providers: {\n templates: TemplatesProvider;\n render: RenderProvider;\n versionHistory: VersionHistoryProvider;\n /** Absent when `savedBlocks: false` — the feature is then off entirely. */\n savedBlocks?: SavedBlocksProvider;\n testEmail: TestEmailProvider;\n comments: CommentsProvider;\n };\n /**\n * Who is editing, from the JWT — `init({ user })`'s value for a Cloud session.\n *\n * `undefined` when the project's token carries no `user` claim, which makes\n * comments unavailable rather than anonymous. Not a key `initCloud()` accepts:\n * Cloud's comment writes are signed against this same claim, so a\n * consumer-supplied identity would only be able to disagree with it.\n */\n user?: EditorUser;\n}\n\n/**\n * Pick only the event members off a consumer-supplied `templates` value.\n *\n * A whitelist, never a spread. The config type says `TemplatesOptions`, but a\n * JavaScript consumer is unchecked, so the object can carry anything —\n * `load`/`create`/`save` are already shadowed by the literal defining them\n * after the spread, and this drops everything else so the guarantee never\n * depends on that ordering surviving a later edit.\n *\n * Each member is also type-checked, not merely truthiness-checked: a value\n * like `onSaved: \"yes\"` would otherwise reach core and throw at save time,\n * inside a call the consumer never made.\n */\nfunction eventsOf(value: TemplatesOptions | undefined): TemplatesOptions {\n if (!value) return {};\n const { onSaved, onCreated, onLoaded } = value;\n return {\n ...(typeof onSaved === \"function\" ? { onSaved } : {}),\n ...(typeof onCreated === \"function\" ? { onCreated } : {}),\n ...(typeof onLoaded === \"function\" ? { onLoaded } : {}),\n };\n}\n\n/**\n * Fails to compile when `TemplatesOptions` gains a member outside the six\n * named below. Cloud picks that object apart by name in two places —\n * `eventsOf` above and `initCloud`'s merge in `index.ts` — so a seventh\n * member forces a **deliberate decision** about which of the two forwards\n * it. The check cannot make that decision itself: adding the new name to the\n * `Exclude` list below satisfies the compiler on its own and forwards\n * nothing by itself, and it has no way to tell an event (belongs in\n * `eventsOf`) from config (belongs in the `index.ts` merge).\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below\n * is what forces the check — it fails to compile the moment a member falls\n * outside the six named here.\n */\ntype _TemplatesOptionsForwarded =\n Exclude<\n keyof TemplatesOptions,\n | \"autoSave\"\n | \"unsavedChangesGuard\"\n | \"nameField\"\n | \"onSaved\"\n | \"onCreated\"\n | \"onLoaded\"\n > extends never\n ? true\n : never;\nconst _templatesOptionsForwarded: _TemplatesOptionsForwarded = true;\n\n/**\n * Pick only the event members off a consumer-supplied `comments` value.\n *\n * A whitelist, never a spread. The config type says `CommentsOptions`, but a\n * JavaScript consumer is unchecked, so the object can carry anything —\n * `list`/`create`/`update`/`delete`/`setResolved` are already shadowed by the\n * spread of Cloud's own adapter that follows this in the provider literal, and\n * this drops everything else so the guarantee never depends on that ordering\n * surviving a later edit.\n *\n * Each member is also type-checked, not merely truthiness-checked: a value\n * like `onCreated: \"yes\"` would otherwise reach core and throw at\n * comment-creation time, inside a call the consumer never made.\n */\nfunction commentEventsOf(\n value: false | CommentsOptions | undefined,\n): CommentsOptions {\n if (!value) return {};\n const { onCreated, onUpdated, onDeleted, onResolved, onUnresolved } = value;\n return {\n ...(typeof onCreated === \"function\" ? { onCreated } : {}),\n ...(typeof onUpdated === \"function\" ? { onUpdated } : {}),\n ...(typeof onDeleted === \"function\" ? { onDeleted } : {}),\n ...(typeof onResolved === \"function\" ? { onResolved } : {}),\n ...(typeof onUnresolved === \"function\" ? { onUnresolved } : {}),\n };\n}\n\n/**\n * Fails to compile when `CommentsOptions` gains a member outside the five\n * named below. Every member of `CommentsOptions` is an event, and\n * `commentEventsOf` above is the only place that forwards them — unlike\n * `TemplatesOptions`, there is no second merge in `index.ts`, since comments\n * carries no config booleans for that merge to combine. A sixth member has\n * exactly one place to be added: this list and `commentEventsOf`'s destructure,\n * together.\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below is\n * what forces the check — it fails to compile the moment a member falls\n * outside the five named here.\n */\ntype _CommentsOptionsForwarded =\n Exclude<\n keyof CommentsOptions,\n \"onCreated\" | \"onUpdated\" | \"onDeleted\" | \"onResolved\" | \"onUnresolved\"\n > extends never\n ? true\n : never;\nconst _commentsOptionsForwarded: _CommentsOptionsForwarded = true;\n\n/**\n * Pick only the event members off a consumer-supplied `savedBlocks` value.\n *\n * A whitelist, never a spread. `savedBlocks` accepts a boolean, an\n * events-only `SavedBlocksOptions`, or a full `SavedBlocksProvider` — this is\n * only ever called on the first two, since a full provider replaces Cloud's\n * adapter outright and is used as-is (see `consumerSavedBlocks` below). A\n * non-object value (`true`, `undefined`, `false`) carries no keys to pick, so\n * it returns `{}` rather than throwing on the destructure.\n *\n * Each member is also type-checked, not merely truthiness-checked: a value\n * like `onCreated: \"yes\"` would otherwise reach core and throw at\n * saved-block-creation time, inside a call the consumer never made.\n */\nfunction savedBlocksEventsOf(\n value: TemplaticalCloudEditorConfig[\"savedBlocks\"],\n): SavedBlocksOptions {\n if (typeof value !== \"object\" || value === null) return {};\n const { onCreated, onUpdated, onDeleted } = value;\n return {\n ...(typeof onCreated === \"function\" ? { onCreated } : {}),\n ...(typeof onUpdated === \"function\" ? { onUpdated } : {}),\n ...(typeof onDeleted === \"function\" ? { onDeleted } : {}),\n };\n}\n\n/**\n * Fails to compile when `SavedBlocksOptions` gains a member outside the three\n * named below. `savedBlocksEventsOf` above is the only place that forwards\n * them, so a fourth member has exactly one place to be added: this list and\n * that function's destructure, together.\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below\n * is what forces the check — it fails to compile the moment a member falls\n * outside the three named here.\n */\ntype _SavedBlocksOptionsForwarded =\n Exclude<\n keyof SavedBlocksOptions,\n \"onCreated\" | \"onUpdated\" | \"onDeleted\"\n > extends never\n ? true\n : never;\nconst _savedBlocksOptionsForwarded: _SavedBlocksOptionsForwarded = true;\n\n/**\n * Pick `onSent` and `defaultRecipient` off a consumer-supplied `testEmail`\n * value.\n *\n * A whitelist, like `savedBlocksEventsOf` — but note what it does NOT pick:\n * `includeMjml` and `allowedRecipients` stay Cloud's own whenever Cloud's\n * sender is in play, so they are never read here even though\n * `TestEmailOptions` declares them (see `_TestEmailOptionsForwarded` below).\n * `defaultRecipient` has no such conflict — Cloud's provider never defines\n * it, and `useTestEmailFeature` already discards a value outside\n * `allowedRecipients`, so a consumer's choice can only ever pre-fill an\n * address already on Cloud's own signed list, never smuggle in one outside\n * it. `onSent` is a plain notification with no conflict either, so both\n * cross over.\n *\n * The result is assigned ONTO Cloud's own provider with `Object.assign`\n * (never spread together with it) at the call site — that provider's\n * `allowedRecipients` is a live getter over the JWT-derived allowlist, and a\n * spread reads every own property through `[[Get]]`, freezing the getter's\n * current value into a plain property on the new object. `Object.assign`\n * with the cloud provider as the *target* only ever writes the keys this\n * function returns, so the getter is never read and never disturbed.\n */\nfunction testEmailEventsOf(\n value: TemplaticalCloudEditorConfig[\"testEmail\"],\n): Pick<TestEmailOptions, \"onSent\" | \"defaultRecipient\"> {\n if (typeof value !== \"object\" || value === null) return {};\n const { onSent, defaultRecipient } = value;\n return {\n ...(typeof onSent === \"function\" ? { onSent } : {}),\n ...(typeof defaultRecipient === \"string\" ? { defaultRecipient } : {}),\n };\n}\n\n/**\n * Fails to compile when `TestEmailOptions` gains a member outside the four\n * named below. `onSent` and `defaultRecipient` are forwarded by\n * `testEmailEventsOf` above; `includeMjml` and `allowedRecipients` stay\n * Cloud's own whenever Cloud's sender is in play (Cloud renders server-side\n * rather than from a client MJML pass, and the allowlist is the signed one\n * from the project's JWT, not a client-supplied one). A fifth member still\n * forces a deliberate decision the same way a fourth `SavedBlocksOptions`\n * member does: whether it joins the forwarded pair or stays excluded for the\n * same reason as the other two.\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below\n * is what forces the check — it fails to compile the moment a member falls\n * outside the four named here.\n */\ntype _TestEmailOptionsForwarded =\n Exclude<\n keyof TestEmailOptions,\n \"includeMjml\" | \"allowedRecipients\" | \"defaultRecipient\" | \"onSent\"\n > extends never\n ? true\n : never;\nconst _testEmailOptionsForwarded: _TestEmailOptionsForwarded = true;\n\n/**\n * Pick only the event members off a consumer-supplied `versionHistory`\n * value.\n *\n * A whitelist, never a spread — the config type says `VersionHistoryOptions`,\n * but a JavaScript consumer is unchecked, so the object can carry anything.\n * `versionHistory` never accepts a full provider (see the rejected-keys block\n * below), so unlike `savedBlocksEventsOf` / `testEmailEventsOf` this is\n * always called on the whole config value.\n */\nfunction versionHistoryEventsOf(\n value: VersionHistoryOptions | undefined,\n): VersionHistoryOptions {\n if (!value) return {};\n const { onCreated, onRestored } = value;\n return {\n ...(typeof onCreated === \"function\" ? { onCreated } : {}),\n ...(typeof onRestored === \"function\" ? { onRestored } : {}),\n };\n}\n\n/**\n * Fails to compile when `VersionHistoryOptions` gains a member outside the\n * two named below. `versionHistoryEventsOf` above is the only place that\n * forwards them, so a third member has exactly one place to be added: this\n * list and that function's destructure, together.\n *\n * The type alone checks nothing: TypeScript never evaluates an alias nothing\n * reads, so a `never` result would sit there silently. The assignment below\n * is what forces the check — it fails to compile the moment a member falls\n * outside the two named here.\n */\ntype _VersionHistoryOptionsForwarded =\n Exclude<keyof VersionHistoryOptions, \"onCreated\" | \"onRestored\"> extends never\n ? true\n : never;\nconst _versionHistoryOptionsForwarded: _VersionHistoryOptionsForwarded = true;\n\n/**\n * A comma list with a final \"and\" — \"a\"; \"a and b\"; \"a, b and c\". The\n * ignored-methods warnings below each name however many storage methods a\n * consumer actually passed, and `Array.join(\" and \")` only reads correctly\n * for exactly two.\n */\nfunction joinWithAnd(items: string[]): string {\n if (items.length < 2) return items.join(\"\");\n if (items.length === 2) return items.join(\" and \");\n return `${items.slice(0, -1).join(\", \")} and ${items[items.length - 1]}`;\n}\n\n/**\n * Cloud's bootstrap and adapter wiring, in one place, run **before the editor\n * mounts**.\n *\n * This replaces `useCloudInitialization`, which owned a second `useEditor`, a\n * second `useEditorCore` and a post-mount async dance with its own loading and\n * error states. The dance is gone: auth, the health check and the plan fetch all\n * resolve here, and a failure rejects `initCloud()` rather than mounting an\n * editor that cannot work. What is left is adapter construction.\n *\n * Two things deliberately stay Cloud-only:\n *\n * - **Entitlements.** In an all-BYO world there are no plans, so `planConfig` is\n * Cloud's commercial layer above the provider set rather than a provider\n * itself. It is down to five booleans, each metering a resource Cloud buys.\n * - **Mid-session failure.** `init()` cannot fail after it mounts and should not\n * grow the ability, so the error overlay lives on this side of the seam.\n */\nexport async function bootstrapCloud(\n options: BootstrapCloudOptions,\n): Promise<CloudBootstrap> {\n const { config, cloudTranslations } = options;\n\n // --- Late-bound editor access ---------------------------------------------\n //\n // The providers below are built before there is an editor to read. Each\n // reaches it through these holders, filled by `attach()` / `ready()` — which is\n // what lets them be handed to `init()` as ordinary config keys.\n let editorRef: UseEditorReturn | null = null;\n let coreRef: UseEditorCoreReturn | null = null;\n let websocketRef: ReturnType<typeof useWebSocket> | null = null;\n let mediaLibRef: UseCloudMediaLibraryReturn | null = null;\n let collaboration: CloudCollaborationInstance | null = null;\n let collabWarning: UseCollabUndoWarningReturn | null = null;\n let saveGate: UseCloudSaveGateReturn | null = null;\n\n const sessionError = ref<Error | null>(null);\n const lockedBlocks = ref<Map<string, unknown>>(new Map());\n /**\n * Cloud's presence channel, forward-declared for the comments adapter's\n * `subscribe`. `useWebSocket` can only be built in `attach()` (it needs the\n * editor), while the provider is handed to `init()` before that — so the adapter\n * watches this and rebinds when the real channel lands.\n */\n const commentChannel = ref<RealtimeChannel | null>(null);\n\n function requireEditor(): UseEditorReturn {\n if (!editorRef) {\n throw new Error(\"[Templatical] The Cloud editor is not mounted yet.\");\n }\n return editorRef;\n }\n\n function getTemplateId(): string | null {\n return editorRef?.state.template?.id ?? null;\n }\n\n // --- Auth + plan ----------------------------------------------------------\n\n const authManager = new AuthManager({\n ...config.auth,\n // Only a *fatal* refusal raises the overlay. A 4xx means the endpoint\n // rejected the credentials, so every subsequent request fails the same way\n // and the session really is over. A network blip or a 5xx resolves on its\n // own, and blanking a mounted editor over one interrupts someone mid-edit on\n // a template that is probably unsaved — a worse outcome than the blip.\n //\n // The consumer hears about both: `onError` fires either way, and\n // `AuthManager` re-throws regardless, so a caller that cannot proceed still\n // finds out.\n onError: (error: Error) => {\n if (isFatalAuthError(error)) {\n sessionError.value = error;\n }\n config.onError?.(error);\n },\n });\n\n const planConfigInstance = usePlanConfig({\n authManager,\n onError: config.onError,\n });\n\n await authManager.initialize();\n\n const healthResult = await performHealthCheck({ authManager });\n if (!healthResult.api.ok) {\n throw new Error(\"Health check failed: API is not reachable\");\n }\n if (!healthResult.auth.ok) {\n throw new Error(\n `Health check failed: authentication error${healthResult.auth.error ? ` - ${healthResult.auth.error}` : \"\"}`,\n );\n }\n if (!healthResult.websocket.ok) {\n logger.warn(\n \"WebSocket health check failed:\",\n healthResult.websocket.error ?? \"unknown error\",\n \"-- real-time features will be disabled.\",\n );\n }\n\n await planConfigInstance.fetchConfig();\n\n // The bootstrap itself is what the overlay would have covered, and it just\n // succeeded — so anything `onError` recorded on the way here is stale.\n sessionError.value = null;\n\n // --- Rejected consumer keys ----------------------------------------------\n //\n // `render` is not declared on `TemplaticalCloudEditorConfig`, so it only\n // fires for JavaScript consumers — warned rather than silently dropped,\n // because the symptom (a store that stays empty while Cloud's fills up)\n // reads as a broken provider rather than a rejected one. `templates`,\n // `comments` and `versionHistory` ARE declared, but typed narrowly as\n // `TemplatesOptions`, `CommentsOptions` and `VersionHistoryOptions` — a\n // JavaScript consumer can still hand over a full provider, so its storage\n // methods are named and ignored the same way, while any events they carry\n // reach `eventsOf` / `commentEventsOf` / `versionHistoryEventsOf` below\n // regardless of this check.\n const consumerTemplates = (config as { templates?: Record<string, unknown> })\n .templates;\n // Presence, not `typeof === \"function\"` — see the matching comment on\n // `ignoredCommentMethods` below: a stated-but-ignored decision like\n // `save: false` is as much a signal as a stray function override.\n const ignoredTemplateMethods = [\"load\", \"create\", \"save\"].filter(\n (key) => typeof consumerTemplates?.[key] !== \"undefined\",\n );\n if (ignoredTemplateMethods.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredTemplateMethods.map((key) => `templates.${key}`),\n )} — the template id is the join key for collaboration, ` +\n \"version history, comments, AI rewrite, scoring and the server-side \" +\n \"export, so an id Cloud never issued would degrade all six. Your \" +\n \"event handlers were kept. Use init() to bring your own storage.\",\n );\n }\n const consumerVersionHistory = (\n config as { versionHistory?: Record<string, unknown> }\n ).versionHistory;\n // Presence, not `typeof === \"function\"`: a stated-but-ignored decision like\n // `restore: false` is as much a signal as a stray function override, and\n // both must be named here or the consumer never learns it was dropped.\n const ignoredVersionHistoryMethods = [\n \"list\",\n \"get\",\n \"create\",\n \"restore\",\n ].filter((key) => typeof consumerVersionHistory?.[key] !== \"undefined\");\n if (ignoredVersionHistoryMethods.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredVersionHistoryMethods.map((key) => `versionHistory.${key}`),\n )} — a version is keyed to a template id Cloud issued, so Cloud owns ` +\n \"its history. Your event handlers were kept. Use init() to bring \" +\n \"your own storage.\",\n );\n }\n const consumerComments = (config as { comments?: Record<string, unknown> })\n .comments;\n // Presence, not `typeof === \"function\"`: a stated-but-ignored decision like\n // `create: false` is as much a signal as a stray function override, and both\n // must be named here or the consumer never learns it was dropped.\n const ignoredCommentMethods = [\n \"list\",\n \"create\",\n \"update\",\n \"delete\",\n \"setResolved\",\n \"subscribe\",\n ].filter((key) => typeof consumerComments?.[key] !== \"undefined\");\n if (ignoredCommentMethods.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredCommentMethods.map((key) => `comments.${key}`),\n )} — a comment is keyed to a template id Cloud issued, and its ` +\n \"author is signed by the auth token, so Cloud owns the conversation. \" +\n \"Your event handlers were kept. Use init() to bring your own storage.\",\n );\n }\n // Rejected for a different reason than the three above: not the join key, but\n // because Cloud renders on its own for test email, scheduled sends and API\n // exports (`createCloudTestEmailProvider` calls `exportHtml` directly). A\n // consumer provider would have changed `toMjml()` / `toHtml()` and nothing\n // else, so what the user previewed and exported was not what Cloud delivered —\n // and Cloud's output is a deliberate superset (countdown GIFs, composited video\n // thumbnails), so the consumer's was also worse for those blocks.\n if ((config as { render?: unknown }).render) {\n logger.warn(\n \"initCloud does not accept a `render` provider — Cloud renders \" +\n \"server-side for test email, sends and exports, so a supplied renderer \" +\n \"would change only what you preview and export, never what Cloud \" +\n \"delivers. The supplied provider is ignored. For your own MJML, call \" +\n \"renderToMjml(editor.getContent()) from @templatical/renderer.\",\n );\n }\n\n // --- Providers ------------------------------------------------------------\n\n function connectRealtime(template: Template): void {\n const websocketConfig = planConfigInstance.config.value?.websocket;\n if (!websocketRef || !websocketConfig) return;\n websocketRef.connect(template.id, resolveWebSocketConfig(websocketConfig));\n }\n\n const baseTemplates = createCloudTemplatesProvider(authManager);\n const baseCreate = baseTemplates.create;\n const baseSave = baseTemplates.save;\n\n /**\n * Cloud's templates adapter plus the choreography the template id anchors:\n * the websocket joins the template's presence channel. The consumer's\n * `onSaved` / `onCreated` / `onLoaded` ride along via `eventsOf` — core calls\n * them once the editor has settled, so the adapter itself never invokes them.\n *\n * That choreography belongs in the adapter rather than in an editor-side\n * lifecycle composable, because it *is* adapter business — Cloud is what keys\n * realtime off the id it issued. `useCloudLifecycle` existed only to hold it.\n *\n * `save` pre-renders custom blocks, which is why it is wrapped too.\n */\n const templates: TemplatesProvider = {\n ...eventsOf(config.templates),\n load: async (id: string) => {\n const template = await baseTemplates.load(id);\n connectRealtime(template);\n return template;\n },\n create:\n typeof baseCreate === \"function\"\n ? async (input: { name?: string; content: TemplateContent }) => {\n const template = await baseCreate(input);\n connectRealtime(template);\n return template;\n }\n : false,\n save:\n typeof baseSave === \"function\"\n ? async (id: string, patch: TemplatePatch) => {\n if (coreRef && editorRef) {\n await preRenderCustomBlocks(\n editorRef.content.value,\n coreRef.registry,\n );\n }\n return baseSave(id, patch);\n }\n : false,\n };\n\n // Always Cloud's — see the rejected-keys block above. Cloud renders\n // independently for delivery, so a second renderer could only disagree with it.\n const render: RenderProvider = createCloudRenderProvider({\n authManager,\n getTemplateId,\n // Plain `editor.save()`: the templates adapter below already pre-renders\n // custom blocks on every save, which is exactly what the render endpoint\n // needs, since it exports from the stored copy rather than from\n // `payload.content`.\n save: () => requireEditor().save(),\n });\n\n // The consumer's `onCreated` / `onRestored` ride along via\n // `versionHistoryEventsOf` — core calls them once the editor has settled, so\n // the adapter itself never invokes them. `versionHistory` never accepts a\n // full provider (see the rejected-keys block above), so this always merges\n // onto Cloud's own adapter, never onto a consumer's.\n const versionHistory: VersionHistoryProvider = {\n ...versionHistoryEventsOf(config.versionHistory),\n ...createCloudVersionHistoryProvider(authManager),\n };\n\n // Realtime is the adapter's own business: `subscribe` binds the presence channel\n // above, so `useCommentListener` in `@templatical/core` never learns that Pusher\n // exists and a BYO provider with an SSE stream slots into the same seam. The\n // consumer's `onCreated` / `onUpdated` / `onDeleted` / `onResolved` /\n // `onUnresolved` ride along via `commentEventsOf` — core calls them once the\n // editor has settled, so the adapter itself never invokes them.\n const comments: CommentsProvider = {\n ...commentEventsOf(config.comments),\n ...createCloudCommentsProvider({\n authManager,\n channel: commentChannel,\n getSocketId: () => websocketRef?.getSocketId() ?? null,\n }),\n };\n\n // From the JWT, not from config. Cloud signs comment writes against this same\n // claim, so a consumer-supplied identity could only disagree with it — and a\n // token without the claim leaves comments unavailable rather than anonymous.\n const cloudUser: EditorUser | undefined = authManager.userConfig\n ? { id: authManager.userConfig.id, name: authManager.userConfig.name }\n : undefined;\n\n // A consumer may pass their own store instead of a boolean, in which case it\n // replaces Cloud's outright — discriminated on `list`, the one required\n // method every full provider carries, never on `typeof === \"object\"`: an\n // events-only `SavedBlocksOptions` (`{ onCreated }`) is an object too, and\n // reading it as the provider would leave `list` undefined and crash the\n // library on first browse. That path is deliberately NOT plan-gated:\n // `saved_modules` licenses Cloud's *storage*, and someone else's backend\n // isn't Cloud's to sell — `isSavedBlocksAvailable` below keys off this same\n // discriminated value for that reason.\n const consumerSavedBlocks =\n typeof (config.savedBlocks as SavedBlocksProvider | undefined)?.list ===\n \"function\"\n ? (config.savedBlocks as SavedBlocksProvider)\n : null;\n // A malformed provider — e.g. `create` / `update` / `delete` with no\n // working `list` — fails the discriminator above and falls through to\n // Cloud's own store, so those methods are silently unused rather than\n // replacing anything. Named here the same way `templates` / `comments` /\n // `versionHistory` name their own ignored methods, so the drop isn't a\n // console-free mystery.\n if (\n consumerSavedBlocks === null &&\n typeof config.savedBlocks === \"object\" &&\n config.savedBlocks !== null\n ) {\n const suppliedSavedBlocks = config.savedBlocks as Record<string, unknown>;\n const ignoredSavedBlocksMethods = [\n \"list\",\n \"create\",\n \"update\",\n \"delete\",\n ].filter((key) => typeof suppliedSavedBlocks[key] !== \"undefined\");\n if (ignoredSavedBlocksMethods.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredSavedBlocksMethods.map((key) => `savedBlocks.${key}`),\n )} — a provider needs a working list to replace Cloud's store, and ` +\n \"this value has none, so it configures Cloud's own store instead. \" +\n \"Your event handlers were kept. Use init() to bring your own storage.\",\n );\n }\n }\n // The consumer's `onCreated` / `onUpdated` / `onDeleted` ride along via\n // `savedBlocksEventsOf` when Cloud's own adapter is used — core calls them\n // once the editor has settled, so the adapter itself never invokes them. A\n // full consumer provider carries its own events already and is used as-is,\n // so this merge only ever runs on Cloud's side of the `??`.\n const savedBlocks: SavedBlocksProvider | undefined =\n config.savedBlocks === false\n ? undefined\n : (consumerSavedBlocks ?? {\n ...savedBlocksEventsOf(config.savedBlocks),\n ...createCloudSavedBlocksProvider(authManager),\n });\n\n // Cloud's test-email *config* — plan enablement plus the signed allowlist, both\n // carried by the JWT `authManager.initialize()` already resolved above. Hence\n // the constant `isAuthReady`: there is no window where it is false.\n const testEmailConfig = useTestEmail({\n authManager,\n isAuthReady: ref(true),\n });\n\n // Cloud's own send path renders through the export endpoint directly: the\n // adapter derives HTML from the *saved* template and applies\n // `onBeforeTestEmail` to it, which is a narrower job than the render contract.\n const exporter = useExport({ authManager });\n\n // Discriminated on `send`, the one required method every full provider\n // carries — never on raw truthiness, which an events-only `TestEmailOptions`\n // (`{ onSent }`) also satisfies and would leave `send` undefined, crashing\n // the dialog on send. `isTestEmailAvailable` below keys off this same\n // discriminated value so an events-only value stays plan-gated rather than\n // reading as \"consumer's own sender\".\n const consumerTestEmail =\n typeof (config.testEmail as TestEmailProvider | undefined)?.send ===\n \"function\"\n ? (config.testEmail as TestEmailProvider)\n : null;\n // `send` reaching here means it failed the discriminator above — e.g.\n // `send: null` — so it is named the same way a malformed `savedBlocks`\n // value's storage methods are. `includeMjml` / `allowedRecipients` are\n // named for a different reason: they are not part of this key's options\n // arm (see `cloudConfig.ts`), but TypeScript does not actually refuse\n // them — both are valid members of the sibling `TestEmailProvider` arm, so\n // the union's excess-property check passes them through regardless of\n // which arm the caller intended. All three log a warning naming them\n // rather than dropping with no console trace.\n if (\n consumerTestEmail === null &&\n typeof config.testEmail === \"object\" &&\n config.testEmail !== null\n ) {\n const suppliedTestEmail = config.testEmail as Record<string, unknown>;\n const ignoredTestEmailMembers = [\n \"send\",\n \"includeMjml\",\n \"allowedRecipients\",\n ].filter((key) => typeof suppliedTestEmail[key] !== \"undefined\");\n if (ignoredTestEmailMembers.length > 0) {\n logger.warn(\n `initCloud ignores ${joinWithAnd(\n ignoredTestEmailMembers.map((key) => `testEmail.${key}`),\n )} — a provider needs a working send to replace Cloud's sender ` +\n \"outright, and Cloud renders server-side with the signed \" +\n \"allowlist from your project's JWT either way, so none of these \" +\n \"apply here. Your event handlers were kept.\",\n );\n }\n }\n const testEmail: TestEmailProvider =\n consumerTestEmail ??\n // `Object.assign`, not a spread: `createCloudTestEmailProvider`'s\n // `allowedRecipients` is a live getter (see `testEmailEventsOf`'s doc\n // comment for why a spread would freeze it). The cloud provider is the\n // assignment *target* here, so its getter is never read — only the keys\n // `testEmailEventsOf` returns are ever written onto it.\n //\n // Asymmetric with `savedBlocks` / `versionHistory` on purpose, not by\n // drift: those two spread Cloud's provider LAST, so even a whitelist that\n // let something unexpected through could never displace a Cloud method —\n // two lines of defence. Here `testEmailEventsOf`'s return type is the\n // only barrier, because Cloud is the assignment target rather than a\n // second spread source. Copying the sibling shape (`{ ...events,\n // ...createCloudTestEmailProvider(...) }`) would reintroduce the exact\n // getter-freezing bug this construction exists to avoid.\n Object.assign(\n createCloudTestEmailProvider({\n authManager,\n getTemplateId,\n save: () => requireEditor().save(),\n exportHtml: (templateId: string) =>\n exporter.exportHtml(templateId, resolveExportFonts(config.fonts)),\n allowedEmails: testEmailConfig.allowedEmails,\n getSignature: testEmailConfig.getSignature,\n onBeforeTestEmail: config.onBeforeTestEmail,\n }),\n testEmailEventsOf(config.testEmail),\n );\n\n // --- Setup-time wiring ----------------------------------------------------\n\n const aiConfig = useAiConfig(config.ai);\n const scoringInstance = useTemplateScoring({ authManager, getTemplateId });\n\n const featureFlags = useCloudFeatureFlags({\n planConfigInstance,\n aiConfig,\n getTemplateId,\n });\n\n const isCollaborationEnabled = computed(\n () =>\n !!config.collaboration?.enabled &&\n planConfigInstance.hasFeature(\"collaboration\"),\n );\n\n function attach(context: CloudAttachContext): CloudAttachment {\n const editor = context.editor;\n editorRef = editor;\n\n provide(CLOUD_TRANSLATIONS_KEY, cloudTranslations);\n provide(AUTH_MANAGER_KEY, authManager);\n provide(AI_CONFIG_KEY, aiConfig);\n provide(SCORING_KEY, scoringInstance);\n\n const websocket = useWebSocket({ authManager, onError: config.onError });\n websocketRef = websocket;\n\n // Feeds the comments adapter's `subscribe`, which was handed to `init()` before\n // this socket existed.\n watch(\n websocket.channel,\n (channel) => {\n commentChannel.value = channel;\n },\n { immediate: true },\n );\n\n if (config.mcp?.enabled) {\n useMcpListener({\n editor,\n channel: websocket.channel,\n onOperation: config.mcp.onOperation,\n });\n }\n\n // Order matters: the broadcast wrapper replaces the editor's mutators so they\n // publish to peers, and `useEditorCore`'s history interceptor then wraps them\n // again to push history entries. Reversing it would push history for remote\n // operations and drift the two peers apart.\n if (config.collaboration?.enabled) {\n collaboration = useCollaboration({\n authManager,\n editor,\n channel: websocket.channel,\n onError: config.onError,\n onCollaboratorJoined: config.collaboration.onCollaboratorJoined,\n onCollaboratorLeft: config.collaboration.onCollaboratorLeft,\n onBlockLocked: config.collaboration.onBlockLocked,\n onBlockUnlocked: config.collaboration.onBlockUnlocked,\n }) as CloudCollaborationInstance;\n\n watch(\n () => collaboration!.lockedBlocks.value,\n (next) => {\n lockedBlocks.value = next;\n },\n { immediate: true },\n );\n\n useCollaborationBroadcast(editor, collaboration);\n }\n\n const panelState = useCloudPanelState();\n\n const mediaLib = useCloudMediaLibrary({\n onRequestMedia: config.onRequestMedia,\n mediaLibraryOpen: panelState.mediaLibraryOpen,\n mediaLibraryAccept: panelState.mediaLibraryAccept,\n authManager,\n getMediaConfig: () => planConfigInstance.config.value?.media ?? null,\n onError: config.onError,\n });\n mediaLibRef = mediaLib;\n\n return {\n websocket,\n panelState,\n mediaLib,\n // Handed to `MediaLibraryModal` as props by `CloudPanels`. A bare-string\n // injection would resolve to `undefined` silently; see\n // `CloudMediaBrowserContext`.\n mediaBrowser: {\n authManager,\n projectId: authManager.projectId,\n planConfig: planConfigInstance,\n },\n featureFlags,\n collaboration,\n isCollaborationEnabled,\n };\n }\n\n function ready(context: CloudReadyContext): CloudReady {\n const { core, capabilities } = context;\n coreRef = core;\n\n saveGate = useCloudSaveGate({\n issues: core.templateLint ? core.templateLint.issues : ref([]),\n planConfig: planConfigInstance.config,\n });\n\n collabWarning = useCollabUndoWarning({\n isCollaborationEnabled,\n getCollaboratorCount: () =>\n collaboration?.collaborators.value.length ?? 0,\n canUndo: core.history.canUndo,\n });\n\n // Mutated in place rather than re-provided: `useEditorCore` already provided\n // this exact object, so components injecting it see Cloud's entries on their\n // first render. Same pattern `versionHistory` uses in `Editor.vue`.\n //\n // `capabilities.comments` is *not* set here any more: comments became a shared\n // provider-backed feature, so `Editor.vue` builds the capability from\n // `useCommentsFeature` exactly as it does for saved blocks and test email, and\n // Cloud contributes only the two predicates below.\n capabilities.plan = planConfigInstance;\n capabilities.ai = aiConfig;\n\n // Registered unconditionally. `custom_blocks` and `theme_customization` used\n // to gate these — entitlements on editor capability the free editor grants,\n // and the only two things `applyPlanGates` would ever have had to do.\n if (config.customBlocks?.length) {\n core.registerCustomBlocks(config.customBlocks);\n }\n if (config.theme) {\n core.themeOverrides.value = config.theme;\n }\n\n return {\n saveGate,\n collabWarning,\n sessionError,\n retry: async () => {\n try {\n await authManager.initialize();\n sessionError.value = null;\n } catch (error) {\n sessionError.value =\n error instanceof Error ? error : new Error(\"Authentication failed\");\n }\n },\n };\n }\n\n const runtime: CloudRuntime = {\n lockedBlocks,\n onRequestMedia: (context) =>\n mediaLibRef\n ? mediaLibRef.handleRequestMedia(context)\n : Promise.resolve(null),\n isSavedBlocksAvailable: consumerSavedBlocks\n ? () => true\n : () =>\n config.savedBlocks !== false &&\n planConfigInstance.hasFeature(\"saved_modules\"),\n isTestEmailAvailable: consumerTestEmail\n ? // Their sender, their rules — the `test_email` plan feature licenses\n // Cloud's sending, and \"the template must be saved\" is a constraint of\n // Cloud's server-side render, not of an arbitrary backend.\n () => true\n : // All three matter and none implies another: the plan may grant the\n // feature while the project's token omits a recipient config, and Cloud\n // renders from the *saved* template so there must be one.\n () =>\n testEmailConfig.isEnabled.value &&\n featureFlags.canSendTestEmail.value &&\n featureFlags.hasTemplateSaved.value,\n // Three conditions, none implying another: the consumer may switch the feature\n // off, the plan meters comment storage and its realtime fan-out, and Cloud\n // anchors a comment to the *saved* template. (Whether a `user` exists is the\n // shared feature's own gate, not Cloud's.)\n isCommentsAvailable: () =>\n config.comments !== false &&\n planConfigInstance.hasFeature(\"commenting\") &&\n featureFlags.hasTemplateSaved.value,\n // A comment is anchored server-side, so a block that exists only on the canvas\n // has nothing stored to show. This is the last thing the deleted cloud editor\n // core carried (`savedBlockIds`), and it was always a comments concern rather\n // than an editor one.\n isBlockSaved: (blockId: string) =>\n collectSavedBlockIds(editorRef?.state.template ?? null).has(blockId),\n getSaveGate: () => saveGate,\n isRemoteOperation: () =>\n collaboration?._isProcessingRemoteOperation() ?? false,\n onBeforeUndo: () => collabWarning?.showCollabUndoWarning(),\n attach,\n ready,\n destroy() {\n websocketRef?.disconnect();\n config.onUnmount?.();\n },\n };\n\n return {\n runtime,\n providers: {\n templates,\n render,\n versionHistory,\n ...(savedBlocks ? { savedBlocks } : {}),\n testEmail,\n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,IAAI,CAAO;GACrE,mBAAmB;GACnB,yBACE,GAAe,6BAA6B,KAAK;GACnD,oBAAoB,GAAe,sBAAsB;GACzD;GACA;GACA,UAAU;IAER,AADA,GAAc,WAAW,GACzB,EAAO,YAAY;GACrB;EAIA;EACA,WAAW;GACT;GACA;GACA;GACA,GAAI,IAAc,EAAE,eAAY,IAAI,CAAC;GACrC;GACA;EACF;EACA,MAAM;CACR;AACF"}
|
|
@@ -58,6 +58,11 @@ var e = {
|
|
|
58
58
|
table: "Tabelle",
|
|
59
59
|
countdown: "Countdown"
|
|
60
60
|
},
|
|
61
|
+
blockDefaults: {
|
|
62
|
+
title: "Geben Sie Ihren Titel ein",
|
|
63
|
+
paragraph: "Geben Sie hier Ihren Text ein",
|
|
64
|
+
button: "Hier klicken"
|
|
65
|
+
},
|
|
61
66
|
sidebar: {
|
|
62
67
|
content: "Inhalt",
|
|
63
68
|
settings: "Einstellungen",
|
|
@@ -608,3 +613,5 @@ var e = {
|
|
|
608
613
|
};
|
|
609
614
|
//#endregion
|
|
610
615
|
export { e as default };
|
|
616
|
+
|
|
617
|
+
//# sourceMappingURL=de-C6J2Iae8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de-C6J2Iae8.js","names":[],"sources":["../../../src/i18n/locales/de.ts"],"sourcesContent":["import type en from \"./en\";\n\nconst de: typeof en = {\n // Footer (OSS only)\n footer: {\n poweredBy: \"Erstellt mit\",\n openSource: \"Open Source\",\n },\n\n // Header — Vorlagenname + Speicherstatus. Nur sichtbar, wenn ein\n // Vorlagen-Provider konfiguriert ist.\n header: {\n save: \"Speichern\",\n saving: \"Speichern...\",\n saved: \"Gespeichert\",\n unsaved: \"Nicht gespeichert\",\n saveFailed: \"Speichern fehlgeschlagen\",\n saveNoTemplate: \"Laden oder erstellen Sie zuerst eine Vorlage\",\n templateName: \"Vorlagenname\",\n rename: \"Vorlage umbenennen\",\n untitled: \"Unbenannt\",\n updatedAt: \"Aktualisiert {time}\",\n createdAt: \"Erstellt {time}\",\n updatedJustNow: \"Gerade eben aktualisiert\",\n createdJustNow: \"Gerade eben erstellt\",\n },\n\n // Relative timestamps, shared by every surface that shows one: the header's\n // updated line, saved blocks, comments and version history.\n time: {\n justNow: \"Gerade eben\",\n minutesAgo: \"vor {minutes} Min.\",\n hoursAgo: \"vor {hours} Std.\",\n daysAgo: \"vor {days} Tagen\",\n },\n\n // History (undo/redo)\n history: {\n collabWarning:\n \"Rückgängig machen kann die Änderungen anderer Mitarbeiter beeinflussen\",\n undo: \"Rückgängig\",\n redo: \"Wiederholen\",\n },\n\n // Viewport toggle\n viewport: {\n label: \"Ansichtsgröße\",\n desktop: \"Desktop\",\n mobile: \"Mobil\",\n },\n\n // Dark mode preview\n darkMode: {\n enable: \"Dunkelmodus-Vorschau\",\n disable: \"Hellmodus-Vorschau\",\n },\n\n // Preview mode\n previewMode: {\n enable: \"Vorschaumodus\",\n disable: \"Vorschau beenden\",\n },\n\n // Sidebar - Block types\n blocks: {\n section: \"Abschnitt\",\n image: \"Bild\",\n title: \"Titel\",\n paragraph: \"Absatz\",\n button: \"Schaltfläche\",\n divider: \"Trennlinie\",\n video: \"Video\",\n social: \"Sozial\",\n spacer: \"Abstand\",\n html: \"HTML\",\n menu: \"Menü\",\n table: \"Tabelle\",\n countdown: \"Countdown\",\n },\n\n // Placeholder text a newly inserted block starts with. Author-facing\n // prompts, meant to be overwritten — so they follow the editor UI locale.\n // Recipient-facing defaults live in `i18n/contentDefaults.ts` and follow\n // the template's own `settings.locale` instead.\n blockDefaults: {\n title: \"Geben Sie Ihren Titel ein\",\n paragraph: \"Geben Sie hier Ihren Text ein\",\n button: \"Hier klicken\",\n },\n\n // Right sidebar\n sidebar: {\n content: \"Inhalt\",\n settings: \"Einstellungen\",\n noSelection: \"Kein Element ausgewählt\",\n noSelectionHint:\n \"Wählen Sie einen Block auf der Leinwand aus, um ihn zu bearbeiten\",\n },\n\n // Toolbar - Common\n toolbar: {\n duplicate: \"Duplizieren\",\n delete: \"Löschen\",\n },\n\n // Title editor toolbar\n titleEditor: {\n toolbar: \"Titelformatierung\",\n bold: \"Fett (Strg+B)\",\n italic: \"Kursiv (Strg+I)\",\n addLink: \"Link hinzufügen\",\n },\n\n // Paragraph editor toolbar\n paragraphEditor: {\n toolbar: \"Textformatierung\",\n bold: \"Fett (Strg+B)\",\n italic: \"Kursiv (Strg+I)\",\n underline: \"Unterstrichen (Strg+U)\",\n strikethrough: \"Durchgestrichen\",\n subscript: \"Tiefgestellt\",\n superscript: \"Hochgestellt\",\n addLink: \"Link hinzufügen\",\n bulletList: \"Aufzählungsliste\",\n numberedList: \"Nummerierte Liste\",\n alignLeft: \"Linksbündig\",\n alignCenter: \"Zentriert\",\n alignRight: \"Rechtsbündig\",\n alignJustify: \"Blocksatz\",\n clearFormatting: \"Formatierung entfernen\",\n insertEmoji: \"Emoji einfügen\",\n fontFamily: \"Schriftart\",\n defaultFont: \"Standard\",\n fontSize: \"Schriftgröße\",\n defaultSize: \"Standard\",\n textColor: \"Textfarbe\",\n highlightColor: \"Hervorhebungsfarbe\",\n lineHeight: \"Zeilenhöhe\",\n letterSpacing: \"Zeichenabstand\",\n emojiItemLabel: \"Emoji {emoji} einfügen\",\n },\n\n // Block actions (BlockWrapper)\n blockActions: {\n drag: \"Zum Sortieren ziehen oder Leertaste drücken, um mit der Tastatur zu verschieben\",\n dragLifted:\n \"{block} wird verschoben. Pfeiltasten zum Positionieren, Leer- oder Eingabetaste zum Ablegen, Esc zum Abbrechen.\",\n duplicate: \"Block duplizieren\",\n delete: \"Block löschen\",\n hiddenOnViewport: \"Ausgeblendet auf {viewport}\",\n saveAsBlock: \"Als Block speichern\",\n conditionToggle: \"Anzeigebedingung umschalten\",\n comments: \"Kommentare ({count})\",\n lifted: \"{block} angehoben. Position {position} von {total}.\",\n moved: \"{block} auf Position {position} von {total} verschoben.\",\n dropped: \"{block} auf Position {position} von {total} abgelegt.\",\n cancelled:\n \"Verschieben abgebrochen. {block} auf Position {position} zurückgesetzt.\",\n },\n\n // Toolbar - Section\n section: {\n dropHere: \"Blöcke hierher ziehen\",\n columns: \"Spalten\",\n column1: \"1 Spalte\",\n column2: \"2 Spalten\",\n column3: \"3 Spalten\",\n ratio12: \"1:2 Verhältnis\",\n ratio21: \"2:1 Verhältnis\",\n borderRadius: \"Eckenradius\",\n wrapperEnable: \"Wrapper hinzufügen\",\n stackOnMobile: \"Auf Mobilgeräten stapeln\",\n },\n\n // Text editor link dialog\n linkDialog: {\n editLink: \"Link bearbeiten\",\n insertLink: \"Link einfügen\",\n updateLink: \"Link aktualisieren\",\n removeLink: \"Link entfernen\",\n cancel: \"Abbrechen\",\n urlPlaceholder: \"https://beispiel.de\",\n urlLabel: \"URL\",\n colorLabel: \"Linkfarbe\",\n },\n\n // Toolbar - Title\n title: {\n level: \"Überschriftenebene\",\n heading1: \"Überschrift 1 (36px)\",\n heading2: \"Überschrift 2 (28px)\",\n heading3: \"Überschrift 3 (22px)\",\n heading4: \"Überschrift 4 (18px)\",\n fontFamily: \"Schriftart\",\n inheritFont: \"Vorlagenschrift verwenden\",\n color: \"Farbe\",\n align: \"Ausrichtung\",\n alignLeft: \"Links\",\n alignCenter: \"Zentriert\",\n alignRight: \"Rechts\",\n },\n\n // Emoji picker\n emoji: {\n smileys: \"Smileys\",\n gestures: \"Gesten\",\n objects: \"Objekte\",\n },\n\n // Toolbar - Image\n image: {\n imageUrl: \"Bild-URL\",\n imageUrlPlaceholder: \"https://...\",\n altText: \"Alternativtext\",\n altTextPlaceholder: \"Bildbeschreibung\",\n width: \"Breite\",\n fullWidth: \"Volle Breite\",\n widthCustom: \"Benutzerdefiniert\",\n height: \"Höhe\",\n heightAuto: \"Automatisch\",\n heightCustom: \"Benutzerdefiniert\",\n borderRadius: \"Eckenradius\",\n linkUrl: \"Link-URL\",\n openInNewTab: \"In neuem Tab öffnen\",\n placeholderUrl: \"Platzhalterbild\",\n optional: \"(optional)\",\n placeholderUrlPlaceholder: \"https://... (nur zur Gestaltung)\",\n placeholderUrlTooltip:\n \"Da die Bild-URL ein Merge-Tag verwendet, können Sie hier ein echtes Bild angeben, um das Layout während der Gestaltung in der Vorschau anzuzeigen. Dies wird nicht in die endgültige Ausgabe aufgenommen.\",\n clickToAdd: \"Klicken Sie, um eine Bild-URL hinzuzufügen\",\n browseMedia: \"Medien durchsuchen\",\n dropToUpload: \"Bild zum Hochladen ablegen\",\n uploading: \"Wird hochgeladen…\",\n decorative: \"Dekoratives Bild\",\n decorativeHint:\n \"Wird von Bildschirmlesern ignoriert. Nur für Abstandshalter und visuelle Verzierungen verwenden.\",\n },\n\n // Toolbar - Video\n video: {\n videoUrl: \"Video-URL\",\n videoUrlPlaceholder: \"https://youtube.com/...\",\n openInNewTab: \"In neuem Tab öffnen\",\n customThumbnail: \"Eigenes Vorschaubild\",\n optional: \"(optional)\",\n thumbnailPlaceholder: \"Automatisch aus Video-URL generiert\",\n altText: \"Alternativtext\",\n altTextPlaceholder: \"Videobeschreibung\",\n width: \"Breite\",\n fullWidth: \"Volle Breite\",\n height: \"Höhe\",\n heightAuto: \"Automatisch\",\n heightCustom: \"Benutzerdefiniert\",\n placeholderUrl: \"Platzhalter-Thumbnail\",\n placeholderUrlPlaceholder: \"https://... (nur zur Gestaltung)\",\n placeholderUrlTooltip:\n \"Da die Video-URL ein Merge-Tag verwendet, können Sie hier ein echtes Thumbnail angeben, um das Layout während der Gestaltung in der Vorschau anzuzeigen. Dies wird nicht in die endgültige Ausgabe aufgenommen.\",\n addVideo: \"Video-URL hinzufügen\",\n },\n\n // Toolbar - Button\n button: {\n fontFamily: \"Schriftart\",\n inheritFont: \"Vorlagenschrift verwenden\",\n text: \"Text\",\n url: \"URL\",\n urlPlaceholder: \"https://...\",\n openInNewTab: \"In neuem Tab öffnen\",\n background: \"Hintergrund\",\n textColor: \"Textfarbe\",\n borderRadius: \"Eckenradius\",\n fontSize: \"Schriftgröße\",\n width: \"Breite\",\n widthAuto: \"An Inhalt anpassen\",\n fullWidth: \"Volle Breite\",\n widthCustom: \"Benutzerdefiniert\",\n },\n\n // Toolbar - Divider\n divider: {\n style: \"Stil\",\n solid: \"Durchgehend\",\n dashed: \"Gestrichelt\",\n dotted: \"Gepunktet\",\n color: \"Farbe\",\n thickness: \"Stärke\",\n },\n\n // Toolbar - Social Icons\n social: {\n icons: \"Symbole\",\n addIcon: \"Symbol hinzufügen\",\n addIcons: \"Soziale Symbole hinzufügen\",\n removeIcon: \"Entfernen\",\n urlPlaceholder: \"https://...\",\n style: \"Stil\",\n styleSolid: \"Gefüllt\",\n styleOutlined: \"Umrandet\",\n styleRounded: \"Abgerundet\",\n styleSquare: \"Eckig\",\n styleCircle: \"Rund\",\n size: \"Größe\",\n sizeSmall: \"K\",\n sizeMedium: \"M\",\n sizeLarge: \"G\",\n spacing: \"Abstand\",\n align: \"Ausrichtung\",\n platforms: {\n facebook: \"Facebook\",\n twitter: \"X (Twitter)\",\n instagram: \"Instagram\",\n linkedin: \"LinkedIn\",\n youtube: \"YouTube\",\n tiktok: \"TikTok\",\n pinterest: \"Pinterest\",\n email: \"E-Mail\",\n website: \"Website\",\n whatsapp: \"WhatsApp\",\n telegram: \"Telegram\",\n discord: \"Discord\",\n snapchat: \"Snapchat\",\n reddit: \"Reddit\",\n github: \"GitHub\",\n dribbble: \"Dribbble\",\n behance: \"Behance\",\n },\n },\n\n // Toolbar - Menu\n menu: {\n items: \"Menüpunkte\",\n addItem: \"Punkt hinzufügen\",\n removeItem: \"Entfernen\",\n text: \"Text\",\n urlPlaceholder: \"https://beispiel.de\",\n openInNewTab: \"In neuem Tab öffnen\",\n bold: \"Fett\",\n underline: \"Unterstrichen\",\n color: \"Farbe\",\n linkColor: \"Linkfarbe\",\n fontSize: \"Schriftgröße\",\n fontFamily: \"Schriftfamilie\",\n separator: \"Trennzeichen\",\n separatorColor: \"Trennzeichenfarbe\",\n spacing: \"Abstand\",\n textAlign: \"Ausrichtung\",\n addLinks: \"Menülinks hinzufügen\",\n },\n\n // Toolbar - Table\n table: {\n dimensions: \"Abmessungen\",\n rows: \"Zeilen\",\n columns: \"Spalten\",\n hasHeaderRow: \"Kopfzeile\",\n headerBackgroundColor: \"Kopfzeilen-Hintergrund\",\n noHeaderBg: \"Kein Hintergrund\",\n borderColor: \"Rahmenfarbe\",\n borderWidth: \"Rahmenbreite\",\n cellPadding: \"Zellenabstand\",\n fontFamily: \"Schriftart\",\n fontSize: \"Schriftgröße\",\n color: \"Textfarbe\",\n textAlign: \"Ausrichtung\",\n cellPlaceholder: \"Text eingeben...\",\n empty: \"Tabelle hinzufügen\",\n },\n\n // Toolbar - Paragraph\n paragraph: {\n paragraphSpacing: \"Absatzabstand\",\n },\n\n // Toolbar - Spacer\n spacer: {\n height: \"Höhe\",\n },\n\n // Toolbar - Countdown\n countdown: {\n targetDate: \"Zieldatum\",\n timezone: \"Zeitzone\",\n display: \"Anzeige\",\n days: \"Tage\",\n hours: \"Stunden\",\n minutes: \"Minuten\",\n seconds: \"Sekunden\",\n separator: \"Trennzeichen\",\n fontFamily: \"Schriftart\",\n inheritFont: \"Standard\",\n digitFontSize: \"Zifferngröße\",\n digitColor: \"Ziffernfarbe\",\n labelColor: \"Beschriftungsfarbe\",\n labelFontSize: \"Beschriftungsgröße\",\n background: \"Hintergrund\",\n labels: \"Beschriftungen\",\n expiry: \"Ablaufnachricht\",\n expiredMessagePlaceholder: \"Dieses Angebot ist abgelaufen\",\n expiredImageUrl: \"Ablaufbild-URL\",\n hideOnExpiry: \"Bei Ablauf ausblenden\",\n setDate: \"Legen Sie ein Zieldatum im Einstellungsbereich fest\",\n hidden: \"Ausgeblendet (abgelaufen)\",\n },\n\n // Custom Blocks\n customBlocks: {\n definitionNotFound:\n \"Unbekannter Blocktyp — dieser Block ist nicht registriert\",\n renderError:\n \"Dieser Block konnte nicht gerendert werden. Überprüfen Sie die Block-Vorlage auf Fehler.\",\n fields: {\n required: \"Pflichtfeld\",\n addItem: \"Element hinzufügen\",\n removeItem: \"Entfernen\",\n maxItemsReached: \"Maximale Anzahl erreicht\",\n minItemsRequired: \"Mindestens {count} Elemente erforderlich\",\n },\n toolbar: {\n noDefinition:\n \"Registrieren Sie diesen Blocktyp in Ihrer SDK-Konfiguration, um seine Eigenschaften zu bearbeiten\",\n },\n dataSource: {\n fetchButton: \"Inhalt laden\",\n changeButton: \"Ändern\",\n fetching: \"Wird geladen...\",\n readOnlyTooltip: \"Dieser Wert wird aus Ihrer Datenquelle geladen\",\n fetchError: \"Inhalt konnte nicht geladen werden\",\n },\n },\n\n // Toolbar - HTML\n html: {\n content: \"HTML-Inhalt\",\n preview: \"Benutzerdefinierter HTML-Block\",\n empty: \"HTML-Inhalt im Bereich hinzufügen\",\n sanitizationHint:\n \"HTML wird unverändert exportiert und nicht bereinigt – stellen Sie sicher, dass der Inhalt sicher ist.\",\n },\n\n // Toolbar - Common block settings\n blockSettings: {\n spacing: \"Abstände\",\n padding: \"Innenabstand\",\n background: \"Hintergrund\",\n color: \"Farbe\",\n display: \"Anzeige\",\n showOnDesktop: \"Auf Desktop anzeigen\",\n showOnMobile: \"Auf Mobilgerät anzeigen\",\n hiddenOnDevice: \"Ausgeblendet auf {device}\",\n displayCondition: \"Anzeigebedingung\",\n selectCondition: \"Bedingung auswählen\",\n removeCondition: \"Bedingung entfernen\",\n noCondition: \"Immer sichtbar\",\n conditionApplied: \"Bedingung angewendet\",\n customCondition: \"Eigene Bedingung\",\n customConditionLabel: \"Bedingungsname\",\n customConditionBefore: \"Vorher (öffnende Logik)\",\n customConditionAfter: \"Nachher (schließende Logik)\",\n applyCondition: \"Anwenden\",\n cancelCondition: \"Abbrechen\",\n customBadge: \"Eigene\",\n restoreHiddenBlocks: \"Alle ausgeblendeten Blöcke anzeigen\",\n },\n\n // Template settings\n templateSettings: {\n layout: \"Layout\",\n widthPreset: \"Breitenvoreinstellung\",\n customWidth: \"Benutzerdefinierte Breite\",\n appearance: \"Erscheinungsbild\",\n backgroundColor: \"Hintergrundfarbe\",\n textColor: \"Textfarbe\",\n linkColor: \"Linkfarbe\",\n linkUnderline: \"Links unterstreichen\",\n fontFamily: \"Schriftfamilie\",\n preheaderText: \"Preheader-Text\",\n preheaderTextPlaceholder:\n \"Vorschautext, der nach der Betreffzeile im Posteingang angezeigt wird...\",\n preheaderTextHint:\n \"Dieser Text erscheint nach der Betreffzeile in der E-Mail-Vorschau. Unterstützt Merge-Tags.\",\n language: \"Sprache\",\n contentLocale: \"Inhaltssprache\",\n contentLocaleHint:\n \"BCP-47-Code (z. B. en, de, pt-BR). Setzt das lang-Attribut der gerenderten E-Mail, damit Screenreader den Inhalt korrekt aussprechen.\",\n tips: \"Tipps\",\n tip1: \"600px ist die Standardbreite für E-Mail-Vorlagen\",\n tip2: \"Verwenden Sie websichere Schriften für beste Kompatibilität\",\n tip3: \"Helle Hintergründe eignen sich am besten für die Lesbarkeit\",\n },\n\n // Spacing control\n spacingControl: {\n lockAll: \"Alle Seiten sperren\",\n unlock: \"Seiten entsperren\",\n top: \"Oben\",\n right: \"Rechts\",\n bottom: \"Unten\",\n left: \"Links\",\n decreaseTop: \"Oben verringern\",\n increaseTop: \"Oben erhöhen\",\n decreaseLeft: \"Links verringern\",\n increaseLeft: \"Links erhöhen\",\n decreaseRight: \"Rechts verringern\",\n increaseRight: \"Rechts erhöhen\",\n decreaseBottom: \"Unten verringern\",\n increaseBottom: \"Unten erhöhen\",\n },\n\n // Color Picker\n colorPicker: {\n pickColor: \"Farbe auswählen\",\n hexValue: \"Hex-Farbwert\",\n notSet: \"Nicht festgelegt\",\n clear: \"Farbe entfernen\",\n presetColors: \"Vordefinierte Farben\",\n },\n\n // Merge-Tag\n mergeTag: {\n clickToEdit: \"Zum Bearbeiten klicken\",\n remove: \"Merge-Tag entfernen\",\n insert: \"Merge-Tag einfügen\",\n insertShort: \"Merge-Tag\",\n editValue: \"Merge-Tag-Wert bearbeiten\",\n deleteMergeTag: \"Merge-Tag löschen\",\n suggestionEmpty: \"Keine passenden Merge-Tags\",\n picker: {\n title: \"Merge-Tag einfügen\",\n searchPlaceholder: \"Merge-Tags suchen\",\n searchAriaLabel: \"Merge-Tags suchen\",\n noResults: \"Keine passenden Merge-Tags\",\n empty: \"Keine Merge-Tags konfiguriert\",\n otherGroup: \"Sonstige\",\n close: \"Schließen\",\n groupCount: \"{count}\",\n sample: \"Vorschau: {sample}\",\n },\n },\n\n // Logic tags (standalone, separate from merge tags)\n logicTag: {\n insert: \"Logik einfügen\",\n insertShort: \"Logik\",\n picker: {\n title: \"Logik einfügen\",\n searchPlaceholder: \"Logik-Tags suchen\",\n searchAriaLabel: \"Logik-Tags suchen\",\n noResults: \"Keine passenden Logik-Tags\",\n empty: \"Keine Logik-Tags konfiguriert\",\n otherGroup: \"Sonstige\",\n close: \"Schließen\",\n },\n },\n\n // Canvas\n canvas: {\n noBlocks: \"Noch keine Blöcke\",\n dragHint:\n \"Beginnen Sie von Grund auf, indem Sie Blöcke aus der Seitenleiste ziehen\",\n dropHere: \"Hier ablegen\",\n aiHintChat: \"oder lassen Sie\",\n aiHintChatSuffix: \"in Sekunden eine komplette Vorlage für Sie erstellen\",\n aiHintDesign:\n \"Haben Sie ein bestehendes Design? Laden Sie einen Screenshot, ein Bild oder PDF hoch und\",\n aiHintDesignSuffix: \"erstellt es sofort nach\",\n },\n\n // Seitenleiste\n savedBlocks: {\n title: \"Gespeicherte Blöcke\",\n saveAsBlock: \"Als Block speichern\",\n name: \"Name\",\n namePlaceholder: \"z.B. Header, Footer, CTA...\",\n save: \"Block speichern\",\n saving: \"Wird gespeichert...\",\n cancel: \"Abbrechen\",\n empty: \"Noch keine gespeicherten Blöcke\",\n emptyHint:\n \"Speichern Sie Blöcke aus Ihren Vorlagen, um sie später wiederzuverwenden.\",\n noResults: \"Keine gespeicherten Blöcke gefunden\",\n search: \"Gespeicherte Blöcke suchen...\",\n loading: \"Gespeicherte Blöcke werden geladen…\",\n category: \"Kategorie\",\n categoryPlaceholder: \"z. B. Kopfzeilen, Aktionen... (optional)\",\n allCategories: \"Alle Kategorien\",\n filterByCategory: \"Nach Kategorie filtern\",\n insert: \"Einfügen\",\n rename: \"Umbenennen\",\n delete: \"Löschen\",\n deleteConfirm: \"Diesen gespeicherten Block löschen?\",\n blockCount: \"{count} Block/Blöcke\",\n browse: \"Gespeicherte Blöcke durchsuchen\",\n selectToPreview: \"Gespeicherten Block für Vorschau auswählen\",\n insertAtBeginning: \"Am Anfang\",\n insertAfterBlock: \"Nach {block}\",\n insertAtEnd: \"Am Ende\",\n insertPosition: \"Einfügeposition\",\n close: \"Schließen\",\n pickToolbar: \"Auswahl für gespeicherten Block\",\n pickCount: \"{count} Block/Blöcke ausgewählt\",\n pickHint: \"Blöcke anklicken, um sie hinzuzufügen oder zu entfernen\",\n savingCount: \"{count} Block/Blöcke werden gespeichert:\",\n reorderHint:\n \"Zum Umsortieren ziehen — in dieser Reihenfolge werden die Blöcke gespeichert\",\n reorderHandle: \"{block} umsortieren, Position {position} von {total}\",\n reorderAnnouncement:\n \"{block} an Position {position} von {total} verschoben\",\n expand: \"Aufklappen\",\n collapse: \"Zuklappen\",\n expandPreview: \"Vorschau von {block} aufklappen\",\n collapsePreview: \"Vorschau von {block} zuklappen\",\n },\n comments: {\n button: \"Kommentare\",\n title: \"Kommentare\",\n placeholder: \"Kommentar schreiben...\",\n replyPlaceholder: \"Antwort schreiben...\",\n reply: \"Antworten\",\n resolve: \"Lösen\",\n unresolve: \"Wiedereröffnen\",\n delete: \"Löschen\",\n edit: \"Bearbeiten\",\n cancel: \"Abbrechen\",\n save: \"Speichern\",\n noComments: \"Noch keine Kommentare\",\n noCommentsHint:\n \"Starten Sie eine Konversation, indem Sie einen Kommentar zur Vorlage oder einem bestimmten Block hinzufügen.\",\n deleteConfirm: \"Diesen Kommentar löschen?\",\n filterAll: \"Alle\",\n filterUnresolved: \"Ungelöst\",\n filterBlock: \"Dieser Block\",\n jumpToBlock: \"Block\",\n ownedByYou: \"Sie\",\n edited: \"bearbeitet\",\n resolvedBy: \"Gelöst von {name}\",\n replyOne: \"{count} Antwort\",\n replyMany: \"{count} Antworten\",\n missingBlock: \"Fehlender Block\",\n saveTemplateFirst:\n \"Speichern Sie die Vorlage, bevor Sie diesen Block kommentieren.\",\n },\n versionHistory: {\n tooltip: \"Versionsverlauf\",\n dropdownTitle: \"Versionsverlauf\",\n empty: \"Noch keine Versionen\",\n auto: \"auto\",\n olderVersion: \"Ältere Version\",\n newerVersion: \"Neuere Version\",\n },\n versionPreview: {\n message: \"Sie sehen eine frühere Version dieser Vorlage.\",\n cancel: \"Abbrechen\",\n restore: \"Diese Version wiederherstellen\",\n restoreConfirm: {\n title: \"Diese Version wiederherstellen?\",\n unsavedWithSave:\n \"Sie haben ungespeicherte Änderungen. Speichern Sie sie zuerst, dann bleiben sie in Ihrem Verlauf — stellen Sie ohne Speichern wieder her, gehen sie verloren.\",\n unsavedNoSave:\n \"Sie haben ungespeicherte Änderungen und keinen Ort, um sie zu speichern. Beim Wiederherstellen dieser Version gehen sie verloren.\",\n saveAndRestore: \"Speichern und wiederherstellen\",\n restoreAnyway: \"Trotzdem wiederherstellen\",\n cancel: \"Abbrechen\",\n },\n },\n previewResolution: {\n resolving: \"Vorschau wird aufgelöst…\",\n failed:\n \"Die Vorschau konnte nicht aufgelöst werden — die unaufgelöste Vorlage wird angezeigt.\",\n hint: \"Die Vorschau verwendet aufgelöste Daten aus Ihrem Backend.\",\n },\n mergeTagPreview: {\n label: \"Merge-Tag-Ansicht\",\n sample: \"Beispiel\",\n labelView: \"Bezeichnung\",\n },\n testEmail: {\n title: \"Test-E-Mail senden\",\n recipientLabel: \"Empfänger\",\n recipientPlaceholder: \"sie@beispiel.de\",\n invalidAddress: \"Geben Sie eine gültige E-Mail-Adresse ein.\",\n preview: \"Vorschau\",\n previewHint:\n \"Merge-Tags werden unaufgelöst angezeigt — Ihr Backend setzt sie ein.\",\n previewHintSample:\n \"Merge-Tags zeigen Beispielwerte — Ihr Backend setzt die echten Daten ein.\",\n recipientNotAllowed:\n \"Diese Adresse steht nicht auf der Liste der erlaubten Empfänger.\",\n send: \"Senden\",\n sending: \"Wird gesendet...\",\n cancel: \"Abbrechen\",\n success: \"Test-E-Mail erfolgreich gesendet\",\n button: \"Test\",\n },\n sidebarNav: {\n browseSavedBlocks: \"Gespeicherte Blöcke durchsuchen\",\n palette: \"Blockpalette\",\n insertBlock: \"{block}-Block einfügen\",\n },\n\n // Landmark-Bezeichnungen für Hilfstechnologien\n landmarks: {\n canvas: \"E-Mail-Leinwand\",\n blockToolbar: \"Blockeigenschaften\",\n rightSidebar: \"Blockeigenschaften und Vorlageneinstellungen\",\n reorderAnnouncements: \"Block-Neuanordnungsmeldungen\",\n },\n\n // Design Reference (cloud)\n errors: {\n editorLoading: \"Editor wird geladen...\",\n editorLoadFailed: \"Editor konnte nicht geladen werden.\",\n retry: \"Erneut versuchen\",\n },\n\n issues: {\n panelTitle: \"Probleme\",\n panelTabLabel: \"Probleme\",\n groupErrors: \"Fehler\",\n groupWarnings: \"Warnungen\",\n groupInfo: \"Hinweise\",\n jump: \"Zum Block springen\",\n fix: \"Beheben\",\n emptyState: \"Keine Probleme — sieht gut aus.\",\n badgeError: \"Hat Fehler\",\n badgeWarning: \"Hat Warnungen\",\n issueCountTooltip: \"{count} Problem(e)\",\n },\n\n smallScreen: {\n title: \"Größerer Bildschirm erforderlich\",\n message:\n \"Der Editor benötigt mehr Platz, als dieser Bildschirm bietet. Öffnen Sie ihn auf einem Tablet oder Desktop, um mit der Bearbeitung zu beginnen.\",\n },\n};\n\nexport default de;\n"],"mappings":";AAEA,IAAM,IAAgB;CAEpB,QAAQ;EACN,WAAW;EACX,YAAY;CACd;CAIA,QAAQ;EACN,MAAM;EACN,QAAQ;EACR,OAAO;EACP,SAAS;EACT,YAAY;EACZ,gBAAgB;EAChB,cAAc;EACd,QAAQ;EACR,UAAU;EACV,WAAW;EACX,WAAW;EACX,gBAAgB;EAChB,gBAAgB;CAClB;CAIA,MAAM;EACJ,SAAS;EACT,YAAY;EACZ,UAAU;EACV,SAAS;CACX;CA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T,QAAQ;CACV;CACA,YAAY;EACV,mBAAmB;EACnB,SAAS;EACT,aAAa;CACf;CAGA,WAAW;EACT,QAAQ;EACR,cAAc;EACd,cAAc;EACd,sBAAsB;CACxB;CAGA,QAAQ;EACN,eAAe;EACf,kBAAkB;EAClB,OAAO;CACT;CAEA,QAAQ;EACN,YAAY;EACZ,eAAe;EACf,aAAa;EACb,eAAe;EACf,WAAW;EACX,MAAM;EACN,KAAK;EACL,YAAY;EACZ,YAAY;EACZ,cAAc;EACd,mBAAmB;CACrB;CAEA,aAAa;EACX,OAAO;EACP,SACE;CACJ;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, B as t, C as n, E as r, K as i, Q as a, T as o, Y as s, et as c, j as l, k as u, q as d, rt as f } from "./draggable-
|
|
1
|
+
import { $ as e, B as t, C as n, E as r, K as i, Q as a, T as o, Y as s, et as c, j as l, k as u, q as d, rt as f } from "./draggable-kbOhCgnk.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@vueuse+shared@14.4.0_vue@3.5.42_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
3
3
|
function p(e, t) {
|
|
4
4
|
return i() ? (s(e, t), !0) : !1;
|
|
@@ -176,4 +176,4 @@ function B(e, n, r) {
|
|
|
176
176
|
//#endregion
|
|
177
177
|
export { L as _, _ as a, B as b, x as c, N as d, A as f, I as g, M as h, g as i, v as l, p as m, O as n, C as o, F as p, S as r, b as s, m as t, k as u, R as v, z as y };
|
|
178
178
|
|
|
179
|
-
//# sourceMappingURL=dist-
|
|
179
|
+
//# sourceMappingURL=dist-BW6Y49zE.js.map
|