@templatical/editor 0.34.2 → 0.35.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 (206) hide show
  1. package/dist/{AiChatSidebar-CkHJ28sf.js → AiChatSidebar-DPHbCGu4.js} +29 -21
  2. package/dist/{AiFeatureMenu-DWdKguDN.js → AiFeatureMenu--8z7qvg1.js} +4 -4
  3. package/dist/{BlockIssueBadge-DcyHTAqw.js → BlockIssueBadge-BGCsJqqM.js} +2 -2
  4. package/dist/BlockPreviewCanvas-DKspIy8V.js +131 -0
  5. package/dist/{CloudHeaderExtras-BJ3Cebhv.js → CloudHeaderExtras-CRUQvgSV.js} +2 -2
  6. package/dist/{CloudPanels-BGz9ygo6.js → CloudPanels-Bp5gFtaL.js} +3 -3
  7. package/dist/{CollaboratorBar-KphmSQeZ.js → CollaboratorBar-DvwZm5u7.js} +57 -49
  8. package/dist/{ColorPicker-C6EOwtHC.js → ColorPicker-DtozuN75.js} +1 -1
  9. package/dist/{CommentsPanel-DmWh8f08.js → CommentsPanel-3C-DsEjy.js} +1 -1
  10. package/dist/{CommentsSidebar-CL_tffzT.js → CommentsSidebar-go1FnjDW.js} +34 -25
  11. package/dist/{CountdownToolbar-B8J4i5Xp.js → CountdownToolbar-SLBuij7Q.js} +1 -1
  12. package/dist/{DesignReferenceSidebar-BDhEeaAh.js → DesignReferenceSidebar-rcE_BvUd.js} +55 -47
  13. package/dist/{IssuesPanel-CiOjeRFI.js → IssuesPanel-Cig46N1i.js} +23 -15
  14. package/dist/{MergeTagInput-RytOlh1A.js → MergeTagInput-D1hzsn2b.js} +42 -33
  15. package/dist/{MergeTagModeToggle-Bi-FydXj.js → MergeTagModeToggle-CH9wR5YF.js} +70 -58
  16. package/dist/{ParagraphEditor-C87tkmtE.js → ParagraphEditor-CT2AdMdZ.js} +365 -323
  17. package/dist/{RestoreVersionDialog-Db5rZRMA.js → RestoreVersionDialog-mdqgQxFR.js} +3 -3
  18. package/dist/{RichTextEditorContent-BmTcV2-a.js → RichTextEditorContent-riOB-rKD.js} +48 -36
  19. package/dist/{SaveBlockDialog-CDCzx6Bo.js → SaveBlockDialog-Cn2v4Lpj.js} +6 -6
  20. package/dist/{SavedBlocksBrowserModal-DQR6kJB1.js → SavedBlocksBrowserModal-BORqqASb.js} +7 -7
  21. package/dist/{SavedBlocksPanels-DFzV0CRD.js → SavedBlocksPanels-ffBnWuVU.js} +1 -1
  22. package/dist/{SavedBlocksPickBar-XyXmnSnO.js → SavedBlocksPickBar-BmQC2tWN.js} +2 -2
  23. package/dist/{TemplateScoringPanel-CpyEKMzC.js → TemplateScoringPanel-CxAtdreR.js} +36 -27
  24. package/dist/{TestEmailModal-DIfJy9eE.js → TestEmailModal-Cjn1padY.js} +7 -7
  25. package/dist/{TestEmailPanel-C8Wx5yPS.js → TestEmailPanel-Bf3XZ1jn.js} +1 -1
  26. package/dist/{TitleEditor-iNFOisr4.js → TitleEditor-pYEUX6lR.js} +5 -5
  27. package/dist/{TplModal-CowM3o_F.js → TplModal-DRx4ytx8.js} +1 -1
  28. package/dist/{VersionHistoryMenu-CV90OhXs.js → VersionHistoryMenu-CrNrGsaa.js} +21 -13
  29. package/dist/{VersionHistoryPanels-BE3pplJG.js → VersionHistoryPanels-CsuQk6W3.js} +1 -1
  30. package/dist/{VersionPreviewBanner-BwUWBtlH.js → VersionPreviewBanner-BqbO0Zss.js} +1 -1
  31. package/dist/blockTypeIcons-D_4HdaY9.js +175 -0
  32. package/dist/bundle-stats.json +6 -6
  33. package/dist/{ca-C0hfqt4U.js → ca-D9S-UCfZ.js} +2 -0
  34. package/dist/cdn/chunks/{AiChatSidebar-BEnIWn6s.js → AiChatSidebar-D0f74_nS.js} +3 -3
  35. package/dist/cdn/chunks/{AiChatSidebar-BEnIWn6s.js.map → AiChatSidebar-D0f74_nS.js.map} +1 -1
  36. package/dist/cdn/chunks/{AiFeatureMenu-DMl23akc.js → AiFeatureMenu-DwGb3eF9.js} +3 -3
  37. package/dist/cdn/chunks/{AiFeatureMenu-DMl23akc.js.map → AiFeatureMenu-DwGb3eF9.js.map} +1 -1
  38. package/dist/cdn/chunks/{BlockIssueBadge-CloK4k3M.js → BlockIssueBadge-CosQgeJ-.js} +2 -2
  39. package/dist/cdn/chunks/{BlockIssueBadge-CloK4k3M.js.map → BlockIssueBadge-CosQgeJ-.js.map} +1 -1
  40. package/dist/cdn/chunks/BlockPreviewCanvas-CIpZ2a6g.js +133 -0
  41. package/dist/cdn/chunks/BlockPreviewCanvas-CIpZ2a6g.js.map +1 -0
  42. package/dist/cdn/chunks/{CloudHeaderExtras-b4KpVeUN.js → CloudHeaderExtras-CQzQwKFB.js} +3 -3
  43. package/dist/cdn/chunks/{CloudHeaderExtras-b4KpVeUN.js.map → CloudHeaderExtras-CQzQwKFB.js.map} +1 -1
  44. package/dist/cdn/chunks/{CloudPanels-DzwOq9lp.js → CloudPanels-BmexuLOU.js} +4 -4
  45. package/dist/cdn/chunks/{CloudPanels-DzwOq9lp.js.map → CloudPanels-BmexuLOU.js.map} +1 -1
  46. package/dist/cdn/chunks/{CollaboratorBar-WXKvpoGK.js → CollaboratorBar-DEICobpp.js} +3 -3
  47. package/dist/cdn/chunks/{CollaboratorBar-WXKvpoGK.js.map → CollaboratorBar-DEICobpp.js.map} +1 -1
  48. package/dist/cdn/chunks/{ColorPicker-BubTDiS1.js → ColorPicker-C7yC58FK.js} +2 -2
  49. package/dist/cdn/chunks/{ColorPicker-BubTDiS1.js.map → ColorPicker-C7yC58FK.js.map} +1 -1
  50. package/dist/cdn/chunks/{CommentsPanel-DAA2VqX4.js → CommentsPanel-OjmKxLL7.js} +2 -2
  51. package/dist/cdn/chunks/{CommentsPanel-DAA2VqX4.js.map → CommentsPanel-OjmKxLL7.js.map} +1 -1
  52. package/dist/cdn/chunks/{CommentsSidebar-Ci0M2ePp.js → CommentsSidebar-C4pWZGpy.js} +2 -2
  53. package/dist/cdn/chunks/{CommentsSidebar-Ci0M2ePp.js.map → CommentsSidebar-C4pWZGpy.js.map} +1 -1
  54. package/dist/cdn/chunks/{CountdownToolbar-CzZq26Vp.js → CountdownToolbar-wlJOxyAl.js} +2 -2
  55. package/dist/cdn/chunks/{CountdownToolbar-CzZq26Vp.js.map → CountdownToolbar-wlJOxyAl.js.map} +1 -1
  56. package/dist/cdn/chunks/{DesignReferenceSidebar-C_ehdX5C.js → DesignReferenceSidebar-DELhnh8h.js} +3 -3
  57. package/dist/cdn/chunks/{DesignReferenceSidebar-C_ehdX5C.js.map → DesignReferenceSidebar-DELhnh8h.js.map} +1 -1
  58. package/dist/cdn/chunks/{IssuesPanel-BXAN2_al.js → IssuesPanel-C9i3o8aE.js} +2 -2
  59. package/dist/cdn/chunks/{IssuesPanel-BXAN2_al.js.map → IssuesPanel-C9i3o8aE.js.map} +1 -1
  60. package/dist/cdn/chunks/{MergeTagInput-1vcI9uQH.js → MergeTagInput-D76Kyvgu.js} +5 -5
  61. package/dist/cdn/chunks/{MergeTagInput-1vcI9uQH.js.map → MergeTagInput-D76Kyvgu.js.map} +1 -1
  62. package/dist/cdn/chunks/{MergeTagModeToggle-B_mUYJo4.js → MergeTagModeToggle-Dz3gxN2y.js} +3 -3
  63. package/dist/cdn/chunks/{MergeTagModeToggle-B_mUYJo4.js.map → MergeTagModeToggle-Dz3gxN2y.js.map} +1 -1
  64. package/dist/cdn/chunks/{ParagraphEditor-DCDHMcmx.js → ParagraphEditor-DQn0HMfV.js} +176 -172
  65. package/dist/cdn/chunks/{ParagraphEditor-DCDHMcmx.js.map → ParagraphEditor-DQn0HMfV.js.map} +1 -1
  66. package/dist/cdn/chunks/{RestoreVersionDialog-BkSSwf-Q.js → RestoreVersionDialog-BdjOL8Oy.js} +3 -3
  67. package/dist/cdn/chunks/{RestoreVersionDialog-BkSSwf-Q.js.map → RestoreVersionDialog-BdjOL8Oy.js.map} +1 -1
  68. package/dist/cdn/chunks/{RichTextEditorContent-S4KogjIj.js → RichTextEditorContent-Drzwgh0J.js} +4 -4
  69. package/dist/cdn/chunks/{RichTextEditorContent-S4KogjIj.js.map → RichTextEditorContent-Drzwgh0J.js.map} +1 -1
  70. package/dist/cdn/chunks/{SaveBlockDialog-BH774Nt0.js → SaveBlockDialog-B3rbmXSM.js} +5 -5
  71. package/dist/cdn/chunks/{SaveBlockDialog-BH774Nt0.js.map → SaveBlockDialog-B3rbmXSM.js.map} +1 -1
  72. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CSUqw_dD.js → SavedBlocksBrowserModal-CkUXlnd2.js} +6 -6
  73. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CSUqw_dD.js.map → SavedBlocksBrowserModal-CkUXlnd2.js.map} +1 -1
  74. package/dist/cdn/chunks/{SavedBlocksPanels-B6ApbCjG.js → SavedBlocksPanels-BPi3PZKP.js} +2 -2
  75. package/dist/cdn/chunks/{SavedBlocksPanels-B6ApbCjG.js.map → SavedBlocksPanels-BPi3PZKP.js.map} +1 -1
  76. package/dist/cdn/chunks/{SavedBlocksPickBar-C9MXSRcR.js → SavedBlocksPickBar-BvB9A5W2.js} +3 -3
  77. package/dist/cdn/chunks/{SavedBlocksPickBar-C9MXSRcR.js.map → SavedBlocksPickBar-BvB9A5W2.js.map} +1 -1
  78. package/dist/cdn/chunks/{TemplateScoringPanel-QVOxc9TZ.js → TemplateScoringPanel-BBCyLnOi.js} +2 -2
  79. package/dist/cdn/chunks/{TemplateScoringPanel-QVOxc9TZ.js.map → TemplateScoringPanel-BBCyLnOi.js.map} +1 -1
  80. package/dist/cdn/chunks/{TestEmailModal-_CZvaO58.js → TestEmailModal-DAGTsBqi.js} +7 -7
  81. package/dist/cdn/chunks/{TestEmailModal-_CZvaO58.js.map → TestEmailModal-DAGTsBqi.js.map} +1 -1
  82. package/dist/cdn/chunks/{TestEmailPanel-DXLxvyrD.js → TestEmailPanel-BfenVvfx.js} +2 -2
  83. package/dist/cdn/chunks/{TestEmailPanel-DXLxvyrD.js.map → TestEmailPanel-BfenVvfx.js.map} +1 -1
  84. package/dist/cdn/chunks/{TitleEditor-BuCOahW3.js → TitleEditor-oQ4gr6wS.js} +5 -5
  85. package/dist/cdn/chunks/{TitleEditor-BuCOahW3.js.map → TitleEditor-oQ4gr6wS.js.map} +1 -1
  86. package/dist/cdn/chunks/{TplModal-CqY8R3hn.js → TplModal-DxOMcVwp.js} +2 -2
  87. package/dist/cdn/chunks/{TplModal-CqY8R3hn.js.map → TplModal-DxOMcVwp.js.map} +1 -1
  88. package/dist/cdn/chunks/{VersionHistoryMenu-DDjIBvad.js → VersionHistoryMenu-BfVUvWHT.js} +4 -4
  89. package/dist/cdn/chunks/{VersionHistoryMenu-DDjIBvad.js.map → VersionHistoryMenu-BfVUvWHT.js.map} +1 -1
  90. package/dist/cdn/chunks/{VersionHistoryPanels-BuTw04T5.js → VersionHistoryPanels-NpDb641L.js} +2 -2
  91. package/dist/cdn/chunks/{VersionHistoryPanels-BuTw04T5.js.map → VersionHistoryPanels-NpDb641L.js.map} +1 -1
  92. package/dist/cdn/chunks/{VersionPreviewBanner-fGAv20qI.js → VersionPreviewBanner-Cpgt4xHc.js} +2 -2
  93. package/dist/cdn/chunks/{VersionPreviewBanner-fGAv20qI.js.map → VersionPreviewBanner-Cpgt4xHc.js.map} +1 -1
  94. package/dist/cdn/chunks/{blockTypeIcons-ZEzEpCti.js → blockTypeIcons-t9vvaiuH.js} +2 -2
  95. package/dist/cdn/chunks/{blockTypeIcons-ZEzEpCti.js.map → blockTypeIcons-t9vvaiuH.js.map} +1 -1
  96. package/dist/cdn/chunks/{ca-C0hfqt4U.js → ca-D9S-UCfZ.js} +3 -1
  97. package/dist/cdn/chunks/{ca-C0hfqt4U.js.map → ca-D9S-UCfZ.js.map} +1 -1
  98. package/dist/cdn/chunks/{cloud-BP5-6__d.js → cloud-CullB76F.js} +2 -2
  99. package/dist/cdn/chunks/{cloud-BP5-6__d.js.map → cloud-CullB76F.js.map} +1 -1
  100. package/dist/cdn/chunks/{createCloudRuntime-JFE-sxbT.js → createCloudRuntime-Cx2JpUYU.js} +4 -4
  101. package/dist/cdn/chunks/{createCloudRuntime-JFE-sxbT.js.map → createCloudRuntime-Cx2JpUYU.js.map} +1 -1
  102. package/dist/{de-C6J2Iae8.js → cdn/chunks/de-BUPszLpi.js} +4 -0
  103. package/dist/cdn/chunks/{de-C6J2Iae8.js.map → de-BUPszLpi.js.map} +1 -1
  104. package/dist/cdn/chunks/{en-BaUYOQi8.js → en-BbOC5x3w.js} +3 -1
  105. package/dist/cdn/chunks/en-BbOC5x3w.js.map +1 -0
  106. package/dist/cdn/chunks/en-rGHphLWo.js +2 -0
  107. package/dist/cdn/chunks/{es-CKDYfJYn.js → es-0bCDcT9p.js} +3 -1
  108. package/dist/cdn/chunks/{es-CKDYfJYn.js.map → es-0bCDcT9p.js.map} +1 -1
  109. package/dist/cdn/chunks/{extensions-7z04EIGg.js → extensions-BpXY7jO5.js} +3 -3
  110. package/dist/cdn/chunks/{extensions-7z04EIGg.js.map → extensions-BpXY7jO5.js.map} +1 -1
  111. package/dist/{fr-L8DR73mK.js → cdn/chunks/fr-Brr8mJ9e.js} +4 -0
  112. package/dist/cdn/chunks/fr-Brr8mJ9e.js.map +1 -0
  113. package/dist/cdn/chunks/icons-BLxcQUck.js +1675 -0
  114. package/dist/cdn/chunks/icons-BLxcQUck.js.map +1 -0
  115. package/dist/cdn/chunks/{nl-GDWeuX18.js → nl-Co3_RL0M.js} +3 -1
  116. package/dist/cdn/chunks/nl-Co3_RL0M.js.map +1 -0
  117. package/dist/cdn/chunks/{preRenderCustomBlocks-LFB-e-0m.js → preRenderCustomBlocks-Bdpiiw4A.js} +2 -2
  118. package/dist/cdn/chunks/{preRenderCustomBlocks-LFB-e-0m.js.map → preRenderCustomBlocks-Bdpiiw4A.js.map} +1 -1
  119. package/dist/cdn/chunks/{pt-BR-B1AVVhWj.js → pt-BR-BECez5b0.js} +3 -1
  120. package/dist/cdn/chunks/{pt-BR-B1AVVhWj.js.map → pt-BR-BECez5b0.js.map} +1 -1
  121. package/dist/cdn/chunks/{src-CX_VHu8r.js → src-BC-eolWY.js} +161 -160
  122. package/dist/cdn/chunks/src-BC-eolWY.js.map +1 -0
  123. package/dist/cdn/chunks/{src-BM3f9I7t.js → src-CUvZWL6Y.js} +83 -83
  124. package/dist/cdn/chunks/src-CUvZWL6Y.js.map +1 -0
  125. package/dist/cdn/chunks/{src-Cxl-9O-L.js → src-CaXeO-gG.js} +17 -17
  126. package/dist/cdn/chunks/{src-Cxl-9O-L.js.map → src-CaXeO-gG.js.map} +1 -1
  127. package/dist/cdn/chunks/{src-CLoCCDfs.js → src-Dwgq7hf4.js} +71 -48
  128. package/dist/cdn/chunks/src-Dwgq7hf4.js.map +1 -0
  129. package/dist/cdn/chunks/{useEditorCore-ehUSEsbw.js → useEditorCore-D4MytYB9.js} +495 -485
  130. package/dist/cdn/chunks/useEditorCore-D4MytYB9.js.map +1 -0
  131. package/dist/cdn/chunks/{useMergeTag-TLhF2fGK.js → useMergeTag-CSocWpxV.js} +2 -2
  132. package/dist/cdn/chunks/{useMergeTag-TLhF2fGK.js.map → useMergeTag-CSocWpxV.js.map} +1 -1
  133. package/dist/cdn/editor.css +1 -1
  134. package/dist/cdn/editor.js +920 -907
  135. package/dist/cdn/editor.js.map +1 -1
  136. package/dist/check-CY-Ec6FV.js +11 -0
  137. package/dist/chevron-down-BghbWA9p.js +11 -0
  138. package/dist/chevron-up-n3qFAPS3.js +11 -0
  139. package/dist/circle-alert-L5uGGFRP.js +30 -0
  140. package/dist/clock-Dgnwp18n.js +16 -0
  141. package/dist/{cloud-BMzRKCbk.js → cloud-B1c4XIsn.js} +1 -1
  142. package/dist/{createCloudRuntime-DbTFm1ES.js → createCloudRuntime-PevFSH74.js} +2 -2
  143. package/dist/createLucideIcon-05lB8iWe.js +96 -0
  144. package/dist/{cdn/chunks/de-C6J2Iae8.js → de-BUPszLpi.js} +2 -2
  145. package/dist/{dist-PL6vP4SC.js → dist-tGkjkX-v.js} +143 -122
  146. package/dist/{en-BaUYOQi8.js → en-BbOC5x3w.js} +2 -0
  147. package/dist/{es-CKDYfJYn.js → es-0bCDcT9p.js} +2 -0
  148. package/dist/{extensions-Mf8iHey9.js → extensions-Bawm4BOM.js} +2 -2
  149. package/dist/{cdn/chunks/fr-L8DR73mK.js → fr-Brr8mJ9e.js} +2 -2
  150. package/dist/image-up-ovhjl9u9.js +27 -0
  151. package/dist/info-c3KI927I.js +23 -0
  152. package/dist/loader-circle-B2Y8xZQb.js +12 -0
  153. package/dist/message-circle-B7K-naUa.js +11 -0
  154. package/dist/{nl-GDWeuX18.js → nl-Co3_RL0M.js} +2 -0
  155. package/dist/pencil-BhWTFcp4.js +14 -0
  156. package/dist/{preRenderCustomBlocks-CSIF-HyJ.js → preRenderCustomBlocks-DFXH54Zr.js} +1 -1
  157. package/dist/{pt-BR-B1AVVhWj.js → pt-BR-BECez5b0.js} +2 -0
  158. package/dist/refresh-cw-BqUR5vgO.js +37 -0
  159. package/dist/send-D1vvuW79.js +14 -0
  160. package/dist/shield-check-DjK54PnW.js +14 -0
  161. package/dist/sparkles-DNdS9V_3.js +28 -0
  162. package/dist/style.css +1 -1
  163. package/dist/templatical-editor.js +1238 -1167
  164. package/dist/text-align-start-Bcmo_VUY.js +58 -0
  165. package/dist/trash-C9bMXvw4.js +30 -0
  166. package/dist/triangle-alert-Bn8Bd2Yv.js +22 -0
  167. package/dist/upload-DKgg1gno.js +21 -0
  168. package/dist/{useEditorCore-DdkQuTHl.js → useEditorCore-CYGvurZa.js} +1089 -1026
  169. package/dist/{useMergeTag-gSuYus-M.js → useMergeTag-C9GEpljB.js} +1 -1
  170. package/dist/{useScrollToBlock-CdI8fGqt.js → useScrollToBlock-oUx1HIZ2.js} +27 -23
  171. package/dist/x-BPKoRPTG.js +14 -0
  172. package/package.json +9 -9
  173. package/dist/BlockPreviewCanvas-B621ANn9.js +0 -129
  174. package/dist/blockTypeIcons-DQsKtHik.js +0 -134
  175. package/dist/cdn/chunks/BlockPreviewCanvas-DSiJFJa0.js +0 -131
  176. package/dist/cdn/chunks/BlockPreviewCanvas-DSiJFJa0.js.map +0 -1
  177. package/dist/cdn/chunks/en-BaUYOQi8.js.map +0 -1
  178. package/dist/cdn/chunks/en-mEKGL1PX.js +0 -2
  179. package/dist/cdn/chunks/fr-L8DR73mK.js.map +0 -1
  180. package/dist/cdn/chunks/icons-SP5Itd-A.js +0 -1218
  181. package/dist/cdn/chunks/icons-SP5Itd-A.js.map +0 -1
  182. package/dist/cdn/chunks/nl-GDWeuX18.js.map +0 -1
  183. package/dist/cdn/chunks/src-BM3f9I7t.js.map +0 -1
  184. package/dist/cdn/chunks/src-CLoCCDfs.js.map +0 -1
  185. package/dist/cdn/chunks/src-CX_VHu8r.js.map +0 -1
  186. package/dist/cdn/chunks/useEditorCore-ehUSEsbw.js.map +0 -1
  187. package/dist/check-JK8Uacq0.js +0 -7
  188. package/dist/chevron-down-a-fb_Ijn.js +0 -7
  189. package/dist/chevron-up-x4l0et_Y.js +0 -7
  190. package/dist/circle-alert-CJDW5LZo.js +0 -25
  191. package/dist/clock-BW6rXk2f.js +0 -12
  192. package/dist/createLucideIcon-Bvw1Zx56.js +0 -43
  193. package/dist/image-up-CuzFc1mu.js +0 -23
  194. package/dist/info-DybAwcA3.js +0 -19
  195. package/dist/loader-circle-t-SVgmJ3.js +0 -7
  196. package/dist/message-circle-DtwKrlhN.js +0 -7
  197. package/dist/pencil-2qhC-Y4q.js +0 -10
  198. package/dist/refresh-cw-C8SBuPdg.js +0 -29
  199. package/dist/send-BoqJliF6.js +0 -10
  200. package/dist/shield-check-D0dMaHtE.js +0 -10
  201. package/dist/sparkles-Dy2BJjiX.js +0 -23
  202. package/dist/text-align-start-DrxjxvIy.js +0 -43
  203. package/dist/trash-rYMzzHZd.js +0 -25
  204. package/dist/triangle-alert-DxnFj4-B.js +0 -17
  205. package/dist/upload-DZu1adQz.js +0 -17
  206. package/dist/x-DJOd1hS4.js +0 -10
