@layers-app/editor 0.0.29 → 0.0.31

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 (219) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/{layers.BOibRrKY.js → layers.4tA4S1gU.js} +1 -1
  5. package/dist/{layers.y7XKfK2M.js → layers.5hE_6x_T.js} +1 -1
  6. package/dist/{layers.QQaJgK-3.js → layers.72Qh7liQ.js} +10 -10
  7. package/dist/{layers.D8naFy0w.js → layers.8iFrrVLR.js} +1 -1
  8. package/dist/{layers.DOC0Onpl.js → layers.9-LCou55.js} +1 -1
  9. package/dist/{layers.DlphdLPZ.js → layers.AaLcOghi.js} +1 -1
  10. package/dist/{layers.BaOqzZDo.js → layers.B3wJXher.js} +65 -65
  11. package/dist/{layers.CWRqqdLq.js → layers.B4lGD5Tc.js} +27 -27
  12. package/dist/{layers.CinkO13g.js → layers.B67XaOG0.js} +1 -1
  13. package/dist/{layers.DCAlvV-0.js → layers.B7gfszTe.js} +1 -1
  14. package/dist/{layers.BrFcTrkT.js → layers.B7ld-tK_.js} +5 -5
  15. package/dist/{layers.DOToiIFB.js → layers.B9T9gW6R.js} +1 -1
  16. package/dist/{layers.C6jbv5lL.js → layers.BA2hEd4v.js} +1 -1
  17. package/dist/{layers.FkWwK9pt.js → layers.BFP-9xZT.js} +1 -1
  18. package/dist/{layers.CAlgg2ba.js → layers.BGx0vXxo.js} +1 -1
  19. package/dist/{layers.DMb_rSqp.js → layers.BIjkaoAD.js} +1 -1
  20. package/dist/{layers.Bn7h0_PO.js → layers.BJy-OPeG.js} +1 -1
  21. package/dist/{layers.D4Huv7DR.js → layers.BO7ifTeL.js} +3 -3
  22. package/dist/{layers.CoYjsfZV.js → layers.BOIkZ9z5.js} +1 -1
  23. package/dist/layers.BOiyyA3c.js +1 -0
  24. package/dist/{layers.qOpzfyD3.js → layers.BOpQ9kXs.js} +1 -1
  25. package/dist/{layers.Dhq1eSF7.js → layers.BPKMCOUm.js} +1 -1
  26. package/dist/{layers.BCSaOuQ1.js → layers.BQMm4cvr.js} +1 -1
  27. package/dist/{layers.cX1NN4ZB.js → layers.BSaFaRiH.js} +1 -1
  28. package/dist/{layers.CvxxnOJk.js → layers.BT2RxL4L.js} +1 -1
  29. package/dist/{layers.D0ETVfjp.js → layers.BTl_vP7p.js} +1 -1
  30. package/dist/{layers.V-vdqPil.js → layers.BTtHESQd.js} +1 -1
  31. package/dist/{layers.DTrhwWOZ.js → layers.BUtGPMdX.js} +1041 -1041
  32. package/dist/{layers.C6y_KErF.js → layers.BZ_EeivL.js} +1 -1
  33. package/dist/{layers.V029Ul2p.js → layers.B_Armv20.js} +24 -24
  34. package/dist/{layers.B5lO7ma5.js → layers.BaFCivuV.js} +1 -1
  35. package/dist/{layers.DTB5qpIW.js → layers.BaK_eeZK.js} +1 -1
  36. package/dist/{layers.BaPJ377A.js → layers.Bbo3GO3l.js} +1 -1
  37. package/dist/{layers.D_w3Ag4t.js → layers.BdgLQVA1.js} +1 -1
  38. package/dist/{layers.XQUBdD95.js → layers.BdvJPuIO.js} +1 -1
  39. package/dist/{layers.pHZQrmSX.js → layers.BfkCsSm-.js} +1 -1
  40. package/dist/{layers.0x5kHZ9j.js → layers.BgbYbPZ5.js} +4 -4
  41. package/dist/{layers.B7XBlGlW.js → layers.Bgxs6G0G.js} +1 -1
  42. package/dist/{layers.B_qqQYX7.js → layers.BhhtkwfC.js} +1 -1
  43. package/dist/{layers.BPn87Y-P.js → layers.BhlnP3Lf.js} +1 -1
  44. package/dist/{layers.CM6kSWDJ.js → layers.BibBofY4.js} +1 -1
  45. package/dist/{layers.Z6OA1iTo.js → layers.BinzCGcg.js} +1 -1
  46. package/dist/{layers.D2lX4RIx.js → layers.BiugNkKv.js} +3 -3
  47. package/dist/{layers.CPNW73dw.js → layers.BkHGFa4R.js} +1 -1
  48. package/dist/{layers.BzUVZfrA.js → layers.BlwdnHiw.js} +1 -1
  49. package/dist/{layers.DD0FbLE_.js → layers.Bm6QZIGM.js} +1 -1
  50. package/dist/{layers.DsHueDi2.js → layers.BmQEoM1r.js} +1 -1
  51. package/dist/{layers.9IYRxPhZ.js → layers.BoEbKLww.js} +1 -1
  52. package/dist/{layers.CLL6UFgy.js → layers.BpBCR7vt.js} +1 -1
  53. package/dist/{layers.Cu69BtS3.js → layers.Bt8ng8GL.js} +1 -1
  54. package/dist/{layers.BD1xH803.js → layers.Bu0hpf70.js} +1 -1
  55. package/dist/{layers.D8biYzmQ.js → layers.BvAefLk0.js} +1 -1
  56. package/dist/{layers.BIjbMXbG.js → layers.BvCSkbVr.js} +1 -1
  57. package/dist/{layers.CKeMjhDd.js → layers.BvRxELk7.js} +13594 -12706
  58. package/dist/{layers.H0OmHWM2.js → layers.Bx4GvDzx.js} +1 -1
  59. package/dist/{layers.CQhp9eGu.js → layers.BxS7a2C4.js} +1 -1
  60. package/dist/{layers.6D4d6rRA.js → layers.By5Ft8dn.js} +1 -1
  61. package/dist/{layers.G9aUJ7P0.js → layers.C-7N5Ovs.js} +1 -1
  62. package/dist/{layers.CyayEro7.js → layers.C-XtaLlG.js} +2 -2
  63. package/dist/{layers.BsukaZWB.js → layers.C-eogt7L.js} +1 -1
  64. package/dist/{layers.27ul8mtz.js → layers.C-nomXat.js} +1 -1
  65. package/dist/{layers.CZwvWE0u.js → layers.C0mtxK2T.js} +1 -1
  66. package/dist/{layers.B2WF6t5X.js → layers.C11zHMgR.js} +1 -1
  67. package/dist/{layers.YdsALZmG.js → layers.C196izUk.js} +1 -1
  68. package/dist/{layers.DBXl5ck_.js → layers.C3rT0hRS.js} +1 -1
  69. package/dist/{layers.BZfpIslM.js → layers.C6Y4QBVA.js} +5 -5
  70. package/dist/{layers.B8AEniI_.js → layers.C7LN8uaH.js} +3 -3
  71. package/dist/{layers.BoM7zzQh.js → layers.C8WvNF6m.js} +1 -1
  72. package/dist/{layers.CToiKOqz.js → layers.C8iV5UXY.js} +1 -1
  73. package/dist/{layers.Dnbe3DHX.js → layers.C9lMc97I.js} +1 -1
  74. package/dist/layers.CA_B-6Oi.js +1 -0
  75. package/dist/{layers.Cct_kNIx.js → layers.CCUOTIZq.js} +1 -1
  76. package/dist/{layers.D6fVFq7D.js → layers.CE5r3ZCr.js} +1 -1
  77. package/dist/layers.CI94cE9s.js +4 -0
  78. package/dist/{layers.BgW_qdBy.js → layers.CJJ9hKwX.js} +1 -1
  79. package/dist/{layers.DcxU18i0.js → layers.CJsYZNgO.js} +1 -1
  80. package/dist/{layers.yx_3h5lO.js → layers.CKFgoECy.js} +1 -1
  81. package/dist/{layers.7Vivg-r0.js → layers.CMHWR8sH.js} +1 -1
  82. package/dist/{layers.BXdZJYB5.js → layers.CNAeDpou.js} +1 -1
  83. package/dist/{layers.D0fpd89R.js → layers.COPOsgR5.js} +1 -1
  84. package/dist/{layers.DD-m7zXa.js → layers.COm-03rs.js} +1 -1
  85. package/dist/{layers.Bbma2TS_.js → layers.CPjwdZxX.js} +3 -3
  86. package/dist/{layers.-SoYlGZ4.js → layers.CRWxaEl8.js} +2 -2
  87. package/dist/{layers.CkAtxxlT.js → layers.CS_C463x.js} +1 -1
  88. package/dist/{layers.CKILvYTL.js → layers.CUa7tpfl.js} +1 -1
  89. package/dist/{layers.Dh23O9xV.js → layers.CWXFuSp2.js} +1 -1
  90. package/dist/layers.CXBX2xI4.js +1 -0
  91. package/dist/{layers.BdhDkatQ.js → layers.CZQjy6jR.js} +1 -1
  92. package/dist/{layers.sk0aRHl-.js → layers.CZoXear6.js} +1 -1
  93. package/dist/{layers.D1k7cW3x.js → layers.CZzwVJoU.js} +1 -1
  94. package/dist/{layers.CQ5N9HVy.js → layers.Cb1b4TBC.js} +1 -1
  95. package/dist/{layers.CZvXq10g.js → layers.CdAuSZyb.js} +1 -1
  96. package/dist/{layers.GPEwHHqp.js → layers.CeNN25DI.js} +1 -1
  97. package/dist/layers.CfFbOnwF.js +1 -0
  98. package/dist/{layers.Bq-qzTVY.js → layers.CftzcJ8Y.js} +1 -1
  99. package/dist/{layers.DqdRd9i0.js → layers.CgvlFheA.js} +1 -1
  100. package/dist/{layers.rbYb_9bp.js → layers.Cin31Fld.js} +1 -1
  101. package/dist/{layers.B9C_ydJQ.js → layers.CjiY4CON.js} +4 -4
  102. package/dist/{layers.C7NVHlX3.js → layers.Cl7hUnJL.js} +1 -1
  103. package/dist/{layers.D30Czgu4.js → layers.CnAs3otR.js} +1 -1
  104. package/dist/{layers.B_C67uGt.js → layers.CorvjB_F.js} +9 -9
  105. package/dist/{layers.CkagAevp.js → layers.CphwArIG.js} +2 -2
  106. package/dist/{layers.DGcYEGT3.js → layers.CqEsxtjU.js} +1 -1
  107. package/dist/{layers.CfKxIk3q.js → layers.CrOSAMNP.js} +1 -1
  108. package/dist/{layers.UEG1bSm4.js → layers.CtMf9ZDf.js} +1 -1
  109. package/dist/{layers.B6xyTMaK.js → layers.Cujz_umi.js} +1 -1
  110. package/dist/{layers.DLLPqwb7.js → layers.CvsvUloh.js} +3 -3
  111. package/dist/layers.Cw85wULc.js +52 -0
  112. package/dist/{layers.DQ778Ve4.js → layers.CxHO6mtT.js} +1 -1
  113. package/dist/{layers.CI4I5LhI.js → layers.CxJdoaM3.js} +1 -1
  114. package/dist/layers.CxPRcyka.js +116 -0
  115. package/dist/{layers.C9uQS4gH.js → layers.CyCk-okF.js} +2 -2
  116. package/dist/{layers.BZ_QEbyO.js → layers.CyYSQgjj.js} +1 -1
  117. package/dist/{layers.B0tEq2s6.js → layers.D-2goMPG.js} +1 -1
  118. package/dist/{layers.Bm4YRsyc.js → layers.D0CQuWIK.js} +1 -1
  119. package/dist/{layers.uiYBVREy.js → layers.D0N_GkAK.js} +1 -1
  120. package/dist/{layers.XrKla-FL.js → layers.D0YUZhcx.js} +1 -1
  121. package/dist/{layers.By9vgCc0.js → layers.D2Rs6Xnb.js} +1 -1
  122. package/dist/{layers.D2JnATNe.js → layers.D41PlvBz.js} +2 -2
  123. package/dist/{layers.BHiivtGZ.js → layers.D4notXb0.js} +1 -1
  124. package/dist/{layers.UAO4_g8C.js → layers.D5w64jN3.js} +4 -4
  125. package/dist/{layers.CiV1e4MO.js → layers.D7TjT_B2.js} +1 -1
  126. package/dist/{layers.BJO1Euhs.js → layers.D7l5YJkE.js} +1 -1
  127. package/dist/{layers.CX2bDKWP.js → layers.D8BYcwdo.js} +1 -1
  128. package/dist/{layers.BShAEKRS.js → layers.D9M_5MAE.js} +1 -1
  129. package/dist/{layers.RQi4o0j5.js → layers.DBk3JSR6.js} +1 -1
  130. package/dist/{layers.D9ppEsRM.js → layers.DE6JsOOo.js} +1 -1
  131. package/dist/{layers.PjvaYTA1.js → layers.DEdWeNSt.js} +1 -1
  132. package/dist/{layers.DApRpkqG.js → layers.DGU51yDD.js} +1 -1
  133. package/dist/{layers.LQGtraSs.js → layers.DH0QVd9d.js} +4 -4
  134. package/dist/{layers.DyDL5yGh.js → layers.DJBaSZae.js} +1 -1
  135. package/dist/layers.DJdz7fHL.js +233 -0
  136. package/dist/{layers.DLimLy7k.js → layers.DLAGS2L0.js} +1 -1
  137. package/dist/{layers.DMnWrTAc.js → layers.DLIwLTJz.js} +1 -1
  138. package/dist/{layers.DjPPv1Er.js → layers.DLMh1q98.js} +1 -1
  139. package/dist/{layers.C3A8FMWV.js → layers.DMMza7mQ.js} +1 -1
  140. package/dist/{layers.DR78Ayid.js → layers.DPfnwOk_.js} +1 -1
  141. package/dist/layers.DQbEMpYQ.js +8 -0
  142. package/dist/{layers.C5UfV0AW.js → layers.DQlcfgl8.js} +1 -1
  143. package/dist/{layers.CW-PNnHn.js → layers.DReImtfr.js} +1 -1
  144. package/dist/{layers.GLhLUH5j.js → layers.DYmMGYt1.js} +3 -3
  145. package/dist/{layers.BIgwYIEr.js → layers.DYnOToyi.js} +1 -1
  146. package/dist/{layers.CNCaYY8I.js → layers.DYqjolVc.js} +1 -1
  147. package/dist/{layers.CQfX1ChO.js → layers.DZRxsvJK.js} +1 -1
  148. package/dist/{layers.BbkCkr5n.js → layers.DZt3kbFb.js} +1 -1
  149. package/dist/{layers.0Rb5RtgL.js → layers.DbD4Akok.js} +1 -1
  150. package/dist/{layers.D_I31YYn.js → layers.DePZfgXW.js} +3 -3
  151. package/dist/{layers.CimmUA4L.js → layers.DeuJFNVD.js} +1 -1
  152. package/dist/{layers.BJmYGJpQ.js → layers.DfDl7HVZ.js} +1 -1
  153. package/dist/{layers._hGJtiFF.js → layers.DgayhZ20.js} +4 -4
  154. package/dist/{layers.B8W0NJOR.js → layers.Dgx2hM96.js} +1 -1
  155. package/dist/{layers.CaUC2D92.js → layers.DhnkHVM7.js} +1 -1
  156. package/dist/{layers.BpF9jvwO.js → layers.Di-fuD8Y.js} +3 -3
  157. package/dist/layers.DiEJGHjs.js +348 -0
  158. package/dist/{layers.BANAWfdK.js → layers.DjE5b1JV.js} +1 -1
  159. package/dist/{layers.CnIKr3HC.js → layers.DjaOWhRR.js} +1 -1
  160. package/dist/{layers.C_msKxOz.js → layers.DjgZCMnz.js} +1 -1
  161. package/dist/{layers.BwO5_pmq.js → layers.DlTtUpQ8.js} +4 -4
  162. package/dist/{layers.BrznVoq-.js → layers.DlgFKXUI.js} +3 -3
  163. package/dist/{layers.BBoFnnN_.js → layers.DlyIKCpw.js} +1 -1
  164. package/dist/{layers.B3fYd_9D.js → layers.DnazhkhN.js} +1 -1
  165. package/dist/{layers.DvFRXt5t.js → layers.DpKz2McD.js} +1 -1
  166. package/dist/{layers.B45pZpRt.js → layers.DpWIvnS_.js} +1 -1
  167. package/dist/{layers.CN3_dM2I.js → layers.DpyFHCd9.js} +2 -2
  168. package/dist/{layers.DNI_NjEo.js → layers.DxiKP7eP.js} +1 -1
  169. package/dist/{layers.KjR3SHwr.js → layers.DxxVBrgd.js} +1 -1
  170. package/dist/layers.DzRi66hs.js +1 -0
  171. package/dist/{layers.DZZBGObz.js → layers.E6RW7YDy.js} +1 -1
  172. package/dist/{layers.DiR16JGR.js → layers.Eejl5r9i.js} +1 -1
  173. package/dist/{layers.Bh5qkD3w.js → layers.Gzwn4kQL.js} +1 -1
  174. package/dist/{layers.DdoahV7F.js → layers.J2c6Hp7H.js} +1 -1
  175. package/dist/{layers.VTGR7224.js → layers.JmeF7sJF.js} +4 -4
  176. package/dist/{layers.B3qykxUx.js → layers.KXev_2eS.js} +1 -1
  177. package/dist/{layers.04hul7Cl.js → layers.LLMDHDIv.js} +1 -1
  178. package/dist/{layers.BeKx-2pI.js → layers.M6NpGjSx.js} +2 -2
  179. package/dist/{layers.BZDS7hkL.js → layers.OIcSwfC8.js} +1 -1
  180. package/dist/{layers.BE_G1PBu.js → layers.OmYo2rYp.js} +1 -1
  181. package/dist/{layers.C78DgiuT.js → layers.T3HYKYVF.js} +1 -1
  182. package/dist/{layers.NIA62kKA.js → layers.Tv5ELCZD.js} +3 -3
  183. package/dist/{layers.b-Z1T3Qk.js → layers.WGKiswhG.js} +1 -1
  184. package/dist/{layers.DmzB8yYT.js → layers.WtumrbFc.js} +4 -4
  185. package/dist/{layers.MwcQPa9L.js → layers.ZChFWsyd.js} +1 -1
  186. package/dist/{layers.CxMy14VF.js → layers.aklcpbyN.js} +1 -1
  187. package/dist/{layers.BqpiS_hE.js → layers.cBsOfEPI.js} +59 -59
  188. package/dist/{layers.CG1owC1Y.js → layers.dCAkGIlL.js} +1 -1
  189. package/dist/{layers.CRy22r23.js → layers.eL2GXb_W.js} +1 -1
  190. package/dist/{layers.BBmTszje.js → layers.ep5Idhpt.js} +5 -5
  191. package/dist/{layers.ByOfMpn8.js → layers.gSGALHzV.js} +1 -1
  192. package/dist/{layers.DgpUZDyj.js → layers.gg9wK6a3.js} +1 -1
  193. package/dist/{layers.BwdVvXjR.js → layers.gzvYhrhX.js} +1 -1
  194. package/dist/{layers.DJc7dVG5.js → layers.k_tQsbx8.js} +1 -1
  195. package/dist/{layers.Cw61uzWb.js → layers.lBc_R3q_.js} +1 -1
  196. package/dist/layers.p4Orr7V9.js +164 -0
  197. package/dist/{layers.BRfZjBnJ.js → layers.phqHFhSa.js} +1 -1
  198. package/dist/layers.prcfYQ71.js +6 -0
  199. package/dist/{layers.Cv-WkeWI.js → layers.vCSXIx5x.js} +1 -1
  200. package/dist/{layers.DZP8Sltj.js → layers.w9gHF0OE.js} +1 -1
  201. package/dist/{layers.C22z_lEr.js → layers.wFR-LUZn.js} +1 -1
  202. package/dist/{layers.CVu6Qj2u.js → layers.z96tnZax.js} +1 -1
  203. package/dist/{layers.C2db1CP0.js → layers.zAj1PP3I.js} +1 -1
  204. package/dist/{layers.BbfBmSj-.js → layers.zCSywW5q.js} +1 -1
  205. package/dist/{layers.B2mVB3DA.js → layers.zoPhA96V.js} +1 -1
  206. package/package.json +5 -5
  207. package/dist/layers.B16cpHno.js +0 -1
  208. package/dist/layers.B8JPGn6r.js +0 -1
  209. package/dist/layers.BaqrGe4g.js +0 -6
  210. package/dist/layers.BcFk1Bpa.js +0 -50
  211. package/dist/layers.Bjq79IY_.js +0 -1
  212. package/dist/layers.BriP0h7v.js +0 -8
  213. package/dist/layers.Cm9X0X3T.js +0 -1
  214. package/dist/layers.Cn1jF2Gh.js +0 -164
  215. package/dist/layers.DW9YHURZ.js +0 -233
  216. package/dist/layers.DvkA4OgA.js +0 -116
  217. package/dist/layers.YyZAezbn.js +0 -343
  218. package/dist/layers._Eomtf_i.js +0 -1
  219. package/dist/layers.jO8In61o.js +0 -4
