@templatical/editor 0.46.0 → 0.47.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 (305) hide show
  1. package/dist/{AiChatSidebar-DGcH4Lyo.js → AiChatSidebar-BPOv5Ra8.js} +14 -14
  2. package/dist/{AiFeatureMenu-B4q-0g1S.js → AiFeatureMenu-H_WT4YR8.js} +7 -7
  3. package/dist/{BlockIssueBadge-CZA1XvAh.js → BlockIssueBadge-AgO5abEB.js} +5 -5
  4. package/dist/BlockPreviewCanvas-CZDBSPoG.js +136 -0
  5. package/dist/{CloudHeaderExtras-ehMYJP68.js → CloudHeaderExtras-gXsTYoGG.js} +5 -5
  6. package/dist/{CloudPanels-BwOaAlKz.js → CloudPanels-H_GdbOfZ.js} +9 -9
  7. package/dist/{CollaboratorBar-qOZFRNPx.js → CollaboratorBar-BazGNMqN.js} +4 -4
  8. package/dist/{CommentsPanel-Bn6P5crU.js → CommentsPanel-CMgsG_yh.js} +2 -2
  9. package/dist/{CommentsSidebar-B8wT932T.js → CommentsSidebar-DCh8DTP8.js} +14 -14
  10. package/dist/CountdownBlock-zx39Dyby.js +92 -0
  11. package/dist/{CountdownToolbar-BeF21SeB.js → CountdownToolbar-DVuucA3v.js} +7 -7
  12. package/dist/{DesignReferenceSidebar-zH93uB15.js → DesignReferenceSidebar-DxNV4lQp.js} +12 -12
  13. package/dist/{IssuesPanel-Dltw9haP.js → IssuesPanel-CUpW54P4.js} +8 -8
  14. package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
  15. package/dist/{LogicTagInsertButton-CHa-UD76.js → LogicTagInsertButton-DDYKnqmj.js} +13 -13
  16. package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-D_we0Scr.js} +4 -4
  17. package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-L95BwWV1.js} +2 -2
  18. package/dist/{MergeTagInput-B3ntd4dN.js → MergeTagInput-DAL998tx.js} +3 -3
  19. package/dist/{MergeTagModeToggle-C_06ZL0Q.js → MergeTagModeToggle-CjHO26rb.js} +7 -7
  20. package/dist/{ParagraphEditor-CxuW3TV0.js → ParagraphEditor-CcEN1N6n.js} +165 -150
  21. package/dist/{RestoreVersionDialog-B1n37M1Z.js → RestoreVersionDialog-B2OH5rgs.js} +6 -6
  22. package/dist/{RichTextEditorContent-CP_uULWB.js → RichTextEditorContent-BGeTg-QL.js} +12 -12
  23. package/dist/{SaveBlockDialog-BSKX_7_v.js → SaveBlockDialog-CCVyU-7y.js} +13 -13
  24. package/dist/{SavedBlocksBrowserModal-CHKrH1gO.js → SavedBlocksBrowserModal-_WmSeqIh.js} +14 -14
  25. package/dist/{SavedBlocksPanels-B-xDqBcz.js → SavedBlocksPanels-DVX_ruQ7.js} +2 -2
  26. package/dist/{SavedBlocksPickBar-D2J-g82g.js → SavedBlocksPickBar-DVJC28hP.js} +5 -5
  27. package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-U0QFiwdI.js} +16 -16
  28. package/dist/{TemplateSettings-D07K_Y4m.js → TemplateSettings-CdhTm9JQ.js} +12 -12
  29. package/dist/{TestEmailModal-BNPw_lID.js → TestEmailModal-BqToA_ls.js} +14 -14
  30. package/dist/{TestEmailPanel-8klWo8hE.js → TestEmailPanel-Cn4Ptq0j.js} +2 -2
  31. package/dist/{TitleEditor-CmC9OuhA.js → TitleEditor-CZdqeltH.js} +13 -13
  32. package/dist/{ToggleSwitch-COeyWGfT.js → ToggleSwitch-BR8Sgzib.js} +2 -2
  33. package/dist/{Toolbar-CqhRb6EM.js → Toolbar-OGakTBEg.js} +747 -628
  34. package/dist/{TplModal-BGFawHY9.js → TplModal-CoczSDma.js} +6 -6
  35. package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-DY5z5FZr.js} +10 -10
  36. package/dist/{VersionHistoryPanels-DdbGjEOR.js → VersionHistoryPanels-DowHeDAQ.js} +2 -2
  37. package/dist/{VersionPreviewBanner-BUKb9gc6.js → VersionPreviewBanner-Bo8NxBbh.js} +4 -4
  38. package/dist/WrapperBlock-BOABSX9W.js +46 -0
  39. package/dist/{blockTypeIcons-CVKo6V_v.js → blockTypeIcons-4E1U8f99.js} +5 -5
  40. package/dist/bundle-stats.json +6 -6
  41. package/dist/{ca-C__Dzq--.js → ca-DMoGGP9L.js} +21 -0
  42. package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js → AiChatSidebar-B72rI0be.js} +12 -12
  43. package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js.map → AiChatSidebar-B72rI0be.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js → AiFeatureMenu-BqSG9iEd.js} +6 -6
  45. package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js.map → AiFeatureMenu-BqSG9iEd.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js → BlockIssueBadge-CS7ytN-z.js} +5 -5
  47. package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js.map → BlockIssueBadge-CS7ytN-z.js.map} +1 -1
  48. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +138 -0
  49. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +1 -0
  50. package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js → CloudHeaderExtras-DJXLTUHc.js} +5 -5
  51. package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js.map → CloudHeaderExtras-DJXLTUHc.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js → CloudPanels-D1fPLjG8.js} +8 -8
  53. package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js.map → CloudPanels-D1fPLjG8.js.map} +1 -1
  54. package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js → CollaboratorBar-MeRQB1eN.js} +5 -5
  55. package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js.map → CollaboratorBar-MeRQB1eN.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js → CommentsPanel-CmxPylNf.js} +3 -3
  57. package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js.map → CommentsPanel-CmxPylNf.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js → CommentsSidebar-CrleQTbo.js} +13 -13
  59. package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js.map → CommentsSidebar-CrleQTbo.js.map} +1 -1
  60. package/dist/cdn/chunks/CountdownBlock-Dasj191h.js +94 -0
  61. package/dist/cdn/chunks/CountdownBlock-Dasj191h.js.map +1 -0
  62. package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js → CountdownToolbar-DPIOtlN0.js} +8 -8
  63. package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js.map → CountdownToolbar-DPIOtlN0.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js → DesignReferenceSidebar-BgTNqgCy.js} +8 -8
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js.map → DesignReferenceSidebar-BgTNqgCy.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js → IssuesPanel-BGjLcNpQ.js} +6 -6
  67. package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js.map → IssuesPanel-BGjLcNpQ.js.map} +1 -1
  68. package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js → LoadingTrack-DbH97JR9.js} +2 -2
  69. package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js.map → LoadingTrack-DbH97JR9.js.map} +1 -1
  70. package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js → LogicTagInsertButton-BEsqPhMr.js} +11 -11
  71. package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js.map → LogicTagInsertButton-BEsqPhMr.js.map} +1 -1
  72. package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js → MediaEditModal-C1Ao0i2c.js} +4 -4
  73. package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js.map → MediaEditModal-C1Ao0i2c.js.map} +1 -1
  74. package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js → MediaPanels-1GPYiZZ0.js} +3 -3
  75. package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js.map → MediaPanels-1GPYiZZ0.js.map} +1 -1
  76. package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js → MergeTagInput-Dy13_OLc.js} +4 -4
  77. package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js.map → MergeTagInput-Dy13_OLc.js.map} +1 -1
  78. package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js → MergeTagModeToggle-B2CPZOeF.js} +6 -6
  79. package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js.map → MergeTagModeToggle-B2CPZOeF.js.map} +1 -1
  80. package/dist/cdn/chunks/{ParagraphEditor-DndEFXmR.js → ParagraphEditor-BGLIw7kg.js} +91 -76
  81. package/dist/cdn/chunks/ParagraphEditor-BGLIw7kg.js.map +1 -0
  82. package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js → RestoreVersionDialog-BhykE8En.js} +8 -8
  83. package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js.map → RestoreVersionDialog-BhykE8En.js.map} +1 -1
  84. package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js → RichTextEditorContent-B-txUvPL.js} +11 -11
  85. package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js.map → RichTextEditorContent-B-txUvPL.js.map} +1 -1
  86. package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js → SaveBlockDialog-BHqEp7jw.js} +40 -40
  87. package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js.map → SaveBlockDialog-BHqEp7jw.js.map} +1 -1
  88. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js → SavedBlocksBrowserModal-BhR6AI0f.js} +10 -10
  89. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js.map → SavedBlocksBrowserModal-BhR6AI0f.js.map} +1 -1
  90. package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js → SavedBlocksPanels-YwffJtfY.js} +3 -3
  91. package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js.map → SavedBlocksPanels-YwffJtfY.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js → SavedBlocksPickBar-BtpFU7es.js} +6 -6
  93. package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js.map → SavedBlocksPickBar-BtpFU7es.js.map} +1 -1
  94. package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js → TemplateScoringPanel-N4ySFh5w.js} +12 -12
  95. package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js.map → TemplateScoringPanel-N4ySFh5w.js.map} +1 -1
  96. package/dist/cdn/chunks/{TemplateSettings-rZiHmq24.js → TemplateSettings-C7b5X34U.js} +13 -13
  97. package/dist/cdn/chunks/TemplateSettings-C7b5X34U.js.map +1 -0
  98. package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js → TestEmailModal-DHJKI5y5.js} +11 -11
  99. package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js.map → TestEmailModal-DHJKI5y5.js.map} +1 -1
  100. package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js → TestEmailPanel-lYtzTXpR.js} +3 -3
  101. package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js.map → TestEmailPanel-lYtzTXpR.js.map} +1 -1
  102. package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js → TitleEditor-5eY01ypW.js} +15 -15
  103. package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js.map → TitleEditor-5eY01ypW.js.map} +1 -1
  104. package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js → ToggleSwitch-BN8rMC2m.js} +3 -3
  105. package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js.map → ToggleSwitch-BN8rMC2m.js.map} +1 -1
  106. package/dist/cdn/chunks/{Toolbar-C_5HfUQq.js → Toolbar-Ik54UO_-.js} +696 -575
  107. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +1 -0
  108. package/dist/cdn/chunks/{TplModal-CYBbPCHL.js → TplModal-WIBiBrGy.js} +6 -6
  109. package/dist/cdn/chunks/TplModal-WIBiBrGy.js.map +1 -0
  110. package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js → VersionHistoryMenu-CZnlS9K5.js} +6 -6
  111. package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js.map → VersionHistoryMenu-CZnlS9K5.js.map} +1 -1
  112. package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js → VersionHistoryPanels-xjLSpR1e.js} +3 -3
  113. package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js.map → VersionHistoryPanels-xjLSpR1e.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js → VersionPreviewBanner-sARpn4hh.js} +5 -5
  115. package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js.map → VersionPreviewBanner-sARpn4hh.js.map} +1 -1
  116. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +48 -0
  117. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +1 -0
  118. package/dist/cdn/chunks/{blockTypeIcons-DdZP-3FM.js → blockTypeIcons-D3g5QzdT.js} +2 -2
  119. package/dist/cdn/chunks/{blockTypeIcons-DdZP-3FM.js.map → blockTypeIcons-D3g5QzdT.js.map} +1 -1
  120. package/dist/cdn/chunks/{ca-C__Dzq--.js → ca-DMoGGP9L.js} +22 -1
  121. package/dist/cdn/chunks/ca-DMoGGP9L.js.map +1 -0
  122. package/dist/cdn/chunks/{cloud-h1vaHp2p.js → cloud-Cd7ptfhL.js} +3 -3
  123. package/dist/cdn/chunks/{cloud-h1vaHp2p.js.map → cloud-Cd7ptfhL.js.map} +1 -1
  124. package/dist/cdn/chunks/{createCloudRuntime-bJN9EM1H.js → createCloudRuntime-DtIZ2Lee.js} +17 -8
  125. package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +1 -0
  126. package/dist/cdn/chunks/{de-CGjbQ2mt.js → de-DgAelLbM.js} +22 -1
  127. package/dist/cdn/chunks/de-DgAelLbM.js.map +1 -0
  128. package/dist/cdn/chunks/{dist-B7W-Lb65.js → dist-CjL6JHML.js} +3 -3
  129. package/dist/cdn/chunks/{dist-B7W-Lb65.js.map → dist-CjL6JHML.js.map} +1 -1
  130. package/dist/cdn/chunks/{dist-C5nRd_ua.js → dist-MNQYSEWU.js} +4 -4
  131. package/dist/cdn/chunks/{dist-C5nRd_ua.js.map → dist-MNQYSEWU.js.map} +1 -1
  132. package/dist/cdn/chunks/{draggable-BUTN5vZC.js → draggable-DrsNwZuB.js} +1673 -1595
  133. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +1 -0
  134. package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js → editor-modal-Bcwo0orC.js} +34 -34
  135. package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js.map → editor-modal-Bcwo0orC.js.map} +1 -1
  136. package/dist/cdn/chunks/en-BANFWZdr.js +1 -0
  137. package/dist/cdn/chunks/{en-BTiiAC-B.js → en-Dekrl7HA.js} +22 -1
  138. package/dist/cdn/chunks/en-Dekrl7HA.js.map +1 -0
  139. package/dist/cdn/chunks/{es-CdTOcSTf.js → es-BaZzyidV.js} +22 -1
  140. package/dist/cdn/chunks/es-BaZzyidV.js.map +1 -0
  141. package/dist/cdn/chunks/{extensions-CrmXF4MW.js → extensions-T-t8MKDb.js} +7 -7
  142. package/dist/cdn/chunks/{extensions-CrmXF4MW.js.map → extensions-T-t8MKDb.js.map} +1 -1
  143. package/dist/cdn/chunks/{fr-B6lcLLzC.js → fr-C5ucb1HK.js} +22 -1
  144. package/dist/cdn/chunks/fr-C5ucb1HK.js.map +1 -0
  145. package/dist/cdn/chunks/{icons-Dr9erFGs.js → icons-C4fX9Bwy.js} +27 -27
  146. package/dist/cdn/chunks/{icons-Dr9erFGs.js.map → icons-C4fX9Bwy.js.map} +1 -1
  147. package/dist/cdn/chunks/{ja-BhdkqENz.js → ja-CUgR3mV0.js} +22 -1
  148. package/dist/cdn/chunks/ja-CUgR3mV0.js.map +1 -0
  149. package/dist/cdn/chunks/{keys-BKu-LOk5.js → keys-HI-INbkz.js} +2 -2
  150. package/dist/cdn/chunks/{keys-BKu-LOk5.js.map → keys-HI-INbkz.js.map} +1 -1
  151. package/dist/{nl-CE3YItYg.js → cdn/chunks/nl-qrLY7hMS.js} +23 -0
  152. package/dist/cdn/chunks/nl-qrLY7hMS.js.map +1 -0
  153. package/dist/cdn/chunks/{preRenderCustomBlocks-CyGB3lZr.js → preRenderCustomBlocks-Co0oi0Jf.js} +4 -2
  154. package/dist/cdn/chunks/preRenderCustomBlocks-Co0oi0Jf.js.map +1 -0
  155. package/dist/cdn/chunks/{pt-BR-CUIT4rq4.js → pt-BR-C6hMTQYi.js} +22 -1
  156. package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +1 -0
  157. package/dist/cdn/chunks/socialIcons-DACw1wA8.js +1103 -0
  158. package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +1 -0
  159. package/dist/{dist-BI_LeQGl.js → cdn/chunks/src-BnJlDuyB.js} +392 -249
  160. package/dist/cdn/chunks/src-BnJlDuyB.js.map +1 -0
  161. package/dist/cdn/chunks/{src-BMw3u-iV.js → src-Bu0qBpbf.js} +214 -212
  162. package/dist/cdn/chunks/src-Bu0qBpbf.js.map +1 -0
  163. package/dist/cdn/chunks/{src-B0pZeTYO.js → src-CHlVFp7r.js} +308 -268
  164. package/dist/cdn/chunks/src-CHlVFp7r.js.map +1 -0
  165. package/dist/{styleConstants-C_YAPdQS.js → cdn/chunks/styleConstants-D1Jz-TFU.js} +9 -28
  166. package/dist/cdn/chunks/{styleConstants-C_YAPdQS.js.map → styleConstants-D1Jz-TFU.js.map} +1 -1
  167. package/dist/cdn/chunks/{tiptap-CYDXLO17.js → tiptap-BPigZk5G.js} +3258 -3098
  168. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +1 -0
  169. package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js → useAliveFlag-DCB96vzR.js} +2 -2
  170. package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js.map → useAliveFlag-DCB96vzR.js.map} +1 -1
  171. package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js → useCloudI18n-BBF4waXO.js} +3 -3
  172. package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js.map → useCloudI18n-BBF4waXO.js.map} +1 -1
  173. package/dist/cdn/chunks/{useEditorCore-DuC7kVti.js → useEditorCore-Bf2d1DKI.js} +543 -532
  174. package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +1 -0
  175. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +10 -0
  176. package/dist/cdn/chunks/{useEditorRoot-DDPIcEOO.js.map → useEditorRoot-CTc6O8al.js.map} +1 -1
  177. package/dist/cdn/chunks/{useI18n-DO4NTunW.js → useI18n-DUlyyIJJ.js} +3 -3
  178. package/dist/cdn/chunks/{useI18n-DO4NTunW.js.map → useI18n-DUlyyIJJ.js.map} +1 -1
  179. package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js → useLogicTag-3S63go4E.js} +4 -4
  180. package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js.map → useLogicTag-3S63go4E.js.map} +1 -1
  181. package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js → useMergeTag-BQtxUHq1.js} +4 -4
  182. package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js.map → useMergeTag-BQtxUHq1.js.map} +1 -1
  183. package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js → usePopoverPosition-IbaW6-Ao.js} +3 -3
  184. package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js.map → usePopoverPosition-IbaW6-Ao.js.map} +1 -1
  185. package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js → useScrollToBlock-uUa601I4.js} +3 -3
  186. package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js.map → useScrollToBlock-uUa601I4.js.map} +1 -1
  187. package/dist/cdn/chunks/withCurrentFont-DwJd-lKc.js +21 -0
  188. package/dist/cdn/chunks/{withCurrentFont-isIyuezD.js.map → withCurrentFont-DwJd-lKc.js.map} +1 -1
  189. package/dist/cdn/editor.css +1 -1
  190. package/dist/cdn/editor.js +614 -610
  191. package/dist/cdn/editor.js.map +1 -1
  192. package/dist/{check-ZKvtMdpe.js → check-B5R4zXr7.js} +1 -1
  193. package/dist/{chevron-down-RrwkYMlp.js → chevron-down-BKyl85NV.js} +1 -1
  194. package/dist/{chevron-right-CklHaa1U.js → chevron-right-BmToZ8qX.js} +1 -1
  195. package/dist/{chevron-up-DjN2NTbo.js → chevron-up-DNYdOxPC.js} +1 -1
  196. package/dist/{circle-alert-BR1_Yfb-.js → circle-alert-Dx9ju3YZ.js} +1 -1
  197. package/dist/{clock-BEagNj21.js → clock-Dv9bxsSH.js} +1 -1
  198. package/dist/{cloud-DPGjMGfv.js → cloud-DwjaAdwK.js} +2 -2
  199. package/dist/{copy-D6DNoSq1.js → copy-BsKl4dcy.js} +1 -1
  200. package/dist/{createCloudRuntime-D0RRgWab.js → createCloudRuntime-C8gpPsSi.js} +16 -7
  201. package/dist/{createLucideIcon-BAPyioGd.js → createLucideIcon-DziKp5iU.js} +6 -6
  202. package/dist/{de-CGjbQ2mt.js → de-DgAelLbM.js} +21 -0
  203. package/dist/{dist-Bd7khQsg.js → dist-3HpYixwF.js} +2 -2
  204. package/dist/{dist-lL3nVbxV.js → dist-BC-ZEYLd.js} +2 -2
  205. package/dist/dist-BPFcLKTw.js +5 -0
  206. package/dist/{cdn/chunks/src-Bh0MoJ67.js → dist-C8koXLhl.js} +295 -298
  207. package/dist/{dist-C-VFTX82.js → dist-CUWI-IvA.js} +2 -2
  208. package/dist/{dist-Bc30883t.js → dist-Cr7RPxI9.js} +5 -5
  209. package/dist/{dist-DapsJxn_.js → dist-CuLwJF7H.js} +2 -2
  210. package/dist/{dist-5KNKxglR.js → dist-CyBwSiAa.js} +2 -2
  211. package/dist/dist-D7Yj7E-F.js +5 -0
  212. package/dist/{dist-B_vYjCsk.js → dist-DAAJogrx.js} +3 -3
  213. package/dist/{dist-CMcFD7gP.js → dist-DBxgrOeo.js} +1906 -1746
  214. package/dist/{dist-DHensKDY.js → dist-DPcf6XZ8.js} +2 -2
  215. package/dist/{dist-5DAb7bYT.js → dist-DVNjPKsH.js} +2 -2
  216. package/dist/{dist-C3eH9-N2.js → dist-DXyGqIDE.js} +2 -2
  217. package/dist/{dist-1H4cnaoD.js → dist-DuufrR8O.js} +4 -4
  218. package/dist/{editor-modal-oRmkDlUs.js → editor-modal-BwyIUnV_.js} +27 -27
  219. package/dist/en-CC-57eC_.js +1 -0
  220. package/dist/{en-BTiiAC-B.js → en-Dekrl7HA.js} +21 -0
  221. package/dist/{es-CdTOcSTf.js → es-BaZzyidV.js} +21 -0
  222. package/dist/{extensions-CYigjb1g.js → extensions-DHyKjsNZ.js} +9 -9
  223. package/dist/{eye-DvsTBI57.js → eye-DQuinb9k.js} +1 -1
  224. package/dist/{fr-B6lcLLzC.js → fr-C5ucb1HK.js} +21 -0
  225. package/dist/{image-up-BoFGZm5Q.js → image-up-yTfLjOrj.js} +1 -1
  226. package/dist/index.d.ts +58 -8
  227. package/dist/{info-0bQQGjTV.js → info-C7OjlS11.js} +1 -1
  228. package/dist/{ja-BhdkqENz.js → ja-CUgR3mV0.js} +21 -0
  229. package/dist/{keys-injl74ob.js → keys-BKFq19a2.js} +1 -1
  230. package/dist/{link-Cstrr3Ep.js → link-CrUFaZ0t.js} +1 -1
  231. package/dist/{list-Dx9Rmy5s.js → list-CLgv6M-k.js} +1 -1
  232. package/dist/{loader-circle-D8Qqs0MG.js → loader-circle-BXM5VO0K.js} +1 -1
  233. package/dist/{message-circle-D78ELX6I.js → message-circle-BisdQ8H9.js} +1 -1
  234. package/dist/{cdn/chunks/nl-CE3YItYg.js → nl-qrLY7hMS.js} +21 -2
  235. package/dist/{package-DOvM9sHE.js → package-C1T4AxV1.js} +1 -1
  236. package/dist/{pencil-B6m0OG0n.js → pencil-oo2mwf4C.js} +1 -1
  237. package/dist/{plus-D-nEKxTc.js → plus-BIilXopD.js} +1 -1
  238. package/dist/{preRenderCustomBlocks-DokBGA_M.js → preRenderCustomBlocks-lFX0HHiV.js} +5 -3
  239. package/dist/{pt-BR-CUIT4rq4.js → pt-BR-C6hMTQYi.js} +21 -0
  240. package/dist/{refresh-cw-CXZS-R1U.js → refresh-cw-DrLlkEVC.js} +1 -1
  241. package/dist/{runtime-dom.esm-bundler-CO67ema2.js → runtime-dom.esm-bundler-lFF-QG3j.js} +3 -3
  242. package/dist/{search-DSvil0jo.js → search-DNu9lImk.js} +1 -1
  243. package/dist/{send-BBR28V94.js → send-DDNh3LoJ.js} +1 -1
  244. package/dist/{shield-check-ByxUnaU9.js → shield-check-aXM3o14f.js} +1 -1
  245. package/dist/{smartphone-CNOwGf5T.js → smartphone-isccgDee.js} +1 -1
  246. package/dist/socialIcons-BctavKBN.js +1180 -0
  247. package/dist/{sparkles-DO1hzwzf.js → sparkles-CIMfFxKv.js} +1 -1
  248. package/dist/style.css +1 -1
  249. package/dist/{cdn/chunks/styleConstants-C_YAPdQS.js → styleConstants-D1Jz-TFU.js} +7 -30
  250. package/dist/templatical-editor.js +559 -555
  251. package/dist/{text-align-start-BKEKMheq.js → text-align-start-C4JFeqsq.js} +1 -1
  252. package/dist/{trash-CKEQH4vH.js → trash-8ZD9pK_c.js} +1 -1
  253. package/dist/{triangle-alert-BHnfd3fV.js → triangle-alert-pq45xEHl.js} +1 -1
  254. package/dist/{upload-C8uO7KsR.js → upload-DrNFmVes.js} +1 -1
  255. package/dist/{useAliveFlag-6PtarpNZ.js → useAliveFlag-Dd06mRxe.js} +1 -1
  256. package/dist/{useCloudI18n-GvIOLziA.js → useCloudI18n-Nwqo7pI_.js} +2 -2
  257. package/dist/{useEditorCore-BJAQMvNW.js → useEditorCore-BcT7UI4e.js} +1011 -1006
  258. package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
  259. package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
  260. package/dist/{useLogicTag-B5gjcMzn.js → useLogicTag-D-dI8H6p.js} +3 -3
  261. package/dist/{useMergeTag-BwsBIDzR.js → useMergeTag-5wMeDBi-.js} +5 -5
  262. package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
  263. package/dist/{useScrollToBlock-JRxhT1u_.js → useScrollToBlock-Do3suaqp.js} +3 -3
  264. package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
  265. package/dist/{withCurrentFont-C9vqrduu.js → withCurrentFont-B4YnsG_2.js} +1 -1
  266. package/dist/{x-gEC0yMci.js → x-CBFKGLB1.js} +1 -1
  267. package/package.json +23 -23
  268. package/dist/BlockPreviewCanvas-DIZ0KgUD.js +0 -133
  269. package/dist/CountdownBlock-RNx3hIu0.js +0 -91
  270. package/dist/WrapperBlock-CTkmA887.js +0 -34
  271. package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js +0 -135
  272. package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js.map +0 -1
  273. package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js +0 -93
  274. package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js.map +0 -1
  275. package/dist/cdn/chunks/ParagraphEditor-DndEFXmR.js.map +0 -1
  276. package/dist/cdn/chunks/TemplateSettings-rZiHmq24.js.map +0 -1
  277. package/dist/cdn/chunks/Toolbar-C_5HfUQq.js.map +0 -1
  278. package/dist/cdn/chunks/TplModal-CYBbPCHL.js.map +0 -1
  279. package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js +0 -36
  280. package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js.map +0 -1
  281. package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
  282. package/dist/cdn/chunks/createCloudRuntime-bJN9EM1H.js.map +0 -1
  283. package/dist/cdn/chunks/de-CGjbQ2mt.js.map +0 -1
  284. package/dist/cdn/chunks/draggable-BUTN5vZC.js.map +0 -1
  285. package/dist/cdn/chunks/en-BTiiAC-B.js.map +0 -1
  286. package/dist/cdn/chunks/en-CAt6y87e.js +0 -1
  287. package/dist/cdn/chunks/es-CdTOcSTf.js.map +0 -1
  288. package/dist/cdn/chunks/fr-B6lcLLzC.js.map +0 -1
  289. package/dist/cdn/chunks/ja-BhdkqENz.js.map +0 -1
  290. package/dist/cdn/chunks/nl-CE3YItYg.js.map +0 -1
  291. package/dist/cdn/chunks/preRenderCustomBlocks-CyGB3lZr.js.map +0 -1
  292. package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
  293. package/dist/cdn/chunks/socialIcons-ClJVDZwt.js +0 -1031
  294. package/dist/cdn/chunks/socialIcons-ClJVDZwt.js.map +0 -1
  295. package/dist/cdn/chunks/src-B0pZeTYO.js.map +0 -1
  296. package/dist/cdn/chunks/src-BMw3u-iV.js.map +0 -1
  297. package/dist/cdn/chunks/src-Bh0MoJ67.js.map +0 -1
  298. package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
  299. package/dist/cdn/chunks/useEditorCore-DuC7kVti.js.map +0 -1
  300. package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
  301. package/dist/cdn/chunks/withCurrentFont-isIyuezD.js +0 -21
  302. package/dist/dist-CFC4pg2o.js +0 -5
  303. package/dist/dist-j2FavQmU.js +0 -5
  304. package/dist/en-Bk4iCfjp.js +0 -1
  305. package/dist/socialIcons-Ct_IoqPQ.js +0 -1107
@@ -0,0 +1,1103 @@
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