@layers-app/editor 2.1.1 → 2.1.3

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 (213) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +2 -2
  4. package/dist/{layers.D-GjVT45.js → layers.-SHGCzPp.js} +1 -1
  5. package/dist/{layers.CEEi9vNU.js → layers.0H31be7Z.js} +1 -1
  6. package/dist/{layers.BeD6wCI_.js → layers.39HkzoqA.js} +1 -1
  7. package/dist/{layers.DL6YcdT-.js → layers.8PuRDqXn.js} +1 -1
  8. package/dist/{layers.CHsA2PkS.js → layers.8uM7Y9ah.js} +1 -1
  9. package/dist/{layers.BbqkhuPY.js → layers.B-mKB0m2.js} +1 -1
  10. package/dist/{layers.BZfYoUK4.js → layers.B0jPbl9x.js} +2 -2
  11. package/dist/{layers.BjAQPP1h.js → layers.B1ADXzhH.js} +1 -1
  12. package/dist/{layers.XcAOCw_1.js → layers.B38rBl_s.js} +1 -1
  13. package/dist/{layers.CYA_8fAL.js → layers.B3MLCCBO.js} +1 -1
  14. package/dist/{layers.BsnutohQ.js → layers.B3i_eLBh.js} +1 -1
  15. package/dist/{layers.DdQWC0Xi.js → layers.B4Zz3nF-.js} +1 -1
  16. package/dist/{layers.DsYz1gRz.js → layers.B4bXPWTJ.js} +1 -1
  17. package/dist/{layers.-QXAEriY.js → layers.B4lKB7Sv.js} +1 -1
  18. package/dist/{layers.Coa78bpu.js → layers.B5wt10W4.js} +7 -7
  19. package/dist/{layers.BRN2LbFC.js → layers.B6Y7HNq_.js} +1 -1
  20. package/dist/{layers.ik9ID6FB.js → layers.B8j24PJy.js} +1 -1
  21. package/dist/{layers.Pa94bs0z.js → layers.B9Vrfx-R.js} +1 -1
  22. package/dist/{layers.IFaA4vku.js → layers.B9ikDxXH.js} +1 -1
  23. package/dist/{layers.yy04BNR6.js → layers.B9zCJgSo.js} +1 -1
  24. package/dist/{layers.DpCLFXX7.js → layers.BAZ1DUN1.js} +3 -3
  25. package/dist/{layers.Dfy1u61N.js → layers.BAlXkjeR.js} +1 -1
  26. package/dist/{layers.CuuyhoWK.js → layers.BCuRJDW5.js} +1 -1
  27. package/dist/{layers.Dfxr2wRP.js → layers.BDH0DZrJ.js} +1 -1
  28. package/dist/{layers.BAAeEi2A.js → layers.BFkL1V3s.js} +1 -1
  29. package/dist/{layers.DnuPLyBM.js → layers.BG1OUlr4.js} +1 -1
  30. package/dist/{layers.BLInrOI5.js → layers.BGX87mbU.js} +1 -1
  31. package/dist/{layers.BAQBDkM2.js → layers.BIqMbEwm.js} +1 -1
  32. package/dist/{layers.CeQQX5EQ.js → layers.BJ3RiwpG.js} +1 -1
  33. package/dist/{layers.C_dbPWej.js → layers.BJTo52lj.js} +1 -1
  34. package/dist/{layers.-suCL_JV.js → layers.BMkjWhgS.js} +1 -1
  35. package/dist/{layers.DuTOqJEa.js → layers.BNHGep2P.js} +1 -1
  36. package/dist/{layers.E_zncQAX.js → layers.BNVRX3OW.js} +3 -3
  37. package/dist/{layers.LZcrVpUQ.js → layers.BOI5vWv3.js} +1 -1
  38. package/dist/{layers.BingJITi.js → layers.BOy49arY.js} +3 -3
  39. package/dist/{layers.DYNKwQbS.js → layers.BQFohWAn.js} +1 -1
  40. package/dist/{layers.BHpnVVi8.js → layers.BQMyaIEA.js} +1 -1
  41. package/dist/{layers.CNpi2zuS.js → layers.BQYg3K4C.js} +1 -1
  42. package/dist/{layers.CEHbI1V3.js → layers.BUtsOTZt.js} +1 -1
  43. package/dist/{layers.ijsh696S.js → layers.BYWknS6A.js} +1 -1
  44. package/dist/{layers.B6eH0dTu.js → layers.BZd_TgyY.js} +1 -1
  45. package/dist/layers.BZmwJLv4.js +1 -0
  46. package/dist/{layers.DSTuQdHa.js → layers.B_2SJBOJ.js} +1 -1
  47. package/dist/{layers.DU3pEJ8B.js → layers.BbdIXklW.js} +1 -1
  48. package/dist/{layers.BE6midSb.js → layers.BexCT5yz.js} +1 -1
  49. package/dist/{layers.BslQwkAQ.js → layers.BfdaSVSD.js} +1 -1
  50. package/dist/{layers.U9kJQ2H-.js → layers.BgeBrYsf.js} +1 -1
  51. package/dist/{layers.DqRnHfNf.js → layers.BigEQUZC.js} +4 -4
  52. package/dist/{layers.BKvsTcgx.js → layers.Bir0mrHH.js} +1 -1
  53. package/dist/{layers.uv7ZdBfc.js → layers.Bk7fHXBF.js} +25 -25
  54. package/dist/{layers.D6Y_mnTU.js → layers.BlGJJ8wn.js} +1 -1
  55. package/dist/{layers.RsXWpzwY.js → layers.BmcekZoW.js} +1 -1
  56. package/dist/{layers.iUf7mBF3.js → layers.BqFP-iF0.js} +1 -1
  57. package/dist/{layers.CHEDijFo.js → layers.BqWOx62b.js} +4 -4
  58. package/dist/layers.BrUcySmW.js +567 -0
  59. package/dist/{layers.CImayEk9.js → layers.Bs8vo5u4.js} +1 -1
  60. package/dist/{layers.CzsTghhR.js → layers.BsTZb675.js} +1 -1
  61. package/dist/{layers.BOsXbPpD.js → layers.Bu4rqJ0u.js} +1 -1
  62. package/dist/{layers.BDDLv234.js → layers.BvHY5cSa.js} +1 -1
  63. package/dist/{layers.BL2qkTK_.js → layers.BvUXffrC.js} +1 -1
  64. package/dist/{layers.huDQcCjP.js → layers.ByNtZ8_k.js} +1 -1
  65. package/dist/{layers.453Ivlnk.js → layers.ByfKFC3Z.js} +1 -1
  66. package/dist/{layers.-om9qG1y.js → layers.BzhfSX7U.js} +1 -1
  67. package/dist/{layers.Dv5zrazi.js → layers.C-6BQ0ed.js} +1 -1
  68. package/dist/{layers.CjpgU61y.js → layers.C07EaGvY.js} +1 -1
  69. package/dist/{layers.WPy2YSM5.js → layers.C09PqTjf.js} +1 -1
  70. package/dist/{layers.CsrlmVRD.js → layers.C0GkbOj_.js} +1 -1
  71. package/dist/{layers.B-4zBS3s.js → layers.C0iocMI4.js} +1 -1
  72. package/dist/{layers.BplUZsio.js → layers.C1IKX49f.js} +1 -1
  73. package/dist/{layers.DlkD0ItS.js → layers.C1M8YTuB.js} +5 -6
  74. package/dist/{layers.DrRwQwBi.js → layers.C3rv5vzA.js} +1 -1
  75. package/dist/{layers.zlULOvTd.js → layers.C4GWEIGW.js} +1 -1
  76. package/dist/{layers.C048yeaA.js → layers.C9JUHKbR.js} +1 -1
  77. package/dist/layers.CByVI5gD.js +1 -0
  78. package/dist/{layers.DnBW4oSg.js → layers.CC9kTgrU.js} +1 -1
  79. package/dist/{layers.D3mcx6_C.js → layers.CCY4ZK_S.js} +1 -1
  80. package/dist/{layers.BXTCAlQ1.js → layers.CE5HZB82.js} +1 -1
  81. package/dist/{layers.B5zNnrXR.js → layers.CEGYRyJy.js} +1 -1
  82. package/dist/{layers.Do9Aw_0T.js → layers.CEafpqZr.js} +1 -1
  83. package/dist/{layers.DIjiclhe.js → layers.CHOpUlDI.js} +4 -4
  84. package/dist/{layers.oflrOEq3.js → layers.CHpwZYWl.js} +1 -1
  85. package/dist/{layers.Cb4n08aU.js → layers.CLx3cm8b.js} +1 -1
  86. package/dist/{layers.CtzfAfIV.js → layers.CMzwbIKN.js} +1 -1
  87. package/dist/{layers.BBiu_lfR.js → layers.CO8o93N3.js} +4 -4
  88. package/dist/{layers.D-UO42sM.js → layers.CP5z29hi.js} +4 -4
  89. package/dist/{layers.DK0C80a1.js → layers.CQdpxGHV.js} +1 -1
  90. package/dist/{layers.B1_0lvQO.js → layers.CWxZ9ZNK.js} +1 -1
  91. package/dist/{layers.CjwqLrNd.js → layers.CXltHKhe.js} +1 -1
  92. package/dist/{layers.DlmcG2xZ.js → layers.CZhaqvvz.js} +1 -1
  93. package/dist/{layers.CaI8it-D.js → layers.CZjmldFP.js} +1 -1
  94. package/dist/{layers.BaK4MyRu.js → layers.CcpsPvcD.js} +1 -1
  95. package/dist/{layers.CUFdq7wb.js → layers.CdAwudMB.js} +1 -1
  96. package/dist/{layers.B3OOozLQ.js → layers.CdVdZpZW.js} +3 -3
  97. package/dist/{layers.DyMuX3L1.js → layers.Cdz7glSp.js} +1 -1
  98. package/dist/{layers.B69fEREL.js → layers.Cg1Bmo8X.js} +1 -1
  99. package/dist/{layers.BafLNNvR.js → layers.ChLuj-rc.js} +1 -1
  100. package/dist/{layers.DzKpwa2K.js → layers.Cjza4_aa.js} +1 -1
  101. package/dist/{layers.gWuPSxAj.js → layers.CmEUPhTK.js} +1 -1
  102. package/dist/layers.CmXKfYby.js +1 -0
  103. package/dist/{layers.B0ZS6eqD.js → layers.CmcgmbI6.js} +1 -1
  104. package/dist/{layers.B7F1Ra6I.js → layers.Cn1PUZc8.js} +1 -1
  105. package/dist/{layers.D9o_pvN-.js → layers.CnV12zWd.js} +3 -3
  106. package/dist/{layers.B4DFVx9Y.js → layers.CndTZ31m.js} +1 -1
  107. package/dist/{layers.DIYBKnIM.js → layers.Co38nQAK.js} +3 -3
  108. package/dist/{layers.BvhpRdfJ.js → layers.CpBxhH-Y.js} +1 -1
  109. package/dist/{layers.HgBAwZ89.js → layers.CpRBywkv.js} +63 -63
  110. package/dist/{layers.C7Ga_bTL.js → layers.Cr1uunhl.js} +1 -1
  111. package/dist/{layers.DDQYjyve.js → layers.CrAgQyZG.js} +1 -1
  112. package/dist/{layers.C2JYV25i.js → layers.Cs4SYdW6.js} +1 -1
  113. package/dist/{layers.Co5-IoO1.js → layers.CtoullEV.js} +1 -1
  114. package/dist/{layers.jTgRcmoM.js → layers.Ctsic0Sj.js} +1 -1
  115. package/dist/{layers.DMy22qhQ.js → layers.CunjJ3Ls.js} +1 -1
  116. package/dist/{layers.D9BQw5An.js → layers.Cw3AOXly.js} +1 -1
  117. package/dist/{layers.CfR0ns20.js → layers.CwqcpqGe.js} +1 -1
  118. package/dist/{layers.DTHhmh1H.js → layers.Cx8Gg-Tr.js} +1 -1
  119. package/dist/{layers.CTM6uglT.js → layers.CxGUE3xh.js} +1 -1
  120. package/dist/{layers.BaMd2ifd.js → layers.CyKPMpjA.js} +1 -1
  121. package/dist/{layers.DkdZ222Y.js → layers.D0NmOwXy.js} +2 -2
  122. package/dist/{layers.Bq5JdP6p.js → layers.D1aDf1Yb.js} +7010 -6788
  123. package/dist/{layers.CVJPjHAQ.js → layers.D5wxkRZg.js} +1 -1
  124. package/dist/{layers.BZAgxYJH.js → layers.D8M84_MA.js} +8 -8
  125. package/dist/{layers.Bf0Pzy4-.js → layers.D8lMBZIP.js} +1 -1
  126. package/dist/{layers.DusBEoyd.js → layers.DA4D7KGs.js} +1 -1
  127. package/dist/{layers.BmwKlDt5.js → layers.DBPkwAPI.js} +1 -1
  128. package/dist/{layers.0u-9Rm0M.js → layers.DBV0J_HI.js} +1 -1
  129. package/dist/{layers.ChlR9Dh-.js → layers.DBc_UPGb.js} +2 -2
  130. package/dist/{layers.Crkzg0z5.js → layers.DDjsU6PA.js} +1 -1
  131. package/dist/{layers.DyC1F_cz.js → layers.DEJicTxy.js} +4 -4
  132. package/dist/{layers.Dj0drWph.js → layers.DFDWnDfo.js} +1 -1
  133. package/dist/{layers.xEvF5NFa.js → layers.DFEHAT5_.js} +1 -1
  134. package/dist/{layers.MPUu5P-M.js → layers.DGUyOV8w.js} +3 -3
  135. package/dist/{layers.BsJWvxSo.js → layers.DGrPEBsm.js} +1 -1
  136. package/dist/{layers.qB6UCsnD.js → layers.DHKg3z7U.js} +1 -1
  137. package/dist/{layers.Bx6EtnMg.js → layers.DJCo0IEz.js} +1 -1
  138. package/dist/{layers.ChNzzo7K.js → layers.DJKXtJ1z.js} +1 -1
  139. package/dist/{layers.Dy_jtmbF.js → layers.DJztvzRz.js} +1 -1
  140. package/dist/{layers.ZNG7YqJ5.js → layers.DLTRux2c.js} +1 -1
  141. package/dist/{layers.CBdyRIEc.js → layers.DLXMCC05.js} +1 -1
  142. package/dist/{layers.BSN847PJ.js → layers.DOhVvlX1.js} +5 -5
  143. package/dist/{layers.Dv4wS6AO.js → layers.DS1ihg-b.js} +1 -1
  144. package/dist/{layers.D1SKIuq2.js → layers.DTe1_eZ_.js} +1 -1
  145. package/dist/{layers.B5f8PwiW.js → layers.DTkJIWfY.js} +1 -1
  146. package/dist/{layers.C0c2fG4r.js → layers.DUPMP2d6.js} +1 -1
  147. package/dist/{layers.DxXqgVcD.js → layers.DUTnaonw.js} +3 -3
  148. package/dist/{layers.DWCGw9rm.js → layers.DUjzahzs.js} +1 -1
  149. package/dist/{layers.y4INFYuw.js → layers.DUk4LtkB.js} +1 -1
  150. package/dist/{layers.D7tvyVJx.js → layers.DVyNZViM.js} +1 -1
  151. package/dist/{layers.DPypXGXV.js → layers.DX-_rZZm.js} +1 -1
  152. package/dist/{layers.zeQg5XyS.js → layers.DZSIKNGr.js} +4 -4
  153. package/dist/{layers.BV8XszYg.js → layers.Da9pKTtE.js} +1 -1
  154. package/dist/{layers.DPotS97R.js → layers.Dc3Z7JRe.js} +1 -1
  155. package/dist/{layers.Bc6jCmcL.js → layers.DeYnYW8x.js} +1 -1
  156. package/dist/{layers.BJNDuv8A.js → layers.DgLw6auX.js} +6 -6
  157. package/dist/{layers.pDOOMU8o.js → layers.Dgytap9-.js} +1 -1
  158. package/dist/{layers.CsmSjm5X.js → layers.DhsShj7e.js} +1 -1
  159. package/dist/{layers.t-B47bBL.js → layers.DhyRu56O.js} +4 -4
  160. package/dist/{layers.D7t8emDv.js → layers.Di3QwSwF.js} +1 -1
  161. package/dist/{layers.BLgJM_NG.js → layers.DieyF7Mb.js} +1 -1
  162. package/dist/{layers.DBmzF1GK.js → layers.Dim_7gFL.js} +1 -1
  163. package/dist/{layers.YRkSAk7Y.js → layers.DjEJT7he.js} +2 -2
  164. package/dist/{layers.5h11u2FE.js → layers.Do8FTjWl.js} +1 -1
  165. package/dist/{layers.ulQlWEMu.js → layers.Dobt6mRr.js} +1 -1
  166. package/dist/{layers.CpyTyH1l.js → layers.DreE0CD1.js} +1 -1
  167. package/dist/{layers.mpmaCt8r.js → layers.DvQ2dh6I.js} +1 -1
  168. package/dist/{layers.VVQTXlLM.js → layers.DvdnuVJv.js} +1 -1
  169. package/dist/{layers.Bb0XL3dJ.js → layers.DwY8-5Ho.js} +1 -1
  170. package/dist/{layers.BBodgt1z.js → layers.DyYTK0So.js} +1 -1
  171. package/dist/{layers.CnTbWCei.js → layers.EN7PEmQX.js} +1 -1
  172. package/dist/{layers.CCDSYwY-.js → layers.EvdeRXLR.js} +1 -1
  173. package/dist/{layers.DxQinbaP.js → layers.HnMwvcl0.js} +4 -4
  174. package/dist/{layers.jrKsw1US.js → layers.HuJ3UCd4.js} +1 -1
  175. package/dist/{layers.CZZb77-M.js → layers.IQQ5OQKd.js} +1 -1
  176. package/dist/layers.P_aOF19W.js +8 -0
  177. package/dist/{layers.CnoCYawj.js → layers.SqDtpNGf.js} +1 -1
  178. package/dist/{layers.BAT71ZPy.js → layers.U3pyk9E4.js} +3 -3
  179. package/dist/{layers.BfG3HB3-.js → layers.Uumr6LwD.js} +1 -1
  180. package/dist/{layers.DVQxyQyU.js → layers.V4TTwzir.js} +1 -1
  181. package/dist/{layers.Dd2YHcCZ.js → layers.VYVXLvN_.js} +1 -1
  182. package/dist/{layers.DnwDJ8fu.js → layers.XK2sddFl.js} +3 -3
  183. package/dist/{layers.BtbBlAID.js → layers.XWIlJ9bP.js} +5 -5
  184. package/dist/{layers.BS2n72dP.js → layers.YBMSKMjf.js} +1 -1
  185. package/dist/{layers.Dr8pWw4N.js → layers._la4D_iD.js} +1 -1
  186. package/dist/{layers.DEXMQhHE.js → layers.alvTM0TL.js} +1 -1
  187. package/dist/{layers.DgJrS-da.js → layers.fRxn-M0Z.js} +1 -1
  188. package/dist/layers.fe6ZrL2s.js +6 -0
  189. package/dist/{layers.jWamXKUm.js → layers.hUSjkj2F.js} +1 -1
  190. package/dist/{layers.DErv9BMu.js → layers.i6wYk0yO.js} +1 -1
  191. package/dist/{layers.DcA3kTPq.js → layers.jvvStAM5.js} +1 -1
  192. package/dist/{layers._w1BnwY0.js → layers.ledjdm_3.js} +4 -4
  193. package/dist/{layers.DN3qDPL9.js → layers.lsxcliue.js} +1 -1
  194. package/dist/{layers.B9maygAw.js → layers.poa6s6JS.js} +1 -1
  195. package/dist/{layers.D6OoTeN4.js → layers.qgLxrPvn.js} +1 -1
  196. package/dist/layers.reRErKmI.js +1 -0
  197. package/dist/{layers.B1DpbdQ8.js → layers.tPe3TnkZ.js} +1 -1
  198. package/dist/{layers.CBfxIUIt.js → layers.uN-NSHnL.js} +2 -2
  199. package/dist/{layers.CR8mLt5Q.js → layers.uiQlFJkj.js} +1 -1
  200. package/dist/{layers.Cv41Wh5x.js → layers.vUzfU7Qx.js} +1 -1
  201. package/dist/{layers.Bm1r1il8.js → layers.wWToVlI_.js} +1 -1
  202. package/dist/{layers.qwc0qX_n.js → layers.x1UA-FR6.js} +1 -1
  203. package/dist/{layers.Cl6167fK.js → layers.yL1_Ryr2.js} +1 -1
  204. package/package.json +80 -80
  205. package/dist/layers.4qd3yMN3.js +0 -6
  206. package/dist/layers.B4Yy5Up8.js +0 -1
  207. package/dist/layers.C8ViA0iZ.js +0 -1
  208. package/dist/layers.CDIceqhL.js +0 -8
  209. package/dist/layers.CEd0an3c.js +0 -1
  210. package/dist/layers.CFCOrqea.js +0 -1
  211. package/dist/layers.C_NvDdhE.js +0 -540
  212. package/dist/layers.CmmYt3Ou.js +0 -1
  213. package/dist/layers.DilA0qnM.js +0 -54
