@templatical/editor 0.35.0 → 0.37.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 (223) hide show
  1. package/dist/{AiChatSidebar-DPHbCGu4.js → AiChatSidebar-tu4eLcf_.js} +57 -57
  2. package/dist/{AiFeatureMenu--8z7qvg1.js → AiFeatureMenu-BF0i0vA4.js} +17 -17
  3. package/dist/{BlockIssueBadge-BGCsJqqM.js → BlockIssueBadge-DT-FqKeC.js} +9 -9
  4. package/dist/{BlockPreviewCanvas-DKspIy8V.js → BlockPreviewCanvas-DDCmMram.js} +28 -28
  5. package/dist/CloudHeaderExtras-NPhudovT.js +59 -0
  6. package/dist/{CloudPanels-Bp5gFtaL.js → CloudPanels-Iwnky0iA.js} +78 -108
  7. package/dist/{CollaboratorBar-DvwZm5u7.js → CollaboratorBar-DAITu0hz.js} +17 -17
  8. package/dist/{ColorPicker-DtozuN75.js → ColorPicker-BqlZ_TqG.js} +193 -193
  9. package/dist/{CommentsPanel-3C-DsEjy.js → CommentsPanel-CDvgmWP1.js} +3 -3
  10. package/dist/{CommentsSidebar-go1FnjDW.js → CommentsSidebar-X_xqM3dR.js} +158 -158
  11. package/dist/{CountdownBlock-D1fsNsyS.js → CountdownBlock-ZFJIdbP6.js} +12 -12
  12. package/dist/{CountdownToolbar-SLBuij7Q.js → CountdownToolbar-DBFoG3a6.js} +67 -67
  13. package/dist/{DesignReferenceSidebar-rcE_BvUd.js → DesignReferenceSidebar--QtXjLrw.js} +57 -57
  14. package/dist/{FieldRow-BWt7ECqo.js → FieldRow-C8nOknr_.js} +39 -39
  15. package/dist/{IssuesPanel-Cig46N1i.js → IssuesPanel-BLbNFMSX.js} +38 -38
  16. package/dist/{LoadingTrack-SQXoZVf2.js → LoadingTrack-BlTL4zFv.js} +2 -2
  17. package/dist/MediaPanels-CMTAhDXB.js +43 -0
  18. package/dist/{MergeTagInput-D1hzsn2b.js → MergeTagInput-BEjzj4Iu.js} +115 -115
  19. package/dist/{MergeTagModeToggle-CH9wR5YF.js → MergeTagModeToggle-DKN6ihI5.js} +40 -40
  20. package/dist/{MergeTagSuggestion-CoCuzEmW.js → MergeTagSuggestion-DKoLEeoj.js} +21 -21
  21. package/dist/{ParagraphEditor-CT2AdMdZ.js → ParagraphEditor-1E9yzOfk.js} +231 -258
  22. package/dist/{RestoreVersionDialog-mdqgQxFR.js → RestoreVersionDialog-BMGUkcd8.js} +28 -28
  23. package/dist/{RichTextEditorContent-riOB-rKD.js → RichTextEditorContent-BnxbQUV9.js} +49 -59
  24. package/dist/{SaveBlockDialog-Cn2v4Lpj.js → SaveBlockDialog-WKASpCCT.js} +78 -78
  25. package/dist/SavedBlocksBrowserModal-AYEXTMtQ.js +323 -0
  26. package/dist/{SavedBlocksPanels-ffBnWuVU.js → SavedBlocksPanels-D_CpacTl.js} +6 -6
  27. package/dist/{SavedBlocksPickBar-BmQC2tWN.js → SavedBlocksPickBar-BHMwg-1G.js} +11 -11
  28. package/dist/{TemplateScoringPanel-CxAtdreR.js → TemplateScoringPanel-CSin43YM.js} +99 -98
  29. package/dist/{TestEmailModal-Cjn1padY.js → TestEmailModal-BxizsRCd.js} +59 -59
  30. package/dist/{TestEmailPanel-Bf3XZ1jn.js → TestEmailPanel-vd2e5HzT.js} +3 -3
  31. package/dist/TitleEditor-CLJ68Ty4.js +199 -0
  32. package/dist/TplModal-Q9fDgS1M.js +51 -0
  33. package/dist/{VersionHistoryMenu-CrNrGsaa.js → VersionHistoryMenu-eGYVhM4H.js} +41 -47
  34. package/dist/{VersionHistoryPanels-CsuQk6W3.js → VersionHistoryPanels-C7Ntrrfq.js} +4 -4
  35. package/dist/{VersionPreviewBanner-BqbO0Zss.js → VersionPreviewBanner-BbQXnR0M.js} +9 -9
  36. package/dist/{blockTypeIcons-D_4HdaY9.js → blockTypeIcons-5qD4bB76.js} +5 -17
  37. package/dist/bundle-stats.json +8 -8
  38. package/dist/ca-Jx2CDwtn.js +83 -0
  39. package/dist/cdn/chunks/{AiChatSidebar-D0f74_nS.js → AiChatSidebar-dyqqHAcI.js} +4 -4
  40. package/dist/cdn/chunks/{AiChatSidebar-D0f74_nS.js.map → AiChatSidebar-dyqqHAcI.js.map} +1 -1
  41. package/dist/cdn/chunks/{AiFeatureMenu-DwGb3eF9.js → AiFeatureMenu-BjVMwhW8.js} +5 -5
  42. package/dist/cdn/chunks/{AiFeatureMenu-DwGb3eF9.js.map → AiFeatureMenu-BjVMwhW8.js.map} +1 -1
  43. package/dist/cdn/chunks/{BlockIssueBadge-CosQgeJ-.js → BlockIssueBadge-BJ__oEtm.js} +4 -4
  44. package/dist/cdn/chunks/{BlockIssueBadge-CosQgeJ-.js.map → BlockIssueBadge-BJ__oEtm.js.map} +1 -1
  45. package/dist/cdn/chunks/{BlockPreviewCanvas-CIpZ2a6g.js → BlockPreviewCanvas-B5f26eLE.js} +5 -5
  46. package/dist/cdn/chunks/{BlockPreviewCanvas-CIpZ2a6g.js.map → BlockPreviewCanvas-B5f26eLE.js.map} +1 -1
  47. package/dist/cdn/chunks/{CloudHeaderExtras-CQzQwKFB.js → CloudHeaderExtras-D5P5IEKA.js} +4 -4
  48. package/dist/cdn/chunks/{CloudHeaderExtras-CQzQwKFB.js.map → CloudHeaderExtras-D5P5IEKA.js.map} +1 -1
  49. package/dist/cdn/chunks/{CloudPanels-BmexuLOU.js → CloudPanels-DkmR05nB.js} +15 -45
  50. package/dist/cdn/chunks/{CloudPanels-BmexuLOU.js.map → CloudPanels-DkmR05nB.js.map} +1 -1
  51. package/dist/cdn/chunks/{CollaboratorBar-DEICobpp.js → CollaboratorBar-Yn7KSpt4.js} +4 -4
  52. package/dist/cdn/chunks/{CollaboratorBar-DEICobpp.js.map → CollaboratorBar-Yn7KSpt4.js.map} +1 -1
  53. package/dist/cdn/chunks/{ColorPicker-C7yC58FK.js → ColorPicker-LcrzgMoW.js} +7 -7
  54. package/dist/cdn/chunks/{ColorPicker-C7yC58FK.js.map → ColorPicker-LcrzgMoW.js.map} +1 -1
  55. package/dist/cdn/chunks/{CommentsPanel-OjmKxLL7.js → CommentsPanel-CntwwocI.js} +2 -2
  56. package/dist/cdn/chunks/{CommentsPanel-OjmKxLL7.js.map → CommentsPanel-CntwwocI.js.map} +1 -1
  57. package/dist/cdn/chunks/{CommentsSidebar-C4pWZGpy.js → CommentsSidebar-BLDKnKy7.js} +4 -4
  58. package/dist/cdn/chunks/{CommentsSidebar-C4pWZGpy.js.map → CommentsSidebar-BLDKnKy7.js.map} +1 -1
  59. package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js → CountdownBlock-B4AfqJwb.js} +2 -2
  60. package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js.map → CountdownBlock-B4AfqJwb.js.map} +1 -1
  61. package/dist/cdn/chunks/{CountdownToolbar-wlJOxyAl.js → CountdownToolbar-CA1dpuOI.js} +3 -3
  62. package/dist/cdn/chunks/{CountdownToolbar-wlJOxyAl.js.map → CountdownToolbar-CA1dpuOI.js.map} +1 -1
  63. package/dist/cdn/chunks/{DesignReferenceSidebar-DELhnh8h.js → DesignReferenceSidebar-D1Y9Hswe.js} +5 -5
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-DELhnh8h.js.map → DesignReferenceSidebar-D1Y9Hswe.js.map} +1 -1
  65. package/dist/cdn/chunks/{IssuesPanel-C9i3o8aE.js → IssuesPanel-Q62LTqvd.js} +5 -5
  66. package/dist/cdn/chunks/{IssuesPanel-C9i3o8aE.js.map → IssuesPanel-Q62LTqvd.js.map} +1 -1
  67. package/dist/cdn/chunks/MediaPanels-D21M6shx.js +45 -0
  68. package/dist/cdn/chunks/MediaPanels-D21M6shx.js.map +1 -0
  69. package/dist/cdn/chunks/{MergeTagInput-D76Kyvgu.js → MergeTagInput-l7paaAml.js} +7 -7
  70. package/dist/cdn/chunks/{MergeTagInput-D76Kyvgu.js.map → MergeTagInput-l7paaAml.js.map} +1 -1
  71. package/dist/cdn/chunks/{MergeTagModeToggle-Dz3gxN2y.js → MergeTagModeToggle-DYxkAGtA.js} +4 -4
  72. package/dist/cdn/chunks/{MergeTagModeToggle-Dz3gxN2y.js.map → MergeTagModeToggle-DYxkAGtA.js.map} +1 -1
  73. package/dist/cdn/chunks/{ParagraphEditor-DQn0HMfV.js → ParagraphEditor-Bd-GQXee.js} +15 -15
  74. package/dist/cdn/chunks/{ParagraphEditor-DQn0HMfV.js.map → ParagraphEditor-Bd-GQXee.js.map} +1 -1
  75. package/dist/cdn/chunks/{RestoreVersionDialog-BdjOL8Oy.js → RestoreVersionDialog-2X9RpM9A.js} +4 -4
  76. package/dist/cdn/chunks/{RestoreVersionDialog-BdjOL8Oy.js.map → RestoreVersionDialog-2X9RpM9A.js.map} +1 -1
  77. package/dist/cdn/chunks/{RichTextEditorContent-Drzwgh0J.js → RichTextEditorContent-D_rb0rmU.js} +8 -8
  78. package/dist/cdn/chunks/{RichTextEditorContent-Drzwgh0J.js.map → RichTextEditorContent-D_rb0rmU.js.map} +1 -1
  79. package/dist/cdn/chunks/{SaveBlockDialog-B3rbmXSM.js → SaveBlockDialog-CufdTomT.js} +15 -15
  80. package/dist/cdn/chunks/{SaveBlockDialog-B3rbmXSM.js.map → SaveBlockDialog-CufdTomT.js.map} +1 -1
  81. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CkUXlnd2.js → SavedBlocksBrowserModal-CqpaNsk7.js} +8 -8
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CkUXlnd2.js.map → SavedBlocksBrowserModal-CqpaNsk7.js.map} +1 -1
  83. package/dist/cdn/chunks/{SavedBlocksPanels-BPi3PZKP.js → SavedBlocksPanels-DpxYxddo.js} +2 -2
  84. package/dist/cdn/chunks/{SavedBlocksPanels-BPi3PZKP.js.map → SavedBlocksPanels-DpxYxddo.js.map} +1 -1
  85. package/dist/cdn/chunks/{SavedBlocksPickBar-BvB9A5W2.js → SavedBlocksPickBar-Drpoav1B.js} +4 -4
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-BvB9A5W2.js.map → SavedBlocksPickBar-Drpoav1B.js.map} +1 -1
  87. package/dist/cdn/chunks/{TemplateScoringPanel-BBCyLnOi.js → TemplateScoringPanel-DBjUNULq.js} +5 -5
  88. package/dist/cdn/chunks/{TemplateScoringPanel-BBCyLnOi.js.map → TemplateScoringPanel-DBjUNULq.js.map} +1 -1
  89. package/dist/cdn/chunks/{TestEmailModal-DAGTsBqi.js → TestEmailModal-BTNlSW6f.js} +10 -10
  90. package/dist/cdn/chunks/{TestEmailModal-DAGTsBqi.js.map → TestEmailModal-BTNlSW6f.js.map} +1 -1
  91. package/dist/cdn/chunks/{TestEmailPanel-BfenVvfx.js → TestEmailPanel-D0A9Zgxr.js} +2 -2
  92. package/dist/cdn/chunks/{TestEmailPanel-BfenVvfx.js.map → TestEmailPanel-D0A9Zgxr.js.map} +1 -1
  93. package/dist/cdn/chunks/{TitleEditor-oQ4gr6wS.js → TitleEditor-CrnuIq62.js} +9 -9
  94. package/dist/cdn/chunks/{TitleEditor-oQ4gr6wS.js.map → TitleEditor-CrnuIq62.js.map} +1 -1
  95. package/dist/cdn/chunks/{TplModal-DxOMcVwp.js → TplModal-DYXrTz42.js} +5 -5
  96. package/dist/cdn/chunks/{TplModal-DxOMcVwp.js.map → TplModal-DYXrTz42.js.map} +1 -1
  97. package/dist/cdn/chunks/{VersionHistoryMenu-BfVUvWHT.js → VersionHistoryMenu-bDGnE4hb.js} +4 -4
  98. package/dist/cdn/chunks/VersionHistoryMenu-bDGnE4hb.js.map +1 -0
  99. package/dist/cdn/chunks/{VersionHistoryPanels-NpDb641L.js → VersionHistoryPanels-82P0Q0HM.js} +2 -2
  100. package/dist/cdn/chunks/{VersionHistoryPanels-NpDb641L.js.map → VersionHistoryPanels-82P0Q0HM.js.map} +1 -1
  101. package/dist/cdn/chunks/{VersionPreviewBanner-Cpgt4xHc.js → VersionPreviewBanner-BJiwKkVC.js} +3 -3
  102. package/dist/cdn/chunks/{VersionPreviewBanner-Cpgt4xHc.js.map → VersionPreviewBanner-BJiwKkVC.js.map} +1 -1
  103. package/dist/cdn/chunks/{blockTypeIcons-t9vvaiuH.js → blockTypeIcons-CNjJSFun.js} +2 -2
  104. package/dist/cdn/chunks/{blockTypeIcons-t9vvaiuH.js.map → blockTypeIcons-CNjJSFun.js.map} +1 -1
  105. package/dist/cdn/chunks/{ca-CNRWAMHI.js → ca-Jx2CDwtn.js} +2 -6
  106. package/dist/cdn/chunks/ca-Jx2CDwtn.js.map +1 -0
  107. package/dist/cdn/chunks/{cloud-CullB76F.js → cloud-BLgCKP7Z.js} +452 -227
  108. package/dist/cdn/chunks/cloud-BLgCKP7Z.js.map +1 -0
  109. package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js +385 -0
  110. package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js.map +1 -0
  111. package/dist/cdn/chunks/{de-DFYCT4QU.js → de-Ck0pBGHu.js} +2 -6
  112. package/dist/cdn/chunks/de-Ck0pBGHu.js.map +1 -0
  113. package/dist/cdn/chunks/{src-CaXeO-gG.js → editor-modal-MXgtarMl.js} +1474 -1935
  114. package/dist/cdn/chunks/editor-modal-MXgtarMl.js.map +1 -0
  115. package/dist/cdn/chunks/en-C9U7N77n.js +2 -0
  116. package/dist/cdn/chunks/{es-OgkdMZGX.js → es-lagTvUfX.js} +2 -6
  117. package/dist/cdn/chunks/es-lagTvUfX.js.map +1 -0
  118. package/dist/cdn/chunks/{extensions-BpXY7jO5.js → extensions-B8_jnIkD.js} +3 -3
  119. package/dist/cdn/chunks/{extensions-BpXY7jO5.js.map → extensions-B8_jnIkD.js.map} +1 -1
  120. package/dist/cdn/chunks/{fr-Dswns199.js → fr-C4hVl5Lk.js} +2 -6
  121. package/dist/cdn/chunks/fr-C4hVl5Lk.js.map +1 -0
  122. package/dist/cdn/chunks/{icons-BLxcQUck.js → icons-BUlqGSgd.js} +24 -24
  123. package/dist/cdn/chunks/{icons-BLxcQUck.js.map → icons-BUlqGSgd.js.map} +1 -1
  124. package/dist/cdn/chunks/{keys-DQp8x7Nx.js → keys-DBFhDFng.js} +4 -4
  125. package/dist/cdn/chunks/{keys-DQp8x7Nx.js.map → keys-DBFhDFng.js.map} +1 -1
  126. package/dist/cdn/chunks/{nl-CbcPJlrL.js → nl-CReD7Apd.js} +2 -6
  127. package/dist/cdn/chunks/nl-CReD7Apd.js.map +1 -0
  128. package/dist/cdn/chunks/{pt-BR-BibOQm-o.js → pt-BR-BRA0-vGP.js} +2 -6
  129. package/dist/cdn/chunks/pt-BR-BRA0-vGP.js.map +1 -0
  130. package/dist/cdn/chunks/{src-BC-eolWY.js → src-Ozknnj-v.js} +2 -2
  131. package/dist/cdn/chunks/{src-BC-eolWY.js.map → src-Ozknnj-v.js.map} +1 -1
  132. package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js → useCloudI18n-DSWSGj-A.js} +2 -2
  133. package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js.map → useCloudI18n-DSWSGj-A.js.map} +1 -1
  134. package/dist/cdn/chunks/{useEditorCore-D4MytYB9.js → useEditorCore-Cs7rYVBo.js} +488 -406
  135. package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +1 -0
  136. package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js → useEditorRoot-B0zW2nT4.js} +2 -2
  137. package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js.map → useEditorRoot-B0zW2nT4.js.map} +1 -1
  138. package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js → useI18n-Dlo7R9RA.js} +2 -2
  139. package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js.map → useI18n-Dlo7R9RA.js.map} +1 -1
  140. package/dist/cdn/chunks/{useMergeTag-CSocWpxV.js → useMergeTag-BYAifvh8.js} +3 -3
  141. package/dist/cdn/chunks/{useMergeTag-CSocWpxV.js.map → useMergeTag-BYAifvh8.js.map} +1 -1
  142. package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js → usePopoverPosition-ElP3ABaV.js} +2 -2
  143. package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js.map → usePopoverPosition-ElP3ABaV.js.map} +1 -1
  144. package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js → useScrollToBlock-nTbWkgaU.js} +2 -2
  145. package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js.map → useScrollToBlock-nTbWkgaU.js.map} +1 -1
  146. package/dist/cdn/editor.css +1 -1
  147. package/dist/cdn/editor.js +1094 -1005
  148. package/dist/cdn/editor.js.map +1 -1
  149. package/dist/{check-CY-Ec6FV.js → check-DWtkBzBU.js} +1 -1
  150. package/dist/{chevron-down-BghbWA9p.js → chevron-down-C-Fjxcqj.js} +1 -1
  151. package/dist/chevron-right-SOkn2d4P.js +11 -0
  152. package/dist/{chevron-up-n3qFAPS3.js → chevron-up-lntU1ypp.js} +1 -1
  153. package/dist/{circle-alert-L5uGGFRP.js → circle-alert-CjzUTwy3.js} +1 -1
  154. package/dist/{clock-Dgnwp18n.js → clock-pB2QKPsJ.js} +1 -1
  155. package/dist/{cloud-B1c4XIsn.js → cloud-DdidMW6f.js} +445 -200
  156. package/dist/copy-CId1E038.js +19 -0
  157. package/dist/createCloudRuntime-x5WZm3p8.js +383 -0
  158. package/dist/{createLucideIcon-05lB8iWe.js → createLucideIcon-Cwf_nTzE.js} +6 -6
  159. package/dist/de-Ck0pBGHu.js +83 -0
  160. package/dist/{dist-BxFbxpgW.js → dist-BVqAYoRB.js} +125 -125
  161. package/dist/dist-D8i1ixHK.js +177 -0
  162. package/dist/dist-DBirAJIs.js +410 -0
  163. package/dist/editor-modal-B_LaQf0s.js +5998 -0
  164. package/dist/en-DcmpWV53.js +2 -0
  165. package/dist/es-lagTvUfX.js +83 -0
  166. package/dist/{extensions-Bawm4BOM.js → extensions-CHOBZRab.js} +42 -42
  167. package/dist/eye-BuGtFUoJ.js +16 -0
  168. package/dist/fr-C4hVl5Lk.js +83 -0
  169. package/dist/{image-up-ovhjl9u9.js → image-up-gH4JEpU5.js} +1 -1
  170. package/dist/index.d.ts +90 -11
  171. package/dist/{info-c3KI927I.js → info-BQ60P82u.js} +1 -1
  172. package/dist/{keys-C3P1yxnr.js → keys-DQA2i1k1.js} +4 -4
  173. package/dist/link-3R8it3J7.js +14 -0
  174. package/dist/list-Ccdgj46T.js +33 -0
  175. package/dist/{loader-circle-B2Y8xZQb.js → loader-circle-B_tAD4k6.js} +1 -1
  176. package/dist/{message-circle-B7K-naUa.js → message-circle-P-KSc6V0.js} +1 -1
  177. package/dist/nl-CReD7Apd.js +83 -0
  178. package/dist/{pencil-BhWTFcp4.js → pencil-9ZiwqS4r.js} +1 -1
  179. package/dist/plus-BwJEzCaO.js +14 -0
  180. package/dist/pt-BR-BRA0-vGP.js +83 -0
  181. package/dist/{refresh-cw-BqUR5vgO.js → refresh-cw-DEgfb2FK.js} +2 -14
  182. package/dist/{runtime-dom.esm-bundler-BuG03jBM.js → runtime-dom.esm-bundler-PnoZU512.js} +106 -106
  183. package/dist/search-DqQ8Li5E.js +16 -0
  184. package/dist/{send-D1vvuW79.js → send-CE6uvqop.js} +1 -1
  185. package/dist/{shield-check-DjK54PnW.js → shield-check-DhD1Z3rd.js} +1 -1
  186. package/dist/{sparkles-DNdS9V_3.js → sparkles-R0ZQHa6F.js} +1 -1
  187. package/dist/style.css +1 -1
  188. package/dist/templatical-editor.js +2491 -2408
  189. package/dist/{text-align-start-Bcmo_VUY.js → text-align-start-DSux2UNn.js} +1 -1
  190. package/dist/{trash-C9bMXvw4.js → trash-Cf_SqsER.js} +1 -1
  191. package/dist/{triangle-alert-Bn8Bd2Yv.js → triangle-alert-C6tGa6jw.js} +1 -1
  192. package/dist/{upload-DKgg1gno.js → upload-DusKjpVr.js} +1 -1
  193. package/dist/{useAliveFlag-PVmp95MT.js → useAliveFlag-oyByIcjy.js} +1 -1
  194. package/dist/{useCloudI18n-BKoiYsWZ.js → useCloudI18n-BLyh_e2T.js} +2 -2
  195. package/dist/{useEditorCore-CYGvurZa.js → useEditorCore-DhlKOYwe.js} +1552 -1486
  196. package/dist/{useEditorRoot-DkRGTQRs.js → useEditorRoot-ds57-l6F.js} +2 -2
  197. package/dist/{useI18n-CL6RfPzK.js → useI18n-BbdxxpOE.js} +2 -2
  198. package/dist/{useMergeTag-C9GEpljB.js → useMergeTag-DlvOBW_B.js} +3 -3
  199. package/dist/{usePopoverPosition-CWxaIWd3.js → usePopoverPosition-CprM5p-c.js} +2 -2
  200. package/dist/{useScrollToBlock-oUx1HIZ2.js → useScrollToBlock-BTFw0b9O.js} +3 -3
  201. package/dist/{vue.runtime.esm-bundler-D9JUcKrV.js → vue.runtime.esm-bundler-DShF3P6k.js} +1192 -1181
  202. package/dist/{x-BPKoRPTG.js → x-D_-42Ukq.js} +1 -1
  203. package/package.json +9 -12
  204. package/dist/CloudHeaderExtras-CRUQvgSV.js +0 -59
  205. package/dist/SavedBlocksBrowserModal-BORqqASb.js +0 -322
  206. package/dist/TitleEditor-pYEUX6lR.js +0 -198
  207. package/dist/TplModal-DRx4ytx8.js +0 -51
  208. package/dist/cdn/chunks/VersionHistoryMenu-BfVUvWHT.js.map +0 -1
  209. package/dist/cdn/chunks/ca-CNRWAMHI.js.map +0 -1
  210. package/dist/cdn/chunks/cloud-CullB76F.js.map +0 -1
  211. package/dist/cdn/chunks/createCloudRuntime-Cx2JpUYU.js +0 -443
  212. package/dist/cdn/chunks/createCloudRuntime-Cx2JpUYU.js.map +0 -1
  213. package/dist/cdn/chunks/de-DFYCT4QU.js.map +0 -1
  214. package/dist/cdn/chunks/en-rGHphLWo.js +0 -2
  215. package/dist/cdn/chunks/es-OgkdMZGX.js.map +0 -1
  216. package/dist/cdn/chunks/fr-Dswns199.js.map +0 -1
  217. package/dist/cdn/chunks/nl-CbcPJlrL.js.map +0 -1
  218. package/dist/cdn/chunks/pt-BR-BibOQm-o.js.map +0 -1
  219. package/dist/cdn/chunks/src-CaXeO-gG.js.map +0 -1
  220. package/dist/cdn/chunks/useEditorCore-D4MytYB9.js.map +0 -1
  221. package/dist/createCloudRuntime-PevFSH74.js +0 -441
  222. package/dist/dist-dNiknO7j.js +0 -251
  223. package/dist/dist-heatwAdo.js +0 -150
