@templatical/editor 0.54.2 → 0.56.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 (281) hide show
  1. package/dist/{AiAltTextPopover-BBKVJ6HA.js → AiAltTextPopover-DdsvhE78.js} +4 -4
  2. package/dist/{AiAltTextReview-BuVbeQh-.js → AiAltTextReview-P6to1_0t.js} +3 -3
  3. package/dist/{AiChatPanel-C8SeEJRP.js → AiChatPanel-BSlmzMRC.js} +10 -10
  4. package/dist/{AiPanels-CR6zphjP.js → AiPanels-DAsnX-a3.js} +1 -1
  5. package/dist/{AiRewriteMenu-ZpYJfm-O.js → AiRewriteMenu-DIISOR6U.js} +11 -11
  6. package/dist/{BlockIssueBadge-DaPTq1RE.js → BlockIssueBadge-Bmtc50BQ.js} +4 -4
  7. package/dist/BlockPreviewCanvas-BYIzNn-9.js +154 -0
  8. package/dist/{CloudHeaderExtras-XpjJjn3o.js → CloudHeaderExtras-Cqhw-jMz.js} +1 -1
  9. package/dist/{CloudPanels-DQRWMc59.js → CloudPanels-w34W8_BP.js} +4 -4
  10. package/dist/{CollaborationNotices-Cnx0XHzZ.js → CollaborationNotices-HTbCebjV.js} +2 -2
  11. package/dist/{CollaboratorBar-BaBoNhwB.js → CollaboratorBar-CLQjksX-.js} +2 -2
  12. package/dist/{CommentsPanel-Ck3QmqiC.js → CommentsPanel-C5qG17Ki.js} +1 -1
  13. package/dist/{CommentsSidebar-CHknhOar.js → CommentsSidebar-C7CWcUYZ.js} +12 -12
  14. package/dist/{CountdownBlock-BMezkFbJ.js → CountdownBlock-BTXcCvjZ.js} +2 -2
  15. package/dist/{CountdownToolbar-DTpMEDyh.js → CountdownToolbar-CP-pkntQ.js} +5 -5
  16. package/dist/{IssuesPanel-BZn7-p9e.js → IssuesPanel-CiiNBzH0.js} +12 -12
  17. package/dist/{LanguageMenu-OOmQWVzO.js → LanguageMenu-B981Av-6.js} +15 -15
  18. package/dist/{LocaleNotices-WzsYtBRs.js → LocaleNotices-CTCZ7BYv.js} +4 -4
  19. package/dist/{LogicTagInsertButton-XESwnJia.js → LogicTagInsertButton-DEOPc4RC.js} +284 -279
  20. package/dist/{MediaEditModal-C3U9Mi31.js → MediaEditModal-DJsPLTwP.js} +1 -1
  21. package/dist/{MediaPanels-CGmk9ufe.js → MediaPanels-D2WD2aE2.js} +1 -1
  22. package/dist/{MergeTagInput-CAsBRoSm.js → MergeTagInput-C9icdxw7.js} +1 -1
  23. package/dist/{MergeTagModeToggle-bOf27Hg1.js → MergeTagModeToggle-DXvb80OE.js} +6 -6
  24. package/dist/{MergeTagTextarea-DH_6JFui.js → MergeTagTextarea-CrAcmT3A.js} +5 -5
  25. package/dist/{ParagraphEditor-XGUkV5Uw.js → ParagraphEditor-BWBQ3jKz.js} +55 -55
  26. package/dist/{RestoreVersionDialog-C72kWccI.js → RestoreVersionDialog-CqAp16yQ.js} +4 -4
  27. package/dist/{RichTextEditorContent-BZN8KRvR.js → RichTextEditorContent-xbBjVPVQ.js} +8 -8
  28. package/dist/{SaveBlockDialog-CKOnTMTU.js → SaveBlockDialog-pebNJBTc.js} +9 -9
  29. package/dist/{SavedBlocksBrowserModal-BrlNxqDH.js → SavedBlocksBrowserModal-CvagMcv7.js} +11 -11
  30. package/dist/{SavedBlocksPanels--lPR6gdh.js → SavedBlocksPanels-B9AAVBDm.js} +1 -1
  31. package/dist/{SavedBlocksPickBar-4ON4_KKl.js → SavedBlocksPickBar-BIANWe3i.js} +3 -3
  32. package/dist/{TemplateSettings-BE0jZmRJ.js → TemplateSettings-ORq4PbCN.js} +12 -12
  33. package/dist/{TestEmailModal-BKmNGrZN.js → TestEmailModal-DRjCpcPl.js} +11 -11
  34. package/dist/{TestEmailPanel-DT1wllX3.js → TestEmailPanel-H0v8El__.js} +1 -1
  35. package/dist/{TitleEditor-HjVZuUTB.js → TitleEditor-CEGbJXeU.js} +11 -11
  36. package/dist/{Toolbar-BppchV2k.js → Toolbar-XT-uGA9J.js} +1134 -852
  37. package/dist/{TplModal-BFWOoK8l.js → TplModal-7NQq5-VW.js} +4 -4
  38. package/dist/{VersionHistoryMenu-BnP0EyLl.js → VersionHistoryMenu-C8BE3Pr-.js} +7 -7
  39. package/dist/{VersionHistoryPanels-D4yNVLvq.js → VersionHistoryPanels-CuKuOSJG.js} +1 -1
  40. package/dist/{VersionPreviewBanner-BPP939cD.js → VersionPreviewBanner-BVFBkveR.js} +2 -2
  41. package/dist/WrapperBlock-Bdw-072t.js +56 -0
  42. package/dist/{blockTypeIcons-D91v9k0x.js → blockTypeIcons-CGplGmmr.js} +3 -3
  43. package/dist/bundle-stats.json +6 -6
  44. package/dist/{ca-DOuIxWRv.js → ca-BJn8lcJx.js} +18 -1
  45. package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js → AiAltTextPopover-x999Gimz.js} +5 -5
  46. package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js.map → AiAltTextPopover-x999Gimz.js.map} +1 -1
  47. package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js → AiAltTextReview-DjnFz1wO.js} +4 -4
  48. package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js.map → AiAltTextReview-DjnFz1wO.js.map} +1 -1
  49. package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js → AiChatPanel-DKDu9cs7.js} +4 -4
  50. package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js.map → AiChatPanel-DKDu9cs7.js.map} +1 -1
  51. package/dist/cdn/chunks/{AiPanels-BblCSkQy.js → AiPanels-jMLVaiKx.js} +2 -2
  52. package/dist/cdn/chunks/{AiPanels-BblCSkQy.js.map → AiPanels-jMLVaiKx.js.map} +1 -1
  53. package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js → AiRewriteMenu-s79rmHFy.js} +10 -10
  54. package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js.map → AiRewriteMenu-s79rmHFy.js.map} +1 -1
  55. package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js → BlockIssueBadge-Bnmq_M4G.js} +4 -4
  56. package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js.map → BlockIssueBadge-Bnmq_M4G.js.map} +1 -1
  57. package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js → BlockPreviewCanvas-B3HkuENF.js} +46 -32
  58. package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js.map +1 -0
  59. package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js → CloudHeaderExtras-uUJYJFJ6.js} +2 -2
  60. package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js.map → CloudHeaderExtras-uUJYJFJ6.js.map} +1 -1
  61. package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js → CloudPanels-DQnlH_YJ.js} +4 -4
  62. package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js.map → CloudPanels-DQnlH_YJ.js.map} +1 -1
  63. package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js → CollaborationNotices-CHqUGhOZ.js} +3 -3
  64. package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js.map → CollaborationNotices-CHqUGhOZ.js.map} +1 -1
  65. package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js → CollaboratorBar-C1ZI2xwa.js} +3 -3
  66. package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js.map → CollaboratorBar-C1ZI2xwa.js.map} +1 -1
  67. package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js → CommentsPanel-EtdTzTmq.js} +2 -2
  68. package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js.map → CommentsPanel-EtdTzTmq.js.map} +1 -1
  69. package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js → CommentsSidebar-Qmj049QX.js} +4 -4
  70. package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js.map → CommentsSidebar-Qmj049QX.js.map} +1 -1
  71. package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js → CountdownBlock-DyGsh92b.js} +3 -3
  72. package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js.map → CountdownBlock-DyGsh92b.js.map} +1 -1
  73. package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js → CountdownToolbar-Ddj2erNm.js} +6 -6
  74. package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js.map → CountdownToolbar-Ddj2erNm.js.map} +1 -1
  75. package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js → IssuesPanel-DnSnEh1X.js} +8 -8
  76. package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js.map → IssuesPanel-DnSnEh1X.js.map} +1 -1
  77. package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js → LanguageMenu-C2I_yTL5.js} +110 -110
  78. package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js.map → LanguageMenu-C2I_yTL5.js.map} +1 -1
  79. package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js → LocaleNotices-Dr9LRCAg.js} +4 -4
  80. package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js.map → LocaleNotices-Dr9LRCAg.js.map} +1 -1
  81. package/dist/cdn/chunks/{LogicTagInsertButton-PDKuo2J3.js → LogicTagInsertButton-BdzE9-l7.js} +260 -255
  82. package/dist/cdn/chunks/LogicTagInsertButton-BdzE9-l7.js.map +1 -0
  83. package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js → MediaEditModal-CMJFXu_o.js} +2 -2
  84. package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js.map → MediaEditModal-CMJFXu_o.js.map} +1 -1
  85. package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js → MediaPanels-C790ZXuY.js} +2 -2
  86. package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js.map → MediaPanels-C790ZXuY.js.map} +1 -1
  87. package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js → MergeTagInput-CmrX8Md6.js} +2 -2
  88. package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js.map → MergeTagInput-CmrX8Md6.js.map} +1 -1
  89. package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js → MergeTagModeToggle-D7maMGIM.js} +5 -5
  90. package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js.map → MergeTagModeToggle-D7maMGIM.js.map} +1 -1
  91. package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js → MergeTagTextarea-KOnd2teB.js} +8 -8
  92. package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js.map → MergeTagTextarea-KOnd2teB.js.map} +1 -1
  93. package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js → ParagraphEditor-I9lbKaPk.js} +19 -19
  94. package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js.map → ParagraphEditor-I9lbKaPk.js.map} +1 -1
  95. package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js → RestoreVersionDialog-DqbULAbc.js} +4 -4
  96. package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js.map → RestoreVersionDialog-DqbULAbc.js.map} +1 -1
  97. package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js → RichTextEditorContent-_O22z0pn.js} +8 -8
  98. package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js.map → RichTextEditorContent-_O22z0pn.js.map} +1 -1
  99. package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js → SaveBlockDialog-CClRLXgF.js} +8 -8
  100. package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js.map → SaveBlockDialog-CClRLXgF.js.map} +1 -1
  101. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js → SavedBlocksBrowserModal-BIaxaxw9.js} +8 -8
  102. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js.map → SavedBlocksBrowserModal-BIaxaxw9.js.map} +1 -1
  103. package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js → SavedBlocksPanels-Dfu9N6YW.js} +2 -2
  104. package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js.map → SavedBlocksPanels-Dfu9N6YW.js.map} +1 -1
  105. package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js → SavedBlocksPickBar-DiMW_dbJ.js} +4 -4
  106. package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js.map → SavedBlocksPickBar-DiMW_dbJ.js.map} +1 -1
  107. package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js → TemplateSettings-JMUo0LIV.js} +10 -10
  108. package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js.map → TemplateSettings-JMUo0LIV.js.map} +1 -1
  109. package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js → TestEmailModal-D52VtwBZ.js} +12 -12
  110. package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js.map → TestEmailModal-D52VtwBZ.js.map} +1 -1
  111. package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js → TestEmailPanel-D9ezVDHd.js} +2 -2
  112. package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js.map → TestEmailPanel-D9ezVDHd.js.map} +1 -1
  113. package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js → TitleEditor-D04vvbUc.js} +9 -9
  114. package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js.map → TitleEditor-D04vvbUc.js.map} +1 -1
  115. package/dist/cdn/chunks/{Toolbar-Cv6Rv1S-.js → Toolbar-C_Hfsher.js} +1196 -914
  116. package/dist/cdn/chunks/Toolbar-C_Hfsher.js.map +1 -0
  117. package/dist/cdn/chunks/{TplModal-DGpGdwgf.js → TplModal-d6fEZGJ5.js} +5 -5
  118. package/dist/cdn/chunks/{TplModal-DGpGdwgf.js.map → TplModal-d6fEZGJ5.js.map} +1 -1
  119. package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js → VersionHistoryMenu-C8ucm43v.js} +7 -7
  120. package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js.map → VersionHistoryMenu-C8ucm43v.js.map} +1 -1
  121. package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js → VersionHistoryPanels-BAdzmhvH.js} +2 -2
  122. package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js.map → VersionHistoryPanels-BAdzmhvH.js.map} +1 -1
  123. package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js → VersionPreviewBanner-BWuovbFc.js} +3 -3
  124. package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js.map → VersionPreviewBanner-BWuovbFc.js.map} +1 -1
  125. package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js +58 -0
  126. package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js.map +1 -0
  127. package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js → blockTypeIcons-CzYA5DF9.js} +2 -2
  128. package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js.map → blockTypeIcons-CzYA5DF9.js.map} +1 -1
  129. package/dist/cdn/chunks/{ca-DOuIxWRv.js → ca-BJn8lcJx.js} +19 -2
  130. package/dist/cdn/chunks/ca-BJn8lcJx.js.map +1 -0
  131. package/dist/cdn/chunks/{composables-BxikPuC1.js → composables-CsfQlmcf.js} +676 -620
  132. package/dist/cdn/chunks/composables-CsfQlmcf.js.map +1 -0
  133. package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js → createCloudRuntime-PpIFCDfj.js} +4 -4
  134. package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js.map → createCloudRuntime-PpIFCDfj.js.map} +1 -1
  135. package/dist/{de-DaOUfYBX.js → cdn/chunks/de-BLFp3nWx.js} +20 -1
  136. package/dist/cdn/chunks/de-BLFp3nWx.js.map +1 -0
  137. package/dist/cdn/chunks/{editor-modal-erQEOHZN.js → editor-modal-B8UE9V8B.js} +90 -90
  138. package/dist/cdn/chunks/{editor-modal-erQEOHZN.js.map → editor-modal-B8UE9V8B.js.map} +1 -1
  139. package/dist/cdn/chunks/en-CVxNoHww.js +1 -0
  140. package/dist/cdn/chunks/{en-C0pHHMiR.js → en-DGGQJGbm.js} +19 -2
  141. package/dist/cdn/chunks/en-DGGQJGbm.js.map +1 -0
  142. package/dist/{es-CxyEKr6n.js → cdn/chunks/es-DTY9qgLv.js} +20 -1
  143. package/dist/cdn/chunks/es-DTY9qgLv.js.map +1 -0
  144. package/dist/cdn/chunks/{extensions-DuDWpKo7.js → extensions-BM6ZSnsQ.js} +82 -76
  145. package/dist/cdn/chunks/extensions-BM6ZSnsQ.js.map +1 -0
  146. package/dist/{fr-CYbamiI6.js → cdn/chunks/fr-L4FqO9Gp.js} +20 -1
  147. package/dist/cdn/chunks/fr-L4FqO9Gp.js.map +1 -0
  148. package/dist/cdn/chunks/{icons-Da9GKjPx.js → icons-DHExFLlT.js} +43 -43
  149. package/dist/cdn/chunks/{icons-Da9GKjPx.js.map → icons-DHExFLlT.js.map} +1 -1
  150. package/dist/cdn/chunks/{ja-DfaIAoGI.js → ja-6uOXkh4v.js} +19 -2
  151. package/dist/cdn/chunks/ja-6uOXkh4v.js.map +1 -0
  152. package/dist/cdn/chunks/{keys-CoQtCqNv.js → keys-BUmIvYy3.js} +4 -4
  153. package/dist/cdn/chunks/keys-BUmIvYy3.js.map +1 -0
  154. package/dist/cdn/chunks/{nl-DkrB-VKZ.js → nl-DCxuxwNq.js} +19 -2
  155. package/dist/cdn/chunks/nl-DCxuxwNq.js.map +1 -0
  156. package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js +300 -0
  157. package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js.map +1 -0
  158. package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js → preRenderCustomBlocks-Dn6dFUwx.js} +2 -2
  159. package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js.map → preRenderCustomBlocks-Dn6dFUwx.js.map} +1 -1
  160. package/dist/cdn/chunks/{pt-BR-CY5Ye7eP.js → pt-BR-CBkcrebr.js} +19 -2
  161. package/dist/cdn/chunks/pt-BR-CBkcrebr.js.map +1 -0
  162. package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js → sanitizeHtml-DJI7vvET.js} +3 -3
  163. package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js.map → sanitizeHtml-DJI7vvET.js.map} +1 -1
  164. package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js → socialIcons-Qw9rHc8C.js} +420 -406
  165. package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js.map → socialIcons-Qw9rHc8C.js.map} +1 -1
  166. package/dist/cdn/chunks/src-Bfj1jHnn.js +710 -0
  167. package/dist/cdn/chunks/src-Bfj1jHnn.js.map +1 -0
  168. package/dist/cdn/chunks/{src-712f3ofG.js → src-C9JWWxAk.js} +683 -568
  169. package/dist/cdn/chunks/src-C9JWWxAk.js.map +1 -0
  170. package/dist/cdn/chunks/{src-ZFw5fg_z.js → src-mXG-Of9A.js} +892 -735
  171. package/dist/cdn/chunks/src-mXG-Of9A.js.map +1 -0
  172. package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js → useCloudI18n-Xsih9yRH.js} +2 -2
  173. package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js.map → useCloudI18n-Xsih9yRH.js.map} +1 -1
  174. package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js → useEditorRoot-Beau2Z_T.js} +2 -2
  175. package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js.map → useEditorRoot-Beau2Z_T.js.map} +1 -1
  176. package/dist/cdn/chunks/{useI18n-BnJYydPv.js → useI18n-D8s7HtTn.js} +2 -2
  177. package/dist/cdn/chunks/{useI18n-BnJYydPv.js.map → useI18n-D8s7HtTn.js.map} +1 -1
  178. package/dist/cdn/chunks/useLocalizedDisplay-Bgg4qpev.js +33 -0
  179. package/dist/cdn/chunks/{useLocalizedDisplay-DiNjT22M.js.map → useLocalizedDisplay-Bgg4qpev.js.map} +1 -1
  180. package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js → useLogicTag-DLvWzWsp.js} +4 -4
  181. package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js.map → useLogicTag-DLvWzWsp.js.map} +1 -1
  182. package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js → useMergeTag-B4FHCGGm.js} +6 -6
  183. package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js.map → useMergeTag-B4FHCGGm.js.map} +1 -1
  184. package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js → usePopoverPosition-esO6wjvU.js} +5 -5
  185. package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js.map → usePopoverPosition-esO6wjvU.js.map} +1 -1
  186. package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js → useScrollToBlock-CJuUu7Xj.js} +2 -2
  187. package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js.map → useScrollToBlock-CJuUu7Xj.js.map} +1 -1
  188. package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js → withCurrentFont-QqBilClC.js} +2 -2
  189. package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js.map → withCurrentFont-QqBilClC.js.map} +1 -1
  190. package/dist/cdn/editor.css +1 -1
  191. package/dist/cdn/editor.js +761 -764
  192. package/dist/cdn/editor.js.map +1 -1
  193. package/dist/{check-XMnOOIEC.js → check-CcuCoJDh.js} +1 -1
  194. package/dist/{chevron-down-DmamTEWQ.js → chevron-down-BfYIbFbC.js} +1 -1
  195. package/dist/{chevron-right-BEFXOH27.js → chevron-right-DyjFqY35.js} +1 -1
  196. package/dist/{chevron-up-Dw7woXj8.js → chevron-up-BHEIxuS-.js} +1 -1
  197. package/dist/{circle-alert-BTKC9vkq.js → circle-alert-Tq7kAh9S.js} +1 -1
  198. package/dist/{clock-BVT5u2uG.js → clock-Df0ZiXwQ.js} +1 -1
  199. package/dist/{composables-BbPFRlBf.js → composables-CRX6rncm.js} +1044 -988
  200. package/dist/{createCloudRuntime-Dlrg88gS.js → createCloudRuntime-DplyIlsy.js} +3 -3
  201. package/dist/{createLucideIcon-CgDE3xAR.js → createLucideIcon-CfBdtoUw.js} +5 -5
  202. package/dist/{cdn/chunks/de-DaOUfYBX.js → de-BLFp3nWx.js} +18 -3
  203. package/dist/{dist-C34cYI5S.js → dist-BMUUt3zJ.js} +964 -807
  204. package/dist/{editor-modal-BeX6otLk.js → editor-modal-D9HT9bD6.js} +15 -15
  205. package/dist/{en-C0pHHMiR.js → en-DGGQJGbm.js} +18 -1
  206. package/dist/en-De3uAutQ.js +1 -0
  207. package/dist/{cdn/chunks/es-CxyEKr6n.js → es-DTY9qgLv.js} +18 -3
  208. package/dist/{extensions-xCiyqSg7.js → extensions-Cm6K4SRX.js} +344 -338
  209. package/dist/{eye-ByMgHeA_.js → eye-B3psrAqd.js} +1 -1
  210. package/dist/{cdn/chunks/fr-CYbamiI6.js → fr-L4FqO9Gp.js} +18 -3
  211. package/dist/{image-Ch8tR35K.js → image-C3yuPDxx.js} +1 -1
  212. package/dist/index.d.ts +74 -13
  213. package/dist/{info-DzSD-Wpk.js → info-DKja7A68.js} +1 -1
  214. package/dist/{ja-DfaIAoGI.js → ja-6uOXkh4v.js} +18 -1
  215. package/dist/{keys-BCqskl51.js → keys-w_VRjoMu.js} +3 -3
  216. package/dist/{link-oDn9AR2w.js → link-DhzPI4Hn.js} +1 -1
  217. package/dist/{list-C5t07dp8.js → list-DVGn7Ik2.js} +1 -1
  218. package/dist/{loader-circle-k6xvKgUB.js → loader-circle-DqKWsMHO.js} +1 -1
  219. package/dist/{message-circle-C23R6OJR.js → message-circle-C4TonoBs.js} +1 -1
  220. package/dist/{nl-DkrB-VKZ.js → nl-DCxuxwNq.js} +18 -1
  221. package/dist/normalizeMergeTagMarkup-Da9JAgx7.js +298 -0
  222. package/dist/{package-C90eQ7NU.js → package-9OkiEO4S.js} +1 -1
  223. package/dist/{pencil-BK7GrQuA.js → pencil-M9vkOB7C.js} +1 -1
  224. package/dist/{plus-Cr0Mis63.js → plus-DxZiv9YC.js} +1 -1
  225. package/dist/{preRenderCustomBlocks-DvbRa3L3.js → preRenderCustomBlocks-CdqSp2P7.js} +4 -4
  226. package/dist/{pt-BR-CY5Ye7eP.js → pt-BR-CBkcrebr.js} +18 -1
  227. package/dist/{refresh-cw-_ZLOIEvA.js → refresh-cw-UY8_sdFG.js} +1 -1
  228. package/dist/{rotate-ccw-CB5wsHwv.js → rotate-ccw-BFTGCpHn.js} +1 -1
  229. package/dist/{sanitizeHtml-D_ab7dD6.js → sanitizeHtml-wBibnBF4.js} +6 -6
  230. package/dist/{search-BmrQNox8.js → search-RuGJnMEn.js} +1 -1
  231. package/dist/{send-blAsIBBg.js → send-DGB1ar02.js} +1 -1
  232. package/dist/{smartphone-BPpWYrwV.js → smartphone-CVA29CU_.js} +1 -1
  233. package/dist/{socialIcons-DhAolBjt.js → socialIcons-CJD6OsI7.js} +283 -269
  234. package/dist/{sparkles-OqIxrNp-.js → sparkles-IHfEwEcd.js} +1 -1
  235. package/dist/{square-BP-V7iT-.js → square-_Cl44UU6.js} +1 -1
  236. package/dist/style.css +1 -1
  237. package/dist/templatical-editor.js +851 -854
  238. package/dist/{text-align-start-4mwX2o-F.js → text-align-start-Dqk2Xt_Q.js} +13 -13
  239. package/dist/{trash-B99WixTA.js → trash-Cr7rD5Hh.js} +1 -1
  240. package/dist/{triangle-alert-CHMiDkHa.js → triangle-alert-CKcpwtUj.js} +1 -1
  241. package/dist/{upload-Cp8o-hrN.js → upload-DR9pqVON.js} +1 -1
  242. package/dist/{useCloudI18n-Dh2iydo1.js → useCloudI18n-BczJoFf4.js} +1 -1
  243. package/dist/{useEditorRoot-DY3mgcHm.js → useEditorRoot-BcXKhM_8.js} +1 -1
  244. package/dist/{useI18n-CgtvtF4C.js → useI18n-zeWYtWSv.js} +1 -1
  245. package/dist/useLocalizedDisplay-Cbhx208c.js +31 -0
  246. package/dist/{useLogicTag-BmuakZBd.js → useLogicTag-DLkYos2Q.js} +3 -3
  247. package/dist/{useMergeTag-DC4a8b_v.js → useMergeTag-IoWOO679.js} +5 -5
  248. package/dist/{usePopoverPosition-VDQjyX_A.js → usePopoverPosition-Br3zt_MQ.js} +4 -4
  249. package/dist/{useScrollToBlock-B35ObCGK.js → useScrollToBlock-BfOzc1Z6.js} +2 -2
  250. package/dist/{withCurrentFont-BSxJai99.js → withCurrentFont-m_PHcOD0.js} +1 -1
  251. package/dist/{x-BIBStNMS.js → x-DZSFHafL.js} +1 -1
  252. package/package.json +10 -10
  253. package/dist/BlockPreviewCanvas-DtOo5y3U.js +0 -140
  254. package/dist/WrapperBlock-BUzQTZuu.js +0 -44
  255. package/dist/cdn/chunks/BlockPreviewCanvas-B6ndvof2.js.map +0 -1
  256. package/dist/cdn/chunks/LogicTagInsertButton-PDKuo2J3.js.map +0 -1
  257. package/dist/cdn/chunks/Toolbar-Cv6Rv1S-.js.map +0 -1
  258. package/dist/cdn/chunks/WrapperBlock-C_uE5rPJ.js +0 -46
  259. package/dist/cdn/chunks/WrapperBlock-C_uE5rPJ.js.map +0 -1
  260. package/dist/cdn/chunks/ca-DOuIxWRv.js.map +0 -1
  261. package/dist/cdn/chunks/composables-BxikPuC1.js.map +0 -1
  262. package/dist/cdn/chunks/de-DaOUfYBX.js.map +0 -1
  263. package/dist/cdn/chunks/en-B6tLGRHq.js +0 -1
  264. package/dist/cdn/chunks/en-C0pHHMiR.js.map +0 -1
  265. package/dist/cdn/chunks/es-CxyEKr6n.js.map +0 -1
  266. package/dist/cdn/chunks/extensions-DuDWpKo7.js.map +0 -1
  267. package/dist/cdn/chunks/fr-CYbamiI6.js.map +0 -1
  268. package/dist/cdn/chunks/ja-DfaIAoGI.js.map +0 -1
  269. package/dist/cdn/chunks/keys-CoQtCqNv.js.map +0 -1
  270. package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +0 -1
  271. package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js +0 -290
  272. package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js.map +0 -1
  273. package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +0 -1
  274. package/dist/cdn/chunks/src-712f3ofG.js.map +0 -1
  275. package/dist/cdn/chunks/src-B2tQbzf6.js +0 -677
  276. package/dist/cdn/chunks/src-B2tQbzf6.js.map +0 -1
  277. package/dist/cdn/chunks/src-ZFw5fg_z.js.map +0 -1
  278. package/dist/cdn/chunks/useLocalizedDisplay-DiNjT22M.js +0 -33
  279. package/dist/en-Do0SU6tR.js +0 -1
  280. package/dist/normalizeMergeTagMarkup-C7FGNURu.js +0 -288
  281. package/dist/useLocalizedDisplay-C9MBFUr4.js +0 -31
