@templatical/editor 0.34.3 → 0.36.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 (290) hide show
  1. package/dist/{AiChatSidebar-CkHJ28sf.js → AiChatSidebar-tu4eLcf_.js} +78 -70
  2. package/dist/{AiFeatureMenu-DWdKguDN.js → AiFeatureMenu-BF0i0vA4.js} +17 -17
  3. package/dist/{BlockIssueBadge-DcyHTAqw.js → BlockIssueBadge-DT-FqKeC.js} +9 -9
  4. package/dist/BlockPreviewCanvas-DDCmMram.js +131 -0
  5. package/dist/CloudHeaderExtras-NPhudovT.js +59 -0
  6. package/dist/{CloudPanels-BGz9ygo6.js → CloudPanels-Iwnky0iA.js} +78 -108
  7. package/dist/CollaboratorBar-DAITu0hz.js +103 -0
  8. package/dist/{ColorPicker-C6EOwtHC.js → ColorPicker-BqlZ_TqG.js} +193 -193
  9. package/dist/{CommentsPanel-DmWh8f08.js → CommentsPanel-CDvgmWP1.js} +3 -3
  10. package/dist/{CommentsSidebar-CL_tffzT.js → CommentsSidebar-X_xqM3dR.js} +182 -173
  11. package/dist/{CountdownBlock-D1fsNsyS.js → CountdownBlock-ZFJIdbP6.js} +12 -12
  12. package/dist/{CountdownToolbar-B8J4i5Xp.js → CountdownToolbar-DBFoG3a6.js} +67 -67
  13. package/dist/{DesignReferenceSidebar-BDhEeaAh.js → DesignReferenceSidebar--QtXjLrw.js} +103 -95
  14. package/dist/{FieldRow-BWt7ECqo.js → FieldRow-C8nOknr_.js} +39 -39
  15. package/dist/IssuesPanel-BLbNFMSX.js +117 -0
  16. package/dist/{LoadingTrack-SQXoZVf2.js → LoadingTrack-BlTL4zFv.js} +2 -2
  17. package/dist/MediaPanels-CMTAhDXB.js +43 -0
  18. package/dist/{MergeTagInput-RytOlh1A.js → MergeTagInput-BEjzj4Iu.js} +153 -144
  19. package/dist/{MergeTagModeToggle-Bi-FydXj.js → MergeTagModeToggle-DKN6ihI5.js} +108 -96
  20. package/dist/{MergeTagSuggestion-CoCuzEmW.js → MergeTagSuggestion-DKoLEeoj.js} +21 -21
  21. package/dist/ParagraphEditor-1E9yzOfk.js +782 -0
  22. package/dist/{RestoreVersionDialog-Db5rZRMA.js → RestoreVersionDialog-BMGUkcd8.js} +28 -28
  23. package/dist/RichTextEditorContent-BnxbQUV9.js +154 -0
  24. package/dist/{SaveBlockDialog-CDCzx6Bo.js → SaveBlockDialog-WKASpCCT.js} +78 -78
  25. package/dist/SavedBlocksBrowserModal-AYEXTMtQ.js +323 -0
  26. package/dist/{SavedBlocksPanels-DFzV0CRD.js → SavedBlocksPanels-D_CpacTl.js} +6 -6
  27. package/dist/{SavedBlocksPickBar-XyXmnSnO.js → SavedBlocksPickBar-BHMwg-1G.js} +11 -11
  28. package/dist/TemplateScoringPanel-CSin43YM.js +267 -0
  29. package/dist/{TestEmailModal-DIfJy9eE.js → TestEmailModal-BxizsRCd.js} +59 -59
  30. package/dist/{TestEmailPanel-C8Wx5yPS.js → TestEmailPanel-vd2e5HzT.js} +3 -3
  31. package/dist/TitleEditor-CLJ68Ty4.js +199 -0
  32. package/dist/TplModal-Q9fDgS1M.js +51 -0
  33. package/dist/{VersionHistoryMenu-CV90OhXs.js → VersionHistoryMenu-eGYVhM4H.js} +48 -46
  34. package/dist/{VersionHistoryPanels-BE3pplJG.js → VersionHistoryPanels-C7Ntrrfq.js} +4 -4
  35. package/dist/{VersionPreviewBanner-BwUWBtlH.js → VersionPreviewBanner-BbQXnR0M.js} +9 -9
  36. package/dist/blockTypeIcons-5qD4bB76.js +163 -0
  37. package/dist/bundle-stats.json +8 -8
  38. package/dist/{ca-C0hfqt4U.js → ca-D9S-UCfZ.js} +2 -0
  39. package/dist/ca-Jx2CDwtn.js +83 -0
  40. package/dist/cdn/chunks/{AiChatSidebar-BEnIWn6s.js → AiChatSidebar-dyqqHAcI.js} +4 -4
  41. package/dist/cdn/chunks/{AiChatSidebar-BEnIWn6s.js.map → AiChatSidebar-dyqqHAcI.js.map} +1 -1
  42. package/dist/cdn/chunks/{AiFeatureMenu-DMl23akc.js → AiFeatureMenu-BjVMwhW8.js} +5 -5
  43. package/dist/cdn/chunks/{AiFeatureMenu-DMl23akc.js.map → AiFeatureMenu-BjVMwhW8.js.map} +1 -1
  44. package/dist/cdn/chunks/{BlockIssueBadge-CloK4k3M.js → BlockIssueBadge-BJ__oEtm.js} +4 -4
  45. package/dist/cdn/chunks/{BlockIssueBadge-CloK4k3M.js.map → BlockIssueBadge-BJ__oEtm.js.map} +1 -1
  46. package/dist/cdn/chunks/BlockPreviewCanvas-B5f26eLE.js +133 -0
  47. package/dist/cdn/chunks/BlockPreviewCanvas-B5f26eLE.js.map +1 -0
  48. package/dist/cdn/chunks/{CloudHeaderExtras-b4KpVeUN.js → CloudHeaderExtras-D5P5IEKA.js} +4 -4
  49. package/dist/cdn/chunks/{CloudHeaderExtras-b4KpVeUN.js.map → CloudHeaderExtras-D5P5IEKA.js.map} +1 -1
  50. package/dist/cdn/chunks/{CloudPanels-DzwOq9lp.js → CloudPanels-DkmR05nB.js} +15 -45
  51. package/dist/cdn/chunks/{CloudPanels-DzwOq9lp.js.map → CloudPanels-DkmR05nB.js.map} +1 -1
  52. package/dist/cdn/chunks/{CollaboratorBar-WXKvpoGK.js → CollaboratorBar-Yn7KSpt4.js} +4 -4
  53. package/dist/cdn/chunks/{CollaboratorBar-WXKvpoGK.js.map → CollaboratorBar-Yn7KSpt4.js.map} +1 -1
  54. package/dist/cdn/chunks/{ColorPicker-BubTDiS1.js → ColorPicker-LcrzgMoW.js} +7 -7
  55. package/dist/cdn/chunks/{ColorPicker-BubTDiS1.js.map → ColorPicker-LcrzgMoW.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-DAA2VqX4.js → CommentsPanel-CntwwocI.js} +2 -2
  57. package/dist/cdn/chunks/{CommentsPanel-DAA2VqX4.js.map → CommentsPanel-CntwwocI.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-Ci0M2ePp.js → CommentsSidebar-BLDKnKy7.js} +4 -4
  59. package/dist/cdn/chunks/{CommentsSidebar-Ci0M2ePp.js.map → CommentsSidebar-BLDKnKy7.js.map} +1 -1
  60. package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js → CountdownBlock-B4AfqJwb.js} +2 -2
  61. package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js.map → CountdownBlock-B4AfqJwb.js.map} +1 -1
  62. package/dist/cdn/chunks/{CountdownToolbar-CzZq26Vp.js → CountdownToolbar-CA1dpuOI.js} +3 -3
  63. package/dist/cdn/chunks/{CountdownToolbar-CzZq26Vp.js.map → CountdownToolbar-CA1dpuOI.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-C_ehdX5C.js → DesignReferenceSidebar-D1Y9Hswe.js} +5 -5
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-C_ehdX5C.js.map → DesignReferenceSidebar-D1Y9Hswe.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-BXAN2_al.js → IssuesPanel-Q62LTqvd.js} +5 -5
  67. package/dist/cdn/chunks/{IssuesPanel-BXAN2_al.js.map → IssuesPanel-Q62LTqvd.js.map} +1 -1
  68. package/dist/cdn/chunks/MediaPanels-D21M6shx.js +45 -0
  69. package/dist/cdn/chunks/MediaPanels-D21M6shx.js.map +1 -0
  70. package/dist/cdn/chunks/{MergeTagInput-1vcI9uQH.js → MergeTagInput-l7paaAml.js} +8 -8
  71. package/dist/cdn/chunks/{MergeTagInput-1vcI9uQH.js.map → MergeTagInput-l7paaAml.js.map} +1 -1
  72. package/dist/cdn/chunks/{MergeTagModeToggle-B_mUYJo4.js → MergeTagModeToggle-DYxkAGtA.js} +5 -5
  73. package/dist/cdn/chunks/{MergeTagModeToggle-B_mUYJo4.js.map → MergeTagModeToggle-DYxkAGtA.js.map} +1 -1
  74. package/dist/cdn/chunks/{ParagraphEditor-DCDHMcmx.js → ParagraphEditor-Bd-GQXee.js} +176 -172
  75. package/dist/cdn/chunks/{ParagraphEditor-DCDHMcmx.js.map → ParagraphEditor-Bd-GQXee.js.map} +1 -1
  76. package/dist/cdn/chunks/{RestoreVersionDialog-BkSSwf-Q.js → RestoreVersionDialog-2X9RpM9A.js} +4 -4
  77. package/dist/cdn/chunks/{RestoreVersionDialog-BkSSwf-Q.js.map → RestoreVersionDialog-2X9RpM9A.js.map} +1 -1
  78. package/dist/cdn/chunks/{RichTextEditorContent-S4KogjIj.js → RichTextEditorContent-D_rb0rmU.js} +8 -8
  79. package/dist/cdn/chunks/{RichTextEditorContent-S4KogjIj.js.map → RichTextEditorContent-D_rb0rmU.js.map} +1 -1
  80. package/dist/cdn/chunks/{SaveBlockDialog-BH774Nt0.js → SaveBlockDialog-CufdTomT.js} +15 -15
  81. package/dist/cdn/chunks/{SaveBlockDialog-BH774Nt0.js.map → SaveBlockDialog-CufdTomT.js.map} +1 -1
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CSUqw_dD.js → SavedBlocksBrowserModal-CqpaNsk7.js} +8 -8
  83. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CSUqw_dD.js.map → SavedBlocksBrowserModal-CqpaNsk7.js.map} +1 -1
  84. package/dist/cdn/chunks/{SavedBlocksPanels-B6ApbCjG.js → SavedBlocksPanels-DpxYxddo.js} +2 -2
  85. package/dist/cdn/chunks/{SavedBlocksPanels-B6ApbCjG.js.map → SavedBlocksPanels-DpxYxddo.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-C9MXSRcR.js → SavedBlocksPickBar-Drpoav1B.js} +4 -4
  87. package/dist/cdn/chunks/{SavedBlocksPickBar-C9MXSRcR.js.map → SavedBlocksPickBar-Drpoav1B.js.map} +1 -1
  88. package/dist/cdn/chunks/{TemplateScoringPanel-QVOxc9TZ.js → TemplateScoringPanel-DBjUNULq.js} +5 -5
  89. package/dist/cdn/chunks/{TemplateScoringPanel-QVOxc9TZ.js.map → TemplateScoringPanel-DBjUNULq.js.map} +1 -1
  90. package/dist/cdn/chunks/{TestEmailModal-_CZvaO58.js → TestEmailModal-BTNlSW6f.js} +11 -11
  91. package/dist/cdn/chunks/{TestEmailModal-_CZvaO58.js.map → TestEmailModal-BTNlSW6f.js.map} +1 -1
  92. package/dist/cdn/chunks/{TestEmailPanel-DXLxvyrD.js → TestEmailPanel-D0A9Zgxr.js} +2 -2
  93. package/dist/cdn/chunks/{TestEmailPanel-DXLxvyrD.js.map → TestEmailPanel-D0A9Zgxr.js.map} +1 -1
  94. package/dist/cdn/chunks/{TitleEditor-BuCOahW3.js → TitleEditor-CrnuIq62.js} +9 -9
  95. package/dist/cdn/chunks/{TitleEditor-BuCOahW3.js.map → TitleEditor-CrnuIq62.js.map} +1 -1
  96. package/dist/cdn/chunks/{TplModal-CqY8R3hn.js → TplModal-DYXrTz42.js} +5 -5
  97. package/dist/cdn/chunks/{TplModal-CqY8R3hn.js.map → TplModal-DYXrTz42.js.map} +1 -1
  98. package/dist/cdn/chunks/{VersionHistoryMenu-DDjIBvad.js → VersionHistoryMenu-bDGnE4hb.js} +6 -6
  99. package/dist/cdn/chunks/VersionHistoryMenu-bDGnE4hb.js.map +1 -0
  100. package/dist/cdn/chunks/{VersionHistoryPanels-BuTw04T5.js → VersionHistoryPanels-82P0Q0HM.js} +2 -2
  101. package/dist/cdn/chunks/{VersionHistoryPanels-BuTw04T5.js.map → VersionHistoryPanels-82P0Q0HM.js.map} +1 -1
  102. package/dist/cdn/chunks/{VersionPreviewBanner-fGAv20qI.js → VersionPreviewBanner-BJiwKkVC.js} +3 -3
  103. package/dist/cdn/chunks/{VersionPreviewBanner-fGAv20qI.js.map → VersionPreviewBanner-BJiwKkVC.js.map} +1 -1
  104. package/dist/cdn/chunks/{blockTypeIcons-ZEzEpCti.js → blockTypeIcons-CNjJSFun.js} +2 -2
  105. package/dist/cdn/chunks/{blockTypeIcons-ZEzEpCti.js.map → blockTypeIcons-CNjJSFun.js.map} +1 -1
  106. package/dist/cdn/chunks/{ca-C0hfqt4U.js → ca-D9S-UCfZ.js} +3 -1
  107. package/dist/cdn/chunks/{ca-C0hfqt4U.js.map → ca-D9S-UCfZ.js.map} +1 -1
  108. package/dist/cdn/chunks/{ca-CNRWAMHI.js → ca-Jx2CDwtn.js} +2 -6
  109. package/dist/cdn/chunks/ca-Jx2CDwtn.js.map +1 -0
  110. package/dist/cdn/chunks/{cloud-BP5-6__d.js → cloud-BLgCKP7Z.js} +453 -228
  111. package/dist/cdn/chunks/cloud-BLgCKP7Z.js.map +1 -0
  112. package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js +385 -0
  113. package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js.map +1 -0
  114. package/dist/{de-C6J2Iae8.js → cdn/chunks/de-BUPszLpi.js} +4 -0
  115. package/dist/cdn/chunks/{de-C6J2Iae8.js.map → de-BUPszLpi.js.map} +1 -1
  116. package/dist/cdn/chunks/{de-DFYCT4QU.js → de-Ck0pBGHu.js} +2 -6
  117. package/dist/cdn/chunks/de-Ck0pBGHu.js.map +1 -0
  118. package/dist/cdn/chunks/{src-Cxl-9O-L.js → editor-modal-MXgtarMl.js} +1473 -1934
  119. package/dist/cdn/chunks/editor-modal-MXgtarMl.js.map +1 -0
  120. package/dist/cdn/chunks/{en-BaUYOQi8.js → en-BbOC5x3w.js} +3 -1
  121. package/dist/cdn/chunks/en-BbOC5x3w.js.map +1 -0
  122. package/dist/cdn/chunks/en-C9U7N77n.js +2 -0
  123. package/dist/cdn/chunks/{es-CKDYfJYn.js → es-0bCDcT9p.js} +3 -1
  124. package/dist/cdn/chunks/{es-CKDYfJYn.js.map → es-0bCDcT9p.js.map} +1 -1
  125. package/dist/cdn/chunks/{es-OgkdMZGX.js → es-lagTvUfX.js} +2 -6
  126. package/dist/cdn/chunks/es-lagTvUfX.js.map +1 -0
  127. package/dist/cdn/chunks/{extensions-7z04EIGg.js → extensions-B8_jnIkD.js} +4 -4
  128. package/dist/cdn/chunks/{extensions-7z04EIGg.js.map → extensions-B8_jnIkD.js.map} +1 -1
  129. package/dist/{fr-L8DR73mK.js → cdn/chunks/fr-Brr8mJ9e.js} +4 -0
  130. package/dist/cdn/chunks/fr-Brr8mJ9e.js.map +1 -0
  131. package/dist/cdn/chunks/{fr-Dswns199.js → fr-C4hVl5Lk.js} +2 -6
  132. package/dist/cdn/chunks/fr-C4hVl5Lk.js.map +1 -0
  133. package/dist/cdn/chunks/icons-BUlqGSgd.js +1675 -0
  134. package/dist/cdn/chunks/icons-BUlqGSgd.js.map +1 -0
  135. package/dist/cdn/chunks/{keys-DQp8x7Nx.js → keys-DBFhDFng.js} +4 -4
  136. package/dist/cdn/chunks/{keys-DQp8x7Nx.js.map → keys-DBFhDFng.js.map} +1 -1
  137. package/dist/cdn/chunks/{nl-CbcPJlrL.js → nl-CReD7Apd.js} +2 -6
  138. package/dist/cdn/chunks/nl-CReD7Apd.js.map +1 -0
  139. package/dist/{nl-GDWeuX18.js → cdn/chunks/nl-Co3_RL0M.js} +4 -0
  140. package/dist/cdn/chunks/nl-Co3_RL0M.js.map +1 -0
  141. package/dist/cdn/chunks/{preRenderCustomBlocks-LFB-e-0m.js → preRenderCustomBlocks-Bdpiiw4A.js} +2 -2
  142. package/dist/cdn/chunks/{preRenderCustomBlocks-LFB-e-0m.js.map → preRenderCustomBlocks-Bdpiiw4A.js.map} +1 -1
  143. package/dist/cdn/chunks/{pt-BR-B1AVVhWj.js → pt-BR-BECez5b0.js} +3 -1
  144. package/dist/cdn/chunks/{pt-BR-B1AVVhWj.js.map → pt-BR-BECez5b0.js.map} +1 -1
  145. package/dist/cdn/chunks/{pt-BR-BibOQm-o.js → pt-BR-BRA0-vGP.js} +2 -6
  146. package/dist/cdn/chunks/pt-BR-BRA0-vGP.js.map +1 -0
  147. package/dist/cdn/chunks/{src-BM3f9I7t.js → src-CUvZWL6Y.js} +83 -83
  148. package/dist/cdn/chunks/src-CUvZWL6Y.js.map +1 -0
  149. package/dist/cdn/chunks/{src-BDvZrpFH.js → src-DZ0C9mH7.js} +161 -160
  150. package/dist/cdn/chunks/src-DZ0C9mH7.js.map +1 -0
  151. package/dist/cdn/chunks/{src-CLoCCDfs.js → src-Dwgq7hf4.js} +71 -48
  152. package/dist/cdn/chunks/src-Dwgq7hf4.js.map +1 -0
  153. package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js → useCloudI18n-DSWSGj-A.js} +2 -2
  154. package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js.map → useCloudI18n-DSWSGj-A.js.map} +1 -1
  155. package/dist/cdn/chunks/{useEditorCore-ehUSEsbw.js → useEditorCore-Cs7rYVBo.js} +614 -522
  156. package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +1 -0
  157. package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js → useEditorRoot-B0zW2nT4.js} +2 -2
  158. package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js.map → useEditorRoot-B0zW2nT4.js.map} +1 -1
  159. package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js → useI18n-Dlo7R9RA.js} +2 -2
  160. package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js.map → useI18n-Dlo7R9RA.js.map} +1 -1
  161. package/dist/cdn/chunks/{useMergeTag-TLhF2fGK.js → useMergeTag-BYAifvh8.js} +4 -4
  162. package/dist/cdn/chunks/{useMergeTag-TLhF2fGK.js.map → useMergeTag-BYAifvh8.js.map} +1 -1
  163. package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js → usePopoverPosition-ElP3ABaV.js} +2 -2
  164. package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js.map → usePopoverPosition-ElP3ABaV.js.map} +1 -1
  165. package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js → useScrollToBlock-nTbWkgaU.js} +2 -2
  166. package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js.map → useScrollToBlock-nTbWkgaU.js.map} +1 -1
  167. package/dist/cdn/editor.css +1 -1
  168. package/dist/cdn/editor.js +1195 -1095
  169. package/dist/cdn/editor.js.map +1 -1
  170. package/dist/check-DWtkBzBU.js +11 -0
  171. package/dist/chevron-down-C-Fjxcqj.js +11 -0
  172. package/dist/chevron-right-SOkn2d4P.js +11 -0
  173. package/dist/chevron-up-lntU1ypp.js +11 -0
  174. package/dist/circle-alert-CjzUTwy3.js +30 -0
  175. package/dist/clock-pB2QKPsJ.js +16 -0
  176. package/dist/{cloud-BMzRKCbk.js → cloud-DdidMW6f.js} +446 -201
  177. package/dist/copy-CId1E038.js +19 -0
  178. package/dist/createCloudRuntime-x5WZm3p8.js +383 -0
  179. package/dist/createLucideIcon-Cwf_nTzE.js +96 -0
  180. package/dist/{cdn/chunks/de-C6J2Iae8.js → de-BUPszLpi.js} +2 -2
  181. package/dist/de-Ck0pBGHu.js +83 -0
  182. package/dist/{dist-BxFbxpgW.js → dist-BVqAYoRB.js} +125 -125
  183. package/dist/dist-D8i1ixHK.js +177 -0
  184. package/dist/dist-DBirAJIs.js +410 -0
  185. package/dist/{dist-PL6vP4SC.js → dist-tGkjkX-v.js} +143 -122
  186. package/dist/editor-modal-B_LaQf0s.js +5998 -0
  187. package/dist/{en-BaUYOQi8.js → en-BbOC5x3w.js} +2 -0
  188. package/dist/en-DcmpWV53.js +2 -0
  189. package/dist/{es-CKDYfJYn.js → es-0bCDcT9p.js} +2 -0
  190. package/dist/es-lagTvUfX.js +83 -0
  191. package/dist/{extensions-Mf8iHey9.js → extensions-CHOBZRab.js} +43 -43
  192. package/dist/eye-BuGtFUoJ.js +16 -0
  193. package/dist/{cdn/chunks/fr-L8DR73mK.js → fr-Brr8mJ9e.js} +2 -2
  194. package/dist/fr-C4hVl5Lk.js +83 -0
  195. package/dist/image-up-gH4JEpU5.js +27 -0
  196. package/dist/index.d.ts +77 -11
  197. package/dist/info-BQ60P82u.js +23 -0
  198. package/dist/{keys-C3P1yxnr.js → keys-DQA2i1k1.js} +4 -4
  199. package/dist/link-3R8it3J7.js +14 -0
  200. package/dist/list-Ccdgj46T.js +33 -0
  201. package/dist/loader-circle-B_tAD4k6.js +12 -0
  202. package/dist/message-circle-P-KSc6V0.js +11 -0
  203. package/dist/nl-CReD7Apd.js +83 -0
  204. package/dist/{cdn/chunks/nl-GDWeuX18.js → nl-Co3_RL0M.js} +2 -2
  205. package/dist/pencil-9ZiwqS4r.js +14 -0
  206. package/dist/plus-BwJEzCaO.js +14 -0
  207. package/dist/{preRenderCustomBlocks-CSIF-HyJ.js → preRenderCustomBlocks-DFXH54Zr.js} +1 -1
  208. package/dist/{pt-BR-B1AVVhWj.js → pt-BR-BECez5b0.js} +2 -0
  209. package/dist/pt-BR-BRA0-vGP.js +83 -0
  210. package/dist/refresh-cw-DEgfb2FK.js +25 -0
  211. package/dist/{runtime-dom.esm-bundler-BuG03jBM.js → runtime-dom.esm-bundler-PnoZU512.js} +106 -106
  212. package/dist/search-DqQ8Li5E.js +16 -0
  213. package/dist/send-CE6uvqop.js +14 -0
  214. package/dist/shield-check-DhD1Z3rd.js +14 -0
  215. package/dist/sparkles-R0ZQHa6F.js +28 -0
  216. package/dist/style.css +1 -1
  217. package/dist/templatical-editor.js +2742 -2590
  218. package/dist/text-align-start-DSux2UNn.js +58 -0
  219. package/dist/trash-Cf_SqsER.js +30 -0
  220. package/dist/triangle-alert-C6tGa6jw.js +22 -0
  221. package/dist/upload-DusKjpVr.js +21 -0
  222. package/dist/{useAliveFlag-PVmp95MT.js → useAliveFlag-oyByIcjy.js} +1 -1
  223. package/dist/{useCloudI18n-BKoiYsWZ.js → useCloudI18n-BLyh_e2T.js} +2 -2
  224. package/dist/{useEditorCore-DdkQuTHl.js → useEditorCore-DhlKOYwe.js} +1780 -1651
  225. package/dist/{useEditorRoot-DkRGTQRs.js → useEditorRoot-ds57-l6F.js} +2 -2
  226. package/dist/{useI18n-CL6RfPzK.js → useI18n-BbdxxpOE.js} +2 -2
  227. package/dist/{useMergeTag-gSuYus-M.js → useMergeTag-DlvOBW_B.js} +4 -4
  228. package/dist/{usePopoverPosition-CWxaIWd3.js → usePopoverPosition-CprM5p-c.js} +2 -2
  229. package/dist/useScrollToBlock-BTFw0b9O.js +48 -0
  230. package/dist/{vue.runtime.esm-bundler-D9JUcKrV.js → vue.runtime.esm-bundler-DShF3P6k.js} +1192 -1181
  231. package/dist/x-D_-42Ukq.js +14 -0
  232. package/package.json +9 -12
  233. package/dist/BlockPreviewCanvas-B621ANn9.js +0 -129
  234. package/dist/CloudHeaderExtras-BJ3Cebhv.js +0 -59
  235. package/dist/CollaboratorBar-KphmSQeZ.js +0 -95
  236. package/dist/IssuesPanel-CiOjeRFI.js +0 -109
  237. package/dist/ParagraphEditor-C87tkmtE.js +0 -767
  238. package/dist/RichTextEditorContent-BmTcV2-a.js +0 -152
  239. package/dist/SavedBlocksBrowserModal-DQR6kJB1.js +0 -322
  240. package/dist/TemplateScoringPanel-CpyEKMzC.js +0 -257
  241. package/dist/TitleEditor-iNFOisr4.js +0 -198
  242. package/dist/TplModal-CowM3o_F.js +0 -51
  243. package/dist/blockTypeIcons-DQsKtHik.js +0 -134
  244. package/dist/cdn/chunks/BlockPreviewCanvas-DSiJFJa0.js +0 -131
  245. package/dist/cdn/chunks/BlockPreviewCanvas-DSiJFJa0.js.map +0 -1
  246. package/dist/cdn/chunks/VersionHistoryMenu-DDjIBvad.js.map +0 -1
  247. package/dist/cdn/chunks/ca-CNRWAMHI.js.map +0 -1
  248. package/dist/cdn/chunks/cloud-BP5-6__d.js.map +0 -1
  249. package/dist/cdn/chunks/createCloudRuntime-JFE-sxbT.js +0 -443
  250. package/dist/cdn/chunks/createCloudRuntime-JFE-sxbT.js.map +0 -1
  251. package/dist/cdn/chunks/de-DFYCT4QU.js.map +0 -1
  252. package/dist/cdn/chunks/en-BaUYOQi8.js.map +0 -1
  253. package/dist/cdn/chunks/en-mEKGL1PX.js +0 -2
  254. package/dist/cdn/chunks/es-OgkdMZGX.js.map +0 -1
  255. package/dist/cdn/chunks/fr-Dswns199.js.map +0 -1
  256. package/dist/cdn/chunks/fr-L8DR73mK.js.map +0 -1
  257. package/dist/cdn/chunks/icons-SP5Itd-A.js +0 -1218
  258. package/dist/cdn/chunks/icons-SP5Itd-A.js.map +0 -1
  259. package/dist/cdn/chunks/nl-CbcPJlrL.js.map +0 -1
  260. package/dist/cdn/chunks/nl-GDWeuX18.js.map +0 -1
  261. package/dist/cdn/chunks/pt-BR-BibOQm-o.js.map +0 -1
  262. package/dist/cdn/chunks/src-BDvZrpFH.js.map +0 -1
  263. package/dist/cdn/chunks/src-BM3f9I7t.js.map +0 -1
  264. package/dist/cdn/chunks/src-CLoCCDfs.js.map +0 -1
  265. package/dist/cdn/chunks/src-Cxl-9O-L.js.map +0 -1
  266. package/dist/cdn/chunks/useEditorCore-ehUSEsbw.js.map +0 -1
  267. package/dist/check-JK8Uacq0.js +0 -7
  268. package/dist/chevron-down-a-fb_Ijn.js +0 -7
  269. package/dist/chevron-up-x4l0et_Y.js +0 -7
  270. package/dist/circle-alert-CJDW5LZo.js +0 -25
  271. package/dist/clock-BW6rXk2f.js +0 -12
  272. package/dist/createCloudRuntime-DbTFm1ES.js +0 -441
  273. package/dist/createLucideIcon-Bvw1Zx56.js +0 -43
  274. package/dist/dist-dNiknO7j.js +0 -251
  275. package/dist/dist-heatwAdo.js +0 -150
  276. package/dist/image-up-CuzFc1mu.js +0 -23
  277. package/dist/info-DybAwcA3.js +0 -19
  278. package/dist/loader-circle-t-SVgmJ3.js +0 -7
  279. package/dist/message-circle-DtwKrlhN.js +0 -7
  280. package/dist/pencil-2qhC-Y4q.js +0 -10
  281. package/dist/refresh-cw-C8SBuPdg.js +0 -29
  282. package/dist/send-BoqJliF6.js +0 -10
  283. package/dist/shield-check-D0dMaHtE.js +0 -10
  284. package/dist/sparkles-Dy2BJjiX.js +0 -23
  285. package/dist/text-align-start-DrxjxvIy.js +0 -43
  286. package/dist/trash-rYMzzHZd.js +0 -25
  287. package/dist/triangle-alert-DxnFj4-B.js +0 -17
  288. package/dist/upload-DZu1adQz.js +0 -17
  289. package/dist/useScrollToBlock-CdI8fGqt.js +0 -44
  290. package/dist/x-DJOd1hS4.js +0 -10
