@templatical/editor 0.47.0 → 0.48.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 (247) hide show
  1. package/dist/{AiChatSidebar-BPOv5Ra8.js → AiChatSidebar-DxPHFNoT.js} +8 -8
  2. package/dist/{AiFeatureMenu-H_WT4YR8.js → AiFeatureMenu-C8GVqu1d.js} +4 -4
  3. package/dist/{BlockIssueBadge-AgO5abEB.js → BlockIssueBadge-BShkuJis.js} +2 -2
  4. package/dist/BlockPreviewCanvas-tzAtDkXH.js +141 -0
  5. package/dist/{CloudHeaderExtras-gXsTYoGG.js → CloudHeaderExtras-CUSftQdm.js} +2 -2
  6. package/dist/{CloudPanels-H_GdbOfZ.js → CloudPanels-Dgw7tb4R.js} +4 -4
  7. package/dist/{CollaboratorBar-BazGNMqN.js → CollaboratorBar-5rfopCPx.js} +2 -2
  8. package/dist/{CommentsPanel-CMgsG_yh.js → CommentsPanel-DiWzYtnZ.js} +1 -1
  9. package/dist/{CommentsSidebar-DCh8DTP8.js → CommentsSidebar-BOqj16Al.js} +10 -10
  10. package/dist/{CountdownToolbar-DVuucA3v.js → CountdownToolbar-C4y3Ft7H.js} +4 -4
  11. package/dist/{DesignReferenceSidebar-DxNV4lQp.js → DesignReferenceSidebar-BWAi3eQQ.js} +7 -7
  12. package/dist/{IssuesPanel-CUpW54P4.js → IssuesPanel-C-x3I012.js} +5 -5
  13. package/dist/{LogicTagInsertButton-DDYKnqmj.js → LogicTagInsertButton-B1_Wy0AN.js} +6 -6
  14. package/dist/{MediaEditModal-D_we0Scr.js → MediaEditModal-ByOvznRC.js} +1 -1
  15. package/dist/{MediaPanels-L95BwWV1.js → MediaPanels-9mDBv4aL.js} +1 -1
  16. package/dist/{MergeTagInput-DAL998tx.js → MergeTagInput-fOewuF27.js} +1 -1
  17. package/dist/{MergeTagModeToggle-CjHO26rb.js → MergeTagModeToggle-BXamLcv7.js} +4 -4
  18. package/dist/{ParagraphEditor-CcEN1N6n.js → ParagraphEditor-BVjOwwHx.js} +131 -131
  19. package/dist/{RestoreVersionDialog-B2OH5rgs.js → RestoreVersionDialog-BEKXx9xk.js} +3 -3
  20. package/dist/{RichTextEditorContent-BGeTg-QL.js → RichTextEditorContent-D7kp7iig.js} +4 -4
  21. package/dist/{SaveBlockDialog-CCVyU-7y.js → SaveBlockDialog-SJu0lecx.js} +32 -33
  22. package/dist/{SavedBlocksBrowserModal-_WmSeqIh.js → SavedBlocksBrowserModal-DbmIS5uK.js} +9 -9
  23. package/dist/{SavedBlocksPanels-DVX_ruQ7.js → SavedBlocksPanels-Dr5Fxx9Z.js} +1 -1
  24. package/dist/{SavedBlocksPickBar-DVJC28hP.js → SavedBlocksPickBar-DnEWBZJy.js} +2 -2
  25. package/dist/{TemplateScoringPanel-U0QFiwdI.js → TemplateScoringPanel-ynbGl-sr.js} +11 -11
  26. package/dist/{TemplateSettings-CdhTm9JQ.js → TemplateSettings-Bi01S3H3.js} +7 -7
  27. package/dist/{TestEmailModal-BqToA_ls.js → TestEmailModal-CbRY8HQx.js} +7 -7
  28. package/dist/{TestEmailPanel-Cn4Ptq0j.js → TestEmailPanel-NAOmt3xi.js} +1 -1
  29. package/dist/{TitleEditor-CZdqeltH.js → TitleEditor-Cc3DHbuN.js} +8 -8
  30. package/dist/{ToggleSwitch-BR8Sgzib.js → ToggleSwitch-Ozc7YU38.js} +1 -1
  31. package/dist/Toolbar-B-2lO0I8.js +3156 -0
  32. package/dist/{TplModal-CoczSDma.js → TplModal-Bz4-IZ9R.js} +1 -1
  33. package/dist/{VersionHistoryMenu-DY5z5FZr.js → VersionHistoryMenu-CjV1d1zk.js} +5 -5
  34. package/dist/{VersionHistoryPanels-DowHeDAQ.js → VersionHistoryPanels-BtwxrKJn.js} +1 -1
  35. package/dist/{VersionPreviewBanner-Bo8NxBbh.js → VersionPreviewBanner-BLAei1kj.js} +1 -1
  36. package/dist/WrapperBlock-D0qgNqjD.js +45 -0
  37. package/dist/{blockTypeIcons-4E1U8f99.js → blockTypeIcons-CEDZytqP.js} +49 -19
  38. package/dist/bundle-stats.json +8 -8
  39. package/dist/{cdn/chunks/ca-DMoGGP9L.js → ca-CbNzJM3I.js} +17 -3
  40. package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js → AiChatSidebar-Dk0rJBQN.js} +7 -7
  41. package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js.map → AiChatSidebar-Dk0rJBQN.js.map} +1 -1
  42. package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js → AiFeatureMenu-B7b0w8ZS.js} +3 -3
  43. package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js.map → AiFeatureMenu-B7b0w8ZS.js.map} +1 -1
  44. package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js → BlockIssueBadge-C7sdnkrF.js} +2 -2
  45. package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js.map → BlockIssueBadge-C7sdnkrF.js.map} +1 -1
  46. package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js +143 -0
  47. package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js.map +1 -0
  48. package/dist/cdn/chunks/{CloudHeaderExtras-DJXLTUHc.js → CloudHeaderExtras-B4fhuwc_.js} +3 -3
  49. package/dist/cdn/chunks/{CloudHeaderExtras-DJXLTUHc.js.map → CloudHeaderExtras-B4fhuwc_.js.map} +1 -1
  50. package/dist/cdn/chunks/{CloudPanels-D1fPLjG8.js → CloudPanels-awqHfJqC.js} +4 -4
  51. package/dist/cdn/chunks/{CloudPanels-D1fPLjG8.js.map → CloudPanels-awqHfJqC.js.map} +1 -1
  52. package/dist/cdn/chunks/{CollaboratorBar-MeRQB1eN.js → CollaboratorBar-CS0ivqkr.js} +3 -3
  53. package/dist/cdn/chunks/{CollaboratorBar-MeRQB1eN.js.map → CollaboratorBar-CS0ivqkr.js.map} +1 -1
  54. package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js → CommentsPanel-CbzxwsyI.js} +2 -2
  55. package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js.map → CommentsPanel-CbzxwsyI.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js → CommentsSidebar-DWPHZuQm.js} +13 -13
  57. package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js.map → CommentsSidebar-DWPHZuQm.js.map} +1 -1
  58. package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js → CountdownToolbar-Cqg8FUH-.js} +5 -5
  59. package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js.map → CountdownToolbar-Cqg8FUH-.js.map} +1 -1
  60. package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js → DesignReferenceSidebar-BW9cHnA9.js} +7 -7
  61. package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js.map → DesignReferenceSidebar-BW9cHnA9.js.map} +1 -1
  62. package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js → IssuesPanel-cXf9ywA4.js} +4 -4
  63. package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js.map → IssuesPanel-cXf9ywA4.js.map} +1 -1
  64. package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js → LogicTagInsertButton-BMB9vShs.js} +84 -84
  65. package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js.map → LogicTagInsertButton-BMB9vShs.js.map} +1 -1
  66. package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js → MediaEditModal-zXfcArr4.js} +2 -2
  67. package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js.map → MediaEditModal-zXfcArr4.js.map} +1 -1
  68. package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js → MediaPanels-Cp4XB_dH.js} +2 -2
  69. package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js.map → MediaPanels-Cp4XB_dH.js.map} +1 -1
  70. package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js → MergeTagInput-DLqrA9co.js} +2 -2
  71. package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js.map → MergeTagInput-DLqrA9co.js.map} +1 -1
  72. package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js → MergeTagModeToggle-BRiJzzn5.js} +3 -3
  73. package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js.map → MergeTagModeToggle-BRiJzzn5.js.map} +1 -1
  74. package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js → ParagraphEditor-D4aq9eeC.js} +35 -35
  75. package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js.map → ParagraphEditor-D4aq9eeC.js.map} +1 -1
  76. package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js → RestoreVersionDialog-BgR6RXSb.js} +5 -5
  77. package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js.map → RestoreVersionDialog-BgR6RXSb.js.map} +1 -1
  78. package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js → RichTextEditorContent-C4DMAn0g.js} +4 -4
  79. package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js.map → RichTextEditorContent-C4DMAn0g.js.map} +1 -1
  80. package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js → SaveBlockDialog-BaIsQd09.js} +23 -24
  81. package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js.map → SaveBlockDialog-BaIsQd09.js.map} +1 -1
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js → SavedBlocksBrowserModal-CtnB58p_.js} +6 -6
  83. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js.map → SavedBlocksBrowserModal-CtnB58p_.js.map} +1 -1
  84. package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js → SavedBlocksPanels-BhEOMzEQ.js} +2 -2
  85. package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js.map → SavedBlocksPanels-BhEOMzEQ.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js → SavedBlocksPickBar-CcdqTEIp.js} +3 -3
  87. package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js.map → SavedBlocksPickBar-CcdqTEIp.js.map} +1 -1
  88. package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js → TemplateScoringPanel-BrWqJCSP.js} +6 -6
  89. package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js.map → TemplateScoringPanel-BrWqJCSP.js.map} +1 -1
  90. package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js → TemplateSettings-BkkWTDHD.js} +10 -10
  91. package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js.map → TemplateSettings-BkkWTDHD.js.map} +1 -1
  92. package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js → TestEmailModal-V5mwHsUV.js} +9 -9
  93. package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js.map → TestEmailModal-V5mwHsUV.js.map} +1 -1
  94. package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js → TestEmailPanel-DxrKuctP.js} +2 -2
  95. package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js.map → TestEmailPanel-DxrKuctP.js.map} +1 -1
  96. package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js → TitleEditor-CsZiG3TT.js} +13 -13
  97. package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js.map → TitleEditor-CsZiG3TT.js.map} +1 -1
  98. package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js → ToggleSwitch-BB-bQADJ.js} +2 -2
  99. package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js.map → ToggleSwitch-BB-bQADJ.js.map} +1 -1
  100. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js +3073 -0
  101. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +1 -0
  102. package/dist/cdn/chunks/{TplModal-WIBiBrGy.js → TplModal-DC_eodTV.js} +2 -2
  103. package/dist/cdn/chunks/{TplModal-WIBiBrGy.js.map → TplModal-DC_eodTV.js.map} +1 -1
  104. package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js → VersionHistoryMenu-DXnM5Df2.js} +7 -7
  105. package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js.map → VersionHistoryMenu-DXnM5Df2.js.map} +1 -1
  106. package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js → VersionHistoryPanels-DXSqmaLS.js} +2 -2
  107. package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js.map → VersionHistoryPanels-DXSqmaLS.js.map} +1 -1
  108. package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js → VersionPreviewBanner-DKyN6BhO.js} +2 -2
  109. package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js.map → VersionPreviewBanner-DKyN6BhO.js.map} +1 -1
  110. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +47 -0
  111. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js.map +1 -0
  112. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +22 -0
  113. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js.map +1 -0
  114. package/dist/{ca-DMoGGP9L.js → cdn/chunks/ca-CbNzJM3I.js} +19 -1
  115. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +1 -0
  116. package/dist/cdn/chunks/{cloud-Cd7ptfhL.js → cloud-BHClP3e2.js} +2 -2
  117. package/dist/cdn/chunks/{cloud-Cd7ptfhL.js.map → cloud-BHClP3e2.js.map} +1 -1
  118. package/dist/cdn/chunks/{createCloudRuntime-DtIZ2Lee.js → createCloudRuntime-Vd0N4elZ.js} +4 -4
  119. package/dist/cdn/chunks/{createCloudRuntime-DtIZ2Lee.js.map → createCloudRuntime-Vd0N4elZ.js.map} +1 -1
  120. package/dist/cdn/chunks/{de-DgAelLbM.js → de-DMquBpZM.js} +18 -2
  121. package/dist/cdn/chunks/de-DMquBpZM.js.map +1 -0
  122. package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js → editor-modal-vEEmZ8Tu.js} +88 -88
  123. package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js.map → editor-modal-vEEmZ8Tu.js.map} +1 -1
  124. package/dist/cdn/chunks/{en-Dekrl7HA.js → en-C8Mp71sO.js} +18 -2
  125. package/dist/cdn/chunks/en-C8Mp71sO.js.map +1 -0
  126. package/dist/cdn/chunks/en-eWpiXyZu.js +1 -0
  127. package/dist/cdn/chunks/{es-BaZzyidV.js → es-Byq4tthI.js} +18 -2
  128. package/dist/cdn/chunks/es-Byq4tthI.js.map +1 -0
  129. package/dist/cdn/chunks/{extensions-T-t8MKDb.js → extensions-hJ9VqzDc.js} +4 -4
  130. package/dist/cdn/chunks/{extensions-T-t8MKDb.js.map → extensions-hJ9VqzDc.js.map} +1 -1
  131. package/dist/{fr-C5ucb1HK.js → cdn/chunks/fr-B3j35HEw.js} +19 -1
  132. package/dist/cdn/chunks/fr-B3j35HEw.js.map +1 -0
  133. package/dist/cdn/chunks/{icons-C4fX9Bwy.js → icons-aTYwH5-g.js} +123 -94
  134. package/dist/cdn/chunks/icons-aTYwH5-g.js.map +1 -0
  135. package/dist/{ja-CUgR3mV0.js → cdn/chunks/ja-D7txAuGS.js} +19 -1
  136. package/dist/cdn/chunks/ja-D7txAuGS.js.map +1 -0
  137. package/dist/{nl-qrLY7hMS.js → cdn/chunks/nl-ClJ3BY3F.js} +19 -1
  138. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +1 -0
  139. package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js → preRenderCustomBlocks-ByfuSjtL.js} +2 -2
  140. package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js.map → preRenderCustomBlocks-ByfuSjtL.js.map} +1 -1
  141. package/dist/{pt-BR-C6hMTQYi.js → cdn/chunks/pt-BR-DibcXcmv.js} +19 -1
  142. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +1 -0
  143. package/dist/cdn/chunks/{socialIcons-DACw1wA8.js → socialIcons-C_lnkpG6.js} +355 -179
  144. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +1 -0
  145. package/dist/cdn/chunks/{src-BnJlDuyB.js → src-DYCDeBDM.js} +219 -181
  146. package/dist/cdn/chunks/src-DYCDeBDM.js.map +1 -0
  147. package/dist/cdn/chunks/{src-CHlVFp7r.js → src-DlFlC9Tt.js} +267 -241
  148. package/dist/cdn/chunks/src-DlFlC9Tt.js.map +1 -0
  149. package/dist/cdn/chunks/{src-Bu0qBpbf.js → src-dZ4D_tuP.js} +226 -193
  150. package/dist/cdn/chunks/src-dZ4D_tuP.js.map +1 -0
  151. package/dist/cdn/chunks/timeouts-Cv2jvusx.js +6 -0
  152. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +1 -0
  153. package/dist/cdn/chunks/{useEditorCore-Bf2d1DKI.js → useEditorCore-Bb2UcB20.js} +722 -717
  154. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +1 -0
  155. package/dist/cdn/chunks/{useLogicTag-3S63go4E.js → useLogicTag-HsyUCQtl.js} +2 -2
  156. package/dist/cdn/chunks/{useLogicTag-3S63go4E.js.map → useLogicTag-HsyUCQtl.js.map} +1 -1
  157. package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js → useMergeTag-Dg9pE85U.js} +2 -2
  158. package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js.map → useMergeTag-Dg9pE85U.js.map} +1 -1
  159. package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js → withCurrentFont-oLcATrQ8.js} +2 -2
  160. package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js.map → withCurrentFont-oLcATrQ8.js.map} +1 -1
  161. package/dist/cdn/editor.css +1 -1
  162. package/dist/cdn/editor.js +403 -397
  163. package/dist/cdn/editor.js.map +1 -1
  164. package/dist/{check-B5R4zXr7.js → check-ClwqRMgv.js} +1 -1
  165. package/dist/{chevron-down-BKyl85NV.js → chevron-down-te6qn-zE.js} +1 -1
  166. package/dist/{chevron-right-BmToZ8qX.js → chevron-right-W2hbH1FM.js} +1 -1
  167. package/dist/{chevron-up-DNYdOxPC.js → chevron-up-Bf5Zo7o4.js} +1 -1
  168. package/dist/{circle-alert-Dx9ju3YZ.js → circle-alert-CIEGV5DN.js} +1 -1
  169. package/dist/{clock-Dv9bxsSH.js → clock-Y4cx0gkJ.js} +1 -1
  170. package/dist/{cloud-DwjaAdwK.js → cloud-B5xwm_4X.js} +1 -1
  171. package/dist/{copy-BsKl4dcy.js → copy-BEcsAlfB.js} +1 -1
  172. package/dist/{createCloudRuntime-C8gpPsSi.js → createCloudRuntime-zNPkF6T9.js} +3 -3
  173. package/dist/{createLucideIcon-DziKp5iU.js → createLucideIcon-CYHXK9hn.js} +5 -5
  174. package/dist/{de-DgAelLbM.js → de-DMquBpZM.js} +17 -1
  175. package/dist/{dist-C8koXLhl.js → dist-tsmnQugO.js} +285 -249
  176. package/dist/{editor-modal-BwyIUnV_.js → editor-modal-AlVLkU91.js} +23 -23
  177. package/dist/en-B0FUfNwz.js +1 -0
  178. package/dist/{en-Dekrl7HA.js → en-C8Mp71sO.js} +17 -1
  179. package/dist/{es-BaZzyidV.js → es-Byq4tthI.js} +17 -1
  180. package/dist/{extensions-DHyKjsNZ.js → extensions-pjO8VGkM.js} +3 -3
  181. package/dist/{eye-DQuinb9k.js → eye-Ddnz8nnm.js} +1 -1
  182. package/dist/{cdn/chunks/fr-C5ucb1HK.js → fr-B3j35HEw.js} +17 -3
  183. package/dist/{image-up-yTfLjOrj.js → image-up-CM_HC0Dx.js} +1 -1
  184. package/dist/index.d.ts +66 -3
  185. package/dist/{info-C7OjlS11.js → info-DXLmzoeY.js} +1 -1
  186. package/dist/{cdn/chunks/ja-CUgR3mV0.js → ja-D7txAuGS.js} +17 -3
  187. package/dist/{link-CrUFaZ0t.js → link-Cel46wgo.js} +1 -1
  188. package/dist/{list-CLgv6M-k.js → list-Cl0GwiV9.js} +1 -1
  189. package/dist/{loader-circle-BXM5VO0K.js → loader-circle-uAwpvfys.js} +1 -1
  190. package/dist/{message-circle-BisdQ8H9.js → message-circle-DWU1pTM_.js} +1 -1
  191. package/dist/{cdn/chunks/nl-qrLY7hMS.js → nl-ClJ3BY3F.js} +17 -3
  192. package/dist/{package-C1T4AxV1.js → package-CbyG_yU_.js} +1 -1
  193. package/dist/{pencil-oo2mwf4C.js → pencil-BzoDcwKu.js} +1 -1
  194. package/dist/{plus-BIilXopD.js → plus-8cDvoCjZ.js} +1 -1
  195. package/dist/{preRenderCustomBlocks-lFX0HHiV.js → preRenderCustomBlocks-DMP5RuHl.js} +3 -3
  196. package/dist/{cdn/chunks/pt-BR-C6hMTQYi.js → pt-BR-DibcXcmv.js} +17 -3
  197. package/dist/{refresh-cw-DrLlkEVC.js → refresh-cw-9WinWixo.js} +1 -1
  198. package/dist/{search-DNu9lImk.js → search-CqgGq1gG.js} +1 -1
  199. package/dist/{send-DDNh3LoJ.js → send-Ceo3c9Db.js} +1 -1
  200. package/dist/{shield-check-aXM3o14f.js → shield-check-uDAwur5D.js} +1 -1
  201. package/dist/{smartphone-isccgDee.js → smartphone-CcLaCpGK.js} +1 -1
  202. package/dist/{socialIcons-BctavKBN.js → socialIcons-PTiwhLoC.js} +332 -153
  203. package/dist/{sparkles-CIMfFxKv.js → sparkles-Do9XjAuT.js} +1 -1
  204. package/dist/style.css +1 -1
  205. package/dist/templatical-editor.js +549 -543
  206. package/dist/{text-align-start-C4JFeqsq.js → text-align-start-DvzC0HQA.js} +1 -1
  207. package/dist/timeouts-Cv2jvusx.js +4 -0
  208. package/dist/{trash-8ZD9pK_c.js → trash-vlINTx32.js} +1 -1
  209. package/dist/{triangle-alert-pq45xEHl.js → triangle-alert-MRYSJ9T2.js} +1 -1
  210. package/dist/{upload-DrNFmVes.js → upload-CtNOI6J2.js} +1 -1
  211. package/dist/{useEditorCore-BcT7UI4e.js → useEditorCore-PvErWWsp.js} +963 -957
  212. package/dist/{useLogicTag-D-dI8H6p.js → useLogicTag-BHn67tDd.js} +1 -1
  213. package/dist/{useMergeTag-5wMeDBi-.js → useMergeTag-CRkm5Ig6.js} +1 -1
  214. package/dist/{useScrollToBlock-Do3suaqp.js → useScrollToBlock-CXmcHQQN.js} +1 -1
  215. package/dist/{withCurrentFont-B4YnsG_2.js → withCurrentFont-CxRGeHO3.js} +1 -1
  216. package/dist/{x-CBFKGLB1.js → x-Cd6SFw8r.js} +1 -1
  217. package/package.json +8 -8
  218. package/dist/BlockPreviewCanvas-CZDBSPoG.js +0 -136
  219. package/dist/Toolbar-OGakTBEg.js +0 -2851
  220. package/dist/WrapperBlock-BOABSX9W.js +0 -46
  221. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +0 -138
  222. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +0 -1
  223. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js +0 -2767
  224. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +0 -1
  225. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +0 -48
  226. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +0 -1
  227. package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js +0 -21
  228. package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js.map +0 -1
  229. package/dist/cdn/chunks/ca-DMoGGP9L.js.map +0 -1
  230. package/dist/cdn/chunks/de-DgAelLbM.js.map +0 -1
  231. package/dist/cdn/chunks/en-BANFWZdr.js +0 -1
  232. package/dist/cdn/chunks/en-Dekrl7HA.js.map +0 -1
  233. package/dist/cdn/chunks/es-BaZzyidV.js.map +0 -1
  234. package/dist/cdn/chunks/fr-C5ucb1HK.js.map +0 -1
  235. package/dist/cdn/chunks/icons-C4fX9Bwy.js.map +0 -1
  236. package/dist/cdn/chunks/ja-CUgR3mV0.js.map +0 -1
  237. package/dist/cdn/chunks/nl-qrLY7hMS.js.map +0 -1
  238. package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +0 -1
  239. package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +0 -1
  240. package/dist/cdn/chunks/src-BnJlDuyB.js.map +0 -1
  241. package/dist/cdn/chunks/src-Bu0qBpbf.js.map +0 -1
  242. package/dist/cdn/chunks/src-CHlVFp7r.js.map +0 -1
  243. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +0 -6
  244. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
  245. package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +0 -1
  246. package/dist/en-CC-57eC_.js +0 -1
  247. package/dist/timeouts-DHPZQ0G3.js +0 -4