@@ -1,10 +1,10 @@
1
- import { $ as e, G as t, H as n, J as r, K as i, Q as a, U as o, W as s, X as c, Y as l, Z as u, et as d, nt as f, q as p, rt as m, v as h, y as g } from "./src-CLoCCDfs.js";
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";
2
2
  //#endregion
3
3
  //#region ../renderer/src/render-context.ts
4
- var _ = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
4
+ var v = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
5
5
  name: "@templatical/renderer",
6
6
  description: "Render Templatical email templates to MJML",
7
- version: "0.34.2",
7
+ version: "0.35.0",
8
8
  bugs: "https://github.com/templatical/sdk/issues",
9
9
  dependencies: { "@templatical/types": "workspace:*" },
10
10
  devDependencies: {
@@ -42,7 +42,7 @@ var _ = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
42
42
  },
43
43
  type: "module",
44
44
  types: "./dist/index.d.ts"
45
- }.version}/assets/social`, v = {
45
+ }.version}/assets/social`, y = {
46
46
  arial: "Arial, sans-serif",
47
47
  helvetica: "Helvetica, sans-serif",
48
48
  georgia: "Georgia, serif",
@@ -51,7 +51,7 @@ var _ = `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
- }, y = class e {
54
+ }, b = class e {
55
55
  containerWidth;
56
56
  customFonts;
57
57
  defaultFallbackFont;
@@ -59,31 +59,32 @@ var _ = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
59
59
  customBlockHtml;
60
60
  socialIconsBaseUrl;
61
61
  blockRenderers;
62
- constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = _, o = {}) {
63
- this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i, this.socialIconsBaseUrl = a, this.blockRenderers = o;
62
+ contentDirection;
63
+ constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = v, o = {}, s = "ltr") {
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;
64
65
  }
65
66
  withContainerWidth(t) {
66
- return new e(t, this.customFonts, this.defaultFallbackFont, this.allowHtmlBlocks, this.customBlockHtml, this.socialIconsBaseUrl, this.blockRenderers);
67
+ return new e(t, this.customFonts, this.defaultFallbackFont, this.allowHtmlBlocks, this.customBlockHtml, this.socialIconsBaseUrl, this.blockRenderers, this.contentDirection);
67
68
  }
68
69
  resolveFontFamily(e) {
69
70
  for (let t of this.customFonts) if (t.name.toLowerCase() === e.toLowerCase()) {
70
71
  let e = t.fallback ?? this.defaultFallbackFont;
71
72
  return `'${t.name}', ${e}`;
72
73
  }
73
- return v[e.toLowerCase()] || e;
74
+ return y[e.toLowerCase()] || e;
74
75
  }
75
76
  };
76
77
  //#endregion
77
78
  //#region ../renderer/src/visibility.ts
78
- function b(e) {
79
+ function x(e) {
79
80
  let t = e.visibility;
80
81
  return t ? !t.desktop && !t.mobile : !1;
81
82
  }
82
- function x(e, t = []) {
83
- let n = [S(e), ...t].filter((e) => e !== "").join(" ");
83
+ function S(e, t = []) {
84
+ let n = [C(e), ...t].filter((e) => e !== "").join(" ");
84
85
  return n === "" ? "" : ` css-class="${n}"`;
85
86
  }
86
- function S(e) {
87
+ function C(e) {
87
88
  let t = e.visibility;
88
89
  if (!t) return "";
89
90
  let n = [];
@@ -91,33 +92,33 @@ function S(e) {
91
92
  }
92
93
  //#endregion
93
94
  //#region ../renderer/src/unrenderable.ts
94
- var C = "templatical:unrenderable-block";
95
- function w(e) {
95
+ var w = "templatical:unrenderable-block";
96
+ function T(e) {
96
97
  return e.replace(/[<>]/g, "").replace(/-{2,}/g, "-");
97
98
  }
98
- function T(e) {
99
- 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><!-- ${C} type="${w(e.type)}" id="${w(e.id)}" --></mj-raw>`;
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>`;
100
101
  }
101
102
  //#endregion
102
103
  //#region ../renderer/src/escape.ts
103
- var E = {
104
+ var D = {
104
105
  "&": "&amp;",
105
106
  "<": "&lt;",
106
107
  ">": "&gt;",
107
108
  "\"": "&quot;",
108
109
  "'": "&#039;"
109
- }, D = /[&<>"']/g;
110
- function O(e) {
111
- return e === "" ? "" : e.replace(D, (e) => E[e] ?? e);
112
- }
110
+ }, O = /[&<>"']/g;
113
111
  function k(e) {
114
- return e === "" ? "" : e.replace(D, (e) => E[e] ?? e);
112
+ return e === "" ? "" : e.replace(O, (e) => D[e] ?? e);
115
113
  }
116
114
  function A(e) {
117
- return e === "" ? "" : k(e).replace(/[;{}\r\n]/g, "");
115
+ return e === "" ? "" : e.replace(O, (e) => D[e] ?? e);
118
116
  }
119
117
  function j(e) {
120
- return e === "" ? "" : ee(e, (e) => M(e, "data-merge-tag") ?? M(e, "data-logic-merge-tag"));
118
+ return e === "" ? "" : A(e).replace(/[;{}\r\n]/g, "");
119
+ }
120
+ function M(e) {
121
+ return e === "" ? "" : ee(e, (e) => N(e, "data-merge-tag") ?? N(e, "data-logic-merge-tag"));
121
122
  }
122
123
  function ee(e, t) {
123
124
  let n = "", r = 0;
@@ -132,7 +133,7 @@ function ee(e, t) {
132
133
  n += e.substring(r, i + 5), r = i + 5;
133
134
  continue;
134
135
  }
135
- let o = h(e, i + 5);
136
+ let o = g(e, i + 5);
136
137
  if (o === -1) {
137
138
  n += e.substring(r);
138
139
  break;
@@ -151,45 +152,45 @@ function ee(e, t) {
151
152
  }
152
153
  return n;
153
154
  }
154
- function M(e, t) {
155
- return g(e, t);
155
+ function N(e, t) {
156
+ return _(e, t);
156
157
  }
157
158
  //#endregion
158
159
  //#region ../renderer/src/padding.ts
159
- function N(e) {
160
+ function P(e) {
160
161
  return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
161
162
  }
162
163
  //#endregion
163
164
  //#region ../renderer/src/utils.ts
164
- function P(e, t) {
165
+ function F(e, t) {
165
166
  return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${e}"` : "";
166
167
  }
