@templatical/editor 0.56.0 → 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +1 -1
  2. package/dist/{AiAltTextPopover-DdsvhE78.js → AiAltTextPopover-BjClNscQ.js} +6 -6
  3. package/dist/{AiAltTextReview-P6to1_0t.js → AiAltTextReview-DeMdVbtT.js} +7 -7
  4. package/dist/{AiChatPanel-BSlmzMRC.js → AiChatPanel-Cros4ZCM.js} +64 -67
  5. package/dist/AiPanels-D_CdHqFZ.js +26 -0
  6. package/dist/{AiRewriteMenu-DIISOR6U.js → AiRewriteMenu-BSzj1dKC.js} +53 -53
  7. package/dist/{BlockIssueBadge-Bmtc50BQ.js → BlockIssueBadge-i2cZy5PB.js} +6 -6
  8. package/dist/{BlockPreviewCanvas-BYIzNn-9.js → BlockPreviewCanvas-D-If_vd_.js} +58 -58
  9. package/dist/{CloudHeaderExtras-Cqhw-jMz.js → CloudHeaderExtras-CJsXi4Ku.js} +2 -2
  10. package/dist/{CloudPanels-w34W8_BP.js → CloudPanels-DPeK_siQ.js} +14 -14
  11. package/dist/{CollaborationNotices-HTbCebjV.js → CollaborationNotices-DkYX-ose.js} +9 -9
  12. package/dist/{CollaboratorBar-CLQjksX-.js → CollaboratorBar-xDweDvB6.js} +3 -3
  13. package/dist/CommentsPanel-t3w16YUl.js +23 -0
  14. package/dist/CommentsSidebar-B3M90RY_.js +516 -0
  15. package/dist/{CountdownBlock-BTXcCvjZ.js → CountdownBlock-BrR2uqM3.js} +7 -7
  16. package/dist/{CountdownToolbar-CP-pkntQ.js → CountdownToolbar-DBu2ZqC6.js} +32 -32
  17. package/dist/{IssuesPanel-CiiNBzH0.js → IssuesPanel-BnUut-p-.js} +89 -89
  18. package/dist/LanguageMenu-DfTxrbvp.js +403 -0
  19. package/dist/{LoadingTrack-BG8cg9xi.js → LoadingTrack-c4SeD16s.js} +1 -1
  20. package/dist/{LocaleNotices-CTCZ7BYv.js → LocaleNotices-D6zk-QCL.js} +11 -11
  21. package/dist/{LogicTagInsertButton-DEOPc4RC.js → LogicTagInsertButton-CJ1Jk6jv.js} +65 -65
  22. package/dist/{MediaEditModal-DJsPLTwP.js → MediaEditModal-BxbwZxnf.js} +10 -10
  23. package/dist/{MediaPanels-D2WD2aE2.js → MediaPanels-BiUxsTMM.js} +2 -2
  24. package/dist/{MergeTagInput-C9icdxw7.js → MergeTagInput-CV-z85s9.js} +13 -13
  25. package/dist/{MergeTagModeToggle-DXvb80OE.js → MergeTagModeToggle-CixgX5C_.js} +7 -7
  26. package/dist/{MergeTagTextarea-CrAcmT3A.js → MergeTagTextarea-B1zOC_Nr.js} +9 -9
  27. package/dist/{ParagraphEditor-BWBQ3jKz.js → ParagraphEditor-C9UhWvRB.js} +174 -174
  28. package/dist/{RestoreVersionDialog-CqAp16yQ.js → RestoreVersionDialog-Do7fZWpT.js} +13 -13
  29. package/dist/{RichTextEditorContent-xbBjVPVQ.js → RichTextEditorContent-wW_SMun2.js} +10 -10
  30. package/dist/{SaveBlockDialog-pebNJBTc.js → SaveBlockDialog-CCHIUfR-.js} +49 -49
  31. package/dist/{SavedBlocksBrowserModal-CvagMcv7.js → SavedBlocksBrowserModal-DtPHhfw9.js} +26 -26
  32. package/dist/{SavedBlocksPanels-B9AAVBDm.js → SavedBlocksPanels-CYIby5pR.js} +2 -2
  33. package/dist/{SavedBlocksPickBar-BIANWe3i.js → SavedBlocksPickBar-CCwBugqN.js} +10 -10
  34. package/dist/{TemplateSettings-ORq4PbCN.js → TemplateSettings-B8IVy5q9.js} +42 -42
  35. package/dist/{TestEmailModal-DRjCpcPl.js → TestEmailModal-CS5JoKRH.js} +22 -22
  36. package/dist/{TestEmailPanel-H0v8El__.js → TestEmailPanel-sOIZfKzc.js} +2 -2
  37. package/dist/{TitleEditor-CEGbJXeU.js → TitleEditor-ZlBcq9_P.js} +22 -22
  38. package/dist/{ToggleSwitch-R3wCCYE6.js → ToggleSwitch-BIPdFWUr.js} +1 -1
  39. package/dist/{Toolbar-XT-uGA9J.js → Toolbar-c4_rLLJT.js} +659 -659
  40. package/dist/{TplModal-7NQq5-VW.js → TplModal-DnFFEulp.js} +6 -6
  41. package/dist/{VersionHistoryMenu-C8BE3Pr-.js → VersionHistoryMenu-Cd2IaHgT.js} +19 -19
  42. package/dist/{VersionHistoryPanels-CuKuOSJG.js → VersionHistoryPanels-TdGaMaa_.js} +2 -2
  43. package/dist/{VersionPreviewBanner-BVFBkveR.js → VersionPreviewBanner-lkAf7tc8.js} +8 -8
  44. package/dist/{WrapperBlock-Bdw-072t.js → WrapperBlock-BiW4ye3w.js} +12 -12
  45. package/dist/{blockTypeIcons-CGplGmmr.js → blockTypeIcons-D1aYMC1M.js} +3 -3
  46. package/dist/bundle-stats.json +7 -7
  47. package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js → AiAltTextPopover-CfGJNBOb.js} +6 -6
  48. package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js.map → AiAltTextPopover-CfGJNBOb.js.map} +1 -1
  49. package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js → AiAltTextReview-PKe31R_g.js} +7 -7
  50. package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js.map → AiAltTextReview-PKe31R_g.js.map} +1 -1
  51. package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js → AiChatPanel-DNCUpV8n.js} +112 -115
  52. package/dist/cdn/chunks/AiChatPanel-DNCUpV8n.js.map +1 -0
  53. package/dist/cdn/chunks/AiPanels-IV0VEkBL.js +27 -0
  54. package/dist/cdn/chunks/AiPanels-IV0VEkBL.js.map +1 -0
  55. package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js → AiRewriteMenu-ZDBwReuU.js} +61 -61
  56. package/dist/cdn/chunks/AiRewriteMenu-ZDBwReuU.js.map +1 -0
  57. package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js → BlockIssueBadge-DIlFDDwh.js} +6 -6
  58. package/dist/cdn/chunks/BlockIssueBadge-DIlFDDwh.js.map +1 -0
  59. package/dist/cdn/chunks/BlockPreviewCanvas-D7U6nQ7t.js +156 -0
  60. package/dist/cdn/chunks/BlockPreviewCanvas-D7U6nQ7t.js.map +1 -0
  61. package/dist/cdn/chunks/{CloudHeaderExtras-uUJYJFJ6.js → CloudHeaderExtras-CazfMn6A.js} +3 -3
  62. package/dist/cdn/chunks/{CloudHeaderExtras-uUJYJFJ6.js.map → CloudHeaderExtras-CazfMn6A.js.map} +1 -1
  63. package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js → CloudPanels-EXXNMLbs.js} +5 -5
  64. package/dist/cdn/chunks/CloudPanels-EXXNMLbs.js.map +1 -0
  65. package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js → CollaborationNotices-DGA8XRZJ.js} +10 -10
  66. package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js.map → CollaborationNotices-DGA8XRZJ.js.map} +1 -1
  67. package/dist/cdn/chunks/{CollaboratorBar-C1ZI2xwa.js → CollaboratorBar-BWL1Shc1.js} +4 -4
  68. package/dist/cdn/chunks/{CollaboratorBar-C1ZI2xwa.js.map → CollaboratorBar-BWL1Shc1.js.map} +1 -1
  69. package/dist/cdn/chunks/CommentsPanel-4mrl4zMK.js +24 -0
  70. package/dist/cdn/chunks/CommentsPanel-4mrl4zMK.js.map +1 -0
  71. package/dist/cdn/chunks/CommentsSidebar-BJ87vc7i.js +486 -0
  72. package/dist/cdn/chunks/CommentsSidebar-BJ87vc7i.js.map +1 -0
  73. package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js → CountdownBlock-Do6oItNW.js} +8 -8
  74. package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js.map → CountdownBlock-Do6oItNW.js.map} +1 -1
  75. package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js → CountdownToolbar-BN2_zvRj.js} +52 -52
  76. package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js.map → CountdownToolbar-BN2_zvRj.js.map} +1 -1
  77. package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js → IssuesPanel-BDwegn0s.js} +14 -14
  78. package/dist/cdn/chunks/IssuesPanel-BDwegn0s.js.map +1 -0
  79. package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js → LanguageMenu-DXq9cXUd.js} +58 -58
  80. package/dist/cdn/chunks/LanguageMenu-DXq9cXUd.js.map +1 -0
  81. package/dist/cdn/chunks/{LoadingTrack-DUYcDHOV.js → LoadingTrack-o-89hApJ.js} +2 -2
  82. package/dist/cdn/chunks/{LoadingTrack-DUYcDHOV.js.map → LoadingTrack-o-89hApJ.js.map} +1 -1
  83. package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js → LocaleNotices-CUN5K5QJ.js} +11 -11
  84. package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js.map → LocaleNotices-CUN5K5QJ.js.map} +1 -1
  85. package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js → LogicTagInsertButton-BEArlbra.js} +12 -12
  86. package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js.map → LogicTagInsertButton-BEArlbra.js.map} +1 -1
  87. package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js → MediaEditModal-BHTMNHx0.js} +10 -10
  88. package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js.map → MediaEditModal-BHTMNHx0.js.map} +1 -1
  89. package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js → MediaPanels-BlianNRh.js} +3 -3
  90. package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js.map → MediaPanels-BlianNRh.js.map} +1 -1
  91. package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js → MergeTagInput-B3SLXXzL.js} +14 -14
  92. package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js.map → MergeTagInput-B3SLXXzL.js.map} +1 -1
  93. package/dist/cdn/chunks/{MergeTagModeToggle-D7maMGIM.js → MergeTagModeToggle-Dywp9ntA.js} +6 -6
  94. package/dist/cdn/chunks/{MergeTagModeToggle-D7maMGIM.js.map → MergeTagModeToggle-Dywp9ntA.js.map} +1 -1
  95. package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js → MergeTagTextarea-B9TM7FgM.js} +7 -7
  96. package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js.map → MergeTagTextarea-B9TM7FgM.js.map} +1 -1
  97. package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js → ParagraphEditor-CVGtTYta.js} +107 -107
  98. package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js.map → ParagraphEditor-CVGtTYta.js.map} +1 -1
  99. package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js → RestoreVersionDialog-Dt_0qOOW.js} +13 -13
  100. package/dist/cdn/chunks/RestoreVersionDialog-Dt_0qOOW.js.map +1 -0
  101. package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js → RichTextEditorContent-BjN4mnzL.js} +9 -9
  102. package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js.map → RichTextEditorContent-BjN4mnzL.js.map} +1 -1
  103. package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js → SaveBlockDialog-D9eBjE99.js} +51 -51
  104. package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js.map → SaveBlockDialog-D9eBjE99.js.map} +1 -1
  105. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js → SavedBlocksBrowserModal-ClsTpkdk.js} +24 -24
  106. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js.map → SavedBlocksBrowserModal-ClsTpkdk.js.map} +1 -1
  107. package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js → SavedBlocksPanels-CxlNHhUs.js} +3 -3
  108. package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js.map → SavedBlocksPanels-CxlNHhUs.js.map} +1 -1
  109. package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js → SavedBlocksPickBar-C7_Z8phX.js} +12 -12
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js.map → SavedBlocksPickBar-C7_Z8phX.js.map} +1 -1
  111. package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js → TemplateSettings-B6zDtjSs.js} +102 -102
  112. package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js.map → TemplateSettings-B6zDtjSs.js.map} +1 -1
  113. package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js → TestEmailModal-CJ_QYFua.js} +21 -21
  114. package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js.map → TestEmailModal-CJ_QYFua.js.map} +1 -1
  115. package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js → TestEmailPanel-CsFrTq_a.js} +3 -3
  116. package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js.map → TestEmailPanel-CsFrTq_a.js.map} +1 -1
  117. package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js → TitleEditor-CuKJptyw.js} +20 -20
  118. package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js.map → TitleEditor-CuKJptyw.js.map} +1 -1
  119. package/dist/cdn/chunks/{ToggleSwitch-BSkySwA1.js → ToggleSwitch-C0w0srN_.js} +2 -2
  120. package/dist/cdn/chunks/{ToggleSwitch-BSkySwA1.js.map → ToggleSwitch-C0w0srN_.js.map} +1 -1
  121. package/dist/cdn/chunks/{Toolbar-C_Hfsher.js → Toolbar-TS2WwlPW.js} +542 -542
  122. package/dist/cdn/chunks/Toolbar-TS2WwlPW.js.map +1 -0
  123. package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js → TplModal-CsadClrH.js} +7 -7
  124. package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js.map → TplModal-CsadClrH.js.map} +1 -1
  125. package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js → VersionHistoryMenu-BNPxnWiO.js} +16 -16
  126. package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js.map → VersionHistoryMenu-BNPxnWiO.js.map} +1 -1
  127. package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js → VersionHistoryPanels-CieY91f0.js} +3 -3
  128. package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js.map → VersionHistoryPanels-CieY91f0.js.map} +1 -1
  129. package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js → VersionPreviewBanner-BldFvgxJ.js} +9 -9
  130. package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js.map → VersionPreviewBanner-BldFvgxJ.js.map} +1 -1
  131. package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js → WrapperBlock-DtnRuKWE.js} +13 -13
  132. package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js.map → WrapperBlock-DtnRuKWE.js.map} +1 -1
  133. package/dist/cdn/chunks/{blockTypeIcons-CzYA5DF9.js → blockTypeIcons-19xd5ZPi.js} +6 -6
  134. package/dist/cdn/chunks/{blockTypeIcons-CzYA5DF9.js.map → blockTypeIcons-19xd5ZPi.js.map} +1 -1
  135. package/dist/cdn/chunks/{composables-CsfQlmcf.js → composables-CUIiW9OD.js} +1190 -1170
  136. package/dist/cdn/chunks/composables-CUIiW9OD.js.map +1 -0
  137. package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js → createCloudRuntime-B7D04wKf.js} +161 -147
  138. package/dist/cdn/chunks/createCloudRuntime-B7D04wKf.js.map +1 -0
  139. package/dist/cdn/chunks/da-CYWJkrTg.js +97 -0
  140. package/dist/cdn/chunks/da-CYWJkrTg.js.map +1 -0
  141. package/dist/cdn/chunks/da-qQzj0QGy.js +950 -0
  142. package/dist/cdn/chunks/da-qQzj0QGy.js.map +1 -0
  143. package/dist/cdn/chunks/{dist-BzXULHvI.js → dist-BtWMy7UQ.js} +3 -3
  144. package/dist/cdn/chunks/{dist-BzXULHvI.js.map → dist-BtWMy7UQ.js.map} +1 -1
  145. package/dist/cdn/chunks/dist-zu1jwYIS.js +405 -0
  146. package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-zu1jwYIS.js.map} +1 -1
  147. package/dist/cdn/chunks/{draggable-DepKdldn.js → draggable-IRVFEZ-b.js} +1535 -1500
  148. package/dist/cdn/chunks/draggable-IRVFEZ-b.js.map +1 -0
  149. package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js → editor-modal-CarOiAYJ.js} +137 -136
  150. package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js.map → editor-modal-CarOiAYJ.js.map} +1 -1
  151. package/dist/cdn/chunks/en-B4s_0ryk.js +1 -0
  152. package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js → extensions-Cbvk9i08.js} +96 -96
  153. package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js.map → extensions-Cbvk9i08.js.map} +1 -1
  154. package/dist/cdn/chunks/{icons-DHExFLlT.js → icons-Cl4oR2mf.js} +73 -73
  155. package/dist/cdn/chunks/icons-Cl4oR2mf.js.map +1 -0
  156. package/dist/cdn/chunks/keys-BQqbBUag.js +11 -0
  157. package/dist/cdn/chunks/keys-BQqbBUag.js.map +1 -0
  158. package/dist/cdn/chunks/{normalizeMergeTagMarkup-aWjkotui.js → normalizeMergeTagMarkup-BJ-MnCqF.js} +55 -55
  159. package/dist/cdn/chunks/{normalizeMergeTagMarkup-aWjkotui.js.map → normalizeMergeTagMarkup-BJ-MnCqF.js.map} +1 -1
  160. package/dist/cdn/chunks/{preRenderCustomBlocks-Dn6dFUwx.js → preRenderCustomBlocks-D2wISRHq.js} +2 -2
  161. package/dist/cdn/chunks/{preRenderCustomBlocks-Dn6dFUwx.js.map → preRenderCustomBlocks-D2wISRHq.js.map} +1 -1
  162. package/dist/cdn/chunks/sanitizeHtml-CB7fjHFs.js +72 -0
  163. package/dist/cdn/chunks/sanitizeHtml-CB7fjHFs.js.map +1 -0
  164. package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js → socialIcons-C_yggK1_.js} +575 -524
  165. package/dist/cdn/chunks/socialIcons-C_yggK1_.js.map +1 -0
  166. package/dist/cdn/chunks/{src-C9JWWxAk.js → src-Bp7bZcuD.js} +108 -95
  167. package/dist/cdn/chunks/src-Bp7bZcuD.js.map +1 -0
  168. package/dist/cdn/chunks/{src-mXG-Of9A.js → src-CdVAke9t.js} +721 -696
  169. package/dist/cdn/chunks/src-CdVAke9t.js.map +1 -0
  170. package/dist/cdn/chunks/{src-Bfj1jHnn.js → src-D-URHI0Z.js} +232 -228
  171. package/dist/cdn/chunks/src-D-URHI0Z.js.map +1 -0
  172. package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-BPiZqxCt.js} +42 -33
  173. package/dist/cdn/chunks/tiptap-BPiZqxCt.js.map +1 -0
  174. package/dist/cdn/chunks/{useCloudI18n-Xsih9yRH.js → useCloudI18n-Dr4S2TRW.js} +3 -3
  175. package/dist/cdn/chunks/{useCloudI18n-Xsih9yRH.js.map → useCloudI18n-Dr4S2TRW.js.map} +1 -1
  176. package/dist/cdn/chunks/useEditorRoot-B_kf_k-g.js +9 -0
  177. package/dist/cdn/chunks/{useEditorRoot-Beau2Z_T.js.map → useEditorRoot-B_kf_k-g.js.map} +1 -1
  178. package/dist/cdn/chunks/{useI18n-D8s7HtTn.js → useI18n-CSf-ZpcM.js} +3 -3
  179. package/dist/cdn/chunks/{useI18n-D8s7HtTn.js.map → useI18n-CSf-ZpcM.js.map} +1 -1
  180. package/dist/cdn/chunks/useLocalizedDisplay-slFOCPrh.js +33 -0
  181. package/dist/cdn/chunks/{useLocalizedDisplay-Bgg4qpev.js.map → useLocalizedDisplay-slFOCPrh.js.map} +1 -1
  182. package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js → useLogicTag-lPjCGeGC.js} +5 -5
  183. package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js.map → useLogicTag-lPjCGeGC.js.map} +1 -1
  184. package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js → useMergeTag-BKNBwIry.js} +8 -8
  185. package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js.map → useMergeTag-BKNBwIry.js.map} +1 -1
  186. package/dist/cdn/chunks/{usePopoverPosition-esO6wjvU.js → usePopoverPosition-BJFFi8x6.js} +3 -3
  187. package/dist/cdn/chunks/{usePopoverPosition-esO6wjvU.js.map → usePopoverPosition-BJFFi8x6.js.map} +1 -1
  188. package/dist/cdn/chunks/{useScrollToBlock-CJuUu7Xj.js → useScrollToBlock-MI4PP5lk.js} +3 -3
  189. package/dist/cdn/chunks/{useScrollToBlock-CJuUu7Xj.js.map → useScrollToBlock-MI4PP5lk.js.map} +1 -1
  190. package/dist/cdn/chunks/{withCurrentFont-QqBilClC.js → withCurrentFont-CzTFFaJA.js} +2 -2
  191. package/dist/cdn/chunks/{withCurrentFont-QqBilClC.js.map → withCurrentFont-CzTFFaJA.js.map} +1 -1
  192. package/dist/cdn/editor.css +1 -1
  193. package/dist/cdn/editor.js +784 -762
  194. package/dist/cdn/editor.js.map +1 -1
  195. package/dist/{check-CcuCoJDh.js → check-C7ua4TAK.js} +1 -1
  196. package/dist/{chevron-down-BfYIbFbC.js → chevron-down-DftQrAkI.js} +1 -1
  197. package/dist/{chevron-right-DyjFqY35.js → chevron-right-B-DULGbg.js} +1 -1
  198. package/dist/{chevron-up-BHEIxuS-.js → chevron-up-CeYsyD8c.js} +1 -1
  199. package/dist/{circle-alert-Tq7kAh9S.js → circle-exclamation-point-DHjORV_I.js} +3 -3
  200. package/dist/{clock-Df0ZiXwQ.js → clock-CajOtLEZ.js} +1 -1
  201. package/dist/{composables-CRX6rncm.js → composables-DbjgUQlV.js} +1663 -1643
  202. package/dist/{createCloudRuntime-DplyIlsy.js → createCloudRuntime-Cnh2M6iT.js} +54 -40
  203. package/dist/{createLucideIcon-CfBdtoUw.js → createLucideIcon-D-mELTSY.js} +6 -6
  204. package/dist/da-CYWJkrTg.js +95 -0
  205. package/dist/da-qQzj0QGy.js +948 -0
  206. package/dist/{dist-CX7skkvG.js → dist-A328tG0Z.js} +2 -2
  207. package/dist/{dist-B8dY8drK.js → dist-B15BvV94.js} +2 -2
  208. package/dist/{dist-TAv500j6.js → dist-B3G4Yvpd.js} +3 -3
  209. package/dist/dist-B6ptxfPo.js +406 -0
  210. package/dist/{dist-ChOb5XHW.js → dist-BmV-2uBJ.js} +2 -2
  211. package/dist/{dist-fqSers8_.js → dist-BxKFi2h_.js} +199 -199
  212. package/dist/{dist-BMUUt3zJ.js → dist-CAvsz9cW.js} +680 -655
  213. package/dist/{dist-D_XrUEET.js → dist-CMBOqk9I.js} +7 -7
  214. package/dist/{dist-DZ3X-uB8.js → dist-CXTsTO5h.js} +2 -2
  215. package/dist/{dist-B9a7iVye.js → dist-D5BUcCjv.js} +2 -2
  216. package/dist/dist-D9cbSSSx.js +4 -0
  217. package/dist/{dist-54VCNoC0.js → dist-DAdrn64r.js} +2 -2
  218. package/dist/{dist-BWflWcpW.js → dist-DENg3ORe.js} +33 -24
  219. package/dist/{dist-C3hu_C3w.js → dist-DI_8rB1X.js} +2 -2
  220. package/dist/dist-ELLEk-lS.js +4 -0
  221. package/dist/{editor-modal-D9HT9bD6.js → editor-modal-CgsaLpwB.js} +110 -109
  222. package/dist/en-DBLcB-CW.js +1 -0
  223. package/dist/{extensions-Cm6K4SRX.js → extensions-7fb-XtNJ.js} +180 -180
  224. package/dist/{eye-B3psrAqd.js → eye-fe5sKF_K.js} +1 -1
  225. package/dist/{image-C3yuPDxx.js → image-CUC7SZiW.js} +1 -1
  226. package/dist/index.d.ts +6 -4
  227. package/dist/{info-DKja7A68.js → info-DDbLU4pT.js} +1 -1
  228. package/dist/keys-D9oKZN1h.js +9 -0
  229. package/dist/{link-DhzPI4Hn.js → link-C2icj0iH.js} +1 -1
  230. package/dist/{list-DVGn7Ik2.js → list-KYC_Jb5A.js} +1 -1
  231. package/dist/{loader-circle-DqKWsMHO.js → loader-circle-DmyagWpc.js} +1 -1
  232. package/dist/{message-circle-C4TonoBs.js → message-circle-ijyWn6UJ.js} +1 -1
  233. package/dist/{normalizeMergeTagMarkup-Da9JAgx7.js → normalizeMergeTagMarkup-GrXJfXsQ.js} +82 -82
  234. package/dist/{package-9OkiEO4S.js → package-CKYm_jQY.js} +1 -1
  235. package/dist/{pencil-M9vkOB7C.js → pencil-C2TRSR-Y.js} +1 -1
  236. package/dist/{plus-DxZiv9YC.js → plus-CotJVDxb.js} +1 -1
  237. package/dist/{preRenderCustomBlocks-CdqSp2P7.js → preRenderCustomBlocks-DuXtzD-F.js} +3 -3
  238. package/dist/{refresh-cw-UY8_sdFG.js → refresh-cw-CuCRV6D5.js} +1 -1
  239. package/dist/{rotate-ccw-BFTGCpHn.js → rotate-ccw-BlnQ3y6R.js} +1 -1
  240. package/dist/{runtime-dom.esm-bundler-DlHp8xgy.js → runtime-dom.esm-bundler-nN-jsqr1.js} +20 -20
  241. package/dist/{sanitizeHtml-wBibnBF4.js → sanitizeHtml-eV4_BpI6.js} +25 -14
  242. package/dist/{search-RuGJnMEn.js → search-Dxw6oFrZ.js} +1 -1
  243. package/dist/{send-DGB1ar02.js → send-C-blQBZ9.js} +1 -1
  244. package/dist/{smartphone-CVA29CU_.js → smartphone-rLz4X-Dd.js} +1 -1
  245. package/dist/{socialIcons-CJD6OsI7.js → socialIcons-brRkK9Om.js} +600 -549
  246. package/dist/{sparkles-IHfEwEcd.js → sparkles-JWQlUiSn.js} +1 -1
  247. package/dist/{square-_Cl44UU6.js → square-DshDy1Il.js} +1 -1
  248. package/dist/style.css +1 -1
  249. package/dist/templatical-editor.js +976 -954
  250. package/dist/{text-align-start-Dqk2Xt_Q.js → text-align-start-CyasaQtr.js} +13 -13
  251. package/dist/{trash-Cr7rD5Hh.js → trash-B1lZp2Tv.js} +1 -1
  252. package/dist/{triangle-alert-CKcpwtUj.js → triangle-exclamation-point-BhJvBEoT.js} +3 -3
  253. package/dist/{upload-DR9pqVON.js → upload-CNK8JX38.js} +1 -1
  254. package/dist/{useCloudI18n-BczJoFf4.js → useCloudI18n-HhCZYRV6.js} +2 -2
  255. package/dist/useEditorRoot-B0Njczhx.js +7 -0
  256. package/dist/{useI18n-zeWYtWSv.js → useI18n-CM9vKbYc.js} +2 -2
  257. package/dist/{cdn/chunks/useLocalizedDisplay-Bgg4qpev.js → useLocalizedDisplay-DoaT7nWk.js} +2 -4
  258. package/dist/{useLogicTag-DLkYos2Q.js → useLogicTag-cTC2KbWd.js} +4 -4
  259. package/dist/{useMergeTag-IoWOO679.js → useMergeTag-D2YDZ8vR.js} +8 -8
  260. package/dist/{usePopoverPosition-Br3zt_MQ.js → usePopoverPosition-CVRzzLkC.js} +2 -2
  261. package/dist/{useScrollToBlock-BfOzc1Z6.js → useScrollToBlock-vf_KD0FM.js} +3 -3
  262. package/dist/{vue.runtime.esm-bundler-BJXc_Mri.js → vue.runtime.esm-bundler-BE5V8ADU.js} +414 -362
  263. package/dist/{withCurrentFont-m_PHcOD0.js → withCurrentFont-DAmED4fN.js} +1 -1
  264. package/dist/{x-DZSFHafL.js → x-DbLX5Qdm.js} +1 -1
  265. package/package.json +23 -23
  266. package/dist/AiPanels-DAsnX-a3.js +0 -31
  267. package/dist/CommentsPanel-C5qG17Ki.js +0 -16
  268. package/dist/CommentsSidebar-C7CWcUYZ.js +0 -526
  269. package/dist/LanguageMenu-B981Av-6.js +0 -403
  270. package/dist/cdn/chunks/AiChatPanel-DKDu9cs7.js.map +0 -1
  271. package/dist/cdn/chunks/AiPanels-jMLVaiKx.js +0 -32
  272. package/dist/cdn/chunks/AiPanels-jMLVaiKx.js.map +0 -1
  273. package/dist/cdn/chunks/AiRewriteMenu-s79rmHFy.js.map +0 -1
  274. package/dist/cdn/chunks/BlockIssueBadge-Bnmq_M4G.js.map +0 -1
  275. package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js +0 -156
  276. package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js.map +0 -1
  277. package/dist/cdn/chunks/CloudPanels-DQnlH_YJ.js.map +0 -1
  278. package/dist/cdn/chunks/CommentsPanel-EtdTzTmq.js +0 -18
  279. package/dist/cdn/chunks/CommentsPanel-EtdTzTmq.js.map +0 -1
  280. package/dist/cdn/chunks/CommentsSidebar-Qmj049QX.js +0 -496
  281. package/dist/cdn/chunks/CommentsSidebar-Qmj049QX.js.map +0 -1
  282. package/dist/cdn/chunks/IssuesPanel-DnSnEh1X.js.map +0 -1
  283. package/dist/cdn/chunks/LanguageMenu-C2I_yTL5.js.map +0 -1
  284. package/dist/cdn/chunks/RestoreVersionDialog-DqbULAbc.js.map +0 -1
  285. package/dist/cdn/chunks/Toolbar-C_Hfsher.js.map +0 -1
  286. package/dist/cdn/chunks/composables-CsfQlmcf.js.map +0 -1
  287. package/dist/cdn/chunks/createCloudRuntime-PpIFCDfj.js.map +0 -1
  288. package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
  289. package/dist/cdn/chunks/draggable-DepKdldn.js.map +0 -1
  290. package/dist/cdn/chunks/en-CVxNoHww.js +0 -1
  291. package/dist/cdn/chunks/icons-DHExFLlT.js.map +0 -1
  292. package/dist/cdn/chunks/keys-BUmIvYy3.js +0 -11
  293. package/dist/cdn/chunks/keys-BUmIvYy3.js.map +0 -1
  294. package/dist/cdn/chunks/sanitizeHtml-DJI7vvET.js +0 -61
  295. package/dist/cdn/chunks/sanitizeHtml-DJI7vvET.js.map +0 -1
  296. package/dist/cdn/chunks/socialIcons-Qw9rHc8C.js.map +0 -1
  297. package/dist/cdn/chunks/src-Bfj1jHnn.js.map +0 -1
  298. package/dist/cdn/chunks/src-C9JWWxAk.js.map +0 -1
  299. package/dist/cdn/chunks/src-mXG-Of9A.js.map +0 -1
  300. package/dist/cdn/chunks/tiptap-Dipw_zOQ.js.map +0 -1
  301. package/dist/cdn/chunks/useEditorRoot-Beau2Z_T.js +0 -9
  302. package/dist/dist-0alKVRc_.js +0 -406
  303. package/dist/dist-6DU0me3E.js +0 -4
  304. package/dist/dist-CcOn7WCo.js +0 -4
  305. package/dist/en-De3uAutQ.js +0 -1
  306. package/dist/keys-w_VRjoMu.js +0 -9
  307. package/dist/useEditorRoot-BcXKhM_8.js +0 -7
  308. package/dist/useLocalizedDisplay-Cbhx208c.js +0 -31
