@templatical/editor 0.26.2 → 0.27.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 (285) hide show
  1. package/README.md +3 -1
  2. package/dist/{AiChatSidebar-CMBz6Wix.js → AiChatSidebar-iVJDzqjr.js} +60 -60
  3. package/dist/AiFeatureMenu-DvrK-dzj.js +57 -0
  4. package/dist/{BlockIssueBadge-Buk3_6QF.js → BlockIssueBadge-BHysq7XQ.js} +11 -11
  5. package/dist/BlockPreviewCanvas-GZbr0ph5.js +121 -0
  6. package/dist/CloudHeaderExtras-Cx8gFWu2.js +59 -0
  7. package/dist/CloudPanels-D0X449DD.js +227 -0
  8. package/dist/{CollaboratorBar-zvfvE7f-.js → CollaboratorBar-DMSWCrX3.js} +21 -21
  9. package/dist/ColorPicker-DCjFQCAg.js +501 -0
  10. package/dist/CommentsPanel-D5wQB1Kf.js +18 -0
  11. package/dist/CommentsSidebar-BoTIxpLE.js +481 -0
  12. package/dist/{cdn/chunks/CountdownBlock-vLTkTI9e.js → CountdownBlock-BFX8iU90.js} +19 -21
  13. package/dist/{cdn/chunks/CountdownToolbar-DPjcgcVR.js → CountdownToolbar-CSftc9Ma.js} +52 -53
  14. package/dist/{DesignReferenceSidebar-Bx96XFmK.js → DesignReferenceSidebar-DKsx2TiL.js} +72 -71
  15. package/dist/{IssuesPanel-Do7RLXsP.js → IssuesPanel-flKKwKpM.js} +38 -38
  16. package/dist/{LoadingTrack-BexpNuTV.js → LoadingTrack-C2T8ixEL.js} +3 -3
  17. package/dist/{MergeTagModeToggle-P-UguQHc.js → MergeTagModeToggle-PKCoKAoF.js} +43 -43
  18. package/dist/{MergeTagSuggestion-BJ43ihWR.js → MergeTagSuggestion-DGha0WRp.js} +46 -46
  19. package/dist/{cdn/chunks/NumberWithSuffix-BXrRdfq1.js → NumberWithSuffix-DdPCXfKf.js} +42 -44
  20. package/dist/{ParagraphEditor-CLvv5Ija.js → ParagraphEditor-vDU-5y6r.js} +202 -199
  21. package/dist/RestoreVersionDialog-DIn1muFD.js +86 -0
  22. package/dist/{RichTextEditorContent-fbYJXAio.js → RichTextEditorContent-I83k5DtQ.js} +44 -44
  23. package/dist/SaveBlockDialog-C_QvYAeL.js +266 -0
  24. package/dist/{SavedBlocksBrowserModal-KWlaiLlr.js → SavedBlocksBrowserModal-CefWWcdT.js} +116 -115
  25. package/dist/{cdn/chunks/SavedBlocksPanels-e4HyTZ8v.js → SavedBlocksPanels-DnQwO-7O.js} +9 -11
  26. package/dist/{SavedBlocksPickBar-C3h8oL3r.js → SavedBlocksPickBar-BsFubArH.js} +17 -17
  27. package/dist/{TemplateScoringPanel-BZUsb3FD.js → TemplateScoringPanel-Bv_bBsJi.js} +87 -87
  28. package/dist/TestEmailModal-STPWDP79.js +206 -0
  29. package/dist/{cdn/chunks/TestEmailPanel-CZAG1gQE.js → TestEmailPanel-HYVjApKZ.js} +4 -6
  30. package/dist/TitleEditor-DnB0EJ_g.js +198 -0
  31. package/dist/TplModal-chvLhXmC.js +49 -0
  32. package/dist/VersionHistoryMenu-Cq4rH56t.js +155 -0
  33. package/dist/VersionHistoryPanels-D7k_F7-9.js +46 -0
  34. package/dist/VersionPreviewBanner-DthyHe6C.js +38 -0
  35. package/dist/{blockTypeIcons-2_85L_CL.js → blockTypeIcons-B8r4jMBn.js} +6 -6
  36. package/dist/bundle-stats.json +8 -8
  37. package/dist/{ca-D1zgI9fQ.js → ca-Cqg9O8mx.js} +69 -6
  38. package/dist/cdn/chunks/{AiChatSidebar-CQ8KUmNB.js → AiChatSidebar-DTUoBH5a.js} +54 -54
  39. package/dist/cdn/chunks/AiChatSidebar-DTUoBH5a.js.map +1 -0
  40. package/dist/cdn/chunks/AiFeatureMenu-Dyh7mUMB.js +57 -0
  41. package/dist/cdn/chunks/AiFeatureMenu-Dyh7mUMB.js.map +1 -0
  42. package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js → BlockIssueBadge-UzSSOM_2.js} +13 -13
  43. package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js.map → BlockIssueBadge-UzSSOM_2.js.map} +1 -1
  44. package/dist/cdn/chunks/{BlockPreviewCanvas-DPtiMsVz.js → BlockPreviewCanvas-DStQFo9P.js} +42 -42
  45. package/dist/cdn/chunks/{BlockPreviewCanvas-DPtiMsVz.js.map → BlockPreviewCanvas-DStQFo9P.js.map} +1 -1
  46. package/dist/cdn/chunks/CloudHeaderExtras-BZVu7dnO.js +60 -0
  47. package/dist/cdn/chunks/CloudHeaderExtras-BZVu7dnO.js.map +1 -0
  48. package/dist/cdn/chunks/CloudPanels-CXbaBKHQ.js +227 -0
  49. package/dist/cdn/chunks/CloudPanels-CXbaBKHQ.js.map +1 -0
  50. package/dist/cdn/chunks/{CollaboratorBar-BF469_AN.js → CollaboratorBar-BH_lZlat.js} +22 -22
  51. package/dist/cdn/chunks/CollaboratorBar-BH_lZlat.js.map +1 -0
  52. package/dist/cdn/chunks/ColorPicker-CStXen0Y.js +502 -0
  53. package/dist/cdn/chunks/ColorPicker-CStXen0Y.js.map +1 -0
  54. package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js +20 -0
  55. package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js.map +1 -0
  56. package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js +460 -0
  57. package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js.map +1 -0
  58. package/dist/{CountdownBlock-DuyvGcr8.js → cdn/chunks/CountdownBlock-BYSrJWxg.js} +25 -23
  59. package/dist/cdn/chunks/{CountdownBlock-vLTkTI9e.js.map → CountdownBlock-BYSrJWxg.js.map} +1 -1
  60. package/dist/{CountdownToolbar-CBE9wRaV.js → cdn/chunks/CountdownToolbar-CZPtQIb8.js} +66 -63
  61. package/dist/cdn/chunks/{CountdownToolbar-DPjcgcVR.js.map → CountdownToolbar-CZPtQIb8.js.map} +1 -1
  62. package/dist/cdn/chunks/{DesignReferenceSidebar-B-HFXV0W.js → DesignReferenceSidebar-sZWciECR.js} +64 -64
  63. package/dist/cdn/chunks/DesignReferenceSidebar-sZWciECR.js.map +1 -0
  64. package/dist/cdn/chunks/{IssuesPanel-DKTS4QVb.js → IssuesPanel-CHtetM9i.js} +36 -36
  65. package/dist/cdn/chunks/IssuesPanel-CHtetM9i.js.map +1 -0
  66. package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js → LoadingTrack-Dp_QZvAK.js} +3 -3
  67. package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js.map → LoadingTrack-Dp_QZvAK.js.map} +1 -1
  68. package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js → MergeTagModeToggle-ZwW-5EeN.js} +39 -39
  69. package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js.map → MergeTagModeToggle-ZwW-5EeN.js.map} +1 -1
  70. package/dist/cdn/chunks/{MergeTagSuggestion-Dn8dExNa.js → MergeTagSuggestion-DhllqTA3.js} +47 -47
  71. package/dist/cdn/chunks/MergeTagSuggestion-DhllqTA3.js.map +1 -0
  72. package/dist/{NumberWithSuffix-D37ZWiZh.js → cdn/chunks/NumberWithSuffix-yeQLcCyH.js} +37 -35
  73. package/dist/cdn/chunks/NumberWithSuffix-yeQLcCyH.js.map +1 -0
  74. package/dist/cdn/chunks/{ParagraphEditor-Bzcma_Lm.js → ParagraphEditor-BJJ925sx.js} +235 -233
  75. package/dist/cdn/chunks/ParagraphEditor-BJJ925sx.js.map +1 -0
  76. package/dist/cdn/chunks/RestoreVersionDialog-B0Jadu6F.js +87 -0
  77. package/dist/cdn/chunks/RestoreVersionDialog-B0Jadu6F.js.map +1 -0
  78. package/dist/cdn/chunks/{RichTextEditorContent-DtL49Jpo.js → RichTextEditorContent-CfSq2wPR.js} +44 -44
  79. package/dist/cdn/chunks/RichTextEditorContent-CfSq2wPR.js.map +1 -0
  80. package/dist/cdn/chunks/SaveBlockDialog-C1DXh6P9.js +265 -0
  81. package/dist/cdn/chunks/SaveBlockDialog-C1DXh6P9.js.map +1 -0
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-C59D4G5C.js → SavedBlocksBrowserModal-BerMxAUt.js} +114 -113
  83. package/dist/cdn/chunks/SavedBlocksBrowserModal-BerMxAUt.js.map +1 -0
  84. package/dist/{SavedBlocksPanels-CQsZvWO_.js → cdn/chunks/SavedBlocksPanels-BUE4lzVP.js} +11 -9
  85. package/dist/cdn/chunks/{SavedBlocksPanels-e4HyTZ8v.js.map → SavedBlocksPanels-BUE4lzVP.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-DMHxPCM4.js → SavedBlocksPickBar-4HrqQfvl.js} +17 -17
  87. package/dist/cdn/chunks/SavedBlocksPickBar-4HrqQfvl.js.map +1 -0
  88. package/dist/cdn/chunks/{TemplateScoringPanel-NucRtAP0.js → TemplateScoringPanel-Xdkp2EMY.js} +81 -81
  89. package/dist/cdn/chunks/TemplateScoringPanel-Xdkp2EMY.js.map +1 -0
  90. package/dist/cdn/chunks/TestEmailModal-yfmFiavR.js +206 -0
  91. package/dist/cdn/chunks/TestEmailModal-yfmFiavR.js.map +1 -0
  92. package/dist/{TestEmailPanel-B6goIAxT.js → cdn/chunks/TestEmailPanel-DqTDh5ri.js} +6 -4
  93. package/dist/cdn/chunks/{TestEmailPanel-CZAG1gQE.js.map → TestEmailPanel-DqTDh5ri.js.map} +1 -1
  94. package/dist/cdn/chunks/{TitleEditor-D0_LY2Ex.js → TitleEditor-nUAF7fKr.js} +85 -84
  95. package/dist/cdn/chunks/TitleEditor-nUAF7fKr.js.map +1 -0
  96. package/dist/cdn/chunks/TplModal-C0IqikoV.js +50 -0
  97. package/dist/cdn/chunks/TplModal-C0IqikoV.js.map +1 -0
  98. package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js +148 -0
  99. package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js.map +1 -0
  100. package/dist/cdn/chunks/VersionHistoryPanels-6Hz9w20W.js +48 -0
  101. package/dist/cdn/chunks/VersionHistoryPanels-6Hz9w20W.js.map +1 -0
  102. package/dist/cdn/chunks/VersionPreviewBanner-D098_6_I.js +40 -0
  103. package/dist/cdn/chunks/VersionPreviewBanner-D098_6_I.js.map +1 -0
  104. package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js → blockTypeIcons-hX_W4dqo.js} +2 -2
  105. package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js.map → blockTypeIcons-hX_W4dqo.js.map} +1 -1
  106. package/dist/cdn/chunks/{ca-D1zgI9fQ.js → ca-Cqg9O8mx.js} +70 -7
  107. package/dist/cdn/chunks/ca-Cqg9O8mx.js.map +1 -0
  108. package/dist/{cloud-qINCmQbn.js → cdn/chunks/cloud-BA0OpRh-.js} +400 -609
  109. package/dist/cdn/chunks/cloud-BA0OpRh-.js.map +1 -0
  110. package/dist/cdn/chunks/createCloudRuntime-DmzV7OnU.js +344 -0
  111. package/dist/cdn/chunks/createCloudRuntime-DmzV7OnU.js.map +1 -0
  112. package/dist/{de-DHra3lvx.js → cdn/chunks/de-BXmeeFbX.js} +71 -6
  113. package/dist/cdn/chunks/de-BXmeeFbX.js.map +1 -0
  114. package/dist/{de-uVoSP1xF.js → cdn/chunks/de-Dbwm2cON.js} +3 -54
  115. package/dist/cdn/chunks/de-Dbwm2cON.js.map +1 -0
  116. package/dist/cdn/chunks/{dist-B2HKGHnc.js → dist-CM8TB0VD.js} +136 -136
  117. package/dist/cdn/chunks/{dist-B2HKGHnc.js.map → dist-CM8TB0VD.js.map} +1 -1
  118. package/dist/cdn/chunks/{dist-C6z8AjBC.js → dist-CYLJiSiH.js} +63 -63
  119. package/dist/cdn/chunks/{dist-C6z8AjBC.js.map → dist-CYLJiSiH.js.map} +1 -1
  120. package/dist/cdn/chunks/{draggable-DCs9qL-b.js → draggable-BfpsXFg7.js} +916 -905
  121. package/dist/cdn/chunks/{draggable-DCs9qL-b.js.map → draggable-BfpsXFg7.js.map} +1 -1
  122. package/dist/cdn/chunks/{en-DlqX2YWZ.js → en-DbBNy67B.js} +70 -7
  123. package/dist/cdn/chunks/en-DbBNy67B.js.map +1 -0
  124. package/dist/{en-CjhsJxb-.js → cdn/chunks/en-Dzw4EqNI.js} +3 -54
  125. package/dist/cdn/chunks/en-Dzw4EqNI.js.map +1 -0
  126. package/dist/cdn/chunks/{es-Cuss2snv.js → es-JUsAjxWu.js} +70 -7
  127. package/dist/cdn/chunks/es-JUsAjxWu.js.map +1 -0
  128. package/dist/cdn/chunks/{extensions-C7h52yuk.js → extensions-CMcVw2uu.js} +81 -67
  129. package/dist/cdn/chunks/extensions-CMcVw2uu.js.map +1 -0
  130. package/dist/{fr-Cm85vB2g.js → cdn/chunks/fr-J3qgXH4h.js} +71 -6
  131. package/dist/cdn/chunks/fr-J3qgXH4h.js.map +1 -0
  132. package/dist/cdn/chunks/{icons-CvYN6zrM.js → icons-C36Ha5VU.js} +11 -11
  133. package/dist/cdn/chunks/{icons-CvYN6zrM.js.map → icons-C36Ha5VU.js.map} +1 -1
  134. package/dist/{keys-fwF3qZax.js → cdn/chunks/keys-CbQuRX85.js} +6 -4
  135. package/dist/cdn/chunks/keys-CbQuRX85.js.map +1 -0
  136. package/dist/cdn/chunks/logger-ByvdoAwq.js +23 -0
  137. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +1 -0
  138. package/dist/cdn/chunks/{nl-dmiIX7oT.js → nl-D_4DkqOi.js} +70 -7
  139. package/dist/cdn/chunks/nl-D_4DkqOi.js.map +1 -0
  140. package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js +23 -0
  141. package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js.map +1 -0
  142. package/dist/{pt-BR-CTzHTqJD.js → cdn/chunks/pt-BR-BxzQzWGJ.js} +3 -54
  143. package/dist/cdn/chunks/pt-BR-BxzQzWGJ.js.map +1 -0
  144. package/dist/cdn/chunks/{pt-BR-CaIG-7EM.js → pt-BR-KGURyEEQ.js} +70 -7
  145. package/dist/cdn/chunks/pt-BR-KGURyEEQ.js.map +1 -0
  146. package/dist/cdn/chunks/{src-CUKUsRzX.js → src-BOjFLNf7.js} +148 -134
  147. package/dist/cdn/chunks/src-BOjFLNf7.js.map +1 -0
  148. package/dist/cdn/chunks/{src-xkGep9eN.js → src-Dq3fgSIx.js} +1448 -1458
  149. package/dist/cdn/chunks/src-Dq3fgSIx.js.map +1 -0
  150. package/dist/cdn/chunks/styleConstants-ByDqaYj_.js +61 -0
  151. package/dist/cdn/chunks/styleConstants-ByDqaYj_.js.map +1 -0
  152. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +6 -0
  153. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +1 -0
  154. package/dist/cdn/chunks/{tiptap-C44S1Cmh.js → tiptap-DmpGap5g.js} +40 -40
  155. package/dist/cdn/chunks/{tiptap-C44S1Cmh.js.map → tiptap-DmpGap5g.js.map} +1 -1
  156. package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js → useAliveFlag-Dtm174fG.js} +2 -2
  157. package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js.map → useAliveFlag-Dtm174fG.js.map} +1 -1
  158. package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js → useCloudI18n-NVa1aeY8.js} +5 -5
  159. package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js.map → useCloudI18n-NVa1aeY8.js.map} +1 -1
  160. package/dist/cdn/chunks/{useEditorCore-CKQ9gmoo.js → useEditorCore-CTu_qZ3W.js} +1434 -1147
  161. package/dist/cdn/chunks/useEditorCore-CTu_qZ3W.js.map +1 -0
  162. package/dist/cdn/chunks/{useI18n-UMs0F71x.js → useI18n-DVWCJJFH.js} +5 -5
  163. package/dist/cdn/chunks/{useI18n-UMs0F71x.js.map → useI18n-DVWCJJFH.js.map} +1 -1
  164. package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js → useMergeTag-BfZBRPQp.js} +4 -4
  165. package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js.map → useMergeTag-BfZBRPQp.js.map} +1 -1
  166. package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js → usePopoverPosition-BC-HA7TK.js} +3 -3
  167. package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js.map → usePopoverPosition-BC-HA7TK.js.map} +1 -1
  168. package/dist/cdn/editor.css +1 -1
  169. package/dist/cdn/editor.js +5103 -284
  170. package/dist/cdn/editor.js.map +1 -1
  171. package/dist/{check-On4TSac-.js → check-DZbmkMQe.js} +1 -1
  172. package/dist/{chevron-down-69EiBGoB.js → chevron-down-nYScOLeZ.js} +1 -1
  173. package/dist/{chevron-up-Dh3MG1Dw.js → chevron-up-CpYpDLnc.js} +1 -1
  174. package/dist/{circle-alert-cilwzafX.js → circle-alert-CuuK6thq.js} +1 -1
  175. package/dist/{clock-Dt0APH92.js → clock-DxkrtqOr.js} +1 -1
  176. package/dist/cloud-BAefVBb_.js +1444 -0
  177. package/dist/createCloudRuntime-Bt8W-ajI.js +342 -0
  178. package/dist/{createLucideIcon-C8WzBYCv.js → createLucideIcon-L-wQXW_R.js} +9 -9
  179. package/dist/{cdn/chunks/de-DHra3lvx.js → de-BXmeeFbX.js} +69 -8
  180. package/dist/{cdn/chunks/de-uVoSP1xF.js → de-Dbwm2cON.js} +1 -56
  181. package/dist/dist-B5iReTtK.js +251 -0
  182. package/dist/{dist-Cl8J0IES.js → dist-Ck9roB6K.js} +42 -42
  183. package/dist/{dist-BpKxrUi2.js → dist-CqcGTIiX.js} +46 -46
  184. package/dist/{en-DlqX2YWZ.js → en-DbBNy67B.js} +69 -6
  185. package/dist/{cdn/chunks/en-CjhsJxb-.js → en-Dzw4EqNI.js} +1 -56
  186. package/dist/{es-Cuss2snv.js → es-JUsAjxWu.js} +69 -6
  187. package/dist/{extensions-DzKNPITR.js → extensions-CX87G4aL.js} +71 -57
  188. package/dist/{cdn/chunks/fr-Cm85vB2g.js → fr-J3qgXH4h.js} +69 -8
  189. package/dist/{image-up-Ceggh_R3.js → image-up-DouZRGVt.js} +1 -1
  190. package/dist/index.d.ts +499 -23
  191. package/dist/{info-DO5odBcZ.js → info-puX5V6Iq.js} +1 -1
  192. package/dist/{cdn/chunks/keys-Cmc2Yl3D.js → keys-BxixS0TN.js} +4 -6
  193. package/dist/{list-checks-BSkPKbuI.js → list-checks-jw-ZlvWY.js} +1 -1
  194. package/dist/{loader-circle-bO7o7_HD.js → loader-circle-DqTxB7Kr.js} +1 -1
  195. package/dist/logger-BBlvSn6q.js +21 -0
  196. package/dist/{message-circle-BEkAk65X.js → message-circle-BZ7YpB22.js} +1 -1
  197. package/dist/{nl-dmiIX7oT.js → nl-D_4DkqOi.js} +69 -6
  198. package/dist/{pencil-t6m0EtKL.js → pencil-DmbRhTJu.js} +1 -1
  199. package/dist/preRenderCustomBlocks-BebjKtmw.js +21 -0
  200. package/dist/{cdn/chunks/pt-BR-CTzHTqJD.js → pt-BR-BxzQzWGJ.js} +1 -56
  201. package/dist/{pt-BR-CaIG-7EM.js → pt-BR-KGURyEEQ.js} +69 -6
  202. package/dist/{refresh-cw-CkOYVzK5.js → refresh-cw-OK_O-cL0.js} +1 -1
  203. package/dist/{runtime-dom.esm-bundler-CepEmvwF.js → runtime-dom.esm-bundler-BgKXIPLV.js} +144 -144
  204. package/dist/{scan-line-DwSVj25O.js → scan-line-DyaSTsJ5.js} +1 -1
  205. package/dist/{send-CWsWN8PQ.js → send-B-wasJJC.js} +1 -1
  206. package/dist/{shield-check-qje8Kufw.js → shield-check-DUIyRrTo.js} +1 -1
  207. package/dist/{sparkles-DumaWRW-.js → sparkles-DYEMATWC.js} +1 -1
  208. package/dist/style.css +1 -1
  209. package/dist/styleConstants-ByDqaYj_.js +59 -0
  210. package/dist/templatical-editor.js +5303 -289
  211. package/dist/{text-align-start-Ir8Ah4mT.js → text-align-start-CzjLeBLe.js} +1 -1
  212. package/dist/timeouts-DHPZQ0G3.js +4 -0
  213. package/dist/{trash-2-CklAFCmO.js → trash-2-C0shEPry.js} +1 -1
  214. package/dist/{triangle-alert-BBi4n93g.js → triangle-alert-Fw0ce8oQ.js} +1 -1
  215. package/dist/{upload-sVqqppuv.js → upload-D69C2CBx.js} +3 -4
  216. package/dist/{useAliveFlag-cvyBxHp7.js → useAliveFlag-BGIAZii_.js} +1 -1
  217. package/dist/{useCloudI18n-DKVm6PCa.js → useCloudI18n-CAZTZ9_a.js} +2 -2
  218. package/dist/{useEditorCore-idmPLUeb.js → useEditorCore-B-kONNRw.js} +1604 -1320
  219. package/dist/{useI18n-DoVKdCTH.js → useI18n-BfXff_Sy.js} +2 -2
  220. package/dist/{useMergeTag-CYZk7dZD.js → useMergeTag-Dd4I7kge.js} +3 -3
  221. package/dist/usePopoverPosition-CxhCX3SQ.js +59 -0
  222. package/dist/{vue.runtime.esm-bundler-D1diBMsm.js → vue.runtime.esm-bundler-DzEsDRtY.js} +447 -436
  223. package/dist/{x-Mby7KlhS.js → x-BjTlFqRv.js} +1 -1
  224. package/package.json +7 -7
  225. package/dist/AiFeatureMenu-BY6mubnR.js +0 -63
  226. package/dist/BlockPreviewCanvas-DbNOqSI1.js +0 -121
  227. package/dist/CloudEditor-DEnMNMbm.js +0 -1188
  228. package/dist/ColorPicker-ClETsjA3.js +0 -550
  229. package/dist/CommentsSidebar-CdRCCSDD.js +0 -435
  230. package/dist/SaveBlockDialog-fVp_PwZi.js +0 -265
  231. package/dist/SnapshotHistory-DjA3Ej_i.js +0 -128
  232. package/dist/TestEmailModal-EM0RP_9L.js +0 -205
  233. package/dist/TitleEditor-JEaP9jVF.js +0 -197
  234. package/dist/TplModal-DoneXIj_.js +0 -49
  235. package/dist/cdn/chunks/AiChatSidebar-CQ8KUmNB.js.map +0 -1
  236. package/dist/cdn/chunks/AiFeatureMenu-Cwj8afsi.js +0 -63
  237. package/dist/cdn/chunks/AiFeatureMenu-Cwj8afsi.js.map +0 -1
  238. package/dist/cdn/chunks/CloudEditor-CQ830jJt.js +0 -1166
  239. package/dist/cdn/chunks/CloudEditor-CQ830jJt.js.map +0 -1
  240. package/dist/cdn/chunks/CollaboratorBar-BF469_AN.js.map +0 -1
  241. package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js +0 -552
  242. package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js.map +0 -1
  243. package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js +0 -412
  244. package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js.map +0 -1
  245. package/dist/cdn/chunks/DesignReferenceSidebar-B-HFXV0W.js.map +0 -1
  246. package/dist/cdn/chunks/IssuesPanel-DKTS4QVb.js.map +0 -1
  247. package/dist/cdn/chunks/MergeTagSuggestion-Dn8dExNa.js.map +0 -1
  248. package/dist/cdn/chunks/NumberWithSuffix-BXrRdfq1.js.map +0 -1
  249. package/dist/cdn/chunks/ParagraphEditor-Bzcma_Lm.js.map +0 -1
  250. package/dist/cdn/chunks/RichTextEditorContent-DtL49Jpo.js.map +0 -1
  251. package/dist/cdn/chunks/SaveBlockDialog-BfNVeXXV.js +0 -264
  252. package/dist/cdn/chunks/SaveBlockDialog-BfNVeXXV.js.map +0 -1
  253. package/dist/cdn/chunks/SavedBlocksBrowserModal-C59D4G5C.js.map +0 -1
  254. package/dist/cdn/chunks/SavedBlocksPickBar-DMHxPCM4.js.map +0 -1
  255. package/dist/cdn/chunks/SnapshotHistory-80tAU_VX.js +0 -121
  256. package/dist/cdn/chunks/SnapshotHistory-80tAU_VX.js.map +0 -1
  257. package/dist/cdn/chunks/TemplateScoringPanel-NucRtAP0.js.map +0 -1
  258. package/dist/cdn/chunks/TestEmailModal-DdWfAGNe.js +0 -205
  259. package/dist/cdn/chunks/TestEmailModal-DdWfAGNe.js.map +0 -1
  260. package/dist/cdn/chunks/TitleEditor-D0_LY2Ex.js.map +0 -1
  261. package/dist/cdn/chunks/TplModal-iCmoKB2k.js +0 -50
  262. package/dist/cdn/chunks/TplModal-iCmoKB2k.js.map +0 -1
  263. package/dist/cdn/chunks/ca-D1zgI9fQ.js.map +0 -1
  264. package/dist/cdn/chunks/cloud-DcC8bPwn.js +0 -1787
  265. package/dist/cdn/chunks/cloud-DcC8bPwn.js.map +0 -1
  266. package/dist/cdn/chunks/de-DHra3lvx.js.map +0 -1
  267. package/dist/cdn/chunks/de-uVoSP1xF.js.map +0 -1
  268. package/dist/cdn/chunks/en-CjhsJxb-.js.map +0 -1
  269. package/dist/cdn/chunks/en-DlqX2YWZ.js.map +0 -1
  270. package/dist/cdn/chunks/es-Cuss2snv.js.map +0 -1
  271. package/dist/cdn/chunks/extensions-C7h52yuk.js.map +0 -1
  272. package/dist/cdn/chunks/fr-Cm85vB2g.js.map +0 -1
  273. package/dist/cdn/chunks/keys-Cmc2Yl3D.js.map +0 -1
  274. package/dist/cdn/chunks/nl-dmiIX7oT.js.map +0 -1
  275. package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +0 -1
  276. package/dist/cdn/chunks/pt-BR-CaIG-7EM.js.map +0 -1
  277. package/dist/cdn/chunks/src-CUKUsRzX.js.map +0 -1
  278. package/dist/cdn/chunks/src-xkGep9eN.js.map +0 -1
  279. package/dist/cdn/chunks/styles-CND3ey2g.js +0 -4140
  280. package/dist/cdn/chunks/styles-CND3ey2g.js.map +0 -1
  281. package/dist/cdn/chunks/timeouts-SsLMC4a3.js +0 -6
  282. package/dist/cdn/chunks/timeouts-SsLMC4a3.js.map +0 -1
  283. package/dist/cdn/chunks/useEditorCore-CKQ9gmoo.js.map +0 -1
  284. package/dist/styles-BK36D1sy.js +0 -4318
  285. package/dist/usePopoverPosition-C0dPEF4X.js +0 -308
