@templatical/editor 0.46.0 → 0.48.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 (317) hide show
  1. package/dist/{AiChatSidebar-DGcH4Lyo.js → AiChatSidebar-DxPHFNoT.js} +14 -14
  2. package/dist/{AiFeatureMenu-B4q-0g1S.js → AiFeatureMenu-C8GVqu1d.js} +7 -7
  3. package/dist/{BlockIssueBadge-CZA1XvAh.js → BlockIssueBadge-BShkuJis.js} +5 -5
  4. package/dist/BlockPreviewCanvas-tzAtDkXH.js +141 -0
  5. package/dist/{CloudHeaderExtras-ehMYJP68.js → CloudHeaderExtras-CUSftQdm.js} +5 -5
  6. package/dist/{CloudPanels-BwOaAlKz.js → CloudPanels-Dgw7tb4R.js} +9 -9
  7. package/dist/{CollaboratorBar-qOZFRNPx.js → CollaboratorBar-5rfopCPx.js} +4 -4
  8. package/dist/{CommentsPanel-Bn6P5crU.js → CommentsPanel-DiWzYtnZ.js} +2 -2
  9. package/dist/{CommentsSidebar-B8wT932T.js → CommentsSidebar-BOqj16Al.js} +14 -14
  10. package/dist/CountdownBlock-zx39Dyby.js +92 -0
  11. package/dist/{CountdownToolbar-BeF21SeB.js → CountdownToolbar-C4y3Ft7H.js} +7 -7
  12. package/dist/{DesignReferenceSidebar-zH93uB15.js → DesignReferenceSidebar-BWAi3eQQ.js} +13 -13
  13. package/dist/{IssuesPanel-Dltw9haP.js → IssuesPanel-C-x3I012.js} +8 -8
  14. package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
  15. package/dist/{LogicTagInsertButton-CHa-UD76.js → LogicTagInsertButton-B1_Wy0AN.js} +13 -13
  16. package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-ByOvznRC.js} +4 -4
  17. package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-9mDBv4aL.js} +2 -2
  18. package/dist/{MergeTagInput-B3ntd4dN.js → MergeTagInput-fOewuF27.js} +3 -3
  19. package/dist/{MergeTagModeToggle-C_06ZL0Q.js → MergeTagModeToggle-BXamLcv7.js} +7 -7
  20. package/dist/{ParagraphEditor-CxuW3TV0.js → ParagraphEditor-BVjOwwHx.js} +100 -85
  21. package/dist/{RestoreVersionDialog-B1n37M1Z.js → RestoreVersionDialog-BEKXx9xk.js} +6 -6
  22. package/dist/{RichTextEditorContent-CP_uULWB.js → RichTextEditorContent-D7kp7iig.js} +12 -12
  23. package/dist/{SaveBlockDialog-BSKX_7_v.js → SaveBlockDialog-SJu0lecx.js} +34 -35
  24. package/dist/{SavedBlocksBrowserModal-CHKrH1gO.js → SavedBlocksBrowserModal-DbmIS5uK.js} +14 -14
  25. package/dist/{SavedBlocksPanels-B-xDqBcz.js → SavedBlocksPanels-Dr5Fxx9Z.js} +2 -2
  26. package/dist/{SavedBlocksPickBar-D2J-g82g.js → SavedBlocksPickBar-DnEWBZJy.js} +5 -5
  27. package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-ynbGl-sr.js} +16 -16
  28. package/dist/{TemplateSettings-D07K_Y4m.js → TemplateSettings-Bi01S3H3.js} +12 -12
  29. package/dist/{TestEmailModal-BNPw_lID.js → TestEmailModal-CbRY8HQx.js} +14 -14
  30. package/dist/{TestEmailPanel-8klWo8hE.js → TestEmailPanel-NAOmt3xi.js} +2 -2
  31. package/dist/{TitleEditor-CmC9OuhA.js → TitleEditor-Cc3DHbuN.js} +15 -15
  32. package/dist/{ToggleSwitch-COeyWGfT.js → ToggleSwitch-Ozc7YU38.js} +2 -2
  33. package/dist/Toolbar-B-2lO0I8.js +3156 -0
  34. package/dist/{TplModal-BGFawHY9.js → TplModal-Bz4-IZ9R.js} +6 -6
  35. package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-CjV1d1zk.js} +10 -10
  36. package/dist/{VersionHistoryPanels-DdbGjEOR.js → VersionHistoryPanels-BtwxrKJn.js} +2 -2
  37. package/dist/{VersionPreviewBanner-BUKb9gc6.js → VersionPreviewBanner-BLAei1kj.js} +4 -4
  38. package/dist/WrapperBlock-D0qgNqjD.js +45 -0
  39. package/dist/{blockTypeIcons-CVKo6V_v.js → blockTypeIcons-CEDZytqP.js} +50 -20
  40. package/dist/bundle-stats.json +8 -8
  41. package/dist/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +38 -1
  42. package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js → AiChatSidebar-Dk0rJBQN.js} +8 -8
  43. package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js.map → AiChatSidebar-Dk0rJBQN.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js → AiFeatureMenu-B7b0w8ZS.js} +6 -6
  45. package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js.map → AiFeatureMenu-B7b0w8ZS.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js → BlockIssueBadge-C7sdnkrF.js} +5 -5
  47. package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js.map → BlockIssueBadge-C7sdnkrF.js.map} +1 -1
  48. package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js +143 -0
  49. package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js.map +1 -0
  50. package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js → CloudHeaderExtras-B4fhuwc_.js} +5 -5
  51. package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js.map → CloudHeaderExtras-B4fhuwc_.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js → CloudPanels-awqHfJqC.js} +8 -8
  53. package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js.map → CloudPanels-awqHfJqC.js.map} +1 -1
  54. package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js → CollaboratorBar-CS0ivqkr.js} +5 -5
  55. package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js.map → CollaboratorBar-CS0ivqkr.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js → CommentsPanel-CbzxwsyI.js} +3 -3
  57. package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js.map → CommentsPanel-CbzxwsyI.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js → CommentsSidebar-DWPHZuQm.js} +8 -8
  59. package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js.map → CommentsSidebar-DWPHZuQm.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-Cqg8FUH-.js} +8 -8
  63. package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js.map → CountdownToolbar-Cqg8FUH-.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js → DesignReferenceSidebar-BW9cHnA9.js} +12 -12
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js.map → DesignReferenceSidebar-BW9cHnA9.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js → IssuesPanel-cXf9ywA4.js} +8 -8
  67. package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js.map → IssuesPanel-cXf9ywA4.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-BMB9vShs.js} +89 -89
  71. package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js.map → LogicTagInsertButton-BMB9vShs.js.map} +1 -1
  72. package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js → MediaEditModal-zXfcArr4.js} +4 -4
  73. package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js.map → MediaEditModal-zXfcArr4.js.map} +1 -1
  74. package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js → MediaPanels-Cp4XB_dH.js} +3 -3
  75. package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js.map → MediaPanels-Cp4XB_dH.js.map} +1 -1
  76. package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js → MergeTagInput-DLqrA9co.js} +4 -4
  77. package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js.map → MergeTagInput-DLqrA9co.js.map} +1 -1
  78. package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js → MergeTagModeToggle-BRiJzzn5.js} +6 -6
  79. package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js.map → MergeTagModeToggle-BRiJzzn5.js.map} +1 -1
  80. package/dist/cdn/chunks/{ParagraphEditor-DndEFXmR.js → ParagraphEditor-D4aq9eeC.js} +116 -101
  81. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +1 -0
  82. package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js → RestoreVersionDialog-BgR6RXSb.js} +6 -6
  83. package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js.map → RestoreVersionDialog-BgR6RXSb.js.map} +1 -1
  84. package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js → RichTextEditorContent-C4DMAn0g.js} +11 -11
  85. package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js.map → RichTextEditorContent-C4DMAn0g.js.map} +1 -1
  86. package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js → SaveBlockDialog-BaIsQd09.js} +41 -42
  87. package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js.map → SaveBlockDialog-BaIsQd09.js.map} +1 -1
  88. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js → SavedBlocksBrowserModal-CtnB58p_.js} +10 -10
  89. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js.map → SavedBlocksBrowserModal-CtnB58p_.js.map} +1 -1
  90. package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js → SavedBlocksPanels-BhEOMzEQ.js} +3 -3
  91. package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js.map → SavedBlocksPanels-BhEOMzEQ.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js → SavedBlocksPickBar-CcdqTEIp.js} +6 -6
  93. package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js.map → SavedBlocksPickBar-CcdqTEIp.js.map} +1 -1
  94. package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js → TemplateScoringPanel-BrWqJCSP.js} +9 -9
  95. package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js.map → TemplateScoringPanel-BrWqJCSP.js.map} +1 -1
  96. package/dist/cdn/chunks/{TemplateSettings-rZiHmq24.js → TemplateSettings-BkkWTDHD.js} +14 -14
  97. package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js.map +1 -0
  98. package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js → TestEmailModal-V5mwHsUV.js} +13 -13
  99. package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js.map → TestEmailModal-V5mwHsUV.js.map} +1 -1
  100. package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js → TestEmailPanel-DxrKuctP.js} +3 -3
  101. package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js.map → TestEmailPanel-DxrKuctP.js.map} +1 -1
  102. package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js → TitleEditor-CsZiG3TT.js} +19 -19
  103. package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js.map → TitleEditor-CsZiG3TT.js.map} +1 -1
  104. package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js → ToggleSwitch-BB-bQADJ.js} +3 -3
  105. package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js.map → ToggleSwitch-BB-bQADJ.js.map} +1 -1
  106. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js +3073 -0
  107. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +1 -0
  108. package/dist/cdn/chunks/{TplModal-CYBbPCHL.js → TplModal-DC_eodTV.js} +6 -6
  109. package/dist/cdn/chunks/TplModal-DC_eodTV.js.map +1 -0
  110. package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js → VersionHistoryMenu-DXnM5Df2.js} +11 -11
  111. package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js.map → VersionHistoryMenu-DXnM5Df2.js.map} +1 -1
  112. package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js → VersionHistoryPanels-DXSqmaLS.js} +3 -3
  113. package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js.map → VersionHistoryPanels-DXSqmaLS.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js → VersionPreviewBanner-DKyN6BhO.js} +5 -5
  115. package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js.map → VersionPreviewBanner-DKyN6BhO.js.map} +1 -1
  116. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +47 -0
  117. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js.map +1 -0
  118. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +22 -0
  119. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js.map +1 -0
  120. package/dist/cdn/chunks/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +39 -2
  121. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +1 -0
  122. package/dist/cdn/chunks/{cloud-h1vaHp2p.js → cloud-BHClP3e2.js} +3 -3
  123. package/dist/cdn/chunks/{cloud-h1vaHp2p.js.map → cloud-BHClP3e2.js.map} +1 -1
  124. package/dist/cdn/chunks/{createCloudRuntime-bJN9EM1H.js → createCloudRuntime-Vd0N4elZ.js} +18 -9
  125. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +1 -0
  126. package/dist/cdn/chunks/{de-CGjbQ2mt.js → de-DMquBpZM.js} +39 -2
  127. package/dist/cdn/chunks/de-DMquBpZM.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-vEEmZ8Tu.js} +93 -93
  135. package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js.map → editor-modal-vEEmZ8Tu.js.map} +1 -1
  136. package/dist/cdn/chunks/{en-BTiiAC-B.js → en-C8Mp71sO.js} +39 -2
  137. package/dist/cdn/chunks/en-C8Mp71sO.js.map +1 -0
  138. package/dist/cdn/chunks/en-eWpiXyZu.js +1 -0
  139. package/dist/cdn/chunks/{es-CdTOcSTf.js → es-Byq4tthI.js} +39 -2
  140. package/dist/cdn/chunks/es-Byq4tthI.js.map +1 -0
  141. package/dist/cdn/chunks/{extensions-CrmXF4MW.js → extensions-hJ9VqzDc.js} +7 -7
  142. package/dist/cdn/chunks/{extensions-CrmXF4MW.js.map → extensions-hJ9VqzDc.js.map} +1 -1
  143. package/dist/cdn/chunks/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +39 -2
  144. package/dist/cdn/chunks/fr-B3j35HEw.js.map +1 -0
  145. package/dist/cdn/chunks/{icons-Dr9erFGs.js → icons-aTYwH5-g.js} +107 -78
  146. package/dist/cdn/chunks/icons-aTYwH5-g.js.map +1 -0
  147. package/dist/{ja-BhdkqENz.js → cdn/chunks/ja-D7txAuGS.js} +40 -1
  148. package/dist/cdn/chunks/ja-D7txAuGS.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-ClJ3BY3F.js} +40 -1
  152. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +1 -0
  153. package/dist/cdn/chunks/{preRenderCustomBlocks-CyGB3lZr.js → preRenderCustomBlocks-ByfuSjtL.js} +4 -2
  154. package/dist/cdn/chunks/preRenderCustomBlocks-ByfuSjtL.js.map +1 -0
  155. package/dist/{pt-BR-CUIT4rq4.js → cdn/chunks/pt-BR-DibcXcmv.js} +40 -1
  156. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +1 -0
  157. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +1279 -0
  158. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +1 -0
  159. package/dist/{dist-BI_LeQGl.js → cdn/chunks/src-DYCDeBDM.js} +437 -256
  160. package/dist/cdn/chunks/src-DYCDeBDM.js.map +1 -0
  161. package/dist/cdn/chunks/{src-B0pZeTYO.js → src-DlFlC9Tt.js} +334 -268
  162. package/dist/cdn/chunks/src-DlFlC9Tt.js.map +1 -0
  163. package/dist/cdn/chunks/src-dZ4D_tuP.js +649 -0
  164. package/dist/cdn/chunks/src-dZ4D_tuP.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/timeouts-Cv2jvusx.js +6 -0
  168. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +1 -0
  169. package/dist/cdn/chunks/{tiptap-CYDXLO17.js → tiptap-BPigZk5G.js} +3258 -3098
  170. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +1 -0
  171. package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js → useAliveFlag-DCB96vzR.js} +2 -2
  172. package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js.map → useAliveFlag-DCB96vzR.js.map} +1 -1
  173. package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js → useCloudI18n-BBF4waXO.js} +3 -3
  174. package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js.map → useCloudI18n-BBF4waXO.js.map} +1 -1
  175. package/dist/cdn/chunks/{useEditorCore-DuC7kVti.js → useEditorCore-Bb2UcB20.js} +780 -764
  176. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +1 -0
  177. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +10 -0
  178. package/dist/cdn/chunks/{useEditorRoot-DDPIcEOO.js.map → useEditorRoot-CTc6O8al.js.map} +1 -1
  179. package/dist/cdn/chunks/{useI18n-DO4NTunW.js → useI18n-DUlyyIJJ.js} +3 -3
  180. package/dist/cdn/chunks/{useI18n-DO4NTunW.js.map → useI18n-DUlyyIJJ.js.map} +1 -1
  181. package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js → useLogicTag-HsyUCQtl.js} +4 -4
  182. package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js.map → useLogicTag-HsyUCQtl.js.map} +1 -1
  183. package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js → useMergeTag-Dg9pE85U.js} +4 -4
  184. package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js.map → useMergeTag-Dg9pE85U.js.map} +1 -1
  185. package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js → usePopoverPosition-IbaW6-Ao.js} +3 -3
  186. package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js.map → usePopoverPosition-IbaW6-Ao.js.map} +1 -1
  187. package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js → useScrollToBlock-uUa601I4.js} +3 -3
  188. package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js.map → useScrollToBlock-uUa601I4.js.map} +1 -1
  189. package/dist/cdn/chunks/withCurrentFont-oLcATrQ8.js +21 -0
  190. package/dist/cdn/chunks/{withCurrentFont-isIyuezD.js.map → withCurrentFont-oLcATrQ8.js.map} +1 -1
  191. package/dist/cdn/editor.css +1 -1
  192. package/dist/cdn/editor.js +641 -631
  193. package/dist/cdn/editor.js.map +1 -1
  194. package/dist/{check-ZKvtMdpe.js → check-ClwqRMgv.js} +1 -1
  195. package/dist/{chevron-down-RrwkYMlp.js → chevron-down-te6qn-zE.js} +1 -1
  196. package/dist/{chevron-right-CklHaa1U.js → chevron-right-W2hbH1FM.js} +1 -1
  197. package/dist/{chevron-up-DjN2NTbo.js → chevron-up-Bf5Zo7o4.js} +1 -1
  198. package/dist/{circle-alert-BR1_Yfb-.js → circle-alert-CIEGV5DN.js} +1 -1
  199. package/dist/{clock-BEagNj21.js → clock-Y4cx0gkJ.js} +1 -1
  200. package/dist/{cloud-DPGjMGfv.js → cloud-B5xwm_4X.js} +2 -2
  201. package/dist/{copy-D6DNoSq1.js → copy-BEcsAlfB.js} +1 -1
  202. package/dist/{createCloudRuntime-D0RRgWab.js → createCloudRuntime-zNPkF6T9.js} +17 -8
  203. package/dist/{createLucideIcon-BAPyioGd.js → createLucideIcon-CYHXK9hn.js} +6 -6
  204. package/dist/{de-CGjbQ2mt.js → de-DMquBpZM.js} +38 -1
  205. package/dist/{dist-Bd7khQsg.js → dist-3HpYixwF.js} +2 -2
  206. package/dist/{dist-lL3nVbxV.js → dist-BC-ZEYLd.js} +2 -2
  207. package/dist/dist-BPFcLKTw.js +5 -0
  208. package/dist/{dist-C-VFTX82.js → dist-CUWI-IvA.js} +2 -2
  209. package/dist/{dist-Bc30883t.js → dist-Cr7RPxI9.js} +5 -5
  210. package/dist/{dist-DapsJxn_.js → dist-CuLwJF7H.js} +2 -2
  211. package/dist/{dist-5KNKxglR.js → dist-CyBwSiAa.js} +2 -2
  212. package/dist/dist-D7Yj7E-F.js +5 -0
  213. package/dist/{dist-B_vYjCsk.js → dist-DAAJogrx.js} +3 -3
  214. package/dist/{dist-CMcFD7gP.js → dist-DBxgrOeo.js} +1906 -1746
  215. package/dist/{dist-DHensKDY.js → dist-DPcf6XZ8.js} +2 -2
  216. package/dist/{dist-5DAb7bYT.js → dist-DVNjPKsH.js} +2 -2
  217. package/dist/{dist-C3eH9-N2.js → dist-DXyGqIDE.js} +2 -2
  218. package/dist/{dist-1H4cnaoD.js → dist-DuufrR8O.js} +4 -4
  219. package/dist/{cdn/chunks/src-Bh0MoJ67.js → dist-tsmnQugO.js} +207 -174
  220. package/dist/{editor-modal-oRmkDlUs.js → editor-modal-AlVLkU91.js} +20 -20
  221. package/dist/en-B0FUfNwz.js +1 -0
  222. package/dist/{en-BTiiAC-B.js → en-C8Mp71sO.js} +38 -1
  223. package/dist/{es-CdTOcSTf.js → es-Byq4tthI.js} +38 -1
  224. package/dist/{extensions-CYigjb1g.js → extensions-pjO8VGkM.js} +9 -9
  225. package/dist/{eye-DvsTBI57.js → eye-Ddnz8nnm.js} +1 -1
  226. package/dist/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +38 -1
  227. package/dist/{image-up-BoFGZm5Q.js → image-up-CM_HC0Dx.js} +1 -1
  228. package/dist/index.d.ts +124 -11
  229. package/dist/{info-0bQQGjTV.js → info-DXLmzoeY.js} +1 -1
  230. package/dist/{cdn/chunks/ja-BhdkqENz.js → ja-D7txAuGS.js} +38 -3
  231. package/dist/{keys-injl74ob.js → keys-BKFq19a2.js} +1 -1
  232. package/dist/{link-Cstrr3Ep.js → link-Cel46wgo.js} +1 -1
  233. package/dist/{list-Dx9Rmy5s.js → list-Cl0GwiV9.js} +1 -1
  234. package/dist/{loader-circle-D8Qqs0MG.js → loader-circle-uAwpvfys.js} +1 -1
  235. package/dist/{message-circle-D78ELX6I.js → message-circle-DWU1pTM_.js} +1 -1
  236. package/dist/{cdn/chunks/nl-CE3YItYg.js → nl-ClJ3BY3F.js} +38 -3
  237. package/dist/{package-DOvM9sHE.js → package-CbyG_yU_.js} +1 -1
  238. package/dist/{pencil-B6m0OG0n.js → pencil-BzoDcwKu.js} +1 -1
  239. package/dist/{plus-D-nEKxTc.js → plus-8cDvoCjZ.js} +1 -1
  240. package/dist/{preRenderCustomBlocks-DokBGA_M.js → preRenderCustomBlocks-DMP5RuHl.js} +6 -4
  241. package/dist/{cdn/chunks/pt-BR-CUIT4rq4.js → pt-BR-DibcXcmv.js} +38 -3
  242. package/dist/{refresh-cw-CXZS-R1U.js → refresh-cw-9WinWixo.js} +1 -1
  243. package/dist/{runtime-dom.esm-bundler-CO67ema2.js → runtime-dom.esm-bundler-lFF-QG3j.js} +3 -3
  244. package/dist/{search-DSvil0jo.js → search-CqgGq1gG.js} +1 -1
  245. package/dist/{send-BBR28V94.js → send-Ceo3c9Db.js} +1 -1
  246. package/dist/{shield-check-ByxUnaU9.js → shield-check-uDAwur5D.js} +1 -1
  247. package/dist/{smartphone-CNOwGf5T.js → smartphone-CcLaCpGK.js} +1 -1
  248. package/dist/socialIcons-PTiwhLoC.js +1359 -0
  249. package/dist/{sparkles-DO1hzwzf.js → sparkles-Do9XjAuT.js} +1 -1
  250. package/dist/style.css +1 -1
  251. package/dist/{cdn/chunks/styleConstants-C_YAPdQS.js → styleConstants-D1Jz-TFU.js} +7 -30
  252. package/dist/templatical-editor.js +519 -509
  253. package/dist/{text-align-start-BKEKMheq.js → text-align-start-DvzC0HQA.js} +1 -1
  254. package/dist/timeouts-Cv2jvusx.js +4 -0
  255. package/dist/{trash-CKEQH4vH.js → trash-vlINTx32.js} +1 -1
  256. package/dist/{triangle-alert-BHnfd3fV.js → triangle-alert-MRYSJ9T2.js} +1 -1
  257. package/dist/{upload-C8uO7KsR.js → upload-CtNOI6J2.js} +1 -1
  258. package/dist/{useAliveFlag-6PtarpNZ.js → useAliveFlag-Dd06mRxe.js} +1 -1
  259. package/dist/{useCloudI18n-GvIOLziA.js → useCloudI18n-Nwqo7pI_.js} +2 -2
  260. package/dist/{useEditorCore-BJAQMvNW.js → useEditorCore-PvErWWsp.js} +1002 -991
  261. package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
  262. package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
  263. package/dist/{useLogicTag-B5gjcMzn.js → useLogicTag-BHn67tDd.js} +3 -3
  264. package/dist/{useMergeTag-BwsBIDzR.js → useMergeTag-CRkm5Ig6.js} +5 -5
  265. package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
  266. package/dist/{useScrollToBlock-JRxhT1u_.js → useScrollToBlock-CXmcHQQN.js} +3 -3
  267. package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
  268. package/dist/{withCurrentFont-C9vqrduu.js → withCurrentFont-CxRGeHO3.js} +1 -1
  269. package/dist/{x-gEC0yMci.js → x-Cd6SFw8r.js} +1 -1
  270. package/package.json +23 -23
  271. package/dist/BlockPreviewCanvas-DIZ0KgUD.js +0 -133
  272. package/dist/CountdownBlock-RNx3hIu0.js +0 -91
  273. package/dist/Toolbar-CqhRb6EM.js +0 -2732
  274. package/dist/WrapperBlock-CTkmA887.js +0 -34
  275. package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js +0 -135
  276. package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js.map +0 -1
  277. package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js +0 -93
  278. package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js.map +0 -1
  279. package/dist/cdn/chunks/ParagraphEditor-DndEFXmR.js.map +0 -1
  280. package/dist/cdn/chunks/TemplateSettings-rZiHmq24.js.map +0 -1
  281. package/dist/cdn/chunks/Toolbar-C_5HfUQq.js +0 -2646
  282. package/dist/cdn/chunks/Toolbar-C_5HfUQq.js.map +0 -1
  283. package/dist/cdn/chunks/TplModal-CYBbPCHL.js.map +0 -1
  284. package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js +0 -36
  285. package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js.map +0 -1
  286. package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js +0 -21
  287. package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js.map +0 -1
  288. package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
  289. package/dist/cdn/chunks/createCloudRuntime-bJN9EM1H.js.map +0 -1
  290. package/dist/cdn/chunks/de-CGjbQ2mt.js.map +0 -1
  291. package/dist/cdn/chunks/draggable-BUTN5vZC.js.map +0 -1
  292. package/dist/cdn/chunks/en-BTiiAC-B.js.map +0 -1
  293. package/dist/cdn/chunks/en-CAt6y87e.js +0 -1
  294. package/dist/cdn/chunks/es-CdTOcSTf.js.map +0 -1
  295. package/dist/cdn/chunks/fr-B6lcLLzC.js.map +0 -1
  296. package/dist/cdn/chunks/icons-Dr9erFGs.js.map +0 -1
  297. package/dist/cdn/chunks/ja-BhdkqENz.js.map +0 -1
  298. package/dist/cdn/chunks/nl-CE3YItYg.js.map +0 -1
  299. package/dist/cdn/chunks/preRenderCustomBlocks-CyGB3lZr.js.map +0 -1
  300. package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
  301. package/dist/cdn/chunks/socialIcons-ClJVDZwt.js +0 -1031
  302. package/dist/cdn/chunks/socialIcons-ClJVDZwt.js.map +0 -1
  303. package/dist/cdn/chunks/src-B0pZeTYO.js.map +0 -1
  304. package/dist/cdn/chunks/src-BMw3u-iV.js +0 -614
  305. package/dist/cdn/chunks/src-BMw3u-iV.js.map +0 -1
  306. package/dist/cdn/chunks/src-Bh0MoJ67.js.map +0 -1
  307. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +0 -6
  308. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
  309. package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
  310. package/dist/cdn/chunks/useEditorCore-DuC7kVti.js.map +0 -1
  311. package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
  312. package/dist/cdn/chunks/withCurrentFont-isIyuezD.js +0 -21
  313. package/dist/dist-CFC4pg2o.js +0 -5
  314. package/dist/dist-j2FavQmU.js +0 -5
  315. package/dist/en-Bk4iCfjp.js +0 -1
  316. package/dist/socialIcons-Ct_IoqPQ.js +0 -1107
  317. package/dist/timeouts-DHPZQ0G3.js +0 -4
