@templatical/editor 0.47.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 (319) hide show
  1. package/README.md +1 -1
  2. package/dist/{AiChatSidebar-BPOv5Ra8.js → AiChatSidebar-CdjTb9ej.js} +14 -14
  3. package/dist/{AiFeatureMenu-H_WT4YR8.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
  4. package/dist/{BlockIssueBadge-AgO5abEB.js → BlockIssueBadge-BdpJwim0.js} +5 -5
  5. package/dist/BlockPreviewCanvas-D_sowkf0.js +141 -0
  6. package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
  7. package/dist/{CloudPanels-H_GdbOfZ.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-CMgsG_yh.js → CommentsPanel-BUvUzO3T.js} +2 -2
  11. package/dist/{CommentsSidebar-DCh8DTP8.js → CommentsSidebar-J65znlrH.js} +14 -14
  12. package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
  13. package/dist/{CountdownToolbar-DVuucA3v.js → CountdownToolbar-CLMIwfK7.js} +7 -7
  14. package/dist/{DesignReferenceSidebar-DxNV4lQp.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
  15. package/dist/{IssuesPanel-CUpW54P4.js → IssuesPanel-DeeVsfG7.js} +8 -8
  16. package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
  17. package/dist/{LogicTagInsertButton-DDYKnqmj.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
  18. package/dist/{MediaEditModal-D_we0Scr.js → MediaEditModal-C_wxoUMG.js} +3 -3
  19. package/dist/{MediaPanels-L95BwWV1.js → MediaPanels-BVXDkqtH.js} +2 -2
  20. package/dist/{MergeTagInput-DAL998tx.js → MergeTagInput-BEw_r0PJ.js} +3 -3
  21. package/dist/{MergeTagModeToggle-CjHO26rb.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
  22. package/dist/{ParagraphEditor-CcEN1N6n.js → ParagraphEditor-zLV44z-R.js} +135 -135
  23. package/dist/{RestoreVersionDialog-B2OH5rgs.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
  24. package/dist/{RichTextEditorContent-BGeTg-QL.js → RichTextEditorContent-CsvniFlI.js} +9 -9
  25. package/dist/{SaveBlockDialog-CCVyU-7y.js → SaveBlockDialog-DzWURF_e.js} +34 -35
  26. package/dist/{SavedBlocksBrowserModal-_WmSeqIh.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
  27. package/dist/{SavedBlocksPanels-DVX_ruQ7.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
  28. package/dist/{SavedBlocksPickBar-DVJC28hP.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
  29. package/dist/{TemplateScoringPanel-U0QFiwdI.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
  30. package/dist/{TemplateSettings-CdhTm9JQ.js → TemplateSettings-Cu5X9DgA.js} +11 -11
  31. package/dist/{TestEmailModal-BqToA_ls.js → TestEmailModal-BeRYV3eg.js} +14 -14
  32. package/dist/{TestEmailPanel-Cn4Ptq0j.js → TestEmailPanel-B8c3fQi2.js} +2 -2
  33. package/dist/{TitleEditor-CZdqeltH.js → TitleEditor-CvpNUoAp.js} +13 -13
  34. package/dist/{ToggleSwitch-BR8Sgzib.js → ToggleSwitch-DHweVJOr.js} +2 -2
  35. package/dist/Toolbar-BadDSkkF.js +3153 -0
  36. package/dist/{TplModal-CoczSDma.js → TplModal-BZgi9Tes.js} +5 -5
  37. package/dist/{VersionHistoryMenu-DY5z5FZr.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
  38. package/dist/{VersionHistoryPanels-DowHeDAQ.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
  39. package/dist/{VersionPreviewBanner-Bo8NxBbh.js → VersionPreviewBanner-F-811aps.js} +4 -4
  40. package/dist/WrapperBlock-DiiaxpMb.js +45 -0
  41. package/dist/{blockTypeIcons-4E1U8f99.js → blockTypeIcons-CayLluou.js} +49 -19
  42. package/dist/bundle-stats.json +7 -7
  43. package/dist/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +40 -2
  44. package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js → AiChatSidebar-yXJ85Zcg.js} +12 -12
  45. package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
  46. package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
  47. package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
  48. package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
  49. package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
  50. package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js +143 -0
  51. package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js.map +1 -0
  52. package/dist/cdn/chunks/{CloudHeaderExtras-DJXLTUHc.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
  53. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
  54. package/dist/cdn/chunks/{CloudPanels-D1fPLjG8.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-CmxPylNf.js → CommentsPanel-R8YLLO3v.js} +3 -3
  61. package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
  62. package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js → CommentsSidebar-96NZHVq3.js} +16 -16
  63. package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.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-DPIOtlN0.js → CountdownToolbar-tmiTPEXm.js} +8 -8
  67. package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
  68. package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js → DesignReferenceSidebar-D14IIu_P.js} +40 -40
  69. package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
  70. package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js → IssuesPanel-BoPiCLGc.js} +6 -6
  71. package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.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-BEsqPhMr.js → LogicTagInsertButton-BJ2t2vxC.js} +98 -98
  75. package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
  76. package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js → MediaEditModal-DD0SZ-S3.js} +3 -3
  77. package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
  78. package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js → MediaPanels-CkdJ_kGp.js} +3 -3
  79. package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
  80. package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js → MergeTagInput-7wXX71DH.js} +4 -4
  81. package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
  82. package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
  83. package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
  84. package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js → ParagraphEditor-CJQjRHXV.js} +52 -52
  85. package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
  86. package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js → RestoreVersionDialog-C5cxBRKi.js} +8 -8
  87. package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
  88. package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
  89. package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
  90. package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js → SaveBlockDialog-BKbjUnPM.js} +25 -26
  91. package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
  93. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
  94. package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
  95. package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
  96. package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
  97. package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
  98. package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js → TemplateScoringPanel-BBPnHILC.js} +10 -10
  99. package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
  100. package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js → TemplateSettings-CtrzzQWl.js} +14 -14
  101. package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
  102. package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js → TestEmailModal-DuZKYMWD.js} +15 -15
  103. package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
  104. package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js → TestEmailPanel-DERaCdpG.js} +3 -3
  105. package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
  106. package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js → TitleEditor-CEgxjtUX.js} +20 -20
  107. package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
  108. package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
  109. package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
  110. package/dist/cdn/chunks/Toolbar-GFIZQHzw.js +3070 -0
  111. package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
  112. package/dist/cdn/chunks/{TplModal-WIBiBrGy.js → TplModal-DDrbWJcE.js} +5 -5
  113. package/dist/cdn/chunks/{TplModal-WIBiBrGy.js.map → TplModal-DDrbWJcE.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js → VersionHistoryMenu-MlxsUmuT.js} +11 -11
  115. package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
  116. package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
  117. package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
  118. package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
  119. package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
  120. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +47 -0
  121. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js.map +1 -0
  122. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +22 -0
  123. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js.map +1 -0
  124. package/dist/cdn/chunks/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +41 -3
  125. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
  126. package/dist/{cloud-DwjaAdwK.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-DtIZ2Lee.js → createCloudRuntime-DiYCJ21w.js} +127 -169
  129. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
  130. package/dist/{de-DgAelLbM.js → cdn/chunks/de-CBE6O79z.js} +42 -2
  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-Bcwo0orC.js → editor-modal-HJBy9kLj.js} +69 -69
  141. package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
  142. package/dist/cdn/chunks/{en-Dekrl7HA.js → en-CDexnk0p.js} +41 -3
  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-BaZzyidV.js → cdn/chunks/es-BE42B6uN.js} +42 -2
  148. package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
  149. package/dist/cdn/chunks/{extensions-T-t8MKDb.js → extensions-koOuDeZS.js} +23 -23
  150. package/dist/cdn/chunks/{extensions-T-t8MKDb.js.map → extensions-koOuDeZS.js.map} +1 -1
  151. package/dist/{fr-C5ucb1HK.js → cdn/chunks/fr-DlJFPDQR.js} +42 -2
  152. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
  153. package/dist/cdn/chunks/{icons-C4fX9Bwy.js → icons-CjlNV8xD.js} +121 -92
  154. package/dist/cdn/chunks/icons-CjlNV8xD.js.map +1 -0
  155. package/dist/{ja-CUgR3mV0.js → cdn/chunks/ja-CUT8gkNI.js} +42 -2
  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-qrLY7hMS.js → cdn/chunks/nl-bXWqqRyS.js} +42 -2
  160. package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
  161. package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
  162. package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
  163. package/dist/{pt-BR-C6hMTQYi.js → cdn/chunks/pt-BR-2_H4-wlb.js} +42 -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-CHlVFp7r.js → src-B1e5SSYP.js} +312 -286
  173. package/dist/cdn/chunks/src-B1e5SSYP.js.map +1 -0
  174. package/dist/cdn/chunks/src-B77z1iw4.js +649 -0
  175. package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
  176. package/dist/cdn/chunks/{src-BnJlDuyB.js → src-CvLTYGdO.js} +555 -283
  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-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +2 -2
  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-Bf2d1DKI.js → useEditorCore-DpCFvHg_.js} +758 -732
  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-3S63go4E.js → useLogicTag-X8bc5qNl.js} +4 -4
  195. package/dist/cdn/chunks/{useLogicTag-3S63go4E.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
  196. package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js → useMergeTag-DFoOexIQ.js} +6 -6
  197. package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.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-DwJd-lKc.js → withCurrentFont-D-f61ghC.js} +2 -2
  203. package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
  204. package/dist/cdn/editor.css +1 -1
  205. package/dist/cdn/editor.js +1328 -1069
  206. package/dist/cdn/editor.js.map +1 -1
  207. package/dist/{check-B5R4zXr7.js → check-DQQzkmIC.js} +1 -1
  208. package/dist/{chevron-down-BKyl85NV.js → chevron-down-CIF4bdon.js} +1 -1
  209. package/dist/{chevron-right-BmToZ8qX.js → chevron-right-Cg7Xu-ev.js} +1 -1
  210. package/dist/{chevron-up-DNYdOxPC.js → chevron-up-Csu7ISD-.js} +1 -1
  211. package/dist/{circle-alert-Dx9ju3YZ.js → circle-alert-YUvIJAgY.js} +1 -1
  212. package/dist/{clock-Dv9bxsSH.js → clock-CnSIGKQW.js} +1 -1
  213. package/dist/{cdn/chunks/cloud-Cd7ptfhL.js → cloud-YUYDtdHt.js} +308 -569
  214. package/dist/{copy-BsKl4dcy.js → copy-CUC43md_.js} +1 -1
  215. package/dist/{createCloudRuntime-C8gpPsSi.js → createCloudRuntime-BMDRjL0k.js} +126 -168
  216. package/dist/{createLucideIcon-DziKp5iU.js → createLucideIcon-BcP1sjdp.js} +6 -6
  217. package/dist/{cdn/chunks/de-DgAelLbM.js → de-CBE6O79z.js} +40 -4
  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-C8koXLhl.js → dist-DBG3nh3k.js} +550 -284
  223. package/dist/{editor-modal-BwyIUnV_.js → editor-modal--7_9A6j-.js} +27 -27
  224. package/dist/en-BHCMzqib.js +1 -0
  225. package/dist/{en-Dekrl7HA.js → en-CDexnk0p.js} +40 -2
  226. package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
  227. package/dist/{cdn/chunks/es-BaZzyidV.js → es-BE42B6uN.js} +40 -4
  228. package/dist/{extensions-DHyKjsNZ.js → extensions-zwsZlWjH.js} +23 -23
  229. package/dist/{eye-DQuinb9k.js → eye-B1bua-ck.js} +1 -1
  230. package/dist/{cdn/chunks/fr-C5ucb1HK.js → fr-DlJFPDQR.js} +40 -4
  231. package/dist/{image-up-yTfLjOrj.js → image-up-BqiO7KCO.js} +1 -1
  232. package/dist/index.d.ts +356 -38
  233. package/dist/{info-C7OjlS11.js → info-x26nGOo2.js} +1 -1
  234. package/dist/{cdn/chunks/ja-CUgR3mV0.js → ja-CUT8gkNI.js} +40 -4
  235. package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
  236. package/dist/{link-CrUFaZ0t.js → link-CezhndyR.js} +1 -1
  237. package/dist/{list-CLgv6M-k.js → list-DQqdptI0.js} +1 -1
  238. package/dist/{loader-circle-BXM5VO0K.js → loader-circle-DCEeoYoi.js} +1 -1
  239. package/dist/{message-circle-BisdQ8H9.js → message-circle-BLGzfv_7.js} +1 -1
  240. package/dist/{cdn/chunks/nl-qrLY7hMS.js → nl-bXWqqRyS.js} +40 -4
  241. package/dist/{package-C1T4AxV1.js → package-D_kEQCMU.js} +1 -1
  242. package/dist/{pencil-oo2mwf4C.js → pencil-Dct8zGLy.js} +1 -1
  243. package/dist/{plus-BIilXopD.js → plus-BDd0gTEm.js} +1 -1
  244. package/dist/{preRenderCustomBlocks-lFX0HHiV.js → preRenderCustomBlocks-CtKJecE-.js} +1 -1
  245. package/dist/{cdn/chunks/pt-BR-C6hMTQYi.js → pt-BR-2_H4-wlb.js} +40 -4
  246. package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
  247. package/dist/{refresh-cw-DrLlkEVC.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-DNu9lImk.js → search-Bm2cCQpe.js} +1 -1
  250. package/dist/{send-DDNh3LoJ.js → send-sVLaKZ7f.js} +1 -1
  251. package/dist/{shield-check-aXM3o14f.js → shield-check-YhsbXfQc.js} +1 -1
  252. package/dist/{smartphone-isccgDee.js → smartphone-B2W81p02.js} +1 -1
  253. package/dist/socialIcons-Bwv-49EB.js +2167 -0
  254. package/dist/{sparkles-CIMfFxKv.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 +1448 -1189
  258. package/dist/{text-align-start-C4JFeqsq.js → text-align-start-CTuwQ5YW.js} +1 -1
  259. package/dist/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +1 -1
  260. package/dist/{trash-8ZD9pK_c.js → trash-I3D2peFQ.js} +1 -1
  261. package/dist/{triangle-alert-pq45xEHl.js → triangle-alert-CenxmLRE.js} +1 -1
  262. package/dist/{upload-DrNFmVes.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-BcT7UI4e.js → useEditorCore-DRbMRe8F.js} +1103 -1076
  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-D-dI8H6p.js → useLogicTag-zcI6BWIf.js} +3 -3
  269. package/dist/{useMergeTag-5wMeDBi-.js → useMergeTag-C-iBLlp0.js} +5 -5
  270. package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
  271. package/dist/{useScrollToBlock-Do3suaqp.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-B4YnsG_2.js → withCurrentFont-D62njRLu.js} +1 -1
  274. package/dist/{x-CBFKGLB1.js → x-KFQ4S-Kz.js} +1 -1
  275. package/package.json +12 -12
  276. package/dist/BlockPreviewCanvas-CZDBSPoG.js +0 -136
  277. package/dist/CloudHeaderExtras-gXsTYoGG.js +0 -59
  278. package/dist/CollaboratorBar-BazGNMqN.js +0 -103
  279. package/dist/Toolbar-OGakTBEg.js +0 -2851
  280. package/dist/WrapperBlock-BOABSX9W.js +0 -46
  281. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +0 -138
  282. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +0 -1
  283. package/dist/cdn/chunks/CloudHeaderExtras-DJXLTUHc.js.map +0 -1
  284. package/dist/cdn/chunks/CloudPanels-D1fPLjG8.js.map +0 -1
  285. package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js +0 -52
  286. package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js.map +0 -1
  287. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js +0 -2767
  288. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +0 -1
  289. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +0 -48
  290. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +0 -1
  291. package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js +0 -21
  292. package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js.map +0 -1
  293. package/dist/cdn/chunks/ca-DMoGGP9L.js.map +0 -1
  294. package/dist/cdn/chunks/cloud-Cd7ptfhL.js.map +0 -1
  295. package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +0 -1
  296. package/dist/cdn/chunks/de-DgAelLbM.js.map +0 -1
  297. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
  298. package/dist/cdn/chunks/en-BANFWZdr.js +0 -1
  299. package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
  300. package/dist/cdn/chunks/en-Dekrl7HA.js.map +0 -1
  301. package/dist/cdn/chunks/es-BaZzyidV.js.map +0 -1
  302. package/dist/cdn/chunks/fr-C5ucb1HK.js.map +0 -1
  303. package/dist/cdn/chunks/icons-C4fX9Bwy.js.map +0 -1
  304. package/dist/cdn/chunks/ja-CUgR3mV0.js.map +0 -1
  305. package/dist/cdn/chunks/nl-qrLY7hMS.js.map +0 -1
  306. package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +0 -1
  307. package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
  308. package/dist/cdn/chunks/socialIcons-DACw1wA8.js +0 -1103
  309. package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +0 -1
  310. package/dist/cdn/chunks/src-BnJlDuyB.js.map +0 -1
  311. package/dist/cdn/chunks/src-Bu0qBpbf.js +0 -616
  312. package/dist/cdn/chunks/src-Bu0qBpbf.js.map +0 -1
  313. package/dist/cdn/chunks/src-CHlVFp7r.js.map +0 -1
  314. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
  315. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
  316. package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +0 -1
  317. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
  318. package/dist/en-CC-57eC_.js +0 -1
  319. package/dist/socialIcons-BctavKBN.js +0 -1180