@@ -1,10 +1,10 @@
1
- import { At as e, C as t, D as n, E as r, Mt as i, Nt as a, Ot as o, S as s, T as c, Tt as l, X as u, _t as d, at as f, b as p, ct as m, dt as h, ft as g, ht as _, it as v, kt as y, mt as b, nt as x, ot as S, pt as ee, rt as te, st as ne, tt as re, ut as ie, w as ae, x as C } from "./src-BnJlDuyB.js";
1
+ import { At as e, C as t, D as n, Dt as r, E as i, Ft as a, Mt as o, Nt as s, Pt as c, S as l, St as u, T as d, X as f, _t as p, at as m, b as h, ct as g, dt as _, ft as v, ht as y, it as b, jt as x, mt as S, nt as C, ot as ee, pt as te, rt as ne, st as re, tt as ie, ut as ae, w as oe, x as w } from "./src-DYCDeBDM.js";
2
2
  //#endregion
3
3
  //#region ../renderer/src/render-context.ts
4
- var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
4
+ var T = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
5
5
  name: "@templatical/renderer",
6
6
  description: "Render Templatical email templates to MJML",
7
- version: "0.47.0",
7
+ version: "0.48.0",
8
8
  bugs: "https://github.com/templatical/sdk/issues",
9
9
  dependencies: { "@templatical/types": "workspace:*" },
