@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,1180 +0,0 @@
1
- import { A as e, At as t, H as n, J as r, R as i, S as a, X as o, Y as s, Z as c, at as l, d as u, g as d, h as f, jt as p, kt as m, ot as h, r as g, rt as _, s as v, v as y } from "./vue.runtime.esm-bundler-CAzmrXdD.js";
2
- import { C as b, V as x, d as S, g as C, h as w, l as T, lt as E, m as D, y as O } from "./dist-C8koXLhl.js";
3
- import { r as k } from "./dist-DAAJogrx.js";
4
- import { L as A, c as j } from "./keys-BKFq19a2.js";
5
- import { t as M } from "./useI18n-CxVEpurs.js";
6
- import { o as N, s as P } from "./usePopoverPosition-CwnH1o5g.js";
7
- import { t as F } from "./createLucideIcon-DziKp5iU.js";
8
- import { t as I } from "./loader-circle-BXM5VO0K.js";
9
- import { t as L } from "./upload-DrNFmVes.js";
10
- import { t as R } from "./useAliveFlag-Dd06mRxe.js";
11
- //#region ../core/dist/index.js
12
- function z(e) {
13
- return e instanceof Error ? e : Error(String(e), { cause: e });
14
- }
15
- function B(e, t) {
16
- try {
17
- t();
18
- } catch (t) {
19
- e?.(z(t));
20
- }
21
- }
22
- function V(e) {
23
- return e === "1" ? 1 : e === "3" ? 3 : 2;
24
- }
25
- function ee(e) {
26
- let t = e.content ?? b(e.defaultFontFamily, e.templateDefaults);
27
- D(t), w(t);
28
- let r = s({
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
- }), i = 0;
40
- function a() {
41
- r.isDirty = !0, i++;
42
- }
43
- let c = n({
44
- get: () => r.content,
45
- set: (e) => {
46
- r.content = e, a();
47
- }
48
- }), l = n(() => r.selectedBlockId ? u(r.content.blocks, r.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(r.content.blocks, e);
82
- if (!t) return null;
83
- let n = t.blocks.findIndex((t) => t.id === e);
84
- return n === -1 ? null : {
85
- targetSectionId: t.sectionId,
86
- columnIndex: t.columnIndex,
87
- index: n
88
- };
89
- }
90
- function h(e, t = !0) {
91
- D(e), w(e), r.content = e, t && a();
92
- }
93
- function g(e) {
94
- e && p(e) || (r.selectedBlockId = e);
95
- }
96
- function _(e) {
97
- r.viewport = e;
98
- }
99
- function v(e) {
100
- r.darkMode = e;
101
- }
102
- function y(e) {
103
- r.uiTheme = e;
104
- }
105
- function x(e) {
106
- r.previewMode = e, e && (r.selectedBlockId = null);
107
- }
108
- function C(e, t) {
109
- if (p(e)) return;
110
- let n = u(r.content.blocks, e);
111
- n && (Object.assign(n, t), a());
112
- }
113
- function T(e) {
114
- r.content.settings = {
115
- ...r.content.settings,
116
- ...e
117
- }, a();
118
- }
119
- function E(e, t, n = 0, i) {
120
- let o = {
121
- settings: r.content.settings,
122
- blocks: [e]
123
- };
124
- if (D(o), w(o), !(t && e.type === "section")) {
125
- if (t) {
126
- if (p(t)) return;
127
- let a = u(r.content.blocks, t);
128
- if (a && a.type === "section") {
129
- if (n < 0 || n >= V(a.columns)) return;
130
- a.children[n] = a.children[n] || [];
131
- let t = a.children[n];
132
- i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
133
- }
134
- } else i !== void 0 && i < r.content.blocks.length ? r.content.blocks.splice(i, 0, e) : r.content.blocks.push(e);
135
- a();
136
- }
137
- }
138
- function O(e) {
139
- if (p(e)) return;
140
- let t = f(r.content.blocks, e);
141
- if (t) {
142
- let n = t.blocks.findIndex((t) => t.id === e);
143
- if (n !== -1) {
144
- let [e] = t.blocks.splice(n, 1);
145
- if (r.selectedBlockId) {
146
- let t = /* @__PURE__ */ new Set();
147
- d(e, t), t.has(r.selectedBlockId) && (r.selectedBlockId = null);
148
- }
149
- a();
150
- }
151
- }
152
- }
153
- function k(e, t, n, i = 0) {
154
- if (p(e) || n && p(n)) return;
155
- let o = f(r.content.blocks, e);
156
- if (!o) return;
157
- let s = o.blocks.findIndex((t) => t.id === e);
158
- if (s === -1 || n && o.blocks[s].type === "section") return;
159
- let c;
160
- if (n) {
161
- let e = u(r.content.blocks, n);
162
- if (!e || e.type !== "section" || i < 0 || i >= V(e.columns)) return;
163
- e.children[i] = e.children[i] || [], c = e.children[i];
164
- } else c = r.content.blocks;
165
- let [l] = o.blocks.splice(s, 1);
166
- c.splice(t, 0, l), a();
167
- }
168
- function A() {
169
- a();
170
- }
171
- function j(e, t) {
172
- throw new S(`[Templatical] Templates: ${e} ${t}`);
173
- }
174
- function M(t) {
175
- B(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
- r.template && (r.template = {
183
- ...r.template,
184
- name: e
185
- }, a());
186
- }
187
- async function F(t) {
188
- let n = N("create()"), { create: a } = n;
189
- typeof a != "function" && j("create()", "is disabled by the provider — its `create` is `false`.");
190
- let o;
191
- r.isLoading = !0;
192
- try {
193
- t?.content && (r.content = t.content);
194
- let e = i;
195
- o = await a(t?.name === void 0 ? { content: r.content } : {
196
- name: t.name,
197
- content: r.content
198
- }), r.template = o, i === e && (r.isDirty = !1);
199
- } catch (t) {
200
- throw e.onError?.(t), t;
201
- } finally {
202
- r.isLoading = !1;
203
- }
204
- return M(() => n.onCreated?.(o)), o;
205
- }
206
- async function I(t) {
207
- let n = N("load()"), i;
208
- r.isLoading = !0;
209
- try {
210
- i = await n.load(t), D(i.content), w(i.content), r.template = i, r.content = i.content, r.isDirty = !1;
211
- } catch (t) {
212
- throw e.onError?.(t), t;
213
- } finally {
214
- r.isLoading = !1;
215
- }
216
- return M(() => n.onLoaded?.(i)), i;
217
- }
218
- async function L(t = "api") {
219
- let n = N("save()"), { save: a } = n;
220
- typeof a != "function" && j("save()", "is disabled by the provider — its `save` is `false`.");
221
- let o = r.template;
222
- o || j("save()", "has no template loaded. Call create() or load() first.");
223
- let s = o.name === void 0 ? { content: r.content } : {
224
- name: o.name,
225
- content: r.content
226
- }, c;
227
- r.isSaving = !0;
228
- try {
229
- let e = i;
230
- if (c = await a(o.id, s), r.template?.id === o.id) {
231
- let e = r.template.name;
232
- r.template = e === o.name ? c : {
233
- ...c,
234
- name: e
235
- };
236
- }
237
- i === e && (r.isDirty = !1);
238
- } catch (t) {
239
- throw e.onError?.(t), t;
240
- } finally {
241
- r.isSaving = !1;
242
- }
243
- return M(() => n.onSaved?.(c, { trigger: t })), c;
244
- }
245
- function R() {
246
- return r.template?.id !== void 0;
247
- }
248
- return {
249
- state: o(r),
250
- content: c,
251
- selectedBlock: l,
252
- isBlockLocked: p,
253
- setContent: h,
254
- selectBlock: g,
255
- setViewport: _,
256
- setDarkMode: v,
257
- setUiTheme: y,
258
- setPreviewMode: x,
259
- updateBlock: C,
260
- updateSettings: T,
261
- addBlock: E,
262
- removeBlock: O,
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
- var H = 50, U = 300, te = 1500;
274
- function W(e) {
275
- let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = H } = e, o = c([]), s = c([]), l = c(!1), u = null, d = null, f = n(() => o.value.length > 0), p = n(() => s.value.length > 0);
276
- function m() {
277
- return E(t.value);
278
- }
279
- function h(e) {
280
- o.value.push(e), o.value.length > a && o.value.splice(0, o.value.length - a);
281
- }
282
- function g() {
283
- d &&= (clearTimeout(d.timeoutId), null);
284
- }
285
- function _() {
286
- i?.() || (g(), h(m()), s.value = []);
287
- }
288
- function v(e) {
289
- i?.() || (d && d.blockId === e ? (clearTimeout(d.timeoutId), d.timeoutId = setTimeout(() => {
290
- d = null;
291
- }, U)) : (g(), h(m()), s.value = [], d = {
292
- blockId: e,
293
- timeoutId: setTimeout(() => {
294
- d = null;
295
- }, U)
296
- }));
297
- }
298
- function y() {
299
- l.value = !0, u && clearTimeout(u), u = setTimeout(() => {
300
- l.value = !1, u = null;
301
- }, te);
302
- }
303
- function b() {
304
- if (o.value.length === 0) return;
305
- g();
306
- let e = o.value.pop();
307
- s.value.push(m()), r(e, !0), y();
308
- }
309
- function x() {
310
- if (s.value.length === 0) return;
311
- g();
312
- let e = s.value.pop();
313
- o.value.push(m()), r(e, !0), y();
314
- }
315
- function S() {
316
- o.value = [], s.value = [], g();
317
- }
318
- function C() {
319
- S(), u &&= (clearTimeout(u), null);
320
- }
321
- return {
322
- canUndo: f,
323
- canRedo: p,
324
- isNavigating: l,
325
- undo: b,
326
- redo: x,
327
- record: _,
328
- recordDebounced: v,
329
- clear: S,
330
- destroy: C
331
- };
332
- }
333
- function G(e) {
334
- let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
335
- function o(n, r, a) {
336
- let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = O(n, o);
337
- return t(s, r, a), i(s.id), s;
338
- }
339
- function s(e, n, r) {
340
- let o = C(e);
341
- if (n !== void 0 || r !== void 0) t(o, n, r);
342
- else {
343
- let i = a?.(e.id) ?? null;
344
- i ? t(o, i.targetSectionId, i.columnIndex, i.index + 1) : t(o, n, r);
345
- }
346
- return i(o.id), o;
347
- }
348
- function c(e) {
349
- n(e);
350
- }
351
- function l(e, t, n) {
352
- r(e, { [t]: n });
353
- }
354
- return {
355
- createAndAddBlock: o,
356
- duplicateBlock: s,
357
- deleteBlock: c,
358
- updateBlockProperty: l
359
- };
360
- }
361
- var K = 2e3;
362
- function q(e) {
363
- let { content: t, isDirty: n, onChange: r, debounce: i = K, enabled: a = !0 } = e, o = null, s = !1;
364
- function c() {
365
- return typeof a == "function" ? a() : a;
366
- }
367
- function l() {
368
- s = !0, d();
369
- }
370
- function u() {
371
- s = !1;
372
- }
373
- function d() {
374
- o &&= (clearTimeout(o), null);
375
- }
376
- function f() {
377
- d(), n() && r(JSON.parse(JSON.stringify(t.value)));
378
- }
379
- function p() {
380
- c() && !s && (d(), o = setTimeout(() => {
381
- o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
382
- }, i));
383
- }
384
- let m = h(t, () => {
385
- p();
386
- }, { deep: !0 });
387
- function g() {
388
- m(), d();
389
- }
390
- return {
391
- flush: f,
392
- cancel: d,
393
- pause: l,
394
- resume: u,
395
- destroy: g
396
- };
397
- }
398
- function J(e) {
399
- let t = s(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
400
- function i(e) {
401
- return t.has(e);
402
- }
403
- function a(n) {
404
- t.has(n) ? t.delete(n) : (t.add(n), e.state.selectedBlockId === n && e.selectBlock(null));
405
- }
406
- function o() {
407
- t.clear();
408
- }
409
- return {
410
- isHidden: i,
411
- toggleBlock: a,
412
- reset: o,
413
- hasHiddenBlocks: r
414
- };
415
- }
416
- function Y(e) {
417
- let t = c(!1), r = c(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
418
- async function o() {
419
- let n = e.definition.value;
420
- if (n?.dataSource) {
421
- t.value = !0, r.value = !1;
422
- try {
423
- let t = await n.dataSource.onFetch({
424
- fieldValues: { ...e.block.value.fieldValues },
425
- blockId: e.block.value.id
426
- });
427
- if (t == null) return;
428
- let r = { ...e.block.value.fieldValues };
429
- for (let e of Object.keys(r)) e in t && (r[e] = t[e]);
430
- e.onUpdate(r, !0);
431
- } catch (e) {
432
- console.warn("[Templatical] Data source fetch error:", e), r.value = !0;
433
- } finally {
434
- t.value = !1;
435
- }
436
- }
437
- }
438
- return {
439
- isFetching: t,
440
- fetchError: r,
441
- fetch: o,
442
- hasDataSource: i,
443
- needsFetch: a
444
- };
445
- }
446
- function X(e, t) {
447
- let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
448
- e.addBlock = (r, i, a, o) => {
449
- i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
450
- }, e.removeBlock = (n) => {
451
- e.isBlockLocked(n) || (t.record(), r(n));
452
- }, e.moveBlock = (n, r, a, o) => {
453
- e.isBlockLocked(n) || a && e.isBlockLocked(a) || (t.record(), i(n, r, a, o));
454
- }, e.updateBlock = (n, r) => {
455
- e.isBlockLocked(n) || (t.recordDebounced(n), a(n, r));
456
- }, e.updateSettings = (e) => {
457
- t.record(), o(e);
458
- };
459
- }
460
- function Z(e) {
461
- let { provider: t } = e, n = c([]), r = c(!1), i = v(() => {
462
- let e = /* @__PURE__ */ new Set();
463
- for (let t of n.value) {
464
- let n = t.category?.trim();
465
- n && e.add(n);
466
- }
467
- return [...e].sort((e, t) => e.localeCompare(t));
468
- }), a = v(() => typeof t.create == "function"), o = v(() => typeof t.update == "function"), s = v(() => typeof t.delete == "function");
469
- function l(e) {
470
- return o.value && e.canUpdate !== !1;
471
- }
472
- function u(e) {
473
- return s.value && e.canDelete !== !1;
474
- }
475
- function d(e, t) {
476
- throw new S(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
477
- }
478
- function f(t) {
479
- B(e.onError, t);
480
- }
481
- async function p(i) {
482
- r.value = !0;
483
- try {
484
- n.value = await t.list(i);
485
- } catch (t) {
486
- throw e.onError?.(t), t;
487
- } finally {
488
- r.value = !1;
489
- }
490
- }
491
- async function m(r, i, a) {
492
- let { create: o } = t;
493
- typeof o != "function" && d("create", "disabled by the provider");
494
- try {
495
- let e = await o(a ? {
496
- name: r,
497
- content: i,
498
- category: a
499
- } : {
500
- name: r,
501
- content: i
502
- });
503
- return n.value = [e, ...n.value], f(() => t.onCreated?.(e)), e;
504
- } catch (t) {
505
- throw e.onError?.(t), t;
506
- }
507
- }
508
- async function h(r, i) {
509
- let { update: a } = t;
510
- typeof a != "function" && d("update", "disabled by the provider");
511
- let o = n.value.find((e) => e.id === r);
512
- o && o.canUpdate === !1 && d("update", `not permitted for entry "${r}"`);
513
- try {
514
- let e = await a(r, i);
515
- return n.value = n.value.map((t) => t.id === r ? e : t), f(() => t.onUpdated?.(e)), e;
516
- } catch (t) {
517
- throw e.onError?.(t), t;
518
- }
519
- }
520
- async function g(r) {
521
- let { delete: i } = t;
522
- typeof i != "function" && d("delete", "disabled by the provider");
523
- let a = n.value.find((e) => e.id === r) ?? null;
524
- a && a.canDelete === !1 && d("delete", `not permitted for entry "${r}"`);
525
- try {
526
- await i(r), n.value = n.value.filter((e) => e.id !== r), a && f(() => t.onDeleted?.(a));
527
- } catch (t) {
528
- throw e.onError?.(t), t;
529
- }
530
- }
531
- return {
532
- savedBlocks: n,
533
- isLoading: r,
534
- categories: i,
535
- canCreate: a,
536
- canUpdate: o,
537
- canDelete: s,
538
- canUpdateBlock: l,
539
- canDeleteBlock: u,
540
- load: p,
541
- create: m,
542
- update: h,
543
- remove: g
544
- };
545
- }
546
- var ne = "templatical:saved-blocks";
547
- function re(e = {}) {
548
- let t = e.key ?? ne;
549
- function n() {
550
- 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.");
551
- return localStorage;
552
- }
553
- function r() {
554
- let e = n().getItem(t);
555
- if (!e) return [];
556
- try {
557
- let t = JSON.parse(e);
558
- return Array.isArray(t) ? t : [];
559
- } catch {
560
- return [];
561
- }
562
- }
563
- function i(e) {
564
- n().setItem(t, JSON.stringify(e));
565
- }
566
- return {
567
- async list(e) {
568
- let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
569
- return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
570
- },
571
- async create(e) {
572
- let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
573
- id: x(),
574
- name: e.name,
575
- content: e.content,
576
- ...e.category ? { category: e.category } : {},
577
- createdAt: t,
578
- updatedAt: t
579
- };
580
- return i([n, ...r()]), n;
581
- },
582
- async update(e, t) {
583
- let n = r(), a = n.findIndex((t) => t.id === e);
584
- if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
585
- let o = {
586
- ...n[a],
587
- ...t,
588
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
589
- }, s = [...n];
590
- return s[a] = o, i(s), o;
591
- },
592
- async delete(e) {
593
- let t = r();
594
- if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
595
- i(t.filter((t) => t.id !== e));
596
- }
597
- };
598
- }
599
- var ie = "templatical:media", ae = 50;
600
- function oe(e = {}) {
601
- let t = e.key ?? ie;
602
- function n() {
603
- 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.");
604
- return localStorage;
605
- }
606
- function r() {
607
- let e = n().getItem(t);
608
- if (!e) return [];
609
- try {
610
- let t = JSON.parse(e);
611
- return Array.isArray(t) ? t : [];
612
- } catch {
613
- return [];
614
- }
615
- }
616
- function i(e) {
617
- n().setItem(t, JSON.stringify(e));
618
- }
619
- function a(e) {
620
- return typeof FileReader > "u" ? Promise.reject(/* @__PURE__ */ Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with FileReader.")) : new Promise((t, n) => {
621
- let r = new FileReader();
622
- r.onload = () => {
623
- typeof r.result == "string" ? t(r.result) : n(/* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
624
- }, r.onerror = () => {
625
- n(r.error ?? /* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
626
- }, r.readAsDataURL(e);
627
- });
628
- }
629
- return {
630
- async list(e) {
631
- let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
632
- let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
633
- return t.includes(n) || r.includes(n);
634
- }) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + ae), c = { items: s }, l = o + s.length;
635
- return l < i.length && (c.nextCursor = String(l)), c;
636
- },
637
- async create(e) {
638
- let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
639
- id: x(),
640
- url: t,
641
- filename: e.filename || e.file.name,
642
- createdAt: n,
643
- updatedAt: n,
644
- size: e.file.size
645
- };
646
- 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;
647
- },
648
- async update(e, t) {
649
- let n = r(), a = n.findIndex((t) => t.id === e);
650
- if (a === -1) throw Error(`[Templatical] Media asset not found: ${e}`);
651
- let o = n[a], s = {
652
- ...o,
653
- ...t,
654
- id: o.id,
655
- url: o.url,
656
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
657
- }, c = [...n];
658
- return c[a] = s, i(c), s;
659
- },
660
- async delete(e) {
661
- let t = r();
662
- for (let n of e) if (!t.some((e) => e.id === n)) throw Error(`[Templatical] Media asset not found: ${n}`);
663
- let n = new Set(e);
664
- i(t.filter((e) => !n.has(e.id)));
665
- },
666
- folders: !1,
667
- replace: !1,
668
- importFromUrl: !1,
669
- checkUsage: !1,
670
- frequentlyUsed: !1,
671
- storage: !1
672
- };
673
- }
674
- function se(e) {
675
- let { provider: t, getTemplateId: n } = e, r = c([]), i = c(!1), a = c(void 0), o = c(!1), s = /* @__PURE__ */ new Map(), l = v(() => typeof t.create == "function"), u = v(() => typeof t.restore == "function");
676
- function d(e) {
677
- let t = n();
678
- if (!t) throw new S(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
679
- return t;
680
- }
681
- function f(e) {
682
- throw new S(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
683
- }
684
- function p(t) {
685
- B(e.onError, t);
686
- }
687
- async function m(n) {
688
- let o = d("list");
689
- i.value = !0;
690
- try {
691
- let e = await t.list(o, n);
692
- r.value = e.versions, a.value = e.nextCursor;
693
- } catch (t) {
694
- throw e.onError?.(t), t;
695
- } finally {
696
- i.value = !1;
697
- }
698
- }
699
- function h(e) {
700
- return e.content ?? s.get(e.id) ?? null;
701
- }
702
- async function g(n) {
703
- let r = h(n);
704
- if (r) return r;
705
- let i = d("get");
706
- try {
707
- let e = await t.get(i, n.id);
708
- return s.set(n.id, e), e;
709
- } catch (t) {
710
- throw e.onError?.(t), t;
711
- }
712
- }
713
- async function _(n, i) {
714
- let { create: a } = t;
715
- typeof a != "function" && f("create");
716
- let o = d("create");
717
- try {
718
- let e = await a(o, n, i);
719
- return r.value = [e, ...r.value], p(() => t.onCreated?.(e)), e;
720
- } catch (t) {
721
- throw e.onError?.(t), t;
722
- }
723
- }
724
- async function y(n) {
725
- let { restore: r } = t;
726
- typeof r != "function" && f("restore");
727
- let i = d("restore"), a;
728
- o.value = !0;
729
- try {
730
- a = await r(i, n);
731
- } catch (t) {
732
- throw e.onError?.(t), t;
733
- } finally {
734
- o.value = !1;
735
- }
736
- return p(() => t.onRestored?.(a)), a;
737
- }
738
- return {
739
- nextCursor: a,
740
- versions: r,
741
- isLoading: i,
742
- isRestoring: o,
743
- canCreate: l,
744
- canRestore: u,
745
- load: m,
746
- peekContent: h,
747
- resolveContent: g,
748
- create: _,
749
- restore: y
750
- };
751
- }
752
- function ce(e) {
753
- let { provider: t, getTemplateId: n, getUser: r } = e, i = c([]), a = c(!1), o = c(!1), s = v(() => typeof t.create == "function"), l = v(() => typeof t.update == "function"), u = v(() => typeof t.delete == "function"), d = v(() => typeof t.setResolved == "function"), f = v(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), p = v(() => i.value.filter((e) => !e.resolvedAt).length), m = v(() => {
754
- let e = /* @__PURE__ */ new Map();
755
- for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
756
- return e;
757
- });
758
- function h(e) {
759
- let t = n();
760
- if (!t) throw new S(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
761
- return t;
762
- }
763
- function g(e) {
764
- let t = r();
765
- if (!t) throw new S(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
766
- return t;
767
- }
768
- function _(e) {
769
- throw new S(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
770
- }
771
- function y(e) {
772
- for (let t of i.value) {
773
- if (t.id === e) return t;
774
- for (let n of t.replies ?? []) if (n.id === e) return n;
775
- }
776
- return null;
777
- }
778
- function b(e) {
779
- let t = r();
780
- return t !== null && e.author.id === t.id;
781
- }
782
- function x(t) {
783
- let n = z(t);
784
- throw e.onError?.(n), n;
785
- }
786
- function C(t) {
787
- B(e.onError, t);
788
- }
789
- function w(e, t, n) {
790
- return [
791
- ...e.slice(0, t),
792
- n,
793
- ...e.slice(t + 1)
794
- ];
795
- }
796
- function T(e, t) {
797
- return e !== void 0 && JSON.stringify(e) === JSON.stringify(t);
798
- }
799
- function E(e) {
800
- if (e.parentId) {
801
- let t = !1, n = i.value.map((n) => {
802
- if (n.id !== e.parentId) return n;
803
- let r = n.replies ?? [], i = r.findIndex((t) => t.id === e.id);
804
- return i !== -1 && T(r[i], e) ? n : (t = !0, {
805
- ...n,
806
- replies: i === -1 ? [...r, e] : w(r, i, e)
807
- });
808
- });
809
- return t && (i.value = n), t;
810
- }
811
- let t = i.value.findIndex((t) => t.id === e.id);
812
- if (t === -1) return i.value = [...i.value, e], !0;
813
- let n = {
814
- ...e,
815
- replies: e.replies ?? i.value[t].replies
816
- };
817
- return !T(i.value[t], n) && (i.value = w(i.value, t, n), !0);
818
- }
819
- function D(e, t) {
820
- let n = y(e), r = t ?? n?.parentId ?? null;
821
- return r ? i.value = i.value.map((t) => t.id === r ? {
822
- ...t,
823
- replies: (t.replies ?? []).filter((t) => t.id !== e)
824
- } : t) : i.value = i.value.filter((t) => t.id !== e), n;
825
- }
826
- async function O(e) {
827
- let n = h("list");
828
- a.value = !0;
829
- try {
830
- i.value = await t.list(n, e);
831
- } catch (e) {
832
- x(e);
833
- } finally {
834
- a.value = !1;
835
- }
836
- }
837
- async function k(e) {
838
- let { create: n } = t;
839
- typeof n != "function" && _("create");
840
- let r = h("create");
841
- g("create"), o.value = !0;
842
- try {
843
- let i = await n(r, e);
844
- return E(i), C(() => t.onCreated?.(i, { origin: "local" })), i;
845
- } catch (e) {
846
- x(e);
847
- } finally {
848
- o.value = !1;
849
- }
850
- }
851
- async function A(e, n) {
852
- let { update: r } = t;
853
- typeof r != "function" && _("update");
854
- let i = h("update");
855
- g("update"), o.value = !0;
856
- try {
857
- let a = await r(i, e, n);
858
- return E(a), C(() => t.onUpdated?.(a, { origin: "local" })), a;
859
- } catch (e) {
860
- x(e);
861
- } finally {
862
- o.value = !1;
863
- }
864
- }
865
- async function j(e) {
866
- let { delete: n } = t;
867
- typeof n != "function" && _("delete");
868
- let r = h("delete");
869
- g("delete");
870
- let i = y(e);
871
- o.value = !0;
872
- try {
873
- await n(r, e), D(e), i && C(() => t.onDeleted?.(i, { origin: "local" }));
874
- } catch (e) {
875
- x(e);
876
- } finally {
877
- o.value = !1;
878
- }
879
- }
880
- async function M(e, n) {
881
- let { setResolved: r } = t;
882
- typeof r != "function" && _("setResolved");
883
- let i = h("setResolved");
884
- g("setResolved"), o.value = !0;
885
- try {
886
- let a = await r(i, e, n);
887
- return E(a), C(() => (a.resolvedAt ? t.onResolved : t.onUnresolved)?.(a, { origin: "local" })), a;
888
- } catch (e) {
889
- x(e);
890
- } finally {
891
- o.value = !1;
892
- }
893
- }
894
- function N(e) {
895
- E(e) && C(() => t.onCreated?.(e, { origin: "remote" }));
896
- }
897
- function P(e) {
898
- E(e) && C(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
899
- }
900
- function F(e, n) {
901
- let r = D(e, n);
902
- r && C(() => t.onDeleted?.(r, { origin: "remote" }));
903
- }
904
- return {
905
- comments: i,
906
- isLoading: a,
907
- isSubmitting: o,
908
- canCreate: s,
909
- canUpdate: l,
910
- canDelete: u,
911
- canResolve: d,
912
- totalCount: f,
913
- unresolvedCount: p,
914
- commentCountByBlock: m,
915
- load: O,
916
- create: k,
917
- update: A,
918
- remove: j,
919
- setResolved: M,
920
- find: y,
921
- isOwn: b,
922
- applyRemoteCreate: N,
923
- applyRemoteUpdate: P,
924
- applyRemoteDelete: F
925
- };
926
- }
927
- function le(e) {
928
- let { comments: t, provider: n, getTemplateId: a } = e, { subscribe: o } = n;
929
- if (typeof o != "function") return;
930
- let s = null;
931
- function c() {
932
- s?.(), s = null;
933
- }
934
- i(() => a(), (e) => {
935
- c(), e && (s = o(e, (e) => {
936
- switch (e.type) {
937
- case "created":
938
- t.applyRemoteCreate(e.comment);
939
- break;
940
- case "updated":
941
- t.applyRemoteUpdate(e.comment);
942
- break;
943
- case "deleted": t.applyRemoteDelete(e.commentId, e.parentId);
944
- }
945
- }));
946
- }, { immediate: !0 }), r(c);
947
- }
948
- //#endregion
949
- //#region src/utils/blockTypeLabels.ts
950
- function Q(e, t) {
951
- return t.blocks[e] ?? e;
952
- }
953
- function ue(e, t, n = []) {
954
- if (e.type !== "custom") return Q(e.type, t);
955
- let { customType: r } = e;
956
- return n.find((e) => e.type === r)?.name ?? r;
957
- }
958
- //#endregion
959
- //#region src/utils/resolveFieldColors.ts
960
- function de(e, t) {
961
- let n = P({ presets: e.presets }, N), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
962
- return {
963
- presets: r ? t.presets : n.presets,
964
- allowCustom: t.allowCustom !== !1 && i,
965
- invalidPresets: n.invalidPresets,
966
- emptyPresets: e.presets !== void 0 && e.presets.length === 0,
967
- presetsInherited: r,
968
- allowCustomIgnored: e.allowCustom === !0 && t.allowCustom === !1
969
- };
970
- }
971
- var fe = F({
972
- name: "code",
973
- size: 24,
974
- node: [["path", {
975
- d: "m16 18 6-6-6-6",
976
- key: "eg8j8"
977
- }], ["path", {
978
- d: "m8 6-6 6 6 6",
979
- key: "ppft3o"
980
- }]]
981
- }), $ = F({
982
- name: "image",
983
- size: 24,
984
- node: [
985
- ["rect", {
986
- width: "18",
987
- height: "18",
988
- x: "3",
989
- y: "3",
990
- rx: "2",
991
- ry: "2",
992
- key: "1m3agn"
993
- }],
994
- ["circle", {
995
- cx: "9",
996
- cy: "9",
997
- r: "2",
998
- key: "af1f0g"
999
- }],
1000
- ["path", {
1001
- d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
1002
- key: "1xmnt7"
1003
- }]
1004
- ]
1005
- }), pe = F({
1006
- name: "navigation",
1007
- size: 24,
1008
- node: [["polygon", {
1009
- points: "3 11 22 2 13 21 11 13 3 11",
1010
- key: "1ltx0t"
1011
- }]]
1012
- }), me = F({
1013
- name: "share-2",
1014
- size: 24,
1015
- node: [
1016
- ["circle", {
1017
- cx: "18",
1018
- cy: "5",
1019
- r: "3",
1020
- key: "gq8acd"
1021
- }],
1022
- ["circle", {
1023
- cx: "6",
1024
- cy: "12",
1025
- r: "3",
1026
- key: "w7nqdw"
1027
- }],
1028
- ["circle", {
1029
- cx: "18",
1030
- cy: "19",
1031
- r: "3",
1032
- key: "1xt0gg"
1033
- }],
1034
- ["line", {
1035
- x1: "8.59",
1036
- x2: "15.42",
1037
- y1: "13.51",
1038
- y2: "17.49",
1039
- key: "47mynk"
1040
- }],
1041
- ["line", {
1042
- x1: "15.41",
1043
- x2: "8.59",
1044
- y1: "6.51",
1045
- y2: "10.49",
1046
- key: "1n3mei"
1047
- }]
1048
- ]
1049
- }), he = F({
1050
- name: "table",
1051
- size: 24,
1052
- node: [
1053
- ["path", {
1054
- d: "M12 3v18",
1055
- key: "108xh3"
1056
- }],
1057
- ["rect", {
1058
- width: "18",
1059
- height: "18",
1060
- x: "3",
1061
- y: "3",
1062
- rx: "2",
1063
- key: "afitv7"
1064
- }],
1065
- ["path", {
1066
- d: "M3 9h18",
1067
- key: "1pudct"
1068
- }],
1069
- ["path", {
1070
- d: "M3 15h18",
1071
- key: "5xshup"
1072
- }]
1073
- ]
1074
- }), ge = /* @__PURE__ */ y({
1075
- __name: "MediaDropOverlay",
1076
- props: {
1077
- uploading: { type: Boolean },
1078
- size: { default: "field" }
1079
- },
1080
- setup(n) {
1081
- let r = n, { t: i } = M(), a = {
1082
- field: {
1083
- gap: "tpl:gap-1.5",
1084
- icon: 18,
1085
- veil: "90%"
1086
- },
1087
- canvas: {
1088
- gap: "tpl:gap-2",
1089
- icon: 20,
1090
- veil: "85%"
1091
- }
1092
- }, o = v(() => a[r.size]);
1093
- return (r, a) => (e(), u("div", {
1094
- class: m(["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)]", o.value.gap]),
1095
- style: t({ backgroundColor: `color-mix(in srgb, var(--tpl-bg) ${o.value.veil}, transparent)` })
1096
- }, [n.uploading ? (e(), u(g, { key: 0 }, [d(l(I), {
1097
- class: "tpl-spinner",
1098
- size: o.value.icon,
1099
- "stroke-width": 2
1100
- }, null, 8, ["size"]), f(" " + p(l(i).image.uploading), 1)], 64)) : (e(), u(g, { key: 1 }, [d(l(L), {
1101
- size: o.value.icon,
1102
- "stroke-width": 1.5
1103
- }, null, 8, ["size"]), f(" " + p(l(i).image.dropToUpload), 1)], 64))], 6));
1104
- }
1105
- }), _e = "image/";
1106
- function ve(e) {
1107
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || _(r), { isOverDropZone: a } = k(t, {
1108
- preventDefaultForUnhandled: !0,
1109
- onDrop: (e) => {
1110
- if (!i()) return;
1111
- let t = (e ?? []).filter((e) => e.type.startsWith(_e));
1112
- t.length > 0 && n([t[0]]);
1113
- }
1114
- });
1115
- return { isOver: v(() => i() && a.value) };
1116
- }
1117
- //#endregion
1118
- //#region src/composables/useMediaDropField.ts
1119
- function ye(e) {
1120
- let { target: t, blocked: n, apply: r } = e, i = a(A, null), o = a(j, null), s = R();
1121
- async function l() {
1122
- let e = await i?.({ accept: ["images"] });
1123
- s.alive && e && r(e);
1124
- }
1125
- let u = c(!1), d = v(() => (o?.value ?? !!i) && !u.value && !_(n));
1126
- async function f(e) {
1127
- if (i) {
1128
- u.value = !0;
1129
- try {
1130
- let t = await i({
1131
- accept: ["images"],
1132
- files: e
1133
- });
1134
- if (!s.alive) return;
1135
- t && r(t);
1136
- } finally {
1137
- s.alive && (u.value = !1);
1138
- }
1139
- }
1140
- }
1141
- let { isOver: p } = ve({
1142
- target: t,
1143
- enabled: d,
1144
- onFiles: f
1145
- }), m = v(() => d.value && p.value || u.value);
1146
- return {
1147
- canBrowse: !!i,
1148
- dropEnabled: d,
1149
- isUploading: u,
1150
- showOverlay: m,
1151
- openMediaBrowser: l
1152
- };
1153
- }
1154
- //#endregion
1155
- //#region src/constants/socialIcons.ts
1156
- var be = T, xe = {
1157
- small: 24,
1158
- medium: 32,
1159
- large: 48
1160
- }, Se = [
1161
- "facebook",
1162
- "twitter",
1163
- "instagram",
1164
- "linkedin",
1165
- "youtube",
1166
- "tiktok",
1167
- "pinterest",
1168
- "email",
1169
- "website",
1170
- "whatsapp",
1171
- "telegram",
1172
- "discord",
1173
- "snapchat",
1174
- "reddit",
1175
- "github",
1176
- "dribbble",
1177
- "behance"
1178
- ];
1179
- //#endregion
1180
- export { ee as C, se as D, Z as E, Y as S, X as T, q as _, ge as a, ce as b, pe as c, de as d, ue as f, re as g, oe as h, ye as i, $ as l, K as m, be as n, he as o, Q as p, Se as r, me as s, xe as t, fe as u, G as v, W as w, J as x, le as y };