@@ -1,13 +1,13 @@
1
- import { C as e, F as t, G as n, H as r, K as i, L as a, O as o, _ as s, a as ee, b as c, ct as l, dt as u, g as d, h as f, m as p, mt as m, o as te, p as h, tt as g, u as _, x as v } from "./draggable-DepKdldn.js";
2
- import { Qt as y, X as ne, p as re } from "./src-mXG-Of9A.js";
3
- import { Vt as ie, at as ae } from "./icons-DHExFLlT.js";
4
- import { P as oe, R as se, T as ce, V as le, Y as ue, v as de } from "./keys-BUmIvYy3.js";
5
- import { t as fe } from "./useI18n-D8s7HtTn.js";
6
- import { b as pe } from "./styleConstants-CgiNKdnc.js";
7
- import { I as me } from "./composables-CsfQlmcf.js";
8
- import { t as he } from "./TplModal-d6fEZGJ5.js";
9
- import { n as ge, t as _e } from "./MergeTagModeToggle-D7maMGIM.js";
10
- import { t as ve } from "./BlockPreviewCanvas-B3HkuENF.js";
1
+ import { C as e, F as t, G as n, H as r, K as i, L as a, O as o, _ as s, a as ee, b as c, ct as l, dt as u, g as d, h as f, m as p, mt as m, o as te, p as h, tt as g, u as _, x as v } from "./draggable-IRVFEZ-b.js";
2
+ import { b as ne } from "./styleConstants-CgiNKdnc.js";
3
+ import { t as re } from "./TplModal-CsadClrH.js";
4
+ import { t as ie } from "./BlockPreviewCanvas-D7U6nQ7t.js";
5
+ import { n as ae, t as oe } from "./MergeTagModeToggle-Dywp9ntA.js";
6
+ import { t as se } from "./useI18n-CSf-ZpcM.js";
7
+ import { Vt as ce, at as le } from "./icons-Cl4oR2mf.js";
8
+ import { $t as y, X as ue, p as de } from "./src-CdVAke9t.js";
9
+ import { P as fe, R as pe, T as me, V as he, X as ge, v as _e } from "./keys-BQqbBUag.js";
10
+ import { I as ve } from "./composables-CUIiW9OD.js";
11
11
  // src/utils/validateEmailShape.ts
