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