@@ -1,1103 +0,0 @@
1
- import { B as e, E as t, N as n, Q as r, S as i, W as a, X as o, Y as s, Z as c, at as l, b as u, ct as d, f, g as p, lt as m, ot as h, rt as g, u as _, ut as v, y } from "./draggable-DrsNwZuB.js";
2
- import { A as b, D as x, E as S, J as C, Y as w, Z as T, gt as E, j as D, t as O } from "./src-BnJlDuyB.js";
3
- import { r as k } from "./dist-MNQYSEWU.js";
4
- import { L as A, c as j } from "./keys-HI-INbkz.js";
5
- import { t as M } from "./useI18n-DUlyyIJJ.js";
6
- import { o as N, s as P } from "./usePopoverPosition-IbaW6-Ao.js";
7
- import { ot as F, s as I } from "./icons-C4fX9Bwy.js";
8
- import { t as L } from "./useAliveFlag-DCB96vzR.js";
9
- //#region ../core/src/error-reporting.ts
10
- function R(e) {
11
- return e instanceof Error ? e : Error(String(e), { cause: e });
12
- }
13
- function z(e, t) {
14
- try {
15
- t();
16
- } catch (t) {
17
- e?.(R(t));
18
- }
19
- }
20
- //#endregion
21
- //#region ../core/src/editor.ts
22
- function B(e) {
23
- return e === "1" ? 1 : e === "3" ? 3 : 2;
24
- }
25
- function ee(e) {
26
- let t = e.content ?? T(e.defaultFontFamily, e.templateDefaults);
27
- S(t), x(t);
28
- let n = o({
29
- template: null,
30
- content: t,
31
- selectedBlockId: null,
32
- viewport: "desktop",
33
- darkMode: !1,
34
- previewMode: !1,
35
- isDirty: !1,
36
- isSaving: !1,
37
- isLoading: !1,
38
- uiTheme: "auto"
39
- }), r = 0;
40
- function i() {
41
- n.isDirty = !0, r++;
42
- }
43
- let s = a({
44
- get: () => n.content,
45
- set: (e) => {
46
- n.content = e, i();
47
- }
48
- }), l = a(() => n.selectedBlockId ? u(n.content.blocks, n.selectedBlockId) : null);
49
- function u(e, t) {
50
- for (let n of e) {
51
- if (n.id === t) return n;
52
- if (n.type === "section") for (let e of n.children) {
53
- let n = u(e, t);
54
- if (n) return n;
55
- }
56
- }
57
- return null;
58
- }
59
- function d(e, t) {
60
- if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) d(e, t);
61
- }
62
- function f(e, t, n = { blocks: e }) {
63
- for (let r = 0; r < e.length; r++) {
64
- let i = e[r];
65
- if (i.id === t) return n;
66
- if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
67
- let n = f(i.children[e], t, {
68
- blocks: i.children[e],
69
- sectionId: i.id,
70
- columnIndex: e
71
- });
72
- if (n) return n;
73
- }
74
- }
75
- return null;
76
- }
77
- function p(t) {
78
- return e.lockedBlocks?.value.has(t) ?? !1;
79
- }
80
- function m(e) {
81
- let t = f(n.content.blocks, e);
82
- if (!t) return null;
83
- let r = t.blocks.findIndex((t) => t.id === e);
84
- return r === -1 ? null : {
85
- targetSectionId: t.sectionId,
86
- columnIndex: t.columnIndex,
87
- index: r
88
- };
89
- }
90
- function h(e, t = !0) {
91
- S(e), x(e), n.content = e, t && i();
92
- }
93
- function g(e) {
94
- e && p(e) || (n.selectedBlockId = e);
95
- }
96
- function _(e) {
97
- n.viewport = e;
98
- }
99
- function v(e) {
100
- n.darkMode = e;
101
- }
102
- function y(e) {
103
- n.uiTheme = e;
104
- }
105
- function b(e) {
106
- n.previewMode = e, e && (n.selectedBlockId = null);
107
- }
108
- function C(e, t) {
109
- if (p(e)) return;
110
- let r = u(n.content.blocks, e);
111
- r && (Object.assign(r, t), i());
112
- }
113
- function w(e) {
114
- n.content.settings = {
115
- ...n.content.settings,
116
- ...e
117
- }, i();
118
- }
119
- function E(e, t, r = 0, a) {
120
- let o = {
121
- settings: n.content.settings,
122
- blocks: [e]
123
- };
124
- if (S(o), x(o), !(t && e.type === "section")) {
125
- if (t) {
126
- if (p(t)) return;
127
- let i = u(n.content.blocks, t);
128
- if (i && i.type === "section") {
129
- if (r < 0 || r >= B(i.columns)) return;
130
- i.children[r] = i.children[r] || [];
131
- let t = i.children[r];
132
- a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
133
- }
134
- } else a !== void 0 && a < n.content.blocks.length ? n.content.blocks.splice(a, 0, e) : n.content.blocks.push(e);
135
- i();
136
- }
137
- }
138
- function D(e) {
139
- if (p(e)) return;
140
- let t = f(n.content.blocks, e);
141
- if (t) {
142
- let r = t.blocks.findIndex((t) => t.id === e);
143
- if (r !== -1) {
144
- let [e] = t.blocks.splice(r, 1);
145
- if (n.selectedBlockId) {
146
- let t = /* @__PURE__ */ new Set();
147
- d(e, t), t.has(n.selectedBlockId) && (n.selectedBlockId = null);
148
- }
149
- i();
150
- }
151
- }
152
- }
153
- function k(e, t, r, a = 0) {
154
- if (p(e) || r && p(r)) return;
155
- let o = f(n.content.blocks, e);
156
- if (!o) return;
157
- let s = o.blocks.findIndex((t) => t.id === e);
158
- if (s === -1 || r && o.blocks[s].type === "section") return;
159
- let c;
160
- if (r) {
161
- let e = u(n.content.blocks, r);
162
- if (!e || e.type !== "section" || a < 0 || a >= B(e.columns)) return;
163
- e.children[a] = e.children[a] || [], c = e.children[a];
164
- } else c = n.content.blocks;
165
- let [l] = o.blocks.splice(s, 1);
166
- c.splice(t, 0, l), i();
167
- }
168
- function A() {
169
- i();
170
- }
171
- function j(e, t) {
172
- throw new O(`[Templatical] Templates: ${e} ${t}`);
173
- }
174
- function M(t) {
175
- z(e.onError, t);
176
- }
177
- function N(t) {
178
- let { templates: n } = e;
179
- return n || j(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
180
- }
181
- function P(e) {
182
- n.template && (n.template = {
183
- ...n.template,
184
- name: e
185
- }, i());
186
- }
187
- async function F(t) {
188
- let i = N("create()"), { create: a } = i;
189
- typeof a != "function" && j("create()", "is disabled by the provider — its `create` is `false`.");
190
- let o;
191
- n.isLoading = !0;
192
- try {
193
- t?.content && (n.content = t.content);
194
- let e = r;
195
- o = await a(t?.name === void 0 ? { content: n.content } : {
196
- name: t.name,
197
- content: n.content
198
- }), n.template = o, r === e && (n.isDirty = !1);
199
- } catch (t) {
200
- throw e.onError?.(t), t;
201
- } finally {
202
- n.isLoading = !1;
203
- }
204
- return M(() => i.onCreated?.(o)), o;
205
- }
206
- async function I(t) {
207
- let r = N("load()"), i;
208
- n.isLoading = !0;
209
- try {
210
- i = await r.load(t), S(i.content), x(i.content), n.template = i, n.content = i.content, n.isDirty = !1;
211
- } catch (t) {
212
- throw e.onError?.(t), t;
213
- } finally {
214
- n.isLoading = !1;
215
- }
216
- return M(() => r.onLoaded?.(i)), i;
217
- }
218
- async function L(t = "api") {
219
- let i = N("save()"), { save: a } = i;
220
- typeof a != "function" && j("save()", "is disabled by the provider — its `save` is `false`.");
221
- let o = n.template;
222
- o || j("save()", "has no template loaded. Call create() or load() first.");
223
- let s = o.name === void 0 ? { content: n.content } : {
224
- name: o.name,
225
- content: n.content
226
- }, c;
227
- n.isSaving = !0;
228
- try {
229
- let e = r;
230
- if (c = await a(o.id, s), n.template?.id === o.id) {
231
- let e = n.template.name;
232
- n.template = e === o.name ? c : {
233
- ...c,
234
- name: e
235
- };
236
- }
237
- r === e && (n.isDirty = !1);
238
- } catch (t) {
239
- throw e.onError?.(t), t;
240
- } finally {
241
- n.isSaving = !1;
242
- }
243
- return M(() => i.onSaved?.(c, { trigger: t })), c;
244
- }
245
- function R() {
246
- return n.template?.id !== void 0;
247
- }
248
- return {
249
- state: c(n),
250
- content: s,
251
- selectedBlock: l,
252
- isBlockLocked: p,
253
- setContent: h,
254
- selectBlock: g,
255
- setViewport: _,
256
- setDarkMode: v,
257
- setUiTheme: y,
258
- setPreviewMode: b,
259
- updateBlock: C,
260
- updateSettings: w,
261
- addBlock: E,
262
- removeBlock: D,
263
- moveBlock: k,
264
- markDirty: A,
265
- findBlockLocation: m,
266
- setName: P,
267
- create: F,
268
- load: I,
269
- save: L,
270
- hasTemplate: R
271
- };
272
- }
273
- //#endregion
274
- //#region ../core/src/history.ts
275
- var V = 50, H = 300, te = 1500;
276
- function U(e) {
277
- let { content: t, setContent: n, isRemoteOperation: i, maxSize: o = V } = e, s = r([]), c = r([]), l = r(!1), u = null, d = null, f = a(() => s.value.length > 0), p = a(() => c.value.length > 0);
278
- function m() {
279
- return w(t.value);
280
- }
281
- function h(e) {
282
- s.value.push(e), s.value.length > o && s.value.splice(0, s.value.length - o);
283
- }
284
- function g() {
285
- d &&= (clearTimeout(d.timeoutId), null);
286
- }
287
- function _() {
288
- i?.() || (g(), h(m()), c.value = []);
289
- }
290
- function v(e) {
291
- i?.() || (d && d.blockId === e ? (clearTimeout(d.timeoutId), d.timeoutId = setTimeout(() => {
292
- d = null;
293
- }, H)) : (g(), h(m()), c.value = [], d = {
294
- blockId: e,
295
- timeoutId: setTimeout(() => {
296
- d = null;
297
- }, H)
298
- }));
299
- }
300
- function y() {
301
- l.value = !0, u && clearTimeout(u), u = setTimeout(() => {
302
- l.value = !1, u = null;
303
- }, te);
304
- }
305
- function b() {
306
- if (s.value.length === 0) return;
307
- g();
308
- let e = s.value.pop();
309
- c.value.push(m()), n(e, !0), y();
310
- }
311
- function x() {
312
- if (c.value.length === 0) return;
313
- g();
314
- let e = c.value.pop();
315
- s.value.push(m()), n(e, !0), y();
316
- }
317
- function S() {
318
- s.value = [], c.value = [], g();
319
- }
320
- function C() {
321
- S(), u &&= (clearTimeout(u), null);
322
- }
323
- return {
324
- canUndo: f,
325
- canRedo: p,
326
- isNavigating: l,
327
- undo: b,
328
- redo: x,
329
- record: _,
330
- recordDebounced: v,
331
- clear: S,
332
- destroy: C
333
- };
334
- }
335
- //#endregion
336
- //#region ../core/src/block-actions.ts
337
- function W(e) {
338
- let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
339
- function o(n, r, a) {
340
- let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = D(n, o);
341
- return t(s, r, a), i(s.id), s;
342
- }
343
- function s(e, n, r) {
344
- let o = b(e);
345
- if (n !== void 0 || r !== void 0) t(o, n, r);
346
- else {
347
- let i = a?.(e.id) ?? null;
348
- i ? t(o, i.targetSectionId, i.columnIndex, i.index + 1) : t(o, n, r);
349
- }
350
- return i(o.id), o;
351
- }
352
- function c(e) {
353
- n(e);
354
- }
355
- function l(e, t, n) {
356
- r(e, { [t]: n });
357
- }
358
- return {
359
- createAndAddBlock: o,
360
- duplicateBlock: s,
361
- deleteBlock: c,
362
- updateBlockProperty: l
363
- };
364
- }
365
- //#endregion
366
- //#region ../core/src/auto-save.ts
367
- var G = 2e3;
368
- function K(e) {
369
- let { content: t, isDirty: n, onChange: r, debounce: i = G, enabled: a = !0 } = e, o = null, s = !1;
370
- function c() {
371
- return typeof a == "function" ? a() : a;
372
- }
373
- function l() {
374
- s = !0, d();
375
- }
376
- function u() {
377
- s = !1;
378
- }
379
- function d() {
380
- o &&= (clearTimeout(o), null);
381
- }
382
- function f() {
383
- d(), n() && r(JSON.parse(JSON.stringify(t.value)));
384
- }
385
- function p() {
386
- c() && !s && (d(), o = setTimeout(() => {
387
- o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
388
- }, i));
389
- }
390
- let m = h(t, () => {
391
- p();
392
- }, { deep: !0 });
393
- function g() {
394
- m(), d();
395
- }
396
- return {
397
- flush: f,
398
- cancel: d,
399
- pause: l,
400
- resume: u,
401
- destroy: g
402
- };
403
- }
404
- //#endregion
405
- //#region ../core/src/condition-preview.ts
406
- function q(e) {
407
- let t = o(/* @__PURE__ */ new Set()), n = a(() => t.size > 0);
408
- function r(e) {
409
- return t.has(e);
410
- }
411
- function i(n) {
412
- t.has(n) ? t.delete(n) : (t.add(n), e.state.selectedBlockId === n && e.selectBlock(null));
413
- }
414
- function s() {
415
- t.clear();
416
- }
417
- return {
418
- isHidden: r,
419
- toggleBlock: i,
420
- reset: s,
421
- hasHiddenBlocks: n
422
- };
423
- }
424
- //#endregion
425
- //#region ../core/src/data-source-fetch.ts
426
- function J(e) {
427
- let t = r(!1), n = r(!1), i = a(() => !!e.definition.value?.dataSource), o = a(() => i.value && !e.block.value.dataSourceFetched);
428
- async function s() {
429
- let r = e.definition.value;
430
- if (r?.dataSource) {
431
- t.value = !0, n.value = !1;
432
- try {
433
- let t = await r.dataSource.onFetch({
434
- fieldValues: { ...e.block.value.fieldValues },
435
- blockId: e.block.value.id
436
- });
437
- if (t == null) return;
438
- let n = { ...e.block.value.fieldValues };
439
- for (let e of Object.keys(n)) e in t && (n[e] = t[e]);
440
- e.onUpdate(n, !0);
441
- } catch (e) {
442
- console.warn("[Templatical] Data source fetch error:", e), n.value = !0;
443
- } finally {
444
- t.value = !1;
445
- }
446
- }
447
- }
448
- return {
449
- isFetching: t,
450
- fetchError: n,
451
- fetch: s,
452
- hasDataSource: i,
453
- needsFetch: o
454
- };
455
- }
456
- //#endregion
457
- //#region ../core/src/history-interceptor.ts
458
- function Y(e, t) {
459
- let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
460
- e.addBlock = (r, i, a, o) => {
461
- i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
462
- }, e.removeBlock = (n) => {
463
- e.isBlockLocked(n) || (t.record(), r(n));
464
- }, e.moveBlock = (n, r, a, o) => {
465
- e.isBlockLocked(n) || a && e.isBlockLocked(a) || (t.record(), i(n, r, a, o));
466
- }, e.updateBlock = (n, r) => {
467
- e.isBlockLocked(n) || (t.recordDebounced(n), a(n, r));
468
- }, e.updateSettings = (e) => {
469
- t.record(), o(e);
470
- };
471
- }
472
- //#endregion
473
- //#region ../core/src/saved-blocks.ts
474
- function X(e) {
475
- let { provider: t } = e, n = r([]), i = r(!1), a = f(() => {
476
- let e = /* @__PURE__ */ new Set();
477
- for (let t of n.value) {
478
- let n = t.category?.trim();
479
- n && e.add(n);
480
- }
481
- return [...e].sort((e, t) => e.localeCompare(t));
482
- }), o = f(() => typeof t.create == "function"), s = f(() => typeof t.update == "function"), c = f(() => typeof t.delete == "function");
483
- function l(e) {
484
- return s.value && e.canUpdate !== !1;
485
- }
486
- function u(e) {
487
- return c.value && e.canDelete !== !1;
488
- }
489
- function d(e, t) {
490
- throw new O(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
491
- }
492
- function p(t) {
493
- z(e.onError, t);
494
- }
495
- async function m(r) {
496
- i.value = !0;
497
- try {
498
- n.value = await t.list(r);
499
- } catch (t) {
500
- throw e.onError?.(t), t;
501
- } finally {
502
- i.value = !1;
503
- }
504
- }
505
- async function h(r, i, a) {
506
- let { create: o } = t;
507
- typeof o != "function" && d("create", "disabled by the provider");
508
- try {
509
- let e = await o(a ? {
510
- name: r,
511
- content: i,
512
- category: a
513
- } : {
514
- name: r,
515
- content: i
516
- });
517
- return n.value = [e, ...n.value], p(() => t.onCreated?.(e)), e;
518
- } catch (t) {
519
- throw e.onError?.(t), t;
520
- }
521
- }
522
- async function g(r, i) {
523
- let { update: a } = t;
524
- typeof a != "function" && d("update", "disabled by the provider");
525
- let o = n.value.find((e) => e.id === r);
526
- o && o.canUpdate === !1 && d("update", `not permitted for entry "${r}"`);
527
- try {
528
- let e = await a(r, i);
529
- return n.value = n.value.map((t) => t.id === r ? e : t), p(() => t.onUpdated?.(e)), e;
530
- } catch (t) {
531
- throw e.onError?.(t), t;
532
- }
533
- }
534
- async function _(r) {
535
- let { delete: i } = t;
536
- typeof i != "function" && d("delete", "disabled by the provider");
537
- let a = n.value.find((e) => e.id === r) ?? null;
538
- a && a.canDelete === !1 && d("delete", `not permitted for entry "${r}"`);
539
- try {
540
- await i(r), n.value = n.value.filter((e) => e.id !== r), a && p(() => t.onDeleted?.(a));
541
- } catch (t) {
542
- throw e.onError?.(t), t;
543
- }
544
- }
545
- return {
546
- savedBlocks: n,
547
- isLoading: i,
548
- categories: a,
549
- canCreate: o,
550
- canUpdate: s,
551
- canDelete: c,
552
- canUpdateBlock: l,
553
- canDeleteBlock: u,
554
- load: m,
555
- create: h,
556
- update: g,
557
- remove: _
558
- };
559
- }
560
- //#endregion
561
- //#region ../core/src/saved-blocks-local.ts
562
- var Z = "templatical:saved-blocks";
563
- function ne(e = {}) {
564
- let t = e.key ?? Z;
565
- function n() {
566
- if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
567
- return localStorage;
568
- }
569
- function r() {
570
- let e = n().getItem(t);
571
- if (!e) return [];
572
- try {
573
- let t = JSON.parse(e);
574
- return Array.isArray(t) ? t : [];
575
- } catch {
576
- return [];
577
- }
578
- }
579
- function i(e) {
580
- n().setItem(t, JSON.stringify(e));
581
- }
582
- return {
583
- async list(e) {
584
- let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
585
- return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
586
- },
587
- async create(e) {
588
- let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
589
- id: C(),
590
- name: e.name,
591
- content: e.content,
592
- ...e.category ? { category: e.category } : {},
593
- createdAt: t,
594
- updatedAt: t
595
- };
596
- return i([n, ...r()]), n;
597
- },
598
- async update(e, t) {
599
- let n = r(), a = n.findIndex((t) => t.id === e);
600
- if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
601
- let o = {
602
- ...n[a],
603
- ...t,
604
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
605
- }, s = [...n];
606
- return s[a] = o, i(s), o;
607
- },
608
- async delete(e) {
609
- let t = r();
610
- if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
611
- i(t.filter((t) => t.id !== e));
612
- }
613
- };
614
- }
615
- //#endregion
616
- //#region ../core/src/media-local.ts
617
- var re = "templatical:media", ie = 50;
618
- function ae(e = {}) {
619
- let t = e.key ?? re;
620
- function n() {
621
- if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with localStorage. Supply your own MediaProvider for server-side or non-browser use.");
622
- return localStorage;
623
- }
624
- function r() {
625
- let e = n().getItem(t);
626
- if (!e) return [];
627
- try {
628
- let t = JSON.parse(e);
629
- return Array.isArray(t) ? t : [];
630
- } catch {
631
- return [];
632
- }
633
- }
634
- function i(e) {
635
- n().setItem(t, JSON.stringify(e));
636
- }
637
- function a(e) {
638
- return typeof FileReader > "u" ? Promise.reject(/* @__PURE__ */ Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with FileReader.")) : new Promise((t, n) => {
639
- let r = new FileReader();
640
- r.onload = () => {
641
- typeof r.result == "string" ? t(r.result) : n(/* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
642
- }, r.onerror = () => {
643
- n(r.error ?? /* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
644
- }, r.readAsDataURL(e);
645
- });
646
- }
647
- return {
648
- async list(e) {
649
- let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
650
- let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
651
- return t.includes(n) || r.includes(n);
652
- }) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + ie), c = { items: s }, l = o + s.length;
653
- return l < i.length && (c.nextCursor = String(l)), c;
654
- },
655
- async create(e) {
656
- let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
657
- id: C(),
658
- url: t,
659
- filename: e.filename || e.file.name,
660
- createdAt: n,
661
- updatedAt: n,
662
- size: e.file.size
663
- };
664
- return e.alt !== void 0 && (o.alt = e.alt), e.file.type && (o.mimeType = e.file.type), e.folderId !== void 0 && (o.folderId = e.folderId), i([o, ...r()]), o;
665
- },
666
- async update(e, t) {
667
- let n = r(), a = n.findIndex((t) => t.id === e);
668
- if (a === -1) throw Error(`[Templatical] Media asset not found: ${e}`);
669
- let o = n[a], s = {
670
- ...o,
671
- ...t,
672
- id: o.id,
673
- url: o.url,
674
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
675
- }, c = [...n];
676
- return c[a] = s, i(c), s;
677
- },
678
- async delete(e) {
679
- let t = r();
680
- for (let n of e) if (!t.some((e) => e.id === n)) throw Error(`[Templatical] Media asset not found: ${n}`);
681
- let n = new Set(e);
682
- i(t.filter((e) => !n.has(e.id)));
683
- },
684
- folders: !1,
685
- replace: !1,
686
- importFromUrl: !1,
687
- checkUsage: !1,
688
- frequentlyUsed: !1,
689
- storage: !1
690
- };
691
- }
692
- //#endregion
693
- //#region ../core/src/version-history.ts
694
- function oe(e) {
695
- let { provider: t, getTemplateId: n } = e, i = r([]), a = r(!1), o = r(void 0), s = r(!1), c = /* @__PURE__ */ new Map(), l = f(() => typeof t.create == "function"), u = f(() => typeof t.restore == "function");
696
- function d(e) {
697
- let t = n();
698
- if (!t) throw new O(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
699
- return t;
700
- }
701
- function p(e) {
702
- throw new O(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
703
- }
704
- function m(t) {
705
- z(e.onError, t);
706
- }
707
- async function h(n) {
708
- let r = d("list");
709
- a.value = !0;
710
- try {
711
- let e = await t.list(r, n);
712
- i.value = e.versions, o.value = e.nextCursor;
713
- } catch (t) {
714
- throw e.onError?.(t), t;
715
- } finally {
716
- a.value = !1;
717
- }
718
- }
719
- function g(e) {
720
- return e.content ?? c.get(e.id) ?? null;
721
- }
722
- async function _(n) {
723
- let r = g(n);
724
- if (r) return r;
725
- let i = d("get");
726
- try {
727
- let e = await t.get(i, n.id);
728
- return c.set(n.id, e), e;
729
- } catch (t) {
730
- throw e.onError?.(t), t;
731
- }
732
- }
733
- async function v(n, r) {
734
- let { create: a } = t;
735
- typeof a != "function" && p("create");
736
- let o = d("create");
737
- try {
738
- let e = await a(o, n, r);
739
- return i.value = [e, ...i.value], m(() => t.onCreated?.(e)), e;
740
- } catch (t) {
741
- throw e.onError?.(t), t;
742
- }
743
- }
744
- async function y(n) {
745
- let { restore: r } = t;
746
- typeof r != "function" && p("restore");
747
- let i = d("restore"), a;
748
- s.value = !0;
749
- try {
750
- a = await r(i, n);
751
- } catch (t) {
752
- throw e.onError?.(t), t;
753
- } finally {
754
- s.value = !1;
755
- }
756
- return m(() => t.onRestored?.(a)), a;
757
- }
758
- return {
759
- nextCursor: o,
760
- versions: i,
761
- isLoading: a,
762
- isRestoring: s,
763
- canCreate: l,
764
- canRestore: u,
765
- load: h,
766
- peekContent: g,
767
- resolveContent: _,
768
- create: v,
769
- restore: y
770
- };
771
- }
772
- //#endregion
773
- //#region ../core/src/comments.ts
774
- function se(e) {
775
- let { provider: t, getTemplateId: n, getUser: i } = e, a = r([]), o = r(!1), s = r(!1), c = f(() => typeof t.create == "function"), l = f(() => typeof t.update == "function"), u = f(() => typeof t.delete == "function"), d = f(() => typeof t.setResolved == "function"), p = f(() => a.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), m = f(() => a.value.filter((e) => !e.resolvedAt).length), h = f(() => {
776
- let e = /* @__PURE__ */ new Map();
777
- for (let t of a.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
778
- return e;
779
- });
780
- function g(e) {
781
- let t = n();
782
- if (!t) throw new O(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
783
- return t;
784
- }
785
- function _(e) {
786
- let t = i();
787
- if (!t) throw new O(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
788
- return t;
789
- }
790
- function v(e) {
791
- throw new O(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
792
- }
793
- function y(e) {
794
- for (let t of a.value) {
795
- if (t.id === e) return t;
796
- for (let n of t.replies ?? []) if (n.id === e) return n;
797
- }
798
- return null;
799
- }
800
- function b(e) {
801
- let t = i();
802
- return t !== null && e.author.id === t.id;
803
- }
804
- function x(t) {
805
- let n = R(t);
806
- throw e.onError?.(n), n;
807
- }
808
- function S(t) {
809
- z(e.onError, t);
810
- }
811
- function C(e, t, n) {
812
- return [
813
- ...e.slice(0, t),
814
- n,
815
- ...e.slice(t + 1)
816
- ];
817
- }
818
- function w(e, t) {
819
- return e !== void 0 && JSON.stringify(e) === JSON.stringify(t);
820
- }
821
- function T(e) {
822
- if (e.parentId) {
823
- let t = !1, n = a.value.map((n) => {
824
- if (n.id !== e.parentId) return n;
825
- let r = n.replies ?? [], i = r.findIndex((t) => t.id === e.id);
826
- return i !== -1 && w(r[i], e) ? n : (t = !0, {
827
- ...n,
828
- replies: i === -1 ? [...r, e] : C(r, i, e)
829
- });
830
- });
831
- return t && (a.value = n), t;
832
- }
833
- let t = a.value.findIndex((t) => t.id === e.id);
834
- if (t === -1) return a.value = [...a.value, e], !0;
835
- let n = {
836
- ...e,
837
- replies: e.replies ?? a.value[t].replies
838
- };
839
- return !w(a.value[t], n) && (a.value = C(a.value, t, n), !0);
840
- }
841
- function E(e, t) {
842
- let n = y(e), r = t ?? n?.parentId ?? null;
843
- return r ? a.value = a.value.map((t) => t.id === r ? {
844
- ...t,
845
- replies: (t.replies ?? []).filter((t) => t.id !== e)
846
- } : t) : a.value = a.value.filter((t) => t.id !== e), n;
847
- }
848
- async function D(e) {
849
- let n = g("list");
850
- o.value = !0;
851
- try {
852
- a.value = await t.list(n, e);
853
- } catch (e) {
854
- x(e);
855
- } finally {
856
- o.value = !1;
857
- }
858
- }
859
- async function k(e) {
860
- let { create: n } = t;
861
- typeof n != "function" && v("create");
862
- let r = g("create");
863
- _("create"), s.value = !0;
864
- try {
865
- let i = await n(r, e);
866
- return T(i), S(() => t.onCreated?.(i, { origin: "local" })), i;
867
- } catch (e) {
868
- x(e);
869
- } finally {
870
- s.value = !1;
871
- }
872
- }
873
- async function A(e, n) {
874
- let { update: r } = t;
875
- typeof r != "function" && v("update");
876
- let i = g("update");
877
- _("update"), s.value = !0;
878
- try {
879
- let a = await r(i, e, n);
880
- return T(a), S(() => t.onUpdated?.(a, { origin: "local" })), a;
881
- } catch (e) {
882
- x(e);
883
- } finally {
884
- s.value = !1;
885
- }
886
- }
887
- async function j(e) {
888
- let { delete: n } = t;
889
- typeof n != "function" && v("delete");
890
- let r = g("delete");
891
- _("delete");
892
- let i = y(e);
893
- s.value = !0;
894
- try {
895
- await n(r, e), E(e), i && S(() => t.onDeleted?.(i, { origin: "local" }));
896
- } catch (e) {
897
- x(e);
898
- } finally {
899
- s.value = !1;
900
- }
901
- }
902
- async function M(e, n) {
903
- let { setResolved: r } = t;
904
- typeof r != "function" && v("setResolved");
905
- let i = g("setResolved");
906
- _("setResolved"), s.value = !0;
907
- try {
908
- let a = await r(i, e, n);
909
- return T(a), S(() => (a.resolvedAt ? t.onResolved : t.onUnresolved)?.(a, { origin: "local" })), a;
910
- } catch (e) {
911
- x(e);
912
- } finally {
913
- s.value = !1;
914
- }
915
- }
916
- function N(e) {
917
- T(e) && S(() => t.onCreated?.(e, { origin: "remote" }));
918
- }
919
- function P(e) {
920
- T(e) && S(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
921
- }
922
- function F(e, n) {
923
- let r = E(e, n);
924
- r && S(() => t.onDeleted?.(r, { origin: "remote" }));
925
- }
926
- return {
927
- comments: a,
928
- isLoading: o,
929
- isSubmitting: s,
930
- canCreate: c,
931
- canUpdate: l,
932
- canDelete: u,
933
- canResolve: d,
934
- totalCount: p,
935
- unresolvedCount: m,
936
- commentCountByBlock: h,
937
- load: D,
938
- create: k,
939
- update: A,
940
- remove: j,
941
- setResolved: M,
942
- find: y,
943
- isOwn: b,
944
- applyRemoteCreate: N,
945
- applyRemoteUpdate: P,
946
- applyRemoteDelete: F
947
- };
948
- }
949
- function ce(t) {
950
- let { comments: n, provider: r, getTemplateId: i } = t, { subscribe: a } = r;
951
- if (typeof a != "function") return;
952
- let o = null;
953
- function c() {
954
- o?.(), o = null;
955
- }
956
- e(() => i(), (e) => {
957
- c(), e && (o = a(e, (e) => {
958
- switch (e.type) {
959
- case "created":
960
- n.applyRemoteCreate(e.comment);
961
- break;
962
- case "updated":
963
- n.applyRemoteUpdate(e.comment);
964
- break;
965
- case "deleted": n.applyRemoteDelete(e.commentId, e.parentId);
966
- }
967
- }));
968
- }, { immediate: !0 }), s(c);
969
- }
970
- //#endregion
971
- //#region src/utils/blockTypeLabels.ts
972
- function Q(e, t) {
973
- return t.blocks[e] ?? e;
974
- }
975
- function le(e, t, n = []) {
976
- if (e.type !== "custom") return Q(e.type, t);
977
- let { customType: r } = e;
978
- return n.find((e) => e.type === r)?.name ?? r;
979
- }
980
- //#endregion
981
- //#region src/utils/resolveFieldColors.ts
982
- function ue(e, t) {
983
- let n = P({ presets: e.presets }, N), r = n.presets.length === 0;
984
- return {
985
- presets: r ? t.presets : n.presets,
986
- allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
987
- invalidPresets: n.invalidPresets,
988
- emptyPresets: e.presets !== void 0 && e.presets.length === 0,
989
- presetsInherited: r,
990
- allowCustomIgnored: e.allowCustom === !0 && t.allowCustom === !1
991
- };
992
- }
993
- //#endregion
994
- //#region src/components/MediaDropOverlay.vue
995
- var $ = /* @__PURE__ */ i({
996
- __name: "MediaDropOverlay",
997
- props: {
998
- uploading: { type: Boolean },
999
- size: { default: "field" }
1000
- },
1001
- setup(e) {
1002
- let t = e, { t: r } = M(), i = {
1003
- field: {
1004
- gap: "tpl:gap-1.5",
1005
- icon: 18,
1006
- veil: "90%"
1007
- },
1008
- canvas: {
1009
- gap: "tpl:gap-2",
1010
- icon: 20,
1011
- veil: "85%"
1012
- }
1013
- }, a = f(() => i[t.size]);
1014
- return (t, i) => (n(), p("div", {
1015
- class: d(["tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]", a.value.gap]),
1016
- style: m({ backgroundColor: `color-mix(in srgb, var(--tpl-bg) ${a.value.veil}, transparent)` })
1017
- }, [e.uploading ? (n(), p(_, { key: 0 }, [u(l(F), {
1018
- class: "tpl-spinner",
1019
- size: a.value.icon,
1020
- "stroke-width": 2
1021
- }, null, 8, ["size"]), y(" " + v(l(r).image.uploading), 1)], 64)) : (n(), p(_, { key: 1 }, [u(l(I), {
1022
- size: a.value.icon,
1023
- "stroke-width": 1.5
1024
- }, null, 8, ["size"]), y(" " + v(l(r).image.dropToUpload), 1)], 64))], 6));
1025
- }
1026
- }), de = "image/";
1027
- function fe(e) {
1028
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || g(r), { isOverDropZone: a } = k(t, {
1029
- preventDefaultForUnhandled: !0,
1030
- onDrop: (e) => {
1031
- if (!i()) return;
1032
- let t = (e ?? []).filter((e) => e.type.startsWith(de));
1033
- t.length > 0 && n([t[0]]);
1034
- }
1035
- });
1036
- return { isOver: f(() => i() && a.value) };
1037
- }
1038
- //#endregion
1039
- //#region src/composables/useMediaDropField.ts
1040
- function pe(e) {
1041
- let { target: n, blocked: i, apply: a } = e, o = t(A, null), s = t(j, null), c = L();
1042
- async function l() {
1043
- let e = await o?.({ accept: ["images"] });
1044
- c.alive && e && a(e);
1045
- }
1046
- let u = r(!1), d = f(() => (s?.value ?? !!o) && !u.value && !g(i));
1047
- async function p(e) {
1048
- if (o) {
1049
- u.value = !0;
1050
- try {
1051
- let t = await o({
1052
- accept: ["images"],
1053
- files: e
1054
- });
1055
- if (!c.alive) return;
1056
- t && a(t);
1057
- } finally {
1058
- c.alive && (u.value = !1);
1059
- }
1060
- }
1061
- }
1062
- let { isOver: m } = fe({
1063
- target: n,
1064
- enabled: d,
1065
- onFiles: p
1066
- }), h = f(() => d.value && m.value || u.value);
1067
- return {
1068
- canBrowse: !!o,
1069
- dropEnabled: d,
1070
- isUploading: u,
1071
- showOverlay: h,
1072
- openMediaBrowser: l
1073
- };
1074
- }
1075
- //#endregion
1076
- //#region src/constants/socialIcons.ts
1077
- var me = E, he = {
1078
- small: 24,
1079
- medium: 32,
1080
- large: 48
1081
- }, ge = [
1082
- "facebook",
1083
- "twitter",
1084
- "instagram",
1085
- "linkedin",
1086
- "youtube",
1087
- "tiktok",
1088
- "pinterest",
1089
- "email",
1090
- "website",
1091
- "whatsapp",
1092
- "telegram",
1093
- "discord",
1094
- "snapchat",
1095
- "reddit",
1096
- "github",
1097
- "dribbble",
1098
- "behance"
1099
- ];
1100
- //#endregion
1101
- export { ee as S, q as _, $ as a, W as b, Q as c, oe as d, ae as f, J as g, Y as h, pe as i, ce as l, X as m, me as n, ue as o, ne as p, ge as r, le as s, he as t, se as u, G as v, U as x, K as y };
1102
-
1103
- //# sourceMappingURL=socialIcons-DACw1wA8.js.map