@layers-app/editor 2.2.45 → 2.3.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 (220) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.js +2 -2
  3. package/dist/{layers.CSsCFhvL.js → layers.-2KfQ6RG.js} +1 -1
  4. package/dist/{layers.C-TQ4gDg.js → layers.2VLsd23I.js} +1 -1
  5. package/dist/{layers.CjUQRZCf.js → layers.3t60RULo.js} +96 -95
  6. package/dist/{layers.0ohwJnJO.js → layers.5g-d1lPI.js} +361 -342
  7. package/dist/{layers.DGO5wxx-.js → layers.6fNZWRMy.js} +1 -1
  8. package/dist/{layers.cCd9G0s7.js → layers.6nxhuUZS.js} +1 -1
  9. package/dist/{layers.CKLSBcei.js → layers.77ToS0vJ.js} +1 -1
  10. package/dist/{layers.txhP70wF.js → layers.7oPXw6se.js} +1 -1
  11. package/dist/{layers.D2IuhDCQ.js → layers.8aC_7H6s.js} +1 -1
  12. package/dist/{layers.BKrToDbz.js → layers.9_5gtlo0.js} +1 -1
  13. package/dist/{layers.n-DYmU2Z.js → layers.A2b0zfpv.js} +1 -1
  14. package/dist/{layers.CmXdbn8_.js → layers.AHmwp-MB.js} +1 -1
  15. package/dist/{layers.CYW1WEKe.js → layers.B-EeOsPN.js} +1 -1
  16. package/dist/{layers.sKO5wWzt.js → layers.B-knJAmg.js} +1 -1
  17. package/dist/{layers.CQESVhxO.js → layers.B0YPk_J2.js} +1 -1
  18. package/dist/layers.B0aoB6yM.js +1 -0
  19. package/dist/{layers.BTBRVGFs.js → layers.B0c5OY_G.js} +1 -1
  20. package/dist/{layers.Dx2lhGzZ.js → layers.B1Asn8n_.js} +3 -3
  21. package/dist/{layers.DcYmpYNe.js → layers.B1QlqLSe.js} +1 -1
  22. package/dist/{layers.BaVDbZc-.js → layers.B1YHDbg8.js} +1 -1
  23. package/dist/{layers.Dd_MQmMI.js → layers.B4dgRxLi.js} +8 -8
  24. package/dist/{layers.B22dcdRZ.js → layers.B4n7r8Ul.js} +1 -1
  25. package/dist/{layers.CP2x77Hz.js → layers.B5AMuW0E.js} +1 -1
  26. package/dist/{layers.DinGcvYA.js → layers.B5R_HMQi.js} +33 -33
  27. package/dist/{layers.NEN1dVNO.js → layers.B7fR53su.js} +1 -1
  28. package/dist/{layers.DNqMXVNp.js → layers.B8XK-8I-.js} +1 -1
  29. package/dist/{layers.CY17OEce.js → layers.B9Xz7B4H.js} +1 -1
  30. package/dist/{layers.DvhAl2Y2.js → layers.BBT4Tvg5.js} +1 -1
  31. package/dist/{layers.mHLeiSFC.js → layers.BC_YpOSp.js} +1 -1
  32. package/dist/{layers.QhZDFUq4.js → layers.BD7kYiWS.js} +1 -1
  33. package/dist/{layers.DveF4Taj.js → layers.BDQtN1aD.js} +1 -1
  34. package/dist/{layers.Du94jGQf.js → layers.BExC2g6w.js} +1 -1
  35. package/dist/{layers.B028_Pfk.js → layers.BFreQdwW.js} +13 -13
  36. package/dist/{layers.BOkb4Kwr.js → layers.BJkqxsDC.js} +1 -1
  37. package/dist/{layers.CqFgGsQ4.js → layers.BKvhj3Jc.js} +3 -3
  38. package/dist/{layers.CAs2-nlo.js → layers.BKyKCEyP.js} +24 -24
  39. package/dist/{layers.Co4l7_YV.js → layers.BPdavEfb.js} +1 -1
  40. package/dist/{layers.Cvc8xBfw.js → layers.BQjo-s-b.js} +4104 -4138
  41. package/dist/{layers.DYK2Cc2v.js → layers.BQy5VO07.js} +6 -6
  42. package/dist/{layers.Bb6_oKs8.js → layers.BSWJm3U8.js} +1 -1
  43. package/dist/{layers.CGra3CE8.js → layers.BWD2tONt.js} +2 -2
  44. package/dist/{layers.wby51kRL.js → layers.BaZ9oGNz.js} +4 -4
  45. package/dist/{layers.DjG7qFHf.js → layers.BatQCiGf.js} +11 -11
  46. package/dist/{layers.BEIgYyne.js → layers.BccLIbKe.js} +1 -1
  47. package/dist/{layers.yftdzODL.js → layers.BfWe9IcW.js} +1 -1
  48. package/dist/layers.Bg7BQcmt.js +31 -0
  49. package/dist/{layers.BmnporKE.js → layers.Bgd7myyy.js} +1 -1
  50. package/dist/{layers.B7VPVY9m.js → layers.BhvmN99n.js} +1 -1
  51. package/dist/{layers.j6LRzfso.js → layers.Bi4--lcT.js} +1 -1
  52. package/dist/{layers.DiA7fPFt.js → layers.Bj2_ntq3.js} +3 -3
  53. package/dist/{layers.bWZDlvmW.js → layers.Blhb8ubC.js} +1 -1
  54. package/dist/{layers.9PIBmdB5.js → layers.Bnjo7X5G.js} +31 -31
  55. package/dist/{layers.B5yZJBoB.js → layers.Bnozyuub.js} +1 -1
  56. package/dist/{layers.oXNzpBlK.js → layers.Bptrc7aE.js} +27 -27
  57. package/dist/{layers.jg--vRcI.js → layers.BrPGpTKD.js} +9895 -9802
  58. package/dist/{layers.BaMwv1jF.js → layers.Brsx_95a.js} +1 -1
  59. package/dist/{layers.BqnQzZ9x.js → layers.Bs8dWBby.js} +1 -1
  60. package/dist/{layers.BcfRIrYG.js → layers.Bsr7C4ON.js} +1 -1
  61. package/dist/{layers.bk9EcYJr.js → layers.BtXZCoH_.js} +39 -39
  62. package/dist/{layers.DVZjfzxM.js → layers.BtXqThYa.js} +1 -1
  63. package/dist/layers.Bwc-8Isq.js +6 -0
  64. package/dist/{layers.CgtkYIke.js → layers.Bx77WE5O.js} +1 -1
  65. package/dist/{layers.CmSiqz4U.js → layers.C-78wB0V.js} +3 -3
  66. package/dist/{layers.CuZ6oi1Y.js → layers.C1rqQip5.js} +1 -1
  67. package/dist/{layers.JKpsQUa8.js → layers.C3_GElaJ.js} +1 -1
  68. package/dist/{layers.CZzgBinT.js → layers.C53iq2Ma.js} +1 -1
  69. package/dist/{layers.ByyJrMEp.js → layers.C6LbKv-M.js} +2 -2
  70. package/dist/{layers.BUZ2pvws.js → layers.C6ueC3Z0.js} +1 -1
  71. package/dist/{layers.Cof8D_jH.js → layers.C71O9vAp.js} +1 -1
  72. package/dist/{layers.C2CWUW0P.js → layers.C7b_RmTv.js} +1 -1
  73. package/dist/{layers.C2pTMR38.js → layers.C8Tfd7sP.js} +1 -1
  74. package/dist/{layers.DuNmb6iV.js → layers.C8WbGo3j.js} +1 -1
  75. package/dist/{layers.BC7Cg5cy.js → layers.C9Lko7YH.js} +1 -1
  76. package/dist/{layers.NCy-p2UI.js → layers.CAFSzILX.js} +21 -21
  77. package/dist/layers.CCHvuvhF.js +8 -0
  78. package/dist/{layers.Bmw_ImFW.js → layers.CFAdy1gb.js} +1 -1
  79. package/dist/{layers.BxaGfbS4.js → layers.CFL3W3X8.js} +2 -2
  80. package/dist/{layers.fnoJpR74.js → layers.CFcETIOb.js} +1 -1
  81. package/dist/{layers.CbG7bPrw.js → layers.CIvcS__9.js} +1 -1
  82. package/dist/{layers.CLP8NLxE.js → layers.COTQMo6A.js} +1 -1
  83. package/dist/{layers.CtFiU_U-.js → layers.CQ7hsV-G.js} +1 -1
  84. package/dist/{layers.Db7WC46z.js → layers.CRRnsu0U.js} +1 -1
  85. package/dist/layers.CSJKF8Yc.js +1 -0
  86. package/dist/{layers.BkUV4peM.js → layers.CT2g1VRg.js} +1 -1
  87. package/dist/{layers.DgBtq91i.js → layers.CUGBlmw8.js} +1 -1
  88. package/dist/{layers.DhOjjk4e.js → layers.CUV2M_pU.js} +1 -1
  89. package/dist/{layers.CwiLAF0n.js → layers.CWkQixNL.js} +1 -1
  90. package/dist/{layers.CDc-JAN1.js → layers.CXsKBYuP.js} +1 -1
  91. package/dist/{layers.Cx21Vx7C.js → layers.CZVAUi9T.js} +1 -1
  92. package/dist/{layers.Cjk9bUrz.js → layers.CZWgMRsn.js} +1 -1
  93. package/dist/layers.Ca29Mcjy.js +1 -0
  94. package/dist/{layers.YdWr9xoX.js → layers.CacnnrTU.js} +1 -1
  95. package/dist/{layers.CO180qeA.js → layers.CbuDjZaw.js} +1 -1
  96. package/dist/{layers.0O_y_PSM.js → layers.CcwJpgwT.js} +4 -4
  97. package/dist/{layers.D-dncXMv.js → layers.CfUup9qJ.js} +1 -1
  98. package/dist/{layers.vEoVIWoQ.js → layers.CgjZSo5b.js} +1 -1
  99. package/dist/{layers.BjDSCoZM.js → layers.ChRuHm3l.js} +1 -1
  100. package/dist/{layers.DxQF7DU5.js → layers.Chpc9546.js} +1 -1
  101. package/dist/{layers.DLiv2kEf.js → layers.Ciq1sahM.js} +1 -1
  102. package/dist/{layers.B5a2e-Mn.js → layers.CkpDbJMJ.js} +1 -1
  103. package/dist/{layers.DqCVQnl5.js → layers.ClDrIPRU.js} +1 -1
  104. package/dist/{layers.CHqw81xe.js → layers.CmupXZHN.js} +1 -1
  105. package/dist/{layers.C7E3l-g_.js → layers.Cn8CWsBB.js} +2 -2
  106. package/dist/{layers.BDmaTCfD.js → layers.Cr0gsM_j.js} +6 -6
  107. package/dist/{layers.BVrMVvbD.js → layers.CrRPE221.js} +1 -1
  108. package/dist/{layers.DKpytb6w.js → layers.CsN1TpE_.js} +1 -1
  109. package/dist/{layers.DzgpLhqO.js → layers.CvePRtuZ.js} +1 -1
  110. package/dist/{layers.km8iRn1X.js → layers.CwAI9EMJ.js} +95 -95
  111. package/dist/{layers.D2bgGfrE.js → layers.CwLijGjy.js} +5 -5
  112. package/dist/{layers.CiDAyBeD.js → layers.CxcPHDlk.js} +1 -1
  113. package/dist/layers.CyJLYOzo.js +1 -0
  114. package/dist/{layers.rkrNrIQd.js → layers.CyqBb3la.js} +1 -1
  115. package/dist/layers.CzQlolTW.js +1 -0
  116. package/dist/{layers.BEdP6w5G.js → layers.CzSHWBJE.js} +1 -1
  117. package/dist/{layers.BDSMUwmt.js → layers.CztSiz59.js} +1 -1
  118. package/dist/{layers.CT3XTF81.js → layers.D1ALzL8l.js} +1 -1
  119. package/dist/{layers.9chn1oBm.js → layers.D1q9XEqC.js} +1 -1
  120. package/dist/{layers.CwazPZdq.js → layers.D2P7q6AR.js} +2 -2
  121. package/dist/{layers.DFxl_E74.js → layers.D37qejd1.js} +4 -4
  122. package/dist/{layers.XAmXrnxl.js → layers.D53pVbAt.js} +1 -1
  123. package/dist/layers.D5gltjTL.js +1163 -0
  124. package/dist/{layers.Bf3CS2lb.js → layers.D8s5zGyA.js} +4 -4
  125. package/dist/{layers.C_M8g-oV.js → layers.DBQznnML.js} +1 -1
  126. package/dist/layers.DGptlsw9.js +8 -0
  127. package/dist/{layers.B68ca-eU.js → layers.DIDIuUgi.js} +1 -1
  128. package/dist/{layers.D53HW-OH.js → layers.DIk_oySe.js} +1 -1
  129. package/dist/layers.DLBYO9Pf.js +7 -0
  130. package/dist/{layers.BuPdI71w.js → layers.DLaija6u.js} +1 -1
  131. package/dist/{layers.t9b6t4Ii.js → layers.DLsrdKEz.js} +1 -1
  132. package/dist/{layers.DG26Vzsi.js → layers.DLyk5obs.js} +3 -3
  133. package/dist/{layers.CcfiG8Od.js → layers.DNSrh1pA.js} +1 -1
  134. package/dist/{layers.CABrQ2Zs.js → layers.DO1gXiNA.js} +1 -1
  135. package/dist/layers.DOK4tUdd.js +90 -0
  136. package/dist/{layers.a0ekgaAk.js → layers.DP7UYubA.js} +1 -1
  137. package/dist/{layers.C5spre2i.js → layers.DPlTEtvi.js} +1 -1
  138. package/dist/{layers.BWWFQbUs.js → layers.DQUdAZyr.js} +25 -25
  139. package/dist/{layers.CldflZpf.js → layers.DRN4BpGT.js} +1 -1
  140. package/dist/{layers.BadeIJgG.js → layers.DRoyt9-1.js} +4 -4
  141. package/dist/{layers.DoceYQaZ.js → layers.DUrkRJKo.js} +1 -1
  142. package/dist/{layers.D5naed4X.js → layers.DX9VTWiX.js} +1 -1
  143. package/dist/{layers.D1OY3B-n.js → layers.DY8_UsFK.js} +137 -137
  144. package/dist/{layers.Bex3-2F0.js → layers.DZ-JaYP3.js} +7 -7
  145. package/dist/{layers.QSp10MBY.js → layers.DZDZ3CuA.js} +1 -1
  146. package/dist/{layers.DRNjIrAp.js → layers.DZZUeo4N.js} +1 -1
  147. package/dist/{layers.C9bqqwGA.js → layers.DZqU-iL6.js} +40 -40
  148. package/dist/{layers.jcCRaKGd.js → layers.DaHHbgHM.js} +1 -1
  149. package/dist/{layers.DDTNqkEk.js → layers.DaLjgos9.js} +1 -1
  150. package/dist/{layers.ClSS_-JK.js → layers.DbcVW57C.js} +1 -1
  151. package/dist/{layers.DQbonqH1.js → layers.DbdtbmtQ.js} +1 -1
  152. package/dist/{layers.DheygGyD.js → layers.DcxJ1-U9.js} +1 -1
  153. package/dist/layers.DeT0xAwz.js +84 -0
  154. package/dist/{layers.P39es0O4.js → layers.Df3tBKAI.js} +1 -1
  155. package/dist/{layers.nXKHyTlo.js → layers.DhUwAghN.js} +1 -1
  156. package/dist/{layers.DXbA6oVt.js → layers.Dj860md7.js} +1 -1
  157. package/dist/{layers.Cg-zHhDe.js → layers.DkYYvaOJ.js} +2 -2
  158. package/dist/{layers.BJrL0_Rw.js → layers.Dn4qgJFc.js} +2 -2
  159. package/dist/{layers.B0sQe5D1.js → layers.Dodjwwv6.js} +3 -3
  160. package/dist/{layers.DvlQFVL_.js → layers.DohiIE20.js} +1 -1
  161. package/dist/{layers.Czx1TgLO.js → layers.DpKYGJRZ.js} +2 -2
  162. package/dist/{layers.BfHX9frV.js → layers.DsWcmm1l.js} +1 -1
  163. package/dist/{layers.CMB0mF82.js → layers.DvSTgxkV.js} +1 -1
  164. package/dist/{layers.B465LyPz.js → layers.Dvv8fKKk.js} +1 -1
  165. package/dist/{layers.CsgsF5Ft.js → layers.DwPIhine.js} +1 -1
  166. package/dist/{layers.ia3f0EYv.js → layers.DwS8V2Or.js} +1 -1
  167. package/dist/{layers.BVQVuKjJ.js → layers.DxABmn5O.js} +1 -1
  168. package/dist/layers.Dxr2o7ON.js +1 -0
  169. package/dist/{layers.C53wglsE.js → layers.DyciwgGK.js} +1 -1
  170. package/dist/{layers.Dvt-Szfl.js → layers.F57MyVA9.js} +1 -1
  171. package/dist/{layers.CEaPCwCe.js → layers.FzqiVsy_.js} +1 -1
  172. package/dist/{layers.Cg39QOHR.js → layers.HEL5QDoC.js} +1 -1
  173. package/dist/{layers.BunhC82l.js → layers.HhdqZtv5.js} +1 -1
  174. package/dist/{layers.Dt-Xolan.js → layers.IutlLti9.js} +1 -1
  175. package/dist/{layers.DnSDu3aj.js → layers.JZ7AxwMh.js} +1 -1
  176. package/dist/{layers.g-cZDg-J.js → layers.LGDbkgsv.js} +42 -42
  177. package/dist/{layers.DhROyrvJ.js → layers.LtQ1yaSI.js} +1 -1
  178. package/dist/{layers.DUD000-v.js → layers.SM9QTuDI.js} +16 -16
  179. package/dist/{layers.B5HuEtfE.js → layers.U7NY32uM.js} +1 -1
  180. package/dist/{layers.Ce54L6_R.js → layers.U8mTjpv_.js} +1 -1
  181. package/dist/{layers.DJTqJuKz.js → layers.WQRYkQdm.js} +15 -15
  182. package/dist/{layers.xMjrkzgP.js → layers.XCBehSH1.js} +1 -1
  183. package/dist/{layers.Cw289Pgg.js → layers.ZbGNGWJD.js} +12 -12
  184. package/dist/{layers.C2izS29k.js → layers.Zmw0un-f.js} +1 -1
  185. package/dist/{layers.C9O_XgoY.js → layers.aLsmNBld.js} +3 -3
  186. package/dist/{layers.vXZEDgHQ.js → layers.avpB9JpP.js} +1 -1
  187. package/dist/{layers.Cc98lCPt.js → layers.cnMJlmUn.js} +1 -1
  188. package/dist/{layers.oNZW8UBG.js → layers.dL8A7U4Q.js} +1 -1
  189. package/dist/{layers.DmmEgUMf.js → layers.eYOpCcnf.js} +1 -1
  190. package/dist/{layers.VNPeSDc5.js → layers.ehSnv8t3.js} +1 -1
  191. package/dist/{layers.DvfttTXQ.js → layers.fpcqoFdd.js} +1 -1
  192. package/dist/{layers.CJzs0OdD.js → layers.gG-4BCod.js} +1 -1
  193. package/dist/{layers.DIYV_Qgp.js → layers.iJv3YGd2.js} +1 -1
  194. package/dist/{layers.BpL4mYVq.js → layers.iT9k4umn.js} +1 -1
  195. package/dist/{layers.CIMF-Kx_.js → layers.iXNkI0ZC.js} +1 -1
  196. package/dist/{layers.C7LxBBYp.js → layers.mlObVGIf.js} +5 -5
  197. package/dist/{layers.D_LcSG5Y.js → layers.oaAarQby.js} +1 -1
  198. package/dist/{layers.Du37x8v3.js → layers.oeHgntpN.js} +1 -1
  199. package/dist/{layers.CFLly-Qe.js → layers.pRgndjxw.js} +1 -1
  200. package/dist/{layers.Cyy4XziO.js → layers.tZA_LmJa.js} +1 -1
  201. package/dist/{layers.DQNE7pSr.js → layers.teIuFApS.js} +1 -1
  202. package/dist/{layers.DWpAFgGF.js → layers.trRvrSLF.js} +1 -1
  203. package/dist/{layers.C4W6rbDZ.js → layers.visFusIB.js} +2982 -4133
  204. package/dist/{layers.VPQgHqCC.js → layers.wOUIpHWS.js} +1 -1
  205. package/dist/{layers.0KslT0iv.js → layers.xFbuP3DI.js} +1 -1
  206. package/dist/{layers.CCQQxd5s.js → layers.xI6XwkCk.js} +1 -1
  207. package/dist/{layers.C7y7h6VM.js → layers.xLIBX5yr.js} +1 -1
  208. package/dist/{layers.AL_UvFa5.js → layers.y9CU_epE.js} +1 -1
  209. package/dist/{layers.CM1BoU1E.js → layers.ywa822S7.js} +1 -1
  210. package/dist/layers.z2kEcNVH.js +5 -0
  211. package/package.json +2 -1
  212. package/dist/layers.BX2zMMPD.js +0 -6
  213. package/dist/layers.DXT1JSUZ.js +0 -5
  214. package/dist/layers.Dele1d2B.js +0 -1
  215. package/dist/layers.DfHZkVTD.js +0 -1
  216. package/dist/layers.DrZOHzCc.js +0 -84
  217. package/dist/layers.OYg34Rse.js +0 -1
  218. package/dist/layers.SIpDBTUg.js +0 -96
  219. package/dist/layers.nIE5wUh9.js +0 -1
  220. package/dist/layers.rE1cepGv.js +0 -8
