@layers-app/editor 0.7.17 → 0.7.20
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 +2 -2
- package/dist/index.d.ts +77 -1
- package/dist/index.js +15 -9
- package/dist/{layers.DTik-pik.js → layers.-pxItkuK.js} +1 -1
- package/dist/{layers.QNYkTpWx.js → layers.4783bPvO.js} +1 -1
- package/dist/{layers.pc1SXYEj.js → layers.4XOTUH37.js} +1 -1
- package/dist/{layers.Cq_SVM9v.js → layers.4peyl00A.js} +1 -1
- package/dist/{layers.D7ZMXlyX.js → layers.4wAcqQtQ.js} +50 -50
- package/dist/{layers.04n4wbqY.js → layers.4ykD0YcM.js} +1 -1
- package/dist/{layers.DjYl24mJ.js → layers.6Feq9YXQ.js} +1 -1
- package/dist/{layers.CZLAcdMj.js → layers.6GQPwq_6.js} +1 -1
- package/dist/{layers.f7Ihj79-.js → layers.7wQbmwwB.js} +1 -1
- package/dist/{layers.BbJS6RnG.js → layers.8JNx1FTq.js} +1 -1
- package/dist/{layers.BO54hyIV.js → layers.8jhm9FEJ.js} +4 -4
- package/dist/{layers.BJ0kBYXi.js → layers.8lNrKfca.js} +1 -1
- package/dist/{layers.Dq2XAyOc.js → layers.9kQUqqYe.js} +1 -1
- package/dist/{layers.Ben_68X-.js → layers.AO3vHISA.js} +1 -1
- package/dist/layers.Ab6Lx44l.js +129 -0
- package/dist/layers.B-w9_4cB.js +22 -0
- package/dist/{layers.wJNNYF6u.js → layers.B0bpRgNT.js} +3 -3
- package/dist/{layers.BZfVYPU5.js → layers.B2OK_mI8.js} +1 -1
- package/dist/{layers.D3f2mUJi.js → layers.B3mzJc8P.js} +15 -12
- package/dist/{layers.B5XF9q_I.js → layers.B5YhL7Gw.js} +1 -1
- package/dist/{layers.HAyebP5S.js → layers.B885pkJL.js} +10 -7
- package/dist/{layers.BXcsZWke.js → layers.B961U-Vk.js} +1 -1
- package/dist/{layers.BSUQkbOc.js → layers.B9jATAXU.js} +1 -1
- package/dist/{layers.C7FVdo84.js → layers.BBv6P-Uu.js} +1 -1
- package/dist/{layers.CH6vY6nz.js → layers.BC6JEDP2.js} +92 -89
- package/dist/{layers.J8v8A5JD.js → layers.BEagxCE_.js} +1 -1
- package/dist/{layers.B6hh7kZl.js → layers.BH34WCDb.js} +1 -1
- package/dist/{layers.ZZQfmNLr.js → layers.BIkD0WQr.js} +1 -1
- package/dist/{layers.CIIPaPYQ.js → layers.BIlhFIEz.js} +1 -1
- package/dist/{layers.C35KTUy2.js → layers.BJLOp9cg.js} +86 -84
- package/dist/{layers.BHgpnpIV.js → layers.BJsWSYrS.js} +7 -4
- package/dist/{layers.C0J8aakp.js → layers.BKwcxD8A.js} +1 -1
- package/dist/{layers.Ds9-wuCp.js → layers.BLv_frn1.js} +1 -1
- package/dist/layers.BO2V23mI.js +1 -0
- package/dist/{layers.CiOE4x64.js → layers.BO_D4q5p.js} +1 -1
- package/dist/{layers.5QVC7kU0.js → layers.BP7EcZBZ.js} +1 -1
- package/dist/{layers.Cx1Gq9Dp.js → layers.BP8OcU0T.js} +1 -1
- package/dist/{layers.XOfuSupS.js → layers.BRaRY9tU.js} +3 -3
- package/dist/{layers.CI8n-mXC.js → layers.BT2iHuSm.js} +1 -1
- package/dist/{layers.41VWy-aG.js → layers.BU-tjKWq.js} +1 -1
- package/dist/{layers.D8q3-pj1.js → layers.BWEUOe94.js} +1 -1
- package/dist/{layers.wKL0lWNs.js → layers.BXAu7G4b.js} +1 -1
- package/dist/{layers.192DYlty.js → layers.BZ9zcjtY.js} +1 -1
- package/dist/{layers.Cvcaleoh.js → layers.BZa5A6cg.js} +1 -1
- package/dist/{layers.BRrrKVX0.js → layers.BZlzQFiI.js} +1 -1
- package/dist/{layers.DkUY5uNV.js → layers.BagtOD0V.js} +1 -1
- package/dist/{layers.CzPTBQLq.js → layers.Be94M_F4.js} +1 -1
- package/dist/{layers.CULMlCQg.js → layers.BhdUQN6J.js} +8 -5
- package/dist/{layers.dYPOB_yR.js → layers.Bj915C_T.js} +1 -1
- package/dist/{layers.DuwOgI-l.js → layers.BnHSrOPr.js} +1 -1
- package/dist/{layers.DPiZNyNm.js → layers.BngaRys_.js} +3229 -3812
- package/dist/{layers.BIwMjJXk.js → layers.BoRvGzPp.js} +1 -1
- package/dist/{layers.CG5E1s6L.js → layers.Bob38w8X.js} +1 -1
- package/dist/{layers.wj-nS-86.js → layers.BpTkSHkL.js} +1 -1
- package/dist/{layers.9iKrwzo8.js → layers.BpVR__4s.js} +1 -1
- package/dist/{layers.BDhkw0hD.js → layers.Br9HAzwf.js} +227 -224
- package/dist/{layers.D4HzIdc6.js → layers.Bt7brqhi.js} +1 -1
- package/dist/{layers.CkvEBALf.js → layers.BtqAfMks.js} +1 -1
- package/dist/{layers.ClbtOgXD.js → layers.BtvHse58.js} +1 -1
- package/dist/{layers.DqL7bG3g.js → layers.BwzogUnt.js} +1 -1
- package/dist/{layers.BjkK2efb.js → layers.ByB5f2g3.js} +1 -1
- package/dist/{layers.B8_yUZ0B.js → layers.ByipH4AB.js} +1 -1
- package/dist/{layers.CDyM6rfz.js → layers.BzC5N3hu.js} +1 -1
- package/dist/{layers.DODiJHd5.js → layers.C-KP-jFZ.js} +1 -1
- package/dist/layers.C0iFGBoQ.js +213 -0
- package/dist/{layers.DgCULOvY.js → layers.C1AULvj_.js} +1 -1
- package/dist/{layers.C2jhvzOq.js → layers.C2f7uCzl.js} +8 -8
- package/dist/layers.C47t6lve.js +2 -0
- package/dist/{layers.BMyOFpSB.js → layers.C4gRYt-z.js} +1 -1
- package/dist/{layers.Be1uXPSh.js → layers.C4nmPqDc.js} +1 -1
- package/dist/layers.C5UKJ24R.js +271 -0
- package/dist/{layers.CLyrFyTt.js → layers.C5qsYNKq.js} +6 -6
- package/dist/{layers.BsmgPu7t.js → layers.C70jnpZq.js} +1 -1
- package/dist/{layers.OE83Ve6T.js → layers.C7Qg5l_Q.js} +1 -1
- package/dist/{layers.DouGTsMz.js → layers.C7v0beLV.js} +1 -1
- package/dist/{layers.BifTQ-Px.js → layers.CAcCDIzK.js} +1 -1
- package/dist/layers.CCWJVHwX.js +26946 -0
- package/dist/{layers.BGrn4rLd.js → layers.CF2BAIC-.js} +1 -1
- package/dist/{layers.CWVWuX-h.js → layers.CFUGAgBV.js} +9 -6
- package/dist/{layers.CdI08cP2.js → layers.CIo6HbVI.js} +1 -1
- package/dist/{layers.k6E3SRkR.js → layers.CJaSQy6k.js} +3 -3
- package/dist/{layers.BO1-27wB.js → layers.CJhFGqXY.js} +1 -1
- package/dist/{layers.CTEInOdX.js → layers.CKU_klOZ.js} +1 -1
- package/dist/{layers.CJjfGFRn.js → layers.CKrtSnTU.js} +1 -1
- package/dist/{layers.YqzV3yPW.js → layers.CNoIsdHV.js} +9 -6
- package/dist/{layers.Dtg6Vr-6.js → layers.CQ-g_IO8.js} +1 -1
- package/dist/{layers.DZkaq_lv.js → layers.CRWtU7Vx.js} +7 -4
- package/dist/{layers.C2Ghtbvc.js → layers.CSattQNk.js} +1 -1
- package/dist/layers.CT-8Geho.js +118 -0
- package/dist/{layers.DacVDKlC.js → layers.CWTjwUqI.js} +1 -1
- package/dist/{layers.DhtGL7-o.js → layers.CY3nuiOZ.js} +1 -1
- package/dist/{layers.DPgcx12Q.js → layers.CYDGmR2c.js} +1 -1
- package/dist/{layers.C_gG9xio.js → layers.CYPtUh0S.js} +1 -1
- package/dist/{layers.DrYzFfW_.js → layers.CYjyWg9h.js} +3 -3
- package/dist/{layers.CWetNlAM.js → layers.CZCoH1Jq.js} +18 -15
- package/dist/{layers.BeACRp58.js → layers.CZVe7Rrz.js} +1 -1
- package/dist/{layers.DgjixQuR.js → layers.C_8NFZw0.js} +1 -1
- package/dist/{layers.CAn91HUr.js → layers.C_vVmOaW.js} +1 -1
- package/dist/layers.Cb3vLPzi.js +1 -0
- package/dist/{layers.lP9uODKD.js → layers.Cblg5KAJ.js} +10 -7
- package/dist/{layers.0ay1od4k.js → layers.CeUsnn-s.js} +1 -1
- package/dist/layers.Cfwoj-CP.js +76 -0
- package/dist/{layers.BgJtKoXK.js → layers.Cfxt2JbX.js} +1 -1
- package/dist/{layers.D-Jn2ZYp.js → layers.CjixIcYE.js} +14 -11
- package/dist/{layers.BwTFFS1L.js → layers.CliEt_s4.js} +1 -1
- package/dist/{layers.PV80K4Xy.js → layers.Cmumbtn4.js} +1 -1
- package/dist/{layers.CZcNOn_g.js → layers.Cnkh0zSn.js} +1 -1
- package/dist/{layers.6IpHt_7d.js → layers.Co0MEzNt.js} +1 -1
- package/dist/{layers.CjDmXlbI.js → layers.CpgPovn6.js} +1 -1
- package/dist/{layers.Ci-h8bbt.js → layers.Cr_8J_Ls.js} +1 -1
- package/dist/{layers.BbXyLjxZ.js → layers.Cs7THreY.js} +1 -1
- package/dist/{layers.wU0hxeTl.js → layers.CtQHRQJd.js} +2 -2
- package/dist/{layers.BGTnvNP0.js → layers.Cuv2Lipq.js} +1 -1
- package/dist/{layers.BRw0W8BA.js → layers.Cuy--_Li.js} +2 -2
- package/dist/{layers.BCWekfj1.js → layers.Cxrjuyke.js} +1 -1
- package/dist/layers.Cxuu78R8.js +1 -0
- package/dist/{layers.BfaQveOZ.js → layers.Cy_jbtrS.js} +7 -7
- package/dist/{layers.B1auaUb-.js → layers.CyabQ7I1.js} +1 -1
- package/dist/layers.CyqF5h2Z.js +1 -0
- package/dist/{layers.Btzp1z-r.js → layers.CzDyzzM2.js} +1 -1
- package/dist/{layers.BGdwpbmj.js → layers.D-LL79P8.js} +1 -1
- package/dist/{layers.BVcL_n_M.js → layers.D-uQN6e4.js} +9 -6
- package/dist/{layers.C0rSyLVd.js → layers.D00djYUT.js} +1 -1
- package/dist/{layers.CxzexeO2.js → layers.D1PMEoqL.js} +1 -1
- package/dist/{layers.DN7zqtdR.js → layers.D1WSB9zI.js} +7 -4
- package/dist/{layers.YO08nJMd.js → layers.D2dRxQww.js} +1 -1
- package/dist/{layers.Bt7tcN4s.js → layers.D3KEnhiI.js} +1 -1
- package/dist/{layers.bHmhGLR5.js → layers.D3SlAvNp.js} +8 -5
- package/dist/{layers.hLd2Pb2X.js → layers.D3eKKoAb.js} +1 -1
- package/dist/{layers.CagLZWJV.js → layers.D7gfmd9A.js} +1 -1
- package/dist/{layers.C7dJDI3p.js → layers.DA1OUhKy.js} +1 -1
- package/dist/{layers.P6mLQhtB.js → layers.DB4o6Xfv.js} +1 -1
- package/dist/{layers.9p0T4nVw.js → layers.DBUjVgMd.js} +1 -1
- package/dist/{layers.B9JA0HLK.js → layers.DCkmUFPh.js} +1 -1
- package/dist/layers.DD4QPdYS.js +96 -0
- package/dist/{layers.BEm0EevB.js → layers.DE2Io1k7.js} +3 -3
- package/dist/{layers.BABmXbhN.js → layers.DKnEcoKx.js} +7 -7
- package/dist/{layers.RTKoEILv.js → layers.DKsXm_hK.js} +1 -1
- package/dist/layers.DLeGllIz.js +1 -0
- package/dist/{layers.8CQh8R7p.js → layers.DPipd7Yf.js} +1 -1
- package/dist/{layers.BbVq4Peg.js → layers.DQpNkl-s.js} +1 -1
- package/dist/{layers.CmMJ2vrz.js → layers.DSNr6P6_.js} +1 -1
- package/dist/{layers.CqOjrhqg.js → layers.DWGLEZg1.js} +1 -1
- package/dist/{layers.BUA_HqY5.js → layers.DWxUDz1V.js} +1 -1
- package/dist/{layers.D9jdGpJr.js → layers.DYk9FILk.js} +1 -1
- package/dist/{layers.C39A_3mH.js → layers.DZ3Nv-_j.js} +1 -1
- package/dist/layers.DZGvjyDH.js +1 -0
- package/dist/{layers.C5hEmFnZ.js → layers.DZucH9TB.js} +1 -1
- package/dist/{layers.BP0j0dgn.js → layers.D__NkOsa.js} +1 -1
- package/dist/{layers.D66jwaU4.js → layers.DfkAyTyX.js} +1 -1
- package/dist/{layers.C89PpG1h.js → layers.Dgie_iy2.js} +92 -89
- package/dist/layers.DhHIDfZ5.js +1 -0
- package/dist/{layers.BPc2aeAC.js → layers.Di-7t8Xt.js} +1 -1
- package/dist/layers.DiPSTN4q.js +1 -0
- package/dist/layers.DjLIeP8d.js +257 -0
- package/dist/layers.Dk6h-6Wb.js +2 -0
- package/dist/{layers.BxM1KZfC.js → layers.DkRR3p16.js} +4 -4
- package/dist/{layers.vIfEp2lU.js → layers.DnXxZJQo.js} +11 -8
- package/dist/{layers.BFc__DH6.js → layers.DpahuC02.js} +1 -1
- package/dist/{layers.0YKivPbS.js → layers.Dpqc2FAN.js} +1 -1
- package/dist/{layers.BWePEr40.js → layers.DqScp2vq.js} +1 -1
- package/dist/{layers.SLjiLvui.js → layers.Dr1JRZ_S.js} +1 -1
- package/dist/{layers.C5Fx7NyW.js → layers.DrTaVUsA.js} +1 -1
- package/dist/{layers.D3lMBPw_.js → layers.DrXLa4el.js} +1 -1
- package/dist/{layers.Cyiby-Np.js → layers.DtKxMd0g.js} +3 -3
- package/dist/layers.DxRZNwMP.js +1 -0
- package/dist/{layers.VJ5q1w0_.js → layers.FArKPCKA.js} +9 -6
- package/dist/{layers.YNcfYAuY.js → layers.FXdB_jrR.js} +1 -1
- package/dist/{layers.Blc7rw4s.js → layers.GbuD0dtx.js} +1 -1
- package/dist/{layers.Bnsmp92P.js → layers.ILs-xE7i.js} +1 -1
- package/dist/{layers.0cCD7Trw.js → layers.L9obQAvP.js} +1 -1
- package/dist/{layers.DQhlH0a7.js → layers.Lb5VQ9U4.js} +8 -5
- package/dist/{layers.BOUezSTL.js → layers.MCy444Ia.js} +1 -1
- package/dist/{layers.Bx3h2n9l.js → layers.QyDQqf0G.js} +1 -1
- package/dist/layers.R4CPUhiF.js +8 -0
- package/dist/{layers.cgUeweX2.js → layers.Sjtd5SpD.js} +1 -1
- package/dist/{layers.D9YR6XE8.js → layers.XlzBx5CM.js} +3 -3
- package/dist/{layers.CTzj-R3i.js → layers.YD8zq7G1.js} +1 -1
- package/dist/{layers.1ws9_bfy.js → layers.YWM6eRUH.js} +1 -1
- package/dist/{layers.GRwBofUp.js → layers.a6EbdnVa.js} +1 -1
- package/dist/{layers.BlHp_VrY.js → layers.bS5nz97o.js} +1 -1
- package/dist/{layers.C6s-F8xr.js → layers.biaV5QcU.js} +4 -4
- package/dist/{layers.0AjqeHO0.js → layers.dxw35GiE.js} +7 -7
- package/dist/layers.gFW_9pGM.js +1225 -0
- package/dist/{layers.C5BRzalR.js → layers.ge00jJfz.js} +1 -1
- package/dist/{layers.BK0gUtws.js → layers.iryDeY19.js} +1 -1
- package/dist/{layers.DVrOalPV.js → layers.jN02hLg8.js} +1 -1
- package/dist/layers.jqEynR2I.js +8 -0
- package/dist/{layers.MerAdE1w.js → layers.lIg0cncJ.js} +1 -1
- package/dist/{layers.easeN7iP.js → layers.lKk6bx4R.js} +1 -1
- package/dist/layers.m4XcFQDd.js +6 -0
- package/dist/{layers.DtYnjrXZ.js → layers.m6FDW_ho.js} +1 -1
- package/dist/{layers.i0Y9asvx.js → layers.r6u8p96p.js} +8 -5
- package/dist/{layers.CcQRJhOy.js → layers.rWob7btU.js} +1 -1
- package/dist/{layers.B37cfkOz.js → layers.rYZbXo4d.js} +1 -1
- package/dist/{layers.CfGn3EEn.js → layers.sldWqHdD.js} +1 -1
- package/dist/{layers.DrdslLaU.js → layers.tFqdqg82.js} +1 -1
- package/dist/{layers.DAl7I5u0.js → layers.v25uTBY8.js} +1 -1
- package/dist/{layers.DJF9fzWp.js → layers.wNarGMxP.js} +1 -1
- package/dist/{layers.DsXVRfSf.js → layers.wxYowcaq.js} +1 -1
- package/dist/{layers.BxM9-XMl.js → layers.xjN3ile4.js} +1 -1
- package/dist/{layers.DwXNFr-I.js → layers.yNlD-OCA.js} +3 -3
- package/dist/{layers.BjN6TTXp.js → layers.z-RuimGg.js} +1 -1
- package/dist/{layers.snXT5mu6.js → layers.zvsP8spW.js} +1 -1
- package/package.json +24 -23
- package/dist/layers.3NAUDSdp.js +0 -1
- package/dist/layers.B3S_Iz7U.js +0 -304
- package/dist/layers.B7rTjLeq.js +0 -208
- package/dist/layers.BFOGMUuA.js +0 -8
- package/dist/layers.BlQ-fVEN.js +0 -1
- package/dist/layers.BqqCs8jG.js +0 -96
- package/dist/layers.CNTFg_PV.js +0 -48033
- package/dist/layers.COxTigDs.js +0 -1359
- package/dist/layers.CPPTxpTa.js +0 -198
- package/dist/layers.CQw2c-FF.js +0 -1
- package/dist/layers.CS_v9If4.js +0 -118
- package/dist/layers.CfTomFD-.js +0 -74
- package/dist/layers.CoHrmJZb.js +0 -1
- package/dist/layers.CtBDhkfE.js +0 -2
- package/dist/layers.CxhBPjuM.js +0 -257
- package/dist/layers.DGi30IzW.js +0 -6
- package/dist/layers.DWaBBiuP.js +0 -19
- package/dist/layers.DfazY_Pm.js +0 -1
- package/dist/layers.DsLySzfR.js +0 -8
- package/dist/layers.Ev3O6tfW.js +0 -1
- package/dist/layers.Z4R1XaSC.js +0 -1
- package/dist/layers.ib9vHAA4.js +0 -2
- package/dist/layers.lDwCLT0I.js +0 -1
- package/dist/layers.xiOwns_l.js +0 -1
package/dist/layers.3NAUDSdp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./layers.B8_yUZ0B.js"),z=require("./layers.BLd2spTm.js"),i=require("./layers.BqqCs8jG.js"),j=require("./layers.snXT5mu6.js");require("./layers.BfaQveOZ.js");require("lodash-es");require("./layers.Cyzu9PKQ.js");const h="rect",C="rectWithTitle",K="start",F="end",J="divider",Q="roundedWithTitle",X="note",Z="noteGroup",b="statediagram",m="state",I=`${b}-${m}`,k="transition",tt="note",et="note-edge",ot=`${k} ${et}`,st=`${b}-${tt}`,nt="cluster",ct=`${b}-${nt}`,it="cluster-alt",rt=`${b}-${it}`,M="parent",B="note",lt="state",w="----",at=`${w}${B}`,v=`${w}${M}`,H="fill:none",U="fill: #333",q="c",V="text",Y="normal";let y={},S=0;const dt=function(t){const n=Object.keys(t);for(const e of n)t[e]},Et=function(t,n){return n.db.extract(n.db.getRootDocV2()),n.db.getClasses()};function St(t){return t==null?"":t.classes?t.classes.join(" "):""}function x(t="",n=0,e="",c=w){const r=e!==null&&e.length>0?`${c}${e}`:"";return`${lt}-${t}${r}-${n}`}const p=(t,n,e,c,r,l)=>{const o=e.id,f=St(c[o]);if(o!=="root"){let u=h;e.start===!0&&(u=K),e.start===!1&&(u=F),e.type!==a.DEFAULT_STATE_TYPE&&(u=e.type),y[o]||(y[o]={id:o,shape:u,description:i.common$1.sanitizeText(o,i.getConfig()),classes:`${f} ${I}`});const s=y[o];e.description&&(Array.isArray(s.description)?(s.shape=C,s.description.push(e.description)):s.description.length>0?(s.shape=C,s.description===o?s.description=[e.description]:s.description=[s.description,e.description]):(s.shape=h,s.description=e.description),s.description=i.common$1.sanitizeTextOrArray(s.description,i.getConfig())),s.description.length===1&&s.shape===C&&(s.shape=h),!s.type&&e.doc&&(i.log$1.info("Setting cluster for ",o,R(e)),s.type="group",s.dir=R(e),s.shape=e.type===a.DIVIDER_TYPE?J:Q,s.classes=s.classes+" "+ct+" "+(l?rt:""));const _={labelStyle:"",shape:s.shape,labelText:s.description,classes:s.classes,style:"",id:o,dir:s.dir,domId:x(o,S),type:s.type,padding:15};if(_.centerLabel=!0,e.note){const d={labelStyle:"",shape:X,labelText:e.note.text,classes:st,style:"",id:o+at+"-"+S,domId:x(o,S,B),type:s.type,padding:15},E={labelStyle:"",shape:Z,labelText:e.note.text,classes:s.classes,style:"",id:o+v,domId:x(o,S,M),type:"group",padding:0};S++;const g=o+v;t.setNode(g,E),t.setNode(d.id,d),t.setNode(o,_),t.setParent(o,g),t.setParent(d.id,g);let T=o,A=d.id;e.note.position==="left of"&&(T=d.id,A=o),t.setEdge(T,A,{arrowhead:"none",arrowType:"",style:H,labelStyle:"",classes:ot,arrowheadStyle:U,labelpos:q,labelType:V,thickness:Y})}else t.setNode(o,_)}n&&n.id!=="root"&&(i.log$1.trace("Setting node ",o," to be child of its parent ",n.id),t.setParent(o,n.id)),e.doc&&(i.log$1.trace("Adding nodes children "),Tt(t,e,e.doc,c,r,!l))},Tt=(t,n,e,c,r,l)=>{i.log$1.trace("items",e),e.forEach(o=>{switch(o.stmt){case a.STMT_STATE:p(t,n,o,c,r,l);break;case a.DEFAULT_STATE_TYPE:p(t,n,o,c,r,l);break;case a.STMT_RELATION:{p(t,n,o.state1,c,r,l),p(t,n,o.state2,c,r,l);const f={id:"edge"+S,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:H,labelStyle:"",label:i.common$1.sanitizeText(o.description,i.getConfig()),arrowheadStyle:U,labelpos:q,labelType:V,thickness:Y,classes:k};t.setEdge(o.state1.id,o.state2.id,f,S),S++}break}})},R=(t,n=a.DEFAULT_NESTED_DOC_DIR)=>{let e=n;if(t.doc)for(let c=0;c<t.doc.length;c++){const r=t.doc[c];r.stmt==="dir"&&(e=r.value)}return e},ut=async function(t,n,e,c){i.log$1.info("Drawing state diagram (v2)",n),y={},c.db.getDirection();const{securityLevel:r,state:l}=i.getConfig(),o=l.nodeSpacing||50,f=l.rankSpacing||50;i.log$1.info(c.db.getRootDocV2()),c.db.extract(c.db.getRootDocV2()),i.log$1.info(c.db.getRootDocV2());const u=c.db.getStates(),s=new z.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:R(c.db.getRootDocV2()),nodesep:o,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});p(s,void 0,c.db.getRootDocV2(),u,c.db,!0);let _;r==="sandbox"&&(_=i.select("#i"+n));const d=r==="sandbox"?i.select(_.nodes()[0].contentDocument.body):i.select("body"),E=d.select(`[id="${n}"]`),g=d.select("#"+n+" g");await j.render(g,s,["barb"],b,n);const T=8;i.utils.insertTitle(E,"statediagramTitleText",l.titleTopMargin,c.db.getDiagramTitle());const A=E.node().getBBox(),G=A.width+T*2,N=A.height+T*2;E.attr("class",b);const L=E.node().getBBox();i.configureSvgSize(E,N,G,l.useMaxWidth);const P=`${L.x-T} ${L.y-T} ${G} ${N}`;i.log$1.debug(`viewBox ${P}`),E.attr("viewBox",P);const W=document.querySelectorAll('[id="'+n+'"] .edgeLabel .label');for(const $ of W){const O=$.getBBox(),D=document.createElementNS("http://www.w3.org/2000/svg",h);D.setAttribute("rx",0),D.setAttribute("ry",0),D.setAttribute("width",O.width),D.setAttribute("height",O.height),$.insertBefore(D,$.firstChild)}},_t={setConf:dt,getClasses:Et,draw:ut},bt={parser:a.parser$1,db:a.db,renderer:_t,styles:a.styles,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,a.db.clear()}};exports.diagram=bt;
|
package/dist/layers.B3S_Iz7U.js
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as k, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as M, useContext as O, useMemo as K, useEffect as F, useState as T, useCallback as y, Suspense as X } from "react";
|
|
3
|
-
import { v as U, y as G, X as H, B as $, D as j, F as J, G as Q, j as V, o as Y, H as P, L as R, x as z, J as Z, w as A, k as q, M as ee, z as _, N as te, l as ne, O as ae, P as se, s as oe, Q as re, S as ie, T as le, V as ce, W as de, Y as ue, Z as fe } from "./layers.CNTFg_PV.js";
|
|
4
|
-
import { TextInput as pe } from "@mantine/core";
|
|
5
|
-
function ge({ initialEditor: e, children: l, initialNodes: a, initialTheme: h, skipCollabChecks: c, skipEditableListener: d }) {
|
|
6
|
-
const r = M(!1), E = O(U);
|
|
7
|
-
E == null && (function(t, ...x) {
|
|
8
|
-
const v = new URL("https://lexical.dev/docs/error"), m = new URLSearchParams();
|
|
9
|
-
m.append("code", t);
|
|
10
|
-
for (const s of x) m.append("v", s);
|
|
11
|
-
throw v.search = m.toString(), Error(`Minified Lexical error #${t}; visit ${v.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
12
|
-
})(9);
|
|
13
|
-
const [u, { getTheme: N }] = E, w = K(() => {
|
|
14
|
-
const t = h || N() || void 0, x = G(E, t);
|
|
15
|
-
t !== void 0 && (e._config.theme = t), e._parentEditor = e._parentEditor || u;
|
|
16
|
-
const v = e._createEditorArgs, m = v && v.namespace;
|
|
17
|
-
if (a) {
|
|
18
|
-
m || (e._config.namespace = u._config.namespace);
|
|
19
|
-
for (let s of a) {
|
|
20
|
-
let S = null, p = null;
|
|
21
|
-
if (typeof s != "function") {
|
|
22
|
-
const o = s;
|
|
23
|
-
s = o.replace, S = o.with, p = o.withKlass || null;
|
|
24
|
-
}
|
|
25
|
-
const D = H(e, s.getType());
|
|
26
|
-
e._nodes.set(s.getType(), { exportDOM: D ? D.exportDOM : void 0, klass: s, replace: S, replaceWithKlass: p, sharedNodeState: j(s), transforms: $(s) });
|
|
27
|
-
}
|
|
28
|
-
} else if (v && v.nodes) m || (e._config.namespace = u._config.namespace);
|
|
29
|
-
else {
|
|
30
|
-
const s = e._nodes = new Map(u._nodes);
|
|
31
|
-
m || (e._config.namespace = u._config.namespace);
|
|
32
|
-
for (const [S, p] of s) e._nodes.set(S, { exportDOM: p.exportDOM, klass: p.klass, replace: p.replace, replaceWithKlass: p.replaceWithKlass, sharedNodeState: j(p.klass), transforms: $(p.klass) });
|
|
33
|
-
}
|
|
34
|
-
return [e, x];
|
|
35
|
-
}, []), C = O(J), { isCollabActive: g, yjsDocMap: f } = C ?? {}, I = c || r.current || f && f.has(e.getKey());
|
|
36
|
-
return F(() => {
|
|
37
|
-
I && (r.current = !0);
|
|
38
|
-
}, [I]), F(() => {
|
|
39
|
-
if (!d) {
|
|
40
|
-
const t = (x) => e.setEditable(x);
|
|
41
|
-
return t(u.isEditable()), u.registerEditableListener(t);
|
|
42
|
-
}
|
|
43
|
-
}, [e, u, d]), n(U.Provider, { value: w, children: !g || I ? l : null });
|
|
44
|
-
}
|
|
45
|
-
function me({
|
|
46
|
-
children: e,
|
|
47
|
-
className: l
|
|
48
|
-
}) {
|
|
49
|
-
return /* @__PURE__ */ n("div", { className: l || "Placeholder__root", children: e });
|
|
50
|
-
}
|
|
51
|
-
function he({
|
|
52
|
-
label: e,
|
|
53
|
-
value: l,
|
|
54
|
-
onChange: a,
|
|
55
|
-
placeholder: h = "",
|
|
56
|
-
"data-test-id": c,
|
|
57
|
-
type: d = "text"
|
|
58
|
-
}) {
|
|
59
|
-
return /* @__PURE__ */ n(
|
|
60
|
-
pe,
|
|
61
|
-
{
|
|
62
|
-
type: d,
|
|
63
|
-
placeholder: h,
|
|
64
|
-
value: l,
|
|
65
|
-
onChange: (r) => {
|
|
66
|
-
a(r.target.value);
|
|
67
|
-
},
|
|
68
|
-
label: e,
|
|
69
|
-
"data-test-id": c,
|
|
70
|
-
mb: 10
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
const B = /* @__PURE__ */ new Set();
|
|
75
|
-
function ve(e) {
|
|
76
|
-
if (!B.has(e))
|
|
77
|
-
throw new Promise((l) => {
|
|
78
|
-
const a = new Image();
|
|
79
|
-
a.src = e, a.onload = () => {
|
|
80
|
-
B.add(e), l(null);
|
|
81
|
-
};
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function Ee({
|
|
85
|
-
altText: e,
|
|
86
|
-
className: l,
|
|
87
|
-
imageRef: a,
|
|
88
|
-
src: h,
|
|
89
|
-
width: c,
|
|
90
|
-
height: d,
|
|
91
|
-
position: r
|
|
92
|
-
}) {
|
|
93
|
-
return ve(h), /* @__PURE__ */ n(
|
|
94
|
-
"img",
|
|
95
|
-
{
|
|
96
|
-
className: l || void 0,
|
|
97
|
-
src: h,
|
|
98
|
-
alt: e,
|
|
99
|
-
ref: a,
|
|
100
|
-
"data-position": r,
|
|
101
|
-
style: {
|
|
102
|
-
display: "block",
|
|
103
|
-
height: d,
|
|
104
|
-
width: c
|
|
105
|
-
},
|
|
106
|
-
draggable: "false"
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
function be({
|
|
111
|
-
activeEditor: e,
|
|
112
|
-
nodeKey: l,
|
|
113
|
-
onClose: a
|
|
114
|
-
}) {
|
|
115
|
-
const c = e.getEditorState().read(
|
|
116
|
-
() => z(l)
|
|
117
|
-
), [d, r] = T(c.getAltText()), [E, u] = T(c.getShowCaption()), [N, w] = T(c.getPosition()), C = (f) => {
|
|
118
|
-
u(f.target.checked);
|
|
119
|
-
}, g = () => {
|
|
120
|
-
const f = { altText: d, position: N, showCaption: E };
|
|
121
|
-
c && e.update(() => {
|
|
122
|
-
c.update(f);
|
|
123
|
-
}), a();
|
|
124
|
-
};
|
|
125
|
-
return /* @__PURE__ */ k(W, { children: [
|
|
126
|
-
/* @__PURE__ */ n("div", { style: { marginBottom: "1em" }, children: /* @__PURE__ */ n(
|
|
127
|
-
he,
|
|
128
|
-
{
|
|
129
|
-
label: "Alt-текст",
|
|
130
|
-
placeholder: "Альтернативный текст",
|
|
131
|
-
onChange: r,
|
|
132
|
-
value: d,
|
|
133
|
-
"data-test-id": "image-modal-alt-text-input"
|
|
134
|
-
}
|
|
135
|
-
) }),
|
|
136
|
-
/* @__PURE__ */ k("div", { className: "Input__wrapper", children: [
|
|
137
|
-
/* @__PURE__ */ n(
|
|
138
|
-
"input",
|
|
139
|
-
{
|
|
140
|
-
id: "caption",
|
|
141
|
-
type: "checkbox",
|
|
142
|
-
checked: E,
|
|
143
|
-
onChange: C
|
|
144
|
-
}
|
|
145
|
-
),
|
|
146
|
-
/* @__PURE__ */ n("label", { htmlFor: "caption", children: "Show Caption" })
|
|
147
|
-
] }),
|
|
148
|
-
/* @__PURE__ */ n(
|
|
149
|
-
fe,
|
|
150
|
-
{
|
|
151
|
-
"data-test-id": "image-modal-file-upload-btn",
|
|
152
|
-
onClick: () => g(),
|
|
153
|
-
children: "Применить"
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
] });
|
|
157
|
-
}
|
|
158
|
-
function we({
|
|
159
|
-
src: e,
|
|
160
|
-
altText: l,
|
|
161
|
-
nodeKey: a,
|
|
162
|
-
width: h,
|
|
163
|
-
height: c,
|
|
164
|
-
showCaption: d,
|
|
165
|
-
caption: r,
|
|
166
|
-
position: E
|
|
167
|
-
}) {
|
|
168
|
-
const [u, N] = Q(), w = M(null), C = M(null), [g, f, I] = V(a), [t] = Y(), [x, v] = T(null), m = M(null), s = y(
|
|
169
|
-
(o) => {
|
|
170
|
-
if (g && P(R())) {
|
|
171
|
-
o.preventDefault();
|
|
172
|
-
const i = z(a);
|
|
173
|
-
Z(i) && i.remove();
|
|
174
|
-
}
|
|
175
|
-
return !1;
|
|
176
|
-
},
|
|
177
|
-
[g, a]
|
|
178
|
-
), S = y(
|
|
179
|
-
(o) => {
|
|
180
|
-
const b = R(), i = C.current;
|
|
181
|
-
if (g && P(b) && b.getNodes().length === 1) {
|
|
182
|
-
if (d)
|
|
183
|
-
return A(null), o.preventDefault(), r.focus(), !0;
|
|
184
|
-
if (i !== null && i !== document.activeElement)
|
|
185
|
-
return o.preventDefault(), i.focus(), !0;
|
|
186
|
-
}
|
|
187
|
-
return !1;
|
|
188
|
-
},
|
|
189
|
-
[r, g, d]
|
|
190
|
-
), p = y(
|
|
191
|
-
(o) => m.current === r || C.current === o.target ? (A(null), t.update(() => {
|
|
192
|
-
f(!0);
|
|
193
|
-
const b = t.getRootElement();
|
|
194
|
-
b !== null && b.focus();
|
|
195
|
-
}), !0) : !1,
|
|
196
|
-
[r, t, f]
|
|
197
|
-
);
|
|
198
|
-
return F(() => {
|
|
199
|
-
let o = !0;
|
|
200
|
-
const b = q(
|
|
201
|
-
t.registerUpdateListener(({ editorState: i }) => {
|
|
202
|
-
o && v(i.read(() => R()));
|
|
203
|
-
}),
|
|
204
|
-
t.registerCommand(
|
|
205
|
-
re,
|
|
206
|
-
(i, L) => (m.current = L, !1),
|
|
207
|
-
_
|
|
208
|
-
),
|
|
209
|
-
t.registerCommand(
|
|
210
|
-
oe,
|
|
211
|
-
(i) => {
|
|
212
|
-
const L = i;
|
|
213
|
-
return L.target === w.current ? (L.shiftKey ? f(!g) : (I(), f(!0)), !0) : !1;
|
|
214
|
-
},
|
|
215
|
-
_
|
|
216
|
-
),
|
|
217
|
-
t.registerCommand(
|
|
218
|
-
se,
|
|
219
|
-
(i) => i.target === w.current ? (i.preventDefault(), !0) : !1,
|
|
220
|
-
_
|
|
221
|
-
),
|
|
222
|
-
t.registerCommand(
|
|
223
|
-
ae,
|
|
224
|
-
s,
|
|
225
|
-
_
|
|
226
|
-
),
|
|
227
|
-
t.registerCommand(
|
|
228
|
-
ne,
|
|
229
|
-
s,
|
|
230
|
-
_
|
|
231
|
-
),
|
|
232
|
-
t.registerCommand(te, S, _),
|
|
233
|
-
t.registerCommand(
|
|
234
|
-
ee,
|
|
235
|
-
p,
|
|
236
|
-
_
|
|
237
|
-
)
|
|
238
|
-
);
|
|
239
|
-
return () => {
|
|
240
|
-
o = !1, b();
|
|
241
|
-
};
|
|
242
|
-
}, [
|
|
243
|
-
I,
|
|
244
|
-
t,
|
|
245
|
-
g,
|
|
246
|
-
a,
|
|
247
|
-
s,
|
|
248
|
-
S,
|
|
249
|
-
p,
|
|
250
|
-
f
|
|
251
|
-
]), /* @__PURE__ */ k(X, { fallback: null, children: [
|
|
252
|
-
/* @__PURE__ */ k(W, { children: [
|
|
253
|
-
/* @__PURE__ */ k("div", { draggable: !1, children: [
|
|
254
|
-
/* @__PURE__ */ n(
|
|
255
|
-
"button",
|
|
256
|
-
{
|
|
257
|
-
className: "image-edit-button",
|
|
258
|
-
ref: C,
|
|
259
|
-
onClick: () => {
|
|
260
|
-
N("Update Inline Image", (o) => /* @__PURE__ */ n(
|
|
261
|
-
be,
|
|
262
|
-
{
|
|
263
|
-
activeEditor: t,
|
|
264
|
-
nodeKey: a,
|
|
265
|
-
onClose: o
|
|
266
|
-
}
|
|
267
|
-
));
|
|
268
|
-
},
|
|
269
|
-
children: "Edit"
|
|
270
|
-
}
|
|
271
|
-
),
|
|
272
|
-
/* @__PURE__ */ n(
|
|
273
|
-
Ee,
|
|
274
|
-
{
|
|
275
|
-
className: g ? `focused ${P(x) ? "draggable" : ""}` : null,
|
|
276
|
-
src: e,
|
|
277
|
-
altText: l,
|
|
278
|
-
imageRef: w,
|
|
279
|
-
width: h,
|
|
280
|
-
height: c,
|
|
281
|
-
position: E
|
|
282
|
-
}
|
|
283
|
-
)
|
|
284
|
-
] }),
|
|
285
|
-
d && /* @__PURE__ */ n("div", { className: "image-caption-container", children: /* @__PURE__ */ k(ge, { initialEditor: r, children: [
|
|
286
|
-
/* @__PURE__ */ n(ie, {}),
|
|
287
|
-
/* @__PURE__ */ n(le, {}),
|
|
288
|
-
/* @__PURE__ */ n(
|
|
289
|
-
ce,
|
|
290
|
-
{
|
|
291
|
-
contentEditable: /* @__PURE__ */ n(ue, { className: "InlineImageNode__contentEditable" }),
|
|
292
|
-
placeholder: /* @__PURE__ */ n(me, { className: "InlineImageNode__placeholder", children: "Enter a caption..." }),
|
|
293
|
-
ErrorBoundary: de
|
|
294
|
-
}
|
|
295
|
-
)
|
|
296
|
-
] }) })
|
|
297
|
-
] }),
|
|
298
|
-
u
|
|
299
|
-
] });
|
|
300
|
-
}
|
|
301
|
-
export {
|
|
302
|
-
be as UpdateInlineImageDialog,
|
|
303
|
-
we as default
|
|
304
|
-
};
|
package/dist/layers.B7rTjLeq.js
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as I, Fragment as y } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as _, useState as j, useRef as A, useCallback as w, useEffect as P } from "react";
|
|
3
|
-
import { R as Q, p as F, A as X, e as Y, w as Z, x as p, f as $, h as K, o as ee, i as te, j as ae, k as se, l as ie, z as D, O as ne, s as le } from "./layers.CNTFg_PV.js";
|
|
4
|
-
import { p as oe, C as re, E as ce } from "./layers.BEm0EevB.js";
|
|
5
|
-
import { useTranslation as de } from "react-i18next";
|
|
6
|
-
import { Box as G, Tooltip as H, ActionIcon as V } from "@mantine/core";
|
|
7
|
-
import { IconEdit as fe } from "@tabler/icons-react";
|
|
8
|
-
function ue({
|
|
9
|
-
imageContainerRef: s,
|
|
10
|
-
editor: o,
|
|
11
|
-
rootClassName: E = null,
|
|
12
|
-
width: S = "inherit",
|
|
13
|
-
height: h = "inherit",
|
|
14
|
-
nodeKey: e,
|
|
15
|
-
alignment: g,
|
|
16
|
-
setModalOpen: r,
|
|
17
|
-
previewSVG: C
|
|
18
|
-
}) {
|
|
19
|
-
const x = _(() => C ?? "", [C]), [c, b] = j(!1), { t: d } = de(), v = (l, f) => {
|
|
20
|
-
o.update(() => {
|
|
21
|
-
Z(null);
|
|
22
|
-
const m = p(e);
|
|
23
|
-
return $(m) && m.setWidthAndHeight(l, f), !0;
|
|
24
|
-
});
|
|
25
|
-
}, O = () => {
|
|
26
|
-
K(o, e);
|
|
27
|
-
};
|
|
28
|
-
return /* @__PURE__ */ a(
|
|
29
|
-
Q,
|
|
30
|
-
{
|
|
31
|
-
editor: o,
|
|
32
|
-
isIcon: !1,
|
|
33
|
-
isEmbed: !0,
|
|
34
|
-
width: F(S),
|
|
35
|
-
height: F(h),
|
|
36
|
-
onResizeEnd: v,
|
|
37
|
-
alignment: g,
|
|
38
|
-
children: /* @__PURE__ */ I(G, { className: "media-wrapper excaildraw", children: [
|
|
39
|
-
/* @__PURE__ */ I("div", { className: "media-actions", children: [
|
|
40
|
-
/* @__PURE__ */ a(H, { label: d("editor.link.edit"), children: /* @__PURE__ */ a(
|
|
41
|
-
V,
|
|
42
|
-
{
|
|
43
|
-
color: "gray",
|
|
44
|
-
"aria-label": "Settings",
|
|
45
|
-
className: "media-action",
|
|
46
|
-
variant: "default",
|
|
47
|
-
size: 24,
|
|
48
|
-
onClick: () => {
|
|
49
|
-
r(!0);
|
|
50
|
-
},
|
|
51
|
-
children: /* @__PURE__ */ a(fe, { size: 14 })
|
|
52
|
-
}
|
|
53
|
-
) }),
|
|
54
|
-
/* @__PURE__ */ a(
|
|
55
|
-
X,
|
|
56
|
-
{
|
|
57
|
-
opened: c,
|
|
58
|
-
setOpened: b,
|
|
59
|
-
t: d,
|
|
60
|
-
editor: o,
|
|
61
|
-
nodeKey: e
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
/* @__PURE__ */ a(H, { label: d("editor.actions.delete"), children: /* @__PURE__ */ a(
|
|
65
|
-
V,
|
|
66
|
-
{
|
|
67
|
-
color: "gray",
|
|
68
|
-
"aria-label": "Settings",
|
|
69
|
-
className: "media-action",
|
|
70
|
-
variant: "default",
|
|
71
|
-
size: 24,
|
|
72
|
-
onClick: O,
|
|
73
|
-
children: /* @__PURE__ */ a(Y, { name: "trash", size: "14" })
|
|
74
|
-
}
|
|
75
|
-
) })
|
|
76
|
-
] }),
|
|
77
|
-
/* @__PURE__ */ a(
|
|
78
|
-
G,
|
|
79
|
-
{
|
|
80
|
-
w: "100%",
|
|
81
|
-
ref: (l) => {
|
|
82
|
-
l && s && (s.current = l);
|
|
83
|
-
},
|
|
84
|
-
className: E ?? "",
|
|
85
|
-
dangerouslySetInnerHTML: { __html: x }
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
] })
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
function Se({
|
|
93
|
-
nodeKey: s,
|
|
94
|
-
data: o,
|
|
95
|
-
width: E,
|
|
96
|
-
height: S,
|
|
97
|
-
alignment: h
|
|
98
|
-
}) {
|
|
99
|
-
var T;
|
|
100
|
-
const [e] = ee(), g = te(), r = _(() => oe(o), [o]), C = ((T = r == null ? void 0 : r.elements) == null ? void 0 : T.length) === 0 && !r.previewSVG, [x, c] = j(
|
|
101
|
-
C && e.isEditable()
|
|
102
|
-
), [b, d] = j(!1), v = A(null), O = A(null), l = A(null), [f, m, M] = ae(s), N = w(
|
|
103
|
-
(t) => (f && (t.preventDefault(), e.update(() => {
|
|
104
|
-
const n = p(s);
|
|
105
|
-
n && n.remove();
|
|
106
|
-
})), !1),
|
|
107
|
-
[e, f, s]
|
|
108
|
-
);
|
|
109
|
-
P(() => {
|
|
110
|
-
if (!g) {
|
|
111
|
-
f && M();
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
return se(
|
|
115
|
-
e.registerCommand(
|
|
116
|
-
le,
|
|
117
|
-
(t) => {
|
|
118
|
-
const n = O.current, u = t.target;
|
|
119
|
-
return n !== null && n.contains(u) ? (t.shiftKey || M(), m(!f), t.detail > 1 && c(!0), !0) : !1;
|
|
120
|
-
},
|
|
121
|
-
D
|
|
122
|
-
),
|
|
123
|
-
e.registerCommand(
|
|
124
|
-
ne,
|
|
125
|
-
N,
|
|
126
|
-
D
|
|
127
|
-
),
|
|
128
|
-
e.registerCommand(
|
|
129
|
-
ie,
|
|
130
|
-
N,
|
|
131
|
-
D
|
|
132
|
-
)
|
|
133
|
-
);
|
|
134
|
-
}, [M, e, f, N, m, g]);
|
|
135
|
-
const B = w(() => (c(!1), e.update(() => {
|
|
136
|
-
const t = p(s);
|
|
137
|
-
t && t.remove();
|
|
138
|
-
})), [e, s]), J = (t, n, u, z) => e.update(() => {
|
|
139
|
-
const k = p(s);
|
|
140
|
-
$(k) && (t && t.length > 0 || Object.keys(u).length > 0 ? k.setData(
|
|
141
|
-
JSON.stringify({
|
|
142
|
-
appState: n,
|
|
143
|
-
elements: t,
|
|
144
|
-
files: u,
|
|
145
|
-
previewSVG: z
|
|
146
|
-
})
|
|
147
|
-
) : k.remove());
|
|
148
|
-
}), { elements: i = [], files: L = {}, appState: U = {}, previewSVG: W } = r, R = w(() => {
|
|
149
|
-
c(!1), d(!1), l.current = !1, (i == null ? void 0 : i.length) === 0 && e.update(() => {
|
|
150
|
-
const t = p(s);
|
|
151
|
-
t && t.remove();
|
|
152
|
-
});
|
|
153
|
-
}, [e, s, i == null ? void 0 : i.length]), q = w(() => {
|
|
154
|
-
l.current ? d(!0) : R();
|
|
155
|
-
}, []);
|
|
156
|
-
return /* @__PURE__ */ I(y, { children: [
|
|
157
|
-
/* @__PURE__ */ a(
|
|
158
|
-
re,
|
|
159
|
-
{
|
|
160
|
-
isCloseModal: b,
|
|
161
|
-
confirmClose: R,
|
|
162
|
-
setCloseModalOpen: d
|
|
163
|
-
}
|
|
164
|
-
),
|
|
165
|
-
/* @__PURE__ */ a(
|
|
166
|
-
ce,
|
|
167
|
-
{
|
|
168
|
-
initialElements: i,
|
|
169
|
-
isEdited: l,
|
|
170
|
-
initialFiles: L,
|
|
171
|
-
initialAppState: U,
|
|
172
|
-
isShown: x,
|
|
173
|
-
onDelete: B,
|
|
174
|
-
onClose: q,
|
|
175
|
-
onSave: (t, n, u, z) => {
|
|
176
|
-
J(t, n, u, z), c(!1);
|
|
177
|
-
},
|
|
178
|
-
closeOnClickOutside: !1
|
|
179
|
-
}
|
|
180
|
-
),
|
|
181
|
-
(i == null ? void 0 : i.length) && /* @__PURE__ */ a(
|
|
182
|
-
"div",
|
|
183
|
-
{
|
|
184
|
-
style: {
|
|
185
|
-
display: "flex",
|
|
186
|
-
justifyContent: h
|
|
187
|
-
},
|
|
188
|
-
children: /* @__PURE__ */ a(
|
|
189
|
-
ue,
|
|
190
|
-
{
|
|
191
|
-
imageContainerRef: v,
|
|
192
|
-
className: "image",
|
|
193
|
-
width: E,
|
|
194
|
-
height: S,
|
|
195
|
-
editor: e,
|
|
196
|
-
nodeKey: s,
|
|
197
|
-
alignment: h,
|
|
198
|
-
setModalOpen: c,
|
|
199
|
-
previewSVG: W
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
}
|
|
203
|
-
)
|
|
204
|
-
] });
|
|
205
|
-
}
|
|
206
|
-
export {
|
|
207
|
-
Se as default
|
|
208
|
-
};
|
package/dist/layers.BFOGMUuA.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.BqqCs8jG.js");require("./layers.BfaQveOZ.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let U=0,z=0;for(const{source:F,value:K}of v.targetLinks){let q=K*(v.layer-F.layer);U+=M(F,v)*q,z+=q}if(!(z>0))continue;let W=(U/z-v.y0)*f;v.y0+=W,v.y1+=W,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let U=0,z=0;for(const{target:F,value:K}of v.sourceLinks){let q=K*(F.layer-v.layer);U+=R(v,F)*q,z+=q}if(!(z>0))continue;let W=(U/z-v.y0)*f;v.y0+=W,v.y1+=W,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function R(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,R,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
|
|
2
|
-
`+S.showPosition()+`
|
|
3
|
-
Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":k="Parse error on line "+(E+1)+": Unexpected "+(w==O?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(k,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:P,expected:r})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(M[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(M[1]),w=null,T=S.yyleng,A=S.yytext,E=S.yylineno,P=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=b[b.length-l],e._$={first_line:y[y.length-(l||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(l||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),R=this.performAction.apply(e,[A,T,E,N.yy,M[1],b,y].concat(j)),typeof R<"u")return R;l&&(c=c.slice(0,-1*l*2),b=b.slice(0,-1*l),y=y.slice(0,-1*l)),c.push(this.productions_[M[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},_=(function(){var p={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(i,o){return this.yy=o||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===m.length?this.yylloc.first_column:0)+m[m.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
-
`+o+"^"},test_match:function(i,o){var c,m,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),m=i[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,c,m;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;y<b.length;y++)if(c=this._input.match(this.rules[b[y]]),c&&(!o||c[0].length>o[0].length)){if(o=c,m=y,this.options.backtrack_lexer){if(i=this.test_match(c,b[y]),i!==!1)return i;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(i=this.test_match(o,b[m]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,c,m,b){switch(m){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return p})();u.lexer=_;function g(){this.yy={}}return g.prototype=u,u.Parser=g,new g})();it.parser=it;const H=it;let X=[],Q=[],V={};const zt=()=>{X=[],Q=[],V={},L.clear()};class Bt{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}}const Vt=(t,n,s)=>{X.push(new Bt(t,n,s))};class Rt{constructor(n){this.ID=n}}const Ut=t=>(t=L.common$1.sanitizeText(t,L.getConfig()),V[t]||(V[t]=new Rt(t),Q.push(V[t])),V[t]),Wt=()=>Q,Ft=()=>X,qt=()=>({nodes:Q.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),Gt={nodesMap:V,getConfig:()=>L.getConfig().sankey,getNodes:Wt,getLinks:Ft,getGraph:qt,addLink:Vt,findOrCreateNode:Ut,getAccTitle:L.getAccTitle,setAccTitle:L.setAccTitle,getAccDescription:L.getAccDescription,setAccDescription:L.setAccDescription,getDiagramTitle:L.getDiagramTitle,setDiagramTitle:L.setDiagramTitle,clear:zt},gt=class st{static next(n){return new st(n+ ++st.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}};gt.count=0;let ht=gt;const Yt={left:_t,right:xt,center:vt,justify:yt},Ht=function(t,n,s,a){const{securityLevel:u,sankey:_}=L.getConfig(),g=L.defaultConfig.sankey;let p;u==="sandbox"&&(p=L.select("#i"+n));const i=u==="sandbox"?L.select(p.nodes()[0].contentDocument.body):L.select("body"),o=u==="sandbox"?i.select(`[id="${n}"]`):L.select(`[id="${n}"]`),c=(_==null?void 0:_.width)??g.width,m=(_==null?void 0:_.height)??g.width,b=(_==null?void 0:_.useMaxWidth)??g.useMaxWidth,y=(_==null?void 0:_.nodeAlignment)??g.nodeAlignment,x=(_==null?void 0:_.prefix)??g.prefix,A=(_==null?void 0:_.suffix)??g.suffix,E=(_==null?void 0:_.showValues)??g.showValues,T=a.db.getGraph(),C=Yt[y];Lt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(E?15:0)).nodeAlign(C).extent([[0,0],[c,m]])(T);const S=pt.ordinal(mt.schemeTableau10);o.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=ht.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const N=({id:d,value:w})=>E?`${d}
|
|
7
|
-
${x}${Math.round(w*100)/100}${A}`:d;o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(T.nodes).join("text").attr("x",d=>d.x0<c/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<c/2?"start":"end").text(N);const D=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),P=(_==null?void 0:_.linkColor)||"gradient";if(P==="gradient"){const d=D.append("linearGradient").attr("id",w=>(w.uid=ht.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(P){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=P}D.append("path").attr("d",jt()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width)),L.setupGraphViewbox$1(void 0,o,0,b)},Xt={draw:Ht},Qt=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
-
`).trim(),Kt=H.parse.bind(H);H.parse=t=>Kt(Qt(t));const Zt={parser:H,db:Gt,renderer:Xt};exports.diagram=Zt;
|
package/dist/layers.BlQ-fVEN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),a=require("react"),e=require("./layers.CPPTxpTa.js"),y=require("@mantine/core");function D({initialEditor:t,children:u,initialNodes:r,initialTheme:b,skipCollabChecks:d,skipEditableListener:f}){const l=a.useRef(!1),v=a.useContext(e.r);v==null&&(function(s,...S){const j=new URL("https://lexical.dev/docs/error"),x=new URLSearchParams;x.append("code",s);for(const o of S)x.append("v",o);throw j.search=x.toString(),Error(`Minified Lexical error #${s}; visit ${j.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(9);const[g,{getTheme:w}]=v,I=a.useMemo(()=>{const s=b||w()||void 0,S=e.t(v,s);s!==void 0&&(t._config.theme=s),t._parentEditor=t._parentEditor||g;const j=t._createEditorArgs,x=j&&j.namespace;if(r){x||(t._config.namespace=g._config.namespace);for(let o of r){let _=null,m=null;if(typeof o!="function"){const i=o;o=i.replace,_=i.with,m=i.withKlass||null}const N=e.Xi(t,o.getType());t._nodes.set(o.getType(),{exportDOM:N?N.exportDOM:void 0,klass:o,replace:_,replaceWithKlass:m,sharedNodeState:e.at(o),transforms:e.ji(o)})}}else if(j&&j.nodes)x||(t._config.namespace=g._config.namespace);else{const o=t._nodes=new Map(g._nodes);x||(t._config.namespace=g._config.namespace);for(const[_,m]of o)t._nodes.set(_,{exportDOM:m.exportDOM,klass:m.klass,replace:m.replace,replaceWithKlass:m.replaceWithKlass,sharedNodeState:e.at(m.klass),transforms:e.ji(m.klass)})}return[t,S]},[]),E=a.useContext(e.l),{isCollabActive:h,yjsDocMap:p}=E??{},k=d||l.current||p&&p.has(t.getKey());return a.useEffect(()=>{k&&(l.current=!0)},[k]),a.useEffect(()=>{if(!f){const s=S=>t.setEditable(S);return s(g.isEditable()),g.registerEditableListener(s)}},[t,g,f]),n.jsx(e.r.Provider,{value:I,children:!h||k?u:null})}function T({children:t,className:u}){return n.jsx("div",{className:u||"Placeholder__root",children:t})}function P({label:t,value:u,onChange:r,placeholder:b="","data-test-id":d,type:f="text"}){return n.jsx(y.TextInput,{type:f,placeholder:b,value:u,onChange:l=>{r(l.target.value)},label:t,"data-test-id":d,mb:10})}const M=new Set;function z(t){if(!M.has(t))throw new Promise(u=>{const r=new Image;r.src=t,r.onload=()=>{M.add(t),u(null)}})}function O({altText:t,className:u,imageRef:r,src:b,width:d,height:f,position:l}){return z(b),n.jsx("img",{className:u||void 0,src:b,alt:t,ref:r,"data-position":l,style:{display:"block",height:f,width:d},draggable:"false"})}function R({activeEditor:t,nodeKey:u,onClose:r}){const d=t.getEditorState().read(()=>e.xo(u)),[f,l]=a.useState(d.getAltText()),[v,g]=a.useState(d.getShowCaption()),[w,I]=a.useState(d.getPosition()),E=p=>{g(p.target.checked)},h=()=>{const p={altText:f,position:w,showCaption:v};d&&t.update(()=>{d.update(p)}),r()};return n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{marginBottom:"1em"},children:n.jsx(P,{label:"Alt-текст",placeholder:"Альтернативный текст",onChange:l,value:f,"data-test-id":"image-modal-alt-text-input"})}),n.jsxs("div",{className:"Input__wrapper",children:[n.jsx("input",{id:"caption",type:"checkbox",checked:v,onChange:E}),n.jsx("label",{htmlFor:"caption",children:"Show Caption"})]}),n.jsx(e.Button,{"data-test-id":"image-modal-file-upload-btn",onClick:()=>h(),children:"Применить"})]})}function U({src:t,altText:u,nodeKey:r,width:b,height:d,showCaption:f,caption:l,position:v}){const[g,w]=e.useModal(),I=a.useRef(null),E=a.useRef(null),[h,p,k]=e.u(r),[s]=e.o(),[S,j]=a.useState(null),x=a.useRef(null),o=a.useCallback(i=>{if(h&&e.xr(e.Lr())){i.preventDefault();const c=e.xo(r);e.$isInlineImageNode(c)&&c.remove()}return!1},[h,r]),_=a.useCallback(i=>{const C=e.Lr(),c=E.current;if(h&&e.xr(C)&&C.getNodes().length===1){if(f)return e.wo(null),i.preventDefault(),l.focus(),!0;if(c!==null&&c!==document.activeElement)return i.preventDefault(),c.focus(),!0}return!1},[l,h,f]),m=a.useCallback(i=>x.current===l||E.current===i.target?(e.wo(null),s.update(()=>{p(!0);const C=s.getRootElement();C!==null&&C.focus()}),!0):!1,[l,s,p]);a.useEffect(()=>{let i=!0;const C=e.U(s.registerUpdateListener(({editorState:c})=>{i&&j(c.read(()=>e.Lr()))}),s.registerCommand(e.ie,(c,L)=>(x.current=L,!1),e.zi),s.registerCommand(e.se,c=>{const L=c;return L.target===I.current?(L.shiftKey?p(!h):(k(),p(!0)),!0):!1},e.zi),s.registerCommand(e.Ie,c=>c.target===I.current?(c.preventDefault(),!0):!1,e.zi),s.registerCommand(e.Oe,o,e.zi),s.registerCommand(e.we,o,e.zi),s.registerCommand(e.Ne,_,e.zi),s.registerCommand(e.Ee,m,e.zi));return()=>{i=!1,C()}},[k,s,h,r,o,_,m,p]);const N=h;return n.jsxs(a.Suspense,{fallback:null,children:[n.jsxs(n.Fragment,{children:[n.jsxs("div",{draggable:!1,children:[n.jsx("button",{className:"image-edit-button",ref:E,onClick:()=>{w("Update Inline Image",i=>n.jsx(R,{activeEditor:s,nodeKey:r,onClose:i}))},children:"Edit"}),n.jsx(O,{className:N?`focused ${e.xr(S)?"draggable":""}`:null,src:t,altText:u,imageRef:I,width:b,height:d,position:v})]}),f&&n.jsx("div",{className:"image-caption-container",children:n.jsxs(D,{initialEditor:l,children:[n.jsx(e.LinkPlugin,{}),n.jsx(e.FloatingTextFormatToolbarPlugin,{}),n.jsx(e.L,{contentEditable:n.jsx(e.LexicalContentEditable,{className:"InlineImageNode__contentEditable"}),placeholder:n.jsx(T,{className:"InlineImageNode__placeholder",children:"Enter a caption..."}),ErrorBoundary:e.n})]})})]}),g]})}exports.UpdateInlineImageDialog=R;exports.default=U;
|