@@ -0,0 +1,1359 @@
1
+ import { A as e, At as t, H as n, J as r, R as i, S as a, W as o, X as s, Y as c, Z as l, at as u, d, g as f, h as p, jt as m, kt as h, ot as g, r as _, rt as v, s as y, v as b } from "./vue.runtime.esm-bundler-CAzmrXdD.js";
2
+ import { $ as x, C as S, V as C, _ as w, _t as T, d as E, dt as D, g as O, h as k, l as A, m as j, p as M, st as N, tt as P, u as F, y as I } from "./dist-tsmnQugO.js";
3
+ import { r as L } from "./dist-DAAJogrx.js";
4
+ import { L as R, P as ee, c as te, x as ne } from "./keys-BKFq19a2.js";
5
+ import { r as re } from "./timeouts-Cv2jvusx.js";
6
+ import { t as ie } from "./useI18n-CxVEpurs.js";
7
+ import { o as ae, s as oe } from "./usePopoverPosition-CwnH1o5g.js";
8
+ import { t as z } from "./createLucideIcon-CYHXK9hn.js";
9
+ import { t as se } from "./loader-circle-uAwpvfys.js";
10
+ import { t as ce } from "./upload-CtNOI6J2.js";
11
+ import { t as le } from "./useAliveFlag-Dd06mRxe.js";
12
+ //#region ../core/dist/index.js
13
+ function B(e) {
14
+ return e instanceof Error ? e : Error(String(e), { cause: e });
15
+ }
16
+ function V(e, t) {
17
+ try {
18
+ t();
19
+ } catch (t) {
20
+ e?.(B(t));
21
+ }
22
+ }
23
+ function H(e) {
24
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
25
+ }
26
+ function ue(e) {
27
+ let t = e.content ?? S(e.defaultFontFamily, e.templateDefaults);
28
+ j(t), k(t);
29
+ let r = c({
30
+ template: null,
31
+ content: t,
32
+ selectedBlockId: null,
33
+ viewport: "desktop",
34
+ darkMode: !1,
35
+ previewMode: !1,
36
+ isDirty: !1,
37
+ isSaving: !1,
38
+ isLoading: !1,
39
+ uiTheme: "auto"
40
+ }), i = 0;
41
+ function a() {
42
+ r.isDirty = !0, i++;
43
+ }
44
+ let o = n({
45
+ get: () => r.content,
46
+ set: (e) => {
47
+ r.content = e, a();
48
+ }
49
+ }), l = n(() => r.selectedBlockId ? u(r.content.blocks, r.selectedBlockId) : null);
50
+ function u(e, t) {
51
+ for (let n of e) {
52
+ if (n.id === t) return n;
53
+ if (n.type === "section") for (let e of n.children) {
54
+ let n = u(e, t);
55
+ if (n) return n;
56
+ }
57
+ }
58
+ return null;
59
+ }
60
+ function d(e, t) {
61
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) d(e, t);
62
+ }
63
+ function f(e, t, n = { blocks: e }) {
64
+ for (let r = 0; r < e.length; r++) {
65
+ let i = e[r];
66
+ if (i.id === t) return n;
67
+ if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
68
+ let n = f(i.children[e], t, {
69
+ blocks: i.children[e],
70
+ sectionId: i.id,
71
+ columnIndex: e
72
+ });
73
+ if (n) return n;
74
+ }
75
+ }
76
+ return null;
77
+ }
78
+ function p(t) {
79
+ return e.lockedBlocks?.value.has(t) ?? !1;
80
+ }
81
+ function m(e) {
82
+ let t = f(r.content.blocks, e);
83
+ if (!t) return null;
84
+ let n = t.blocks.findIndex((t) => t.id === e);
85
+ return n === -1 ? null : {
86
+ targetSectionId: t.sectionId,
87
+ columnIndex: t.columnIndex,
88
+ index: n
89
+ };
90
+ }
91
+ function h(e, t = !0) {
92
+ j(e), k(e), r.content = e, t && a();
93
+ }
94
+ function g(e) {
95
+ e && p(e) || (r.selectedBlockId = e);
96
+ }
97
+ function _(e) {
98
+ r.viewport = e;
99
+ }
100
+ function v(e) {
101
+ r.darkMode = e;
102
+ }
103
+ function y(e) {
104
+ r.uiTheme = e;
105
+ }
106
+ function b(e) {
107
+ r.previewMode = e, e && (r.selectedBlockId = null);
108
+ }
109
+ function x(e, t) {
110
+ if (p(e)) return;
111
+ let n = u(r.content.blocks, e);
112
+ n && (Object.assign(n, t), a());
113
+ }
114
+ function C(e) {
115
+ r.content.settings = {
116
+ ...r.content.settings,
117
+ ...e
118
+ }, a();
119
+ }
120
+ function w(e, t, n = 0, i) {
121
+ let o = {
122
+ settings: r.content.settings,
123
+ blocks: [e]
124
+ };
125
+ if (j(o), k(o), !(t && e.type === "section")) {
126
+ if (t) {
127
+ if (p(t)) return;
128
+ let a = u(r.content.blocks, t);
129
+ if (a && a.type === "section") {
130
+ if (n < 0 || n >= H(a.columns)) return;
131
+ a.children[n] = a.children[n] || [];
132
+ let t = a.children[n];
133
+ i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
134
+ }
135
+ } else i !== void 0 && i < r.content.blocks.length ? r.content.blocks.splice(i, 0, e) : r.content.blocks.push(e);
136
+ a();
137
+ }
138
+ }
139
+ function T(e) {
140
+ if (p(e)) return;
141
+ let t = f(r.content.blocks, e);
142
+ if (t) {
143
+ let n = t.blocks.findIndex((t) => t.id === e);
144
+ if (n !== -1) {
145
+ let [e] = t.blocks.splice(n, 1);
146
+ if (r.selectedBlockId) {
147
+ let t = /* @__PURE__ */ new Set();
148
+ d(e, t), t.has(r.selectedBlockId) && (r.selectedBlockId = null);
149
+ }
150
+ a();
151
+ }
152
+ }
153
+ }
154
+ function D(e, t, n, i = 0) {
155
+ if (p(e) || n && p(n)) return;
156
+ let o = f(r.content.blocks, e);
157
+ if (!o) return;
158
+ let s = o.blocks.findIndex((t) => t.id === e);
159
+ if (s === -1 || n && o.blocks[s].type === "section") return;
160
+ let c;
161
+ if (n) {
162
+ let e = u(r.content.blocks, n);
163
+ if (!e || e.type !== "section" || i < 0 || i >= H(e.columns)) return;
164
+ e.children[i] = e.children[i] || [], c = e.children[i];
165
+ } else c = r.content.blocks;
166
+ let [l] = o.blocks.splice(s, 1);
167
+ c.splice(t, 0, l), a();
168
+ }
169
+ function O() {
170
+ a();
171
+ }
172
+ function A(e, t) {
173
+ throw new E(`[Templatical] Templates: ${e} ${t}`);
174
+ }
175
+ function M(t) {
176
+ V(e.onError, t);
177
+ }
178
+ function N(t) {
179
+ let { templates: n } = e;
180
+ return n || A(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
181
+ }
182
+ function P(e) {
183
+ r.template && (r.template = {
184
+ ...r.template,
185
+ name: e
186
+ }, a());
187
+ }
188
+ async function F(t) {
189
+ let n = N("create()"), { create: a } = n;
190
+ typeof a != "function" && A("create()", "is disabled by the provider — its `create` is `false`.");
191
+ let o;
192
+ r.isLoading = !0;
193
+ try {
194
+ t?.content && (r.content = t.content);
195
+ let e = i;
196
+ o = await a(t?.name === void 0 ? { content: r.content } : {
197
+ name: t.name,
198
+ content: r.content
199
+ }), r.template = o, i === e && (r.isDirty = !1);
200
+ } catch (t) {
201
+ throw e.onError?.(t), t;
202
+ } finally {
203
+ r.isLoading = !1;
204
+ }
205
+ return M(() => n.onCreated?.(o)), o;
206
+ }
207
+ async function I(t) {
208
+ let n = N("load()"), i;
209
+ r.isLoading = !0;
210
+ try {
211
+ i = await n.load(t), j(i.content), k(i.content), r.template = i, r.content = i.content, r.isDirty = !1;
212
+ } catch (t) {
213
+ throw e.onError?.(t), t;
214
+ } finally {
215
+ r.isLoading = !1;
216
+ }
217
+ return M(() => n.onLoaded?.(i)), i;
218
+ }
219
+ async function L(t = "api") {
220
+ let n = N("save()"), { save: a } = n;
221
+ typeof a != "function" && A("save()", "is disabled by the provider — its `save` is `false`.");
222
+ let o = r.template;
223
+ o || A("save()", "has no template loaded. Call create() or load() first.");
224
+ let s = o.name === void 0 ? { content: r.content } : {
225
+ name: o.name,
226
+ content: r.content
227
+ }, c;
228
+ r.isSaving = !0;
229
+ try {
230
+ let e = i;
231
+ if (c = await a(o.id, s), r.template?.id === o.id) {
232
+ let e = r.template.name;
233
+ r.template = e === o.name ? c : {
234
+ ...c,
235
+ name: e
236
+ };
237
+ }
238
+ i === e && (r.isDirty = !1);
239
+ } catch (t) {
240
+ throw e.onError?.(t), t;
241
+ } finally {
242
+ r.isSaving = !1;
243
+ }
244
+ return M(() => n.onSaved?.(c, { trigger: t })), c;
245
+ }
246
+ function R() {
247
+ return r.template?.id !== void 0;
248
+ }
249
+ return {
250
+ state: s(r),
251
+ content: o,
252
+ selectedBlock: l,
253
+ isBlockLocked: p,
254
+ setContent: h,
255
+ selectBlock: g,
256
+ setViewport: _,
257
+ setDarkMode: v,
258
+ setUiTheme: y,
259
+ setPreviewMode: b,
260
+ updateBlock: x,
261
+ updateSettings: C,
262
+ addBlock: w,
263
+ removeBlock: T,
264
+ moveBlock: D,
265
+ markDirty: O,
266
+ findBlockLocation: m,
267
+ setName: P,
268
+ create: F,
269
+ load: I,
270
+ save: L,
271
+ hasTemplate: R
272
+ };
273
+ }
274
+ var de = 50, U = 300, fe = 1500;
275
+ function pe(e) {
276
+ let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = de } = e, o = l([]), s = l([]), c = l(!1), u = null, d = null, f = n(() => o.value.length > 0), p = n(() => s.value.length > 0);
277
+ function m() {
278
+ return D(t.value);
279
+ }
280
+ function h(e) {
281
+ o.value.push(e), o.value.length > a && o.value.splice(0, o.value.length - a);
282
+ }
283
+ function g() {
284
+ d &&= (clearTimeout(d.timeoutId), null);
285
+ }
286
+ function _() {
287
+ i?.() || (g(), h(m()), s.value = []);
288
+ }
289
+ function v(e) {
290
+ i?.() || (d && d.blockId === e ? (clearTimeout(d.timeoutId), d.timeoutId = setTimeout(() => {
291
+ d = null;
292
+ }, U)) : (g(), h(m()), s.value = [], d = {
293
+ blockId: e,
294
+ timeoutId: setTimeout(() => {
295
+ d = null;
296
+ }, U)
297
+ }));
298
+ }
299
+ function y() {
300
+ c.value = !0, u && clearTimeout(u), u = setTimeout(() => {
301
+ c.value = !1, u = null;
302
+ }, fe);
303
+ }
304
+ function b() {
305
+ if (o.value.length === 0) return;
306
+ g();
307
+ let e = o.value.pop();
308
+ s.value.push(m()), r(e, !0), y();
309
+ }
310
+ function x() {
311
+ if (s.value.length === 0) return;
312
+ g();
313
+ let e = s.value.pop();
314
+ o.value.push(m()), r(e, !0), y();
315
+ }
316
+ function S() {
317
+ o.value = [], s.value = [], g();
318
+ }
319
+ function C() {
320
+ S(), u &&= (clearTimeout(u), null);
321
+ }
322
+ return {
323
+ canUndo: f,
324
+ canRedo: p,
325
+ isNavigating: c,
326
+ undo: b,
327
+ redo: x,
328
+ record: _,
329
+ recordDebounced: v,
330
+ clear: S,
331
+ destroy: C
332
+ };
333
+ }
334
+ function me(e) {
335
+ let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
336
+ function o(n, r, a) {
337
+ let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = I(n, o);
338
+ return t(s, r, a), i(s.id), s;
339
+ }
340
+ function s(e, n, r) {
341
+ let o = O(e);
342
+ if (n !== void 0 || r !== void 0) t(o, n, r);
343
+ else {
344
+ let i = a?.(e.id) ?? null;
345
+ i ? t(o, i.targetSectionId, i.columnIndex, i.index + 1) : t(o, n, r);
346
+ }
347
+ return i(o.id), o;
348
+ }
349
+ function c(e) {
350
+ n(e);
351
+ }
352
+ function l(e, t, n) {
353
+ r(e, { [t]: n });
354
+ }
355
+ return {
356
+ createAndAddBlock: o,
357
+ duplicateBlock: s,
358
+ deleteBlock: c,
359
+ updateBlockProperty: l
360
+ };
361
+ }
362
+ var W = 2e3;
363
+ function he(e) {
364
+ let { content: t, isDirty: n, onChange: r, debounce: i = W, enabled: a = !0 } = e, o = null, s = !1;
365
+ function c() {
366
+ return typeof a == "function" ? a() : a;
367
+ }
368
+ function l() {
369
+ s = !0, d();
370
+ }
371
+ function u() {
372
+ s = !1;
373
+ }
374
+ function d() {
375
+ o &&= (clearTimeout(o), null);
376
+ }
377
+ function f() {
378
+ d(), n() && r(JSON.parse(JSON.stringify(t.value)));
379
+ }
380
+ function p() {
381
+ c() && !s && (d(), o = setTimeout(() => {
382
+ o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
383
+ }, i));
384
+ }
385
+ let m = g(t, () => {
386
+ p();
387
+ }, { deep: !0 });
388
+ function h() {
389
+ m(), d();
390
+ }
391
+ return {
392
+ flush: f,
393
+ cancel: d,
394
+ pause: l,
395
+ resume: u,
396
+ destroy: h
397
+ };
398
+ }
399
+ function ge(e) {
400
+ let t = c(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
401
+ function i(e) {
402
+ return t.has(e);
403
+ }
404
+ function a(n) {
405
+ t.has(n) ? t.delete(n) : (t.add(n), e.state.selectedBlockId === n && e.selectBlock(null));
406
+ }
407
+ function o() {
408
+ t.clear();
409
+ }
410
+ return {
411
+ isHidden: i,
412
+ toggleBlock: a,
413
+ reset: o,
414
+ hasHiddenBlocks: r
415
+ };
416
+ }
417
+ function _e(e) {
418
+ let t = l(!1), r = l(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
419
+ async function o() {
420
+ let n = e.definition.value;
421
+ if (n?.dataSource) {
422
+ t.value = !0, r.value = !1;
423
+ try {
424
+ let t = await n.dataSource.onFetch({
425
+ fieldValues: { ...e.block.value.fieldValues },
426
+ blockId: e.block.value.id
427
+ });
428
+ if (t == null) return;
429
+ let r = { ...e.block.value.fieldValues };
430
+ for (let e of Object.keys(r)) e in t && (r[e] = t[e]);
431
+ e.onUpdate(r, !0);
432
+ } catch (e) {
433
+ console.warn("[Templatical] Data source fetch error:", e), r.value = !0;
434
+ } finally {
435
+ t.value = !1;
436
+ }
437
+ }
438
+ }
439
+ return {
440
+ isFetching: t,
441
+ fetchError: r,
442
+ fetch: o,
443
+ hasDataSource: i,
444
+ needsFetch: a
445
+ };
446
+ }
447
+ function ve(e, t) {
448
+ let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
449
+ e.addBlock = (r, i, a, o) => {
450
+ i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
451
+ }, e.removeBlock = (n) => {
452
+ e.isBlockLocked(n) || (t.record(), r(n));
453
+ }, e.moveBlock = (n, r, a, o) => {
454
+ e.isBlockLocked(n) || a && e.isBlockLocked(a) || (t.record(), i(n, r, a, o));
455
+ }, e.updateBlock = (n, r) => {
456
+ e.isBlockLocked(n) || (t.recordDebounced(n), a(n, r));
457
+ }, e.updateSettings = (e) => {
458
+ t.record(), o(e);
459
+ };
460
+ }
461
+ function ye(e) {
462
+ let { provider: t } = e, n = l([]), r = l(!1), i = y(() => {
463
+ let e = /* @__PURE__ */ new Set();
464
+ for (let t of n.value) {
465
+ let n = t.category?.trim();
466
+ n && e.add(n);
467
+ }
468
+ return [...e].sort((e, t) => e.localeCompare(t));
469
+ }), a = y(() => typeof t.create == "function"), o = y(() => typeof t.update == "function"), s = y(() => typeof t.delete == "function");
470
+ function c(e) {
471
+ return o.value && e.canUpdate !== !1;
472
+ }
473
+ function u(e) {
474
+ return s.value && e.canDelete !== !1;
475
+ }
476
+ function d(e, t) {
477
+ throw new E(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
478
+ }
479
+ function f(t) {
480
+ V(e.onError, t);
481
+ }
482
+ async function p(i) {
483
+ r.value = !0;
484
+ try {
485
+ n.value = await t.list(i);
486
+ } catch (t) {
487
+ throw e.onError?.(t), t;
488
+ } finally {
489
+ r.value = !1;
490
+ }
491
+ }
492
+ async function m(r, i, a) {
493
+ let { create: o } = t;
494
+ typeof o != "function" && d("create", "disabled by the provider");
495
+ try {
496
+ let e = await o(a ? {
497
+ name: r,
498
+ content: i,
499
+ category: a
500
+ } : {
501
+ name: r,
502
+ content: i
503
+ });
504
+ return n.value = [e, ...n.value], f(() => t.onCreated?.(e)), e;
505
+ } catch (t) {
506
+ throw e.onError?.(t), t;
507
+ }
508
+ }
509
+ async function h(r, i) {
510
+ let { update: a } = t;
511
+ typeof a != "function" && d("update", "disabled by the provider");
512
+ let o = n.value.find((e) => e.id === r);
513
+ o && o.canUpdate === !1 && d("update", `not permitted for entry "${r}"`);
514
+ try {
515
+ let e = await a(r, i);
516
+ return n.value = n.value.map((t) => t.id === r ? e : t), f(() => t.onUpdated?.(e)), e;
517
+ } catch (t) {
518
+ throw e.onError?.(t), t;
519
+ }
520
+ }
521
+ async function g(r) {
522
+ let { delete: i } = t;
523
+ typeof i != "function" && d("delete", "disabled by the provider");
524
+ let a = n.value.find((e) => e.id === r) ?? null;
525
+ a && a.canDelete === !1 && d("delete", `not permitted for entry "${r}"`);
526
+ try {
527
+ await i(r), n.value = n.value.filter((e) => e.id !== r), a && f(() => t.onDeleted?.(a));
528
+ } catch (t) {
529
+ throw e.onError?.(t), t;
530
+ }
531
+ }
532
+ return {
533
+ savedBlocks: n,
534
+ isLoading: r,
535
+ categories: i,
536
+ canCreate: a,
537
+ canUpdate: o,
538
+ canDelete: s,
539
+ canUpdateBlock: c,
540
+ canDeleteBlock: u,
541
+ load: p,
542
+ create: m,
543
+ update: h,
544
+ remove: g
545
+ };
546
+ }
547
+ var be = "templatical:saved-blocks";
548
+ function xe(e = {}) {
549
+ let t = e.key ?? be;
550
+ function n() {
551
+ 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.");
552
+ return localStorage;
553
+ }
554
+ function r() {
555
+ let e = n().getItem(t);
556
+ if (!e) return [];
557
+ try {
558
+ let t = JSON.parse(e);
559
+ return Array.isArray(t) ? t : [];
560
+ } catch {
561
+ return [];
562
+ }
563
+ }
564
+ function i(e) {
565
+ n().setItem(t, JSON.stringify(e));
566
+ }
567
+ return {
568
+ async list(e) {
569
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
570
+ return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
571
+ },
572
+ async create(e) {
573
+ let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
574
+ id: C(),
575
+ name: e.name,
576
+ content: e.content,
577
+ ...e.category ? { category: e.category } : {},
578
+ createdAt: t,
579
+ updatedAt: t
580
+ };
581
+ return i([n, ...r()]), n;
582
+ },
583
+ async update(e, t) {
584
+ let n = r(), a = n.findIndex((t) => t.id === e);
585
+ if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
586
+ let o = {
587
+ ...n[a],
588
+ ...t,
589
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
590
+ }, s = [...n];
591
+ return s[a] = o, i(s), o;
592
+ },
593
+ async delete(e) {
594
+ let t = r();
595
+ if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
596
+ i(t.filter((t) => t.id !== e));
597
+ }
598
+ };
599
+ }
600
+ var Se = "templatical:media", Ce = 50;
601
+ function we(e = {}) {
602
+ let t = e.key ?? Se;
603
+ function n() {
604
+ 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.");
605
+ return localStorage;
606
+ }
607
+ function r() {
608
+ let e = n().getItem(t);
609
+ if (!e) return [];
610
+ try {
611
+ let t = JSON.parse(e);
612
+ return Array.isArray(t) ? t : [];
613
+ } catch {
614
+ return [];
615
+ }
616
+ }
617
+ function i(e) {
618
+ n().setItem(t, JSON.stringify(e));
619
+ }
620
+ function a(e) {
621
+ return typeof FileReader > "u" ? Promise.reject(/* @__PURE__ */ Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with FileReader.")) : new Promise((t, n) => {
622
+ let r = new FileReader();
623
+ r.onload = () => {
624
+ typeof r.result == "string" ? t(r.result) : n(/* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
625
+ }, r.onerror = () => {
626
+ n(r.error ?? /* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
627
+ }, r.readAsDataURL(e);
628
+ });
629
+ }
630
+ return {
631
+ async list(e) {
632
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
633
+ let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
634
+ return t.includes(n) || r.includes(n);
635
+ }) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + Ce), c = { items: s }, l = o + s.length;
636
+ return l < i.length && (c.nextCursor = String(l)), c;
637
+ },
638
+ async create(e) {
639
+ let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
640
+ id: C(),
641
+ url: t,
642
+ filename: e.filename || e.file.name,
643
+ createdAt: n,
644
+ updatedAt: n,
645
+ size: e.file.size
646
+ };
647
+ 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;
648
+ },
649
+ async update(e, t) {
650
+ let n = r(), a = n.findIndex((t) => t.id === e);
651
+ if (a === -1) throw Error(`[Templatical] Media asset not found: ${e}`);
652
+ let o = n[a], s = {
653
+ ...o,
654
+ ...t,
655
+ id: o.id,
656
+ url: o.url,
657
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
658
+ }, c = [...n];
659
+ return c[a] = s, i(c), s;
660
+ },
661
+ async delete(e) {
662
+ let t = r();
663
+ for (let n of e) if (!t.some((e) => e.id === n)) throw Error(`[Templatical] Media asset not found: ${n}`);
664
+ let n = new Set(e);
665
+ i(t.filter((e) => !n.has(e.id)));
666
+ },
667
+ folders: !1,
668
+ replace: !1,
669
+ importFromUrl: !1,
670
+ checkUsage: !1,
671
+ frequentlyUsed: !1,
672
+ storage: !1
673
+ };
674
+ }
675
+ function Te(e) {
676
+ let { provider: t, getTemplateId: n } = e, r = l([]), i = l(!1), a = l(void 0), o = l(!1), s = /* @__PURE__ */ new Map(), c = y(() => typeof t.create == "function"), u = y(() => typeof t.restore == "function");
677
+ function d(e) {
678
+ let t = n();
679
+ if (!t) throw new E(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
680
+ return t;
681
+ }
682
+ function f(e) {
683
+ throw new E(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
684
+ }
685
+ function p(t) {
686
+ V(e.onError, t);
687
+ }
688
+ async function m(n) {
689
+ let o = d("list");
690
+ i.value = !0;
691
+ try {
692
+ let e = await t.list(o, n);
693
+ r.value = e.versions, a.value = e.nextCursor;
694
+ } catch (t) {
695
+ throw e.onError?.(t), t;
696
+ } finally {
697
+ i.value = !1;
698
+ }
699
+ }
700
+ function h(e) {
701
+ return e.content ?? s.get(e.id) ?? null;
702
+ }
703
+ async function g(n) {
704
+ let r = h(n);
705
+ if (r) return r;
706
+ let i = d("get");
707
+ try {
708
+ let e = await t.get(i, n.id);
709
+ return s.set(n.id, e), e;
710
+ } catch (t) {
711
+ throw e.onError?.(t), t;
712
+ }
713
+ }
714
+ async function _(n, i) {
715
+ let { create: a } = t;
716
+ typeof a != "function" && f("create");
717
+ let o = d("create");
718
+ try {
719
+ let e = await a(o, n, i);
720
+ return r.value = [e, ...r.value], p(() => t.onCreated?.(e)), e;
721
+ } catch (t) {
722
+ throw e.onError?.(t), t;
723
+ }
724
+ }
725
+ async function v(n) {
726
+ let { restore: r } = t;
727
+ typeof r != "function" && f("restore");
728
+ let i = d("restore"), a;
729
+ o.value = !0;
730
+ try {
731
+ a = await r(i, n);
732
+ } catch (t) {
733
+ throw e.onError?.(t), t;
734
+ } finally {
735
+ o.value = !1;
736
+ }
737
+ return p(() => t.onRestored?.(a)), a;
738
+ }
739
+ return {
740
+ nextCursor: a,
741
+ versions: r,
742
+ isLoading: i,
743
+ isRestoring: o,
744
+ canCreate: c,
745
+ canRestore: u,
746
+ load: m,
747
+ peekContent: h,
748
+ resolveContent: g,
749
+ create: _,
750
+ restore: v
751
+ };
752
+ }
753
+ function Ee(e) {
754
+ let { provider: t, getTemplateId: n, getUser: r } = e, i = l([]), a = l(!1), o = l(!1), s = y(() => typeof t.create == "function"), c = y(() => typeof t.update == "function"), u = y(() => typeof t.delete == "function"), d = y(() => typeof t.setResolved == "function"), f = y(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), p = y(() => i.value.filter((e) => !e.resolvedAt).length), m = y(() => {
755
+ let e = /* @__PURE__ */ new Map();
756
+ for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
757
+ return e;
758
+ });
759
+ function h(e) {
760
+ let t = n();
761
+ if (!t) throw new E(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
762
+ return t;
763
+ }
764
+ function g(e) {
765
+ let t = r();
766
+ if (!t) throw new E(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
767
+ return t;
768
+ }
769
+ function _(e) {
770
+ throw new E(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
771
+ }
772
+ function v(e) {
773
+ for (let t of i.value) {
774
+ if (t.id === e) return t;
775
+ for (let n of t.replies ?? []) if (n.id === e) return n;
776
+ }
777
+ return null;
778
+ }
779
+ function b(e) {
780
+ let t = r();
781
+ return t !== null && e.author.id === t.id;
782
+ }
783
+ function x(t) {
784
+ let n = B(t);
785
+ throw e.onError?.(n), n;
786
+ }
787
+ function S(t) {
788
+ V(e.onError, t);
789
+ }
790
+ function C(e, t, n) {
791
+ return [
792
+ ...e.slice(0, t),
793
+ n,
794
+ ...e.slice(t + 1)
795
+ ];
796
+ }
797
+ function w(e, t) {
798
+ return e !== void 0 && JSON.stringify(e) === JSON.stringify(t);
799
+ }
800
+ function T(e) {
801
+ if (e.parentId) {
802
+ let t = !1, n = i.value.map((n) => {
803
+ if (n.id !== e.parentId) return n;
804
+ let r = n.replies ?? [], i = r.findIndex((t) => t.id === e.id);
805
+ return i !== -1 && w(r[i], e) ? n : (t = !0, {
806
+ ...n,
807
+ replies: i === -1 ? [...r, e] : C(r, i, e)
808
+ });
809
+ });
810
+ return t && (i.value = n), t;
811
+ }
812
+ let t = i.value.findIndex((t) => t.id === e.id);
813
+ if (t === -1) return i.value = [...i.value, e], !0;
814
+ let n = {
815
+ ...e,
816
+ replies: e.replies ?? i.value[t].replies
817
+ };
818
+ return !w(i.value[t], n) && (i.value = C(i.value, t, n), !0);
819
+ }
820
+ function D(e, t) {
821
+ let n = v(e), r = t ?? n?.parentId ?? null;
822
+ return r ? i.value = i.value.map((t) => t.id === r ? {
823
+ ...t,
824
+ replies: (t.replies ?? []).filter((t) => t.id !== e)
825
+ } : t) : i.value = i.value.filter((t) => t.id !== e), n;
826
+ }
827
+ async function O(e) {
828
+ let n = h("list");
829
+ a.value = !0;
830
+ try {
831
+ i.value = await t.list(n, e);
832
+ } catch (e) {
833
+ x(e);
834
+ } finally {
835
+ a.value = !1;
836
+ }
837
+ }
838
+ async function k(e) {
839
+ let { create: n } = t;
840
+ typeof n != "function" && _("create");
841
+ let r = h("create");
842
+ g("create"), o.value = !0;
843
+ try {
844
+ let i = await n(r, e);
845
+ return T(i), S(() => t.onCreated?.(i, { origin: "local" })), i;
846
+ } catch (e) {
847
+ x(e);
848
+ } finally {
849
+ o.value = !1;
850
+ }
851
+ }
852
+ async function A(e, n) {
853
+ let { update: r } = t;
854
+ typeof r != "function" && _("update");
855
+ let i = h("update");
856
+ g("update"), o.value = !0;
857
+ try {
858
+ let a = await r(i, e, n);
859
+ return T(a), S(() => t.onUpdated?.(a, { origin: "local" })), a;
860
+ } catch (e) {
861
+ x(e);
862
+ } finally {
863
+ o.value = !1;
864
+ }
865
+ }
866
+ async function j(e) {
867
+ let { delete: n } = t;
868
+ typeof n != "function" && _("delete");
869
+ let r = h("delete");
870
+ g("delete");
871
+ let i = v(e);
872
+ o.value = !0;
873
+ try {
874
+ await n(r, e), D(e), i && S(() => t.onDeleted?.(i, { origin: "local" }));
875
+ } catch (e) {
876
+ x(e);
877
+ } finally {
878
+ o.value = !1;
879
+ }
880
+ }
881
+ async function M(e, n) {
882
+ let { setResolved: r } = t;
883
+ typeof r != "function" && _("setResolved");
884
+ let i = h("setResolved");
885
+ g("setResolved"), o.value = !0;
886
+ try {
887
+ let a = await r(i, e, n);
888
+ return T(a), S(() => (a.resolvedAt ? t.onResolved : t.onUnresolved)?.(a, { origin: "local" })), a;
889
+ } catch (e) {
890
+ x(e);
891
+ } finally {
892
+ o.value = !1;
893
+ }
894
+ }
895
+ function N(e) {
896
+ T(e) && S(() => t.onCreated?.(e, { origin: "remote" }));
897
+ }
898
+ function P(e) {
899
+ T(e) && S(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
900
+ }
901
+ function F(e, n) {
902
+ let r = D(e, n);
903
+ r && S(() => t.onDeleted?.(r, { origin: "remote" }));
904
+ }
905
+ return {
906
+ comments: i,
907
+ isLoading: a,
908
+ isSubmitting: o,
909
+ canCreate: s,
910
+ canUpdate: c,
911
+ canDelete: u,
912
+ canResolve: d,
913
+ totalCount: f,
914
+ unresolvedCount: p,
915
+ commentCountByBlock: m,
916
+ load: O,
917
+ create: k,
918
+ update: A,
919
+ remove: j,
920
+ setResolved: M,
921
+ find: v,
922
+ isOwn: b,
923
+ applyRemoteCreate: N,
924
+ applyRemoteUpdate: P,
925
+ applyRemoteDelete: F
926
+ };
927
+ }
928
+ function De(e) {
929
+ let { comments: t, provider: n, getTemplateId: a } = e, { subscribe: o } = n;
930
+ if (typeof o != "function") return;
931
+ let s = null;
932
+ function c() {
933
+ s?.(), s = null;
934
+ }
935
+ i(() => a(), (e) => {
936
+ c(), e && (s = o(e, (e) => {
937
+ switch (e.type) {
938
+ case "created":
939
+ t.applyRemoteCreate(e.comment);
940
+ break;
941
+ case "updated":
942
+ t.applyRemoteUpdate(e.comment);
943
+ break;
944
+ case "deleted": t.applyRemoteDelete(e.commentId, e.parentId);
945
+ }
946
+ }));
947
+ }, { immediate: !0 }), r(c);
948
+ }
949
+ //#endregion
950
+ //#region src/composables/useImageUrlResolver.ts
951
+ function Oe(e) {
952
+ let t = c(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
953
+ function r(e) {
954
+ return t.get(e);
955
+ }
956
+ function i(e) {
957
+ return t.has(e) || n.has(e);
958
+ }
959
+ function a(r) {
960
+ if (i(r)) return;
961
+ let a;
962
+ try {
963
+ a = e(r);
964
+ } catch {
965
+ t.set(r, null);
966
+ return;
967
+ }
968
+ a === null || typeof a == "string" ? t.set(r, a) : (n.add(r), Promise.resolve(a).then((e) => {
969
+ t.set(r, typeof e == "string" ? e : null);
970
+ }, () => {
971
+ t.set(r, null);
972
+ }).finally(() => n.delete(r)));
973
+ }
974
+ return {
975
+ get: r,
976
+ has: i,
977
+ lookup: a
978
+ };
979
+ }
980
+ function G(e) {
981
+ let t = a(ne, null), n = y(e);
982
+ if (!t) return n;
983
+ let s;
984
+ function c() {
985
+ s !== void 0 && (clearTimeout(s), s = void 0);
986
+ }
987
+ o() && r(c);
988
+ let l = !0;
989
+ return i(n, (e) => {
990
+ c();
991
+ let n = l;
992
+ l = !1, e && !t.has(e) && (n ? t.lookup(e) : s = setTimeout(() => {
993
+ s = void 0, t.lookup(e);
994
+ }, 300));
995
+ }, { immediate: !0 }), y(() => {
996
+ let e = n.value;
997
+ if (!e) return e;
998
+ let r = t.get(e);
999
+ return typeof r == "string" && r.length > 0 ? r : e;
1000
+ });
1001
+ }
1002
+ function ke(e, t) {
1003
+ if (!e || !t) return t;
1004
+ let n = e.get(t);
1005
+ return typeof n == "string" && n.length > 0 ? n : t;
1006
+ }
1007
+ function K(e, t) {
1008
+ return typeof e?.url == "string" && w(e.url, t);
1009
+ }
1010
+ function q(e, t) {
1011
+ let n = e?.url;
1012
+ if (typeof n == "string" && n.trim() !== "") return w(n, t) ? void 0 : n;
1013
+ }
1014
+ function Ae(e) {
1015
+ let t = a(ee, F.liquid), n = G(() => q(e(), t));
1016
+ return y(() => K(e(), t) ? null : n.value);
1017
+ }
1018
+ function je(e, t, n) {
1019
+ return K(t, n) ? null : ke(e, q(t, n));
1020
+ }
1021
+ //#endregion
1022
+ //#region src/utils/blockTypeLabels.ts
1023
+ function J(e, t) {
1024
+ return t.blocks[e] ?? e;
1025
+ }
1026
+ function Me(e, t, n = []) {
1027
+ if (e.type !== "custom") return J(e.type, t);
1028
+ let { customType: r } = e;
1029
+ return n.find((e) => e.type === r)?.name ?? r;
1030
+ }
1031
+ //#endregion
1032
+ //#region src/utils/resolveFieldColors.ts
1033
+ function Ne(e, t) {
1034
+ let n = oe({ presets: e.presets }, ae), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
1035
+ return {
1036
+ presets: r ? t.presets : n.presets,
1037
+ allowCustom: t.allowCustom !== !1 && i,
1038
+ invalidPresets: n.invalidPresets,
1039
+ emptyPresets: e.presets !== void 0 && e.presets.length === 0,
1040
+ presetsInherited: r,
1041
+ allowCustomIgnored: e.allowCustom === !0 && t.allowCustom === !1
1042
+ };
1043
+ }
1044
+ var Pe = z({
1045
+ name: "code",
1046
+ size: 24,
1047
+ node: [["path", {
1048
+ d: "m16 18 6-6-6-6",
1049
+ key: "eg8j8"
1050
+ }], ["path", {
1051
+ d: "m8 6-6 6 6 6",
1052
+ key: "ppft3o"
1053
+ }]]
1054
+ }), Fe = z({
1055
+ name: "image",
1056
+ size: 24,
1057
+ node: [
1058
+ ["rect", {
1059
+ width: "18",
1060
+ height: "18",
1061
+ x: "3",
1062
+ y: "3",
1063
+ rx: "2",
1064
+ ry: "2",
1065
+ key: "1m3agn"
1066
+ }],
1067
+ ["circle", {
1068
+ cx: "9",
1069
+ cy: "9",
1070
+ r: "2",
1071
+ key: "af1f0g"
1072
+ }],
1073
+ ["path", {
1074
+ d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
1075
+ key: "1xmnt7"
1076
+ }]
1077
+ ]
1078
+ }), Ie = z({
1079
+ name: "navigation",
1080
+ size: 24,
1081
+ node: [["polygon", {
1082
+ points: "3 11 22 2 13 21 11 13 3 11",
1083
+ key: "1ltx0t"
1084
+ }]]
1085
+ }), Le = z({
1086
+ name: "share-2",
1087
+ size: 24,
1088
+ node: [
1089
+ ["circle", {
1090
+ cx: "18",
1091
+ cy: "5",
1092
+ r: "3",
1093
+ key: "gq8acd"
1094
+ }],
1095
+ ["circle", {
1096
+ cx: "6",
1097
+ cy: "12",
1098
+ r: "3",
1099
+ key: "w7nqdw"
1100
+ }],
1101
+ ["circle", {
1102
+ cx: "18",
1103
+ cy: "19",
1104
+ r: "3",
1105
+ key: "1xt0gg"
1106
+ }],
1107
+ ["line", {
1108
+ x1: "8.59",
1109
+ x2: "15.42",
1110
+ y1: "13.51",
1111
+ y2: "17.49",
1112
+ key: "47mynk"
1113
+ }],
1114
+ ["line", {
1115
+ x1: "15.41",
1116
+ x2: "8.59",
1117
+ y1: "6.51",
1118
+ y2: "10.49",
1119
+ key: "1n3mei"
1120
+ }]
1121
+ ]
1122
+ }), Re = z({
1123
+ name: "table",
1124
+ size: 24,
1125
+ node: [
1126
+ ["path", {
1127
+ d: "M12 3v18",
1128
+ key: "108xh3"
1129
+ }],
1130
+ ["rect", {
1131
+ width: "18",
1132
+ height: "18",
1133
+ x: "3",
1134
+ y: "3",
1135
+ rx: "2",
1136
+ key: "afitv7"
1137
+ }],
1138
+ ["path", {
1139
+ d: "M3 9h18",
1140
+ key: "1pudct"
1141
+ }],
1142
+ ["path", {
1143
+ d: "M3 15h18",
1144
+ key: "5xshup"
1145
+ }]
1146
+ ]
1147
+ });
1148
+ //#endregion
1149
+ //#region src/utils/imageNaturalSize.ts
1150
+ function ze(e) {
1151
+ return typeof e == "number" && Number.isFinite(e) && e > 0;
1152
+ }
1153
+ function Y(e, t) {
1154
+ return ze(e) && ze(t) ? {
1155
+ width: e,
1156
+ height: t
1157
+ } : null;
1158
+ }
1159
+ function Be(e) {
1160
+ return Y(e.naturalWidth, e.naturalHeight);
1161
+ }
1162
+ function Ve(e) {
1163
+ return e ? {
1164
+ naturalWidth: e.width,
1165
+ naturalHeight: e.height
1166
+ } : {
1167
+ naturalWidth: void 0,
1168
+ naturalHeight: void 0
1169
+ };
1170
+ }
1171
+ function He(e, t) {
1172
+ if (typeof Image > "u") return t(null), () => {};
1173
+ let n = new Image(), r = () => {
1174
+ n.onload = null, n.onerror = null;
1175
+ };
1176
+ return n.onload = () => {
1177
+ r(), t(Y(n.naturalWidth, n.naturalHeight));
1178
+ }, n.onerror = () => {
1179
+ r(), t(null);
1180
+ }, n.src = e, r;
1181
+ }
1182
+ function Ue(e) {
1183
+ return new Promise((t) => {
1184
+ let n = setTimeout(() => {
1185
+ r(), t(null);
1186
+ }, re), r = He(e, (e) => {
1187
+ clearTimeout(n), t(e);
1188
+ });
1189
+ });
1190
+ }
1191
+ //#endregion
1192
+ //#region src/components/MediaDropOverlay.vue
1193
+ var We = /* @__PURE__ */ b({
1194
+ __name: "MediaDropOverlay",
1195
+ props: {
1196
+ uploading: { type: Boolean },
1197
+ size: { default: "field" }
1198
+ },
1199
+ setup(n) {
1200
+ let r = n, { t: i } = ie(), a = {
1201
+ field: {
1202
+ gap: "tpl:gap-1.5",
1203
+ icon: 18,
1204
+ veil: "90%"
1205
+ },
1206
+ canvas: {
1207
+ gap: "tpl:gap-2",
1208
+ icon: 20,
1209
+ veil: "85%"
1210
+ }
1211
+ }, o = y(() => a[r.size]);
1212
+ return (r, a) => (e(), d("div", {
1213
+ class: h(["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]),
1214
+ style: t({ backgroundColor: `color-mix(in srgb, var(--tpl-bg) ${o.value.veil}, transparent)` })
1215
+ }, [n.uploading ? (e(), d(_, { key: 0 }, [f(u(se), {
1216
+ class: "tpl-spinner",
1217
+ size: o.value.icon,
1218
+ "stroke-width": 2
1219
+ }, null, 8, ["size"]), p(" " + m(u(i).image.uploading), 1)], 64)) : (e(), d(_, { key: 1 }, [f(u(ce), {
1220
+ size: o.value.icon,
1221
+ "stroke-width": 1.5
1222
+ }, null, 8, ["size"]), p(" " + m(u(i).image.dropToUpload), 1)], 64))], 6));
1223
+ }
1224
+ }), Ge = "image/";
1225
+ function Ke(e) {
1226
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || v(r), { isOverDropZone: a } = L(t, {
1227
+ preventDefaultForUnhandled: !0,
1228
+ onDrop: (e) => {
1229
+ if (!i()) return;
1230
+ let t = (e ?? []).filter((e) => e.type.startsWith(Ge));
1231
+ t.length > 0 && n([t[0]]);
1232
+ }
1233
+ });
1234
+ return { isOver: y(() => i() && a.value) };
1235
+ }
1236
+ //#endregion
1237
+ //#region src/composables/useMediaDropField.ts
1238
+ function qe(e) {
1239
+ let { target: t, blocked: n, apply: r } = e, i = a(R, null), o = a(te, null), s = le();
1240
+ async function c() {
1241
+ let e = await i?.({ accept: ["images"] });
1242
+ s.alive && e && r(e);
1243
+ }
1244
+ let u = l(!1), d = y(() => (o?.value ?? !!i) && !u.value && !v(n));
1245
+ async function f(e) {
1246
+ if (i) {
1247
+ u.value = !0;
1248
+ try {
1249
+ let t = await i({
1250
+ accept: ["images"],
1251
+ files: e
1252
+ });
1253
+ if (!s.alive) return;
1254
+ t && r(t);
1255
+ } finally {
1256
+ s.alive && (u.value = !1);
1257
+ }
1258
+ }
1259
+ }
1260
+ let { isOver: p } = Ke({
1261
+ target: t,
1262
+ enabled: d,
1263
+ onFiles: f
1264
+ }), m = y(() => d.value && p.value || u.value);
1265
+ return {
1266
+ canBrowse: !!i,
1267
+ dropEnabled: d,
1268
+ isUploading: u,
1269
+ showOverlay: m,
1270
+ openMediaBrowser: c
1271
+ };
1272
+ }
1273
+ function Je(e, t = "desktop") {
1274
+ return t === "mobile" ? 375 : e?.width ?? 600;
1275
+ }
1276
+ var Ye = "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)", Xe = {
1277
+ 1: [100],
1278
+ 2: [50, 50],
1279
+ 3: [
1280
+ 33.33,
1281
+ 33.33,
1282
+ 33.34
1283
+ ],
1284
+ "1-2": [33.33, 66.67],
1285
+ "2-1": [66.67, 33.33]
1286
+ };
1287
+ function X(e, t) {
1288
+ let n = (e) => Math.trunc(e ?? 0), r = (e) => T(e) === null ? 0 : Math.trunc(e.width);
1289
+ return n(e?.left) + n(e?.right) + r(t?.left) + r(t?.right);
1290
+ }
1291
+ function Z(e, t) {
1292
+ return Math.floor(e) - X(t);
1293
+ }
1294
+ function Ze(e, t) {
1295
+ let n = "border" in e ? e.border : void 0;
1296
+ return Math.floor(t) - X(e.styles.padding, n);
1297
+ }
1298
+ function* Q(e, t) {
1299
+ for (let n of e) P(n) ? yield* Q(n.children, Z(t, n.styles.padding)) : yield {
1300
+ block: n,
1301
+ bandWidth: x(n) && n.wrapper ? Z(t, n.wrapper.padding) : t
1302
+ };
1303
+ }
1304
+ function Qe(e, t) {
1305
+ if (!t) return e;
1306
+ try {
1307
+ return M(t, e);
1308
+ } catch {
1309
+ return e;
1310
+ }
1311
+ }
1312
+ function $e(e, t, n) {
1313
+ let r = Qe(e, n);
1314
+ for (let { block: e, bandWidth: n } of Q(r.blocks, r.settings.width)) if (x(e)) {
1315
+ let r = N(e)?.applied ? void 0 : e.border, i = Math.floor(n) - X(e.styles.padding, r), a = Xe[e.columns] ?? [100];
1316
+ for (let n = 0; n < e.children.length; n++) {
1317
+ let r = Math.floor(i * (a[n] ?? 100) / 100), o = e.children[n].find((e) => e.id === t);
1318
+ if (o) return Ze(o, r);
1319
+ }
1320
+ } else if (e.id === t) return Ze(e, n);
1321
+ return null;
1322
+ }
1323
+ function $(e, t, n) {
1324
+ let r = Qe(e, n);
1325
+ for (let { block: e, bandWidth: n } of Q(r.blocks, r.settings.width)) if (e.id === t) return Math.floor(n);
1326
+ return null;
1327
+ }
1328
+ function et(e, t, n) {
1329
+ if (!x(e)) return;
1330
+ let r = N(e);
1331
+ if (r?.applied && r.height === "image") return (t ? $(t, e.id, n) : null) ?? Je(t?.settings);
1332
+ }
1333
+ //#endregion
1334
+ //#region src/constants/socialIcons.ts
1335
+ var tt = A, nt = {
1336
+ small: 24,
1337
+ medium: 32,
1338
+ large: 48
1339
+ }, rt = [
1340
+ "facebook",
1341
+ "twitter",
1342
+ "instagram",
1343
+ "linkedin",
1344
+ "youtube",
1345
+ "tiktok",
1346
+ "pinterest",
1347
+ "email",
1348
+ "website",
1349
+ "whatsapp",
1350
+ "telegram",
1351
+ "discord",
1352
+ "snapchat",
1353
+ "reddit",
1354
+ "github",
1355
+ "dribbble",
1356
+ "behance"
1357
+ ];
1358
+ //#endregion
1359
+ export { we as A, ve as B, J as C, Ae as D, je as E, Ee as F, Te as H, ge as I, _e as L, he as M, me as N, G as O, De as P, ue as R, Me as S, q as T, ye as V, Le as _, et as a, Pe as b, Je as c, He as d, Ue as f, Re as g, Y as h, $e as i, xe as j, W as k, qe as l, Be as m, tt as n, $ as o, Ve as p, rt as r, Ye as s, nt as t, We as u, Ie as v, Oe as w, Ne as x, Fe as y, pe as z };