@@ -1,540 +0,0 @@
1
- import { jsx as n, jsxs as _, Fragment as oe } from "react/jsx-runtime";
2
- import { useContext as le, useMemo as re, useState as S, useEffect as z, useRef as F, useCallback as W, Suspense as ie, lazy as ae } from "react";
3
- import { useLexicalComposerContext as se } from "@lexical/react/LexicalComposerContext";
4
- import { useLexicalEditable as ce } from "@lexical/react/useLexicalEditable";
5
- import { useLexicalNodeSelection as de } from "@lexical/react/useLexicalNodeSelection";
6
- import { mergeRegister as ue } from "@lexical/utils";
7
- import { $setSelection as fe, $getNodeByKey as H, CLICK_COMMAND as me, COMMAND_PRIORITY_LOW as $, KEY_DELETE_COMMAND as ge, KEY_BACKSPACE_COMMAND as he } from "lexical";
8
- import { C as Ce, R as xe, s as I, q as U, A as Y, K as pe, x as Q, N as be, l as Z, y as ve, e as Ee, H as P, r as we, a as ne, z as ee } from "./layers.Bq5JdP6p.js";
9
- import { l as ye, p as Te } from "./layers.DilA0qnM.js";
10
- import { useTranslation as X } from "react-i18next";
11
- import { Modal as ke, Text as Me, Flex as De, Button as G, Box as te, Stack as Oe, useMantineColorScheme as Ne, Loader as _e } from "@mantine/core";
12
- import { useDisclosure as Se } from "@mantine/hooks";
13
- import "@lexical/mark";
14
- import "@lexical/code";
15
- import { BottomDrawerWithoutHeader as Ae } from "@layers-app/shared";
16
- const Be = ({
17
- isCloseModal: r,
18
- setCloseModalOpen: l,
19
- confirmClose: C
20
- }) => {
21
- const { t: x } = X();
22
- return /* @__PURE__ */ n(
23
- ke,
24
- {
25
- opened: r,
26
- onClose: () => {
27
- l(!1);
28
- },
29
- centered: !0,
30
- title: x("editor.unsavedChanges.title"),
31
- closeOnClickOutside: !0,
32
- closeOnEscape: !0,
33
- size: "500",
34
- zIndex: 999,
35
- children: /* @__PURE__ */ _("div", { children: [
36
- /* @__PURE__ */ n(Me, { mb: "md", children: x("editor.unsavedChanges.message") }),
37
- /* @__PURE__ */ _(De, { justify: "flex-end", gap: "sm", children: [
38
- /* @__PURE__ */ n(
39
- G,
40
- {
41
- variant: "default",
42
- onClick: () => {
43
- l(!1);
44
- },
45
- fullWidth: !0,
46
- children: x("editor.unsavedChanges.cancel")
47
- }
48
- ),
49
- /* @__PURE__ */ n(G, { color: "red", onClick: C, fullWidth: !0, children: x("editor.unsavedChanges.closeWithoutSaving") })
50
- ] })
51
- ] })
52
- }
53
- );
54
- };
55
- function Le({
56
- imageContainerRef: r,
57
- editor: l,
58
- rootClassName: C = null,
59
- width: x = "inherit",
60
- height: u = "inherit",
61
- nodeKey: s,
62
- alignment: A,
63
- setModalOpen: v,
64
- previewSVG: o,
65
- isModalOpen: k
66
- }) {
67
- const { disable: d, imperativeHandleRef: w } = le(Ce), M = re(() => o ?? "", [o]), [B, E] = S(!1), [
68
- D,
69
- { open: b, close: T }
70
- ] = Se(!1), { t: m } = X();
71
- z(() => {
72
- k && E(!1);
73
- }, [k]);
74
- const O = (e, p) => {
75
- l.update(() => {
76
- fe(null);
77
- const i = H(s);
78
- return ne(i) && i.setWidthAndHeight(e, p), !0;
79
- });
80
- }, R = () => {
81
- ee(l, s);
82
- }, j = () => {
83
- T(), v(!0);
84
- }, g = () => {
85
- T(), ee(l, s);
86
- };
87
- return /* @__PURE__ */ _(
88
- xe,
89
- {
90
- editor: l,
91
- isIcon: !1,
92
- isEmbed: !0,
93
- width: U(x),
94
- height: U(u),
95
- onResizeEnd: O,
96
- alignment: A,
97
- disable: d,
98
- onRegisterDecoratorEnter: (e) => {
99
- w != null && w.current && (w.current.decoratorEnterAction = e);
100
- },
101
- onActivate: () => l.dispatchCommand(we, "show_menu"),
102
- children: [
103
- /* @__PURE__ */ _(te, { className: "media-wrapper excaildraw", children: [
104
- /* @__PURE__ */ n(
105
- "div",
106
- {
107
- className: `media-actions${I || !ve ? " visible" : ""}`,
108
- children: I ? /* @__PURE__ */ n(
109
- Y,
110
- {
111
- "aria-label": m("editor.toolbar.more"),
112
- label: m("editor.toolbar.more"),
113
- flexBorder: !0,
114
- onClick: b,
115
- icon: pe,
116
- iconColor: "var(--mantine-color-gray-text)"
117
- }
118
- ) : /* @__PURE__ */ _(oe, { children: [
119
- /* @__PURE__ */ n(
120
- Y,
121
- {
122
- "aria-label": "Settings",
123
- label: m("editor.link.edit"),
124
- flexBorder: !0,
125
- onClick: () => {
126
- v(!0);
127
- },
128
- icon: Q,
129
- iconColor: "var(--mantine-color-gray-text)"
130
- }
131
- ),
132
- /* @__PURE__ */ n(
133
- be,
134
- {
135
- opened: B,
136
- setOpened: E,
137
- t: m,
138
- editor: l,
139
- nodeKey: s,
140
- flexBorder: !0
141
- }
142
- ),
143
- /* @__PURE__ */ n(
144
- Y,
145
- {
146
- "aria-label": "Delete",
147
- label: m("editor.actions.delete"),
148
- flexBorder: !0,
149
- onClick: R,
150
- icon: Z,
151
- iconColor: "var(--mantine-color-red-outline)"
152
- }
153
- )
154
- ] })
155
- }
156
- ),
157
- /* @__PURE__ */ n(
158
- te,
159
- {
160
- w: "100%",
161
- ref: (e) => {
162
- e && r && (r.current = e);
163
- },
164
- className: C ?? "",
165
- dangerouslySetInnerHTML: { __html: M }
166
- }
167
- )
168
- ] }),
169
- I && /* @__PURE__ */ n(
170
- Ee,
171
- {
172
- opened: D,
173
- onClose: T,
174
- title: m("editor.image.mobileActions"),
175
- children: /* @__PURE__ */ _(Oe, { gap: 4, p: 0, children: [
176
- /* @__PURE__ */ n(
177
- G,
178
- {
179
- type: "button",
180
- variant: "subtle",
181
- color: "gray",
182
- fullWidth: !0,
183
- justify: "flex-start",
184
- bg: "light-dark(var(--mantine-color-gray-0), var(--mantine-color-gray-outline-hover))",
185
- onClick: j,
186
- leftSection: /* @__PURE__ */ n(
187
- P,
188
- {
189
- icon: Q,
190
- size: 16,
191
- color: "var(--mantine-color-dimmed)"
192
- }
193
- ),
194
- children: m("editor.link.edit")
195
- }
196
- ),
197
- /* @__PURE__ */ n(
198
- G,
199
- {
200
- type: "button",
201
- variant: "subtle",
202
- color: "red",
203
- fullWidth: !0,
204
- justify: "flex-start",
205
- bg: "light-dark(var(--mantine-color-gray-0), var(--mantine-color-gray-outline-hover))",
206
- onClick: g,
207
- leftSection: /* @__PURE__ */ n(
208
- P,
209
- {
210
- icon: Z,
211
- size: 16,
212
- color: "var(--mantine-color-red-6)"
213
- }
214
- ),
215
- children: m("editor.actions.delete")
216
- }
217
- )
218
- ] })
219
- }
220
- )
221
- ]
222
- }
223
- );
224
- }
225
- let V = null;
226
- const ze = /* @__PURE__ */ ae(async () => {
227
- var l;
228
- const r = await import("./layers.BZAgxYJH.js").then((C) => C.K);
229
- return !V && r && (V = r.exportToSvg || ((l = r.default) == null ? void 0 : l.exportToSvg) || r.default), { default: r.Excalidraw };
230
- }), We = () => {
231
- const [r, l] = S(
232
- null
233
- ), C = W(
234
- (x) => l(x),
235
- []
236
- );
237
- return [r, C];
238
- };
239
- function Re({
240
- onSave: r,
241
- initialElements: l,
242
- initialAppState: C,
243
- initialFiles: x,
244
- isShown: u = !1,
245
- onDelete: s,
246
- onClose: A,
247
- isEdited: v
248
- }) {
249
- const [o, k] = We(), { i18n: d, t: w } = X(), { colorScheme: M } = Ne(), B = F(!1), [E, D] = S(l), [b, T] = S(x), [m, O] = S(u);
250
- z(() => {
251
- u && O(!0);
252
- }, [u]), z(() => {
253
- !u || B.current || (B.current = !0, Promise.resolve({ }));
254
- }, [u]), z(() => {
255
- u && setTimeout(() => {
256
- var e, p;
257
- (e = o == null ? void 0 : o.refresh) == null || e.call(o), (p = o == null ? void 0 : o.scrollToContent) == null || p.call(o);
258
- }, 500);
259
- }, [u, o]), z(() => {
260
- if (!u)
261
- return;
262
- const e = (t, c) => {
263
- const f = w(t);
264
- return f.startsWith("editor.menu") ? c : f;
265
- }, p = e(
266
- "editor.menu.excalidraw.tools.frameTool",
267
- d.language === "ru" ? "Инструмент рамки" : d.language === "es" ? "Herramienta de marco" : "Frame tool"
268
- ), i = e(
269
- "editor.menu.excalidraw.tools.webEmbed",
270
- d.language === "ru" ? "Веб-встраивание" : d.language === "es" ? "Incrustación web" : "Web Embed"
271
- ), y = e(
272
- "editor.menu.excalidraw.tools.generate",
273
- d.language === "ru" ? "Генерировать" : d.language === "es" ? "Generar" : "Generate"
274
- ), L = {
275
- "Frame tool": p,
276
- "Web Embed": i,
277
- "Web embeded": i,
278
- Generate: y
279
- }, N = () => {
280
- const t = document.querySelector(".App-toolbar__extra-tools-dropdown");
281
- if (!t)
282
- return;
283
- const c = document.createTreeWalker(
284
- t,
285
- NodeFilter.SHOW_TEXT,
286
- null
287
- );
288
- let f;
289
- for (; f = c.nextNode(); )
290
- if (f.nodeType === Node.TEXT_NODE && f.textContent) {
291
- const J = f.textContent.trim();
292
- for (const [K, q] of Object.entries(L))
293
- if (J === K && q && !J.includes(q)) {
294
- f.textContent = f.textContent.replace(K, q);
295
- break;
296
- }
297
- }
298
- }, a = () => {
299
- setTimeout(() => {
300
- N();
301
- }, 0);
302
- }, h = setTimeout(() => {
303
- const t = document.querySelector(
304
- ".excalidraw-container"
305
- );
306
- if (t) {
307
- const c = t.querySelector(
308
- ".App-toolbar__extra-tools-trigger"
309
- );
310
- c && c.addEventListener("click", a);
311
- }
312
- }, 300);
313
- return () => {
314
- clearTimeout(h);
315
- const t = document.querySelector(
316
- ".excalidraw-container"
317
- );
318
- if (t) {
319
- const c = t.querySelector(
320
- ".App-toolbar__extra-tools-trigger"
321
- );
322
- c && c.removeEventListener("click", a);
323
- }
324
- };
325
- }, [u, d.language, w]);
326
- const R = W(async () => {
327
- var N, a, h;
328
- let e = V;
329
- if (!e || typeof e != "function") {
330
- const t = await import("./layers.BZAgxYJH.js").then((c) => c.K);
331
- e = t.exportToSvg || ((N = t.default) == null ? void 0 : N.exportToSvg) || t.default, e && typeof e == "function" && (V = e);
332
- }
333
- if (!e || typeof e != "function") {
334
- const t = await import("./layers.BZAgxYJH.js").then((f) => f.K), c = t ? Object.keys(t) : [];
335
- throw console.error("Excalidraw module structure:", {
336
- keys: c,
337
- hasExportToSvg: t && "exportToSvg" in t,
338
- hasDefault: t && "default" in t,
339
- moduleType: typeof t,
340
- module: t
341
- }), new Error(
342
- `exportToSvg is not available from @excalidraw/excalidraw. Module keys: ${c.join(", ")}. Please ensure @excalidraw/excalidraw is properly installed.`
343
- );
344
- }
345
- const p = ((a = o == null ? void 0 : o.getAppState) == null ? void 0 : a.call(o)) ?? C, i = await e({
346
- appState: p,
347
- elements: E,
348
- files: b
349
- }), y = (h = i == null ? void 0 : i.firstElementChild) == null ? void 0 : h.firstElementChild, L = i.getAttribute("viewBox");
350
- if (L != null) {
351
- const t = L.split(" ");
352
- i.setAttribute("width", t[2]), i.setAttribute("height", t[3]);
353
- }
354
- return y && y.tagName === "style" && y.remove(), i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("display", "block"), i.classList.add("excalidraw-svg"), i.outerHTML;
355
- }, [E, b, o, C]), j = () => {
356
- if (E && E.filter((e) => !e.isDeleted).length > 0) {
357
- const e = o == null ? void 0 : o.getAppState(), p = {
358
- exportBackground: e == null ? void 0 : e.exportBackground,
359
- exportScale: e == null ? void 0 : e.exportScale,
360
- exportWithDarkMode: (e == null ? void 0 : e.theme) === "dark",
361
- isBindingEnabled: e == null ? void 0 : e.isBindingEnabled,
362
- isLoading: e == null ? void 0 : e.isLoading,
363
- name: e == null ? void 0 : e.name,
364
- theme: e == null ? void 0 : e.theme,
365
- viewBackgroundColor: e == null ? void 0 : e.viewBackgroundColor,
366
- viewModeEnabled: e == null ? void 0 : e.viewModeEnabled,
367
- zenModeEnabled: e == null ? void 0 : e.zenModeEnabled,
368
- zoom: e == null ? void 0 : e.zoom
369
- };
370
- (async () => {
371
- const i = await R();
372
- r(E, p, b, i);
373
- })();
374
- } else
375
- s();
376
- }, g = (e, p, i) => {
377
- (e == null ? void 0 : e.length) !== (l == null ? void 0 : l.length) && (v.current = !0), D(e), T(i);
378
- };
379
- return /* @__PURE__ */ n(
380
- Ae,
381
- {
382
- opened: u,
383
- onClose: A,
384
- onSave: j,
385
- className: "excaildraw-modal",
386
- closeOnEscape: !1,
387
- children: m && /* @__PURE__ */ n(
388
- ie,
389
- {
390
- fallback: /* @__PURE__ */ n(
391
- "div",
392
- {
393
- style: {
394
- display: "flex",
395
- justifyContent: "center",
396
- alignItems: "center",
397
- height: "100%",
398
- minHeight: "400px"
399
- },
400
- children: /* @__PURE__ */ n(_e, { size: "sm" })
401
- }
402
- ),
403
- children: /* @__PURE__ */ n(
404
- ze,
405
- {
406
- langCode: ye[d.language],
407
- theme: M,
408
- onChange: g,
409
- excalidrawAPI: k,
410
- initialData: {
411
- appState: { ...C || { isLoading: !1 } },
412
- elements: l,
413
- files: x,
414
- scrollToContent: !0
415
- }
416
- }
417
- )
418
- }
419
- )
420
- }
421
- );
422
- }
423
- function Pe({
424
- nodeKey: r,
425
- data: l,
426
- width: C,
427
- height: x,
428
- alignment: u
429
- }) {
430
- var N;
431
- const [s] = se(), A = ce(), v = re(() => Te(l), [l]), o = ((N = v == null ? void 0 : v.elements) == null ? void 0 : N.length) === 0 && !v.previewSVG, [k, d] = S(
432
- o && s.isEditable()
433
- ), [w, M] = S(!1), B = F(null), E = F(null), D = F(null), [b, T, m] = de(r), O = W(
434
- (a) => (b && (a.preventDefault(), s.update(() => {
435
- const h = H(r);
436
- h && h.remove();
437
- })), !1),
438
- [s, b, r]
439
- );
440
- z(() => {
441
- if (!A) {
442
- b && m();
443
- return;
444
- }
445
- return ue(
446
- s.registerCommand(
447
- me,
448
- (a) => {
449
- const h = E.current, t = a.target;
450
- return h !== null && h.contains(t) ? (a.shiftKey || m(), T(!b), a.detail > 1 && d(!0), !0) : !1;
451
- },
452
- $
453
- ),
454
- s.registerCommand(
455
- ge,
456
- O,
457
- $
458
- ),
459
- s.registerCommand(
460
- he,
461
- O,
462
- $
463
- )
464
- );
465
- }, [m, s, b, O, T, A]);
466
- const R = W(() => (d(!1), s.update(() => {
467
- const a = H(r);
468
- a && a.remove();
469
- })), [s, r]), j = (a, h, t, c) => s.update(() => {
470
- const f = H(r);
471
- ne(f) && (a && a.length > 0 || Object.keys(t).length > 0 ? f.setData(
472
- JSON.stringify({
473
- appState: h,
474
- elements: a,
475
- files: t,
476
- previewSVG: c
477
- })
478
- ) : f.remove());
479
- }), { elements: g = [], files: e = {}, appState: p = {}, previewSVG: i } = v, y = W(() => {
480
- d(!1), M(!1), D.current = !1, (g == null ? void 0 : g.length) === 0 && s.update(() => {
481
- const a = H(r);
482
- a && a.remove();
483
- });
484
- }, [s, r, g == null ? void 0 : g.length]), L = W(() => {
485
- D.current ? M(!0) : y();
486
- }, [y]);
487
- return /* @__PURE__ */ _(oe, { children: [
488
- /* @__PURE__ */ n(
489
- Be,
490
- {
491
- isCloseModal: w,
492
- confirmClose: y,
493
- setCloseModalOpen: M
494
- }
495
- ),
496
- /* @__PURE__ */ n(
497
- Re,
498
- {
499
- initialElements: g,
500
- isEdited: D,
501
- initialFiles: e,
502
- initialAppState: p,
503
- isShown: k,
504
- onDelete: R,
505
- onClose: L,
506
- onSave: (a, h, t, c) => {
507
- j(a, h, t, c), d(!1);
508
- },
509
- closeOnClickOutside: !1
510
- }
511
- ),
512
- (g == null ? void 0 : g.length) && /* @__PURE__ */ n(
513
- "div",
514
- {
515
- style: {
516
- display: "flex",
517
- justifyContent: u
518
- },
519
- children: /* @__PURE__ */ n(
520
- Le,
521
- {
522
- imageContainerRef: B,
523
- className: "image",
524
- width: C,
525
- height: x,
526
- editor: s,
527
- nodeKey: r,
528
- alignment: u,
529
- setModalOpen: d,
530
- previewSVG: i,
531
- isModalOpen: k
532
- }
533
- )
534
- }
535
- )
536
- ] });
537
- }
538
- export {
539
- Pe as default
540
- };
@@ -1 +0,0 @@
1
- "use strict";const t={elements:[],files:{},appState:{},previewSVG:null},r=a=>{try{const e=JSON.parse(a);if(Array.isArray(e))return{...t,elements:e};if(e&&typeof e=="object")return{elements:Array.isArray(e.elements)?e.elements:[],files:e.files&&typeof e.files=="object"?e.files:{},appState:e.appState&&typeof e.appState=="object"?e.appState:{},previewSVG:typeof e.previewSVG=="string"?e.previewSVG:typeof e.previewSvg=="string"?e.previewSvg:null}}catch{}return{...t}},s={en:"en-US",ru:"ru-RU",fr:"fr-FR",de:"de-DE",es:"es-ES",it:"it-IT",pt:"pt-BR",zh:"zh-CN",ja:"ja-JP",ko:"ko-KR",ar:"ar-SA",hi:"hi-IN",nl:"nl-NL",tr:"tr-TR",pl:"pl-PL",sv:"sv-SE",cs:"cs-CZ",uk:"uk-UA",ro:"ro-RO",fi:"fi-FI",da:"da-DK",no:"no-NO",el:"el-GR",he:"he-IL",th:"th-TH",id:"id-ID",ms:"ms-MY",vi:"vi-VN"};exports.languageToLocaleMap=s;exports.parseExcalidrawData=r;
@@ -1,54 +0,0 @@
1
- const t = {
2
- elements: [],
3
- files: {},
4
- appState: {},
5
- previewSVG: null
6
- }, a = (r) => {
7
- try {
8
- const e = JSON.parse(r);
9
- if (Array.isArray(e))
10
- return { ...t, elements: e };
11
- if (e && typeof e == "object")
12
- return {
13
- elements: Array.isArray(e.elements) ? e.elements : [],
14
- files: e.files && typeof e.files == "object" ? e.files : {},
15
- appState: e.appState && typeof e.appState == "object" ? e.appState : {},
16
- previewSVG: typeof e.previewSVG == "string" ? e.previewSVG : typeof e.previewSvg == "string" ? e.previewSvg : null
17
- };
18
- } catch {
19
- }
20
- return { ...t };
21
- }, p = {
22
- en: "en-US",
23
- ru: "ru-RU",
24
- fr: "fr-FR",
25
- de: "de-DE",
26
- es: "es-ES",
27
- it: "it-IT",
28
- pt: "pt-BR",
29
- zh: "zh-CN",
30
- ja: "ja-JP",
31
- ko: "ko-KR",
32
- ar: "ar-SA",
33
- hi: "hi-IN",
34
- nl: "nl-NL",
35
- tr: "tr-TR",
36
- pl: "pl-PL",
37
- sv: "sv-SE",
38
- cs: "cs-CZ",
39
- uk: "uk-UA",
40
- ro: "ro-RO",
41
- fi: "fi-FI",
42
- da: "da-DK",
43
- no: "no-NO",
44
- el: "el-GR",
45
- he: "he-IL",
46
- th: "th-TH",
47
- id: "id-ID",
48
- ms: "ms-MY",
49
- vi: "vi-VN"
50
- };
51
- export {
52
- p as l,
53
- a as p
54
- };