@templatical/editor 0.39.4 → 0.41.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 (230) hide show
  1. package/README.md +1 -1
  2. package/dist/{AiChatSidebar-5qqrS6uy.js → AiChatSidebar-a8TPBAl2.js} +3 -3
  3. package/dist/{AiFeatureMenu-BBO_Ojlp.js → AiFeatureMenu-CroDMqRG.js} +3 -3
  4. package/dist/{BlockIssueBadge-D5oGxOQP.js → BlockIssueBadge-D8KsGWY6.js} +2 -2
  5. package/dist/BlockPreviewCanvas-Z9SZIgfA.js +133 -0
  6. package/dist/{CloudHeaderExtras-Cg6uF-yQ.js → CloudHeaderExtras-CVqHeqc6.js} +2 -2
  7. package/dist/{CloudPanels-D1Gg4qrG.js → CloudPanels-CmEpQUJB.js} +4 -4
  8. package/dist/{CollaboratorBar-Cmn0LccS.js → CollaboratorBar-AIQC9fEF.js} +2 -2
  9. package/dist/{CommentsPanel-twNhYUqZ.js → CommentsPanel-9k1q-79y.js} +1 -1
  10. package/dist/{CommentsSidebar-DDO0Qx8U.js → CommentsSidebar-Bc7nORmD.js} +2 -2
  11. package/dist/{CountdownBlock-DSvbf3qU.js → CountdownBlock-C6R-hn7D.js} +1 -1
  12. package/dist/{CountdownToolbar-nvHxu8Gu.js → CountdownToolbar-DkC-qSgq.js} +4 -4
  13. package/dist/{DesignReferenceSidebar-C8ohNhOd.js → DesignReferenceSidebar-OoiYJAKS.js} +3 -3
  14. package/dist/{IssuesPanel-Ck0EGoV5.js → IssuesPanel-Dnns3O9z.js} +3 -3
  15. package/dist/{LogicTagInsertButton-D8IwH-9Z.js → LogicTagInsertButton-BimKobaG.js} +67 -67
  16. package/dist/{MediaEditModal-BFWmufJK.js → MediaEditModal-C-InB-H2.js} +1 -1
  17. package/dist/{MediaPanels-BmDda5rY.js → MediaPanels-CTosUpeo.js} +1 -1
  18. package/dist/{MergeTagInput-QI-5KG2R.js → MergeTagInput-DqpVzhy7.js} +1 -1
  19. package/dist/{MergeTagModeToggle-D793Bj_E.js → MergeTagModeToggle-BkIiAgpQ.js} +4 -4
  20. package/dist/{ParagraphEditor-D6FRxr8Y.js → ParagraphEditor-DaZ03d1U.js} +19 -19
  21. package/dist/{RestoreVersionDialog--b0qfNaK.js → RestoreVersionDialog-DHb1mPoF.js} +2 -2
  22. package/dist/{RichTextEditorContent-BC5UTVnb.js → RichTextEditorContent-AEtfKvLz.js} +5 -5
  23. package/dist/{SaveBlockDialog-C0BdEGeL.js → SaveBlockDialog-hGwLDWfE.js} +8 -8
  24. package/dist/{SavedBlocksBrowserModal-BzDgXtr4.js → SavedBlocksBrowserModal-C0lYVBFi.js} +6 -6
  25. package/dist/{SavedBlocksPanels-DN-bDZzy.js → SavedBlocksPanels-CaTbeVDv.js} +1 -1
  26. package/dist/{SavedBlocksPickBar-pEi9Et8Q.js → SavedBlocksPickBar-DR2afid2.js} +2 -2
  27. package/dist/{TemplateScoringPanel-B1wcfE0w.js → TemplateScoringPanel-Cs0TGtRF.js} +3 -3
  28. package/dist/{TemplateSettings-C_5leDdF.js → TemplateSettings-BD1WNP4C.js} +7 -7
  29. package/dist/{TestEmailModal-maM8SLBV.js → TestEmailModal-DqoosG1u.js} +70 -65
  30. package/dist/{TestEmailPanel-8iAZYpCK.js → TestEmailPanel-DpozqyHF.js} +1 -1
  31. package/dist/{TitleEditor-L26QXwna.js → TitleEditor-BCBdZLt_.js} +9 -9
  32. package/dist/{ToggleSwitch-JvQ_CmI1.js → ToggleSwitch-CJfQ8u57.js} +1 -1
  33. package/dist/{Toolbar-B2kDLFhn.js → Toolbar-C7SjilzH.js} +540 -525
  34. package/dist/{TplModal-DVMS_nAn.js → TplModal-CVO-2KrU.js} +3 -3
  35. package/dist/{VersionHistoryMenu-BVQityes.js → VersionHistoryMenu-b0A8mS2_.js} +2 -2
  36. package/dist/{VersionHistoryPanels-D8f8KvKX.js → VersionHistoryPanels-BzF7dmwa.js} +1 -1
  37. package/dist/{VersionPreviewBanner-BaMSgA1O.js → VersionPreviewBanner-xB9r83r0.js} +1 -1
  38. package/dist/WrapperBlock-BDjOn3fY.js +34 -0
  39. package/dist/{blockTypeIcons-CdXugKyV.js → blockTypeIcons-B0Bq1WT1.js} +1 -1
  40. package/dist/bundle-stats.json +7 -7
  41. package/dist/{ca-Bqeygp1_.js → ca-Ckgw9yd0.js} +1 -0
  42. package/dist/cdn/chunks/{AiChatSidebar-ctfIU4i0.js → AiChatSidebar-mKImUXi6.js} +7 -7
  43. package/dist/cdn/chunks/{AiChatSidebar-ctfIU4i0.js.map → AiChatSidebar-mKImUXi6.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiFeatureMenu-ByygdH_9.js → AiFeatureMenu-Cx3qdStQ.js} +4 -4
  45. package/dist/cdn/chunks/{AiFeatureMenu-ByygdH_9.js.map → AiFeatureMenu-Cx3qdStQ.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockIssueBadge-9hHpaXb9.js → BlockIssueBadge-DS1pUf5g.js} +3 -3
  47. package/dist/cdn/chunks/{BlockIssueBadge-9hHpaXb9.js.map → BlockIssueBadge-DS1pUf5g.js.map} +1 -1
  48. package/dist/cdn/chunks/BlockPreviewCanvas-D31TNib3.js +135 -0
  49. package/dist/cdn/chunks/BlockPreviewCanvas-D31TNib3.js.map +1 -0
  50. package/dist/cdn/chunks/{CloudHeaderExtras-BxsMpvVr.js → CloudHeaderExtras-0zdlKiq7.js} +3 -3
  51. package/dist/cdn/chunks/{CloudHeaderExtras-BxsMpvVr.js.map → CloudHeaderExtras-0zdlKiq7.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudPanels-DmxmqAS_.js → CloudPanels-DPh71yOO.js} +5 -5
  53. package/dist/cdn/chunks/{CloudPanels-DmxmqAS_.js.map → CloudPanels-DPh71yOO.js.map} +1 -1
  54. package/dist/cdn/chunks/{CollaboratorBar-B8ttqAqX.js → CollaboratorBar-lCZU8qkg.js} +3 -3
  55. package/dist/cdn/chunks/{CollaboratorBar-B8ttqAqX.js.map → CollaboratorBar-lCZU8qkg.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-C8ibhaiK.js → CommentsPanel-BtAGZfF6.js} +2 -2
  57. package/dist/cdn/chunks/{CommentsPanel-C8ibhaiK.js.map → CommentsPanel-BtAGZfF6.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-CybWfZ3V.js → CommentsSidebar-Ws07MXYj.js} +3 -3
  59. package/dist/cdn/chunks/{CommentsSidebar-CybWfZ3V.js.map → CommentsSidebar-Ws07MXYj.js.map} +1 -1
  60. package/dist/cdn/chunks/{CountdownBlock-DdC8Lg5F.js → CountdownBlock-sVDjKkRw.js} +2 -2
  61. package/dist/cdn/chunks/{CountdownBlock-DdC8Lg5F.js.map → CountdownBlock-sVDjKkRw.js.map} +1 -1
  62. package/dist/cdn/chunks/{CountdownToolbar-DRESXiVD.js → CountdownToolbar-Bu93WiS8.js} +5 -5
  63. package/dist/cdn/chunks/{CountdownToolbar-DRESXiVD.js.map → CountdownToolbar-Bu93WiS8.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-CtaoY-hl.js → DesignReferenceSidebar-BlSdh5B7.js} +4 -4
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-CtaoY-hl.js.map → DesignReferenceSidebar-BlSdh5B7.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-C6RlIxoi.js → IssuesPanel-CKkv9z9g.js} +4 -4
  67. package/dist/cdn/chunks/{IssuesPanel-C6RlIxoi.js.map → IssuesPanel-CKkv9z9g.js.map} +1 -1
  68. package/dist/cdn/chunks/{LogicTagInsertButton-DpyPozop.js → LogicTagInsertButton-CHc1yZ9v.js} +165 -165
  69. package/dist/cdn/chunks/{LogicTagInsertButton-DpyPozop.js.map → LogicTagInsertButton-CHc1yZ9v.js.map} +1 -1
  70. package/dist/cdn/chunks/{MediaEditModal-CZBZviu2.js → MediaEditModal-Cw9MhjVz.js} +2 -2
  71. package/dist/cdn/chunks/{MediaEditModal-CZBZviu2.js.map → MediaEditModal-Cw9MhjVz.js.map} +1 -1
  72. package/dist/cdn/chunks/{MediaPanels-Bq5b-XJM.js → MediaPanels-FD_aX3H5.js} +2 -2
  73. package/dist/cdn/chunks/{MediaPanels-Bq5b-XJM.js.map → MediaPanels-FD_aX3H5.js.map} +1 -1
  74. package/dist/cdn/chunks/{MergeTagInput-ERJr7bP_.js → MergeTagInput--qTYfCWk.js} +2 -2
  75. package/dist/cdn/chunks/{MergeTagInput-ERJr7bP_.js.map → MergeTagInput--qTYfCWk.js.map} +1 -1
  76. package/dist/cdn/chunks/{MergeTagModeToggle-n3nvSNeQ.js → MergeTagModeToggle-CdWIGo3Q.js} +5 -5
  77. package/dist/cdn/chunks/{MergeTagModeToggle-n3nvSNeQ.js.map → MergeTagModeToggle-CdWIGo3Q.js.map} +1 -1
  78. package/dist/cdn/chunks/{ParagraphEditor-R2ph_UOo.js → ParagraphEditor-w2qEZTkM.js} +17 -17
  79. package/dist/cdn/chunks/{ParagraphEditor-R2ph_UOo.js.map → ParagraphEditor-w2qEZTkM.js.map} +1 -1
  80. package/dist/cdn/chunks/{RestoreVersionDialog-C-dwbb7T.js → RestoreVersionDialog-cnWVN3nX.js} +3 -3
  81. package/dist/cdn/chunks/{RestoreVersionDialog-C-dwbb7T.js.map → RestoreVersionDialog-cnWVN3nX.js.map} +1 -1
  82. package/dist/cdn/chunks/{RichTextEditorContent-Ch5zeyZ7.js → RichTextEditorContent-Fzuu9pLP.js} +6 -6
  83. package/dist/cdn/chunks/{RichTextEditorContent-Ch5zeyZ7.js.map → RichTextEditorContent-Fzuu9pLP.js.map} +1 -1
  84. package/dist/cdn/chunks/{SaveBlockDialog-C_BPjVv6.js → SaveBlockDialog-jxQtKnVs.js} +9 -9
  85. package/dist/cdn/chunks/{SaveBlockDialog-C_BPjVv6.js.map → SaveBlockDialog-jxQtKnVs.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CrrGEfFb.js → SavedBlocksBrowserModal-DpXWf4Pi.js} +6 -6
  87. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CrrGEfFb.js.map → SavedBlocksBrowserModal-DpXWf4Pi.js.map} +1 -1
  88. package/dist/cdn/chunks/{SavedBlocksPanels-DfTaMPAr.js → SavedBlocksPanels-B-ASmf1P.js} +2 -2
  89. package/dist/cdn/chunks/{SavedBlocksPanels-DfTaMPAr.js.map → SavedBlocksPanels-B-ASmf1P.js.map} +1 -1
  90. package/dist/cdn/chunks/{SavedBlocksPickBar-DziwHYSu.js → SavedBlocksPickBar-CEFIQ8Nd.js} +3 -3
  91. package/dist/cdn/chunks/{SavedBlocksPickBar-DziwHYSu.js.map → SavedBlocksPickBar-CEFIQ8Nd.js.map} +1 -1
  92. package/dist/cdn/chunks/{TemplateScoringPanel-CR6RG6dZ.js → TemplateScoringPanel-d_Ppowsq.js} +49 -49
  93. package/dist/cdn/chunks/{TemplateScoringPanel-CR6RG6dZ.js.map → TemplateScoringPanel-d_Ppowsq.js.map} +1 -1
  94. package/dist/cdn/chunks/{TemplateSettings-DjXiiiNr.js → TemplateSettings-Dr5OJ0Gi.js} +8 -8
  95. package/dist/cdn/chunks/{TemplateSettings-DjXiiiNr.js.map → TemplateSettings-Dr5OJ0Gi.js.map} +1 -1
  96. package/dist/cdn/chunks/{TestEmailModal-DId9Og-N.js → TestEmailModal-CrjzVw8e.js} +56 -51
  97. package/dist/cdn/chunks/TestEmailModal-CrjzVw8e.js.map +1 -0
  98. package/dist/cdn/chunks/{TestEmailPanel-B8LwXmeX.js → TestEmailPanel-k9vdulTu.js} +2 -2
  99. package/dist/cdn/chunks/{TestEmailPanel-B8LwXmeX.js.map → TestEmailPanel-k9vdulTu.js.map} +1 -1
  100. package/dist/cdn/chunks/{TitleEditor-C7KMzX1e.js → TitleEditor-laILWfKh.js} +9 -9
  101. package/dist/cdn/chunks/{TitleEditor-C7KMzX1e.js.map → TitleEditor-laILWfKh.js.map} +1 -1
  102. package/dist/cdn/chunks/{ToggleSwitch-CDy8OfcB.js → ToggleSwitch-0dGCYnRY.js} +2 -2
  103. package/dist/cdn/chunks/{ToggleSwitch-CDy8OfcB.js.map → ToggleSwitch-0dGCYnRY.js.map} +1 -1
  104. package/dist/cdn/chunks/{Toolbar-DqFhWxgW.js → Toolbar-BsiHW9gY.js} +493 -478
  105. package/dist/cdn/chunks/{Toolbar-DqFhWxgW.js.map → Toolbar-BsiHW9gY.js.map} +1 -1
  106. package/dist/cdn/chunks/{TplModal-BKqDFLq3.js → TplModal-D8DoPbFa.js} +4 -4
  107. package/dist/cdn/chunks/{TplModal-BKqDFLq3.js.map → TplModal-D8DoPbFa.js.map} +1 -1
  108. package/dist/cdn/chunks/{VersionHistoryMenu-Dij1pTEb.js → VersionHistoryMenu-B3-hNu9c.js} +3 -3
  109. package/dist/cdn/chunks/{VersionHistoryMenu-Dij1pTEb.js.map → VersionHistoryMenu-B3-hNu9c.js.map} +1 -1
  110. package/dist/cdn/chunks/{VersionHistoryPanels-DcCFFDK6.js → VersionHistoryPanels-zw1AtzGN.js} +2 -2
  111. package/dist/cdn/chunks/{VersionHistoryPanels-DcCFFDK6.js.map → VersionHistoryPanels-zw1AtzGN.js.map} +1 -1
  112. package/dist/cdn/chunks/{VersionPreviewBanner-Df3FVlig.js → VersionPreviewBanner-PzVQSBJE.js} +2 -2
  113. package/dist/cdn/chunks/{VersionPreviewBanner-Df3FVlig.js.map → VersionPreviewBanner-PzVQSBJE.js.map} +1 -1
  114. package/dist/cdn/chunks/WrapperBlock-CpRvfAV0.js +36 -0
  115. package/dist/cdn/chunks/WrapperBlock-CpRvfAV0.js.map +1 -0
  116. package/dist/cdn/chunks/{ca-Bqeygp1_.js → ca-Ckgw9yd0.js} +2 -1
  117. package/dist/cdn/chunks/ca-Ckgw9yd0.js.map +1 -0
  118. package/dist/cdn/chunks/{cloud-eaXyxZ8l.js → cloud-CIT4yPp4.js} +2 -2
  119. package/dist/cdn/chunks/{cloud-eaXyxZ8l.js.map → cloud-CIT4yPp4.js.map} +1 -1
  120. package/dist/cdn/chunks/{createCloudRuntime-D5bXzcTe.js → createCloudRuntime-COUxbPvd.js} +49 -40
  121. package/dist/cdn/chunks/createCloudRuntime-COUxbPvd.js.map +1 -0
  122. package/dist/cdn/chunks/{de-CY6SlqBx.js → de-D4dweQw8.js} +2 -1
  123. package/dist/cdn/chunks/de-D4dweQw8.js.map +1 -0
  124. package/dist/cdn/chunks/{editor-modal-zxvWz8R6.js → editor-modal-CKu8HhiB.js} +4 -3
  125. package/dist/cdn/chunks/{editor-modal-zxvWz8R6.js.map → editor-modal-CKu8HhiB.js.map} +1 -1
  126. package/dist/cdn/chunks/en-DqzAdO8F.js +2 -0
  127. package/dist/{en-8V-2kDcp.js → cdn/chunks/en-VE7R7NyL.js} +3 -0
  128. package/dist/cdn/chunks/en-VE7R7NyL.js.map +1 -0
  129. package/dist/{es-Cmn1rT3l.js → cdn/chunks/es-B9OhP8H3.js} +3 -0
  130. package/dist/cdn/chunks/es-B9OhP8H3.js.map +1 -0
  131. package/dist/cdn/chunks/{extensions-Bhu8UEE5.js → extensions-CafoGF65.js} +5 -5
  132. package/dist/cdn/chunks/{extensions-Bhu8UEE5.js.map → extensions-CafoGF65.js.map} +1 -1
  133. package/dist/cdn/chunks/{fr-2yDa4zXM.js → fr-wrXhIi00.js} +2 -1
  134. package/dist/cdn/chunks/fr-wrXhIi00.js.map +1 -0
  135. package/dist/cdn/chunks/ja-DhlWUfke.js +94 -0
  136. package/dist/cdn/chunks/ja-DhlWUfke.js.map +1 -0
  137. package/dist/cdn/chunks/ja-fKnVWXHC.js +625 -0
  138. package/dist/cdn/chunks/ja-fKnVWXHC.js.map +1 -0
  139. package/dist/cdn/chunks/keys-DCWeHkSF.js +12 -0
  140. package/dist/cdn/chunks/keys-DCWeHkSF.js.map +1 -0
  141. package/dist/{nl-Bzk2zRI8.js → cdn/chunks/nl-DeFatKJe.js} +3 -0
  142. package/dist/cdn/chunks/nl-DeFatKJe.js.map +1 -0
  143. package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js +21 -0
  144. package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js.map +1 -0
  145. package/dist/cdn/chunks/{pt-BR-DqtSCTUi.js → pt-BR-Bh1J8ey6.js} +2 -1
  146. package/dist/cdn/chunks/pt-BR-Bh1J8ey6.js.map +1 -0
  147. package/dist/cdn/chunks/{socialIcons-9VrG8X3m.js → socialIcons-BvYNMn1G.js} +264 -258
  148. package/dist/cdn/chunks/socialIcons-BvYNMn1G.js.map +1 -0
  149. package/dist/cdn/chunks/{src-CaNsA_WX.js → src-Cnc5E71L.js} +258 -247
  150. package/dist/cdn/chunks/src-Cnc5E71L.js.map +1 -0
  151. package/dist/cdn/chunks/{src-Dwgq7hf4.js → src-DveVYoWS.js} +281 -181
  152. package/dist/cdn/chunks/src-DveVYoWS.js.map +1 -0
  153. package/dist/cdn/chunks/{src-CqYYKcCI.js → src-L6HEdwFn.js} +175 -168
  154. package/dist/cdn/chunks/src-L6HEdwFn.js.map +1 -0
  155. package/dist/cdn/chunks/{useCloudI18n-C09JcFS0.js → useCloudI18n-CrjWbpbu.js} +2 -2
  156. package/dist/cdn/chunks/{useCloudI18n-C09JcFS0.js.map → useCloudI18n-CrjWbpbu.js.map} +1 -1
  157. package/dist/cdn/chunks/{useEditorCore-CXYI14ux.js → useEditorCore-DZmtKwJh.js} +431 -409
  158. package/dist/cdn/chunks/useEditorCore-DZmtKwJh.js.map +1 -0
  159. package/dist/cdn/chunks/{useEditorRoot-DFx2fXJP.js → useEditorRoot-CshefZLP.js} +2 -2
  160. package/dist/cdn/chunks/{useEditorRoot-DFx2fXJP.js.map → useEditorRoot-CshefZLP.js.map} +1 -1
  161. package/dist/cdn/chunks/{useI18n-DTZ9sIcv.js → useI18n-CyO_Nmca.js} +2 -2
  162. package/dist/cdn/chunks/{useI18n-DTZ9sIcv.js.map → useI18n-CyO_Nmca.js.map} +1 -1
  163. package/dist/cdn/chunks/{useLogicTag-E2V0Xdcb.js → useLogicTag-DF7-l66G.js} +4 -4
  164. package/dist/cdn/chunks/{useLogicTag-E2V0Xdcb.js.map → useLogicTag-DF7-l66G.js.map} +1 -1
  165. package/dist/cdn/chunks/{useMergeTag-BE8oDoha.js → useMergeTag-DbIHw4NG.js} +4 -4
  166. package/dist/cdn/chunks/{useMergeTag-BE8oDoha.js.map → useMergeTag-DbIHw4NG.js.map} +1 -1
  167. package/dist/cdn/chunks/{usePopoverPosition-gB9q-ql7.js → usePopoverPosition-BJRvAb-h.js} +2 -2
  168. package/dist/cdn/chunks/{usePopoverPosition-gB9q-ql7.js.map → usePopoverPosition-BJRvAb-h.js.map} +1 -1
  169. package/dist/cdn/chunks/{useScrollToBlock-CtTXwmiU.js → useScrollToBlock-DgHZJvID.js} +2 -2
  170. package/dist/cdn/chunks/{useScrollToBlock-CtTXwmiU.js.map → useScrollToBlock-DgHZJvID.js.map} +1 -1
  171. package/dist/cdn/editor.css +1 -1
  172. package/dist/cdn/editor.js +484 -460
  173. package/dist/cdn/editor.js.map +1 -1
  174. package/dist/{cloud-C9xWZXhg.js → cloud-DsqqUfzh.js} +1 -1
  175. package/dist/{createCloudRuntime-BGd5--Bq.js → createCloudRuntime-iLflkYzP.js} +47 -38
  176. package/dist/{de-CY6SlqBx.js → de-D4dweQw8.js} +1 -0
  177. package/dist/{dist-tGkjkX-v.js → dist-DbUZvK04.js} +277 -176
  178. package/dist/{editor-modal-Czq1I8oC.js → editor-modal-qzmEVcIk.js} +3 -2
  179. package/dist/en-1tgLzB8q.js +2 -0
  180. package/dist/{cdn/chunks/en-8V-2kDcp.js → en-VE7R7NyL.js} +1 -2
  181. package/dist/{cdn/chunks/es-Cmn1rT3l.js → es-B9OhP8H3.js} +1 -2
  182. package/dist/{extensions-DRN-elXT.js → extensions-DDhjuVKy.js} +4 -4
  183. package/dist/{fr-2yDa4zXM.js → fr-wrXhIi00.js} +1 -0
  184. package/dist/index.d.ts +65 -0
  185. package/dist/ja-DhlWUfke.js +92 -0
  186. package/dist/ja-fKnVWXHC.js +623 -0
  187. package/dist/keys-CDqfZIRt.js +10 -0
  188. package/dist/{cdn/chunks/nl-Bzk2zRI8.js → nl-DeFatKJe.js} +1 -2
  189. package/dist/preRenderCustomBlocks-BBSqQgke.js +19 -0
  190. package/dist/{pt-BR-DqtSCTUi.js → pt-BR-Bh1J8ey6.js} +1 -0
  191. package/dist/{socialIcons-DkGcpEwC.js → socialIcons-O7PZCW2P.js} +245 -239
  192. package/dist/style.css +1 -1
  193. package/dist/templatical-editor.js +520 -496
  194. package/dist/{useCloudI18n-D1iedlP3.js → useCloudI18n-DpEsiLeR.js} +1 -1
  195. package/dist/{useEditorCore-BUVbQgwb.js → useEditorCore-dcdHB_7H.js} +826 -804
  196. package/dist/{useEditorRoot-BOxn5EfP.js → useEditorRoot-CkB_5d0h.js} +1 -1
  197. package/dist/{useI18n-Ds_-druD.js → useI18n-B_CdcBwG.js} +1 -1
  198. package/dist/{useLogicTag-DoHfc08B.js → useLogicTag-D9pvgxQR.js} +3 -3
  199. package/dist/{useMergeTag-DXyum3kG.js → useMergeTag-BaVFPdlq.js} +5 -5
  200. package/dist/{usePopoverPosition-Du-Ah8E9.js → usePopoverPosition-DH7z3Ghm.js} +1 -1
  201. package/dist/{useScrollToBlock-DXQYPCnJ.js → useScrollToBlock-Dj4v3rxr.js} +1 -1
  202. package/package.json +8 -8
  203. package/dist/BlockPreviewCanvas-BMC16_QU.js +0 -131
  204. package/dist/cdn/chunks/BlockPreviewCanvas-DeS7Sa--.js +0 -133
  205. package/dist/cdn/chunks/BlockPreviewCanvas-DeS7Sa--.js.map +0 -1
  206. package/dist/cdn/chunks/TestEmailModal-DId9Og-N.js.map +0 -1
  207. package/dist/cdn/chunks/ca-Bqeygp1_.js.map +0 -1
  208. package/dist/cdn/chunks/createCloudRuntime-D5bXzcTe.js.map +0 -1
  209. package/dist/cdn/chunks/de-CY6SlqBx.js.map +0 -1
  210. package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js +0 -8
  211. package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js.map +0 -1
  212. package/dist/cdn/chunks/en-8V-2kDcp.js.map +0 -1
  213. package/dist/cdn/chunks/en-BcQ9ovQu.js +0 -2
  214. package/dist/cdn/chunks/es-Cmn1rT3l.js.map +0 -1
  215. package/dist/cdn/chunks/fr-2yDa4zXM.js.map +0 -1
  216. package/dist/cdn/chunks/keys-dJbD1QPs.js +0 -12
  217. package/dist/cdn/chunks/keys-dJbD1QPs.js.map +0 -1
  218. package/dist/cdn/chunks/nl-Bzk2zRI8.js.map +0 -1
  219. package/dist/cdn/chunks/preRenderCustomBlocks-Bdpiiw4A.js +0 -23
  220. package/dist/cdn/chunks/preRenderCustomBlocks-Bdpiiw4A.js.map +0 -1
  221. package/dist/cdn/chunks/pt-BR-DqtSCTUi.js.map +0 -1
  222. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +0 -1
  223. package/dist/cdn/chunks/src-CaNsA_WX.js.map +0 -1
  224. package/dist/cdn/chunks/src-CqYYKcCI.js.map +0 -1
  225. package/dist/cdn/chunks/src-Dwgq7hf4.js.map +0 -1
  226. package/dist/cdn/chunks/useEditorCore-CXYI14ux.js.map +0 -1
  227. package/dist/emailFrameWidth-BmFCN2dp.js +0 -6
  228. package/dist/en-DQqmtndQ.js +0 -2
  229. package/dist/keys-BdoSgsz9.js +0 -10
  230. package/dist/preRenderCustomBlocks-DFXH54Zr.js +0 -21
