@templatical/editor 0.39.4 → 0.40.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 (210) hide show
  1. package/dist/{AiChatSidebar-5qqrS6uy.js → AiChatSidebar-a8TPBAl2.js} +3 -3
  2. package/dist/{AiFeatureMenu-BBO_Ojlp.js → AiFeatureMenu-CbgDjLqk.js} +3 -3
  3. package/dist/{BlockIssueBadge-D5oGxOQP.js → BlockIssueBadge-D8KsGWY6.js} +2 -2
  4. package/dist/BlockPreviewCanvas-XNV83YGg.js +133 -0
  5. package/dist/{CloudHeaderExtras-Cg6uF-yQ.js → CloudHeaderExtras-C-tbLyfE.js} +2 -2
  6. package/dist/{CloudPanels-D1Gg4qrG.js → CloudPanels-DnWDrgnQ.js} +4 -4
  7. package/dist/{CollaboratorBar-Cmn0LccS.js → CollaboratorBar-DUmeCkyD.js} +2 -2
  8. package/dist/{CommentsPanel-twNhYUqZ.js → CommentsPanel-9k1q-79y.js} +1 -1
  9. package/dist/{CommentsSidebar-DDO0Qx8U.js → CommentsSidebar-Bc7nORmD.js} +2 -2
  10. package/dist/{CountdownBlock-DSvbf3qU.js → CountdownBlock-C6R-hn7D.js} +1 -1
  11. package/dist/{CountdownToolbar-nvHxu8Gu.js → CountdownToolbar-DkC-qSgq.js} +4 -4
  12. package/dist/{DesignReferenceSidebar-C8ohNhOd.js → DesignReferenceSidebar-OoiYJAKS.js} +3 -3
  13. package/dist/{IssuesPanel-Ck0EGoV5.js → IssuesPanel-Dnns3O9z.js} +3 -3
  14. package/dist/{LogicTagInsertButton-D8IwH-9Z.js → LogicTagInsertButton-BimKobaG.js} +67 -67
  15. package/dist/{MergeTagInput-QI-5KG2R.js → MergeTagInput-DqpVzhy7.js} +1 -1
  16. package/dist/{MergeTagModeToggle-D793Bj_E.js → MergeTagModeToggle-BkIiAgpQ.js} +4 -4
  17. package/dist/{ParagraphEditor-D6FRxr8Y.js → ParagraphEditor-D67Cqh-T.js} +19 -19
  18. package/dist/{RestoreVersionDialog--b0qfNaK.js → RestoreVersionDialog-BaKDuPCX.js} +2 -2
  19. package/dist/{RichTextEditorContent-BC5UTVnb.js → RichTextEditorContent-AEtfKvLz.js} +5 -5
  20. package/dist/{SaveBlockDialog-C0BdEGeL.js → SaveBlockDialog-BxkI52fN.js} +8 -8
  21. package/dist/{SavedBlocksBrowserModal-BzDgXtr4.js → SavedBlocksBrowserModal-C4_25Kvn.js} +6 -6
  22. package/dist/{SavedBlocksPanels-DN-bDZzy.js → SavedBlocksPanels-DQ0w9G1O.js} +1 -1
  23. package/dist/{SavedBlocksPickBar-pEi9Et8Q.js → SavedBlocksPickBar-CtH-sfxh.js} +2 -2
  24. package/dist/{TemplateScoringPanel-B1wcfE0w.js → TemplateScoringPanel-Cs0TGtRF.js} +3 -3
  25. package/dist/{TemplateSettings-C_5leDdF.js → TemplateSettings-BD1WNP4C.js} +7 -7
  26. package/dist/{TestEmailModal-maM8SLBV.js → TestEmailModal-DZi58FU9.js} +70 -65
  27. package/dist/{TestEmailPanel-8iAZYpCK.js → TestEmailPanel-D__9Wvgz.js} +1 -1
  28. package/dist/{TitleEditor-L26QXwna.js → TitleEditor-v5p89Djs.js} +9 -9
  29. package/dist/{ToggleSwitch-JvQ_CmI1.js → ToggleSwitch-CJfQ8u57.js} +1 -1
  30. package/dist/{Toolbar-B2kDLFhn.js → Toolbar-C7SjilzH.js} +540 -525
  31. package/dist/{TplModal-DVMS_nAn.js → TplModal-B8uLyoXE.js} +3 -3
  32. package/dist/{VersionHistoryMenu-BVQityes.js → VersionHistoryMenu-b0A8mS2_.js} +2 -2
  33. package/dist/{VersionHistoryPanels-D8f8KvKX.js → VersionHistoryPanels-DfNrRT6y.js} +1 -1
  34. package/dist/{VersionPreviewBanner-BaMSgA1O.js → VersionPreviewBanner-xB9r83r0.js} +1 -1
  35. package/dist/WrapperBlock-yGmKw0T-.js +34 -0
  36. package/dist/{blockTypeIcons-CdXugKyV.js → blockTypeIcons-B0Bq1WT1.js} +1 -1
  37. package/dist/bundle-stats.json +6 -6
  38. package/dist/{ca-Bqeygp1_.js → ca-Ckgw9yd0.js} +1 -0
  39. package/dist/cdn/chunks/{AiChatSidebar-ctfIU4i0.js → AiChatSidebar-mKImUXi6.js} +7 -7
  40. package/dist/cdn/chunks/{AiChatSidebar-ctfIU4i0.js.map → AiChatSidebar-mKImUXi6.js.map} +1 -1
  41. package/dist/cdn/chunks/{AiFeatureMenu-ByygdH_9.js → AiFeatureMenu-23HCL517.js} +4 -4
  42. package/dist/cdn/chunks/{AiFeatureMenu-ByygdH_9.js.map → AiFeatureMenu-23HCL517.js.map} +1 -1
  43. package/dist/cdn/chunks/{BlockIssueBadge-9hHpaXb9.js → BlockIssueBadge-DS1pUf5g.js} +3 -3
  44. package/dist/cdn/chunks/{BlockIssueBadge-9hHpaXb9.js.map → BlockIssueBadge-DS1pUf5g.js.map} +1 -1
  45. package/dist/cdn/chunks/BlockPreviewCanvas-DObWyQfh.js +135 -0
  46. package/dist/cdn/chunks/BlockPreviewCanvas-DObWyQfh.js.map +1 -0
  47. package/dist/cdn/chunks/{CloudHeaderExtras-BxsMpvVr.js → CloudHeaderExtras-DOB_uWpt.js} +3 -3
  48. package/dist/cdn/chunks/{CloudHeaderExtras-BxsMpvVr.js.map → CloudHeaderExtras-DOB_uWpt.js.map} +1 -1
  49. package/dist/cdn/chunks/{CloudPanels-DmxmqAS_.js → CloudPanels-DcAn5QW7.js} +5 -5
  50. package/dist/cdn/chunks/{CloudPanels-DmxmqAS_.js.map → CloudPanels-DcAn5QW7.js.map} +1 -1
  51. package/dist/cdn/chunks/{CollaboratorBar-B8ttqAqX.js → CollaboratorBar-C0M8c2Vv.js} +3 -3
  52. package/dist/cdn/chunks/{CollaboratorBar-B8ttqAqX.js.map → CollaboratorBar-C0M8c2Vv.js.map} +1 -1
  53. package/dist/cdn/chunks/{CommentsPanel-C8ibhaiK.js → CommentsPanel-BtAGZfF6.js} +2 -2
  54. package/dist/cdn/chunks/{CommentsPanel-C8ibhaiK.js.map → CommentsPanel-BtAGZfF6.js.map} +1 -1
  55. package/dist/cdn/chunks/{CommentsSidebar-CybWfZ3V.js → CommentsSidebar-Ws07MXYj.js} +3 -3
  56. package/dist/cdn/chunks/{CommentsSidebar-CybWfZ3V.js.map → CommentsSidebar-Ws07MXYj.js.map} +1 -1
  57. package/dist/cdn/chunks/{CountdownBlock-DdC8Lg5F.js → CountdownBlock-sVDjKkRw.js} +2 -2
  58. package/dist/cdn/chunks/{CountdownBlock-DdC8Lg5F.js.map → CountdownBlock-sVDjKkRw.js.map} +1 -1
  59. package/dist/cdn/chunks/{CountdownToolbar-DRESXiVD.js → CountdownToolbar-Bu93WiS8.js} +5 -5
  60. package/dist/cdn/chunks/{CountdownToolbar-DRESXiVD.js.map → CountdownToolbar-Bu93WiS8.js.map} +1 -1
  61. package/dist/cdn/chunks/{DesignReferenceSidebar-CtaoY-hl.js → DesignReferenceSidebar-BlSdh5B7.js} +4 -4
  62. package/dist/cdn/chunks/{DesignReferenceSidebar-CtaoY-hl.js.map → DesignReferenceSidebar-BlSdh5B7.js.map} +1 -1
  63. package/dist/cdn/chunks/{IssuesPanel-C6RlIxoi.js → IssuesPanel-CKkv9z9g.js} +4 -4
  64. package/dist/cdn/chunks/{IssuesPanel-C6RlIxoi.js.map → IssuesPanel-CKkv9z9g.js.map} +1 -1
  65. package/dist/cdn/chunks/{LogicTagInsertButton-DpyPozop.js → LogicTagInsertButton-CHc1yZ9v.js} +165 -165
  66. package/dist/cdn/chunks/{LogicTagInsertButton-DpyPozop.js.map → LogicTagInsertButton-CHc1yZ9v.js.map} +1 -1
  67. package/dist/cdn/chunks/{MergeTagInput-ERJr7bP_.js → MergeTagInput--qTYfCWk.js} +2 -2
  68. package/dist/cdn/chunks/{MergeTagInput-ERJr7bP_.js.map → MergeTagInput--qTYfCWk.js.map} +1 -1
  69. package/dist/cdn/chunks/{MergeTagModeToggle-n3nvSNeQ.js → MergeTagModeToggle-CdWIGo3Q.js} +5 -5
  70. package/dist/cdn/chunks/{MergeTagModeToggle-n3nvSNeQ.js.map → MergeTagModeToggle-CdWIGo3Q.js.map} +1 -1
  71. package/dist/cdn/chunks/{ParagraphEditor-R2ph_UOo.js → ParagraphEditor-BilbVtrG.js} +17 -17
  72. package/dist/cdn/chunks/{ParagraphEditor-R2ph_UOo.js.map → ParagraphEditor-BilbVtrG.js.map} +1 -1
  73. package/dist/cdn/chunks/{RestoreVersionDialog-C-dwbb7T.js → RestoreVersionDialog-Q-a44Vjv.js} +3 -3
  74. package/dist/cdn/chunks/{RestoreVersionDialog-C-dwbb7T.js.map → RestoreVersionDialog-Q-a44Vjv.js.map} +1 -1
  75. package/dist/cdn/chunks/{RichTextEditorContent-Ch5zeyZ7.js → RichTextEditorContent-Fzuu9pLP.js} +6 -6
  76. package/dist/cdn/chunks/{RichTextEditorContent-Ch5zeyZ7.js.map → RichTextEditorContent-Fzuu9pLP.js.map} +1 -1
  77. package/dist/cdn/chunks/{SaveBlockDialog-C_BPjVv6.js → SaveBlockDialog-DeW_M6kh.js} +9 -9
  78. package/dist/cdn/chunks/{SaveBlockDialog-C_BPjVv6.js.map → SaveBlockDialog-DeW_M6kh.js.map} +1 -1
  79. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CrrGEfFb.js → SavedBlocksBrowserModal-BzQWibKG.js} +6 -6
  80. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CrrGEfFb.js.map → SavedBlocksBrowserModal-BzQWibKG.js.map} +1 -1
  81. package/dist/cdn/chunks/{SavedBlocksPanels-DfTaMPAr.js → SavedBlocksPanels-Ce1RePjk.js} +2 -2
  82. package/dist/cdn/chunks/{SavedBlocksPanels-DfTaMPAr.js.map → SavedBlocksPanels-Ce1RePjk.js.map} +1 -1
  83. package/dist/cdn/chunks/{SavedBlocksPickBar-DziwHYSu.js → SavedBlocksPickBar-DIDl6xfy.js} +3 -3
  84. package/dist/cdn/chunks/{SavedBlocksPickBar-DziwHYSu.js.map → SavedBlocksPickBar-DIDl6xfy.js.map} +1 -1
  85. package/dist/cdn/chunks/{TemplateScoringPanel-CR6RG6dZ.js → TemplateScoringPanel-d_Ppowsq.js} +49 -49
  86. package/dist/cdn/chunks/{TemplateScoringPanel-CR6RG6dZ.js.map → TemplateScoringPanel-d_Ppowsq.js.map} +1 -1
  87. package/dist/cdn/chunks/{TemplateSettings-DjXiiiNr.js → TemplateSettings-Dr5OJ0Gi.js} +8 -8
  88. package/dist/cdn/chunks/{TemplateSettings-DjXiiiNr.js.map → TemplateSettings-Dr5OJ0Gi.js.map} +1 -1
  89. package/dist/cdn/chunks/{TestEmailModal-DId9Og-N.js → TestEmailModal-CWTmaJuT.js} +56 -51
  90. package/dist/cdn/chunks/TestEmailModal-CWTmaJuT.js.map +1 -0
  91. package/dist/cdn/chunks/{TestEmailPanel-B8LwXmeX.js → TestEmailPanel-BdYsVHXA.js} +2 -2
  92. package/dist/cdn/chunks/{TestEmailPanel-B8LwXmeX.js.map → TestEmailPanel-BdYsVHXA.js.map} +1 -1
  93. package/dist/cdn/chunks/{TitleEditor-C7KMzX1e.js → TitleEditor-pJeeZ-PX.js} +9 -9
  94. package/dist/cdn/chunks/{TitleEditor-C7KMzX1e.js.map → TitleEditor-pJeeZ-PX.js.map} +1 -1
  95. package/dist/cdn/chunks/{ToggleSwitch-CDy8OfcB.js → ToggleSwitch-0dGCYnRY.js} +2 -2
  96. package/dist/cdn/chunks/{ToggleSwitch-CDy8OfcB.js.map → ToggleSwitch-0dGCYnRY.js.map} +1 -1
  97. package/dist/cdn/chunks/{Toolbar-DqFhWxgW.js → Toolbar-BsiHW9gY.js} +493 -478
  98. package/dist/cdn/chunks/{Toolbar-DqFhWxgW.js.map → Toolbar-BsiHW9gY.js.map} +1 -1
  99. package/dist/cdn/chunks/{TplModal-BKqDFLq3.js → TplModal-CEuGD7pt.js} +4 -4
  100. package/dist/cdn/chunks/{TplModal-BKqDFLq3.js.map → TplModal-CEuGD7pt.js.map} +1 -1
  101. package/dist/cdn/chunks/{VersionHistoryMenu-Dij1pTEb.js → VersionHistoryMenu-B3-hNu9c.js} +3 -3
  102. package/dist/cdn/chunks/{VersionHistoryMenu-Dij1pTEb.js.map → VersionHistoryMenu-B3-hNu9c.js.map} +1 -1
  103. package/dist/cdn/chunks/{VersionHistoryPanels-DcCFFDK6.js → VersionHistoryPanels-C1yck5gT.js} +2 -2
  104. package/dist/cdn/chunks/{VersionHistoryPanels-DcCFFDK6.js.map → VersionHistoryPanels-C1yck5gT.js.map} +1 -1
  105. package/dist/cdn/chunks/{VersionPreviewBanner-Df3FVlig.js → VersionPreviewBanner-PzVQSBJE.js} +2 -2
  106. package/dist/cdn/chunks/{VersionPreviewBanner-Df3FVlig.js.map → VersionPreviewBanner-PzVQSBJE.js.map} +1 -1
  107. package/dist/cdn/chunks/WrapperBlock-DGkbmj06.js +36 -0
  108. package/dist/cdn/chunks/WrapperBlock-DGkbmj06.js.map +1 -0
  109. package/dist/cdn/chunks/{ca-Bqeygp1_.js → ca-Ckgw9yd0.js} +2 -1
  110. package/dist/cdn/chunks/ca-Ckgw9yd0.js.map +1 -0
  111. package/dist/cdn/chunks/{cloud-eaXyxZ8l.js → cloud-CIT4yPp4.js} +2 -2
  112. package/dist/cdn/chunks/{cloud-eaXyxZ8l.js.map → cloud-CIT4yPp4.js.map} +1 -1
  113. package/dist/cdn/chunks/{createCloudRuntime-D5bXzcTe.js → createCloudRuntime-COUxbPvd.js} +49 -40
  114. package/dist/cdn/chunks/createCloudRuntime-COUxbPvd.js.map +1 -0
  115. package/dist/cdn/chunks/{de-CY6SlqBx.js → de-D4dweQw8.js} +2 -1
  116. package/dist/cdn/chunks/de-D4dweQw8.js.map +1 -0
  117. package/dist/{en-8V-2kDcp.js → cdn/chunks/en-VE7R7NyL.js} +3 -0
  118. package/dist/cdn/chunks/en-VE7R7NyL.js.map +1 -0
  119. package/dist/{es-Cmn1rT3l.js → cdn/chunks/es-B9OhP8H3.js} +3 -0
  120. package/dist/cdn/chunks/es-B9OhP8H3.js.map +1 -0
  121. package/dist/cdn/chunks/{extensions-Bhu8UEE5.js → extensions-CafoGF65.js} +5 -5
  122. package/dist/cdn/chunks/{extensions-Bhu8UEE5.js.map → extensions-CafoGF65.js.map} +1 -1
  123. package/dist/cdn/chunks/{fr-2yDa4zXM.js → fr-wrXhIi00.js} +2 -1
  124. package/dist/cdn/chunks/fr-wrXhIi00.js.map +1 -0
  125. package/dist/cdn/chunks/keys-DCWeHkSF.js +12 -0
  126. package/dist/cdn/chunks/keys-DCWeHkSF.js.map +1 -0
  127. package/dist/{nl-Bzk2zRI8.js → cdn/chunks/nl-DeFatKJe.js} +3 -0
  128. package/dist/cdn/chunks/nl-DeFatKJe.js.map +1 -0
  129. package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js +21 -0
  130. package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js.map +1 -0
  131. package/dist/cdn/chunks/{pt-BR-DqtSCTUi.js → pt-BR-Bh1J8ey6.js} +2 -1
  132. package/dist/cdn/chunks/pt-BR-Bh1J8ey6.js.map +1 -0
  133. package/dist/cdn/chunks/{socialIcons-9VrG8X3m.js → socialIcons-BvYNMn1G.js} +264 -258
  134. package/dist/cdn/chunks/socialIcons-BvYNMn1G.js.map +1 -0
  135. package/dist/cdn/chunks/{src-CqYYKcCI.js → src-CbGCES0u.js} +175 -168
  136. package/dist/cdn/chunks/src-CbGCES0u.js.map +1 -0
  137. package/dist/cdn/chunks/{src-CaNsA_WX.js → src-Cnc5E71L.js} +258 -247
  138. package/dist/cdn/chunks/src-Cnc5E71L.js.map +1 -0
  139. package/dist/cdn/chunks/{src-Dwgq7hf4.js → src-DveVYoWS.js} +281 -181
  140. package/dist/cdn/chunks/src-DveVYoWS.js.map +1 -0
  141. package/dist/cdn/chunks/{useCloudI18n-C09JcFS0.js → useCloudI18n-CrjWbpbu.js} +2 -2
  142. package/dist/cdn/chunks/{useCloudI18n-C09JcFS0.js.map → useCloudI18n-CrjWbpbu.js.map} +1 -1
  143. package/dist/cdn/chunks/{useEditorCore-CXYI14ux.js → useEditorCore-CQraU2s_.js} +421 -408
  144. package/dist/cdn/chunks/useEditorCore-CQraU2s_.js.map +1 -0
  145. package/dist/cdn/chunks/{useEditorRoot-DFx2fXJP.js → useEditorRoot-CshefZLP.js} +2 -2
  146. package/dist/cdn/chunks/{useEditorRoot-DFx2fXJP.js.map → useEditorRoot-CshefZLP.js.map} +1 -1
  147. package/dist/cdn/chunks/{useI18n-DTZ9sIcv.js → useI18n-CyO_Nmca.js} +2 -2
  148. package/dist/cdn/chunks/{useI18n-DTZ9sIcv.js.map → useI18n-CyO_Nmca.js.map} +1 -1
  149. package/dist/cdn/chunks/{useLogicTag-E2V0Xdcb.js → useLogicTag-DF7-l66G.js} +4 -4
  150. package/dist/cdn/chunks/{useLogicTag-E2V0Xdcb.js.map → useLogicTag-DF7-l66G.js.map} +1 -1
  151. package/dist/cdn/chunks/{useMergeTag-BE8oDoha.js → useMergeTag-DbIHw4NG.js} +4 -4
  152. package/dist/cdn/chunks/{useMergeTag-BE8oDoha.js.map → useMergeTag-DbIHw4NG.js.map} +1 -1
  153. package/dist/cdn/chunks/{usePopoverPosition-gB9q-ql7.js → usePopoverPosition-BJRvAb-h.js} +2 -2
  154. package/dist/cdn/chunks/{usePopoverPosition-gB9q-ql7.js.map → usePopoverPosition-BJRvAb-h.js.map} +1 -1
  155. package/dist/cdn/chunks/{useScrollToBlock-CtTXwmiU.js → useScrollToBlock-DgHZJvID.js} +2 -2
  156. package/dist/cdn/chunks/{useScrollToBlock-CtTXwmiU.js.map → useScrollToBlock-DgHZJvID.js.map} +1 -1
  157. package/dist/cdn/editor.css +1 -1
  158. package/dist/cdn/editor.js +484 -460
  159. package/dist/cdn/editor.js.map +1 -1
  160. package/dist/{cloud-C9xWZXhg.js → cloud-DsqqUfzh.js} +1 -1
  161. package/dist/{createCloudRuntime-BGd5--Bq.js → createCloudRuntime-iLflkYzP.js} +47 -38
  162. package/dist/{de-CY6SlqBx.js → de-D4dweQw8.js} +1 -0
  163. package/dist/{dist-tGkjkX-v.js → dist-DbUZvK04.js} +277 -176
  164. package/dist/{cdn/chunks/en-8V-2kDcp.js → en-VE7R7NyL.js} +1 -2
  165. package/dist/{cdn/chunks/es-Cmn1rT3l.js → es-B9OhP8H3.js} +1 -2
  166. package/dist/{extensions-DRN-elXT.js → extensions-DDhjuVKy.js} +4 -4
  167. package/dist/{fr-2yDa4zXM.js → fr-wrXhIi00.js} +1 -0
  168. package/dist/index.d.ts +65 -0
  169. package/dist/keys-CDqfZIRt.js +10 -0
  170. package/dist/{cdn/chunks/nl-Bzk2zRI8.js → nl-DeFatKJe.js} +1 -2
  171. package/dist/preRenderCustomBlocks-BBSqQgke.js +19 -0
  172. package/dist/{pt-BR-DqtSCTUi.js → pt-BR-Bh1J8ey6.js} +1 -0
  173. package/dist/{socialIcons-DkGcpEwC.js → socialIcons-O7PZCW2P.js} +245 -239
  174. package/dist/style.css +1 -1
  175. package/dist/templatical-editor.js +520 -496
  176. package/dist/{useCloudI18n-D1iedlP3.js → useCloudI18n-DpEsiLeR.js} +1 -1
  177. package/dist/{useEditorCore-BUVbQgwb.js → useEditorCore-Dt_VWNqX.js} +817 -804
  178. package/dist/{useEditorRoot-BOxn5EfP.js → useEditorRoot-CkB_5d0h.js} +1 -1
  179. package/dist/{useI18n-Ds_-druD.js → useI18n-B_CdcBwG.js} +1 -1
  180. package/dist/{useLogicTag-DoHfc08B.js → useLogicTag-D9pvgxQR.js} +3 -3
  181. package/dist/{useMergeTag-DXyum3kG.js → useMergeTag-BaVFPdlq.js} +5 -5
  182. package/dist/{usePopoverPosition-Du-Ah8E9.js → usePopoverPosition-DH7z3Ghm.js} +1 -1
  183. package/dist/{useScrollToBlock-DXQYPCnJ.js → useScrollToBlock-Dj4v3rxr.js} +1 -1
  184. package/package.json +7 -7
  185. package/dist/BlockPreviewCanvas-BMC16_QU.js +0 -131
  186. package/dist/cdn/chunks/BlockPreviewCanvas-DeS7Sa--.js +0 -133
  187. package/dist/cdn/chunks/BlockPreviewCanvas-DeS7Sa--.js.map +0 -1
  188. package/dist/cdn/chunks/TestEmailModal-DId9Og-N.js.map +0 -1
  189. package/dist/cdn/chunks/ca-Bqeygp1_.js.map +0 -1
  190. package/dist/cdn/chunks/createCloudRuntime-D5bXzcTe.js.map +0 -1
  191. package/dist/cdn/chunks/de-CY6SlqBx.js.map +0 -1
  192. package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js +0 -8
  193. package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js.map +0 -1
  194. package/dist/cdn/chunks/en-8V-2kDcp.js.map +0 -1
  195. package/dist/cdn/chunks/es-Cmn1rT3l.js.map +0 -1
  196. package/dist/cdn/chunks/fr-2yDa4zXM.js.map +0 -1
  197. package/dist/cdn/chunks/keys-dJbD1QPs.js +0 -12
  198. package/dist/cdn/chunks/keys-dJbD1QPs.js.map +0 -1
  199. package/dist/cdn/chunks/nl-Bzk2zRI8.js.map +0 -1
  200. package/dist/cdn/chunks/preRenderCustomBlocks-Bdpiiw4A.js +0 -23
  201. package/dist/cdn/chunks/preRenderCustomBlocks-Bdpiiw4A.js.map +0 -1
  202. package/dist/cdn/chunks/pt-BR-DqtSCTUi.js.map +0 -1
  203. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +0 -1
  204. package/dist/cdn/chunks/src-CaNsA_WX.js.map +0 -1
  205. package/dist/cdn/chunks/src-CqYYKcCI.js.map +0 -1
  206. package/dist/cdn/chunks/src-Dwgq7hf4.js.map +0 -1
  207. package/dist/cdn/chunks/useEditorCore-CXYI14ux.js.map +0 -1
  208. package/dist/emailFrameWidth-BmFCN2dp.js +0 -6
  209. package/dist/keys-BdoSgsz9.js +0 -10
  210. package/dist/preRenderCustomBlocks-DFXH54Zr.js +0 -21