package/dist/index.d.ts CHANGED
@@ -3,12 +3,14 @@ import { BlockDefaults } from '@templatical/types';
3
3
  import type { CollaborationConfig } from '@templatical/types';
4
4
  import { ColorsConfig } from '@templatical/types';
5
5
  import type { CommentEvent } from '@templatical/types';
6
+ import type { CommentsProvider } from '@templatical/types';
6
7
  import { ComputedRef } from 'vue';
7
8
  import { createLocalStorageSavedBlocksProvider } from '@templatical/core';
8
9
  import type { CustomBlock } from '@templatical/types';
9
10
  import { CustomBlockDefinition } from '@templatical/types';
10
11
  import { CustomFont } from '@templatical/types';
11
12
  import { DisplayConditionsConfig } from '@templatical/types';
13
+ import type { EditorUser } from '@templatical/types';
12
14
  import { FontsConfig } from '@templatical/types';
13
15
  import { LintOptions } from '@templatical/quality';
14
16
  import { LocalStorageSavedBlocksOptions } from '@templatical/core';
@@ -21,20 +23,41 @@ import type { MediaRequestContext } from '@templatical/media-library';
21
23
  import type { MediaResult } from '@templatical/types';
22
24
  import { MergeTagsConfig } from '@templatical/types';