@@ -1,233 +0,0 @@
1
- import { jsx as s, jsxs as z, Fragment as L } from "react/jsx-runtime";
2
- import { useState as A, useEffect as F, useRef as T, useCallback as M, useMemo as _ } from "react";
3
- import { i as $, A as J, j as U, F as W, d as b, k as y, m as q, u as G, n as P, o as Q, N as V, p as X, K as O, w as Y, r as Z } from "./layers.CKeMjhDd.js";
4
- import { useTranslation as K } from "react-i18next";
5
- import { M as ee, H as te } from "./layers.DTrhwWOZ.js";
6
- import { useMantineTheme as ie, Box as H, Tooltip as R, ActionIcon as j } from "@mantine/core";
7
- import { IconEdit as ne } from "@tabler/icons-react";
8
- const se = (e) => {
9
- var m;
10
- const a = (m = e == null ? void 0 : e.firstElementChild) == null ? void 0 : m.firstElementChild, u = e.getAttribute("viewBox");
11
- if (u != null) {
12
- const l = u.split(" ");
13
- e.setAttribute("width", l[2]), e.setAttribute("height", l[3]);
14
- }
15
- a && a.tagName === "style" && a.remove();
16
- };
17
- function ae({
18
- elements: e,
19
- files: a,
20
- imageContainerRef: u,
21
- appState: m,
22
- editor: l,
23
- rootClassName: i = null,
24
- width: C = "inherit",
25
- height: E = "inherit",
26
- nodeKey: r,
27
- alignment: N,
28
- setModalOpen: v
29
- }) {
30
- const [o, w] = A(null), [p, S] = A(!1);
31
- ie();
32
- const { t: x } = K();
33
- F(() => {
34
- (async () => {
35
- const n = await ee({
36
- appState: m,
37
- elements: e,
38
- files: a
39
- });
40
- se(n), n.setAttribute("width", "100%"), n.setAttribute("height", "100%"), n.setAttribute("display", "block"), n.classList.add("excalidraw-svg"), w(n);
41
- })();
42
- }, [e, a, m]);
43
- const h = (d, n) => {
44
- l.update(() => {
45
- W(null);
46
- const g = b(r);
47
- return y(g) && g.setWidthAndHeight(d, n), !0;
48
- });
49
- }, k = (d) => {
50
- q(l, r);
51
- };
52
- return /* @__PURE__ */ s(
53
- $,
54
- {
55
- editor: l,
56
- isIcon: !1,
57
- isEmbed: !0,
58
- width: C,
59
- height: E,
60
- onResizeEnd: h,
61
- alignment: N,
62
- children: /* @__PURE__ */ z(H, { className: "media-wrapper excaildraw", children: [
63
- /* @__PURE__ */ z("div", { className: "media-actions", children: [
64
- /* @__PURE__ */ s(R, { label: x("editor.link.edit"), children: /* @__PURE__ */ s(
65
- j,
66
- {
67
- color: "gray",
68
- "aria-label": "Settings",
69
- className: "media-action",
70
- variant: "default",
71
- size: 24,
72
- onClick: () => {
73
- v(!0);
74
- },
75
- children: /* @__PURE__ */ s(ne, { size: 14 })
76
- }
77
- ) }),
78
- /* @__PURE__ */ s(
79
- J,
80
- {
81
- opened: p,
82
- setOpened: S,
83
- t: x,
84
- editor: l,
85
- nodeKey: r
86
- }
87
- ),
88
- /* @__PURE__ */ s(R, { label: x("editor.actions.delete"), children: /* @__PURE__ */ s(
89
- j,
90
- {
91
- color: "gray",
92
- "aria-label": "Settings",
93
- className: "media-action",
94
- variant: "default",
95
- size: 24,
96
- onClick: k,
97
- children: /* @__PURE__ */ s(U, { name: "trash", size: "14" })
98
- }
99
- ) })
100
- ] }),
101
- /* @__PURE__ */ s(
102
- H,
103
- {
104
- w: "100%",
105
- ref: (d) => {
106
- d && u && (u.current = d);
107
- },
108
- className: i ?? "",
109
- dangerouslySetInnerHTML: { __html: (o == null ? void 0 : o.outerHTML) ?? "" }
110
- }
111
- )
112
- ] })
113
- }
114
- );
115
- }
116
- function fe({
117
- nodeKey: e,
118
- data: a,
119
- width: u,
120
- height: m,
121
- alignment: l
122
- }) {
123
- const [i] = G(), C = P(), [E, r] = A(
124
- a === "[]" && i.isEditable()
125
- ), N = T(null), v = T(null), [o, w, p] = Q(e), [S, x] = A(!1), h = M(
126
- (t) => (o && (t.preventDefault(), i.update(() => {
127
- const c = b(e);
128
- c && c.remove();
129
- })), !1),
130
- [i, o, e]
131
- );
132
- F(() => {
133
- if (!C) {
134
- o && p();
135
- return;
136
- }
137
- return V(
138
- i.registerCommand(
139
- Z,
140
- (t) => {
141
- const c = v.current, f = t.target;
142
- return S ? !0 : c !== null && c.contains(f) ? (t.shiftKey || p(), w(!o), t.detail > 1 && (console.log("--- HUI"), r(!0)), !0) : !1;
143
- },
144
- O
145
- ),
146
- i.registerCommand(
147
- Y,
148
- h,
149
- O
150
- ),
151
- i.registerCommand(
152
- X,
153
- h,
154
- O
155
- )
156
- );
157
- }, [
158
- p,
159
- i,
160
- o,
161
- S,
162
- h,
163
- w,
164
- C
165
- ]);
166
- const k = M(() => (r(!1), i.update(() => {
167
- const t = b(e);
168
- t && t.remove();
169
- })), [i, e]), d = (t, c, f) => i.update(() => {
170
- const I = b(e);
171
- y(I) && (t && t.length > 0 || Object.keys(f).length > 0 ? I.setData(
172
- JSON.stringify({
173
- appState: c,
174
- elements: t,
175
- files: f
176
- })
177
- ) : I.remove());
178
- }), {
179
- elements: n = [],
180
- files: g = {},
181
- appState: D = {}
182
- } = _(() => JSON.parse(a), [a]), B = M(() => {
183
- r(!1), n.length === 0 && i.update(() => {
184
- const t = b(e);
185
- t && t.remove();
186
- });
187
- }, [i, e, n.length]);
188
- return /* @__PURE__ */ z(L, { children: [
189
- /* @__PURE__ */ s(
190
- te,
191
- {
192
- initialElements: n,
193
- initialFiles: g,
194
- initialAppState: D,
195
- isShown: E,
196
- onDelete: k,
197
- onClose: B,
198
- onSave: (t, c, f) => {
199
- d(t, c, f), r(!1);
200
- },
201
- closeOnClickOutside: !1
202
- }
203
- ),
204
- n.length > 0 && /* @__PURE__ */ s(
205
- "div",
206
- {
207
- style: {
208
- display: "flex",
209
- justifyContent: l
210
- },
211
- children: /* @__PURE__ */ s(
212
- ae,
213
- {
214
- imageContainerRef: N,
215
- className: "image",
216
- elements: n,
217
- files: g,
218
- appState: D,
219
- width: u,
220
- height: m,
221
- editor: i,
222
- nodeKey: e,
223
- alignment: l,
224
- setModalOpen: r
225
- }
226
- )
227
- }
228
- )
229
- ] });
230
- }
231
- export {
232
- fe as default
233
- };
@@ -1,116 +0,0 @@
1
- "use strict";const G=require("./layers.9QK1wiQj.js"),r=require("./layers.BrznVoq-.js"),P=require("./layers.CX2bDKWP.js"),V=require("lodash-es"),j=require("./layers._Eomtf_i.js");function F(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(o,i,a.get?a:{enumerable:!0,get:()=>e[i]})}}return o.default=e,Object.freeze(o)}const E=F(V);function N(e){return new r.Selection([document.querySelectorAll(e)],[document.documentElement])}function M(e,o){return!!e.children(o).length}function R(e){return _(e.v)+":"+_(e.w)+":"+_(e.name)}var H=/:/g;function _(e){return e?String(e).replace(H,"\\:"):""}function B(e,o){o&&e.attr("style",o)}function K(e,o,i){o&&e.attr("class",o).attr("class",i+" "+e.attr("class"))}function O(e,o){var i=o.graph();if(E.isPlainObject(i)){var a=i.transition;if(E.isFunction(a))return a(e)}return e}function D(e,o){var i=e.append("foreignObject").attr("width","100000"),a=i.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var d=o.label;switch(typeof d){case"function":a.insert(d);break;case"object":a.insert(function(){return d});break;default:a.html(d)}B(a,o.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var p=a.node().getBoundingClientRect();return i.attr("width",p.width).attr("height",p.height),i}const I={},U=function(e){const o=Object.keys(e);for(const i of o)I[i]=e[i]},q=async function(e,o,i,a,d,p){const g=a.select(`[id="${i}"]`),s=Object.keys(e);for(const b of s){const l=e[b];let h="default";l.classes.length>0&&(h=l.classes.join(" ")),h=h+" flowchart-label";const w=r.getStylesFromArray(l.styles);let t=l.text!==void 0?l.text:l.id,c;if(r.log$1.info("vertex",l,l.labelType),l.labelType==="markdown")r.log$1.info("vertex",l,l.labelType);else if(r.evaluate(r.getConfig().flowchart.htmlLabels))c=D(g,{label:t}).node(),c.parentNode.removeChild(c);else{const k=d.createElementNS("http://www.w3.org/2000/svg","text");k.setAttribute("style",w.labelStyle.replace("color:","fill:"));const T=t.split(r.common$1.lineBreakRegex);for(const $ of T){const v=d.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=$,k.appendChild(v)}c=k}let f=0,n="";switch(l.type){case"round":f=5,n="rect";break;case"square":n="rect";break;case"diamond":n="question";break;case"hexagon":n="hexagon";break;case"odd":n="rect_left_inv_arrow";break;case"lean_right":n="lean_right";break;case"lean_left":n="lean_left";break;case"trapezoid":n="trapezoid";break;case"inv_trapezoid":n="inv_trapezoid";break;case"odd_right":n="rect_left_inv_arrow";break;case"circle":n="circle";break;case"ellipse":n="ellipse";break;case"stadium":n="stadium";break;case"subroutine":n="subroutine";break;case"cylinder":n="cylinder";break;case"group":n="rect";break;case"doublecircle":n="doublecircle";break;default:n="rect"}const S=await r.renderKatex(t,r.getConfig());o.setNode(l.id,{labelStyle:w.labelStyle,shape:n,labelText:S,labelType:l.labelType,rx:f,ry:f,class:h,style:w.style,id:l.id,link:l.link,linkTarget:l.linkTarget,tooltip:p.db.getTooltip(l.id)||"",domId:p.db.lookUpDomId(l.id),haveCallback:l.haveCallback,width:l.type==="group"?500:void 0,dir:l.dir,type:l.type,props:l.props,padding:r.getConfig().flowchart.padding}),r.log$1.info("setNode",{labelStyle:w.labelStyle,labelType:l.labelType,shape:n,labelText:S,rx:f,ry:f,class:h,style:w.style,id:l.id,domId:p.db.lookUpDomId(l.id),width:l.type==="group"?500:void 0,type:l.type,dir:l.dir,props:l.props,padding:r.getConfig().flowchart.padding})}},z=async function(e,o,i){r.log$1.info("abc78 edges = ",e);let a=0,d={},p,g;if(e.defaultStyle!==void 0){const s=r.getStylesFromArray(e.defaultStyle);p=s.style,g=s.labelStyle}for(const s of e){a++;const b="L-"+s.start+"-"+s.end;d[b]===void 0?(d[b]=0,r.log$1.info("abc78 new entry",b,d[b])):(d[b]++,r.log$1.info("abc78 new entry",b,d[b]));let l=b+"-"+d[b];r.log$1.info("abc78 new link id to be used is",b,l,d[b]);const h="LS-"+s.start,w="LE-"+s.end,t={style:"",labelStyle:""};switch(t.minlen=s.length||1,s.type==="arrow_open"?t.arrowhead="none":t.arrowhead="normal",t.arrowTypeStart="arrow_open",t.arrowTypeEnd="arrow_open",s.type){case"double_arrow_cross":t.arrowTypeStart="arrow_cross";case"arrow_cross":t.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":t.arrowTypeStart="arrow_point";case"arrow_point":t.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":t.arrowTypeStart="arrow_circle";case"arrow_circle":t.arrowTypeEnd="arrow_circle";break}let c="",f="";switch(s.stroke){case"normal":c="fill:none;",p!==void 0&&(c=p),g!==void 0&&(f=g),t.thickness="normal",t.pattern="solid";break;case"dotted":t.thickness="normal",t.pattern="dotted",t.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":t.thickness="thick",t.pattern="solid",t.style="stroke-width: 3.5px;fill:none;";break;case"invisible":t.thickness="invisible",t.pattern="solid",t.style="stroke-width: 0;fill:none;";break}if(s.style!==void 0){const n=r.getStylesFromArray(s.style);c=n.style,f=n.labelStyle}t.style=t.style+=c,t.labelStyle=t.labelStyle+=f,s.interpolate!==void 0?t.curve=r.interpolateToCurve(s.interpolate,r.curveLinear):e.defaultInterpolate!==void 0?t.curve=r.interpolateToCurve(e.defaultInterpolate,r.curveLinear):t.curve=r.interpolateToCurve(I.curve,r.curveLinear),s.text===void 0?s.style!==void 0&&(t.arrowheadStyle="fill: #333"):(t.arrowheadStyle="fill: #333",t.labelpos="c"),t.labelType=s.labelType,t.label=await r.renderKatex(s.text.replace(r.common$1.lineBreakRegex,`
2
- `),r.getConfig()),s.style===void 0&&(t.style=t.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),t.labelStyle=t.labelStyle.replace("color:","fill:"),t.id=l,t.classes="flowchart-link "+h+" "+w,o.setEdge(s.start,s.end,t,a)}},W=function(e,o){return o.db.getClasses()},X=async function(e,o,i,a){r.log$1.info("Drawing flowchart");let d=a.db.getDirection();d===void 0&&(d="TD");const{securityLevel:p,flowchart:g}=r.getConfig(),s=g.nodeSpacing||50,b=g.rankSpacing||50;let l;p==="sandbox"&&(l=r.select("#i"+o));const h=p==="sandbox"?r.select(l.nodes()[0].contentDocument.body):r.select("body"),w=p==="sandbox"?l.nodes()[0].contentDocument:document,t=new G.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:s,ranksep:b,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let c;const f=a.db.getSubGraphs();r.log$1.info("Subgraphs - ",f);for(let u=f.length-1;u>=0;u--)c=f[u],r.log$1.info("Subgraph - ",c),a.db.addVertex(c.id,{text:c.title,type:c.labelType},"group",void 0,c.classes,c.dir);const n=a.db.getVertices(),S=a.db.getEdges();r.log$1.info("Edges",S);let k=0;for(k=f.length-1;k>=0;k--){c=f[k],N("cluster").append("text");for(let u=0;u<c.nodes.length;u++)r.log$1.info("Setting up subgraphs",c.nodes[u],c.id),t.setParent(c.nodes[u],c.id)}await q(n,t,o,h,w,a),await z(S,t);const T=h.select(`[id="${o}"]`),$=h.select("#"+o+" g");if(await P.render($,t,["point","circle","cross"],"flowchart",o),r.utils.insertTitle(T,"flowchartTitleText",g.titleTopMargin,a.db.getDiagramTitle()),r.setupGraphViewbox$1(t,T,g.diagramPadding,g.useMaxWidth),a.db.indexNodes("subGraph"+k),!g.htmlLabels){const u=w.querySelectorAll('[id="'+o+'"] .edgeLabel .label');for(const x of u){const m=x.getBBox(),y=w.createElementNS("http://www.w3.org/2000/svg","rect");y.setAttribute("rx",0),y.setAttribute("ry",0),y.setAttribute("width",m.width),y.setAttribute("height",m.height),x.insertBefore(y,x.firstChild)}}Object.keys(n).forEach(function(u){const x=n[u];if(x.link){const m=r.select("#"+o+' [id="'+u+'"]');if(m){const y=w.createElementNS("http://www.w3.org/2000/svg","a");y.setAttributeNS("http://www.w3.org/2000/svg","class",x.classes.join(" ")),y.setAttributeNS("http://www.w3.org/2000/svg","href",x.link),y.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),p==="sandbox"?y.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):x.linkTarget&&y.setAttributeNS("http://www.w3.org/2000/svg","target",x.linkTarget);const C=m.insert(function(){return y},":first-child"),L=m.select(".label-container");L&&C.append(function(){return L.node()});const A=m.select(".label");A&&C.append(function(){return A.node()})}}})},J={setConf:U,addVertices:q,addEdges:z,getClasses:W,draw:X},Q=(e,o)=>{const i=j.channel,a=i(e,"r"),d=i(e,"g"),p=i(e,"b");return r.rgba(a,d,p,o)},Y=e=>`.label {
3
- font-family: ${e.fontFamily};
4
- color: ${e.nodeTextColor||e.textColor};
5
- }
6
- .cluster-label text {
7
- fill: ${e.titleColor};
8
- }
9
- .cluster-label span,p {
10
- color: ${e.titleColor};
11
- }
12
-
13
- .label text,span,p {
14
- fill: ${e.nodeTextColor||e.textColor};
15
- color: ${e.nodeTextColor||e.textColor};
16
- }
17
-
18
- .node rect,
19
- .node circle,
20
- .node ellipse,
21
- .node polygon,
22
- .node path {
23
- fill: ${e.mainBkg};
24
- stroke: ${e.nodeBorder};
25
- stroke-width: 1px;
26
- }
27
- .flowchart-label text {
28
- text-anchor: middle;
29
- }
30
- // .flowchart-label .text-outer-tspan {
31
- // text-anchor: middle;
32
- // }
33
- // .flowchart-label .text-inner-tspan {
34
- // text-anchor: start;
35
- // }
36
-
37
- .node .katex path {
38
- fill: #000;
39
- stroke: #000;
40
- stroke-width: 1px;
41
- }
42
-
43
- .node .label {
44
- text-align: center;
45
- }
46
- .node.clickable {
47
- cursor: pointer;
48
- }
49
-
50
- .arrowheadPath {
51
- fill: ${e.arrowheadColor};
52
- }
53
-
54
- .edgePath .path {
55
- stroke: ${e.lineColor};
56
- stroke-width: 2.0px;
57
- }
58
-
59
- .flowchart-link {
60
- stroke: ${e.lineColor};
61
- fill: none;
62
- }
63
-
64
- .edgeLabel {
65
- background-color: ${e.edgeLabelBackground};
66
- rect {
67
- opacity: 0.5;
68
- background-color: ${e.edgeLabelBackground};
69
- fill: ${e.edgeLabelBackground};
70
- }
71
- text-align: center;
72
- }
73
-
74
- /* For html labels only */
75
- .labelBkg {
76
- background-color: ${Q(e.edgeLabelBackground,.5)};
77
- // background-color:
78
- }
79
-
80
- .cluster rect {
81
- fill: ${e.clusterBkg};
82
- stroke: ${e.clusterBorder};
83
- stroke-width: 1px;
84
- }
85
-
86
- .cluster text {
87
- fill: ${e.titleColor};
88
- }
89
-
90
- .cluster span,p {
91
- color: ${e.titleColor};
92
- }
93
- /* .cluster div {
94
- color: ${e.titleColor};
95
- } */
96
-
97
- div.mermaidTooltip {
98
- position: absolute;
99
- text-align: center;
100
- max-width: 200px;
101
- padding: 2px;
102
- font-family: ${e.fontFamily};
103
- font-size: 12px;
104
- background: ${e.tertiaryColor};
105
- border: 1px solid ${e.border2};
106
- border-radius: 2px;
107
- pointer-events: none;
108
- z-index: 100;
109
- }
110
-
111
- .flowchartTitleText {
112
- text-anchor: middle;
113
- font-size: 18px;
114
- fill: ${e.textColor};
115
- }
116
- `,Z=Y;exports.addHtmlLabel=D;exports.applyClass=K;exports.applyStyle=B;exports.applyTransition=O;exports.edgeToId=R;exports.flowRendererV2=J;exports.flowStyles=Z;exports.isSubgraph=M;exports.selectAll=N;
@@ -1,343 +0,0 @@
1
- import { jsx as a, jsxs as v, Fragment as j } from "react/jsx-runtime";
2
- import { useRef as k, useContext as K, useMemo as U, useEffect as P, useState as y, useCallback as M, Suspense as W } from "react";
3
- import { v as R, x as z, l as G, y as H, o as J, u as Q, z as T, B as D, d as A, D as q, F as O, N as V, G as X, K as x, H as Y, p as Z, w as ee, J as te, r as ne, L as ae, M as le, O as oe, P as re, Q as se, S as ie } from "./layers.CKeMjhDd.js";
4
- import { Button as ce, TextInput as de } from "@mantine/core";
5
- function ue(e) {
6
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
- }
8
- var me = ue(function(e) {
9
- const t = new URLSearchParams();
10
- t.append("code", e);
11
- for (let n = 1; n < arguments.length; n++) t.append("v", arguments[n]);
12
- throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
13
- });
14
- function $(e) {
15
- const t = e.transform();
16
- return t !== null ? /* @__PURE__ */ new Set([t]) : /* @__PURE__ */ new Set();
17
- }
18
- function fe({ initialEditor: e, children: t, initialNodes: n, initialTheme: c, skipCollabChecks: r }) {
19
- const s = k(!1), o = K(R);
20
- o == null && me(9);
21
- const [m, { getTheme: E }] = o, w = U(() => {
22
- const u = c || E() || void 0, p = z(o, u);
23
- if (u !== void 0 && (e._config.theme = u), e._parentEditor = m, n) for (let l of n) {
24
- let I = null, g = null;
25
- if (typeof l != "function") {
26
- const _ = l;
27
- l = _.replace, I = _.with, g = _.withKlass || null;
28
- }
29
- const S = e._nodes.get(l.getType());
30
- e._nodes.set(l.getType(), { exportDOM: S ? S.exportDOM : void 0, klass: l, replace: I, replaceWithKlass: g, transforms: $(l) });
31
- }
32
- else {
33
- const l = e._nodes = new Map(m._nodes);
34
- for (const [I, g] of l) e._nodes.set(I, { exportDOM: g.exportDOM, klass: g.klass, replace: g.replace, replaceWithKlass: g.replaceWithKlass, transforms: $(g.klass) });
35
- }
36
- return e._config.namespace = m._config.namespace, e._editable = m._editable, [e, p];
37
- }, []), { isCollabActive: b, yjsDocMap: C } = G(), d = r || s.current || C.has(e.getKey());
38
- return P(() => {
39
- d && (s.current = !0);
40
- }, [d]), P(() => m.registerEditableListener((u) => {
41
- e.setEditable(u);
42
- }), [e, m]), a(R.Provider, { value: w, children: !b || d ? t : null });
43
- }
44
- function pe({
45
- "data-test-id": e,
46
- children: t,
47
- className: n,
48
- onClick: c,
49
- disabled: r,
50
- small: s,
51
- title: o
52
- }) {
53
- return /* @__PURE__ */ a(ce, { onClick: c, disabled: r, variant: "filled", children: t });
54
- }
55
- function ge({
56
- children: e,
57
- className: t
58
- }) {
59
- return /* @__PURE__ */ a("div", { className: t || "Placeholder__root", children: e });
60
- }
61
- function he({
62
- children: e,
63
- label: t,
64
- className: n,
65
- ...c
66
- }) {
67
- return /* @__PURE__ */ v("div", { className: "Input__wrapper", children: [
68
- /* @__PURE__ */ a("label", { style: { marginTop: "-1em" }, className: "Input__label", children: t }),
69
- /* @__PURE__ */ a("select", { ...c, className: n || "select", children: e })
70
- ] });
71
- }
72
- function ve({
73
- label: e,
74
- value: t,
75
- onChange: n,
76
- placeholder: c = "",
77
- "data-test-id": r,
78
- type: s = "text"
79
- }) {
80
- return /* @__PURE__ */ a(
81
- de,
82
- {
83
- type: s,
84
- placeholder: c,
85
- value: t,
86
- onChange: (o) => {
87
- n(o.target.value);
88
- },
89
- label: e,
90
- "data-test-id": r,
91
- mb: 10
92
- }
93
- );
94
- }
95
- const B = /* @__PURE__ */ new Set();
96
- function be(e) {
97
- if (!B.has(e))
98
- throw new Promise((t) => {
99
- const n = new Image();
100
- n.src = e, n.onload = () => {
101
- B.add(e), t(null);
102
- };
103
- });
104
- }
105
- function Ce({
106
- altText: e,
107
- className: t,
108
- imageRef: n,
109
- src: c,
110
- width: r,
111
- height: s,
112
- position: o
113
- }) {
114
- return be(c), /* @__PURE__ */ a(
115
- "img",
116
- {
117
- className: t || void 0,
118
- src: c,
119
- alt: e,
120
- ref: n,
121
- "data-position": o,
122
- style: {
123
- display: "block",
124
- height: s,
125
- width: r
126
- },
127
- draggable: "false"
128
- }
129
- );
130
- }
131
- function _e({
132
- activeEditor: e,
133
- nodeKey: t,
134
- onClose: n
135
- }) {
136
- const r = e.getEditorState().read(
137
- () => A(t)
138
- ), [s, o] = y(r.getAltText()), [m, E] = y(r.getShowCaption()), [w, b] = y(r.getPosition()), C = (p) => {
139
- E(p.target.checked);
140
- }, d = (p) => {
141
- b(p.target.value);
142
- }, u = () => {
143
- const p = { altText: s, position: w, showCaption: m };
144
- r && e.update(() => {
145
- r.update(p);
146
- }), n();
147
- };
148
- return /* @__PURE__ */ v(j, { children: [
149
- /* @__PURE__ */ a("div", { style: { marginBottom: "1em" }, children: /* @__PURE__ */ a(
150
- ve,
151
- {
152
- label: "Alt-текст",
153
- placeholder: "Альтернативный текст",
154
- onChange: o,
155
- value: s,
156
- "data-test-id": "image-modal-alt-text-input"
157
- }
158
- ) }),
159
- /* @__PURE__ */ v(
160
- he,
161
- {
162
- style: { marginBottom: "1em", width: "208px" },
163
- value: w,
164
- label: "Position",
165
- name: "position",
166
- id: "position-select",
167
- onChange: d,
168
- children: [
169
- /* @__PURE__ */ a("option", { value: "left", children: "Left" }),
170
- /* @__PURE__ */ a("option", { value: "right", children: "Right" }),
171
- /* @__PURE__ */ a("option", { value: "full", children: "Full Width" })
172
- ]
173
- }
174
- ),
175
- /* @__PURE__ */ v("div", { className: "Input__wrapper", children: [
176
- /* @__PURE__ */ a(
177
- "input",
178
- {
179
- id: "caption",
180
- type: "checkbox",
181
- checked: m,
182
- onChange: C
183
- }
184
- ),
185
- /* @__PURE__ */ a("label", { htmlFor: "caption", children: "Show Caption" })
186
- ] }),
187
- /* @__PURE__ */ a(
188
- pe,
189
- {
190
- "data-test-id": "image-modal-file-upload-btn",
191
- onClick: () => u(),
192
- children: "Применить"
193
- }
194
- )
195
- ] });
196
- }
197
- function Ne({
198
- src: e,
199
- altText: t,
200
- nodeKey: n,
201
- width: c,
202
- height: r,
203
- showCaption: s,
204
- caption: o,
205
- position: m
206
- }) {
207
- const [E, w] = H(), b = k(null), C = k(null), [d, u, p] = J(n), [l] = Q(), [I, g] = y(null), S = k(null), _ = M(
208
- (f) => {
209
- if (d && T(D())) {
210
- f.preventDefault();
211
- const i = A(n);
212
- q(i) && i.remove();
213
- }
214
- return !1;
215
- },
216
- [d, n]
217
- ), F = M(
218
- (f) => {
219
- const h = D(), i = C.current;
220
- if (d && T(h) && h.getNodes().length === 1) {
221
- if (s)
222
- return O(null), f.preventDefault(), o.focus(), !0;
223
- if (i !== null && i !== document.activeElement)
224
- return f.preventDefault(), i.focus(), !0;
225
- }
226
- return !1;
227
- },
228
- [o, d, s]
229
- ), L = M(
230
- (f) => S.current === o || C.current === f.target ? (O(null), l.update(() => {
231
- u(!0);
232
- const h = l.getRootElement();
233
- h !== null && h.focus();
234
- }), !0) : !1,
235
- [o, l, u]
236
- );
237
- return P(() => {
238
- let f = !0;
239
- const h = V(
240
- l.registerUpdateListener(({ editorState: i }) => {
241
- f && g(i.read(() => D()));
242
- }),
243
- l.registerCommand(
244
- ae,
245
- (i, N) => (S.current = N, !1),
246
- x
247
- ),
248
- l.registerCommand(
249
- ne,
250
- (i) => {
251
- const N = i;
252
- return N.target === b.current ? (N.shiftKey ? u(!d) : (p(), u(!0)), !0) : !1;
253
- },
254
- x
255
- ),
256
- l.registerCommand(
257
- te,
258
- (i) => i.target === b.current ? (i.preventDefault(), !0) : !1,
259
- x
260
- ),
261
- l.registerCommand(
262
- ee,
263
- _,
264
- x
265
- ),
266
- l.registerCommand(
267
- Z,
268
- _,
269
- x
270
- ),
271
- l.registerCommand(Y, F, x),
272
- l.registerCommand(
273
- X,
274
- L,
275
- x
276
- )
277
- );
278
- return () => {
279
- f = !1, h();
280
- };
281
- }, [
282
- p,
283
- l,
284
- d,
285
- n,
286
- _,
287
- F,
288
- L,
289
- u
290
- ]), /* @__PURE__ */ v(W, { fallback: null, children: [
291
- /* @__PURE__ */ v(j, { children: [
292
- /* @__PURE__ */ v("div", { draggable: !1, children: [
293
- /* @__PURE__ */ a(
294
- "button",
295
- {
296
- className: "image-edit-button",
297
- ref: C,
298
- onClick: () => {
299
- w("Update Inline Image", (f) => /* @__PURE__ */ a(
300
- _e,
301
- {
302
- activeEditor: l,
303
- nodeKey: n,
304
- onClose: f
305
- }
306
- ));
307
- },
308
- children: "Edit"
309
- }
310
- ),
311
- /* @__PURE__ */ a(
312
- Ce,
313
- {
314
- className: d ? `focused ${T(I) ? "draggable" : ""}` : null,
315
- src: e,
316
- altText: t,
317
- imageRef: b,
318
- width: c,
319
- height: r,
320
- position: m
321
- }
322
- )
323
- ] }),
324
- s && /* @__PURE__ */ a("div", { className: "image-caption-container", children: /* @__PURE__ */ v(fe, { initialEditor: o, children: [
325
- /* @__PURE__ */ a(le, {}),
326
- /* @__PURE__ */ a(oe, {}),
327
- /* @__PURE__ */ a(
328
- re,
329
- {
330
- contentEditable: /* @__PURE__ */ a(ie, { className: "InlineImageNode__contentEditable" }),
331
- placeholder: /* @__PURE__ */ a(ge, { className: "InlineImageNode__placeholder", children: "Enter a caption..." }),
332
- ErrorBoundary: se
333
- }
334
- )
335
- ] }) })
336
- ] }),
337
- E
338
- ] });
339
- }
340
- export {
341
- _e as UpdateInlineImageDialog,
342
- Ne as default
343
- };
@@ -1 +0,0 @@
1
- "use strict";const n=require("./layers.BrznVoq-.js"),s=(e,r)=>n.Utils.lang.round(n.Color.parse(e)[r]);exports.channel=s;