167
- function F(e) {
168
+ function I(e) {
168
169
  return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? "" : ` height="${e}px"`;
169
170
  }
170
171
  //#endregion
171
172
  //#region ../renderer/src/rich-text.ts
172
- var I = "tpl-rich-text";
173
- function L(e) {
174
- return `${I}-${e}`;
173
+ var L = "tpl-rich-text";
174
+ function R(e) {
175
+ return `${L}-${e}`;
175
176
  }
176
- function te(e) {
177
- let t = m, n = `.${I}`;
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)}`;
180
+ return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
181
+ }), a = t === "rtl" ? "padding-right" : "padding-left";
178
182
  return [
179
- ...[...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
180
- let t = `.${L(e)}`;
181
- return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
182
- }),
183
- `${n} ul, ${n} ol { margin: ${t.listMarginY}px 0; padding-left: ${t.listPaddingLeft}px; }`,
184
- `${n} li { margin: ${t.listItemMarginY}px 0; }`
183
+ ...i,
184
+ `${r} ul, ${r} ol { margin: ${n.listMarginY}px 0; ${a}: ${n.listPaddingLeft}px; }`,
185
+ `${r} li { margin: ${n.listItemMarginY}px 0; }`
185
186
  ].join("\n ");
186
187
  }
187
- function R(e) {
188
- return e ?? m.paragraphGap;
188
+ function z(e) {
189
+ return e ?? f.paragraphGap;
189
190
  }
190
191
  function ne(e) {
191
- let t = [m.paragraphGap], n = (e) => {
192
- if (e.type === "paragraph" && t.push(R(e.paragraphSpacing)), l(e)) for (let t of e.children) for (let e of t) n(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);
193
194
  };
194
195
  for (let t of e) n(t);
195
196
  return t;
@@ -197,8 +198,8 @@ function ne(e) {
197
198
  //#endregion
198
199
  //#region ../renderer/src/renderers/title.ts
199
200
  function re(e, t) {
200
- if (b(e)) return "";
201
- let n = N(e.styles.padding), r = P(e.styles.backgroundColor, "container"), i = ie(j(e.content)), a = f[e.level] ?? f[2], o = e.color ? `\n color="${k(e.color)}"` : "", s = e.textAlign, c = ae(e.fontFamily, t), l = x(e, [I, L(R(void 0))]), u = `h${f[e.level] ? e.level : 2}`;
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}`;
202
203
  return `<mj-text
203
204
  font-size="${a}px"${o}
204
205
  align="${s}"
@@ -216,23 +217,23 @@ function ae(e, t) {
216
217
  //#endregion
217
218
  //#region ../renderer/src/renderers/paragraph.ts
218
219
  function oe(e, t) {
219
- if (b(e) || e.content.replace(/<\/?p\b[^<>]*>/gi, "").trim() === "") return "";
220
- let n = N(e.styles.padding), r = P(e.styles.backgroundColor, "container"), i = j(e.content);
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))]);
221
222
  return `<mj-text
222
- line-height="1.5"
223
- padding="${n}"${r}${x(e, [I, L(R(e.paragraphSpacing))])}
223
+ line-height="1.5"${t.contentDirection === "rtl" ? "\n align=\"right\"" : ""}
224
+ padding="${n}"${r}${a}
224
225
  >${i}</mj-text>`;
225
226
  }
226
227
  //#endregion
227
228
  //#region ../renderer/src/renderers/image.ts
228
- function z(e, t) {
229
- if (b(e) || e.src === "") return "";
230
- let n = N(e.styles.padding), r = P(e.styles.backgroundColor, "container"), i = e.width === "full" ? t.containerWidth + "px" : e.width + "px", a = F(e.height), o = x(e), s = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", c = "";
231
- e.linkUrl && (c = ` href="${k(e.linkUrl)}"`, e.linkOpenInNewTab && (c += " target=\"_blank\" rel=\"noopener\""));
232
- let l = k(e.src), u = e.decorative === !0;
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;
233
234
  return `<mj-image
234
235
  src="${l}"
235
- alt="${u ? "" : k(e.alt)}"
236
+ alt="${u ? "" : A(e.alt)}"
236
237
  width="${i}"${a}
237
238
  align="${e.align}"
238
239
  padding="${n}"${r}${s}${c}${o}${u ? " role=\"presentation\"" : ""}
@@ -240,9 +241,9 @@ function z(e, t) {
240
241
  }
241
242
  //#endregion
242
243
  //#region ../renderer/src/renderers/button.ts
243
- function B(e, t) {
244
- if (b(e)) return "";
245
- let n = N(e.styles.padding), r = P(e.styles.backgroundColor, "container"), i = N(e.buttonPadding), a = e.url === "" ? "" : k(e.url), o = a === "" ? "" : ` href="${a}"`, s = k(e.backgroundColor), c = k(e.textColor), l = e.fontSize, u = e.borderRadius, d = O(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = V(e.fontFamily, t), m = H(e.width), h = x(e);
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);
246
247
  return `<mj-button${o}${f}
247
248
  background-color="${s}"
248
249
  color="${c}"
@@ -254,48 +255,48 @@ function B(e, t) {
254
255
  padding="${n}"${r}${p}${m}${h}
255
256
  >${d}</mj-button>`;
256
257
  }
257
- function V(e, t) {
258
+ function H(e, t) {
258
259
  return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
259
260
  }
260
- function H(e) {
261
+ function U(e) {
261
262
  return e === void 0 ? "" : ` width="${e === "full" ? "100%" : `${e}px`}"`;
262
263
  }
263
264
  //#endregion
264
265
  //#region ../renderer/src/renderers/divider.ts
265
- function U(e, t) {
266
- if (b(e)) return "";
267
- let n = N(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${k(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : e.width + "px";
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";
268
269
  return `<mj-divider
269
270
  border-width="${e.thickness}px"
270
271
  border-style="${e.lineStyle}"
271
- border-color="${k(e.color)}"
272
+ border-color="${A(e.color)}"
272
273
  width="${i}"
273
- padding="${n}"${r}${x(e)}
274
+ padding="${n}"${r}${S(e)}
274
275
  />`;
275
276
  }
276
277
  //#endregion
277
278
  //#region ../renderer/src/renderers/spacer.ts
278
- function W(e, t) {
279
- return b(e) ? "" : `<mj-spacer height="${e.height}px" padding="0"${e.styles.backgroundColor ? ` container-background-color="${k(e.styles.backgroundColor)}"` : ""}${x(e)} />`;
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
281
  }
281
282
  //#endregion
282
283
  //#region ../renderer/src/renderers/html.ts
283
- function G(e, t) {
284
- if (b(e) || !t.allowHtmlBlocks) return "";
284
+ function K(e, t) {
285
+ if (x(e) || !t.allowHtmlBlocks) return "";
285
286
  let n = e.content;
286
287
  if (n === "") return "";
287
- let r = x(e);
288
- return `<mj-text padding="${N(e.styles.padding)}"${P(e.styles.backgroundColor, "container")}${r}>
288
+ let r = S(e);
289
+ return `<mj-text padding="${P(e.styles.padding)}"${F(e.styles.backgroundColor, "container")}${r}>
289
290
  ${n}
290
291
  </mj-text>`;
291
292
  }
292
293
  //#endregion
293
294
  //#region ../renderer/src/renderers/social.ts
294
- function K(e, t) {
295
- if (b(e)) return "";
295
+ function q(e, t) {
296
+ if (x(e)) return "";
296
297
  let n = e.icons;
297
298
  if (n.length === 0) return "";
298
- let r = N(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${k(e.styles.backgroundColor)}"` : "", a = x(e), o = e.align, s = e.iconSize, c = e.iconStyle, l = e.spacing, u;
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;
299
300
  switch (s) {
300
301
  case "small":
301
302
  u = 24;
@@ -326,77 +327,77 @@ function K(e, t) {
326
327
  padding="${r}"${i}${a}
327
328
  >
328
329
  ${n.map((e, n) => {
329
- let r = e.platform, i = k(e.url), a = `${t.socialIconsBaseUrl}/${c}/${r}.png`, o = n === f - 1 ? 0 : l;
330
+ let r = e.platform, i = A(e.url), a = `${t.socialIconsBaseUrl}/${c}/${r}.png`, o = n === f - 1 ? 0 : l;
330
331
  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>`;
331
332
  }).join("\n")}
332
333
  </mj-social>`;
333
334
  }
334
335
  //#endregion
335
336
  //#region ../renderer/src/renderers/menu.ts
336
- function q(e, t) {
337
- if (b(e) || e.items.length === 0) return "";
338
- let n = N(e.styles.padding), r = P(e.styles.backgroundColor, "container"), i = x(e), a = le(e.fontFamily, t), o = e.textAlign;
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;
339
340
  return `<mj-text
340
- font-size="${e.fontSize}px"${e.color ? `\n color="${k(e.color)}"` : ""}
341
+ font-size="${e.fontSize}px"${e.color ? `\n color="${A(e.color)}"` : ""}
341
342
  align="${o}"
342
343
  line-height="1.5"
343
344
  padding="${n}"${r}${a}${i}
344
- >${se(e)}</mj-text>`;
345
+ >${ce(e)}</mj-text>`;
345
346
  }
346
- function se(e) {
347
- let t = e.items, n = O(e.separator), r = A(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
348
- for (let e = 0; e < s; e++) o.push(ce(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${i}px;">${n}</span>`);
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>`);
349
350
  return o.join("");
350
351
  }
351
- function ce(e, t) {
352
- let n = O(e.text), r = k(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
353
- return i && o.unshift(`color: ${A(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
354
- }
355
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>`;
355
+ }
356
+ function ue(e, t) {
356
357
  return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
357
358
  }
358
359
  //#endregion
359
360
  //#region ../renderer/src/renderers/table.ts
360
- function ue(e, t) {
361
- if (b(e) || e.rows.length === 0) return "";
362
- let n = N(e.styles.padding), r = P(e.styles.backgroundColor, "container"), i = x(e), a = me(e.fontFamily, t);
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);
363
364
  return `<mj-text
364
- font-size="${e.fontSize}px"${e.color ? `\n color="${k(e.color)}"` : ""}
365
+ font-size="${e.fontSize}px"${e.color ? `\n color="${A(e.color)}"` : ""}
365
366
  align="${e.textAlign}"
366
367
  line-height="1.5"
367
368
  padding="${n}"${r}${a}${i}
368
- >${de(e)}</mj-text>`;
369
+ >${fe(e)}</mj-text>`;
369
370
  }
370
- function de(e) {
371
- let t = A(e.borderColor), n = e.borderWidth, r = "";
371
+ function fe(e) {
372
+ let t = j(e.borderColor), n = e.borderWidth, r = "";
372
373
  for (let i = 0; i < e.rows.length; i++) {
373
374
  let a = e.rows[i];
374
- r += fe(a, e, e.hasHeaderRow && i === 0, t, n);
375
+ r += pe(a, e, e.hasHeaderRow && i === 0, t, n);
375
376
  }
376
377
  return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
377
378
  }
378
- function fe(e, t, n, r, i) {
379
+ function pe(e, t, n, r, i) {
379
380
  let a = "";
380
- for (let o of e.cells) a += pe(o, t, n, r, i);
381
+ for (let o of e.cells) a += me(o, t, n, r, i);
381
382
  return `<tr>${a}</tr>`;
382
383
  }
383
- function pe(e, t, n, r, i) {
384
+ function me(e, t, n, r, i) {
384
385
  let a = t.cellPadding, o = [`border: ${i}px solid ${r}`, `padding: ${a}px`];
385
- n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${A(t.headerBackgroundColor)}`));
386
- let s = o.join("; "), c = O(j(e.content)), l = n ? "th" : "td";
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
388
  return `<${l} style="${s}">${c}</${l}>`;
388
389
  }
389
- function me(e, t) {
390
+ function he(e, t) {
390
391
  return e ? ` font-family="${t.resolveFontFamily(e)}"` : "";
391
392
  }
392
393
  //#endregion
393
394
  //#region ../renderer/src/renderers/custom.ts
394
- function he(e, t) {
395
- if (b(e)) return "";
395
+ function ge(e, t) {
396
+ if (x(e)) return "";
396
397
  let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
397
398
  if (!n || n === "") return "";
398
- let r = x(e);
399
- return `<mj-text padding="${N(e.styles.padding)}"${P(e.styles.backgroundColor, "container")}${r}>
399
+ let r = S(e);
400
+ return `<mj-text padding="${P(e.styles.padding)}"${F(e.styles.backgroundColor, "container")}${r}>
400
401
  ${n}
401
402
  </mj-text>`;
402
403
  }
@@ -439,28 +440,28 @@ function X(e, t) {
439
440
  }
440
441
  //#endregion
441
442
  //#region ../renderer/src/renderers/section.ts
442
- function ge(e, t, n) {
443
- if (b(e)) return "";
444
- let r = e.columns, i = J(r), a = Y(r, t.containerWidth), o = N(e.styles.padding), s = P(e.styles.backgroundColor, "native"), c = x(e), u = e.borderRadius && e.borderRadius > 0 ? ` border-radius="${e.borderRadius}px"` : "", d = e.children, f = [];
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 = [];
445
446
  for (let e = 0; e < d.length; e++) {
446
- let r = d[e], o = i[e] ?? "100%", s = Math.floor(a[e] ?? t.containerWidth), c = _e(r, t.allowHtmlBlocks).filter((e) => !l(e)), u = t.withContainerWidth(s), p = c.map((e) => X(e, n(e, u))).filter((e) => e !== "").join("\n");
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");
447
448
  f.push(`<mj-column width="${o}">
448
449
  ${p === "" ? "<mj-text>&nbsp;</mj-text>" : p}
449
450
  </mj-column>`);
450
451
  }
451
- let p = f.join("\n");
452
- return `<mj-section${s} padding="${o}"${u}${c}>
453
- ${e.stackOnMobile === !1 && f.length > 1 ? `<mj-group>
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}>
454
455
  ${p}
455
456
  </mj-group>` : p}
456
457
  </mj-section>`;
457
458
  }
458
- function _e(e, t) {
459
+ function ve(e, t) {
459
460
  return t ? e : e.filter((e) => e.type !== "html");
460
461
  }
461
462
  //#endregion
462
463
  //#region ../renderer/src/renderers/video.ts
463
- function ve(e, t) {
464
+ function ye(e, t) {
464
465
  if (t) return t;
465
466
  if (!e) return null;
466
467
  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})/]) {
@@ -470,93 +471,93 @@ function ve(e, t) {
470
471
  let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
471
472
  return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
472
473
  }
473
- function ye(e, t) {
474
- if (b(e)) return "";
475
- let n = ve(e.url, e.thumbnailUrl);
474
+ function be(e, t) {
475
+ if (x(e)) return "";
476
+ let n = ye(e.url, e.thumbnailUrl);
476
477
  if (!n) return "";
477
- let r = N(e.styles.padding), i = P(e.styles.backgroundColor, "container"), a = e.width === "full" ? t.containerWidth + "px" : e.width + "px", o = F(e.height), s = x(e);
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);
478
479
  return `<mj-image
479
- src="${k(n)}"
480
- alt="${k(e.alt)}"
480
+ src="${A(n)}"
481
+ alt="${A(e.alt)}"
481
482
  width="${a}"${o}
482
483
  align="${e.align}"
483
484
  padding="${r}"
484
- href="${k(e.url)}"
485
+ href="${A(e.url)}"
485
486
  target="_blank"
486
487
  rel="noopener"${i}${s}
487
488
  />`;
488
489
  }
489
490
  //#endregion
490
491
  //#region ../renderer/src/renderers/index.ts
491
- function Z(f, m) {
492
- let h = m.blockRenderers[f.type];
493
- return h ? h(f, m) : l(f) ? ge(f, m, Z) : e(f) ? re(f, m) : r(f) ? oe(f, m) : i(f) ? z(f, m) : n(f) ? B(f, m) : s(f) ? U(f, m) : u(f) ? W(f, m) : t(f) ? G(f, m) : c(f) ? K(f, m) : p(f) ? q(f, m) : a(f) ? ue(f, m) : d(f) ? ye(f, m) : o(f) ? he(f, m) : b(f) ? "" : T(f);
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);
494
495
  }
495
496
  //#endregion
496
497
  //#region ../renderer/src/index.ts
497
- async function be(e, t) {
498
- let n = t?.customFonts ?? [], r = t?.defaultFallbackFont ?? "Arial, sans-serif", i = t?.allowHtmlBlocks ?? !0, a = Ce(t?.socialIconsBaseUrl ?? _), o = await De(e, t?.renderCustomBlock), s = Oe(e, t?.getCustomBlockStylesheet), c = new y(e.settings.width, n, r, i, o, a, t?.blockRenderers ?? {}), l = Ee(e.blocks, i), u = c.resolveFontFamily(e.settings.fontFamily), d = e.settings.backgroundColor, f = e.settings.textColor ? ` color="${k(e.settings.textColor)}"` : "", p = e.settings.linkColor ? A(e.settings.linkColor) : "inherit", m = e.settings.linkUnderline ? "underline" : "none", h = l.map((e) => xe(e, c)).filter((e) => e !== "").join("\n"), g = Te(n), v = we(e.settings.preheaderText);
499
- return `<mjml lang="${k(e.settings.locale)}">
500
- <mj-head>${v}
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}
501
502
  <mj-attributes>
502
- <mj-all font-family="${u}" />
503
- <mj-text font-size="14px"${f} />
503
+ <mj-all font-family="${f}" />
504
+ <mj-text font-size="14px"${m} />
504
505
  <mj-section padding="0" />
505
506
  <mj-column padding="0" />
506
507
  <mj-image fluid-on-mobile="true" />
507
- </mj-attributes>${g}
508
+ </mj-attributes>${y}
508
509
  <mj-style inline="inline">
509
- ${te(ne(l))}
510
+ ${te(ne(d), l)}
510
511
  </mj-style>
511
512
  <mj-style>
512
- a { color: ${p}; text-decoration: ${m}; }
513
+ a { color: ${h}; text-decoration: ${g}; }
513
514
  @media only screen and (max-width: 480px) {
514
515
  .tpl-hide-mobile { display: none !important; mso-hide: all !important; }
515
516
  }
516
517
  @media only screen and (min-width: 481px) {
517
518
  .tpl-hide-desktop { display: none !important; mso-hide: all !important; }
518
519
  }
519
- </mj-style>${ke(s)}
520
+ </mj-style>${Ae(c)}
520
521
  </mj-head>
521
- <mj-body width="${c.containerWidth}px" background-color="${d}">
522
- ${h}
522
+ <mj-body width="${u.containerWidth}px" background-color="${p}">
523
+ ${_}
523
524
  </mj-body>
524
525
  </mjml>`;
525
526
  }
526
- function xe(e, t) {
527
- if (l(e)) {
527
+ function Q(e, t) {
528
+ if (c(e)) {
528
529
  let n = Z(e, t);
529
- return X(e, e.wrapper && n !== "" ? Q(n, e.wrapper) : n);
530
+ return X(e, e.wrapper && n !== "" ? Se(n, e.wrapper) : n);
530
531
  }
531
- return X(e, Se(Z(e, t)));
532
+ return X(e, Ce(Z(e, t), t.contentDirection));
532
533
  }
533
- function Q(e, t) {
534
- return `<mj-wrapper${P(t.backgroundColor, "native")}${` padding="${t.padding ? N(t.padding) : "0"}"`}${t.borderRadius && t.borderRadius > 0 ? ` border-radius="${t.borderRadius}px"` : ""}>
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"` : ""}>
535
536
  ${e}
536
537
  </mj-wrapper>`;
537
538
  }
538
- function Se(e) {
539
- return e === "" ? "" : `<mj-section>
539
+ function Ce(e, t) {
540
+ return e === "" ? "" : `<mj-section${t === "rtl" ? " direction=\"rtl\"" : ""}>
540
541
  <mj-column>
541
542
  ${e}
542
543
  </mj-column>
543
544
  </mj-section>`;
544
545
  }
545
- function Ce(e) {
546
+ function we(e) {
546
547
  return e.endsWith("/") ? e.slice(0, -1) : e;
547
548
  }
548
- function we(e) {
549
+ function Te(e) {
549
550
  if (!e) return "";
550
551
  let t = e.trim();
551
- return t === "" ? "" : `\n <mj-preview>${O(t)}</mj-preview>`;
552
+ return t === "" ? "" : `\n <mj-preview>${k(t)}</mj-preview>`;
552
553
  }
553
- function Te(e) {
554
- return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${k(e.name)}" href="${k(e.url)}" />`).join("");
554
+ function Ee(e) {
555
+ return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${A(e.name)}" href="${A(e.url)}" />`).join("");
555
556
  }
556
- function Ee(e, t) {
557
+ function De(e, t) {
557
558
  return t ? e : e.filter((e) => e.type !== "html");
558
559
  }
559
- async function De(e, t) {
560
+ async function Oe(e, t) {
560
561
  let n = /* @__PURE__ */ new Map();
561
562
  if (!t) return n;
562
563
  let r = [];
@@ -567,14 +568,14 @@ async function De(e, t) {
567
568
  }
568
569
  function $(e, t) {
569
570
  for (let n of e) {
570
- if (o(n)) {
571
+ if (s(n)) {
571
572
  t.push(n);
572
573
  continue;
573
574
  }
574
- if (l(n)) for (let e of n.children) $(e, t);
575
+ if (c(n)) for (let e of n.children) $(e, t);
575
576
  }
576
577
  }
577
- function Oe(e, t) {
578
+ function ke(e, t) {
578
579
  if (!t) return [];
579
580
  let n = [];
580
581
  if ($(e.blocks, n), n.length === 0) return [];
@@ -589,10 +590,10 @@ function Oe(e, t) {
589
590
  }
590
591
  return a;
591
592
  }
592
- function ke(e) {
593
+ function Ae(e) {
593
594
  return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e}\n </mj-style>`).join("");
594
595
  }
595
596
  //#endregion
596
- export { _ as DEFAULT_SOCIAL_ICONS_BASE_URL, I as RICH_TEXT_CSS_CLASS, y as RenderContext, C as UNRENDERABLE_MARKER_PREFIX, j as convertMergeTagsToValues, k as escapeAttr, O as escapeHtml, x as getCssClassAttr, S as getCssClasses, J as getWidthPercentages, Y as getWidthPixels, b as isHiddenOnAll, Z as renderBlock, be as renderToMjml, T as renderUnrenderableBlock, R as resolveParagraphGap, L as richTextGapClass, N as toPaddingString };
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 };
597
598
 
598
- //# sourceMappingURL=src-CX_VHu8r.js.map
599
+ //# sourceMappingURL=src-BC-eolWY.js.map