@layers-app/editor 1.0.3 → 2.0.1

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 +3 -1
  3. package/dist/index.js +4 -4
  4. package/dist/{layers.BtkGrvna.js → layers.-tEbFEea.js} +1 -1
  5. package/dist/{layers.CoP0to8I.js → layers.1iQaRppm.js} +1 -1
  6. package/dist/{layers.CGhtwC30.js → layers.3hQu2S_W.js} +1 -1
  7. package/dist/{layers.BC_C1xrO.js → layers.7aU-H2uI.js} +1 -1
  8. package/dist/{layers.B4LkaY4I.js → layers.8Pb_NF3J.js} +1 -1
  9. package/dist/{layers.DD7aZQnD.js → layers.B-rj7oTM.js} +1 -1
  10. package/dist/{layers.WQvYuSwW.js → layers.B0Swa5pj.js} +1 -1
  11. package/dist/{layers.DLctGG_3.js → layers.B4Q2wfB6.js} +1 -1
  12. package/dist/{layers.F82lqsPC.js → layers.B5tfuvvb.js} +4 -4
  13. package/dist/{layers.lrAO18lI.js → layers.B7hUyZYE.js} +1 -1
  14. package/dist/{layers.CgMEQGfs.js → layers.B87JL-Ab.js} +3 -3
  15. package/dist/{layers.CE_fwNjO.js → layers.B8OqtRY0.js} +1 -1
  16. package/dist/{layers.DY-B5W5L.js → layers.BAWhP4OK.js} +1 -1
  17. package/dist/{layers.gvccbahe.js → layers.BCO7xt78.js} +1 -1
  18. package/dist/{layers.BMH45keY.js → layers.BCqayhjh.js} +1 -1
  19. package/dist/{layers.CgdvXa_C.js → layers.BDL62gCx.js} +1 -1
  20. package/dist/{layers.z09VrGdB.js → layers.BEfYTrlS.js} +1 -1
  21. package/dist/{layers.Cm_AJ7S3.js → layers.BEuTfkxl.js} +1 -1
  22. package/dist/{layers.BqvXYWeI.js → layers.BFLIxvTQ.js} +1 -1
  23. package/dist/{layers.D1d86UTe.js → layers.BK4IKcTn.js} +1 -1
  24. package/dist/{layers.DdCV13yl.js → layers.BKbrY6tU.js} +1 -1
  25. package/dist/{layers.Dt27XqD2.js → layers.BMP4kJwf.js} +4 -4
  26. package/dist/{layers.CH7NJtjz.js → layers.BMP_74lB.js} +1 -1
  27. package/dist/{layers.CbaR6nQ1.js → layers.BN4qRLeM.js} +11 -11
  28. package/dist/{layers.BgSnaqEl.js → layers.BN8UhSmo.js} +1 -1
  29. package/dist/layers.BO3G20N6.js +8 -0
  30. package/dist/{layers.DJHP0m-I.js → layers.BOztdAeE.js} +1 -1
  31. package/dist/{layers.BWUNH5Xy.js → layers.BSFvSxAW.js} +2 -2
  32. package/dist/{layers.CNeNKf9r.js → layers.BTqtABFp.js} +1 -1
  33. package/dist/{layers.CccO2gq8.js → layers.BUXlslMo.js} +1 -1
  34. package/dist/{layers.BwZLj8Uo.js → layers.BVFjrhyH.js} +1 -1
  35. package/dist/{layers.DmgtjTn9.js → layers.BVKUpmY-.js} +1 -1
  36. package/dist/{layers.B6D_SJbU.js → layers.BVQnJMRw.js} +1 -1
  37. package/dist/{layers.N0sFb-z-.js → layers.BXwtj068.js} +1 -1
  38. package/dist/{layers.BC4VW1Z3.js → layers.BYm-cdxh.js} +1 -1
  39. package/dist/{layers.DieEj3MA.js → layers.BZjGZC6Y.js} +3 -3
  40. package/dist/{layers.DyDmXkSa.js → layers.B_JtZCN9.js} +1 -1
  41. package/dist/{layers.B1kZTaz5.js → layers.Bb5zlvhh.js} +1 -1
  42. package/dist/{layers.CEiJwMda.js → layers.Bby3suAC.js} +1 -1
  43. package/dist/{layers.DZFjlFnV.js → layers.Bdcf9Z5D.js} +49 -49
  44. package/dist/layers.Be3hGKWN.js +1 -0
  45. package/dist/{layers.DMQTVt86.js → layers.BeZm_cHd.js} +1 -1
  46. package/dist/{layers.DIUzL_6N.js → layers.Bh3-MllH.js} +1 -1
  47. package/dist/{layers.B5OBTV5F.js → layers.BhEGWMwB.js} +1 -1
  48. package/dist/{layers.BsTpwj0H.js → layers.BhkhIN75.js} +1 -1
  49. package/dist/{layers.DO54mCHO.js → layers.Bib8ivdT.js} +2 -2
  50. package/dist/{layers.DzKWtIqI.js → layers.Bn6Iejgx.js} +1 -1
  51. package/dist/{layers.Bkqh4ME-.js → layers.Bp96rGKj.js} +1 -1
  52. package/dist/{layers.DSlNEDRU.js → layers.BpGapBb_.js} +1 -1
  53. package/dist/{layers.DCipaxvm.js → layers.BqBcVmuA.js} +2 -2
  54. package/dist/{layers.DVUYMhTe.js → layers.Br1FFtT0.js} +1 -1
  55. package/dist/{layers.CiY-YFpH.js → layers.BuHZ-Ghv.js} +3 -3
  56. package/dist/{layers.CCix_qrs.js → layers.BvBP7pVu.js} +1 -1
  57. package/dist/{layers.CaNVv_op.js → layers.BxEzn6nN.js} +1 -1
  58. package/dist/{layers.BpAoJ8d0.js → layers.C-R-oVhg.js} +5 -5
  59. package/dist/{layers.LBSX3TXx.js → layers.C0jByRD3.js} +1 -1
  60. package/dist/{layers.B0v1e4rM.js → layers.C3kOgem-.js} +1 -1
  61. package/dist/{layers.49Cb3hQq.js → layers.C4Me_ssm.js} +1 -1
  62. package/dist/{layers.BD8wlI9y.js → layers.C62ZXEw2.js} +1 -1
  63. package/dist/{layers.DsL5KVBD.js → layers.C7KyEelm.js} +1 -1
  64. package/dist/{layers.DBjevU0S.js → layers.C8C7CSoC.js} +1 -1
  65. package/dist/{layers.C40Bp7ba.js → layers.C8oJKs9B.js} +1 -1
  66. package/dist/{layers.B4TXZCpg.js → layers.C9p0mMXG.js} +1 -1
  67. package/dist/{layers.DzucUec3.js → layers.CDoL8VSM.js} +1 -1
  68. package/dist/{layers.vGzNH8Zi.js → layers.CE6zliiq.js} +1 -1
  69. package/dist/{layers.CckR2apD.js → layers.CEDQUMRS.js} +2 -2
  70. package/dist/{layers.Cce-5srG.js → layers.CHdXKlXk.js} +3 -3
  71. package/dist/{layers.Dsgji0IU.js → layers.CIKwPi4Z.js} +1 -1
  72. package/dist/{layers.IqDrGH8w.js → layers.CIlYw-Ld.js} +1 -1
  73. package/dist/{layers.ktY-N8-g.js → layers.CJj-Yc0Y.js} +1 -1
  74. package/dist/{layers.fcY3pMI5.js → layers.CJvs1ehb.js} +4 -4
  75. package/dist/{layers.DxmTHJdN.js → layers.CLOPPsD7.js} +1 -1
  76. package/dist/{layers.CgFnVYEZ.js → layers.CLPz47Cx.js} +1 -1
  77. package/dist/{layers.f3_J7Nbn.js → layers.CLRCSdJu.js} +1 -1
  78. package/dist/{layers.CQ6PlE30.js → layers.CM8dv7Gh.js} +4 -4
  79. package/dist/{layers.CWqEWyqn.js → layers.CMbvzTIf.js} +1 -1
  80. package/dist/{layers.D4Hd2R6l.js → layers.CNyFLQnc.js} +1 -1
  81. package/dist/{layers.BFb832xE.js → layers.CPozxFPx.js} +1 -1
  82. package/dist/{layers.B28ZLtQy.js → layers.CRnGEgwX.js} +3 -3
  83. package/dist/{layers.Cig8Inwg.js → layers.CSbeUzlx.js} +1 -1
  84. package/dist/{layers.BvVF5YeF.js → layers.CSnjafAH.js} +1 -1
  85. package/dist/{layers.DiNz7ElC.js → layers.CU9PM1go.js} +1 -1
  86. package/dist/{layers.Dr27uVk4.js → layers.CUclTWP1.js} +1 -1
  87. package/dist/{layers.DEcXOBvy.js → layers.CVdTDg0L.js} +1 -1
  88. package/dist/{layers.DiHWHhy4.js → layers.CWFsDWIO.js} +1 -1
  89. package/dist/{layers.Dn09PfrZ.js → layers.CWLsT0ha.js} +1 -1
  90. package/dist/{layers.DxzgNTjM.js → layers.CWY-RnLQ.js} +1 -1
  91. package/dist/{layers.BDBbG-ey.js → layers.C_2YmvP6.js} +1 -1
  92. package/dist/{layers.CNexJfQm.js → layers.C_ewGFAV.js} +1 -1
  93. package/dist/{layers.CQhZnqZ4.js → layers.C_hg39kk.js} +4 -4
  94. package/dist/{layers.B8S3mJue.js → layers.CaLTEjck.js} +1 -1
  95. package/dist/{layers.B8cw9faR.js → layers.CauW8tpB.js} +1 -1
  96. package/dist/{layers.CxEg8l7s.js → layers.Cb1OeHPk.js} +1 -1
  97. package/dist/{layers.m1FXzZiP.js → layers.CbTtLiC-.js} +29621 -17625
  98. package/dist/{layers.CfHRM0FG.js → layers.CcCAMrS6.js} +4 -4
  99. package/dist/{layers.TtKwW6Uv.js → layers.CcOPnJ0R.js} +1 -1
  100. package/dist/{layers.sWtltbAD.js → layers.CeYuOfPG.js} +6 -6
  101. package/dist/{layers.D7HuKSGc.js → layers.CgOiwStq.js} +1 -1
  102. package/dist/{layers.D8HLLR68.js → layers.CjSufFtR.js} +1 -1
  103. package/dist/{layers.RGHJiijE.js → layers.CjfwbokM.js} +2 -2
  104. package/dist/{layers.D64ZaJak.js → layers.Cl2kkt_w.js} +1 -1
  105. package/dist/{layers.D7oTsnEI.js → layers.Cn9PgF9u.js} +1 -1
  106. package/dist/{layers.Bai6Rb4N.js → layers.CnsIGgOH.js} +1 -1
  107. package/dist/{layers.BzMjNE8I.js → layers.CpriF7L5.js} +1 -1
  108. package/dist/{layers.Bkgg8V9Z.js → layers.CvMjvpAC.js} +5981 -6248
  109. package/dist/layers.CwDIIaj6.js +1 -0
  110. package/dist/{layers.1GyvVVUA.js → layers.Cwfp_SWw.js} +1 -1
  111. package/dist/{layers.CHVJ4nfm.js → layers.Cy-4eS9t.js} +1 -1
  112. package/dist/{layers.BGeCxiod.js → layers.CyTiWc8R.js} +1 -1
  113. package/dist/{layers.DjToIgfF.js → layers.CyVJlwhy.js} +1 -1
  114. package/dist/layers.CzfJNUQR.js +6 -0
  115. package/dist/{layers.DyG10Lz7.js → layers.Czo4N9da.js} +5 -5
  116. package/dist/{layers.DDhh_-Kd.js → layers.D10ka4_R.js} +1 -1
  117. package/dist/{layers.Dx68js4K.js → layers.D1U2EImF.js} +1 -1
  118. package/dist/{layers.DDbSzUSq.js → layers.D2FhK8JW.js} +1 -1
  119. package/dist/{layers.CqDDn2I0.js → layers.D2NZqIBf.js} +1 -1
  120. package/dist/{layers.Dvocqmh5.js → layers.D5FEVMaj.js} +1 -1
  121. package/dist/{layers.B_Q4F8KR.js → layers.D5T47bY1.js} +1 -1
  122. package/dist/{layers.CTi4nGrZ.js → layers.D5oWH2Zi.js} +1035 -1028
  123. package/dist/{layers.CrWNqZCY.js → layers.D5vvb1es.js} +1 -1
  124. package/dist/{layers.D5ezF38F.js → layers.D7m8veg5.js} +1 -1
  125. package/dist/{layers.B4rvdwOe.js → layers.D7o8HeUe.js} +1 -1
  126. package/dist/{layers.D1f8eXYS.js → layers.D7s9Zwrz.js} +1 -1
  127. package/dist/{layers.BE1gV7W-.js → layers.D8w74-1O.js} +3 -3
  128. package/dist/{layers.DSoRCaln.js → layers.DBsOSFoM.js} +44 -44
  129. package/dist/{layers.V49AKmo9.js → layers.DCBZyMeN.js} +1 -1
  130. package/dist/{layers.BwbE872l.js → layers.DLe33_L_.js} +1 -1
  131. package/dist/{layers.0JEG6r0M.js → layers.DNUD-CJ8.js} +4 -4
  132. package/dist/{layers.e30jfE4U.js → layers.DNlW5pNO.js} +1 -1
  133. package/dist/{layers.hUKvXZQd.js → layers.DOocKSCn.js} +1 -1
  134. package/dist/{layers.Z7GnJocj.js → layers.DPknniKO.js} +1 -1
  135. package/dist/{layers.YGXqIpY-.js → layers.DQWkfOvY.js} +1 -1
  136. package/dist/{layers.CPKeFjQY.js → layers.DRPLaH1S.js} +1 -1
  137. package/dist/{layers.aVTcjttw.js → layers.DRyq7HXZ.js} +1 -1
  138. package/dist/{layers.BR12Ya1f.js → layers.DSwpnF_n.js} +1 -1
  139. package/dist/{layers.DsGuM-C7.js → layers.DY5-BiNC.js} +1 -1
  140. package/dist/{layers.DuTVDRam.js → layers.DYG4TDJT.js} +1 -1
  141. package/dist/{layers.sMedTMVE.js → layers.DYGP06g1.js} +1 -1
  142. package/dist/{layers.BzGNNzEC.js → layers.DamzqDiR.js} +1 -1
  143. package/dist/{layers.BKsQWiW7.js → layers.DbNQWK8M.js} +1 -1
  144. package/dist/{layers.tc44apcU.js → layers.DcyKLTKN.js} +25 -25
  145. package/dist/{layers.SJpkQK_B.js → layers.DdGNejEI.js} +1 -1
  146. package/dist/{layers.CeJztBoD.js → layers.DfJ3ZtHm.js} +1 -1
  147. package/dist/{layers.eGTEDwHP.js → layers.DfzCnkal.js} +1 -1
  148. package/dist/{layers.-mxLnb4k.js → layers.Dg4utwst.js} +1 -1
  149. package/dist/{layers.DWpBVhuJ.js → layers.DgiE5ZFx.js} +1 -1
  150. package/dist/{layers.C-T4euoM.js → layers.DlNM-Dqc.js} +1 -1
  151. package/dist/{layers.KhUHE5ne.js → layers.Dlc_qb9C.js} +3 -3
  152. package/dist/{layers.CDnAMupK.js → layers.DnIrOpxR.js} +1 -1
  153. package/dist/{layers.bqo081km.js → layers.DorSa_L5.js} +1 -1
  154. package/dist/{layers.fo9GMZ-S.js → layers.DpNa42gZ.js} +4 -4
  155. package/dist/{layers.BpXHsiSZ.js → layers.DqVko4VS.js} +1 -1
  156. package/dist/{layers.ClDrJmH4.js → layers.DsO27g6e.js} +1 -1
  157. package/dist/{layers.BHDk7Myw.js → layers.DuF7Wr_J.js} +1 -1
  158. package/dist/{layers.RqFbALGa.js → layers.DuZffOf7.js} +1 -1
  159. package/dist/{layers.D9nEFqyx.js → layers.Dud5Uqc_.js} +1 -1
  160. package/dist/{layers.d3YgMAV6.js → layers.DzDzwnFj.js} +1 -1
  161. package/dist/{layers.D3j7jG9X.js → layers.DzyRBxYV.js} +1 -1
  162. package/dist/{layers.D63pZhIg.js → layers.E50JDeRu.js} +1 -1
  163. package/dist/{layers.C53Rjokv.js → layers.EDJAvZne.js} +1 -1
  164. package/dist/{layers.Yj7xC7wb.js → layers.EKR6tyV6.js} +1 -1
  165. package/dist/{layers.CAy29y2i.js → layers.FT8CWNYr.js} +1 -1
  166. package/dist/{layers.CDfK4x7M.js → layers.JyX-Sgav.js} +1 -1
  167. package/dist/{layers.BCwKbolQ.js → layers.K93rRg7h.js} +1 -1
  168. package/dist/{layers.BLJrZsq6.js → layers.LyVM1EwO.js} +3 -3
  169. package/dist/{layers.BPyR7VSK.js → layers.O3Mjf-uq.js} +1 -1
  170. package/dist/{layers.cd9QThAO.js → layers.SSatf9ti.js} +1 -1
  171. package/dist/{layers.CZodQNkg.js → layers.TCs6JDoq.js} +1 -1
  172. package/dist/{layers.BtTcw2YT.js → layers.TxMU5irA.js} +1 -1
  173. package/dist/{layers.B5Cz3RXy.js → layers.Ucg2KioU.js} +1 -1
  174. package/dist/{layers.C6HBYNAt.js → layers.Usxx3zwE.js} +1 -1
  175. package/dist/{layers.DGz5xdPv.js → layers.Uwkohx1o.js} +1 -1
  176. package/dist/{layers.CB2wuM98.js → layers.UyBxa8pk.js} +1 -1
  177. package/dist/{layers.Ca0u_tGE.js → layers.VIC89oh3.js} +1 -1
  178. package/dist/{layers.DSLJ6ICC.js → layers.WXRqF7Gu.js} +1 -1
  179. package/dist/{layers.ChZqSPnR.js → layers.XzXWsQdt.js} +1 -1
  180. package/dist/{layers.CjoXK1ij.js → layers.ZqFKkHtx.js} +1 -1
  181. package/dist/{layers.rB607amy.js → layers.an73ne6R.js} +1 -1
  182. package/dist/{layers.CHMzPHWN.js → layers.cQhTHtoM.js} +1 -1
  183. package/dist/{layers.Vm4Q0YWI.js → layers.dZZJZDAg.js} +1 -1
  184. package/dist/{layers.V5QreSCa.js → layers.g5UO5TI7.js} +1 -1
  185. package/dist/{layers.CDa35kl2.js → layers.gQahMh2X.js} +1 -1
  186. package/dist/{layers.BkE-50bx.js → layers.goOIHVE6.js} +1 -1
  187. package/dist/{layers.CtLrl-XT.js → layers.gu1X4m9G.js} +2 -2
  188. package/dist/{layers.CpIn_bCD.js → layers.ii-DkG87.js} +3 -3
  189. package/dist/{layers.BTbuSvbS.js → layers.jeSeOpIN.js} +1 -1
  190. package/dist/{layers.CIlMNTzK.js → layers.jf4GXTEM.js} +1 -1
  191. package/dist/{layers.vFHR2A2Q.js → layers.k3626i7i.js} +1 -1
  192. package/dist/{layers.CVSPMK3H.js → layers.kq19s5wd.js} +1 -1
  193. package/dist/{layers.C56UbGsM.js → layers.n-b_sibm.js} +1 -1
  194. package/dist/{layers.DWpG_WDk.js → layers.qX5GXECm.js} +3 -3
  195. package/dist/{layers.DCbL-OVT.js → layers.rL4xM0YF.js} +1 -1
  196. package/dist/{layers.CuM3QAiw.js → layers.rxko9Uhx.js} +1 -1
  197. package/dist/layers.tMd_QB9T.js +845 -0
  198. package/dist/{layers.BlkigIkg.js → layers.tYaYGlY9.js} +1 -1
  199. package/dist/{layers.RsPeXxK5.js → layers.uJXaMwcZ.js} +65 -65
  200. package/dist/{layers.CbL0t_nB.js → layers.v6J5zOI0.js} +1 -1
  201. package/dist/{layers.mRN6s1F7.js → layers.vurepPvZ.js} +1 -1
  202. package/dist/{layers.BSxtKuLQ.js → layers.web18Twc.js} +1 -1
  203. package/dist/{layers.Cofnb6IX.js → layers.ysnHCXdj.js} +1 -1
  204. package/package.json +80 -80
  205. package/dist/layers.7cmEr_5S.js +0 -1
  206. package/dist/layers.BMN4DEif.js +0 -1
  207. package/dist/layers.BnzakkMG.js +0 -6
  208. package/dist/layers.Cf50i081.js +0 -8
  209. package/dist/layers.DG-Yj3cN.js +0 -1
  210. package/dist/layers.DZ_AGkg7.js +0 -346
  211. package/dist/layers.R8mPlCA0.js +0 -261
  212. package/dist/layers.b9B2NY7n.js +0 -11690
  213. package/dist/layers.fijFSEMq.js +0 -585