@@ -1,13 +1,13 @@
1
- import { jsx as n, jsxs as N, Fragment as H } from "react/jsx-runtime";
2
- import { useState as y, useCallback as C, useRef as Q, useEffect as P, useMemo as K, useContext as Ie } from "react";
3
- import { useTranslation as B } from "react-i18next";
4
- import { useLexicalComposerContext as V } from "@lexical/react/LexicalComposerContext";
5
- import { Menu as x, Flex as Z, Popover as A, Stack as He, Button as j, Box as Be, LoadingOverlay as Ve } from "@mantine/core";
6
- import { $getNodeByKey as E, COMMAND_PRIORITY_LOW as Ge, $setSelection as Xe } from "lexical";
7
- import { y as Ye, z as Ze, B as qe, D as Je, F as he, G as J, J as Qe, L as Ke, A as ee, K as et, P as tt, H as U, Q as Ce, n as De, S as Le, U as Ne, V as S, N as Oe, W as ot, X as nt, q as we, Y as it, C as Pe, Z as at, _ as rt, a0 as q, a1 as lt, a2 as st, a3 as dt, a4 as ct, a5 as ut, a6 as pt, R as mt, m as be, O as gt, k as ke, a7 as ve, o as ft } from "./layers.jg--vRcI.js";
8
- import { AttachmentsGalleryModal as Te, showErrorNotification as ht } from "@layers-app/shared";
9
- import { useLexicalEditable as te } from "@lexical/react/useLexicalEditable";
10
- import { useDisclosure as $ } from "@mantine/hooks";
1
+ import { jsx as n, jsxs as O, Fragment as B } from "react/jsx-runtime";
2
+ import { useState as y, useCallback as D, useRef as ee, useEffect as E, useMemo as te, useContext as Ce } from "react";
3
+ import { useTranslation as V } from "react-i18next";
4
+ import { useLexicalComposerContext as G } from "@lexical/react/LexicalComposerContext";
5
+ import { Menu as R, Flex as J, Popover as W, Stack as Ve, Button as $, Box as Ge, LoadingOverlay as Xe } from "@mantine/core";
6
+ import { $getNodeByKey as x, COMMAND_PRIORITY_LOW as Ye, $setSelection as Ze } from "lexical";
7
+ import { y as qe, z as Je, B as Qe, D as Ke, F as we, G as K, J as et, L as tt, A as oe, K as ot, P as nt, H as M, Q as De, n as Le, S as Oe, U as Ne, V as T, N as Ee, W as it, X as at, q as be, Y as rt, C as Pe, Z as lt, _ as st, a0 as Q, a1 as dt, a2 as ct, a3 as ut, a4 as pt, a5 as mt, a6 as gt, R as ft, m as ve, O as ht, k as ke, a7 as ye, o as wt } from "./layers.BrPGpTKD.js";
8
+ import { AttachmentsGalleryModal as xe, showErrorNotification as bt } from "@layers-app/shared";
9
+ import { useLexicalEditable as ne } from "@lexical/react/useLexicalEditable";
10
+ import { useDisclosure as H } from "@mantine/hooks";
11
11
  import "@lexical/react/LexicalDecoratorBlockNode";