23
25
  import { Ref } from 'vue';
26
+ import { RenderPayload } from '@templatical/types';
27
+ import { RenderProvider } from '@templatical/types';
24
28
  import type { ResolvePreview } from '@templatical/types';
25
29
  import { SavedBlock } from '@templatical/types';
26
30
  import { SavedBlocksListParams } from '@templatical/types';
27
31
  import { SavedBlocksProvider } from '@templatical/types';
28
- import { SaveResult } from '@templatical/types';
29
32
  import { Template } from '@templatical/types';
30
33
  import { TemplateContent } from '@templatical/types';
31
34
  import { TemplateDefaults } from '@templatical/types';
35
+ import { TemplatePatch } from '@templatical/types';
36
+ import { TemplatesProvider } from '@templatical/types';
32
37
  import { TestEmailPayload } from '@templatical/types';
33
38
  import { TestEmailProvider } from '@templatical/types';
34
39
  import { ThemeOverrides } from '@templatical/types';
35
40
  import { UiTheme } from '@templatical/types';
41
+ import type { VersionHistoryProvider } from '@templatical/types';
36
42
  import { ViewportSize } from '@templatical/types';
37
43
 
44
+ /**
45
+ * How often the editor's single debounced tick fires, and whether it saves.
46
+ *
47
+ * `true` / `false` turn autosave on and off at the default cadence; the object
48
+ * form turns it on and sets the cadence in one key. One key rather than a
49
+ * `boolean` plus a separate `autoSaveDebounce`, so there is no combination —
50
+ * `autoSave: false, autoSaveDebounce: 500` — that reads as configured but does
51
+ * nothing.
52
+ *
53
+ * The debounce governs `onChange` too: both ride one `useAutoSave` instance so
54
+ * the notification and the save cannot drift apart, and so both inherit the
55
+ * pause-during-undo/redo behaviour `useEditorCore` wires around it.
56
+ */
57
+ declare type AutoSaveConfig = boolean | {
58
+ debounce?: number;
59
+ };
60
+
38
61
  export { BlockDefaults }
