@templatical/editor 0.48.0 → 0.49.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 (308) hide show
  1. package/README.md +1 -1
  2. package/dist/{AiChatSidebar-DxPHFNoT.js → AiChatSidebar-CdjTb9ej.js} +14 -14
  3. package/dist/{AiFeatureMenu-C8GVqu1d.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
  4. package/dist/{BlockIssueBadge-BShkuJis.js → BlockIssueBadge-BdpJwim0.js} +5 -5
  5. package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-D_sowkf0.js} +8 -8
  6. package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
  7. package/dist/{CloudPanels-Dgw7tb4R.js → CloudPanels-1hwFiJ0G.js} +39 -68
  8. package/dist/CollaborationNotices-BWpKzueF.js +73 -0
  9. package/dist/CollaboratorBar-D87phJsw.js +123 -0
  10. package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-BUvUzO3T.js} +2 -2
  11. package/dist/{CommentsSidebar-BOqj16Al.js → CommentsSidebar-J65znlrH.js} +14 -14
  12. package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
  13. package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CLMIwfK7.js} +7 -7
  14. package/dist/{DesignReferenceSidebar-BWAi3eQQ.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
  15. package/dist/{IssuesPanel-C-x3I012.js → IssuesPanel-DeeVsfG7.js} +8 -8
  16. package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
  17. package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
  18. package/dist/{MediaEditModal-ByOvznRC.js → MediaEditModal-C_wxoUMG.js} +3 -3
  19. package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-BVXDkqtH.js} +2 -2
  20. package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-BEw_r0PJ.js} +3 -3
  21. package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
  22. package/dist/{ParagraphEditor-BVjOwwHx.js → ParagraphEditor-zLV44z-R.js} +19 -19
  23. package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
  24. package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-CsvniFlI.js} +9 -9
  25. package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-DzWURF_e.js} +12 -12
  26. package/dist/{SavedBlocksBrowserModal-DbmIS5uK.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
  27. package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
  28. package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
  29. package/dist/{TemplateScoringPanel-ynbGl-sr.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
  30. package/dist/{TemplateSettings-Bi01S3H3.js → TemplateSettings-Cu5X9DgA.js} +11 -11
  31. package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-BeRYV3eg.js} +14 -14
  32. package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-B8c3fQi2.js} +2 -2
  33. package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-CvpNUoAp.js} +11 -11
  34. package/dist/{ToggleSwitch-Ozc7YU38.js → ToggleSwitch-DHweVJOr.js} +2 -2
  35. package/dist/{Toolbar-B-2lO0I8.js → Toolbar-BadDSkkF.js} +426 -429
  36. package/dist/{TplModal-Bz4-IZ9R.js → TplModal-BZgi9Tes.js} +5 -5
  37. package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
  38. package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
  39. package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-F-811aps.js} +4 -4
  40. package/dist/{WrapperBlock-D0qgNqjD.js → WrapperBlock-DiiaxpMb.js} +5 -5
  41. package/dist/{blockTypeIcons-CEDZytqP.js → blockTypeIcons-CayLluou.js} +2 -2
  42. package/dist/bundle-stats.json +7 -7
  43. package/dist/{ca-CbNzJM3I.js → ca-DSJwJ5ov.js} +23 -1
  44. package/dist/cdn/chunks/{AiChatSidebar-Dk0rJBQN.js → AiChatSidebar-yXJ85Zcg.js} +8 -8
  45. package/dist/cdn/chunks/{AiChatSidebar-Dk0rJBQN.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
  46. package/dist/cdn/chunks/{AiFeatureMenu-B7b0w8ZS.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
  47. package/dist/cdn/chunks/{AiFeatureMenu-B7b0w8ZS.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
  48. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
  49. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
  50. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-m2tWRyWv.js} +8 -8
  51. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js.map → BlockPreviewCanvas-m2tWRyWv.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudHeaderExtras-B4fhuwc_.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
  53. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
  54. package/dist/cdn/chunks/{CloudPanels-awqHfJqC.js → CloudPanels-XufhBZYF.js} +38 -67
  55. package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
  56. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
  57. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
  58. package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
  59. package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
  60. package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js → CommentsPanel-R8YLLO3v.js} +3 -3
  61. package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
  62. package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js → CommentsSidebar-96NZHVq3.js} +5 -5
  63. package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
  64. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
  65. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
  66. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-tmiTPEXm.js} +8 -8
  67. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
  68. package/dist/cdn/chunks/{DesignReferenceSidebar-BW9cHnA9.js → DesignReferenceSidebar-D14IIu_P.js} +39 -39
  69. package/dist/cdn/chunks/{DesignReferenceSidebar-BW9cHnA9.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
  70. package/dist/cdn/chunks/{IssuesPanel-cXf9ywA4.js → IssuesPanel-BoPiCLGc.js} +8 -8
  71. package/dist/cdn/chunks/{IssuesPanel-cXf9ywA4.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
  72. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
  73. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
  74. package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-BJ2t2vxC.js} +20 -20
  75. package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
  76. package/dist/cdn/chunks/{MediaEditModal-zXfcArr4.js → MediaEditModal-DD0SZ-S3.js} +3 -3
  77. package/dist/cdn/chunks/{MediaEditModal-zXfcArr4.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
  78. package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js → MediaPanels-CkdJ_kGp.js} +3 -3
  79. package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
  80. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-7wXX71DH.js} +4 -4
  81. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
  82. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
  83. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
  84. package/dist/cdn/chunks/{ParagraphEditor-D4aq9eeC.js → ParagraphEditor-CJQjRHXV.js} +29 -29
  85. package/dist/cdn/chunks/{ParagraphEditor-D4aq9eeC.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
  86. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js → RestoreVersionDialog-C5cxBRKi.js} +6 -6
  87. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
  88. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
  89. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
  90. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-BKbjUnPM.js} +10 -10
  91. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
  93. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
  94. package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
  95. package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
  96. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
  97. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
  98. package/dist/cdn/chunks/{TemplateScoringPanel-BrWqJCSP.js → TemplateScoringPanel-BBPnHILC.js} +6 -6
  99. package/dist/cdn/chunks/{TemplateScoringPanel-BrWqJCSP.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
  100. package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js → TemplateSettings-CtrzzQWl.js} +10 -10
  101. package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
  102. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-DuZKYMWD.js} +13 -13
  103. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
  104. package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js → TestEmailPanel-DERaCdpG.js} +3 -3
  105. package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
  106. package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js → TitleEditor-CEgxjtUX.js} +14 -14
  107. package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
  108. package/dist/cdn/chunks/{ToggleSwitch-BB-bQADJ.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
  109. package/dist/cdn/chunks/{ToggleSwitch-BB-bQADJ.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
  110. package/dist/cdn/chunks/{Toolbar-C_x2TfFk.js → Toolbar-GFIZQHzw.js} +440 -443
  111. package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
  112. package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-DDrbWJcE.js} +5 -5
  113. package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-DDrbWJcE.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-MlxsUmuT.js} +6 -6
  115. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
  116. package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
  117. package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
  118. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
  119. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
  120. package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js → WrapperBlock-CFuP4R0c.js} +6 -6
  121. package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js.map → WrapperBlock-CFuP4R0c.js.map} +1 -1
  122. package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js → blockTypeIcons-BnAd8qsP.js} +2 -2
  123. package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js.map → blockTypeIcons-BnAd8qsP.js.map} +1 -1
  124. package/dist/cdn/chunks/{ca-CbNzJM3I.js → ca-DSJwJ5ov.js} +24 -2
  125. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
  126. package/dist/{cloud-B5xwm_4X.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
  127. package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
  128. package/dist/cdn/chunks/{createCloudRuntime-Vd0N4elZ.js → createCloudRuntime-DiYCJ21w.js} +127 -169
  129. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
  130. package/dist/{de-DMquBpZM.js → cdn/chunks/de-CBE6O79z.js} +25 -1
  131. package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
  132. package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
  133. package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
  134. package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
  135. package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
  136. package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
  137. package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
  138. package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
  139. package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
  140. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-HJBy9kLj.js} +88 -88
  141. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
  142. package/dist/cdn/chunks/{en-C8Mp71sO.js → en-CDexnk0p.js} +24 -2
  143. package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
  144. package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
  145. package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
  146. package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
  147. package/dist/{es-Byq4tthI.js → cdn/chunks/es-BE42B6uN.js} +25 -1
  148. package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
  149. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-koOuDeZS.js} +23 -23
  150. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-koOuDeZS.js.map} +1 -1
  151. package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-DlJFPDQR.js} +25 -1
  152. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
  153. package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-CjlNV8xD.js} +46 -46
  154. package/dist/cdn/chunks/{icons-aTYwH5-g.js.map → icons-CjlNV8xD.js.map} +1 -1
  155. package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-CUT8gkNI.js} +25 -1
  156. package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
  157. package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
  158. package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
  159. package/dist/{nl-ClJ3BY3F.js → cdn/chunks/nl-bXWqqRyS.js} +25 -1
  160. package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
  161. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
  162. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
  163. package/dist/cdn/chunks/{pt-BR-DibcXcmv.js → pt-BR-2_H4-wlb.js} +24 -2
  164. package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
  165. package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
  166. package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
  167. package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
  168. package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
  169. package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
  170. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
  171. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
  172. package/dist/cdn/chunks/{src-DlFlC9Tt.js → src-B1e5SSYP.js} +84 -84
  173. package/dist/cdn/chunks/{src-DlFlC9Tt.js.map → src-B1e5SSYP.js.map} +1 -1
  174. package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-B77z1iw4.js} +117 -117
  175. package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
  176. package/dist/cdn/chunks/{src-DYCDeBDM.js → src-CvLTYGdO.js} +549 -315
  177. package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
  178. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
  179. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
  180. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +6 -0
  181. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
  182. package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
  183. package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
  184. package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
  185. package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
  186. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
  187. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
  188. package/dist/cdn/chunks/{useEditorCore-Bb2UcB20.js → useEditorCore-DpCFvHg_.js} +440 -419
  189. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
  190. package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
  191. package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
  192. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
  193. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
  194. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-X8bc5qNl.js} +4 -4
  195. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
  196. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-DFoOexIQ.js} +6 -6
  197. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
  198. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
  199. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
  200. package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
  201. package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
  202. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js → withCurrentFont-D-f61ghC.js} +2 -2
  203. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
  204. package/dist/cdn/editor.css +1 -1
  205. package/dist/cdn/editor.js +1319 -1066
  206. package/dist/cdn/editor.js.map +1 -1
  207. package/dist/{check-ClwqRMgv.js → check-DQQzkmIC.js} +1 -1
  208. package/dist/{chevron-down-te6qn-zE.js → chevron-down-CIF4bdon.js} +1 -1
  209. package/dist/{chevron-right-W2hbH1FM.js → chevron-right-Cg7Xu-ev.js} +1 -1
  210. package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-Csu7ISD-.js} +1 -1
  211. package/dist/{circle-alert-CIEGV5DN.js → circle-alert-YUvIJAgY.js} +1 -1
  212. package/dist/{clock-Y4cx0gkJ.js → clock-CnSIGKQW.js} +1 -1
  213. package/dist/{cdn/chunks/cloud-BHClP3e2.js → cloud-YUYDtdHt.js} +308 -569
  214. package/dist/{copy-BEcsAlfB.js → copy-CUC43md_.js} +1 -1
  215. package/dist/{createCloudRuntime-zNPkF6T9.js → createCloudRuntime-BMDRjL0k.js} +126 -168
  216. package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-BcP1sjdp.js} +6 -6
  217. package/dist/{cdn/chunks/de-DMquBpZM.js → de-CBE6O79z.js} +23 -3
  218. package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
  219. package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
  220. package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
  221. package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
  222. package/dist/{dist-tsmnQugO.js → dist-DBG3nh3k.js} +503 -273
  223. package/dist/{editor-modal-AlVLkU91.js → editor-modal--7_9A6j-.js} +20 -20
  224. package/dist/en-BHCMzqib.js +1 -0
  225. package/dist/{en-C8Mp71sO.js → en-CDexnk0p.js} +23 -1
  226. package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
  227. package/dist/{cdn/chunks/es-Byq4tthI.js → es-BE42B6uN.js} +23 -3
  228. package/dist/{extensions-pjO8VGkM.js → extensions-zwsZlWjH.js} +23 -23
  229. package/dist/{eye-Ddnz8nnm.js → eye-B1bua-ck.js} +1 -1
  230. package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-DlJFPDQR.js} +23 -3
  231. package/dist/{image-up-CM_HC0Dx.js → image-up-BqiO7KCO.js} +1 -1
  232. package/dist/index.d.ts +290 -35
  233. package/dist/{info-DXLmzoeY.js → info-x26nGOo2.js} +1 -1
  234. package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-CUT8gkNI.js} +23 -3
  235. package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
  236. package/dist/{link-Cel46wgo.js → link-CezhndyR.js} +1 -1
  237. package/dist/{list-Cl0GwiV9.js → list-DQqdptI0.js} +1 -1
  238. package/dist/{loader-circle-uAwpvfys.js → loader-circle-DCEeoYoi.js} +1 -1
  239. package/dist/{message-circle-DWU1pTM_.js → message-circle-BLGzfv_7.js} +1 -1
  240. package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-bXWqqRyS.js} +23 -3
  241. package/dist/{package-CbyG_yU_.js → package-D_kEQCMU.js} +1 -1
  242. package/dist/{pencil-BzoDcwKu.js → pencil-Dct8zGLy.js} +1 -1
  243. package/dist/{plus-8cDvoCjZ.js → plus-BDd0gTEm.js} +1 -1
  244. package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-CtKJecE-.js} +3 -3
  245. package/dist/{pt-BR-DibcXcmv.js → pt-BR-2_H4-wlb.js} +23 -1
  246. package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
  247. package/dist/{refresh-cw-9WinWixo.js → refresh-cw-tGMRDxr8.js} +1 -1
  248. package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
  249. package/dist/{search-CqgGq1gG.js → search-Bm2cCQpe.js} +1 -1
  250. package/dist/{send-Ceo3c9Db.js → send-sVLaKZ7f.js} +1 -1
  251. package/dist/{shield-check-uDAwur5D.js → shield-check-YhsbXfQc.js} +1 -1
  252. package/dist/{smartphone-CcLaCpGK.js → smartphone-B2W81p02.js} +1 -1
  253. package/dist/socialIcons-Bwv-49EB.js +2167 -0
  254. package/dist/{sparkles-Do9XjAuT.js → sparkles-a1qkBZ8X.js} +1 -1
  255. package/dist/style.css +1 -1
  256. package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
  257. package/dist/templatical-editor.js +1409 -1156
  258. package/dist/{text-align-start-DvzC0HQA.js → text-align-start-CTuwQ5YW.js} +1 -1
  259. package/dist/timeouts-o5Y9BuqI.js +4 -0
  260. package/dist/{trash-vlINTx32.js → trash-I3D2peFQ.js} +1 -1
  261. package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CenxmLRE.js} +1 -1
  262. package/dist/{upload-CtNOI6J2.js → upload-uU2cK0Ce.js} +1 -1
  263. package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
  264. package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
  265. package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-DRbMRe8F.js} +806 -785
  266. package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
  267. package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
  268. package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-zcI6BWIf.js} +3 -3
  269. package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-C-iBLlp0.js} +5 -5
  270. package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
  271. package/dist/{useScrollToBlock-CXmcHQQN.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
  272. package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
  273. package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-D62njRLu.js} +1 -1
  274. package/dist/{x-Cd6SFw8r.js → x-KFQ4S-Kz.js} +1 -1
  275. package/package.json +12 -12
  276. package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
  277. package/dist/CollaboratorBar-5rfopCPx.js +0 -103
  278. package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
  279. package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
  280. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
  281. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
  282. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
  283. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
  284. package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
  285. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
  286. package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
  287. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
  288. package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
  289. package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
  290. package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
  291. package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
  292. package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
  293. package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
  294. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
  295. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
  296. package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
  297. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
  298. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
  299. package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
  300. package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
  301. package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
  302. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
  303. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
  304. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
  305. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
  306. package/dist/en-B0FUfNwz.js +0 -1
  307. package/dist/socialIcons-PTiwhLoC.js +0 -1359
  308. package/dist/timeouts-Cv2jvusx.js +0 -4