@@ -1,27 +1,29 @@
1
1
  import { B as e, Q as t, W as n, X as r, Y as i, Z as a, f as o, ot as s, rt as c } from "./draggable-IB4x6w2O.js";
2
- import { L as l, S as u, b as d, nt as f, t as p, z as m } from "./src-Dwgq7hf4.js";
3
- import { r as h } from "./dist-CXB2_kBa.js";
4
- import { a as g, o as _ } from "./usePopoverPosition-gB9q-ql7.js";
2
+ import { D as l, K as u, S as d, T as f, W as p, dt as m, t as h, x as g } from "./src-DveVYoWS.js";
3
+ import { r as _ } from "./dist-CXB2_kBa.js";
4
+ import { a as v, o as y } from "./usePopoverPosition-BJRvAb-h.js";
5
5
  //#region ../core/src/error-reporting.ts
6
- function v(e) {
6
+ function b(e) {
7
7
  return e instanceof Error ? e : Error(String(e), { cause: e });
8
8
  }
9
- function y(e, t) {
9
+ function x(e, t) {
10
10
  try {
11
11
  t();
12
12
  } catch (t) {
13
- e?.(v(t));
13
+ e?.(b(t));
14
14
  }
15
15
  }
16
16
  //#endregion
17
17
  //#region ../core/src/editor.ts
18
- function b(e) {
18
+ function S(e) {
19
19
  return e === "1" ? 1 : e === "3" ? 3 : 2;
20
20
  }
21
- function x(e) {
22
- let t = r({
21
+ function C(e) {
22
+ let t = e.content ?? u(e.defaultFontFamily, e.templateDefaults);
23
+ g(t), d(t);
24
+ let i = r({
23
25
  template: null,
24
- content: e.content ?? m(e.defaultFontFamily, e.templateDefaults),
26
+ content: t,
25
27
  selectedBlockId: null,
26
28
  viewport: "desktop",
27
29
  darkMode: !1,
@@ -30,35 +32,35 @@ function x(e) {
30
32
  isSaving: !1,
31
33
  isLoading: !1,
32
34
  uiTheme: "auto"
33
- }), i = 0;
34
- function o() {
35
- t.isDirty = !0, i++;
35
+ }), o = 0;
36
+ function s() {
37
+ i.isDirty = !0, o++;
36
38
  }
37
- let s = n({
38
- get: () => t.content,
39
+ let c = n({
40
+ get: () => i.content,
39
41
  set: (e) => {
40
- t.content = e, o();
42
+ i.content = e, s();
41
43
  }
42
- }), c = n(() => t.selectedBlockId ? l(t.content.blocks, t.selectedBlockId) : null);
43
- function l(e, t) {
44
+ }), l = n(() => i.selectedBlockId ? f(i.content.blocks, i.selectedBlockId) : null);
45
+ function f(e, t) {
44
46
  for (let n of e) {
45
47
  if (n.id === t) return n;
46
48
  if (n.type === "section") for (let e of n.children) {
47
- let n = l(e, t);
49
+ let n = f(e, t);
48
50
  if (n) return n;
49
51
  }
50
52
  }
51
53
  return null;
52
54
  }
53
- function u(e, t) {
54
- if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) u(e, t);
55
+ function p(e, t) {
56
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) p(e, t);
55
57
  }
56
- function d(e, t, n = { blocks: e }) {
58
+ function m(e, t, n = { blocks: e }) {
57
59
  for (let r = 0; r < e.length; r++) {
58
60
  let i = e[r];
59
61
  if (i.id === t) return n;
60
62
  if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
61
- let n = d(i.children[e], t, {
63
+ let n = m(i.children[e], t, {
62
64
  blocks: i.children[e],
63
65
  sectionId: i.id,
64
66
  columnIndex: e
@@ -68,235 +70,239 @@ function x(e) {
68
70
  }
69
71
  return null;
70
72
  }
71
- function f(t) {
73
+ function _(t) {
72
74
  return e.lockedBlocks?.value.has(t) ?? !1;
73
75
  }
74
- function h(e) {
75
- let n = d(t.content.blocks, e);
76
- if (!n) return null;
77
- let r = n.blocks.findIndex((t) => t.id === e);
78
- return r === -1 ? null : {
79
- targetSectionId: n.sectionId,
80
- columnIndex: n.columnIndex,
81
- index: r
76
+ function v(e) {
77
+ let t = m(i.content.blocks, e);
78
+ if (!t) return null;
79
+ let n = t.blocks.findIndex((t) => t.id === e);
80
+ return n === -1 ? null : {
81
+ targetSectionId: t.sectionId,
82
+ columnIndex: t.columnIndex,
83
+ index: n
82
84
  };
83
85
  }
84
- function g(e, n = !0) {
85
- t.content = e, n && o();
86
+ function y(e, t = !0) {
87
+ g(e), d(e), i.content = e, t && s();
86
88
  }
87
- function _(e) {
88
- e && f(e) || (t.selectedBlockId = e);
89
+ function b(e) {
90
+ e && _(e) || (i.selectedBlockId = e);
89
91
  }
90
- function v(e) {
91
- t.viewport = e;
92
+ function C(e) {
93
+ i.viewport = e;
92
94
  }
93
- function x(e) {
94
- t.darkMode = e;
95
+ function w(e) {
96
+ i.darkMode = e;
95
97
  }
96
- function S(e) {
97
- t.uiTheme = e;
98
+ function T(e) {
99
+ i.uiTheme = e;
98
100
  }
99
- function C(e) {
100
- t.previewMode = e, e && (t.selectedBlockId = null);
101
+ function E(e) {
102
+ i.previewMode = e, e && (i.selectedBlockId = null);
101
103
  }
102
- function w(e, n) {
103
- if (f(e)) return;
104
- let r = l(t.content.blocks, e);
105
- r && (Object.assign(r, n), o());
104
+ function D(e, t) {
105
+ if (_(e)) return;
106
+ let n = f(i.content.blocks, e);
107
+ n && (Object.assign(n, t), s());
106
108
  }
107
- function T(e) {
108
- t.content.settings = {
109
- ...t.content.settings,
109
+ function O(e) {
110
+ i.content.settings = {
111
+ ...i.content.settings,
110
112
  ...e
111
- }, o();
113
+ }, s();
112
114
  }
113
- function E(e, n, r = 0, i) {
114
- if (!(n && e.type === "section")) {
115
- if (n) {
116
- if (f(n)) return;
117
- let a = l(t.content.blocks, n);
115
+ function k(e, t, n = 0, r) {
116
+ let a = {
117
+ settings: i.content.settings,
118
+ blocks: [e]
119
+ };
120
+ if (g(a), d(a), !(t && e.type === "section")) {
121
+ if (t) {
122
+ if (_(t)) return;
123
+ let a = f(i.content.blocks, t);
118
124
  if (a && a.type === "section") {
119
- if (r < 0 || r >= b(a.columns)) return;
120
- a.children[r] = a.children[r] || [];
121
- let t = a.children[r];
122
- i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
125
+ if (n < 0 || n >= S(a.columns)) return;
126
+ a.children[n] = a.children[n] || [];
127
+ let t = a.children[n];
128
+ r !== void 0 && r < t.length ? t.splice(r, 0, e) : t.push(e);
123
129
  }
124
- } else i !== void 0 && i < t.content.blocks.length ? t.content.blocks.splice(i, 0, e) : t.content.blocks.push(e);
125
- o();
130
+ } else r !== void 0 && r < i.content.blocks.length ? i.content.blocks.splice(r, 0, e) : i.content.blocks.push(e);
131
+ s();
126
132
  }
127
133
  }
128
- function D(e) {
129
- if (f(e)) return;
130
- let n = d(t.content.blocks, e);
131
- if (n) {
132
- let r = n.blocks.findIndex((t) => t.id === e);
133
- if (r !== -1) {
134
- let [e] = n.blocks.splice(r, 1);
135
- if (t.selectedBlockId) {
136
- let n = /* @__PURE__ */ new Set();
137
- u(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
134
+ function A(e) {
135
+ if (_(e)) return;
136
+ let t = m(i.content.blocks, e);
137
+ if (t) {
138
+ let n = t.blocks.findIndex((t) => t.id === e);
139
+ if (n !== -1) {
140
+ let [e] = t.blocks.splice(n, 1);
141
+ if (i.selectedBlockId) {
142
+ let t = /* @__PURE__ */ new Set();
143
+ p(e, t), t.has(i.selectedBlockId) && (i.selectedBlockId = null);
138
144
  }
139
- o();
145
+ s();
140
146
  }
141
147
  }
142
148
  }
143
- function O(e, n, r, i = 0) {
144
- if (f(e) || r && f(r)) return;
145
- let a = d(t.content.blocks, e);
149
+ function j(e, t, n, r = 0) {
150
+ if (_(e) || n && _(n)) return;
151
+ let a = m(i.content.blocks, e);
146
152
  if (!a) return;
147
- let s = a.blocks.findIndex((t) => t.id === e);
148
- if (s === -1 || r && a.blocks[s].type === "section") return;
153
+ let o = a.blocks.findIndex((t) => t.id === e);
154
+ if (o === -1 || n && a.blocks[o].type === "section") return;
149
155
  let c;
150
- if (r) {
151
- let e = l(t.content.blocks, r);
152
- if (!e || e.type !== "section" || i < 0 || i >= b(e.columns)) return;
153
- e.children[i] = e.children[i] || [], c = e.children[i];
154
- } else c = t.content.blocks;
155
- let [u] = a.blocks.splice(s, 1);
156
- c.splice(n, 0, u), o();
156
+ if (n) {
157
+ let e = f(i.content.blocks, n);
158
+ if (!e || e.type !== "section" || r < 0 || r >= S(e.columns)) return;
159
+ e.children[r] = e.children[r] || [], c = e.children[r];
160
+ } else c = i.content.blocks;
161
+ let [l] = a.blocks.splice(o, 1);
162
+ c.splice(t, 0, l), s();
157
163
  }
158
- function k() {
159
- o();
164
+ function M() {
165
+ s();
160
166
  }
161
- function A(e, t) {
162
- throw new p(`[Templatical] Templates: ${e} ${t}`);
167
+ function N(e, t) {
168
+ throw new h(`[Templatical] Templates: ${e} ${t}`);
163
169
  }
164
- function j(t) {
165
- y(e.onError, t);
170
+ function P(t) {
171
+ x(e.onError, t);
166
172
  }
167
- function M(t) {
173
+ function F(t) {
168
174
  let { templates: n } = e;
169
- return n || A(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
175
+ return n || N(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
170
176
  }
171
- function N(e) {
172
- t.template && (t.template = {
173
- ...t.template,
177
+ function I(e) {
178
+ i.template && (i.template = {
179
+ ...i.template,
174
180
  name: e
175
- }, o());
181
+ }, s());
176
182
  }
177
- async function P(n) {
178
- let r = M("create()"), { create: a } = r;
179
- typeof a != "function" && A("create()", "is disabled by the provider — its `create` is `false`.");
180
- let o;
181
- t.isLoading = !0;
183
+ async function L(t) {
184
+ let n = F("create()"), { create: r } = n;
185
+ typeof r != "function" && N("create()", "is disabled by the provider — its `create` is `false`.");
186
+ let a;
187
+ i.isLoading = !0;
182
188
  try {
183
- n?.content && (t.content = n.content);
184
- let e = i;
185
- o = await a(n?.name === void 0 ? { content: t.content } : {
186
- name: n.name,
187
- content: t.content
188
- }), t.template = o, i === e && (t.isDirty = !1);
189
+ t?.content && (i.content = t.content);
190
+ let e = o;
191
+ a = await r(t?.name === void 0 ? { content: i.content } : {
192
+ name: t.name,
193
+ content: i.content
194
+ }), i.template = a, o === e && (i.isDirty = !1);
189
195
  } catch (t) {
190
196
  throw e.onError?.(t), t;
191
197
  } finally {
192
- t.isLoading = !1;
198
+ i.isLoading = !1;
193
199
  }
194
- return j(() => r.onCreated?.(o)), o;
200
+ return P(() => n.onCreated?.(a)), a;
195
201
  }
196
- async function F(n) {
197
- let r = M("load()"), i;
198
- t.isLoading = !0;
202
+ async function R(t) {
203
+ let n = F("load()"), r;
204
+ i.isLoading = !0;
199
205
  try {
200
- i = await r.load(n), t.template = i, t.content = i.content, t.isDirty = !1;
206
+ r = await n.load(t), g(r.content), d(r.content), i.template = r, i.content = r.content, i.isDirty = !1;
201
207
  } catch (t) {
202
208
  throw e.onError?.(t), t;
203
209
  } finally {
204
- t.isLoading = !1;
210
+ i.isLoading = !1;
205
211
  }
206
- return j(() => r.onLoaded?.(i)), i;
207
- }
208
- async function I(n = "api") {
209
- let r = M("save()"), { save: a } = r;
210
- typeof a != "function" && A("save()", "is disabled by the provider — its `save` is `false`.");
211
- let o = t.template;
212
- o || A("save()", "has no template loaded. Call create() or load() first.");
213
- let s = o.name === void 0 ? { content: t.content } : {
214
- name: o.name,
215
- content: t.content
212
+ return P(() => n.onLoaded?.(r)), r;
213
+ }
214
+ async function z(t = "api") {
215
+ let n = F("save()"), { save: r } = n;
216
+ typeof r != "function" && N("save()", "is disabled by the provider — its `save` is `false`.");
217
+ let a = i.template;
218
+ a || N("save()", "has no template loaded. Call create() or load() first.");
219
+ let s = a.name === void 0 ? { content: i.content } : {
220
+ name: a.name,
221
+ content: i.content
216
222
  }, c;
217
- t.isSaving = !0;
223
+ i.isSaving = !0;
218
224
  try {
219
- let e = i;
220
- if (c = await a(o.id, s), t.template?.id === o.id) {
221
- let e = t.template.name;
222
- t.template = e === o.name ? c : {
225
+ let e = o;
226
+ if (c = await r(a.id, s), i.template?.id === a.id) {
227
+ let e = i.template.name;
228
+ i.template = e === a.name ? c : {
223
229
  ...c,
224
230
  name: e
225
231
  };
226
232
  }
227
- i === e && (t.isDirty = !1);
233
+ o === e && (i.isDirty = !1);
228
234
  } catch (t) {
229
235
  throw e.onError?.(t), t;
230
236
  } finally {
231
- t.isSaving = !1;
237
+ i.isSaving = !1;
232
238
  }
233
- return j(() => r.onSaved?.(c, { trigger: n })), c;
239
+ return P(() => n.onSaved?.(c, { trigger: t })), c;
234
240
  }
235
- function L() {
236
- return t.template?.id !== void 0;
241
+ function B() {
242
+ return i.template?.id !== void 0;
237
243
  }
238
244
  return {
239
- state: a(t),
240
- content: s,
241
- selectedBlock: c,
242
- isBlockLocked: f,
243
- setContent: g,
244
- selectBlock: _,
245
- setViewport: v,
246
- setDarkMode: x,
247
- setUiTheme: S,
248
- setPreviewMode: C,
249
- updateBlock: w,
250
- updateSettings: T,
251
- addBlock: E,
252
- removeBlock: D,
253
- moveBlock: O,
254
- markDirty: k,
255
- findBlockLocation: h,
256
- setName: N,
257
- create: P,
258
- load: F,
259
- save: I,
260
- hasTemplate: L
245
+ state: a(i),
246
+ content: c,
247
+ selectedBlock: l,
248
+ isBlockLocked: _,
249
+ setContent: y,
250
+ selectBlock: b,
251
+ setViewport: C,
252
+ setDarkMode: w,
253
+ setUiTheme: T,
254
+ setPreviewMode: E,
255
+ updateBlock: D,
256
+ updateSettings: O,
257
+ addBlock: k,
258
+ removeBlock: A,
259
+ moveBlock: j,
260
+ markDirty: M,
261
+ findBlockLocation: v,
262
+ setName: I,
263
+ create: L,
264
+ load: R,
265
+ save: z,
266
+ hasTemplate: B
261
267
  };
262
268
  }
263
269
  //#endregion
264
270
  //#region ../core/src/history.ts
265
- var S = 50, C = 300, w = 1500;
266
- function T(e) {
267
- let { content: r, setContent: i, isRemoteOperation: a, maxSize: o = S } = e, s = t([]), c = t([]), l = t(!1), u = null, f = null, p = n(() => s.value.length > 0), m = n(() => c.value.length > 0);
271
+ var w = 50, T = 300, E = 1500;
272
+ function D(e) {
273
+ let { content: r, setContent: i, isRemoteOperation: a, maxSize: o = w } = e, s = t([]), c = t([]), l = t(!1), u = null, d = null, p = n(() => s.value.length > 0), m = n(() => c.value.length > 0);
268
274
  function h() {
269
- return d(r.value);
275
+ return f(r.value);
270
276
  }
271
277
  function g(e) {
272
278
  s.value.push(e), s.value.length > o && s.value.splice(0, s.value.length - o);
273
279
  }
274
280
  function _() {
275
- f &&= (clearTimeout(f.timeoutId), null);
281
+ d &&= (clearTimeout(d.timeoutId), null);
276
282
  }
277
283
  function v() {
278
284
  a?.() || (_(), g(h()), c.value = []);
279
285
  }
280
286
  function y(e) {
281
287
  if (!a?.()) {
282
- if (f && f.blockId === e) {
283
- clearTimeout(f.timeoutId), f.timeoutId = setTimeout(() => {
284
- f = null;
285
- }, C);
288
+ if (d && d.blockId === e) {
289
+ clearTimeout(d.timeoutId), d.timeoutId = setTimeout(() => {
290
+ d = null;
291
+ }, T);
286
292
  return;
287
293
  }
288
- _(), g(h()), c.value = [], f = {
294
+ _(), g(h()), c.value = [], d = {
289
295
  blockId: e,
290
296
  timeoutId: setTimeout(() => {
291
- f = null;
292
- }, C)
297
+ d = null;
298
+ }, T)
293
299
  };
294
300
  }
295
301
  }
296
302
  function b() {
297
303
  l.value = !0, u && clearTimeout(u), u = setTimeout(() => {
298
304
  l.value = !1, u = null;
299
- }, w);
305
+ }, E);
300
306
  }
301
307
  function x() {
302
308
  if (s.value.length === 0) return;
@@ -304,59 +310,59 @@ function T(e) {
304
310
  let e = s.value.pop();
305
311
  c.value.push(h()), i(e, !0), b();
306
312
  }
307
- function T() {
313
+ function S() {
308
314
  if (c.value.length === 0) return;
309
315
  _();
310
316
  let e = c.value.pop();
311
317
  s.value.push(h()), i(e, !0), b();
312
318
  }
313
- function E() {
319
+ function C() {
314
320
  s.value = [], c.value = [], _();
315
321
  }
316
322
  function D() {
317
- E(), u &&= (clearTimeout(u), null);
323
+ C(), u &&= (clearTimeout(u), null);
318
324
  }
319
325
  return {
320
326
  canUndo: p,
321
327
  canRedo: m,
322
328
  isNavigating: l,
323
329
  undo: x,
324
- redo: T,
330
+ redo: S,
325
331
  record: v,
326
332
  recordDebounced: y,
327
- clear: E,
333
+ clear: C,
328
334
  destroy: D
329
335
  };
330
336
  }
331
337
  //#endregion
332
338
  //#region ../core/src/block-actions.ts
333
- function E(e) {
339
+ function O(e) {
334
340
  e.type === "table" ? e.rows = e.rows.map((e) => ({
335
341
  ...e,
336
- id: l(),
342
+ id: p(),
337
343
  cells: e.cells.map((e) => ({
338
344
  ...e,
339
- id: l()
345
+ id: p()
340
346
  }))
341
347
  })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
342
348
  ...e,
343
- id: l()
349
+ id: p()
344
350
  })) : e.type === "menu" && (e.items = e.items.map((e) => ({
345
351
  ...e,
346
- id: l()
352
+ id: p()
347
353
  })));
348
354
  }
349
- function D(e) {
355
+ function k(e) {
350
356
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
351
357
  function o(n, r, a) {
352
- let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = u(n, o);
358
+ let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = l(n, o);
353
359
  return t(s, r, a), i(s.id), s;
354
360
  }
355
361
  function s(e, n, r) {
356
362
  let o = JSON.parse(JSON.stringify(e));
357
- if (o.id = l(), E(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
363
+ if (o.id = p(), O(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
358
364
  let t = JSON.parse(JSON.stringify(e));
359
- return t.id = l(), E(t), t;
365
+ return t.id = p(), O(t), t;
360
366
  }))), n !== void 0 || r !== void 0) t(o, n, r);
361
367
  else {
362
368
  let i = a?.(e.id) ?? null;
@@ -367,21 +373,21 @@ function D(e) {
367
373
  function c(e) {
368
374
  n(e);
369
375
  }
370
- function d(e, t, n) {
376
+ function u(e, t, n) {
371
377
  r(e, { [t]: n });
372
378
  }
373
379
  return {
374
380
  createAndAddBlock: o,
375
381
  duplicateBlock: s,
376
382
  deleteBlock: c,
377
- updateBlockProperty: d
383
+ updateBlockProperty: u
378
384
  };
379
385
  }
380
386
  //#endregion
381
387
  //#region ../core/src/auto-save.ts
382
- var O = 2e3;
383
- function k(e) {
384
- let { content: t, isDirty: n, onChange: r, debounce: i = O, enabled: a = !0 } = e, o = null, c = !1;
388
+ var A = 2e3;
389
+ function j(e) {
390
+ let { content: t, isDirty: n, onChange: r, debounce: i = A, enabled: a = !0 } = e, o = null, c = !1;
385
391
  function l() {
386
392
  return typeof a == "function" ? a() : a;
387
393
  }
@@ -418,7 +424,7 @@ function k(e) {
418
424
  }
419
425
  //#endregion
420
426
  //#region ../core/src/condition-preview.ts
421
- function A(e) {
427
+ function M(e) {
422
428
  let t = r(/* @__PURE__ */ new Set()), i = n(() => t.size > 0);
423
429
  function a(e) {
424
430
  return t.has(e);
@@ -438,7 +444,7 @@ function A(e) {
438
444
  }
439
445
  //#endregion
440
446
  //#region ../core/src/data-source-fetch.ts
441
- function j(e) {
447
+ function N(e) {
442
448
  let r = t(!1), i = t(!1), a = n(() => !!e.definition.value?.dataSource), o = n(() => a.value && !e.block.value.dataSourceFetched);
443
449
  async function s() {
444
450
  let t = e.definition.value;
@@ -470,7 +476,7 @@ function j(e) {
470
476
  }
471
477
  //#endregion
472
478
  //#region ../core/src/history-interceptor.ts
473
- function M(e, t) {
479
+ function P(e, t) {
474
480
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
475
481
  e.addBlock = (r, i, a, o) => {
476
482
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -486,7 +492,7 @@ function M(e, t) {
486
492
  }
487
493
  //#endregion
488
494
  //#region ../core/src/saved-blocks.ts
489
- function N(e) {
495
+ function F(e) {
490
496
  let { provider: n } = e, r = t([]), i = t(!1), a = o(() => {
491
497
  let e = /* @__PURE__ */ new Set();
492
498
  for (let t of r.value) {
@@ -502,12 +508,12 @@ function N(e) {
502
508
  return l.value && e.canDelete !== !1;
503
509
  }
504
510
  function f(e, t) {
505
- throw new p(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
511
+ throw new h(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
506
512
  }
507
- function m(t) {
508
- y(e.onError, t);
513
+ function p(t) {
514
+ x(e.onError, t);
509
515
  }
510
- async function h(t) {
516
+ async function m(t) {
511
517
  i.value = !0;
512
518
  try {
513
519
  r.value = await n.list(t);
@@ -529,7 +535,7 @@ function N(e) {
529
535
  name: t,
530
536
  content: i
531
537
  });
532
- return r.value = [e, ...r.value], m(() => n.onCreated?.(e)), e;
538
+ return r.value = [e, ...r.value], p(() => n.onCreated?.(e)), e;
533
539
  } catch (t) {
534
540
  throw e.onError?.(t), t;
535
541
  }
@@ -541,7 +547,7 @@ function N(e) {
541
547
  o && o.canUpdate === !1 && f("update", `not permitted for entry "${t}"`);
542
548
  try {
543
549
  let e = await a(t, i);
544
- return r.value = r.value.map((n) => n.id === t ? e : n), m(() => n.onUpdated?.(e)), e;
550
+ return r.value = r.value.map((n) => n.id === t ? e : n), p(() => n.onUpdated?.(e)), e;
545
551
  } catch (t) {
546
552
  throw e.onError?.(t), t;
547
553
  }
@@ -552,7 +558,7 @@ function N(e) {
552
558
  let a = r.value.find((e) => e.id === t) ?? null;
553
559
  a && a.canDelete === !1 && f("delete", `not permitted for entry "${t}"`);
554
560
  try {
555
- await i(t), r.value = r.value.filter((e) => e.id !== t), a && m(() => n.onDeleted?.(a));
561
+ await i(t), r.value = r.value.filter((e) => e.id !== t), a && p(() => n.onDeleted?.(a));
556
562
  } catch (t) {
557
563
  throw e.onError?.(t), t;
558
564
  }
@@ -566,7 +572,7 @@ function N(e) {
566
572
  canDelete: l,
567
573
  canUpdateBlock: u,
568
574
  canDeleteBlock: d,
569
- load: h,
575
+ load: m,
570
576
  create: g,
571
577
  update: _,
572
578
  remove: v
@@ -574,9 +580,9 @@ function N(e) {
574
580
  }
575
581
  //#endregion
576
582
  //#region ../core/src/saved-blocks-local.ts
577
- var P = "templatical:saved-blocks";
578
- function F(e = {}) {
579
- let t = e.key ?? P;
583
+ var I = "templatical:saved-blocks";
584
+ function L(e = {}) {
585
+ let t = e.key ?? I;
580
586
  function n() {
581
587
  if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
582
588
  return localStorage;
@@ -601,7 +607,7 @@ function F(e = {}) {
601
607
  },
602
608
  async create(e) {
603
609
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
604
- id: l(),
610
+ id: p(),
605
611
  name: e.name,
606
612
  content: e.content,
607
613
  ...e.category ? { category: e.category } : {},
@@ -629,9 +635,9 @@ function F(e = {}) {
629
635
  }
630
636
  //#endregion
631
637
  //#region ../core/src/media-local.ts
632
- var I = "templatical:media", L = 50;
633
- function R(e = {}) {
634
- let t = e.key ?? I;
638
+ var R = "templatical:media", z = 50;
639
+ function B(e = {}) {
640
+ let t = e.key ?? R;
635
641
  function n() {
636
642
  if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with localStorage. Supply your own MediaProvider for server-side or non-browser use.");
637
643
  return localStorage;
@@ -668,12 +674,12 @@ function R(e = {}) {
668
674
  let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
669
675
  let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
670
676
  return t.includes(n) || r.includes(n);
671
- }) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + L), c = { items: s }, l = o + s.length;
677
+ }) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + z), c = { items: s }, l = o + s.length;
672
678
  return l < i.length && (c.nextCursor = String(l)), c;
673
679
  },
674
680
  async create(e) {
675
681
  let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
676
- id: l(),
682
+ id: p(),
677
683
  url: t,
678
684
  filename: e.filename || e.file.name,
679
685
  createdAt: n,
@@ -710,18 +716,18 @@ function R(e = {}) {
710
716
  }
711
717
  //#endregion
712
718
  //#region ../core/src/version-history.ts
713
- function z(e) {
719
+ function V(e) {
714
720
  let { provider: n, getTemplateId: r } = e, i = t([]), a = t(!1), s = t(void 0), c = t(!1), l = /* @__PURE__ */ new Map(), u = o(() => typeof n.create == "function"), d = o(() => typeof n.restore == "function");
715
721
  function f(e) {
716
722
  let t = r();
717
- if (!t) throw new p(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
723
+ if (!t) throw new h(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
718
724
  return t;
719
725
  }
720
- function m(e) {
721
- throw new p(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
726
+ function p(e) {
727
+ throw new h(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
722
728
  }
723
- function h(t) {
724
- y(e.onError, t);
729
+ function m(t) {
730
+ x(e.onError, t);
725
731
  }
726
732
  async function g(t) {
727
733
  let r = f("list");
@@ -749,20 +755,20 @@ function z(e) {
749
755
  throw e.onError?.(t), t;
750
756
  }
751
757
  }
752
- async function b(t, r) {
758
+ async function y(t, r) {
753
759
  let { create: a } = n;
754
- typeof a != "function" && m("create");
760
+ typeof a != "function" && p("create");
755
761
  let o = f("create");
756
762
  try {
757
763
  let e = await a(o, t, r);
758
- return i.value = [e, ...i.value], h(() => n.onCreated?.(e)), e;
764
+ return i.value = [e, ...i.value], m(() => n.onCreated?.(e)), e;
759
765
  } catch (t) {
760
766
  throw e.onError?.(t), t;
761
767
  }
762
768
  }
763
- async function x(t) {
769
+ async function b(t) {
764
770
  let { restore: r } = n;
765
- typeof r != "function" && m("restore");
771
+ typeof r != "function" && p("restore");
766
772
  let i = f("restore"), a;
767
773
  c.value = !0;
768
774
  try {
@@ -772,7 +778,7 @@ function z(e) {
772
778
  } finally {
773
779
  c.value = !1;
774
780
  }
775
- return h(() => n.onRestored?.(a)), a;
781
+ return m(() => n.onRestored?.(a)), a;
776
782
  }
777
783
  return {
778
784
  nextCursor: s,
@@ -784,30 +790,30 @@ function z(e) {
784
790
  load: g,
785
791
  peekContent: _,
786
792
  resolveContent: v,
787
- create: b,
788
- restore: x
793
+ create: y,
794
+ restore: b
789
795
  };
790
796
  }
791
797
  //#endregion
792
798
  //#region ../core/src/comments.ts
793
- function B(e) {
794
- let { provider: n, getTemplateId: r, getUser: i } = e, a = t([]), s = t(!1), c = t(!1), l = o(() => typeof n.create == "function"), u = o(() => typeof n.update == "function"), d = o(() => typeof n.delete == "function"), f = o(() => typeof n.setResolved == "function"), m = o(() => a.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), h = o(() => a.value.filter((e) => !e.resolvedAt).length), g = o(() => {
799
+ function H(e) {
800
+ let { provider: n, getTemplateId: r, getUser: i } = e, a = t([]), s = t(!1), c = t(!1), l = o(() => typeof n.create == "function"), u = o(() => typeof n.update == "function"), d = o(() => typeof n.delete == "function"), f = o(() => typeof n.setResolved == "function"), p = o(() => a.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), m = o(() => a.value.filter((e) => !e.resolvedAt).length), g = o(() => {
795
801
  let e = /* @__PURE__ */ new Map();
796
802
  for (let t of a.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
797
803
  return e;
798
804
  });
799
805
  function _(e) {
800
806
  let t = r();
801
- if (!t) throw new p(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
807
+ if (!t) throw new h(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
802
808
  return t;
803
809
  }
804
- function b(e) {
810
+ function v(e) {
805
811
  let t = i();
806
- if (!t) throw new p(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
812
+ if (!t) throw new h(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
807
813
  return t;
808
814
  }
809
- function x(e) {
810
- throw new p(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
815
+ function y(e) {
816
+ throw new h(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
811
817
  }
812
818
  function S(e) {
813
819
  for (let t of a.value) {
@@ -821,11 +827,11 @@ function B(e) {
821
827
  return t !== null && e.author.id === t.id;
822
828
  }
823
829
  function w(t) {
824
- let n = v(t);
830
+ let n = b(t);
825
831
  throw e.onError?.(n), n;
826
832
  }
827
833
  function T(t) {
828
- y(e.onError, t);
834
+ x(e.onError, t);
829
835
  }
830
836
  function E(e, t, n) {
831
837
  return [
@@ -877,9 +883,9 @@ function B(e) {
877
883
  }
878
884
  async function j(e) {
879
885
  let { create: t } = n;
880
- typeof t != "function" && x("create");
886
+ typeof t != "function" && y("create");
881
887
  let r = _("create");
882
- b("create"), c.value = !0;
888
+ v("create"), c.value = !0;
883
889
  try {
884
890
  let i = await t(r, e);
885
891
  return O(i), T(() => n.onCreated?.(i, { origin: "local" })), i;
@@ -891,9 +897,9 @@ function B(e) {
891
897
  }
892
898
  async function M(e, t) {
893
899
  let { update: r } = n;
894
- typeof r != "function" && x("update");
900
+ typeof r != "function" && y("update");
895
901
  let i = _("update");
896
- b("update"), c.value = !0;
902
+ v("update"), c.value = !0;
897
903
  try {
898
904
  let a = await r(i, e, t);
899
905
  return O(a), T(() => n.onUpdated?.(a, { origin: "local" })), a;
@@ -905,9 +911,9 @@ function B(e) {
905
911
  }
906
912
  async function N(e) {
907
913
  let { delete: t } = n;
908
- typeof t != "function" && x("delete");
914
+ typeof t != "function" && y("delete");
909
915
  let r = _("delete");
910
- b("delete");
916
+ v("delete");
911
917
  let i = S(e);
912
918
  c.value = !0;
913
919
  try {
@@ -920,9 +926,9 @@ function B(e) {
920
926
  }
921
927
  async function P(e, t) {
922
928
  let { setResolved: r } = n;
923
- typeof r != "function" && x("setResolved");
929
+ typeof r != "function" && y("setResolved");
924
930
  let i = _("setResolved");
925
- b("setResolved"), c.value = !0;
931
+ v("setResolved"), c.value = !0;
926
932
  try {
927
933
  let a = await r(i, e, t);
928
934
  return O(a), T(() => (a.resolvedAt ? n.onResolved : n.onUnresolved)?.(a, { origin: "local" })), a;
@@ -950,8 +956,8 @@ function B(e) {
950
956
  canUpdate: u,
951
957
  canDelete: d,
952
958
  canResolve: f,
953
- totalCount: m,
954
- unresolvedCount: h,
959
+ totalCount: p,
960
+ unresolvedCount: m,
955
961
  commentCountByBlock: g,
956
962
  load: A,
957
963
  create: j,
@@ -965,7 +971,7 @@ function B(e) {
965
971
  applyRemoteDelete: L
966
972
  };
967
973
  }
968
- function V(t) {
974
+ function U(t) {
969
975
  let { comments: n, provider: r, getTemplateId: a } = t, { subscribe: o } = r;
970
976
  if (typeof o != "function") return;
971
977
  let s = null;
@@ -988,18 +994,18 @@ function V(t) {
988
994
  }
989
995
  //#endregion
990
996
  //#region src/utils/blockTypeLabels.ts
991
- function H(e, t) {
997
+ function W(e, t) {
992
998
  return t.blocks[e] ?? e;
993
999
  }
994
- function U(e, t, n = []) {
995
- if (e.type !== "custom") return H(e.type, t);
1000
+ function G(e, t, n = []) {
1001
+ if (e.type !== "custom") return W(e.type, t);
996
1002
  let { customType: r } = e;
997
1003
  return n.find((e) => e.type === r)?.name ?? r;
998
1004
  }
999
1005
  //#endregion
1000
1006
  //#region src/utils/resolveFieldColors.ts
1001
- function W(e, t) {
1002
- let n = _({ presets: e.presets }, g), r = n.presets.length === 0;
1007
+ function K(e, t) {
1008
+ let n = y({ presets: e.presets }, v), r = n.presets.length === 0;
1003
1009
  return {
1004
1010
  presets: r ? t.presets : n.presets,
1005
1011
  allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
@@ -1011,13 +1017,13 @@ function W(e, t) {
1011
1017
  }
1012
1018
  //#endregion
1013
1019
  //#region src/composables/useImageDrop.ts
1014
- var G = "image/";
1015
- function K(e) {
1016
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || c(r), { isOverDropZone: a } = h(t, {
1020
+ var q = "image/";
1021
+ function J(e) {
1022
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || c(r), { isOverDropZone: a } = _(t, {
1017
1023
  preventDefaultForUnhandled: !0,
1018
1024
  onDrop: (e) => {
1019
1025
  if (!i()) return;
1020
- let t = (e ?? []).filter((e) => e.type.startsWith(G));
1026
+ let t = (e ?? []).filter((e) => e.type.startsWith(q));
1021
1027
  t.length > 0 && n([t[0]]);
1022
1028
  }
1023
1029
  });
@@ -1025,11 +1031,11 @@ function K(e) {
1025
1031
  }
1026
1032
  //#endregion
1027
1033
  //#region src/constants/socialIcons.ts
1028
- var q = f, J = {
1034
+ var Y = m, X = {
1029
1035
  small: 24,
1030
1036
  medium: 32,
1031
1037
  large: 48
1032
- }, Y = [
1038
+ }, Z = [
1033
1039
  "facebook",
1034
1040
  "twitter",
1035
1041
  "instagram",
@@ -1049,6 +1055,6 @@ var q = f, J = {
1049
1055
  "behance"
1050
1056
  ];
1051
1057
  //#endregion
1052
- export { O as _, W as a, T as b, V as c, R as d, F as f, A as g, j as h, K as i, B as l, M as m, q as n, U as o, N as p, Y as r, H as s, J as t, z as u, k as v, x, D as y };
1058
+ export { A as _, K as a, D as b, U as c, B as d, L as f, M as g, N as h, J as i, H as l, P as m, Y as n, G as o, F as p, Z as r, W as s, X as t, V as u, j as v, C as x, k as y };
1053
1059
 
1054
- //# sourceMappingURL=socialIcons-9VrG8X3m.js.map
1060
+ //# sourceMappingURL=socialIcons-BvYNMn1G.js.map