10
10
  devDependencies: {
@@ -43,7 +43,7 @@ var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
43
43
  },
44
44
  type: "module",
45
45
  types: "./dist/index.d.ts"
46
- }.version}/assets/social`, T = class e {
46
+ }.version}/assets/social`, E = class e {
47
47
  containerWidth;
48
48
  customFonts;
49
49
  defaultFallbackFont;
@@ -52,14 +52,15 @@ var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
52
52
  socialIconsBaseUrl;
53
53
  blockRenderers;
54
54
  contentDirection;
55
- constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = w, o = {}, s = "ltr") {
56
- this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i, this.socialIconsBaseUrl = a, this.blockRenderers = o, this.contentDirection = s;
55
+ contentWidth;
56
+ constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = T, o = {}, s = "ltr", c) {
57
+ this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i, this.socialIconsBaseUrl = a, this.blockRenderers = o, this.contentDirection = s, this.contentWidth = c ?? e;
57
58
  }
58
- withContainerWidth(t) {
59
- return new e(t, this.customFonts, this.defaultFallbackFont, this.allowHtmlBlocks, this.customBlockHtml, this.socialIconsBaseUrl, this.blockRenderers, this.contentDirection);
59
+ withContainerWidth(t, n = t) {
60
+ return new e(t, this.customFonts, this.defaultFallbackFont, this.allowHtmlBlocks, this.customBlockHtml, this.socialIconsBaseUrl, this.blockRenderers, this.contentDirection, n);
60
61
  }
61
62
  resolveFontFamily(e) {
62
- return p(e, {
63
+ return h(e, {
63
64
  customFonts: this.customFonts,
64
65
  defaultFallback: this.defaultFallbackFont
65
66
  });
@@ -67,15 +68,15 @@ var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
67
68
  };
68
69
  //#endregion
69
70
  //#region ../renderer/src/visibility.ts
70
- function E(e) {
71
+ function D(e) {
71
72
  let t = e.visibility;
72
73
  return t ? !t.desktop && !t.mobile : !1;
73
74
  }
74
- function D(e, t = []) {
75
- let n = [O(e), ...t].filter((e) => e !== "").join(" ");
75
+ function O(e, t = []) {
76
+ let n = [se(e), ...t].filter((e) => e !== "").join(" ");
76
77
  return n === "" ? "" : ` css-class="${n}"`;
77
78
  }
78
- function O(e) {
79
+ function se(e) {
79
80
  let t = e.visibility;
80
81
  if (!t) return "";
81
82
  let n = [];
@@ -83,39 +84,39 @@ function O(e) {
83
84
  }
84
85
  //#endregion
85
86
  //#region ../renderer/src/unrenderable.ts
86
- var k = "templatical:unrenderable-block";
87
- function A(e) {
87
+ var ce = "templatical:unrenderable-block";
88
+ function le(e) {
88
89
  return e.replace(/[<>]/g, "").replace(/-{2,}/g, "-");
89
90
  }
90
- function oe(e) {
91
- return console.warn(`[Templatical] No renderer for block type "${e.type}" (id: ${e.id}). A placeholder comment was emitted in its place. Pass a \`blockRenderers\` entry for this type to render it.`), `<mj-raw><!-- ${k} type="${A(e.type)}" id="${A(e.id)}" --></mj-raw>`;
91
+ function k(e) {
92
+ return console.warn(`[Templatical] No renderer for block type "${e.type}" (id: ${e.id}). A placeholder comment was emitted in its place. Pass a \`blockRenderers\` entry for this type to render it.`), `<mj-raw><!-- ${ce} type="${le(e.type)}" id="${le(e.id)}" --></mj-raw>`;
92
93
  }
93
94
  //#endregion
94
95
  //#region ../renderer/src/escape.ts
95
- var j = {
96
+ var A = {
96
97
  "&": "&amp;",
97
98
  "<": "&lt;",
98
99
  ">": "&gt;",
99
100
  "\"": "&quot;",
100
101
  "'": "&#039;"
101
- }, se = /[&<>"']/g;
102
+ }, ue = /[&<>"']/g;
103
+ function j(e) {
104
+ return e === "" ? "" : e.replace(ue, (e) => A[e] ?? e);
105
+ }
102
106
  function M(e) {
103
- return e === "" ? "" : e.replace(se, (e) => j[e] ?? e);
107
+ return e === "" ? "" : e.replace(ue, (e) => A[e] ?? e);
104
108
  }
105
109
  function N(e) {
106
- return e === "" ? "" : e.replace(se, (e) => j[e] ?? e);
110
+ return e === "" ? "" : M(e).replace(/[;{}\r\n]/g, "");
107
111
  }
112
+ var de = /[&<>"]/g;
108
113
  function P(e) {
109
- return e === "" ? "" : N(e).replace(/[;{}\r\n]/g, "");
114
+ return e.replace(de, (e) => A[e] ?? e);
110
115
  }
111
- var ce = /[&<>"]/g;
112
116
  function F(e) {
113
- return e.replace(ce, (e) => j[e] ?? e);
114
- }
115
- function I(e) {
116
- return e === "" ? "" : le(e, (e) => L(e, "data-merge-tag") ?? L(e, "data-logic-merge-tag"));
117
+ return e === "" ? "" : fe(e, (e) => pe(e, "data-merge-tag") ?? pe(e, "data-logic-merge-tag"));
117
118
  }
118
- function le(e, n) {
119
+ function fe(e, n) {
119
120
  let r = "", i = 0;
120
121
  for (; i < e.length;) {
121
122
  let a = e.indexOf("<span", i);
@@ -143,32 +144,40 @@ function le(e, n) {
143
144
  }
144
145
  return r;
145
146
  }
146
- function L(e, t) {
147
- return ae(e, t);
147
+ function pe(e, t) {
148
+ return oe(e, t);
148
149
  }
149
150
  //#endregion
150
151
  //#region ../renderer/src/padding.ts
151
- function R(e) {
152
+ function I(e) {
152
153
  return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
153
154
  }
154
155
  //#endregion
155
156
  //#region ../renderer/src/utils.ts
156
- function z(e, t) {
157
+ function L(e, t) {
157
158
  return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${e}"` : "";
158
159
  }
159
- function B(e) {
160
+ function R(e) {
160
161
  return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? "" : ` height="${e}px"`;
161
162
  }
163
+ function z(e, t) {
164
+ let n = (e) => Math.trunc(e ?? 0), r = (e) => s(e) === null ? 0 : Math.trunc(e.width);
165
+ return n(e?.left) + n(e?.right) + r(t?.left) + r(t?.right);
166
+ }
167
+ function B(e, t) {
168
+ let n = Math.floor(t.contentWidth) - z(e.styles.padding, e.border);
169
+ return e.width === "full" || e.width >= n ? " fluid-on-mobile=\"true\"" : "";
170
+ }
162
171
  function V(e) {
163
- return Object.entries(i(e)).map(([e, t]) => ` ${e}="${P(t)}"`).join("");
172
+ return Object.entries(c(e)).map(([e, t]) => ` ${e}="${N(t)}"`).join("");
164
173
  }
165
174
  function H(e) {
166
175
  let t = a(e);
167
176
  return t === null ? "" : ` border-radius="${t}"`;
168
177
  }
169
178
  function U(e) {
170
- let t = l(e);
171
- return t === null ? "" : ` background-url="${N(t.url)}" background-size="${t.size}" background-position="${t.position}" background-repeat="${t.repeat}"`;
179
+ let t = r(e);
180
+ return t === null ? "" : ` background-url="${M(t.url)}" background-size="${t.size}" background-position="${t.position}" background-repeat="${t.repeat}"`;
172
181
  }
173
182
  //#endregion
174
183
  //#region ../renderer/src/rich-text.ts
@@ -176,8 +185,8 @@ var W = "tpl-rich-text";
176
185
  function G(e) {
177
186
  return `${W}-${e}`;
178
187
  }
179
- function ue(e, t = "ltr") {
180
- let n = y, r = `.${W}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
188
+ function me(e, t = "ltr") {
189
+ let n = x, r = `.${W}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
181
190
  let t = `.${G(e)}`;
182
191
  return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
183
192
  }), a = t === "rtl" ? "padding-right" : "padding-left";
@@ -188,40 +197,40 @@ function ue(e, t = "ltr") {
188
197
  ].join("\n ");
189
198
  }
190
199
  function K(e) {
191
- return e ?? y.paragraphGap;
200
+ return e ?? x.paragraphGap;
192
201
  }
193
- function de(e) {
194
- let t = [y.paragraphGap], n = (e) => {
195
- if (e.type === "paragraph" && t.push(K(e.paragraphSpacing)), m(e)) for (let t of e.children) for (let e of t) n(e);
196
- else if (_(e)) for (let t of e.children) n(t);
202
+ function he(e) {
203
+ let t = [x.paragraphGap], n = (e) => {
204
+ if (e.type === "paragraph" && t.push(K(e.paragraphSpacing)), g(e)) for (let t of e.children) for (let e of t) n(e);
205
+ else if (y(e)) for (let t of e.children) n(t);
197
206
  };
198
207
  for (let t of e) n(t);
199
208
  return t;
200
209
  }
201
210
  //#endregion
202
211
  //#region ../renderer/src/renderers/title.ts
203
- function fe(t, n) {
204
- if (E(t)) return "";
205
- let r = R(t.styles.padding), i = z(t.styles.backgroundColor, "container"), a = pe(C(I(t.content))), s = o[t.level] ?? o[2], c = t.color ? `\n color="${N(t.color)}"` : "", l = t.textAlign, u = me(t.fontFamily, n), d = D(t, [W, G(K(void 0))]), f = `h${o[t.level] ? t.level : 2}`;
212
+ function ge(t, n) {
213
+ if (D(t)) return "";
214
+ let r = I(t.styles.padding), i = L(t.styles.backgroundColor, "container"), a = _e(w(F(t.content))), s = e[t.level] ?? e[2], c = t.color ? `\n color="${M(t.color)}"` : "", l = t.textAlign, u = ve(t.fontFamily, n), d = O(t, [W, G(K(void 0))]), f = `h${e[t.level] ? t.level : 2}`;
206
215
  return `<mj-text
207
216
  font-size="${s}px"${c}
208
217
  align="${l}"
209
- line-height="${e}"
218
+ line-height="${o}"
210
219
  padding="${r}"${i}${u}${d}
211
- ><${f} style="margin:0;font-size:inherit;color:inherit;line-height:inherit">${a}</${f}></mj-text>`;
220
+ ><${f} style="margin:0;font-size:inherit;color:inherit;line-height:inherit;font-weight:700">${a}</${f}></mj-text>`;
212
221
  }
213
- function pe(e) {
222
+ function _e(e) {
214
223
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
215
224
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
216
225
  }
217
- function me(e, t) {
218
- return e ? ` font-family="${F(t.resolveFontFamily(e))}"` : "";
226
+ function ve(e, t) {
227
+ return e ? ` font-family="${P(t.resolveFontFamily(e))}"` : "";
219
228
  }
220
229
  //#endregion
221
230
  //#region ../renderer/src/renderers/paragraph.ts
222
- function he(e, t) {
223
- if (E(e) || s(e.content)) return "";
224
- let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = C(I(e.content)), a = D(e, [W, G(K(e.paragraphSpacing))]);
231
+ function ye(e, t) {
232
+ if (D(e) || l(e.content)) return "";
233
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = w(F(e.content)), a = O(e, [W, G(K(e.paragraphSpacing))]);
225
234
  return `<mj-text
226
235
  line-height="1.5"${t.contentDirection === "rtl" ? "\n align=\"right\"" : ""}
227
236
  padding="${n}"${r}${a}
@@ -229,25 +238,25 @@ function he(e, t) {
229
238
  }
230
239
  //#endregion
231
240
  //#region ../renderer/src/renderers/image.ts
232
- function ge(e, t) {
233
- if (E(e) || e.src === "") return "";
234
- let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = B(e.height), o = D(e), s = H(e.borderRadius), c = V(e.border), l = "";
235
- e.linkUrl && (l = ` href="${N(e.linkUrl)}"`, e.linkOpenInNewTab && (l += " target=\"_blank\" rel=\"noopener\""));
236
- let u = N(e.src), d = e.decorative === !0;
241
+ function be(e, t) {
242
+ if (D(e) || e.src === "") return "";
243
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = R(e.height), o = B(e, t), s = O(e), c = H(e.borderRadius), l = V(e.border), u = "";
244
+ e.linkUrl && (u = ` href="${M(e.linkUrl)}"`, e.linkOpenInNewTab && (u += " target=\"_blank\" rel=\"noopener\""));
245
+ let d = M(e.src), f = e.decorative === !0;
237
246
  return `<mj-image
238
- src="${u}"
239
- alt="${d ? "" : N(e.alt)}"
240
- width="${i}"${a}
247
+ src="${d}"
248
+ alt="${f ? "" : M(e.alt)}"
249
+ width="${i}"${a}${o}
241
250
  align="${e.align}"
242
- padding="${n}"${r}${c}${s}${l}${o}${d ? " role=\"presentation\"" : ""}
251
+ padding="${n}"${r}${l}${c}${u}${s}${f ? " role=\"presentation\"" : ""}
243
252
  />`;
244
253
  }
245
254
  //#endregion
246
255
  //#region ../renderer/src/renderers/button.ts
247
256
  var q = "tpl-button-full";
248
- function _e(e, t) {
249
- if (E(e)) return "";
250
- let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = R(e.buttonPadding), a = e.url === "" ? "" : N(e.url), o = a === "" ? "" : ` href="${a}"`, s = ve(e.backgroundColor), c = N(e.textColor), l = e.fontSize, u = be(e.borderRadius), d = M(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = ye(e.fontFamily, t), m = xe(e.width), h = D(e, e.width === "full" ? [q] : []);
257
+ function xe(e, t) {
258
+ if (D(e)) return "";
259
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = I(e.buttonPadding), a = e.url === "" ? "" : M(e.url), o = a === "" ? "" : ` href="${a}"`, s = Se(e.backgroundColor), c = M(e.textColor), l = e.fontSize, u = we(e.borderRadius), d = j(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = Ce(e.fontFamily, t), m = Te(e.width), h = O(e, e.width === "full" ? [q] : []);
251
260
  return `<mj-button${o}${f}
252
261
  background-color="${s}"
253
262
  color="${c}"
@@ -259,75 +268,75 @@ function _e(e, t) {
259
268
  padding="${n}"${r}${p}${m}${h}
260
269
  >${d}</mj-button>`;
261
270
  }
262
- function ve(e) {
263
- return e.trim() === "" ? "transparent" : N(e);
271
+ function Se(e) {
272
+ return e.trim() === "" ? "transparent" : M(e);
264
273
  }
265
- function ye(e, t) {
266
- return e ? ` font-family="${F(t.resolveFontFamily(e))}"` : "";
274
+ function Ce(e, t) {
275
+ return e ? ` font-family="${P(t.resolveFontFamily(e))}"` : "";
267
276
  }
268
- function be(e) {
277
+ function we(e) {
269
278
  return typeof e == "number" ? `${e}px` : a(e) ?? "0px";
270
279
  }
271
- function xe(e) {
280
+ function Te(e) {
272
281
  return e === void 0 ? "" : ` width="${e === "full" ? "100%" : `${e}px`}"`;
273
282
  }
274
283
  //#endregion
275
284
  //#region ../renderer/src/renderers/divider.ts
276
- function Se(e, t) {
277
- if (E(e)) return "";
278
- let n = R(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : typeof e.width == "number" ? `${e.width}px` : e.width;
285
+ function Ee(e, t) {
286
+ if (D(e)) return "";
287
+ let n = I(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${M(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : typeof e.width == "number" ? `${e.width}px` : e.width;
279
288
  return `<mj-divider
280
289
  border-width="${e.thickness}px"
281
290
  border-style="${e.lineStyle}"
282
- border-color="${N(e.color)}"
291
+ border-color="${M(e.color)}"
283
292
  width="${i}"
284
- padding="${n}"${r}${D(e)}
293
+ padding="${n}"${r}${O(e)}
285
294
  />`;
286
295
  }
287
296
  //#endregion
288
297
  //#region ../renderer/src/renderers/spacer.ts
289
- function Ce(e, t) {
290
- return E(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : ""}${D(e)} />`;
298
+ function De(e, t) {
299
+ return D(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${M(e.styles.backgroundColor)}"` : ""}${O(e)} />`;
291
300
  }
292
301
  //#endregion
293
302
  //#region ../renderer/src/renderers/html.ts
294
- function we(e, t) {
295
- if (E(e) || !t.allowHtmlBlocks) return "";
303
+ function Oe(e, t) {
304
+ if (D(e) || !t.allowHtmlBlocks) return "";
296
305
  let n = e.content;
297
306
  if (n === "") return "";
298
- let r = D(e);
299
- return `<mj-text padding="${R(e.styles.padding)}"${z(e.styles.backgroundColor, "container")}${r}>
307
+ let r = O(e);
308
+ return `<mj-text padding="${I(e.styles.padding)}"${L(e.styles.backgroundColor, "container")}${r}>
300
309
  ${n}
301
310
  </mj-text>`;
302
311
  }
303
312
  //#endregion
304
313
  //#region ../renderer/src/renderers/social.ts
305
- function Te(e, t) {
306
- if (E(e)) return "";
314
+ function ke(e, t) {
315
+ if (D(e)) return "";
307
316
  let n = e.icons;
308
317
  if (n.length === 0) return "";
309
- let r = R(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : "", a = D(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = d(c, e.iconTone), u = e.spacing, f;
318
+ let r = I(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${M(e.styles.backgroundColor)}"` : "", a = O(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = p(c, e.iconTone), u = e.spacing, d;
310
319
  switch (s) {
311
320
  case "small":
312
- f = 24;
321
+ d = 24;
313
322
  break;
314
323
  case "large":
315
- f = 48;
324
+ d = 48;
316
325
  break;
317
- default: f = 32;
326
+ default: d = 32;
318
327
  }
319
- let p;
328
+ let f;
320
329
  switch (c) {
321
330
  case "circle":
322
- p = "50%";
331
+ f = "50%";
323
332
  break;
324
333
  case "rounded":
325
- p = "8px";
334
+ f = "8px";
326
335
  break;
327
336
  case "square":
328
- p = "0";
337
+ f = "0";
329
338
  break;
330
- default: p = "4px";
339
+ default: f = "4px";
331
340
  }
332
341
  let m = n.length;
333
342
  return `<mj-social
@@ -337,77 +346,77 @@ function Te(e, t) {
337
346
  padding="${r}"${i}${a}
338
347
  >
339
348
  ${n.map((e, n) => {
340
- let r = e.platform, i = N(e.url), a = `${t.socialIconsBaseUrl}/${l}/${r}.png`, o = n === m - 1 ? 0 : u;
341
- return `<mj-social-element src="${a}" href="${i}" icon-size="${f}px" padding="0 ${o}px 0 0" border-radius="${p}" background-color="transparent"></mj-social-element>`;
349
+ let r = e.platform, i = M(e.url), a = `${t.socialIconsBaseUrl}/${l}/${r}.png`, o = n === m - 1 ? 0 : u;
350
+ return `<mj-social-element src="${a}" href="${i}" icon-size="${d}px" padding="0 ${o}px 0 0" border-radius="${f}" background-color="transparent"></mj-social-element>`;
342
351
  }).join("\n")}
343
352
  </mj-social>`;
344
353
  }
345
354
  //#endregion
346
355
  //#region ../renderer/src/renderers/menu.ts
347
- function Ee(e, t) {
348
- if (E(e) || e.items.length === 0) return "";
349
- let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = D(e), a = ke(e.fontFamily, t), o = e.textAlign;
356
+ function Ae(e, t) {
357
+ if (D(e) || e.items.length === 0) return "";
358
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = O(e), a = Ne(e.fontFamily, t), o = e.textAlign;
350
359
  return `<mj-text
351
- font-size="${e.fontSize}px"${e.color ? `\n color="${N(e.color)}"` : ""}
360
+ font-size="${e.fontSize}px"${e.color ? `\n color="${M(e.color)}"` : ""}
352
361
  align="${o}"
353
362
  line-height="1.5"
354
363
  padding="${n}"${r}${a}${i}
355
- >${De(e)}</mj-text>`;
364
+ >${je(e)}</mj-text>`;
356
365
  }
357
- function De(e) {
358
- let t = e.items, n = M(e.separator), r = P(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
359
- for (let e = 0; e < s; e++) o.push(Oe(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
366
+ function je(e) {
367
+ let t = e.items, n = j(e.separator), r = N(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
368
+ for (let e = 0; e < s; e++) o.push(Me(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
360
369
  return o.join("");
361
370
  }
362
- function Oe(e, t) {
363
- let n = M(e.text), r = N(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
364
- return i && o.unshift(`color: ${P(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
371
+ function Me(e, t) {
372
+ let n = j(e.text), r = M(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
373
+ return i && o.unshift(`color: ${N(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
365
374
  }
366
- function ke(e, t) {
367
- return e ? ` font-family="${F(t.resolveFontFamily(e))}"` : "";
375
+ function Ne(e, t) {
376
+ return e ? ` font-family="${P(t.resolveFontFamily(e))}"` : "";
368
377
  }
369
378
  //#endregion
370
379
  //#region ../renderer/src/renderers/table.ts
371
- function Ae(e, t) {
372
- if (E(e) || e.rows.length === 0) return "";
373
- let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = D(e), a = Pe(e.fontFamily, t);
380
+ function Pe(e, t) {
381
+ if (D(e) || e.rows.length === 0) return "";
382
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = O(e), a = Re(e.fontFamily, t);
374
383
  return `<mj-text
375
- font-size="${e.fontSize}px"${e.color ? `\n color="${N(e.color)}"` : ""}
384
+ font-size="${e.fontSize}px"${e.color ? `\n color="${M(e.color)}"` : ""}
376
385
  align="${e.textAlign}"
377
386
  line-height="1.5"
378
387
  padding="${n}"${r}${a}${i}
379
- >${je(e)}</mj-text>`;
388
+ >${Fe(e)}</mj-text>`;
380
389
  }
381
- function je(e) {
382
- let t = P(e.borderColor), n = e.borderWidth, r = "";
390
+ function Fe(e) {
391
+ let t = N(e.borderColor), n = e.borderWidth, r = "";
383
392
  for (let i = 0; i < e.rows.length; i++) {
384
393
  let a = e.rows[i];
385
- r += Me(a, e, e.hasHeaderRow && i === 0, t, n);
394
+ r += Ie(a, e, e.hasHeaderRow && i === 0, t, n);
386
395
  }
387
396
  return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
388
397
  }
389
- function Me(e, t, n, r, i) {
398
+ function Ie(e, t, n, r, i) {
390
399
  let a = "";
391
- for (let o of e.cells) a += Ne(o, t, n, r, i);
400
+ for (let o of e.cells) a += Le(o, t, n, r, i);
392
401
  return `<tr>${a}</tr>`;
393
402
  }
394
- function Ne(e, t, n, r, i) {
403
+ function Le(e, t, n, r, i) {
395
404
  let a = t.cellPadding, o = [`border: ${i}px solid ${r}`, `padding: ${a}px`];
396
- n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${P(t.headerBackgroundColor)}`));
397
- let s = o.join("; "), c = M(I(e.content)), l = n ? "th" : "td";
405
+ n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${N(t.headerBackgroundColor)}`));
406
+ let s = o.join("; "), c = j(F(e.content)), l = n ? "th" : "td";
398
407
  return `<${l} style="${s}">${c}</${l}>`;
399
408
  }
400
- function Pe(e, t) {
401
- return e ? ` font-family="${F(t.resolveFontFamily(e))}"` : "";
409
+ function Re(e, t) {
410
+ return e ? ` font-family="${P(t.resolveFontFamily(e))}"` : "";
402
411
  }
403
412
  //#endregion
404
413
  //#region ../renderer/src/renderers/custom.ts
405
- function Fe(e, t) {
406
- if (E(e)) return "";
414
+ function ze(e, t) {
415
+ if (D(e)) return "";
407
416
  let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
408
417
  if (!n || n === "") return "";
409
- let r = D(e);
410
- return `<mj-text padding="${R(e.styles.padding)}"${z(e.styles.backgroundColor, "container")}${r}>
418
+ let r = O(e);
419
+ return `<mj-text padding="${I(e.styles.padding)}"${L(e.styles.backgroundColor, "container")}${r}>
411
420
  ${n}
412
421
  </mj-text>`;
413
422
  }
@@ -426,7 +435,7 @@ function J(e) {
426
435
  default: return ["100%"];
427
436
  }
428
437
  }
429
- function Ie(e, t) {
438
+ function Y(e, t) {
430
439
  switch (e) {
431
440
  case "2": return [t * .5, t * .5];
432
441
  case "3": return [
@@ -440,8 +449,19 @@ function Ie(e, t) {
440
449
  }
441
450
  }
442
451
  //#endregion
452
+ //#region ../renderer/src/hero-geometry.ts
453
+ function Be(e, t, n) {
454
+ let r = Math.max(1, Math.round(t)), i = e.aspectRatio === null ? null : Math.max(1, Math.round(r * e.aspectRatio)), a = Math.max(e.height === "image" ? i ?? r : e.height, Math.trunc(n.top) + Math.trunc(n.bottom));
455
+ return {
456
+ mode: "fixed-height",
457
+ height: a,
458
+ backgroundWidth: r,
459
+ backgroundHeight: i ?? a
460
+ };
461
+ }
462
+ //#endregion
443
463
  //#region ../renderer/src/display-condition.ts
444
- function Y(e, t) {
464
+ function X(e, t) {
445
465
  if (t === "") return "";
446
466
  let n = e.displayCondition;
447
467
  return n ? `<mj-raw>${n.before}</mj-raw>
@@ -450,28 +470,36 @@ function Y(e, t) {
450
470
  }
451
471
  //#endregion
452
472
  //#region ../renderer/src/renderers/section.ts
453
- function Le(e, t, n) {
454
- if (E(e)) return "";
455
- let r = e.columns, i = J(r), a = Ie(r, t.containerWidth), o = R(e.styles.padding), s = z(e.styles.backgroundColor, "native"), c = U(e.backgroundImage), l = D(e), u = H(e.borderRadius), d = V(e.border), f = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "", p = e.children, h = [];
456
- for (let e = 0; e < p.length; e++) {
457
- let r = p[e], o = i[e] ?? "100%", s = Math.floor(a[e] ?? t.containerWidth), c = Re(r, t.allowHtmlBlocks).filter((e) => !m(e)), l = t.withContainerWidth(s), u = c.map((e) => Y(e, n(e, l))).filter((e) => e !== "").join("\n");
458
- h.push(`<mj-column width="${o}"${f}>
459
- ${u === "" ? "<mj-text>&nbsp;</mj-text>" : u}
473
+ function Ve(e, t, n) {
474
+ if (D(e)) return "";
475
+ let r = u(e);
476
+ if (r?.applied) return He(e, r, t, n);
477
+ let i = e.columns, a = J(i), o = Y(i, t.containerWidth), s = Math.floor(t.contentWidth) - z(e.styles.padding, e.border), c = a.map((e) => Math.floor(s * parseFloat(e) / 100)), l = I(e.styles.padding), d = L(e.styles.backgroundColor, "native"), f = U(e.backgroundImage), p = O(e), m = H(e.borderRadius), h = V(e.border), _ = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "", v = e.children, y = [];
478
+ for (let e = 0; e < v.length; e++) {
479
+ let r = v[e], i = a[e] ?? "100%", l = Math.floor(o[e] ?? t.containerWidth), u = Ue(r, t.allowHtmlBlocks).filter((e) => !g(e)), d = t.withContainerWidth(l, c[e] ?? s), f = u.map((e) => X(e, n(e, d))).filter((e) => e !== "").join("\n");
480
+ y.push(`<mj-column width="${i}"${_}>
481
+ ${f === "" ? "<mj-text>&nbsp;</mj-text>" : f}
460
482
  </mj-column>`);
461
483
  }
462
- let g = h.join("\n");
463
- return `<mj-section${s}${c} padding="${o}"${d}${u}${l}${f}>
464
- ${e.stackOnMobile === !1 && h.length > 1 ? `<mj-group${f}>
465
- ${g}
466
- </mj-group>` : g}
484
+ let b = y.join("\n");
485
+ return `<mj-section${d}${f} padding="${l}"${h}${m}${p}${_}>
486
+ ${e.stackOnMobile === !1 && y.length > 1 ? `<mj-group${_}>
487
+ ${b}
488
+ </mj-group>` : b}
467
489
  </mj-section>`;
468
490
  }
469
- function Re(e, t) {
491
+ function He(e, t, n, r) {
492
+ let i = Math.floor(n.contentWidth), a = Be(t, i, e.styles.padding), o = L(e.styles.backgroundColor, "native") || " background-color=\"transparent\"", s = I(e.styles.padding), c = H(e.borderRadius), l = O(e), u = n.withContainerWidth(i, i - z(e.styles.padding)), d = Ue(e.children[0] ?? [], n.allowHtmlBlocks).filter((e) => !g(e)).map((e) => X(e, r(e, u))).filter((e) => e !== "").join("\n");
493
+ return `<mj-hero mode="${a.mode}" height="${a.height}px" background-url="${M(t.image.url)}" background-width="${a.backgroundWidth}px" background-height="${a.backgroundHeight}px" background-position="${t.image.position}"${o} padding="${s}" vertical-align="${t.verticalAlign}"${c}${l}>
494
+ ${d}
495
+ </mj-hero>`;
496
+ }
497
+ function Ue(e, t) {
470
498
  return t ? e : e.filter((e) => e.type !== "html");
471
499
  }
472
500
  //#endregion
473
501
  //#region ../renderer/src/renderers/video.ts
474
- function ze(e, t) {
502
+ function We(e, t) {
475
503
  if (t) return t;
476
504
  if (!e) return null;
477
505
  for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/]) {
@@ -481,45 +509,44 @@ function ze(e, t) {
481
509
  let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
482
510
  return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
483
511
  }
484
- function Be(e, t) {
485
- if (E(e)) return "";
486
- let n = ze(e.url, e.thumbnailUrl);
512
+ function Ge(e, t) {
513
+ if (D(e)) return "";
514
+ let n = We(e.url, e.thumbnailUrl);
487
515
  if (!n) return "";
488
- let r = R(e.styles.padding), i = z(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = B(e.height), s = D(e);
516
+ let r = I(e.styles.padding), i = L(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = R(e.height), s = B(e, t), c = O(e);
489
517
  return `<mj-image
490
- src="${N(n)}"
491
- alt="${N(e.alt)}"
492
- width="${a}"${o}
518
+ src="${M(n)}"
519
+ alt="${M(e.alt)}"
520
+ width="${a}"${o}${s}
493
521
  align="${e.align}"
494
522
  padding="${r}"
495
- href="${N(e.url)}"
523
+ href="${M(e.url)}"
496
524
  target="_blank"
497
- rel="noopener"${i}${s}
525
+ rel="noopener"${i}${c}
498
526
  />`;
499
527
  }
500
528
  //#endregion
501
529
  //#region ../renderer/src/renderers/index.ts
502
- function X(e, t) {
530
+ function Z(e, t) {
503
531
  let n = t.blockRenderers[e.type];
504
- return n ? n(e, t) : m(e) ? Le(e, t, X) : ee(e) ? fe(e, t) : ne(e) ? he(e, t) : f(e) ? ge(e, t) : re(e) ? _e(e, t) : te(e) ? Se(e, t) : h(e) ? Ce(e, t) : v(e) ? we(e, t) : ie(e) ? Te(e, t) : S(e) ? Ee(e, t) : g(e) ? Ae(e, t) : b(e) ? Be(e, t) : x(e) ? Fe(e, t) : E(e) ? "" : oe(e);
532
+ return n ? n(e, t) : g(e) ? Ve(e, t, Z) : te(e) ? ge(e, t) : re(e) ? ye(e, t) : m(e) ? be(e, t) : ie(e) ? xe(e, t) : ne(e) ? Ee(e, t) : _(e) ? De(e, t) : b(e) ? Oe(e, t) : ae(e) ? ke(e, t) : ee(e) ? Ae(e, t) : v(e) ? Pe(e, t) : S(e) ? Ge(e, t) : C(e) ? ze(e, t) : D(e) ? "" : k(e);
505
533
  }
506
534
  //#endregion
507
535
  //#region ../renderer/src/index.ts
508
- var Ve = `.${q} a { display: block !important; }`;
509
- async function He(e, t) {
510
- let i = t?.layout ? c(t.layout, e) : (r(e), n(e), e), a = t?.customFonts ?? [], o = t?.defaultFallbackFont ?? "Arial, sans-serif", s = t?.allowHtmlBlocks ?? !0, l = Ge(t?.socialIconsBaseUrl ?? w), d = await Je(i, t?.renderCustomBlock), f = Ye(i, t?.getCustomBlockStylesheet), p = u(i.settings), m = new T(i.settings.width, a, o, s, d, l, t?.blockRenderers ?? {}, p), h = Q(i.blocks, s), g = m.resolveFontFamily(i.settings.fontFamily), _ = i.settings.backgroundColor, v = i.settings.textColor ? ` color="${N(i.settings.textColor)}"` : "", y = i.settings.linkColor ? P(i.settings.linkColor) : "inherit", b = i.settings.linkUnderline ? "underline" : "none", x = h.map((e) => Ue(e, m)).filter((e) => e !== "").join("\n"), S = qe(a), ee = Ke(i.settings.preheaderText);
511
- return `<mjml lang="${N(i.settings.locale)}" dir="${N(p)}">
512
- <mj-head>${ee}
536
+ var Ke = `.${q} a { display: block !important; }`;
537
+ async function qe(e, t) {
538
+ let r = t?.layout ? d(t.layout, e) : (i(e), n(e), e), a = t?.customFonts ?? [], o = t?.defaultFallbackFont ?? "Arial, sans-serif", s = t?.allowHtmlBlocks ?? !0, c = Ze(t?.socialIconsBaseUrl ?? T), l = await tt(r, t?.renderCustomBlock), u = nt(r, t?.getCustomBlockStylesheet), p = f(r.settings), m = new E(r.settings.width, a, o, s, l, c, t?.blockRenderers ?? {}, p), h = et(r.blocks, s), g = m.resolveFontFamily(r.settings.fontFamily), _ = r.settings.backgroundColor, v = r.settings.textColor ? ` color="${M(r.settings.textColor)}"` : "", y = r.settings.linkColor ? N(r.settings.linkColor) : "inherit", b = r.settings.linkUnderline ? "underline" : "none", x = h.map((e) => Je(e, m)).filter((e) => e !== "").join("\n"), S = $e(a), C = Qe(r.settings.preheaderText);
539
+ return `<mjml lang="${M(r.settings.locale)}" dir="${M(p)}">
540
+ <mj-head>${C}
513
541
  <mj-attributes>
514
- <mj-all font-family="${F(g)}" />
542
+ <mj-all font-family="${P(g)}" />
515
543
  <mj-text font-size="14px"${v} />
516
544
  <mj-section padding="0" />
517
545
  <mj-column padding="0" />
518
- <mj-image fluid-on-mobile="true" />
519
546
  </mj-attributes>${S}
520
547
  <mj-style inline="inline">
521
- ${ue(de(h), p)}
522
- ${Ve}
548
+ ${me(he(h), p)}
549
+ ${Ke}
523
550
  </mj-style>
524
551
  <mj-style>
525
552
  a { color: ${y}; text-decoration: ${b}; }
@@ -529,32 +556,38 @@ async function He(e, t) {
529
556
  @media only screen and (min-width: 481px) {
530
557
  .tpl-hide-desktop { display: none !important; mso-hide: all !important; }
531
558
  }
532
- </mj-style>${Xe(f)}
559
+ </mj-style>${rt(u)}
533
560
  </mj-head>
534
561
  <mj-body width="${m.containerWidth}px" background-color="${_}">
535
562
  ${x}
536
563
  </mj-body>
537
564
  </mjml>`;
538
565
  }
539
- function Ue(e, t) {
540
- if (_(e)) return Y(e, Z(Q(e.children, t.allowHtmlBlocks).map((e) => Ue(e, t)).filter((e) => e !== "").join("\n"), {
541
- backgroundColor: e.styles.backgroundColor,
542
- padding: e.styles.padding,
543
- borderRadius: e.borderRadius,
544
- backgroundImage: e.backgroundImage
545
- }, t.contentDirection));
546
- if (m(e)) {
547
- let n = X(e, t);
548
- return Y(e, e.wrapper && n !== "" ? Z(n, e.wrapper, t.contentDirection) : n);
566
+ function Je(e, t) {
567
+ if (y(e)) {
568
+ let n = Q(t, e.styles.padding);
569
+ return X(e, Ye(et(e.children, t.allowHtmlBlocks).map((e) => Je(e, n)).filter((e) => e !== "").join("\n"), {
570
+ backgroundColor: e.styles.backgroundColor,
571
+ padding: e.styles.padding,
572
+ borderRadius: e.borderRadius,
573
+ backgroundImage: e.backgroundImage
574
+ }, t.contentDirection));
575
+ }
576
+ if (g(e)) {
577
+ let n = Z(e, e.wrapper ? Q(t, e.wrapper.padding) : t);
578
+ return X(e, e.wrapper && n !== "" ? Ye(n, e.wrapper, t.contentDirection) : n);
549
579
  }
550
- return Y(e, We(X(e, t), t.contentDirection));
580
+ return X(e, Xe(Z(e, t), t.contentDirection));
581
+ }
582
+ function Q(e, t) {
583
+ return e.withContainerWidth(e.containerWidth, Math.floor(e.contentWidth) - z(t));
551
584
  }
552
- function Z(e, t, n) {
553
- return `<mj-wrapper${z(t.backgroundColor, "native")}${U(t.backgroundImage)}${` padding="${t.padding ? R(t.padding) : "0"}"`}${H(t.borderRadius)}${n === "rtl" ? " direction=\"rtl\"" : ""}>
585
+ function Ye(e, t, n) {
586
+ return `<mj-wrapper${L(t.backgroundColor, "native")}${U(t.backgroundImage)}${` padding="${t.padding ? I(t.padding) : "0"}"`}${H(t.borderRadius)}${n === "rtl" ? " direction=\"rtl\"" : ""}>
554
587
  ${e}
555
588
  </mj-wrapper>`;
556
589
  }
557
- function We(e, t) {
590
+ function Xe(e, t) {
558
591
  if (e === "") return "";
559
592
  let n = t === "rtl" ? " direction=\"rtl\"" : "";
560
593
  return `<mj-section${n}>
@@ -563,21 +596,21 @@ ${e}
563
596
  </mj-column>
564
597
  </mj-section>`;
565
598
  }
566
- function Ge(e) {
599
+ function Ze(e) {
567
600
  return e.endsWith("/") ? e.slice(0, -1) : e;
568
601
  }
569
- function Ke(e) {
602
+ function Qe(e) {
570
603
  if (!e) return "";
571
604
  let t = e.trim();
572
- return t === "" ? "" : `\n <mj-preview>${M(t)}</mj-preview>`;
605
+ return t === "" ? "" : `\n <mj-preview>${j(t)}</mj-preview>`;
573
606
  }
574
- function qe(e) {
575
- return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${N(e.name)}" href="${N(e.url)}" />`).join("");
607
+ function $e(e) {
608
+ return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${M(e.name)}" href="${M(e.url)}" />`).join("");
576
609
  }
577
- function Q(e, t) {
610
+ function et(e, t) {
578
611
  return t ? e : e.filter((e) => e.type !== "html");
579
612
  }
580
- async function Je(e, t) {
613
+ async function tt(e, t) {
581
614
  let n = /* @__PURE__ */ new Map();
582
615
  if (!t) return n;
583
616
  let r = [];
@@ -587,11 +620,11 @@ async function Je(e, t) {
587
620
  return n;
588
621
  }
589
622
  function $(e, t) {
590
- for (let n of e) if (x(n)) t.push(n);
591
- else if (m(n)) for (let e of n.children) $(e, t);
592
- else _(n) && $(n.children, t);
623
+ for (let n of e) if (C(n)) t.push(n);
624
+ else if (g(n)) for (let e of n.children) $(e, t);
625
+ else y(n) && $(n.children, t);
593
626
  }
594
- function Ye(e, t) {
627
+ function nt(e, t) {
595
628
  let n = [];
596
629
  if ($(e.blocks, n), n.length === 0) return [];
597
630
  let r = /* @__PURE__ */ new Map();
@@ -607,10 +640,10 @@ function Ye(e, t) {
607
640
  }
608
641
  return o;
609
642
  }
610
- function Xe(e) {
643
+ function rt(e) {
611
644
  return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e}\n </mj-style>`).join("");
612
645
  }
613
646
  //#endregion
614
- export { q as BUTTON_FULL_WIDTH_CSS_CLASS, w as DEFAULT_SOCIAL_ICONS_BASE_URL, W as RICH_TEXT_CSS_CLASS, T as RenderContext, k as UNRENDERABLE_MARKER_PREFIX, I as convertMergeTagsToValues, N as escapeAttr, M as escapeHtml, D as getCssClassAttr, O as getCssClasses, J as getWidthPercentages, Ie as getWidthPixels, E as isHiddenOnAll, X as renderBlock, He as renderToMjml, oe as renderUnrenderableBlock, K as resolveParagraphGap, G as richTextGapClass, R as toPaddingString };
647
+ export { q as BUTTON_FULL_WIDTH_CSS_CLASS, T as DEFAULT_SOCIAL_ICONS_BASE_URL, W as RICH_TEXT_CSS_CLASS, E as RenderContext, ce as UNRENDERABLE_MARKER_PREFIX, F as convertMergeTagsToValues, M as escapeAttr, j as escapeHtml, B as fluidOnMobileAttr, O as getCssClassAttr, se as getCssClasses, J as getWidthPercentages, Y as getWidthPixels, D as isHiddenOnAll, Z as renderBlock, qe as renderToMjml, k as renderUnrenderableBlock, K as resolveParagraphGap, G as richTextGapClass, I as toPaddingString };
615
648
 
616
- //# sourceMappingURL=src-Bu0qBpbf.js.map
649
+ //# sourceMappingURL=src-dZ4D_tuP.js.map