@@ -1,10 +1,10 @@
1
- import { $ as e, G as t, J as n, K as r, Q as i, R as a, U as o, W as s, X as c, Y as l, Z as u, et as d, it as f, q as p, rt as m, tt as h, v as g, y as _ } from "./src-Dwgq7hf4.js";
1
+ import { $ as e, G as t, Q as n, S as r, X as i, Z as a, at as o, b as s, ct as c, et as l, ft as u, lt as d, nt as f, ot as p, pt as m, rt as h, st as g, tt as _, ut as v, v as y, x as ee, y as b } from "./src-DveVYoWS.js";
2
2
  //#endregion
3
3
  //#region ../renderer/src/render-context.ts
4
- var v = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
4
+ var x = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
5
5
  name: "@templatical/renderer",
6
6
  description: "Render Templatical email templates to MJML",
7
- version: "0.39.4",
7
+ version: "0.40.0",
8
8
  bugs: "https://github.com/templatical/sdk/issues",
9
9
  dependencies: { "@templatical/types": "workspace:*" },
10
10
  devDependencies: {
@@ -42,7 +42,7 @@ var v = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
42
42
  },
43
43
  type: "module",
44
44
  types: "./dist/index.d.ts"
45
- }.version}/assets/social`, y = {
45
+ }.version}/assets/social`, S = {
46
46
  arial: "Arial, sans-serif",
47
47
  helvetica: "Helvetica, sans-serif",
48
48
  georgia: "Georgia, serif",
@@ -51,7 +51,7 @@ var v = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
51
51
  "trebuchet ms": "'Trebuchet MS', sans-serif",
52
52
  "courier new": "'Courier New', monospace",
53
53
  tahoma: "Tahoma, sans-serif"
54
- }, b = class e {
54
+ }, C = class e {
55
55
  containerWidth;
56
56
  customFonts;
57
57
  defaultFallbackFont;
@@ -60,7 +60,7 @@ var v = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
60
60
  socialIconsBaseUrl;
61
61
  blockRenderers;
62
62
  contentDirection;
63
- constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = v, o = {}, s = "ltr") {
63
+ constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = x, o = {}, s = "ltr") {
64
64
  this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i, this.socialIconsBaseUrl = a, this.blockRenderers = o, this.contentDirection = s;
65
65
  }
