@templatical/editor 0.26.3 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{AiChatSidebar-CMBz6Wix.js → AiChatSidebar-iVJDzqjr.js} +60 -60
- package/dist/AiFeatureMenu-DrLGc2H2.js +57 -0
- package/dist/{BlockIssueBadge-Buk3_6QF.js → BlockIssueBadge-BHysq7XQ.js} +11 -11
- package/dist/BlockPreviewCanvas-2WASf5A4.js +121 -0
- package/dist/CloudHeaderExtras-DWApyc4P.js +59 -0
- package/dist/CloudPanels-DvOhGdRj.js +232 -0
- package/dist/{CollaboratorBar-BGwbg9aN.js → CollaboratorBar-C6MC0UCk.js} +21 -21
- package/dist/ColorPicker-Di8L5TLQ.js +501 -0
- package/dist/CommentsPanel-D5wQB1Kf.js +18 -0
- package/dist/CommentsSidebar-BoTIxpLE.js +481 -0
- package/dist/{cdn/chunks/CountdownBlock-vLTkTI9e.js → CountdownBlock-BFX8iU90.js} +19 -21
- package/dist/{cdn/chunks/CountdownToolbar-DPjcgcVR.js → CountdownToolbar-d9QM4m5x.js} +52 -53
- package/dist/{DesignReferenceSidebar-Bx96XFmK.js → DesignReferenceSidebar-DKsx2TiL.js} +72 -71
- package/dist/{IssuesPanel-Do7RLXsP.js → IssuesPanel-flKKwKpM.js} +38 -38
- package/dist/{LoadingTrack-BexpNuTV.js → LoadingTrack-C2T8ixEL.js} +3 -3
- package/dist/{MergeTagModeToggle-P-UguQHc.js → MergeTagModeToggle-PKCoKAoF.js} +43 -43
- package/dist/{MergeTagSuggestion-BJ43ihWR.js → MergeTagSuggestion-DGha0WRp.js} +46 -46
- package/dist/{cdn/chunks/NumberWithSuffix-BXrRdfq1.js → NumberWithSuffix-D9mPtMJB.js} +42 -44
- package/dist/{ParagraphEditor-6WN5jmXr.js → ParagraphEditor-iwTjkjtx.js} +200 -198
- package/dist/RestoreVersionDialog-DyMPGfsr.js +86 -0
- package/dist/{RichTextEditorContent-fbYJXAio.js → RichTextEditorContent-BVXG9oF4.js} +44 -44
- package/dist/SaveBlockDialog-BMCAIfK9.js +266 -0
- package/dist/{SavedBlocksBrowserModal-GMrajvfV.js → SavedBlocksBrowserModal-p5ma1qay.js} +116 -115
- package/dist/{cdn/chunks/SavedBlocksPanels-CUtYoi5Z.js → SavedBlocksPanels-BsiSstsZ.js} +9 -11
- package/dist/{SavedBlocksPickBar-Dk_IaMO9.js → SavedBlocksPickBar-fU4Mjm-8.js} +17 -17
- package/dist/{TemplateScoringPanel-BZUsb3FD.js → TemplateScoringPanel-Bv_bBsJi.js} +87 -87
- package/dist/TestEmailModal-EFYcrmTk.js +206 -0
- package/dist/{cdn/chunks/TestEmailPanel-B8y7JabA.js → TestEmailPanel-ljriUqs1.js} +4 -6
- package/dist/TitleEditor-BqRW7HTz.js +198 -0
- package/dist/TplModal-CTC9-w6B.js +49 -0
- package/dist/VersionHistoryMenu-Cq4rH56t.js +155 -0
- package/dist/VersionHistoryPanels-GkxkBiSi.js +46 -0
- package/dist/VersionPreviewBanner-BdtTu9mI.js +38 -0
- package/dist/{blockTypeIcons-C7wRSaT3.js → blockTypeIcons-CIrMr1SJ.js} +6 -6
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-D1zgI9fQ.js → ca-CEuJ6IRr.js} +73 -106
- package/dist/cdn/chunks/{AiChatSidebar-CQ8KUmNB.js → AiChatSidebar-DTUoBH5a.js} +54 -54
- package/dist/cdn/chunks/AiChatSidebar-DTUoBH5a.js.map +1 -0
- package/dist/cdn/chunks/AiFeatureMenu-BQz9Kczt.js +57 -0
- package/dist/cdn/chunks/AiFeatureMenu-BQz9Kczt.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js → BlockIssueBadge-UzSSOM_2.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js.map → BlockIssueBadge-UzSSOM_2.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-msj619wT.js → BlockPreviewCanvas-40ocpXDD.js} +42 -42
- package/dist/cdn/chunks/{BlockPreviewCanvas-msj619wT.js.map → BlockPreviewCanvas-40ocpXDD.js.map} +1 -1
- package/dist/cdn/chunks/CloudHeaderExtras-F_ySlW1S.js +60 -0
- package/dist/cdn/chunks/CloudHeaderExtras-F_ySlW1S.js.map +1 -0
- package/dist/cdn/chunks/CloudPanels-C34bcHpc.js +232 -0
- package/dist/cdn/chunks/CloudPanels-C34bcHpc.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-G_sZDZXw.js → CollaboratorBar-WBtrPPnM.js} +22 -22
- package/dist/cdn/chunks/CollaboratorBar-WBtrPPnM.js.map +1 -0
- package/dist/cdn/chunks/ColorPicker-CxKYd_8N.js +502 -0
- package/dist/cdn/chunks/ColorPicker-CxKYd_8N.js.map +1 -0
- package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js +20 -0
- package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js.map +1 -0
- package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js +460 -0
- package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js.map +1 -0
- package/dist/{CountdownBlock-DuyvGcr8.js → cdn/chunks/CountdownBlock-BYSrJWxg.js} +25 -23
- package/dist/cdn/chunks/{CountdownBlock-vLTkTI9e.js.map → CountdownBlock-BYSrJWxg.js.map} +1 -1
- package/dist/{CountdownToolbar-CBE9wRaV.js → cdn/chunks/CountdownToolbar-pVbkPNVo.js} +66 -63
- package/dist/cdn/chunks/{CountdownToolbar-DPjcgcVR.js.map → CountdownToolbar-pVbkPNVo.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-B-HFXV0W.js → DesignReferenceSidebar-sZWciECR.js} +64 -64
- package/dist/cdn/chunks/DesignReferenceSidebar-sZWciECR.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-DKTS4QVb.js → IssuesPanel-CHtetM9i.js} +36 -36
- package/dist/cdn/chunks/IssuesPanel-CHtetM9i.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js → LoadingTrack-Dp_QZvAK.js} +3 -3
- package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js.map → LoadingTrack-Dp_QZvAK.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js → MergeTagModeToggle-ZwW-5EeN.js} +39 -39
- package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js.map → MergeTagModeToggle-ZwW-5EeN.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-Dn8dExNa.js → MergeTagSuggestion-DhllqTA3.js} +47 -47
- package/dist/cdn/chunks/MergeTagSuggestion-DhllqTA3.js.map +1 -0
- package/dist/{NumberWithSuffix-D37ZWiZh.js → cdn/chunks/NumberWithSuffix-mm6AfIv4.js} +37 -35
- package/dist/cdn/chunks/NumberWithSuffix-mm6AfIv4.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-CZ5Z6AgG.js → ParagraphEditor-BBcIQQK2.js} +234 -233
- package/dist/cdn/chunks/ParagraphEditor-BBcIQQK2.js.map +1 -0
- package/dist/cdn/chunks/RestoreVersionDialog-DNUZHFa_.js +87 -0
- package/dist/cdn/chunks/RestoreVersionDialog-DNUZHFa_.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DtL49Jpo.js → RichTextEditorContent-Cl-acKAD.js} +44 -44
- package/dist/cdn/chunks/RichTextEditorContent-Cl-acKAD.js.map +1 -0
- package/dist/cdn/chunks/SaveBlockDialog-BXTZ729e.js +265 -0
- package/dist/cdn/chunks/SaveBlockDialog-BXTZ729e.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BkQXEUE2.js → SavedBlocksBrowserModal-BqGNBpRR.js} +114 -113
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BqGNBpRR.js.map +1 -0
- package/dist/{SavedBlocksPanels-DEPmNhi6.js → cdn/chunks/SavedBlocksPanels-nbK0UQTp.js} +11 -9
- package/dist/cdn/chunks/{SavedBlocksPanels-CUtYoi5Z.js.map → SavedBlocksPanels-nbK0UQTp.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-C80qJykl.js → SavedBlocksPickBar-B9mbw3Gk.js} +17 -17
- package/dist/cdn/chunks/SavedBlocksPickBar-B9mbw3Gk.js.map +1 -0
- package/dist/cdn/chunks/{TemplateScoringPanel-NucRtAP0.js → TemplateScoringPanel-Xdkp2EMY.js} +81 -81
- package/dist/cdn/chunks/TemplateScoringPanel-Xdkp2EMY.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-DE6fi3he.js +206 -0
- package/dist/cdn/chunks/TestEmailModal-DE6fi3he.js.map +1 -0
- package/dist/{TestEmailPanel-DubocPxf.js → cdn/chunks/TestEmailPanel-CAjQDXle.js} +6 -4
- package/dist/cdn/chunks/{TestEmailPanel-B8y7JabA.js.map → TestEmailPanel-CAjQDXle.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C8WDXf4P.js → TitleEditor-BP0ewaWF.js} +83 -83
- package/dist/cdn/chunks/TitleEditor-BP0ewaWF.js.map +1 -0
- package/dist/cdn/chunks/TplModal-C4kJduTr.js +50 -0
- package/dist/cdn/chunks/TplModal-C4kJduTr.js.map +1 -0
- package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js +148 -0
- package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js.map +1 -0
- package/dist/cdn/chunks/VersionHistoryPanels-DMq2PRee.js +48 -0
- package/dist/cdn/chunks/VersionHistoryPanels-DMq2PRee.js.map +1 -0
- package/dist/cdn/chunks/VersionPreviewBanner-04CL1SGY.js +40 -0
- package/dist/cdn/chunks/VersionPreviewBanner-04CL1SGY.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js → blockTypeIcons-hX_W4dqo.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js.map → blockTypeIcons-hX_W4dqo.js.map} +1 -1
- package/dist/cdn/chunks/{ca-D1zgI9fQ.js → ca-CEuJ6IRr.js} +74 -107
- package/dist/cdn/chunks/ca-CEuJ6IRr.js.map +1 -0
- package/dist/{cloud-qINCmQbn.js → cdn/chunks/cloud-BA0OpRh-.js} +400 -609
- package/dist/cdn/chunks/cloud-BA0OpRh-.js.map +1 -0
- package/dist/cdn/chunks/createCloudRuntime-gXA8_QRU.js +344 -0
- package/dist/cdn/chunks/createCloudRuntime-gXA8_QRU.js.map +1 -0
- package/dist/{de-uVoSP1xF.js → cdn/chunks/de-BytZwgn6.js} +4 -88
- package/dist/cdn/chunks/de-BytZwgn6.js.map +1 -0
- package/dist/{de-DHra3lvx.js → cdn/chunks/de-aRxhZF_K.js} +75 -106
- package/dist/cdn/chunks/de-aRxhZF_K.js.map +1 -0
- package/dist/cdn/chunks/{dist-B2HKGHnc.js → dist-CM8TB0VD.js} +136 -136
- package/dist/cdn/chunks/{dist-B2HKGHnc.js.map → dist-CM8TB0VD.js.map} +1 -1
- package/dist/cdn/chunks/{dist-C6z8AjBC.js → dist-CYLJiSiH.js} +63 -63
- package/dist/cdn/chunks/{dist-C6z8AjBC.js.map → dist-CYLJiSiH.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DCs9qL-b.js → draggable-BfpsXFg7.js} +916 -905
- package/dist/cdn/chunks/{draggable-DCs9qL-b.js.map → draggable-BfpsXFg7.js.map} +1 -1
- package/dist/cdn/chunks/{en-DE_y1YWU.js → en-BCgVx9zM.js} +4 -3
- package/dist/cdn/chunks/{en-DE_y1YWU.js.map → en-BCgVx9zM.js.map} +1 -1
- package/dist/{en-DlqX2YWZ.js → cdn/chunks/en-BX4V_7YO.js} +75 -106
- package/dist/cdn/chunks/en-BX4V_7YO.js.map +1 -0
- package/dist/{en-CjhsJxb-.js → cdn/chunks/en-DyOSV0lY.js} +4 -88
- package/dist/cdn/chunks/en-DyOSV0lY.js.map +1 -0
- package/dist/{es-Cuss2snv.js → cdn/chunks/es-CA9uQ-5x.js} +75 -106
- package/dist/cdn/chunks/es-CA9uQ-5x.js.map +1 -0
- package/dist/cdn/chunks/{extensions-qhcN3RMT.js → extensions-CMcVw2uu.js} +53 -53
- package/dist/cdn/chunks/{extensions-qhcN3RMT.js.map → extensions-CMcVw2uu.js.map} +1 -1
- package/dist/{fr-Cm85vB2g.js → cdn/chunks/fr-iBuE60Ap.js} +75 -106
- package/dist/cdn/chunks/fr-iBuE60Ap.js.map +1 -0
- package/dist/cdn/chunks/{icons-CvYN6zrM.js → icons-C36Ha5VU.js} +11 -11
- package/dist/cdn/chunks/{icons-CvYN6zrM.js.map → icons-C36Ha5VU.js.map} +1 -1
- package/dist/{keys-fwF3qZax.js → cdn/chunks/keys-CbQuRX85.js} +6 -4
- package/dist/cdn/chunks/keys-CbQuRX85.js.map +1 -0
- package/dist/cdn/chunks/logger-ByvdoAwq.js +23 -0
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +1 -0
- package/dist/{nl-dmiIX7oT.js → cdn/chunks/nl-Btw4ojNo.js} +75 -106
- package/dist/cdn/chunks/nl-Btw4ojNo.js.map +1 -0
- package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js +23 -0
- package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js.map +1 -0
- package/dist/{pt-BR-CTzHTqJD.js → cdn/chunks/pt-BR-C1WLSGDh.js} +4 -88
- package/dist/cdn/chunks/pt-BR-C1WLSGDh.js.map +1 -0
- package/dist/{pt-BR-CaIG-7EM.js → cdn/chunks/pt-BR-GjVsCqbN.js} +75 -106
- package/dist/cdn/chunks/pt-BR-GjVsCqbN.js.map +1 -0
- package/dist/cdn/chunks/src-B_QJduQD.js.map +1 -1
- package/dist/cdn/chunks/{src-xkGep9eN.js → src-CoHDh8Ua.js} +1485 -1483
- package/dist/cdn/chunks/src-CoHDh8Ua.js.map +1 -0
- package/dist/cdn/chunks/{src-BwbnXShT.js → src-Ct4Fsx3t.js} +148 -134
- package/dist/cdn/chunks/src-Ct4Fsx3t.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-9oK5kn21.js +59 -0
- package/dist/cdn/chunks/styleConstants-9oK5kn21.js.map +1 -0
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +6 -0
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C44S1Cmh.js → tiptap-DmpGap5g.js} +40 -40
- package/dist/cdn/chunks/{tiptap-C44S1Cmh.js.map → tiptap-DmpGap5g.js.map} +1 -1
- package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js → useAliveFlag-Dtm174fG.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js.map → useAliveFlag-Dtm174fG.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js → useCloudI18n-NVa1aeY8.js} +5 -5
- package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js.map → useCloudI18n-NVa1aeY8.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CcgxY-Gy.js → useEditorCore-DC8gmfs6.js} +1434 -1147
- package/dist/cdn/chunks/useEditorCore-DC8gmfs6.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-UMs0F71x.js → useI18n-DVWCJJFH.js} +5 -5
- package/dist/cdn/chunks/{useI18n-UMs0F71x.js.map → useI18n-DVWCJJFH.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js → useMergeTag-BfZBRPQp.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js.map → useMergeTag-BfZBRPQp.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js → usePopoverPosition-BC-HA7TK.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js.map → usePopoverPosition-BC-HA7TK.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +5119 -284
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-On4TSac-.js → check-DZbmkMQe.js} +1 -1
- package/dist/{chevron-down-69EiBGoB.js → chevron-down-nYScOLeZ.js} +1 -1
- package/dist/{chevron-up-Dh3MG1Dw.js → chevron-up-CpYpDLnc.js} +1 -1
- package/dist/{circle-alert-cilwzafX.js → circle-alert-CuuK6thq.js} +1 -1
- package/dist/{clock-Dt0APH92.js → clock-DxkrtqOr.js} +1 -1
- package/dist/cloud-BAefVBb_.js +1444 -0
- package/dist/createCloudRuntime-Bt8W-ajI.js +342 -0
- package/dist/{createLucideIcon-C8WzBYCv.js → createLucideIcon-L-wQXW_R.js} +9 -9
- package/dist/{cdn/chunks/de-uVoSP1xF.js → de-BytZwgn6.js} +2 -90
- package/dist/{cdn/chunks/de-DHra3lvx.js → de-aRxhZF_K.js} +73 -108
- package/dist/dist-B5iReTtK.js +251 -0
- package/dist/{dist-Cl8J0IES.js → dist-Ck9roB6K.js} +42 -42
- package/dist/{dist-BpKxrUi2.js → dist-CqcGTIiX.js} +46 -46
- package/dist/{cdn/chunks/en-DlqX2YWZ.js → en-BX4V_7YO.js} +73 -108
- package/dist/{cdn/chunks/en-CjhsJxb-.js → en-DyOSV0lY.js} +2 -90
- package/dist/{cdn/chunks/es-Cuss2snv.js → es-CA9uQ-5x.js} +73 -108
- package/dist/{extensions-Cwg9S-0f.js → extensions-CX87G4aL.js} +42 -42
- package/dist/{cdn/chunks/fr-Cm85vB2g.js → fr-iBuE60Ap.js} +73 -108
- package/dist/{image-up-Ceggh_R3.js → image-up-DouZRGVt.js} +1 -1
- package/dist/index.d.ts +499 -23
- package/dist/{info-DO5odBcZ.js → info-puX5V6Iq.js} +1 -1
- package/dist/{cdn/chunks/keys-Cmc2Yl3D.js → keys-BxixS0TN.js} +4 -6
- package/dist/{list-checks-BSkPKbuI.js → list-checks-jw-ZlvWY.js} +1 -1
- package/dist/{loader-circle-bO7o7_HD.js → loader-circle-DqTxB7Kr.js} +1 -1
- package/dist/logger-BBlvSn6q.js +21 -0
- package/dist/{message-circle-BEkAk65X.js → message-circle-BZ7YpB22.js} +1 -1
- package/dist/{cdn/chunks/nl-dmiIX7oT.js → nl-Btw4ojNo.js} +73 -108
- package/dist/{pencil-t6m0EtKL.js → pencil-DmbRhTJu.js} +1 -1
- package/dist/preRenderCustomBlocks-BebjKtmw.js +21 -0
- package/dist/{cdn/chunks/pt-BR-CTzHTqJD.js → pt-BR-C1WLSGDh.js} +2 -90
- package/dist/{cdn/chunks/pt-BR-CaIG-7EM.js → pt-BR-GjVsCqbN.js} +73 -108
- package/dist/{refresh-cw-CkOYVzK5.js → refresh-cw-OK_O-cL0.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-CepEmvwF.js → runtime-dom.esm-bundler-BgKXIPLV.js} +144 -144
- package/dist/{scan-line-DwSVj25O.js → scan-line-DyaSTsJ5.js} +1 -1
- package/dist/{send-CWsWN8PQ.js → send-B-wasJJC.js} +1 -1
- package/dist/{shield-check-qje8Kufw.js → shield-check-DUIyRrTo.js} +1 -1
- package/dist/{sparkles-DumaWRW-.js → sparkles-DYEMATWC.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-9oK5kn21.js +57 -0
- package/dist/templatical-editor.js +5319 -289
- package/dist/{text-align-start-Ir8Ah4mT.js → text-align-start-CzjLeBLe.js} +1 -1
- package/dist/timeouts-DHPZQ0G3.js +4 -0
- package/dist/{trash-2-CklAFCmO.js → trash-2-C0shEPry.js} +1 -1
- package/dist/{triangle-alert-BBi4n93g.js → triangle-alert-Fw0ce8oQ.js} +1 -1
- package/dist/{upload-sVqqppuv.js → upload-D69C2CBx.js} +3 -4
- package/dist/{useAliveFlag-cvyBxHp7.js → useAliveFlag-BGIAZii_.js} +1 -1
- package/dist/{useCloudI18n-DKVm6PCa.js → useCloudI18n-CAZTZ9_a.js} +2 -2
- package/dist/{useEditorCore-P4UkhcyS.js → useEditorCore-CFLzobo_.js} +1604 -1320
- package/dist/{useI18n-DoVKdCTH.js → useI18n-BfXff_Sy.js} +2 -2
- package/dist/{useMergeTag-CYZk7dZD.js → useMergeTag-Dd4I7kge.js} +3 -3
- package/dist/usePopoverPosition-CxhCX3SQ.js +59 -0
- package/dist/{vue.runtime.esm-bundler-D1diBMsm.js → vue.runtime.esm-bundler-DzEsDRtY.js} +447 -436
- package/dist/{x-Mby7KlhS.js → x-BjTlFqRv.js} +1 -1
- package/package.json +8 -8
- package/dist/AiFeatureMenu-Cy-PVrNT.js +0 -63
- package/dist/BlockPreviewCanvas-BZKslwGI.js +0 -121
- package/dist/CloudEditor-CPRkQCRa.js +0 -1188
- package/dist/ColorPicker-ClETsjA3.js +0 -550
- package/dist/CommentsSidebar-CdRCCSDD.js +0 -435
- package/dist/SaveBlockDialog-21vDlEBS.js +0 -265
- package/dist/SnapshotHistory-Cb4WW2gf.js +0 -128
- package/dist/TestEmailModal-BHDKmd6B.js +0 -205
- package/dist/TitleEditor-Cy4B3UNe.js +0 -198
- package/dist/TplModal-Dv9zgSWI.js +0 -49
- package/dist/cdn/chunks/AiChatSidebar-CQ8KUmNB.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-Cb9gaRBn.js +0 -63
- package/dist/cdn/chunks/AiFeatureMenu-Cb9gaRBn.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-DbyEsIxu.js +0 -1166
- package/dist/cdn/chunks/CloudEditor-DbyEsIxu.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-G_sZDZXw.js.map +0 -1
- package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js +0 -552
- package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js +0 -412
- package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-B-HFXV0W.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-DKTS4QVb.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-Dn8dExNa.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-BXrRdfq1.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-CZ5Z6AgG.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DtL49Jpo.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-CVIVZEuy.js +0 -264
- package/dist/cdn/chunks/SaveBlockDialog-CVIVZEuy.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BkQXEUE2.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-C80qJykl.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-DFinMrg_.js +0 -121
- package/dist/cdn/chunks/SnapshotHistory-DFinMrg_.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel-NucRtAP0.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-IxS-QjeH.js +0 -205
- package/dist/cdn/chunks/TestEmailModal-IxS-QjeH.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-C8WDXf4P.js.map +0 -1
- package/dist/cdn/chunks/TplModal-Ce0QuHyo.js +0 -50
- package/dist/cdn/chunks/TplModal-Ce0QuHyo.js.map +0 -1
- package/dist/cdn/chunks/ca-D1zgI9fQ.js.map +0 -1
- package/dist/cdn/chunks/cloud-DcC8bPwn.js +0 -1787
- package/dist/cdn/chunks/cloud-DcC8bPwn.js.map +0 -1
- package/dist/cdn/chunks/de-DHra3lvx.js.map +0 -1
- package/dist/cdn/chunks/de-uVoSP1xF.js.map +0 -1
- package/dist/cdn/chunks/en-CjhsJxb-.js.map +0 -1
- package/dist/cdn/chunks/en-DlqX2YWZ.js.map +0 -1
- package/dist/cdn/chunks/es-Cuss2snv.js.map +0 -1
- package/dist/cdn/chunks/fr-Cm85vB2g.js.map +0 -1
- package/dist/cdn/chunks/keys-Cmc2Yl3D.js.map +0 -1
- package/dist/cdn/chunks/nl-dmiIX7oT.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CaIG-7EM.js.map +0 -1
- package/dist/cdn/chunks/src-BwbnXShT.js.map +0 -1
- package/dist/cdn/chunks/src-xkGep9eN.js.map +0 -1
- package/dist/cdn/chunks/styles-DLAfU4Uf.js +0 -4140
- package/dist/cdn/chunks/styles-DLAfU4Uf.js.map +0 -1
- package/dist/cdn/chunks/timeouts-SsLMC4a3.js +0 -6
- package/dist/cdn/chunks/timeouts-SsLMC4a3.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CcgxY-Gy.js.map +0 -1
- package/dist/styles-Dx__pP9O.js +0 -4318
- package/dist/usePopoverPosition-C0dPEF4X.js +0 -308
|
@@ -1,1166 +0,0 @@
|
|
|
1
|
-
import { $ as e, A as t, H as n, J as r, M as i, N as a, P as o, V as s, Z as c, _ as l, b as u, ct as d, f, g as p, h as m, it as h, j as g, l as _, lt as v, m as y, n as b, p as x, s as S, st as C, u as w, v as T, x as E, y as D, z as O } from "./draggable-DCs9qL-b.js";
|
|
2
|
-
import { t as k } from "./timeouts-SsLMC4a3.js";
|
|
3
|
-
import { H as A } from "./src-B_QJduQD.js";
|
|
4
|
-
import { T as j, b as M, j as ee, t as N } from "./useEditorCore-CcgxY-Gy.js";
|
|
5
|
-
import { _ as P } from "./dist-C6z8AjBC.js";
|
|
6
|
-
import { t as F } from "./dist-B2HKGHnc.js";
|
|
7
|
-
import { M as I, c as te, d as L, i as R, l as z, t as B, z as ne } from "./keys-Cmc2Yl3D.js";
|
|
8
|
-
import { t as V } from "./useI18n-UMs0F71x.js";
|
|
9
|
-
import { E as H, F as U, I as W, Lt as G, M as K, Mt as q, it as J, kt as Y, tt as re, u as ie } from "./icons-CvYN6zrM.js";
|
|
10
|
-
import { t as ae } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
11
|
-
import { n as X } from "./useCloudI18n-8wkJtuJD.js";
|
|
12
|
-
import { a as Z, c as oe, d as Q, f as se, i as ce, l as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e } from "./styles-DLAfU4Uf.js";
|
|
13
|
-
import { d as $ } from "./ColorPicker-W_UyiVGc.js";
|
|
14
|
-
import { n as ve, t as ye } from "./MergeTagModeToggle-DQ79SqQc.js";
|
|
15
|
-
import { C as be, a as xe, c as Se, d as Ce, f as we, g as Te, h as Ee, i as De, l as Oe, n as ke, o as Ae, p as je, r as Me, s as Ne, t as Pe, u as Fe, v as Ie, y as Le } from "./cloud-DcC8bPwn.js";
|
|
16
|
-
//#region src/cloud/composables/useSnapshotPreview.ts
|
|
17
|
-
function Re(t) {
|
|
18
|
-
let { authManager: n, editor: i, history: a, conditionPreview: o, autoSave: s, onError: l } = t, u = e(null), d = c(null), p = c(null), m = !1;
|
|
19
|
-
r(() => {
|
|
20
|
-
m = !0;
|
|
21
|
-
});
|
|
22
|
-
let h = f(() => d.value !== null), g = f(() => u.value?.snapshots.value ?? []), _ = f(() => u.value?.isLoading.value ?? !1), v = f(() => u.value?.isRestoring.value ?? !1);
|
|
23
|
-
function y() {
|
|
24
|
-
i.state.template?.id && !u.value && (u.value = Ne({
|
|
25
|
-
authManager: n,
|
|
26
|
-
templateId: i.state.template.id,
|
|
27
|
-
onRestore: b,
|
|
28
|
-
onError: l
|
|
29
|
-
}), u.value.loadSnapshots());
|
|
30
|
-
}
|
|
31
|
-
function b(e) {
|
|
32
|
-
i.setContent(e.content, !1), a.clear(), o.reset();
|
|
33
|
-
}
|
|
34
|
-
async function x(e) {
|
|
35
|
-
if (!m) {
|
|
36
|
-
if (d.value) {
|
|
37
|
-
d.value = e, i.setContent(e.content, !1);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
i.state.isDirty && i.hasTemplate() && (await i.createSnapshot(), m) || (p.value = structuredClone(i.content.value), s?.pause(), d.value = e, i.setContent(e.content, !1));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
async function S() {
|
|
44
|
-
if (!(!d.value || !u.value)) try {
|
|
45
|
-
if (await u.value.restoreSnapshot(d.value.id), m || (await u.value.loadSnapshots(), m)) return;
|
|
46
|
-
} catch (e) {
|
|
47
|
-
throw !m && p.value && i.setContent(p.value, !1), e;
|
|
48
|
-
} finally {
|
|
49
|
-
m || (d.value = null, p.value = null, s?.resume());
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function C() {
|
|
53
|
-
!d.value || !p.value || (i.setContent(p.value, !1), d.value = null, p.value = null, s?.resume());
|
|
54
|
-
}
|
|
55
|
-
async function w() {
|
|
56
|
-
m || u.value && await u.value.loadSnapshots();
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
snapshotHistoryInstance: u,
|
|
60
|
-
previewingSnapshot: d,
|
|
61
|
-
contentBeforePreview: p,
|
|
62
|
-
isPreviewingSnapshot: h,
|
|
63
|
-
snapshotHistorySnapshots: g,
|
|
64
|
-
snapshotHistoryIsLoading: _,
|
|
65
|
-
snapshotHistoryIsRestoring: v,
|
|
66
|
-
initSnapshotHistory: y,
|
|
67
|
-
handleRestore: b,
|
|
68
|
-
handleSnapshotNavigate: x,
|
|
69
|
-
confirmRestoreSnapshot: S,
|
|
70
|
-
cancelPreview: C,
|
|
71
|
-
loadSnapshotHistory: w
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/cloud/composables/useCloudPanelState.ts
|
|
76
|
-
function ze() {
|
|
77
|
-
let e = c(null), t = f({
|
|
78
|
-
get: () => e.value === "ai-chat",
|
|
79
|
-
set: (t) => e.value = t ? "ai-chat" : null
|
|
80
|
-
}), n = f({
|
|
81
|
-
get: () => e.value === "scoring",
|
|
82
|
-
set: (t) => e.value = t ? "scoring" : null
|
|
83
|
-
}), r = f({
|
|
84
|
-
get: () => e.value === "design-reference",
|
|
85
|
-
set: (t) => e.value = t ? "design-reference" : null
|
|
86
|
-
}), i = f({
|
|
87
|
-
get: () => e.value === "comments",
|
|
88
|
-
set: (t) => e.value = t ? "comments" : null
|
|
89
|
-
}), a = c(!1), o = c(void 0), s = c(!1), l = c(null), u = f(() => e.value !== null), d = f(() => {
|
|
90
|
-
let t = e.value;
|
|
91
|
-
return t === "ai-chat" || t === "design-reference" || t === "scoring" ? t : null;
|
|
92
|
-
}), p = f(() => s.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
|
|
93
|
-
function m() {
|
|
94
|
-
s.value = !s.value;
|
|
95
|
-
}
|
|
96
|
-
function h(t) {
|
|
97
|
-
s.value = !1, e.value = e.value === t ? null : t;
|
|
98
|
-
}
|
|
99
|
-
return F(l, () => {
|
|
100
|
-
s.value = !1;
|
|
101
|
-
}), {
|
|
102
|
-
activePanel: e,
|
|
103
|
-
aiChatOpen: t,
|
|
104
|
-
scoringPanelOpen: n,
|
|
105
|
-
designReferenceOpen: r,
|
|
106
|
-
commentsOpen: i,
|
|
107
|
-
mediaLibraryOpen: a,
|
|
108
|
-
mediaLibraryAccept: o,
|
|
109
|
-
aiMenuOpen: s,
|
|
110
|
-
aiMenuRef: l,
|
|
111
|
-
rightPanelOpen: u,
|
|
112
|
-
activeAiFeature: d,
|
|
113
|
-
aiButtonActive: p,
|
|
114
|
-
toggleAiMenu: m,
|
|
115
|
-
handleAiFeatureSelect: h
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region src/cloud/composables/useCollabUndoWarning.ts
|
|
120
|
-
function Be(e) {
|
|
121
|
-
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = P(() => {
|
|
122
|
-
a.value = !1;
|
|
123
|
-
}, k, { immediate: !1 });
|
|
124
|
-
function s() {
|
|
125
|
-
i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
|
|
126
|
-
}
|
|
127
|
-
return {
|
|
128
|
-
collabUndoWarningVisible: a,
|
|
129
|
-
showCollabUndoWarning: s
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
134
|
-
function Ve(e) {
|
|
135
|
-
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = f(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = f(() => t.hasFeature("test_email")), o = f(() => !!r.state.template?.id), s = f(() => t.hasFeature("white_label")), l = f(() => t.config.value?.limits.max_templates ?? null), u = f(() => t.config.value?.template_count ?? 0), d = c(!1), p = c("idle"), m = c(""), { start: h } = P(() => {
|
|
136
|
-
p.value = "idle";
|
|
137
|
-
}, 3e3, { immediate: !1 });
|
|
138
|
-
return {
|
|
139
|
-
canUseAiGeneration: i,
|
|
140
|
-
canSendTestEmail: a,
|
|
141
|
-
hasTemplateSaved: o,
|
|
142
|
-
isWhiteLabeled: s,
|
|
143
|
-
templateLimit: l,
|
|
144
|
-
templateCount: u,
|
|
145
|
-
isSaveExporting: d,
|
|
146
|
-
saveStatus: p,
|
|
147
|
-
saveErrorMessage: m,
|
|
148
|
-
startSaveStatusClear: h
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/cloud/composables/useCloudMediaLibrary.ts
|
|
153
|
-
function He(e) {
|
|
154
|
-
let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: i, authManager: a, getMediaConfig: o, onError: s } = e, c = null;
|
|
155
|
-
function l(e) {
|
|
156
|
-
return {
|
|
157
|
-
url: e.url,
|
|
158
|
-
alt: e.alt_text || void 0
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
async function u(e) {
|
|
162
|
-
let r = e?.accept ?? ["images"];
|
|
163
|
-
if (e?.files?.length) {
|
|
164
|
-
if (t) {
|
|
165
|
-
let n = await t({
|
|
166
|
-
accept: r,
|
|
167
|
-
files: e.files
|
|
168
|
-
});
|
|
169
|
-
return n ? l(n) : null;
|
|
170
|
-
}
|
|
171
|
-
return d(e.files[0]);
|
|
172
|
-
}
|
|
173
|
-
if (t) {
|
|
174
|
-
let e = await t({ accept: r });
|
|
175
|
-
return e ? l(e) : null;
|
|
176
|
-
}
|
|
177
|
-
return c &&= (c(null), null), i.value = r, n.value = !0, new Promise((e) => {
|
|
178
|
-
c = (t) => {
|
|
179
|
-
e(t);
|
|
180
|
-
};
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
async function d(e) {
|
|
184
|
-
let t = f(e);
|
|
185
|
-
if (t) return s?.(t), null;
|
|
186
|
-
try {
|
|
187
|
-
let { MediaApiClient: t } = await import("./src-xkGep9eN.js");
|
|
188
|
-
return l(await new t(a).uploadMedia(e));
|
|
189
|
-
} catch (e) {
|
|
190
|
-
return s?.(e), null;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
function f(e) {
|
|
194
|
-
let t = o?.() ?? null;
|
|
195
|
-
if (!t) return null;
|
|
196
|
-
let n = t.categories?.images?.mime_types ?? [];
|
|
197
|
-
return n.length > 0 && !n.includes(e.type) ? /* @__PURE__ */ Error(`Unsupported image type: ${e.type || "unknown"}. Accepted: ${n.join(", ")}.`) : t.max_file_size > 0 && e.size > t.max_file_size ? /* @__PURE__ */ Error(`Image is too large (${e.size} bytes). Maximum allowed is ${t.max_file_size} bytes.`) : null;
|
|
198
|
-
}
|
|
199
|
-
function p(e) {
|
|
200
|
-
n.value = !1, c?.(l(e)), c = null;
|
|
201
|
-
}
|
|
202
|
-
function m() {
|
|
203
|
-
n.value = !1, c?.(null), c = null;
|
|
204
|
-
}
|
|
205
|
-
return r(() => {
|
|
206
|
-
c &&= (c(null), null);
|
|
207
|
-
}), {
|
|
208
|
-
handleRequestMedia: u,
|
|
209
|
-
handleMediaSelect: p,
|
|
210
|
-
handleMediaLibraryClose: m
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
//#endregion
|
|
214
|
-
//#region src/cloud/composables/useCloudInitialization.ts
|
|
215
|
-
function Ue(e) {
|
|
216
|
-
let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = c(!0), l = c(!1), u = c(null), d = !1, p = { value: null }, m = null, h = null, g = new be({
|
|
217
|
-
...t.auth,
|
|
218
|
-
onError: t.onError
|
|
219
|
-
}), _ = Me({
|
|
220
|
-
authManager: g,
|
|
221
|
-
onError: t.onError
|
|
222
|
-
}), v = c(/* @__PURE__ */ new Map()), y = Ie({
|
|
223
|
-
authManager: g,
|
|
224
|
-
defaultFontFamily: t.fonts?.defaultFont,
|
|
225
|
-
templateDefaults: t.templateDefaults,
|
|
226
|
-
onError: t.onError,
|
|
227
|
-
lockedBlocks: v
|
|
228
|
-
}), b = Oe({
|
|
229
|
-
authManager: g,
|
|
230
|
-
onError: t.onError
|
|
231
|
-
});
|
|
232
|
-
t.mcp?.enabled && Pe({
|
|
233
|
-
editor: y,
|
|
234
|
-
channel: b.channel,
|
|
235
|
-
onOperation: t.mcp.onOperation
|
|
236
|
-
});
|
|
237
|
-
let x = null;
|
|
238
|
-
t.collaboration?.enabled && (x = Ce({
|
|
239
|
-
authManager: g,
|
|
240
|
-
editor: y,
|
|
241
|
-
channel: b.channel,
|
|
242
|
-
onError: t.onError,
|
|
243
|
-
onCollaboratorJoined: t.collaboration.onCollaboratorJoined,
|
|
244
|
-
onCollaboratorLeft: t.collaboration.onCollaboratorLeft,
|
|
245
|
-
onBlockLocked: t.collaboration.onBlockLocked,
|
|
246
|
-
onBlockUnlocked: t.collaboration.onBlockUnlocked
|
|
247
|
-
}), O(() => x.lockedBlocks.value, (e) => {
|
|
248
|
-
v.value = e;
|
|
249
|
-
}, { immediate: !0 }), Fe(y, x));
|
|
250
|
-
let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = N({
|
|
251
|
-
editor: y,
|
|
252
|
-
config: {
|
|
253
|
-
uiTheme: t.uiTheme,
|
|
254
|
-
theme: void 0,
|
|
255
|
-
blockDefaults: t.blockDefaults,
|
|
256
|
-
templateDefaults: t.templateDefaults,
|
|
257
|
-
customBlocks: [],
|
|
258
|
-
paletteBlocks: t.paletteBlocks,
|
|
259
|
-
htmlBlockPreview: t.htmlBlockPreview,
|
|
260
|
-
colors: t.colors,
|
|
261
|
-
mergeTags: t.mergeTags,
|
|
262
|
-
logicTags: t.logicTags,
|
|
263
|
-
displayConditions: t.displayConditions,
|
|
264
|
-
onRequestMedia: null,
|
|
265
|
-
resolvePreview: t.resolvePreview,
|
|
266
|
-
lint: Q(t),
|
|
267
|
-
onSave: () => {
|
|
268
|
-
p.value?.().catch((e) => {
|
|
269
|
-
t.onError?.(e);
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
translations: n,
|
|
274
|
-
fontsManager: r,
|
|
275
|
-
historyOptions: x ? { isRemoteOperation: () => x._isProcessingRemoteOperation() } : void 0,
|
|
276
|
-
autoSaveOptions: {
|
|
277
|
-
onChange: async () => {
|
|
278
|
-
y.hasTemplate() && (await y.createSnapshot(), m?.snapshotHistoryInstance.value?.loadSnapshots());
|
|
279
|
-
},
|
|
280
|
-
debounce: t.autoSaveDebounce ?? 5e3,
|
|
281
|
-
enabled: () => t.autoSave !== !1 && _.hasFeature("auto_save")
|
|
282
|
-
},
|
|
283
|
-
themeExtraStyles: () => ({ "--tpl-drop-text": `"${n.canvas.dropHere}"` }),
|
|
284
|
-
keyboardOptions: { onBeforeUndo: () => h?.showCollabUndoWarning() },
|
|
285
|
-
editorRoot: e.editorRoot,
|
|
286
|
-
containerEl: e.containerEl
|
|
287
|
-
}), w = Be({
|
|
288
|
-
isCollaborationEnabled: S,
|
|
289
|
-
getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
|
|
290
|
-
canUndo: C.history.canUndo
|
|
291
|
-
});
|
|
292
|
-
h = w;
|
|
293
|
-
let T = Re({
|
|
294
|
-
authManager: g,
|
|
295
|
-
editor: y,
|
|
296
|
-
history: C.history,
|
|
297
|
-
conditionPreview: C.conditionPreview,
|
|
298
|
-
autoSave: C.autoSave,
|
|
299
|
-
onError: t.onError
|
|
300
|
-
});
|
|
301
|
-
m = T;
|
|
302
|
-
let E = ze(), D = Te(t.ai), k = Ve({
|
|
303
|
-
planConfigInstance: _,
|
|
304
|
-
aiConfig: D,
|
|
305
|
-
editor: y
|
|
306
|
-
}), A = He({
|
|
307
|
-
onRequestMedia: t.onRequestMedia,
|
|
308
|
-
mediaLibraryOpen: E.mediaLibraryOpen,
|
|
309
|
-
mediaLibraryAccept: E.mediaLibraryAccept,
|
|
310
|
-
authManager: g,
|
|
311
|
-
getMediaConfig: () => _.config.value?.media ?? null,
|
|
312
|
-
onError: t.onError
|
|
313
|
-
});
|
|
314
|
-
j({
|
|
315
|
-
onBlockMove: y.moveBlock,
|
|
316
|
-
onBlockAdd: y.addBlock
|
|
317
|
-
});
|
|
318
|
-
let M = De({
|
|
319
|
-
authManager: g,
|
|
320
|
-
getFontsConfig: () => t.fonts,
|
|
321
|
-
canUseCustomFonts: () => _.hasFeature("custom_fonts")
|
|
322
|
-
}), P = Ae({
|
|
323
|
-
authManager: g,
|
|
324
|
-
isAuthReady: l
|
|
325
|
-
}), F = t.testEmail ?? null, z = se({
|
|
326
|
-
provider: F ?? xe({
|
|
327
|
-
authManager: g,
|
|
328
|
-
getTemplateId: () => y.state.template?.id ?? null,
|
|
329
|
-
save: () => y.save(),
|
|
330
|
-
exportHtml: (e) => M.exportHtml(e),
|
|
331
|
-
allowedEmails: P.allowedEmails,
|
|
332
|
-
getSignature: P.getSignature,
|
|
333
|
-
onBeforeTestEmail: t.onBeforeTestEmail
|
|
334
|
-
}),
|
|
335
|
-
getContent: () => y.content.value,
|
|
336
|
-
renderMjml: () => pe({
|
|
337
|
-
getContent: () => y.content.value,
|
|
338
|
-
renderCustomBlock: C.registry.renderCustomBlock,
|
|
339
|
-
getCustomBlockStylesheet: (e) => C.registry.getDefinition(e)?.stylesheet
|
|
340
|
-
}),
|
|
341
|
-
onError: t.onError,
|
|
342
|
-
isAvailable: F ? () => !0 : () => P.isEnabled.value && k.canSendTestEmail.value && k.hasTemplateSaved.value
|
|
343
|
-
}), V = je({
|
|
344
|
-
authManager: g,
|
|
345
|
-
getTemplateId: () => y.state.template?.id ?? null,
|
|
346
|
-
getSocketId: () => b.getSocketId(),
|
|
347
|
-
onComment: t.onComment,
|
|
348
|
-
onError: t.onError,
|
|
349
|
-
isAuthReady: l,
|
|
350
|
-
hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
|
|
351
|
-
});
|
|
352
|
-
we({
|
|
353
|
-
comments: V,
|
|
354
|
-
channel: b.channel
|
|
355
|
-
});
|
|
356
|
-
let H = typeof t.savedBlocks == "object" && t.savedBlocks !== null ? t.savedBlocks : null, U = ue({
|
|
357
|
-
provider: H ?? Se(g),
|
|
358
|
-
editor: y,
|
|
359
|
-
onError: t.onError,
|
|
360
|
-
isAvailable: H ? () => !0 : () => t.savedBlocks !== !1 && _.hasFeature("saved_modules")
|
|
361
|
-
}), W = Ee({
|
|
362
|
-
authManager: g,
|
|
363
|
-
getTemplateId: () => y.state.template?.id ?? null
|
|
364
|
-
});
|
|
365
|
-
function G(e) {
|
|
366
|
-
E.commentsOpen.value = !0, queueMicrotask(() => {
|
|
367
|
-
o()?.filterByBlock(e);
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
a(I, A.handleRequestMedia), a(R, g), a(B, D), a(L, V), a(ne, W), a(te, {
|
|
371
|
-
plan: _,
|
|
372
|
-
ai: D,
|
|
373
|
-
comments: {
|
|
374
|
-
getBlockCount: (e) => V.commentCountByBlock.value.get(e) ?? 0,
|
|
375
|
-
openForBlock: G
|
|
376
|
-
},
|
|
377
|
-
savedBlocks: U.capability,
|
|
378
|
-
testEmail: z.capability
|
|
379
|
-
});
|
|
380
|
-
function K(e) {
|
|
381
|
-
_.hasFeature("theme_customization") && (C.themeOverrides.value = e);
|
|
382
|
-
}
|
|
383
|
-
function q(e) {
|
|
384
|
-
y.setUiTheme(e);
|
|
385
|
-
}
|
|
386
|
-
async function J() {
|
|
387
|
-
s.value = !0, u.value = null;
|
|
388
|
-
try {
|
|
389
|
-
if (await g.initialize(), d) return;
|
|
390
|
-
l.value = !0;
|
|
391
|
-
let e = await ke({ authManager: g });
|
|
392
|
-
if (d) return;
|
|
393
|
-
if (!e.api.ok) throw Error("Health check failed: API is not reachable");
|
|
394
|
-
if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
|
|
395
|
-
if (e.websocket.ok || ee.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
|
|
396
|
-
r.setCustomFontsEnabled(_.hasFeature("custom_fonts")), t.customBlocks?.length && _.hasFeature("custom_blocks") && C.registerCustomBlocks(t.customBlocks), t.theme && _.hasFeature("theme_customization") && (C.themeOverrides.value = t.theme), i("ready");
|
|
397
|
-
} catch (e) {
|
|
398
|
-
if (d) return;
|
|
399
|
-
let n = e instanceof Error ? e : Error("Initialization failed", { cause: e });
|
|
400
|
-
u.value = n, t.onError?.(n);
|
|
401
|
-
} finally {
|
|
402
|
-
d || (s.value = !1);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
function Y() {
|
|
406
|
-
d = !0, r.cleanupFontLinks(), b.disconnect(), C.destroy(), t.onUnmount?.();
|
|
407
|
-
}
|
|
408
|
-
return {
|
|
409
|
-
isInitializing: s,
|
|
410
|
-
isAuthReady: l,
|
|
411
|
-
initError: u,
|
|
412
|
-
isDestroyed: () => d,
|
|
413
|
-
authManager: g,
|
|
414
|
-
planConfigInstance: _,
|
|
415
|
-
websocket: b,
|
|
416
|
-
collaboration: x,
|
|
417
|
-
isCollaborationEnabled: S,
|
|
418
|
-
editor: y,
|
|
419
|
-
core: C,
|
|
420
|
-
aiConfig: D,
|
|
421
|
-
featureFlags: k,
|
|
422
|
-
mediaLib: A,
|
|
423
|
-
exporter: M,
|
|
424
|
-
testEmail: z,
|
|
425
|
-
commentsInstance: V,
|
|
426
|
-
savedBlocks: U,
|
|
427
|
-
scoringInstance: W,
|
|
428
|
-
panelState: E,
|
|
429
|
-
snapshotPreview: T,
|
|
430
|
-
collabWarning: w,
|
|
431
|
-
onSaveHook: p,
|
|
432
|
-
initialize: J,
|
|
433
|
-
destroy: Y,
|
|
434
|
-
setThemeOverrides: K,
|
|
435
|
-
setUiTheme: q,
|
|
436
|
-
openCommentsForBlock: G
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
//#endregion
|
|
440
|
-
//#region src/utils/preRenderCustomBlocks.ts
|
|
441
|
-
async function We(e, t) {
|
|
442
|
-
let n = async (e) => {
|
|
443
|
-
if (A(e)) {
|
|
444
|
-
let n = e;
|
|
445
|
-
try {
|
|
446
|
-
n.renderedHtml = await t.renderCustomBlock(n);
|
|
447
|
-
} catch {
|
|
448
|
-
n.renderedHtml = `<!-- Custom block render error: ${n.customType} -->`;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
if (e.type === "section" && "children" in e) {
|
|
452
|
-
let t = e;
|
|
453
|
-
for (let e of t.children) for (let t of e) await n(t);
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
for (let t of e.blocks) await n(t);
|
|
457
|
-
}
|
|
458
|
-
//#endregion
|
|
459
|
-
//#region src/cloud/composables/useCloudLifecycle.ts
|
|
460
|
-
function Ge(e) {
|
|
461
|
-
let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
|
|
462
|
-
function u() {
|
|
463
|
-
return Le(i.config.value.websocket);
|
|
464
|
-
}
|
|
465
|
-
async function d(e) {
|
|
466
|
-
let i = await n.create(e);
|
|
467
|
-
return l() ? i : (t.onCreate?.(i), a.initSnapshotHistory(), r.connect(i.id, u()), i);
|
|
468
|
-
}
|
|
469
|
-
async function f(e) {
|
|
470
|
-
let i = await n.load(e);
|
|
471
|
-
return l() ? i : (t.onLoad?.(i), a.initSnapshotHistory(), r.connect(i.id, u()), i);
|
|
472
|
-
}
|
|
473
|
-
async function p() {
|
|
474
|
-
c.isSaveExporting.value = !0, c.saveStatus.value = "idle";
|
|
475
|
-
try {
|
|
476
|
-
if (await We(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
|
|
477
|
-
let e = await n.save();
|
|
478
|
-
if (l()) throw Error("Component unmounted during save");
|
|
479
|
-
a.initSnapshotHistory(), a.snapshotHistoryInstance.value?.loadSnapshots();
|
|
480
|
-
let r = await s.exportHtml(e.id);
|
|
481
|
-
if (l()) throw Error("Component unmounted during save");
|
|
482
|
-
let i = {
|
|
483
|
-
templateId: e.id,
|
|
484
|
-
html: r.html,
|
|
485
|
-
mjml: r.mjml,
|
|
486
|
-
content: e.content
|
|
487
|
-
};
|
|
488
|
-
return t.onSave?.(i), c.saveStatus.value = "saved", c.startSaveStatusClear(), i;
|
|
489
|
-
} catch (e) {
|
|
490
|
-
throw l() || (c.saveStatus.value = "error", c.saveErrorMessage.value = e instanceof Error ? e.message : "Save failed"), e;
|
|
491
|
-
} finally {
|
|
492
|
-
l() || (c.isSaveExporting.value = !1);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
return {
|
|
496
|
-
createTemplate: d,
|
|
497
|
-
loadTemplate: f,
|
|
498
|
-
saveTemplate: p
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
//#endregion
|
|
502
|
-
//#region src/cloud/composables/useCloudSaveGate.ts
|
|
503
|
-
function Ke(e) {
|
|
504
|
-
let t = c(!1), n = null, r = f(() => e.planConfig.value?.accessibility?.blockOnError === !0), i = f(() => r.value ? e.issues.value.filter((e) => e.severity === "error") : []), a = f(() => i.value.length > 0);
|
|
505
|
-
async function o(e) {
|
|
506
|
-
return a.value ? (n = e, t.value = !0, !1) : (await e(), !0);
|
|
507
|
-
}
|
|
508
|
-
async function s() {
|
|
509
|
-
let e = n;
|
|
510
|
-
n = null, t.value = !1, e && await e();
|
|
511
|
-
}
|
|
512
|
-
function l() {
|
|
513
|
-
n = null, t.value = !1;
|
|
514
|
-
}
|
|
515
|
-
return {
|
|
516
|
-
shouldBlock: a,
|
|
517
|
-
blockingIssues: i,
|
|
518
|
-
modalOpen: t,
|
|
519
|
-
tryRunSave: o,
|
|
520
|
-
confirmAndSave: s,
|
|
521
|
-
cancel: l
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
//#endregion
|
|
525
|
-
//#region src/cloud/components/CloudSaveGateModal.vue?vue&type=script&setup=true&lang.ts
|
|
526
|
-
var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]" }, Ye = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xe = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ze = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Qe = { class: "tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2" }, $e = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, et = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, tt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, nt = /* @__PURE__ */ E({
|
|
527
|
-
__name: "CloudSaveGateModal",
|
|
528
|
-
props: {
|
|
529
|
-
open: { type: Boolean },
|
|
530
|
-
issues: {}
|
|
531
|
-
},
|
|
532
|
-
emits: ["cancel", "confirm"],
|
|
533
|
-
setup(e, { emit: t }) {
|
|
534
|
-
let n = t, { t: r } = X();
|
|
535
|
-
return (t, a) => (i(), y(b, {
|
|
536
|
-
"enter-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
537
|
-
"leave-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
538
|
-
"enter-from-class": "tpl:opacity-0",
|
|
539
|
-
"leave-to-class": "tpl:opacity-0"
|
|
540
|
-
}, {
|
|
541
|
-
default: s(() => [e.open ? (i(), p("div", {
|
|
542
|
-
key: 0,
|
|
543
|
-
role: "dialog",
|
|
544
|
-
"aria-modal": "true",
|
|
545
|
-
"aria-label": h(r).saveGate.title,
|
|
546
|
-
class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
|
|
547
|
-
onClick: a[2] ||= _((e) => n("cancel"), ["self"])
|
|
548
|
-
}, [x("div", Je, [
|
|
549
|
-
x("header", Ye, [D(h(ie), {
|
|
550
|
-
size: 18,
|
|
551
|
-
"stroke-width": 2,
|
|
552
|
-
class: "tpl:text-[var(--tpl-warning)]"
|
|
553
|
-
}), x("h2", Xe, v(h(r).saveGate.title), 1)]),
|
|
554
|
-
x("p", Ze, v(h(r).saveGate.body), 1),
|
|
555
|
-
x("ul", Qe, [(i(!0), p(w, null, o(e.issues, (e) => (i(), p("li", {
|
|
556
|
-
key: `${e.ruleId}-${e.blockId ?? "template"}`,
|
|
557
|
-
class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
|
|
558
|
-
}, [x("span", $e, v(e.message), 1), x("span", et, v(e.ruleId), 1)]))), 128))]),
|
|
559
|
-
x("footer", tt, [x("button", {
|
|
560
|
-
type: "button",
|
|
561
|
-
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]",
|
|
562
|
-
onClick: a[0] ||= (e) => n("cancel")
|
|
563
|
-
}, v(h(r).saveGate.cancel), 1), x("button", {
|
|
564
|
-
type: "button",
|
|
565
|
-
class: "tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white",
|
|
566
|
-
onClick: a[1] ||= (e) => n("confirm")
|
|
567
|
-
}, v(h(r).saveGate.confirm), 1)])
|
|
568
|
-
])], 8, qe)) : m("", !0)]),
|
|
569
|
-
_: 1
|
|
570
|
-
}));
|
|
571
|
-
}
|
|
572
|
-
}), rt = {
|
|
573
|
-
class: "tpl-header tpl:absolute tpl:top-0 tpl:right-0 tpl:left-0 tpl:z-50 tpl:grid tpl:h-14 tpl:grid-cols-[1fr_auto_1fr] tpl:items-center tpl:px-4",
|
|
574
|
-
style: {
|
|
575
|
-
"background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
|
|
576
|
-
"backdrop-filter": "blur(12px)",
|
|
577
|
-
"-webkit-backdrop-filter": "blur(12px)",
|
|
578
|
-
"box-shadow": "var(--tpl-shadow-md)",
|
|
579
|
-
"border-bottom": "1px solid var(--tpl-border)"
|
|
580
|
-
}
|
|
581
|
-
}, it = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, at = {
|
|
582
|
-
key: 0,
|
|
583
|
-
class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
|
|
584
|
-
}, ot = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, st = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, ct = ["data-tooltip"], lt = {
|
|
585
|
-
key: 1,
|
|
586
|
-
"aria-live": "polite",
|
|
587
|
-
class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success)]"
|
|
588
|
-
}, ut = {
|
|
589
|
-
key: 2,
|
|
590
|
-
"aria-live": "polite",
|
|
591
|
-
class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
592
|
-
}, dt = ["aria-label", "aria-expanded"], ft = {
|
|
593
|
-
key: 0,
|
|
594
|
-
class: "tpl:inline-flex tpl:size-4.5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
|
|
595
|
-
}, pt = ["aria-expanded"], mt = {
|
|
596
|
-
key: 0,
|
|
597
|
-
class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
|
|
598
|
-
}, ht = ["disabled"], gt = ["disabled"], _t = /* @__PURE__ */ E({
|
|
599
|
-
__name: "CloudHeader",
|
|
600
|
-
props: {
|
|
601
|
-
editor: {},
|
|
602
|
-
core: {},
|
|
603
|
-
featureFlags: {},
|
|
604
|
-
panelState: {},
|
|
605
|
-
snapshotPreview: {},
|
|
606
|
-
commentsInstance: {},
|
|
607
|
-
testEmail: {},
|
|
608
|
-
websocket: {},
|
|
609
|
-
collaboration: {},
|
|
610
|
-
isCollaborationEnabled: { type: Boolean },
|
|
611
|
-
isSaveDisabled: { type: Boolean },
|
|
612
|
-
isSaving: { type: Boolean }
|
|
613
|
-
},
|
|
614
|
-
emits: ["save"],
|
|
615
|
-
setup(e) {
|
|
616
|
-
let t = u(() => import("./CollaboratorBar-G_sZDZXw.js")), n = u(() => import("./SnapshotHistory-DFinMrg_.js")), r = u(() => import("./AiFeatureMenu-Cb9gaRBn.js")), { t: a } = V(), { t: o, format: c } = X();
|
|
617
|
-
return (l, u) => (i(), p("header", rt, [
|
|
618
|
-
x("div", it, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", at, v(h(c)(h(o).header.templatesUsed, {
|
|
619
|
-
used: e.featureFlags.templateCount.value,
|
|
620
|
-
max: e.featureFlags.templateLimit.value
|
|
621
|
-
})), 1))]),
|
|
622
|
-
x("div", ot, [
|
|
623
|
-
D(ve, {
|
|
624
|
-
viewport: e.editor.state.viewport,
|
|
625
|
-
onChange: e.editor.setViewport
|
|
626
|
-
}, null, 8, ["viewport", "onChange"]),
|
|
627
|
-
D(ce, {
|
|
628
|
-
"dark-mode": e.editor.state.darkMode,
|
|
629
|
-
onChange: e.editor.setDarkMode
|
|
630
|
-
}, null, 8, ["dark-mode", "onChange"]),
|
|
631
|
-
D(Z, {
|
|
632
|
-
"preview-mode": e.editor.state.previewMode,
|
|
633
|
-
onChange: e.editor.setPreviewMode
|
|
634
|
-
}, null, 8, ["preview-mode", "onChange"]),
|
|
635
|
-
e.editor.state.previewMode && !e.core.previewResolution.supersedesSamples.value ? (i(), y(ye, {
|
|
636
|
-
key: 0,
|
|
637
|
-
"sample-mode": e.core.mergeTagSampleMode.value,
|
|
638
|
-
onChange: u[0] ||= (t) => e.core.mergeTagSampleMode.value = t
|
|
639
|
-
}, null, 8, ["sample-mode"])) : m("", !0),
|
|
640
|
-
e.collaboration && e.isCollaborationEnabled ? (i(), y(h(t), {
|
|
641
|
-
key: 1,
|
|
642
|
-
collaborators: e.collaboration.collaborators.value,
|
|
643
|
-
"is-connected": e.websocket.isConnected.value
|
|
644
|
-
}, null, 8, ["collaborators", "is-connected"])) : m("", !0),
|
|
645
|
-
e.snapshotPreview.snapshotHistoryInstance.value ? (i(), y(h(n), {
|
|
646
|
-
key: 2,
|
|
647
|
-
snapshots: e.snapshotPreview.snapshotHistorySnapshots.value,
|
|
648
|
-
"is-loading": e.snapshotPreview.snapshotHistoryIsLoading.value,
|
|
649
|
-
"is-restoring": e.snapshotPreview.snapshotHistoryIsRestoring.value,
|
|
650
|
-
onLoad: e.snapshotPreview.loadSnapshotHistory,
|
|
651
|
-
onNavigate: e.snapshotPreview.handleSnapshotNavigate
|
|
652
|
-
}, null, 8, [
|
|
653
|
-
"snapshots",
|
|
654
|
-
"is-loading",
|
|
655
|
-
"is-restoring",
|
|
656
|
-
"onLoad",
|
|
657
|
-
"onNavigate"
|
|
658
|
-
])) : m("", !0)
|
|
659
|
-
]),
|
|
660
|
-
x("div", st, [
|
|
661
|
-
e.featureFlags.saveStatus.value === "error" ? (i(), p("div", {
|
|
662
|
-
key: 0,
|
|
663
|
-
"aria-live": "assertive",
|
|
664
|
-
class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
|
|
665
|
-
"data-tooltip": e.featureFlags.saveErrorMessage.value
|
|
666
|
-
}, [D(h(q), {
|
|
667
|
-
size: 12,
|
|
668
|
-
"stroke-width": 2.5
|
|
669
|
-
}), T(" " + v(h(o).header.saveFailed), 1)], 8, ct)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", lt, [D(h(G), {
|
|
670
|
-
size: 12,
|
|
671
|
-
"stroke-width": 2.5
|
|
672
|
-
}), T(" " + v(h(o).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", ut, [u[5] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + v(h(o).header.unsaved), 1)])) : m("", !0),
|
|
673
|
-
e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("button", {
|
|
674
|
-
key: 3,
|
|
675
|
-
"aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${h(o).comments.button} (${e.commentsInstance.unresolvedCount.value})` : h(o).comments.button,
|
|
676
|
-
"aria-expanded": e.panelState.commentsOpen.value,
|
|
677
|
-
class: C(h($)),
|
|
678
|
-
style: d({
|
|
679
|
-
backgroundColor: e.panelState.commentsOpen.value ? "var(--tpl-primary)" : "transparent",
|
|
680
|
-
color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
|
|
681
|
-
borderColor: "var(--tpl-primary)"
|
|
682
|
-
}),
|
|
683
|
-
onClick: u[1] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
|
|
684
|
-
}, [
|
|
685
|
-
D(h(re), {
|
|
686
|
-
size: 16,
|
|
687
|
-
"stroke-width": 2
|
|
688
|
-
}),
|
|
689
|
-
T(" " + v(h(o).comments.button) + " ", 1),
|
|
690
|
-
e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", ft, v(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
|
|
691
|
-
], 14, dt)) : m("", !0),
|
|
692
|
-
e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("div", {
|
|
693
|
-
key: 4,
|
|
694
|
-
ref: (t) => e.panelState.aiMenuRef.value = t,
|
|
695
|
-
class: "tpl:relative"
|
|
696
|
-
}, [x("button", {
|
|
697
|
-
"aria-expanded": e.panelState.aiMenuOpen.value,
|
|
698
|
-
class: C(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", e.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
|
|
699
|
-
onClick: u[2] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
|
|
700
|
-
}, [D(h(H), {
|
|
701
|
-
size: 16,
|
|
702
|
-
"stroke-width": 2,
|
|
703
|
-
class: "tpl-ai-btn-icon"
|
|
704
|
-
}), T(" " + v(h(o).aiChat.button), 1)], 10, pt), D(b, {
|
|
705
|
-
"enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
|
|
706
|
-
"enter-from-class": "tpl:scale-95 tpl:opacity-0",
|
|
707
|
-
"enter-to-class": "tpl:scale-100 tpl:opacity-100",
|
|
708
|
-
"leave-active-class": "tpl:transition-all tpl:duration-100 tpl:ease-in",
|
|
709
|
-
"leave-from-class": "tpl:scale-100 tpl:opacity-100",
|
|
710
|
-
"leave-to-class": "tpl:scale-95 tpl:opacity-0"
|
|
711
|
-
}, {
|
|
712
|
-
default: s(() => [e.panelState.aiMenuOpen.value ? (i(), p("div", mt, [D(h(r), {
|
|
713
|
-
"active-feature": e.panelState.activeAiFeature.value,
|
|
714
|
-
onSelect: e.panelState.handleAiFeatureSelect
|
|
715
|
-
}, null, 8, ["active-feature", "onSelect"])])) : m("", !0)]),
|
|
716
|
-
_: 1
|
|
717
|
-
})], 512)) : m("", !0),
|
|
718
|
-
e.testEmail.isAvailable.value ? (i(), p("button", {
|
|
719
|
-
key: 5,
|
|
720
|
-
class: C(h($)),
|
|
721
|
-
"data-testid": "test-email-trigger",
|
|
722
|
-
style: {
|
|
723
|
-
"background-color": "transparent",
|
|
724
|
-
color: "var(--tpl-primary)",
|
|
725
|
-
"border-color": "var(--tpl-primary)"
|
|
726
|
-
},
|
|
727
|
-
disabled: e.testEmail.isSending.value,
|
|
728
|
-
onClick: u[3] ||= (t) => e.testEmail.open()
|
|
729
|
-
}, [e.testEmail.isSending.value ? (i(), y(h(J), {
|
|
730
|
-
key: 1,
|
|
731
|
-
class: "tpl-spinner",
|
|
732
|
-
size: 16,
|
|
733
|
-
"stroke-width": 2
|
|
734
|
-
})) : (i(), y(h(K), {
|
|
735
|
-
key: 0,
|
|
736
|
-
size: 16,
|
|
737
|
-
"stroke-width": 2
|
|
738
|
-
})), T(" " + v(h(a).testEmail.button), 1)], 10, ht)) : m("", !0),
|
|
739
|
-
x("button", {
|
|
740
|
-
class: C(h($)),
|
|
741
|
-
style: {
|
|
742
|
-
"background-color": "transparent",
|
|
743
|
-
color: "var(--tpl-primary)",
|
|
744
|
-
"border-color": "var(--tpl-primary)"
|
|
745
|
-
},
|
|
746
|
-
disabled: e.isSaveDisabled,
|
|
747
|
-
onClick: u[4] ||= (e) => l.$emit("save")
|
|
748
|
-
}, [e.isSaving ? (i(), y(h(J), {
|
|
749
|
-
key: 1,
|
|
750
|
-
class: "tpl-spinner",
|
|
751
|
-
size: 16,
|
|
752
|
-
"stroke-width": 2
|
|
753
|
-
})) : (i(), y(h(U), {
|
|
754
|
-
key: 0,
|
|
755
|
-
size: 16,
|
|
756
|
-
"stroke-width": 2
|
|
757
|
-
})), T(" " + v(e.isSaving ? h(o).header.saving : h(o).header.save), 1)], 10, gt)
|
|
758
|
-
])
|
|
759
|
-
]));
|
|
760
|
-
}
|
|
761
|
-
}), vt = /* @__PURE__ */ E({
|
|
762
|
-
__name: "CloudPanels",
|
|
763
|
-
props: {
|
|
764
|
-
config: {},
|
|
765
|
-
editor: {},
|
|
766
|
-
core: {},
|
|
767
|
-
panelState: {},
|
|
768
|
-
planConfigInstance: {},
|
|
769
|
-
mediaLib: {}
|
|
770
|
-
},
|
|
771
|
-
setup(e, { expose: t }) {
|
|
772
|
-
let n = u(() => import("./AiChatSidebar-CQ8KUmNB.js")), r = u(() => import("./CommentsSidebar-BLRZRSSC.js")), a = u(() => import("./DesignReferenceSidebar-B-HFXV0W.js")), o = u(() => import("./TemplateScoringPanel-NucRtAP0.js")), s = u(async () => {
|
|
773
|
-
try {
|
|
774
|
-
return (await import("./src-xkGep9eN.js")).MediaLibraryModal;
|
|
775
|
-
} catch {
|
|
776
|
-
throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
function l(e, t, n) {
|
|
780
|
-
t.history.record(), n.setContent(e), t.conditionPreview.reset();
|
|
781
|
-
}
|
|
782
|
-
let d = c(null);
|
|
783
|
-
function f(e) {
|
|
784
|
-
d.value?.filterByBlock(e);
|
|
785
|
-
}
|
|
786
|
-
return t({ filterCommentsByBlock: f }), (t, c) => (i(), p(w, null, [
|
|
787
|
-
D(h(n), {
|
|
788
|
-
visible: e.panelState.aiChatOpen.value,
|
|
789
|
-
"on-apply": (t) => l(t, e.core, e.editor),
|
|
790
|
-
onClose: c[0] ||= (t) => e.panelState.aiChatOpen.value = !1
|
|
791
|
-
}, null, 8, ["visible", "on-apply"]),
|
|
792
|
-
D(h(o), {
|
|
793
|
-
visible: e.panelState.scoringPanelOpen.value,
|
|
794
|
-
onClose: c[1] ||= (t) => e.panelState.scoringPanelOpen.value = !1
|
|
795
|
-
}, null, 8, ["visible"]),
|
|
796
|
-
D(h(a), {
|
|
797
|
-
visible: e.panelState.designReferenceOpen.value,
|
|
798
|
-
"has-existing-blocks": e.editor.content.value.blocks.length > 0,
|
|
799
|
-
onClose: c[2] ||= (t) => e.panelState.designReferenceOpen.value = !1,
|
|
800
|
-
onApply: c[3] ||= (t) => l(t, e.core, e.editor)
|
|
801
|
-
}, null, 8, ["visible", "has-existing-blocks"]),
|
|
802
|
-
D(h(r), {
|
|
803
|
-
ref_key: "commentsSidebar",
|
|
804
|
-
ref: d,
|
|
805
|
-
visible: e.panelState.commentsOpen.value,
|
|
806
|
-
onClose: c[4] ||= (t) => e.panelState.commentsOpen.value = !1
|
|
807
|
-
}, null, 8, ["visible"]),
|
|
808
|
-
D(h(s), {
|
|
809
|
-
visible: e.panelState.mediaLibraryOpen.value,
|
|
810
|
-
accept: e.panelState.mediaLibraryAccept.value,
|
|
811
|
-
"popover-target": e.core.popoverRoot.value,
|
|
812
|
-
onSelect: e.mediaLib.handleMediaSelect,
|
|
813
|
-
onClose: e.mediaLib.handleMediaLibraryClose
|
|
814
|
-
}, null, 8, [
|
|
815
|
-
"visible",
|
|
816
|
-
"accept",
|
|
817
|
-
"popover-target",
|
|
818
|
-
"onSelect",
|
|
819
|
-
"onClose"
|
|
820
|
-
])
|
|
821
|
-
], 64));
|
|
822
|
-
}
|
|
823
|
-
}), yt = {
|
|
824
|
-
key: 0,
|
|
825
|
-
class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
|
|
826
|
-
}, bt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, xt = { class: "tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]" }, St = /* @__PURE__ */ E({
|
|
827
|
-
__name: "CloudLoadingOverlay",
|
|
828
|
-
props: { visible: { type: Boolean } },
|
|
829
|
-
setup(e) {
|
|
830
|
-
return (t, n) => e.visible ? (i(), p("div", yt, [n[1] ||= l("<div class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl:flex tpl:gap-3\"><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div></div>", 1), x("div", bt, [x("div", xt, [(i(), p(w, null, o(5, (e) => x("div", {
|
|
831
|
-
key: e,
|
|
832
|
-
class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
|
|
833
|
-
})), 64))]), n[0] ||= l("<div class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"><div class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div></div><div class=\"tpl:py-4\"><div class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div></div><div class=\"tpl:flex tpl:justify-center tpl:py-4\"><div class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"></div></div></div></div><div class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div></div>", 2)])])) : m("", !0);
|
|
834
|
-
}
|
|
835
|
-
}), Ct = {
|
|
836
|
-
key: 0,
|
|
837
|
-
role: "alert",
|
|
838
|
-
class: "tpl-error tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]"
|
|
839
|
-
}, wt = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Tt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, Et = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Dt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ot = /* @__PURE__ */ E({
|
|
840
|
-
__name: "CloudErrorOverlay",
|
|
841
|
-
props: {
|
|
842
|
-
error: {},
|
|
843
|
-
visible: { type: Boolean }
|
|
844
|
-
},
|
|
845
|
-
emits: ["retry"],
|
|
846
|
-
setup(e, { emit: t }) {
|
|
847
|
-
let n = t, { t: r } = X();
|
|
848
|
-
function a(e) {
|
|
849
|
-
return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
|
|
850
|
-
}
|
|
851
|
-
function o(e) {
|
|
852
|
-
return "isNotFound" in e && !!e.isNotFound;
|
|
853
|
-
}
|
|
854
|
-
return (t, s) => e.visible && e.error ? (i(), p("div", Ct, [
|
|
855
|
-
x("div", wt, [D(h(q), {
|
|
856
|
-
size: 32,
|
|
857
|
-
"stroke-width": 1.5,
|
|
858
|
-
class: "tpl:text-[var(--tpl-danger)]"
|
|
859
|
-
})]),
|
|
860
|
-
x("div", Tt, [x("h2", Et, v(h(r).error.title), 1), x("p", Dt, v(a(e.error)), 1)]),
|
|
861
|
-
o(e.error) ? m("", !0) : (i(), p("button", {
|
|
862
|
-
key: 0,
|
|
863
|
-
class: "tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
864
|
-
onClick: s[0] ||= (e) => n("retry")
|
|
865
|
-
}, v(h(r).error.retry), 1))
|
|
866
|
-
])) : m("", !0);
|
|
867
|
-
}
|
|
868
|
-
}), kt = {
|
|
869
|
-
key: 0,
|
|
870
|
-
class: "tpl-preview-banner tpl:absolute tpl:top-14 tpl:right-0 tpl:left-0 tpl:z-40 tpl:flex tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]"
|
|
871
|
-
}, At = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, jt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Mt = /* @__PURE__ */ E({
|
|
872
|
-
__name: "SnapshotPreviewBanner",
|
|
873
|
-
props: { visible: { type: Boolean } },
|
|
874
|
-
emits: ["cancel", "confirm"],
|
|
875
|
-
setup(e, { emit: t }) {
|
|
876
|
-
let n = t, { t: r } = X();
|
|
877
|
-
return (t, a) => e.visible ? (i(), p("div", kt, [x("div", At, [D(h(Y), {
|
|
878
|
-
size: 18,
|
|
879
|
-
"stroke-width": 2,
|
|
880
|
-
class: "tpl:text-[var(--tpl-primary)]"
|
|
881
|
-
}), x("span", null, v(h(r).snapshotPreview.message), 1)]), x("div", jt, [x("button", {
|
|
882
|
-
class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
883
|
-
style: { "background-color": "transparent" },
|
|
884
|
-
onClick: a[0] ||= (e) => n("cancel")
|
|
885
|
-
}, v(h(r).snapshotPreview.cancel), 1), x("button", {
|
|
886
|
-
class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
887
|
-
onClick: a[1] ||= (e) => n("confirm")
|
|
888
|
-
}, v(h(r).snapshotPreview.restore), 1)])])) : m("", !0);
|
|
889
|
-
}
|
|
890
|
-
}), Nt = {
|
|
891
|
-
key: 0,
|
|
892
|
-
role: "status",
|
|
893
|
-
"aria-live": "polite",
|
|
894
|
-
class: "tpl:absolute tpl:top-16 tpl:left-1/2 tpl:z-toast tpl:-translate-x-1/2 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-lg",
|
|
895
|
-
style: {
|
|
896
|
-
"background-color": "var(--tpl-warning-light)",
|
|
897
|
-
color: "var(--tpl-text)",
|
|
898
|
-
border: "1px solid var(--tpl-warning)"
|
|
899
|
-
}
|
|
900
|
-
}, Pt = /* @__PURE__ */ E({
|
|
901
|
-
__name: "CollabUndoToast",
|
|
902
|
-
props: { visible: { type: Boolean } },
|
|
903
|
-
setup(e) {
|
|
904
|
-
let { t } = V();
|
|
905
|
-
return (n, r) => e.visible ? (i(), p("div", Nt, v(h(t).history.collabWarning), 1)) : m("", !0);
|
|
906
|
-
}
|
|
907
|
-
}), Ft = ["data-tpl-theme"], It = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Lt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Rt = ["aria-label"], zt = /*#__PURE__*/ ae(/* @__PURE__ */ E({
|
|
908
|
-
__name: "CloudEditor",
|
|
909
|
-
props: {
|
|
910
|
-
config: {},
|
|
911
|
-
translations: {},
|
|
912
|
-
cloudTranslations: {},
|
|
913
|
-
fontsManager: {},
|
|
914
|
-
shadowRoot: {}
|
|
915
|
-
},
|
|
916
|
-
emits: ["ready"],
|
|
917
|
-
setup(e, { expose: r, emit: o }) {
|
|
918
|
-
let l = u(() => import("./SavedBlocksPanels-CUtYoi5Z.js")), f = u(() => import("./TestEmailPanel-B8y7JabA.js")), w = e;
|
|
919
|
-
a(z, w.cloudTranslations);
|
|
920
|
-
let E = o, O = c(null), k = c(null), A = Ue({
|
|
921
|
-
config: w.config,
|
|
922
|
-
translations: w.translations,
|
|
923
|
-
fontsManager: w.fontsManager,
|
|
924
|
-
emit: E,
|
|
925
|
-
getCommentsSidebar: () => O.value ? { filterByBlock: O.value.filterCommentsByBlock } : null,
|
|
926
|
-
editorRoot: w.shadowRoot,
|
|
927
|
-
containerEl: k
|
|
928
|
-
}), { isInitializing: j, isAuthReady: ee, initError: N, planConfigInstance: P, websocket: F, collaboration: I, isCollaborationEnabled: te, editor: L, core: R, featureFlags: B, mediaLib: ne, exporter: V, testEmail: H, commentsInstance: U, savedBlocks: G, panelState: K, snapshotPreview: q, collabWarning: J, setThemeOverrides: Y, setUiTheme: re } = A, { showNotice: ie } = M(() => w.config.smallScreenNotice);
|
|
929
|
-
async function ae() {
|
|
930
|
-
try {
|
|
931
|
-
await q.confirmRestoreSnapshot();
|
|
932
|
-
} catch {}
|
|
933
|
-
}
|
|
934
|
-
let X = Ge({
|
|
935
|
-
config: w.config,
|
|
936
|
-
editor: L,
|
|
937
|
-
websocket: F,
|
|
938
|
-
planConfigInstance: P,
|
|
939
|
-
snapshotPreview: q,
|
|
940
|
-
core: R,
|
|
941
|
-
exporter: V,
|
|
942
|
-
featureFlags: B,
|
|
943
|
-
isDestroyed: A.isDestroyed
|
|
944
|
-
}), Z = Ke({
|
|
945
|
-
issues: R.templateLint ? R.templateLint.issues : c([]),
|
|
946
|
-
planConfig: P.config
|
|
947
|
-
});
|
|
948
|
-
async function Q() {
|
|
949
|
-
await Z.tryRunSave(() => X.saveTemplate().catch((e) => w.config.onError?.(e)));
|
|
950
|
-
}
|
|
951
|
-
return A.onSaveHook.value = Q, t(() => {
|
|
952
|
-
A.initialize();
|
|
953
|
-
}), g(() => {
|
|
954
|
-
A.destroy();
|
|
955
|
-
}), r({
|
|
956
|
-
getContent: () => L.content.value,
|
|
957
|
-
setContent: (e) => L.setContent(e),
|
|
958
|
-
setTheme: re,
|
|
959
|
-
setThemeOverrides: Y,
|
|
960
|
-
create: X.createTemplate,
|
|
961
|
-
load: X.loadTemplate,
|
|
962
|
-
save: X.saveTemplate,
|
|
963
|
-
sendTestEmail: (e) => H.send(e)
|
|
964
|
-
}), (t, r) => (i(), p("div", {
|
|
965
|
-
ref_key: "rootEl",
|
|
966
|
-
ref: k,
|
|
967
|
-
class: C(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(L).state.darkMode }]),
|
|
968
|
-
"data-tpl-theme": h(R).resolvedTheme.value,
|
|
969
|
-
style: d(h(R).themeStyles.value),
|
|
970
|
-
onDragover: r[6] ||= _(() => {}, ["prevent"]),
|
|
971
|
-
onDrop: r[7] ||= _(() => {}, ["prevent"])
|
|
972
|
-
}, [
|
|
973
|
-
D(le),
|
|
974
|
-
D(b, {
|
|
975
|
-
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
976
|
-
"enter-from-class": "tpl:opacity-100",
|
|
977
|
-
"enter-to-class": "tpl:opacity-100",
|
|
978
|
-
"leave-active-class": "tpl:transition-opacity tpl:duration-300",
|
|
979
|
-
"leave-from-class": "tpl:opacity-100",
|
|
980
|
-
"leave-to-class": "tpl:opacity-0"
|
|
981
|
-
}, {
|
|
982
|
-
default: s(() => [D(St, { visible: h(j) || h(L).state.isLoading }, null, 8, ["visible"])]),
|
|
983
|
-
_: 1
|
|
984
|
-
}),
|
|
985
|
-
D(b, {
|
|
986
|
-
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
987
|
-
"enter-from-class": "tpl:opacity-0",
|
|
988
|
-
"enter-to-class": "tpl:opacity-100",
|
|
989
|
-
"leave-active-class": "tpl:transition-opacity tpl:duration-300",
|
|
990
|
-
"leave-from-class": "tpl:opacity-100",
|
|
991
|
-
"leave-to-class": "tpl:opacity-0"
|
|
992
|
-
}, {
|
|
993
|
-
default: s(() => [D(Ot, {
|
|
994
|
-
error: h(N),
|
|
995
|
-
visible: !!h(N) && !h(j),
|
|
996
|
-
onRetry: h(A).initialize
|
|
997
|
-
}, null, 8, [
|
|
998
|
-
"error",
|
|
999
|
-
"visible",
|
|
1000
|
-
"onRetry"
|
|
1001
|
-
])]),
|
|
1002
|
-
_: 1
|
|
1003
|
-
}),
|
|
1004
|
-
D(_t, {
|
|
1005
|
-
editor: h(L),
|
|
1006
|
-
core: h(R),
|
|
1007
|
-
"feature-flags": h(B),
|
|
1008
|
-
"panel-state": h(K),
|
|
1009
|
-
"snapshot-preview": h(q),
|
|
1010
|
-
"comments-instance": h(U),
|
|
1011
|
-
"test-email": h(H),
|
|
1012
|
-
websocket: h(F),
|
|
1013
|
-
collaboration: h(I),
|
|
1014
|
-
"is-collaboration-enabled": h(te),
|
|
1015
|
-
"is-saving": h(L).state.isSaving || h(B).isSaveExporting.value,
|
|
1016
|
-
"is-save-disabled": h(L).state.isSaving || h(B).isSaveExporting.value || !h(L).state.isDirty,
|
|
1017
|
-
onSave: Q
|
|
1018
|
-
}, null, 8, [
|
|
1019
|
-
"editor",
|
|
1020
|
-
"core",
|
|
1021
|
-
"feature-flags",
|
|
1022
|
-
"panel-state",
|
|
1023
|
-
"snapshot-preview",
|
|
1024
|
-
"comments-instance",
|
|
1025
|
-
"test-email",
|
|
1026
|
-
"websocket",
|
|
1027
|
-
"collaboration",
|
|
1028
|
-
"is-collaboration-enabled",
|
|
1029
|
-
"is-saving",
|
|
1030
|
-
"is-save-disabled"
|
|
1031
|
-
]),
|
|
1032
|
-
D(nt, {
|
|
1033
|
-
open: h(Z).modalOpen.value,
|
|
1034
|
-
issues: h(Z).blockingIssues.value,
|
|
1035
|
-
onCancel: h(Z).cancel,
|
|
1036
|
-
onConfirm: h(Z).confirmAndSave
|
|
1037
|
-
}, null, 8, [
|
|
1038
|
-
"open",
|
|
1039
|
-
"issues",
|
|
1040
|
-
"onCancel",
|
|
1041
|
-
"onConfirm"
|
|
1042
|
-
]),
|
|
1043
|
-
D(Mt, {
|
|
1044
|
-
visible: h(q).isPreviewingSnapshot.value,
|
|
1045
|
-
onCancel: h(q).cancelPreview,
|
|
1046
|
-
onConfirm: ae
|
|
1047
|
-
}, null, 8, ["visible", "onCancel"]),
|
|
1048
|
-
D(b, {
|
|
1049
|
-
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
1050
|
-
"enter-from-class": "tpl:translate-y-[-8px] tpl:opacity-0",
|
|
1051
|
-
"enter-to-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
1052
|
-
"leave-active-class": "tpl:transition-all tpl:duration-300 tpl:ease-in",
|
|
1053
|
-
"leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
1054
|
-
"leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
|
|
1055
|
-
}, {
|
|
1056
|
-
default: s(() => [D(Pt, { visible: h(J).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
|
|
1057
|
-
_: 1
|
|
1058
|
-
}),
|
|
1059
|
-
n(D(oe, null, null, 512), [[S, !h(L).state.previewMode]]),
|
|
1060
|
-
x("div", {
|
|
1061
|
-
class: C(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(L).state.previewMode ? "tpl:left-0 tpl:right-0" : h(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(q).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
|
|
1062
|
-
style: {
|
|
1063
|
-
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1064
|
-
"background-color": "var(--tpl-canvas-bg)"
|
|
1065
|
-
}
|
|
1066
|
-
}, [x("div", It, [D(b, { name: "tpl-restore-btn" }, {
|
|
1067
|
-
default: s(() => [h(R).conditionPreview.hasHiddenBlocks.value && h(R).appliesConditionFilter.value ? (i(), p("button", {
|
|
1068
|
-
key: 0,
|
|
1069
|
-
class: "tpl:absolute tpl:left-1/2 tpl:top-2 tpl:-translate-x-1/2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-full tpl:border tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:whitespace-nowrap tpl:shadow-md tpl:hover:opacity-80",
|
|
1070
|
-
style: {
|
|
1071
|
-
"background-color": "var(--tpl-warning-light)",
|
|
1072
|
-
color: "var(--tpl-warning)",
|
|
1073
|
-
"border-color": "var(--tpl-warning)",
|
|
1074
|
-
"backdrop-filter": "blur(8px)"
|
|
1075
|
-
},
|
|
1076
|
-
"data-testid": "restore-hidden-blocks",
|
|
1077
|
-
onClick: r[0] ||= (e) => h(R).conditionPreview.reset()
|
|
1078
|
-
}, [D(h(W), {
|
|
1079
|
-
size: 13,
|
|
1080
|
-
"stroke-width": 2
|
|
1081
|
-
}), T(" " + v(h(R).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
|
|
1082
|
-
_: 1
|
|
1083
|
-
})]), x("main", Lt, [D(_e, {
|
|
1084
|
-
viewport: h(L).state.viewport,
|
|
1085
|
-
content: h(R).previewResolution.content.value,
|
|
1086
|
-
"selected-block-id": h(L).state.selectedBlockId,
|
|
1087
|
-
"dark-mode": h(L).state.darkMode,
|
|
1088
|
-
"preview-mode": h(L).state.previewMode,
|
|
1089
|
-
"locked-blocks": h(I)?.lockedBlocks.value ?? void 0,
|
|
1090
|
-
onSelectBlock: h(L).selectBlock,
|
|
1091
|
-
onOpenAiChat: r[1] ||= (e) => h(K).aiChatOpen.value = !0,
|
|
1092
|
-
onOpenDesignReference: r[2] ||= (e) => h(K).designReferenceOpen.value = !0
|
|
1093
|
-
}, null, 8, [
|
|
1094
|
-
"viewport",
|
|
1095
|
-
"content",
|
|
1096
|
-
"selected-block-id",
|
|
1097
|
-
"dark-mode",
|
|
1098
|
-
"preview-mode",
|
|
1099
|
-
"locked-blocks",
|
|
1100
|
-
"onSelectBlock"
|
|
1101
|
-
])])], 2),
|
|
1102
|
-
e.config.branding !== !1 && !h(B).isWhiteLabeled.value ? (i(), y(me, {
|
|
1103
|
-
key: 0,
|
|
1104
|
-
"position-class": [h(L).state.previewMode ? "tpl:left-0 tpl:right-0" : h(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
|
|
1105
|
-
}, null, 8, ["position-class"])) : m("", !0),
|
|
1106
|
-
x("div", {
|
|
1107
|
-
class: "tpl-sr-only",
|
|
1108
|
-
role: "status",
|
|
1109
|
-
"aria-live": "polite",
|
|
1110
|
-
"aria-atomic": "true",
|
|
1111
|
-
"aria-label": h(R).t.landmarks.reorderAnnouncements
|
|
1112
|
-
}, v(h(R).keyboardReorder.announcement.value), 9, Rt),
|
|
1113
|
-
n(D(he, {
|
|
1114
|
-
"selected-block": h(L).selectedBlock.value,
|
|
1115
|
-
settings: h(L).content.value.settings,
|
|
1116
|
-
"shifted-left": h(K).rightPanelOpen.value,
|
|
1117
|
-
onUpdateBlock: r[3] ||= (e) => h(L).updateBlock(h(L).selectedBlock.value.id, e),
|
|
1118
|
-
onDeleteBlock: r[4] ||= (e) => h(R).blockActions.deleteBlock(h(L).selectedBlock.value.id),
|
|
1119
|
-
onDuplicateBlock: r[5] ||= (e) => h(R).blockActions.duplicateBlock(h(L).selectedBlock.value),
|
|
1120
|
-
onUpdateSettings: h(L).updateSettings
|
|
1121
|
-
}, null, 8, [
|
|
1122
|
-
"selected-block",
|
|
1123
|
-
"settings",
|
|
1124
|
-
"shifted-left",
|
|
1125
|
-
"onUpdateSettings"
|
|
1126
|
-
]), [[S, !h(L).state.previewMode]]),
|
|
1127
|
-
!h(j) && h(ee) ? (i(), y(vt, {
|
|
1128
|
-
key: 1,
|
|
1129
|
-
ref_key: "cloudPanelsRef",
|
|
1130
|
-
ref: O,
|
|
1131
|
-
config: w.config,
|
|
1132
|
-
editor: h(L),
|
|
1133
|
-
core: h(R),
|
|
1134
|
-
"panel-state": h(K),
|
|
1135
|
-
"plan-config-instance": h(P),
|
|
1136
|
-
"media-lib": h(ne)
|
|
1137
|
-
}, null, 8, [
|
|
1138
|
-
"config",
|
|
1139
|
-
"editor",
|
|
1140
|
-
"core",
|
|
1141
|
-
"panel-state",
|
|
1142
|
-
"plan-config-instance",
|
|
1143
|
-
"media-lib"
|
|
1144
|
-
])) : m("", !0),
|
|
1145
|
-
h(G).isAvailable.value ? (i(), y(h(l), {
|
|
1146
|
-
key: 2,
|
|
1147
|
-
feature: h(G)
|
|
1148
|
-
}, null, 8, ["feature"])) : m("", !0),
|
|
1149
|
-
h(H).isAvailable.value ? (i(), y(h(f), {
|
|
1150
|
-
key: 3,
|
|
1151
|
-
feature: h(H)
|
|
1152
|
-
}, null, 8, ["feature"])) : m("", !0),
|
|
1153
|
-
x("div", {
|
|
1154
|
-
ref: (e) => h(R).popoverRoot.value = e,
|
|
1155
|
-
class: "tpl-popover-root"
|
|
1156
|
-
}, null, 512),
|
|
1157
|
-
D(de),
|
|
1158
|
-
D(ge),
|
|
1159
|
-
h(ie) ? (i(), y(fe, { key: 4 })) : m("", !0)
|
|
1160
|
-
], 46, Ft));
|
|
1161
|
-
}
|
|
1162
|
-
}), [["__scopeId", "data-v-16786f1a"]]);
|
|
1163
|
-
//#endregion
|
|
1164
|
-
export { zt as default };
|
|
1165
|
-
|
|
1166
|
-
//# sourceMappingURL=CloudEditor-DbyEsIxu.js.map
|