12
12
  var b = /[,;<>()[\]\\"'`|/?#@!$%^&*+=~{}]/;
13
13
  function x(e) {
@@ -73,7 +73,7 @@ var S = ["aria-busy"], C = {
73
73
  },
74
74
  emits: ["send", "close"],
75
75
  setup(e, { emit: b }) {
76
- let I = e, L = b, { t: R } = fe(), z = o(de, null), B = o(ce, void 0), V = g(""), H = g("desktop"), Ae = o(ue, void 0), U = me({
76
+ let I = e, L = b, { t: R } = se(), z = o(_e, null), B = o(me, void 0), V = g(""), H = g("desktop"), Ae = o(ge, void 0), U = ve({
77
77
  resolvePreview: Ae ?? void 0,
78
78
  getContent: () => {
79
79
  let e = z?.content.value ?? {
@@ -82,12 +82,12 @@ var S = ["aria-busy"], C = {
82
82
  };
83
83
  if (!I.visible) return e;
84
84
  let t = z?.activeLocale?.value ?? e.settings.locale ?? "en", n = y(e, t);
85
- return B ? re(y(B, t, { missing: "default" }), n) : n;
85
+ return B ? de(y(B, t, { missing: "default" }), n) : n;
86
86
  },
87
87
  isActive: () => I.visible,
88
88
  getLocale: () => z?.activeLocale?.value ?? z?.content.value.settings.locale,
89
89
  getRecipient: () => V.value || void 0
90
- }), W = o(se, null), G = g(ne(o(oe, le).value)), K = h({
90
+ }), W = o(pe, null), G = g(ue(o(fe, he).value)), K = h({
91
91
  get: () => U.isConfigured ? !1 : W?.value ?? G.value,
92
92
  set: (e) => {
93
93
  W ? W.value = e : G.value = e;
@@ -106,7 +106,7 @@ var S = ["aria-busy"], C = {
106
106
  function Pe(e) {
107
107
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q()), e.key === "Escape" && $();
108
108
  }
109
- return (r, o) => (t(), f(he, {
109
+ return (r, o) => (t(), f(re, {
110
110
  visible: e.visible,
111
111
  onClose: $,
112
112
  onKeydown: Pe
@@ -157,11 +157,11 @@ var S = ["aria-busy"], C = {
157
157
  }, null, 8, k)), [[te, V.value]]),
158
158
  X.value ? (t(), s("p", A, m(l(R).testEmail.invalidAddress), 1)) : d("", !0)
159
159
  ]),
160
- p("div", j, [p("div", M, [p("span", N, m(l(R).testEmail.preview), 1), p("div", P, [l(U).supersedesSamples.value ? d("", !0) : (t(), f(_e, {
160
+ p("div", j, [p("div", M, [p("span", N, m(l(R).testEmail.preview), 1), p("div", P, [l(U).supersedesSamples.value ? d("", !0) : (t(), f(oe, {
161
161
  key: 0,
162
162
  "sample-mode": K.value,
163
163
  onChange: o[2] ||= (e) => K.value = e
164
- }, null, 8, ["sample-mode"])), v(ge, {
164
+ }, null, 8, ["sample-mode"])), v(ae, {
165
165
  viewport: H.value,
166
166
  onChange: o[3] ||= (e) => H.value = e
167
167
  }, null, 8, ["viewport"])])]), p("p", F, m(l(U).supersedesSamples.value ? l(R).previewResolution.hint : K.value ? l(R).testEmail.previewHintSample : l(R).testEmail.previewHint), 1)]),
@@ -169,7 +169,7 @@ var S = ["aria-busy"], C = {
169
169
  key: e,
170
170
  "aria-hidden": "true",
171
171
  class: "tpl-pulse tpl:h-16 tpl:rounded-md tpl:bg-[var(--tpl-bg-hover)]"
172
- })), 64))])) : l(U).hasFailed.value ? (t(), s("p", Se, m(l(R).previewResolution.failed), 1)) : d("", !0), l(U).isInitialResolve.value ? d("", !0) : (t(), f(ve, {
172
+ })), 64))])) : l(U).hasFailed.value ? (t(), s("p", Se, m(l(R).previewResolution.failed), 1)) : d("", !0), l(U).isInitialResolve.value ? d("", !0) : (t(), f(ie, {
173
173
  key: 2,
174
174
  blocks: je.value,
175
175
  settings: Me.value,
@@ -181,7 +181,7 @@ var S = ["aria-busy"], C = {
181
181
  "viewport",
182
182
  "apply-condition-filter"
183
183
  ]))]),
184
- e.justSent ? (t(), s("p", Ce, [v(l(ie), {
184
+ e.justSent ? (t(), s("p", Ce, [v(l(ce), {
185
185
  size: 13,
186
186
  "stroke-width": 2.5
187
187
  }), c(" " + m(l(R).testEmail.success), 1)])) : Z.value ? (t(), s("p", we, m(Z.value), 1)) : d("", !0),
@@ -194,10 +194,10 @@ var S = ["aria-busy"], C = {
194
194
  }, m(l(R).testEmail.cancel), 11, Ee), p("button", {
195
195
  type: "button",
196
196
  "data-testid": "test-email-send",
197
- class: u(l(pe)),
197
+ class: u(l(ne)),
198
198
  disabled: !Y.value,
199
199
  onClick: Q
200
- }, [e.isSending ? (t(), s("span", Oe, [v(l(ae), {
200
+ }, [e.isSending ? (t(), s("span", Oe, [v(l(le), {
201
201
  class: "tpl:animate-spin",
202
202
  size: 12,
203
203
  "stroke-width": 2
@@ -209,4 +209,4 @@ var S = ["aria-busy"], C = {
209
209
  });
210
210
  export { I as default };
211
211
 
212
- //# sourceMappingURL=TestEmailModal-D52VtwBZ.js.map
212
+ //# sourceMappingURL=TestEmailModal-CJ_QYFua.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TestEmailModal-D52VtwBZ.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","openBlock","withCtx","watch","withDirectives","renderList","inject","createElementBlock","vModelSelect","createTextVNode","unref","normalizeClass","createCommentVNode","createBlock","createBaseVNode","toDisplayString","vModelText","computed","ref","Fragment","createVNode","resolveLocale","hasMergeTagSamples","applyLayout","Check","LoaderCircle","MERGE_TAGS_KEY","MERGE_TAG_SAMPLE_MODE_KEY","LAYOUT_KEY","NO_MERGE_TAGS","RESOLVE_PREVIEW_KEY","EDITOR_KEY","useI18n","primaryBtnClass","usePreviewResolution","TplModal_default","ViewportToggle_default","MergeTagModeToggle_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","locale","localized","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 resolveLocale,\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 if (!props.visible) return raw;\n const locale = editor?.activeLocale?.value ?? raw.settings.locale ?? \"en\";\n const localized = resolveLocale(raw, locale);\n return layout\n ? applyLayout(\n resolveLocale(layout, locale, { missing: \"default\" }),\n localized,\n )\n : localized;\n },\n isActive: () => props.visible,\n getLocale: () =>\n editor?.activeLocale?.value ?? editor?.content.value.settings.locale,\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 resolveLocale,\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 if (!props.visible) return raw;\n const locale = editor?.activeLocale?.value ?? raw.settings.locale ?? \"en\";\n const localized = resolveLocale(raw, locale);\n return layout\n ? applyLayout(\n resolveLocale(layout, locale, { missing: \"default\" }),\n localized,\n )\n : localized;\n },\n isActive: () => props.visible,\n getLocale: () =>\n editor?.activeLocale?.value ?? editor?.content.value.settings.locale,\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,IAAM4D,IAA0B;AAkBhC,SAAgBC,EAAe,GAAwB;CACrD,IAAMC,IAAUC,EAAM,KAAK;CAE3B,IADID,EAAQ,WAAW,KACnB,KAAK,KAAKA,CAAO,GAAG,OAAO;CAE/B,IAAME,IAAQF,EAAQ,MAAM,GAAG;CAC/B,IAAIE,EAAM,WAAW,GAAG,OAAO;CAE/B,IAAM,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_withCtx","_createElementVNode","_toDisplayString","_unref","_createElementBlock","_withDirectives","_Fragment","_renderList","_vModelSelect","_vModelText","_createCommentVNode","MergeTagModeToggle","_createVNode","ViewportToggle","BlockPreviewCanvas","_createTextVNode","_normalizeClass","_sfc_main","defineComponent","openBlock","withCtx","watch","withDirectives","renderList","inject","createElementBlock","vModelSelect","createTextVNode","unref","normalizeClass","createCommentVNode","createBlock","createBaseVNode","toDisplayString","vModelText","computed","ref","Fragment","createVNode","primaryBtnClass","TplModal_default","BlockPreviewCanvas_default","ViewportToggle_default","MergeTagModeToggle_default","useI18n","Check","LoaderCircle","resolveLocale","hasMergeTagSamples","applyLayout","MERGE_TAGS_KEY","MERGE_TAG_SAMPLE_MODE_KEY","LAYOUT_KEY","NO_MERGE_TAGS","RESOLVE_PREVIEW_KEY","EDITOR_KEY","usePreviewResolution","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","locale","localized","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 resolveLocale,\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 if (!props.visible) return raw;\n const locale = editor?.activeLocale?.value ?? raw.settings.locale ?? \"en\";\n const localized = resolveLocale(raw, locale);\n return layout\n ? applyLayout(\n resolveLocale(layout, locale, { missing: \"default\" }),\n localized,\n )\n : localized;\n },\n isActive: () => props.visible,\n getLocale: () =>\n editor?.activeLocale?.value ?? editor?.content.value.settings.locale,\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 resolveLocale,\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 if (!props.visible) return raw;\n const locale = editor?.activeLocale?.value ?? raw.settings.locale ?? \"en\";\n const localized = resolveLocale(raw, locale);\n return layout\n ? applyLayout(\n resolveLocale(layout, locale, { missing: \"default\" }),\n localized,\n )\n : localized;\n },\n isActive: () => props.visible,\n getLocale: () =>\n editor?.activeLocale?.value ?? editor?.content.value.settings.locale,\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,IAAM4D,IAA0B;AAkBhC,SAAgBC,EAAe,GAAwB;CACrD,IAAMC,IAAUC,EAAM,KAAK;CAE3B,IADID,EAAQ,WAAW,KACnB,KAAK,KAAKA,CAAO,GAAG,OAAO;CAE/B,IAAME,IAAQF,EAAQ,MAAM,GAAG;CAC/B,IAAIE,EAAM,WAAW,GAAG,OAAO;CAE/B,IAAM,CAACC,GAAOC,KAAUF;CAExB,IADIC,EAAM,WAAW,KACjBL,EAAwB,KAAKM,CAAM,GAAG,OAAO;CAIjD,IAAMC,IAAMD,EAAO,QAAQ,GAAG;CAC9B,OAAOC,IAAM,KAAKA,IAAMD,EAAO,SAAS;AAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECQA,IAAM6B,IAAQC,GAURC,IAAOH,GAKP,EAAE,SAAM/C,GAAQ,GAChBmD,IAASvE,EAAO+B,IAAY,IAAI,GAChCyC,IAASxE,EAAO4B,IAAY,KAAA,CAAS,GAErC6C,IAAY7D,EAAI,EAAE,GAElB8D,IAAkB9D,EAAkB,SAAS,GAW7C+D,KAAqB3E,EAAO8B,IAAqB,KAAA,CAAS,GAC1D8C,IAAoB5C,GAAqB;GAC7C,gBAAgB2C,MAAsB,KAAA;GACt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AA,CAAC,sOAAoO,EAAA,yCAEvL6E,EAAA,UAAS,CAAA,CAAA;KAD3D,UAAUA,EAAA;KAEV,SAAO0B;IAEL,GAAArH,EAAAC,EAAAkH,CAAA,CAAC,CAAC,UAAU,MAAM,GAAA,IAAA/B,EAAA,GAEvBrF,EAkBS,UAAA;KAjBP,MAAK;KACL,eAAY;KACX,OAAKe,EAAEb,EAAAoC,EAAA,CAAe;KACtB,UAAQ,CAAG2E,EAAA;KACX,SAAOI;I,IAEIzB,EAAA,aAAZhG,EAAA,GAAAO,EAOO,QAPPoF,IAOO,CANL5E,EAIET,EAAA2C,EAAA,GAAA;KAHA,OAAM;KACL,MAAM;KACN,gBAAc;I,IACf/B,EAAA,MACFb,EAAGC,EAAAkH,CAAA,CAAC,CAAC,UAAU,OAAO,GAAA,CAAA,C,OAExBxH,EAAA,GAAAO,EAEO,QAAAqF,IAAAvF,EADFC,EAAAkH,CAAA,CAAC,CAAC,UAAU,IAAI,GAAA,CAAA,E"}
@@ -1,10 +1,10 @@
1
- import { C as e, F as t, S as n, ct as r, g as i, h as a } from "./draggable-DepKdldn.js";
1
+ import { C as e, F as t, S as n, ct as r, g as i, h as a } from "./draggable-IRVFEZ-b.js";
2
2
  // src/components/TestEmailPanel.vue
3
3
  var o = /* @__PURE__ */ e({
4
4
  __name: "TestEmailPanel",
5
5
  props: { feature: {} },
6
6
  setup(e) {
7
- let o = e, s = n(() => import("./TestEmailModal-D52VtwBZ.js"));
7
+ let o = e, s = n(() => import("./TestEmailModal-CJ_QYFua.js"));
8
8
  function c(e) {
9
9
  o.feature.send(e);
10
10
  }
@@ -30,4 +30,4 @@ var o = /* @__PURE__ */ e({
30
30
  });
31
31
  export { o as default };
32
32
 
33
- //# sourceMappingURL=TestEmailPanel-D9ezVDHd.js.map
33
+ //# sourceMappingURL=TestEmailPanel-CsFrTq_a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TestEmailPanel-D9ezVDHd.js","names":["_openBlock","_createBlock","_unref","_createCommentVNode","_sfc_main","defineComponent","openBlock","defineAsyncComponent","unref","createCommentVNode","createBlock","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"}
1
+ {"version":3,"file":"TestEmailPanel-CsFrTq_a.js","names":["_openBlock","_createBlock","_unref","_createCommentVNode","_sfc_main","defineComponent","openBlock","defineAsyncComponent","unref","createCommentVNode","createBlock","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"}
@@ -1,10 +1,10 @@
1
- import { C as e, F as t, O as n, X as r, _ as i, b as a, ct as o, dt as s, f as c, g as l, h as u, m as d, mt as f, p, pt as m, u as h, x as g } from "./draggable-DepKdldn.js";
2
- import { Ht as _, N as v, at as y, dt as ee, ht as te, lt as ne } from "./icons-DHExFLlT.js";
3
- import { I as re, M as ie, at as ae, tt as oe } from "./keys-BUmIvYy3.js";
4
- import { t as se } from "./useI18n-D8s7HtTn.js";
5
- import { R as ce, z as le } from "./composables-CsfQlmcf.js";
6
- import { n as ue } from "./usePopoverPosition-esO6wjvU.js";
7
- import { n as b, t as x } from "./RichTextEditorContent-_O22z0pn.js";
1
+ import { C as e, F as t, O as n, X as r, _ as i, b as a, ct as o, dt as s, f as c, g as l, h as u, m as d, mt as f, p, pt as m, u as h, x as g } from "./draggable-IRVFEZ-b.js";
2
+ import { R as _, z as v } from "./composables-CUIiW9OD.js";
3
+ import { n as y } from "./usePopoverPosition-BJFFi8x6.js";
4
+ import { t as ee } from "./useI18n-CSf-ZpcM.js";
5
+ import { Ht as te, N as ne, at as re, dt as ie, ht as ae, lt as oe } from "./icons-Cl4oR2mf.js";
6
+ import { I as se, M as ce, nt as le, ot as ue } from "./keys-BQqbBUag.js";
7
+ import { n as b, t as x } from "./RichTextEditorContent-BjN4mnzL.js";
8
8
  // src/components/blocks/TitleEditor.vue?vue&type=script&setup=true&lang.ts
9
9
  var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme", "aria-label"], w = ["disabled", "inert"], T = ["aria-label", "title"], E = ["aria-label", "title"], D = ["aria-label", "title"], O = {
10
10
  key: 0,
@@ -23,17 +23,17 @@ var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme"
23
23
  },
24
24
  emits: ["done"],
25
25
  setup(e, { emit: N }) {
26
- let P = e, F = N, I = n(oe, null), L = n(ae, null), R = ue(), z = n(re, null), de = n(ie, null), B = p(() => (z?.isOpen.value ?? !1) || (de?.isOpen.value ?? !1)), { t: V } = se(), { editor: H, EditorContent: fe, isLoading: U, isEditable: W, initError: pe, retry: me, showLinkDialog: he, linkUrl: G, linkColor: K, linkDialogRef: q, canRequestMergeTag: J, canInsertLogicTag: Y, openLinkDialog: X, insertLink: ge, removeLink: _e, closeLinkDialog: ve, handleLinkKeydown: Z, handleAddMergeTag: Q, handleAddLogicTag: $ } = ce({
26
+ let P = e, F = N, I = n(le, null), L = n(ue, null), R = y(), z = n(se, null), de = n(ce, null), B = p(() => (z?.isOpen.value ?? !1) || (de?.isOpen.value ?? !1)), { t: V } = ee(), { editor: H, EditorContent: fe, isLoading: U, isEditable: W, initError: pe, retry: me, showLinkDialog: he, linkUrl: G, linkColor: K, linkDialogRef: q, canRequestMergeTag: J, canInsertLogicTag: Y, openLinkDialog: X, insertLink: ge, removeLink: _e, closeLinkDialog: ve, handleLinkKeydown: Z, handleAddMergeTag: Q, handleAddLogicTag: $ } = _({
27
27
  blockId: () => P.block.id,
28
28
  blockContent: () => P.block.content,
29
29
  onDone: () => F("done"),
30
30
  editorName: "TitleEditor",
31
31
  async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
32
32
  let [{ Editor: a, EditorContent: o }, { default: s }, { default: c }, { MergeTagNode: l, MergeTagSuggestion: u, LogicMergeTagNode: d, LineBoundaryKeys: f }] = await Promise.all([
33
- import("./tiptap-Dipw_zOQ.js").then((e) => e.i),
34
- import("./tiptap-Dipw_zOQ.js").then((e) => e.a),
35
- import("./tiptap-Dipw_zOQ.js").then((e) => e.u),
36
- import("./extensions-BM6ZSnsQ.js")
33
+ import("./tiptap-BPiZqxCt.js").then((e) => e.i),
34
+ import("./tiptap-BPiZqxCt.js").then((e) => e.a),
35
+ import("./tiptap-BPiZqxCt.js").then((e) => e.u),
36
+ import("./extensions-Cbvk9i08.js")
37
37
  ]);
38
38
  return {
39
39
  TiptapEditor: a,
@@ -50,7 +50,7 @@ var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme"
50
50
  strike: !1,
51
51
  link: !1
52
52
  }),
53
- le(c).configure({
53
+ v(c).configure({
54
54
  openOnClick: !1,
55
55
  HTMLAttributes: {
56
56
  target: "_blank",
@@ -100,7 +100,7 @@ var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme"
100
100
  "aria-label": o(V).titleEditor.bold,
101
101
  title: o(V).titleEditor.bold,
102
102
  onClick: p[0] ||= (e) => o(H)?.chain().focus().toggleBold().run()
103
- }, [g(o(ee), {
103
+ }, [g(o(ie), {
104
104
  size: 16,
105
105
  "stroke-width": 2.5
106
106
  })], 10, T),
@@ -110,7 +110,7 @@ var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme"
110
110
  "aria-label": o(V).titleEditor.italic,
111
111
  title: o(V).titleEditor.italic,
112
112
  onClick: p[1] ||= (e) => o(H)?.chain().focus().toggleItalic().run()
113
- }, [g(o(te), {
113
+ }, [g(o(ae), {
114
114
  size: 16,
115
115
  "stroke-width": 2
116
116
  })], 10, E),
@@ -124,7 +124,7 @@ var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme"
124
124
  "aria-label": o(V).titleEditor.addLink,
125
125
  title: o(V).titleEditor.addLink,
126
126
  onClick: p[2] ||= (...e) => o(X) && o(X)(...e)
127
- }, [g(o(ne), {
127
+ }, [g(o(oe), {
128
128
  size: 16,
129
129
  "stroke-width": 2
130
130
  })], 10, D),
@@ -136,7 +136,7 @@ var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme"
136
136
  "aria-label": o(V).mergeTag.insert,
137
137
  title: o(V).mergeTag.insert,
138
138
  onClick: p[3] ||= (...e) => o(Q) && o(Q)(...e)
139
- }, [g(o(v), {
139
+ }, [g(o(ne), {
140
140
  size: 16,
141
141
  "stroke-width": 2
142
142
  }), a(" " + f(o(V).mergeTag.insertShort), 1)], 8, k)) : l("", !0),
@@ -149,11 +149,11 @@ var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme"
149
149
  title: o(V).logicTag.insert,
150
150
  "data-testid": "insert-logic-button",
151
151
  onClick: p[4] ||= (...e) => o($) && o($)(...e)
152
- }, [g(o(_), {
152
+ }, [g(o(te), {
153
153
  size: 16,
154
154
  "stroke-width": 2
155
155
  }), a(" " + f(o(V).logicTag.insertShort), 1)], 8, j)) : l("", !0)
156
- ], 64)) : (t(), i("div", M, [g(o(y), {
156
+ ], 64)) : (t(), i("div", M, [g(o(re), {
157
157
  class: "tpl-spinner",
158
158
  size: 14,
159
159
  "stroke-width": 2
@@ -200,4 +200,4 @@ var S = { class: "tpl-text-editor-wrapper tpl:relative" }, C = ["data-tpl-theme"
200
200
  });
201
201
  export { N as default };
202
202
 
203
- //# sourceMappingURL=TitleEditor-D04vvbUc.js.map
203
+ //# sourceMappingURL=TitleEditor-CuKJptyw.js.map