66
66
  withContainerWidth(t) {
@@ -71,20 +71,20 @@ var v = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
71
71
  let e = t.fallback ?? this.defaultFallbackFont;
72
72
  return `'${t.name}', ${e}`;
73
73
  }
74
- return y[e.toLowerCase()] || e;
74
+ return S[e.toLowerCase()] || e;
75
75
  }
76
76
  };
77
77
  //#endregion
78
78
  //#region ../renderer/src/visibility.ts
79
- function x(e) {
79
+ function w(e) {
80
80
  let t = e.visibility;
81
81
  return t ? !t.desktop && !t.mobile : !1;
82
82
  }
83
- function S(e, t = []) {
84
- let n = [C(e), ...t].filter((e) => e !== "").join(" ");
83
+ function T(e, t = []) {
84
+ let n = [E(e), ...t].filter((e) => e !== "").join(" ");
85
85
  return n === "" ? "" : ` css-class="${n}"`;
86
86
  }
87
- function C(e) {
87
+ function E(e) {
88
88
  let t = e.visibility;
89
89
  if (!t) return "";
90
90
  let n = [];
@@ -92,35 +92,35 @@ function C(e) {
92
92
  }
93
93
  //#endregion
94
94
  //#region ../renderer/src/unrenderable.ts
95
- var w = "templatical:unrenderable-block";
96
- function T(e) {
95
+ var D = "templatical:unrenderable-block";
96
+ function O(e) {
97
97
  return e.replace(/[<>]/g, "").replace(/-{2,}/g, "-");
98
98
  }
99
- function E(e) {
100
- 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><!-- ${w} type="${T(e.type)}" id="${T(e.id)}" --></mj-raw>`;
99
+ function k(e) {
100
+ 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><!-- ${D} type="${O(e.type)}" id="${O(e.id)}" --></mj-raw>`;
101
101
  }
102
102
  //#endregion
103
103
  //#region ../renderer/src/escape.ts
104
- var D = {
104
+ var A = {
105
105
  "&": "&amp;",
106
106
  "<": "&lt;",
107
107
  ">": "&gt;",
108
108
  "\"": "&quot;",
109
109
  "'": "&#039;"
110
- }, O = /[&<>"']/g;
111
- function k(e) {
112
- return e === "" ? "" : e.replace(O, (e) => D[e] ?? e);
110
+ }, j = /[&<>"']/g;
111
+ function M(e) {
112
+ return e === "" ? "" : e.replace(j, (e) => A[e] ?? e);
113
113
  }
114
- function A(e) {
115
- return e === "" ? "" : e.replace(O, (e) => D[e] ?? e);
114
+ function N(e) {
115
+ return e === "" ? "" : e.replace(j, (e) => A[e] ?? e);
116
116
  }
117
- function j(e) {
118
- return e === "" ? "" : A(e).replace(/[;{}\r\n]/g, "");
117
+ function P(e) {
118
+ return e === "" ? "" : N(e).replace(/[;{}\r\n]/g, "");
119
119
  }
120
- function M(e) {
121
- return e === "" ? "" : ee(e, (e) => N(e, "data-merge-tag") ?? N(e, "data-logic-merge-tag"));
120
+ function F(e) {
121
+ return e === "" ? "" : te(e, (e) => I(e, "data-merge-tag") ?? I(e, "data-logic-merge-tag"));
122
122
  }
123
- function ee(e, t) {
123
+ function te(e, t) {
124
124
  let n = "", r = 0;
125
125
  for (; r < e.length;) {
126
126
  let i = e.indexOf("<span", r);
@@ -133,7 +133,7 @@ function ee(e, t) {
133
133
  n += e.substring(r, i + 5), r = i + 5;
134
134
  continue;
135
135
  }
136
- let o = g(e, i + 5);
136
+ let o = y(e, i + 5);
137
137
  if (o === -1) {
138
138
  n += e.substring(r);
139
139
  break;
@@ -152,31 +152,31 @@ function ee(e, t) {
152
152
  }
153
153
  return n;
154
154
  }
155
- function N(e, t) {
156
- return _(e, t);
155
+ function I(e, t) {
156
+ return b(e, t);
157
157
  }
158
158
  //#endregion
159
159
  //#region ../renderer/src/padding.ts
160
- function P(e) {
160
+ function L(e) {
161
161
  return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
162
162
  }
163
163
  //#endregion
164
164
  //#region ../renderer/src/utils.ts
165
- function F(e, t) {
165
+ function R(e, t) {
166
166
  return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${e}"` : "";
167
167
  }
168
- function I(e) {
168
+ function z(e) {
169
169
  return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? "" : ` height="${e}px"`;
170
170
  }
171
171
  //#endregion
172
172
  //#region ../renderer/src/rich-text.ts
173
- var L = "tpl-rich-text";
174
- function R(e) {
175
- return `${L}-${e}`;
173
+ var B = "tpl-rich-text";
174
+ function V(e) {
175
+ return `${B}-${e}`;
176
176
  }
177
- function te(e, t = "ltr") {
178
- let n = f, r = `.${L}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
179
- let t = `.${R(e)}`;
177
+ function ne(e, t = "ltr") {
178
+ let n = m, r = `.${B}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
179
+ let t = `.${V(e)}`;
180
180
  return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
181
181
  }), a = t === "rtl" ? "padding-right" : "padding-left";
182
182
  return [
@@ -185,40 +185,41 @@ function te(e, t = "ltr") {
185
185
  `${r} li { margin: ${n.listItemMarginY}px 0; }`
186
186
  ].join("\n ");
187
187
  }
188
- function z(e) {
189
- return e ?? f.paragraphGap;
188
+ function H(e) {
189
+ return e ?? m.paragraphGap;
190
190
  }
191
- function ne(e) {
192
- let t = [f.paragraphGap], n = (e) => {
193
- if (e.type === "paragraph" && t.push(z(e.paragraphSpacing)), c(e)) for (let t of e.children) for (let e of t) n(e);
191
+ function re(e) {
192
+ let t = [m.paragraphGap], n = (e) => {
193
+ if (e.type === "paragraph" && t.push(H(e.paragraphSpacing)), h(e)) for (let t of e.children) for (let e of t) n(e);
194
+ else if (v(e)) for (let t of e.children) n(t);
194
195
  };
195
196
  for (let t of e) n(t);
196
197
  return t;
197
198
  }
198
199
  //#endregion
199
200
  //#region ../renderer/src/renderers/title.ts
200
- function re(e, t) {
201
- if (x(e)) return "";
202
- let n = P(e.styles.padding), r = F(e.styles.backgroundColor, "container"), i = ie(M(e.content)), a = m[e.level] ?? m[2], o = e.color ? `\n color="${A(e.color)}"` : "", s = e.textAlign, c = ae(e.fontFamily, t), l = S(e, [L, R(z(void 0))]), u = `h${m[e.level] ? e.level : 2}`;
201
+ function ie(e, t) {
202
+ if (w(e)) return "";
203
+ let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = ae(F(e.content)), a = u[e.level] ?? u[2], o = e.color ? `\n color="${N(e.color)}"` : "", s = e.textAlign, c = oe(e.fontFamily, t), l = T(e, [B, V(H(void 0))]), d = `h${u[e.level] ? e.level : 2}`;
203
204
  return `<mj-text
204
205
  font-size="${a}px"${o}
205
206
  align="${s}"
206
207
  line-height="1.3"
207
208
  padding="${n}"${r}${c}${l}
208
- ><${u} style="margin:0;font-size:inherit;color:inherit;line-height:inherit">${i}</${u}></mj-text>`;
209
+ ><${d} style="margin:0;font-size:inherit;color:inherit;line-height:inherit">${i}</${d}></mj-text>`;
209
210
  }
210
- function ie(e) {
211
+ function ae(e) {
211
212
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
212
213
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
213
214
  }
214
- function ae(e, t) {
215
+ function oe(e, t) {
215
216
  return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
216
217
  }
217
218
  //#endregion
218
219
  //#region ../renderer/src/renderers/paragraph.ts
219
- function oe(e, t) {
220
- if (x(e) || e.content.replace(/<\/?p\b[^<>]*>/gi, "").trim() === "") return "";
221
- let n = P(e.styles.padding), r = F(e.styles.backgroundColor, "container"), i = M(e.content), a = S(e, [L, R(z(e.paragraphSpacing))]);
220
+ function se(e, t) {
221
+ if (w(e) || e.content.replace(/<\/?p\b[^<>]*>/gi, "").trim() === "") return "";
222
+ let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = F(e.content), a = T(e, [B, V(H(e.paragraphSpacing))]);
222
223
  return `<mj-text
223
224
  line-height="1.5"${t.contentDirection === "rtl" ? "\n align=\"right\"" : ""}
224
225
  padding="${n}"${r}${a}
@@ -226,14 +227,14 @@ function oe(e, t) {
226
227
  }
227
228
  //#endregion
228
229
  //#region ../renderer/src/renderers/image.ts
229
- function B(e, t) {
230
- if (x(e) || e.src === "") return "";
231
- let n = P(e.styles.padding), r = F(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = I(e.height), o = S(e), s = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", c = "";
232
- e.linkUrl && (c = ` href="${A(e.linkUrl)}"`, e.linkOpenInNewTab && (c += " target=\"_blank\" rel=\"noopener\""));
233
- let l = A(e.src), u = e.decorative === !0;
230
+ function ce(e, t) {
231
+ if (w(e) || e.src === "") return "";
232
+ let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = z(e.height), o = T(e), s = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", c = "";
233
+ e.linkUrl && (c = ` href="${N(e.linkUrl)}"`, e.linkOpenInNewTab && (c += " target=\"_blank\" rel=\"noopener\""));
234
+ let l = N(e.src), u = e.decorative === !0;
234
235
  return `<mj-image
235
236
  src="${l}"
236
- alt="${u ? "" : A(e.alt)}"
237
+ alt="${u ? "" : N(e.alt)}"
237
238
  width="${i}"${a}
238
239
  align="${e.align}"
239
240
  padding="${n}"${r}${s}${c}${o}${u ? " role=\"presentation\"" : ""}
@@ -241,9 +242,9 @@ function B(e, t) {
241
242
  }
242
243
  //#endregion
243
244
  //#region ../renderer/src/renderers/button.ts
244
- function V(e, t) {
245
- if (x(e)) return "";
246
- let n = P(e.styles.padding), r = F(e.styles.backgroundColor, "container"), i = P(e.buttonPadding), a = e.url === "" ? "" : A(e.url), o = a === "" ? "" : ` href="${a}"`, s = A(e.backgroundColor), c = A(e.textColor), l = e.fontSize, u = e.borderRadius, d = k(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = H(e.fontFamily, t), m = U(e.width), h = S(e);
245
+ function le(e, t) {
246
+ if (w(e)) return "";
247
+ let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = L(e.buttonPadding), a = e.url === "" ? "" : N(e.url), o = a === "" ? "" : ` href="${a}"`, s = N(e.backgroundColor), c = N(e.textColor), l = e.fontSize, u = e.borderRadius, d = M(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = U(e.fontFamily, t), m = W(e.width), h = T(e);
247
248
  return `<mj-button${o}${f}
248
249
  background-color="${s}"
249
250
  color="${c}"
@@ -255,48 +256,48 @@ function V(e, t) {
255
256
  padding="${n}"${r}${p}${m}${h}
256
257
  >${d}</mj-button>`;
257
258
  }
258
- function H(e, t) {
259
+ function U(e, t) {
259
260
  return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
260
261
  }
261
- function U(e) {
262
+ function W(e) {
262
263
  return e === void 0 ? "" : ` width="${e === "full" ? "100%" : `${e}px`}"`;
263
264
  }
264
265
  //#endregion
265
266
  //#region ../renderer/src/renderers/divider.ts
266
- function W(e, t) {
267
- if (x(e)) return "";
268
- let n = P(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${A(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : e.width + "px";
267
+ function ue(e, t) {
268
+ if (w(e)) return "";
269
+ let n = L(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : e.width + "px";
269
270
  return `<mj-divider
270
271
  border-width="${e.thickness}px"
271
272
  border-style="${e.lineStyle}"
272
- border-color="${A(e.color)}"
273
+ border-color="${N(e.color)}"
273
274
  width="${i}"
274
- padding="${n}"${r}${S(e)}
275
+ padding="${n}"${r}${T(e)}
275
276
  />`;
276
277
  }
277
278
  //#endregion
278
279
  //#region ../renderer/src/renderers/spacer.ts
279
- function G(e, t) {
280
- return x(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${A(e.styles.backgroundColor)}"` : ""}${S(e)} />`;
280
+ function de(e, t) {
281
+ return w(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : ""}${T(e)} />`;
281
282
  }
282
283
  //#endregion
283
284
  //#region ../renderer/src/renderers/html.ts
284
- function K(e, t) {
285
- if (x(e) || !t.allowHtmlBlocks) return "";
285
+ function fe(e, t) {
286
+ if (w(e) || !t.allowHtmlBlocks) return "";
286
287
  let n = e.content;
287
288
  if (n === "") return "";
288
- let r = S(e);
289
- return `<mj-text padding="${P(e.styles.padding)}"${F(e.styles.backgroundColor, "container")}${r}>
289
+ let r = T(e);
290
+ return `<mj-text padding="${L(e.styles.padding)}"${R(e.styles.backgroundColor, "container")}${r}>
290
291
  ${n}
291
292
  </mj-text>`;
292
293
  }
293
294
  //#endregion
294
295
  //#region ../renderer/src/renderers/social.ts
295
- function q(e, t) {
296
- if (x(e)) return "";
296
+ function pe(e, t) {
297
+ if (w(e)) return "";
297
298
  let n = e.icons;
298
299
  if (n.length === 0) return "";
299
- let r = P(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${A(e.styles.backgroundColor)}"` : "", a = S(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = e.spacing, u;
300
+ let r = L(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${N(e.styles.backgroundColor)}"` : "", a = T(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = e.spacing, u;
300
301
  switch (s) {
301
302
  case "small":
302
303
  u = 24;
@@ -327,83 +328,83 @@ function q(e, t) {
327
328
  padding="${r}"${i}${a}
328
329
  >
329
330
  ${n.map((e, n) => {
330
- let r = e.platform, i = A(e.url), a = `${t.socialIconsBaseUrl}/${c}/${r}.png`, o = n === f - 1 ? 0 : l;
331
+ let r = e.platform, i = N(e.url), a = `${t.socialIconsBaseUrl}/${c}/${r}.png`, o = n === f - 1 ? 0 : l;
331
332
  return `<mj-social-element src="${a}" href="${i}" icon-size="${u}px" padding="0 ${o}px 0 0" border-radius="${d}" background-color="transparent"></mj-social-element>`;
332
333
  }).join("\n")}
333
334
  </mj-social>`;
334
335
  }
335
336
  //#endregion
336
337
  //#region ../renderer/src/renderers/menu.ts
337
- function se(e, t) {
338
- if (x(e) || e.items.length === 0) return "";
339
- let n = P(e.styles.padding), r = F(e.styles.backgroundColor, "container"), i = S(e), a = ue(e.fontFamily, t), o = e.textAlign;
338
+ function me(e, t) {
339
+ if (w(e) || e.items.length === 0) return "";
340
+ let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = T(e), a = _e(e.fontFamily, t), o = e.textAlign;
340
341
  return `<mj-text
341
- font-size="${e.fontSize}px"${e.color ? `\n color="${A(e.color)}"` : ""}
342
+ font-size="${e.fontSize}px"${e.color ? `\n color="${N(e.color)}"` : ""}
342
343
  align="${o}"
343
344
  line-height="1.5"
344
345
  padding="${n}"${r}${a}${i}
345
- >${ce(e)}</mj-text>`;
346
+ >${he(e)}</mj-text>`;
346
347
  }
347
- function ce(e) {
348
- let t = e.items, n = k(e.separator), r = j(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
349
- for (let e = 0; e < s; e++) o.push(le(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
348
+ function he(e) {
349
+ let t = e.items, n = M(e.separator), r = P(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
350
+ for (let e = 0; e < s; e++) o.push(ge(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
350
351
  return o.join("");
351
352
  }
352
- function le(e, t) {
353
- let n = k(e.text), r = A(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
354
- return i && o.unshift(`color: ${j(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
353
+ function ge(e, t) {
354
+ let n = M(e.text), r = N(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
355
+ 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>`;
355
356
  }
356
- function ue(e, t) {
357
+ function _e(e, t) {
357
358
  return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
358
359
  }
359
360
  //#endregion
360
361
  //#region ../renderer/src/renderers/table.ts
361
- function de(e, t) {
362
- if (x(e) || e.rows.length === 0) return "";
363
- let n = P(e.styles.padding), r = F(e.styles.backgroundColor, "container"), i = S(e), a = he(e.fontFamily, t);
362
+ function ve(e, t) {
363
+ if (w(e) || e.rows.length === 0) return "";
364
+ let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = T(e), a = Se(e.fontFamily, t);
364
365
  return `<mj-text
365
- font-size="${e.fontSize}px"${e.color ? `\n color="${A(e.color)}"` : ""}
366
+ font-size="${e.fontSize}px"${e.color ? `\n color="${N(e.color)}"` : ""}
366
367
  align="${e.textAlign}"
367
368
  line-height="1.5"
368
369
  padding="${n}"${r}${a}${i}
369
- >${fe(e)}</mj-text>`;
370
+ >${ye(e)}</mj-text>`;
370
371
  }
371
- function fe(e) {
372
- let t = j(e.borderColor), n = e.borderWidth, r = "";
372
+ function ye(e) {
373
+ let t = P(e.borderColor), n = e.borderWidth, r = "";
373
374
  for (let i = 0; i < e.rows.length; i++) {
374
375
  let a = e.rows[i];
375
- r += pe(a, e, e.hasHeaderRow && i === 0, t, n);
376
+ r += be(a, e, e.hasHeaderRow && i === 0, t, n);
376
377
  }
377
378
  return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
378
379
  }
379
- function pe(e, t, n, r, i) {
380
+ function be(e, t, n, r, i) {
380
381
  let a = "";
381
- for (let o of e.cells) a += me(o, t, n, r, i);
382
+ for (let o of e.cells) a += xe(o, t, n, r, i);
382
383
  return `<tr>${a}</tr>`;
383
384
  }
384
- function me(e, t, n, r, i) {
385
+ function xe(e, t, n, r, i) {
385
386
  let a = t.cellPadding, o = [`border: ${i}px solid ${r}`, `padding: ${a}px`];
386
- n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${j(t.headerBackgroundColor)}`));
387
- let s = o.join("; "), c = k(M(e.content)), l = n ? "th" : "td";
387
+ n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${P(t.headerBackgroundColor)}`));
388
+ let s = o.join("; "), c = M(F(e.content)), l = n ? "th" : "td";
388
389
  return `<${l} style="${s}">${c}</${l}>`;
389
390
  }
390
- function he(e, t) {
391
+ function Se(e, t) {
391
392
  return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
392
393
  }
393
394
  //#endregion
394
395
  //#region ../renderer/src/renderers/custom.ts
395
- function ge(e, t) {
396
- if (x(e)) return "";
396
+ function Ce(e, t) {
397
+ if (w(e)) return "";
397
398
  let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
398
399
  if (!n || n === "") return "";
399
- let r = S(e);
400
- return `<mj-text padding="${P(e.styles.padding)}"${F(e.styles.backgroundColor, "container")}${r}>
400
+ let r = T(e);
401
+ return `<mj-text padding="${L(e.styles.padding)}"${R(e.styles.backgroundColor, "container")}${r}>
401
402
  ${n}
402
403
  </mj-text>`;
403
404
  }
404
405
  //#endregion
405
406
  //#region ../renderer/src/columns.ts
406
- function J(e) {
407
+ function G(e) {
407
408
  switch (e) {
408
409
  case "2": return ["50%", "50%"];
409
410
  case "3": return [
@@ -416,7 +417,7 @@ function J(e) {
416
417
  default: return ["100%"];
417
418
  }
418
419
  }
419
- function Y(e, t) {
420
+ function K(e, t) {
420
421
  switch (e) {
421
422
  case "2": return [t * .5, t * .5];
422
423
  case "3": return [
@@ -431,7 +432,7 @@ function Y(e, t) {
431
432
  }
432
433
  //#endregion
433
434
  //#region ../renderer/src/display-condition.ts
434
- function X(e, t) {
435
+ function q(e, t) {
435
436
  if (t === "") return "";
436
437
  let n = e.displayCondition;
437
438
  return n ? `<mj-raw>${n.before}</mj-raw>
@@ -440,28 +441,28 @@ function X(e, t) {
440
441
  }
441
442
  //#endregion
442
443
  //#region ../renderer/src/renderers/section.ts
443
- function _e(e, t, n) {
444
- if (x(e)) return "";
445
- let r = e.columns, i = J(r), a = Y(r, t.containerWidth), o = P(e.styles.padding), s = F(e.styles.backgroundColor, "native"), l = S(e), u = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", d = e.children, f = [];
446
- for (let e = 0; e < d.length; e++) {
447
- let r = d[e], o = i[e] ?? "100%", s = Math.floor(a[e] ?? t.containerWidth), l = ve(r, t.allowHtmlBlocks).filter((e) => !c(e)), u = t.withContainerWidth(s), p = l.map((e) => X(e, n(e, u))).filter((e) => e !== "").join("\n");
448
- f.push(`<mj-column width="${o}">
449
- ${p === "" ? "<mj-text>&nbsp;</mj-text>" : p}
444
+ function we(e, t, n) {
445
+ if (w(e)) return "";
446
+ let r = e.columns, i = G(r), a = K(r, t.containerWidth), o = L(e.styles.padding), s = R(e.styles.backgroundColor, "native"), c = T(e), l = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", u = e.children, d = [];
447
+ for (let e = 0; e < u.length; e++) {
448
+ let r = u[e], o = i[e] ?? "100%", s = Math.floor(a[e] ?? t.containerWidth), c = Te(r, t.allowHtmlBlocks).filter((e) => !h(e)), l = t.withContainerWidth(s), f = c.map((e) => q(e, n(e, l))).filter((e) => e !== "").join("\n");
449
+ d.push(`<mj-column width="${o}">
450
+ ${f === "" ? "<mj-text>&nbsp;</mj-text>" : f}
450
451
  </mj-column>`);
451
452
  }
452
- let p = f.join("\n"), m = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "";
453
- return `<mj-section${s} padding="${o}"${u}${l}${m}>
454
- ${e.stackOnMobile === !1 && f.length > 1 ? `<mj-group${m}>
455
- ${p}
456
- </mj-group>` : p}
453
+ let f = d.join("\n"), p = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "";
454
+ return `<mj-section${s} padding="${o}"${l}${c}${p}>
455
+ ${e.stackOnMobile === !1 && d.length > 1 ? `<mj-group${p}>
456
+ ${f}
457
+ </mj-group>` : f}
457
458
  </mj-section>`;
458
459
  }
459
- function ve(e, t) {
460
+ function Te(e, t) {
460
461
  return t ? e : e.filter((e) => e.type !== "html");
461
462
  }
462
463
  //#endregion
463
464
  //#region ../renderer/src/renderers/video.ts
464
- function ye(e, t) {
465
+ function Ee(e, t) {
465
466
  if (t) return t;
466
467
  if (!e) return null;
467
468
  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})/]) {
@@ -471,93 +472,98 @@ function ye(e, t) {
471
472
  let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
472
473
  return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
473
474
  }
474
- function be(e, t) {
475
- if (x(e)) return "";
476
- let n = ye(e.url, e.thumbnailUrl);
475
+ function De(e, t) {
476
+ if (w(e)) return "";
477
+ let n = Ee(e.url, e.thumbnailUrl);
477
478
  if (!n) return "";
478
- let r = P(e.styles.padding), i = F(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = I(e.height), s = S(e);
479
+ let r = L(e.styles.padding), i = R(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = z(e.height), s = T(e);
479
480
  return `<mj-image
480
- src="${A(n)}"
481
- alt="${A(e.alt)}"
481
+ src="${N(n)}"
482
+ alt="${N(e.alt)}"
482
483
  width="${a}"${o}
483
484
  align="${e.align}"
484
485
  padding="${r}"
485
- href="${A(e.url)}"
486
+ href="${N(e.url)}"
486
487
  target="_blank"
487
488
  rel="noopener"${i}${s}
488
489
  />`;
489
490
  }
490
491
  //#endregion
491
492
  //#region ../renderer/src/renderers/index.ts
492
- function Z(a, f) {
493
- let m = f.blockRenderers[a.type];
494
- return m ? m(a, f) : c(a) ? _e(a, f, Z) : d(a) ? re(a, f) : l(a) ? oe(a, f) : p(a) ? B(a, f) : o(a) ? V(a, f) : t(a) ? W(a, f) : i(a) ? G(a, f) : r(a) ? K(a, f) : u(a) ? q(a, f) : n(a) ? se(a, f) : e(a) ? de(a, f) : h(a) ? be(a, f) : s(a) ? ge(a, f) : x(a) ? "" : E(a);
493
+ function J(t, r) {
494
+ let s = r.blockRenderers[t.type];
495
+ return s ? s(t, r) : h(t) ? we(t, r, J) : c(t) ? ie(t, r) : f(t) ? se(t, r) : l(t) ? ce(t, r) : i(t) ? le(t, r) : n(t) ? ue(t, r) : p(t) ? de(t, r) : e(t) ? fe(t, r) : o(t) ? pe(t, r) : _(t) ? me(t, r) : g(t) ? ve(t, r) : d(t) ? De(t, r) : a(t) ? Ce(t, r) : w(t) ? "" : k(t);
495
496
  }
496
497
  //#endregion
497
498
  //#region ../renderer/src/index.ts
498
- async function xe(e, t) {
499
- let n = t?.customFonts ?? [], r = t?.defaultFallbackFont ?? "Arial, sans-serif", i = t?.allowHtmlBlocks ?? !0, o = we(t?.socialIconsBaseUrl ?? v), s = await Oe(e, t?.renderCustomBlock), c = ke(e, t?.getCustomBlockStylesheet), l = a(e.settings), u = new b(e.settings.width, n, r, i, s, o, t?.blockRenderers ?? {}, l), d = De(e.blocks, i), f = u.resolveFontFamily(e.settings.fontFamily), p = e.settings.backgroundColor, m = e.settings.textColor ? ` color="${A(e.settings.textColor)}"` : "", h = e.settings.linkColor ? j(e.settings.linkColor) : "inherit", g = e.settings.linkUnderline ? "underline" : "none", _ = d.map((e) => Q(e, u)).filter((e) => e !== "").join("\n"), y = Ee(n), x = Te(e.settings.preheaderText);
500
- return `<mjml lang="${A(e.settings.locale)}" dir="${A(l)}">
501
- <mj-head>${x}
499
+ async function Oe(e, n) {
500
+ let i = n?.layout ? s(n.layout, e) : (ee(e), r(e), e), a = n?.customFonts ?? [], o = n?.defaultFallbackFont ?? "Arial, sans-serif", c = n?.allowHtmlBlocks ?? !0, l = Z(n?.socialIconsBaseUrl ?? x), u = await Me(i, n?.renderCustomBlock), d = Ne(i, n?.getCustomBlockStylesheet), f = t(i.settings), p = new C(i.settings.width, a, o, c, u, l, n?.blockRenderers ?? {}, f), m = Q(i.blocks, c), h = p.resolveFontFamily(i.settings.fontFamily), g = i.settings.backgroundColor, _ = i.settings.textColor ? ` color="${N(i.settings.textColor)}"` : "", v = i.settings.linkColor ? P(i.settings.linkColor) : "inherit", y = i.settings.linkUnderline ? "underline" : "none", b = m.map((e) => Y(e, p)).filter((e) => e !== "").join("\n"), S = je(a), w = Ae(i.settings.preheaderText);
501
+ return `<mjml lang="${N(i.settings.locale)}" dir="${N(f)}">
502
+ <mj-head>${w}
502
503
  <mj-attributes>
503
- <mj-all font-family="${f}" />
504
- <mj-text font-size="14px"${m} />
504
+ <mj-all font-family="${h}" />
505
+ <mj-text font-size="14px"${_} />
505
506
  <mj-section padding="0" />
506
507
  <mj-column padding="0" />
507
508
  <mj-image fluid-on-mobile="true" />
508
- </mj-attributes>${y}
509
+ </mj-attributes>${S}
509
510
  <mj-style inline="inline">
510
- ${te(ne(d), l)}
511
+ ${ne(re(m), f)}
511
512
  </mj-style>
512
513
  <mj-style>
513
- a { color: ${h}; text-decoration: ${g}; }
514
+ a { color: ${v}; text-decoration: ${y}; }
514
515
  @media only screen and (max-width: 480px) {
515
516
  .tpl-hide-mobile { display: none !important; mso-hide: all !important; }
516
517
  }
517
518
  @media only screen and (min-width: 481px) {
518
519
  .tpl-hide-desktop { display: none !important; mso-hide: all !important; }
519
520
  }
520
- </mj-style>${Ae(c)}
521
+ </mj-style>${Pe(d)}
521
522
  </mj-head>
522
- <mj-body width="${u.containerWidth}px" background-color="${p}">
523
- ${_}
523
+ <mj-body width="${p.containerWidth}px" background-color="${g}">
524
+ ${b}
524
525
  </mj-body>
525
526
  </mjml>`;
526
527
  }
527
- function Q(e, t) {
528
- if (c(e)) {
529
- let n = Z(e, t);
530
- return X(e, e.wrapper && n !== "" ? Se(n, e.wrapper) : n);
528
+ function Y(e, t) {
529
+ if (v(e)) return q(e, X(Q(e.children, t.allowHtmlBlocks).map((e) => Y(e, t)).filter((e) => e !== "").join("\n"), {
530
+ backgroundColor: e.styles.backgroundColor,
531
+ padding: e.styles.padding,
532
+ borderRadius: e.borderRadius
533
+ }));
534
+ if (h(e)) {
535
+ let n = J(e, t);
536
+ return q(e, e.wrapper && n !== "" ? X(n, e.wrapper) : n);
531
537
  }
532
- return X(e, Ce(Z(e, t), t.contentDirection));
538
+ return q(e, ke(J(e, t), t.contentDirection));
533
539
  }
534
- function Se(e, t) {
535
- return `<mj-wrapper${F(t.backgroundColor, "native")}${` padding="${t.padding ? P(t.padding) : "0"}"`}${t.borderRadius && t.borderRadius > 0 ? ` border-radius="${t.borderRadius}px"` : ""}>
540
+ function X(e, t) {
541
+ return `<mj-wrapper${R(t.backgroundColor, "native")}${` padding="${t.padding ? L(t.padding) : "0"}"`}${t.borderRadius && t.borderRadius > 0 ? ` border-radius="${t.borderRadius}px"` : ""}>
536
542
  ${e}
537
543
  </mj-wrapper>`;
538
544
  }
539
- function Ce(e, t) {
545
+ function ke(e, t) {
540
546
  return e === "" ? "" : `<mj-section${t === "rtl" ? " direction=\"rtl\"" : ""}>
541
547
  <mj-column>
542
548
  ${e}
543
549
  </mj-column>
544
550
  </mj-section>`;
545
551
  }
546
- function we(e) {
552
+ function Z(e) {
547
553
  return e.endsWith("/") ? e.slice(0, -1) : e;
548
554
  }
549
- function Te(e) {
555
+ function Ae(e) {
550
556
  if (!e) return "";
551
557
  let t = e.trim();
552
- return t === "" ? "" : `\n <mj-preview>${k(t)}</mj-preview>`;
558
+ return t === "" ? "" : `\n <mj-preview>${M(t)}</mj-preview>`;
553
559
  }
554
- function Ee(e) {
555
- return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${A(e.name)}" href="${A(e.url)}" />`).join("");
560
+ function je(e) {
561
+ return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${N(e.name)}" href="${N(e.url)}" />`).join("");
556
562
  }
557
- function De(e, t) {
563
+ function Q(e, t) {
558
564
  return t ? e : e.filter((e) => e.type !== "html");
559
565
  }
560
- async function Oe(e, t) {
566
+ async function Me(e, t) {
561
567
  let n = /* @__PURE__ */ new Map();
562
568
  if (!t) return n;
563
569
  let r = [];
@@ -568,14 +574,15 @@ async function Oe(e, t) {
568
574
  }
569
575
  function $(e, t) {
570
576
  for (let n of e) {
571
- if (s(n)) {
577
+ if (a(n)) {
572
578
  t.push(n);
573
579
  continue;
574
580
  }
575
- if (c(n)) for (let e of n.children) $(e, t);
581
+ if (h(n)) for (let e of n.children) $(e, t);
582
+ else v(n) && $(n.children, t);
576
583
  }
577
584
  }
578
- function ke(e, t) {
585
+ function Ne(e, t) {
579
586
  if (!t) return [];
580
587
  let n = [];
581
588
  if ($(e.blocks, n), n.length === 0) return [];
@@ -590,10 +597,10 @@ function ke(e, t) {
590
597
  }
591
598
  return a;
592
599
  }
593
- function Ae(e) {
600
+ function Pe(e) {
594
601
  return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e}\n </mj-style>`).join("");
595
602
  }
596
603
  //#endregion
597
- export { v as DEFAULT_SOCIAL_ICONS_BASE_URL, L as RICH_TEXT_CSS_CLASS, b as RenderContext, w as UNRENDERABLE_MARKER_PREFIX, M as convertMergeTagsToValues, A as escapeAttr, k as escapeHtml, S as getCssClassAttr, C as getCssClasses, J as getWidthPercentages, Y as getWidthPixels, x as isHiddenOnAll, Z as renderBlock, xe as renderToMjml, E as renderUnrenderableBlock, z as resolveParagraphGap, R as richTextGapClass, P as toPaddingString };
604
+ export { x as DEFAULT_SOCIAL_ICONS_BASE_URL, B as RICH_TEXT_CSS_CLASS, C as RenderContext, D as UNRENDERABLE_MARKER_PREFIX, F as convertMergeTagsToValues, N as escapeAttr, M as escapeHtml, T as getCssClassAttr, E as getCssClasses, G as getWidthPercentages, K as getWidthPixels, w as isHiddenOnAll, J as renderBlock, Oe as renderToMjml, k as renderUnrenderableBlock, H as resolveParagraphGap, V as richTextGapClass, L as toPaddingString };
598
605
 
599
- //# sourceMappingURL=src-CqYYKcCI.js.map
606
+ //# sourceMappingURL=src-CbGCES0u.js.map