@@ -1,12 +1,11 @@
1
- import { r as e } from "./rolldown-runtime-B0aSnxlc.js";
2
- import { B as t, Q as n, Y as r, f as i } from "./draggable-DrsNwZuB.js";
3
- import { t as a } from "./src-DYCDeBDM.js";
4
- //#region ../core/src/cloud/auth.ts
5
- function o(e) {
6
- let t = e instanceof a ? e.statusCode : void 0;
1
+ import { R as e, Z as t, s as n } from "./vue.runtime.esm-bundler-DV0Wx4r_.js";
2
+ import { f as r } from "./dist-DBG3nh3k.js";
3
+ //#region ../core/dist/cloud/index.js
4
+ function i(e) {
5
+ let t = e instanceof r ? e.statusCode : void 0;
7
6
  return t !== void 0 && t >= 400 && t < 500;
8
7
  }
9
- var s = class e {
8
+ var a = class e {
10
9
  static DEFAULT_BASE_URL = "https://templatical.com";
11
10
  accessToken = null;
12
11
  expiresAt = null;
@@ -79,17 +78,17 @@ var s = class e {
79
78
  credentials: this.requestOptions.credentials ?? "include"
80
79
  };
81
80
  e === "POST" && this.requestOptions.body && (t["Content-Type"] = "application/json", n.body = JSON.stringify(this.requestOptions.body));
82
- let r = await fetch(this.url, n);
83
- if (!r.ok) throw new a(`Token refresh failed: ${r.status}`, r.status);
84
- let i = await r.json();
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
- } : null, this._userConfig = i.user?.id && i.user?.name && i.user?.signature ? {
90
- id: i.user.id,
91
- name: i.user.name,
92
- signature: i.user.signature
81
+ let i = await fetch(this.url, n);
82
+ if (!i.ok) throw new r(`Token refresh failed: ${i.status}`, i.status);
83
+ let a = await i.json();
84
+ if (!a.token || !a.expiresAt || !a.projectId || !a.tenant) throw Error("Invalid token response: missing token, expiresAt, projectId, or tenant");
85
+ return this.accessToken = a.token, this.expiresAt = /* @__PURE__ */ new Date(a.expiresAt * 1e3), this._projectId = a.projectId, this._tenantSlug = a.tenant, this._testEmailConfig = a.testEmail?.allowedEmails && a.testEmail?.signature ? {
86
+ allowedEmails: a.testEmail.allowedEmails,
87
+ signature: a.testEmail.signature
88
+ } : null, this._userConfig = a.user?.id && a.user?.name && a.user?.signature ? {
89
+ id: a.user.id,
90
+ name: a.user.name,
91
+ signature: a.user.signature
93
92
  } : null, this.accessToken;
94
93
  } catch (e) {
95
94
  let t = e instanceof Error ? e : Error("Token refresh failed", { cause: e });
@@ -107,56 +106,54 @@ var s = class e {
107
106
  return a.status === 401 && (a = await i(await this.refreshToken())), a;
108
107
  }
109
108
  };
110
- //#endregion
111
- //#region ../core/src/cloud/url-builder.ts
112
- function c(e, t) {
109
+ function o(e, t) {
113
110
  return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
114
111
  }
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 = {
112
+ var s = "/api/v1/projects/{project}/tenants/{tenant}", c = `${s}/templates/{template}`, l = `${c}/ai`, u = `${s}/media`, d = `${u}/folders`, f = `${s}/saved-modules`, p = {
116
113
  health: "/api/v1/health",
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 {
114
+ "projects.config": `${s}/config`,
115
+ "broadcasting.auth": `${s}/broadcasting/auth`,
116
+ "templates.store": `${s}/templates`,
117
+ "templates.show": `${c}`,
118
+ "templates.update": `${c}`,
119
+ "templates.destroy": `${c}`,
120
+ "templates.export": `${c}/export`,
121
+ "templates.importFromBeefree": `${s}/templates/import/from-beefree`,
122
+ "templates.sendTestEmail": `${c}/send-test-email`,
123
+ "versions.index": `${c}/versions`,
124
+ "versions.store": `${c}/versions`,
125
+ "versions.show": `${c}/versions/{version}`,
126
+ "versions.restore": `${c}/versions/{version}/restore`,
127
+ "comments.index": `${c}/comments`,
128
+ "comments.store": `${c}/comments`,
129
+ "comments.update": `${c}/comments/{comment}`,
130
+ "comments.destroy": `${c}/comments/{comment}`,
131
+ "comments.resolve": `${c}/comments/{comment}/resolve`,
132
+ "ai.generate": `${l}/generate`,
133
+ "ai.conversationMessages": `${l}/conversation-messages`,
134
+ "ai.suggestions": `${l}/suggestions`,
135
+ "ai.rewriteText": `${l}/rewrite-text`,
136
+ "ai.score": `${l}/score`,
137
+ "ai.fixFinding": `${l}/fix-finding`,
138
+ "ai.generateFromDesign": `${l}/generate-from-design`,
139
+ "media.upload": `${u}/upload`,
140
+ "media.browse": `${u}/browse`,
141
+ "media.delete": `${u}/delete`,
142
+ "media.move": `${u}/move`,
143
+ "media.update": `${u}/{media}`,
144
+ "media.replace": `${u}/{media}/replace`,
145
+ "media.checkUsage": `${u}/check-usage`,
146
+ "media.frequentlyUsed": `${u}/frequently-used`,
147
+ "media.importFromUrl": `${u}/import-from-url`,
148
+ "folders.index": `${d}`,
149
+ "folders.store": `${d}`,
150
+ "folders.update": `${d}/{mediaFolder}`,
151
+ "folders.destroy": `${d}/{mediaFolder}`,
152
+ "savedModules.index": `${f}`,
153
+ "savedModules.store": `${f}`,
154
+ "savedModules.update": `${f}/{savedModule}`,
155
+ "savedModules.destroy": `${f}/{savedModule}`
156
+ }, m = class {
160
157
  authManager;
161
158
  constructor(e) {
162
159
  this.authManager = e;
@@ -184,7 +181,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
184
181
  });
185
182
  if (!n.ok) {
186
183
  let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` })), t = this.extractFirstValidationError(e);
187
- throw new a(t, n.status);
184
+ throw new r(t, n.status);
188
185
  }
189
186
  if (n.status !== 204) return (await n.json()).data;
190
187
  }
@@ -196,7 +193,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
196
193
  return e.message;
197
194
  }
198
195
  async createTemplate(e, t) {
199
- return this.request(c(h["templates.store"], this.baseParams), {
196
+ return this.request(o(p["templates.store"], this.baseParams), {
200
197
  method: "POST",
201
198
  body: JSON.stringify(t === void 0 ? { content: e } : {
202
199
  content: e,
@@ -205,13 +202,13 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
205
202
  });
206
203
  }
207
204
  async getTemplate(e) {
208
- return this.request(c(h["templates.show"], {
205
+ return this.request(o(p["templates.show"], {
209
206
  ...this.baseParams,
210
207
  template: e
211
208
  }));
212
209
  }
213
210
  async updateTemplate(e, t) {
214
- return this.request(c(h["templates.update"], {
211
+ return this.request(o(p["templates.update"], {
215
212
  ...this.baseParams,
216
213
  template: e
217
214
  }), {
@@ -220,7 +217,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
220
217
  });
221
218
  }
222
219
  async createVersion(e, t, n) {
223
- return this.request(c(h["versions.store"], {
220
+ return this.request(o(p["versions.store"], {
224
221
  ...this.baseParams,
225
222
  template: e
226
223
  }), {
@@ -232,26 +229,26 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
232
229
  });
233
230
  }
234
231
  async deleteTemplate(e) {
235
- return this.request(c(h["templates.destroy"], {
232
+ return this.request(o(p["templates.destroy"], {
236
233
  ...this.baseParams,
237
234
  template: e
238
235
  }), { method: "DELETE" });
239
236
  }
240
237
  async getVersions(e) {
241
- return this.request(c(h["versions.index"], {
238
+ return this.request(o(p["versions.index"], {
242
239
  ...this.baseParams,
243
240
  template: e
244
241
  }));
245
242
  }
246
243
  async getVersion(e, t) {
247
- return this.request(c(h["versions.show"], {
244
+ return this.request(o(p["versions.show"], {
248
245
  ...this.baseParams,
249
246
  template: e,
250
247
  version: t
251
248
  }));
252
249
  }
253
250
  async restoreVersion(e, t) {
254
- return this.request(c(h["versions.restore"], {
251
+ return this.request(o(p["versions.restore"], {
255
252
  ...this.baseParams,
256
253
  template: e,
257
254
  version: t
@@ -262,7 +259,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
262
259
  custom_fonts: t.customFonts,
263
260
  default_fallback: t.defaultFallback
264
261
  }) : void 0;
265
- return this.request(c(h["templates.export"], {
262
+ return this.request(o(p["templates.export"], {
266
263
  ...this.baseParams,
267
264
  template: e
268
265
  }), {
@@ -271,7 +268,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
271
268
  });
272
269
  }
273
270
  async sendTestEmail(e, t) {
274
- await this.request(c(h["templates.sendTestEmail"], {
271
+ await this.request(o(p["templates.sendTestEmail"], {
275
272
  ...this.baseParams,
276
273
  template: e
277
274
  }), {
@@ -280,11 +277,11 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
280
277
  });
281
278
  }
282
279
  commentsUrl(e, t) {
283
- return t ? c(h["comments.update"], {
280
+ return t ? o(p["comments.update"], {
284
281
  ...this.baseParams,
285
282
  template: e,
286
283
  comment: t
287
- }) : c(h["comments.index"], {
284
+ }) : o(p["comments.index"], {
288
285
  ...this.baseParams,
289
286
  template: e
290
287
  });
@@ -314,7 +311,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
314
311
  });
315
312
  }
316
313
  async resolveComment(e, t, n, r) {
317
- return this.request(c(h["comments.resolve"], {
314
+ return this.request(o(p["comments.resolve"], {
318
315
  ...this.baseParams,
319
316
  template: e,
320
317
  comment: t
@@ -325,22 +322,22 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
325
322
  });
326
323
  }
327
324
  async fetchConfig() {
328
- return this.request(c(h["projects.config"], this.baseParams));
325
+ return this.request(o(p["projects.config"], this.baseParams));
329
326
  }
330
327
  async listModules(e, t) {
331
- let n = c(h["savedModules.index"], this.baseParams), r = new URLSearchParams();
328
+ let n = o(p["savedModules.index"], this.baseParams), r = new URLSearchParams();
332
329
  e && r.set("search", e), t && r.set("category", t);
333
330
  let i = r.size > 0 ? `?${r}` : "";
334
331
  return this.request(`${n}${i}`);
335
332
  }
336
333
  async createModule(e) {
337
- return this.request(c(h["savedModules.store"], this.baseParams), {
334
+ return this.request(o(p["savedModules.store"], this.baseParams), {
338
335
  method: "POST",
339
336
  body: JSON.stringify(e)
340
337
  });
341
338
  }
342
339
  async updateModule(e, t) {
343
- return this.request(c(h["savedModules.update"], {
340
+ return this.request(o(p["savedModules.update"], {
344
341
  ...this.baseParams,
345
342
  savedModule: e
346
343
  }), {
@@ -349,12 +346,12 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
349
346
  });
350
347
  }
351
348
  async deleteModule(e) {
352
- return this.request(c(h["savedModules.destroy"], {
349
+ return this.request(o(p["savedModules.destroy"], {
353
350
  ...this.baseParams,
354
351
  savedModule: e
355
352
  }), { method: "DELETE" });
356
353
  }
357
- }, _ = class {
354
+ }, h = class {
358
355
  authManager;
359
356
  constructor(e) {
360
357
  this.authManager = e;
@@ -389,7 +386,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
389
386
  async browseMedia(e) {
390
387
  let t = new URLSearchParams();
391
388
  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" } });
389
+ let n = t.toString(), r = `${o(p["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
393
390
  if (!i.ok) {
394
391
  let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
395
392
  throw Error(e.message, { cause: e });
@@ -399,7 +396,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
399
396
  async uploadMedia(e, t) {
400
397
  let n = new FormData();
401
398
  n.append("file", e), t && n.append("folderId", t);
402
- let r = c(h["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
399
+ let r = o(p["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
403
400
  method: "POST",
404
401
  headers: { Accept: "application/json" },
405
402
  body: n
@@ -412,7 +409,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
412
409
  }
413
410
  async updateMedia(e, t, n) {
414
411
  let r = {};
415
- return t !== void 0 && (r.filename = t), n !== void 0 && (r.alt = n), this.request(c(h["media.update"], {
412
+ return t !== void 0 && (r.filename = t), n !== void 0 && (r.alt = n), this.request(o(p["media.update"], {
416
413
  ...this.baseParams,
417
414
  media: e
418
415
  }), {
@@ -421,13 +418,13 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
421
418
  });
422
419
  }
423
420
  async deleteMedia(e) {
424
- return this.request(c(h["media.delete"], this.baseParams), {
421
+ return this.request(o(p["media.delete"], this.baseParams), {
425
422
  method: "POST",
426
423
  body: JSON.stringify({ ids: e })
427
424
  });
428
425
  }
429
426
  async moveMedia(e, t) {
430
- return this.request(c(h["media.move"], this.baseParams), {
427
+ return this.request(o(p["media.move"], this.baseParams), {
431
428
  method: "POST",
432
429
  body: JSON.stringify({
433
430
  ids: e,
@@ -436,10 +433,10 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
436
433
  });
437
434
  }
438
435
  async getMediaFolders() {
439
- return this.request(c(h["folders.index"], this.baseParams));
436
+ return this.request(o(p["folders.index"], this.baseParams));
440
437
  }
441
438
  async createMediaFolder(e, t) {
442
- return this.request(c(h["folders.store"], this.baseParams), {
439
+ return this.request(o(p["folders.store"], this.baseParams), {
443
440
  method: "POST",
444
441
  body: JSON.stringify({
445
442
  name: e,
@@ -448,7 +445,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
448
445
  });
449
446
  }
450
447
  async renameMediaFolder(e, t) {
451
- return this.request(c(h["folders.update"], {
448
+ return this.request(o(p["folders.update"], {
452
449
  ...this.baseParams,
453
450
  mediaFolder: e
454
451
  }), {
@@ -457,13 +454,13 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
457
454
  });
458
455
  }
459
456
  async deleteMediaFolder(e) {
460
- return this.request(c(h["folders.destroy"], {
457
+ return this.request(o(p["folders.destroy"], {
461
458
  ...this.baseParams,
462
459
  mediaFolder: e
463
460
  }), { method: "DELETE" });
464
461
  }
465
462
  async checkMediaUsage(e) {
466
- let t = await this.authManager.authenticatedFetch(c(h["media.checkUsage"], this.baseParams), {
463
+ let t = await this.authManager.authenticatedFetch(o(p["media.checkUsage"], this.baseParams), {
467
464
  method: "POST",
468
465
  headers: {
469
466
  "Content-Type": "application/json",
@@ -478,10 +475,10 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
478
475
  return t.json();
479
476
  }
480
477
  async getFrequentlyUsed() {
481
- return this.request(c(h["media.frequentlyUsed"], this.baseParams));
478
+ return this.request(o(p["media.frequentlyUsed"], this.baseParams));
482
479
  }
483
480
  async importFromUrl(e, t) {
484
- return this.request(c(h["media.importFromUrl"], this.baseParams), {
481
+ return this.request(o(p["media.importFromUrl"], this.baseParams), {
485
482
  method: "POST",
486
483
  body: JSON.stringify({
487
484
  url: e,
@@ -492,7 +489,7 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
492
489
  async replaceMedia(e, t) {
493
490
  let n = new FormData();
494
491
  n.append("file", t);
495
- let r = c(h["media.replace"], {
492
+ let r = o(p["media.replace"], {
496
493
  ...this.baseParams,
497
494
  media: e
498
495
  }), i = await this.authManager.authenticatedFetch(r, {
@@ -507,16 +504,14 @@ var l = "/api/v1/projects/{project}/tenants/{tenant}", u = `${l}/templates/{temp
507
504
  return (await i.json()).data;
508
505
  }
509
506
  };
510
- //#endregion
511
- //#region ../core/src/cloud/websocket-client.ts
512
- function v(e) {
507
+ function g(e) {
513
508
  return {
514
509
  host: e.host,
515
510
  port: e.port,
516
511
  appKey: e.appKey
517
512
  };
518
513
  }
519
- var y = class {
514
+ var _ = class {
520
515
  pusher = null;
521
516
  authManager;
522
517
  config;
@@ -526,27 +521,27 @@ var y = class {
526
521
  }
527
522
  async connect() {
528
523
  if (this.pusher) return;
529
- let t;
524
+ let e;
530
525
  try {
531
- ({default: t} = await import("./pusher-C8DeiO2X.js").then((t) => /* @__PURE__ */ e(t.t(), 1)));
526
+ ({default: e} = await import("pusher-js"));
532
527
  } catch {
533
528
  throw Error("[Templatical] Cloud features require the optional peer dependency 'pusher-js'. Please install it.");
534
529
  }
535
- let { host: n, port: r, appKey: i } = this.config, a = this.authManager.resolveUrl(c(h["broadcasting.auth"], {
530
+ let { host: t, port: n, appKey: r } = this.config, i = this.authManager.resolveUrl(o(p["broadcasting.auth"], {
536
531
  project: this.authManager.projectId,
537
532
  tenant: this.authManager.tenantSlug
538
533
  }));
539
- this.pusher = new t(i, {
540
- wsHost: n,
541
- wsPort: r,
542
- wssPort: r,
534
+ this.pusher = new e(r, {
535
+ wsHost: t,
536
+ wsPort: n,
537
+ wssPort: n,
543
538
  forceTLS: !0,
544
539
  disableStats: !0,
545
540
  enabledTransports: ["ws", "wss"],
546
541
  cluster: "",
547
542
  channelAuthorization: {
548
543
  transport: "ajax",
549
- endpoint: a,
544
+ endpoint: i,
550
545
  headers: {
551
546
  Authorization: `Bearer ${this.authManager.accessTokenValue}`,
552
547
  Accept: "application/json"
@@ -580,70 +575,41 @@ var y = class {
580
575
  get isConnected() {
581
576
  return this.pusher?.connection.state === "connected";
582
577
  }
583
- };
584
- //#endregion
585
- //#region ../core/src/cloud/mcp-operation-handler.ts
586
- function b(e, t) {
587
- let { operation: n, data: r } = t;
588
- switch (n) {
589
- case "addBlock":
590
- e.addBlock(r.block, r.sectionId, r.columnIndex, r.index);
591
- break;
592
- case "updateBlock":
593
- e.updateBlock(r.blockId, r.updates);
594
- break;
595
- case "deleteBlock":
596
- e.removeBlock(r.blockId);
597
- break;
598
- case "moveBlock":
599
- e.moveBlock(r.blockId, r.index, r.sectionId, r.columnIndex);
600
- break;
601
- case "updateSettings":
602
- e.updateSettings(r.updates);
603
- break;
604
- case "setContent":
605
- e.setContent(r.content);
606
- break;
607
- case "updateBlockStyle": e.updateBlock(r.blockId, { styles: r.styles });
608
- }
609
- }
610
- //#endregion
611
- //#region ../core/src/cloud/ai-chat.ts
612
- var x = 0;
613
- function S() {
614
- return `msg_${Date.now()}_${++x}`;
578
+ }, v = 0;
579
+ function y() {
580
+ return `msg_${Date.now()}_${++v}`;
615
581
  }
616
- function C(e) {
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);
618
- function b(e, t) {
619
- let n = o.value.findIndex((t) => t.id === e);
582
+ function b(e) {
583
+ let { authManager: n, getTemplateId: r, onApply: i, onError: a } = e, s = t([]), c = t(!1), l = t(!1), u = t(null), d = t(null), f = t(null), m = t(null), h = t(null), g = t(null), _ = t(!1), v = t([]), b = t(!1);
584
+ function x(e, t) {
585
+ let n = s.value.findIndex((t) => t.id === e);
620
586
  if (n === -1) return;
621
587
  let r = {
622
- ...o.value[n],
588
+ ...s.value[n],
623
589
  ...t
624
590
  };
625
- o.value = [
626
- ...o.value.slice(0, n),
591
+ s.value = [
592
+ ...s.value.slice(0, n),
627
593
  r,
628
- ...o.value.slice(n + 1)
594
+ ...s.value.slice(n + 1)
629
595
  ];
630
596
  }
631
- async function x() {
597
+ async function S() {
632
598
  let e = r();
633
599
  if (e) {
634
600
  l.value = !0;
635
601
  try {
636
- let n = c(h["ai.conversationMessages"], {
637
- project: t.projectId,
638
- tenant: t.tenantSlug,
602
+ let t = o(p["ai.conversationMessages"], {
603
+ project: n.projectId,
604
+ tenant: n.tenantSlug,
639
605
  template: e
640
- }), r = await t.authenticatedFetch(n, {
606
+ }), r = await n.authenticatedFetch(t, {
641
607
  method: "GET",
642
608
  headers: { Accept: "application/json" }
643
609
  });
644
610
  if (!r.ok) return;
645
611
  let i = await r.json();
646
- i.conversationId && (f.value = i.conversationId), Array.isArray(i.data) && i.data.length > 0 && (o.value = i.data.map((e) => ({
612
+ i.conversationId && (f.value = i.conversationId), Array.isArray(i.data) && i.data.length > 0 && (s.value = i.data.map((e) => ({
647
613
  id: e.id,
648
614
  role: e.role,
649
615
  content: e.content,
@@ -654,16 +620,16 @@ function C(e) {
654
620
  }
655
621
  }
656
622
  }
657
- async function C(e, n) {
623
+ async function C(e, t) {
658
624
  let i = r();
659
625
  if (i) {
660
- y.value = !0;
626
+ b.value = !0;
661
627
  try {
662
- let r = c(h["ai.suggestions"], {
663
- project: t.projectId,
664
- tenant: t.tenantSlug,
628
+ let r = o(p["ai.suggestions"], {
629
+ project: n.projectId,
630
+ tenant: n.tenantSlug,
665
631
  template: i
666
- }), a = await t.authenticatedFetch(r, {
632
+ }), a = await n.authenticatedFetch(r, {
667
633
  method: "POST",
668
634
  headers: {
669
635
  "Content-Type": "application/json",
@@ -671,20 +637,20 @@ function C(e) {
671
637
  },
672
638
  body: JSON.stringify({
673
639
  currentContent: e,
674
- mergeTags: n.map((e) => ({
640
+ mergeTags: t.map((e) => ({
675
641
  label: e.label,
676
642
  value: e.value
677
643
  }))
678
644
  })
679
645
  });
680
646
  if (!a.ok) return;
681
- let o = a.body?.getReader();
682
- if (!o) return;
683
- let s = new TextDecoder(), l = "";
647
+ let s = a.body?.getReader();
648
+ if (!s) return;
649
+ let c = new TextDecoder(), l = "";
684
650
  for (;;) {
685
- let { done: e, value: t } = await o.read();
651
+ let { done: e, value: t } = await s.read();
686
652
  if (e) break;
687
- l += s.decode(t, { stream: !0 });
653
+ l += c.decode(t, { stream: !0 });
688
654
  let n = l.split("\n");
689
655
  l = n.pop() ?? "";
690
656
  for (let e of n) {
@@ -699,34 +665,34 @@ function C(e) {
699
665
  }
700
666
  }
701
667
  } catch {} finally {
702
- y.value = !1;
668
+ b.value = !1;
703
669
  }
704
670
  }
705
671
  }
706
- async function w(e, n, l) {
707
- let y = r();
708
- if (!y) throw Error("Template must be saved before using AI generation");
709
- s.value = !0, u.value = null, d.value = null, v.value = [];
710
- let x = S();
711
- o.value = [...o.value, {
712
- id: x,
672
+ async function w(e, t, l) {
673
+ let b = r();
674
+ if (!b) throw Error("Template must be saved before using AI generation");
675
+ c.value = !0, u.value = null, d.value = null, v.value = [];
676
+ let S = y();
677
+ s.value = [...s.value, {
678
+ id: S,
713
679
  role: "user",
714
680
  content: e,
715
681
  timestamp: Date.now()
716
682
  }];
717
- let C = S();
718
- o.value = [...o.value, {
683
+ let C = y();
684
+ s.value = [...s.value, {
719
685
  id: C,
720
686
  role: "assistant",
721
687
  content: "",
722
688
  timestamp: Date.now()
723
689
  }];
724
690
  try {
725
- let r = c(h["ai.generate"], {
726
- project: t.projectId,
727
- tenant: t.tenantSlug,
728
- template: y
729
- }), a = await t.authenticatedFetch(r, {
691
+ let r = o(p["ai.generate"], {
692
+ project: n.projectId,
693
+ tenant: n.tenantSlug,
694
+ template: b
695
+ }), a = await n.authenticatedFetch(r, {
730
696
  method: "POST",
731
697
  headers: {
732
698
  "Content-Type": "application/json",
@@ -734,7 +700,7 @@ function C(e) {
734
700
  },
735
701
  body: JSON.stringify({
736
702
  prompt: e,
737
- currentContent: n,
703
+ currentContent: t,
738
704
  mergeTags: l.map((e) => ({
739
705
  label: e.label,
740
706
  value: e.value
@@ -744,90 +710,86 @@ function C(e) {
744
710
  });
745
711
  if (!a.ok) {
746
712
  let e = await a.json().catch(() => null);
747
- throw Error(a.status === 403 ? "aiGenerationNotAvailable" : e?.message || "Failed to generate template");
713
+ throw a.status === 403 ? Error("aiGenerationNotAvailable") : Error(e?.message || "Failed to generate template");
748
714
  }
749
- let s = a.body?.getReader();
750
- if (!s) throw Error("Failed to read stream");
751
- let d = new TextDecoder(), v = "", x = null;
715
+ let c = a.body?.getReader();
716
+ if (!c) throw Error("Failed to read stream");
717
+ let d = new TextDecoder(), v = "", y = null;
752
718
  try {
753
719
  for (;;) {
754
- let { done: e, value: t } = await s.read();
720
+ let { done: e, value: n } = await c.read();
755
721
  if (e) break;
756
- v += d.decode(t, { stream: !0 });
722
+ v += d.decode(n, { stream: !0 });
757
723
  let r = v.split("\n");
758
724
  v = r.pop() ?? "";
759
725
  for (let e of r) {
760
726
  if (!e.startsWith("data: ")) continue;
761
- let t = e.slice(6), r;
727
+ let n = e.slice(6), r;
762
728
  try {
763
- r = JSON.parse(t);
729
+ r = JSON.parse(n);
764
730
  } catch {
765
731
  continue;
766
732
  }
767
- if (r.type === "text") b(C, { content: (o.value.find((e) => e.id === C)?.content ?? "") + r.text });
733
+ if (r.type === "text") x(C, { content: (s.value.find((e) => e.id === C)?.content ?? "") + r.text });
768
734
  else if (r.type === "error") throw Error(r.message || "Failed to generate template");
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");
735
+ else r.type === "done" && (r.conversationId && (f.value = r.conversationId), x(C, { content: r.text }), y = r.content ?? null, y ? (h.value = t, g.value = y, m.value = C, _.value = !1, i?.(y)) : u.value = "ai_apply_failed");
770
736
  }
771
737
  }
772
738
  } finally {
773
- s.cancel().catch(() => {});
739
+ c.cancel().catch(() => {});
774
740
  }
775
- return x;
741
+ return y;
776
742
  } catch (t) {
777
743
  let n = t instanceof Error ? t : Error("Failed to generate template", { cause: t });
778
- return u.value = n.message, d.value = e, a?.(n), o.value = o.value.filter((e) => e.id !== x && e.id !== C), null;
744
+ return u.value = n.message, d.value = e, a?.(n), s.value = s.value.filter((e) => e.id !== S && e.id !== C), null;
779
745
  } finally {
780
- s.value = !1;
746
+ c.value = !1;
781
747
  }
782
748
  }
783
749
  function T() {
784
- _.value ? (g.value && i?.(g.value), _.value = !1) : (m.value && i?.(m.value), _.value = !0);
750
+ _.value ? (g.value && i?.(g.value), _.value = !1) : (h.value && i?.(h.value), _.value = !0);
785
751
  }
786
752
  function E() {
787
- o.value = [], f.value = null, u.value = null, p.value = null, m.value = null, g.value = null, _.value = !1;
753
+ s.value = [], f.value = null, u.value = null, m.value = null, h.value = null, g.value = null, _.value = !1;
788
754
  }
789
755
  return {
790
- messages: o,
791
- isGenerating: s,
756
+ messages: s,
757
+ isGenerating: c,
792
758
  isLoadingHistory: l,
793
759
  isLastChangeReverted: _,
794
- lastApplyMessageId: p,
760
+ lastApplyMessageId: m,
795
761
  error: u,
796
762
  failedPrompt: d,
797
763
  suggestions: v,
798
- isLoadingSuggestions: y,
764
+ isLoadingSuggestions: b,
799
765
  sendPrompt: w,
800
766
  toggleLastRevert: T,
801
- loadConversation: x,
767
+ loadConversation: S,
802
768
  loadSuggestions: C,
803
769
  clearChat: E
804
770
  };
805
771
  }
806
- //#endregion
807
- //#region ../core/src/cloud/ai-config.ts
808
- function w(e) {
772
+ function x(e) {
809
773
  function t(t) {
810
774
  return e !== !1 && e?.[t] !== !1;
811
775
  }
812
776
  return {
813
777
  isFeatureEnabled: t,
814
- hasAnyMenuFeature: i(() => t("chat") || t("scoring") || t("designToTemplate"))
778
+ hasAnyMenuFeature: n(() => t("chat") || t("scoring") || t("designToTemplate"))
815
779
  };
816
780
  }
817
- //#endregion
818
- //#region ../core/src/cloud/template-scoring.ts
819
- function T(e) {
820
- let { authManager: t, getTemplateId: r } = e, i = n(!1), a = n(null), o = n(null), s = n(null), l = n(""), u = n(null);
821
- async function d(e, n) {
822
- let s = r();
823
- if (!s) return null;
824
- i.value = !0, o.value = null, a.value = null;
781
+ function S(e) {
782
+ let { authManager: n, getTemplateId: r } = e, i = t(!1), a = t(null), s = t(null), c = t(null), l = t(""), u = t(null);
783
+ async function d(e, t) {
784
+ let c = r();
785
+ if (!c) return null;
786
+ i.value = !0, s.value = null, a.value = null;
825
787
  try {
826
- let r = c(h["ai.score"], {
827
- project: t.projectId,
828
- tenant: t.tenantSlug,
829
- template: s
830
- }), i = await t.authenticatedFetch(r, {
788
+ let r = o(p["ai.score"], {
789
+ project: n.projectId,
790
+ tenant: n.tenantSlug,
791
+ template: c
792
+ }), i = await n.authenticatedFetch(r, {
831
793
  method: "POST",
832
794
  headers: {
833
795
  "Content-Type": "application/json",
@@ -835,7 +797,7 @@ function T(e) {
835
797
  },
836
798
  body: JSON.stringify({
837
799
  currentContent: e,
838
- mergeTags: n.map((e) => ({
800
+ mergeTags: t.map((e) => ({
839
801
  label: e.label,
840
802
  value: e.value
841
803
  }))
@@ -846,11 +808,11 @@ function T(e) {
846
808
  let e = await i.json().catch(() => null);
847
809
  throw Error(e?.message || "Failed to score template");
848
810
  }
849
- let o = i.body?.getReader();
850
- if (!o) throw Error("Failed to read stream");
811
+ let s = i.body?.getReader();
812
+ if (!s) throw Error("Failed to read stream");
851
813
  let l = new TextDecoder(), u = "", d = null;
852
814
  for (;;) {
853
- let { done: e, value: t } = await o.read();
815
+ let { done: e, value: t } = await s.read();
854
816
  if (e) break;
855
817
  u += l.decode(t, { stream: !0 });
856
818
  let n = u.split("\n");
@@ -870,21 +832,21 @@ function T(e) {
870
832
  if (d) for (let [e, t] of Object.entries(d.categories)) for (let n of t.findings) n.category = e;
871
833
  return a.value = d, d;
872
834
  } catch (e) {
873
- return o.value = e instanceof Error ? e.message : "Failed to score template", null;
835
+ return s.value = e instanceof Error ? e.message : "Failed to score template", null;
874
836
  } finally {
875
837
  i.value = !1;
876
838
  }
877
839
  }
878
- async function f(e, n, i) {
840
+ async function f(e, t, i) {
879
841
  let a = r();
880
842
  if (!a) return null;
881
- s.value = n.id, l.value = "", u.value = null;
843
+ c.value = t.id, l.value = "", u.value = null;
882
844
  try {
883
- let r = c(h["ai.fixFinding"], {
884
- project: t.projectId,
885
- tenant: t.tenantSlug,
845
+ let r = o(p["ai.fixFinding"], {
846
+ project: n.projectId,
847
+ tenant: n.tenantSlug,
886
848
  template: a
887
- }), o = await t.authenticatedFetch(r, {
849
+ }), s = await n.authenticatedFetch(r, {
888
850
  method: "POST",
889
851
  headers: {
890
852
  "Content-Type": "application/json",
@@ -893,10 +855,10 @@ function T(e) {
893
855
  body: JSON.stringify({
894
856
  content: e,
895
857
  finding: {
896
- id: n.id,
897
- message: n.message,
898
- suggestion: n.suggestion,
899
- category: n.category
858
+ id: t.id,
859
+ message: t.message,
860
+ suggestion: t.suggestion,
861
+ category: t.category
900
862
  },
901
863
  mergeTags: i.map((e) => ({
902
864
  label: e.label,
@@ -904,16 +866,16 @@ function T(e) {
904
866
  }))
905
867
  })
906
868
  });
907
- if (!o.ok) {
908
- if (o.status === 403) throw Error("aiGenerationNotAvailable");
909
- let e = await o.json().catch(() => null);
869
+ if (!s.ok) {
870
+ if (s.status === 403) throw Error("aiGenerationNotAvailable");
871
+ let e = await s.json().catch(() => null);
910
872
  throw Error(e?.message || "Failed to fix finding");
911
873
  }
912
- let s = o.body?.getReader();
913
- if (!s) throw Error("Failed to read stream");
874
+ let c = s.body?.getReader();
875
+ if (!c) throw Error("Failed to read stream");
914
876
  let u = new TextDecoder(), d = "", f = null;
915
877
  for (;;) {
916
- let { done: e, value: t } = await s.read();
878
+ let { done: e, value: t } = await c.read();
917
879
  if (e) break;
918
880
  d += u.decode(t, { stream: !0 });
919
881
  let n = d.split("\n");
@@ -935,59 +897,57 @@ function T(e) {
935
897
  } catch (e) {
936
898
  return u.value = e instanceof Error ? e.message : "Failed to fix finding", null;
937
899
  } finally {
938
- s.value = null;
900
+ c.value = null;
939
901
  }
940
902
  }
941
- function p(e, t) {
903
+ function m(e, t) {
942
904
  if (!a.value) return;
943
905
  let n = a.value.categories[e];
944
906
  n && (n.findings = n.findings.filter((e) => e.id !== t));
945
907
  }
946
- function m() {
947
- i.value = !1, a.value = null, o.value = null, s.value = null, l.value = "", u.value = null;
908
+ function h() {
909
+ i.value = !1, a.value = null, s.value = null, c.value = null, l.value = "", u.value = null;
948
910
  }
949
911
  return {
950
912
  isScoring: i,
951
913
  scoringResult: a,
952
- error: o,
953
- fixingFindingId: s,
914
+ error: s,
915
+ fixingFindingId: c,
954
916
  fixStreamingText: l,
955
917
  fixError: u,
956
918
  score: d,
957
919
  fixFinding: f,
958
- removeFinding: p,
959
- reset: m
920
+ removeFinding: m,
921
+ reset: h
960
922
  };
961
923
  }
962
- //#endregion
963
- //#region ../core/src/cloud/design-reference.ts
964
- function E(e) {
965
- let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n(!1), s = n(null);
924
+ function C(e) {
925
+ let { authManager: n, getTemplateId: r, onApply: i, onError: a } = e, s = t(!1), c = t(null);
966
926
  async function l(e) {
967
- let n = r();
968
- if (!n) throw Error("Template must be saved before using design reference");
969
- o.value = !0, s.value = null;
927
+ let t = r();
928
+ if (!t) throw Error("Template must be saved before using design reference");
929
+ s.value = !0, c.value = null;
970
930
  try {
971
931
  let r = new FormData();
972
932
  e.prompt && r.append("prompt", e.prompt), e.imageUpload && r.append("image_upload", e.imageUpload), e.pdfUpload && r.append("pdf_upload", e.pdfUpload);
973
- let a = c(h["ai.generateFromDesign"], {
974
- project: t.projectId,
975
- tenant: t.tenantSlug,
976
- template: n
977
- }), o = await t.authenticatedFetch(a, {
933
+ let a = o(p["ai.generateFromDesign"], {
934
+ project: n.projectId,
935
+ tenant: n.tenantSlug,
936
+ template: t
937
+ }), s = await n.authenticatedFetch(a, {
978
938
  method: "POST",
979
939
  headers: { Accept: "text/event-stream" },
980
940
  body: r
981
941
  });
982
- if (!o.ok) {
983
- let e = await o.json().catch(() => null);
984
- throw Error(o.status === 403 ? "aiGenerationNotAvailable" : e?.message || "Failed to generate template from design");
942
+ if (!s.ok) {
943
+ let e = await s.json().catch(() => null);
944
+ throw s.status === 403 ? Error("aiGenerationNotAvailable") : Error(e?.message || "Failed to generate template from design");
985
945
  }
986
- let s = o.body?.getReader();
987
- if (!s) throw Error("Failed to read stream");
946
+ let c = s.body?.getReader();
947
+ if (!c) throw Error("Failed to read stream");
988
948
  let l = new TextDecoder(), u = "", d = null;
989
949
  for (;;) {
990
- let { done: e, value: t } = await s.read();
950
+ let { done: e, value: t } = await c.read();
991
951
  if (e) break;
992
952
  u += l.decode(t, { stream: !0 });
993
953
  let n = u.split("\n");
@@ -1007,25 +967,23 @@ function E(e) {
1007
967
  return d;
1008
968
  } catch (e) {
1009
969
  let t = e instanceof Error ? e : Error("Failed to generate template from design", { cause: e });
1010
- return s.value = t.message, a?.(t), null;
970
+ return c.value = t.message, a?.(t), null;
1011
971
  } finally {
1012
- o.value = !1;
972
+ s.value = !1;
1013
973
  }
1014
974
  }
1015
975
  function u() {
1016
- o.value = !1, s.value = null;
976
+ s.value = !1, c.value = null;
1017
977
  }
1018
978
  return {
1019
- isGenerating: o,
1020
- error: s,
979
+ isGenerating: s,
980
+ error: c,
1021
981
  generate: l,
1022
982
  reset: u
1023
983
  };
1024
984
  }
1025
- //#endregion
1026
- //#region ../core/src/cloud/comments-provider.ts
1027
- var D = "comment-broadcast";
1028
- function O(e) {
985
+ var w = "comment-broadcast";
986
+ function T(e) {
1029
987
  let t = {
1030
988
  id: e.id,
1031
989
  body: e.body,
@@ -1035,10 +993,10 @@ function O(e) {
1035
993
  parentId: e.parentId,
1036
994
  resolvedAt: e.resolvedAt
1037
995
  };
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;
996
+ return e.updatedAt !== e.createdAt && (t.updatedAt = e.updatedAt), e.resolvedBy && (t.resolvedBy = e.resolvedBy), e.replies?.length && (t.replies = e.replies.map(T)), t;
1039
997
  }
1040
- function k(e) {
1041
- let { authManager: n, channel: r, getSocketId: i } = e, a = new g(n);
998
+ function E(t) {
999
+ let { authManager: n, channel: r, getSocketId: i } = t, a = new m(n);
1042
1000
  function o() {
1043
1001
  let e = n.userConfig;
1044
1002
  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.");
@@ -1054,10 +1012,10 @@ function k(e) {
1054
1012
  }
1055
1013
  return {
1056
1014
  async list(e) {
1057
- return (await a.getComments(e)).map(O);
1015
+ return (await a.getComments(e)).map(T);
1058
1016
  },
1059
1017
  async create(e, t) {
1060
- return O(await a.createComment(e, {
1018
+ return T(await a.createComment(e, {
1061
1019
  body: t.body,
1062
1020
  blockId: t.blockId,
1063
1021
  parentId: t.parentId,
@@ -1066,7 +1024,7 @@ function k(e) {
1066
1024
  },
1067
1025
  async update(e, t, n) {
1068
1026
  if (n.body === void 0) throw Error("[Templatical] Cloud comments: update() needs a `body` in the patch.");
1069
- return O(await a.updateComment(e, t, {
1027
+ return T(await a.updateComment(e, t, {
1070
1028
  body: n.body,
1071
1029
  ...o()
1072
1030
  }, s()));
@@ -1075,11 +1033,11 @@ function k(e) {
1075
1033
  await a.deleteComment(e, t, o(), s());
1076
1034
  },
1077
1035
  async setResolved(e, t, n) {
1078
- return O(await a.resolveComment(e, t, o(), s()));
1036
+ return T(await a.resolveComment(e, t, o(), s()));
1079
1037
  },
1080
- subscribe(e, n) {
1038
+ subscribe(t, n) {
1081
1039
  function i(e) {
1082
- let t = O(e.comment);
1040
+ let t = T(e.comment);
1083
1041
  switch (e.action) {
1084
1042
  case "commentCreated":
1085
1043
  n({
@@ -1102,209 +1060,22 @@ function k(e) {
1102
1060
  });
1103
1061
  }
1104
1062
  }
1105
- let a = t(r, (e, t) => {
1106
- t?.unbind(D, i), e?.bind(D, i);
1063
+ let a = e(r, (e, t) => {
1064
+ t?.unbind(w, i), e?.bind(w, i);
1107
1065
  }, { immediate: !0 });
1108
1066
  return () => {
1109
- a(), r.value?.unbind(D, i);
1067
+ a(), r.value?.unbind(w, i);
1110
1068
  };
1111
1069
  }
1112
1070
  };
1113
1071
  }
1114
- //#endregion
1115
- //#region ../core/src/cloud/collaboration.ts
1116
- var A = [
1117
- "pusher:member_added",
1118
- "pusher:member_removed",
1119
- "client-blockLocked",
1120
- "client-blockUnlocked",
1121
- "client-operation",
1122
- "mcp-operation"
1123
- ];
1124
- function j(e) {
1125
- for (let t of A) e.unbind(t);
1126
- }
1127
- var M = [
1128
- "#3b82f6",
1129
- "#ef4444",
1130
- "#10b981",
1131
- "#f59e0b",
1132
- "#8b5cf6",
1133
- "#ec4899",
1134
- "#06b6d4",
1135
- "#f97316",
1136
- "#6366f1",
1137
- "#14b8a6"
1138
- ];
1139
- function N(e) {
1140
- let { authManager: a, editor: o, channel: s } = e, c = n([]), l = n(/* @__PURE__ */ new Map()), u = 0, d = !1, f = i(() => a.userConfig?.id ?? "");
1141
- function p() {
1142
- let e = M[u % M.length];
1143
- return u++, e;
1144
- }
1145
- function m(e) {
1146
- if (e.id === f.value || c.value.some((t) => t.id === e.id)) return;
1147
- let t = {
1148
- id: e.id,
1149
- name: e.name,
1150
- color: p(),
1151
- selectedBlockId: null
1152
- };
1153
- return c.value = [...c.value, t], t;
1154
- }
1155
- function h(e) {
1156
- let t = new Map(l.value);
1157
- for (let [n, r] of t) r.id === e && t.delete(n);
1158
- l.value = t, c.value = c.value.filter((t) => t.id !== e);
1159
- }
1160
- function g(e) {
1161
- let t = c.value.find((t) => t.id === e.userId);
1162
- if (!t) return;
1163
- c.value = c.value.map((t) => t.id === e.userId ? {
1164
- ...t,
1165
- selectedBlockId: e.blockId
1166
- } : t);
1167
- let n = new Map(l.value);
1168
- for (let [t, r] of n) r.id === e.userId && n.delete(t);
1169
- n.set(e.blockId, {
1170
- ...t,
1171
- selectedBlockId: e.blockId
1172
- }), l.value = n, o.state.selectedBlockId === e.blockId && o.selectBlock(null);
1173
- }
1174
- function _(e) {
1175
- let t = new Map(l.value), n = t.get(e.blockId);
1176
- t.delete(e.blockId), l.value = t, n && (c.value = c.value.map((e) => e.id === n.id ? {
1177
- ...e,
1178
- selectedBlockId: null
1179
- } : e));
1180
- }
1181
- function v(e) {
1182
- d = !0;
1183
- try {
1184
- b(o, e);
1185
- } finally {
1186
- d = !1;
1187
- }
1188
- }
1189
- function y(e) {
1190
- s.value && !d && s.value.trigger("client-operation", e);
1191
- }
1192
- function x(e) {
1193
- s.value && s.value.trigger("client-blockLocked", {
1194
- blockId: e,
1195
- userId: f.value
1196
- });
1197
- }
1198
- function S(e) {
1199
- s.value && s.value.trigger("client-blockUnlocked", { blockId: e });
1200
- }
1201
- return t(() => o.state.selectedBlockId, (e, t) => {
1202
- d || (t && S(t), e && x(e));
1203
- }), t(s, (t, n) => {
1204
- if (n && j(n), !t) {
1205
- c.value = [], l.value = /* @__PURE__ */ new Map(), u = 0;
1206
- return;
1207
- }
1208
- let r = t.members;
1209
- r && r.each((e) => {
1210
- m(e.info);
1211
- }), t.bind("pusher:member_added", (t) => {
1212
- let n = m(t.info);
1213
- n && e.onCollaboratorJoined?.(n);
1214
- }), t.bind("pusher:member_removed", (t) => {
1215
- let n = c.value.find((e) => e.id === t.id);
1216
- h(t.id), n && e.onCollaboratorLeft?.(n);
1217
- }), t.bind("client-blockLocked", (t) => {
1218
- g(t);
1219
- let n = c.value.find((e) => e.id === t.userId);
1220
- n && e.onBlockLocked?.({
1221
- blockId: t.blockId,
1222
- collaborator: n
1223
- });
1224
- }), t.bind("client-blockUnlocked", (t) => {
1225
- let n = l.value.get(t.blockId);
1226
- _(t), n && e.onBlockUnlocked?.({
1227
- blockId: t.blockId,
1228
- collaborator: n
1229
- });
1230
- }), t.bind("client-operation", (e) => {
1231
- v(e);
1232
- }), t.bind("mcp-operation", (e) => {
1233
- v(e);
1234
- });
1235
- }), r(() => {
1236
- s.value && j(s.value);
1237
- }), {
1238
- collaborators: c,
1239
- lockedBlocks: l,
1240
- _broadcastOperation: y,
1241
- _isProcessingRemoteOperation: () => d
1242
- };
1243
- }
1244
- //#endregion
1245
- //#region ../core/src/cloud/collaboration-broadcast.ts
1246
- function P(e, t) {
1247
- let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
1248
- e.addBlock = (e, r, i, a) => {
1249
- n(e, r, i, a), t._broadcastOperation({
1250
- operation: "addBlock",
1251
- data: {
1252
- block: e,
1253
- sectionId: r,
1254
- columnIndex: i,
1255
- index: a
1256
- },
1257
- timestamp: Date.now()
1258
- });
1259
- }, e.updateBlock = (e, n) => {
1260
- r(e, n), t._broadcastOperation({
1261
- operation: "updateBlock",
1262
- data: {
1263
- blockId: e,
1264
- updates: n
1265
- },
1266
- timestamp: Date.now()
1267
- });
1268
- }, e.removeBlock = (e) => {
1269
- i(e), t._broadcastOperation({
1270
- operation: "deleteBlock",
1271
- data: { blockId: e },
1272
- timestamp: Date.now()
1273
- });
1274
- }, e.moveBlock = (e, n, r, i) => {
1275
- a(e, n, r, i), t._broadcastOperation({
1276
- operation: "moveBlock",
1277
- data: {
1278
- blockId: e,
1279
- index: n,
1280
- sectionId: r,
1281
- columnIndex: i
1282
- },
1283
- timestamp: Date.now()
1284
- });
1285
- }, e.updateSettings = (e) => {
1286
- o(e), t._broadcastOperation({
1287
- operation: "updateSettings",
1288
- data: { updates: e },
1289
- timestamp: Date.now()
1290
- });
1291
- }, e.setContent = (e, n) => {
1292
- s(e, n), t._broadcastOperation({
1293
- operation: "setContent",
1294
- data: { content: e },
1295
- timestamp: Date.now()
1296
- });
1297
- };
1298
- }
1299
- //#endregion
1300
- //#region ../core/src/cloud/web-socket.ts
1301
- function F(e) {
1302
- let { authManager: t, onError: r } = e, i = n(null), a = n(!1), o = null, s = null;
1303
- async function c(e, n) {
1072
+ function D(e) {
1073
+ let { authManager: n, onError: r } = e, i = t(null), a = t(!1), o = null, s = null;
1074
+ async function c(e, t) {
1304
1075
  if (o) return;
1305
- o = new y({
1306
- authManager: t,
1307
- config: n,
1076
+ o = new _({
1077
+ authManager: n,
1078
+ config: t,
1308
1079
  onError: r
1309
1080
  }), await o.connect(), s = `presence-template.${e}`;
1310
1081
  let c = o.subscribePresence(s);
@@ -1328,10 +1099,8 @@ function F(e) {
1328
1099
  getSocketId: u
1329
1100
  };
1330
1101
  }
1331
- //#endregion
1332
- //#region ../core/src/cloud/saved-blocks-provider.ts
1333
- function I(e) {
1334
- let t = new g(e);
1102
+ function O(e) {
1103
+ let t = new m(e);
1335
1104
  return {
1336
1105
  list(e) {
1337
1106
  return t.listModules(e?.search, e?.category);
@@ -1347,9 +1116,7 @@ function I(e) {
1347
1116
  }
1348
1117
  };
1349
1118
  }
1350
- //#endregion
1351
- //#region ../core/src/cloud/media-provider.ts
1352
- function L(e) {
1119
+ function k(e) {
1353
1120
  let t = {
1354
1121
  id: e.id,
1355
1122
  url: e.url,
@@ -1363,27 +1130,27 @@ function L(e) {
1363
1130
  };
1364
1131
  return e.width != null && (t.width = e.width), e.height != null && (t.height = e.height), e.thumbnailUrl != null && (t.thumbnailUrl = e.thumbnailUrl), t;
1365
1132
  }
1366
- function R(e, t = null) {
1133
+ function A(e, t = null) {
1367
1134
  return {
1368
1135
  id: e.id,
1369
1136
  name: e.name,
1370
1137
  parentId: e.parentId === void 0 ? t : e.parentId
1371
1138
  };
1372
1139
  }
1373
- function z(e, t = null) {
1140
+ function j(e, t = null) {
1374
1141
  let n = [];
1375
- for (let r of e) n.push(R(r, t)), r.children?.length && n.push(...z(r.children, r.id));
1142
+ for (let r of e) n.push(A(r, t)), r.children?.length && n.push(...j(r.children, r.id));
1376
1143
  return n;
1377
1144
  }
1378
- function B(e) {
1145
+ function M(e) {
1379
1146
  let t = e?.media?.categories;
1380
1147
  if (!t) return;
1381
1148
  let n = {};
1382
1149
  for (let [e, r] of Object.entries(t)) n[e] = r.mimeTypes;
1383
1150
  return n;
1384
1151
  }
1385
- function V(e, t) {
1386
- let n = new _(e);
1152
+ function N(e, t) {
1153
+ let n = new h(e);
1387
1154
  return {
1388
1155
  async list(e) {
1389
1156
  let t = await n.browseMedia({
@@ -1391,40 +1158,40 @@ function V(e, t) {
1391
1158
  cursor: e?.cursor,
1392
1159
  folderId: e?.folderId,
1393
1160
  category: e?.category
1394
- }), r = { items: t.data.map(L) };
1161
+ }), r = { items: t.data.map(k) };
1395
1162
  return t.meta.nextCursor && (r.nextCursor = t.meta.nextCursor), r;
1396
1163
  },
1397
1164
  async create(e) {
1398
- return L(await n.uploadMedia(e.file, e.folderId));
1165
+ return k(await n.uploadMedia(e.file, e.folderId));
1399
1166
  },
1400
1167
  async update(e, t) {
1401
- return L(await n.updateMedia(e, t.filename, t.alt));
1168
+ return k(await n.updateMedia(e, t.filename, t.alt));
1402
1169
  },
1403
1170
  delete(e) {
1404
1171
  return n.deleteMedia(e);
1405
1172
  },
1406
1173
  folders: {
1407
1174
  async list() {
1408
- return z(await n.getMediaFolders());
1175
+ return j(await n.getMediaFolders());
1409
1176
  },
1410
1177
  async create(e) {
1411
- return R(await n.createMediaFolder(e.name, e.parentId));
1178
+ return A(await n.createMediaFolder(e.name, e.parentId));
1412
1179
  },
1413
1180
  async update(e, t) {
1414
- return R(await n.renameMediaFolder(e, t.name));
1181
+ return A(await n.renameMediaFolder(e, t.name));
1415
1182
  },
1416
1183
  delete(e) {
1417
1184
  return n.deleteMediaFolder(e);
1418
1185
  },
1419
1186
  async move(e, t) {
1420
- return (await n.moveMedia(e, t)).map(L);
1187
+ return (await n.moveMedia(e, t)).map(k);
1421
1188
  }
1422
1189
  },
1423
1190
  async replace(e, t) {
1424
- return L(await n.replaceMedia(e, t));
1191
+ return k(await n.replaceMedia(e, t));
1425
1192
  },
1426
1193
  async importFromUrl(e, t) {
1427
- return L(await n.importFromUrl(e, t));
1194
+ return k(await n.importFromUrl(e, t));
1428
1195
  },
1429
1196
  async checkUsage(e) {
1430
1197
  let t = await n.checkMediaUsage(e), r = {};
@@ -1435,7 +1202,7 @@ function V(e, t) {
1435
1202
  return r;
1436
1203
  },
1437
1204
  async frequentlyUsed() {
1438
- return (await n.getFrequentlyUsed()).map(L);
1205
+ return (await n.getFrequentlyUsed()).map(k);
1439
1206
  },
1440
1207
  async storage() {
1441
1208
  return t?.()?.storage ?? null;
@@ -1444,18 +1211,16 @@ function V(e, t) {
1444
1211
  return t?.()?.media?.maxFileSize;
1445
1212
  },
1446
1213
  get mimeTypes() {
1447
- return B(t?.() ?? null);
1214
+ return M(t?.() ?? null);
1448
1215
  }
1449
1216
  };
1450
1217
  }
1451
- //#endregion
1452
- //#region ../core/src/cloud/templates-provider.ts
1453
- var H = 6e4;
1454
- function U(e) {
1455
- let t = new g(e), n = 0;
1218
+ var P = 6e4;
1219
+ function F(e) {
1220
+ let t = new m(e), n = 0;
1456
1221
  function r(e, r) {
1457
1222
  let i = Date.now();
1458
- i - n < H || (n = i, t.createVersion(e, r).catch((e) => {
1223
+ i - n < P || (n = i, t.createVersion(e, r).catch((e) => {
1459
1224
  console.warn("[Templatical] Automatic version not recorded — the save itself succeeded:", e);
1460
1225
  }));
1461
1226
  }
@@ -1472,16 +1237,14 @@ function U(e) {
1472
1237
  }
1473
1238
  };
1474
1239
  }
1475
- //#endregion
1476
- //#region ../core/src/cloud/export.ts
1477
- function W(e) {
1240
+ function I(e) {
1478
1241
  return {
1479
1242
  customFonts: e?.customFonts ?? [],
1480
1243
  defaultFallback: e?.defaultFallback ?? "Arial, sans-serif"
1481
1244
  };
1482
1245
  }
1483
- function G(e) {
1484
- let t = new g(e.authManager);
1246
+ function L(e) {
1247
+ let t = new m(e.authManager);
1485
1248
  async function n(e, n) {
1486
1249
  let r = await t.exportTemplate(e, n);
1487
1250
  return {
@@ -1497,10 +1260,8 @@ function G(e) {
1497
1260
  getMjmlSource: r
1498
1261
  };
1499
1262
  }
1500
- //#endregion
1501
- //#region ../core/src/cloud/render-provider.ts
1502
- function K(e) {
1503
- let t = G({ authManager: e.authManager });
1263
+ function R(e) {
1264
+ let t = L({ authManager: e.authManager });
1504
1265
  function n(e) {
1505
1266
  return {
1506
1267
  customFonts: e.fonts?.customFonts ?? [],
@@ -1522,9 +1283,7 @@ function K(e) {
1522
1283
  }
1523
1284
  };
1524
1285
  }
1525
- //#endregion
1526
- //#region ../core/src/cloud/version-history-provider.ts
1527
- function q(e) {
1286
+ function z(e) {
1528
1287
  return {
1529
1288
  id: e.id,
1530
1289
  createdAt: e.createdAt,
@@ -1532,31 +1291,29 @@ function q(e) {
1532
1291
  content: e.content
1533
1292
  };
1534
1293
  }
1535
- function J(e) {
1536
- let t = new g(e);
1294
+ function B(e) {
1295
+ let t = new m(e);
1537
1296
  return {
1538
1297
  async list(e) {
1539
- return { versions: (await t.getVersions(e)).map(q) };
1298
+ return { versions: (await t.getVersions(e)).map(z) };
1540
1299
  },
1541
1300
  async get(e, n) {
1542
1301
  return (await t.getVersion(e, n)).content;
1543
1302
  },
1544
1303
  async create(e, n, r) {
1545
- return q(await t.createVersion(e, n, r?.label));
1304
+ return z(await t.createVersion(e, n, r?.label));
1546
1305
  },
1547
1306
  restore(e, n) {
1548
1307
  return t.restoreVersion(e, n);
1549
1308
  }
1550
1309
  };
1551
1310
  }
1552
- //#endregion
1553
- //#region ../core/src/cloud/test-email.ts
1554
- function Y(e) {
1555
- let { authManager: r, isAuthReady: a } = e, o = n(null);
1556
- a && t(a, (e) => {
1557
- e && (o.value = r.testEmailConfig);
1311
+ function V(r) {
1312
+ let { authManager: i, isAuthReady: a } = r, o = t(null);
1313
+ a && e(a, (e) => {
1314
+ e && (o.value = i.testEmailConfig);
1558
1315
  }, { immediate: !0 });
1559
- let s = i(() => o.value !== null), c = i(() => o.value?.allowedEmails ?? []);
1316
+ let s = n(() => o.value !== null), c = n(() => o.value?.allowedEmails ?? []);
1560
1317
  function l() {
1561
1318
  return o.value?.signature ?? null;
1562
1319
  }
@@ -1566,10 +1323,8 @@ function Y(e) {
1566
1323
  getSignature: l
1567
1324
  };
1568
1325
  }
1569
- //#endregion
1570
- //#region ../core/src/cloud/test-email-provider.ts
1571
- function X(e) {
1572
- let t = new g(e.authManager);
1326
+ function H(e) {
1327
+ let t = new m(e.authManager);
1573
1328
  return {
1574
1329
  get allowedRecipients() {
1575
1330
  return e.allowedEmails.value;
@@ -1590,10 +1345,8 @@ function X(e) {
1590
1345
  }
1591
1346
  };
1592
1347
  }
1593
- //#endregion
1594
- //#region ../core/src/cloud/plan-config.ts
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);
1348
+ function U(e) {
1349
+ let { authManager: r, onError: i } = e, a = t(null), o = t(!1), s = new m(r), c = n(() => a.value?.features ?? null);
1597
1350
  function l(e) {
1598
1351
  return a.value?.features[e] ?? !1;
1599
1352
  }
@@ -1603,7 +1356,7 @@ function Z(e) {
1603
1356
  try {
1604
1357
  a.value = await s.fetchConfig();
1605
1358
  } catch (e) {
1606
- r?.(e instanceof Error ? e : Error("Failed to fetch config", { cause: e }));
1359
+ i?.(e instanceof Error ? e : Error("Failed to fetch config", { cause: e }));
1607
1360
  } finally {
1608
1361
  o.value = !1;
1609
1362
  }
@@ -1617,16 +1370,14 @@ function Z(e) {
1617
1370
  fetchConfig: u
1618
1371
  };
1619
1372
  }
1620
- //#endregion
1621
- //#region ../core/src/cloud/health-check.ts
1622
- var Q = 5e3;
1623
- function $(e) {
1624
- return e.authManager ? e.authManager.resolveUrl(h.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${h.health}`;
1373
+ var W = 5e3;
1374
+ function G(e) {
1375
+ return e.authManager ? e.authManager.resolveUrl(p.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${p.health}`;
1625
1376
  }
1626
- async function ee(e, t) {
1377
+ async function K(e, t) {
1627
1378
  let n = performance.now();
1628
1379
  try {
1629
- let r = t ? await t.authenticatedFetch(h.health, {
1380
+ let r = t ? await t.authenticatedFetch(p.health, {
1630
1381
  method: "GET",
1631
1382
  headers: { Accept: "application/json" }
1632
1383
  }) : await fetch(e, {
@@ -1675,7 +1426,7 @@ async function ee(e, t) {
1675
1426
  };
1676
1427
  }
1677
1428
  }
1678
- async function te(e) {
1429
+ async function q(e) {
1679
1430
  if (!e?.host || !e?.appKey) return {
1680
1431
  ok: !1,
1681
1432
  error: "WebSocket configuration not available"
@@ -1691,7 +1442,7 @@ async function te(e) {
1691
1442
  ok: !1,
1692
1443
  error: "WebSocket connection timed out"
1693
1444
  });
1694
- }, Q);
1445
+ }, W);
1695
1446
  try {
1696
1447
  n = new WebSocket(t);
1697
1448
  } catch (t) {
@@ -1711,8 +1462,8 @@ async function te(e) {
1711
1462
  };
1712
1463
  });
1713
1464
  }
1714
- async function ne(e = {}) {
1715
- let t = await ee($(e), e.authManager), n = await te(t.wsConfig);
1465
+ async function J(e = {}) {
1466
+ let t = await K(G(e), e.authManager), n = await q(t.wsConfig);
1716
1467
  return {
1717
1468
  api: t.api,
1718
1469
  websocket: n,
@@ -1721,16 +1472,4 @@ async function ne(e = {}) {
1721
1472
  };
1722
1473
  }
1723
1474
  //#endregion
1724
- //#region ../core/src/cloud/mcp-listener.ts
1725
- function re(e) {
1726
- let { editor: n, channel: r, onOperation: i } = e;
1727
- t(r, (e, t) => {
1728
- t && t.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
1729
- b(n, e), i?.(e);
1730
- });
1731
- });
1732
- }
1733
- //#endregion
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 };
1735
-
1736
- //# sourceMappingURL=cloud-BHClP3e2.js.map
1475
+ export { U as _, O as a, D as b, B as c, I as d, g as f, L as g, C as h, R as i, i as l, x as m, E as n, F as o, b as p, N as r, H as s, a as t, J as u, S as v, V as y };