@templatical/editor 0.39.0 → 0.39.2

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 (273) hide show
  1. package/README.md +2 -4
  2. package/dist/{AiChatSidebar-jVlXXND3.js → AiChatSidebar-pOxCZWz9.js} +14 -14
  3. package/dist/{AiFeatureMenu-C1HCntyQ.js → AiFeatureMenu-Bljk6Qjv.js} +7 -7
  4. package/dist/{BlockIssueBadge-JhNgcUmZ.js → BlockIssueBadge-D5oGxOQP.js} +5 -5
  5. package/dist/{BlockPreviewCanvas-C_rA5LJN.js → BlockPreviewCanvas-DXGjUECG.js} +27 -27
  6. package/dist/{CloudHeaderExtras-DvYyNsPB.js → CloudHeaderExtras-DaocwNmy.js} +5 -5
  7. package/dist/{CloudPanels-CDPhPVdd.js → CloudPanels-CyZAnSJY.js} +7 -7
  8. package/dist/{CollaboratorBar-Co9UPoB0.js → CollaboratorBar-C7Zca3g1.js} +4 -4
  9. package/dist/{CommentsPanel-CRcVN9Ri.js → CommentsPanel-CNOb7YCm.js} +2 -2
  10. package/dist/{CommentsSidebar-gDU977br.js → CommentsSidebar-VmwjU9va.js} +14 -14
  11. package/dist/{CountdownBlock-CEzrfe5R.js → CountdownBlock-DSvbf3qU.js} +3 -3
  12. package/dist/{CountdownToolbar-B00zhkNJ.js → CountdownToolbar-C2kfS6Oy.js} +31 -30
  13. package/dist/{DesignReferenceSidebar-DedivZZl.js → DesignReferenceSidebar-QC4gEUWp.js} +11 -11
  14. package/dist/{IssuesPanel-C-PjdmAV.js → IssuesPanel-DL2Xr14_.js} +8 -8
  15. package/dist/{LoadingTrack-BlTL4zFv.js → LoadingTrack-C2jKCU2d.js} +1 -1
  16. package/dist/LogicTagInsertButton-D8IwH-9Z.js +1071 -0
  17. package/dist/MediaEditModal-D4GEq2md.js +3545 -0
  18. package/dist/{MediaPanels-BpQNY8YX.js → MediaPanels-sapgKtxu.js} +2 -2
  19. package/dist/MergeTagInput-QI-5KG2R.js +81 -0
  20. package/dist/{MergeTagModeToggle-DGuzSAdX.js → MergeTagModeToggle-D793Bj_E.js} +14 -55
  21. package/dist/{ParagraphEditor-jMKLLTa8.js → ParagraphEditor-DkkPSexG.js} +65 -66
  22. package/dist/{RestoreVersionDialog-DG1jUdBM.js → RestoreVersionDialog-BgueZnZr.js} +5 -5
  23. package/dist/{RichTextEditorContent-JrNEg0kv.js → RichTextEditorContent-BC5UTVnb.js} +11 -11
  24. package/dist/{SaveBlockDialog-C0KC-OKs.js → SaveBlockDialog-BuTuVlLr.js} +12 -11
  25. package/dist/{SavedBlocksBrowserModal-zyOiRgWZ.js → SavedBlocksBrowserModal-Srhix8BB.js} +17 -16
  26. package/dist/{SavedBlocksPanels-epMd799w.js → SavedBlocksPanels-B2iScCS-.js} +2 -2
  27. package/dist/{SavedBlocksPickBar-CJqqQ3jd.js → SavedBlocksPickBar-cI7bDQQi.js} +4 -4
  28. package/dist/{TemplateScoringPanel-m2FOeaai.js → TemplateScoringPanel-C2Rdlyn6.js} +16 -16
  29. package/dist/TemplateSettings-C_5leDdF.js +245 -0
  30. package/dist/{TestEmailModal-D58kYkMV.js → TestEmailModal-DJ5q_u4N.js} +10 -10
  31. package/dist/{TestEmailPanel-BmFVBIQt.js → TestEmailPanel-CP24UGst.js} +2 -2
  32. package/dist/{TitleEditor-C4BGPXnf.js → TitleEditor-QBBOXtxx.js} +15 -15
  33. package/dist/ToggleSwitch-JvQ_CmI1.js +102 -0
  34. package/dist/Toolbar-COD2TW20.js +2426 -0
  35. package/dist/{TplModal-BIDJw4Kj.js → TplModal-C8xGjC1l.js} +5 -5
  36. package/dist/{VersionHistoryMenu-dt_aZQfh.js → VersionHistoryMenu-BVQityes.js} +10 -10
  37. package/dist/{VersionHistoryPanels-B_5SBRrr.js → VersionHistoryPanels-BrK6na4A.js} +2 -2
  38. package/dist/{VersionPreviewBanner-DttvOkwd.js → VersionPreviewBanner-BaMSgA1O.js} +3 -3
  39. package/dist/{blockTypeIcons-CzTizYmK.js → blockTypeIcons-CdXugKyV.js} +16 -37
  40. package/dist/bundle-stats.json +8 -8
  41. package/dist/{ca-Jx2CDwtn.js → ca-BTf1Zbqb.js} +9 -0
  42. package/dist/cdn/chunks/{AiChatSidebar-DeZl9Tk0.js → AiChatSidebar-CjSEoK4x.js} +8 -8
  43. package/dist/cdn/chunks/{AiChatSidebar-DeZl9Tk0.js.map → AiChatSidebar-CjSEoK4x.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiFeatureMenu-Bv8jMu9p.js → AiFeatureMenu-l0K5TOSn.js} +6 -6
  45. package/dist/cdn/chunks/{AiFeatureMenu-Bv8jMu9p.js.map → AiFeatureMenu-l0K5TOSn.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockIssueBadge-B6PpoOPv.js → BlockIssueBadge-9hHpaXb9.js} +5 -5
  47. package/dist/cdn/chunks/{BlockIssueBadge-B6PpoOPv.js.map → BlockIssueBadge-9hHpaXb9.js.map} +1 -1
  48. package/dist/cdn/chunks/{BlockPreviewCanvas-DfEtDosD.js → BlockPreviewCanvas-lQrAdgG3.js} +30 -30
  49. package/dist/cdn/chunks/{BlockPreviewCanvas-DfEtDosD.js.map → BlockPreviewCanvas-lQrAdgG3.js.map} +1 -1
  50. package/dist/cdn/chunks/{CloudHeaderExtras-Hk98ub-C.js → CloudHeaderExtras-CXNe7Q-4.js} +5 -5
  51. package/dist/cdn/chunks/{CloudHeaderExtras-Hk98ub-C.js.map → CloudHeaderExtras-CXNe7Q-4.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudPanels-Ba3GLmvF.js → CloudPanels-bHhh9AUA.js} +6 -6
  53. package/dist/cdn/chunks/{CloudPanels-Ba3GLmvF.js.map → CloudPanels-bHhh9AUA.js.map} +1 -1
  54. package/dist/cdn/chunks/{CollaboratorBar-D2dCQ9gg.js → CollaboratorBar-DgqcaGGI.js} +5 -5
  55. package/dist/cdn/chunks/{CollaboratorBar-D2dCQ9gg.js.map → CollaboratorBar-DgqcaGGI.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-CV2HveQk.js → CommentsPanel-Cy4TlTHC.js} +3 -3
  57. package/dist/cdn/chunks/{CommentsPanel-CV2HveQk.js.map → CommentsPanel-Cy4TlTHC.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-Dok_vaRc.js → CommentsSidebar-C7oAP3Mx.js} +5 -5
  59. package/dist/cdn/chunks/{CommentsSidebar-Dok_vaRc.js.map → CommentsSidebar-C7oAP3Mx.js.map} +1 -1
  60. package/dist/cdn/chunks/{CountdownBlock-DGDl3ota.js → CountdownBlock-DdC8Lg5F.js} +4 -4
  61. package/dist/cdn/chunks/{CountdownBlock-DGDl3ota.js.map → CountdownBlock-DdC8Lg5F.js.map} +1 -1
  62. package/dist/cdn/chunks/{CountdownToolbar-B9Rin64t.js → CountdownToolbar-CN9h4nlC.js} +22 -21
  63. package/dist/cdn/chunks/{CountdownToolbar-B9Rin64t.js.map → CountdownToolbar-CN9h4nlC.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-eCuTFak2.js → DesignReferenceSidebar-Bjo0M-AY.js} +7 -7
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-eCuTFak2.js.map → DesignReferenceSidebar-Bjo0M-AY.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-CP7FEzw7.js → IssuesPanel-DdFk-Blf.js} +6 -6
  67. package/dist/cdn/chunks/{IssuesPanel-CP7FEzw7.js.map → IssuesPanel-DdFk-Blf.js.map} +1 -1
  68. package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js → LoadingTrack-Ba5xh5HD.js} +2 -2
  69. package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js.map → LoadingTrack-Ba5xh5HD.js.map} +1 -1
  70. package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js +1035 -0
  71. package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js.map +1 -0
  72. package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js +3529 -0
  73. package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js.map +1 -0
  74. package/dist/cdn/chunks/{MediaPanels-TYrKKHX5.js → MediaPanels-CSBCsFwT.js} +3 -3
  75. package/dist/cdn/chunks/{MediaPanels-TYrKKHX5.js.map → MediaPanels-CSBCsFwT.js.map} +1 -1
  76. package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js +83 -0
  77. package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js.map +1 -0
  78. package/dist/cdn/chunks/{MergeTagModeToggle-QGTUIWWo.js → MergeTagModeToggle-n3nvSNeQ.js} +5 -5
  79. package/dist/cdn/chunks/{MergeTagModeToggle-QGTUIWWo.js.map → MergeTagModeToggle-n3nvSNeQ.js.map} +1 -1
  80. package/dist/cdn/chunks/{ParagraphEditor-D1tsPv4v.js → ParagraphEditor-DO4RzP8l.js} +40 -40
  81. package/dist/cdn/chunks/{ParagraphEditor-D1tsPv4v.js.map → ParagraphEditor-DO4RzP8l.js.map} +1 -1
  82. package/dist/cdn/chunks/{RestoreVersionDialog-BeCxNPLS.js → RestoreVersionDialog-CzZ_sFnz.js} +5 -5
  83. package/dist/cdn/chunks/{RestoreVersionDialog-BeCxNPLS.js.map → RestoreVersionDialog-CzZ_sFnz.js.map} +1 -1
  84. package/dist/cdn/chunks/{RichTextEditorContent-BBxzACFQ.js → RichTextEditorContent-Ch5zeyZ7.js} +8 -8
  85. package/dist/cdn/chunks/{RichTextEditorContent-BBxzACFQ.js.map → RichTextEditorContent-Ch5zeyZ7.js.map} +1 -1
  86. package/dist/cdn/chunks/{SaveBlockDialog-CLgh_g7H.js → SaveBlockDialog-LgxYrXyx.js} +10 -9
  87. package/dist/cdn/chunks/{SaveBlockDialog-CLgh_g7H.js.map → SaveBlockDialog-LgxYrXyx.js.map} +1 -1
  88. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B4TcUJJe.js → SavedBlocksBrowserModal-CdeSsTpb.js} +9 -9
  89. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B4TcUJJe.js.map → SavedBlocksBrowserModal-CdeSsTpb.js.map} +1 -1
  90. package/dist/cdn/chunks/{SavedBlocksPanels-CaBsHoRC.js → SavedBlocksPanels-B5hakNJj.js} +3 -3
  91. package/dist/cdn/chunks/{SavedBlocksPanels-CaBsHoRC.js.map → SavedBlocksPanels-B5hakNJj.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksPickBar-iG35XCDx.js → SavedBlocksPickBar-Cl6PLwwV.js} +5 -5
  93. package/dist/cdn/chunks/{SavedBlocksPickBar-iG35XCDx.js.map → SavedBlocksPickBar-Cl6PLwwV.js.map} +1 -1
  94. package/dist/cdn/chunks/{TemplateScoringPanel-DuQJBykq.js → TemplateScoringPanel--JxR6CsQ.js} +6 -6
  95. package/dist/cdn/chunks/{TemplateScoringPanel-DuQJBykq.js.map → TemplateScoringPanel--JxR6CsQ.js.map} +1 -1
  96. package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js +207 -0
  97. package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js.map +1 -0
  98. package/dist/cdn/chunks/{TestEmailModal-D6Woss3r.js → TestEmailModal-BAuDxJtD.js} +9 -9
  99. package/dist/cdn/chunks/{TestEmailModal-D6Woss3r.js.map → TestEmailModal-BAuDxJtD.js.map} +1 -1
  100. package/dist/cdn/chunks/{TestEmailPanel-CWQFB7J3.js → TestEmailPanel-GUGZisLp.js} +3 -3
  101. package/dist/cdn/chunks/{TestEmailPanel-CWQFB7J3.js.map → TestEmailPanel-GUGZisLp.js.map} +1 -1
  102. package/dist/cdn/chunks/{TitleEditor-CbY1tgSl.js → TitleEditor-uKu33Nwr.js} +12 -12
  103. package/dist/cdn/chunks/{TitleEditor-CbY1tgSl.js.map → TitleEditor-uKu33Nwr.js.map} +1 -1
  104. package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js +104 -0
  105. package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js.map +1 -0
  106. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js +2385 -0
  107. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js.map +1 -0
  108. package/dist/cdn/chunks/{TplModal-CGpp-d_r.js → TplModal-DuwS2ifK.js} +5 -5
  109. package/dist/cdn/chunks/{TplModal-CGpp-d_r.js.map → TplModal-DuwS2ifK.js.map} +1 -1
  110. package/dist/cdn/chunks/{VersionHistoryMenu-ByVJXDbK.js → VersionHistoryMenu-Dij1pTEb.js} +6 -6
  111. package/dist/cdn/chunks/{VersionHistoryMenu-ByVJXDbK.js.map → VersionHistoryMenu-Dij1pTEb.js.map} +1 -1
  112. package/dist/cdn/chunks/{VersionHistoryPanels-CQJ5OggF.js → VersionHistoryPanels-GeR6MStB.js} +3 -3
  113. package/dist/cdn/chunks/{VersionHistoryPanels-CQJ5OggF.js.map → VersionHistoryPanels-GeR6MStB.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionPreviewBanner-G4lLbfr8.js → VersionPreviewBanner-Df3FVlig.js} +4 -4
  115. package/dist/cdn/chunks/{VersionPreviewBanner-G4lLbfr8.js.map → VersionPreviewBanner-Df3FVlig.js.map} +1 -1
  116. package/dist/cdn/chunks/{blockTypeIcons-CQY-vxdM.js → blockTypeIcons-raBjStuv.js} +2 -2
  117. package/dist/cdn/chunks/{blockTypeIcons-CQY-vxdM.js.map → blockTypeIcons-raBjStuv.js.map} +1 -1
  118. package/dist/cdn/chunks/{ca-Jx2CDwtn.js → ca-BTf1Zbqb.js} +10 -1
  119. package/dist/cdn/chunks/{ca-Jx2CDwtn.js.map → ca-BTf1Zbqb.js.map} +1 -1
  120. package/dist/cdn/chunks/{cloud-BLgCKP7Z.js → cloud-eaXyxZ8l.js} +2 -2
  121. package/dist/cdn/chunks/{cloud-BLgCKP7Z.js.map → cloud-eaXyxZ8l.js.map} +1 -1
  122. package/dist/cdn/chunks/{createCloudRuntime-ClvtMBF1.js → createCloudRuntime-D5bXzcTe.js} +6 -6
  123. package/dist/cdn/chunks/{createCloudRuntime-ClvtMBF1.js.map → createCloudRuntime-D5bXzcTe.js.map} +1 -1
  124. package/dist/{de-Ck0pBGHu.js → cdn/chunks/de-xzrh9PA3.js} +11 -0
  125. package/dist/cdn/chunks/{de-Ck0pBGHu.js.map → de-xzrh9PA3.js.map} +1 -1
  126. package/dist/cdn/chunks/{dist-BW6Y49zE.js → dist-BRZhN8qJ.js} +4 -4
  127. package/dist/cdn/chunks/dist-BRZhN8qJ.js.map +1 -0
  128. package/dist/cdn/chunks/{dist-CAFTQ6Y2.js → dist-CXB2_kBa.js} +27 -22
  129. package/dist/cdn/chunks/dist-CXB2_kBa.js.map +1 -0
  130. package/dist/cdn/chunks/{draggable-kbOhCgnk.js → draggable-IB4x6w2O.js} +1477 -1470
  131. package/dist/cdn/chunks/draggable-IB4x6w2O.js.map +1 -0
  132. package/dist/cdn/chunks/editor-modal-C-yBlj2C.js +2700 -0
  133. package/dist/cdn/chunks/editor-modal-C-yBlj2C.js.map +1 -0
  134. package/dist/cdn/chunks/en-DYtFUE2l.js +2 -0
  135. package/dist/cdn/chunks/{es-lagTvUfX.js → es-BT4LSpE2.js} +10 -1
  136. package/dist/cdn/chunks/{es-lagTvUfX.js.map → es-BT4LSpE2.js.map} +1 -1
  137. package/dist/cdn/chunks/{extensions-D2YIhF7u.js → extensions-Bhu8UEE5.js} +105 -45
  138. package/dist/cdn/chunks/extensions-Bhu8UEE5.js.map +1 -0
  139. package/dist/cdn/chunks/{fr-C4hVl5Lk.js → fr-CI7OJoql.js} +10 -1
  140. package/dist/cdn/chunks/{fr-C4hVl5Lk.js.map → fr-CI7OJoql.js.map} +1 -1
  141. package/dist/cdn/chunks/{icons-DdrAicM2.js → icons-BKkJ-5xF.js} +43 -43
  142. package/dist/cdn/chunks/{icons-DdrAicM2.js.map → icons-BKkJ-5xF.js.map} +1 -1
  143. package/dist/cdn/chunks/{keys-DXYJTLZF.js → keys-dJbD1QPs.js} +2 -2
  144. package/dist/cdn/chunks/{keys-DXYJTLZF.js.map → keys-dJbD1QPs.js.map} +1 -1
  145. package/dist/{nl-CReD7Apd.js → cdn/chunks/nl-D8y5OWGB.js} +11 -0
  146. package/dist/cdn/chunks/{nl-CReD7Apd.js.map → nl-D8y5OWGB.js.map} +1 -1
  147. package/dist/cdn/chunks/{pt-BR-BRA0-vGP.js → pt-BR-DMCbUBvJ.js} +10 -1
  148. package/dist/cdn/chunks/{pt-BR-BRA0-vGP.js.map → pt-BR-DMCbUBvJ.js.map} +1 -1
  149. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js +1054 -0
  150. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +1 -0
  151. package/dist/cdn/chunks/{src-fn7uy1FD.js → src-O5Sp_qJ7.js} +3 -3
  152. package/dist/cdn/chunks/{src-fn7uy1FD.js.map → src-O5Sp_qJ7.js.map} +1 -1
  153. package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js +36 -0
  154. package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js.map +1 -0
  155. package/dist/cdn/chunks/{tiptap-Epe8m3Vo.js → tiptap-DhLuKyDc.js} +2776 -2773
  156. package/dist/cdn/chunks/tiptap-DhLuKyDc.js.map +1 -0
  157. package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js → useAliveFlag-DAlQLbM2.js} +2 -2
  158. package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js.map → useAliveFlag-DAlQLbM2.js.map} +1 -1
  159. package/dist/cdn/chunks/{useCloudI18n-OezCj0cx.js → useCloudI18n-C09JcFS0.js} +3 -3
  160. package/dist/cdn/chunks/{useCloudI18n-OezCj0cx.js.map → useCloudI18n-C09JcFS0.js.map} +1 -1
  161. package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js +2592 -0
  162. package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js.map +1 -0
  163. package/dist/cdn/chunks/useEditorRoot-DFx2fXJP.js +10 -0
  164. package/dist/cdn/chunks/{useEditorRoot-ByHPMqYT.js.map → useEditorRoot-DFx2fXJP.js.map} +1 -1
  165. package/dist/cdn/chunks/{useI18n-BhE7ndNr.js → useI18n-DTZ9sIcv.js} +3 -3
  166. package/dist/cdn/chunks/{useI18n-BhE7ndNr.js.map → useI18n-DTZ9sIcv.js.map} +1 -1
  167. package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js +38 -0
  168. package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js.map +1 -0
  169. package/dist/cdn/chunks/{useMergeTag-DE2mpy1w.js → useMergeTag-BE8oDoha.js} +3 -3
  170. package/dist/cdn/chunks/{useMergeTag-DE2mpy1w.js.map → useMergeTag-BE8oDoha.js.map} +1 -1
  171. package/dist/cdn/chunks/{usePopoverPosition-BPL891uG.js → usePopoverPosition-gB9q-ql7.js} +3 -3
  172. package/dist/cdn/chunks/{usePopoverPosition-BPL891uG.js.map → usePopoverPosition-gB9q-ql7.js.map} +1 -1
  173. package/dist/cdn/chunks/{useScrollToBlock-DwF4pVur.js → useScrollToBlock-CtTXwmiU.js} +3 -3
  174. package/dist/cdn/chunks/{useScrollToBlock-DwF4pVur.js.map → useScrollToBlock-CtTXwmiU.js.map} +1 -1
  175. package/dist/cdn/editor.css +1 -1
  176. package/dist/cdn/editor.js +809 -3337
  177. package/dist/cdn/editor.js.map +1 -1
  178. package/dist/{check-9xX6RVHz.js → check-eqb2JhqU.js} +1 -1
  179. package/dist/{chevron-down-J5hFJ6TL.js → chevron-down-Dkr-7Ywl.js} +1 -1
  180. package/dist/{chevron-right-BJuo5PQ-.js → chevron-right-Bge4XF_B.js} +1 -1
  181. package/dist/{chevron-up-Qfi5k52_.js → chevron-up-CQAyl0kC.js} +1 -1
  182. package/dist/{circle-alert-BiArYmkB.js → circle-alert-CYgTHKWr.js} +1 -1
  183. package/dist/{clock-BkYJZ7Y0.js → clock-BgSJZJP5.js} +1 -1
  184. package/dist/{cloud-DdidMW6f.js → cloud-C9xWZXhg.js} +1 -1
  185. package/dist/{copy-BRLUNHwF.js → copy-mw6PVnOJ.js} +1 -1
  186. package/dist/{createCloudRuntime-CNFXaTNQ.js → createCloudRuntime-BGd5--Bq.js} +5 -5
  187. package/dist/{createLucideIcon-CDDkF1Tm.js → createLucideIcon-BxY5yz5u.js} +6 -6
  188. package/dist/{cdn/chunks/de-Ck0pBGHu.js → de-xzrh9PA3.js} +9 -2
  189. package/dist/{dist-D8i1ixHK.js → dist-8VFzbeu9.js} +3 -3
  190. package/dist/{dist-DBirAJIs.js → dist-BDuPwOyn.js} +26 -21
  191. package/dist/{dist-CtF9STPS.js → dist-BJM3eFyT.js} +1 -1
  192. package/dist/{dist-DkcA6epL.js → dist-BdHF7nyq.js} +3 -3
  193. package/dist/{dist-ByT5fgKq.js → dist-Bl4rxpX9.js} +1 -1
  194. package/dist/{dist-BVqAYoRB.js → dist-BmsLcnrO.js} +4 -4
  195. package/dist/{dist-CtMXAH7a.js → dist-BxVnMgXZ.js} +1 -1
  196. package/dist/{dist-DC-3T0ED.js → dist-CQSVro7b.js} +1 -1
  197. package/dist/{dist-f7HXo6j6.js → dist-DQbOebGW.js} +1 -1
  198. package/dist/{dist-DL9334yz.js → dist-DerFNpDY.js} +3 -3
  199. package/dist/{dist-D08oVYhr.js → dist-Djmzp6wi.js} +1 -1
  200. package/dist/{dist-D7WY8VPq.js → dist-DyrEOKEJ.js} +1 -1
  201. package/dist/{dist-DzdeVn-W.js → dist-EDkj3Ub1.js} +1 -1
  202. package/dist/{dist-C1tsW_99.js → dist-wyXxj3R1.js} +1 -1
  203. package/dist/editor-modal-oD1qNz_P.js +2773 -0
  204. package/dist/en-CM5fTFSo.js +2 -0
  205. package/dist/{es-lagTvUfX.js → es-BT4LSpE2.js} +9 -0
  206. package/dist/extensions-DRN-elXT.js +1645 -0
  207. package/dist/{eye-DwhBOaV8.js → eye-DphkRtAD.js} +1 -1
  208. package/dist/{fr-C4hVl5Lk.js → fr-CI7OJoql.js} +9 -0
  209. package/dist/{image-up-CiyQNZBt.js → image-up-Qi2BXD7T.js} +1 -1
  210. package/dist/{info-D6A1qEiF.js → info-VSyAs02q.js} +1 -1
  211. package/dist/{keys-DD1rl72F.js → keys-BdoSgsz9.js} +1 -1
  212. package/dist/{link-tKGmYWsB.js → link-CNuozGqD.js} +1 -1
  213. package/dist/{list-DjZQRpeI.js → list-BA0I5Wmu.js} +1 -1
  214. package/dist/{loader-circle-D9ZL3Sv0.js → loader-circle-z5eeqasv.js} +1 -1
  215. package/dist/{message-circle-KTHxCcpB.js → message-circle-BsQ9hEup.js} +1 -1
  216. package/dist/{cdn/chunks/nl-CReD7Apd.js → nl-D8y5OWGB.js} +9 -2
  217. package/dist/package-OkXfuRoO.js +25 -0
  218. package/dist/{pencil-Bq-nbQ7F.js → pencil-DFVFA7Dj.js} +1 -1
  219. package/dist/{plus-CRMnR4IG.js → plus-D8bkVjZ7.js} +1 -1
  220. package/dist/{pt-BR-BRA0-vGP.js → pt-BR-DMCbUBvJ.js} +9 -0
  221. package/dist/{refresh-cw-D7bYS5tm.js → refresh-cw-DPB7YFuz.js} +1 -1
  222. package/dist/{runtime-dom.esm-bundler-PnoZU512.js → runtime-dom.esm-bundler-BGbPz4-g.js} +2 -2
  223. package/dist/{search-DUo0YwPz.js → search-C-dCgqIa.js} +1 -1
  224. package/dist/{send-DaVMQphu.js → send-Cm2fy2zm.js} +1 -1
  225. package/dist/{shield-check-DxaaurL9.js → shield-check-COgBYFDF.js} +1 -1
  226. package/dist/smartphone-v0u_MOEV.js +46 -0
  227. package/dist/socialIcons-DkGcpEwC.js +1130 -0
  228. package/dist/{sparkles-D6T6k30e.js → sparkles-Ds0RF8Iu.js} +1 -1
  229. package/dist/style.css +1 -1
  230. package/dist/templateSettingsFields-YCFVBVYh.js +34 -0
  231. package/dist/templatical-editor.js +895 -3498
  232. package/dist/{text-align-start-vreFpmCX.js → text-align-start-DiavaIm6.js} +1 -1
  233. package/dist/{trash-DBv8MGY6.js → trash-DnOkfu2V.js} +1 -1
  234. package/dist/{triangle-alert-CmNS2LLv.js → triangle-alert-DGLAyXnh.js} +1 -1
  235. package/dist/{upload-DDB9Fs0P.js → upload-BBDme2cy.js} +1 -1
  236. package/dist/{useAliveFlag-oyByIcjy.js → useAliveFlag-BkKyhkwZ.js} +1 -1
  237. package/dist/{useCloudI18n-C1wuXik6.js → useCloudI18n-D1iedlP3.js} +2 -2
  238. package/dist/{useEditorCore-jfwgLThK.js → useEditorCore-C5APBjjV.js} +1140 -2325
  239. package/dist/{useEditorRoot-eVv4doqZ.js → useEditorRoot-BOxn5EfP.js} +2 -2
  240. package/dist/{useI18n-VOtdfENx.js → useI18n-Ds_-druD.js} +2 -2
  241. package/dist/useLogicTag-DoHfc08B.js +36 -0
  242. package/dist/{useMergeTag-CQM9pFca.js → useMergeTag-DXyum3kG.js} +2 -2
  243. package/dist/{usePopoverPosition-gZjRywai.js → usePopoverPosition-Du-Ah8E9.js} +2 -2
  244. package/dist/{useScrollToBlock-C0Ehnyl4.js → useScrollToBlock-DXQYPCnJ.js} +3 -3
  245. package/dist/{vue.runtime.esm-bundler-DShF3P6k.js → vue.runtime.esm-bundler-CyqhBwpY.js} +1133 -1126
  246. package/dist/{x-B7sgO_z8.js → x-3BHV3Q6K.js} +1 -1
  247. package/package.json +14 -14
  248. package/dist/ColorPicker-BTtN94te.js +0 -501
  249. package/dist/FieldRow-C8nOknr_.js +0 -128
  250. package/dist/MergeTagInput-Cw1RoMly.js +0 -509
  251. package/dist/MergeTagSuggestion-BXO3UIXW.js +0 -1329
  252. package/dist/cdn/chunks/ColorPicker-BaonTCAQ.js +0 -502
  253. package/dist/cdn/chunks/ColorPicker-BaonTCAQ.js.map +0 -1
  254. package/dist/cdn/chunks/FieldRow-D9OJhYeb.js +0 -130
  255. package/dist/cdn/chunks/FieldRow-D9OJhYeb.js.map +0 -1
  256. package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js +0 -470
  257. package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js.map +0 -1
  258. package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.js +0 -215
  259. package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.js.map +0 -1
  260. package/dist/cdn/chunks/dist-BW6Y49zE.js.map +0 -1
  261. package/dist/cdn/chunks/dist-CAFTQ6Y2.js.map +0 -1
  262. package/dist/cdn/chunks/draggable-kbOhCgnk.js.map +0 -1
  263. package/dist/cdn/chunks/editor-modal-B6IdQWlf.js +0 -5908
  264. package/dist/cdn/chunks/editor-modal-B6IdQWlf.js.map +0 -1
  265. package/dist/cdn/chunks/en-DjunooBz.js +0 -2
  266. package/dist/cdn/chunks/extensions-D2YIhF7u.js.map +0 -1
  267. package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +0 -1
  268. package/dist/cdn/chunks/useEditorCore-06PtcUi1.js +0 -3698
  269. package/dist/cdn/chunks/useEditorCore-06PtcUi1.js.map +0 -1
  270. package/dist/cdn/chunks/useEditorRoot-ByHPMqYT.js +0 -10
  271. package/dist/editor-modal-uAEB6xKz.js +0 -5998
  272. package/dist/en-CQWkDCpm.js +0 -2
  273. package/dist/extensions-CcGj7OfS.js +0 -470