39
62
 
40
63
  export { ColorsConfig }
@@ -54,9 +77,42 @@ export declare interface EditorCapabilities {
54
77
  ai?: {
55
78
  isFeatureEnabled(feature: string): boolean;
56
79
  };
80
+ /**
81
+ * Present only when a `CommentsProvider` **and** a `user` are configured — via
82
+ * `init({ comments, user })`, or in Cloud whenever the plan grants `commenting`
83
+ * (its `user` comes from the JWT).
84
+ */
57
85
  comments?: {
58
86
  getBlockCount(blockId: string): number;
59
87
  openForBlock(blockId: string): void;
88
+ /**
89
+ * Whether the block exists in the **stored** template. A comment is anchored
90
+ * server-side, so filtering to a block that only exists on the canvas has
91
+ * nothing to show — the panel says so rather than rendering an empty list.
92
+ *
93
+ * Always `true` for a store that accepts any anchor; Cloud is what supplies a
94
+ * real answer.
95
+ */
96
+ isBlockSaved(blockId: string): boolean;
97
+ /**
98
+ * Whether the feature is usable right now. Reactive for the same reason as
99
+ * `savedBlocks.isAvailable`, plus one of its own: with no `user` there is
100
+ * nobody to attribute a comment to, so the feature reports itself unavailable
101
+ * rather than writing an anonymous one.
102
+ */
103
+ isAvailable: ComputedRef<boolean>;
104
+ /** Open threads — the count badge on the header trigger. */
105
+ unresolvedCount: ComputedRef<number>;
106
+ /**
107
+ * Which mutations the provider supplied — `false` instead of a function
108
+ * withholds one. Shared UI hides the corresponding affordance: with all four
109
+ * false the review is read-only (threads readable, jump-to-block working, no
110
+ * way to add, edit, delete or resolve).
111
+ */
112
+ canCreate: ComputedRef<boolean>;
113
+ canUpdate: ComputedRef<boolean>;
114
+ canDelete: ComputedRef<boolean>;
115
+ canResolve: ComputedRef<boolean>;
60
116
  };
61
117
  /**
62
118
  * Present only when a `SavedBlocksProvider` is configured — in OSS via
@@ -108,6 +164,81 @@ export declare interface EditorCapabilities {
108
164
  * `init({ testEmail })`, in Cloud whenever cloud mode is active (or when a
109
165
  * consumer supplied their own sender to `initCloud()`).
110
166
  */
167
+ /**
168
+ * Present only when a `TemplatesProvider` is configured — in OSS via
169
+ * `init({ templates })`.
170
+ *
171
+ * Everything the header needs to render the template's identity and its save
172
+ * state, so the same chrome works over any storage backend.
173
+ */
174
+ templates?: {
175
+ /**
176
+ * Persist now. Fire-and-forget: the outcome lands in {@link status}. A no-op
177
+ * while a save is running, without a loaded template, or when the provider
178
+ * withheld `save`.
179
+ */
180
+ save(): void;
181
+ /**
182
+ * Commit an inline rename and persist it. Empty names and no-change commits
183
+ * are ignored.
184
+ */
185
+ rename(name: string): void;
186
+ /** The loaded template's name, `undefined` when unnamed or not loaded. */
187
+ name: ComputedRef<string | undefined>;
188
+ /**
189
+ * When the stored template was last written, for the header's relative
190
+ * label. `updatedAt` when the store supplies it, otherwise `createdAt`;
191
+ * `null` when it supplies neither, which renders no line at all. `kind` is
192
+ * what picks the "Updated"/"Created" wording.
193
+ */
194
+ timestamp: ComputedRef<{
195
+ iso: string;
196
+ kind: "updatedAt" | "createdAt";
197
+ } | null>;
198
+ /** Whether `create()` or `load()` has resolved — nothing to save until then. */
199
+ hasTemplate: ComputedRef<boolean>;
200
+ isSaving: ComputedRef<boolean>;
201
+ /** Drives the three-state status indicator. */
202
+ status: Ref<"idle" | "saved" | "error">;
203
+ errorMessage: Ref<string>;
204
+ /**
205
+ * Which mutations the provider supplied — `false` instead of a function
206
+ * withholds one. With `canSave` false the save button *and* the status
207
+ * indicator disappear, and the name becomes read-only: there is nowhere for
208
+ * a change to go.
209
+ */
210
+ canCreate: ComputedRef<boolean>;
211
+ canSave: ComputedRef<boolean>;
212
+ /**
213
+ * Whether the feature is usable right now. Reactive for the same reason as
214
+ * `savedBlocks.isAvailable`.
215
+ */
216
+ isAvailable: ComputedRef<boolean>;
217
+ };
218
+ /**
219
+ * Present only when a `VersionHistoryProvider` is configured — via
220
+ * `init({ versionHistory })` or `initCloud({ versionHistory })`.
221
+ */
222
+ versionHistory?: {
223
+ /** Re-read the list from the provider. A no-op before a template exists. */
224
+ refresh(): void;
225
+ /** True while a past version is on the canvas instead of the user's work. */
226
+ isPreviewing: ComputedRef<boolean>;
227
+ /** Nothing has a history until `create()` or `load()` has resolved. */
228
+ hasTemplate: ComputedRef<boolean>;
229
+ /**
230
+ * Whether the feature is usable right now. Reactive for the same reason as
231
+ * `savedBlocks.isAvailable`.
232
+ */
233
+ isAvailable: ComputedRef<boolean>;
234
+ /**
235
+ * Which mutations the provider supplied — `false` instead of a function
236
+ * withholds one. With `canRestore` false the history is browsable and
237
+ * previewable but the Restore action does not render.
238
+ */
239
+ canCreate: ComputedRef<boolean>;
240
+ canRestore: ComputedRef<boolean>;
241
+ };
111
242
  testEmail?: {
112
243
  /** Open the send dialog. A no-op while {@link isAvailable} is false. */
113
244
  open(): void;
@@ -157,6 +288,35 @@ export declare type HtmlBlockPreviewConfig = boolean | {
157
288
 
158
289
  export declare function init(config: TemplaticalEditorConfig): Promise<TemplaticalEditor>;
159
290
 
291
+ /**
292
+ * Mount the editor against Templatical Cloud.
293
+ *
294
+ * **This is `init()` with Cloud's adapters filled in**, and deliberately nothing
295
+ * more. Templates, rendering and version history are providers, so Cloud's entry
296
+ * point is adapter wiring rather than a second editor:
297
+ *
298
+ * 1. Build the auth manager and complete the handshake.
299
+ * 2. Health-check the API, and fetch the plan config.
300
+ * 3. Build Cloud's adapters over that auth manager.
301
+ * 4. Delegate to `init()`.
302
+ *
303
+ * A failure in steps 1–2 **rejects**, rather than mounting an editor that shows
304
+ * an error overlay. That is the one place the wrapper is genuinely not `init()`:
305
+ * `init()` cannot fail after it mounts, and OSS should not grow the ability. A
306
+ * session that dies *later* — an auth refresh that cannot renew the token — does
307
+ * still surface as an overlay, because by then there is an editor to cover.
308
+ *
309
+ * `templates`, `versionHistory` and `comments` are the three keys `initCloud()`
310
+ * refuses: all are keyed to a template id Cloud issued, which also anchors
311
+ * collaboration, AI rewrite, scoring and the server-side export. A store Cloud
312
+ * never issued ids for would degrade all of them silently. Everything else —
313
+ * `render`, `savedBlocks`, `testEmail`, `resolvePreview` — is the same key with the
314
+ * same type on both entry points, so upgrading an OSS integration is a deletion.
315
+ *
316
+ * `user` is not a key either: Cloud signs comment writes against the auth token's
317
+ * `user` claim, so it fills `init({ user })` from there rather than letting a
318
+ * browser name someone else.
319
+ */
160
320
  export declare function initCloud(config: TemplaticalCloudEditorConfig): Promise<TemplaticalCloudEditor>;
161
321
 
162
322
  /** Check if a locale has cloud translations (matched by exact locale, then base). */
@@ -178,6 +338,10 @@ export { MergeTagsConfig }
178
338
  /** Function type for media browser requests, used by both OSS and Cloud editors. */
179
339
  export declare type OnRequestMedia = (context?: MediaRequestContext) => Promise<MediaResult | null>;
180
340
 
341
+ export { RenderPayload }
342
+
343
+ export { RenderProvider }
344
+
181
345
  /**
182
346
  * Display-only resolver for image `src` values (`config.resolveImageUrl`,
183
347
  * #415). Maps a canonical src (e.g. a plain file name like `logo.png`) to a
@@ -193,26 +357,32 @@ export { SavedBlocksListParams }
193
357
 
194
358
  export { SavedBlocksProvider }
195
359
 
196
- export { SaveResult }
197
-
198
360
  export { Template }
199
361
 
200
362
  export { TemplateContent }
201
363
 
202
364
  export { TemplateDefaults }
203
365
 
366
+ export { TemplatePatch }
367
+
368
+ export { TemplatesProvider }
369
+
204
370
  /**
205
- * Cloud editor does not expose `toMjml` or `renderCustomBlock`: the cloud
206
- * backend performs MJML conversion server-side with additional processing
207
- * (e.g., signed image URLs, attachment handling) that isn't available client
208
- * side. Use the cloud `save()` flow to persist content; the backend handles
209
- * MJML/HTML export from there.
371
+ * `initCloud()` returns the **same** editor `init()` does.
372
+ *
373
+ * That is the point rather than a tidy-up: Cloud is a set of provider
374
+ * implementations behind the same interfaces a consumer would implement, so if
375
+ * the two entry points still returned different shapes, the claim would be
376
+ * false. It also means moving between them is a config change and never a
377
+ * rewrite of the calling code.
378
+ *
379
+ * Three cloud-only members went with the convergence: `setThemeOverrides`
380
+ * (`config.theme` is applied at init on both entry points, and the entitlement
381
+ * that gated changing it later is gone), and `sendTestEmail` (the shared dialog
382
+ * is the supported path). `create()` takes `init()`'s `{ name?, content? }`
383
+ * input object rather than a bare `TemplateContent`.
210
384
  */
211
- export declare interface TemplaticalCloudEditor extends TemplaticalEditorBase {
212
- create(content?: TemplateContent): Promise<Template>;
213
- load(templateId: string): Promise<Template>;
214
- save(): Promise<SaveResult>;
215
- }
385
+ export declare type TemplaticalCloudEditor = TemplaticalEditor;
216
386
 
217
387
  export declare interface TemplaticalCloudEditorConfig {
218
388
  container: string | HTMLElement;
@@ -272,6 +442,19 @@ export declare interface TemplaticalCloudEditorConfig {
272
442
  * @default true
273
443
  */
274
444
  smallScreenNotice?: boolean;
445
+ /**
446
+ * Show the template's name in the header, inline-editable. Defaults to `true`.
447
+ *
448
+ * Set to `false` when your store has no name column, or when your own chrome
449
+ * owns the name. Hides the field only — `create({ name })`, `setName()` and the
450
+ * `name` in each save patch keep working, so a headless caller or your own UI
451
+ * can still manage names.
452
+ *
453
+ * Without a `templates` provider the header renders no name field either way.
454
+ *
455
+ * @default true
456
+ */
457
+ templateNameField?: boolean;
275
458
  ai?: AiConfig | false;
276
459
  commenting?: boolean;
277
460
  collaboration?: CollaborationConfig;
@@ -293,8 +476,13 @@ export declare interface TemplaticalCloudEditorConfig {
293
476
  * leaving it exactly as-is (to keep your own) — never rewriting it.
294
477
  */
295
478
  savedBlocks?: boolean | SavedBlocksProvider;
296
- autoSave?: boolean;
297
- autoSaveDebounce?: number;
479
+ /**
480
+ * Save automatically, debounced. **The same key and the same type as
481
+ * `init()`** — `true`/`false`, or `{ debounce }` to set the cadence in one
482
+ * key. Unlike OSS it defaults to *on*, because a Cloud session always has a
483
+ * store to save to.
484
+ */
485
+ autoSave?: AutoSaveConfig;
298
486
  mergeTags?: MergeTagsConfig;
299
487
  logicTags?: LogicTagsConfig;
300
488
  displayConditions?: DisplayConditionsConfig;
@@ -331,7 +519,20 @@ export declare interface TemplaticalCloudEditorConfig {
331
519
  */
332
520
  colors?: ColorsConfig;
333
521
  onChange?: (content: TemplateContent) => void;
334
- onSave?: (result: SaveResult) => void;
522
+ /**
523
+ * Called whenever the editor's unsaved-changes state flips. **The same key and
524
+ * the same type as `init()`'s** — one editor, one set of keys.
525
+ */
526
+ onDirtyChange?: (isDirty: boolean) => void;
527
+ /**
528
+ * Warn before closing the tab with unsaved changes. On by default, since a
529
+ * Cloud session always has a store to save to. Set to `false` to own the
530
+ * prompt yourself; it can never cover client-side route changes either way,
531
+ * which is what {@link onDirtyChange} is for.
532
+ *
533
+ * @default true
534
+ */
535
+ unsavedChangesGuard?: boolean;
335
536
  onCreate?: (template: Template) => void;
336
537
  onLoad?: (template: Template) => void;
337
538
  onError?: (error: Error) => void;
@@ -383,11 +584,33 @@ export declare interface TemplaticalCloudEditorConfig {
383
584
 
384
585
  export declare interface TemplaticalEditor extends TemplaticalEditorBase {
385
586
  /**
386
- * Render the current template to an MJML string. Resolves custom blocks
387
- * via the editor's internal block registry. Throws if the optional
388
- * `@templatical/renderer` package is not installed.
587
+ * Persist the current content as a new template through the configured
588
+ * `templates` provider, and make the result the editor's template.
589
+ *
590
+ * `input.content`, when given, replaces the editor's content first. Always
591
+ * present on the type; rejects with an explanatory error when no provider is
592
+ * configured or when the provider set `create: false` — the same convention as
593
+ * {@link toMjml}.
389
594
  */
390
- toMjml(): Promise<string>;
595
+ create(input?: {
596
+ name?: string;
597
+ content?: TemplateContent;
598
+ }): Promise<Template>;
599
+ /** Load a template by id and make it the editor's content. */
600
+ load(templateId: string): Promise<Template>;
601
+ /**
602
+ * Persist the loaded template — name and content, as one patch. Rejects when
603
+ * no provider is configured, when the provider set `save: false`, or when no
604
+ * template has been created or loaded yet.
605
+ */
606
+ save(): Promise<Template>;
607
+ /**
608
+ * Whether there are edits the editor knows aren't persisted. Cleared by a
609
+ * successful `save()` / `create()` / `load()`.
610
+ *
611
+ * Read it in a router guard; `onDirtyChange` is the push-based counterpart.
612
+ */
613
+ isDirty(): boolean;
391
614
  /**
392
615
  * Render a single custom block to its HTML representation, using the
393
616
  * registered custom block definition's template and the block's current
@@ -411,6 +634,25 @@ declare interface TemplaticalEditorBase {
411
634
  setContent(content: TemplateContent): void;
412
635
  setTheme(theme: UiTheme): void;
413
636
  unmount(): void;
637
+ /**
638
+ * Render the current template to MJML.
639
+ *
640
+ * Resolves `render.toMjml` first when a `render` provider supplies it, then the
641
+ * bundled `@templatical/renderer` (which resolves custom blocks through the
642
+ * editor's own registry). Rejects with a clear error when neither is available —
643
+ * i.e. no provider method *and* the optional `@templatical/renderer` peer isn't
644
+ * installed.
645
+ */
646
+ toMjml(): Promise<string>;
647
+ /**
648
+ * Render the current template to sending-ready HTML.
649
+ *
650
+ * Resolves `render.toHtml` first, then `toMjml()`'s output through
651
+ * `render.compileMjml`. **Requires one of the two** — the SDK bundles no MJML
652
+ * compiler, so with no `render` provider this always rejects, and the error says
653
+ * which method to add.
654
+ */
655
+ toHtml(): Promise<string>;
414
656
  }
415
657
 
416
658
  export declare interface TemplaticalEditorConfig {
@@ -449,8 +691,158 @@ export declare interface TemplaticalEditorConfig {
449
691
  */
450
692
  shadowDom?: boolean;
451
693
  onChange?: (content: TemplateContent) => void;
452
- onSave?: (content: TemplateContent) => void;
453
694
  onError?: (error: Error) => void;
695
+ /**
696
+ * Called whenever the editor's unsaved-changes state flips — `true` on the
697
+ * first edit after a save, `false` once a save completes.
698
+ *
699
+ * Works with or without a `templates` provider, because the editor's own
700
+ * `beforeunload` guard cannot cover SPA route changes: an embedded editor's
701
+ * consumer has to guard their router themselves, and this is what they guard
702
+ * it with.
703
+ */
704
+ onDirtyChange?: (isDirty: boolean) => void;
705
+ /**
706
+ * Storage backend for **the template itself** — the save/load lifecycle around
707
+ * whatever is on the canvas.
708
+ *
709
+ * The editor owns the header's name field, save button and save-status
710
+ * indicator, the Cmd+S shortcut, autosave and the unsaved-changes guard; you
711
+ * own persistence. Three methods:
712
+ *
713
+ * ```ts
714
+ * const editor = await init({
715
+ * container,
716
+ * templates: {
717
+ * load: (id) => fetch(`/api/templates/${id}`).then((r) => r.json()),
718
+ * create: (input) =>
719
+ * fetch("/api/templates", {
720
+ * method: "POST",
721
+ * headers: { "Content-Type": "application/json" },
722
+ * body: JSON.stringify(input),
723
+ * }).then((r) => r.json()),
724
+ * save: (id, patch) =>
725
+ * fetch(`/api/templates/${id}`, {
726
+ * method: "PATCH",
727
+ * headers: { "Content-Type": "application/json" },
728
+ * body: JSON.stringify(patch),
729
+ * }).then((r) => r.json()),
730
+ * },
731
+ * });
732
+ *
733
+ * await editor.load("tpl_123");
734
+ * ```
735
+ *
736
+ * **Omitted by default.** With no provider the feature is entirely off — no
737
+ * name field, no save button, no status indicator — and `create()` / `load()` /
738
+ * `save()` reject with an explanatory error. Persist the content yourself from
739
+ * `onChange` instead; Cmd+S then flushes that notification immediately rather
740
+ * than waiting out the debounce.
741
+ *
742
+ * Opening a template is deliberately imperative: there is no `templateId`
743
+ * config key and no in-editor template browser, because choosing which
744
+ * template to open belongs to your application.
745
+ */
746
+ templates?: TemplatesProvider;
747
+ /**
748
+ * Rendering backend — how the template becomes MJML, and how MJML becomes the
749
+ * HTML you send.
750
+ *
751
+ * Separate from `templates` on purpose: saving and rendering run at different
752
+ * frequencies (autosave would compile MJML on every debounce tick) and fail in
753
+ * different ways. Every method is optional, and `editor.toMjml()` /
754
+ * `editor.toHtml()` resolve each one independently:
755
+ *
756
+ * | Call | Order |
757
+ * |---|---|
758
+ * | `toMjml()` | `render.toMjml` → the bundled `@templatical/renderer` → throw |
759
+ * | `toHtml()` | `render.toHtml` → `toMjml()`'s result + `render.compileMjml` → throw |
760
+ *
761
+ * **Omitted by default**, in which case `toMjml()` renders locally and
762
+ * `toHtml()` rejects — the SDK deliberately bundles no MJML compiler, so there
763
+ * is no local HTML path. One endpoint is enough to close that gap:
764
+ *
765
+ * ```ts
766
+ * init({
767
+ * container,
768
+ * render: {
769
+ * compileMjml: (mjml) =>
770
+ * fetch("/api/mjml", { method: "POST", body: mjml }).then((r) => r.text()),
771
+ * },
772
+ * });
773
+ * ```
774
+ *
775
+ * Provider methods receive a **render-complete** payload: custom blocks already
776
+ * resolved to `renderedHtml`, and the editor's effective fonts. Both are things
777
+ * a backend cannot reconstruct from the template JSON alone.
778
+ */
779
+ render?: RenderProvider;
780
+ /**
781
+ * Storage backend for the template's **version history** — the past states a
782
+ * user can browse, preview and restore.
783
+ *
784
+ * The editor owns the header's history control, the preview banner and the
785
+ * restore flow; you own the storage. `list` and `get` are the operations;
786
+ * `create` and `restore` can each be turned off by passing `false` instead of
787
+ * a function.
788
+ *
789
+ * ```ts
790
+ * init({
791
+ * container,
792
+ * versionHistory: {
793
+ * list: (templateId) =>
794
+ * fetch(`/api/templates/${templateId}/versions`).then((r) => r.json()),
795
+ * get: (templateId, versionId) =>
796
+ * fetch(`/api/templates/${templateId}/versions/${versionId}`)
797
+ * .then((r) => r.json())
798
+ * .then((v) => v.content),
799
+ * create: false,
800
+ * restore: (templateId, versionId) =>
801
+ * fetch(`/api/templates/${templateId}/versions/${versionId}/restore`, {
802
+ * method: "POST",
803
+ * }).then((r) => r.json()),
804
+ * },
805
+ * });
806
+ * ```
807
+ *
808
+ * **Omitted by default** — the control does not render and none of its UI is
809
+ * downloaded. It also stays hidden until a template is loaded, since a version
810
+ * belongs to a template id.
811
+ *
812
+ * **The editor never records a version by itself.** Whichever
813
+ * `TemplatesProvider.save` you supply decides whether a save also records one,
814
+ * so throttling and retention stay with the side that pays for the storage.
815
+ */
816
+ versionHistory?: VersionHistoryProvider;
817
+ /**
818
+ * Save the template automatically, debounced, after the user stops editing.
819
+ * Requires a `templates` provider — without one there is nothing to save to,
820
+ * and the option is ignored with a warning.
821
+ *
822
+ * `true` uses the default cadence; `{ debounce }` sets it in the same key. The
823
+ * debounce governs `onChange` too — both ride one timer so they cannot drift
824
+ * apart.
825
+ *
826
+ * ```ts
827
+ * autoSave: true // default cadence
828
+ * autoSave: { debounce: 2000 } // on, slower
829
+ * ```
830
+ *
831
+ * @default false
832
+ */
833
+ autoSave?: AutoSaveConfig;
834
+ /**
835
+ * Warn the user before they close or reload the tab with unsaved changes.
836
+ * On by default whenever a `templates` provider is configured — without one
837
+ * the editor cannot know whether you already persisted the change, so it never
838
+ * warns.
839
+ *
840
+ * Set to `false` to own that prompt yourself. Note it can never cover
841
+ * client-side route changes; use `onDirtyChange` for those.
842
+ *
843
+ * @default true
844
+ */
845
+ unsavedChangesGuard?: boolean;
454
846
  onRequestMedia?: OnRequestMedia;
455
847
  /**
456
848
  * Resolves the template for preview surfaces — typically evaluating logic
@@ -614,6 +1006,79 @@ export declare interface TemplaticalEditorConfig {
614
1006
  * it lives in the user's browser. Validate the recipient on your server.
615
1007
  */
616
1008
  testEmail?: TestEmailProvider;
1009
+ /**
1010
+ * Storage backend for **comments** — the review conversation on a template.
1011
+ *
1012
+ * The editor owns the panel, the threading, the resolve flow, the per-block
1013
+ * indicators and the jump-to-block affordance; you own persistence. Five
1014
+ * methods, each mutation turn-off-able by passing `false`:
1015
+ *
1016
+ * ```ts
1017
+ * init({
1018
+ * container,
1019
+ * user: { id: "u_7", name: "Ada" },
1020
+ * comments: {
1021
+ * list: (templateId) =>
1022
+ * fetch(`/api/templates/${templateId}/comments`).then((r) => r.json()),
1023
+ * create: (templateId, input) =>
1024
+ * fetch(`/api/templates/${templateId}/comments`, {
1025
+ * method: "POST",
1026
+ * headers: { "Content-Type": "application/json" },
1027
+ * body: JSON.stringify(input),
1028
+ * }).then((r) => r.json()),
1029
+ * update: (templateId, commentId, patch) =>
1030
+ * fetch(`/api/templates/${templateId}/comments/${commentId}`, {
1031
+ * method: "PATCH",
1032
+ * headers: { "Content-Type": "application/json" },
1033
+ * body: JSON.stringify(patch),
1034
+ * }).then((r) => r.json()),
1035
+ * delete: async (templateId, commentId) => {
1036
+ * await fetch(`/api/templates/${templateId}/comments/${commentId}`, {
1037
+ * method: "DELETE",
1038
+ * });
1039
+ * },
1040
+ * setResolved: (templateId, commentId, resolved) =>
1041
+ * fetch(`/api/templates/${templateId}/comments/${commentId}/resolve`, {
1042
+ * method: "POST",
1043
+ * headers: { "Content-Type": "application/json" },
1044
+ * body: JSON.stringify({ resolved }),
1045
+ * }).then((r) => r.json()),
1046
+ * },
1047
+ * });
1048
+ * ```
1049
+ *
1050
+ * **Requires {@link user}** — with no identity the feature reports itself
1051
+ * unavailable and nothing renders, rather than writing anonymous comments.
1052
+ *
1053
+ * **Omitted by default**, and the panel also stays hidden until a template is
1054
+ * loaded, since a comment belongs to a template id.
1055
+ *
1056
+ * Realtime is an optional `subscribe` on the provider, not a prerequisite:
1057
+ * without it comments work identically, you simply see a colleague's on the next
1058
+ * read rather than immediately.
1059
+ */
1060
+ comments?: CommentsProvider;
1061
+ /**
1062
+ * Who is using the editor — needed by any feature that attributes work to a
1063
+ * person. Today that is {@link comments}; collaboration presence will want the
1064
+ * same answer, which is why this is a top-level key rather than part of the
1065
+ * comments provider.
1066
+ *
1067
+ * ```ts
1068
+ * init({ container, user: { id: "u_7", name: "Ada Lovelace" } });
1069
+ * ```
1070
+ *
1071
+ * Not a security boundary — it identifies the user to the editor's UI, in the
1072
+ * user's own browser. Attribute writes server-side from the session your backend
1073
+ * already trusts.
1074
+ */
1075
+ user?: EditorUser;
1076
+ /**
1077
+ * Called for every comment change the editor applied — including ones that
1078
+ * arrived through a provider's `subscribe`, so this is the hook for a "3 new
1079
+ * comments" badge outside the editor.
1080
+ */
1081
+ onComment?: (event: CommentEvent) => void;
617
1082
  blockDefaults?: BlockDefaults;
618
1083
  templateDefaults?: TemplateDefaults;
619
1084
  theme?: ThemeOverrides;
@@ -640,6 +1105,19 @@ export declare interface TemplaticalEditorConfig {
640
1105
  * @default true
641
1106
  */
642
1107
  smallScreenNotice?: boolean;
1108
+ /**
1109
+ * Show the template's name in the header, inline-editable. Defaults to `true`.
1110
+ *
1111
+ * Set to `false` when your store has no name column, or when your own chrome
1112
+ * owns the name. Hides the field only — `create({ name })`, `setName()` and the
1113
+ * `name` in each save patch keep working, so a headless caller or your own UI
1114
+ * can still manage names.
1115
+ *
1116
+ * Without a `templates` provider the header renders no name field either way.
1117
+ *
1118
+ * @default true
1119
+ */
1120
+ templateNameField?: boolean;
643
1121
  /**
644
1122
  * Template linter (`@templatical/quality`) configuration. Runs every
645
1123
  * linter exported by the package (accessibility + structure).
@@ -674,9 +1152,7 @@ export declare interface UseFontsReturn {
674
1152
  defaultFont: ComputedRef<string>;
675
1153
  defaultFallback: ComputedRef<string>;
676
1154
  customFonts: Ref<CustomFont[]>;
677
- customFontsEnabled: Ref<boolean>;
678
1155
  isLoaded: Ref<boolean>;
679
- setCustomFontsEnabled: (enabled: boolean) => void;
680
1156
  loadCustomFonts: () => Promise<void>;
681
1157
  cleanupFontLinks: () => void;
682
1158
  getFontWithFallback: (fontName: string) => string;
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-C8WzBYCv.js";
1
+ import { t as e } from "./createLucideIcon-L-wQXW_R.js";
2
2
  var t = e("info", [
3
3
  ["circle", {
4
4
  cx: "12",