@@ -1,6 +1,6 @@
1
1
  import { r as e } from "./rolldown-runtime-B0aSnxlc.js";
2
2
  import { B as t, Q as n, Y as r, f as i } from "./draggable-kbOhCgnk.js";
3
- import { t as a } from "./src-CLoCCDfs.js";
3
+ import { t as a } from "./src-Dwgq7hf4.js";
4
4
  //#region ../core/src/cloud/auth.ts
5
5
  function o(e) {
6
6
  let t = e instanceof a ? e.statusCode : void 0;
@@ -82,10 +82,10 @@ var s = class e {
82
82
  let r = await fetch(this.url, n);
83
83
  if (!r.ok) throw new a(`Token refresh failed: ${r.status}`, r.status);
84
84
  let i = await r.json();
85
- if (!i.token || !i.expires_at || !i.project_id || !i.tenant) throw Error("Invalid token response: missing token, expires_at, project_id, or tenant");
86
- return this.accessToken = i.token, this.expiresAt = /* @__PURE__ */ new Date(i.expires_at * 1e3), this._projectId = i.project_id, this._tenantSlug = i.tenant, this._testEmailConfig = i.test_email?.allowed_emails && i.test_email?.signature ? {
87
- allowedEmails: i.test_email.allowed_emails,
88
- signature: i.test_email.signature
85
+ if (!i.token || !i.expiresAt || !i.projectId || !i.tenant) throw Error("Invalid token response: missing token, expiresAt, projectId, or tenant");
86
+ return this.accessToken = i.token, this.expiresAt = /* @__PURE__ */ new Date(i.expiresAt * 1e3), this._projectId = i.projectId, this._tenantSlug = i.tenant, this._testEmailConfig = i.testEmail?.allowedEmails && i.testEmail?.signature ? {
87
+ allowedEmails: i.testEmail.allowedEmails,
88
+ signature: i.testEmail.signature
89
89
  } : null, this._userConfig = i.user?.id && i.user?.name && i.user?.signature ? {
90
90
  id: i.user.id,
91
91
  name: i.user.name,
@@ -107,78 +107,56 @@ var s = class e {
107
107
  return a.status === 401 && (a = await i(await this.refreshToken())), a;
108
108
  }
109
109
  };
110
- function c(e, t) {
111
- return e.mode === "direct" ? new s({
112
- url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
113
- baseUrl: e.baseUrl,
114
- requestOptions: {
115
- method: "POST",
116
- headers: { "Content-Type": "application/json" },
117
- body: {
118
- client_id: e.clientId,
119
- client_secret: e.clientSecret,
120
- tenant: e.tenant,
121
- client_type: "sdk"
122
- }
123
- },
124
- onError: t
125
- }) : new s({
126
- url: e.url,
127
- baseUrl: e.baseUrl,
128
- requestOptions: e.requestOptions,
129
- onError: t
130
- });
131
- }
132
110
  //#endregion
133
111
  //#region ../core/src/cloud/url-builder.ts
134
- function l(e, t) {
112
+ function c(e, t) {
135
113
  return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
136
114
  }
137
- var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{template}`, f = `${d}/ai`, p = `${u}/media`, m = `${p}/folders`, h = `${u}/saved-modules`, g = {
115
+ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{template}`, d = `${u}/ai`, f = `${l}/media`, p = `${f}/folders`, m = `${l}/saved-modules`, h = {
138
116
  health: "/api/v1/health",
139
- "projects.config": `${u}/config`,
140
- "broadcasting.auth": `${u}/broadcasting/auth`,
141
- "templates.store": `${u}/templates`,
142
- "templates.show": `${d}`,
143
- "templates.update": `${d}`,
144
- "templates.destroy": `${d}`,
145
- "templates.export": `${d}/export`,
146
- "templates.importFromBeefree": `${u}/templates/import/from-beefree`,
147
- "templates.sendTestEmail": `${d}/send-test-email`,
148
- "versions.index": `${d}/versions`,
149
- "versions.store": `${d}/versions`,
150
- "versions.show": `${d}/versions/{version}`,
151
- "versions.restore": `${d}/versions/{version}/restore`,
152
- "comments.index": `${d}/comments`,
153
- "comments.store": `${d}/comments`,
154
- "comments.update": `${d}/comments/{comment}`,
155
- "comments.destroy": `${d}/comments/{comment}`,
156
- "comments.resolve": `${d}/comments/{comment}/resolve`,
157
- "ai.generate": `${f}/generate`,
158
- "ai.conversationMessages": `${f}/conversation-messages`,
159
- "ai.suggestions": `${f}/suggestions`,
160
- "ai.rewriteText": `${f}/rewrite-text`,
161
- "ai.score": `${f}/score`,
162
- "ai.fixFinding": `${f}/fix-finding`,
163
- "ai.generateFromDesign": `${f}/generate-from-design`,
164
- "media.upload": `${p}/upload`,
165
- "media.browse": `${p}/browse`,
166
- "media.delete": `${p}/delete`,
167
- "media.move": `${p}/move`,
168
- "media.update": `${p}/{media}`,
169
- "media.replace": `${p}/{media}/replace`,
170
- "media.checkUsage": `${p}/check-usage`,
171
- "media.frequentlyUsed": `${p}/frequently-used`,
172
- "media.importFromUrl": `${p}/import-from-url`,
173
- "folders.index": `${m}`,
174
- "folders.store": `${m}`,
175
- "folders.update": `${m}/{mediaFolder}`,
176
- "folders.destroy": `${m}/{mediaFolder}`,
177
- "savedModules.index": `${h}`,
178
- "savedModules.store": `${h}`,
179
- "savedModules.update": `${h}/{savedModule}`,
180
- "savedModules.destroy": `${h}/{savedModule}`
181
- }, _ = class {
117
+ "projects.config": `${l}/config`,
118
+ "broadcasting.auth": `${l}/broadcasting/auth`,
119
+ "templates.store": `${l}/templates`,
120
+ "templates.show": `${u}`,
121
+ "templates.update": `${u}`,
122
+ "templates.destroy": `${u}`,
123
+ "templates.export": `${u}/export`,
124
+ "templates.importFromBeefree": `${l}/templates/import/from-beefree`,
125
+ "templates.sendTestEmail": `${u}/send-test-email`,
126
+ "versions.index": `${u}/versions`,
127
+ "versions.store": `${u}/versions`,
128
+ "versions.show": `${u}/versions/{version}`,
129
+ "versions.restore": `${u}/versions/{version}/restore`,
130
+ "comments.index": `${u}/comments`,
131
+ "comments.store": `${u}/comments`,
132
+ "comments.update": `${u}/comments/{comment}`,
133
+ "comments.destroy": `${u}/comments/{comment}`,
134
+ "comments.resolve": `${u}/comments/{comment}/resolve`,
135
+ "ai.generate": `${d}/generate`,
136
+ "ai.conversationMessages": `${d}/conversation-messages`,
137
+ "ai.suggestions": `${d}/suggestions`,
138
+ "ai.rewriteText": `${d}/rewrite-text`,
139
+ "ai.score": `${d}/score`,
140
+ "ai.fixFinding": `${d}/fix-finding`,
141
+ "ai.generateFromDesign": `${d}/generate-from-design`,
142
+ "media.upload": `${f}/upload`,
143
+ "media.browse": `${f}/browse`,
144
+ "media.delete": `${f}/delete`,
145
+ "media.move": `${f}/move`,
146
+ "media.update": `${f}/{media}`,
147
+ "media.replace": `${f}/{media}/replace`,
148
+ "media.checkUsage": `${f}/check-usage`,
149
+ "media.frequentlyUsed": `${f}/frequently-used`,
150
+ "media.importFromUrl": `${f}/import-from-url`,
151
+ "folders.index": `${p}`,
152
+ "folders.store": `${p}`,
153
+ "folders.update": `${p}/{mediaFolder}`,
154
+ "folders.destroy": `${p}/{mediaFolder}`,
155
+ "savedModules.index": `${m}`,
156
+ "savedModules.store": `${m}`,
157
+ "savedModules.update": `${m}/{savedModule}`,
158
+ "savedModules.destroy": `${m}/{savedModule}`
159
+ }, g = class {
182
160
  authManager;
183
161
  constructor(e) {
184
162
  this.authManager = e;
@@ -218,7 +196,7 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
218
196
  return e.message;
219
197
  }
220
198
  async createTemplate(e, t) {
221
- return this.request(l(g["templates.store"], this.baseParams), {
199
+ return this.request(c(h["templates.store"], this.baseParams), {
222
200
  method: "POST",
223
201
  body: JSON.stringify(t === void 0 ? { content: e } : {
224
202
  content: e,
@@ -227,13 +205,13 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
227
205
  });
228
206
  }
229
207
  async getTemplate(e) {
230
- return this.request(l(g["templates.show"], {
208
+ return this.request(c(h["templates.show"], {
231
209
  ...this.baseParams,
232
210
  template: e
233
211
  }));
234
212
  }
235
213
  async updateTemplate(e, t) {
236
- return this.request(l(g["templates.update"], {
214
+ return this.request(c(h["templates.update"], {
237
215
  ...this.baseParams,
238
216
  template: e
239
217
  }), {
@@ -242,7 +220,7 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
242
220
  });
243
221
  }
244
222
  async createVersion(e, t, n) {
245
- return this.request(l(g["versions.store"], {
223
+ return this.request(c(h["versions.store"], {
246
224
  ...this.baseParams,
247
225
  template: e
248
226
  }), {
@@ -254,26 +232,26 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
254
232
  });
255
233
  }
256
234
  async deleteTemplate(e) {
257
- return this.request(l(g["templates.destroy"], {
235
+ return this.request(c(h["templates.destroy"], {
258
236
  ...this.baseParams,
259
237
  template: e
260
238
  }), { method: "DELETE" });
261
239
  }
262
240
  async getVersions(e) {
263
- return this.request(l(g["versions.index"], {
241
+ return this.request(c(h["versions.index"], {
264
242
  ...this.baseParams,
265
243
  template: e
266
244
  }));
267
245
  }
268
246
  async getVersion(e, t) {
269
- return this.request(l(g["versions.show"], {
247
+ return this.request(c(h["versions.show"], {
270
248
  ...this.baseParams,
271
249
  template: e,
272
250
  version: t
273
251
  }));
274
252
  }
275
253
  async restoreVersion(e, t) {
276
- return this.request(l(g["versions.restore"], {
254
+ return this.request(c(h["versions.restore"], {
277
255
  ...this.baseParams,
278
256
  template: e,
279
257
  version: t
@@ -284,7 +262,7 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
284
262
  custom_fonts: t.customFonts,
285
263
  default_fallback: t.defaultFallback
286
264
  }) : void 0;
287
- return this.request(l(g["templates.export"], {
265
+ return this.request(c(h["templates.export"], {
288
266
  ...this.baseParams,
289
267
  template: e
290
268
  }), {
@@ -293,7 +271,7 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
293
271
  });
294
272
  }
295
273
  async sendTestEmail(e, t) {
296
- await this.request(l(g["templates.sendTestEmail"], {
274
+ await this.request(c(h["templates.sendTestEmail"], {
297
275
  ...this.baseParams,
298
276
  template: e
299
277
  }), {
@@ -302,11 +280,11 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
302
280
  });
303
281
  }
304
282
  commentsUrl(e, t) {
305
- return t ? l(g["comments.update"], {
283
+ return t ? c(h["comments.update"], {
306
284
  ...this.baseParams,
307
285
  template: e,
308
286
  comment: t
309
- }) : l(g["comments.index"], {
287
+ }) : c(h["comments.index"], {
310
288
  ...this.baseParams,
311
289
  template: e
312
290
  });
@@ -336,7 +314,7 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
336
314
  });
337
315
  }
338
316
  async resolveComment(e, t, n, r) {
339
- return this.request(l(g["comments.resolve"], {
317
+ return this.request(c(h["comments.resolve"], {
340
318
  ...this.baseParams,
341
319
  template: e,
342
320
  comment: t
@@ -347,22 +325,22 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
347
325
  });
348
326
  }
349
327
  async fetchConfig() {
350
- return this.request(l(g["projects.config"], this.baseParams));
328
+ return this.request(c(h["projects.config"], this.baseParams));
351
329
  }
352
330
  async listModules(e, t) {
353
- let n = l(g["savedModules.index"], this.baseParams), r = new URLSearchParams();
331
+ let n = c(h["savedModules.index"], this.baseParams), r = new URLSearchParams();
354
332
  e && r.set("search", e), t && r.set("category", t);
355
333
  let i = r.size > 0 ? `?${r}` : "";
356
334
  return this.request(`${n}${i}`);
357
335
  }
358
336
  async createModule(e) {
359
- return this.request(l(g["savedModules.store"], this.baseParams), {
337
+ return this.request(c(h["savedModules.store"], this.baseParams), {
360
338
  method: "POST",
361
339
  body: JSON.stringify(e)
362
340
  });
363
341
  }
364
342
  async updateModule(e, t) {
365
- return this.request(l(g["savedModules.update"], {
343
+ return this.request(c(h["savedModules.update"], {
366
344
  ...this.baseParams,
367
345
  savedModule: e
368
346
  }), {
@@ -371,11 +349,163 @@ var u = "/api/v1/projects/{project}/tenants/{tenant}", d = `${u}/templates/{temp
371
349
  });
372
350
  }
373
351
  async deleteModule(e) {
374
- return this.request(l(g["savedModules.destroy"], {
352
+ return this.request(c(h["savedModules.destroy"], {
375
353
  ...this.baseParams,
376
354
  savedModule: e
377
355
  }), { method: "DELETE" });
378
356
  }
357
+ }, _ = class {
358
+ authManager;
359
+ constructor(e) {
360
+ this.authManager = e;
361
+ }
362
+ get projectId() {
363
+ return this.authManager.projectId;
364
+ }
365
+ get tenantSlug() {
366
+ return this.authManager.tenantSlug;
367
+ }
368
+ get baseParams() {
369
+ return {
370
+ project: this.projectId,
371
+ tenant: this.tenantSlug
372
+ };
373
+ }
374
+ async request(e, t = {}) {
375
+ let n = await this.authManager.authenticatedFetch(e, {
376
+ ...t,
377
+ headers: {
378
+ "Content-Type": "application/json",
379
+ Accept: "application/json",
380
+ ...t.headers
381
+ }
382
+ });
383
+ if (!n.ok) {
384
+ let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` }));
385
+ throw Error(e.message, { cause: e });
386
+ }
387
+ if (n.status !== 204) return (await n.json()).data;
388
+ }
389
+ async browseMedia(e) {
390
+ let t = new URLSearchParams();
391
+ e.folderId && t.set("folderId", e.folderId), e.search && t.set("search", e.search), e.category && t.set("category", e.category), e.sort && t.set("sort", e.sort), e.cursor && t.set("cursor", e.cursor);
392
+ let n = t.toString(), r = `${c(h["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
393
+ if (!i.ok) {
394
+ let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
395
+ throw Error(e.message, { cause: e });
396
+ }
397
+ return i.json();
398
+ }
399
+ async uploadMedia(e, t) {
400
+ let n = new FormData();
401
+ n.append("file", e), t && n.append("folderId", t);
402
+ let r = c(h["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
403
+ method: "POST",
404
+ headers: { Accept: "application/json" },
405
+ body: n
406
+ });
407
+ if (!i.ok) {
408
+ let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
409
+ throw Error(e.message, { cause: e });
410
+ }
411
+ return (await i.json()).data;
412
+ }
413
+ async updateMedia(e, t, n) {
414
+ let r = {};
415
+ return t !== void 0 && (r.filename = t), n !== void 0 && (r.alt = n), this.request(c(h["media.update"], {
416
+ ...this.baseParams,
417
+ media: e
418
+ }), {
419
+ method: "PUT",
420
+ body: JSON.stringify(r)
421
+ });
422
+ }
423
+ async deleteMedia(e) {
424
+ return this.request(c(h["media.delete"], this.baseParams), {
425
+ method: "POST",
426
+ body: JSON.stringify({ ids: e })
427
+ });
428
+ }
429
+ async moveMedia(e, t) {
430
+ return this.request(c(h["media.move"], this.baseParams), {
431
+ method: "POST",
432
+ body: JSON.stringify({
433
+ ids: e,
434
+ folderId: t
435
+ })
436
+ });
437
+ }
438
+ async getMediaFolders() {
439
+ return this.request(c(h["folders.index"], this.baseParams));
440
+ }
441
+ async createMediaFolder(e, t) {
442
+ return this.request(c(h["folders.store"], this.baseParams), {
443
+ method: "POST",
444
+ body: JSON.stringify({
445
+ name: e,
446
+ parentId: t ?? null
447
+ })
448
+ });
449
+ }
450
+ async renameMediaFolder(e, t) {
451
+ return this.request(c(h["folders.update"], {
452
+ ...this.baseParams,
453
+ mediaFolder: e
454
+ }), {
455
+ method: "PUT",
456
+ body: JSON.stringify({ name: t })
457
+ });
458
+ }
459
+ async deleteMediaFolder(e) {
460
+ return this.request(c(h["folders.destroy"], {
461
+ ...this.baseParams,
462
+ mediaFolder: e
463
+ }), { method: "DELETE" });
464
+ }
465
+ async checkMediaUsage(e) {
466
+ let t = await this.authManager.authenticatedFetch(c(h["media.checkUsage"], this.baseParams), {
467
+ method: "POST",
468
+ headers: {
469
+ "Content-Type": "application/json",
470
+ Accept: "application/json"
471
+ },
472
+ body: JSON.stringify({ ids: e })
473
+ });
474
+ if (!t.ok) {
475
+ let e = await t.json().catch(() => ({ message: `HTTP error ${t.status}` }));
476
+ throw Error(e.message, { cause: e });
477
+ }
478
+ return t.json();
479
+ }
480
+ async getFrequentlyUsed() {
481
+ return this.request(c(h["media.frequentlyUsed"], this.baseParams));
482
+ }
483
+ async importFromUrl(e, t) {
484
+ return this.request(c(h["media.importFromUrl"], this.baseParams), {
485
+ method: "POST",
486
+ body: JSON.stringify({
487
+ url: e,
488
+ folderId: t ?? null
489
+ })
490
+ });
491
+ }
492
+ async replaceMedia(e, t) {
493
+ let n = new FormData();
494
+ n.append("file", t);
495
+ let r = c(h["media.replace"], {
496
+ ...this.baseParams,
497
+ media: e
498
+ }), i = await this.authManager.authenticatedFetch(r, {
499
+ method: "POST",
500
+ headers: { Accept: "application/json" },
501
+ body: n
502
+ });
503
+ if (!i.ok) {
504
+ let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
505
+ throw Error(e.message, { cause: e });
506
+ }
507
+ return (await i.json()).data;
508
+ }
379
509
  };
380
510
  //#endregion
381
511
  //#region ../core/src/cloud/websocket-client.ts
@@ -383,7 +513,7 @@ function v(e) {
383
513
  return {
384
514
  host: e.host,
385
515
  port: e.port,
386
- appKey: e.app_key
516
+ appKey: e.appKey
387
517
  };
388
518
  }
389
519
  var y = class {
@@ -402,7 +532,7 @@ var y = class {
402
532
  } catch {
403
533
  throw Error("[Templatical] Cloud features require the optional peer dependency 'pusher-js'. Please install it.");
404
534
  }
405
- let { host: n, port: r, appKey: i } = this.config, a = this.authManager.resolveUrl(l(g["broadcasting.auth"], {
535
+ let { host: n, port: r, appKey: i } = this.config, a = this.authManager.resolveUrl(c(h["broadcasting.auth"], {
406
536
  project: this.authManager.projectId,
407
537
  tenant: this.authManager.tenantSlug
408
538
  }));
@@ -422,9 +552,9 @@ var y = class {
422
552
  Accept: "application/json"
423
553
  },
424
554
  params: {
425
- user_id: this.authManager.userConfig?.id ?? "",
426
- user_name: this.authManager.userConfig?.name ?? "",
427
- user_signature: this.authManager.userConfig?.signature ?? ""
555
+ userId: this.authManager.userConfig?.id ?? "",
556
+ userName: this.authManager.userConfig?.name ?? "",
557
+ userSignature: this.authManager.userConfig?.signature ?? ""
428
558
  }
429
559
  }
430
560
  }), this.pusher.connection.bind("error", (e) => {
@@ -456,25 +586,25 @@ var y = class {
456
586
  function b(e, t) {
457
587
  let { operation: n, data: r } = t;
458
588
  switch (n) {
459
- case "add_block":
460
- e.addBlock(r.block, r.section_id, r.column_index, r.index);
589
+ case "addBlock":
590
+ e.addBlock(r.block, r.sectionId, r.columnIndex, r.index);
461
591
  break;
462
- case "update_block":
463
- e.updateBlock(r.block_id, r.updates);
592
+ case "updateBlock":
593
+ e.updateBlock(r.blockId, r.updates);
464
594
  break;
465
- case "delete_block":
466
- e.removeBlock(r.block_id);
595
+ case "deleteBlock":
596
+ e.removeBlock(r.blockId);
467
597
  break;
468
- case "move_block":
469
- e.moveBlock(r.block_id, r.index, r.section_id, r.column_index);
598
+ case "moveBlock":
599
+ e.moveBlock(r.blockId, r.index, r.sectionId, r.columnIndex);
470
600
  break;
471
- case "update_settings":
601
+ case "updateSettings":
472
602
  e.updateSettings(r.updates);
473
603
  break;
474
- case "set_content":
604
+ case "setContent":
475
605
  e.setContent(r.content);
476
606
  break;
477
- case "update_block_style": e.updateBlock(r.block_id, { styles: r.styles });
607
+ case "updateBlockStyle": e.updateBlock(r.blockId, { styles: r.styles });
478
608
  }
479
609
  }
480
610
  //#endregion
@@ -484,7 +614,7 @@ function S() {
484
614
  return `msg_${Date.now()}_${++x}`;
485
615
  }
486
616
  function C(e) {
487
- let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n([]), s = n(!1), c = n(!1), u = n(null), d = n(null), f = n(null), p = n(null), m = n(null), h = n(null), _ = n(!1), v = n([]), y = n(!1);
617
+ let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n([]), s = n(!1), l = n(!1), u = n(null), d = n(null), f = n(null), p = n(null), m = n(null), g = n(null), _ = n(!1), v = n([]), y = n(!1);
488
618
  function b(e, t) {
489
619
  let n = o.value.findIndex((t) => t.id === e);
490
620
  if (n === -1) return;
@@ -501,9 +631,9 @@ function C(e) {
501
631
  async function x() {
502
632
  let e = r();
503
633
  if (e) {
504
- c.value = !0;
634
+ l.value = !0;
505
635
  try {
506
- let n = l(g["ai.conversationMessages"], {
636
+ let n = c(h["ai.conversationMessages"], {
507
637
  project: t.projectId,
508
638
  tenant: t.tenantSlug,
509
639
  template: e
@@ -513,14 +643,14 @@ function C(e) {
513
643
  });
514
644
  if (!r.ok) return;
515
645
  let i = await r.json();
516
- i.conversation_id && (f.value = i.conversation_id), Array.isArray(i.data) && i.data.length > 0 && (o.value = i.data.map((e) => ({
646
+ i.conversationId && (f.value = i.conversationId), Array.isArray(i.data) && i.data.length > 0 && (o.value = i.data.map((e) => ({
517
647
  id: e.id,
518
648
  role: e.role,
519
649
  content: e.content,
520
- timestamp: new Date(e.created_at).getTime()
650
+ timestamp: new Date(e.createdAt).getTime()
521
651
  })));
522
652
  } catch {} finally {
523
- c.value = !1;
653
+ l.value = !1;
524
654
  }
525
655
  }
526
656
  }
@@ -529,7 +659,7 @@ function C(e) {
529
659
  if (i) {
530
660
  y.value = !0;
531
661
  try {
532
- let r = l(g["ai.suggestions"], {
662
+ let r = c(h["ai.suggestions"], {
533
663
  project: t.projectId,
534
664
  tenant: t.tenantSlug,
535
665
  template: i
@@ -540,8 +670,8 @@ function C(e) {
540
670
  Accept: "text/event-stream"
541
671
  },
542
672
  body: JSON.stringify({
543
- current_content: e,
544
- merge_tags: n.map((e) => ({
673
+ currentContent: e,
674
+ mergeTags: n.map((e) => ({
545
675
  label: e.label,
546
676
  value: e.value
547
677
  }))
@@ -550,13 +680,13 @@ function C(e) {
550
680
  if (!a.ok) return;
551
681
  let o = a.body?.getReader();
552
682
  if (!o) return;
553
- let s = new TextDecoder(), c = "";
683
+ let s = new TextDecoder(), l = "";
554
684
  for (;;) {
555
685
  let { done: e, value: t } = await o.read();
556
686
  if (e) break;
557
- c += s.decode(t, { stream: !0 });
558
- let n = c.split("\n");
559
- c = n.pop() ?? "";
687
+ l += s.decode(t, { stream: !0 });
688
+ let n = l.split("\n");
689
+ l = n.pop() ?? "";
560
690
  for (let e of n) {
561
691
  if (!e.startsWith("data: ")) continue;
562
692
  let t;
@@ -573,7 +703,7 @@ function C(e) {
573
703
  }
574
704
  }
575
705
  }
576
- async function w(e, n, c) {
706
+ async function w(e, n, l) {
577
707
  let y = r();
578
708
  if (!y) throw Error("Template must be saved before using AI generation");
579
709
  s.value = !0, u.value = null, d.value = null, v.value = [];
@@ -592,7 +722,7 @@ function C(e) {
592
722
  timestamp: Date.now()
593
723
  }];
594
724
  try {
595
- let r = l(g["ai.generate"], {
725
+ let r = c(h["ai.generate"], {
596
726
  project: t.projectId,
597
727
  tenant: t.tenantSlug,
598
728
  template: y
@@ -604,17 +734,17 @@ function C(e) {
604
734
  },
605
735
  body: JSON.stringify({
606
736
  prompt: e,
607
- current_content: n,
608
- merge_tags: c.map((e) => ({
737
+ currentContent: n,
738
+ mergeTags: l.map((e) => ({
609
739
  label: e.label,
610
740
  value: e.value
611
741
  })),
612
- conversation_id: f.value
742
+ conversationId: f.value
613
743
  })
614
744
  });
615
745
  if (!a.ok) {
616
746
  let e = await a.json().catch(() => null);
617
- throw Error(a.status === 403 ? "ai_generation_not_available" : e?.message || "Failed to generate template");
747
+ throw Error(a.status === 403 ? "aiGenerationNotAvailable" : e?.message || "Failed to generate template");
618
748
  }
619
749
  let s = a.body?.getReader();
620
750
  if (!s) throw Error("Failed to read stream");
@@ -636,7 +766,7 @@ function C(e) {
636
766
  }
637
767
  if (r.type === "text") b(C, { content: (o.value.find((e) => e.id === C)?.content ?? "") + r.text });
638
768
  else if (r.type === "error") throw Error(r.message || "Failed to generate template");
639
- else r.type === "done" && (r.conversation_id && (f.value = r.conversation_id), b(C, { content: r.text }), x = r.content ?? null, x ? (m.value = n, h.value = x, p.value = C, _.value = !1, i?.(x)) : u.value = "ai_apply_failed");
769
+ else r.type === "done" && (r.conversationId && (f.value = r.conversationId), b(C, { content: r.text }), x = r.content ?? null, x ? (m.value = n, g.value = x, p.value = C, _.value = !1, i?.(x)) : u.value = "ai_apply_failed");
640
770
  }
641
771
  }
642
772
  } finally {
@@ -651,15 +781,15 @@ function C(e) {
651
781
  }
652
782
  }
653
783
  function T() {
654
- _.value ? (h.value && i?.(h.value), _.value = !1) : (m.value && i?.(m.value), _.value = !0);
784
+ _.value ? (g.value && i?.(g.value), _.value = !1) : (m.value && i?.(m.value), _.value = !0);
655
785
  }
656
786
  function E() {
657
- o.value = [], f.value = null, u.value = null, p.value = null, m.value = null, h.value = null, _.value = !1;
787
+ o.value = [], f.value = null, u.value = null, p.value = null, m.value = null, g.value = null, _.value = !1;
658
788
  }
659
789
  return {
660
790
  messages: o,
661
791
  isGenerating: s,
662
- isLoadingHistory: c,
792
+ isLoadingHistory: l,
663
793
  isLastChangeReverted: _,
664
794
  lastApplyMessageId: p,
665
795
  error: u,
@@ -687,13 +817,13 @@ function w(e) {
687
817
  //#endregion
688
818
  //#region ../core/src/cloud/template-scoring.ts
689
819
  function T(e) {
690
- let { authManager: t, getTemplateId: r } = e, i = n(!1), a = n(null), o = n(null), s = n(null), c = n(""), u = n(null);
820
+ let { authManager: t, getTemplateId: r } = e, i = n(!1), a = n(null), o = n(null), s = n(null), l = n(""), u = n(null);
691
821
  async function d(e, n) {
692
822
  let s = r();
693
823
  if (!s) return null;
694
824
  i.value = !0, o.value = null, a.value = null;
695
825
  try {
696
- let r = l(g["ai.score"], {
826
+ let r = c(h["ai.score"], {
697
827
  project: t.projectId,
698
828
  tenant: t.tenantSlug,
699
829
  template: s
@@ -704,25 +834,25 @@ function T(e) {
704
834
  Accept: "text/event-stream"
705
835
  },
706
836
  body: JSON.stringify({
707
- current_content: e,
708
- merge_tags: n.map((e) => ({
837
+ currentContent: e,
838
+ mergeTags: n.map((e) => ({
709
839
  label: e.label,
710
840
  value: e.value
711
841
  }))
712
842
  })
713
843
  });
714
844
  if (!i.ok) {
715
- if (i.status === 403) throw Error("ai_generation_not_available");
845
+ if (i.status === 403) throw Error("aiGenerationNotAvailable");
716
846
  let e = await i.json().catch(() => null);
717
847
  throw Error(e?.message || "Failed to score template");
718
848
  }
719
849
  let o = i.body?.getReader();
720
850
  if (!o) throw Error("Failed to read stream");
721
- let c = new TextDecoder(), u = "", d = null;
851
+ let l = new TextDecoder(), u = "", d = null;
722
852
  for (;;) {
723
853
  let { done: e, value: t } = await o.read();
724
854
  if (e) break;
725
- u += c.decode(t, { stream: !0 });
855
+ u += l.decode(t, { stream: !0 });
726
856
  let n = u.split("\n");
727
857
  u = n.pop() ?? "";
728
858
  for (let e of n) {
@@ -748,9 +878,9 @@ function T(e) {
748
878
  async function f(e, n, i) {
749
879
  let a = r();
750
880
  if (!a) return null;
751
- s.value = n.id, c.value = "", u.value = null;
881
+ s.value = n.id, l.value = "", u.value = null;
752
882
  try {
753
- let r = l(g["ai.fixFinding"], {
883
+ let r = c(h["ai.fixFinding"], {
754
884
  project: t.projectId,
755
885
  tenant: t.tenantSlug,
756
886
  template: a
@@ -768,14 +898,14 @@ function T(e) {
768
898
  suggestion: n.suggestion,
769
899
  category: n.category
770
900
  },
771
- merge_tags: i.map((e) => ({
901
+ mergeTags: i.map((e) => ({
772
902
  label: e.label,
773
903
  value: e.value
774
904
  }))
775
905
  })
776
906
  });
777
907
  if (!o.ok) {
778
- if (o.status === 403) throw Error("ai_generation_not_available");
908
+ if (o.status === 403) throw Error("aiGenerationNotAvailable");
779
909
  let e = await o.json().catch(() => null);
780
910
  throw Error(e?.message || "Failed to fix finding");
781
911
  }
@@ -796,7 +926,7 @@ function T(e) {
796
926
  } catch {
797
927
  continue;
798
928
  }
799
- if (t.type === "text") c.value += t.text;
929
+ if (t.type === "text") l.value += t.text;
800
930
  else if (t.type === "error") throw Error(t.message || "Failed to fix finding");
801
931
  else t.type === "done" && (f = t.content ?? null);
802
932
  }
@@ -814,14 +944,14 @@ function T(e) {
814
944
  n && (n.findings = n.findings.filter((e) => e.id !== t));
815
945
  }
816
946
  function m() {
817
- i.value = !1, a.value = null, o.value = null, s.value = null, c.value = "", u.value = null;
947
+ i.value = !1, a.value = null, o.value = null, s.value = null, l.value = "", u.value = null;
818
948
  }
819
949
  return {
820
950
  isScoring: i,
821
951
  scoringResult: a,
822
952
  error: o,
823
953
  fixingFindingId: s,
824
- fixStreamingText: c,
954
+ fixStreamingText: l,
825
955
  fixError: u,
826
956
  score: d,
827
957
  fixFinding: f,
@@ -833,14 +963,14 @@ function T(e) {
833
963
  //#region ../core/src/cloud/design-reference.ts
834
964
  function E(e) {
835
965
  let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n(!1), s = n(null);
836
- async function c(e) {
966
+ async function l(e) {
837
967
  let n = r();
838
968
  if (!n) throw Error("Template must be saved before using design reference");
839
969
  o.value = !0, s.value = null;
840
970
  try {
841
971
  let r = new FormData();
842
972
  e.prompt && r.append("prompt", e.prompt), e.imageUpload && r.append("image_upload", e.imageUpload), e.pdfUpload && r.append("pdf_upload", e.pdfUpload);
843
- let a = l(g["ai.generateFromDesign"], {
973
+ let a = c(h["ai.generateFromDesign"], {
844
974
  project: t.projectId,
845
975
  tenant: t.tenantSlug,
846
976
  template: n
@@ -851,15 +981,15 @@ function E(e) {
851
981
  });
852
982
  if (!o.ok) {
853
983
  let e = await o.json().catch(() => null);
854
- throw Error(o.status === 403 ? "ai_generation_not_available" : e?.message || "Failed to generate template from design");
984
+ throw Error(o.status === 403 ? "aiGenerationNotAvailable" : e?.message || "Failed to generate template from design");
855
985
  }
856
986
  let s = o.body?.getReader();
857
987
  if (!s) throw Error("Failed to read stream");
858
- let c = new TextDecoder(), u = "", d = null;
988
+ let l = new TextDecoder(), u = "", d = null;
859
989
  for (;;) {
860
990
  let { done: e, value: t } = await s.read();
861
991
  if (e) break;
862
- u += c.decode(t, { stream: !0 });
992
+ u += l.decode(t, { stream: !0 });
863
993
  let n = u.split("\n");
864
994
  u = n.pop() ?? "";
865
995
  for (let e of n) {
@@ -888,7 +1018,7 @@ function E(e) {
888
1018
  return {
889
1019
  isGenerating: o,
890
1020
  error: s,
891
- generate: c,
1021
+ generate: l,
892
1022
  reset: u
893
1023
  };
894
1024
  }
@@ -899,29 +1029,23 @@ function O(e) {
899
1029
  let t = {
900
1030
  id: e.id,
901
1031
  body: e.body,
902
- author: {
903
- id: e.author_identifier,
904
- name: e.author_name
905
- },
906
- createdAt: e.created_at,
907
- blockId: e.block_id,
908
- parentId: e.parent_id,
909
- resolvedAt: e.resolved_at
1032
+ author: e.author,
1033
+ createdAt: e.createdAt,
1034
+ blockId: e.blockId,
1035
+ parentId: e.parentId,
1036
+ resolvedAt: e.resolvedAt
910
1037
  };
911
- return e.updated_at !== e.created_at && (t.updatedAt = e.updated_at), e.resolved_by_identifier && (t.resolvedBy = {
912
- id: e.resolved_by_identifier,
913
- name: e.resolved_by_name ?? ""
914
- }), e.replies?.length && (t.replies = e.replies.map(O)), t;
1038
+ return e.updatedAt !== e.createdAt && (t.updatedAt = e.updatedAt), e.resolvedBy && (t.resolvedBy = e.resolvedBy), e.replies?.length && (t.replies = e.replies.map(O)), t;
915
1039
  }
916
1040
  function k(e) {
917
- let { authManager: n, channel: r, getSocketId: i } = e, a = new _(n);
1041
+ let { authManager: n, channel: r, getSocketId: i } = e, a = new g(n);
918
1042
  function o() {
919
1043
  let e = n.userConfig;
920
1044
  if (!e) throw Error("[Templatical] Cloud comments need a signed user in the auth token. The project's token endpoint must include a `user` claim.");
921
1045
  return {
922
- user_id: e.id,
923
- user_name: e.name,
924
- user_signature: e.signature
1046
+ userId: e.id,
1047
+ userName: e.name,
1048
+ userSignature: e.signature
925
1049
  };
926
1050
  }
927
1051
  function s() {
@@ -935,8 +1059,8 @@ function k(e) {
935
1059
  async create(e, t) {
936
1060
  return O(await a.createComment(e, {
937
1061
  body: t.body,
938
- block_id: t.blockId,
939
- parent_id: t.parentId,
1062
+ blockId: t.blockId,
1063
+ parentId: t.parentId,
940
1064
  ...o()
941
1065
  }, s()));
942
1066
  },
@@ -957,22 +1081,22 @@ function k(e) {
957
1081
  function i(e) {
958
1082
  let t = O(e.comment);
959
1083
  switch (e.action) {
960
- case "comment_created":
1084
+ case "commentCreated":
961
1085
  n({
962
1086
  type: "created",
963
1087
  comment: t
964
1088
  });
965
1089
  break;
966
- case "comment_deleted":
1090
+ case "commentDeleted":
967
1091
  n({
968
1092
  type: "deleted",
969
1093
  commentId: t.id,
970
1094
  parentId: t.parentId
971
1095
  });
972
1096
  break;
973
- case "comment_updated":
974
- case "comment_resolved":
975
- case "comment_unresolved": n({
1097
+ case "commentUpdated":
1098
+ case "commentResolved":
1099
+ case "commentUnresolved": n({
976
1100
  type: "updated",
977
1101
  comment: t
978
1102
  });
@@ -992,8 +1116,8 @@ function k(e) {
992
1116
  var A = [
993
1117
  "pusher:member_added",
994
1118
  "pusher:member_removed",
995
- "client-block_locked",
996
- "client-block_unlocked",
1119
+ "client-blockLocked",
1120
+ "client-blockUnlocked",
997
1121
  "client-operation",
998
1122
  "mcp-operation"
999
1123
  ];
@@ -1066,13 +1190,13 @@ function N(e) {
1066
1190
  s.value && !d && s.value.trigger("client-operation", e);
1067
1191
  }
1068
1192
  function x(e) {
1069
- s.value && s.value.trigger("client-block_locked", {
1193
+ s.value && s.value.trigger("client-blockLocked", {
1070
1194
  blockId: e,
1071
1195
  userId: f.value
1072
1196
  });
1073
1197
  }
1074
1198
  function S(e) {
1075
- s.value && s.value.trigger("client-block_unlocked", { blockId: e });
1199
+ s.value && s.value.trigger("client-blockUnlocked", { blockId: e });
1076
1200
  }
1077
1201
  return t(() => o.state.selectedBlockId, (e, t) => {
1078
1202
  d || (t && S(t), e && x(e));
@@ -1090,14 +1214,14 @@ function N(e) {
1090
1214
  }), t.bind("pusher:member_removed", (t) => {
1091
1215
  let n = c.value.find((e) => e.id === t.id);
1092
1216
  h(t.id), n && e.onCollaboratorLeft?.(n);
1093
- }), t.bind("client-block_locked", (t) => {
1217
+ }), t.bind("client-blockLocked", (t) => {
1094
1218
  g(t);
1095
1219
  let n = c.value.find((e) => e.id === t.userId);
1096
1220
  n && e.onBlockLocked?.({
1097
1221
  blockId: t.blockId,
1098
1222
  collaborator: n
1099
1223
  });
1100
- }), t.bind("client-block_unlocked", (t) => {
1224
+ }), t.bind("client-blockUnlocked", (t) => {
1101
1225
  let n = l.value.get(t.blockId);
1102
1226
  _(t), n && e.onBlockUnlocked?.({
1103
1227
  blockId: t.blockId,
@@ -1123,50 +1247,50 @@ function P(e, t) {
1123
1247
  let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
1124
1248
  e.addBlock = (e, r, i, a) => {
1125
1249
  n(e, r, i, a), t._broadcastOperation({
1126
- operation: "add_block",
1250
+ operation: "addBlock",
1127
1251
  data: {
1128
1252
  block: e,
1129
- section_id: r,
1130
- column_index: i,
1253
+ sectionId: r,
1254
+ columnIndex: i,
1131
1255
  index: a
1132
1256
  },
1133
1257
  timestamp: Date.now()
1134
1258
  });
1135
1259
  }, e.updateBlock = (e, n) => {
1136
1260
  r(e, n), t._broadcastOperation({
1137
- operation: "update_block",
1261
+ operation: "updateBlock",
1138
1262
  data: {
1139
- block_id: e,
1263
+ blockId: e,
1140
1264
  updates: n
1141
1265
  },
1142
1266
  timestamp: Date.now()
1143
1267
  });
1144
1268
  }, e.removeBlock = (e) => {
1145
1269
  i(e), t._broadcastOperation({
1146
- operation: "delete_block",
1147
- data: { block_id: e },
1270
+ operation: "deleteBlock",
1271
+ data: { blockId: e },
1148
1272
  timestamp: Date.now()
1149
1273
  });
1150
1274
  }, e.moveBlock = (e, n, r, i) => {
1151
1275
  a(e, n, r, i), t._broadcastOperation({
1152
- operation: "move_block",
1276
+ operation: "moveBlock",
1153
1277
  data: {
1154
- block_id: e,
1278
+ blockId: e,
1155
1279
  index: n,
1156
- section_id: r,
1157
- column_index: i
1280
+ sectionId: r,
1281
+ columnIndex: i
1158
1282
  },
1159
1283
  timestamp: Date.now()
1160
1284
  });
1161
1285
  }, e.updateSettings = (e) => {
1162
1286
  o(e), t._broadcastOperation({
1163
- operation: "update_settings",
1287
+ operation: "updateSettings",
1164
1288
  data: { updates: e },
1165
1289
  timestamp: Date.now()
1166
1290
  });
1167
1291
  }, e.setContent = (e, n) => {
1168
1292
  s(e, n), t._broadcastOperation({
1169
- operation: "set_content",
1293
+ operation: "setContent",
1170
1294
  data: { content: e },
1171
1295
  timestamp: Date.now()
1172
1296
  });
@@ -1207,7 +1331,7 @@ function F(e) {
1207
1331
  //#endregion
1208
1332
  //#region ../core/src/cloud/saved-blocks-provider.ts
1209
1333
  function I(e) {
1210
- let t = new _(e);
1334
+ let t = new g(e);
1211
1335
  return {
1212
1336
  list(e) {
1213
1337
  return t.listModules(e?.search, e?.category);
@@ -1224,13 +1348,114 @@ function I(e) {
1224
1348
  };
1225
1349
  }
1226
1350
  //#endregion
1351
+ //#region ../core/src/cloud/media-provider.ts
1352
+ function L(e) {
1353
+ let t = {
1354
+ id: e.id,
1355
+ url: e.url,
1356
+ filename: e.filename,
1357
+ alt: e.alt,
1358
+ mimeType: e.mimeType,
1359
+ folderId: e.folderId,
1360
+ createdAt: e.createdAt,
1361
+ updatedAt: e.updatedAt,
1362
+ size: e.size
1363
+ };
1364
+ return e.width != null && (t.width = e.width), e.height != null && (t.height = e.height), e.thumbnailUrl != null && (t.thumbnailUrl = e.thumbnailUrl), t;
1365
+ }
1366
+ function R(e, t = null) {
1367
+ return {
1368
+ id: e.id,
1369
+ name: e.name,
1370
+ parentId: e.parentId === void 0 ? t : e.parentId
1371
+ };
1372
+ }
1373
+ function z(e, t = null) {
1374
+ let n = [];
1375
+ for (let r of e) n.push(R(r, t)), r.children?.length && n.push(...z(r.children, r.id));
1376
+ return n;
1377
+ }
1378
+ function B(e) {
1379
+ let t = e?.media?.categories;
1380
+ if (!t) return;
1381
+ let n = {};
1382
+ for (let [e, r] of Object.entries(t)) n[e] = r.mimeTypes;
1383
+ return n;
1384
+ }
1385
+ function V(e, t) {
1386
+ let n = new _(e);
1387
+ return {
1388
+ async list(e) {
1389
+ let t = await n.browseMedia({
1390
+ search: e?.search,
1391
+ cursor: e?.cursor,
1392
+ folderId: e?.folderId,
1393
+ category: e?.category
1394
+ }), r = { items: t.data.map(L) };
1395
+ return t.meta.nextCursor && (r.nextCursor = t.meta.nextCursor), r;
1396
+ },
1397
+ async create(e) {
1398
+ return L(await n.uploadMedia(e.file, e.folderId));
1399
+ },
1400
+ async update(e, t) {
1401
+ return L(await n.updateMedia(e, t.filename, t.alt));
1402
+ },
1403
+ delete(e) {
1404
+ return n.deleteMedia(e);
1405
+ },
1406
+ folders: {
1407
+ async list() {
1408
+ return z(await n.getMediaFolders());
1409
+ },
1410
+ async create(e) {
1411
+ return R(await n.createMediaFolder(e.name, e.parentId));
1412
+ },
1413
+ async update(e, t) {
1414
+ return R(await n.renameMediaFolder(e, t.name));
1415
+ },
1416
+ delete(e) {
1417
+ return n.deleteMediaFolder(e);
1418
+ },
1419
+ async move(e, t) {
1420
+ return (await n.moveMedia(e, t)).map(L);
1421
+ }
1422
+ },
1423
+ async replace(e, t) {
1424
+ return L(await n.replaceMedia(e, t));
1425
+ },
1426
+ async importFromUrl(e, t) {
1427
+ return L(await n.importFromUrl(e, t));
1428
+ },
1429
+ async checkUsage(e) {
1430
+ let t = await n.checkMediaUsage(e), r = {};
1431
+ for (let [e, n] of Object.entries(t.data)) r[e] = {
1432
+ templateCount: n.templateCount,
1433
+ templateNames: n.templateNames
1434
+ };
1435
+ return r;
1436
+ },
1437
+ async frequentlyUsed() {
1438
+ return (await n.getFrequentlyUsed()).map(L);
1439
+ },
1440
+ async storage() {
1441
+ return t?.()?.storage ?? null;
1442
+ },
1443
+ get maxFileSize() {
1444
+ return t?.()?.media?.maxFileSize;
1445
+ },
1446
+ get mimeTypes() {
1447
+ return B(t?.() ?? null);
1448
+ }
1449
+ };
1450
+ }
1451
+ //#endregion
1227
1452
  //#region ../core/src/cloud/templates-provider.ts
1228
- var L = 6e4;
1229
- function R(e) {
1230
- let t = new _(e), n = 0;
1453
+ var H = 6e4;
1454
+ function U(e) {
1455
+ let t = new g(e), n = 0;
1231
1456
  function r(e, r) {
1232
1457
  let i = Date.now();
1233
- i - n < L || (n = i, t.createVersion(e, r).catch((e) => {
1458
+ i - n < H || (n = i, t.createVersion(e, r).catch((e) => {
1234
1459
  console.warn("[Templatical] Automatic version not recorded — the save itself succeeded:", e);
1235
1460
  }));
1236
1461
  }
@@ -1249,14 +1474,14 @@ function R(e) {
1249
1474
  }
1250
1475
  //#endregion
1251
1476
  //#region ../core/src/cloud/export.ts
1252
- function z(e) {
1477
+ function W(e) {
1253
1478
  return {
1254
1479
  customFonts: e?.customFonts ?? [],
1255
1480
  defaultFallback: e?.defaultFallback ?? "Arial, sans-serif"
1256
1481
  };
1257
1482
  }
1258
- function B(e) {
1259
- let t = new _(e.authManager);
1483
+ function G(e) {
1484
+ let t = new g(e.authManager);
1260
1485
  async function n(e, n) {
1261
1486
  let r = await t.exportTemplate(e, n);
1262
1487
  return {
@@ -1274,8 +1499,8 @@ function B(e) {
1274
1499
  }
1275
1500
  //#endregion
1276
1501
  //#region ../core/src/cloud/render-provider.ts
1277
- function V(e) {
1278
- let t = B({ authManager: e.authManager });
1502
+ function K(e) {
1503
+ let t = G({ authManager: e.authManager });
1279
1504
  function n(e) {
1280
1505
  return {
1281
1506
  customFonts: e.fonts?.customFonts ?? [],
@@ -1299,25 +1524,25 @@ function V(e) {
1299
1524
  }
1300
1525
  //#endregion
1301
1526
  //#region ../core/src/cloud/version-history-provider.ts
1302
- function H(e) {
1527
+ function q(e) {
1303
1528
  return {
1304
1529
  id: e.id,
1305
- createdAt: e.created_at,
1306
- isAutomatic: e.is_autosave,
1530
+ createdAt: e.createdAt,
1531
+ isAutomatic: e.isAutomatic,
1307
1532
  content: e.content
1308
1533
  };
1309
1534
  }
1310
- function U(e) {
1311
- let t = new _(e);
1535
+ function J(e) {
1536
+ let t = new g(e);
1312
1537
  return {
1313
1538
  async list(e) {
1314
- return { versions: (await t.getVersions(e)).map(H) };
1539
+ return { versions: (await t.getVersions(e)).map(q) };
1315
1540
  },
1316
1541
  async get(e, n) {
1317
1542
  return (await t.getVersion(e, n)).content;
1318
1543
  },
1319
1544
  async create(e, n, r) {
1320
- return H(await t.createVersion(e, n, r?.label));
1545
+ return q(await t.createVersion(e, n, r?.label));
1321
1546
  },
1322
1547
  restore(e, n) {
1323
1548
  return t.restoreVersion(e, n);
@@ -1326,7 +1551,7 @@ function U(e) {
1326
1551
  }
1327
1552
  //#endregion
1328
1553
  //#region ../core/src/cloud/test-email.ts
1329
- function W(e) {
1554
+ function Y(e) {
1330
1555
  let { authManager: r, isAuthReady: a } = e, o = n(null);
1331
1556
  a && t(a, (e) => {
1332
1557
  e && (o.value = r.testEmailConfig);
@@ -1343,8 +1568,8 @@ function W(e) {
1343
1568
  }
1344
1569
  //#endregion
1345
1570
  //#region ../core/src/cloud/test-email-provider.ts
1346
- function G(e) {
1347
- let t = new _(e.authManager);
1571
+ function X(e) {
1572
+ let t = new g(e.authManager);
1348
1573
  return {
1349
1574
  get allowedRecipients() {
1350
1575
  return e.allowedEmails.value;
@@ -1359,7 +1584,7 @@ function G(e) {
1359
1584
  e.onBeforeTestEmail && (a = await e.onBeforeTestEmail(a)), await t.sendTestEmail(i, {
1360
1585
  recipient: n,
1361
1586
  html: a,
1362
- allowed_emails: e.allowedEmails.value,
1587
+ allowedEmails: e.allowedEmails.value,
1363
1588
  signature: r
1364
1589
  });
1365
1590
  }
@@ -1367,8 +1592,8 @@ function G(e) {
1367
1592
  }
1368
1593
  //#endregion
1369
1594
  //#region ../core/src/cloud/plan-config.ts
1370
- function K(e) {
1371
- let { authManager: t, onError: r } = e, a = n(null), o = n(!1), s = new _(t), c = i(() => a.value?.features ?? null);
1595
+ function Z(e) {
1596
+ let { authManager: t, onError: r } = e, a = n(null), o = n(!1), s = new g(t), c = i(() => a.value?.features ?? null);
1372
1597
  function l(e) {
1373
1598
  return a.value?.features[e] ?? !1;
1374
1599
  }
@@ -1394,14 +1619,14 @@ function K(e) {
1394
1619
  }
1395
1620
  //#endregion
1396
1621
  //#region ../core/src/cloud/health-check.ts
1397
- var q = 5e3;
1398
- function J(e) {
1399
- return e.authManager ? e.authManager.resolveUrl(g.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${g.health}`;
1622
+ var Q = 5e3;
1623
+ function $(e) {
1624
+ return e.authManager ? e.authManager.resolveUrl(h.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${h.health}`;
1400
1625
  }
1401
- async function Y(e, t) {
1626
+ async function ee(e, t) {
1402
1627
  let n = performance.now();
1403
1628
  try {
1404
- let r = t ? await t.authenticatedFetch(g.health, {
1629
+ let r = t ? await t.authenticatedFetch(h.health, {
1405
1630
  method: "GET",
1406
1631
  headers: { Accept: "application/json" }
1407
1632
  }) : await fetch(e, {
@@ -1450,8 +1675,8 @@ async function Y(e, t) {
1450
1675
  };
1451
1676
  }
1452
1677
  }
1453
- async function X(e) {
1454
- if (!e?.host || !e?.app_key) return {
1678
+ async function te(e) {
1679
+ if (!e?.host || !e?.appKey) return {
1455
1680
  ok: !1,
1456
1681
  error: "WebSocket configuration not available"
1457
1682
  };
@@ -1459,14 +1684,14 @@ async function X(e) {
1459
1684
  ok: !1,
1460
1685
  error: "WebSocket not supported in this environment"
1461
1686
  };
1462
- let t = `${e.port === 443 ? "wss" : "ws"}://${e.host}:${e.port}/app/${e.app_key}?protocol=7&client=js&version=8.4.0-rc2&flash=false`;
1687
+ let t = `${e.port === 443 ? "wss" : "ws"}://${e.host}:${e.port}/app/${e.appKey}?protocol=7&client=js&version=8.4.0-rc2&flash=false`;
1463
1688
  return new Promise((e) => {
1464
1689
  let n = null, r = setTimeout(() => {
1465
1690
  n?.close(), e({
1466
1691
  ok: !1,
1467
1692
  error: "WebSocket connection timed out"
1468
1693
  });
1469
- }, q);
1694
+ }, Q);
1470
1695
  try {
1471
1696
  n = new WebSocket(t);
1472
1697
  } catch (t) {
@@ -1486,8 +1711,8 @@ async function X(e) {
1486
1711
  };
1487
1712
  });
1488
1713
  }
1489
- async function Z(e = {}) {
1490
- let t = await Y(J(e), e.authManager), n = await X(t.wsConfig);
1714
+ async function ne(e = {}) {
1715
+ let t = await ee($(e), e.authManager), n = await te(t.wsConfig);
1491
1716
  return {
1492
1717
  api: t.api,
1493
1718
  websocket: n,
@@ -1497,7 +1722,7 @@ async function Z(e = {}) {
1497
1722
  }
1498
1723
  //#endregion
1499
1724
  //#region ../core/src/cloud/mcp-listener.ts
1500
- function Q(e) {
1725
+ function re(e) {
1501
1726
  let { editor: n, channel: r, onOperation: i } = e;
1502
1727
  t(r, (e, t) => {
1503
1728
  t && t.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
@@ -1506,6 +1731,6 @@ function Q(e) {
1506
1731
  });
1507
1732
  }
1508
1733
  //#endregion
1509
- export { l as C, o as E, g as S, c as T, T as _, W as a, v as b, z as c, I as d, F as f, E as g, k as h, G as i, B as l, N as m, Z as n, U as o, P as p, K as r, V as s, Q as t, R as u, w as v, s as w, _ as x, C as y };
1734
+ export { o as C, s as S, E as _, Y as a, C as b, W as c, V as d, I as f, k as g, N as h, X as i, G as l, P as m, ne as n, J as o, F as p, Z as r, K as s, re as t, U as u, T as v, v as x, w as y };
1510
1735
 
1511
- //# sourceMappingURL=cloud-BP5-6__d.js.map
1736
+ //# sourceMappingURL=cloud-BLgCKP7Z.js.map