@@ -0,0 +1,1054 @@
1
+ import { B as e, Q as t, W as n, X as r, Y as i, Z as a, f as o, ot as s, rt as c } from "./draggable-IB4x6w2O.js";
2
+ import { L as l, S as u, b as d, nt as f, t as p, z as m } from "./src-Dwgq7hf4.js";
3
+ import { r as h } from "./dist-CXB2_kBa.js";
4
+ import { a as g, o as _ } from "./usePopoverPosition-gB9q-ql7.js";
5
+ //#region ../core/src/error-reporting.ts
6
+ function v(e) {
7
+ return e instanceof Error ? e : Error(String(e), { cause: e });
8
+ }
9
+ function y(e, t) {
10
+ try {
11
+ t();
12
+ } catch (t) {
13
+ e?.(v(t));
14
+ }
15
+ }
16
+ //#endregion
17
+ //#region ../core/src/editor.ts
18
+ function b(e) {
19
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
20
+ }
21
+ function x(e) {
22
+ let t = r({
23
+ template: null,
24
+ content: e.content ?? m(e.defaultFontFamily, e.templateDefaults),
25
+ selectedBlockId: null,
26
+ viewport: "desktop",
27
+ darkMode: !1,
28
+ previewMode: !1,
29
+ isDirty: !1,
30
+ isSaving: !1,
31
+ isLoading: !1,
32
+ uiTheme: "auto"
33
+ }), i = 0;
34
+ function o() {
35
+ t.isDirty = !0, i++;
36
+ }
37
+ let s = n({
38
+ get: () => t.content,
39
+ set: (e) => {
40
+ t.content = e, o();
41
+ }
42
+ }), c = n(() => t.selectedBlockId ? l(t.content.blocks, t.selectedBlockId) : null);
43
+ function l(e, t) {
44
+ for (let n of e) {
45
+ if (n.id === t) return n;
46
+ if (n.type === "section") for (let e of n.children) {
47
+ let n = l(e, t);
48
+ if (n) return n;
49
+ }
50
+ }
51
+ return null;
52
+ }
53
+ function u(e, t) {
54
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) u(e, t);
55
+ }
56
+ function d(e, t, n = { blocks: e }) {
57
+ for (let r = 0; r < e.length; r++) {
58
+ let i = e[r];
59
+ if (i.id === t) return n;
60
+ if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
61
+ let n = d(i.children[e], t, {
62
+ blocks: i.children[e],
63
+ sectionId: i.id,
64
+ columnIndex: e
65
+ });
66
+ if (n) return n;
67
+ }
68
+ }
69
+ return null;
70
+ }
71
+ function f(t) {
72
+ return e.lockedBlocks?.value.has(t) ?? !1;
73
+ }
74
+ function h(e) {
75
+ let n = d(t.content.blocks, e);
76
+ if (!n) return null;
77
+ let r = n.blocks.findIndex((t) => t.id === e);
78
+ return r === -1 ? null : {
79
+ targetSectionId: n.sectionId,
80
+ columnIndex: n.columnIndex,
81
+ index: r
82
+ };
83
+ }
84
+ function g(e, n = !0) {
85
+ t.content = e, n && o();
86
+ }
87
+ function _(e) {
88
+ e && f(e) || (t.selectedBlockId = e);
89
+ }
90
+ function v(e) {
91
+ t.viewport = e;
92
+ }
93
+ function x(e) {
94
+ t.darkMode = e;
95
+ }
96
+ function S(e) {
97
+ t.uiTheme = e;
98
+ }
99
+ function C(e) {
100
+ t.previewMode = e, e && (t.selectedBlockId = null);
101
+ }
102
+ function w(e, n) {
103
+ if (f(e)) return;
104
+ let r = l(t.content.blocks, e);
105
+ r && (Object.assign(r, n), o());
106
+ }
107
+ function T(e) {
108
+ t.content.settings = {
109
+ ...t.content.settings,
110
+ ...e
111
+ }, o();
112
+ }
113
+ function E(e, n, r = 0, i) {
114
+ if (!(n && e.type === "section")) {
115
+ if (n) {
116
+ if (f(n)) return;
117
+ let a = l(t.content.blocks, n);
118
+ if (a && a.type === "section") {
119
+ if (r < 0 || r >= b(a.columns)) return;
120
+ a.children[r] = a.children[r] || [];
121
+ let t = a.children[r];
122
+ i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
123
+ }
124
+ } else i !== void 0 && i < t.content.blocks.length ? t.content.blocks.splice(i, 0, e) : t.content.blocks.push(e);
125
+ o();
126
+ }
127
+ }
128
+ function D(e) {
129
+ if (f(e)) return;
130
+ let n = d(t.content.blocks, e);
131
+ if (n) {
132
+ let r = n.blocks.findIndex((t) => t.id === e);
133
+ if (r !== -1) {
134
+ let [e] = n.blocks.splice(r, 1);
135
+ if (t.selectedBlockId) {
136
+ let n = /* @__PURE__ */ new Set();
137
+ u(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
138
+ }
139
+ o();
140
+ }
141
+ }
142
+ }
143
+ function O(e, n, r, i = 0) {
144
+ if (f(e) || r && f(r)) return;
145
+ let a = d(t.content.blocks, e);
146
+ if (!a) return;
147
+ let s = a.blocks.findIndex((t) => t.id === e);
148
+ if (s === -1 || r && a.blocks[s].type === "section") return;
149
+ let c;
150
+ if (r) {
151
+ let e = l(t.content.blocks, r);
152
+ if (!e || e.type !== "section" || i < 0 || i >= b(e.columns)) return;
153
+ e.children[i] = e.children[i] || [], c = e.children[i];
154
+ } else c = t.content.blocks;
155
+ let [u] = a.blocks.splice(s, 1);
156
+ c.splice(n, 0, u), o();
157
+ }
158
+ function k() {
159
+ o();
160
+ }
161
+ function A(e, t) {
162
+ throw new p(`[Templatical] Templates: ${e} ${t}`);
163
+ }
164
+ function j(t) {
165
+ y(e.onError, t);
166
+ }
167
+ function M(t) {
168
+ let { templates: n } = e;
169
+ return n || A(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
170
+ }
171
+ function N(e) {
172
+ t.template && (t.template = {
173
+ ...t.template,
174
+ name: e
175
+ }, o());
176
+ }
177
+ async function P(n) {
178
+ let r = M("create()"), { create: a } = r;
179
+ typeof a != "function" && A("create()", "is disabled by the provider — its `create` is `false`.");
180
+ let o;
181
+ t.isLoading = !0;
182
+ try {
183
+ n?.content && (t.content = n.content);
184
+ let e = i;
185
+ o = await a(n?.name === void 0 ? { content: t.content } : {
186
+ name: n.name,
187
+ content: t.content
188
+ }), t.template = o, i === e && (t.isDirty = !1);
189
+ } catch (t) {
190
+ throw e.onError?.(t), t;
191
+ } finally {
192
+ t.isLoading = !1;
193
+ }
194
+ return j(() => r.onCreated?.(o)), o;
195
+ }
196
+ async function F(n) {
197
+ let r = M("load()"), i;
198
+ t.isLoading = !0;
199
+ try {
200
+ i = await r.load(n), t.template = i, t.content = i.content, t.isDirty = !1;
201
+ } catch (t) {
202
+ throw e.onError?.(t), t;
203
+ } finally {
204
+ t.isLoading = !1;
205
+ }
206
+ return j(() => r.onLoaded?.(i)), i;
207
+ }
208
+ async function I(n = "api") {
209
+ let r = M("save()"), { save: a } = r;
210
+ typeof a != "function" && A("save()", "is disabled by the provider — its `save` is `false`.");
211
+ let o = t.template;
212
+ o || A("save()", "has no template loaded. Call create() or load() first.");
213
+ let s = o.name === void 0 ? { content: t.content } : {
214
+ name: o.name,
215
+ content: t.content
216
+ }, c;
217
+ t.isSaving = !0;
218
+ try {
219
+ let e = i;
220
+ if (c = await a(o.id, s), t.template?.id === o.id) {
221
+ let e = t.template.name;
222
+ t.template = e === o.name ? c : {
223
+ ...c,
224
+ name: e
225
+ };
226
+ }
227
+ i === e && (t.isDirty = !1);
228
+ } catch (t) {
229
+ throw e.onError?.(t), t;
230
+ } finally {
231
+ t.isSaving = !1;
232
+ }
233
+ return j(() => r.onSaved?.(c, { trigger: n })), c;
234
+ }
235
+ function L() {
236
+ return t.template?.id !== void 0;
237
+ }
238
+ return {
239
+ state: a(t),
240
+ content: s,
241
+ selectedBlock: c,
242
+ isBlockLocked: f,
243
+ setContent: g,
244
+ selectBlock: _,
245
+ setViewport: v,
246
+ setDarkMode: x,
247
+ setUiTheme: S,
248
+ setPreviewMode: C,
249
+ updateBlock: w,
250
+ updateSettings: T,
251
+ addBlock: E,
252
+ removeBlock: D,
253
+ moveBlock: O,
254
+ markDirty: k,
255
+ findBlockLocation: h,
256
+ setName: N,
257
+ create: P,
258
+ load: F,
259
+ save: I,
260
+ hasTemplate: L
261
+ };
262
+ }
263
+ //#endregion
264
+ //#region ../core/src/history.ts
265
+ var S = 50, C = 300, w = 1500;
266
+ function T(e) {
267
+ let { content: r, setContent: i, isRemoteOperation: a, maxSize: o = S } = e, s = t([]), c = t([]), l = t(!1), u = null, f = null, p = n(() => s.value.length > 0), m = n(() => c.value.length > 0);
268
+ function h() {
269
+ return d(r.value);
270
+ }
271
+ function g(e) {
272
+ s.value.push(e), s.value.length > o && s.value.splice(0, s.value.length - o);
273
+ }
274
+ function _() {
275
+ f &&= (clearTimeout(f.timeoutId), null);
276
+ }
277
+ function v() {
278
+ a?.() || (_(), g(h()), c.value = []);
279
+ }
280
+ function y(e) {
281
+ if (!a?.()) {
282
+ if (f && f.blockId === e) {
283
+ clearTimeout(f.timeoutId), f.timeoutId = setTimeout(() => {
284
+ f = null;
285
+ }, C);
286
+ return;
287
+ }
288
+ _(), g(h()), c.value = [], f = {
289
+ blockId: e,
290
+ timeoutId: setTimeout(() => {
291
+ f = null;
292
+ }, C)
293
+ };
294
+ }
295
+ }
296
+ function b() {
297
+ l.value = !0, u && clearTimeout(u), u = setTimeout(() => {
298
+ l.value = !1, u = null;
299
+ }, w);
300
+ }
301
+ function x() {
302
+ if (s.value.length === 0) return;
303
+ _();
304
+ let e = s.value.pop();
305
+ c.value.push(h()), i(e, !0), b();
306
+ }
307
+ function T() {
308
+ if (c.value.length === 0) return;
309
+ _();
310
+ let e = c.value.pop();
311
+ s.value.push(h()), i(e, !0), b();
312
+ }
313
+ function E() {
314
+ s.value = [], c.value = [], _();
315
+ }
316
+ function D() {
317
+ E(), u &&= (clearTimeout(u), null);
318
+ }
319
+ return {
320
+ canUndo: p,
321
+ canRedo: m,
322
+ isNavigating: l,
323
+ undo: x,
324
+ redo: T,
325
+ record: v,
326
+ recordDebounced: y,
327
+ clear: E,
328
+ destroy: D
329
+ };
330
+ }
331
+ //#endregion
332
+ //#region ../core/src/block-actions.ts
333
+ function E(e) {
334
+ e.type === "table" ? e.rows = e.rows.map((e) => ({
335
+ ...e,
336
+ id: l(),
337
+ cells: e.cells.map((e) => ({
338
+ ...e,
339
+ id: l()
340
+ }))
341
+ })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
342
+ ...e,
343
+ id: l()
344
+ })) : e.type === "menu" && (e.items = e.items.map((e) => ({
345
+ ...e,
346
+ id: l()
347
+ })));
348
+ }
349
+ function D(e) {
350
+ let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
351
+ function o(n, r, a) {
352
+ let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = u(n, o);
353
+ return t(s, r, a), i(s.id), s;
354
+ }
355
+ function s(e, n, r) {
356
+ let o = JSON.parse(JSON.stringify(e));
357
+ if (o.id = l(), E(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
358
+ let t = JSON.parse(JSON.stringify(e));
359
+ return t.id = l(), E(t), t;
360
+ }))), n !== void 0 || r !== void 0) t(o, n, r);
361
+ else {
362
+ let i = a?.(e.id) ?? null;
363
+ i ? t(o, i.targetSectionId, i.columnIndex, i.index + 1) : t(o, n, r);
364
+ }
365
+ return i(o.id), o;
366
+ }
367
+ function c(e) {
368
+ n(e);
369
+ }
370
+ function d(e, t, n) {
371
+ r(e, { [t]: n });
372
+ }
373
+ return {
374
+ createAndAddBlock: o,
375
+ duplicateBlock: s,
376
+ deleteBlock: c,
377
+ updateBlockProperty: d
378
+ };
379
+ }
380
+ //#endregion
381
+ //#region ../core/src/auto-save.ts
382
+ var O = 2e3;
383
+ function k(e) {
384
+ let { content: t, isDirty: n, onChange: r, debounce: i = O, enabled: a = !0 } = e, o = null, c = !1;
385
+ function l() {
386
+ return typeof a == "function" ? a() : a;
387
+ }
388
+ function u() {
389
+ c = !0, f();
390
+ }
391
+ function d() {
392
+ c = !1;
393
+ }
394
+ function f() {
395
+ o &&= (clearTimeout(o), null);
396
+ }
397
+ function p() {
398
+ f(), n() && r(JSON.parse(JSON.stringify(t.value)));
399
+ }
400
+ function m() {
401
+ l() && !c && (f(), o = setTimeout(() => {
402
+ o = null, l() && !c && n() && r(JSON.parse(JSON.stringify(t.value)));
403
+ }, i));
404
+ }
405
+ let h = s(t, () => {
406
+ m();
407
+ }, { deep: !0 });
408
+ function g() {
409
+ h(), f();
410
+ }
411
+ return {
412
+ flush: p,
413
+ cancel: f,
414
+ pause: u,
415
+ resume: d,
416
+ destroy: g
417
+ };
418
+ }
419
+ //#endregion
420
+ //#region ../core/src/condition-preview.ts
421
+ function A(e) {
422
+ let t = r(/* @__PURE__ */ new Set()), i = n(() => t.size > 0);
423
+ function a(e) {
424
+ return t.has(e);
425
+ }
426
+ function o(n) {
427
+ t.has(n) ? t.delete(n) : (t.add(n), e.state.selectedBlockId === n && e.selectBlock(null));
428
+ }
429
+ function s() {
430
+ t.clear();
431
+ }
432
+ return {
433
+ isHidden: a,
434
+ toggleBlock: o,
435
+ reset: s,
436
+ hasHiddenBlocks: i
437
+ };
438
+ }
439
+ //#endregion
440
+ //#region ../core/src/data-source-fetch.ts
441
+ function j(e) {
442
+ let r = t(!1), i = t(!1), a = n(() => !!e.definition.value?.dataSource), o = n(() => a.value && !e.block.value.dataSourceFetched);
443
+ async function s() {
444
+ let t = e.definition.value;
445
+ if (t?.dataSource) {
446
+ r.value = !0, i.value = !1;
447
+ try {
448
+ let n = await t.dataSource.onFetch({
449
+ fieldValues: { ...e.block.value.fieldValues },
450
+ blockId: e.block.value.id
451
+ });
452
+ if (n == null) return;
453
+ let r = { ...e.block.value.fieldValues };
454
+ for (let e of Object.keys(r)) e in n && (r[e] = n[e]);
455
+ e.onUpdate(r, !0);
456
+ } catch (e) {
457
+ console.warn("[Templatical] Data source fetch error:", e), i.value = !0;
458
+ } finally {
459
+ r.value = !1;
460
+ }
461
+ }
462
+ }
463
+ return {
464
+ isFetching: r,
465
+ fetchError: i,
466
+ fetch: s,
467
+ hasDataSource: a,
468
+ needsFetch: o
469
+ };
470
+ }
471
+ //#endregion
472
+ //#region ../core/src/history-interceptor.ts
473
+ function M(e, t) {
474
+ let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
475
+ e.addBlock = (r, i, a, o) => {
476
+ i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
477
+ }, e.removeBlock = (n) => {
478
+ e.isBlockLocked(n) || (t.record(), r(n));
479
+ }, e.moveBlock = (n, r, a, o) => {
480
+ e.isBlockLocked(n) || a && e.isBlockLocked(a) || (t.record(), i(n, r, a, o));
481
+ }, e.updateBlock = (n, r) => {
482
+ e.isBlockLocked(n) || (t.recordDebounced(n), a(n, r));
483
+ }, e.updateSettings = (e) => {
484
+ t.record(), o(e);
485
+ };
486
+ }
487
+ //#endregion
488
+ //#region ../core/src/saved-blocks.ts
489
+ function N(e) {
490
+ let { provider: n } = e, r = t([]), i = t(!1), a = o(() => {
491
+ let e = /* @__PURE__ */ new Set();
492
+ for (let t of r.value) {
493
+ let n = t.category?.trim();
494
+ n && e.add(n);
495
+ }
496
+ return [...e].sort((e, t) => e.localeCompare(t));
497
+ }), s = o(() => typeof n.create == "function"), c = o(() => typeof n.update == "function"), l = o(() => typeof n.delete == "function");
498
+ function u(e) {
499
+ return c.value && e.canUpdate !== !1;
500
+ }
501
+ function d(e) {
502
+ return l.value && e.canDelete !== !1;
503
+ }
504
+ function f(e, t) {
505
+ throw new p(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
506
+ }
507
+ function m(t) {
508
+ y(e.onError, t);
509
+ }
510
+ async function h(t) {
511
+ i.value = !0;
512
+ try {
513
+ r.value = await n.list(t);
514
+ } catch (t) {
515
+ throw e.onError?.(t), t;
516
+ } finally {
517
+ i.value = !1;
518
+ }
519
+ }
520
+ async function g(t, i, a) {
521
+ let { create: o } = n;
522
+ typeof o != "function" && f("create", "disabled by the provider");
523
+ try {
524
+ let e = await o(a ? {
525
+ name: t,
526
+ content: i,
527
+ category: a
528
+ } : {
529
+ name: t,
530
+ content: i
531
+ });
532
+ return r.value = [e, ...r.value], m(() => n.onCreated?.(e)), e;
533
+ } catch (t) {
534
+ throw e.onError?.(t), t;
535
+ }
536
+ }
537
+ async function _(t, i) {
538
+ let { update: a } = n;
539
+ typeof a != "function" && f("update", "disabled by the provider");
540
+ let o = r.value.find((e) => e.id === t);
541
+ o && o.canUpdate === !1 && f("update", `not permitted for entry "${t}"`);
542
+ try {
543
+ let e = await a(t, i);
544
+ return r.value = r.value.map((n) => n.id === t ? e : n), m(() => n.onUpdated?.(e)), e;
545
+ } catch (t) {
546
+ throw e.onError?.(t), t;
547
+ }
548
+ }
549
+ async function v(t) {
550
+ let { delete: i } = n;
551
+ typeof i != "function" && f("delete", "disabled by the provider");
552
+ let a = r.value.find((e) => e.id === t) ?? null;
553
+ a && a.canDelete === !1 && f("delete", `not permitted for entry "${t}"`);
554
+ try {
555
+ await i(t), r.value = r.value.filter((e) => e.id !== t), a && m(() => n.onDeleted?.(a));
556
+ } catch (t) {
557
+ throw e.onError?.(t), t;
558
+ }
559
+ }
560
+ return {
561
+ savedBlocks: r,
562
+ isLoading: i,
563
+ categories: a,
564
+ canCreate: s,
565
+ canUpdate: c,
566
+ canDelete: l,
567
+ canUpdateBlock: u,
568
+ canDeleteBlock: d,
569
+ load: h,
570
+ create: g,
571
+ update: _,
572
+ remove: v
573
+ };
574
+ }
575
+ //#endregion
576
+ //#region ../core/src/saved-blocks-local.ts
577
+ var P = "templatical:saved-blocks";
578
+ function F(e = {}) {
579
+ let t = e.key ?? P;
580
+ function n() {
581
+ 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.");
582
+ return localStorage;
583
+ }
584
+ function r() {
585
+ let e = n().getItem(t);
586
+ if (!e) return [];
587
+ try {
588
+ let t = JSON.parse(e);
589
+ return Array.isArray(t) ? t : [];
590
+ } catch {
591
+ return [];
592
+ }
593
+ }
594
+ function i(e) {
595
+ n().setItem(t, JSON.stringify(e));
596
+ }
597
+ return {
598
+ async list(e) {
599
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
600
+ return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
601
+ },
602
+ async create(e) {
603
+ let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
604
+ id: l(),
605
+ name: e.name,
606
+ content: e.content,
607
+ ...e.category ? { category: e.category } : {},
608
+ createdAt: t,
609
+ updatedAt: t
610
+ };
611
+ return i([n, ...r()]), n;
612
+ },
613
+ async update(e, t) {
614
+ let n = r(), a = n.findIndex((t) => t.id === e);
615
+ if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
616
+ let o = {
617
+ ...n[a],
618
+ ...t,
619
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
620
+ }, s = [...n];
621
+ return s[a] = o, i(s), o;
622
+ },
623
+ async delete(e) {
624
+ let t = r();
625
+ if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
626
+ i(t.filter((t) => t.id !== e));
627
+ }
628
+ };
629
+ }
630
+ //#endregion
631
+ //#region ../core/src/media-local.ts
632
+ var I = "templatical:media", L = 50;
633
+ function R(e = {}) {
634
+ let t = e.key ?? I;
635
+ function n() {
636
+ 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.");
637
+ return localStorage;
638
+ }
639
+ function r() {
640
+ let e = n().getItem(t);
641
+ if (!e) return [];
642
+ try {
643
+ let t = JSON.parse(e);
644
+ return Array.isArray(t) ? t : [];
645
+ } catch {
646
+ return [];
647
+ }
648
+ }
649
+ function i(e) {
650
+ n().setItem(t, JSON.stringify(e));
651
+ }
652
+ function a(e) {
653
+ return typeof FileReader > "u" ? Promise.reject(/* @__PURE__ */ Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with FileReader.")) : new Promise((t, n) => {
654
+ let r = new FileReader();
655
+ r.onload = () => {
656
+ if (typeof r.result != "string") {
657
+ n(/* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
658
+ return;
659
+ }
660
+ t(r.result);
661
+ }, r.onerror = () => {
662
+ n(r.error ?? /* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
663
+ }, r.readAsDataURL(e);
664
+ });
665
+ }
666
+ return {
667
+ async list(e) {
668
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
669
+ let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
670
+ return t.includes(n) || r.includes(n);
671
+ }) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + L), c = { items: s }, l = o + s.length;
672
+ return l < i.length && (c.nextCursor = String(l)), c;
673
+ },
674
+ async create(e) {
675
+ let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
676
+ id: l(),
677
+ url: t,
678
+ filename: e.filename || e.file.name,
679
+ createdAt: n,
680
+ updatedAt: n,
681
+ size: e.file.size
682
+ };
683
+ 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;
684
+ },
685
+ async update(e, t) {
686
+ let n = r(), a = n.findIndex((t) => t.id === e);
687
+ if (a === -1) throw Error(`[Templatical] Media asset not found: ${e}`);
688
+ let o = n[a], s = {
689
+ ...o,
690
+ ...t,
691
+ id: o.id,
692
+ url: o.url,
693
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
694
+ }, c = [...n];
695
+ return c[a] = s, i(c), s;
696
+ },
697
+ async delete(e) {
698
+ let t = r();
699
+ for (let n of e) if (!t.some((e) => e.id === n)) throw Error(`[Templatical] Media asset not found: ${n}`);
700
+ let n = new Set(e);
701
+ i(t.filter((e) => !n.has(e.id)));
702
+ },
703
+ folders: !1,
704
+ replace: !1,
705
+ importFromUrl: !1,
706
+ checkUsage: !1,
707
+ frequentlyUsed: !1,
708
+ storage: !1
709
+ };
710
+ }
711
+ //#endregion
712
+ //#region ../core/src/version-history.ts
713
+ function z(e) {
714
+ let { provider: n, getTemplateId: r } = e, i = t([]), a = t(!1), s = t(void 0), c = t(!1), l = /* @__PURE__ */ new Map(), u = o(() => typeof n.create == "function"), d = o(() => typeof n.restore == "function");
715
+ function f(e) {
716
+ let t = r();
717
+ if (!t) throw new p(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
718
+ return t;
719
+ }
720
+ function m(e) {
721
+ throw new p(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
722
+ }
723
+ function h(t) {
724
+ y(e.onError, t);
725
+ }
726
+ async function g(t) {
727
+ let r = f("list");
728
+ a.value = !0;
729
+ try {
730
+ let e = await n.list(r, t);
731
+ i.value = e.versions, s.value = e.nextCursor;
732
+ } catch (t) {
733
+ throw e.onError?.(t), t;
734
+ } finally {
735
+ a.value = !1;
736
+ }
737
+ }
738
+ function _(e) {
739
+ return e.content ?? l.get(e.id) ?? null;
740
+ }
741
+ async function v(t) {
742
+ let r = _(t);
743
+ if (r) return r;
744
+ let i = f("get");
745
+ try {
746
+ let e = await n.get(i, t.id);
747
+ return l.set(t.id, e), e;
748
+ } catch (t) {
749
+ throw e.onError?.(t), t;
750
+ }
751
+ }
752
+ async function b(t, r) {
753
+ let { create: a } = n;
754
+ typeof a != "function" && m("create");
755
+ let o = f("create");
756
+ try {
757
+ let e = await a(o, t, r);
758
+ return i.value = [e, ...i.value], h(() => n.onCreated?.(e)), e;
759
+ } catch (t) {
760
+ throw e.onError?.(t), t;
761
+ }
762
+ }
763
+ async function x(t) {
764
+ let { restore: r } = n;
765
+ typeof r != "function" && m("restore");
766
+ let i = f("restore"), a;
767
+ c.value = !0;
768
+ try {
769
+ a = await r(i, t);
770
+ } catch (t) {
771
+ throw e.onError?.(t), t;
772
+ } finally {
773
+ c.value = !1;
774
+ }
775
+ return h(() => n.onRestored?.(a)), a;
776
+ }
777
+ return {
778
+ nextCursor: s,
779
+ versions: i,
780
+ isLoading: a,
781
+ isRestoring: c,
782
+ canCreate: u,
783
+ canRestore: d,
784
+ load: g,
785
+ peekContent: _,
786
+ resolveContent: v,
787
+ create: b,
788
+ restore: x
789
+ };
790
+ }
791
+ //#endregion
792
+ //#region ../core/src/comments.ts
793
+ function B(e) {
794
+ let { provider: n, getTemplateId: r, getUser: i } = e, a = t([]), s = t(!1), c = t(!1), l = o(() => typeof n.create == "function"), u = o(() => typeof n.update == "function"), d = o(() => typeof n.delete == "function"), f = o(() => typeof n.setResolved == "function"), m = o(() => a.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), h = o(() => a.value.filter((e) => !e.resolvedAt).length), g = o(() => {
795
+ let e = /* @__PURE__ */ new Map();
796
+ for (let t of a.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
797
+ return e;
798
+ });
799
+ function _(e) {
800
+ let t = r();
801
+ if (!t) throw new p(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
802
+ return t;
803
+ }
804
+ function b(e) {
805
+ let t = i();
806
+ if (!t) throw new p(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
807
+ return t;
808
+ }
809
+ function x(e) {
810
+ throw new p(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
811
+ }
812
+ function S(e) {
813
+ for (let t of a.value) {
814
+ if (t.id === e) return t;
815
+ for (let n of t.replies ?? []) if (n.id === e) return n;
816
+ }
817
+ return null;
818
+ }
819
+ function C(e) {
820
+ let t = i();
821
+ return t !== null && e.author.id === t.id;
822
+ }
823
+ function w(t) {
824
+ let n = v(t);
825
+ throw e.onError?.(n), n;
826
+ }
827
+ function T(t) {
828
+ y(e.onError, t);
829
+ }
830
+ function E(e, t, n) {
831
+ return [
832
+ ...e.slice(0, t),
833
+ n,
834
+ ...e.slice(t + 1)
835
+ ];
836
+ }
837
+ function D(e, t) {
838
+ return e !== void 0 && JSON.stringify(e) === JSON.stringify(t);
839
+ }
840
+ function O(e) {
841
+ if (e.parentId) {
842
+ let t = !1, n = a.value.map((n) => {
843
+ if (n.id !== e.parentId) return n;
844
+ let r = n.replies ?? [], i = r.findIndex((t) => t.id === e.id);
845
+ return i !== -1 && D(r[i], e) ? n : (t = !0, {
846
+ ...n,
847
+ replies: i === -1 ? [...r, e] : E(r, i, e)
848
+ });
849
+ });
850
+ return t && (a.value = n), t;
851
+ }
852
+ let t = a.value.findIndex((t) => t.id === e.id);
853
+ if (t === -1) return a.value = [...a.value, e], !0;
854
+ let n = {
855
+ ...e,
856
+ replies: e.replies ?? a.value[t].replies
857
+ };
858
+ return !D(a.value[t], n) && (a.value = E(a.value, t, n), !0);
859
+ }
860
+ function k(e, t) {
861
+ let n = S(e), r = t ?? n?.parentId ?? null;
862
+ return r ? a.value = a.value.map((t) => t.id === r ? {
863
+ ...t,
864
+ replies: (t.replies ?? []).filter((t) => t.id !== e)
865
+ } : t) : a.value = a.value.filter((t) => t.id !== e), n;
866
+ }
867
+ async function A(e) {
868
+ let t = _("list");
869
+ s.value = !0;
870
+ try {
871
+ a.value = await n.list(t, e);
872
+ } catch (e) {
873
+ w(e);
874
+ } finally {
875
+ s.value = !1;
876
+ }
877
+ }
878
+ async function j(e) {
879
+ let { create: t } = n;
880
+ typeof t != "function" && x("create");
881
+ let r = _("create");
882
+ b("create"), c.value = !0;
883
+ try {
884
+ let i = await t(r, e);
885
+ return O(i), T(() => n.onCreated?.(i, { origin: "local" })), i;
886
+ } catch (e) {
887
+ w(e);
888
+ } finally {
889
+ c.value = !1;
890
+ }
891
+ }
892
+ async function M(e, t) {
893
+ let { update: r } = n;
894
+ typeof r != "function" && x("update");
895
+ let i = _("update");
896
+ b("update"), c.value = !0;
897
+ try {
898
+ let a = await r(i, e, t);
899
+ return O(a), T(() => n.onUpdated?.(a, { origin: "local" })), a;
900
+ } catch (e) {
901
+ w(e);
902
+ } finally {
903
+ c.value = !1;
904
+ }
905
+ }
906
+ async function N(e) {
907
+ let { delete: t } = n;
908
+ typeof t != "function" && x("delete");
909
+ let r = _("delete");
910
+ b("delete");
911
+ let i = S(e);
912
+ c.value = !0;
913
+ try {
914
+ await t(r, e), k(e), i && T(() => n.onDeleted?.(i, { origin: "local" }));
915
+ } catch (e) {
916
+ w(e);
917
+ } finally {
918
+ c.value = !1;
919
+ }
920
+ }
921
+ async function P(e, t) {
922
+ let { setResolved: r } = n;
923
+ typeof r != "function" && x("setResolved");
924
+ let i = _("setResolved");
925
+ b("setResolved"), c.value = !0;
926
+ try {
927
+ let a = await r(i, e, t);
928
+ return O(a), T(() => (a.resolvedAt ? n.onResolved : n.onUnresolved)?.(a, { origin: "local" })), a;
929
+ } catch (e) {
930
+ w(e);
931
+ } finally {
932
+ c.value = !1;
933
+ }
934
+ }
935
+ function F(e) {
936
+ O(e) && T(() => n.onCreated?.(e, { origin: "remote" }));
937
+ }
938
+ function I(e) {
939
+ O(e) && T(() => (e.resolvedAt ? n.onResolved : n.onUpdated)?.(e, { origin: "remote" }));
940
+ }
941
+ function L(e, t) {
942
+ let r = k(e, t);
943
+ r && T(() => n.onDeleted?.(r, { origin: "remote" }));
944
+ }
945
+ return {
946
+ comments: a,
947
+ isLoading: s,
948
+ isSubmitting: c,
949
+ canCreate: l,
950
+ canUpdate: u,
951
+ canDelete: d,
952
+ canResolve: f,
953
+ totalCount: m,
954
+ unresolvedCount: h,
955
+ commentCountByBlock: g,
956
+ load: A,
957
+ create: j,
958
+ update: M,
959
+ remove: N,
960
+ setResolved: P,
961
+ find: S,
962
+ isOwn: C,
963
+ applyRemoteCreate: F,
964
+ applyRemoteUpdate: I,
965
+ applyRemoteDelete: L
966
+ };
967
+ }
968
+ function V(t) {
969
+ let { comments: n, provider: r, getTemplateId: a } = t, { subscribe: o } = r;
970
+ if (typeof o != "function") return;
971
+ let s = null;
972
+ function c() {
973
+ s?.(), s = null;
974
+ }
975
+ e(() => a(), (e) => {
976
+ c(), e && (s = o(e, (e) => {
977
+ switch (e.type) {
978
+ case "created":
979
+ n.applyRemoteCreate(e.comment);
980
+ break;
981
+ case "updated":
982
+ n.applyRemoteUpdate(e.comment);
983
+ break;
984
+ case "deleted": n.applyRemoteDelete(e.commentId, e.parentId);
985
+ }
986
+ }));
987
+ }, { immediate: !0 }), i(c);
988
+ }
989
+ //#endregion
990
+ //#region src/utils/blockTypeLabels.ts
991
+ function H(e, t) {
992
+ return t.blocks[e] ?? e;
993
+ }
994
+ function U(e, t, n = []) {
995
+ if (e.type !== "custom") return H(e.type, t);
996
+ let { customType: r } = e;
997
+ return n.find((e) => e.type === r)?.name ?? r;
998
+ }
999
+ //#endregion
1000
+ //#region src/utils/resolveFieldColors.ts
1001
+ function W(e, t) {
1002
+ let n = _({ presets: e.presets }, g), r = n.presets.length === 0;
1003
+ return {
1004
+ presets: r ? t.presets : n.presets,
1005
+ allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
1006
+ invalidPresets: n.invalidPresets,
1007
+ emptyPresets: e.presets !== void 0 && e.presets.length === 0,
1008
+ presetsInherited: r,
1009
+ allowCustomIgnored: e.allowCustom === !0 && t.allowCustom === !1
1010
+ };
1011
+ }
1012
+ //#endregion
1013
+ //#region src/composables/useImageDrop.ts
1014
+ var G = "image/";
1015
+ function K(e) {
1016
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || c(r), { isOverDropZone: a } = h(t, {
1017
+ preventDefaultForUnhandled: !0,
1018
+ onDrop: (e) => {
1019
+ if (!i()) return;
1020
+ let t = (e ?? []).filter((e) => e.type.startsWith(G));
1021
+ t.length > 0 && n([t[0]]);
1022
+ }
1023
+ });
1024
+ return { isOver: o(() => i() && a.value) };
1025
+ }
1026
+ //#endregion
1027
+ //#region src/constants/socialIcons.ts
1028
+ var q = f, J = {
1029
+ small: 24,
1030
+ medium: 32,
1031
+ large: 48
1032
+ }, Y = [
1033
+ "facebook",
1034
+ "twitter",
1035
+ "instagram",
1036
+ "linkedin",
1037
+ "youtube",
1038
+ "tiktok",
1039
+ "pinterest",
1040
+ "email",
1041
+ "website",
1042
+ "whatsapp",
1043
+ "telegram",
1044
+ "discord",
1045
+ "snapchat",
1046
+ "reddit",
1047
+ "github",
1048
+ "dribbble",
1049
+ "behance"
1050
+ ];
1051
+ //#endregion
1052
+ export { O as _, W as a, T as b, V as c, R as d, F as f, A as g, j as h, K as i, B as l, M as m, q as n, U as o, N as p, Y as r, H as s, J as t, z as u, k as v, x, D as y };
1053
+
1054
+ //# sourceMappingURL=socialIcons-9VrG8X3m.js.map