@@ -1,441 +0,0 @@
1
- import { A as e, L as t, X as n, q as r, s as i } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
- import { m as a } from "./dist-heatwAdo.js";
3
- import { t as o } from "./dist-dNiknO7j.js";
4
- import { B as s, i as c, l, t as u } from "./keys-C3P1yxnr.js";
5
- import { t as d } from "./timeouts-DHPZQ0G3.js";
6
- import { t as f } from "./logger-BBlvSn6q.js";
7
- import { t as p } from "./preRenderCustomBlocks-DFXH54Zr.js";
8
- import { S as m, _ as h, a as g, b as ee, c as te, d as ne, h as _, i as v, l as y, m as b, n as x, o as S, p as C, r as re, s as ie, t as ae, u as oe, v as se, x as ce, y as le } from "./cloud-B1c4XIsn.js";
9
- //#region src/cloud/composables/useCloudFeatureFlags.ts
10
- function ue(e) {
11
- let { planConfigInstance: t, aiConfig: n, getTemplateId: r } = e;
12
- return {
13
- canUseAiGeneration: i(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value),
14
- canSendTestEmail: i(() => t.hasFeature("test_email")),
15
- hasTemplateSaved: i(() => r() !== null),
16
- templateLimit: i(() => t.config.value?.limits.max_templates ?? null),
17
- templateCount: i(() => t.config.value?.template_count ?? 0)
18
- };
19
- }
20
- //#endregion
21
- //#region src/cloud/composables/useCloudMediaLibrary.ts
22
- function de(e) {
23
- let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: i, authManager: a, getMediaConfig: o, onError: s } = e, c = null;
24
- function l(e) {
25
- return {
26
- url: e.url,
27
- alt: e.alt_text || void 0
28
- };
29
- }
30
- async function u(e) {
31
- let r = e?.accept ?? ["images"];
32
- if (e?.files?.length) {
33
- if (t) {
34
- let n = await t({
35
- accept: r,
36
- files: e.files
37
- });
38
- return n ? l(n) : null;
39
- }
40
- return d(e.files[0]);
41
- }
42
- if (t) {
43
- let e = await t({ accept: r });
44
- return e ? l(e) : null;
45
- }
46
- return c &&= (c(null), null), i.value = r, n.value = !0, new Promise((e) => {
47
- c = (t) => {
48
- e(t);
49
- };
50
- });
51
- }
52
- async function d(e) {
53
- let t = f(e);
54
- if (t) return s?.(t), null;
55
- try {
56
- let { MediaApiClient: t } = await import("@templatical/media-library");
57
- return l(await new t(a).uploadMedia(e));
58
- } catch (e) {
59
- return s?.(e), null;
60
- }
61
- }
62
- function f(e) {
63
- let t = o?.() ?? null;
64
- if (!t) return null;
65
- let n = t.categories?.images?.mime_types ?? [];
66
- return n.length > 0 && !n.includes(e.type) ? /* @__PURE__ */ Error(`Unsupported image type: ${e.type || "unknown"}. Accepted: ${n.join(", ")}.`) : t.max_file_size > 0 && e.size > t.max_file_size ? /* @__PURE__ */ Error(`Image is too large (${e.size} bytes). Maximum allowed is ${t.max_file_size} bytes.`) : null;
67
- }
68
- function p(e) {
69
- n.value = !1, c?.(l(e)), c = null;
70
- }
71
- function m() {
72
- n.value = !1, c?.(null), c = null;
73
- }
74
- return r(() => {
75
- c &&= (c(null), null);
76
- }), {
77
- handleRequestMedia: u,
78
- handleMediaSelect: p,
79
- handleMediaLibraryClose: m
80
- };
81
- }
82
- //#endregion
83
- //#region src/cloud/composables/useCloudPanelState.ts
84
- function fe() {
85
- let e = n(null), t = i({
86
- get: () => e.value === "ai-chat",
87
- set: (t) => e.value = t ? "ai-chat" : null
88
- }), r = i({
89
- get: () => e.value === "scoring",
90
- set: (t) => e.value = t ? "scoring" : null
91
- }), a = i({
92
- get: () => e.value === "design-reference",
93
- set: (t) => e.value = t ? "design-reference" : null
94
- }), s = i({
95
- get: () => e.value === "comments",
96
- set: (t) => e.value = t ? "comments" : null
97
- }), c = n(!1), l = n(void 0), u = n(!1), d = n(null), f = i(() => e.value !== null), p = i(() => {
98
- let t = e.value;
99
- return t === "ai-chat" || t === "design-reference" || t === "scoring" ? t : null;
100
- }), m = i(() => u.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
101
- function h() {
102
- u.value = !u.value;
103
- }
104
- function g(t) {
105
- u.value = !1, e.value = e.value === t ? null : t;
106
- }
107
- return o(d, () => {
108
- u.value = !1;
109
- }), {
110
- activePanel: e,
111
- aiChatOpen: t,
112
- scoringPanelOpen: r,
113
- designReferenceOpen: a,
114
- commentsOpen: s,
115
- mediaLibraryOpen: c,
116
- mediaLibraryAccept: l,
117
- aiMenuOpen: u,
118
- aiMenuRef: d,
119
- rightPanelOpen: f,
120
- activeAiFeature: p,
121
- aiButtonActive: m,
122
- toggleAiMenu: h,
123
- handleAiFeatureSelect: g
124
- };
125
- }
126
- //#endregion
127
- //#region src/cloud/composables/useCloudSaveGate.ts
128
- function pe(e) {
129
- let t = n(!1), r = null, a = i(() => e.planConfig.value?.accessibility?.blockOnError === !0), o = i(() => a.value ? e.issues.value.filter((e) => e.severity === "error") : []), s = i(() => o.value.length > 0);
130
- async function c(e) {
131
- return s.value ? (r = e, t.value = !0, !1) : (await e(), !0);
132
- }
133
- async function l(e) {
134
- return !s.value && (await e(), !0);
135
- }
136
- async function u() {
137
- let e = r;
138
- r = null, t.value = !1, e && await e();
139
- }
140
- function d() {
141
- r = null, t.value = !1;
142
- }
143
- return {
144
- shouldBlock: s,
145
- blockingIssues: o,
146
- modalOpen: t,
147
- tryRunSave: c,
148
- runUnlessBlocked: l,
149
- confirmAndSave: u,
150
- cancel: d
151
- };
152
- }
153
- //#endregion
154
- //#region src/cloud/composables/useCollabUndoWarning.ts
155
- function me(e) {
156
- let { isCollaborationEnabled: t, getCollaboratorCount: r, canUndo: i } = e, o = n(!1), s = n(!1), { start: c } = a(() => {
157
- s.value = !1;
158
- }, d, { immediate: !1 });
159
- function l() {
160
- !o.value && t.value && r() !== 0 && i.value && (o.value = !0, s.value = !0, c());
161
- }
162
- return {
163
- collabUndoWarningVisible: s,
164
- showCollabUndoWarning: l
165
- };
166
- }
167
- //#endregion
168
- //#region src/cloud/collectSavedBlockIds.ts
169
- function he(e) {
170
- let t = /* @__PURE__ */ new Set(), n = e?.content?.blocks;
171
- if (!n) return t;
172
- for (let e of n) if (t.add(e.id), e.type === "section" && e.children) for (let n of e.children) for (let e of n) t.add(e.id);
173
- return t;
174
- }
175
- //#endregion
176
- //#region src/cloud/createCloudRuntime.ts
177
- function ge(e) {
178
- if (!e) return {};
179
- let { onSaved: t, onCreated: n, onLoaded: r } = e;
180
- return {
181
- ...typeof t == "function" ? { onSaved: t } : {},
182
- ...typeof n == "function" ? { onCreated: n } : {},
183
- ...typeof r == "function" ? { onLoaded: r } : {}
184
- };
185
- }
186
- function _e(e) {
187
- if (!e) return {};
188
- let { onCreated: t, onUpdated: n, onDeleted: r, onResolved: i, onUnresolved: a } = e;
189
- return {
190
- ...typeof t == "function" ? { onCreated: t } : {},
191
- ...typeof n == "function" ? { onUpdated: n } : {},
192
- ...typeof r == "function" ? { onDeleted: r } : {},
193
- ...typeof i == "function" ? { onResolved: i } : {},
194
- ...typeof a == "function" ? { onUnresolved: a } : {}
195
- };
196
- }
197
- function ve(e) {
198
- if (typeof e != "object" || !e) return {};
199
- let { onCreated: t, onUpdated: n, onDeleted: r } = e;
200
- return {
201
- ...typeof t == "function" ? { onCreated: t } : {},
202
- ...typeof n == "function" ? { onUpdated: n } : {},
203
- ...typeof r == "function" ? { onDeleted: r } : {}
204
- };
205
- }
206
- function ye(e) {
207
- if (typeof e != "object" || !e) return {};
208
- let { onSent: t, defaultRecipient: n } = e;
209
- return {
210
- ...typeof t == "function" ? { onSent: t } : {},
211
- ...typeof n == "string" ? { defaultRecipient: n } : {}
212
- };
213
- }
214
- function be(e) {
215
- if (!e) return {};
216
- let { onCreated: t, onRestored: n } = e;
217
- return {
218
- ...typeof t == "function" ? { onCreated: t } : {},
219
- ...typeof n == "function" ? { onRestored: n } : {}
220
- };
221
- }
222
- function w(e) {
223
- return e.length < 2 ? e.join("") : e.length === 2 ? e.join(" and ") : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`;
224
- }
225
- async function T(r) {
226
- let { config: a, cloudTranslations: o } = r, d = null, T = null, E = null, D = null, O = null, k = null, A = null, j = n(null), M = n(/* @__PURE__ */ new Map()), N = n(null);
227
- function P() {
228
- if (!d) throw Error("[Templatical] The Cloud editor is not mounted yet.");
229
- return d;
230
- }
231
- function F() {
232
- return d?.state.template?.id ?? null;
233
- }
234
- let I = new ae({
235
- ...a.auth,
236
- onError: (e) => {
237
- te(e) && (j.value = e), a.onError?.(e);
238
- }
239
- }), L = le({
240
- authManager: I,
241
- onError: a.onError
242
- });
243
- await I.initialize();
244
- let R = await y({ authManager: I });
245
- if (!R.api.ok) throw Error("Health check failed: API is not reachable");
246
- if (!R.auth.ok) throw Error(`Health check failed: authentication error${R.auth.error ? ` - ${R.auth.error}` : ""}`);
247
- R.websocket.ok || f.warn("WebSocket health check failed:", R.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await L.fetchConfig(), j.value = null;
248
- let xe = a.templates, z = [
249
- "load",
250
- "create",
251
- "save"
252
- ].filter((e) => xe?.[e] !== void 0);
253
- z.length > 0 && f.warn(`initCloud ignores ${w(z.map((e) => `templates.${e}`))} — the template id is the join key for collaboration, version history, comments, AI rewrite, scoring and the server-side export, so an id Cloud never issued would degrade all six. Your event handlers were kept. Use init() to bring your own storage.`);
254
- let Se = a.versionHistory, B = [
255
- "list",
256
- "get",
257
- "create",
258
- "restore"
259
- ].filter((e) => Se?.[e] !== void 0);
260
- B.length > 0 && f.warn(`initCloud ignores ${w(B.map((e) => `versionHistory.${e}`))} — a version is keyed to a template id Cloud issued, so Cloud owns its history. Your event handlers were kept. Use init() to bring your own storage.`);
261
- let Ce = a.comments, V = [
262
- "list",
263
- "create",
264
- "update",
265
- "delete",
266
- "setResolved",
267
- "subscribe"
268
- ].filter((e) => Ce?.[e] !== void 0);
269
- V.length > 0 && f.warn(`initCloud ignores ${w(V.map((e) => `comments.${e}`))} — a comment is keyed to a template id Cloud issued, and its author is signed by the auth token, so Cloud owns the conversation. Your event handlers were kept. Use init() to bring your own storage.`), a.render && f.warn("initCloud does not accept a `render` provider — Cloud renders server-side for test email, sends and exports, so a supplied renderer would change only what you preview and export, never what Cloud delivers. The supplied provider is ignored. For your own MJML, call renderToMjml(editor.getContent()) from @templatical/renderer.");
270
- function H(e) {
271
- let t = L.config.value?.websocket;
272
- E && t && E.connect(e.id, ne(t));
273
- }
274
- let U = g(I), W = U.create, G = U.save, we = {
275
- ...ge(a.templates),
276
- load: async (e) => {
277
- let t = await U.load(e);
278
- return H(t), t;
279
- },
280
- create: typeof W == "function" ? async (e) => {
281
- let t = await W(e);
282
- return H(t), t;
283
- } : !1,
284
- save: typeof G == "function" ? async (e, t) => (T && d && await p(d.content.value, T.registry), G(e, t)) : !1
285
- }, Te = re({
286
- authManager: I,
287
- getTemplateId: F,
288
- save: () => P().save()
289
- }), Ee = {
290
- ...be(a.versionHistory),
291
- ...ie(I)
292
- }, De = {
293
- ..._e(a.comments),
294
- ...x({
295
- authManager: I,
296
- channel: N,
297
- getSocketId: () => E?.getSocketId() ?? null
298
- })
299
- }, K = I.userConfig ? {
300
- id: I.userConfig.id,
301
- name: I.userConfig.name
302
- } : void 0, q = typeof a.savedBlocks?.list == "function" ? a.savedBlocks : null;
303
- if (q === null && typeof a.savedBlocks == "object" && a.savedBlocks !== null) {
304
- let e = a.savedBlocks, t = [
305
- "list",
306
- "create",
307
- "update",
308
- "delete"
309
- ].filter((t) => e[t] !== void 0);
310
- t.length > 0 && f.warn(`initCloud ignores ${w(t.map((e) => `savedBlocks.${e}`))} — a provider needs a working list to replace Cloud's store, and this value has none, so it configures Cloud's own store instead. Your event handlers were kept. Use init() to bring your own storage.`);
311
- }
312
- let J = a.savedBlocks === !1 ? void 0 : q ?? {
313
- ...ve(a.savedBlocks),
314
- ...v(I)
315
- }, Y = ce({
316
- authManager: I,
317
- isAuthReady: n(!0)
318
- }), Oe = h({ authManager: I }), X = typeof a.testEmail?.send == "function" ? a.testEmail : null;
319
- if (X === null && typeof a.testEmail == "object" && a.testEmail !== null) {
320
- let e = a.testEmail, t = [
321
- "send",
322
- "includeMjml",
323
- "allowedRecipients"
324
- ].filter((t) => e[t] !== void 0);
325
- t.length > 0 && f.warn(`initCloud ignores ${w(t.map((e) => `testEmail.${e}`))} — a provider needs a working send to replace Cloud's sender outright, and Cloud renders server-side with the signed allowlist from your project's JWT either way, so none of these apply here. Your event handlers were kept.`);
326
- }
327
- let ke = X ?? Object.assign(S({
328
- authManager: I,
329
- getTemplateId: F,
330
- save: () => P().save(),
331
- exportHtml: (e) => Oe.exportHtml(e, oe(a.fonts)),
332
- allowedEmails: Y.allowedEmails,
333
- getSignature: Y.getSignature,
334
- onBeforeTestEmail: a.onBeforeTestEmail
335
- }), ye(a.testEmail)), Z = C(a.ai), Ae = ee({
336
- authManager: I,
337
- getTemplateId: F
338
- }), Q = ue({
339
- planConfigInstance: L,
340
- aiConfig: Z,
341
- getTemplateId: F
342
- }), $ = i(() => !!a.collaboration?.enabled && L.hasFeature("collaboration"));
343
- function je(n) {
344
- let r = n.editor;
345
- d = r, e(l, o), e(c, I), e(u, Z), e(s, Ae);
346
- let i = m({
347
- authManager: I,
348
- onError: a.onError
349
- });
350
- E = i, t(i.channel, (e) => {
351
- N.value = e;
352
- }, { immediate: !0 }), a.mcp?.enabled && se({
353
- editor: r,
354
- channel: i.channel,
355
- onOperation: a.mcp.onOperation
356
- }), a.collaboration?.enabled && (O = b({
357
- authManager: I,
358
- editor: r,
359
- channel: i.channel,
360
- onError: a.onError,
361
- onCollaboratorJoined: a.collaboration.onCollaboratorJoined,
362
- onCollaboratorLeft: a.collaboration.onCollaboratorLeft,
363
- onBlockLocked: a.collaboration.onBlockLocked,
364
- onBlockUnlocked: a.collaboration.onBlockUnlocked
365
- }), t(() => O.lockedBlocks.value, (e) => {
366
- M.value = e;
367
- }, { immediate: !0 }), _(r, O));
368
- let f = fe(), p = de({
369
- onRequestMedia: a.onRequestMedia,
370
- mediaLibraryOpen: f.mediaLibraryOpen,
371
- mediaLibraryAccept: f.mediaLibraryAccept,
372
- authManager: I,
373
- getMediaConfig: () => L.config.value?.media ?? null,
374
- onError: a.onError
375
- });
376
- return D = p, {
377
- websocket: i,
378
- panelState: f,
379
- mediaLib: p,
380
- mediaBrowser: {
381
- authManager: I,
382
- projectId: I.projectId,
383
- planConfig: L
384
- },
385
- featureFlags: Q,
386
- collaboration: O,
387
- isCollaborationEnabled: $
388
- };
389
- }
390
- function Me(e) {
391
- let { core: t, capabilities: r } = e;
392
- return T = t, A = pe({
393
- issues: t.templateLint ? t.templateLint.issues : n([]),
394
- planConfig: L.config
395
- }), k = me({
396
- isCollaborationEnabled: $,
397
- getCollaboratorCount: () => O?.collaborators.value.length ?? 0,
398
- canUndo: t.history.canUndo
399
- }), r.plan = L, r.ai = Z, a.customBlocks?.length && t.registerCustomBlocks(a.customBlocks), a.theme && (t.themeOverrides.value = a.theme), {
400
- saveGate: A,
401
- collabWarning: k,
402
- sessionError: j,
403
- retry: async () => {
404
- try {
405
- await I.initialize(), j.value = null;
406
- } catch (e) {
407
- j.value = e instanceof Error ? e : /* @__PURE__ */ Error("Authentication failed");
408
- }
409
- }
410
- };
411
- }
412
- return {
413
- runtime: {
414
- lockedBlocks: M,
415
- onRequestMedia: (e) => D ? D.handleRequestMedia(e) : Promise.resolve(null),
416
- isSavedBlocksAvailable: q ? () => !0 : () => a.savedBlocks !== !1 && L.hasFeature("saved_modules"),
417
- isTestEmailAvailable: X ? () => !0 : () => Y.isEnabled.value && Q.canSendTestEmail.value && Q.hasTemplateSaved.value,
418
- isCommentsAvailable: () => a.comments !== !1 && L.hasFeature("commenting") && Q.hasTemplateSaved.value,
419
- isBlockSaved: (e) => he(d?.state.template ?? null).has(e),
420
- getSaveGate: () => A,
421
- isRemoteOperation: () => O?._isProcessingRemoteOperation() ?? !1,
422
- onBeforeUndo: () => k?.showCollabUndoWarning(),
423
- attach: je,
424
- ready: Me,
425
- destroy() {
426
- E?.disconnect(), a.onUnmount?.();
427
- }
428
- },
429
- providers: {
430
- templates: we,
431
- render: Te,
432
- versionHistory: Ee,
433
- ...J ? { savedBlocks: J } : {},
434
- testEmail: ke,
435
- comments: De
436
- },
437
- user: K
438
- };
439
- }
440
- //#endregion
441
- export { T as bootstrapCloud };
@@ -1,251 +0,0 @@
1
- import { D as e, L as t, Q as n, R as r, rt as i, s as a, tt as o, x as s, y as c } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
- import { _ as l, a as u, d, i as f, l as p, n as m, o as h, r as g, s as _, t as v, u as y } from "./dist-heatwAdo.js";
3
- //#region ../../node_modules/.pnpm/@vueuse+core@14.4.0_vue@3.5.42_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
4
- var b = m ? window : void 0;
5
- m && window.document, m && window.navigator, m && window.location;
6
- function x(e) {
7
- let t = o(e);
8
- return t?.$el ?? t;
9
- }
10
- function S(...e) {
11
- let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = a(() => {
12
- let t = p(o(e[0])).filter((e) => e != null);
13
- return t.every((e) => typeof e != "string") ? t : void 0;
14
- });
15
- return l(() => [
16
- n.value?.map((e) => x(e)) ?? [b].filter((e) => e != null),
17
- p(o(n.value ? e[1] : e[0])),
18
- p(i(n.value ? e[2] : e[1])),
19
- o(n.value ? e[3] : e[2])
20
- ], ([e, n, r, i], a, o) => {
21
- if (!e?.length || !n?.length || !r?.length) return;
22
- let s = f(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
23
- o(() => {
24
- c.forEach((e) => e());
25
- });
26
- }, { flush: "post" });
27
- }
28
- var C = !1;
29
- function w(e, t, n = {}) {
30
- let { window: r = b, ignore: i = [], capture: a = !0, detectIframe: s = !1, controls: c = !1 } = n;
31
- if (!r) return c ? {
32
- stop: u,
33
- cancel: u,
34
- trigger: u
35
- } : u;
36
- if (g && !C) {
37
- C = !0;
38
- let e = { passive: !0 };
39
- Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", u, e)), r.document.documentElement.addEventListener("click", u, e);
40
- }
41
- let l = !0, d = (e) => o(i).some((t) => {
42
- if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
43
- {
44
- let n = x(t);
45
- return n && (e.target === n || e.composedPath().includes(n));
46
- }
47
- });
48
- function f(e) {
49
- let t = o(e);
50
- return t && t.$.subTree.shapeFlag === 16;
51
- }
52
- function p(e, t) {
53
- let n = o(e), r = n.$.subTree && n.$.subTree.children;
54
- return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
55
- }
56
- let m = (n) => {
57
- let r = x(e);
58
- if (n.target != null && !(!(r instanceof Element) && f(e) && p(e, n)) && r && r !== n.target && !n.composedPath().includes(r)) {
59
- if ("detail" in n && n.detail === 0 && (l = !d(n)), !l) {
60
- l = !0;
61
- return;
62
- }
63
- t(n);
64
- }
65
- }, h = !1, _ = [
66
- S(r, "click", (e) => {
67
- h || (h = !0, setTimeout(() => {
68
- h = !1;
69
- }, 0), m(e));
70
- }, {
71
- passive: !0,
72
- capture: a
73
- }),
74
- S(r, "pointerdown", (t) => {
75
- let n = x(e);
76
- l = !d(t) && !(!n || t.composedPath().includes(n));
77
- }, { passive: !0 }),
78
- s && S(r, "blur", (n) => {
79
- setTimeout(() => {
80
- let i = x(e), a = r.document.activeElement;
81
- for (; a?.shadowRoot;) a = a.shadowRoot.activeElement;
82
- a?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
83
- }, 0);
84
- }, { passive: !0 })
85
- ].filter(Boolean), v = () => _.forEach((e) => e());
86
- return c ? {
87
- stop: v,
88
- cancel: () => {
89
- l = !1;
90
- },
91
- trigger: (e) => {
92
- l = !0, m(e), l = !1;
93
- }
94
- } : v;
95
- }
96
- function T() {
97
- let t = n(!1), r = c();
98
- return r && e(() => {
99
- t.value = !0;
100
- }, r), t;
101
- }
102
- /* @__NO_SIDE_EFFECTS__ */
103
- function E(e) {
104
- let t = T();
105
- return a(() => (t.value, !!e()));
106
- }
107
- function D(e, n, r = {}) {
108
- let { window: i = b, ...s } = r, c, l = /* @__PURE__ */ E(() => i && "MutationObserver" in i), u = () => {
109
- c &&= (c.disconnect(), void 0);
110
- }, f = t(a(() => {
111
- let t = p(o(e)).map(x).filter(h);
112
- return new Set(t);
113
- }), (e) => {
114
- u(), l.value && e.size && (c = new MutationObserver(n), e.forEach((e) => c.observe(e, s)));
115
- }, {
116
- immediate: !0,
117
- flush: "post"
118
- }), m = () => c?.takeRecords(), g = () => {
119
- f(), u();
120
- };
121
- return d(g), {
122
- isSupported: l,
123
- stop: g,
124
- takeRecords: m
125
- };
126
- }
127
- var O = Symbol("vueuse-ssr-width");
128
- /* @__NO_SIDE_EFFECTS__ */
129
- function k() {
130
- let e = s() ? v(O, null) : null;
131
- return typeof e == "number" ? e : void 0;
132
- }
133
- function A(e, t = {}) {
134
- let { window: i = b, ssrWidth: s = /* @__PURE__ */ k() } = t, c = /* @__PURE__ */ E(() => i && "matchMedia" in i && typeof i.matchMedia == "function"), l = n(typeof s == "number"), u = n(), d = n(!1);
135
- return r(() => {
136
- if (l.value) {
137
- l.value = !c.value;
138
- let t = o(e).split(",");
139
- d.value = t.some((e) => {
140
- let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), r = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = !!(n || r);
141
- return n && i && (i = s >= _(n[1])), r && i && (i = s <= _(r[1])), t ? !i : i;
142
- });
143
- return;
144
- }
145
- c.value && (u.value = i.matchMedia(o(e)), d.value = u.value.matches);
146
- }), S(u, "change", (e) => {
147
- d.value = e.matches;
148
- }, { passive: !0 }), a(() => d.value);
149
- }
150
- function j(e, t = {}) {
151
- let r = n(!1), a = n(null), o = 0, s = !0;
152
- if (m) {
153
- let n = typeof t == "function" ? { onDrop: t } : t, c = n.multiple ?? !0, l = n.preventDefaultForUnhandled ?? !1, u = (e) => {
154
- let t = Array.from(e.dataTransfer?.files ?? []);
155
- return t.length === 0 ? null : c ? t : [t[0]];
156
- }, d = (e) => {
157
- let t = i(n.dataTypes);
158
- return typeof t == "function" ? t(e) : !t?.length || e.length !== 0 && e.every((e) => t.some((t) => e.includes(t)));
159
- }, f = (e) => {
160
- if (n.checkValidity) return n.checkValidity(e);
161
- let t = Array.from(e ?? []).map((e) => e.type), r = d(t), i = c || e.length <= 1;
162
- return r && i;
163
- }, p = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !("chrome" in window), m = (e, t) => {
164
- let i = e.dataTransfer?.items;
165
- if (s = (i && f(i)) ?? !1, l && e.preventDefault(), !p() && !s) {
166
- e.dataTransfer && (e.dataTransfer.dropEffect = "none");
167
- return;
168
- }
169
- e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "copy");
170
- let c = u(e);
171
- switch (t) {
172
- case "enter":
173
- var d;
174
- o += 1, r.value = !0, (d = n.onEnter) == null || d.call(n, null, e);
175
- break;
176
- case "over":
177
- var m;
178
- (m = n.onOver) == null || m.call(n, null, e);
179
- break;
180
- case "leave":
181
- var h;
182
- --o, o === 0 && (r.value = !1), (h = n.onLeave) == null || h.call(n, null, e);
183
- break;
184
- case "drop": if (o = 0, r.value = !1, s) {
185
- var g;
186
- a.value = c, (g = n.onDrop) == null || g.call(n, c, e);
187
- }
188
- }
189
- };
190
- S(e, "dragenter", (e) => m(e, "enter")), S(e, "dragover", (e) => m(e, "over")), S(e, "dragleave", (e) => m(e, "leave")), S(e, "drop", (e) => m(e, "drop"));
191
- }
192
- return {
193
- files: a,
194
- isOverDropZone: r
195
- };
196
- }
197
- function M(e, n, r = {}) {
198
- let { window: i = b, ...s } = r, c, l = /* @__PURE__ */ E(() => i && "ResizeObserver" in i), u = () => {
199
- c &&= (c.disconnect(), void 0);
200
- }, f = t(a(() => {
201
- let t = o(e);
202
- return Array.isArray(t) ? t.map((e) => x(e)) : [x(t)];
203
- }), (e) => {
204
- if (u(), l.value && i) {
205
- c = new ResizeObserver(n);
206
- for (let t of e) t && c.observe(t, s);
207
- }
208
- }, {
209
- immediate: !0,
210
- flush: "post"
211
- }), p = () => {
212
- u(), f();
213
- };
214
- return d(p), {
215
- isSupported: l,
216
- stop: p
217
- };
218
- }
219
- function N(e, r = {}) {
220
- let { reset: i = !0, windowResize: a = !0, windowScroll: o = !0, immediate: s = !0, updateTiming: c = "sync" } = r, l = n(0), u = n(0), d = n(0), f = n(0), p = n(0), m = n(0), h = n(0), g = n(0);
221
- function _() {
222
- let t = x(e);
223
- if (!t) {
224
- i && (l.value = 0, u.value = 0, d.value = 0, f.value = 0, p.value = 0, m.value = 0, h.value = 0, g.value = 0);
225
- return;
226
- }
227
- let n = t.getBoundingClientRect();
228
- l.value = n.height, u.value = n.bottom, d.value = n.left, f.value = n.right, p.value = n.top, m.value = n.width, h.value = n.x, g.value = n.y;
229
- }
230
- function v() {
231
- c === "sync" ? _() : c === "next-frame" && requestAnimationFrame(() => _());
232
- }
233
- return M(e, v), t(() => x(e), (e) => !e && v()), D(e, v, { attributeFilter: ["style", "class"] }), o && S("scroll", v, {
234
- capture: !0,
235
- passive: !0
236
- }), a && S("resize", v, { passive: !0 }), y(() => {
237
- s && v();
238
- }), {
239
- height: l,
240
- bottom: u,
241
- left: d,
242
- right: f,
243
- top: p,
244
- width: m,
245
- x: h,
246
- y: g,
247
- update: v
248
- };
249
- }
250
- //#endregion
251
- export { A as a, S as i, j as n, N as r, w as t };