12
12
  import "@lexical/utils";
13
13
  import "@lexical/mark";
@@ -17,51 +17,51 @@ import "react-dom";
17
17
  import "@lexical/react/LexicalErrorBoundary";
18
18
  import "@lexical/react/LexicalBlockWithAlignableContents";
19
19
  import "@mantine/notifications";
20
- function wt(e, i) {
21
- const t = document.createElement("a");
22
- t.href = e, t.download = i, t.rel = "noopener", document.body.appendChild(t), t.click(), t.remove();
20
+ function vt(e, i) {
21
+ const o = document.createElement("a");
22
+ o.href = e, o.download = i, o.rel = "noopener", document.body.appendChild(o), o.click(), o.remove();
23
23
  }
24
- function oe(e) {
24
+ function ie(e) {
25
25
  try {
26
- const t = new URL(e, window.location.origin).pathname.split("/").pop() || "image";
27
- return t.includes(".") ? t : `${t}.png`;
26
+ const o = new URL(e, window.location.origin).pathname.split("/").pop() || "image";
27
+ return o.includes(".") ? o : `${o}.png`;
28
28
  } catch {
29
29
  return "image";
30
30
  }
31
31
  }
32
- async function ne(e, i) {
33
- const t = await fetch(e);
34
- if (!t.ok)
32
+ async function ae(e, i) {
33
+ const o = await fetch(e);
34
+ if (!o.ok)
35
35
  throw new Error("fetch failed");
36
- const a = await t.blob(), r = URL.createObjectURL(a);
36
+ const a = await o.blob(), r = URL.createObjectURL(a);
37
37
  try {
38
- wt(r, i);
38
+ vt(r, i);
39
39
  } finally {
40
40
  setTimeout(() => URL.revokeObjectURL(r), 0);
41
41
  }
42
42
  }
43
- function bt({
43
+ function kt({
44
44
  editor: e,
45
45
  nodeKey: i,
46
- href: t,
46
+ href: o,
47
47
  onClose: a
48
48
  }) {
49
49
  const [r, s] = y(
50
- () => Ye(t)
51
- ), [l, d] = y(() => Ze(t)), [I, b] = y(!1), p = C((c) => {
50
+ () => qe(o)
51
+ ), [l, d] = y(() => Je(o)), [I, b] = y(!1), m = D((c) => {
52
52
  s(c), b(!1);
53
- }, []), m = C((c) => {
53
+ }, []), g = D((c) => {
54
54
  d(c), b(!1);
55
- }, []), h = C(() => {
56
- const c = qe(l.trim(), r);
57
- if (!c || !Je(c, r)) {
55
+ }, []), h = D(() => {
56
+ const c = Qe(l.trim(), r);
57
+ if (!c || !Ke(c, r)) {
58
58
  b(!0);
59
59
  return;
60
60
  }
61
- he(e, i, J(c)), a();
62
- }, [e, i, l, r, a]), v = C(() => {
63
- he(e, i, ""), a();
64
- }, [e, i, a]), k = C(
61
+ we(e, i, K(c)), a();
62
+ }, [e, i, l, r, a]), k = D(() => {
63
+ we(e, i, ""), a();
64
+ }, [e, i, a]), v = D(
65
65
  (c) => {
66
66
  c.key === "Enter" ? (c.preventDefault(), h()) : c.key === "Escape" && (c.preventDefault(), a());
67
67
  },
@@ -71,26 +71,26 @@ function bt({
71
71
  linkType: r,
72
72
  linkUrl: l,
73
73
  error: I,
74
- onLinkTypeChange: p,
75
- onUrlInputChange: m,
76
- onUrlInputKeyDown: k,
74
+ onLinkTypeChange: m,
75
+ onUrlInputChange: g,
76
+ onUrlInputKeyDown: v,
77
77
  onSave: h,
78
- onRemove: v
78
+ onRemove: k
79
79
  };
80
80
  }
81
- function ie({
81
+ function re({
82
82
  editor: e,
83
83
  nodeKey: i,
84
- href: t,
84
+ href: o,
85
85
  onClose: a,
86
86
  mobile: r
87
87
  }) {
88
- const s = Q(null), l = bt({ editor: e, nodeKey: i, href: t, onClose: a });
89
- return P(() => {
88
+ const s = ee(null), l = kt({ editor: e, nodeKey: i, href: o, onClose: a });
89
+ return E(() => {
90
90
  var d;
91
91
  (d = s.current) == null || d.focus({ preventScroll: !0 });
92
92
  }, []), /* @__PURE__ */ n(
93
- Qe,
93
+ et,
94
94
  {
95
95
  inputRef: s,
96
96
  linkUrl: l.linkUrl,
@@ -102,42 +102,42 @@ function ie({
102
102
  onUrlInputKeyDown: l.onUrlInputKeyDown,
103
103
  onCancel: a,
104
104
  onSave: l.onSave,
105
- onRemove: t ? l.onRemove : void 0
105
+ onRemove: o ? l.onRemove : void 0
106
106
  }
107
107
  );
108
108
  }
109
- function Ee({
109
+ function Te({
110
110
  opened: e,
111
111
  onOpenChange: i,
112
- t,
112
+ t: o,
113
113
  onDownload: a,
114
114
  onDelete: r,
115
115
  hasLink: s,
116
116
  onLinkAction: l
117
117
  }) {
118
- return /* @__PURE__ */ N(
119
- x,
118
+ return /* @__PURE__ */ O(
119
+ R,
120
120
  {
121
121
  opened: e,
122
122
  onChange: i,
123
- transitionProps: Ke,
123
+ transitionProps: tt,
124
124
  shadow: "md",
125
125
  position: "bottom-start",
126
126
  offset: 4,
127
127
  withinPortal: !0,
128
128
  closeOnItemClick: !0,
129
129
  children: [
130
- /* @__PURE__ */ n(x.Target, { children: /* @__PURE__ */ n(
131
- ee,
130
+ /* @__PURE__ */ n(R.Target, { children: /* @__PURE__ */ n(
131
+ oe,
132
132
  {
133
- label: t("editor.toolbar.more"),
134
- icon: et,
133
+ label: o("editor.toolbar.more"),
134
+ icon: ot,
135
135
  iconColor: "var(--mantine-color-gray-text)",
136
- "aria-label": t("editor.toolbar.more")
136
+ "aria-label": o("editor.toolbar.more")
137
137
  }
138
138
  ) }),
139
- /* @__PURE__ */ N(
140
- x.Dropdown,
139
+ /* @__PURE__ */ O(
140
+ R.Dropdown,
141
141
  {
142
142
  p: 4,
143
143
  miw: 164,
@@ -145,34 +145,34 @@ function Ee({
145
145
  onMouseDown: (d) => d.preventDefault(),
146
146
  children: [
147
147
  l && /* @__PURE__ */ n(
148
- x.Item,
148
+ R.Item,
149
149
  {
150
- leftSection: /* @__PURE__ */ n(Z, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(tt, { name: "link", size: 16 }) }),
150
+ leftSection: /* @__PURE__ */ n(J, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(nt, { name: "link", size: 16 }) }),
151
151
  onClick: (d) => {
152
152
  d.stopPropagation(), l();
153
153
  },
154
- children: t(s ? "editor.link.editLink" : "editor.link.addLink")
154
+ children: o(s ? "editor.link.editLink" : "editor.link.addLink")
155
155
  }
156
156
  ),
157
157
  /* @__PURE__ */ n(
158
- x.Item,
158
+ R.Item,
159
159
  {
160
- leftSection: /* @__PURE__ */ n(Z, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(U, { icon: Ce, size: 16 }) }),
160
+ leftSection: /* @__PURE__ */ n(J, { align: "center", justify: "center", c: "gray.6", children: /* @__PURE__ */ n(M, { icon: De, size: 16 }) }),
161
161
  onClick: (d) => {
162
162
  d.stopPropagation(), a();
163
163
  },
164
- children: t("editor.gallery.download")
164
+ children: o("editor.gallery.download")
165
165
  }
166
166
  ),
167
167
  /* @__PURE__ */ n(
168
- x.Item,
168
+ R.Item,
169
169
  {
170
170
  color: "red",
171
- leftSection: /* @__PURE__ */ n(Z, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(U, { icon: De, size: 16 }) }),
171
+ leftSection: /* @__PURE__ */ n(J, { align: "center", justify: "center", c: "red.6", children: /* @__PURE__ */ n(M, { icon: Le, size: 16 }) }),
172
172
  onClick: (d) => {
173
173
  d.stopPropagation(), r();
174
174
  },
175
- children: t("editor.contextMenu.delete")
175
+ children: o("editor.contextMenu.delete")
176
176
  }
177
177
  )
178
178
  ]
@@ -185,10 +185,10 @@ function Ee({
185
185
  const Se = ({
186
186
  t: e,
187
187
  src: i,
188
- setShown: t,
188
+ setShown: o,
189
189
  id: a
190
190
  }) => {
191
- const [r, { open: s, close: l }] = $(!1), d = Le(), I = K(() => [
191
+ const [r, { open: s, close: l }] = H(!1), d = Oe(), I = te(() => [
192
192
  {
193
193
  id: !a || a === "0" ? "" : a,
194
194
  Url: i ?? "",
@@ -208,62 +208,62 @@ const Se = ({
208
208
  deletedAt: /* @__PURE__ */ new Date()
209
209
  }
210
210
  ], [i, a]);
211
- return /* @__PURE__ */ N(H, { children: [
211
+ return /* @__PURE__ */ O(B, { children: [
212
212
  /* @__PURE__ */ n(
213
- Te,
213
+ xe,
214
214
  {
215
215
  opened: r,
216
- onOpenChange: (p) => {
217
- p ? s() : l();
216
+ onOpenChange: (m) => {
217
+ m ? s() : l();
218
218
  },
219
219
  attachments: I,
220
220
  allowDownload: d
221
221
  }
222
222
  ),
223
223
  /* @__PURE__ */ n(
224
- ee,
224
+ oe,
225
225
  {
226
226
  label: e("editor.image.preview"),
227
227
  icon: Ne,
228
228
  iconColor: "var(--mantine-color-gray-text)",
229
229
  "aria-label": e("editor.image.preview"),
230
230
  onClick: () => {
231
- t(!1), s();
231
+ o(!1), s();
232
232
  }
233
233
  }
234
234
  )
235
235
  ] });
236
- }, kt = ({
236
+ }, yt = ({
237
237
  nodeKey: e,
238
238
  src: i,
239
- href: t
239
+ href: o
240
240
  }) => {
241
- const [a] = V(), r = te(), [s, l] = y(!1), [d, I] = y(!1), [b, p] = y(!1), { t: m } = B();
242
- P(() => {
241
+ const [a] = G(), r = ne(), [s, l] = y(!1), [d, I] = y(!1), [b, m] = y(!1), { t: g } = V();
242
+ E(() => {
243
243
  if (!b) return;
244
- const k = (c) => {
244
+ const v = (c) => {
245
245
  const w = c.target;
246
- w != null && w.closest(".floating-link-dropdown") || w != null && w.closest(".floating-link-type-combobox-dropdown") || p(!1);
246
+ w != null && w.closest(".floating-link-dropdown") || w != null && w.closest(".floating-link-type-combobox-dropdown") || m(!1);
247
247
  };
248
- return document.addEventListener("pointerdown", k, !0), () => document.removeEventListener("pointerdown", k, !0);
248
+ return document.addEventListener("pointerdown", v, !0), () => document.removeEventListener("pointerdown", v, !0);
249
249
  }, [b]);
250
- const h = C(() => {
250
+ const h = D(() => {
251
251
  a.update(() => {
252
- const k = E(e);
253
- S(k) && k.remove();
252
+ const v = x(e);
253
+ T(v) && v.remove();
254
254
  });
255
- }, [a, e]), v = C(async () => {
255
+ }, [a, e]), k = D(async () => {
256
256
  if (i)
257
257
  try {
258
- await ne(i, oe(i));
258
+ await ae(i, ie(i));
259
259
  } catch {
260
260
  }
261
261
  }, [i]);
262
- return /* @__PURE__ */ N(
263
- A,
262
+ return /* @__PURE__ */ O(
263
+ W,
264
264
  {
265
265
  opened: b,
266
- onChange: p,
266
+ onChange: m,
267
267
  position: "bottom-end",
268
268
  offset: 4,
269
269
  shadow: "md",
@@ -271,20 +271,20 @@ const Se = ({
271
271
  withinPortal: !0,
272
272
  closeOnClickOutside: !1,
273
273
  children: [
274
- /* @__PURE__ */ n(A.Target, { children: /* @__PURE__ */ N(
274
+ /* @__PURE__ */ n(W.Target, { children: /* @__PURE__ */ O(
275
275
  "div",
276
276
  {
277
277
  className: `media-actions ${r ? "" : "media-actions--readonly"}`,
278
278
  children: [
279
- /* @__PURE__ */ n(Se, { t: m, src: i, setShown: () => {
279
+ /* @__PURE__ */ n(Se, { t: g, src: i, setShown: () => {
280
280
  } }),
281
- r && /* @__PURE__ */ N(H, { children: [
281
+ r && /* @__PURE__ */ O(B, { children: [
282
282
  /* @__PURE__ */ n(
283
- Oe,
283
+ Ee,
284
284
  {
285
285
  opened: s,
286
286
  setOpened: l,
287
- t: m,
287
+ t: g,
288
288
  editor: a,
289
289
  nodeKey: e,
290
290
  setShown: () => {
@@ -292,15 +292,15 @@ const Se = ({
292
292
  }
293
293
  ),
294
294
  /* @__PURE__ */ n(
295
- Ee,
295
+ Te,
296
296
  {
297
297
  opened: d,
298
298
  onOpenChange: I,
299
- t: m,
300
- onDownload: () => void v(),
299
+ t: g,
300
+ onDownload: () => void k(),
301
301
  onDelete: h,
302
- hasLink: !!t,
303
- onLinkAction: () => p(!0)
302
+ hasLink: !!o,
303
+ onLinkAction: () => m(!0)
304
304
  }
305
305
  )
306
306
  ] })
@@ -308,17 +308,17 @@ const Se = ({
308
308
  }
309
309
  ) }),
310
310
  /* @__PURE__ */ n(
311
- A.Dropdown,
311
+ W.Dropdown,
312
312
  {
313
- className: `floating-link-dropdown floating-link-dropdown--${t ? "edit" : "create"}-mode`,
313
+ className: `floating-link-dropdown floating-link-dropdown--${o ? "edit" : "create"}-mode`,
314
314
  "data-test-id": "floating-link-dropdown",
315
315
  children: /* @__PURE__ */ n(
316
- ie,
316
+ re,
317
317
  {
318
318
  editor: a,
319
319
  nodeKey: e,
320
- href: t,
321
- onClose: () => p(!1)
320
+ href: o,
321
+ onClose: () => m(!1)
322
322
  }
323
323
  )
324
324
  }
@@ -326,36 +326,36 @@ const Se = ({
326
326
  ]
327
327
  }
328
328
  );
329
- }, vt = () => {
329
+ }, It = () => {
330
330
  };
331
- function yt({ nodeKey: e, src: i, id: t, href: a }) {
332
- const { t: r } = B(), [s] = V(), l = te(), [d, I] = y(!1), [b, p] = y(!1), [m, h] = y(!1);
333
- P(() => {
334
- if (!m) return;
331
+ function Ct({ nodeKey: e, src: i, id: o, href: a }) {
332
+ const { t: r } = V(), [s] = G(), l = ne(), [d, I] = y(!1), [b, m] = y(!1), [g, h] = y(!1);
333
+ E(() => {
334
+ if (!g) return;
335
335
  const c = (w) => {
336
336
  const u = w.target;
337
337
  u != null && u.closest(".floating-link-dropdown") || u != null && u.closest(".floating-link-type-combobox-dropdown") || h(!1);
338
338
  };
339
339
  return document.addEventListener("pointerdown", c, !0), () => document.removeEventListener("pointerdown", c, !0);
340
- }, [m]);
341
- const v = C(() => {
342
- p(!1), s.update(() => {
343
- const c = E(e);
344
- if (!S(c)) return;
340
+ }, [g]);
341
+ const k = D(() => {
342
+ m(!1), s.update(() => {
343
+ const c = x(e);
344
+ if (!T(c)) return;
345
345
  const w = c.getParent();
346
- ot(w) ? w.remove() : c.remove();
346
+ it(w) ? w.remove() : c.remove();
347
347
  });
348
- }, [s, e]), k = C(async () => {
348
+ }, [s, e]), v = D(async () => {
349
349
  if (i)
350
350
  try {
351
- await ne(i, oe(i));
351
+ await ae(i, ie(i));
352
352
  } catch {
353
353
  }
354
354
  }, [i]);
355
- return /* @__PURE__ */ N(
356
- A,
355
+ return /* @__PURE__ */ O(
356
+ W,
357
357
  {
358
- opened: m,
358
+ opened: g,
359
359
  onChange: h,
360
360
  position: "bottom-end",
361
361
  offset: 4,
@@ -364,7 +364,7 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
364
364
  withinPortal: !0,
365
365
  closeOnClickOutside: !1,
366
366
  children: [
367
- /* @__PURE__ */ n(A.Target, { children: /* @__PURE__ */ N(
367
+ /* @__PURE__ */ n(W.Target, { children: /* @__PURE__ */ O(
368
368
  "div",
369
369
  {
370
370
  className: "media-actions visible",
@@ -379,10 +379,10 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
379
379
  },
380
380
  onClick: (c) => c.stopPropagation(),
381
381
  children: [
382
- /* @__PURE__ */ n(Se, { t: r, src: i, setShown: vt, id: t }),
383
- l && /* @__PURE__ */ N(H, { children: [
382
+ /* @__PURE__ */ n(Se, { t: r, src: i, setShown: It, id: o }),
383
+ l && /* @__PURE__ */ O(B, { children: [
384
384
  /* @__PURE__ */ n(
385
- Oe,
385
+ Ee,
386
386
  {
387
387
  opened: d,
388
388
  setOpened: I,
@@ -392,13 +392,13 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
392
392
  }
393
393
  ),
394
394
  /* @__PURE__ */ n(
395
- Ee,
395
+ Te,
396
396
  {
397
397
  opened: b,
398
- onOpenChange: p,
398
+ onOpenChange: m,
399
399
  t: r,
400
- onDownload: () => void k(),
401
- onDelete: v,
400
+ onDownload: () => void v(),
401
+ onDelete: k,
402
402
  hasLink: !!a,
403
403
  onLinkAction: () => h(!0)
404
404
  }
@@ -408,12 +408,12 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
408
408
  }
409
409
  ) }),
410
410
  /* @__PURE__ */ n(
411
- A.Dropdown,
411
+ W.Dropdown,
412
412
  {
413
413
  className: `floating-link-dropdown floating-link-dropdown--${a ? "edit" : "create"}-mode`,
414
414
  "data-test-id": "floating-link-dropdown",
415
415
  children: /* @__PURE__ */ n(
416
- ie,
416
+ re,
417
417
  {
418
418
  editor: s,
419
419
  nodeKey: e,
@@ -427,13 +427,13 @@ function yt({ nodeKey: e, src: i, id: t, href: a }) {
427
427
  }
428
428
  );
429
429
  }
430
- function It({ nodeKey: e, src: i, id: t, href: a }) {
431
- const { t: r } = B(), [s] = V(), l = te(), d = Le(), [I, { open: b, close: p }] = $(!1), [m, { open: h, close: v }] = $(!1), [k, { open: c, close: w }] = $(!1), u = () => {
432
- p(), c();
433
- }, T = K(
430
+ function Dt({ nodeKey: e, src: i, id: o, href: a }) {
431
+ const { t: r } = V(), [s] = G(), l = ne(), d = Oe(), [I, { open: b, close: m }] = H(!1), [g, { open: h, close: k }] = H(!1), [v, { open: c, close: w }] = H(!1), u = () => {
432
+ m(), c();
433
+ }, P = te(
434
434
  () => [
435
435
  {
436
- id: !t || t === "0" ? "" : t,
436
+ id: !o || o === "0" ? "" : o,
437
437
  Url: i ?? "",
438
438
  contentType: "image/*",
439
439
  originalFileName: "",
@@ -451,22 +451,22 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
451
451
  deletedAt: /* @__PURE__ */ new Date()
452
452
  }
453
453
  ],
454
- [i, t]
455
- ), R = () => {
456
- p(), h();
457
- }, L = C(async () => {
458
- if (p(), !!i)
454
+ [i, o]
455
+ ), S = () => {
456
+ m(), h();
457
+ }, L = D(async () => {
458
+ if (m(), !!i)
459
459
  try {
460
- await ne(i, oe(i));
460
+ await ae(i, ie(i));
461
461
  } catch {
462
462
  }
463
- }, [i, p]), M = C(() => {
464
- p(), s.update(() => {
465
- const O = E(e);
466
- S(O) && O.remove();
463
+ }, [i, m]), U = D(() => {
464
+ m(), s.update(() => {
465
+ const N = x(e);
466
+ T(N) && N.remove();
467
467
  });
468
- }, [s, e, p]);
469
- return /* @__PURE__ */ N(H, { children: [
468
+ }, [s, e, m]);
469
+ return /* @__PURE__ */ O(B, { children: [
470
470
  /* @__PURE__ */ n(
471
471
  "div",
472
472
  {
@@ -478,12 +478,12 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
478
478
  zIndex: 10,
479
479
  pointerEvents: "auto"
480
480
  },
481
- onClick: (O) => O.stopPropagation(),
481
+ onClick: (N) => N.stopPropagation(),
482
482
  children: /* @__PURE__ */ n(
483
- ee,
483
+ oe,
484
484
  {
485
485
  label: r("editor.toolbar.more"),
486
- icon: nt,
486
+ icon: at,
487
487
  iconColor: "var(--mantine-color-gray-text)",
488
488
  "aria-label": r("editor.toolbar.more"),
489
489
  onClick: b
@@ -492,23 +492,23 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
492
492
  }
493
493
  ),
494
494
  /* @__PURE__ */ n(
495
- Te,
495
+ xe,
496
496
  {
497
- opened: m,
498
- onOpenChange: (O) => O ? h() : v(),
499
- attachments: T,
497
+ opened: g,
498
+ onOpenChange: (N) => N ? h() : k(),
499
+ attachments: P,
500
500
  allowDownload: d
501
501
  }
502
502
  ),
503
503
  /* @__PURE__ */ n(
504
- we,
504
+ be,
505
505
  {
506
506
  opened: I,
507
- onClose: p,
507
+ onClose: m,
508
508
  title: r("editor.image.mobileActions"),
509
- children: /* @__PURE__ */ N(He, { gap: 4, p: 0, children: [
509
+ children: /* @__PURE__ */ O(Ve, { gap: 4, p: 0, children: [
510
510
  /* @__PURE__ */ n(
511
- j,
511
+ $,
512
512
  {
513
513
  type: "button",
514
514
  variant: "subtle",
@@ -516,9 +516,9 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
516
516
  fullWidth: !0,
517
517
  justify: "flex-start",
518
518
  bg: "var(--editor-action-bg)",
519
- onClick: R,
519
+ onClick: S,
520
520
  leftSection: /* @__PURE__ */ n(
521
- U,
521
+ M,
522
522
  {
523
523
  icon: Ne,
524
524
  size: 16,
@@ -529,7 +529,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
529
529
  }
530
530
  ),
531
531
  l && /* @__PURE__ */ n(
532
- j,
532
+ $,
533
533
  {
534
534
  type: "button",
535
535
  variant: "subtle",
@@ -539,9 +539,9 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
539
539
  bg: "var(--editor-action-bg)",
540
540
  onClick: u,
541
541
  leftSection: /* @__PURE__ */ n(
542
- U,
542
+ M,
543
543
  {
544
- icon: it,
544
+ icon: rt,
545
545
  size: 16,
546
546
  color: "var(--mantine-color-dimmed)"
547
547
  }
@@ -550,7 +550,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
550
550
  }
551
551
  ),
552
552
  d && /* @__PURE__ */ n(
553
- j,
553
+ $,
554
554
  {
555
555
  type: "button",
556
556
  variant: "subtle",
@@ -560,9 +560,9 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
560
560
  bg: "var(--editor-action-bg)",
561
561
  onClick: () => void L(),
562
562
  leftSection: /* @__PURE__ */ n(
563
- U,
563
+ M,
564
564
  {
565
- icon: Ce,
565
+ icon: De,
566
566
  size: 16,
567
567
  color: "var(--mantine-color-dimmed)"
568
568
  }
@@ -571,7 +571,7 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
571
571
  }
572
572
  ),
573
573
  l && /* @__PURE__ */ n(
574
- j,
574
+ $,
575
575
  {
576
576
  type: "button",
577
577
  variant: "subtle",
@@ -579,11 +579,11 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
579
579
  fullWidth: !0,
580
580
  justify: "flex-start",
581
581
  bg: "var(--editor-action-bg)",
582
- onClick: M,
582
+ onClick: U,
583
583
  leftSection: /* @__PURE__ */ n(
584
- U,
584
+ M,
585
585
  {
586
- icon: De,
586
+ icon: Le,
587
587
  size: 16,
588
588
  color: "var(--mantine-color-red-6)"
589
589
  }
@@ -595,13 +595,13 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
595
595
  }
596
596
  ),
597
597
  /* @__PURE__ */ n(
598
- we,
598
+ be,
599
599
  {
600
- opened: k,
600
+ opened: v,
601
601
  onClose: w,
602
602
  title: r(a ? "editor.link.editLink" : "editor.link.addLink"),
603
603
  children: /* @__PURE__ */ n(
604
- ie,
604
+ re,
605
605
  {
606
606
  editor: s,
607
607
  nodeKey: e,
@@ -614,10 +614,10 @@ function It({ nodeKey: e, src: i, id: t, href: a }) {
614
614
  )
615
615
  ] });
616
616
  }
617
- const ye = (e) => {
617
+ const Ie = (e) => {
618
618
  const {
619
619
  width: i,
620
- height: t,
620
+ height: o,
621
621
  isLoading: a,
622
622
  isError: r,
623
623
  src: s,
@@ -625,24 +625,24 @@ const ye = (e) => {
625
625
  altText: d,
626
626
  imageRef: I,
627
627
  maxWidth: b,
628
- aspectRatio: p,
629
- href: m
630
- } = e, h = Q(null);
631
- return /* @__PURE__ */ N(
628
+ aspectRatio: m,
629
+ href: g
630
+ } = e, h = ee(null);
631
+ return /* @__PURE__ */ O(
632
632
  "div",
633
633
  {
634
634
  className: "media-wrapper",
635
- "data-reserved-box": p ? "" : void 0,
635
+ "data-reserved-box": m ? "" : void 0,
636
636
  style: {
637
637
  width: i,
638
- height: p ? "auto" : t,
639
- aspectRatio: p || void 0,
638
+ height: m ? "auto" : o,
639
+ aspectRatio: m || void 0,
640
640
  display: "inline-flex",
641
641
  position: "relative"
642
642
  },
643
643
  children: [
644
644
  /* @__PURE__ */ n(
645
- Ve,
645
+ Xe,
646
646
  {
647
647
  visible: a,
648
648
  zIndex: 1e3,
@@ -654,21 +654,21 @@ const ye = (e) => {
654
654
  "a",
655
655
  {
656
656
  className: "editor-image-link",
657
- "data-link": m ? "true" : void 0,
658
- "data-href": m ? J(m) : void 0,
659
- role: m ? "link" : void 0,
660
- rel: m ? "noopener noreferrer" : void 0,
657
+ "data-link": g ? "true" : void 0,
658
+ "data-href": g ? K(g) : void 0,
659
+ role: g ? "link" : void 0,
660
+ rel: g ? "noopener noreferrer" : void 0,
661
661
  draggable: !1,
662
- onMouseDown: m ? (v) => {
663
- h.current = { x: v.clientX, y: v.clientY };
662
+ onMouseDown: g ? (k) => {
663
+ h.current = { x: k.clientX, y: k.clientY };
664
664
  } : void 0,
665
- onClick: m ? (v) => {
666
- v.preventDefault();
667
- const k = h.current;
668
- h.current = null, !(k && Math.hypot(v.clientX - k.x, v.clientY - k.y) > 5) && window.open(J(m), "_blank", "noopener,noreferrer");
665
+ onClick: g ? (k) => {
666
+ k.preventDefault();
667
+ const v = h.current;
668
+ h.current = null, !(v && Math.hypot(k.clientX - v.x, k.clientY - v.y) > 5) && window.open(K(g), "_blank", "noopener,noreferrer");
669
669
  } : void 0,
670
670
  children: /* @__PURE__ */ n(
671
- Ct,
671
+ Lt,
672
672
  {
673
673
  className: null,
674
674
  src: s,
@@ -683,32 +683,32 @@ const ye = (e) => {
683
683
  }
684
684
  ),
685
685
  ke && /* @__PURE__ */ n(
686
- It,
686
+ Dt,
687
687
  {
688
688
  nodeKey: e.nodeKey,
689
689
  src: s,
690
690
  id: l,
691
- href: m
691
+ href: g
692
692
  }
693
693
  ),
694
- ve && /* @__PURE__ */ n(
695
- yt,
694
+ ye && /* @__PURE__ */ n(
695
+ Ct,
696
696
  {
697
697
  nodeKey: e.nodeKey,
698
698
  src: s,
699
699
  id: l,
700
- href: m
700
+ href: g
701
701
  }
702
702
  ),
703
- ft && !ke && !ve && /* @__PURE__ */ n(kt, { nodeKey: e.nodeKey, src: s, href: m })
703
+ wt && !ke && !ye && /* @__PURE__ */ n(yt, { nodeKey: e.nodeKey, src: s, href: g })
704
704
  ]
705
705
  }
706
706
  );
707
707
  };
708
- function Ct({
708
+ function Lt({
709
709
  altText: e,
710
710
  className: i,
711
- imageRef: t,
711
+ imageRef: o,
712
712
  src: a,
713
713
  width: r,
714
714
  height: s,
@@ -722,7 +722,7 @@ function Ct({
722
722
  className: `${i || void 0} ${I ? "" : "loading"}`,
723
723
  src: a,
724
724
  alt: e,
725
- ref: t,
725
+ ref: o,
726
726
  style: {
727
727
  height: s,
728
728
  maxWidth: l,
@@ -738,14 +738,14 @@ function Ct({
738
738
  }
739
739
  );
740
740
  }
741
- function Xt(e) {
742
- const { disable: i } = Ie(Pe);
743
- return i && at.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(Dt, { ...e });
741
+ function Zt(e) {
742
+ const { disable: i } = Ce(Pe);
743
+ return i && lt.isPlaceholderSrc(e.src) ? null : /* @__PURE__ */ n(Ot, { ...e });
744
744
  }
745
- function Dt({
745
+ function Ot({
746
746
  src: e,
747
747
  altText: i,
748
- nodeKey: t,
748
+ nodeKey: o,
749
749
  width: a,
750
750
  height: r,
751
751
  maxWidth: s,
@@ -753,248 +753,267 @@ function Dt({
753
753
  caption: d,
754
754
  id: I,
755
755
  create: b,
756
- alignment: p,
757
- imagePickerTab: m,
756
+ alignment: m,
757
+ imagePickerTab: g,
758
758
  aspectRatio: h,
759
- href: v
759
+ href: k
760
760
  }) {
761
761
  var ge, fe;
762
- const k = Q(null), [c, w] = y(!0), [u] = V(), [T, R] = y(!0), [L, M] = y({
762
+ const v = ee(null), [c, w] = y(!0), [u] = G(), [P, S] = y(!0), [L, U] = y({
763
763
  width: 0,
764
764
  height: 0
765
- }), { start: O } = rt(), [Lt, G] = y(0), {
765
+ }), { start: N } = st(), [Nt, X] = y(0), {
766
766
  fetchUploadMedia: z,
767
- fetchDeleteMedia: ae,
768
- maxFileSize: Nt,
769
- imperativeHandleRef: W,
770
- disable: xe
771
- } = Ie(Pe), _ = q.has(e) && (((ge = q.get(e)) == null ? void 0 : ge.mediaNodeKeys.length) === 0 || ((fe = q.get(e)) == null ? void 0 : fe.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: F } = B(), re = (o) => {
772
- if (typeof o == "number") return o > 0 ? o : null;
773
- if (typeof o == "string" && !o.includes("%")) {
774
- const g = parseFloat(o);
775
- return Number.isFinite(g) && g > 0 ? g : null;
767
+ fetchDeleteMedia: le,
768
+ maxFileSize: Et,
769
+ imperativeHandleRef: F,
770
+ disable: Ue
771
+ } = Ce(Pe), _ = Q.has(e) && (((ge = Q.get(e)) == null ? void 0 : ge.mediaNodeKeys.length) === 0 || ((fe = Q.get(e)) == null ? void 0 : fe.mediaNodeKeys.length) === void 0 || e.trim() === ""), { t: j } = V(), se = (t) => {
772
+ if (typeof t == "number") return t > 0 ? t : null;
773
+ if (typeof t == "string" && !t.includes("%")) {
774
+ const f = parseFloat(t);
775
+ return Number.isFinite(f) && f > 0 ? f : null;
776
776
  }
777
777
  return null;
778
- }, le = re(a), se = re(r), de = le && se ? le / se : void 0, [Ue, Ae] = y(
778
+ }, A = se(a), de = se(r), ce = A && de ? A / de : void 0, [Ae, Re] = y(
779
779
  void 0
780
- ), ce = K(() => {
780
+ ), ue = te(() => {
781
781
  try {
782
- const o = parseFloat(
782
+ const t = parseFloat(
783
783
  localStorage.getItem("layers-img-ratio:" + e) || ""
784
784
  );
785
- return Number.isFinite(o) && o > 0 ? o : void 0;
785
+ return Number.isFinite(t) && t > 0 ? t : void 0;
786
786
  } catch {
787
787
  return;
788
788
  }
789
- }, [e]), Re = de ?? h ?? ce ?? Ue, [Me, ue] = y(!1), ze = !Me && !de && (h ?? ce) != null, [Ot, We] = y(0);
790
- P(() => u.registerDecoratorListener(() => {
791
- We((o) => o + 1);
792
- }), [_]), P(() => {
793
- const o = u.getElementByKey(t);
794
- o && (o.style.removeProperty("aspect-ratio"), o.style.removeProperty("width"));
795
- }, [u, t]), P(() => {
789
+ }, [e]), Me = ce ?? h ?? ue ?? Ae, [We, Y] = y(!1), ze = !We && !ce && (h ?? ue) != null, [Pt, Fe] = y(0);
790
+ E(() => u.registerDecoratorListener(() => {
791
+ Fe((t) => t + 1);
792
+ }), [_]), E(() => {
793
+ const t = u.getElementByKey(o);
794
+ t && (t.style.removeProperty("aspect-ratio"), t.style.removeProperty("width"));
795
+ }, [u, o]), E(() => {
796
796
  if (!e || e.startsWith("data:image/") || !e.trim()) {
797
797
  w(!1);
798
798
  return;
799
799
  }
800
- const o = new Image();
801
- o.src = e, o.onload = () => {
802
- if (w(!1), o.naturalWidth) {
803
- const g = o.naturalWidth / o.naturalHeight;
804
- if (Ae(g), o.naturalWidth >= 100)
800
+ const t = new Image();
801
+ t.src = e, t.onload = () => {
802
+ if (w(!1), t.naturalWidth) {
803
+ const f = t.naturalWidth / t.naturalHeight;
804
+ if (Re(f), t.naturalWidth >= 100)
805
805
  try {
806
- localStorage.setItem("layers-img-ratio:" + e, String(g));
806
+ localStorage.setItem("layers-img-ratio:" + e, String(f));
807
807
  } catch {
808
808
  }
809
- !h && o.naturalWidth >= 100 && u.update(
809
+ !h && t.naturalWidth >= 100 && u.update(
810
810
  () => {
811
- const f = E(t);
812
- S(f) && f.getAspectRatio() == null && f.setAspectRatio(g);
811
+ const p = x(o);
812
+ T(p) && p.getAspectRatio() == null && p.setAspectRatio(f);
813
813
  },
814
814
  { tag: "history-merge" }
815
815
  );
816
816
  }
817
- }, o.onerror = () => {
817
+ }, t.onerror = () => {
818
818
  w(!1);
819
819
  };
820
820
  }, [e, _]);
821
- const _e = (o, g) => {
821
+ const _e = (t, f) => {
822
822
  u.update(() => {
823
- Xe(null);
824
- const f = E(t);
825
- S(f) && f.setWidthAndHeight(o, g);
823
+ Ze(null);
824
+ const p = x(o);
825
+ T(p) && p.setWidthAndHeight(t, f);
826
826
  });
827
- }, { historyState: pe } = lt(), {
827
+ }, { historyState: pe } = dt(), {
828
828
  settings: { showNestedEditorTreeView: me }
829
- } = st();
830
- function Fe(o) {
831
- return o.endsWith(".svg") || o.includes("image/svg+xml");
829
+ } = ct();
830
+ function je(t) {
831
+ return t.endsWith(".svg") || t.includes("image/svg+xml");
832
+ }
833
+ function $e(t) {
834
+ if (!t.startsWith("data:")) return 0;
835
+ try {
836
+ const f = t.slice(t.indexOf(",") + 1), p = t.includes(";base64,") ? atob(f) : decodeURIComponent(f), C = p.match(
837
+ /viewBox\s*=\s*["']\s*[\d.eE+\-]+\s+[\d.eE+\-]+\s+([\d.eE+]+)\s+([\d.eE+]+)/i
838
+ );
839
+ if (C) return Math.round(parseFloat(C[1]));
840
+ const he = p.match(/\bwidth\s*=\s*["'](\d[\d.]*)(?:px)?["']/i);
841
+ if (he) return Math.round(parseFloat(he[1]));
842
+ } catch {
843
+ }
844
+ return 0;
832
845
  }
833
- function je(o) {
834
- return new Promise((g, f) => {
835
- if (Fe(o)) {
836
- g(0);
846
+ function He(t) {
847
+ return new Promise((f, p) => {
848
+ if (je(t)) {
849
+ f($e(t));
837
850
  return;
838
851
  }
839
- const D = new Image();
840
- D.src = o, D.onload = () => {
841
- g(D.width);
842
- }, D.onerror = () => {
843
- f(new Error("Failed to load image"));
852
+ const C = new Image();
853
+ C.src = t, C.onload = () => {
854
+ f(C.width);
855
+ }, C.onerror = () => {
856
+ p(new Error("Failed to load image"));
844
857
  };
845
858
  });
846
859
  }
847
- P(() => {
848
- let o = a, g = r, f = 100;
849
- (e.includes("unsplash") ? e.trim() : !_ && e.trim() || e.includes("upload-src-editor")) && e !== "upload" && je(e).then((D) => {
850
- typeof o == "number" && o < f && D < f ? (R(!0), M({
851
- width: o,
852
- height: g
853
- })) : D < f ? (R(!0), M({
854
- width: "auto",
855
- height: "auto"
856
- })) : (M({
857
- width: D,
858
- height: D
859
- }), R(!1)), ue(!0);
860
- }).catch((D) => {
861
- ue(!0), console.warn("Ошибка при загрузке изображения:", D.message);
862
- });
863
- }, [e, _]), P(() => {
864
- L.width && L.height && T && u.update(() => {
865
- const o = E(t);
866
- S(o) && o.setWidthAndHeight(L.width, L.height);
860
+ E(() => {
861
+ let t = a, f = r, p = 100;
862
+ if ((e.includes("unsplash") ? e.trim() : !_ && e.trim() || e.includes("upload-src-editor")) && e !== "upload") {
863
+ if (A != null && A >= p) {
864
+ S(!1), U({ width: A, height: A }), Y(!0);
865
+ return;
866
+ }
867
+ He(e).then((C) => {
868
+ typeof t == "number" && t < p && C < p ? (S(!0), U({
869
+ width: t,
870
+ height: f
871
+ })) : C < p ? (S(!0), U({
872
+ width: "auto",
873
+ height: "auto"
874
+ })) : (U({
875
+ width: C,
876
+ height: C
877
+ }), S(!1)), Y(!0);
878
+ }).catch((C) => {
879
+ Y(!0), console.warn("Ошибка при загрузке изображения:", C.message);
880
+ });
881
+ }
882
+ }, [e, _]), E(() => {
883
+ L.width && L.height && P && u.update(() => {
884
+ const t = x(o);
885
+ T(t) && t.setWidthAndHeight(L.width, L.height);
867
886
  });
868
- }, [L.width, L.height, T]);
869
- const $e = C(
870
- (o) => dt(u, t, o),
871
- [u, t]
872
- ), X = C(
873
- (o, g) => {
887
+ }, [L.width, L.height, P]);
888
+ const Be = D(
889
+ (t) => ut(u, o, t),
890
+ [u, o]
891
+ ), Z = D(
892
+ (t, f) => {
874
893
  w(!1), u.update(() => {
875
- const f = E(t);
876
- S(f) && (f.setSrc(o), f.setId(g));
894
+ const p = x(o);
895
+ T(p) && (p.setSrc(t), p.setId(f));
877
896
  });
878
897
  },
879
- [u, t]
880
- ), Y = C(
881
- (o) => {
898
+ [u, o]
899
+ ), q = D(
900
+ (t) => {
882
901
  w(!0);
883
- const g = O();
902
+ const f = N();
884
903
  z && z(
885
- o[0],
886
- (f, D) => {
887
- X(f, D), G(0);
904
+ t[0],
905
+ (p, C) => {
906
+ Z(p, C), X(0);
888
907
  },
889
- (f) => {
890
- f && ht({
891
- message: F("editor.gallery.errorFile")
892
- }), G(0), X(e.startsWith("blob:") ? "upload" : "", "");
908
+ (p) => {
909
+ p && bt({
910
+ message: j("editor.gallery.errorFile")
911
+ }), X(0), Z(e.startsWith("blob:") ? "upload" : "", "");
893
912
  },
894
- g,
895
- (f) => {
896
- G(f);
913
+ f,
914
+ (p) => {
915
+ X(p);
897
916
  }
898
917
  );
899
918
  },
900
- [z, O, F, X, e]
919
+ [z, N, j, Z, e]
901
920
  );
902
- return P(() => u.registerCommand(
903
- ct,
904
- (o) => !e.startsWith("blob:") && e !== "upload" || o.targetNodeKey !== t ? !1 : (Y(o.files), !0),
905
- Ge
906
- ), [u, Y, t, e]), !e || e === "upload" ? /* @__PURE__ */ n(Be, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
907
- ut,
921
+ return E(() => u.registerCommand(
922
+ pt,
923
+ (t) => !e.startsWith("blob:") && e !== "upload" || t.targetNodeKey !== o ? !1 : (q(t.files), !0),
924
+ Ye
925
+ ), [u, q, o, e]), !e || e === "upload" ? /* @__PURE__ */ n(Ge, { "data-editor-image-picker-drop-root": !0, w: "100%", children: /* @__PURE__ */ n(
926
+ mt,
908
927
  {
909
928
  inline: !0,
910
- nodeKey: t,
911
- defaultTabValue: m,
912
- onWriteTabToNode: $e,
929
+ nodeKey: o,
930
+ defaultTabValue: g,
931
+ onWriteTabToNode: Be,
913
932
  uploading: !1,
914
- onUpload: (o) => {
915
- !z || !o.length || Y(o);
933
+ onUpload: (t) => {
934
+ !z || !t.length || q(t);
916
935
  },
917
936
  popoverProps: {
918
937
  opened: !0,
919
938
  position: "bottom",
920
- zIndex: pt
939
+ zIndex: gt
921
940
  },
922
- onChange: (o) => {
941
+ onChange: (t) => {
923
942
  u.update(() => {
924
- const g = E(t);
925
- S(g) && g.setSrc(o);
943
+ const f = x(o);
944
+ T(f) && f.setSrc(t);
926
945
  });
927
946
  }
928
947
  }
929
- ) }) : T && !ze ? /* @__PURE__ */ n(
930
- ye,
948
+ ) }) : P && !ze ? /* @__PURE__ */ n(
949
+ Ie,
931
950
  {
932
951
  width: L.width,
933
952
  height: L.height,
934
953
  isLoading: c,
935
954
  isError: !1,
936
- isIcon: T,
955
+ isIcon: P,
937
956
  src: e,
938
957
  id: I,
939
958
  editor: u,
940
- nodeKey: t,
941
- fetchDeleteMedia: ae,
959
+ nodeKey: o,
960
+ fetchDeleteMedia: le,
942
961
  altText: i,
943
- imageRef: k,
962
+ imageRef: v,
944
963
  maxWidth: s,
945
964
  showCaption: l,
946
965
  caption: d,
947
966
  isCollabActive: !1,
948
967
  historyState: pe,
949
968
  showNestedEditorTreeView: me,
950
- t: F,
951
- href: v
969
+ t: j,
970
+ href: k
952
971
  }
953
972
  ) : /* @__PURE__ */ n(
954
- mt,
973
+ ft,
955
974
  {
956
975
  editor: u,
957
- isIcon: T,
958
- width: be(a),
959
- height: be(r),
976
+ isIcon: P,
977
+ width: ve(a),
978
+ height: ve(r),
960
979
  initialWidth: L.width || "",
961
980
  initialHeight: L.height || "",
962
981
  onResizeEnd: _e,
963
- alignment: p,
964
- disable: xe,
965
- onRegisterDecoratorEnter: (o) => {
966
- W != null && W.current && (W.current.decoratorEnterAction = o);
982
+ alignment: m,
983
+ disable: Ue,
984
+ onRegisterDecoratorEnter: (t) => {
985
+ F != null && F.current && (F.current.decoratorEnterAction = t);
967
986
  },
968
- onActivate: () => u.dispatchCommand(gt, "show_menu"),
987
+ onActivate: () => u.dispatchCommand(ht, "show_menu"),
969
988
  children: /* @__PURE__ */ n(
970
- ye,
989
+ Ie,
971
990
  {
972
991
  width: "inherit",
973
992
  height: "inherit",
974
- aspectRatio: Re,
993
+ aspectRatio: Me,
975
994
  isLoading: c,
976
995
  isError: !1,
977
- isIcon: T,
996
+ isIcon: P,
978
997
  src: e,
979
998
  id: I,
980
999
  editor: u,
981
- nodeKey: t,
982
- fetchDeleteMedia: ae,
1000
+ nodeKey: o,
1001
+ fetchDeleteMedia: le,
983
1002
  altText: i,
984
- imageRef: k,
1003
+ imageRef: v,
985
1004
  maxWidth: s,
986
1005
  showCaption: l,
987
1006
  caption: d,
988
1007
  isCollabActive: !1,
989
1008
  historyState: pe,
990
1009
  showNestedEditorTreeView: me,
991
- t: F,
992
- href: v
1010
+ t: j,
1011
+ href: k
993
1012
  }
994
1013
  )
995
1014
  }
996
1015
  );
997
1016
  }
998
1017
  export {
999
- Xt as default
1018
+ Zt as default
1000
1019
  };