@templatical/editor 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-DPHbCGu4.js → AiChatSidebar-tu4eLcf_.js} +57 -57
- package/dist/{AiFeatureMenu--8z7qvg1.js → AiFeatureMenu-BF0i0vA4.js} +17 -17
- package/dist/{BlockIssueBadge-BGCsJqqM.js → BlockIssueBadge-DT-FqKeC.js} +9 -9
- package/dist/{BlockPreviewCanvas-DKspIy8V.js → BlockPreviewCanvas-DDCmMram.js} +28 -28
- package/dist/CloudHeaderExtras-NPhudovT.js +59 -0
- package/dist/{CloudPanels-Bp5gFtaL.js → CloudPanels-Iwnky0iA.js} +78 -108
- package/dist/{CollaboratorBar-DvwZm5u7.js → CollaboratorBar-DAITu0hz.js} +17 -17
- package/dist/{ColorPicker-DtozuN75.js → ColorPicker-BqlZ_TqG.js} +193 -193
- package/dist/{CommentsPanel-3C-DsEjy.js → CommentsPanel-CDvgmWP1.js} +3 -3
- package/dist/{CommentsSidebar-go1FnjDW.js → CommentsSidebar-X_xqM3dR.js} +158 -158
- package/dist/{CountdownBlock-D1fsNsyS.js → CountdownBlock-ZFJIdbP6.js} +12 -12
- package/dist/{CountdownToolbar-SLBuij7Q.js → CountdownToolbar-DBFoG3a6.js} +67 -67
- package/dist/{DesignReferenceSidebar-rcE_BvUd.js → DesignReferenceSidebar--QtXjLrw.js} +57 -57
- package/dist/{FieldRow-BWt7ECqo.js → FieldRow-C8nOknr_.js} +39 -39
- package/dist/{IssuesPanel-Cig46N1i.js → IssuesPanel-BLbNFMSX.js} +38 -38
- package/dist/{LoadingTrack-SQXoZVf2.js → LoadingTrack-BlTL4zFv.js} +2 -2
- package/dist/MediaPanels-CMTAhDXB.js +43 -0
- package/dist/{MergeTagInput-D1hzsn2b.js → MergeTagInput-BEjzj4Iu.js} +115 -115
- package/dist/{MergeTagModeToggle-CH9wR5YF.js → MergeTagModeToggle-DKN6ihI5.js} +40 -40
- package/dist/{MergeTagSuggestion-CoCuzEmW.js → MergeTagSuggestion-DKoLEeoj.js} +21 -21
- package/dist/{ParagraphEditor-CT2AdMdZ.js → ParagraphEditor-1E9yzOfk.js} +231 -258
- package/dist/{RestoreVersionDialog-mdqgQxFR.js → RestoreVersionDialog-BMGUkcd8.js} +28 -28
- package/dist/{RichTextEditorContent-riOB-rKD.js → RichTextEditorContent-BnxbQUV9.js} +49 -59
- package/dist/{SaveBlockDialog-Cn2v4Lpj.js → SaveBlockDialog-WKASpCCT.js} +78 -78
- package/dist/SavedBlocksBrowserModal-AYEXTMtQ.js +323 -0
- package/dist/{SavedBlocksPanels-ffBnWuVU.js → SavedBlocksPanels-D_CpacTl.js} +6 -6
- package/dist/{SavedBlocksPickBar-BmQC2tWN.js → SavedBlocksPickBar-BHMwg-1G.js} +11 -11
- package/dist/{TemplateScoringPanel-CxAtdreR.js → TemplateScoringPanel-CSin43YM.js} +99 -98
- package/dist/{TestEmailModal-Cjn1padY.js → TestEmailModal-BxizsRCd.js} +59 -59
- package/dist/{TestEmailPanel-Bf3XZ1jn.js → TestEmailPanel-vd2e5HzT.js} +3 -3
- package/dist/TitleEditor-CLJ68Ty4.js +199 -0
- package/dist/TplModal-Q9fDgS1M.js +51 -0
- package/dist/{VersionHistoryMenu-CrNrGsaa.js → VersionHistoryMenu-eGYVhM4H.js} +41 -47
- package/dist/{VersionHistoryPanels-CsuQk6W3.js → VersionHistoryPanels-C7Ntrrfq.js} +4 -4
- package/dist/{VersionPreviewBanner-BqbO0Zss.js → VersionPreviewBanner-BbQXnR0M.js} +9 -9
- package/dist/{blockTypeIcons-D_4HdaY9.js → blockTypeIcons-5qD4bB76.js} +5 -17
- package/dist/bundle-stats.json +8 -8
- package/dist/ca-Jx2CDwtn.js +83 -0
- package/dist/cdn/chunks/{AiChatSidebar-D0f74_nS.js → AiChatSidebar-dyqqHAcI.js} +4 -4
- package/dist/cdn/chunks/{AiChatSidebar-D0f74_nS.js.map → AiChatSidebar-dyqqHAcI.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-DwGb3eF9.js → AiFeatureMenu-BjVMwhW8.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-DwGb3eF9.js.map → AiFeatureMenu-BjVMwhW8.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CosQgeJ-.js → BlockIssueBadge-BJ__oEtm.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-CosQgeJ-.js.map → BlockIssueBadge-BJ__oEtm.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CIpZ2a6g.js → BlockPreviewCanvas-B5f26eLE.js} +5 -5
- package/dist/cdn/chunks/{BlockPreviewCanvas-CIpZ2a6g.js.map → BlockPreviewCanvas-B5f26eLE.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-CQzQwKFB.js → CloudHeaderExtras-D5P5IEKA.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-CQzQwKFB.js.map → CloudHeaderExtras-D5P5IEKA.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BmexuLOU.js → CloudPanels-DkmR05nB.js} +15 -45
- package/dist/cdn/chunks/{CloudPanels-BmexuLOU.js.map → CloudPanels-DkmR05nB.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DEICobpp.js → CollaboratorBar-Yn7KSpt4.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DEICobpp.js.map → CollaboratorBar-Yn7KSpt4.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-C7yC58FK.js → ColorPicker-LcrzgMoW.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-C7yC58FK.js.map → ColorPicker-LcrzgMoW.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-OjmKxLL7.js → CommentsPanel-CntwwocI.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-OjmKxLL7.js.map → CommentsPanel-CntwwocI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-C4pWZGpy.js → CommentsSidebar-BLDKnKy7.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-C4pWZGpy.js.map → CommentsSidebar-BLDKnKy7.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js → CountdownBlock-B4AfqJwb.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js.map → CountdownBlock-B4AfqJwb.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-wlJOxyAl.js → CountdownToolbar-CA1dpuOI.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-wlJOxyAl.js.map → CountdownToolbar-CA1dpuOI.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-DELhnh8h.js → DesignReferenceSidebar-D1Y9Hswe.js} +5 -5
- package/dist/cdn/chunks/{DesignReferenceSidebar-DELhnh8h.js.map → DesignReferenceSidebar-D1Y9Hswe.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C9i3o8aE.js → IssuesPanel-Q62LTqvd.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-C9i3o8aE.js.map → IssuesPanel-Q62LTqvd.js.map} +1 -1
- package/dist/cdn/chunks/MediaPanels-D21M6shx.js +45 -0
- package/dist/cdn/chunks/MediaPanels-D21M6shx.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-D76Kyvgu.js → MergeTagInput-l7paaAml.js} +7 -7
- package/dist/cdn/chunks/{MergeTagInput-D76Kyvgu.js.map → MergeTagInput-l7paaAml.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Dz3gxN2y.js → MergeTagModeToggle-DYxkAGtA.js} +4 -4
- package/dist/cdn/chunks/{MergeTagModeToggle-Dz3gxN2y.js.map → MergeTagModeToggle-DYxkAGtA.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DQn0HMfV.js → ParagraphEditor-Bd-GQXee.js} +15 -15
- package/dist/cdn/chunks/{ParagraphEditor-DQn0HMfV.js.map → ParagraphEditor-Bd-GQXee.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BdjOL8Oy.js → RestoreVersionDialog-2X9RpM9A.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-BdjOL8Oy.js.map → RestoreVersionDialog-2X9RpM9A.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Drzwgh0J.js → RichTextEditorContent-D_rb0rmU.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-Drzwgh0J.js.map → RichTextEditorContent-D_rb0rmU.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B3rbmXSM.js → SaveBlockDialog-CufdTomT.js} +15 -15
- package/dist/cdn/chunks/{SaveBlockDialog-B3rbmXSM.js.map → SaveBlockDialog-CufdTomT.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CkUXlnd2.js → SavedBlocksBrowserModal-CqpaNsk7.js} +8 -8
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CkUXlnd2.js.map → SavedBlocksBrowserModal-CqpaNsk7.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BPi3PZKP.js → SavedBlocksPanels-DpxYxddo.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-BPi3PZKP.js.map → SavedBlocksPanels-DpxYxddo.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvB9A5W2.js → SavedBlocksPickBar-Drpoav1B.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvB9A5W2.js.map → SavedBlocksPickBar-Drpoav1B.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-BBCyLnOi.js → TemplateScoringPanel-DBjUNULq.js} +5 -5
- package/dist/cdn/chunks/{TemplateScoringPanel-BBCyLnOi.js.map → TemplateScoringPanel-DBjUNULq.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DAGTsBqi.js → TestEmailModal-BTNlSW6f.js} +10 -10
- package/dist/cdn/chunks/{TestEmailModal-DAGTsBqi.js.map → TestEmailModal-BTNlSW6f.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BfenVvfx.js → TestEmailPanel-D0A9Zgxr.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-BfenVvfx.js.map → TestEmailPanel-D0A9Zgxr.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-oQ4gr6wS.js → TitleEditor-CrnuIq62.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-oQ4gr6wS.js.map → TitleEditor-CrnuIq62.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DxOMcVwp.js → TplModal-DYXrTz42.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DxOMcVwp.js.map → TplModal-DYXrTz42.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BfVUvWHT.js → VersionHistoryMenu-bDGnE4hb.js} +4 -4
- package/dist/cdn/chunks/VersionHistoryMenu-bDGnE4hb.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-NpDb641L.js → VersionHistoryPanels-82P0Q0HM.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-NpDb641L.js.map → VersionHistoryPanels-82P0Q0HM.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-Cpgt4xHc.js → VersionPreviewBanner-BJiwKkVC.js} +3 -3
- package/dist/cdn/chunks/{VersionPreviewBanner-Cpgt4xHc.js.map → VersionPreviewBanner-BJiwKkVC.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-t9vvaiuH.js → blockTypeIcons-CNjJSFun.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-t9vvaiuH.js.map → blockTypeIcons-CNjJSFun.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CNRWAMHI.js → ca-Jx2CDwtn.js} +2 -6
- package/dist/cdn/chunks/ca-Jx2CDwtn.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CullB76F.js → cloud-BLgCKP7Z.js} +452 -227
- package/dist/cdn/chunks/cloud-BLgCKP7Z.js.map +1 -0
- package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js +385 -0
- package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js.map +1 -0
- package/dist/cdn/chunks/{de-DFYCT4QU.js → de-Ck0pBGHu.js} +2 -6
- package/dist/cdn/chunks/de-Ck0pBGHu.js.map +1 -0
- package/dist/cdn/chunks/{src-CaXeO-gG.js → editor-modal-MXgtarMl.js} +1474 -1935
- package/dist/cdn/chunks/editor-modal-MXgtarMl.js.map +1 -0
- package/dist/cdn/chunks/en-C9U7N77n.js +2 -0
- package/dist/cdn/chunks/{es-OgkdMZGX.js → es-lagTvUfX.js} +2 -6
- package/dist/cdn/chunks/es-lagTvUfX.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BpXY7jO5.js → extensions-B8_jnIkD.js} +3 -3
- package/dist/cdn/chunks/{extensions-BpXY7jO5.js.map → extensions-B8_jnIkD.js.map} +1 -1
- package/dist/cdn/chunks/{fr-Dswns199.js → fr-C4hVl5Lk.js} +2 -6
- package/dist/cdn/chunks/fr-C4hVl5Lk.js.map +1 -0
- package/dist/cdn/chunks/{icons-BLxcQUck.js → icons-BUlqGSgd.js} +24 -24
- package/dist/cdn/chunks/{icons-BLxcQUck.js.map → icons-BUlqGSgd.js.map} +1 -1
- package/dist/cdn/chunks/{keys-DQp8x7Nx.js → keys-DBFhDFng.js} +4 -4
- package/dist/cdn/chunks/{keys-DQp8x7Nx.js.map → keys-DBFhDFng.js.map} +1 -1
- package/dist/cdn/chunks/{nl-CbcPJlrL.js → nl-CReD7Apd.js} +2 -6
- package/dist/cdn/chunks/nl-CReD7Apd.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-BibOQm-o.js → pt-BR-BRA0-vGP.js} +2 -6
- package/dist/cdn/chunks/pt-BR-BRA0-vGP.js.map +1 -0
- package/dist/cdn/chunks/{src-BC-eolWY.js → src-DZ0C9mH7.js} +2 -2
- package/dist/cdn/chunks/{src-BC-eolWY.js.map → src-DZ0C9mH7.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js → useCloudI18n-DSWSGj-A.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js.map → useCloudI18n-DSWSGj-A.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-D4MytYB9.js → useEditorCore-Cs7rYVBo.js} +488 -406
- package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +1 -0
- package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js → useEditorRoot-B0zW2nT4.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js.map → useEditorRoot-B0zW2nT4.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js → useI18n-Dlo7R9RA.js} +2 -2
- package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js.map → useI18n-Dlo7R9RA.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-CSocWpxV.js → useMergeTag-BYAifvh8.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-CSocWpxV.js.map → useMergeTag-BYAifvh8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js → usePopoverPosition-ElP3ABaV.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js.map → usePopoverPosition-ElP3ABaV.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js → useScrollToBlock-nTbWkgaU.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js.map → useScrollToBlock-nTbWkgaU.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1091 -1004
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CY-Ec6FV.js → check-DWtkBzBU.js} +1 -1
- package/dist/{chevron-down-BghbWA9p.js → chevron-down-C-Fjxcqj.js} +1 -1
- package/dist/chevron-right-SOkn2d4P.js +11 -0
- package/dist/{chevron-up-n3qFAPS3.js → chevron-up-lntU1ypp.js} +1 -1
- package/dist/{circle-alert-L5uGGFRP.js → circle-alert-CjzUTwy3.js} +1 -1
- package/dist/{clock-Dgnwp18n.js → clock-pB2QKPsJ.js} +1 -1
- package/dist/{cloud-B1c4XIsn.js → cloud-DdidMW6f.js} +445 -200
- package/dist/copy-CId1E038.js +19 -0
- package/dist/createCloudRuntime-x5WZm3p8.js +383 -0
- package/dist/{createLucideIcon-05lB8iWe.js → createLucideIcon-Cwf_nTzE.js} +6 -6
- package/dist/de-Ck0pBGHu.js +83 -0
- package/dist/{dist-BxFbxpgW.js → dist-BVqAYoRB.js} +125 -125
- package/dist/dist-D8i1ixHK.js +177 -0
- package/dist/dist-DBirAJIs.js +410 -0
- package/dist/editor-modal-B_LaQf0s.js +5998 -0
- package/dist/en-DcmpWV53.js +2 -0
- package/dist/es-lagTvUfX.js +83 -0
- package/dist/{extensions-Bawm4BOM.js → extensions-CHOBZRab.js} +42 -42
- package/dist/eye-BuGtFUoJ.js +16 -0
- package/dist/fr-C4hVl5Lk.js +83 -0
- package/dist/{image-up-ovhjl9u9.js → image-up-gH4JEpU5.js} +1 -1
- package/dist/index.d.ts +77 -11
- package/dist/{info-c3KI927I.js → info-BQ60P82u.js} +1 -1
- package/dist/{keys-C3P1yxnr.js → keys-DQA2i1k1.js} +4 -4
- package/dist/link-3R8it3J7.js +14 -0
- package/dist/list-Ccdgj46T.js +33 -0
- package/dist/{loader-circle-B2Y8xZQb.js → loader-circle-B_tAD4k6.js} +1 -1
- package/dist/{message-circle-B7K-naUa.js → message-circle-P-KSc6V0.js} +1 -1
- package/dist/nl-CReD7Apd.js +83 -0
- package/dist/{pencil-BhWTFcp4.js → pencil-9ZiwqS4r.js} +1 -1
- package/dist/plus-BwJEzCaO.js +14 -0
- package/dist/pt-BR-BRA0-vGP.js +83 -0
- package/dist/{refresh-cw-BqUR5vgO.js → refresh-cw-DEgfb2FK.js} +2 -14
- package/dist/{runtime-dom.esm-bundler-BuG03jBM.js → runtime-dom.esm-bundler-PnoZU512.js} +106 -106
- package/dist/search-DqQ8Li5E.js +16 -0
- package/dist/{send-D1vvuW79.js → send-CE6uvqop.js} +1 -1
- package/dist/{shield-check-DjK54PnW.js → shield-check-DhD1Z3rd.js} +1 -1
- package/dist/{sparkles-DNdS9V_3.js → sparkles-R0ZQHa6F.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +2488 -2407
- package/dist/{text-align-start-Bcmo_VUY.js → text-align-start-DSux2UNn.js} +1 -1
- package/dist/{trash-C9bMXvw4.js → trash-Cf_SqsER.js} +1 -1
- package/dist/{triangle-alert-Bn8Bd2Yv.js → triangle-alert-C6tGa6jw.js} +1 -1
- package/dist/{upload-DKgg1gno.js → upload-DusKjpVr.js} +1 -1
- package/dist/{useAliveFlag-PVmp95MT.js → useAliveFlag-oyByIcjy.js} +1 -1
- package/dist/{useCloudI18n-BKoiYsWZ.js → useCloudI18n-BLyh_e2T.js} +2 -2
- package/dist/{useEditorCore-CYGvurZa.js → useEditorCore-DhlKOYwe.js} +1552 -1486
- package/dist/{useEditorRoot-DkRGTQRs.js → useEditorRoot-ds57-l6F.js} +2 -2
- package/dist/{useI18n-CL6RfPzK.js → useI18n-BbdxxpOE.js} +2 -2
- package/dist/{useMergeTag-C9GEpljB.js → useMergeTag-DlvOBW_B.js} +3 -3
- package/dist/{usePopoverPosition-CWxaIWd3.js → usePopoverPosition-CprM5p-c.js} +2 -2
- package/dist/{useScrollToBlock-oUx1HIZ2.js → useScrollToBlock-BTFw0b9O.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-D9JUcKrV.js → vue.runtime.esm-bundler-DShF3P6k.js} +1192 -1181
- package/dist/{x-BPKoRPTG.js → x-D_-42Ukq.js} +1 -1
- package/package.json +9 -12
- package/dist/CloudHeaderExtras-CRUQvgSV.js +0 -59
- package/dist/SavedBlocksBrowserModal-BORqqASb.js +0 -322
- package/dist/TitleEditor-pYEUX6lR.js +0 -198
- package/dist/TplModal-DRx4ytx8.js +0 -51
- package/dist/cdn/chunks/VersionHistoryMenu-BfVUvWHT.js.map +0 -1
- package/dist/cdn/chunks/ca-CNRWAMHI.js.map +0 -1
- package/dist/cdn/chunks/cloud-CullB76F.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-Cx2JpUYU.js +0 -443
- package/dist/cdn/chunks/createCloudRuntime-Cx2JpUYU.js.map +0 -1
- package/dist/cdn/chunks/de-DFYCT4QU.js.map +0 -1
- package/dist/cdn/chunks/en-rGHphLWo.js +0 -2
- package/dist/cdn/chunks/es-OgkdMZGX.js.map +0 -1
- package/dist/cdn/chunks/fr-Dswns199.js.map +0 -1
- package/dist/cdn/chunks/nl-CbcPJlrL.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BibOQm-o.js.map +0 -1
- package/dist/cdn/chunks/src-CaXeO-gG.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-D4MytYB9.js.map +0 -1
- package/dist/createCloudRuntime-PevFSH74.js +0 -441
- package/dist/dist-dNiknO7j.js +0 -251
- package/dist/dist-heatwAdo.js +0 -150
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as e, R as t, Z as n, s as r } from "./vue.runtime.esm-bundler-DShF3P6k.js";
|
|
2
2
|
import { s as i } from "./dist-tGkjkX-v.js";
|
|
3
3
|
//#region ../core/dist/cloud/index.js
|
|
4
4
|
function a(e) {
|
|
@@ -81,10 +81,10 @@ var o = class e {
|
|
|
81
81
|
let r = await fetch(this.url, n);
|
|
82
82
|
if (!r.ok) throw new i(`Token refresh failed: ${r.status}`, r.status);
|
|
83
83
|
let a = await r.json();
|
|
84
|
-
if (!a.token || !a.
|
|
85
|
-
return this.accessToken = a.token, this.expiresAt = /* @__PURE__ */ new Date(a.
|
|
86
|
-
allowedEmails: a.
|
|
87
|
-
signature: a.
|
|
84
|
+
if (!a.token || !a.expiresAt || !a.projectId || !a.tenant) throw Error("Invalid token response: missing token, expiresAt, projectId, or tenant");
|
|
85
|
+
return this.accessToken = a.token, this.expiresAt = /* @__PURE__ */ new Date(a.expiresAt * 1e3), this._projectId = a.projectId, this._tenantSlug = a.tenant, this._testEmailConfig = a.testEmail?.allowedEmails && a.testEmail?.signature ? {
|
|
86
|
+
allowedEmails: a.testEmail.allowedEmails,
|
|
87
|
+
signature: a.testEmail.signature
|
|
88
88
|
} : null, this._userConfig = a.user?.id && a.user?.name && a.user?.signature ? {
|
|
89
89
|
id: a.user.id,
|
|
90
90
|
name: a.user.name,
|
|
@@ -351,15 +351,167 @@ var c = "/api/v1/projects/{project}/tenants/{tenant}", l = `${c}/templates/{temp
|
|
|
351
351
|
savedModule: e
|
|
352
352
|
}), { method: "DELETE" });
|
|
353
353
|
}
|
|
354
|
+
}, g = class {
|
|
355
|
+
authManager;
|
|
356
|
+
constructor(e) {
|
|
357
|
+
this.authManager = e;
|
|
358
|
+
}
|
|
359
|
+
get projectId() {
|
|
360
|
+
return this.authManager.projectId;
|
|
361
|
+
}
|
|
362
|
+
get tenantSlug() {
|
|
363
|
+
return this.authManager.tenantSlug;
|
|
364
|
+
}
|
|
365
|
+
get baseParams() {
|
|
366
|
+
return {
|
|
367
|
+
project: this.projectId,
|
|
368
|
+
tenant: this.tenantSlug
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
async request(e, t = {}) {
|
|
372
|
+
let n = await this.authManager.authenticatedFetch(e, {
|
|
373
|
+
...t,
|
|
374
|
+
headers: {
|
|
375
|
+
"Content-Type": "application/json",
|
|
376
|
+
Accept: "application/json",
|
|
377
|
+
...t.headers
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
if (!n.ok) {
|
|
381
|
+
let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` }));
|
|
382
|
+
throw Error(e.message, { cause: e });
|
|
383
|
+
}
|
|
384
|
+
if (n.status !== 204) return (await n.json()).data;
|
|
385
|
+
}
|
|
386
|
+
async browseMedia(e) {
|
|
387
|
+
let t = new URLSearchParams();
|
|
388
|
+
e.folderId && t.set("folderId", e.folderId), e.search && t.set("search", e.search), e.category && t.set("category", e.category), e.sort && t.set("sort", e.sort), e.cursor && t.set("cursor", e.cursor);
|
|
389
|
+
let n = t.toString(), r = `${s(m["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
|
|
390
|
+
if (!i.ok) {
|
|
391
|
+
let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
|
|
392
|
+
throw Error(e.message, { cause: e });
|
|
393
|
+
}
|
|
394
|
+
return i.json();
|
|
395
|
+
}
|
|
396
|
+
async uploadMedia(e, t) {
|
|
397
|
+
let n = new FormData();
|
|
398
|
+
n.append("file", e), t && n.append("folderId", t);
|
|
399
|
+
let r = s(m["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
|
|
400
|
+
method: "POST",
|
|
401
|
+
headers: { Accept: "application/json" },
|
|
402
|
+
body: n
|
|
403
|
+
});
|
|
404
|
+
if (!i.ok) {
|
|
405
|
+
let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
|
|
406
|
+
throw Error(e.message, { cause: e });
|
|
407
|
+
}
|
|
408
|
+
return (await i.json()).data;
|
|
409
|
+
}
|
|
410
|
+
async updateMedia(e, t, n) {
|
|
411
|
+
let r = {};
|
|
412
|
+
return t !== void 0 && (r.filename = t), n !== void 0 && (r.alt = n), this.request(s(m["media.update"], {
|
|
413
|
+
...this.baseParams,
|
|
414
|
+
media: e
|
|
415
|
+
}), {
|
|
416
|
+
method: "PUT",
|
|
417
|
+
body: JSON.stringify(r)
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
async deleteMedia(e) {
|
|
421
|
+
return this.request(s(m["media.delete"], this.baseParams), {
|
|
422
|
+
method: "POST",
|
|
423
|
+
body: JSON.stringify({ ids: e })
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
async moveMedia(e, t) {
|
|
427
|
+
return this.request(s(m["media.move"], this.baseParams), {
|
|
428
|
+
method: "POST",
|
|
429
|
+
body: JSON.stringify({
|
|
430
|
+
ids: e,
|
|
431
|
+
folderId: t
|
|
432
|
+
})
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
async getMediaFolders() {
|
|
436
|
+
return this.request(s(m["folders.index"], this.baseParams));
|
|
437
|
+
}
|
|
438
|
+
async createMediaFolder(e, t) {
|
|
439
|
+
return this.request(s(m["folders.store"], this.baseParams), {
|
|
440
|
+
method: "POST",
|
|
441
|
+
body: JSON.stringify({
|
|
442
|
+
name: e,
|
|
443
|
+
parentId: t ?? null
|
|
444
|
+
})
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
async renameMediaFolder(e, t) {
|
|
448
|
+
return this.request(s(m["folders.update"], {
|
|
449
|
+
...this.baseParams,
|
|
450
|
+
mediaFolder: e
|
|
451
|
+
}), {
|
|
452
|
+
method: "PUT",
|
|
453
|
+
body: JSON.stringify({ name: t })
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
async deleteMediaFolder(e) {
|
|
457
|
+
return this.request(s(m["folders.destroy"], {
|
|
458
|
+
...this.baseParams,
|
|
459
|
+
mediaFolder: e
|
|
460
|
+
}), { method: "DELETE" });
|
|
461
|
+
}
|
|
462
|
+
async checkMediaUsage(e) {
|
|
463
|
+
let t = await this.authManager.authenticatedFetch(s(m["media.checkUsage"], this.baseParams), {
|
|
464
|
+
method: "POST",
|
|
465
|
+
headers: {
|
|
466
|
+
"Content-Type": "application/json",
|
|
467
|
+
Accept: "application/json"
|
|
468
|
+
},
|
|
469
|
+
body: JSON.stringify({ ids: e })
|
|
470
|
+
});
|
|
471
|
+
if (!t.ok) {
|
|
472
|
+
let e = await t.json().catch(() => ({ message: `HTTP error ${t.status}` }));
|
|
473
|
+
throw Error(e.message, { cause: e });
|
|
474
|
+
}
|
|
475
|
+
return t.json();
|
|
476
|
+
}
|
|
477
|
+
async getFrequentlyUsed() {
|
|
478
|
+
return this.request(s(m["media.frequentlyUsed"], this.baseParams));
|
|
479
|
+
}
|
|
480
|
+
async importFromUrl(e, t) {
|
|
481
|
+
return this.request(s(m["media.importFromUrl"], this.baseParams), {
|
|
482
|
+
method: "POST",
|
|
483
|
+
body: JSON.stringify({
|
|
484
|
+
url: e,
|
|
485
|
+
folderId: t ?? null
|
|
486
|
+
})
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
async replaceMedia(e, t) {
|
|
490
|
+
let n = new FormData();
|
|
491
|
+
n.append("file", t);
|
|
492
|
+
let r = s(m["media.replace"], {
|
|
493
|
+
...this.baseParams,
|
|
494
|
+
media: e
|
|
495
|
+
}), i = await this.authManager.authenticatedFetch(r, {
|
|
496
|
+
method: "POST",
|
|
497
|
+
headers: { Accept: "application/json" },
|
|
498
|
+
body: n
|
|
499
|
+
});
|
|
500
|
+
if (!i.ok) {
|
|
501
|
+
let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
|
|
502
|
+
throw Error(e.message, { cause: e });
|
|
503
|
+
}
|
|
504
|
+
return (await i.json()).data;
|
|
505
|
+
}
|
|
354
506
|
};
|
|
355
|
-
function
|
|
507
|
+
function _(e) {
|
|
356
508
|
return {
|
|
357
509
|
host: e.host,
|
|
358
510
|
port: e.port,
|
|
359
|
-
appKey: e.
|
|
511
|
+
appKey: e.appKey
|
|
360
512
|
};
|
|
361
513
|
}
|
|
362
|
-
var
|
|
514
|
+
var v = class {
|
|
363
515
|
pusher = null;
|
|
364
516
|
authManager;
|
|
365
517
|
config;
|
|
@@ -395,9 +547,9 @@ var _ = class {
|
|
|
395
547
|
Accept: "application/json"
|
|
396
548
|
},
|
|
397
549
|
params: {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
550
|
+
userId: this.authManager.userConfig?.id ?? "",
|
|
551
|
+
userName: this.authManager.userConfig?.name ?? "",
|
|
552
|
+
userSignature: this.authManager.userConfig?.signature ?? ""
|
|
401
553
|
}
|
|
402
554
|
}
|
|
403
555
|
}), this.pusher.connection.bind("error", (e) => {
|
|
@@ -424,37 +576,37 @@ var _ = class {
|
|
|
424
576
|
return this.pusher?.connection.state === "connected";
|
|
425
577
|
}
|
|
426
578
|
};
|
|
427
|
-
function
|
|
579
|
+
function y(e, t) {
|
|
428
580
|
let { operation: n, data: r } = t;
|
|
429
581
|
switch (n) {
|
|
430
|
-
case "
|
|
431
|
-
e.addBlock(r.block, r.
|
|
582
|
+
case "addBlock":
|
|
583
|
+
e.addBlock(r.block, r.sectionId, r.columnIndex, r.index);
|
|
432
584
|
break;
|
|
433
|
-
case "
|
|
434
|
-
e.updateBlock(r.
|
|
585
|
+
case "updateBlock":
|
|
586
|
+
e.updateBlock(r.blockId, r.updates);
|
|
435
587
|
break;
|
|
436
|
-
case "
|
|
437
|
-
e.removeBlock(r.
|
|
588
|
+
case "deleteBlock":
|
|
589
|
+
e.removeBlock(r.blockId);
|
|
438
590
|
break;
|
|
439
|
-
case "
|
|
440
|
-
e.moveBlock(r.
|
|
591
|
+
case "moveBlock":
|
|
592
|
+
e.moveBlock(r.blockId, r.index, r.sectionId, r.columnIndex);
|
|
441
593
|
break;
|
|
442
|
-
case "
|
|
594
|
+
case "updateSettings":
|
|
443
595
|
e.updateSettings(r.updates);
|
|
444
596
|
break;
|
|
445
|
-
case "
|
|
597
|
+
case "setContent":
|
|
446
598
|
e.setContent(r.content);
|
|
447
599
|
break;
|
|
448
|
-
case "
|
|
600
|
+
case "updateBlockStyle": e.updateBlock(r.blockId, { styles: r.styles });
|
|
449
601
|
}
|
|
450
602
|
}
|
|
451
|
-
var
|
|
452
|
-
function
|
|
453
|
-
return `msg_${Date.now()}_${++
|
|
603
|
+
var b = 0;
|
|
604
|
+
function x() {
|
|
605
|
+
return `msg_${Date.now()}_${++b}`;
|
|
454
606
|
}
|
|
455
|
-
function
|
|
456
|
-
let { authManager:
|
|
457
|
-
function
|
|
607
|
+
function S(e) {
|
|
608
|
+
let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n([]), c = n(!1), l = n(!1), u = n(null), d = n(null), f = n(null), p = n(null), h = n(null), g = n(null), _ = n(!1), v = n([]), y = n(!1);
|
|
609
|
+
function b(e, t) {
|
|
458
610
|
let n = o.value.findIndex((t) => t.id === e);
|
|
459
611
|
if (n === -1) return;
|
|
460
612
|
let r = {
|
|
@@ -472,45 +624,45 @@ function x(e) {
|
|
|
472
624
|
if (e) {
|
|
473
625
|
l.value = !0;
|
|
474
626
|
try {
|
|
475
|
-
let
|
|
476
|
-
project:
|
|
477
|
-
tenant:
|
|
627
|
+
let n = s(m["ai.conversationMessages"], {
|
|
628
|
+
project: t.projectId,
|
|
629
|
+
tenant: t.tenantSlug,
|
|
478
630
|
template: e
|
|
479
|
-
}), r = await
|
|
631
|
+
}), r = await t.authenticatedFetch(n, {
|
|
480
632
|
method: "GET",
|
|
481
633
|
headers: { Accept: "application/json" }
|
|
482
634
|
});
|
|
483
635
|
if (!r.ok) return;
|
|
484
636
|
let i = await r.json();
|
|
485
|
-
i.
|
|
637
|
+
i.conversationId && (f.value = i.conversationId), Array.isArray(i.data) && i.data.length > 0 && (o.value = i.data.map((e) => ({
|
|
486
638
|
id: e.id,
|
|
487
639
|
role: e.role,
|
|
488
640
|
content: e.content,
|
|
489
|
-
timestamp: new Date(e.
|
|
641
|
+
timestamp: new Date(e.createdAt).getTime()
|
|
490
642
|
})));
|
|
491
643
|
} catch {} finally {
|
|
492
644
|
l.value = !1;
|
|
493
645
|
}
|
|
494
646
|
}
|
|
495
647
|
}
|
|
496
|
-
async function C(e,
|
|
648
|
+
async function C(e, n) {
|
|
497
649
|
let i = r();
|
|
498
650
|
if (i) {
|
|
499
651
|
y.value = !0;
|
|
500
652
|
try {
|
|
501
653
|
let r = s(m["ai.suggestions"], {
|
|
502
|
-
project:
|
|
503
|
-
tenant:
|
|
654
|
+
project: t.projectId,
|
|
655
|
+
tenant: t.tenantSlug,
|
|
504
656
|
template: i
|
|
505
|
-
}), a = await
|
|
657
|
+
}), a = await t.authenticatedFetch(r, {
|
|
506
658
|
method: "POST",
|
|
507
659
|
headers: {
|
|
508
660
|
"Content-Type": "application/json",
|
|
509
661
|
Accept: "text/event-stream"
|
|
510
662
|
},
|
|
511
663
|
body: JSON.stringify({
|
|
512
|
-
|
|
513
|
-
|
|
664
|
+
currentContent: e,
|
|
665
|
+
mergeTags: n.map((e) => ({
|
|
514
666
|
label: e.label,
|
|
515
667
|
value: e.value
|
|
516
668
|
}))
|
|
@@ -542,18 +694,18 @@ function x(e) {
|
|
|
542
694
|
}
|
|
543
695
|
}
|
|
544
696
|
}
|
|
545
|
-
async function w(e,
|
|
697
|
+
async function w(e, n, l) {
|
|
546
698
|
let y = r();
|
|
547
699
|
if (!y) throw Error("Template must be saved before using AI generation");
|
|
548
700
|
c.value = !0, u.value = null, d.value = null, v.value = [];
|
|
549
|
-
let S =
|
|
701
|
+
let S = x();
|
|
550
702
|
o.value = [...o.value, {
|
|
551
703
|
id: S,
|
|
552
704
|
role: "user",
|
|
553
705
|
content: e,
|
|
554
706
|
timestamp: Date.now()
|
|
555
707
|
}];
|
|
556
|
-
let C =
|
|
708
|
+
let C = x();
|
|
557
709
|
o.value = [...o.value, {
|
|
558
710
|
id: C,
|
|
559
711
|
role: "assistant",
|
|
@@ -562,10 +714,10 @@ function x(e) {
|
|
|
562
714
|
}];
|
|
563
715
|
try {
|
|
564
716
|
let r = s(m["ai.generate"], {
|
|
565
|
-
project:
|
|
566
|
-
tenant:
|
|
717
|
+
project: t.projectId,
|
|
718
|
+
tenant: t.tenantSlug,
|
|
567
719
|
template: y
|
|
568
|
-
}), a = await
|
|
720
|
+
}), a = await t.authenticatedFetch(r, {
|
|
569
721
|
method: "POST",
|
|
570
722
|
headers: {
|
|
571
723
|
"Content-Type": "application/json",
|
|
@@ -573,45 +725,45 @@ function x(e) {
|
|
|
573
725
|
},
|
|
574
726
|
body: JSON.stringify({
|
|
575
727
|
prompt: e,
|
|
576
|
-
|
|
577
|
-
|
|
728
|
+
currentContent: n,
|
|
729
|
+
mergeTags: l.map((e) => ({
|
|
578
730
|
label: e.label,
|
|
579
731
|
value: e.value
|
|
580
732
|
})),
|
|
581
|
-
|
|
733
|
+
conversationId: f.value
|
|
582
734
|
})
|
|
583
735
|
});
|
|
584
736
|
if (!a.ok) {
|
|
585
737
|
let e = await a.json().catch(() => null);
|
|
586
|
-
throw a.status === 403 ? Error("
|
|
738
|
+
throw a.status === 403 ? Error("aiGenerationNotAvailable") : Error(e?.message || "Failed to generate template");
|
|
587
739
|
}
|
|
588
740
|
let c = a.body?.getReader();
|
|
589
741
|
if (!c) throw Error("Failed to read stream");
|
|
590
|
-
let d = new TextDecoder(), v = "",
|
|
742
|
+
let d = new TextDecoder(), v = "", x = null;
|
|
591
743
|
try {
|
|
592
744
|
for (;;) {
|
|
593
|
-
let { done: e, value:
|
|
745
|
+
let { done: e, value: t } = await c.read();
|
|
594
746
|
if (e) break;
|
|
595
|
-
v += d.decode(
|
|
747
|
+
v += d.decode(t, { stream: !0 });
|
|
596
748
|
let r = v.split("\n");
|
|
597
749
|
v = r.pop() ?? "";
|
|
598
750
|
for (let e of r) {
|
|
599
751
|
if (!e.startsWith("data: ")) continue;
|
|
600
|
-
let
|
|
752
|
+
let t = e.slice(6), r;
|
|
601
753
|
try {
|
|
602
|
-
r = JSON.parse(
|
|
754
|
+
r = JSON.parse(t);
|
|
603
755
|
} catch {
|
|
604
756
|
continue;
|
|
605
757
|
}
|
|
606
|
-
if (r.type === "text")
|
|
758
|
+
if (r.type === "text") b(C, { content: (o.value.find((e) => e.id === C)?.content ?? "") + r.text });
|
|
607
759
|
else if (r.type === "error") throw Error(r.message || "Failed to generate template");
|
|
608
|
-
else r.type === "done" && (r.
|
|
760
|
+
else r.type === "done" && (r.conversationId && (f.value = r.conversationId), b(C, { content: r.text }), x = r.content ?? null, x ? (h.value = n, g.value = x, p.value = C, _.value = !1, i?.(x)) : u.value = "ai_apply_failed");
|
|
609
761
|
}
|
|
610
762
|
}
|
|
611
763
|
} finally {
|
|
612
764
|
c.cancel().catch(() => {});
|
|
613
765
|
}
|
|
614
|
-
return
|
|
766
|
+
return x;
|
|
615
767
|
} catch (t) {
|
|
616
768
|
let n = t instanceof Error ? t : Error("Failed to generate template", { cause: t });
|
|
617
769
|
return u.value = n.message, d.value = e, a?.(n), o.value = o.value.filter((e) => e.id !== S && e.id !== C), null;
|
|
@@ -642,7 +794,7 @@ function x(e) {
|
|
|
642
794
|
clearChat: E
|
|
643
795
|
};
|
|
644
796
|
}
|
|
645
|
-
function
|
|
797
|
+
function C(e) {
|
|
646
798
|
function t(t) {
|
|
647
799
|
return e !== !1 && e?.[t] !== !1;
|
|
648
800
|
}
|
|
@@ -651,33 +803,33 @@ function S(e) {
|
|
|
651
803
|
hasAnyMenuFeature: r(() => t("chat") || t("scoring") || t("designToTemplate"))
|
|
652
804
|
};
|
|
653
805
|
}
|
|
654
|
-
function
|
|
655
|
-
let { authManager:
|
|
656
|
-
async function d(e,
|
|
806
|
+
function w(e) {
|
|
807
|
+
let { authManager: t, getTemplateId: r } = e, i = n(!1), a = n(null), o = n(null), c = n(null), l = n(""), u = n(null);
|
|
808
|
+
async function d(e, n) {
|
|
657
809
|
let c = r();
|
|
658
810
|
if (!c) return null;
|
|
659
811
|
i.value = !0, o.value = null, a.value = null;
|
|
660
812
|
try {
|
|
661
813
|
let r = s(m["ai.score"], {
|
|
662
|
-
project:
|
|
663
|
-
tenant:
|
|
814
|
+
project: t.projectId,
|
|
815
|
+
tenant: t.tenantSlug,
|
|
664
816
|
template: c
|
|
665
|
-
}), i = await
|
|
817
|
+
}), i = await t.authenticatedFetch(r, {
|
|
666
818
|
method: "POST",
|
|
667
819
|
headers: {
|
|
668
820
|
"Content-Type": "application/json",
|
|
669
821
|
Accept: "text/event-stream"
|
|
670
822
|
},
|
|
671
823
|
body: JSON.stringify({
|
|
672
|
-
|
|
673
|
-
|
|
824
|
+
currentContent: e,
|
|
825
|
+
mergeTags: n.map((e) => ({
|
|
674
826
|
label: e.label,
|
|
675
827
|
value: e.value
|
|
676
828
|
}))
|
|
677
829
|
})
|
|
678
830
|
});
|
|
679
831
|
if (!i.ok) {
|
|
680
|
-
if (i.status === 403) throw Error("
|
|
832
|
+
if (i.status === 403) throw Error("aiGenerationNotAvailable");
|
|
681
833
|
let e = await i.json().catch(() => null);
|
|
682
834
|
throw Error(e?.message || "Failed to score template");
|
|
683
835
|
}
|
|
@@ -710,16 +862,16 @@ function C(e) {
|
|
|
710
862
|
i.value = !1;
|
|
711
863
|
}
|
|
712
864
|
}
|
|
713
|
-
async function f(e,
|
|
865
|
+
async function f(e, n, i) {
|
|
714
866
|
let a = r();
|
|
715
867
|
if (!a) return null;
|
|
716
|
-
c.value =
|
|
868
|
+
c.value = n.id, l.value = "", u.value = null;
|
|
717
869
|
try {
|
|
718
870
|
let r = s(m["ai.fixFinding"], {
|
|
719
|
-
project:
|
|
720
|
-
tenant:
|
|
871
|
+
project: t.projectId,
|
|
872
|
+
tenant: t.tenantSlug,
|
|
721
873
|
template: a
|
|
722
|
-
}), o = await
|
|
874
|
+
}), o = await t.authenticatedFetch(r, {
|
|
723
875
|
method: "POST",
|
|
724
876
|
headers: {
|
|
725
877
|
"Content-Type": "application/json",
|
|
@@ -728,19 +880,19 @@ function C(e) {
|
|
|
728
880
|
body: JSON.stringify({
|
|
729
881
|
content: e,
|
|
730
882
|
finding: {
|
|
731
|
-
id:
|
|
732
|
-
message:
|
|
733
|
-
suggestion:
|
|
734
|
-
category:
|
|
883
|
+
id: n.id,
|
|
884
|
+
message: n.message,
|
|
885
|
+
suggestion: n.suggestion,
|
|
886
|
+
category: n.category
|
|
735
887
|
},
|
|
736
|
-
|
|
888
|
+
mergeTags: i.map((e) => ({
|
|
737
889
|
label: e.label,
|
|
738
890
|
value: e.value
|
|
739
891
|
}))
|
|
740
892
|
})
|
|
741
893
|
});
|
|
742
894
|
if (!o.ok) {
|
|
743
|
-
if (o.status === 403) throw Error("
|
|
895
|
+
if (o.status === 403) throw Error("aiGenerationNotAvailable");
|
|
744
896
|
let e = await o.json().catch(() => null);
|
|
745
897
|
throw Error(e?.message || "Failed to fix finding");
|
|
746
898
|
}
|
|
@@ -794,27 +946,27 @@ function C(e) {
|
|
|
794
946
|
reset: h
|
|
795
947
|
};
|
|
796
948
|
}
|
|
797
|
-
function
|
|
798
|
-
let { authManager:
|
|
949
|
+
function T(e) {
|
|
950
|
+
let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n(!1), c = n(null);
|
|
799
951
|
async function l(e) {
|
|
800
|
-
let
|
|
801
|
-
if (!
|
|
952
|
+
let n = r();
|
|
953
|
+
if (!n) throw Error("Template must be saved before using design reference");
|
|
802
954
|
o.value = !0, c.value = null;
|
|
803
955
|
try {
|
|
804
956
|
let r = new FormData();
|
|
805
957
|
e.prompt && r.append("prompt", e.prompt), e.imageUpload && r.append("image_upload", e.imageUpload), e.pdfUpload && r.append("pdf_upload", e.pdfUpload);
|
|
806
958
|
let a = s(m["ai.generateFromDesign"], {
|
|
807
|
-
project:
|
|
808
|
-
tenant:
|
|
809
|
-
template:
|
|
810
|
-
}), o = await
|
|
959
|
+
project: t.projectId,
|
|
960
|
+
tenant: t.tenantSlug,
|
|
961
|
+
template: n
|
|
962
|
+
}), o = await t.authenticatedFetch(a, {
|
|
811
963
|
method: "POST",
|
|
812
964
|
headers: { Accept: "text/event-stream" },
|
|
813
965
|
body: r
|
|
814
966
|
});
|
|
815
967
|
if (!o.ok) {
|
|
816
968
|
let e = await o.json().catch(() => null);
|
|
817
|
-
throw o.status === 403 ? Error("
|
|
969
|
+
throw o.status === 403 ? Error("aiGenerationNotAvailable") : Error(e?.message || "Failed to generate template from design");
|
|
818
970
|
}
|
|
819
971
|
let c = o.body?.getReader();
|
|
820
972
|
if (!c) throw Error("Failed to read stream");
|
|
@@ -855,34 +1007,28 @@ function w(e) {
|
|
|
855
1007
|
reset: u
|
|
856
1008
|
};
|
|
857
1009
|
}
|
|
858
|
-
var
|
|
859
|
-
function
|
|
1010
|
+
var E = "comment-broadcast";
|
|
1011
|
+
function D(e) {
|
|
860
1012
|
let t = {
|
|
861
1013
|
id: e.id,
|
|
862
1014
|
body: e.body,
|
|
863
|
-
author:
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
blockId: e.block_id,
|
|
869
|
-
parentId: e.parent_id,
|
|
870
|
-
resolvedAt: e.resolved_at
|
|
1015
|
+
author: e.author,
|
|
1016
|
+
createdAt: e.createdAt,
|
|
1017
|
+
blockId: e.blockId,
|
|
1018
|
+
parentId: e.parentId,
|
|
1019
|
+
resolvedAt: e.resolvedAt
|
|
871
1020
|
};
|
|
872
|
-
return e.
|
|
873
|
-
id: e.resolved_by_identifier,
|
|
874
|
-
name: e.resolved_by_name ?? ""
|
|
875
|
-
}), e.replies?.length && (t.replies = e.replies.map(E)), t;
|
|
1021
|
+
return e.updatedAt !== e.createdAt && (t.updatedAt = e.updatedAt), e.resolvedBy && (t.resolvedBy = e.resolvedBy), e.replies?.length && (t.replies = e.replies.map(D)), t;
|
|
876
1022
|
}
|
|
877
|
-
function
|
|
878
|
-
let { authManager: n, channel: r, getSocketId: i } =
|
|
1023
|
+
function O(e) {
|
|
1024
|
+
let { authManager: n, channel: r, getSocketId: i } = e, a = new h(n);
|
|
879
1025
|
function o() {
|
|
880
1026
|
let e = n.userConfig;
|
|
881
1027
|
if (!e) throw Error("[Templatical] Cloud comments need a signed user in the auth token. The project's token endpoint must include a `user` claim.");
|
|
882
1028
|
return {
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
1029
|
+
userId: e.id,
|
|
1030
|
+
userName: e.name,
|
|
1031
|
+
userSignature: e.signature
|
|
886
1032
|
};
|
|
887
1033
|
}
|
|
888
1034
|
function s() {
|
|
@@ -891,19 +1037,19 @@ function D(t) {
|
|
|
891
1037
|
}
|
|
892
1038
|
return {
|
|
893
1039
|
async list(e) {
|
|
894
|
-
return (await a.getComments(e)).map(
|
|
1040
|
+
return (await a.getComments(e)).map(D);
|
|
895
1041
|
},
|
|
896
1042
|
async create(e, t) {
|
|
897
|
-
return
|
|
1043
|
+
return D(await a.createComment(e, {
|
|
898
1044
|
body: t.body,
|
|
899
|
-
|
|
900
|
-
|
|
1045
|
+
blockId: t.blockId,
|
|
1046
|
+
parentId: t.parentId,
|
|
901
1047
|
...o()
|
|
902
1048
|
}, s()));
|
|
903
1049
|
},
|
|
904
1050
|
async update(e, t, n) {
|
|
905
1051
|
if (n.body === void 0) throw Error("[Templatical] Cloud comments: update() needs a `body` in the patch.");
|
|
906
|
-
return
|
|
1052
|
+
return D(await a.updateComment(e, t, {
|
|
907
1053
|
body: n.body,
|
|
908
1054
|
...o()
|
|
909
1055
|
}, s()));
|
|
@@ -912,54 +1058,54 @@ function D(t) {
|
|
|
912
1058
|
await a.deleteComment(e, t, o(), s());
|
|
913
1059
|
},
|
|
914
1060
|
async setResolved(e, t, n) {
|
|
915
|
-
return
|
|
1061
|
+
return D(await a.resolveComment(e, t, o(), s()));
|
|
916
1062
|
},
|
|
917
|
-
subscribe(
|
|
1063
|
+
subscribe(e, n) {
|
|
918
1064
|
function i(e) {
|
|
919
|
-
let t =
|
|
1065
|
+
let t = D(e.comment);
|
|
920
1066
|
switch (e.action) {
|
|
921
|
-
case "
|
|
1067
|
+
case "commentCreated":
|
|
922
1068
|
n({
|
|
923
1069
|
type: "created",
|
|
924
1070
|
comment: t
|
|
925
1071
|
});
|
|
926
1072
|
break;
|
|
927
|
-
case "
|
|
1073
|
+
case "commentDeleted":
|
|
928
1074
|
n({
|
|
929
1075
|
type: "deleted",
|
|
930
1076
|
commentId: t.id,
|
|
931
1077
|
parentId: t.parentId
|
|
932
1078
|
});
|
|
933
1079
|
break;
|
|
934
|
-
case "
|
|
935
|
-
case "
|
|
936
|
-
case "
|
|
1080
|
+
case "commentUpdated":
|
|
1081
|
+
case "commentResolved":
|
|
1082
|
+
case "commentUnresolved": n({
|
|
937
1083
|
type: "updated",
|
|
938
1084
|
comment: t
|
|
939
1085
|
});
|
|
940
1086
|
}
|
|
941
1087
|
}
|
|
942
|
-
let a =
|
|
943
|
-
t?.unbind(
|
|
1088
|
+
let a = t(r, (e, t) => {
|
|
1089
|
+
t?.unbind(E, i), e?.bind(E, i);
|
|
944
1090
|
}, { immediate: !0 });
|
|
945
1091
|
return () => {
|
|
946
|
-
a(), r.value?.unbind(
|
|
1092
|
+
a(), r.value?.unbind(E, i);
|
|
947
1093
|
};
|
|
948
1094
|
}
|
|
949
1095
|
};
|
|
950
1096
|
}
|
|
951
|
-
var
|
|
1097
|
+
var k = [
|
|
952
1098
|
"pusher:member_added",
|
|
953
1099
|
"pusher:member_removed",
|
|
954
|
-
"client-
|
|
955
|
-
"client-
|
|
1100
|
+
"client-blockLocked",
|
|
1101
|
+
"client-blockUnlocked",
|
|
956
1102
|
"client-operation",
|
|
957
1103
|
"mcp-operation"
|
|
958
1104
|
];
|
|
959
|
-
function
|
|
960
|
-
for (let t of
|
|
1105
|
+
function A(e) {
|
|
1106
|
+
for (let t of k) e.unbind(t);
|
|
961
1107
|
}
|
|
962
|
-
var
|
|
1108
|
+
var j = [
|
|
963
1109
|
"#3b82f6",
|
|
964
1110
|
"#ef4444",
|
|
965
1111
|
"#10b981",
|
|
@@ -971,10 +1117,10 @@ var A = [
|
|
|
971
1117
|
"#6366f1",
|
|
972
1118
|
"#14b8a6"
|
|
973
1119
|
];
|
|
974
|
-
function
|
|
975
|
-
let { authManager: a, editor: o, channel: s } = i, c =
|
|
1120
|
+
function M(i) {
|
|
1121
|
+
let { authManager: a, editor: o, channel: s } = i, c = n([]), l = n(/* @__PURE__ */ new Map()), u = 0, d = !1, f = r(() => a.userConfig?.id ?? "");
|
|
976
1122
|
function p() {
|
|
977
|
-
let e =
|
|
1123
|
+
let e = j[u % j.length];
|
|
978
1124
|
return u++, e;
|
|
979
1125
|
}
|
|
980
1126
|
function m(e) {
|
|
@@ -1013,10 +1159,10 @@ function j(i) {
|
|
|
1013
1159
|
selectedBlockId: null
|
|
1014
1160
|
} : e));
|
|
1015
1161
|
}
|
|
1016
|
-
function
|
|
1162
|
+
function v(e) {
|
|
1017
1163
|
d = !0;
|
|
1018
1164
|
try {
|
|
1019
|
-
|
|
1165
|
+
y(o, e);
|
|
1020
1166
|
} finally {
|
|
1021
1167
|
d = !1;
|
|
1022
1168
|
}
|
|
@@ -1025,18 +1171,18 @@ function j(i) {
|
|
|
1025
1171
|
s.value && !d && s.value.trigger("client-operation", e);
|
|
1026
1172
|
}
|
|
1027
1173
|
function x(e) {
|
|
1028
|
-
s.value && s.value.trigger("client-
|
|
1174
|
+
s.value && s.value.trigger("client-blockLocked", {
|
|
1029
1175
|
blockId: e,
|
|
1030
1176
|
userId: f.value
|
|
1031
1177
|
});
|
|
1032
1178
|
}
|
|
1033
1179
|
function S(e) {
|
|
1034
|
-
s.value && s.value.trigger("client-
|
|
1180
|
+
s.value && s.value.trigger("client-blockUnlocked", { blockId: e });
|
|
1035
1181
|
}
|
|
1036
|
-
return
|
|
1182
|
+
return t(() => o.state.selectedBlockId, (e, t) => {
|
|
1037
1183
|
d || (t && S(t), e && x(e));
|
|
1038
|
-
}),
|
|
1039
|
-
if (t &&
|
|
1184
|
+
}), t(s, (e, t) => {
|
|
1185
|
+
if (t && A(t), !e) {
|
|
1040
1186
|
c.value = [], l.value = /* @__PURE__ */ new Map(), u = 0;
|
|
1041
1187
|
return;
|
|
1042
1188
|
}
|
|
@@ -1049,26 +1195,26 @@ function j(i) {
|
|
|
1049
1195
|
}), e.bind("pusher:member_removed", (e) => {
|
|
1050
1196
|
let t = c.value.find((t) => t.id === e.id);
|
|
1051
1197
|
h(e.id), t && i.onCollaboratorLeft?.(t);
|
|
1052
|
-
}), e.bind("client-
|
|
1198
|
+
}), e.bind("client-blockLocked", (e) => {
|
|
1053
1199
|
g(e);
|
|
1054
1200
|
let t = c.value.find((t) => t.id === e.userId);
|
|
1055
1201
|
t && i.onBlockLocked?.({
|
|
1056
1202
|
blockId: e.blockId,
|
|
1057
1203
|
collaborator: t
|
|
1058
1204
|
});
|
|
1059
|
-
}), e.bind("client-
|
|
1205
|
+
}), e.bind("client-blockUnlocked", (e) => {
|
|
1060
1206
|
let t = l.value.get(e.blockId);
|
|
1061
1207
|
_(e), t && i.onBlockUnlocked?.({
|
|
1062
1208
|
blockId: e.blockId,
|
|
1063
1209
|
collaborator: t
|
|
1064
1210
|
});
|
|
1065
1211
|
}), e.bind("client-operation", (e) => {
|
|
1066
|
-
|
|
1212
|
+
v(e);
|
|
1067
1213
|
}), e.bind("mcp-operation", (e) => {
|
|
1068
|
-
|
|
1214
|
+
v(e);
|
|
1069
1215
|
});
|
|
1070
|
-
}),
|
|
1071
|
-
s.value &&
|
|
1216
|
+
}), e(() => {
|
|
1217
|
+
s.value && A(s.value);
|
|
1072
1218
|
}), {
|
|
1073
1219
|
collaborators: c,
|
|
1074
1220
|
lockedBlocks: l,
|
|
@@ -1076,66 +1222,66 @@ function j(i) {
|
|
|
1076
1222
|
_isProcessingRemoteOperation: () => d
|
|
1077
1223
|
};
|
|
1078
1224
|
}
|
|
1079
|
-
function
|
|
1225
|
+
function N(e, t) {
|
|
1080
1226
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
1081
1227
|
e.addBlock = (e, r, i, a) => {
|
|
1082
1228
|
n(e, r, i, a), t._broadcastOperation({
|
|
1083
|
-
operation: "
|
|
1229
|
+
operation: "addBlock",
|
|
1084
1230
|
data: {
|
|
1085
1231
|
block: e,
|
|
1086
|
-
|
|
1087
|
-
|
|
1232
|
+
sectionId: r,
|
|
1233
|
+
columnIndex: i,
|
|
1088
1234
|
index: a
|
|
1089
1235
|
},
|
|
1090
1236
|
timestamp: Date.now()
|
|
1091
1237
|
});
|
|
1092
1238
|
}, e.updateBlock = (e, n) => {
|
|
1093
1239
|
r(e, n), t._broadcastOperation({
|
|
1094
|
-
operation: "
|
|
1240
|
+
operation: "updateBlock",
|
|
1095
1241
|
data: {
|
|
1096
|
-
|
|
1242
|
+
blockId: e,
|
|
1097
1243
|
updates: n
|
|
1098
1244
|
},
|
|
1099
1245
|
timestamp: Date.now()
|
|
1100
1246
|
});
|
|
1101
1247
|
}, e.removeBlock = (e) => {
|
|
1102
1248
|
i(e), t._broadcastOperation({
|
|
1103
|
-
operation: "
|
|
1104
|
-
data: {
|
|
1249
|
+
operation: "deleteBlock",
|
|
1250
|
+
data: { blockId: e },
|
|
1105
1251
|
timestamp: Date.now()
|
|
1106
1252
|
});
|
|
1107
1253
|
}, e.moveBlock = (e, n, r, i) => {
|
|
1108
1254
|
a(e, n, r, i), t._broadcastOperation({
|
|
1109
|
-
operation: "
|
|
1255
|
+
operation: "moveBlock",
|
|
1110
1256
|
data: {
|
|
1111
|
-
|
|
1257
|
+
blockId: e,
|
|
1112
1258
|
index: n,
|
|
1113
|
-
|
|
1114
|
-
|
|
1259
|
+
sectionId: r,
|
|
1260
|
+
columnIndex: i
|
|
1115
1261
|
},
|
|
1116
1262
|
timestamp: Date.now()
|
|
1117
1263
|
});
|
|
1118
1264
|
}, e.updateSettings = (e) => {
|
|
1119
1265
|
o(e), t._broadcastOperation({
|
|
1120
|
-
operation: "
|
|
1266
|
+
operation: "updateSettings",
|
|
1121
1267
|
data: { updates: e },
|
|
1122
1268
|
timestamp: Date.now()
|
|
1123
1269
|
});
|
|
1124
1270
|
}, e.setContent = (e, n) => {
|
|
1125
1271
|
s(e, n), t._broadcastOperation({
|
|
1126
|
-
operation: "
|
|
1272
|
+
operation: "setContent",
|
|
1127
1273
|
data: { content: e },
|
|
1128
1274
|
timestamp: Date.now()
|
|
1129
1275
|
});
|
|
1130
1276
|
};
|
|
1131
1277
|
}
|
|
1132
|
-
function
|
|
1133
|
-
let { authManager:
|
|
1134
|
-
async function c(e,
|
|
1278
|
+
function P(e) {
|
|
1279
|
+
let { authManager: t, onError: r } = e, i = n(null), a = n(!1), o = null, s = null;
|
|
1280
|
+
async function c(e, n) {
|
|
1135
1281
|
if (o) return;
|
|
1136
|
-
o = new
|
|
1137
|
-
authManager:
|
|
1138
|
-
config:
|
|
1282
|
+
o = new v({
|
|
1283
|
+
authManager: t,
|
|
1284
|
+
config: n,
|
|
1139
1285
|
onError: r
|
|
1140
1286
|
}), await o.connect(), s = `presence-template.${e}`;
|
|
1141
1287
|
let c = o.subscribePresence(s);
|
|
@@ -1159,7 +1305,7 @@ function N(e) {
|
|
|
1159
1305
|
getSocketId: u
|
|
1160
1306
|
};
|
|
1161
1307
|
}
|
|
1162
|
-
function
|
|
1308
|
+
function F(e) {
|
|
1163
1309
|
let t = new h(e);
|
|
1164
1310
|
return {
|
|
1165
1311
|
list(e) {
|
|
@@ -1176,12 +1322,111 @@ function P(e) {
|
|
|
1176
1322
|
}
|
|
1177
1323
|
};
|
|
1178
1324
|
}
|
|
1179
|
-
var F = 6e4;
|
|
1180
1325
|
function I(e) {
|
|
1326
|
+
let t = {
|
|
1327
|
+
id: e.id,
|
|
1328
|
+
url: e.url,
|
|
1329
|
+
filename: e.filename,
|
|
1330
|
+
alt: e.alt,
|
|
1331
|
+
mimeType: e.mimeType,
|
|
1332
|
+
folderId: e.folderId,
|
|
1333
|
+
createdAt: e.createdAt,
|
|
1334
|
+
updatedAt: e.updatedAt,
|
|
1335
|
+
size: e.size
|
|
1336
|
+
};
|
|
1337
|
+
return e.width != null && (t.width = e.width), e.height != null && (t.height = e.height), e.thumbnailUrl != null && (t.thumbnailUrl = e.thumbnailUrl), t;
|
|
1338
|
+
}
|
|
1339
|
+
function L(e, t = null) {
|
|
1340
|
+
return {
|
|
1341
|
+
id: e.id,
|
|
1342
|
+
name: e.name,
|
|
1343
|
+
parentId: e.parentId === void 0 ? t : e.parentId
|
|
1344
|
+
};
|
|
1345
|
+
}
|
|
1346
|
+
function R(e, t = null) {
|
|
1347
|
+
let n = [];
|
|
1348
|
+
for (let r of e) n.push(L(r, t)), r.children?.length && n.push(...R(r.children, r.id));
|
|
1349
|
+
return n;
|
|
1350
|
+
}
|
|
1351
|
+
function z(e) {
|
|
1352
|
+
let t = e?.media?.categories;
|
|
1353
|
+
if (!t) return;
|
|
1354
|
+
let n = {};
|
|
1355
|
+
for (let [e, r] of Object.entries(t)) n[e] = r.mimeTypes;
|
|
1356
|
+
return n;
|
|
1357
|
+
}
|
|
1358
|
+
function B(e, t) {
|
|
1359
|
+
let n = new g(e);
|
|
1360
|
+
return {
|
|
1361
|
+
async list(e) {
|
|
1362
|
+
let t = await n.browseMedia({
|
|
1363
|
+
search: e?.search,
|
|
1364
|
+
cursor: e?.cursor,
|
|
1365
|
+
folderId: e?.folderId,
|
|
1366
|
+
category: e?.category
|
|
1367
|
+
}), r = { items: t.data.map(I) };
|
|
1368
|
+
return t.meta.nextCursor && (r.nextCursor = t.meta.nextCursor), r;
|
|
1369
|
+
},
|
|
1370
|
+
async create(e) {
|
|
1371
|
+
return I(await n.uploadMedia(e.file, e.folderId));
|
|
1372
|
+
},
|
|
1373
|
+
async update(e, t) {
|
|
1374
|
+
return I(await n.updateMedia(e, t.filename, t.alt));
|
|
1375
|
+
},
|
|
1376
|
+
delete(e) {
|
|
1377
|
+
return n.deleteMedia(e);
|
|
1378
|
+
},
|
|
1379
|
+
folders: {
|
|
1380
|
+
async list() {
|
|
1381
|
+
return R(await n.getMediaFolders());
|
|
1382
|
+
},
|
|
1383
|
+
async create(e) {
|
|
1384
|
+
return L(await n.createMediaFolder(e.name, e.parentId));
|
|
1385
|
+
},
|
|
1386
|
+
async update(e, t) {
|
|
1387
|
+
return L(await n.renameMediaFolder(e, t.name));
|
|
1388
|
+
},
|
|
1389
|
+
delete(e) {
|
|
1390
|
+
return n.deleteMediaFolder(e);
|
|
1391
|
+
},
|
|
1392
|
+
async move(e, t) {
|
|
1393
|
+
return (await n.moveMedia(e, t)).map(I);
|
|
1394
|
+
}
|
|
1395
|
+
},
|
|
1396
|
+
async replace(e, t) {
|
|
1397
|
+
return I(await n.replaceMedia(e, t));
|
|
1398
|
+
},
|
|
1399
|
+
async importFromUrl(e, t) {
|
|
1400
|
+
return I(await n.importFromUrl(e, t));
|
|
1401
|
+
},
|
|
1402
|
+
async checkUsage(e) {
|
|
1403
|
+
let t = await n.checkMediaUsage(e), r = {};
|
|
1404
|
+
for (let [e, n] of Object.entries(t.data)) r[e] = {
|
|
1405
|
+
templateCount: n.templateCount,
|
|
1406
|
+
templateNames: n.templateNames
|
|
1407
|
+
};
|
|
1408
|
+
return r;
|
|
1409
|
+
},
|
|
1410
|
+
async frequentlyUsed() {
|
|
1411
|
+
return (await n.getFrequentlyUsed()).map(I);
|
|
1412
|
+
},
|
|
1413
|
+
async storage() {
|
|
1414
|
+
return t?.()?.storage ?? null;
|
|
1415
|
+
},
|
|
1416
|
+
get maxFileSize() {
|
|
1417
|
+
return t?.()?.media?.maxFileSize;
|
|
1418
|
+
},
|
|
1419
|
+
get mimeTypes() {
|
|
1420
|
+
return z(t?.() ?? null);
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
var V = 6e4;
|
|
1425
|
+
function H(e) {
|
|
1181
1426
|
let t = new h(e), n = 0;
|
|
1182
1427
|
function r(e, r) {
|
|
1183
1428
|
let i = Date.now();
|
|
1184
|
-
i - n <
|
|
1429
|
+
i - n < V || (n = i, t.createVersion(e, r).catch((e) => {
|
|
1185
1430
|
console.warn("[Templatical] Automatic version not recorded — the save itself succeeded:", e);
|
|
1186
1431
|
}));
|
|
1187
1432
|
}
|
|
@@ -1198,13 +1443,13 @@ function I(e) {
|
|
|
1198
1443
|
}
|
|
1199
1444
|
};
|
|
1200
1445
|
}
|
|
1201
|
-
function
|
|
1446
|
+
function U(e) {
|
|
1202
1447
|
return {
|
|
1203
1448
|
customFonts: e?.customFonts ?? [],
|
|
1204
1449
|
defaultFallback: e?.defaultFallback ?? "Arial, sans-serif"
|
|
1205
1450
|
};
|
|
1206
1451
|
}
|
|
1207
|
-
function
|
|
1452
|
+
function W(e) {
|
|
1208
1453
|
let t = new h(e.authManager);
|
|
1209
1454
|
async function n(e, n) {
|
|
1210
1455
|
let r = await t.exportTemplate(e, n);
|
|
@@ -1221,8 +1466,8 @@ function R(e) {
|
|
|
1221
1466
|
getMjmlSource: r
|
|
1222
1467
|
};
|
|
1223
1468
|
}
|
|
1224
|
-
function
|
|
1225
|
-
let t =
|
|
1469
|
+
function G(e) {
|
|
1470
|
+
let t = W({ authManager: e.authManager });
|
|
1226
1471
|
function n(e) {
|
|
1227
1472
|
return {
|
|
1228
1473
|
customFonts: e.fonts?.customFonts ?? [],
|
|
@@ -1244,34 +1489,34 @@ function z(e) {
|
|
|
1244
1489
|
}
|
|
1245
1490
|
};
|
|
1246
1491
|
}
|
|
1247
|
-
function
|
|
1492
|
+
function K(e) {
|
|
1248
1493
|
return {
|
|
1249
1494
|
id: e.id,
|
|
1250
|
-
createdAt: e.
|
|
1251
|
-
isAutomatic: e.
|
|
1495
|
+
createdAt: e.createdAt,
|
|
1496
|
+
isAutomatic: e.isAutomatic,
|
|
1252
1497
|
content: e.content
|
|
1253
1498
|
};
|
|
1254
1499
|
}
|
|
1255
|
-
function
|
|
1500
|
+
function q(e) {
|
|
1256
1501
|
let t = new h(e);
|
|
1257
1502
|
return {
|
|
1258
1503
|
async list(e) {
|
|
1259
|
-
return { versions: (await t.getVersions(e)).map(
|
|
1504
|
+
return { versions: (await t.getVersions(e)).map(K) };
|
|
1260
1505
|
},
|
|
1261
1506
|
async get(e, n) {
|
|
1262
1507
|
return (await t.getVersion(e, n)).content;
|
|
1263
1508
|
},
|
|
1264
1509
|
async create(e, n, r) {
|
|
1265
|
-
return
|
|
1510
|
+
return K(await t.createVersion(e, n, r?.label));
|
|
1266
1511
|
},
|
|
1267
1512
|
restore(e, n) {
|
|
1268
1513
|
return t.restoreVersion(e, n);
|
|
1269
1514
|
}
|
|
1270
1515
|
};
|
|
1271
1516
|
}
|
|
1272
|
-
function
|
|
1273
|
-
let { authManager: i, isAuthReady: a } =
|
|
1274
|
-
a &&
|
|
1517
|
+
function J(e) {
|
|
1518
|
+
let { authManager: i, isAuthReady: a } = e, o = n(null);
|
|
1519
|
+
a && t(a, (e) => {
|
|
1275
1520
|
e && (o.value = i.testEmailConfig);
|
|
1276
1521
|
}, { immediate: !0 });
|
|
1277
1522
|
let s = r(() => o.value !== null), c = r(() => o.value?.allowedEmails ?? []);
|
|
@@ -1284,7 +1529,7 @@ function H(n) {
|
|
|
1284
1529
|
getSignature: l
|
|
1285
1530
|
};
|
|
1286
1531
|
}
|
|
1287
|
-
function
|
|
1532
|
+
function Y(e) {
|
|
1288
1533
|
let t = new h(e.authManager);
|
|
1289
1534
|
return {
|
|
1290
1535
|
get allowedRecipients() {
|
|
@@ -1300,14 +1545,14 @@ function U(e) {
|
|
|
1300
1545
|
e.onBeforeTestEmail && (a = await e.onBeforeTestEmail(a)), await t.sendTestEmail(i, {
|
|
1301
1546
|
recipient: n,
|
|
1302
1547
|
html: a,
|
|
1303
|
-
|
|
1548
|
+
allowedEmails: e.allowedEmails.value,
|
|
1304
1549
|
signature: r
|
|
1305
1550
|
});
|
|
1306
1551
|
}
|
|
1307
1552
|
};
|
|
1308
1553
|
}
|
|
1309
|
-
function
|
|
1310
|
-
let { authManager:
|
|
1554
|
+
function X(e) {
|
|
1555
|
+
let { authManager: t, onError: i } = e, a = n(null), o = n(!1), s = new h(t), c = r(() => a.value?.features ?? null);
|
|
1311
1556
|
function l(e) {
|
|
1312
1557
|
return a.value?.features[e] ?? !1;
|
|
1313
1558
|
}
|
|
@@ -1331,11 +1576,11 @@ function W(e) {
|
|
|
1331
1576
|
fetchConfig: u
|
|
1332
1577
|
};
|
|
1333
1578
|
}
|
|
1334
|
-
var
|
|
1335
|
-
function
|
|
1579
|
+
var Z = 5e3;
|
|
1580
|
+
function Q(e) {
|
|
1336
1581
|
return e.authManager ? e.authManager.resolveUrl(m.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${m.health}`;
|
|
1337
1582
|
}
|
|
1338
|
-
async function
|
|
1583
|
+
async function $(e, t) {
|
|
1339
1584
|
let n = performance.now();
|
|
1340
1585
|
try {
|
|
1341
1586
|
let r = t ? await t.authenticatedFetch(m.health, {
|
|
@@ -1387,8 +1632,8 @@ async function q(e, t) {
|
|
|
1387
1632
|
};
|
|
1388
1633
|
}
|
|
1389
1634
|
}
|
|
1390
|
-
async function
|
|
1391
|
-
if (!e?.host || !e?.
|
|
1635
|
+
async function ee(e) {
|
|
1636
|
+
if (!e?.host || !e?.appKey) return {
|
|
1392
1637
|
ok: !1,
|
|
1393
1638
|
error: "WebSocket configuration not available"
|
|
1394
1639
|
};
|
|
@@ -1396,14 +1641,14 @@ async function J(e) {
|
|
|
1396
1641
|
ok: !1,
|
|
1397
1642
|
error: "WebSocket not supported in this environment"
|
|
1398
1643
|
};
|
|
1399
|
-
let t = `${e.port === 443 ? "wss" : "ws"}://${e.host}:${e.port}/app/${e.
|
|
1644
|
+
let t = `${e.port === 443 ? "wss" : "ws"}://${e.host}:${e.port}/app/${e.appKey}?protocol=7&client=js&version=8.4.0-rc2&flash=false`;
|
|
1400
1645
|
return new Promise((e) => {
|
|
1401
1646
|
let n = null, r = setTimeout(() => {
|
|
1402
1647
|
n?.close(), e({
|
|
1403
1648
|
ok: !1,
|
|
1404
1649
|
error: "WebSocket connection timed out"
|
|
1405
1650
|
});
|
|
1406
|
-
},
|
|
1651
|
+
}, Z);
|
|
1407
1652
|
try {
|
|
1408
1653
|
n = new WebSocket(t);
|
|
1409
1654
|
} catch (t) {
|
|
@@ -1423,8 +1668,8 @@ async function J(e) {
|
|
|
1423
1668
|
};
|
|
1424
1669
|
});
|
|
1425
1670
|
}
|
|
1426
|
-
async function
|
|
1427
|
-
let t = await
|
|
1671
|
+
async function te(e = {}) {
|
|
1672
|
+
let t = await $(Q(e), e.authManager), n = await ee(t.wsConfig);
|
|
1428
1673
|
return {
|
|
1429
1674
|
api: t.api,
|
|
1430
1675
|
websocket: n,
|
|
@@ -1432,13 +1677,13 @@ async function Y(e = {}) {
|
|
|
1432
1677
|
overall: t.api.ok && t.auth.ok
|
|
1433
1678
|
};
|
|
1434
1679
|
}
|
|
1435
|
-
function
|
|
1436
|
-
let { editor: n, channel: r, onOperation: i } =
|
|
1437
|
-
|
|
1680
|
+
function ne(e) {
|
|
1681
|
+
let { editor: n, channel: r, onOperation: i } = e;
|
|
1682
|
+
t(r, (e, t) => {
|
|
1438
1683
|
t && t.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
1439
|
-
|
|
1684
|
+
y(n, e), i?.(e);
|
|
1440
1685
|
});
|
|
1441
1686
|
});
|
|
1442
1687
|
}
|
|
1443
1688
|
//#endregion
|
|
1444
|
-
export {
|
|
1689
|
+
export { P as C, J as S, T as _, F as a, X as b, q as c, U as d, _ as f, N as g, M as h, G as i, a as l, C as m, O as n, H as o, S as p, B as r, Y as s, o as t, te as u, W as v, w as x, ne as y };
|