@templatical/editor 0.51.1 → 0.52.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/THIRD_PARTY_NOTICES.md +208 -0
- package/dist/{AiAltTextPopover-BZQ95GXL.js → AiAltTextPopover-DawbUywc.js} +16 -17
- package/dist/{AiAltTextReview-DoBEudnE.js → AiAltTextReview-9ySsXOTU.js} +25 -26
- package/dist/{AiChatPanel-Bs6sES3b.js → AiChatPanel-CupPhmsN.js} +141 -143
- package/dist/{AiPanels-CfN7A-ZA.js → AiPanels-DqT4PgQ0.js} +6 -8
- package/dist/{AiRewriteMenu-C3ZfDDYy.js → AiRewriteMenu-28agTycW.js} +66 -67
- package/dist/BlockIssueBadge-BxpDy3u-.js +33 -0
- package/dist/{BlockPreviewCanvas-BXNLLLYi.js → BlockPreviewCanvas-B-4bmJ3t.js} +26 -27
- package/dist/{CloudHeaderExtras-CsJMEiyN.js → CloudHeaderExtras-QI82yF54.js} +4 -5
- package/dist/{CloudPanels-B4F5m7vy.js → CloudPanels-BKJaLkUN.js} +52 -53
- package/dist/{CollaborationNotices-CNuDp7Y2.js → CollaborationNotices-CTw4JThq.js} +12 -13
- package/dist/{CollaboratorBar-BtHPiuHq.js → CollaboratorBar-CXQqN3VP.js} +16 -17
- package/dist/{CommentsPanel-CyCM-BvT.js → CommentsPanel-DwwFuh1h.js} +3 -5
- package/dist/CommentsSidebar-9ZfiC2DO.js +500 -0
- package/dist/{CountdownBlock-DR4Xm2-T.js → CountdownBlock-CU2yTWtF.js} +21 -22
- package/dist/{CountdownToolbar-CEIMPojJ.js → CountdownToolbar-BqoYzf_6.js} +55 -56
- package/dist/IssuesPanel-4ykrf1ax.js +359 -0
- package/dist/{LoadingTrack-B0RKQWq3.js → LoadingTrack-DM4g6j7b.js} +3 -4
- package/dist/{LogicTagInsertButton-CqfU52CO.js → LogicTagInsertButton-CfscnwCn.js} +243 -250
- package/dist/{MediaEditModal-DHtkZ4OU.js → MediaEditModal-Dy08GEwE.js} +449 -452
- package/dist/{MediaPanels-CGcOB2pR.js → MediaPanels-BgEp7iCp.js} +3 -5
- package/dist/{MergeTagInput-YnEkorTZ.js → MergeTagInput-B9dtUthD.js} +14 -15
- package/dist/{MergeTagModeToggle-Dhb1DAcQ.js → MergeTagModeToggle-DxujhYJ4.js} +30 -31
- package/dist/{MergeTagTextarea-e4lnwtqZ.js → MergeTagTextarea-CPFEjJZd.js} +12 -13
- package/dist/{ParagraphEditor-B6NK0ytw.js → ParagraphEditor-CWXfurGh.js} +233 -236
- package/dist/{RestoreVersionDialog-Bq_IGOLJ.js → RestoreVersionDialog-C4s_JYCx.js} +16 -17
- package/dist/{RichTextEditorContent-AOM6fylS.js → RichTextEditorContent-o6HmE8GR.js} +40 -40
- package/dist/{SaveBlockDialog-C8GngfQx.js → SaveBlockDialog-CWLrly6l.js} +58 -59
- package/dist/SavedBlocksBrowserModal-CE8n4EBS.js +359 -0
- package/dist/{SavedBlocksPanels-C2s3q0pJ.js → SavedBlocksPanels-BE1N9rNZ.js} +7 -9
- package/dist/{SavedBlocksPickBar-BjcTiV87.js → SavedBlocksPickBar-Dwl94xhP.js} +14 -15
- package/dist/{TemplateSettings-BVBWpiDU.js → TemplateSettings-CS0f1Ues.js} +75 -76
- package/dist/{TestEmailModal-SyhO9bn3.js → TestEmailModal-DBD0X5nV.js} +54 -56
- package/dist/{TestEmailPanel-BDd2Rtav.js → TestEmailPanel-DaFjP9QK.js} +3 -5
- package/dist/{TitleEditor-pxD53y_l.js → TitleEditor-DSqtle77.js} +78 -79
- package/dist/{ToggleSwitch-D51U9cmR.js → ToggleSwitch-JykPyD_8.js} +5 -6
- package/dist/{Toolbar-CZSPZYbj.js → Toolbar-BZPFfKrf.js} +977 -985
- package/dist/{TplModal-DCzBzicE.js → TplModal-DLMssVlt.js} +16 -17
- package/dist/{VersionHistoryMenu-BQeWPT85.js → VersionHistoryMenu-BkbYUs0Q.js} +37 -38
- package/dist/{VersionHistoryPanels-BBm7YbRQ.js → VersionHistoryPanels-DP7HaYWv.js} +5 -7
- package/dist/{VersionPreviewBanner-DUGF0tUJ.js → VersionPreviewBanner-DECaBwLq.js} +11 -12
- package/dist/WrapperBlock-BsJv_Fiw.js +44 -0
- package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +3 -5
- package/dist/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +2 -3
- package/dist/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +1 -2
- package/dist/{blockTypeIcons-NzaYvAI4.js → blockTypeIcons-BHjlPnPf.js} +23 -23
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +1 -2
- package/dist/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +1 -2
- package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js → AiAltTextPopover-SEEjkd-I.js} +24 -25
- package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js.map → AiAltTextPopover-SEEjkd-I.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js → AiAltTextReview-BGLLSKLm.js} +43 -44
- package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js.map → AiAltTextReview-BGLLSKLm.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js → AiChatPanel-DKDAaBNi.js} +129 -131
- package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js.map → AiChatPanel-DKDAaBNi.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js → AiPanels-0wBarZSH.js} +5 -7
- package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js.map → AiPanels-0wBarZSH.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-Bhh71zcc.js → AiRewriteMenu-qf-cfEpy.js} +52 -53
- package/dist/cdn/chunks/AiRewriteMenu-qf-cfEpy.js.map +1 -0
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js → BlockPreviewCanvas-DGBh6mqe.js} +22 -23
- package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js.map → BlockPreviewCanvas-DGBh6mqe.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js → CloudHeaderExtras-BMNK_F9p.js} +4 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js.map → CloudHeaderExtras-BMNK_F9p.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js → CloudPanels-JMWIoVWh.js} +34 -35
- package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js.map → CloudPanels-JMWIoVWh.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js → CollaborationNotices-Bsf1rGW9.js} +13 -14
- package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js.map → CollaborationNotices-Bsf1rGW9.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js → CollaboratorBar-CXByAoUz.js} +16 -17
- package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js.map → CollaboratorBar-CXByAoUz.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js → CommentsPanel-DoJnKLXI.js} +4 -6
- package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js.map → CommentsPanel-DoJnKLXI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CCvplq1Z.js → CommentsSidebar-CUtgvdBC.js} +110 -110
- package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js → CountdownBlock-BqRw147R.js} +19 -20
- package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js.map → CountdownBlock-BqRw147R.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js → CountdownToolbar-xobieKoU.js} +28 -29
- package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js.map → CountdownToolbar-xobieKoU.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js → IssuesPanel-C7LfxaAY.js} +76 -77
- package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js.map → IssuesPanel-C7LfxaAY.js.map} +1 -1
- package/dist/cdn/chunks/LoadingTrack-CZuLTazv.js +11 -0
- package/dist/cdn/chunks/{LoadingTrack-BIcL4NiY.js.map → LoadingTrack-CZuLTazv.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js → LogicTagInsertButton-BIi05UQu.js} +258 -265
- package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js.map → LogicTagInsertButton-BIi05UQu.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js → MediaEditModal-Cpcod6_U.js} +152 -155
- package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js.map → MediaEditModal-Cpcod6_U.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js → MediaPanels-BIdcW_1f.js} +4 -6
- package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js.map → MediaPanels-BIdcW_1f.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js → MergeTagInput-BvWg8o5E.js} +35 -36
- package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js.map → MergeTagInput-BvWg8o5E.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js → MergeTagModeToggle-BgKEVUtV.js} +28 -29
- package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js.map → MergeTagModeToggle-BgKEVUtV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js → MergeTagTextarea-tBz8McZf.js} +33 -34
- package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js.map → MergeTagTextarea-tBz8McZf.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CqSj6Ayz.js → ParagraphEditor-B3Rj_cWF.js} +197 -200
- package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js → RestoreVersionDialog-CjOdD2xj.js} +21 -22
- package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js.map → RestoreVersionDialog-CjOdD2xj.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js → RichTextEditorContent-DNjR_sNN.js} +30 -31
- package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js.map → RichTextEditorContent-DNjR_sNN.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js → SaveBlockDialog-CUhpawq0.js} +77 -78
- package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js.map → SaveBlockDialog-CUhpawq0.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js +356 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DtOz_X5S.js.map → SavedBlocksBrowserModal-BPYcRoGa.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js → SavedBlocksPanels-C6--Bc81.js} +4 -6
- package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js.map → SavedBlocksPanels-C6--Bc81.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js → SavedBlocksPickBar-DUavxpbU.js} +16 -17
- package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js.map → SavedBlocksPickBar-DUavxpbU.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js → TemplateSettings-CKtI-dof.js} +72 -73
- package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js.map → TemplateSettings-CKtI-dof.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js → TestEmailModal-CDQTgESD.js} +68 -70
- package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js.map → TestEmailModal-CDQTgESD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js → TestEmailPanel-CcUpEpAn.js} +4 -6
- package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js.map → TestEmailPanel-CcUpEpAn.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Ccv6uoTz.js → TitleEditor-Cob7RLyK.js} +71 -72
- package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +1 -0
- package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js → ToggleSwitch-J7Vwhvha.js} +6 -7
- package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js.map → ToggleSwitch-J7Vwhvha.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-DoprRgTn.js → Toolbar-CdpsvNOR.js} +977 -985
- package/dist/cdn/chunks/{Toolbar-DoprRgTn.js.map → Toolbar-CdpsvNOR.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-CFPDgbwQ.js +51 -0
- package/dist/cdn/chunks/{TplModal-BXQzmsJX.js.map → TplModal-CFPDgbwQ.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js → VersionHistoryMenu-BYlLRvRJ.js} +34 -35
- package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js.map → VersionHistoryMenu-BYlLRvRJ.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js → VersionHistoryPanels-C6SOVoiT.js} +4 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js.map → VersionHistoryPanels-C6SOVoiT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js → VersionPreviewBanner-Dvg0ZfAW.js} +12 -13
- package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js.map → VersionPreviewBanner-Dvg0ZfAW.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js → WrapperBlock-C7Md56IT.js} +14 -15
- package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js.map → WrapperBlock-C7Md56IT.js.map} +1 -1
- package/dist/cdn/chunks/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +4 -6
- package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js.map → aiErrors-C3QEMB0x.js.map} +1 -1
- package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +3 -4
- package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js.map → aiImageContext-BQ5mQ6B5.js.map} +1 -1
- package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +2 -3
- package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js.map → aiRewritePreview-DlMyx6Si.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js +21 -0
- package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js.map +1 -0
- package/dist/cdn/chunks/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +2 -3
- package/dist/cdn/chunks/{ca-C7mTzW1r.js.map → ca-CD-Kt1qz.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +2 -3
- package/dist/cdn/chunks/{ca-CYQH3J0b.js.map → ca-Cc6eL0ZS.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js → createCloudRuntime-Cth2JCEh.js} +58 -77
- package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js.map → createCloudRuntime-Cth2JCEh.js.map} +1 -1
- package/dist/cdn/chunks/{de-DBOTcDj2.js → de-6M4JoHoD.js} +2 -3
- package/dist/cdn/chunks/{de-DBOTcDj2.js.map → de-6M4JoHoD.js.map} +1 -1
- package/dist/cdn/chunks/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +2 -3
- package/dist/cdn/chunks/{de-DNuYQTmS.js.map → de-CeFJ6wbM.js.map} +1 -1
- package/dist/cdn/chunks/{de-JvCTMJPy.js → de-DtrXVcuY.js} +2 -3
- package/dist/cdn/chunks/{de-JvCTMJPy.js.map → de-DtrXVcuY.js.map} +1 -1
- package/dist/cdn/chunks/{dist-Bo8Thh8v.js → dist-8ym3y-pH.js} +44 -45
- package/dist/cdn/chunks/{dist-Bo8Thh8v.js.map → dist-8ym3y-pH.js.map} +1 -1
- package/dist/{dist-DI4_YSnG.js → cdn/chunks/dist-BMzNabtD.js} +107 -109
- package/dist/cdn/chunks/{dist-S-rLGqax.js.map → dist-BMzNabtD.js.map} +1 -1
- package/dist/cdn/chunks/dompurify-JVtr5-B1.js +872 -0
- package/dist/cdn/chunks/dompurify-JVtr5-B1.js.map +1 -0
- package/dist/cdn/chunks/{draggable-DZ0gwUJ6.js → draggable-Du8AUMFT.js} +654 -654
- package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +1 -0
- package/dist/{editor-modal-Bzhl-PgI.js → cdn/chunks/editor-modal-CyCe560f.js} +893 -979
- package/dist/cdn/chunks/{editor-modal-CI6EfeMd.js.map → editor-modal-CyCe560f.js.map} +1 -1
- package/dist/cdn/chunks/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +2 -3
- package/dist/cdn/chunks/{emojiData-6m0DBh7O.js.map → emojiData-CBNuCfum.js.map} +1 -1
- package/dist/cdn/chunks/{en-CW71OK66.js → en-D14i5nFh.js} +2 -3
- package/dist/cdn/chunks/{en-CW71OK66.js.map → en-D14i5nFh.js.map} +1 -1
- package/dist/cdn/chunks/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +2 -3
- package/dist/cdn/chunks/{en-CDhWRrF_.js.map → en-FzUuJ8HW.js.map} +1 -1
- package/dist/cdn/chunks/en-TIqv4ag3.js +1 -0
- package/dist/cdn/chunks/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +2 -3
- package/dist/cdn/chunks/{es-CAv-Vldw.js.map → es-Dw_h7Oll.js.map} +1 -1
- package/dist/cdn/chunks/{es-DdK7zQfi.js → es-zDacbMhs.js} +2 -3
- package/dist/cdn/chunks/{es-DdK7zQfi.js.map → es-zDacbMhs.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-taJTZlLK.js → extensions-CFF2KWy-.js} +60 -65
- package/dist/cdn/chunks/{extensions-taJTZlLK.js.map → extensions-CFF2KWy-.js.map} +1 -1
- package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +2 -3
- package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js.map → formatAbsoluteDateTime-Ck2_zXra.js.map} +1 -1
- package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +1 -2
- package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js.map → formatRelativeTime-BTD8Ktt-.js.map} +1 -1
- package/dist/cdn/chunks/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +2 -3
- package/dist/cdn/chunks/{fr-DVPtxpR6.js.map → fr-BJaeKu_8.js.map} +1 -1
- package/dist/cdn/chunks/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +2 -3
- package/dist/cdn/chunks/{fr-Dz5Bgb7-.js.map → fr-CSgYtjOd.js.map} +1 -1
- package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js → htmlparser-hu3YnNQU.js} +6 -11
- package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js.map → htmlparser-hu3YnNQU.js.map} +1 -1
- package/dist/cdn/chunks/{icons-DNX6StSs.js → icons-okSPsLOa.js} +111 -114
- package/dist/cdn/chunks/icons-okSPsLOa.js.map +1 -0
- package/dist/cdn/chunks/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +2 -3
- package/dist/cdn/chunks/{ja-Di-zJiT8.js.map → ja-B7H3ID8O.js.map} +1 -1
- package/dist/cdn/chunks/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +2 -3
- package/dist/cdn/chunks/{ja-dcWzjStz.js.map → ja-Cu2HdYaK.js.map} +1 -1
- package/dist/cdn/chunks/{keys-BTpmg2Tt.js → keys-CUj6UA38.js} +3 -4
- package/dist/cdn/chunks/{keys-BTpmg2Tt.js.map → keys-CUj6UA38.js.map} +1 -1
- package/dist/{liquid.browser-Ct2-EezB.js → cdn/chunks/liquid.browser-rubac0VA.js} +993 -937
- package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
- package/dist/cdn/chunks/{logger-Tj0RPskW.js → logger-CqQTfJGx.js} +2 -3
- package/dist/cdn/chunks/{logger-Tj0RPskW.js.map → logger-CqQTfJGx.js.map} +1 -1
- package/dist/cdn/chunks/{nl-CvVuHYFL.js → nl-176ySmc5.js} +2 -3
- package/dist/cdn/chunks/{nl-CvVuHYFL.js.map → nl-176ySmc5.js.map} +1 -1
- package/dist/cdn/chunks/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +2 -3
- package/dist/cdn/chunks/{nl-LZNqQgE4.js.map → nl-1Ai2NykB.js.map} +1 -1
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js → normalizeMergeTagMarkup-C_KlfSW4.js} +3 -4
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js.map → normalizeMergeTagMarkup-C_KlfSW4.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js → preRenderCustomBlocks-BcXIz7oJ.js} +6 -7
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js.map → preRenderCustomBlocks-BcXIz7oJ.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js.map → pt-BR-Bp92Fc6J.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js.map → pt-BR-CIbp__Z7.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js.map → pt-BR-dDlTwX18.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-Cs4GGEtd.js → pusher-x9rNqzon.js} +3 -4
- package/dist/cdn/chunks/{pusher-Cs4GGEtd.js.map → pusher-x9rNqzon.js.map} +1 -1
- package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +2 -3
- package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js.map → readableTextColor-BfZUGnVj.js.map} +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
- package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js +72 -0
- package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js → socialIcons-jsTDmkbb.js} +608 -632
- package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js.map → socialIcons-jsTDmkbb.js.map} +1 -1
- package/dist/cdn/chunks/src-C7bkofBL.js +647 -0
- package/dist/cdn/chunks/src-C7bkofBL.js.map +1 -0
- package/dist/cdn/chunks/{src-Bs_yxk3h.js → src-DEd87i_U.js} +502 -537
- package/dist/cdn/chunks/src-DEd87i_U.js.map +1 -0
- package/dist/cdn/chunks/{src-BNFnxfrA.js → src-DwWrYnUj.js} +188 -171
- package/dist/cdn/chunks/src-DwWrYnUj.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +2 -3
- package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js.map → styleConstants-B8xVRiwX.js.map} +1 -1
- package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +2 -3
- package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js.map → templateSettingsFields-cjlP-jdw.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-CtVrAViq.js → tiptap-CbiTlECY.js} +3402 -3278
- package/dist/cdn/chunks/tiptap-CbiTlECY.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js → useCloudI18n-DY8_-ETE.js} +4 -5
- package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js.map → useCloudI18n-DY8_-ETE.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +2582 -0
- package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-CR5GjJD6.js.map → useEditorRoot-vjZJwKrV.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-CbVubQhM.js → useI18n-D8pY4LTq.js} +4 -5
- package/dist/cdn/chunks/{useI18n-CbVubQhM.js.map → useI18n-D8pY4LTq.js.map} +1 -1
- package/dist/{useLogicTag-DKLZ1T9H.js → cdn/chunks/useLogicTag-DBJDtpKA.js} +6 -5
- package/dist/cdn/chunks/{useLogicTag-B49Nc53Y.js.map → useLogicTag-DBJDtpKA.js.map} +1 -1
- package/dist/{useMergeTag-Bhdx7AKk.js → cdn/chunks/useMergeTag-B-aG--s1.js} +8 -7
- package/dist/cdn/chunks/{useMergeTag-B0KryMj8.js.map → useMergeTag-B-aG--s1.js.map} +1 -1
- package/dist/{usePopoverPosition-BZea45XK.js → cdn/chunks/usePopoverPosition-DSMtmu2W.js} +8 -10
- package/dist/cdn/chunks/{usePopoverPosition-C829ps5i.js.map → usePopoverPosition-DSMtmu2W.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js → useScrollToBlock-vjQ0fe-L.js} +5 -7
- package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js.map → useScrollToBlock-vjQ0fe-L.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js → withCurrentFont-hZTvYBHO.js} +3 -4
- package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js.map → withCurrentFont-hZTvYBHO.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1433 -1454
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-yYsp5Xpk.js → check-BZ8o0eet.js} +1 -2
- package/dist/{chevron-down-DTmD06_j.js → chevron-down-DfAAfILv.js} +1 -2
- package/dist/{chevron-right-BSeYZOxc.js → chevron-right-Bk4mGdr7.js} +1 -2
- package/dist/{chevron-up-BOApwrxi.js → chevron-up-MhUf_azW.js} +1 -2
- package/dist/{circle-alert-BMszY8im.js → circle-alert-CShJwVFv.js} +1 -2
- package/dist/{clock-HADxnl6-.js → clock-CTfD6OCt.js} +1 -2
- package/dist/{createCloudRuntime-DVQI_ReU.js → createCloudRuntime-DCgO4A1r.js} +31 -37
- package/dist/{createLucideIcon-0lYYH3EW.js → createLucideIcon-CvhTA2KG.js} +6 -11
- package/dist/{de-DBOTcDj2.js → de-6M4JoHoD.js} +1 -2
- package/dist/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +1 -2
- package/dist/{de-JvCTMJPy.js → de-DtrXVcuY.js} +1 -2
- package/dist/{dist-BC-ZEYLd.js → dist-BF5zEHop.js} +2 -3
- package/dist/{dist-CyBwSiAa.js → dist-BS5uKktL.js} +2 -3
- package/dist/{cdn/chunks/dist-S-rLGqax.js → dist-ByCWA2Tv.js} +101 -101
- package/dist/{dist-DtOF3bDW.js → dist-CKi_npZM.js} +378 -343
- package/dist/{dist-C7EtxNCb.js → dist-CVy-7PHQ.js} +55 -56
- package/dist/{dist-Cr7RPxI9.js → dist-CWSG7Kj0.js} +478 -461
- package/dist/{dist-DXyGqIDE.js → dist-Cy8I5scI.js} +2 -3
- package/dist/{dist-C_dV9QAx.js → dist-D6cMdrfG.js} +133 -133
- package/dist/{dist-DVNjPKsH.js → dist-D6fZec6r.js} +3 -4
- package/dist/{dist-CuLwJF7H.js → dist-Dd5MU2Ev.js} +23 -14
- package/dist/dist-DyFArF_G.js +4 -0
- package/dist/{dist-DBxgrOeo.js → dist-V7W1UhVr.js} +1882 -1792
- package/dist/{dist-DPcf6XZ8.js → dist-p3wymUDt.js} +2 -3
- package/dist/dist-pA3ooG6N.js +4 -0
- package/dist/{dist-3HpYixwF.js → dist-txQLT2sF.js} +173 -161
- package/dist/{cdn/chunks/editor-modal-CI6EfeMd.js → editor-modal-zaZHcmlO.js} +915 -859
- package/dist/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +1 -2
- package/dist/{en-CW71OK66.js → en-D14i5nFh.js} +1 -2
- package/dist/en-Db76vJbY.js +1 -0
- package/dist/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +1 -2
- package/dist/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +1 -2
- package/dist/{es-DdK7zQfi.js → es-zDacbMhs.js} +1 -2
- package/dist/{extensions-CdyweA50.js → extensions-fo_c-vqf.js} +82 -91
- package/dist/{eye-DWkSvYpj.js → eye-7W4t5e0Q.js} +1 -2
- package/dist/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +1 -2
- package/dist/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +0 -1
- package/dist/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +1 -2
- package/dist/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +1 -2
- package/dist/{image-DesWjcZ4.js → image-BDiRFzSd.js} +1 -2
- package/dist/index.d.ts +6 -6
- package/dist/{info-ClWJGoZy.js → info-Cxi3-Kh9.js} +1 -2
- package/dist/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +1 -2
- package/dist/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +1 -2
- package/dist/{keys-Zd9KWRD1.js → keys-BgRERHzu.js} +2 -3
- package/dist/{link-BqRicFTA.js → link-ju_2Cmir.js} +1 -2
- package/dist/{cdn/chunks/liquid.browser-Bbt17cVz.js → liquid.browser-DUXEekoN.js} +991 -939
- package/dist/{list-bojQr9bn.js → list-DYZJf0aZ.js} +1 -2
- package/dist/{loader-circle-B2B8LbUu.js → loader-circle-BZRD0a4I.js} +1 -2
- package/dist/{logger-k9Nbj3Cp.js → logger-BOu7oEtk.js} +1 -2
- package/dist/{message-circle-BEuiNsyZ.js → message-circle-DuEw4Zfx.js} +1 -2
- package/dist/{nl-CvVuHYFL.js → nl-176ySmc5.js} +1 -2
- package/dist/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +1 -2
- package/dist/{normalizeMergeTagMarkup-P6SUBuPv.js → normalizeMergeTagMarkup-CELnOlgK.js} +30 -31
- package/dist/{package-DCROB4aM.js → package-CePMr2kK.js} +1 -2
- package/dist/{pencil-CEotCKbf.js → pencil-D3aFCL7c.js} +1 -2
- package/dist/{preRenderCustomBlocks-D8rr61_z.js → preRenderCustomBlocks--_xc0XK3.js} +4 -5
- package/dist/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +1 -2
- package/dist/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +1 -2
- package/dist/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +1 -2
- package/dist/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +1 -2
- package/dist/{refresh-cw-C6M2mHNC.js → refresh-cw-xnro7_Sk.js} +1 -2
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{runtime-dom.esm-bundler-B8WCZWUm.js → runtime-dom.esm-bundler-BURR-bj5.js} +121 -122
- package/dist/sanitizeHtml-BzfzpYJY.js +942 -0
- package/dist/{search-Cy99zPYf.js → search-CDrstRBv.js} +1 -2
- package/dist/{send-BDLJFsf3.js → send-DROkPOaX.js} +1 -2
- package/dist/{smartphone-CVvQaNA4.js → smartphone-Bx6u_tjn.js} +1 -2
- package/dist/{socialIcons-Dd-jRiVe.js → socialIcons-D7MGsg0d.js} +553 -564
- package/dist/{sparkles-Ce0Qz0ox.js → sparkles-CdaTtvoz.js} +1 -2
- package/dist/{square-BWlolnXe.js → square-BbCROH_f.js} +1 -2
- package/dist/style.css +1 -1
- package/dist/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +1 -2
- package/dist/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +1 -2
- package/dist/templatical-editor.js +1231 -1251
- package/dist/{text-align-start-D1V5gPTy.js → text-align-start-CGacJ9Vw.js} +1 -2
- package/dist/{trash-CZfiUFmw.js → trash-DxCd7zIy.js} +1 -2
- package/dist/{triangle-alert-CFDzyFC7.js → triangle-alert-7_oaitpf.js} +1 -2
- package/dist/{upload-BJfvdIrD.js → upload-DuFEOi_0.js} +1 -2
- package/dist/{useCloudI18n-Dcjua65H.js → useCloudI18n-DEMmUKuO.js} +3 -4
- package/dist/{useEditorCore-BTLeAVlM.js → useEditorCore-BSo2sSID.js} +1568 -1573
- package/dist/useEditorRoot-BMcoCLBx.js +7 -0
- package/dist/{useI18n-BdoY7xDE.js → useI18n-BBrHTdu8.js} +3 -4
- package/dist/{cdn/chunks/useLogicTag-B49Nc53Y.js → useLogicTag-ZPC39rfH.js} +4 -7
- package/dist/{cdn/chunks/useMergeTag-B0KryMj8.js → useMergeTag-BQ4qqWpQ.js} +6 -9
- package/dist/{cdn/chunks/usePopoverPosition-C829ps5i.js → usePopoverPosition-DV1PxL66.js} +6 -12
- package/dist/{useScrollToBlock-FmNMALM_.js → useScrollToBlock-BSyAV4pk.js} +4 -6
- package/dist/{vue.runtime.esm-bundler-DgFJ6GPG.js → vue.runtime.esm-bundler-CnEeTfhs.js} +1001 -1002
- package/dist/{withCurrentFont-BATJHNve.js → withCurrentFont-B22FXAF5.js} +2 -3
- package/dist/{x-CZ0Js0hA.js → x-BpfG7v9g.js} +1 -2
- package/package.json +26 -24
- package/dist/BlockIssueBadge-CKwZ1Vgn.js +0 -34
- package/dist/CommentsSidebar-Ca3DyFOX.js +0 -500
- package/dist/IssuesPanel-C8nMUccy.js +0 -360
- package/dist/SavedBlocksBrowserModal-wnkvxpm_.js +0 -360
- package/dist/WrapperBlock-BO619LAb.js +0 -45
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-DAn2vsMJ.js +0 -35
- package/dist/cdn/chunks/BlockIssueBadge-DAn2vsMJ.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js.map +0 -1
- package/dist/cdn/chunks/LoadingTrack-BIcL4NiY.js +0 -12
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +0 -357
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js.map +0 -1
- package/dist/cdn/chunks/TplModal-BXQzmsJX.js +0 -52
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js.map +0 -1
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +0 -1
- package/dist/cdn/chunks/en-ifvu6oPv.js +0 -1
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-Bbt17cVz.js.map +0 -1
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +0 -62
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +0 -1
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +0 -1
- package/dist/cdn/chunks/src-Bs_yxk3h.js.map +0 -1
- package/dist/cdn/chunks/src-YGkzYyu0.js +0 -649
- package/dist/cdn/chunks/src-YGkzYyu0.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +0 -2586
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +0 -10
- package/dist/dist-BPFcLKTw.js +0 -5
- package/dist/dist-D7Yj7E-F.js +0 -5
- package/dist/en-DwV15ltA.js +0 -1
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +0 -60
- package/dist/useEditorRoot-DUy67lJu.js +0 -8
|
@@ -1,68 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { R as ae } from "./useEditorCore-
|
|
4
|
-
import { C as oe, F as
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import { v as
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
function
|
|
1
|
+
import { C as e, D as t, G as n, I as r, P as i, V as a, W as ee, _ as o, a as te, b as s, et as c, ft as l, g as u, h as d, m as f, o as ne, p, st as m, u as h, ut as g, x as _ } from "./draggable-Du8AUMFT.js";
|
|
2
|
+
import { O as re, l as ie } from "./src-DwWrYnUj.js";
|
|
3
|
+
import { R as ae } from "./useEditorCore-BrY66C2y.js";
|
|
4
|
+
import { C as oe, F as v, H as se, M as y, O as ce, g as le } from "./keys-CUj6UA38.js";
|
|
5
|
+
import { t as ue } from "./useI18n-D8pY4LTq.js";
|
|
6
|
+
import { Bt as de, at as fe } from "./icons-okSPsLOa.js";
|
|
7
|
+
import { v as pe } from "./styleConstants-B8xVRiwX.js";
|
|
8
|
+
import { n as me, t as he } from "./MergeTagModeToggle-BgKEVUtV.js";
|
|
9
|
+
import { t as ge } from "./TplModal-CFPDgbwQ.js";
|
|
10
|
+
import { t as b } from "./BlockPreviewCanvas-DGBh6mqe.js";
|
|
11
|
+
// src/utils/validateEmailShape.ts
|
|
12
|
+
var x = /[,;<>()[\]\\"'`|/?#@!$%^&*+=~{}]/;
|
|
13
|
+
function S(e) {
|
|
14
14
|
let t = e.trim();
|
|
15
15
|
if (t.length === 0 || /\s/.test(t)) return !1;
|
|
16
16
|
let n = t.split("@");
|
|
17
17
|
if (n.length !== 2) return !1;
|
|
18
18
|
let [r, i] = n;
|
|
19
|
-
if (r.length === 0 ||
|
|
19
|
+
if (r.length === 0 || x.test(i)) return !1;
|
|
20
20
|
let a = i.indexOf(".");
|
|
21
21
|
return a > 0 && a < i.length - 1;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var S = ["aria-busy"], C = {
|
|
23
|
+
// src/components/TestEmailModal.vue?vue&type=script&setup=true&lang.ts
|
|
24
|
+
var C = ["aria-busy"], w = {
|
|
26
25
|
id: "tpl-test-email-title",
|
|
27
26
|
class: "tpl:mb-4 tpl:shrink-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
28
|
-
},
|
|
27
|
+
}, T = { class: "tpl:mb-3 tpl:shrink-0" }, E = {
|
|
29
28
|
for: "tpl-test-email-recipient",
|
|
30
29
|
class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]"
|
|
31
|
-
},
|
|
30
|
+
}, D = ["value"], O = ["disabled"], k = ["value"], A = ["placeholder", "disabled"], j = {
|
|
32
31
|
key: 3,
|
|
33
32
|
class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
34
|
-
},
|
|
33
|
+
}, M = { class: "tpl:mb-2 tpl:shrink-0" }, N = { class: "tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-between tpl:gap-2" }, P = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, F = { class: "tpl:flex tpl:items-center tpl:gap-2" }, I = {
|
|
35
34
|
"data-testid": "test-email-preview-hint",
|
|
36
35
|
class: "tpl:mt-1 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
37
|
-
},
|
|
36
|
+
}, L = {
|
|
38
37
|
id: "tpl-test-email-preview",
|
|
39
38
|
"data-testid": "test-email-preview",
|
|
40
39
|
class: "tpl:mb-3 tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-sm)] tpl:p-3 tpl:bg-[var(--tpl-canvas-bg)]"
|
|
41
|
-
},
|
|
40
|
+
}, _e = {
|
|
42
41
|
key: 0,
|
|
43
42
|
role: "status",
|
|
44
43
|
"aria-busy": "true",
|
|
45
44
|
"data-testid": "preview-resolution-loading",
|
|
46
45
|
class: "tpl:flex tpl:flex-col tpl:gap-3"
|
|
47
|
-
},
|
|
46
|
+
}, ve = { class: "tpl:sr-only" }, ye = {
|
|
48
47
|
key: 1,
|
|
49
48
|
role: "status",
|
|
50
49
|
"data-testid": "preview-resolution-failed",
|
|
51
50
|
class: "tpl:mb-2 tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
52
|
-
},
|
|
51
|
+
}, be = {
|
|
53
52
|
key: 0,
|
|
54
53
|
role: "status",
|
|
55
54
|
"data-testid": "test-email-success",
|
|
56
55
|
class: "tpl:mb-3 tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success,var(--tpl-primary))]"
|
|
57
|
-
},
|
|
56
|
+
}, xe = {
|
|
58
57
|
key: 1,
|
|
59
58
|
role: "alert",
|
|
60
59
|
"data-testid": "test-email-error",
|
|
61
60
|
class: "tpl:mb-3 tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
62
|
-
},
|
|
61
|
+
}, Se = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2" }, Ce = ["disabled"], we = ["disabled"], Te = {
|
|
63
62
|
key: 0,
|
|
64
63
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
65
|
-
}, Ee = { key: 1 }, R = /* @__PURE__ */
|
|
64
|
+
}, Ee = { key: 1 }, R = /* @__PURE__ */ e({
|
|
66
65
|
__name: "TestEmailModal",
|
|
67
66
|
props: {
|
|
68
67
|
visible: { type: Boolean },
|
|
@@ -73,28 +72,28 @@ var S = ["aria-busy"], C = {
|
|
|
73
72
|
error: {}
|
|
74
73
|
},
|
|
75
74
|
emits: ["send", "close"],
|
|
76
|
-
setup(
|
|
77
|
-
let R =
|
|
75
|
+
setup(e, { emit: x }) {
|
|
76
|
+
let R = e, z = x, { t: B } = ue(), De = t(le, null), V = t(oe, void 0), H = c(""), U = c("desktop"), Oe = t(se, void 0), W = ae({
|
|
78
77
|
resolvePreview: Oe ?? void 0,
|
|
79
78
|
getContent: () => {
|
|
80
79
|
let e = De?.content.value ?? {
|
|
81
80
|
blocks: [],
|
|
82
81
|
settings: {}
|
|
83
82
|
};
|
|
84
|
-
return V && R.visible ?
|
|
83
|
+
return V && R.visible ? re(V, e) : e;
|
|
85
84
|
},
|
|
86
85
|
isActive: () => R.visible,
|
|
87
86
|
getRecipient: () => H.value || void 0
|
|
88
|
-
}), G =
|
|
87
|
+
}), G = t(y, null), K = c(ie(t(ce, v).value)), q = p({
|
|
89
88
|
get: () => W.isConfigured ? !1 : G?.value ?? K.value,
|
|
90
89
|
set: (e) => {
|
|
91
90
|
G ? G.value = e : K.value = e;
|
|
92
91
|
}
|
|
93
|
-
}), ke =
|
|
94
|
-
|
|
92
|
+
}), ke = p(() => W.content.value.blocks ?? []), Ae = p(() => W.content.value.settings), J = p(() => R.allowedRecipients !== void 0 && R.allowedRecipients.length > 0), je = p(() => R.allowedRecipients?.length === 1);
|
|
93
|
+
a(() => R.visible, (e) => {
|
|
95
94
|
e && (H.value = R.defaultRecipient ?? R.allowedRecipients?.[0] ?? "");
|
|
96
95
|
}, { immediate: !0 });
|
|
97
|
-
let Y =
|
|
96
|
+
let Y = p(() => J.value ? H.value.length > 0 : S(H.value)), X = p(() => Y.value && !R.isSending && !R.justSent), Me = p(() => !J.value && H.value.trim().length > 0 && !Y.value), Z = p(() => R.error ? R.error.kind === "provider" ? R.error.message : B.testEmail.recipientNotAllowed : null);
|
|
98
97
|
function Q() {
|
|
99
98
|
X.value && z("send", H.value.trim());
|
|
100
99
|
}
|
|
@@ -104,15 +103,15 @@ var S = ["aria-busy"], C = {
|
|
|
104
103
|
function Ne(e) {
|
|
105
104
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q()), e.key === "Escape" && $();
|
|
106
105
|
}
|
|
107
|
-
return (
|
|
108
|
-
visible:
|
|
106
|
+
return (t, a) => (i(), d(ge, {
|
|
107
|
+
visible: e.visible,
|
|
109
108
|
onClose: $,
|
|
110
109
|
onKeydown: Ne
|
|
111
110
|
}, {
|
|
112
|
-
default:
|
|
111
|
+
default: ee(() => [f("div", {
|
|
113
112
|
role: "dialog",
|
|
114
113
|
"aria-modal": "true",
|
|
115
|
-
"aria-busy":
|
|
114
|
+
"aria-busy": e.isSending,
|
|
116
115
|
"aria-labelledby": "tpl-test-email-title",
|
|
117
116
|
class: "tpl-scale-in tpl:flex tpl:max-h-[90%] tpl:w-full tpl:max-w-3xl tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
|
|
118
117
|
style: {
|
|
@@ -120,10 +119,10 @@ var S = ["aria-busy"], C = {
|
|
|
120
119
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
121
120
|
}
|
|
122
121
|
}, [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
je.value ? (i(),
|
|
122
|
+
f("h3", w, l(m(B).testEmail.title), 1),
|
|
123
|
+
f("div", T, [
|
|
124
|
+
f("label", E, l(m(B).testEmail.recipientLabel), 1),
|
|
125
|
+
je.value ? (i(), o("input", {
|
|
127
126
|
key: 0,
|
|
128
127
|
id: "tpl-test-email-recipient",
|
|
129
128
|
type: "text",
|
|
@@ -131,43 +130,43 @@ var S = ["aria-busy"], C = {
|
|
|
131
130
|
disabled: "",
|
|
132
131
|
"data-testid": "test-email-recipient",
|
|
133
132
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
134
|
-
}, null, 8,
|
|
133
|
+
}, null, 8, D)) : J.value ? n((i(), o("select", {
|
|
135
134
|
key: 1,
|
|
136
135
|
id: "tpl-test-email-recipient",
|
|
137
|
-
"onUpdate:modelValue":
|
|
138
|
-
disabled:
|
|
136
|
+
"onUpdate:modelValue": a[0] ||= (e) => H.value = e,
|
|
137
|
+
disabled: e.isSending || e.justSent,
|
|
139
138
|
"data-testid": "test-email-recipient",
|
|
140
139
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
141
|
-
}, [(i(!0),
|
|
140
|
+
}, [(i(!0), o(h, null, r(e.allowedRecipients, (e) => (i(), o("option", {
|
|
142
141
|
key: e,
|
|
143
142
|
value: e
|
|
144
|
-
}, l(e), 9,
|
|
143
|
+
}, l(e), 9, k))), 128))], 8, O)), [[te, H.value]]) : n((i(), o("input", {
|
|
145
144
|
key: 2,
|
|
146
145
|
id: "tpl-test-email-recipient",
|
|
147
|
-
"onUpdate:modelValue":
|
|
146
|
+
"onUpdate:modelValue": a[1] ||= (e) => H.value = e,
|
|
148
147
|
type: "email",
|
|
149
148
|
autocomplete: "email",
|
|
150
149
|
spellcheck: "false",
|
|
151
150
|
placeholder: m(B).testEmail.recipientPlaceholder,
|
|
152
|
-
disabled:
|
|
151
|
+
disabled: e.isSending || e.justSent,
|
|
153
152
|
"data-testid": "test-email-recipient",
|
|
154
153
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
155
|
-
}, null, 8,
|
|
156
|
-
Me.value ? (i(),
|
|
154
|
+
}, null, 8, A)), [[ne, H.value]]),
|
|
155
|
+
Me.value ? (i(), o("p", j, l(m(B).testEmail.invalidAddress), 1)) : u("", !0)
|
|
157
156
|
]),
|
|
158
|
-
|
|
157
|
+
f("div", M, [f("div", N, [f("span", P, l(m(B).testEmail.preview), 1), f("div", F, [m(W).supersedesSamples.value ? u("", !0) : (i(), d(he, {
|
|
159
158
|
key: 0,
|
|
160
159
|
"sample-mode": q.value,
|
|
161
|
-
onChange:
|
|
162
|
-
}, null, 8, ["sample-mode"])), _(
|
|
160
|
+
onChange: a[2] ||= (e) => q.value = e
|
|
161
|
+
}, null, 8, ["sample-mode"])), _(me, {
|
|
163
162
|
viewport: U.value,
|
|
164
|
-
onChange:
|
|
165
|
-
}, null, 8, ["viewport"])])]),
|
|
166
|
-
|
|
163
|
+
onChange: a[3] ||= (e) => U.value = e
|
|
164
|
+
}, null, 8, ["viewport"])])]), f("p", I, l(m(W).supersedesSamples.value ? m(B).previewResolution.hint : q.value ? m(B).testEmail.previewHintSample : m(B).testEmail.previewHint), 1)]),
|
|
165
|
+
f("div", L, [m(W).isInitialResolve.value ? (i(), o("div", _e, [f("span", ve, l(m(B).previewResolution.resolving), 1), (i(), o(h, null, r(3, (e) => f("div", {
|
|
167
166
|
key: e,
|
|
168
167
|
"aria-hidden": "true",
|
|
169
168
|
class: "tpl-pulse tpl:h-16 tpl:rounded-md tpl:bg-[var(--tpl-bg-hover)]"
|
|
170
|
-
})), 64))])) : m(W).hasFailed.value ? (i(),
|
|
169
|
+
})), 64))])) : m(W).hasFailed.value ? (i(), o("p", ye, l(m(B).previewResolution.failed), 1)) : u("", !0), m(W).isInitialResolve.value ? u("", !0) : (i(), d(b, {
|
|
171
170
|
key: 2,
|
|
172
171
|
blocks: ke.value,
|
|
173
172
|
settings: Ae.value,
|
|
@@ -179,33 +178,32 @@ var S = ["aria-busy"], C = {
|
|
|
179
178
|
"viewport",
|
|
180
179
|
"apply-condition-filter"
|
|
181
180
|
]))]),
|
|
182
|
-
|
|
181
|
+
e.justSent ? (i(), o("p", be, [_(m(de), {
|
|
183
182
|
size: 13,
|
|
184
183
|
"stroke-width": 2.5
|
|
185
|
-
}),
|
|
186
|
-
|
|
184
|
+
}), s(" " + l(m(B).testEmail.success), 1)])) : Z.value ? (i(), o("p", xe, l(Z.value), 1)) : u("", !0),
|
|
185
|
+
f("div", Se, [f("button", {
|
|
187
186
|
type: "button",
|
|
188
187
|
"data-testid": "test-email-cancel",
|
|
189
|
-
class:
|
|
190
|
-
disabled:
|
|
188
|
+
class: g(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": e.isSending }]),
|
|
189
|
+
disabled: e.isSending,
|
|
191
190
|
onClick: $
|
|
192
|
-
}, l(m(B).testEmail.cancel), 11, Ce),
|
|
191
|
+
}, l(m(B).testEmail.cancel), 11, Ce), f("button", {
|
|
193
192
|
type: "button",
|
|
194
193
|
"data-testid": "test-email-send",
|
|
195
|
-
class:
|
|
194
|
+
class: g(m(pe)),
|
|
196
195
|
disabled: !X.value,
|
|
197
196
|
onClick: Q
|
|
198
|
-
}, [
|
|
197
|
+
}, [e.isSending ? (i(), o("span", Te, [_(m(fe), {
|
|
199
198
|
class: "tpl:animate-spin",
|
|
200
199
|
size: 12,
|
|
201
200
|
"stroke-width": 2
|
|
202
|
-
}),
|
|
203
|
-
], 8,
|
|
201
|
+
}), s(" " + l(m(B).testEmail.sending), 1)])) : (i(), o("span", Ee, l(m(B).testEmail.send), 1))], 10, we)])
|
|
202
|
+
], 8, C)]),
|
|
204
203
|
_: 1
|
|
205
204
|
}, 8, ["visible"]));
|
|
206
205
|
}
|
|
207
206
|
});
|
|
208
|
-
//#endregion
|
|
209
207
|
export { R as default };
|
|
210
208
|
|
|
211
|
-
//# sourceMappingURL=TestEmailModal-
|
|
209
|
+
//# sourceMappingURL=TestEmailModal-CDQTgESD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestEmailModal-BUVTj3Ic.js","names":["_openBlock","_createBlock","TplModal","_withCtx","_createElementVNode","_toDisplayString","_unref","_createElementBlock","_withDirectives","_Fragment","_renderList","_vModelSelect","_vModelText","_createCommentVNode","MergeTagModeToggle","_createVNode","ViewportToggle","BlockPreviewCanvas","_createTextVNode","_normalizeClass","_sfc_main","ref","defineComponent","inject","renderList","openBlock","withCtx","watch","withDirectives","createElementBlock","vModelSelect","createTextVNode","toDisplayString","createCommentVNode","createBlock","normalizeClass","createBaseVNode","vModelText","unref","computed","Fragment","createVNode","hasMergeTagSamples","applyLayout","usePreviewResolution","LAYOUT_KEY","NO_MERGE_TAGS","RESOLVE_PREVIEW_KEY","MERGE_TAG_SAMPLE_MODE_KEY","MERGE_TAGS_KEY","EDITOR_KEY","useI18n","LoaderCircle","Check","primaryBtnClass","ViewportToggle_default","MergeTagModeToggle_default","TplModal_default","BlockPreviewCanvas_default","IMPOSSIBLE_DOMAIN_CHARS","looksLikeEmail","trimmed","value","parts","local","domain","dot","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","TestEmailModal_default","__emit","props","__props","emit","editor","layout","recipient","previewViewport","resolvePreviewHook","previewResolution","raw","sharedSampleMode","localSampleMode","sampleMode","on","previewBlocks","previewSettings","hasAllowlist","isSingleRecipient","visible","isRecipientValid","canSend","showShapeHint","errorText","t","handleSend","handleClose","handleKeydown","event","_cache","$event","email","n"],"sources":["../../../src/utils/validateEmailShape.ts","../../../src/components/TestEmailModal.vue","../../../src/components/TestEmailModal.vue"],"sourcesContent":["/**\n * Characters that cannot appear in a domain but routinely arrive attached to one.\n *\n * A **denylist**, not an allowlist, so unicode domains keep working — an\n * allowlist of `[a-z0-9.-]` would be the stricter, more obviously \"correct\"\n * choice and would reject them. What this actually targets is the punctuation\n * that comes from pasting out of a list or a mail client: `user@example.com,`\n * and `<user@example.com>`.\n */\nconst IMPOSSIBLE_DOMAIN_CHARS = /[,;<>()[\\]\\\\\"'`|/?#@!$%^&*+=~{}]/;\n\n/**\n * Does this string look like an email address?\n *\n * Deliberately loose: non-empty, no whitespace, exactly one `@`, a non-empty\n * local part, and a domain containing a dot with something either side and no\n * impossible characters. That is enough to catch the mistakes a typo actually\n * produces — a missing `@`, a trailing comma, a half-typed domain — before the\n * user pays for a round-trip.\n *\n * **Do not \"improve\" this into an RFC-ish regex.** Those reliably reject valid\n * addresses (plus-addressing, long new gTLDs, unicode domains) and the resulting\n * bug reports cost far more than the malformed addresses they catch. Only the\n * receiving mail server can really tell, and the sending backend has to validate\n * anyway — this is a fast-feedback affordance, not a gate. `validateEmailShape`\n * has its own test file pinning the addresses that must keep passing.\n */\nexport function looksLikeEmail(value: string): boolean {\n const trimmed = value.trim();\n if (trimmed.length === 0) return false;\n if (/\\s/.test(trimmed)) return false;\n\n const parts = trimmed.split(\"@\");\n if (parts.length !== 2) return false;\n\n const [local, domain] = parts;\n if (local.length === 0) return false;\n if (IMPOSSIBLE_DOMAIN_CHARS.test(domain)) return false;\n\n // A dot with at least one character either side, so `a@b` and `a@b.` fail but\n // `a@b.c` and `a@sub.example.museum` pass.\n const dot = domain.indexOf(\".\");\n return dot > 0 && dot < domain.length - 1;\n}\n","<script setup lang=\"ts\">\nimport { primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Send-a-test dialog, shared by the OSS and Cloud editors.\n *\n * The recipient control has three shapes, driven entirely by whether the\n * provider configured an allowlist:\n *\n * - **no allowlist** — free text, validated for shape only. This branch exists\n * for BYO senders; Cloud never takes it, because its list comes from a signed\n * JWT.\n * - **exactly one** — a read-only field. Preserved verbatim from the Cloud-only\n * version; there is nothing to choose, so offering an editable field would\n * imply otherwise.\n * - **several** — a picker of exactly those addresses.\n *\n * An empty allowlist never reaches here: the feature reports itself unavailable,\n * so no trigger renders. (The Cloud-only version fell through to `v-else` and\n * rendered a select with no options and a permanently disabled Send.)\n */\nimport TplModal from \"./TplModal.vue\";\n// Statically imported: this modal is already lazy-loaded as a whole, so the\n// preview rides its chunk rather than costing a second round-trip and flashing\n// an empty frame. Still shared with the saved-blocks surfaces, which lazy-load\n// it themselves.\nimport BlockPreviewCanvas from \"./BlockPreviewCanvas.vue\";\n// The editor header's own control, reused verbatim so the two viewport switches\n// are the same component rather than two things that resemble each other.\nimport ViewportToggle from \"./ViewportToggle.vue\";\nimport MergeTagModeToggle from \"./MergeTagModeToggle.vue\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { looksLikeEmail } from \"../utils/validateEmailShape\";\nimport { Check, LoaderCircle } from \"@lucide/vue\";\nimport { computed, inject, ref, watch } from \"vue\";\nimport {\n applyLayout,\n hasMergeTagSamples,\n type ViewportSize,\n} from \"@templatical/types\";\nimport {\n EDITOR_KEY,\n LAYOUT_KEY,\n MERGE_TAGS_KEY,\n NO_MERGE_TAGS,\n MERGE_TAG_SAMPLE_MODE_KEY,\n RESOLVE_PREVIEW_KEY,\n} from \"../keys\";\nimport { usePreviewResolution } from \"../composables/usePreviewResolution\";\nimport type { TestEmailError } from \"../composables/useTestEmailFeature\";\n\nconst props = defineProps<{\n visible: boolean;\n /** Omitted / undefined means unrestricted, so the field accepts free text. */\n allowedRecipients?: string[];\n defaultRecipient?: string;\n isSending: boolean;\n justSent: boolean;\n error: TestEmailError | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"send\", recipient: string): void;\n (e: \"close\"): void;\n}>();\n\nconst { t } = useI18n();\nconst editor = inject(EDITOR_KEY, null);\nconst layout = inject(LAYOUT_KEY, undefined);\n\nconst recipient = ref(\"\");\n\nconst previewViewport = ref<ViewportSize>(\"desktop\");\n\n/**\n * Its own resolution instance rather than the editor's, because this dialog has\n * a recipient and the editor's preview does not — resolving for \"whoever is\n * selected here\" is a different question from resolving for the canvas.\n * `isActive` is the dialog's own visibility.\n *\n * Compose the embedder shell while the dialog is showing. The send payload\n * stays unshelled.\n */\nconst resolvePreviewHook = inject(RESOLVE_PREVIEW_KEY, undefined);\nconst previewResolution = usePreviewResolution({\n resolvePreview: resolvePreviewHook ?? undefined,\n getContent: () => {\n const raw = editor?.content.value ?? { blocks: [], settings: {} as never };\n return layout && props.visible ? applyLayout(layout, raw) : raw;\n },\n isActive: () => props.visible,\n getRecipient: () => recipient.value || undefined,\n});\n\n/**\n * Shared with the editor's own preview, so switching here and switching there\n * are the same choice — it is a property of how the user wants to read a\n * preview, not of one dialog. Falls back to a local ref for headless mounts.\n */\nconst sharedSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\n// Seeded from availability, matching how `useEditorCore` seeds the shared ref.\n// A blanket `true` would make the dialog claim tags \"show example values\" for a\n// consumer who configured none — false, and with no toggle rendered to correct\n// it, since the toggle hides itself when nothing has a sample.\nconst localSampleMode = ref(\n hasMergeTagSamples(inject(MERGE_TAGS_KEY, NO_MERGE_TAGS).value),\n);\nconst sampleMode = computed({\n get: () =>\n // Off entirely while a resolver is configured — same rule as the canvas.\n previewResolution.isConfigured\n ? false\n : (sharedSampleMode?.value ?? localSampleMode.value),\n set: (on: boolean) => {\n if (sharedSampleMode) sharedSampleMode.value = on;\n else localSampleMode.value = on;\n },\n});\n\nconst previewBlocks = computed(\n () => previewResolution.content.value.blocks ?? [],\n);\n\nconst previewSettings = computed(\n () => previewResolution.content.value.settings,\n);\n\nconst hasAllowlist = computed(\n () =>\n props.allowedRecipients !== undefined && props.allowedRecipients.length > 0,\n);\nconst isSingleRecipient = computed(() => props.allowedRecipients?.length === 1);\n\n// Mounted behind a `v-if` on the same state that drives `visible`, so it can\n// mount with `visible` already true — without `immediate` the field would never\n// be seeded.\nwatch(\n () => props.visible,\n (visible) => {\n if (!visible) return;\n recipient.value =\n props.defaultRecipient ?? props.allowedRecipients?.[0] ?? \"\";\n },\n { immediate: true },\n);\n\n/** Shape-check free text only; a picker can't produce a malformed value. */\nconst isRecipientValid = computed(() =>\n hasAllowlist.value\n ? recipient.value.length > 0\n : looksLikeEmail(recipient.value),\n);\n\nconst canSend = computed(\n () => isRecipientValid.value && !props.isSending && !props.justSent,\n);\n\n/** Free text that's been typed into but isn't yet a plausible address. */\nconst showShapeHint = computed(\n () =>\n !hasAllowlist.value &&\n recipient.value.trim().length > 0 &&\n !isRecipientValid.value,\n);\n\nconst errorText = computed(() => {\n if (!props.error) return null;\n return props.error.kind === \"provider\"\n ? props.error.message\n : t.testEmail.recipientNotAllowed;\n});\n\nfunction handleSend(): void {\n if (!canSend.value) return;\n emit(\"send\", recipient.value.trim());\n}\n\nfunction handleClose(): void {\n // Sending is the one state that blocks dismissal; the success state closes\n // immediately rather than making the user wait out the timer.\n if (props.isSending) return;\n emit(\"close\");\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleSend();\n }\n if (event.key === \"Escape\") {\n handleClose();\n }\n}\n</script>\n\n<template>\n <TplModal :visible=\"visible\" @close=\"handleClose\" @keydown=\"handleKeydown\">\n <!-- Grows to `max-w-3xl` only while the preview is open. A 600px email has\n to render at true size AND leave slack on both sides for the band of\n body background the preview draws beside it: at `max-w-2xl` the\n preview region's content box is exactly 600px, so the band would have\n nowhere to go and `settings.backgroundColor` would look unset for any\n template whose sections span the full width. Collapsed, it stays the\n compact form it was. `w-full` keeps it shrinking on narrow screens.\n `max-h-[90%]`\n with a `min-h-0 overflow-y-auto` preview region is the pattern the\n saved-blocks dialogs use: the cap bounds the panel to TplModal's\n backdrop (never to `vh` — see the note there), and `min-h-0` is what\n lets a flex child shrink below its content and actually scroll. -->\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-busy=\"isSending\"\n aria-labelledby=\"tpl-test-email-title\"\n class=\"tpl-scale-in tpl:flex tpl:max-h-[90%] tpl:w-full tpl:max-w-3xl tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5\"\n style=\"\n background-color: var(--tpl-bg-elevated);\n box-shadow: var(--tpl-shadow-xl);\n \"\n >\n <h3\n id=\"tpl-test-email-title\"\n class=\"tpl:mb-4 tpl:shrink-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ t.testEmail.title }}\n </h3>\n\n <!-- Recipient -->\n <div class=\"tpl:mb-3 tpl:shrink-0\">\n <label\n for=\"tpl-test-email-recipient\"\n class=\"tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.testEmail.recipientLabel }}\n </label>\n\n <!-- Exactly one allowed address: nothing to choose. -->\n <input\n v-if=\"isSingleRecipient\"\n id=\"tpl-test-email-recipient\"\n type=\"text\"\n :value=\"recipient\"\n disabled\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n />\n\n <!-- Several allowed addresses: pick one. -->\n <select\n v-else-if=\"hasAllowlist\"\n id=\"tpl-test-email-recipient\"\n v-model=\"recipient\"\n :disabled=\"isSending || justSent\"\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n >\n <option\n v-for=\"email in allowedRecipients\"\n :key=\"email\"\n :value=\"email\"\n >\n {{ email }}\n </option>\n </select>\n\n <!-- No allowlist: free text. -->\n <input\n v-else\n id=\"tpl-test-email-recipient\"\n v-model=\"recipient\"\n type=\"email\"\n autocomplete=\"email\"\n spellcheck=\"false\"\n :placeholder=\"t.testEmail.recipientPlaceholder\"\n :disabled=\"isSending || justSent\"\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n />\n\n <p\n v-if=\"showShapeHint\"\n class=\"tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ t.testEmail.invalidAddress }}\n </p>\n </div>\n\n <!-- Preview header: a label plus the viewport switch. Always shown — the\n preview is part of the dialog rather than something to opt into. -->\n <div class=\"tpl:mb-2 tpl:shrink-0\">\n <!-- Two segmented controls: `flex-wrap` so they drop to their own row\n rather than crushing the label on a narrow viewport. -->\n <div\n class=\"tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-between tpl:gap-2\"\n >\n <span\n class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.testEmail.preview }}\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <MergeTagModeToggle\n v-if=\"!previewResolution.supersedesSamples.value\"\n :sample-mode=\"sampleMode\"\n @change=\"sampleMode = $event\"\n />\n\n <!-- Without this the preview would silently show only the desktop\n variant of any responsive block. -->\n <ViewportToggle\n :viewport=\"previewViewport\"\n @change=\"previewViewport = $event\"\n />\n </div>\n </div>\n\n <!-- The hint has to follow the mode: \"shown unresolved\" is simply false\n once every tag renders a realistic value. -->\n <p\n data-testid=\"test-email-preview-hint\"\n class=\"tpl:mt-1 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n {{\n previewResolution.supersedesSamples.value\n ? t.previewResolution.hint\n : sampleMode\n ? t.testEmail.previewHintSample\n : t.testEmail.previewHint\n }}\n </p>\n </div>\n\n <!-- The one region allowed to grow: `flex-1 min-h-0` so it absorbs the\n remaining height and scrolls, leaving the form and actions fixed. -->\n <div\n id=\"tpl-test-email-preview\"\n data-testid=\"test-email-preview\"\n class=\"tpl:mb-3 tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-sm)] tpl:p-3 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <!-- Skeleton while a *first* resolve is outstanding, so the dialog never\n flashes the unresolved template before the resolved one. Sized like\n the frame it replaces to avoid a layout jump. A re-resolve (recipient\n change) keeps the previous result instead — `isInitialResolve`. -->\n <div\n v-if=\"previewResolution.isInitialResolve.value\"\n role=\"status\"\n aria-busy=\"true\"\n data-testid=\"preview-resolution-loading\"\n class=\"tpl:flex tpl:flex-col tpl:gap-3\"\n >\n <span class=\"tpl:sr-only\">{{ t.previewResolution.resolving }}</span>\n <div\n v-for=\"n in 3\"\n :key=\"n\"\n aria-hidden=\"true\"\n class=\"tpl-pulse tpl:h-16 tpl:rounded-md tpl:bg-[var(--tpl-bg-hover)]\"\n ></div>\n </div>\n\n <!-- Resolution failed: the unresolved template renders below, so the\n dialog degrades rather than showing an empty frame. -->\n <p\n v-else-if=\"previewResolution.hasFailed.value\"\n role=\"status\"\n data-testid=\"preview-resolution-failed\"\n class=\"tpl:mb-2 tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg-hover)]\"\n >\n {{ t.previewResolution.failed }}\n </p>\n\n <BlockPreviewCanvas\n v-if=\"!previewResolution.isInitialResolve.value\"\n :blocks=\"previewBlocks\"\n :settings=\"previewSettings\"\n :viewport=\"previewViewport\"\n :apply-condition-filter=\"!previewResolution.isConfigured\"\n />\n </div>\n\n <!-- Success. Announced politely; the dialog closes itself shortly after. -->\n <p\n v-if=\"justSent\"\n role=\"status\"\n data-testid=\"test-email-success\"\n class=\"tpl:mb-3 tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success,var(--tpl-primary))]\"\n >\n <Check :size=\"13\" :stroke-width=\"2.5\" />\n {{ t.testEmail.success }}\n </p>\n\n <!-- Failure. Stays open so the user can retry. -->\n <p\n v-else-if=\"errorText\"\n role=\"alert\"\n data-testid=\"test-email-error\"\n class=\"tpl:mb-3 tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n {{ errorText }}\n </p>\n\n <!-- Actions -->\n <div class=\"tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"test-email-cancel\"\n class=\"tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]\"\n :disabled=\"isSending\"\n :class=\"{ 'tpl:cursor-not-allowed tpl:opacity-50': isSending }\"\n @click=\"handleClose\"\n >\n {{ t.testEmail.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"test-email-send\"\n :class=\"primaryBtnClass\"\n :disabled=\"!canSend\"\n @click=\"handleSend\"\n >\n <span v-if=\"isSending\" class=\"tpl:flex tpl:items-center tpl:gap-1.5\">\n <LoaderCircle\n class=\"tpl:animate-spin\"\n :size=\"12\"\n :stroke-width=\"2\"\n />\n {{ t.testEmail.sending }}\n </span>\n <span v-else>\n {{ t.testEmail.send }}\n </span>\n </button>\n </div>\n </div>\n </TplModal>\n</template>\n","<script setup lang=\"ts\">\nimport { primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Send-a-test dialog, shared by the OSS and Cloud editors.\n *\n * The recipient control has three shapes, driven entirely by whether the\n * provider configured an allowlist:\n *\n * - **no allowlist** — free text, validated for shape only. This branch exists\n * for BYO senders; Cloud never takes it, because its list comes from a signed\n * JWT.\n * - **exactly one** — a read-only field. Preserved verbatim from the Cloud-only\n * version; there is nothing to choose, so offering an editable field would\n * imply otherwise.\n * - **several** — a picker of exactly those addresses.\n *\n * An empty allowlist never reaches here: the feature reports itself unavailable,\n * so no trigger renders. (The Cloud-only version fell through to `v-else` and\n * rendered a select with no options and a permanently disabled Send.)\n */\nimport TplModal from \"./TplModal.vue\";\n// Statically imported: this modal is already lazy-loaded as a whole, so the\n// preview rides its chunk rather than costing a second round-trip and flashing\n// an empty frame. Still shared with the saved-blocks surfaces, which lazy-load\n// it themselves.\nimport BlockPreviewCanvas from \"./BlockPreviewCanvas.vue\";\n// The editor header's own control, reused verbatim so the two viewport switches\n// are the same component rather than two things that resemble each other.\nimport ViewportToggle from \"./ViewportToggle.vue\";\nimport MergeTagModeToggle from \"./MergeTagModeToggle.vue\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { looksLikeEmail } from \"../utils/validateEmailShape\";\nimport { Check, LoaderCircle } from \"@lucide/vue\";\nimport { computed, inject, ref, watch } from \"vue\";\nimport {\n applyLayout,\n hasMergeTagSamples,\n type ViewportSize,\n} from \"@templatical/types\";\nimport {\n EDITOR_KEY,\n LAYOUT_KEY,\n MERGE_TAGS_KEY,\n NO_MERGE_TAGS,\n MERGE_TAG_SAMPLE_MODE_KEY,\n RESOLVE_PREVIEW_KEY,\n} from \"../keys\";\nimport { usePreviewResolution } from \"../composables/usePreviewResolution\";\nimport type { TestEmailError } from \"../composables/useTestEmailFeature\";\n\nconst props = defineProps<{\n visible: boolean;\n /** Omitted / undefined means unrestricted, so the field accepts free text. */\n allowedRecipients?: string[];\n defaultRecipient?: string;\n isSending: boolean;\n justSent: boolean;\n error: TestEmailError | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"send\", recipient: string): void;\n (e: \"close\"): void;\n}>();\n\nconst { t } = useI18n();\nconst editor = inject(EDITOR_KEY, null);\nconst layout = inject(LAYOUT_KEY, undefined);\n\nconst recipient = ref(\"\");\n\nconst previewViewport = ref<ViewportSize>(\"desktop\");\n\n/**\n * Its own resolution instance rather than the editor's, because this dialog has\n * a recipient and the editor's preview does not — resolving for \"whoever is\n * selected here\" is a different question from resolving for the canvas.\n * `isActive` is the dialog's own visibility.\n *\n * Compose the embedder shell while the dialog is showing. The send payload\n * stays unshelled.\n */\nconst resolvePreviewHook = inject(RESOLVE_PREVIEW_KEY, undefined);\nconst previewResolution = usePreviewResolution({\n resolvePreview: resolvePreviewHook ?? undefined,\n getContent: () => {\n const raw = editor?.content.value ?? { blocks: [], settings: {} as never };\n return layout && props.visible ? applyLayout(layout, raw) : raw;\n },\n isActive: () => props.visible,\n getRecipient: () => recipient.value || undefined,\n});\n\n/**\n * Shared with the editor's own preview, so switching here and switching there\n * are the same choice — it is a property of how the user wants to read a\n * preview, not of one dialog. Falls back to a local ref for headless mounts.\n */\nconst sharedSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\n// Seeded from availability, matching how `useEditorCore` seeds the shared ref.\n// A blanket `true` would make the dialog claim tags \"show example values\" for a\n// consumer who configured none — false, and with no toggle rendered to correct\n// it, since the toggle hides itself when nothing has a sample.\nconst localSampleMode = ref(\n hasMergeTagSamples(inject(MERGE_TAGS_KEY, NO_MERGE_TAGS).value),\n);\nconst sampleMode = computed({\n get: () =>\n // Off entirely while a resolver is configured — same rule as the canvas.\n previewResolution.isConfigured\n ? false\n : (sharedSampleMode?.value ?? localSampleMode.value),\n set: (on: boolean) => {\n if (sharedSampleMode) sharedSampleMode.value = on;\n else localSampleMode.value = on;\n },\n});\n\nconst previewBlocks = computed(\n () => previewResolution.content.value.blocks ?? [],\n);\n\nconst previewSettings = computed(\n () => previewResolution.content.value.settings,\n);\n\nconst hasAllowlist = computed(\n () =>\n props.allowedRecipients !== undefined && props.allowedRecipients.length > 0,\n);\nconst isSingleRecipient = computed(() => props.allowedRecipients?.length === 1);\n\n// Mounted behind a `v-if` on the same state that drives `visible`, so it can\n// mount with `visible` already true — without `immediate` the field would never\n// be seeded.\nwatch(\n () => props.visible,\n (visible) => {\n if (!visible) return;\n recipient.value =\n props.defaultRecipient ?? props.allowedRecipients?.[0] ?? \"\";\n },\n { immediate: true },\n);\n\n/** Shape-check free text only; a picker can't produce a malformed value. */\nconst isRecipientValid = computed(() =>\n hasAllowlist.value\n ? recipient.value.length > 0\n : looksLikeEmail(recipient.value),\n);\n\nconst canSend = computed(\n () => isRecipientValid.value && !props.isSending && !props.justSent,\n);\n\n/** Free text that's been typed into but isn't yet a plausible address. */\nconst showShapeHint = computed(\n () =>\n !hasAllowlist.value &&\n recipient.value.trim().length > 0 &&\n !isRecipientValid.value,\n);\n\nconst errorText = computed(() => {\n if (!props.error) return null;\n return props.error.kind === \"provider\"\n ? props.error.message\n : t.testEmail.recipientNotAllowed;\n});\n\nfunction handleSend(): void {\n if (!canSend.value) return;\n emit(\"send\", recipient.value.trim());\n}\n\nfunction handleClose(): void {\n // Sending is the one state that blocks dismissal; the success state closes\n // immediately rather than making the user wait out the timer.\n if (props.isSending) return;\n emit(\"close\");\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleSend();\n }\n if (event.key === \"Escape\") {\n handleClose();\n }\n}\n</script>\n\n<template>\n <TplModal :visible=\"visible\" @close=\"handleClose\" @keydown=\"handleKeydown\">\n <!-- Grows to `max-w-3xl` only while the preview is open. A 600px email has\n to render at true size AND leave slack on both sides for the band of\n body background the preview draws beside it: at `max-w-2xl` the\n preview region's content box is exactly 600px, so the band would have\n nowhere to go and `settings.backgroundColor` would look unset for any\n template whose sections span the full width. Collapsed, it stays the\n compact form it was. `w-full` keeps it shrinking on narrow screens.\n `max-h-[90%]`\n with a `min-h-0 overflow-y-auto` preview region is the pattern the\n saved-blocks dialogs use: the cap bounds the panel to TplModal's\n backdrop (never to `vh` — see the note there), and `min-h-0` is what\n lets a flex child shrink below its content and actually scroll. -->\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-busy=\"isSending\"\n aria-labelledby=\"tpl-test-email-title\"\n class=\"tpl-scale-in tpl:flex tpl:max-h-[90%] tpl:w-full tpl:max-w-3xl tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5\"\n style=\"\n background-color: var(--tpl-bg-elevated);\n box-shadow: var(--tpl-shadow-xl);\n \"\n >\n <h3\n id=\"tpl-test-email-title\"\n class=\"tpl:mb-4 tpl:shrink-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ t.testEmail.title }}\n </h3>\n\n <!-- Recipient -->\n <div class=\"tpl:mb-3 tpl:shrink-0\">\n <label\n for=\"tpl-test-email-recipient\"\n class=\"tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.testEmail.recipientLabel }}\n </label>\n\n <!-- Exactly one allowed address: nothing to choose. -->\n <input\n v-if=\"isSingleRecipient\"\n id=\"tpl-test-email-recipient\"\n type=\"text\"\n :value=\"recipient\"\n disabled\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n />\n\n <!-- Several allowed addresses: pick one. -->\n <select\n v-else-if=\"hasAllowlist\"\n id=\"tpl-test-email-recipient\"\n v-model=\"recipient\"\n :disabled=\"isSending || justSent\"\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n >\n <option\n v-for=\"email in allowedRecipients\"\n :key=\"email\"\n :value=\"email\"\n >\n {{ email }}\n </option>\n </select>\n\n <!-- No allowlist: free text. -->\n <input\n v-else\n id=\"tpl-test-email-recipient\"\n v-model=\"recipient\"\n type=\"email\"\n autocomplete=\"email\"\n spellcheck=\"false\"\n :placeholder=\"t.testEmail.recipientPlaceholder\"\n :disabled=\"isSending || justSent\"\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n />\n\n <p\n v-if=\"showShapeHint\"\n class=\"tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ t.testEmail.invalidAddress }}\n </p>\n </div>\n\n <!-- Preview header: a label plus the viewport switch. Always shown — the\n preview is part of the dialog rather than something to opt into. -->\n <div class=\"tpl:mb-2 tpl:shrink-0\">\n <!-- Two segmented controls: `flex-wrap` so they drop to their own row\n rather than crushing the label on a narrow viewport. -->\n <div\n class=\"tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-between tpl:gap-2\"\n >\n <span\n class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.testEmail.preview }}\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <MergeTagModeToggle\n v-if=\"!previewResolution.supersedesSamples.value\"\n :sample-mode=\"sampleMode\"\n @change=\"sampleMode = $event\"\n />\n\n <!-- Without this the preview would silently show only the desktop\n variant of any responsive block. -->\n <ViewportToggle\n :viewport=\"previewViewport\"\n @change=\"previewViewport = $event\"\n />\n </div>\n </div>\n\n <!-- The hint has to follow the mode: \"shown unresolved\" is simply false\n once every tag renders a realistic value. -->\n <p\n data-testid=\"test-email-preview-hint\"\n class=\"tpl:mt-1 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n {{\n previewResolution.supersedesSamples.value\n ? t.previewResolution.hint\n : sampleMode\n ? t.testEmail.previewHintSample\n : t.testEmail.previewHint\n }}\n </p>\n </div>\n\n <!-- The one region allowed to grow: `flex-1 min-h-0` so it absorbs the\n remaining height and scrolls, leaving the form and actions fixed. -->\n <div\n id=\"tpl-test-email-preview\"\n data-testid=\"test-email-preview\"\n class=\"tpl:mb-3 tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-sm)] tpl:p-3 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <!-- Skeleton while a *first* resolve is outstanding, so the dialog never\n flashes the unresolved template before the resolved one. Sized like\n the frame it replaces to avoid a layout jump. A re-resolve (recipient\n change) keeps the previous result instead — `isInitialResolve`. -->\n <div\n v-if=\"previewResolution.isInitialResolve.value\"\n role=\"status\"\n aria-busy=\"true\"\n data-testid=\"preview-resolution-loading\"\n class=\"tpl:flex tpl:flex-col tpl:gap-3\"\n >\n <span class=\"tpl:sr-only\">{{ t.previewResolution.resolving }}</span>\n <div\n v-for=\"n in 3\"\n :key=\"n\"\n aria-hidden=\"true\"\n class=\"tpl-pulse tpl:h-16 tpl:rounded-md tpl:bg-[var(--tpl-bg-hover)]\"\n ></div>\n </div>\n\n <!-- Resolution failed: the unresolved template renders below, so the\n dialog degrades rather than showing an empty frame. -->\n <p\n v-else-if=\"previewResolution.hasFailed.value\"\n role=\"status\"\n data-testid=\"preview-resolution-failed\"\n class=\"tpl:mb-2 tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg-hover)]\"\n >\n {{ t.previewResolution.failed }}\n </p>\n\n <BlockPreviewCanvas\n v-if=\"!previewResolution.isInitialResolve.value\"\n :blocks=\"previewBlocks\"\n :settings=\"previewSettings\"\n :viewport=\"previewViewport\"\n :apply-condition-filter=\"!previewResolution.isConfigured\"\n />\n </div>\n\n <!-- Success. Announced politely; the dialog closes itself shortly after. -->\n <p\n v-if=\"justSent\"\n role=\"status\"\n data-testid=\"test-email-success\"\n class=\"tpl:mb-3 tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success,var(--tpl-primary))]\"\n >\n <Check :size=\"13\" :stroke-width=\"2.5\" />\n {{ t.testEmail.success }}\n </p>\n\n <!-- Failure. Stays open so the user can retry. -->\n <p\n v-else-if=\"errorText\"\n role=\"alert\"\n data-testid=\"test-email-error\"\n class=\"tpl:mb-3 tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n {{ errorText }}\n </p>\n\n <!-- Actions -->\n <div class=\"tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"test-email-cancel\"\n class=\"tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]\"\n :disabled=\"isSending\"\n :class=\"{ 'tpl:cursor-not-allowed tpl:opacity-50': isSending }\"\n @click=\"handleClose\"\n >\n {{ t.testEmail.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"test-email-send\"\n :class=\"primaryBtnClass\"\n :disabled=\"!canSend\"\n @click=\"handleSend\"\n >\n <span v-if=\"isSending\" class=\"tpl:flex tpl:items-center tpl:gap-1.5\">\n <LoaderCircle\n class=\"tpl:animate-spin\"\n :size=\"12\"\n :stroke-width=\"2\"\n />\n {{ t.testEmail.sending }}\n </span>\n <span v-else>\n {{ t.testEmail.send }}\n </span>\n </button>\n </div>\n </div>\n </TplModal>\n</template>\n"],"mappings":";;;;;;;;;;;AASA,IAAM2D,IAA0B;AAkBhC,SAAgBC,EAAe,GAAwB;CACrD,IAAMC,IAAUC,EAAM,KAAK;CAE3B,IADID,EAAQ,WAAW,KACnB,KAAK,KAAKA,CAAO,GAAG,OAAO;CAE/B,IAAME,IAAQ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CAAA,CAAiB,CAAC;;;;;;;IAMxCP,EAAA,YADR/F,EAAA,GAAAO,EAQI,KARJ8E,IAQI,CAFFtE,EAAwCT,EAAA+C,EAAA,GAAA;KAAhC,MAAM;KAAK,gBAAc;I,IAAOnC,EAAA,MACxCb,EAAGC,EAAA+G,CAAA,CAAC,CAAC,UAAU,OAAO,GAAA,CAAA,C,MAKXD,EAAA,SADbpH,EAAA,GAAAO,EAOI,KAPJ+E,IAOIjF,EADC+G,EAAA,KAAS,GAAA,CAAA,K;IAIdhH,EA8BM,OA9BNmF,GA8BM,CA7BJnF,EASS,UAAA;KARP,MAAK;KACL,eAAY;KACZ,OAAKe,EAAA,CAAC,sOAAoO,EAAA,yCAEvL4E,EAAA,UAAS,CAAA,CAAA;KAD3D,UAAUA,EAAA;KAEV,SAAOwB;IAEL,GAAAlH,EAAAC,EAAA+G,CAAA,CAAC,CAAC,UAAU,MAAM,GAAA,IAAA7B,EAAA,GAEvBpF,EAkBS,UAAA;KAjBP,MAAK;KACL,eAAY;KACX,OAAKe,EAAEb,EAAAgD,EAAA,CAAe;KACtB,UAAQ,CAAG4D,EAAA;KACX,SAAOI;I,IAEIvB,EAAA,aAAZ/F,EAAA,GAAAO,EAOO,QAPPmF,IAOO,CANL3E,EAIET,EAAA8C,EAAA,GAAA;KAHA,OAAM;KACL,MAAM;KACN,gBAAc;I,IACflC,EAAA,MACFb,EAAGC,EAAA+G,CAAA,CAAC,CAAC,UAAU,OAAO,GAAA,CAAA,C,OAExBrH,EAAA,GAAAO,EAEO,QAAAoF,IAAAtF,EADFC,EAAA+G,CAAA,CAAC,CAAC,UAAU,IAAI,GAAA,CAAA,E"}
|
|
1
|
+
{"version":3,"file":"TestEmailModal-CDQTgESD.js","names":["_openBlock","_createBlock","TplModal","_withCtx","_createElementVNode","_toDisplayString","_unref","_createElementBlock","_withDirectives","_Fragment","_renderList","_vModelSelect","_vModelText","_createCommentVNode","MergeTagModeToggle","_createVNode","ViewportToggle","BlockPreviewCanvas","_createTextVNode","_normalizeClass","_sfc_main","defineComponent","inject","withDirectives","renderList","openBlock","watch","withCtx","createElementBlock","vModelSelect","createTextVNode","ref","toDisplayString","createCommentVNode","createBlock","createBaseVNode","vModelText","unref","Fragment","normalizeClass","createVNode","applyLayout","hasMergeTagSamples","usePreviewResolution","LAYOUT_KEY","NO_MERGE_TAGS","RESOLVE_PREVIEW_KEY","MERGE_TAG_SAMPLE_MODE_KEY","MERGE_TAGS_KEY","EDITOR_KEY","useI18n","Check","LoaderCircle","primaryBtnClass","ViewportToggle_default","MergeTagModeToggle_default","TplModal_default","BlockPreviewCanvas_default","IMPOSSIBLE_DOMAIN_CHARS","looksLikeEmail","trimmed","value","parts","local","domain","dot","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","TestEmailModal_default","__emit","props","__props","emit","editor","layout","recipient","previewViewport","resolvePreviewHook","previewResolution","raw","sharedSampleMode","localSampleMode","sampleMode","computed","on","previewBlocks","previewSettings","hasAllowlist","isSingleRecipient","visible","isRecipientValid","canSend","showShapeHint","errorText","t","handleSend","handleClose","handleKeydown","event","_cache","$event","email","n"],"sources":["../../../src/utils/validateEmailShape.ts","../../../src/components/TestEmailModal.vue","../../../src/components/TestEmailModal.vue"],"sourcesContent":["/**\n * Characters that cannot appear in a domain but routinely arrive attached to one.\n *\n * A **denylist**, not an allowlist, so unicode domains keep working — an\n * allowlist of `[a-z0-9.-]` would be the stricter, more obviously \"correct\"\n * choice and would reject them. What this actually targets is the punctuation\n * that comes from pasting out of a list or a mail client: `user@example.com,`\n * and `<user@example.com>`.\n */\nconst IMPOSSIBLE_DOMAIN_CHARS = /[,;<>()[\\]\\\\\"'`|/?#@!$%^&*+=~{}]/;\n\n/**\n * Does this string look like an email address?\n *\n * Deliberately loose: non-empty, no whitespace, exactly one `@`, a non-empty\n * local part, and a domain containing a dot with something either side and no\n * impossible characters. That is enough to catch the mistakes a typo actually\n * produces — a missing `@`, a trailing comma, a half-typed domain — before the\n * user pays for a round-trip.\n *\n * **Do not \"improve\" this into an RFC-ish regex.** Those reliably reject valid\n * addresses (plus-addressing, long new gTLDs, unicode domains) and the resulting\n * bug reports cost far more than the malformed addresses they catch. Only the\n * receiving mail server can really tell, and the sending backend has to validate\n * anyway — this is a fast-feedback affordance, not a gate. `validateEmailShape`\n * has its own test file pinning the addresses that must keep passing.\n */\nexport function looksLikeEmail(value: string): boolean {\n const trimmed = value.trim();\n if (trimmed.length === 0) return false;\n if (/\\s/.test(trimmed)) return false;\n\n const parts = trimmed.split(\"@\");\n if (parts.length !== 2) return false;\n\n const [local, domain] = parts;\n if (local.length === 0) return false;\n if (IMPOSSIBLE_DOMAIN_CHARS.test(domain)) return false;\n\n // A dot with at least one character either side, so `a@b` and `a@b.` fail but\n // `a@b.c` and `a@sub.example.museum` pass.\n const dot = domain.indexOf(\".\");\n return dot > 0 && dot < domain.length - 1;\n}\n","<script setup lang=\"ts\">\nimport { primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Send-a-test dialog, shared by the OSS and Cloud editors.\n *\n * The recipient control has three shapes, driven entirely by whether the\n * provider configured an allowlist:\n *\n * - **no allowlist** — free text, validated for shape only. This branch exists\n * for BYO senders; Cloud never takes it, because its list comes from a signed\n * JWT.\n * - **exactly one** — a read-only field. Preserved verbatim from the Cloud-only\n * version; there is nothing to choose, so offering an editable field would\n * imply otherwise.\n * - **several** — a picker of exactly those addresses.\n *\n * An empty allowlist never reaches here: the feature reports itself unavailable,\n * so no trigger renders. (The Cloud-only version fell through to `v-else` and\n * rendered a select with no options and a permanently disabled Send.)\n */\nimport TplModal from \"./TplModal.vue\";\n// Statically imported: this modal is already lazy-loaded as a whole, so the\n// preview rides its chunk rather than costing a second round-trip and flashing\n// an empty frame. Still shared with the saved-blocks surfaces, which lazy-load\n// it themselves.\nimport BlockPreviewCanvas from \"./BlockPreviewCanvas.vue\";\n// The editor header's own control, reused verbatim so the two viewport switches\n// are the same component rather than two things that resemble each other.\nimport ViewportToggle from \"./ViewportToggle.vue\";\nimport MergeTagModeToggle from \"./MergeTagModeToggle.vue\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { looksLikeEmail } from \"../utils/validateEmailShape\";\nimport { Check, LoaderCircle } from \"@lucide/vue\";\nimport { computed, inject, ref, watch } from \"vue\";\nimport {\n applyLayout,\n hasMergeTagSamples,\n type ViewportSize,\n} from \"@templatical/types\";\nimport {\n EDITOR_KEY,\n LAYOUT_KEY,\n MERGE_TAGS_KEY,\n NO_MERGE_TAGS,\n MERGE_TAG_SAMPLE_MODE_KEY,\n RESOLVE_PREVIEW_KEY,\n} from \"../keys\";\nimport { usePreviewResolution } from \"../composables/usePreviewResolution\";\nimport type { TestEmailError } from \"../composables/useTestEmailFeature\";\n\nconst props = defineProps<{\n visible: boolean;\n /** Omitted / undefined means unrestricted, so the field accepts free text. */\n allowedRecipients?: string[];\n defaultRecipient?: string;\n isSending: boolean;\n justSent: boolean;\n error: TestEmailError | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"send\", recipient: string): void;\n (e: \"close\"): void;\n}>();\n\nconst { t } = useI18n();\nconst editor = inject(EDITOR_KEY, null);\nconst layout = inject(LAYOUT_KEY, undefined);\n\nconst recipient = ref(\"\");\n\nconst previewViewport = ref<ViewportSize>(\"desktop\");\n\n/**\n * Its own resolution instance rather than the editor's, because this dialog has\n * a recipient and the editor's preview does not — resolving for \"whoever is\n * selected here\" is a different question from resolving for the canvas.\n * `isActive` is the dialog's own visibility.\n *\n * Compose the embedder shell while the dialog is showing. The send payload\n * stays unshelled.\n */\nconst resolvePreviewHook = inject(RESOLVE_PREVIEW_KEY, undefined);\nconst previewResolution = usePreviewResolution({\n resolvePreview: resolvePreviewHook ?? undefined,\n getContent: () => {\n const raw = editor?.content.value ?? { blocks: [], settings: {} as never };\n return layout && props.visible ? applyLayout(layout, raw) : raw;\n },\n isActive: () => props.visible,\n getRecipient: () => recipient.value || undefined,\n});\n\n/**\n * Shared with the editor's own preview, so switching here and switching there\n * are the same choice — it is a property of how the user wants to read a\n * preview, not of one dialog. Falls back to a local ref for headless mounts.\n */\nconst sharedSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\n// Seeded from availability, matching how `useEditorCore` seeds the shared ref.\n// A blanket `true` would make the dialog claim tags \"show example values\" for a\n// consumer who configured none — false, and with no toggle rendered to correct\n// it, since the toggle hides itself when nothing has a sample.\nconst localSampleMode = ref(\n hasMergeTagSamples(inject(MERGE_TAGS_KEY, NO_MERGE_TAGS).value),\n);\nconst sampleMode = computed({\n get: () =>\n // Off entirely while a resolver is configured — same rule as the canvas.\n previewResolution.isConfigured\n ? false\n : (sharedSampleMode?.value ?? localSampleMode.value),\n set: (on: boolean) => {\n if (sharedSampleMode) sharedSampleMode.value = on;\n else localSampleMode.value = on;\n },\n});\n\nconst previewBlocks = computed(\n () => previewResolution.content.value.blocks ?? [],\n);\n\nconst previewSettings = computed(\n () => previewResolution.content.value.settings,\n);\n\nconst hasAllowlist = computed(\n () =>\n props.allowedRecipients !== undefined && props.allowedRecipients.length > 0,\n);\nconst isSingleRecipient = computed(() => props.allowedRecipients?.length === 1);\n\n// Mounted behind a `v-if` on the same state that drives `visible`, so it can\n// mount with `visible` already true — without `immediate` the field would never\n// be seeded.\nwatch(\n () => props.visible,\n (visible) => {\n if (!visible) return;\n recipient.value =\n props.defaultRecipient ?? props.allowedRecipients?.[0] ?? \"\";\n },\n { immediate: true },\n);\n\n/** Shape-check free text only; a picker can't produce a malformed value. */\nconst isRecipientValid = computed(() =>\n hasAllowlist.value\n ? recipient.value.length > 0\n : looksLikeEmail(recipient.value),\n);\n\nconst canSend = computed(\n () => isRecipientValid.value && !props.isSending && !props.justSent,\n);\n\n/** Free text that's been typed into but isn't yet a plausible address. */\nconst showShapeHint = computed(\n () =>\n !hasAllowlist.value &&\n recipient.value.trim().length > 0 &&\n !isRecipientValid.value,\n);\n\nconst errorText = computed(() => {\n if (!props.error) return null;\n return props.error.kind === \"provider\"\n ? props.error.message\n : t.testEmail.recipientNotAllowed;\n});\n\nfunction handleSend(): void {\n if (!canSend.value) return;\n emit(\"send\", recipient.value.trim());\n}\n\nfunction handleClose(): void {\n // Sending is the one state that blocks dismissal; the success state closes\n // immediately rather than making the user wait out the timer.\n if (props.isSending) return;\n emit(\"close\");\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleSend();\n }\n if (event.key === \"Escape\") {\n handleClose();\n }\n}\n</script>\n\n<template>\n <TplModal :visible=\"visible\" @close=\"handleClose\" @keydown=\"handleKeydown\">\n <!-- Grows to `max-w-3xl` only while the preview is open. A 600px email has\n to render at true size AND leave slack on both sides for the band of\n body background the preview draws beside it: at `max-w-2xl` the\n preview region's content box is exactly 600px, so the band would have\n nowhere to go and `settings.backgroundColor` would look unset for any\n template whose sections span the full width. Collapsed, it stays the\n compact form it was. `w-full` keeps it shrinking on narrow screens.\n `max-h-[90%]`\n with a `min-h-0 overflow-y-auto` preview region is the pattern the\n saved-blocks dialogs use: the cap bounds the panel to TplModal's\n backdrop (never to `vh` — see the note there), and `min-h-0` is what\n lets a flex child shrink below its content and actually scroll. -->\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-busy=\"isSending\"\n aria-labelledby=\"tpl-test-email-title\"\n class=\"tpl-scale-in tpl:flex tpl:max-h-[90%] tpl:w-full tpl:max-w-3xl tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5\"\n style=\"\n background-color: var(--tpl-bg-elevated);\n box-shadow: var(--tpl-shadow-xl);\n \"\n >\n <h3\n id=\"tpl-test-email-title\"\n class=\"tpl:mb-4 tpl:shrink-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ t.testEmail.title }}\n </h3>\n\n <!-- Recipient -->\n <div class=\"tpl:mb-3 tpl:shrink-0\">\n <label\n for=\"tpl-test-email-recipient\"\n class=\"tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.testEmail.recipientLabel }}\n </label>\n\n <!-- Exactly one allowed address: nothing to choose. -->\n <input\n v-if=\"isSingleRecipient\"\n id=\"tpl-test-email-recipient\"\n type=\"text\"\n :value=\"recipient\"\n disabled\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n />\n\n <!-- Several allowed addresses: pick one. -->\n <select\n v-else-if=\"hasAllowlist\"\n id=\"tpl-test-email-recipient\"\n v-model=\"recipient\"\n :disabled=\"isSending || justSent\"\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n >\n <option\n v-for=\"email in allowedRecipients\"\n :key=\"email\"\n :value=\"email\"\n >\n {{ email }}\n </option>\n </select>\n\n <!-- No allowlist: free text. -->\n <input\n v-else\n id=\"tpl-test-email-recipient\"\n v-model=\"recipient\"\n type=\"email\"\n autocomplete=\"email\"\n spellcheck=\"false\"\n :placeholder=\"t.testEmail.recipientPlaceholder\"\n :disabled=\"isSending || justSent\"\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n />\n\n <p\n v-if=\"showShapeHint\"\n class=\"tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ t.testEmail.invalidAddress }}\n </p>\n </div>\n\n <!-- Preview header: a label plus the viewport switch. Always shown — the\n preview is part of the dialog rather than something to opt into. -->\n <div class=\"tpl:mb-2 tpl:shrink-0\">\n <!-- Two segmented controls: `flex-wrap` so they drop to their own row\n rather than crushing the label on a narrow viewport. -->\n <div\n class=\"tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-between tpl:gap-2\"\n >\n <span\n class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.testEmail.preview }}\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <MergeTagModeToggle\n v-if=\"!previewResolution.supersedesSamples.value\"\n :sample-mode=\"sampleMode\"\n @change=\"sampleMode = $event\"\n />\n\n <!-- Without this the preview would silently show only the desktop\n variant of any responsive block. -->\n <ViewportToggle\n :viewport=\"previewViewport\"\n @change=\"previewViewport = $event\"\n />\n </div>\n </div>\n\n <!-- The hint has to follow the mode: \"shown unresolved\" is simply false\n once every tag renders a realistic value. -->\n <p\n data-testid=\"test-email-preview-hint\"\n class=\"tpl:mt-1 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n {{\n previewResolution.supersedesSamples.value\n ? t.previewResolution.hint\n : sampleMode\n ? t.testEmail.previewHintSample\n : t.testEmail.previewHint\n }}\n </p>\n </div>\n\n <!-- The one region allowed to grow: `flex-1 min-h-0` so it absorbs the\n remaining height and scrolls, leaving the form and actions fixed. -->\n <div\n id=\"tpl-test-email-preview\"\n data-testid=\"test-email-preview\"\n class=\"tpl:mb-3 tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-sm)] tpl:p-3 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <!-- Skeleton while a *first* resolve is outstanding, so the dialog never\n flashes the unresolved template before the resolved one. Sized like\n the frame it replaces to avoid a layout jump. A re-resolve (recipient\n change) keeps the previous result instead — `isInitialResolve`. -->\n <div\n v-if=\"previewResolution.isInitialResolve.value\"\n role=\"status\"\n aria-busy=\"true\"\n data-testid=\"preview-resolution-loading\"\n class=\"tpl:flex tpl:flex-col tpl:gap-3\"\n >\n <span class=\"tpl:sr-only\">{{ t.previewResolution.resolving }}</span>\n <div\n v-for=\"n in 3\"\n :key=\"n\"\n aria-hidden=\"true\"\n class=\"tpl-pulse tpl:h-16 tpl:rounded-md tpl:bg-[var(--tpl-bg-hover)]\"\n ></div>\n </div>\n\n <!-- Resolution failed: the unresolved template renders below, so the\n dialog degrades rather than showing an empty frame. -->\n <p\n v-else-if=\"previewResolution.hasFailed.value\"\n role=\"status\"\n data-testid=\"preview-resolution-failed\"\n class=\"tpl:mb-2 tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg-hover)]\"\n >\n {{ t.previewResolution.failed }}\n </p>\n\n <BlockPreviewCanvas\n v-if=\"!previewResolution.isInitialResolve.value\"\n :blocks=\"previewBlocks\"\n :settings=\"previewSettings\"\n :viewport=\"previewViewport\"\n :apply-condition-filter=\"!previewResolution.isConfigured\"\n />\n </div>\n\n <!-- Success. Announced politely; the dialog closes itself shortly after. -->\n <p\n v-if=\"justSent\"\n role=\"status\"\n data-testid=\"test-email-success\"\n class=\"tpl:mb-3 tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success,var(--tpl-primary))]\"\n >\n <Check :size=\"13\" :stroke-width=\"2.5\" />\n {{ t.testEmail.success }}\n </p>\n\n <!-- Failure. Stays open so the user can retry. -->\n <p\n v-else-if=\"errorText\"\n role=\"alert\"\n data-testid=\"test-email-error\"\n class=\"tpl:mb-3 tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n {{ errorText }}\n </p>\n\n <!-- Actions -->\n <div class=\"tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"test-email-cancel\"\n class=\"tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]\"\n :disabled=\"isSending\"\n :class=\"{ 'tpl:cursor-not-allowed tpl:opacity-50': isSending }\"\n @click=\"handleClose\"\n >\n {{ t.testEmail.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"test-email-send\"\n :class=\"primaryBtnClass\"\n :disabled=\"!canSend\"\n @click=\"handleSend\"\n >\n <span v-if=\"isSending\" class=\"tpl:flex tpl:items-center tpl:gap-1.5\">\n <LoaderCircle\n class=\"tpl:animate-spin\"\n :size=\"12\"\n :stroke-width=\"2\"\n />\n {{ t.testEmail.sending }}\n </span>\n <span v-else>\n {{ t.testEmail.send }}\n </span>\n </button>\n </div>\n </div>\n </TplModal>\n</template>\n","<script setup lang=\"ts\">\nimport { primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Send-a-test dialog, shared by the OSS and Cloud editors.\n *\n * The recipient control has three shapes, driven entirely by whether the\n * provider configured an allowlist:\n *\n * - **no allowlist** — free text, validated for shape only. This branch exists\n * for BYO senders; Cloud never takes it, because its list comes from a signed\n * JWT.\n * - **exactly one** — a read-only field. Preserved verbatim from the Cloud-only\n * version; there is nothing to choose, so offering an editable field would\n * imply otherwise.\n * - **several** — a picker of exactly those addresses.\n *\n * An empty allowlist never reaches here: the feature reports itself unavailable,\n * so no trigger renders. (The Cloud-only version fell through to `v-else` and\n * rendered a select with no options and a permanently disabled Send.)\n */\nimport TplModal from \"./TplModal.vue\";\n// Statically imported: this modal is already lazy-loaded as a whole, so the\n// preview rides its chunk rather than costing a second round-trip and flashing\n// an empty frame. Still shared with the saved-blocks surfaces, which lazy-load\n// it themselves.\nimport BlockPreviewCanvas from \"./BlockPreviewCanvas.vue\";\n// The editor header's own control, reused verbatim so the two viewport switches\n// are the same component rather than two things that resemble each other.\nimport ViewportToggle from \"./ViewportToggle.vue\";\nimport MergeTagModeToggle from \"./MergeTagModeToggle.vue\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { looksLikeEmail } from \"../utils/validateEmailShape\";\nimport { Check, LoaderCircle } from \"@lucide/vue\";\nimport { computed, inject, ref, watch } from \"vue\";\nimport {\n applyLayout,\n hasMergeTagSamples,\n type ViewportSize,\n} from \"@templatical/types\";\nimport {\n EDITOR_KEY,\n LAYOUT_KEY,\n MERGE_TAGS_KEY,\n NO_MERGE_TAGS,\n MERGE_TAG_SAMPLE_MODE_KEY,\n RESOLVE_PREVIEW_KEY,\n} from \"../keys\";\nimport { usePreviewResolution } from \"../composables/usePreviewResolution\";\nimport type { TestEmailError } from \"../composables/useTestEmailFeature\";\n\nconst props = defineProps<{\n visible: boolean;\n /** Omitted / undefined means unrestricted, so the field accepts free text. */\n allowedRecipients?: string[];\n defaultRecipient?: string;\n isSending: boolean;\n justSent: boolean;\n error: TestEmailError | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"send\", recipient: string): void;\n (e: \"close\"): void;\n}>();\n\nconst { t } = useI18n();\nconst editor = inject(EDITOR_KEY, null);\nconst layout = inject(LAYOUT_KEY, undefined);\n\nconst recipient = ref(\"\");\n\nconst previewViewport = ref<ViewportSize>(\"desktop\");\n\n/**\n * Its own resolution instance rather than the editor's, because this dialog has\n * a recipient and the editor's preview does not — resolving for \"whoever is\n * selected here\" is a different question from resolving for the canvas.\n * `isActive` is the dialog's own visibility.\n *\n * Compose the embedder shell while the dialog is showing. The send payload\n * stays unshelled.\n */\nconst resolvePreviewHook = inject(RESOLVE_PREVIEW_KEY, undefined);\nconst previewResolution = usePreviewResolution({\n resolvePreview: resolvePreviewHook ?? undefined,\n getContent: () => {\n const raw = editor?.content.value ?? { blocks: [], settings: {} as never };\n return layout && props.visible ? applyLayout(layout, raw) : raw;\n },\n isActive: () => props.visible,\n getRecipient: () => recipient.value || undefined,\n});\n\n/**\n * Shared with the editor's own preview, so switching here and switching there\n * are the same choice — it is a property of how the user wants to read a\n * preview, not of one dialog. Falls back to a local ref for headless mounts.\n */\nconst sharedSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\n// Seeded from availability, matching how `useEditorCore` seeds the shared ref.\n// A blanket `true` would make the dialog claim tags \"show example values\" for a\n// consumer who configured none — false, and with no toggle rendered to correct\n// it, since the toggle hides itself when nothing has a sample.\nconst localSampleMode = ref(\n hasMergeTagSamples(inject(MERGE_TAGS_KEY, NO_MERGE_TAGS).value),\n);\nconst sampleMode = computed({\n get: () =>\n // Off entirely while a resolver is configured — same rule as the canvas.\n previewResolution.isConfigured\n ? false\n : (sharedSampleMode?.value ?? localSampleMode.value),\n set: (on: boolean) => {\n if (sharedSampleMode) sharedSampleMode.value = on;\n else localSampleMode.value = on;\n },\n});\n\nconst previewBlocks = computed(\n () => previewResolution.content.value.blocks ?? [],\n);\n\nconst previewSettings = computed(\n () => previewResolution.content.value.settings,\n);\n\nconst hasAllowlist = computed(\n () =>\n props.allowedRecipients !== undefined && props.allowedRecipients.length > 0,\n);\nconst isSingleRecipient = computed(() => props.allowedRecipients?.length === 1);\n\n// Mounted behind a `v-if` on the same state that drives `visible`, so it can\n// mount with `visible` already true — without `immediate` the field would never\n// be seeded.\nwatch(\n () => props.visible,\n (visible) => {\n if (!visible) return;\n recipient.value =\n props.defaultRecipient ?? props.allowedRecipients?.[0] ?? \"\";\n },\n { immediate: true },\n);\n\n/** Shape-check free text only; a picker can't produce a malformed value. */\nconst isRecipientValid = computed(() =>\n hasAllowlist.value\n ? recipient.value.length > 0\n : looksLikeEmail(recipient.value),\n);\n\nconst canSend = computed(\n () => isRecipientValid.value && !props.isSending && !props.justSent,\n);\n\n/** Free text that's been typed into but isn't yet a plausible address. */\nconst showShapeHint = computed(\n () =>\n !hasAllowlist.value &&\n recipient.value.trim().length > 0 &&\n !isRecipientValid.value,\n);\n\nconst errorText = computed(() => {\n if (!props.error) return null;\n return props.error.kind === \"provider\"\n ? props.error.message\n : t.testEmail.recipientNotAllowed;\n});\n\nfunction handleSend(): void {\n if (!canSend.value) return;\n emit(\"send\", recipient.value.trim());\n}\n\nfunction handleClose(): void {\n // Sending is the one state that blocks dismissal; the success state closes\n // immediately rather than making the user wait out the timer.\n if (props.isSending) return;\n emit(\"close\");\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleSend();\n }\n if (event.key === \"Escape\") {\n handleClose();\n }\n}\n</script>\n\n<template>\n <TplModal :visible=\"visible\" @close=\"handleClose\" @keydown=\"handleKeydown\">\n <!-- Grows to `max-w-3xl` only while the preview is open. A 600px email has\n to render at true size AND leave slack on both sides for the band of\n body background the preview draws beside it: at `max-w-2xl` the\n preview region's content box is exactly 600px, so the band would have\n nowhere to go and `settings.backgroundColor` would look unset for any\n template whose sections span the full width. Collapsed, it stays the\n compact form it was. `w-full` keeps it shrinking on narrow screens.\n `max-h-[90%]`\n with a `min-h-0 overflow-y-auto` preview region is the pattern the\n saved-blocks dialogs use: the cap bounds the panel to TplModal's\n backdrop (never to `vh` — see the note there), and `min-h-0` is what\n lets a flex child shrink below its content and actually scroll. -->\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-busy=\"isSending\"\n aria-labelledby=\"tpl-test-email-title\"\n class=\"tpl-scale-in tpl:flex tpl:max-h-[90%] tpl:w-full tpl:max-w-3xl tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5\"\n style=\"\n background-color: var(--tpl-bg-elevated);\n box-shadow: var(--tpl-shadow-xl);\n \"\n >\n <h3\n id=\"tpl-test-email-title\"\n class=\"tpl:mb-4 tpl:shrink-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ t.testEmail.title }}\n </h3>\n\n <!-- Recipient -->\n <div class=\"tpl:mb-3 tpl:shrink-0\">\n <label\n for=\"tpl-test-email-recipient\"\n class=\"tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.testEmail.recipientLabel }}\n </label>\n\n <!-- Exactly one allowed address: nothing to choose. -->\n <input\n v-if=\"isSingleRecipient\"\n id=\"tpl-test-email-recipient\"\n type=\"text\"\n :value=\"recipient\"\n disabled\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n />\n\n <!-- Several allowed addresses: pick one. -->\n <select\n v-else-if=\"hasAllowlist\"\n id=\"tpl-test-email-recipient\"\n v-model=\"recipient\"\n :disabled=\"isSending || justSent\"\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n >\n <option\n v-for=\"email in allowedRecipients\"\n :key=\"email\"\n :value=\"email\"\n >\n {{ email }}\n </option>\n </select>\n\n <!-- No allowlist: free text. -->\n <input\n v-else\n id=\"tpl-test-email-recipient\"\n v-model=\"recipient\"\n type=\"email\"\n autocomplete=\"email\"\n spellcheck=\"false\"\n :placeholder=\"t.testEmail.recipientPlaceholder\"\n :disabled=\"isSending || justSent\"\n data-testid=\"test-email-recipient\"\n class=\"tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-[var(--tpl-shadow-sm)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]\"\n />\n\n <p\n v-if=\"showShapeHint\"\n class=\"tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ t.testEmail.invalidAddress }}\n </p>\n </div>\n\n <!-- Preview header: a label plus the viewport switch. Always shown — the\n preview is part of the dialog rather than something to opt into. -->\n <div class=\"tpl:mb-2 tpl:shrink-0\">\n <!-- Two segmented controls: `flex-wrap` so they drop to their own row\n rather than crushing the label on a narrow viewport. -->\n <div\n class=\"tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-between tpl:gap-2\"\n >\n <span\n class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.testEmail.preview }}\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <MergeTagModeToggle\n v-if=\"!previewResolution.supersedesSamples.value\"\n :sample-mode=\"sampleMode\"\n @change=\"sampleMode = $event\"\n />\n\n <!-- Without this the preview would silently show only the desktop\n variant of any responsive block. -->\n <ViewportToggle\n :viewport=\"previewViewport\"\n @change=\"previewViewport = $event\"\n />\n </div>\n </div>\n\n <!-- The hint has to follow the mode: \"shown unresolved\" is simply false\n once every tag renders a realistic value. -->\n <p\n data-testid=\"test-email-preview-hint\"\n class=\"tpl:mt-1 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n >\n {{\n previewResolution.supersedesSamples.value\n ? t.previewResolution.hint\n : sampleMode\n ? t.testEmail.previewHintSample\n : t.testEmail.previewHint\n }}\n </p>\n </div>\n\n <!-- The one region allowed to grow: `flex-1 min-h-0` so it absorbs the\n remaining height and scrolls, leaving the form and actions fixed. -->\n <div\n id=\"tpl-test-email-preview\"\n data-testid=\"test-email-preview\"\n class=\"tpl:mb-3 tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-sm)] tpl:p-3 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <!-- Skeleton while a *first* resolve is outstanding, so the dialog never\n flashes the unresolved template before the resolved one. Sized like\n the frame it replaces to avoid a layout jump. A re-resolve (recipient\n change) keeps the previous result instead — `isInitialResolve`. -->\n <div\n v-if=\"previewResolution.isInitialResolve.value\"\n role=\"status\"\n aria-busy=\"true\"\n data-testid=\"preview-resolution-loading\"\n class=\"tpl:flex tpl:flex-col tpl:gap-3\"\n >\n <span class=\"tpl:sr-only\">{{ t.previewResolution.resolving }}</span>\n <div\n v-for=\"n in 3\"\n :key=\"n\"\n aria-hidden=\"true\"\n class=\"tpl-pulse tpl:h-16 tpl:rounded-md tpl:bg-[var(--tpl-bg-hover)]\"\n ></div>\n </div>\n\n <!-- Resolution failed: the unresolved template renders below, so the\n dialog degrades rather than showing an empty frame. -->\n <p\n v-else-if=\"previewResolution.hasFailed.value\"\n role=\"status\"\n data-testid=\"preview-resolution-failed\"\n class=\"tpl:mb-2 tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg-hover)]\"\n >\n {{ t.previewResolution.failed }}\n </p>\n\n <BlockPreviewCanvas\n v-if=\"!previewResolution.isInitialResolve.value\"\n :blocks=\"previewBlocks\"\n :settings=\"previewSettings\"\n :viewport=\"previewViewport\"\n :apply-condition-filter=\"!previewResolution.isConfigured\"\n />\n </div>\n\n <!-- Success. Announced politely; the dialog closes itself shortly after. -->\n <p\n v-if=\"justSent\"\n role=\"status\"\n data-testid=\"test-email-success\"\n class=\"tpl:mb-3 tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success,var(--tpl-primary))]\"\n >\n <Check :size=\"13\" :stroke-width=\"2.5\" />\n {{ t.testEmail.success }}\n </p>\n\n <!-- Failure. Stays open so the user can retry. -->\n <p\n v-else-if=\"errorText\"\n role=\"alert\"\n data-testid=\"test-email-error\"\n class=\"tpl:mb-3 tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-danger)]\"\n >\n {{ errorText }}\n </p>\n\n <!-- Actions -->\n <div class=\"tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"test-email-cancel\"\n class=\"tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]\"\n :disabled=\"isSending\"\n :class=\"{ 'tpl:cursor-not-allowed tpl:opacity-50': isSending }\"\n @click=\"handleClose\"\n >\n {{ t.testEmail.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"test-email-send\"\n :class=\"primaryBtnClass\"\n :disabled=\"!canSend\"\n @click=\"handleSend\"\n >\n <span v-if=\"isSending\" class=\"tpl:flex tpl:items-center tpl:gap-1.5\">\n <LoaderCircle\n class=\"tpl:animate-spin\"\n :size=\"12\"\n :stroke-width=\"2\"\n />\n {{ t.testEmail.sending }}\n </span>\n <span v-else>\n {{ t.testEmail.send }}\n </span>\n </button>\n </div>\n </div>\n </TplModal>\n</template>\n"],"mappings":";;;;;;;;;;;AASA,IAAM0D,IAA0B;AAkBhC,SAAgBC,EAAe,GAAwB;CACrD,IAAM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1
|
+
import { C as e, P as t, S as n, g as r, h as i, st as a } from "./draggable-Du8AUMFT.js";
|
|
2
|
+
// src/components/TestEmailPanel.vue
|
|
4
3
|
var o = /* @__PURE__ */ e({
|
|
5
4
|
__name: "TestEmailPanel",
|
|
6
5
|
props: { feature: {} },
|
|
7
6
|
setup(e) {
|
|
8
|
-
let o = e, s = n(() => import("./TestEmailModal-
|
|
7
|
+
let o = e, s = n(() => import("./TestEmailModal-CDQTgESD.js"));
|
|
9
8
|
function c(e) {
|
|
10
9
|
o.feature.send(e);
|
|
11
10
|
}
|
|
@@ -29,7 +28,6 @@ var o = /* @__PURE__ */ e({
|
|
|
29
28
|
])) : r("", !0);
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
//#endregion
|
|
33
31
|
export { o as default };
|
|
34
32
|
|
|
35
|
-
//# sourceMappingURL=TestEmailPanel-
|
|
33
|
+
//# sourceMappingURL=TestEmailPanel-CcUpEpAn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestEmailPanel-
|
|
1
|
+
{"version":3,"file":"TestEmailPanel-CcUpEpAn.js","names":["_openBlock","_createBlock","_unref","_createCommentVNode","_sfc_main","defineComponent","openBlock","defineAsyncComponent","createCommentVNode","createBlock","unref","TestEmailPanel_default","props","__props","TestEmailModal","handleSend","recipient","_cache"],"sources":["../../../src/components/TestEmailPanel.vue","../../../src/components/TestEmailPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Mount point for the test-email dialog, shared by the OSS and Cloud editors.\n *\n * The dialog is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens it — `defineAsyncComponent`\n * triggers its `import()` on first render, not at definition time. `Editor.vue`\n * in turn lazy-loads *this* wrapper and renders it only when a\n * `TestEmailProvider` is configured, so a consumer without one downloads none\n * of it.\n *\n * Never static-import `TestEmailModal` into `Editor.vue`:\n * that collapses it into the main entry for every consumer, including those who\n * never configure a sender. Guarded by `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseTestEmailFeatureReturn } from \"../composables/useTestEmailFeature\";\n\nconst props = defineProps<{\n feature: UseTestEmailFeatureReturn;\n}>();\n\nconst TestEmailModal = defineAsyncComponent(\n () => import(\"./TestEmailModal.vue\"),\n);\n\nfunction handleSend(recipient: string): void {\n void props.feature.send(recipient);\n}\n</script>\n\n<template>\n <TestEmailModal\n v-if=\"feature.isModalOpen.value\"\n :visible=\"feature.isModalOpen.value\"\n :allowed-recipients=\"feature.allowedRecipients.value\"\n :default-recipient=\"feature.defaultRecipient.value\"\n :is-sending=\"feature.isSending.value\"\n :just-sent=\"feature.justSent.value\"\n :error=\"feature.error.value\"\n @send=\"handleSend\"\n @close=\"feature.close()\"\n />\n</template>\n","<script setup lang=\"ts\">\n/**\n * Mount point for the test-email dialog, shared by the OSS and Cloud editors.\n *\n * The dialog is `defineAsyncComponent` behind a `v-if` on its open state, so its\n * chunk is fetched only when the user actually opens it — `defineAsyncComponent`\n * triggers its `import()` on first render, not at definition time. `Editor.vue`\n * in turn lazy-loads *this* wrapper and renders it only when a\n * `TestEmailProvider` is configured, so a consumer without one downloads none\n * of it.\n *\n * Never static-import `TestEmailModal` into `Editor.vue`:\n * that collapses it into the main entry for every consumer, including those who\n * never configure a sender. Guarded by `tests/cdn-chunk-granularity.test.ts`.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseTestEmailFeatureReturn } from \"../composables/useTestEmailFeature\";\n\nconst props = defineProps<{\n feature: UseTestEmailFeatureReturn;\n}>();\n\nconst TestEmailModal = defineAsyncComponent(\n () => import(\"./TestEmailModal.vue\"),\n);\n\nfunction handleSend(recipient: string): void {\n void props.feature.send(recipient);\n}\n</script>\n\n<template>\n <TestEmailModal\n v-if=\"feature.isModalOpen.value\"\n :visible=\"feature.isModalOpen.value\"\n :allowed-recipients=\"feature.allowedRecipients.value\"\n :default-recipient=\"feature.defaultRecipient.value\"\n :is-sending=\"feature.isSending.value\"\n :just-sent=\"feature.justSent.value\"\n :error=\"feature.error.value\"\n @send=\"handleSend\"\n @close=\"feature.close()\"\n />\n</template>\n"],"mappings":";;;;;;EAkBA,IAAMY,IAAQC,GAIRC,IAAiBP,QACf,OAAO,+BACf;EAEA,SAASQ,EAAW,GAAyB;GAC3C,EAAW,QAAQ,KAAKC,CAAS;EACnC;E,iBAKUH,EAAA,QAAQ,YAAY,SAD5Bb,EAAA,GAAAC,EAUEC,EAAAY,CAAA,GAAA;;GARC,SAASD,EAAA,QAAQ,YAAY;GAC7B,sBAAoBA,EAAA,QAAQ,kBAAkB;GAC9C,qBAAmBA,EAAA,QAAQ,iBAAiB;GAC5C,cAAYA,EAAA,QAAQ,UAAU;GAC9B,aAAWA,EAAA,QAAQ,SAAS;GAC5B,OAAOA,EAAA,QAAQ,MAAM;GACrB,QAAME;GACN,SAAK,AAAAE,EAAA,QAAA,MAAEJ,EAAA,QAAQ,MAAK"}
|