@layers-app/editor 0.6.1 → 0.6.2
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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/layers.2ZIhbsqA.js +1 -0
- package/dist/{layers.oppbq1V8.js → layers.3pc0D0YS.js} +24 -24
- package/dist/{layers.yedR42zA.js → layers.6j4u8O0X.js} +1 -1
- package/dist/{layers.DHRSuLVs.js → layers.7WkSSGqT.js} +1 -1
- package/dist/{layers.BhJNrpA3.js → layers.7f4kvylj.js} +2 -2
- package/dist/{layers.CKND34ue.js → layers.7xa-y1RH.js} +1 -1
- package/dist/{layers.CnKfP4tc.js → layers.8lJw1o-4.js} +1 -1
- package/dist/{layers.BANCGUrU.js → layers.9NEDKJss.js} +1 -1
- package/dist/{layers.Ca5keRI5.js → layers.Aj9IdZcO.js} +1 -1
- package/dist/{layers.MyfjAzKU.js → layers.B-OeLZgD.js} +1 -1
- package/dist/{layers.cBZ-P3nx.js → layers.B-qmikWF.js} +1 -1
- package/dist/{layers.Aq0SUL5q.js → layers.B4jhchBx.js} +1 -1
- package/dist/{layers.CPUnM31Z.js → layers.B5yufiUQ.js} +1 -1
- package/dist/{layers.B_TTUiE9.js → layers.B6n6aHON.js} +1 -1
- package/dist/{layers.D6EmV-XA.js → layers.B75qqJoT.js} +1 -1
- package/dist/{layers.DwUoAnGC.js → layers.B7JTCe2F.js} +1 -1
- package/dist/{layers.WLuvBhhO.js → layers.B7hBLlFx.js} +1 -1
- package/dist/{layers.DCU6gO-l.js → layers.B7xIMFTt.js} +4 -4
- package/dist/{layers.BO-PZk8i.js → layers.B9c2stSJ.js} +1 -1
- package/dist/{layers.DIMz0rbb.js → layers.BAqwgFL-.js} +1 -1
- package/dist/layers.BDSRKTg2.js +1 -0
- package/dist/{layers.z8N4rXXw.js → layers.BDZSJfkJ.js} +1 -1
- package/dist/{layers.DenztkGl.js → layers.BFMVn7AL.js} +3 -3
- package/dist/{layers.BCHiqf4h.js → layers.BFm6-7-v.js} +1 -1
- package/dist/{layers.B9mvovq1.js → layers.BGGVvD-f.js} +1 -1
- package/dist/{layers.IPx3dBa0.js → layers.BHHx8n2n.js} +1 -1
- package/dist/{layers.BVkkjJKc.js → layers.BK3pSbzU.js} +1 -1
- package/dist/{layers.Bc5uJC47.js → layers.BLpJ86lA.js} +1 -1
- package/dist/{layers.B2biNaBR.js → layers.BNFBtoZH.js} +1 -1
- package/dist/{layers.DiOFpShT.js → layers.BP0xVai4.js} +1 -1
- package/dist/{layers.CTvZEptB.js → layers.BPStejg3.js} +1 -1
- package/dist/{layers.BpWYOAc0.js → layers.BQaJnOy-.js} +1 -1
- package/dist/{layers.BQWq1dS_.js → layers.BQldMkN_.js} +1 -1
- package/dist/{layers.YTNyGd5I.js → layers.BRahZntw.js} +1 -1
- package/dist/{layers.DA_Q1DwJ.js → layers.BSb6PhMY.js} +4 -4
- package/dist/{layers.Bnzr31-l.js → layers.BT5EWxlz.js} +1 -1
- package/dist/{layers.BDEzwoD0.js → layers.BTar6R_T.js} +1 -1
- package/dist/{layers.CKzGHT9a.js → layers.BUUtV540.js} +1 -1
- package/dist/{layers.HblZ66rx.js → layers.BV6juIRI.js} +1 -1
- package/dist/{layers.BJCiE_l8.js → layers.BVdel_Cu.js} +1 -1
- package/dist/{layers.CpSrAOWh.js → layers.BZ7NPRKq.js} +1 -1
- package/dist/{layers.BhCjg_Di.js → layers.BZiw0oGS.js} +1 -1
- package/dist/{layers.B6IB8dwa.js → layers.Bad9hgcg.js} +1 -1
- package/dist/{layers.CHb3fDyP.js → layers.BaxWYA9g.js} +1 -1
- package/dist/{layers.3U30GEAd.js → layers.BcrLzYcD.js} +1 -1
- package/dist/{layers.Bn2ncK_y.js → layers.BeFJ3g52.js} +4 -4
- package/dist/{layers.CD9bcn-I.js → layers.Bfw_wVfN.js} +1 -1
- package/dist/{layers.C1hS-Yik.js → layers.BhUgDNws.js} +1 -1
- package/dist/{layers.BCHEzWTZ.js → layers.BhqYqY05.js} +1 -1
- package/dist/{layers.1cw4PPu8.js → layers.BiPLVqLF.js} +1 -1
- package/dist/{layers.DCmmSStc.js → layers.BlKQWPHr.js} +1 -1
- package/dist/{layers.B6l694O3.js → layers.BoJk_TJG.js} +6 -6
- package/dist/{layers.CvswJGGE.js → layers.BpWMB3-d.js} +2 -2
- package/dist/{layers.B1P5sIYl.js → layers.Bt-W99FB.js} +1 -1
- package/dist/{layers.Dr8Gt3ys.js → layers.BtxRq92j.js} +3 -3
- package/dist/{layers.BJiF1YhD.js → layers.BuxJ-6_7.js} +1 -1
- package/dist/{layers.C9PR1YEO.js → layers.BwL2hTd7.js} +1 -1
- package/dist/{layers.DfCkB8us.js → layers.BxxDswUE.js} +1 -1
- package/dist/{layers.lzPKLUXP.js → layers.Bxz38Q0M.js} +1 -1
- package/dist/layers.Bz06RJx1.js +1 -0
- package/dist/{layers.IlFNq4l7.js → layers.C08CkPit.js} +1 -1
- package/dist/{layers.C_mYi96H.js → layers.C37MKInl.js} +5 -5
- package/dist/{layers.CCSYnSIr.js → layers.C7pcN37M.js} +1 -1
- package/dist/{layers.DVgYGM1w.js → layers.C80DAyRm.js} +1 -1
- package/dist/{layers.C5T2PhRe.js → layers.C9pMTrPT.js} +1 -1
- package/dist/{layers.Bx7OCV3r.js → layers.CBxeLVe0.js} +1 -1
- package/dist/{layers.7Q672Pf5.js → layers.CECoWVe4.js} +1 -1
- package/dist/{layers.DB-0231e.js → layers.CE_gcIbO.js} +1 -1
- package/dist/{layers.Dut-n8DC.js → layers.CFgFtwyU.js} +1 -1
- package/dist/{layers.B3UOW9kM.js → layers.CGC_Vi-8.js} +1 -1
- package/dist/{layers.uOmWW03b.js → layers.CHgp6SLu.js} +3 -3
- package/dist/{layers.D441tyKb.js → layers.CHqbUTS6.js} +1 -1
- package/dist/{layers.CPPZYBwd.js → layers.CJAFRP0t.js} +1 -1
- package/dist/{layers.DVUGI-yF.js → layers.CL7jy-ph.js} +1 -1
- package/dist/{layers.DurUGCfX.js → layers.COcgAv2H.js} +3 -3
- package/dist/{layers.DsNyZQAk.js → layers.CQguMFwj.js} +1 -1
- package/dist/{layers.k8rTp6Qv.js → layers.CTqPfuMx.js} +1 -1
- package/dist/{layers.BVLcUYWr.js → layers.CVB6i8Aw.js} +1 -1
- package/dist/{layers.C2Eni0Sy.js → layers.CXvFYbed.js} +1 -1
- package/dist/{layers.Vphy-jMh.js → layers.CY7sTkWR.js} +4 -4
- package/dist/{layers.CyS9yZ07.js → layers.CYLPtJ8n.js} +1 -1
- package/dist/{layers.C0MaC4aH.js → layers.Ca0ZKsG0.js} +1 -1
- package/dist/{layers.CQUaf576.js → layers.Cc6CSQsD.js} +1 -1
- package/dist/{layers.D_uz6BuB.js → layers.CcN0OTW6.js} +1 -1
- package/dist/{layers.ClI1HtA1.js → layers.CcliTsie.js} +1 -1
- package/dist/{layers.BCpCM6cF.js → layers.CdM3tGgk.js} +1 -1
- package/dist/{layers.CJb3NDTx.js → layers.CeshSqBZ.js} +1 -1
- package/dist/{layers.Bxo8qFfZ.js → layers.CgKXu2AQ.js} +1 -1
- package/dist/{layers.CKD44byx.js → layers.CgkEYJj4.js} +2 -2
- package/dist/{layers.DJOGd3tQ.js → layers.ChT0doyJ.js} +1 -1
- package/dist/{layers.klb1U2XS.js → layers.ChpNaUkc.js} +1 -1
- package/dist/{layers.BhYHAnG5.js → layers.CjxBqJRH.js} +1 -1
- package/dist/{layers._WwyuPPl.js → layers.Clor12m8.js} +1 -1
- package/dist/{layers.DnfoOjUk.js → layers.ClrTHBuC.js} +1 -1
- package/dist/{layers.DHHs2c0M.js → layers.CmRbzdyu.js} +1 -1
- package/dist/{layers.BlFkk34t.js → layers.Cmu1DdNo.js} +1 -1
- package/dist/{layers.BhUDle4s.js → layers.CogDUNgw.js} +1 -1
- package/dist/{layers.DcAXeN4H.js → layers.Cq0Wt2ED.js} +3 -3
- package/dist/{layers.C5JcPjms.js → layers.CqGvWjPH.js} +4 -4
- package/dist/{layers.E97qOri2.js → layers.CrA5X-o-.js} +1 -1
- package/dist/{layers.Da1C-p2A.js → layers.CsPkxXdg.js} +4 -4
- package/dist/{layers.C3SeFoQ5.js → layers.CslCKr4Y.js} +1 -1
- package/dist/layers.CttFzDBd.js +6 -0
- package/dist/{layers.CoMJAPt_.js → layers.Cu75saZW.js} +1 -1
- package/dist/{layers.waY0fD81.js → layers.CuqyiCAG.js} +1 -1
- package/dist/{layers.BpkejIBE.js → layers.CwbgI2Q2.js} +1 -1
- package/dist/{layers.B0LE0qMi.js → layers.CzPfGDY_.js} +1 -1
- package/dist/{layers.Dm_WtI0f.js → layers.D28bBzFf.js} +1 -1
- package/dist/{layers.DMkCvSun.js → layers.D2LTMG9q.js} +1 -1
- package/dist/{layers.C8nMfZR8.js → layers.D2wECoA_.js} +1 -1
- package/dist/{layers.upFkvLfW.js → layers.D6HeO9p9.js} +1 -1
- package/dist/{layers.bElFyxsU.js → layers.D7rjFFCg.js} +1 -1
- package/dist/{layers.DbyX-lJT.js → layers.D8RaRl2t.js} +2 -2
- package/dist/layers.DALbIlUI.js +230 -0
- package/dist/{layers.A3Fw0TFw.js → layers.DAv70i-D.js} +1 -1
- package/dist/{layers.YOwq_Za2.js → layers.DBSCgZUy.js} +1 -1
- package/dist/{layers.Xya0R5qm.js → layers.DBcw-4sD.js} +1 -1
- package/dist/{layers.B4DZUAOT.js → layers.DCL6SNbE.js} +1 -1
- package/dist/{layers.KA-C6J9c.js → layers.DCZBjDWS.js} +1 -1
- package/dist/{layers.WLRBvBJV.js → layers.DES14nj9.js} +1 -1
- package/dist/{layers.DqrWzdkO.js → layers.DF8nAu5X.js} +1 -1
- package/dist/{layers.CiAUXfRk.js → layers.DGeQwWkH.js} +1 -1
- package/dist/{layers.C_vZ0NuB.js → layers.DGq2uOB4.js} +1 -1
- package/dist/{layers.DyFkAG4v.js → layers.DHwAi317.js} +4 -4
- package/dist/{layers.D2tZTitd.js → layers.DKVzNVl1.js} +5 -5
- package/dist/layers.DLM0LVbg.js +230 -0
- package/dist/{layers.DUnVb8_5.js → layers.DLeC3xL4.js} +1 -1
- package/dist/{layers.Bfy8l2kr.js → layers.DMI6toFv.js} +1 -1
- package/dist/{layers.DmEPp8z2.js → layers.DMd4TJI1.js} +1 -1
- package/dist/{layers.ZXrwNrVl.js → layers.DOAQ1q6S.js} +1 -1
- package/dist/{layers.CC-Xq_sc.js → layers.DQBpTAif.js} +4 -4
- package/dist/{layers.DMZvxsxt.js → layers.DR1m1ZTj.js} +1 -1
- package/dist/layers.DRGH3445.js +74 -0
- package/dist/{layers.DVPCLKjN.js → layers.DXcF3z0P.js} +1 -1
- package/dist/{layers.DrskdBZ_.js → layers.DY91sTA3.js} +1 -1
- package/dist/{layers.DHGlkms1.js → layers.DZwZ1EEf.js} +1 -1
- package/dist/layers.DbCGmdAZ.js +1 -0
- package/dist/{layers.IyblTwwj.js → layers.DbofzYFH.js} +1 -1
- package/dist/{layers.BHvPLN6o.js → layers.DcTxhRtF.js} +1 -1
- package/dist/{layers.CvJBoGvb.js → layers.DemDw6Cf.js} +6104 -5918
- package/dist/{layers.DrxWA6j_.js → layers.DgH_Cq_P.js} +1 -1
- package/dist/{layers.ByPOX6Oc.js → layers.DgMJrdRS.js} +1 -1
- package/dist/{layers.BQWyPT9Z.js → layers.DhEMktUh.js} +1 -1
- package/dist/{layers.C9n6yCjj.js → layers.DhzrRNFX.js} +1 -1
- package/dist/{layers.RzeifHH3.js → layers.Diejakg7.js} +1 -1
- package/dist/{layers.BE1mfFWR.js → layers.Dkc8kHhw.js} +1 -1
- package/dist/{layers.DIPX0xmv.js → layers.DmUtnXz2.js} +1 -1
- package/dist/{layers.D2Hete12.js → layers.Dmrie3UJ.js} +3 -3
- package/dist/{layers.NcUJfdOv.js → layers.Dn3LDD7a.js} +1 -1
- package/dist/{layers.B0ITvllV.js → layers.DpG8cxXN.js} +1 -1
- package/dist/{layers.x83OFv25.js → layers.DpT9C7J5.js} +3 -3
- package/dist/{layers.D4JzdyBQ.js → layers.Dq4tDnHi.js} +4 -4
- package/dist/{layers.Dj7NyN1B.js → layers.Ds5ukhgC.js} +1 -1
- package/dist/{layers.DpcCywPK.js → layers.DsyHUNo4.js} +1 -1
- package/dist/{layers.jm0e8Psm.js → layers.DtAddyk0.js} +1 -1
- package/dist/{layers.Cs6LP-Ws.js → layers.Dv83jnWY.js} +1 -1
- package/dist/{layers.Dco19f_-.js → layers.Dw_Ucav4.js} +1 -1
- package/dist/{layers.C2m1FCZM.js → layers.DwpwNNEP.js} +4 -4
- package/dist/{layers.5-fIF21X.js → layers.Dy3R8Ivy.js} +1 -1
- package/dist/{layers.CulQ2uk1.js → layers.DybGeGhA.js} +3 -3
- package/dist/{layers.B6p7rIs4.js → layers.Dyz2fk_d.js} +1 -1
- package/dist/{layers.ymeFsY_7.js → layers.DzdSVM2f.js} +1 -1
- package/dist/{layers.CPWL3tHT.js → layers.FPxH8zbM.js} +1 -1
- package/dist/layers.H1gF6KIw.js +8 -0
- package/dist/{layers.CXUKgI5q.js → layers.JSj1aVD5.js} +1 -1
- package/dist/{layers.BgnFroQl.js → layers.Jkmzp-U_.js} +1 -1
- package/dist/{layers.CvXNYNtw.js → layers.KIo9yPws.js} +1 -1
- package/dist/{layers.B91BKOY4.js → layers.Kcod8v7W.js} +1 -1
- package/dist/{layers.CclvSuMx.js → layers.KxR_BiRz.js} +3 -3
- package/dist/{layers.BHNPjk4K.js → layers.PPhekidt.js} +1 -1
- package/dist/{layers.Dbc77u4l.js → layers.QQJ4_AXD.js} +3 -3
- package/dist/{layers.Bo2G74v1.js → layers.QhzlNbbg.js} +1 -1
- package/dist/{layers.CO-tXyYW.js → layers.RI5Hav0p.js} +1 -1
- package/dist/{layers.Bt_1Izqx.js → layers.SU9JFf9U.js} +1 -1
- package/dist/{layers.C-RiaptQ.js → layers.SwyrCWVZ.js} +1 -1
- package/dist/{layers.DkLwn3LQ.js → layers.U-5IQ0Cb.js} +1 -1
- package/dist/{layers.zlxCgz5o.js → layers.UEPfDi5x.js} +2 -2
- package/dist/{layers.C7Gv20au.js → layers.Uzm_jduT.js} +1 -1
- package/dist/{layers.Db7LZEsM.js → layers.V9CbLj7H.js} +1 -1
- package/dist/{layers.jEw3A18y.js → layers.VeJW7f5r.js} +2 -2
- package/dist/{layers.D2iAmiaa.js → layers.XTRaUCQ9.js} +1 -1
- package/dist/{layers.BE52sb5G.js → layers.YU24v9r1.js} +1 -1
- package/dist/{layers.CvkPWNz6.js → layers.YX_5wR87.js} +3 -3
- package/dist/{layers.DR6xFwk7.js → layers.Z9AZfqUw.js} +1 -1
- package/dist/{layers.DUSnwZkf.js → layers.Z9ByUYDA.js} +1 -1
- package/dist/{layers.m94tJFKv.js → layers.ZX_GRU9U.js} +1 -1
- package/dist/{layers.BSNHhHc5.js → layers._YwnKGXx.js} +1 -1
- package/dist/{layers.CLeQzG_O.js → layers.a5l4Yi22.js} +1 -1
- package/dist/{layers.Bd8AHNDD.js → layers.bpH1184U.js} +1 -1
- package/dist/{layers.DpQhkpbr.js → layers.btv99IwE.js} +1 -1
- package/dist/{layers.CpBm9OI0.js → layers.dEX7yyjZ.js} +1 -1
- package/dist/{layers.DvpUQ7O1.js → layers.fUTDuVRi.js} +1 -1
- package/dist/{layers.Bl8IX7HK.js → layers.g86qWbTP.js} +1 -1
- package/dist/{layers.BI_DwGKY.js → layers.hB-2yFxi.js} +1 -1
- package/dist/{layers.C21nzrSY.js → layers.kKbX2Mi4.js} +1 -1
- package/dist/{layers.DnKE_0nH.js → layers.ktBFT1iD.js} +1 -1
- package/dist/{layers.rS4Y9F4V.js → layers.nhaXvhfv.js} +1 -1
- package/dist/{layers.Bn9FtCwB.js → layers.oqjjm_bz.js} +1 -1
- package/dist/{layers.Hb0J7tKS.js → layers.u7473e8q.js} +1 -1
- package/dist/{layers.DDJKm1dN.js → layers.ukG2BTZZ.js} +1 -1
- package/dist/{layers.C7-gYd4x.js → layers.vqklaDLR.js} +1 -1
- package/dist/{layers.DCZDvkQY.js → layers.w5VbneVb.js} +1 -1
- package/dist/{layers.WE3tLCXz.js → layers.yO98-ROZ.js} +1 -1
- package/dist/{layers.BVGUJrpk.js → layers.z64pPQiK.js} +7 -7
- package/package.json +1 -1
- package/dist/layers.Bk54sqj7.js +0 -8
- package/dist/layers.BqKfAFsh.js +0 -230
- package/dist/layers.CMwF7dgU.js +0 -206
- package/dist/layers.D2fxswZv.js +0 -74
- package/dist/layers.DYpj292-.js +0 -1
- package/dist/layers.DfvhX3vC.js +0 -1
- package/dist/layers.DgbWQVOK.js +0 -6
- package/dist/layers.DsN4v91h.js +0 -1
- package/dist/layers.kERuI3ru.js +0 -1
package/dist/layers.CMwF7dgU.js
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import { jsx as s, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as E } from "react-i18next";
|
|
3
|
-
import { Modal as W, Text as H, Flex as S, Button as k, useMantineColorScheme as F, Loader as U } from "@mantine/core";
|
|
4
|
-
import { useRef as _, useState as f, useEffect as g, useCallback as w, Suspense as J, lazy as K } from "react";
|
|
5
|
-
import { BottomDrawerWithoutHeader as Y } from "@layers-app/shared";
|
|
6
|
-
const te = ({
|
|
7
|
-
isCloseModal: i,
|
|
8
|
-
setCloseModalOpen: t,
|
|
9
|
-
confirmClose: a
|
|
10
|
-
}) => {
|
|
11
|
-
const { t: n } = E();
|
|
12
|
-
return /* @__PURE__ */ s(
|
|
13
|
-
W,
|
|
14
|
-
{
|
|
15
|
-
opened: i,
|
|
16
|
-
onClose: () => {
|
|
17
|
-
t(!1);
|
|
18
|
-
},
|
|
19
|
-
centered: !0,
|
|
20
|
-
title: n("editor.unsavedChanges.title"),
|
|
21
|
-
closeOnClickOutside: !0,
|
|
22
|
-
closeOnEscape: !0,
|
|
23
|
-
size: "500",
|
|
24
|
-
zIndex: 999,
|
|
25
|
-
children: /* @__PURE__ */ p("div", { children: [
|
|
26
|
-
/* @__PURE__ */ s(H, { mb: "md", children: n("editor.unsavedChanges.message") }),
|
|
27
|
-
/* @__PURE__ */ p(S, { justify: "flex-end", gap: "sm", children: [
|
|
28
|
-
/* @__PURE__ */ s(
|
|
29
|
-
k,
|
|
30
|
-
{
|
|
31
|
-
variant: "default",
|
|
32
|
-
onClick: () => {
|
|
33
|
-
t(!1);
|
|
34
|
-
},
|
|
35
|
-
fullWidth: !0,
|
|
36
|
-
children: n("editor.unsavedChanges.cancel")
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ s(k, { color: "red", onClick: a, fullWidth: !0, children: n("editor.unsavedChanges.closeWithoutSaving") })
|
|
40
|
-
] })
|
|
41
|
-
] })
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
}, x = {
|
|
45
|
-
elements: [],
|
|
46
|
-
files: {},
|
|
47
|
-
appState: {},
|
|
48
|
-
previewSVG: null
|
|
49
|
-
}, re = (i) => {
|
|
50
|
-
try {
|
|
51
|
-
const t = JSON.parse(i);
|
|
52
|
-
if (Array.isArray(t))
|
|
53
|
-
return { ...x, elements: t };
|
|
54
|
-
if (t && typeof t == "object")
|
|
55
|
-
return {
|
|
56
|
-
elements: Array.isArray(t.elements) ? t.elements : [],
|
|
57
|
-
files: t.files && typeof t.files == "object" ? t.files : {},
|
|
58
|
-
appState: t.appState && typeof t.appState == "object" ? t.appState : {},
|
|
59
|
-
previewSVG: typeof t.previewSVG == "string" ? t.previewSVG : typeof t.previewSvg == "string" ? t.previewSvg : null
|
|
60
|
-
};
|
|
61
|
-
} catch {
|
|
62
|
-
}
|
|
63
|
-
return { ...x };
|
|
64
|
-
}, I = {
|
|
65
|
-
en: "en-US",
|
|
66
|
-
ru: "ru-RU",
|
|
67
|
-
fr: "fr-FR",
|
|
68
|
-
de: "de-DE",
|
|
69
|
-
es: "es-ES",
|
|
70
|
-
it: "it-IT",
|
|
71
|
-
pt: "pt-BR",
|
|
72
|
-
zh: "zh-CN",
|
|
73
|
-
ja: "ja-JP",
|
|
74
|
-
ko: "ko-KR",
|
|
75
|
-
ar: "ar-SA",
|
|
76
|
-
hi: "hi-IN",
|
|
77
|
-
nl: "nl-NL",
|
|
78
|
-
tr: "tr-TR",
|
|
79
|
-
pl: "pl-PL",
|
|
80
|
-
sv: "sv-SE",
|
|
81
|
-
cs: "cs-CZ",
|
|
82
|
-
uk: "uk-UA",
|
|
83
|
-
ro: "ro-RO",
|
|
84
|
-
fi: "fi-FI",
|
|
85
|
-
da: "da-DK",
|
|
86
|
-
no: "no-NO",
|
|
87
|
-
el: "el-GR",
|
|
88
|
-
he: "he-IL",
|
|
89
|
-
th: "th-TH",
|
|
90
|
-
id: "id-ID",
|
|
91
|
-
ms: "ms-MY",
|
|
92
|
-
vi: "vi-VN"
|
|
93
|
-
}, X = /* @__PURE__ */ K(async () => ({ default: (await import("./layers.CvJBoGvb.js").then((t) => t.M)).Excalidraw })), Z = () => {
|
|
94
|
-
const [i, t] = f(
|
|
95
|
-
null
|
|
96
|
-
), a = w(
|
|
97
|
-
(n) => t(n),
|
|
98
|
-
[]
|
|
99
|
-
);
|
|
100
|
-
return [i, a];
|
|
101
|
-
};
|
|
102
|
-
function oe({
|
|
103
|
-
onSave: i,
|
|
104
|
-
initialElements: t,
|
|
105
|
-
initialAppState: a,
|
|
106
|
-
initialFiles: n,
|
|
107
|
-
isShown: l = !1,
|
|
108
|
-
onDelete: M,
|
|
109
|
-
onClose: R,
|
|
110
|
-
isEdited: L
|
|
111
|
-
}) {
|
|
112
|
-
const [r, B] = Z(), { i18n: T } = E(), { colorScheme: z } = F(), v = _(!1), [c, D] = f(t), [h, A] = f(n), [j, N] = f(l);
|
|
113
|
-
g(() => {
|
|
114
|
-
l && N(!0);
|
|
115
|
-
}, [l]), g(() => {
|
|
116
|
-
!l || v.current || (v.current = !0, Promise.resolve({ }));
|
|
117
|
-
}, [l]), g(() => {
|
|
118
|
-
l && setTimeout(() => {
|
|
119
|
-
var e;
|
|
120
|
-
(e = r == null ? void 0 : r.refresh) == null || e.call(r);
|
|
121
|
-
}, 500);
|
|
122
|
-
}, [l, r]);
|
|
123
|
-
const V = w(async () => {
|
|
124
|
-
var b, y;
|
|
125
|
-
const { exportToSvg: e } = await import("./layers.CvJBoGvb.js").then((u) => u.M), d = ((b = r == null ? void 0 : r.getAppState) == null ? void 0 : b.call(r)) ?? a, o = await e({
|
|
126
|
-
appState: d,
|
|
127
|
-
elements: c,
|
|
128
|
-
files: h
|
|
129
|
-
}), m = (y = o == null ? void 0 : o.firstElementChild) == null ? void 0 : y.firstElementChild, C = o.getAttribute("viewBox");
|
|
130
|
-
if (C != null) {
|
|
131
|
-
const u = C.split(" ");
|
|
132
|
-
o.setAttribute("width", u[2]), o.setAttribute("height", u[3]);
|
|
133
|
-
}
|
|
134
|
-
return m && m.tagName === "style" && m.remove(), o.setAttribute("width", "100%"), o.setAttribute("height", "100%"), o.setAttribute("display", "block"), o.classList.add("excalidraw-svg"), o.outerHTML;
|
|
135
|
-
}, [c, h, r, a]), G = () => {
|
|
136
|
-
if (c && c.filter((e) => !e.isDeleted).length > 0) {
|
|
137
|
-
const e = r == null ? void 0 : r.getAppState(), d = {
|
|
138
|
-
exportBackground: e == null ? void 0 : e.exportBackground,
|
|
139
|
-
exportScale: e == null ? void 0 : e.exportScale,
|
|
140
|
-
exportWithDarkMode: (e == null ? void 0 : e.theme) === "dark",
|
|
141
|
-
isBindingEnabled: e == null ? void 0 : e.isBindingEnabled,
|
|
142
|
-
isLoading: e == null ? void 0 : e.isLoading,
|
|
143
|
-
name: e == null ? void 0 : e.name,
|
|
144
|
-
theme: e == null ? void 0 : e.theme,
|
|
145
|
-
viewBackgroundColor: e == null ? void 0 : e.viewBackgroundColor,
|
|
146
|
-
viewModeEnabled: e == null ? void 0 : e.viewModeEnabled,
|
|
147
|
-
zenModeEnabled: e == null ? void 0 : e.zenModeEnabled,
|
|
148
|
-
zoom: e == null ? void 0 : e.zoom
|
|
149
|
-
};
|
|
150
|
-
(async () => {
|
|
151
|
-
const o = await V();
|
|
152
|
-
i(c, d, h, o);
|
|
153
|
-
})();
|
|
154
|
-
} else
|
|
155
|
-
M();
|
|
156
|
-
}, O = (e, d, o) => {
|
|
157
|
-
(e == null ? void 0 : e.length) !== (t == null ? void 0 : t.length) && (L.current = !0), D(e), A(o);
|
|
158
|
-
};
|
|
159
|
-
return /* @__PURE__ */ s(
|
|
160
|
-
Y,
|
|
161
|
-
{
|
|
162
|
-
opened: l,
|
|
163
|
-
onClose: R,
|
|
164
|
-
onSave: G,
|
|
165
|
-
className: "excaildraw-modal",
|
|
166
|
-
closeOnEscape: !1,
|
|
167
|
-
children: j && /* @__PURE__ */ s(
|
|
168
|
-
J,
|
|
169
|
-
{
|
|
170
|
-
fallback: /* @__PURE__ */ s(
|
|
171
|
-
"div",
|
|
172
|
-
{
|
|
173
|
-
style: {
|
|
174
|
-
display: "flex",
|
|
175
|
-
justifyContent: "center",
|
|
176
|
-
alignItems: "center",
|
|
177
|
-
height: "100%",
|
|
178
|
-
minHeight: "400px"
|
|
179
|
-
},
|
|
180
|
-
children: /* @__PURE__ */ s(U, { size: "sm" })
|
|
181
|
-
}
|
|
182
|
-
),
|
|
183
|
-
children: /* @__PURE__ */ s(
|
|
184
|
-
X,
|
|
185
|
-
{
|
|
186
|
-
langCode: I[T.language],
|
|
187
|
-
theme: z,
|
|
188
|
-
onChange: O,
|
|
189
|
-
excalidrawAPI: B,
|
|
190
|
-
initialData: {
|
|
191
|
-
appState: { ...a || { isLoading: !1 } },
|
|
192
|
-
elements: t,
|
|
193
|
-
files: n
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
)
|
|
197
|
-
}
|
|
198
|
-
)
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
export {
|
|
203
|
-
te as C,
|
|
204
|
-
oe as E,
|
|
205
|
-
re as p
|
|
206
|
-
};
|
package/dist/layers.D2fxswZv.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, Fragment as M, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { useState as r, useRef as g, useEffect as w } from "react";
|
|
3
|
-
import { r as x, o as N, E as O, g as S, K as A, $ as D } from "./layers.BVGUJrpk.js";
|
|
4
|
-
import { C as h, E as R } from "./layers.CMwF7dgU.js";
|
|
5
|
-
const I = x(
|
|
6
|
-
"INSERT_EXCALIDRAW_COMMAND"
|
|
7
|
-
);
|
|
8
|
-
function L() {
|
|
9
|
-
const [t] = N(), [d, o] = r(!1), [e, f] = r(
|
|
10
|
-
null
|
|
11
|
-
), s = g(null), [u, a] = r(!1);
|
|
12
|
-
w(() => {
|
|
13
|
-
if (!t.hasNodes([O]))
|
|
14
|
-
throw new Error(
|
|
15
|
-
"ExcalidrawPlugin: ExcalidrawNode not registered on editor"
|
|
16
|
-
);
|
|
17
|
-
return t.registerCommand(
|
|
18
|
-
I,
|
|
19
|
-
() => {
|
|
20
|
-
o(!0);
|
|
21
|
-
const n = S();
|
|
22
|
-
return f(n), !0;
|
|
23
|
-
},
|
|
24
|
-
A
|
|
25
|
-
);
|
|
26
|
-
}, [t]);
|
|
27
|
-
const l = () => {
|
|
28
|
-
o(!1), a(!1), s.current = !1;
|
|
29
|
-
};
|
|
30
|
-
return /* @__PURE__ */ p(M, { children: [
|
|
31
|
-
/* @__PURE__ */ c(
|
|
32
|
-
h,
|
|
33
|
-
{
|
|
34
|
-
isCloseModal: u,
|
|
35
|
-
confirmClose: l,
|
|
36
|
-
setCloseModalOpen: a
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ c(
|
|
40
|
-
R,
|
|
41
|
-
{
|
|
42
|
-
initialElements: [],
|
|
43
|
-
initialAppState: {},
|
|
44
|
-
initialFiles: {},
|
|
45
|
-
isShown: d,
|
|
46
|
-
onDelete: () => {
|
|
47
|
-
o(!1);
|
|
48
|
-
},
|
|
49
|
-
onClose: () => {
|
|
50
|
-
s.current ? a(!0) : l();
|
|
51
|
-
},
|
|
52
|
-
onSave: (n, E, m, C) => {
|
|
53
|
-
t.update(() => {
|
|
54
|
-
const i = D();
|
|
55
|
-
i.setData(
|
|
56
|
-
JSON.stringify({
|
|
57
|
-
appState: E,
|
|
58
|
-
elements: n,
|
|
59
|
-
files: m,
|
|
60
|
-
previewSVG: C
|
|
61
|
-
})
|
|
62
|
-
), e && e.getParent() && (e == null || e.replace(i));
|
|
63
|
-
}), o(!1);
|
|
64
|
-
},
|
|
65
|
-
closeOnClickOutside: !1,
|
|
66
|
-
isEdited: s
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
] });
|
|
70
|
-
}
|
|
71
|
-
export {
|
|
72
|
-
I as INSERT_EXCALIDRAW_COMMAND,
|
|
73
|
-
L as default
|
|
74
|
-
};
|
package/dist/layers.DYpj292-.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),e=require("./layers.CC-Xq_sc.js"),u=require("./layers.kERuI3ru.js"),f=e.re("INSERT_EXCALIDRAW_COMMAND");function w(){const[n]=e.o(),[E,o]=s.useState(!1),[t,C]=s.useState(null),r=s.useRef(null),[M,a]=s.useState(!1);s.useEffect(()=>{if(!n.hasNodes([e.ExcalidrawNode]))throw new Error("ExcalidrawPlugin: ExcalidrawNode not registered on editor");return n.registerCommand(f,()=>{o(!0);const l=e.getCurrentElement();return C(l),!0},e.Ki)},[n]);const c=()=>{o(!1),a(!1),r.current=!1},x=()=>{r.current?a(!0):c()},S=()=>{o(!1)},N=(l,g,O,m)=>{n.update(()=>{const d=e.$createExcalidrawNode();d.setData(JSON.stringify({appState:g,elements:l,files:O,previewSVG:m})),t&&t.getParent()&&(t==null||t.replace(d))}),o(!1)};return i.jsxs(i.Fragment,{children:[i.jsx(u.ConfirmModal,{isCloseModal:M,confirmClose:c,setCloseModalOpen:a}),i.jsx(u.ExcalidrawModal,{initialElements:[],initialAppState:{},initialFiles:{},isShown:E,onDelete:S,onClose:x,onSave:N,closeOnClickOutside:!1,isEdited:r})]})}exports.INSERT_EXCALIDRAW_COMMAND=f;exports.default=w;
|
package/dist/layers.DfvhX3vC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./layers.BDEzwoD0.js");require("./layers.BqKfAFsh.js");exports.Commands=e.CB;exports.subsetToBase64=e.QB;exports.subsetToBinary=e.NQ;exports.toBase64=e.AI;
|
package/dist/layers.DgbWQVOK.js
DELETED
package/dist/layers.DsN4v91h.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./layers.DcAXeN4H.js"),s=(e,r)=>n.Utils.lang.round(n.Color.parse(e)[r]);exports.channel=s;
|
package/dist/layers.kERuI3ru.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),k=require("react-i18next"),d=require("@mantine/core"),n=require("react"),N=require("@layers-app/shared"),V=({isCloseModal:l,setCloseModalOpen:t,confirmClose:c})=>{const{t:i}=k.useTranslation();return o.jsx(d.Modal,{opened:l,onClose:()=>{t(!1)},centered:!0,title:i("editor.unsavedChanges.title"),closeOnClickOutside:!0,closeOnEscape:!0,size:"500",zIndex:999,children:o.jsxs("div",{children:[o.jsx(d.Text,{mb:"md",children:i("editor.unsavedChanges.message")}),o.jsxs(d.Flex,{justify:"flex-end",gap:"sm",children:[o.jsx(d.Button,{variant:"default",onClick:()=>{t(!1)},fullWidth:!0,children:i("editor.unsavedChanges.cancel")}),o.jsx(d.Button,{color:"red",onClick:c,fullWidth:!0,children:i("editor.unsavedChanges.closeWithoutSaving")})]})]})})},y={elements:[],files:{},appState:{},previewSVG:null},S=l=>{try{const t=JSON.parse(l);if(Array.isArray(t))return{...y,elements:t};if(t&&typeof t=="object")return{elements:Array.isArray(t.elements)?t.elements:[],files:t.files&&typeof t.files=="object"?t.files:{},appState:t.appState&&typeof t.appState=="object"?t.appState:{},previewSVG:typeof t.previewSVG=="string"?t.previewSVG:typeof t.previewSvg=="string"?t.previewSvg:null}}catch{}return{...y}},G={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"},O=n.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./layers.BqKfAFsh.js")).then(t=>t.index)).Excalidraw})),W=()=>{const[l,t]=n.useState(null),c=n.useCallback(i=>t(i),[]);return[l,c]};function H({onSave:l,initialElements:t,initialAppState:c,initialFiles:i,isShown:a=!1,onDelete:j,onClose:E,isEdited:w}){const[s,R]=W(),{i18n:M}=k.useTranslation(),{colorScheme:B}=d.useMantineColorScheme(),v=n.useRef(!1),[u,L]=n.useState(t),[g,T]=n.useState(i),[p,D]=n.useState(a);n.useEffect(()=>{a&&D(!0)},[a]),n.useEffect(()=>{!a||v.current||(v.current=!0,Promise.resolve().then(()=>require("./layers.Dyvby5gX.js")))},[a]),n.useEffect(()=>{a&&setTimeout(()=>{var e;(e=s==null?void 0:s.refresh)==null||e.call(s)},500)},[a,s]);const z=n.useCallback(async()=>{var C,b;const{exportToSvg:e}=await Promise.resolve().then(()=>require("./layers.BqKfAFsh.js")).then(h=>h.index),f=((C=s==null?void 0:s.getAppState)==null?void 0:C.call(s))??c,r=await e({appState:f,elements:u,files:g}),m=(b=r==null?void 0:r.firstElementChild)==null?void 0:b.firstElementChild,x=r.getAttribute("viewBox");if(x!=null){const h=x.split(" ");r.setAttribute("width",h[2]),r.setAttribute("height",h[3])}return m&&m.tagName==="style"&&m.remove(),r.setAttribute("width","100%"),r.setAttribute("height","100%"),r.setAttribute("display","block"),r.classList.add("excalidraw-svg"),r.outerHTML},[u,g,s,c]),A=()=>{if(u&&u.filter(e=>!e.isDeleted).length>0){const e=s==null?void 0:s.getAppState(),f={exportBackground:e==null?void 0:e.exportBackground,exportScale:e==null?void 0:e.exportScale,exportWithDarkMode:(e==null?void 0:e.theme)==="dark",isBindingEnabled:e==null?void 0:e.isBindingEnabled,isLoading:e==null?void 0:e.isLoading,name:e==null?void 0:e.name,theme:e==null?void 0:e.theme,viewBackgroundColor:e==null?void 0:e.viewBackgroundColor,viewModeEnabled:e==null?void 0:e.viewModeEnabled,zenModeEnabled:e==null?void 0:e.zenModeEnabled,zoom:e==null?void 0:e.zoom};(async()=>{const r=await z();l(u,f,g,r)})()}else j()},q=(e,f,r)=>{(e==null?void 0:e.length)!==(t==null?void 0:t.length)&&(w.current=!0),L(e),T(r)};return o.jsx(N.BottomDrawerWithoutHeader,{opened:a,onClose:E,onSave:A,className:"excaildraw-modal",closeOnEscape:!1,children:p&&o.jsx(n.Suspense,{fallback:o.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",minHeight:"400px"},children:o.jsx(d.Loader,{size:"sm"})}),children:o.jsx(O,{langCode:G[M.language],theme:B,onChange:q,excalidrawAPI:R,initialData:{appState:{...c||{isLoading:!1}},elements:t,files:i}})})})}exports.ConfirmModal=V;exports.ExcalidrawModal=H;exports.parseExcalidrawData=S;
|