package/package.json CHANGED
@@ -1,80 +1,80 @@
1
- {
2
- "name": "@layers-app/editor",
3
- "private": false,
4
- "version": "1.0.3",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "publishConfig": {
12
- "access": "public"
13
- },
14
- "scripts": {
15
- "start": "cross-env VITE_LAYERS=true vite --mode full ",
16
- "start:specific": "VITE_LAYERS=false vite --mode full ",
17
- "build": "cross-env VITE_LAYERS=true vite build",
18
- "build:specific": "VITE_LAYERS=false vite build",
19
- "preview": "vite preview",
20
- "generate-dts": "tsc --project tsconfig.lib.json",
21
- "type-check": "tsc --noEmit --project tsconfig.check.json",
22
- "test": "vitest run",
23
- "test:watch": "vitest",
24
- "test:coverage": "vitest run --coverage",
25
- "start-test-server": "VITE_LAYERS=true vite --mode full --port 3000 --strictPort --host localhost"
26
- },
27
- "dependencies": {
28
- "@excalidraw/excalidraw": "^0.18.0",
29
- "@floating-ui/react": "^0.27.16",
30
- "@layers-app/editor-core": "*",
31
- "@lexical/file": "^0.38.2",
32
- "@lexical/headless": "^0.38.2",
33
- "@lexical/markdown": "^0.38.2",
34
- "@lexical/react": "^0.38.2",
35
- "@tanstack/react-query": "^5.52.2",
36
- "lexical": "^0.38.2",
37
- "react-selecto": "^1.26.3",
38
- "y-websocket": "^1.5.3",
39
- "yjs": "^13.6.20"
40
- },
41
- "devDependencies": {
42
- "@layers-app/editor-video": "*"
43
- },
44
- "peerDependencies": {
45
- "@dnd-kit/modifiers": ">=6",
46
- "@emotion/react": ">=11",
47
- "@emotion/styled": ">=11",
48
- "@hugeicons/core-free-icons": "^4.0.0",
49
- "@hugeicons/react": ">=1",
50
- "@layers-app/editor-video": ">=0.2.2",
51
- "@tabler/icons-react": ">=3.7.0",
52
- "@mantine/carousel": "8.3.5",
53
- "@mantine/colors-generator": "8.3.5",
54
- "@mantine/core": "8.3.5",
55
- "@mantine/dropzone": "8.3.5",
56
- "@mantine/form": "8.3.5",
57
- "@mantine/hooks": "8.3.5",
58
- "@mantine/modals": "8.3.5",
59
- "@mantine/notifications": "8.3.5",
60
- "@mantine/tiptap": "8.3.5",
61
- "@tanstack/react-query": "^5.52.2",
62
- "@tanstack/react-virtual": ">=3",
63
- "date-fns-tz": ">=3",
64
- "i18next": "^25.5.2",
65
- "js-confetti": ">=0.12",
66
- "lodash-es": "^4.17.21",
67
- "react": "^18.3.1",
68
- "react-dom": "^18.3.1",
69
- "react-i18next": "^15.7.3",
70
- "swagger-ui-react": "^5.27.1"
71
- },
72
- "peerDependenciesMeta": {
73
- "@layers-app/editor-video": {
74
- "optional": true
75
- },
76
- "swagger-ui-react": {
77
- "optional": true
78
- }
79
- }
80
- }
1
+ {
2
+ "name": "@layers-app/editor",
3
+ "private": false,
4
+ "version": "2.0.1",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "scripts": {
15
+ "start": "cross-env VITE_LAYERS=true vite --mode full ",
16
+ "start:specific": "VITE_LAYERS=false vite --mode full ",
17
+ "build": "cross-env VITE_LAYERS=true vite build",
18
+ "build:specific": "VITE_LAYERS=false vite build",
19
+ "preview": "vite preview",
20
+ "generate-dts": "tsc --project tsconfig.lib.json",
21
+ "type-check": "tsc --noEmit --project tsconfig.check.json",
22
+ "test": "vitest run",
23
+ "test:watch": "vitest",
24
+ "test:coverage": "vitest run --coverage",
25
+ "start-test-server": "VITE_LAYERS=true vite --mode full --port 3001 --strictPort --host 0.0.0.0"
26
+ },
27
+ "dependencies": {
28
+ "@excalidraw/excalidraw": "^0.18.0",
29
+ "@floating-ui/react": "^0.27.16",
30
+ "@layers-app/editor-core": "*",
31
+ "@lexical/file": "^0.38.2",
32
+ "@lexical/headless": "^0.38.2",
33
+ "@lexical/markdown": "^0.38.2",
34
+ "@lexical/react": "^0.38.2",
35
+ "@tanstack/react-query": "^5.52.2",
36
+ "lexical": "^0.38.2",
37
+ "react-selecto": "^1.26.3",
38
+ "y-websocket": "^1.5.3",
39
+ "yjs": "^13.6.20"
40
+ },
41
+ "devDependencies": {
42
+ "@layers-app/editor-video": "*"
43
+ },
44
+ "peerDependencies": {
45
+ "@dnd-kit/modifiers": ">=6",
46
+ "@emotion/react": ">=11",
47
+ "@emotion/styled": ">=11",
48
+ "@hugeicons/core-free-icons": "^4.0.0",
49
+ "@hugeicons/react": ">=1",
50
+ "@layers-app/editor-video": ">=0.3.0",
51
+ "@tabler/icons-react": ">=3.7.0",
52
+ "@mantine/carousel": "9.1.1",
53
+ "@mantine/colors-generator": "9.1.1",
54
+ "@mantine/core": "9.1.1",
55
+ "@mantine/dropzone": "9.1.1",
56
+ "@mantine/form": "9.1.1",
57
+ "@mantine/hooks": "9.1.1",
58
+ "@mantine/modals": "9.1.1",
59
+ "@mantine/notifications": "9.1.1",
60
+ "@mantine/tiptap": "9.1.1",
61
+ "@tanstack/react-query": "^5.52.2",
62
+ "@tanstack/react-virtual": ">=3",
63
+ "date-fns-tz": ">=3",
64
+ "i18next": "^25.5.2",
65
+ "js-confetti": ">=0.12",
66
+ "lodash-es": "^4.17.21",
67
+ "react": "^19.2.0",
68
+ "react-dom": "^19.2.0",
69
+ "react-i18next": "^15.7.3",
70
+ "swagger-ui-react": "^5.27.1"
71
+ },
72
+ "peerDependenciesMeta": {
73
+ "@layers-app/editor-video": {
74
+ "optional": true
75
+ },
76
+ "swagger-ui-react": {
77
+ "optional": true
78
+ }
79
+ }
80
+ }
@@ -1 +0,0 @@
1
- "use strict";const n=require("./layers.tc44apcU.js"),s=(e,r)=>n.Utils.lang.round(n.Color.parse(e)[r]);exports.channel=s;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./layers.BgSnaqEl.js");require("./layers.DSoRCaln.js");exports.Commands=e.CB;exports.subsetToBase64=e.QB;exports.subsetToBinary=e.NQ;exports.toBase64=e.AI;
@@ -1,6 +0,0 @@
1
- import { e as o, j as s, o as f } from "./layers.Bkgg8V9Z.js";
2
- export {
3
- o as default,
4
- s as en,
5
- f as kaa
6
- };
@@ -1,8 +0,0 @@
1
- import { C as e, Q as t, N as m, A as r } from "./layers.BTbuSvbS.js";
2
- import "./layers.Bkgg8V9Z.js";
3
- export {
4
- e as Commands,
5
- t as subsetToBase64,
6
- m as subsetToBinary,
7
- r as toBase64
8
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("react"),se=require("react-dom"),ae=require("react-i18next"),c=require("./layers.fijFSEMq.js"),ce=require("@lexical/react/LexicalComposerContext"),M=require("@lexical/react/LexicalErrorBoundary"),ie=require("@lexical/react/useLexicalEditable"),A=require("@mantine/core"),T=require("lexical"),le=require("./layers.R8mPlCA0.js");function H({equation:u,inline:a,onDoubleClick:l}){const s=r.useRef(null);return r.useEffect(()=>{const m=s.current;m!==null&&le.default.render(u,m,{displayMode:!a,errorColor:"#cc0000",output:"html",strict:"warn",throwOnError:!1,trust:!1})},[u,a]),n.jsxs(n.Fragment,{children:[n.jsx("img",{src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",width:0,height:0,alt:""}),n.jsx("span",{role:"button",tabIndex:-1,onDoubleClick:l,ref:s}),n.jsx("img",{src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",width:0,height:0,alt:""})]})}const X=18,ue=8,Y=20,Z=25,J=20;let K=!1;const V=new Map;function de(u){K||(K=!0,u.registerCommand(c.OPEN_EQUATION_POPUP_COMMAND,a=>{const l=V.get(a);return l?(l(),!0):!1},T.COMMAND_PRIORITY_EDITOR))}function pe({equation:u,inline:a,nodeKey:l}){const[s]=ce.useLexicalComposerContext(),m=ie.useLexicalEditable(),{t:_}=ae.useTranslation(),b=r.useRef(null),B=r.useRef(null),L=r.useRef(null),[E,R]=r.useState(u),[d,h]=r.useState(!1),[F,Q]=r.useState({top:0,left:0}),[S,$]=r.useState(!1),j=r.useCallback(()=>{const t=b.current;if(!t)return;const i=(t.closest(".editor-equation")||t).getBoundingClientRect(),o=X-(a?J:0);Q({top:i.bottom+o-Y+Z,left:i.left}),$(!0)},[a]),z=r.useCallback(()=>{const t=b.current,e=B.current;if(!t||!e)return;const o=(t.closest(".editor-equation")||t).getBoundingClientRect(),I=e.getBoundingClientRect(),g=I.height,G=I.width,C=window.visualViewport,N=(C==null?void 0:C.height)??window.innerHeight,W=(C==null?void 0:C.width)??window.innerWidth,p=ue,O=X-(a?J:0),D=o.bottom+O,U=o.top-O-g,te=D+g<=N-p,ne=U>=p;let f,P;if(te)f=D,P=!0;else if(ne)f=U,P=!1;else{const oe=N-p-(o.bottom+O),re=o.top-O-p;P=oe>=re,f=P?D:U,f=Math.max(p,Math.min(f,N-g-p))}let q=o.left;q+G>W-p&&(q=W-G-p),q=Math.max(p,q),f-=Y,P&&(f+=Z),f=Math.max(p,Math.min(f,N-g-p)),Q({top:f,left:q})},[a]);r.useLayoutEffect(()=>{if(!d||c.IS_TOUCH_DEVICE||!S)return;const t=B.current;if(!t)return;const e=()=>{z()};e();const i=new ResizeObserver(e);i.observe(t);const o=window.visualViewport;return window.addEventListener("scroll",e,!0),o==null||o.addEventListener("resize",e),o==null||o.addEventListener("scroll",e),()=>{i.disconnect(),window.removeEventListener("scroll",e,!0),o==null||o.removeEventListener("resize",e),o==null||o.removeEventListener("scroll",e)}},[S,d,z]),r.useEffect(()=>{de(s)},[s]),r.useEffect(()=>{const t=()=>{m&&h(!0)};return V.set(l,t),()=>{V.delete(l)}},[m,l]);const w=r.useCallback(()=>{if(m){if(d){h(!1);return}j(),h(!0)}},[m,d,j]),y=r.useCallback(()=>{const t=E.trim();s.update(()=>{const e=T.$getNodeByKey(l);if(c.$isEquationNode(e)){if(e.isInline&&e.isInline()&&t===""){e.remove();return}e.setEquation(t)}}),h(!1)},[s,l,E]),k=r.useCallback(()=>{if(!u&&a){s.update(()=>{const t=T.$getNodeByKey(l);c.$isEquationNode(t)&&t.remove()}),h(!1);return}R(u),h(!1)},[s,u,a,l]);r.useEffect(()=>{d||R(u)},[u,d]),r.useEffect(()=>{if(!d||c.IS_TOUCH_DEVICE){c.unblockScroll(),c.IS_TOUCH_DEVICE||$(!1);return}c.blockScroll(),j();const t=window.requestAnimationFrame(()=>{const e=L.current;if(!e)return;const i=e.value.length;e.focus(),e.setSelectionRange(i,i)});return()=>{window.cancelAnimationFrame(t),c.unblockScroll()}},[d,j]),r.useEffect(()=>{if(!d||c.IS_TOUCH_DEVICE)return;const t=e=>{const i=e.target,o=b.current,I=document.querySelector(".equation-block__popup");i&&(o!=null&&o.contains(i)||I instanceof HTMLElement&&I.contains(i))||(a&&!E.trim()&&s.update(()=>{const g=T.$getNodeByKey(l);c.$isEquationNode(g)&&g.remove()}),h(!1))};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[s,a,d,l,E]);const x=(d?E:u).trim(),v=x.length>0;r.useEffect(()=>{const t=b.current;if(!t)return;const e=t.closest(".editor-equation");if(e){if(!x){e.removeAttribute("data-lexical-equation");return}try{const i=btoa(unescape(encodeURIComponent(x)));e.setAttribute("data-lexical-equation",i)}catch{e.setAttribute("data-lexical-equation",x)}}},[x]);const ee=a&&!m?n.jsx("span",{className:"equation-inline-trigger",children:n.jsx(M.LexicalErrorBoundary,{onError:t=>{var e;return(e=s._onError)==null?void 0:e.call(s,t)},children:n.jsx(H,{equation:u,inline:a,onDoubleClick:w})})}):a?n.jsx("span",{className:`equation-inline-trigger${v?"":" equation-inline-trigger--empty"}`,onClick:w,ref:b,children:v?n.jsx(M.LexicalErrorBoundary,{onError:t=>{var e;return(e=s._onError)==null?void 0:e.call(s,t)},children:n.jsx(H,{equation:x,inline:a,onDoubleClick:w})}):n.jsxs("span",{className:"equation-inline-placeholder",children:[n.jsx(c.HugeiconsIcon,{icon:c.$tr,size:24}),n.jsx("span",{children:"New equation"})]})}):n.jsx("div",{className:"equation-block",ref:b,children:n.jsx("div",{className:"equation-block__container",onClick:w,style:{cursor:m?"pointer":"default"},children:v?n.jsx(M.LexicalErrorBoundary,{onError:t=>{var e;return(e=s._onError)==null?void 0:e.call(s,t)},children:n.jsx(H,{equation:x,inline:a,onDoubleClick:w})}):n.jsx("div",{className:"equation-block__placeholder",children:_("editor.menu.equation.placeholder.block")})})});return n.jsxs(n.Fragment,{children:[ee,c.IS_TOUCH_DEVICE?n.jsx(c.MobileDrawer,{opened:d,onClose:k,title:_("editor.menu.other.equation.mobileTitle"),classNames:{content:"equation-mobile-drawer__content"},children:n.jsxs(A.Stack,{gap:"md",children:[n.jsx(A.Textarea,{autosize:!0,minRows:1,variant:"unstyled",value:E,onChange:t=>{t.stopPropagation(),R(t.currentTarget.value)},placeholder:"x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}",classNames:{wrapper:"equation-block__textarea-wrapper",input:"equation-mobile__textarea-input"},autoFocus:!0,ref:L}),n.jsxs(A.Stack,{gap:8,children:[n.jsx(A.Button,{fullWidth:!0,onClick:y,children:_("editor.link.save")}),n.jsx(A.Button,{variant:"subtle",color:"gray",fullWidth:!0,onClick:k,children:_("editor.cancel")})]})]})}):d&&S&&se.createPortal(n.jsx("div",{ref:B,className:"equation-block__popup",style:{position:"fixed",top:F.top,left:F.left,zIndex:c.EDITOR_UI_MIN_Z_INDEX},children:n.jsxs("div",{className:"equation-block__editor",children:[n.jsx(A.Textarea,{autosize:!0,minRows:2,variant:"unstyled",value:E,onChange:t=>{t.stopPropagation(),R(t.currentTarget.value)},onKeyDown:c.createPopupKeyDownHandler({onConfirm:y,onCancel:k}),placeholder:"x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}",classNames:{wrapper:"equation-block__textarea-wrapper"},autoFocus:!0,ref:L}),n.jsxs(A.Group,{justify:"flex-end",gap:"sm",children:[n.jsx(A.Button,{variant:"subtle",color:"gray",onClick:k,children:_("editor.cancel")}),n.jsx(A.Button,{onClick:y,children:_("editor.link.save")})]})]})}),document.body)]})}exports.default=pe;
@@ -1,346 +0,0 @@
1
- import { jsxs as E, Fragment as ce, jsx as n } from "react/jsx-runtime";
2
- import { useRef as M, useEffect as g, useState as L, useCallback as N, useLayoutEffect as fe } from "react";
3
- import { createPortal as Ae } from "react-dom";
4
- import { useTranslation as he } from "react-i18next";
5
- import { b as k, c as F, d as ee, e as Ee, H as ge, f as _e, M as be, g as we, h as Pe, O as Ce } from "./layers.m1FXzZiP.js";
6
- import { useLexicalComposerContext as Ie } from "@lexical/react/LexicalComposerContext";
7
- import { LexicalErrorBoundary as G } from "@lexical/react/LexicalErrorBoundary";
8
- import { useLexicalEditable as Re } from "@lexical/react/useLexicalEditable";
9
- import { Stack as te, Textarea as oe, Button as B, Group as Ne } from "@mantine/core";
10
- import { $getNodeByKey as V, COMMAND_PRIORITY_EDITOR as ke } from "lexical";
11
- import qe from "./layers.b9B2NY7n.js";
12
- function W({
13
- equation: c,
14
- inline: a,
15
- onDoubleClick: i
16
- }) {
17
- const r = M(null);
18
- return g(() => {
19
- const p = r.current;
20
- p !== null && qe.render(c, p, {
21
- displayMode: !a,
22
- errorColor: "#cc0000",
23
- output: "html",
24
- strict: "warn",
25
- throwOnError: !1,
26
- trust: !1
27
- });
28
- }, [c, a]), /* @__PURE__ */ E(ce, { children: [
29
- /* @__PURE__ */ n(
30
- "img",
31
- {
32
- src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
33
- width: 0,
34
- height: 0,
35
- alt: ""
36
- }
37
- ),
38
- /* @__PURE__ */ n(
39
- "span",
40
- {
41
- role: "button",
42
- tabIndex: -1,
43
- onDoubleClick: i,
44
- ref: r
45
- }
46
- ),
47
- /* @__PURE__ */ n(
48
- "img",
49
- {
50
- src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
51
- width: 0,
52
- height: 0,
53
- alt: ""
54
- }
55
- )
56
- ] });
57
- }
58
- const ne = 18, xe = 8, re = 20, ae = 25, se = 20;
59
- let ie = !1;
60
- const $ = /* @__PURE__ */ new Map();
61
- function Oe(c) {
62
- ie || (ie = !0, c.registerCommand(
63
- Ce,
64
- (a) => {
65
- const i = $.get(a);
66
- return i ? (i(), !0) : !1;
67
- },
68
- ke
69
- ));
70
- }
71
- function ze({
72
- equation: c,
73
- inline: a,
74
- nodeKey: i
75
- }) {
76
- const [r] = Ie(), p = Re(), { t: _ } = he(), b = M(null), U = M(null), D = M(null), [m, q] = L(c), [l, f] = L(!1), [j, X] = L({ top: 0, left: 0 }), [y, Y] = L(!1), x = N(() => {
77
- const t = b.current;
78
- if (!t) return;
79
- const s = (t.closest(
80
- ".editor-equation"
81
- ) || t).getBoundingClientRect(), o = ne - (a ? se : 0);
82
- X({
83
- top: s.bottom + o - re + ae,
84
- left: s.left
85
- }), Y(!0);
86
- }, [a]), Z = N(() => {
87
- const t = b.current, e = U.current;
88
- if (!t || !e) return;
89
- const o = (t.closest(
90
- ".editor-equation"
91
- ) || t).getBoundingClientRect(), C = e.getBoundingClientRect(), h = C.height, J = C.width, w = window.visualViewport, T = (w == null ? void 0 : w.height) ?? window.innerHeight, K = (w == null ? void 0 : w.width) ?? window.innerWidth, u = xe, v = ne - (a ? se : 0), Q = o.bottom + v, z = o.top - v - h, ue = Q + h <= T - u, de = z >= u;
92
- let d, I;
93
- if (ue)
94
- d = Q, I = !0;
95
- else if (de)
96
- d = z, I = !1;
97
- else {
98
- const pe = T - u - (o.bottom + v), me = o.top - v - u;
99
- I = pe >= me, d = I ? Q : z, d = Math.max(u, Math.min(d, T - h - u));
100
- }
101
- let R = o.left;
102
- R + J > K - u && (R = K - J - u), R = Math.max(u, R), d -= re, I && (d += ae), d = Math.max(u, Math.min(d, T - h - u)), X({ top: d, left: R });
103
- }, [a]);
104
- fe(() => {
105
- if (!l || k || !y) return;
106
- const t = U.current;
107
- if (!t) return;
108
- const e = () => {
109
- Z();
110
- };
111
- e();
112
- const s = new ResizeObserver(e);
113
- s.observe(t);
114
- const o = window.visualViewport;
115
- return window.addEventListener("scroll", e, !0), o == null || o.addEventListener("resize", e), o == null || o.addEventListener("scroll", e), () => {
116
- s.disconnect(), window.removeEventListener("scroll", e, !0), o == null || o.removeEventListener("resize", e), o == null || o.removeEventListener("scroll", e);
117
- };
118
- }, [y, l, Z]), g(() => {
119
- Oe(r);
120
- }, [r]), g(() => {
121
- const t = () => {
122
- p && f(!0);
123
- };
124
- return $.set(i, t), () => {
125
- $.delete(i);
126
- };
127
- }, [p, i]);
128
- const P = N(() => {
129
- if (p) {
130
- if (l) {
131
- f(!1);
132
- return;
133
- }
134
- x(), f(!0);
135
- }
136
- }, [p, l, x]), H = N(() => {
137
- const t = m.trim();
138
- r.update(() => {
139
- const e = V(i);
140
- if (F(e)) {
141
- if (e.isInline && e.isInline() && t === "") {
142
- e.remove();
143
- return;
144
- }
145
- e.setEquation(t);
146
- }
147
- }), f(!1);
148
- }, [r, i, m]), O = N(() => {
149
- if (!c && a) {
150
- r.update(() => {
151
- const t = V(i);
152
- F(t) && t.remove();
153
- }), f(!1);
154
- return;
155
- }
156
- q(c), f(!1);
157
- }, [r, c, a, i]);
158
- g(() => {
159
- l || q(c);
160
- }, [c, l]), g(() => {
161
- if (!l || k) {
162
- ee(), k || Y(!1);
163
- return;
164
- }
165
- Ee(), x();
166
- const t = window.requestAnimationFrame(() => {
167
- const e = D.current;
168
- if (!e) return;
169
- const s = e.value.length;
170
- e.focus(), e.setSelectionRange(s, s);
171
- });
172
- return () => {
173
- window.cancelAnimationFrame(t), ee();
174
- };
175
- }, [l, x]), g(() => {
176
- if (!l || k) return;
177
- const t = (e) => {
178
- const s = e.target, o = b.current, C = document.querySelector(".equation-block__popup");
179
- s && (o != null && o.contains(s) || C instanceof HTMLElement && C.contains(s)) || (a && !m.trim() && r.update(() => {
180
- const h = V(i);
181
- F(h) && h.remove();
182
- }), f(!1));
183
- };
184
- return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
185
- }, [r, a, l, i, m]);
186
- const A = (l ? m : c).trim(), S = A.length > 0;
187
- g(() => {
188
- const t = b.current;
189
- if (!t) return;
190
- const e = t.closest(".editor-equation");
191
- if (e) {
192
- if (!A) {
193
- e.removeAttribute("data-lexical-equation");
194
- return;
195
- }
196
- try {
197
- const s = btoa(unescape(encodeURIComponent(A)));
198
- e.setAttribute("data-lexical-equation", s);
199
- } catch {
200
- e.setAttribute("data-lexical-equation", A);
201
- }
202
- }
203
- }, [A]);
204
- const le = a && !p ? /* @__PURE__ */ n("span", { className: "equation-inline-trigger", children: /* @__PURE__ */ n(G, { onError: (t) => {
205
- var e;
206
- return (e = r._onError) == null ? void 0 : e.call(r, t);
207
- }, children: /* @__PURE__ */ n(
208
- W,
209
- {
210
- equation: c,
211
- inline: a,
212
- onDoubleClick: P
213
- }
214
- ) }) }) : a ? /* @__PURE__ */ n(
215
- "span",
216
- {
217
- className: `equation-inline-trigger${S ? "" : " equation-inline-trigger--empty"}`,
218
- onClick: P,
219
- ref: b,
220
- children: S ? /* @__PURE__ */ n(G, { onError: (t) => {
221
- var e;
222
- return (e = r._onError) == null ? void 0 : e.call(r, t);
223
- }, children: /* @__PURE__ */ n(
224
- W,
225
- {
226
- equation: A,
227
- inline: a,
228
- onDoubleClick: P
229
- }
230
- ) }) : /* @__PURE__ */ E("span", { className: "equation-inline-placeholder", children: [
231
- /* @__PURE__ */ n(ge, { icon: _e, size: 24 }),
232
- /* @__PURE__ */ n("span", { children: "New equation" })
233
- ] })
234
- }
235
- ) : /* @__PURE__ */ n("div", { className: "equation-block", ref: b, children: /* @__PURE__ */ n(
236
- "div",
237
- {
238
- className: "equation-block__container",
239
- onClick: P,
240
- style: { cursor: p ? "pointer" : "default" },
241
- children: S ? /* @__PURE__ */ n(G, { onError: (t) => {
242
- var e;
243
- return (e = r._onError) == null ? void 0 : e.call(r, t);
244
- }, children: /* @__PURE__ */ n(
245
- W,
246
- {
247
- equation: A,
248
- inline: a,
249
- onDoubleClick: P
250
- }
251
- ) }) : /* @__PURE__ */ n("div", { className: "equation-block__placeholder", children: _("editor.menu.equation.placeholder.block") })
252
- }
253
- ) });
254
- return /* @__PURE__ */ E(ce, { children: [
255
- le,
256
- k ? /* @__PURE__ */ n(
257
- be,
258
- {
259
- opened: l,
260
- onClose: O,
261
- title: _("editor.menu.other.equation.mobileTitle"),
262
- classNames: { content: "equation-mobile-drawer__content" },
263
- children: /* @__PURE__ */ E(te, { gap: "md", children: [
264
- /* @__PURE__ */ n(
265
- oe,
266
- {
267
- autosize: !0,
268
- minRows: 1,
269
- variant: "unstyled",
270
- value: m,
271
- onChange: (t) => {
272
- t.stopPropagation(), q(t.currentTarget.value);
273
- },
274
- placeholder: "x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}",
275
- classNames: {
276
- wrapper: "equation-block__textarea-wrapper",
277
- input: "equation-mobile__textarea-input"
278
- },
279
- autoFocus: !0,
280
- ref: D
281
- }
282
- ),
283
- /* @__PURE__ */ E(te, { gap: 8, children: [
284
- /* @__PURE__ */ n(B, { fullWidth: !0, onClick: H, children: _("editor.link.save") }),
285
- /* @__PURE__ */ n(
286
- B,
287
- {
288
- variant: "subtle",
289
- color: "gray",
290
- fullWidth: !0,
291
- onClick: O,
292
- children: _("editor.cancel")
293
- }
294
- )
295
- ] })
296
- ] })
297
- }
298
- ) : l && y && Ae(
299
- /* @__PURE__ */ n(
300
- "div",
301
- {
302
- ref: U,
303
- className: "equation-block__popup",
304
- style: {
305
- position: "fixed",
306
- top: j.top,
307
- left: j.left,
308
- zIndex: we
309
- },
310
- children: /* @__PURE__ */ E("div", { className: "equation-block__editor", children: [
311
- /* @__PURE__ */ n(
312
- oe,
313
- {
314
- autosize: !0,
315
- minRows: 2,
316
- variant: "unstyled",
317
- value: m,
318
- onChange: (t) => {
319
- t.stopPropagation(), q(t.currentTarget.value);
320
- },
321
- onKeyDown: Pe({
322
- onConfirm: H,
323
- onCancel: O
324
- }),
325
- placeholder: "x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}",
326
- classNames: {
327
- wrapper: "equation-block__textarea-wrapper"
328
- },
329
- autoFocus: !0,
330
- ref: D
331
- }
332
- ),
333
- /* @__PURE__ */ E(Ne, { justify: "flex-end", gap: "sm", children: [
334
- /* @__PURE__ */ n(B, { variant: "subtle", color: "gray", onClick: O, children: _("editor.cancel") }),
335
- /* @__PURE__ */ n(B, { onClick: H, children: _("editor.link.save") })
336
- ] })
337
- ] })
338
- }
339
- ),
340
- document.body
341
- )
342
- ] });
343
- }
344
- export {
345
- ze as default
346
- };