@@ -1,677 +0,0 @@
1
- import { A as e, Ct as t, Dt as n, Et as r, O as i, Ot as a, Q as o, Rt as s, Tt as c, Yt as l, _n as u, _t as d, b as f, bn as p, bt as m, ct as h, fn as g, gn as _, gt as v, hn as y, ht as b, k as ee, nn as te, ot as x, pt as ne, rt as S, sn as re, vn as ie, vt as ae, wt as oe, x as se, xt as C, y as ce, yn as le, yt as ue } from "./src-ZFw5fg_z.js";
2
- // ../renderer/src/render-context.ts
3
- var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
4
- name: "@templatical/renderer",
5
- description: "Render Templatical email templates to MJML",
6
- version: "0.54.2",
7
- bugs: "https://github.com/templatical/sdk/issues",
8
- dependencies: { "@templatical/types": "workspace:*" },
9
- devDependencies: {
10
- "@jsquash/oxipng": "^2.3.0",
11
- "@resvg/resvg-js": "^2.6.2",
12
- liquidjs: "^10.30.1",
13
- mjml: "^5.4.1",
14
- typescript: "^6.0.3",
15
- vitest: "^5.0.5"
16
- },
17
- exports: { ".": {
18
- types: "./dist/index.d.ts",
19
- import: "./dist/index.js"
20
- } },
21
- files: ["dist", "assets"],
22
- homepage: "https://templatical.com",
23
- keywords: [
24
- "email",
25
- "email-template",
26
- "html-email",
27
- "mjml",
28
- "renderer",
29
- "templatical"
30
- ],
31
- license: "MIT",
32
- module: "./dist/index.js",
33
- peerDependencies: { liquidjs: "^10.30.1" },
34
- peerDependenciesMeta: { liquidjs: { optional: !0 } },
35
- publishConfig: { access: "public" },
36
- repository: {
37
- type: "git",
38
- url: "git+https://github.com/templatical/sdk.git",
39
- directory: "packages/renderer"
40
- },
41
- scripts: {
42
- build: "tsdown && node scripts/rasterize-social.mjs",
43
- test: "vitest run --config vitest.config.ts",
44
- typecheck: "tsc --noEmit"
45
- },
46
- type: "module",
47
- types: "./dist/index.d.ts"
48
- }.version}/assets/social`, de = class e {
49
- containerWidth;
50
- customFonts;
51
- defaultFallbackFont;
52
- allowHtmlBlocks;
53
- customBlockHtml;
54
- socialIconsBaseUrl;
55
- blockRenderers;
56
- contentDirection;
57
- contentWidth;
58
- constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = w, o = {}, s = "ltr", c) {
59
- this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i, this.socialIconsBaseUrl = a, this.blockRenderers = o, this.contentDirection = s, this.contentWidth = c ?? e;
60
- }
61
- withContainerWidth(t, n = t) {
62
- return new e(t, this.customFonts, this.defaultFallbackFont, this.allowHtmlBlocks, this.customBlockHtml, this.socialIconsBaseUrl, this.blockRenderers, this.contentDirection, n);
63
- }
64
- resolveFontFamily(e) {
65
- return ce(e, {
66
- customFonts: this.customFonts,
67
- defaultFallback: this.defaultFallbackFont
68
- });
69
- }
70
- }, T = {
71
- "&": "&",
72
- "<": "&lt;",
73
- ">": "&gt;",
74
- "\"": "&quot;",
75
- "'": "&#039;"
76
- }, E = /[&<>"']/g;
77
- function D(e) {
78
- return e === "" ? "" : e.replace(E, (e) => T[e] ?? e);
79
- }
80
- function O(e) {
81
- return e === "" ? "" : e.replace(E, (e) => T[e] ?? e);
82
- }
83
- function k(e) {
84
- return e === "" ? "" : O(e.replace(/[;{}\r\n]/g, ""));
85
- }
86
- var fe = /[&<>"]/g;
87
- function A(e) {
88
- return e.replace(fe, (e) => T[e] ?? e);
89
- }
90
- // ../renderer/src/visibility.ts
91
- function j(e) {
92
- let t = e.visibility;
93
- return t ? !t.desktop && !t.mobile : !1;
94
- }
95
- function M(e, t = []) {
96
- let n = [N(e), ...t].filter((e) => e !== "").join(" ");
97
- return n === "" ? "" : ` css-class="${O(n)}"`;
98
- }
99
- function N(e) {
100
- let t = e.visibility;
101
- if (!t) return "";
102
- let n = [];
103
- return t.desktop || n.push("tpl-hide-desktop"), t.mobile || n.push("tpl-hide-mobile"), n.join(" ");
104
- }
105
- // ../renderer/src/unrenderable.ts
106
- var P = "templatical:unrenderable-block";
107
- function F(e) {
108
- return e.replace(/[<>]/g, "").replace(/-{2,}/g, "-");
109
- }
110
- function I(e) {
111
- 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><!-- ${P} type="${F(e.type)}" id="${F(e.id)}" --></mj-raw>`;
112
- }
113
- // ../renderer/src/padding.ts
114
- function L(e) {
115
- return O(`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`);
116
- }
117
- // ../renderer/src/utils.ts
118
- function R(e, t) {
119
- return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${k(e)}"` : "";
120
- }
121
- function pe(e) {
122
- return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? "" : ` height="${e}px"`;
123
- }
124
- function z(e, t) {
125
- let n = (e) => Math.trunc(e ?? 0), r = (e) => ie(e) === null ? 0 : Math.trunc(e.width);
126
- return n(e?.left) + n(e?.right) + r(t?.left) + r(t?.right);
127
- }
128
- function B(e, t) {
129
- let n = Math.floor(t.contentWidth) - z(e.styles.padding, e.border);
130
- return e.width === "full" || e.width >= n ? " fluid-on-mobile=\"true\"" : "";
131
- }
132
- function V(e) {
133
- return Object.entries(le(e)).map(([e, t]) => ` ${e}="${k(t)}"`).join("");
134
- }
135
- function H(e) {
136
- let t = p(e);
137
- return t === null ? "" : ` border-radius="${k(t)}"`;
138
- }
139
- function U(e) {
140
- let t = g(e);
141
- return t === null ? "" : ` background-url="${O(t.url)}" background-size="${k(t.size)}" background-position="${k(t.position)}" background-repeat="${k(t.repeat)}"`;
142
- }
143
- // ../renderer/src/rich-text.ts
144
- var W = "tpl-rich-text";
145
- function G(e) {
146
- return `${W}-${e}`;
147
- }
148
- function me(e, t = "ltr") {
149
- let n = _, r = `.${W}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
150
- let t = `.${G(e)}`;
151
- return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
152
- }), a = t === "rtl" ? "padding-right" : "padding-left";
153
- return [
154
- ...i,
155
- `${r} ul, ${r} ol { margin: ${n.listMarginY}px 0; ${a}: ${n.listPaddingLeft}px; }`,
156
- `${r} li { margin: ${n.listItemMarginY}px 0; }`
157
- ].join("\n ");
158
- }
159
- function K(e) {
160
- return e ?? _.paragraphGap;
161
- }
162
- function he(e) {
163
- let t = [_.paragraphGap], n = (e) => {
164
- if (e.type === "paragraph" && t.push(K(e.paragraphSpacing)), C(e)) for (let t of e.children) for (let e of t) n(e);
165
- else if (a(e)) for (let t of e.children) n(t);
166
- };
167
- for (let t of e) n(t);
168
- return t;
169
- }
170
- var ge = {
171
- apos: "'",
172
- quot: "\"",
173
- nbsp: "\xA0"
174
- }, _e = /&(?:#(\d+)|#x([0-9a-f]+)|(apos|quot|nbsp));/gi, ve = /[a-z]/i, q = /[ \t\n\f\r]/;
175
- function ye(e, t, n, r, i) {
176
- let a;
177
- if (i !== void 0) a = ge[i.toLowerCase()];
178
- else {
179
- let t = Number(n ?? `0x${r}`);
180
- if (!(t > 0 && t <= 1114111 && !(t >= 55296 && t <= 57343))) return e;
181
- a = String.fromCodePoint(t);
182
- }
183
- return a === "&" ? "&amp;" : a === "<" || a === ">" ? e : a === t ? t === "\"" ? "'" : "\"" : a;
184
- }
185
- function be(e) {
186
- let t = 1;
187
- for (; t < e.length && !q.test(e[t]) && e[t] !== "/";) t++;
188
- for (; t < e.length;) {
189
- for (; t < e.length && (q.test(e[t]) || e[t] === "/");) t++;
190
- let n = t;
191
- for (; t < e.length && !/[\s=/]/.test(e[t]);) t++;
192
- let r = e.slice(n, t).toLowerCase();
193
- if (r === "") {
194
- t++;
195
- continue;
196
- }
197
- for (; t < e.length && q.test(e[t]);) t++;
198
- if (e[t] !== "=") continue;
199
- for (t++; t < e.length && q.test(e[t]);) t++;
200
- let i = e[t];
201
- if (i === "\"" || i === "'") {
202
- let n = e.indexOf(i, t + 1);
203
- if (n === -1) return e;
204
- if (r === "style") {
205
- let r = e.slice(t + 1, n).replace(_e, (e, t, n, r) => ye(e, i, t, n, r));
206
- return `${e.slice(0, t + 1)}${r}${e.slice(n)}`;
207
- }
208
- t = n + 1;
209
- } else for (; t < e.length && !q.test(e[t]);) t++;
210
- }
211
- return e;
212
- }
213
- function J(e) {
214
- if (!e.includes("&")) return e;
215
- let t = "", n = 0, r = e.indexOf("<");
216
- for (; r !== -1;) {
217
- if (!ve.test(e.charAt(r + 1))) {
218
- r = e.indexOf("<", r + 1);
219
- continue;
220
- }
221
- let i = x(e, r + 1);
222
- if (i === -1) break;
223
- let a = e.slice(r, i), o = be(a);
224
- o !== a && (t += e.slice(n, r) + o, n = i), r = e.indexOf("<", i);
225
- }
226
- return t + e.slice(n);
227
- }
228
- // ../renderer/src/renderers/title.ts
229
- function xe(e, t) {
230
- if (j(e)) return "";
231
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = Se(J(f(S(e.content)))), a = y[e.level] ?? y[2], o = e.color ? `\n color="${O(e.color)}"` : "", s = O(e.textAlign), c = Ce(e.fontFamily, t), l = M(e, [W, G(K(void 0))]), d = `h${y[e.level] ? e.level : 2}`;
232
- return `<mj-text
233
- font-size="${a}px"${o}
234
- align="${s}"
235
- line-height="${u}"
236
- padding="${n}"${r}${c}${l}
237
- ><${d} style="margin:0;font-size:inherit;color:inherit;line-height:inherit;font-weight:700">${i}</${d}></mj-text>`;
238
- }
239
- function Se(e) {
240
- let t = /^\s*<p\b/.exec(e);
241
- if (!t) return e;
242
- let n = x(e, t[0].length);
243
- if (n === -1) return e;
244
- let r = /<\/p>\s*$/.exec(e);
245
- if (!r || r.index <= n) return e;
246
- let i = e.slice(n + 1, r.index);
247
- return /<\/p>\s*<p\b/i.test(i) ? e : i;
248
- }
249
- function Ce(e, t) {
250
- return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
251
- }
252
- // ../renderer/src/renderers/paragraph.ts
253
- function we(e, t) {
254
- if (j(e) || se(e.content)) return "";
255
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = J(f(S(e.content))), a = M(e, [W, G(K(e.paragraphSpacing))]);
256
- return `<mj-text
257
- line-height="1.5"${t.contentDirection === "rtl" ? "\n align=\"right\"" : ""}
258
- padding="${n}"${r}${a}
259
- >${i}</mj-text>`;
260
- }
261
- // ../renderer/src/renderers/image.ts
262
- function Te(e, t) {
263
- if (j(e) || e.src === "") return "";
264
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = O(e.width === "full" ? t.containerWidth + "px" : e.width + "px"), a = pe(e.height), o = B(e, t), s = M(e), c = H(e.borderRadius), l = V(e.border), u = "";
265
- e.linkUrl && (u = ` href="${O(e.linkUrl)}"`, e.linkOpenInNewTab && (u += " target=\"_blank\" rel=\"noopener\""));
266
- let d = O(e.src), f = e.decorative === !0;
267
- return `<mj-image
268
- src="${d}"
269
- alt="${f ? "" : O(e.alt)}"
270
- width="${i}"${a}${o}
271
- align="${O(e.align)}"
272
- padding="${n}"${r}${l}${c}${u}${s}${f ? " role=\"presentation\"" : ""}
273
- />`;
274
- }
275
- // ../renderer/src/renderers/button.ts
276
- var Y = "tpl-button-full";
277
- function Ee(e, t) {
278
- if (j(e)) return "";
279
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = L(e.buttonPadding), a = e.url === "" ? "" : O(e.url), o = a === "" ? "" : ` href="${a}"`, s = De(e.backgroundColor), c = O(e.textColor), l = e.fontSize, u = O(ke(e.borderRadius)), d = D(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = Oe(e.fontFamily, t), m = Ae(e.width), h = M(e, e.width === "full" ? [Y] : []), g = V(e.border), _ = O(e.align ?? "center");
280
- return `<mj-button${o}${f}
281
- background-color="${s}"
282
- color="${c}"
283
- font-size="${O(String(l))}px"
284
- font-weight="bold"
285
- border-radius="${u}"${g}
286
- inner-padding="${i}"
287
- align="${_}"
288
- padding="${n}"${r}${p}${m}${h}
289
- >${d}</mj-button>`;
290
- }
291
- function De(e) {
292
- return e.trim() === "" ? "transparent" : O(e);
293
- }
294
- function Oe(e, t) {
295
- return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
296
- }
297
- function ke(e) {
298
- return typeof e == "number" ? `${e}px` : p(e) ?? "0px";
299
- }
300
- function Ae(e) {
301
- return e === void 0 ? "" : ` width="${O(e === "full" ? "100%" : `${e}px`)}"`;
302
- }
303
- // ../renderer/src/renderers/divider.ts
304
- function je(e, t) {
305
- if (j(e)) return "";
306
- let n = L(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${O(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : typeof e.width == "number" ? `${e.width}px` : e.width, a = e.thickness, o = O(e.lineStyle), s = O(e.color), c = M(e);
307
- return `<mj-divider
308
- border-width="${O(String(a))}px"
309
- border-style="${o}"
310
- border-color="${s}"
311
- width="${O(i)}"
312
- padding="${n}"${r}${c}
313
- />`;
314
- }
315
- // ../renderer/src/renderers/spacer.ts
316
- function Me(e, t) {
317
- if (j(e)) return "";
318
- let n = e.height, r = e.styles.backgroundColor ? ` container-background-color="${O(e.styles.backgroundColor)}"` : "", i = M(e);
319
- return `<mj-spacer height="${O(String(n))}px" padding="0"${r}${i} />`;
320
- }
321
- // ../renderer/src/renderers/html.ts
322
- function Ne(e, t) {
323
- if (j(e) || !t.allowHtmlBlocks) return "";
324
- let n = e.content;
325
- if (n === "") return "";
326
- let r = M(e);
327
- return `<mj-text padding="${L(e.styles.padding)}"${R(e.styles.backgroundColor, "container")}${r}>
328
- ${n}
329
- </mj-text>`;
330
- }
331
- // ../renderer/src/renderers/social.ts
332
- function Pe(e, t) {
333
- if (j(e)) return "";
334
- let n = e.icons;
335
- if (n.length === 0) return "";
336
- let r = L(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${O(e.styles.backgroundColor)}"` : "", a = M(e), o = O(e.align), s = e.iconSize, c = e.iconStyle, l = O(te(c, e.iconTone)), u = e.spacing, d;
337
- switch (s) {
338
- case "small":
339
- d = 24;
340
- break;
341
- case "large":
342
- d = 48;
343
- break;
344
- default: d = 32;
345
- }
346
- let f;
347
- switch (c) {
348
- case "circle":
349
- f = "50%";
350
- break;
351
- case "rounded":
352
- f = "8px";
353
- break;
354
- case "square":
355
- f = "0";
356
- break;
357
- default: f = "4px";
358
- }
359
- let p = n.length;
360
- return `<mj-social
361
- mode="horizontal"
362
- align="${o}"
363
- icon-padding="0"
364
- padding="${r}"${i}${a}
365
- >
366
- ${n.map((e, n) => {
367
- let r = O(e.platform), i = O(e.url), a = `${t.socialIconsBaseUrl}/${l}/${r}.png`, o = n === p - 1 ? 0 : u;
368
- return `<mj-social-element src="${a}" href="${i}" icon-size="${d}px" padding="0 ${O(String(o))}px 0 0" border-radius="${f}" background-color="transparent"></mj-social-element>`;
369
- }).join("\n")}
370
- </mj-social>`;
371
- }
372
- // ../renderer/src/renderers/menu.ts
373
- function Fe(e, t) {
374
- if (j(e) || e.items.length === 0) return "";
375
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = M(e), a = Re(e.fontFamily, t), o = O(e.textAlign), s = e.fontSize, c = e.color ? `\n color="${O(e.color)}"` : "", l = Ie(e);
376
- return `<mj-text
377
- font-size="${O(String(s))}px"${c}
378
- align="${o}"
379
- line-height="1.5"
380
- padding="${n}"${r}${a}${i}
381
- >${l}</mj-text>`;
382
- }
383
- function Ie(e) {
384
- let t = e.items, n = D(e.separator), r = k(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
385
- for (let e = 0; e < s; e++) o.push(Le(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${k(String(i))}px;">${n}</span>`);
386
- return o.join("");
387
- }
388
- function Le(e, t) {
389
- let n = D(e.text), r = O(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
390
- return i && o.unshift(`color: ${k(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
391
- }
392
- function Re(e, t) {
393
- return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
394
- }
395
- // ../renderer/src/renderers/table.ts
396
- function ze(e, t) {
397
- if (j(e) || e.rows.length === 0) return "";
398
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = M(e), a = Ue(e.fontFamily, t), o = e.fontSize, s = e.color ? `\n color="${O(e.color)}"` : "", c = O(e.textAlign), l = Be(e);
399
- return `<mj-text
400
- font-size="${O(String(o))}px"${s}
401
- align="${c}"
402
- line-height="1.5"
403
- padding="${n}"${r}${a}${i}
404
- >${l}</mj-text>`;
405
- }
406
- function Be(e) {
407
- let t = k(e.borderColor), n = e.borderWidth, r = "";
408
- for (let i = 0; i < e.rows.length; i++) {
409
- let a = e.rows[i];
410
- r += Ve(a, e, e.hasHeaderRow && i === 0, t, n);
411
- }
412
- return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
413
- }
414
- function Ve(e, t, n, r, i) {
415
- let a = "";
416
- for (let o of e.cells) a += He(o, t, n, r, i);
417
- return `<tr>${a}</tr>`;
418
- }
419
- function He(e, t, n, r, i) {
420
- let a = t.cellPadding, o = [`border: ${k(String(i))}px solid ${r}`, `padding: ${k(String(a))}px`];
421
- n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${k(t.headerBackgroundColor)}`));
422
- let s = o.join("; "), c = D(S(e.content)), l = n ? "th" : "td";
423
- return `<${l} style="${s}">${c}</${l}>`;
424
- }
425
- function Ue(e, t) {
426
- return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
427
- }
428
- // ../renderer/src/renderers/custom.ts
429
- function We(e, t) {
430
- if (j(e)) return "";
431
- let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
432
- if (!n || n === "") return "";
433
- let r = M(e);
434
- return `<mj-text padding="${L(e.styles.padding)}"${R(e.styles.backgroundColor, "container")}${r}>
435
- ${n}
436
- </mj-text>`;
437
- }
438
- // ../renderer/src/columns.ts
439
- function X(e) {
440
- switch (e) {
441
- case "2": return ["50%", "50%"];
442
- case "3": return [
443
- "33.33%",
444
- "33.33%",
445
- "33.34%"
446
- ];
447
- case "1-2": return ["33.33%", "66.67%"];
448
- case "2-1": return ["66.67%", "33.33%"];
449
- default: return ["100%"];
450
- }
451
- }
452
- function Ge(e, t) {
453
- switch (e) {
454
- case "2": return [t * .5, t * .5];
455
- case "3": return [
456
- t / 3,
457
- t / 3,
458
- t / 3
459
- ];
460
- case "1-2": return [t / 3, t * 2 / 3];
461
- case "2-1": return [t * 2 / 3, t / 3];
462
- default: return [t];
463
- }
464
- }
465
- // ../renderer/src/hero-geometry.ts
466
- function Ke(e, t, n) {
467
- let r = Math.max(1, Math.round(t)), i = e.aspectRatio === null ? null : Math.max(1, Math.round(r * e.aspectRatio)), a = Math.max(e.height === "image" ? i ?? r : e.height, Math.trunc(n.top) + Math.trunc(n.bottom));
468
- return {
469
- mode: "fixed-height",
470
- height: a,
471
- backgroundWidth: r,
472
- backgroundHeight: i ?? a
473
- };
474
- }
475
- // ../renderer/src/display-condition.ts
476
- function Z(e, t) {
477
- if (t === "") return "";
478
- let n = e.displayCondition;
479
- return n ? `<mj-raw>${n.before}</mj-raw>
480
- ` + t + `
481
- <mj-raw>${n.after}</mj-raw>` : t;
482
- }
483
- // ../renderer/src/renderers/section.ts
484
- function qe(e, t, n) {
485
- if (j(e)) return "";
486
- let r = re(e);
487
- if (r?.applied) return Je(e, r, t, n);
488
- let i = e.columns, a = X(i), o = Ge(i, t.containerWidth), s = Math.floor(t.contentWidth) - z(e.styles.padding, e.border), c = a.map((e) => Math.floor(s * parseFloat(e) / 100)), l = L(e.styles.padding), u = R(e.styles.backgroundColor, "native"), d = U(e.backgroundImage), f = M(e), p = H(e.borderRadius), m = V(e.border), h = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "", g = e.children, _ = [];
489
- for (let e = 0; e < g.length; e++) {
490
- let r = g[e], i = a[e] ?? "100%", l = Math.floor(o[e] ?? t.containerWidth), u = Ye(r, t.allowHtmlBlocks).filter((e) => !C(e)), d = t.withContainerWidth(l, c[e] ?? s), f = u.map((e) => Z(e, n(e, d))).filter((e) => e !== "").join("\n");
491
- _.push(`<mj-column width="${i}"${h}>
492
- ${f === "" ? "<mj-text>&nbsp;</mj-text>" : f}
493
- </mj-column>`);
494
- }
495
- let v = _.join("\n");
496
- return `<mj-section${u}${d} padding="${l}"${m}${p}${f}${h}>
497
- ${e.stackOnMobile === !1 && _.length > 1 ? `<mj-group${h}>
498
- ${v}
499
- </mj-group>` : v}
500
- </mj-section>`;
501
- }
502
- function Je(e, t, n, r) {
503
- let i = Math.floor(n.contentWidth), a = Ke(t, i, e.styles.padding), o = R(e.styles.backgroundColor, "native") || " background-color=\"transparent\"", s = L(e.styles.padding), c = H(e.borderRadius), l = M(e), u = n.withContainerWidth(i, i - z(e.styles.padding)), d = Ye(e.children[0] ?? [], n.allowHtmlBlocks).filter((e) => !C(e)).map((e) => Z(e, r(e, u))).filter((e) => e !== "").join("\n");
504
- return `<mj-hero mode="${a.mode}" height="${a.height}px" background-url="${O(t.image.url)}" background-width="${a.backgroundWidth}px" background-height="${a.backgroundHeight}px" background-position="${O(t.image.position)}"${o} padding="${s}" vertical-align="${O(t.verticalAlign)}"${c}${l}>
505
- ${d}
506
- </mj-hero>`;
507
- }
508
- function Ye(e, t) {
509
- return t ? e : e.filter((e) => e.type !== "html");
510
- }
511
- // ../renderer/src/renderers/video.ts
512
- function Xe(e, t) {
513
- if (t) return t;
514
- if (!e) return null;
515
- 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})/]) {
516
- let n = e.match(t);
517
- if (n) return `https://img.youtube.com/vi/${n[1]}/maxresdefault.jpg`;
518
- }
519
- let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
520
- return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
521
- }
522
- function Ze(e, t) {
523
- if (j(e)) return "";
524
- let n = Xe(e.url, e.thumbnailUrl);
525
- if (!n) return "";
526
- let r = L(e.styles.padding), i = R(e.styles.backgroundColor, "container"), a = O(e.width === "full" ? t.containerWidth + "px" : e.width + "px"), o = pe(e.height), s = B(e, t), c = M(e);
527
- return `<mj-image
528
- src="${O(n)}"
529
- alt="${O(e.alt)}"
530
- width="${a}"${o}${s}
531
- align="${O(e.align)}"
532
- padding="${r}"
533
- href="${O(e.url)}"
534
- target="_blank"
535
- rel="noopener"${i}${c}
536
- />`;
537
- }
538
- // ../renderer/src/renderers/index.ts
539
- function Q(e, i) {
540
- let a = i.blockRenderers[e.type];
541
- return a ? a(e, i) : C(e) ? qe(e, i, Q) : r(e) ? xe(e, i) : m(e) ? we(e, i) : ae(e) ? Te(e, i) : ne(e) ? Ee(e, i) : v(e) ? je(e, i) : oe(e) ? Me(e, i) : d(e) ? Ne(e, i) : t(e) ? Pe(e, i) : ue(e) ? Fe(e, i) : c(e) ? ze(e, i) : n(e) ? Ze(e, i) : b(e) ? We(e, i) : j(e) ? "" : I(e);
542
- }
543
- // ../renderer/src/index.ts
544
- var Qe = `.${Y} a { display: block !important; }`;
545
- async function $e(t, n) {
546
- if (n?.customBlocks !== void 0 && n.renderCustomBlock !== void 0) throw TypeError("[Templatical] customBlocks cannot be combined with renderCustomBlock");
547
- if (n?.customBlocks !== void 0 && n.getCustomBlockStylesheet !== void 0) throw TypeError("[Templatical] customBlocks cannot be combined with getCustomBlockStylesheet");
548
- let r = n?.locale ?? s(t), a = l(t, r), o = n?.layout ? i(l(n.layout, r, { missing: "default" }), a) : (ee(a), e(a), a), c = n?.customFonts ?? [], u = n?.defaultFallbackFont ?? "Arial, sans-serif", d = n?.allowHtmlBlocks ?? !0, f = it(n?.socialIconsBaseUrl ?? w), p = n?.customBlocks === void 0 ? await ct(o, n?.renderCustomBlock) : await lt(o, n.customBlocks), m = ut(o, n?.getCustomBlockStylesheet, n?.customBlocks === void 0 ? void 0 : new Map(n.customBlocks.map((e) => [e.type, e]))), g = h(o.settings), _ = new de(o.settings.width, c, u, d, p, f, n?.blockRenderers ?? {}, g), v = st(o.blocks, d), y = _.resolveFontFamily(o.settings.fontFamily), b = /[<>]/.test(o.settings.backgroundColor) ? "transparent" : o.settings.backgroundColor, te = o.settings.textColor ? ` color="${O(o.settings.textColor)}"` : "", x = o.settings.linkColor ? k(o.settings.linkColor) : "inherit", ne = o.settings.linkUnderline ? "underline" : "none", S = v.map((e) => et(e, _)).filter((e) => e !== "").join("\n"), re = ot(c), ie = at(o.settings.preheaderText);
549
- return `<mjml lang="${O(o.settings.locale)}" dir="${O(g)}">
550
- <mj-head>${ie}
551
- <mj-attributes>
552
- <mj-all font-family="${A(y)}" />
553
- <mj-text font-size="14px"${te} />
554
- <mj-section padding="0" />
555
- <mj-column padding="0" />
556
- </mj-attributes>${re}
557
- <mj-style inline="inline">
558
- ${me(he(v), g)}
559
- ${Qe}
560
- </mj-style>
561
- <mj-style>
562
- a { color: ${x}; text-decoration: ${ne}; }
563
- @media only screen and (max-width: 480px) {
564
- .tpl-hide-mobile { display: none !important; mso-hide: all !important; }
565
- }
566
- @media only screen and (min-width: 481px) {
567
- .tpl-hide-desktop { display: none !important; mso-hide: all !important; }
568
- }
569
- </mj-style>${dt(m)}
570
- </mj-head>
571
- <mj-body width="${O(String(_.containerWidth))}px" background-color="${k(b)}">
572
- ${S}
573
- </mj-body>
574
- </mjml>`;
575
- }
576
- function et(e, t) {
577
- if (a(e)) {
578
- let n = tt(t, e.styles.padding);
579
- return Z(e, nt(st(e.children, t.allowHtmlBlocks).map((e) => et(e, n)).filter((e) => e !== "").join("\n"), {
580
- backgroundColor: e.styles.backgroundColor,
581
- padding: e.styles.padding,
582
- borderRadius: e.borderRadius,
583
- backgroundImage: e.backgroundImage
584
- }, t.contentDirection));
585
- }
586
- if (C(e)) {
587
- let n = Q(e, e.wrapper ? tt(t, e.wrapper.padding) : t);
588
- return Z(e, e.wrapper && n !== "" ? nt(n, e.wrapper, t.contentDirection) : n);
589
- }
590
- return Z(e, rt(Q(e, t), t.contentDirection));
591
- }
592
- function tt(e, t) {
593
- return e.withContainerWidth(e.containerWidth, Math.floor(e.contentWidth) - z(t));
594
- }
595
- function nt(e, t, n) {
596
- return `<mj-wrapper${R(t.backgroundColor, "native")}${U(t.backgroundImage)}${` padding="${t.padding ? L(t.padding) : "0"}"`}${H(t.borderRadius)}${n === "rtl" ? " direction=\"rtl\"" : ""}>
597
- ${e}
598
- </mj-wrapper>`;
599
- }
600
- function rt(e, t) {
601
- if (e === "") return "";
602
- let n = t === "rtl" ? " direction=\"rtl\"" : "";
603
- return `<mj-section${n}>
604
- <mj-column${n}>
605
- ${e}
606
- </mj-column>
607
- </mj-section>`;
608
- }
609
- function it(e) {
610
- return e.endsWith("/") ? e.slice(0, -1) : e;
611
- }
612
- function at(e) {
613
- if (!e) return "";
614
- let t = e.trim();
615
- return t === "" ? "" : `\n <mj-preview>${D(t)}</mj-preview>`;
616
- }
617
- function ot(e) {
618
- return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${O(e.name)}" href="${O(e.url)}" />`).join("");
619
- }
620
- function st(e, t) {
621
- return t ? e : e.filter((e) => e.type !== "html");
622
- }
623
- async function ct(e, t) {
624
- let n = /* @__PURE__ */ new Map();
625
- if (!t) return n;
626
- let r = [];
627
- if ($(e.blocks, r), r.length === 0) return n;
628
- let i = await Promise.all(r.map((e) => t(e)));
629
- for (let e = 0; e < r.length; e++) n.set(r[e].id, i[e]);
630
- return n;
631
- }
632
- async function lt(e, t) {
633
- let n = /* @__PURE__ */ new Map(), r = [];
634
- if ($(e.blocks, r), r.length === 0) return n;
635
- let i;
636
- try {
637
- i = await import("./liquid.browser-rubac0VA.js");
638
- } catch {
639
- throw Error("[Templatical] customBlocks requires the optional liquidjs package.");
640
- }
641
- let a = o(i), s = new Map(t.map((e) => [e.type, e])), c = await Promise.all(r.map(async (e) => {
642
- let t = s.get(e.customType);
643
- return t ? String(await a.parseAndRender(t.template, e.fieldValues)) : void 0;
644
- }));
645
- for (let e = 0; e < r.length; e++) {
646
- let t = c[e];
647
- t !== void 0 && n.set(r[e].id, t);
648
- }
649
- return n;
650
- }
651
- function $(e, t) {
652
- for (let n of e) if (b(n)) t.push(n);
653
- else if (C(n)) for (let e of n.children) $(e, t);
654
- else a(n) && $(n.children, t);
655
- }
656
- function ut(e, t, n) {
657
- let r = [];
658
- if ($(e.blocks, r), r.length === 0) return [];
659
- let i = /* @__PURE__ */ new Map();
660
- if (!t) for (let e of r) e.renderedStylesheet && !i.has(e.customType) && i.set(e.customType, e.renderedStylesheet);
661
- let a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = [];
662
- for (let e of r) {
663
- if (a.has(e.customType)) continue;
664
- a.add(e.customType);
665
- let r = n?.get(e.customType), c = t ? t(e.customType) : r ? r.stylesheet : i.get(e.customType);
666
- if (!c) continue;
667
- let l = c.trim();
668
- l === "" || o.has(l) || (o.add(l), s.push(l));
669
- }
670
- return s;
671
- }
672
- function dt(e) {
673
- return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e}\n </mj-style>`).join("");
674
- }
675
- export { Y as BUTTON_FULL_WIDTH_CSS_CLASS, w as DEFAULT_SOCIAL_ICONS_BASE_URL, W as RICH_TEXT_CSS_CLASS, de as RenderContext, P as UNRENDERABLE_MARKER_PREFIX, S as convertMergeTagsToValues, O as escapeAttr, D as escapeHtml, B as fluidOnMobileAttr, M as getCssClassAttr, N as getCssClasses, X as getWidthPercentages, Ge as getWidthPixels, j as isHiddenOnAll, Q as renderBlock, $e as renderToMjml, I as renderUnrenderableBlock, K as resolveParagraphGap, G as richTextGapClass, L as toPaddingString };
676
-
677
- //# sourceMappingURL=src-B2tQbzf6.js.map