@layers-app/editor 0.7.24 → 0.7.26
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 +79 -7
- package/dist/index.js +15 -9
- package/dist/{layers.DpAWXloN.js → layers.-wjKgffX.js} +10 -7
- package/dist/{layers.DPP6_cbD.js → layers.1bJ3Mbz9.js} +9 -6
- package/dist/{layers.CP3EufOe.js → layers.2T1xhom9.js} +1 -1
- package/dist/{layers.C20Qi890.js → layers.6sikPcq3.js} +1 -1
- package/dist/{layers.V-9Fvifr.js → layers.6w8B4hFk.js} +1 -1
- package/dist/{layers.Lc29kAuz.js → layers.8RkOJVIE.js} +1 -1
- package/dist/{layers.jTaJiZzk.js → layers.8VJeG9rG.js} +1 -1
- package/dist/{layers.CDPIcOqa.js → layers.AAIYJoWX.js} +1 -1
- package/dist/{layers.BVHCv5uJ.js → layers.B2YKwjXz.js} +7 -4
- package/dist/{layers.D0ptqEmo.js → layers.B2qAOIlo.js} +1 -1
- package/dist/{layers.IPxhkSfj.js → layers.B2yHR68Q.js} +1 -1
- package/dist/{layers.Czdt779o.js → layers.B33gaZah.js} +1 -1
- package/dist/{layers.D8vSQAh0.js → layers.B3I1RQ68.js} +5867 -5583
- package/dist/{layers.DyvnTlHi.js → layers.B3z0mDcg.js} +1 -1
- package/dist/{layers.MHEFRzDP.js → layers.B4bWwT6u.js} +8 -5
- package/dist/{layers.BhOCkx36.js → layers.B4ck5N3X.js} +1 -1
- package/dist/{layers.DfgtWeVl.js → layers.B6c3HMGt.js} +1 -1
- package/dist/{layers.CiFtNCp_.js → layers.B6rDUX-b.js} +1 -1
- package/dist/layers.B7edFg4K.js +8 -0
- package/dist/{layers.lG7Mase1.js → layers.B7mfWigl.js} +1 -1
- package/dist/{layers.DnvUnO-4.js → layers.BB8EnLVz.js} +1 -1
- package/dist/{layers.BCDRxkn5.js → layers.BFEVByrk.js} +86 -84
- package/dist/layers.BFc73oZr.js +1 -0
- package/dist/{layers.BNxa_eCc.js → layers.BG--DwYt.js} +1 -1
- package/dist/{layers.MNW-ShKu.js → layers.BGC5ykCP.js} +14 -11
- package/dist/{layers.BwHEZWKu.js → layers.BIEejIsW.js} +1 -1
- package/dist/{layers.BZv7cxTR.js → layers.BIHazuDa.js} +92 -89
- package/dist/{layers.Bv1xDmd0.js → layers.BKpRcWnp.js} +1 -1
- package/dist/{layers.rzToPUAK.js → layers.BMNubRvf.js} +1 -1
- package/dist/{layers.-qmjZJBI.js → layers.BN9FdsoO.js} +1 -1
- package/dist/{layers.gnAUWHV-.js → layers.BNk35KKQ.js} +1 -1
- package/dist/{layers.BGGuOo27.js → layers.BO9n3EnR.js} +1 -1
- package/dist/{layers.Bdzg4UkM.js → layers.BPcVGKN8.js} +1 -1
- package/dist/{layers.BE_-JA1T.js → layers.BRzgC6KB.js} +1 -1
- package/dist/{layers.D9yXBIuK.js → layers.BTCB0JpX.js} +1 -1
- package/dist/{layers.DXyBsBF5.js → layers.BTeJHhdu.js} +1 -1
- package/dist/{layers.oJ61CNkw.js → layers.BTuPozoV.js} +1 -1
- package/dist/{layers.BI0TTMdG.js → layers.BTzUbI88.js} +1 -1
- package/dist/{layers.jZvrWKJt.js → layers.BV21urwt.js} +1 -1
- package/dist/{layers.DQIT2lCm.js → layers.BXpw5pIX.js} +1 -1
- package/dist/layers.BYSykmoC.js +1 -0
- package/dist/{layers.eNGl-u4H.js → layers.BY_J4jYD.js} +1 -1
- package/dist/{layers.BuGAznjj.js → layers.B_VEfl-c.js} +4 -4
- package/dist/{layers.BwtMeyCj.js → layers.B_o3asJK.js} +3 -3
- package/dist/{layers.mnoq184J.js → layers.BaT04AWS.js} +1 -1
- package/dist/{layers.D6XgZ8Az.js → layers.BaVjgFII.js} +1 -1
- package/dist/{layers.BdiCSpJ4.js → layers.BbH61zxx.js} +1 -1
- package/dist/{layers.BrUMsy26.js → layers.BbPfMVtY.js} +1 -1
- package/dist/{layers.CadrukAB.js → layers.Bc3f0bzg.js} +1 -1
- package/dist/{layers.BV2fpDYI.js → layers.BcdMFEfM.js} +1 -1
- package/dist/{layers.DU7EZINs.js → layers.Bd3FesAt.js} +1 -1
- package/dist/{layers.Co1X8jDP.js → layers.Bd6kH7xt.js} +1 -1
- package/dist/{layers.FlOgidCp.js → layers.Be7W7XL8.js} +1 -1
- package/dist/{layers.CFSfvSsm.js → layers.Bex4q159.js} +1 -1
- package/dist/{layers.CDexQZa_.js → layers.Bh3bOLvQ.js} +8 -5
- package/dist/{layers.DcKjvxHE.js → layers.BiSuaFI7.js} +1 -1
- package/dist/{layers.CvU_g0Ek.js → layers.Bi_FdRT_.js} +1 -1
- package/dist/{layers.B6C5kDa3.js → layers.BiyAv8aG.js} +1 -1
- package/dist/{layers.BY9o3NTY.js → layers.BjMl2wQQ.js} +1 -1
- package/dist/{layers.Dq9b1xqh.js → layers.BjOHqBbv.js} +1 -1
- package/dist/{layers.edPrT81i.js → layers.BlEI10xV.js} +1 -1
- package/dist/{layers.BiD-9uwr.js → layers.Bq8p214x.js} +1 -1
- package/dist/{layers.CH4plVEu.js → layers.BqdhwtFO.js} +3 -3
- package/dist/{layers.cf3uaysm.js → layers.BsEw_gIa.js} +1 -1
- package/dist/{layers.X0J3BhYy.js → layers.Bsoxckn8.js} +7 -4
- package/dist/{layers.DH-cj5fE.js → layers.BtVBENDV.js} +2 -2
- package/dist/{layers.Me9S-22r.js → layers.BtjJdW-J.js} +10 -7
- package/dist/{layers.RpoUh8kq.js → layers.BuslMnX9.js} +1 -1
- package/dist/{layers.D4VJ5B0e.js → layers.Bw8iToJZ.js} +1 -1
- package/dist/{layers.DM9hpazD.js → layers.BwDyCg1e.js} +1 -1
- package/dist/{layers.fiMaf-_a.js → layers.Bwkdf-_V.js} +3 -3
- package/dist/{layers.BB-2khdc.js → layers.Bxp23eQH.js} +4 -4
- package/dist/{layers.CQMssu5A.js → layers.ByrUhAUL.js} +1 -1
- package/dist/{layers.BqkB6bfG.js → layers.Bze40RCj.js} +1 -1
- package/dist/layers.BztYpZSr.js +257 -0
- package/dist/{layers.d9OooXQC.js → layers.C0Ws-fCa.js} +1 -1
- package/dist/{layers.nNlLwZ_E.js → layers.C1tEKsbt.js} +1 -1
- package/dist/{layers.y0ia1Vp6.js → layers.C2FJqDkI.js} +1 -1
- package/dist/{layers.DmEW632Y.js → layers.C2k_QfG3.js} +2 -2
- package/dist/{layers.ekCtLRbA.js → layers.C34ZNIfL.js} +1 -1
- package/dist/layers.C3DvXqUP.js +1 -0
- package/dist/{layers.I85BW5o2.js → layers.C4MSW5Y5.js} +1 -1
- package/dist/{layers.C-UCCxZT.js → layers.C7AUSLfi.js} +1 -1
- package/dist/layers.C7mlmYdC.js +129 -0
- package/dist/{layers.Ca_hxCzh.js → layers.C8N13X_Z.js} +1 -1
- package/dist/{layers.6Og6_hox.js → layers.C8ZWzhQl.js} +1 -1
- package/dist/{layers.BSwRsFvu.js → layers.C8d3D9Lb.js} +7 -7
- package/dist/{layers.BVSO7aWV.js → layers.C92GKFB8.js} +1 -1
- package/dist/{layers.DAF65Eyh.js → layers.CHGPKVlh.js} +1 -1
- package/dist/{layers.W66NF2U9.js → layers.CJF69bGz.js} +1 -1
- package/dist/layers.CMFoKFfW.js +26971 -0
- package/dist/{layers.D_XM1OQx.js → layers.COGWYVIo.js} +3 -3
- package/dist/layers.CQJnLKvH.js +8 -0
- package/dist/{layers.CPIxu6GO.js → layers.CVUrxvM-.js} +8 -5
- package/dist/{layers.BKOg8e2U.js → layers.CY5BDIai.js} +1 -1
- package/dist/{layers.CfJUJqdv.js → layers.CYkqJ9mA.js} +1 -1
- package/dist/{layers.BfK7Zksy.js → layers.C_X4Kdn2.js} +1 -1
- package/dist/{layers.A6MvZ2Sd.js → layers.CaPlf6cQ.js} +4 -4
- package/dist/{layers.Cf85CE4j.js → layers.Caliy2g7.js} +1 -1
- package/dist/{layers.Q-xFVVwC.js → layers.CanJemCn.js} +1 -1
- package/dist/{layers.CLT1Xhw2.js → layers.CcZVMGJ2.js} +1 -1
- package/dist/{layers.B1l2IEoW.js → layers.CfOpBTNW.js} +1 -1
- package/dist/{layers.CeuPBpSS.js → layers.CgywpxNj.js} +1 -1
- package/dist/{layers.BG9jBVsg.js → layers.ChP80TqX.js} +1 -1
- package/dist/{layers.CXp0yiA_.js → layers.CickKalz.js} +1 -1
- package/dist/{layers.Bi8uSmnl.js → layers.CkYHBZT_.js} +1 -1
- package/dist/{layers.CRKCl3-s.js → layers.ClGUwzhg.js} +1 -1
- package/dist/{layers.mgh4Cwfx.js → layers.ClfyzbH1.js} +1 -1
- package/dist/layers.CmxS83Nk.js +1225 -0
- package/dist/layers.Cn5BBMoQ.js +1 -0
- package/dist/{layers.BW593_YD.js → layers.Cnp_kKHs.js} +1 -1
- package/dist/{layers.BBgqB-dj.js → layers.CqUEj4Gr.js} +1 -1
- package/dist/{layers.Cc1VRWwn.js → layers.CqVF0OGH.js} +1 -1
- package/dist/{layers.DNOD_LF5.js → layers.CsPg2KjG.js} +1 -1
- package/dist/{layers.zDfwTCmT.js → layers.CtQWlaO1.js} +1 -1
- package/dist/{layers.h4L4Mc41.js → layers.Cv6S_9I-.js} +1 -1
- package/dist/{layers.5U6DsNQ8.js → layers.CxWefKHI.js} +9 -6
- package/dist/{layers.nFMauJSN.js → layers.Cx_nY6Y7.js} +1 -1
- package/dist/{layers.B2nS5rBS.js → layers.D01DTzLv.js} +1 -1
- package/dist/{layers.WwL-1p8w.js → layers.D0KthgS6.js} +1 -1
- package/dist/{layers.CYMmJIgK.js → layers.D1wXYOhT.js} +7 -4
- package/dist/{layers.DO1NcRAM.js → layers.D3nu7CUH.js} +1 -1
- package/dist/{layers.BFDXAxa6.js → layers.D4aYlLPZ.js} +1 -1
- package/dist/{layers.iyoop3cH.js → layers.D5OBgP7h.js} +3 -3
- package/dist/{layers.Df79MJjN.js → layers.D5VfbQu6.js} +3 -3
- package/dist/{layers.B4ZRP4dv.js → layers.D5g62wy8.js} +1 -1
- package/dist/{layers.DrprvZC4.js → layers.D6CpOfiQ.js} +1 -1
- package/dist/{layers.53hChJFF.js → layers.D8wPyzG6.js} +6 -6
- package/dist/{layers.C0BLZbdT.js → layers.D9Tic5tu.js} +1 -1
- package/dist/{layers.-58OrB2h.js → layers.D9_JSxkr.js} +1 -1
- package/dist/{layers.Bq3WRO3x.js → layers.DAxsOQEh.js} +1 -1
- package/dist/{layers.CSi2XRJ2.js → layers.DBfOwxPO.js} +1 -1
- package/dist/layers.DEjsgTOR.js +6 -0
- package/dist/{layers.D33lu-eC.js → layers.DElPAzG2.js} +1 -1
- package/dist/{layers.XS2AIvBG.js → layers.DEpxDMdS.js} +1 -1
- package/dist/{layers.CqggRfmv.js → layers.DFF50PT4.js} +1 -1
- package/dist/{layers.BqxiZwrm.js → layers.DIPoQibL.js} +1 -1
- package/dist/layers.DIlNlcqo.js +118 -0
- package/dist/{layers.BbDBKF7d.js → layers.DKm1mN2X.js} +1 -1
- package/dist/layers.DLV3QO1y.js +76 -0
- package/dist/{layers.BDuP7QP1.js → layers.DMqa4UuA.js} +7 -7
- package/dist/{layers.B8qo87mf.js → layers.DOQpvHnX.js} +1 -1
- package/dist/{layers.CCqe9zp9.js → layers.DOZaSqiR.js} +1 -1
- package/dist/{layers.Cynva3D_.js → layers.DQ5ZJRxN.js} +1 -1
- package/dist/layers.DQ7Ue1Fv.js +22 -0
- package/dist/{layers.DD5DttRP.js → layers.DQ87eVFA.js} +1 -1
- package/dist/{layers.5R_vfSOI.js → layers.DS_qYTUu.js} +1 -1
- package/dist/{layers.BqikkqHY.js → layers.DT1Fui5R.js} +1 -1
- package/dist/{layers.BFclfxlH.js → layers.DTagsNpb.js} +3 -3
- package/dist/layers.DWkC7jVJ.js +1 -0
- package/dist/{layers.C47JbXwl.js → layers.D_ZvKS4q.js} +1 -1
- package/dist/{layers.C5JgdF76.js → layers.DagwUHWb.js} +1 -1
- package/dist/{layers.CXPJGJnh.js → layers.Ddc-JH2d.js} +1 -1
- package/dist/{layers.Bvra5UGQ.js → layers.DeTIo1zr.js} +1 -1
- package/dist/{layers.CR8SQeln.js → layers.Df5vGs9k.js} +227 -224
- package/dist/{layers.eaKLR5Q2.js → layers.DfDXn4TD.js} +1 -1
- package/dist/{layers.BKWiI_4a.js → layers.DfsVAKCW.js} +1 -1
- package/dist/{layers.BOWoLhye.js → layers.DiSdECjm.js} +3 -3
- package/dist/{layers.adnwY8ML.js → layers.DkHHkcwB.js} +1 -1
- package/dist/layers.DlaPU6IV.js +1 -0
- package/dist/layers.DmSHn1Q-.js +1 -0
- package/dist/{layers.90LiGxII.js → layers.DosSADRb.js} +8 -5
- package/dist/{layers.XZft6Ook.js → layers.DptMIwKT.js} +1 -1
- package/dist/{layers.SsSYgMGG.js → layers.DpvmCmKj.js} +1 -1
- package/dist/{layers.BLERpK_S.js → layers.DrAry1Kf.js} +1 -1
- package/dist/{layers.EXQpfQWq.js → layers.Ds_tgW-V.js} +1 -1
- package/dist/{layers.DRZylWPP.js → layers.DtdLS6Dk.js} +1 -1
- package/dist/{layers.DJ7ZL_sW.js → layers.DujvWPQs.js} +9 -6
- package/dist/{layers.DvNvJZss.js → layers.Dx95JHIq.js} +1 -1
- package/dist/{layers.B-Ftwt7z.js → layers.DxYMwPJD.js} +1 -1
- package/dist/{layers.DenZLHkn.js → layers.DxqWMo04.js} +1 -1
- package/dist/{layers.DrZAE5o5.js → layers.DzhNjcrw.js} +1 -1
- package/dist/{layers.BJOmz-8E.js → layers.EtcHUsqn.js} +1 -1
- package/dist/{layers.B5V9R6dS.js → layers.GQBWZE5I.js} +92 -89
- package/dist/{layers.B0gBsd1G.js → layers.IAIKoo0h.js} +18 -15
- package/dist/{layers.CkEhuwys.js → layers.LvEP7msO.js} +11 -8
- package/dist/{layers.BsV8AKqE.js → layers.My9kZFhO.js} +9 -6
- package/dist/{layers.CoCdUjOH.js → layers.NDz-9Ggu.js} +1 -1
- package/dist/{layers.CA5feGxW.js → layers.NZf4E-Wg.js} +1 -1
- package/dist/{layers.BxX_THjw.js → layers.O1t5sl2z.js} +1 -1
- package/dist/layers.RIwhwY8U.js +213 -0
- package/dist/{layers.Aw65tqqV.js → layers.W7ATjiDf.js} +1 -1
- package/dist/layers.X8-JMNQm.js +1 -0
- package/dist/layers.XMCRkU_N.js +271 -0
- package/dist/{layers.CmWWurhR.js → layers.bf7CMgrh.js} +1 -1
- package/dist/{layers.waYEJRmN.js → layers.d30Rgcib.js} +1 -1
- package/dist/{layers.8HXImnXe.js → layers.dyig4B3u.js} +40 -40
- package/dist/{layers.CHa9lFoT.js → layers.em6rytD5.js} +1 -1
- package/dist/{layers.CV3PBAi0.js → layers.gGLUL8Z7.js} +1 -1
- package/dist/{layers.B2SmhxzW.js → layers.hoCWKOtV.js} +1 -1
- package/dist/{layers.soJefnD3.js → layers.iFeAlI6H.js} +1 -1
- package/dist/{layers.FBzg3C04.js → layers.jfJgHirm.js} +50 -50
- package/dist/layers.kZlGqXlo.js +2 -0
- package/dist/{layers.l-ywSwa2.js → layers.lel7gNeu.js} +1 -1
- package/dist/{layers.DjGdrDC1.js → layers.mBB8ss0I.js} +1 -1
- package/dist/{layers.Bzrkz_Q7.js → layers.mGvgS9vW.js} +1 -1
- package/dist/{layers.C2-P7-v8.js → layers.nFOcuDzr.js} +1 -1
- package/dist/{layers.DNJEfwiQ.js → layers.obwBR-PL.js} +1 -1
- package/dist/{layers.CUV1fBKt.js → layers.pWVdZ1OI.js} +15 -12
- package/dist/{layers.D-iLQKYz.js → layers.qT-9akPN.js} +1 -1
- package/dist/layers.s4n1roZI.js +1 -0
- package/dist/{layers.DzghPRf3.js → layers.vJOgspvU.js} +3229 -3812
- package/dist/layers.ylvIcl1z.js +96 -0
- package/dist/layers.zi2jGsFZ.js +2 -0
- package/package.json +1 -1
- package/dist/layers.1s4BbICk.js +0 -1
- package/dist/layers.BLvWGmxZ.js +0 -304
- package/dist/layers.BPXa6Xko.js +0 -8
- package/dist/layers.BUT_cQlY.js +0 -1
- package/dist/layers.BZMHF27f.js +0 -6
- package/dist/layers.Bfcc7TOH.js +0 -1
- package/dist/layers.BjtEPALX.js +0 -19
- package/dist/layers.BlT1aHiA.js +0 -1
- package/dist/layers.Br5DTynl.js +0 -74
- package/dist/layers.CQR0Nl7I.js +0 -1
- package/dist/layers.CgDb5aPr.js +0 -2
- package/dist/layers.CmxZ8EKk.js +0 -1
- package/dist/layers.Cp63Ydn2.js +0 -50707
- package/dist/layers.CtCTIWni.js +0 -1
- package/dist/layers.Ctzw3Xb5.js +0 -1
- package/dist/layers.Cw5bBQfp.js +0 -118
- package/dist/layers.D0GEGoV_.js +0 -373
- package/dist/layers.D5DNThwz.js +0 -208
- package/dist/layers.D71D_04V.js +0 -1359
- package/dist/layers.DJnnhy8m.js +0 -96
- package/dist/layers.DgCaJXYg.js +0 -257
- package/dist/layers.Dvl1mlTI.js +0 -1
- package/dist/layers.DzDR_oG4.js +0 -8
- package/dist/layers.Qn6nodoY.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./layers.BXpw5pIX.js"),t=require("./layers.ylvIcl1z.js"),_=require("./layers.BLd2spTm.js"),N=require("./layers.CHGPKVlh.js");require("./layers.dyig4B3u.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");require("lodash-es");require("./layers.Cyzu9PKQ.js");const k=s=>t.common$1.sanitizeText(s,t.getConfig());let w={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,o,f,i){const e=Object.keys(s);t.log$1.info("keys:",e),t.log$1.info(s),e.forEach(function(r){var l,c;const n=s[r],d={shape:"rect",id:n.id,domId:n.domId,labelText:k(n.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};o.setNode(n.id,d),$(n.classes,o,f,i,n.id),t.log$1.info("setNode",d)})},$=function(s,o,f,i,e){const r=Object.keys(s);t.log$1.info("keys:",r),t.log$1.info(s),r.filter(l=>s[l].parent==e).forEach(function(l){var c,n;const a=s[l],d=a.cssClasses.join(" "),g=t.getStylesFromArray(a.styles),p=a.label??a.id,y=0,u={labelStyle:g.labelStyle,shape:"class_box",labelText:k(p),classData:a,rx:y,ry:y,class:d,style:g.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((c=t.getConfig().flowchart)==null?void 0:c.padding)??((n=t.getConfig().class)==null?void 0:n.padding)};o.setNode(a.id,u),e&&o.setParent(a.id,e),t.log$1.info("setNode",u)})},D=function(s,o,f,i){t.log$1.info(s),s.forEach(function(e,r){var l,c;const n=e,a="",d={labelStyle:"",style:""},g=n.text,p=0,b={labelStyle:d.labelStyle,shape:"note",labelText:k(g),noteData:n,rx:p,ry:p,class:a,style:d.style,id:n.id,domId:n.id,tooltip:"",type:"note",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};if(o.setNode(n.id,b),t.log$1.info("setNode",b),!n.class||!(n.class in i))return;const u=f+r,x={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(w.curve,t.curveLinear)};o.setEdge(n.id,n.class,x,u)})},E=function(s,o){const f=t.getConfig().flowchart;let i=0;s.forEach(function(e){var r;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:C(e.relation.type1),arrowTypeEnd:C(e.relation.type2),style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(f==null?void 0:f.curve,t.curveLinear)};if(t.log$1.info(l,e),e.style!==void 0){const c=t.getStylesFromArray(e.style);l.style=c.style,l.labelStyle=c.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((r=t.getConfig().flowchart)==null?void 0:r.htmlLabels)??t.getConfig().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(t.common$1.lineBreakRegex,`
|
|
2
|
+
`),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),o.setEdge(e.id1,e.id2,l,i)})},A=function(s){w={...w,...s}},M=async function(s,o,f,i){t.log$1.info("Drawing class - ",o);const e=t.getConfig().flowchart??t.getConfig().class,r=t.getConfig().securityLevel;t.log$1.info("config:",e);const l=(e==null?void 0:e.nodeSpacing)??50,c=(e==null?void 0:e.rankSpacing)??50,n=new _.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=i.db.getNamespaces(),d=i.db.getClasses(),g=i.db.getRelations(),p=i.db.getNotes();t.log$1.info(g),q(a,n,o,i),$(d,n,o,i),E(g,n),D(p,n,g.length+1,d);let y;r==="sandbox"&&(y=t.select("#i"+o));const b=r==="sandbox"?t.select(y.nodes()[0].contentDocument.body):t.select("body"),u=b.select(`[id="${o}"]`),x=b.select("#"+o+" g");if(await N.render(x,n,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",o),t.utils.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,i.db.getDiagramTitle()),t.setupGraphViewbox$1(n,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const S=r==="sandbox"?y.nodes()[0].contentDocument:document,L=S.querySelectorAll('[id="'+o+'"] .edgeLabel .label');for(const m of L){const T=m.getBBox(),h=S.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",T.width),h.setAttribute("height",T.height),m.insertBefore(h,m.firstChild)}}};function C(s){let o;switch(s){case 0:o="aggregation";break;case 1:o="extension";break;case 2:o="composition";break;case 3:o="dependency";break;case 4:o="lollipop";break;default:o="none"}return o}const I={setConf:A,draw:M},B={parser:v.parser$1,db:v.db,renderer:I,styles:v.styles,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,v.db.clear()}};exports.diagram=B;
|
package/package.json
CHANGED
package/dist/layers.1s4BbICk.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./layers.DyvnTlHi.js"),t=require("./layers.DJnnhy8m.js");require("lodash-es");const z=require("./layers.Cyzu9PKQ.js"),T=require("./layers.BLd2spTm.js");require("./layers.8HXImnXe.js");const L=require("./layers.CHa9lFoT.js"),P=e=>e.append("circle").attr("class","start-state").attr("r",t.getConfig().state.sizeUnit).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit),A=e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t.getConfig().state.textHeight).attr("class","divider").attr("x2",t.getConfig().state.textHeight*2).attr("y1",0).attr("y2",0),G=(e,n)=>{const r=e.append("text").attr("x",2*t.getConfig().state.padding).attr("y",t.getConfig().state.textHeight+2*t.getConfig().state.padding).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.id),d=r.node().getBBox();return e.insert("rect",":first-child").attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding).attr("width",d.width+2*t.getConfig().state.padding).attr("height",d.height+2*t.getConfig().state.padding).attr("rx",t.getConfig().state.radius),r},W=(e,n)=>{const r=function(c,w,y){const S=c.append("tspan").attr("x",2*t.getConfig().state.padding).text(w);y||S.attr("dy",t.getConfig().state.textHeight)},a=e.append("text").attr("x",2*t.getConfig().state.padding).attr("y",t.getConfig().state.textHeight+1.3*t.getConfig().state.padding).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.descriptions[0]).node().getBBox(),l=a.height,f=e.append("text").attr("x",t.getConfig().state.padding).attr("y",l+t.getConfig().state.padding*.4+t.getConfig().state.dividerMargin+t.getConfig().state.textHeight).attr("class","state-description");let i=!0,s=!0;n.descriptions.forEach(function(c){i||(r(f,c,s),s=!1),i=!1});const C=e.append("line").attr("x1",t.getConfig().state.padding).attr("y1",t.getConfig().state.padding+l+t.getConfig().state.dividerMargin/2).attr("y2",t.getConfig().state.padding+l+t.getConfig().state.dividerMargin/2).attr("class","descr-divider"),p=f.node().getBBox(),g=Math.max(p.width,a.width);return C.attr("x2",g+3*t.getConfig().state.padding),e.insert("rect",":first-child").attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding).attr("width",g+2*t.getConfig().state.padding).attr("height",p.height+l+2*t.getConfig().state.padding).attr("rx",t.getConfig().state.radius),e},v=(e,n,r)=>{const d=t.getConfig().state.padding,a=2*t.getConfig().state.padding,l=e.node().getBBox(),f=l.width,i=l.x,s=e.append("text").attr("x",0).attr("y",t.getConfig().state.titleShift).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.id),p=s.node().getBBox().width+a;let g=Math.max(p,f);g===f&&(g=g+a);let c;const w=e.node().getBBox();n.doc,c=i-d,p>f&&(c=(f-g)/2+d),Math.abs(i-w.x)<d&&p>f&&(c=i-(p-f)/2);const y=1-t.getConfig().state.textHeight;return e.insert("rect",":first-child").attr("x",c).attr("y",y).attr("class",r?"alt-composit":"composit").attr("width",g).attr("height",w.height+t.getConfig().state.textHeight+t.getConfig().state.titleShift+1).attr("rx","0"),s.attr("x",c+d),p<=f&&s.attr("x",i+(g-a)/2-p/2+d),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig().state.titleShift-t.getConfig().state.textHeight-t.getConfig().state.padding).attr("width",g).attr("height",t.getConfig().state.textHeight*3).attr("rx",t.getConfig().state.radius),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig().state.titleShift-t.getConfig().state.textHeight-t.getConfig().state.padding).attr("width",g).attr("height",w.height+3+2*t.getConfig().state.textHeight).attr("rx",t.getConfig().state.radius),e},R=e=>(e.append("circle").attr("class","end-state-outer").attr("r",t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t.getConfig().state.sizeUnit).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit+2).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit+2)),U=(e,n)=>{let r=t.getConfig().state.forkWidth,d=t.getConfig().state.forkHeight;if(n.parentId){let a=r;r=d,d=a}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",d).attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding)},q=(e,n,r,d)=>{let a=0;const l=d.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let f=e.replace(/\r\n/g,"<br/>");f=f.replace(/\n/g,"<br/>");const i=f.split(t.common$1.lineBreakRegex);let s=1.25*t.getConfig().state.noteMargin;for(const C of i){const p=C.trim();if(p.length>0){const g=l.append("tspan");if(g.text(p),s===0){const c=g.node().getBBox();s+=c.height}a+=s,g.attr("x",n+t.getConfig().state.noteMargin),g.attr("y",r+a+1.25*t.getConfig().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:a}},F=(e,n)=>{n.attr("class","state-note");const r=n.append("rect").attr("x",0).attr("y",t.getConfig().state.padding),d=n.append("g"),{textWidth:a,textHeight:l}=q(e,0,0,d);return r.attr("height",l+2*t.getConfig().state.noteMargin),r.attr("width",a+t.getConfig().state.noteMargin*2),r},M=function(e,n){const r=n.id,d={id:r,label:n.id,width:0,height:0},a=e.append("g").attr("id",r).attr("class","stateGroup");n.type==="start"&&P(a),n.type==="end"&&R(a),(n.type==="fork"||n.type==="join")&&U(a,n),n.type==="note"&&F(n.note.text,a),n.type==="divider"&&A(a),n.type==="default"&&n.descriptions.length===0&&G(a,n),n.type==="default"&&n.descriptions.length>0&&W(a,n);const l=a.node().getBBox();return d.width=l.width+2*t.getConfig().state.padding,d.height=l.height+2*t.getConfig().state.padding,d};let H=0;const O=function(e,n,r){const d=function(s){switch(s){case m.db.relationType.AGGREGATION:return"aggregation";case m.db.relationType.EXTENSION:return"extension";case m.db.relationType.COMPOSITION:return"composition";case m.db.relationType.DEPENDENCY:return"dependency"}};n.points=n.points.filter(s=>!Number.isNaN(s.y));const a=n.points,l=L.line().x(function(s){return s.x}).y(function(s){return s.y}).curve(t.curveBasis),f=e.append("path").attr("d",l(a)).attr("id","edge"+H).attr("class","transition");let i="";if(t.getConfig().state.arrowMarkerAbsolute&&(i=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,i=i.replace(/\(/g,"\\("),i=i.replace(/\)/g,"\\)")),f.attr("marker-end","url("+i+"#"+d(m.db.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:C,y:p}=t.utils.calcLabelPosition(n.points),g=t.common$1.getRows(r.title);let c=0;const w=[];let y=0,S=0;for(let x=0;x<=g.length;x++){const h=s.append("text").attr("text-anchor","middle").text(g[x]).attr("x",C).attr("y",p+c),u=h.node().getBBox();y=Math.max(y,u.width),S=Math.min(S,u.x),t.log$1.info(u.x,C,p+c),c===0&&(c=h.node().getBBox().height,t.log$1.info("Title height",c,p)),w.push(h)}let E=c*g.length;if(g.length>1){const x=(g.length-1)*c*.5;w.forEach((h,u)=>h.attr("y",p+u*c-x)),E=c*g.length}const o=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",C-y/2-t.getConfig().state.padding/2).attr("y",p-E/2-t.getConfig().state.padding/2-3.5).attr("width",y+t.getConfig().state.padding).attr("height",E+t.getConfig().state.padding),t.log$1.info(o)}H++};let b;const N={},X=function(){},J=function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},Y=function(e,n,r,d){b=t.getConfig().state;const a=t.getConfig().securityLevel;let l;a==="sandbox"&&(l=t.select("#i"+n));const f=a==="sandbox"?t.select(l.nodes()[0].contentDocument.body):t.select("body"),i=a==="sandbox"?l.nodes()[0].contentDocument:document;t.log$1.debug("Rendering diagram "+e);const s=f.select(`[id='${n}']`);J(s);const C=d.db.getRootDoc();$(C,s,void 0,!1,f,i,d);const p=b.padding,g=s.node().getBBox(),c=g.width+p*2,w=g.height+p*2,y=c*1.75;t.configureSvgSize(s,w,y,b.useMaxWidth),s.attr("viewBox",`${g.x-b.padding} ${g.y-b.padding} `+c+" "+w)},I=e=>e?e.length*b.fontSizeFactor:1,$=(e,n,r,d,a,l,f)=>{const i=new T.Graph({compound:!0,multigraph:!0});let s,C=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){C=!1;break}r?i.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:C?1:b.edgeLengthFactor,nodeSep:C?1:50,isMultiGraph:!0}):i.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:C?1:b.edgeLengthFactor,nodeSep:C?1:50,ranker:"tight-tree",isMultiGraph:!0}),i.setDefaultEdgeLabel(function(){return{}}),f.db.extract(e);const p=f.db.getStates(),g=f.db.getRelations(),c=Object.keys(p);for(const o of c){const x=p[o];r&&(x.parentId=r);let h;if(x.doc){let u=n.append("g").attr("id",x.id).attr("class","stateGroup");h=$(x.doc,u,x.id,!d,a,l,f);{u=v(u,x,d);let B=u.node().getBBox();h.width=B.width,h.height=B.height+b.padding/2,N[x.id]={y:b.compositTitleSize}}}else h=M(n,x);if(x.note){const u={descriptions:[],id:x.id+"-note",note:x.note,type:"note"},B=M(n,u);x.note.position==="left of"?(i.setNode(h.id+"-note",B),i.setNode(h.id,h)):(i.setNode(h.id,h),i.setNode(h.id+"-note",B)),i.setParent(h.id,h.id+"-group"),i.setParent(h.id+"-note",h.id+"-group")}else i.setNode(h.id,h)}t.log$1.debug("Count=",i.nodeCount(),i);let w=0;g.forEach(function(o){w++,t.log$1.debug("Setting edge",o),i.setEdge(o.id1,o.id2,{relation:o,width:I(o.title),height:b.labelHeight*t.common$1.getRows(o.title).length,labelpos:"c"},"id"+w)}),z.layout(i),t.log$1.debug("Graph after layout",i.nodes());const y=n.node();i.nodes().forEach(function(o){o!==void 0&&i.node(o)!==void 0?(t.log$1.warn("Node "+o+": "+JSON.stringify(i.node(o))),a.select("#"+y.id+" #"+o).attr("transform","translate("+(i.node(o).x-i.node(o).width/2)+","+(i.node(o).y+(N[o]?N[o].y:0)-i.node(o).height/2)+" )"),a.select("#"+y.id+" #"+o).attr("data-x-shift",i.node(o).x-i.node(o).width/2),l.querySelectorAll("#"+y.id+" #"+o+" .divider").forEach(h=>{const u=h.parentElement;let B=0,k=0;u&&(u.parentElement&&(B=u.parentElement.getBBox().width),k=parseInt(u.getAttribute("data-x-shift"),10),Number.isNaN(k)&&(k=0)),h.setAttribute("x1",0-k+8),h.setAttribute("x2",B-k-8)})):t.log$1.debug("No Node "+o+": "+JSON.stringify(i.node(o)))});let S=y.getBBox();i.edges().forEach(function(o){o!==void 0&&i.edge(o)!==void 0&&(t.log$1.debug("Edge "+o.v+" -> "+o.w+": "+JSON.stringify(i.edge(o))),O(n,i.edge(o),i.edge(o).relation))}),S=y.getBBox();const E={id:r||"root",label:r||"root",width:0,height:0};return E.width=S.width+2*b.padding,E.height=S.height+2*b.padding,t.log$1.debug("Doc rendered",E,i),E},_={setConf:X,draw:Y},Z={parser:m.parser$1,db:m.db,renderer:_,styles:m.styles,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,m.db.clear()}};exports.diagram=Z;
|
package/dist/layers.BLvWGmxZ.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.Cp63Ydn2.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.BPXa6Xko.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.DJnnhy8m.js");require("./layers.8HXImnXe.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.BUT_cQlY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./layers.DyvnTlHi.js"),z=require("./layers.BLd2spTm.js"),i=require("./layers.DJnnhy8m.js"),j=require("./layers.DAF65Eyh.js");require("./layers.8HXImnXe.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.BZMHF27f.js
DELETED
package/dist/layers.Bfcc7TOH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("react"),e=require("./layers.D0GEGoV_.js"),I=require("./layers.CCqe9zp9.js"),F=require("react-i18next"),p=require("@mantine/core"),G=require("@tabler/icons-react");function H({imageContainerRef:a,editor:c,rootClassName:j=null,width:b="inherit",height:h="inherit",nodeKey:t,alignment:C,setModalOpen:u,previewSVG:S}){const w=n.useMemo(()=>S??"",[S]),[d,E]=n.useState(!1),{t:f}=F.useTranslation(),v=(r,m)=>{c.update(()=>{e.wo(null);const g=e.xo(t);return e.$isExcalidrawNode(g)&&g.setWidthAndHeight(r,m),!0})},M=()=>{e.deleteNode(c,t)};return i.jsx(e.ResizableContainer,{editor:c,isIcon:!1,isEmbed:!0,width:e.parseContainerSize(b),height:e.parseContainerSize(h),onResizeEnd:v,alignment:C,children:i.jsxs(p.Box,{className:"media-wrapper excaildraw",children:[i.jsxs("div",{className:"media-actions",children:[i.jsx(p.Tooltip,{label:f("editor.link.edit"),children:i.jsx(p.ActionIcon,{color:"gray","aria-label":"Settings",className:"media-action",variant:"default",size:24,onClick:()=>{u(!0)},children:i.jsx(G.IconEdit,{size:14})})}),i.jsx(e.AlignmentImage,{opened:d,setOpened:E,t:f,editor:c,nodeKey:t}),i.jsx(p.Tooltip,{label:f("editor.actions.delete"),children:i.jsx(p.ActionIcon,{color:"gray","aria-label":"Settings",className:"media-action",variant:"default",size:24,onClick:M,children:i.jsx(e.Icon,{name:"trash",size:"14"})})})]}),i.jsx(p.Box,{w:"100%",ref:r=>{r&&a&&(a.current=r)},className:j??"",dangerouslySetInnerHTML:{__html:w}})]})})}function V({nodeKey:a,data:c,width:j,height:b,alignment:h}){var q;const[t]=e.o(),C=e.a(),u=n.useMemo(()=>I.parseExcalidrawData(c),[c]),S=((q=u==null?void 0:u.elements)==null?void 0:q.length)===0&&!u.previewSVG,[w,d]=n.useState(S&&t.isEditable()),[E,f]=n.useState(!1),v=n.useRef(null),M=n.useRef(null),r=n.useRef(null),[m,g,O]=e.u(a),z=n.useCallback(s=>(m&&(s.preventDefault(),t.update(()=>{const o=e.xo(a);o&&o.remove()})),!1),[t,m,a]);n.useEffect(()=>{if(!C){m&&O();return}return e.U(t.registerCommand(e.se,s=>{const o=M.current,x=s.target;return o!==null&&o.contains(x)?(s.shiftKey||O(),g(!m),s.detail>1&&d(!0),!0):!1},e.zi),t.registerCommand(e.Oe,z,e.zi),t.registerCommand(e.we,z,e.zi))},[O,t,m,z,g,C]);const A=n.useCallback(()=>(d(!1),t.update(()=>{const s=e.xo(a);s&&s.remove()})),[t,a]),D=(s,o,x,N)=>t.update(()=>{const k=e.xo(a);e.$isExcalidrawNode(k)&&(s&&s.length>0||Object.keys(x).length>0?k.setData(JSON.stringify({appState:o,elements:s,files:x,previewSVG:N})):k.remove())}),{elements:l=[],files:T={},appState:$={},previewSVG:y}=u,R=n.useCallback(()=>{d(!1),f(!1),r.current=!1,(l==null?void 0:l.length)===0&&t.update(()=>{const s=e.xo(a);s&&s.remove()})},[t,a,l==null?void 0:l.length]),B=n.useCallback(()=>{r.current?f(!0):R()},[]);return i.jsxs(i.Fragment,{children:[i.jsx(I.ConfirmModal,{isCloseModal:E,confirmClose:R,setCloseModalOpen:f}),i.jsx(I.ExcalidrawModal,{initialElements:l,isEdited:r,initialFiles:T,initialAppState:$,isShown:w,onDelete:A,onClose:B,onSave:(s,o,x,N)=>{D(s,o,x,N),d(!1)},closeOnClickOutside:!1}),(l==null?void 0:l.length)&&i.jsx("div",{style:{display:"flex",justifyContent:h},children:i.jsx(H,{imageContainerRef:v,className:"image",width:j,height:b,editor:t,nodeKey:a,alignment:h,setModalOpen:d,previewSVG:y})})]})}exports.default=V;
|
package/dist/layers.BjtEPALX.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { f as o, p as a } from "./layers.CadrukAB.js";
|
|
2
|
-
import { f as t, a as e } from "./layers.BOWoLhye.js";
|
|
3
|
-
import { x as s } from "./layers.DzghPRf3.js";
|
|
4
|
-
import "lodash-es";
|
|
5
|
-
import "./layers.BJDrjORS.js";
|
|
6
|
-
import "./layers.D4T8fTcj.js";
|
|
7
|
-
import "./layers.D8vSQAh0.js";
|
|
8
|
-
const h = {
|
|
9
|
-
parser: a,
|
|
10
|
-
db: o,
|
|
11
|
-
renderer: e,
|
|
12
|
-
styles: t,
|
|
13
|
-
init: (r) => {
|
|
14
|
-
r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, s({ flowchart: { arrowMarkerAbsolute: r.arrowMarkerAbsolute } }), e.setConf(r.flowchart), o.clear(), o.setGen("gen-2");
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
h as diagram
|
|
19
|
-
};
|
package/dist/layers.BlT1aHiA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./layers.DJnnhy8m.js"),s=(e,r)=>n.Utils.lang.round(n.Color.parse(e)[r]);exports.channel=s;
|
package/dist/layers.Br5DTynl.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.Cp63Ydn2.js";
|
|
4
|
-
import { C as h, E as R } from "./layers.D_XM1OQx.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.CQR0Nl7I.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.D0GEGoV_.js"),u=require("./layers.CCqe9zp9.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.CgDb5aPr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./layers.DQIT2lCm.js"),t=require("./layers.DJnnhy8m.js"),_=require("./layers.BLd2spTm.js"),N=require("./layers.DAF65Eyh.js");require("./layers.8HXImnXe.js");require("lodash-es");require("./layers.Cyzu9PKQ.js");const k=s=>t.common$1.sanitizeText(s,t.getConfig());let w={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const D=function(s,o,f,i){const e=Object.keys(s);t.log$1.info("keys:",e),t.log$1.info(s),e.forEach(function(r){var l,c;const n=s[r],d={shape:"rect",id:n.id,domId:n.domId,labelText:k(n.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};o.setNode(n.id,d),$(n.classes,o,f,i,n.id),t.log$1.info("setNode",d)})},$=function(s,o,f,i,e){const r=Object.keys(s);t.log$1.info("keys:",r),t.log$1.info(s),r.filter(l=>s[l].parent==e).forEach(function(l){var c,n;const a=s[l],d=a.cssClasses.join(" "),g=t.getStylesFromArray(a.styles),p=a.label??a.id,u=0,y={labelStyle:g.labelStyle,shape:"class_box",labelText:k(p),classData:a,rx:u,ry:u,class:d,style:g.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((c=t.getConfig().flowchart)==null?void 0:c.padding)??((n=t.getConfig().class)==null?void 0:n.padding)};o.setNode(a.id,y),e&&o.setParent(a.id,e),t.log$1.info("setNode",y)})},E=function(s,o,f,i){t.log$1.info(s),s.forEach(function(e,r){var l,c;const n=e,a="",d={labelStyle:"",style:""},g=n.text,p=0,b={labelStyle:d.labelStyle,shape:"note",labelText:k(g),noteData:n,rx:p,ry:p,class:a,style:d.style,id:n.id,domId:n.id,tooltip:"",type:"note",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};if(o.setNode(n.id,b),t.log$1.info("setNode",b),!n.class||!(n.class in i))return;const y=f+r,x={id:`edgeNote${y}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(w.curve,t.curveLinear)};o.setEdge(n.id,n.class,x,y)})},A=function(s,o){const f=t.getConfig().flowchart;let i=0;s.forEach(function(e){var r;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:C(e.relation.type1),arrowTypeEnd:C(e.relation.type2),style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(f==null?void 0:f.curve,t.curveLinear)};if(t.log$1.info(l,e),e.style!==void 0){const c=t.getStylesFromArray(e.style);l.style=c.style,l.labelStyle=c.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((r=t.getConfig().flowchart)==null?void 0:r.htmlLabels)??t.getConfig().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(t.common$1.lineBreakRegex,`
|
|
2
|
-
`),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),o.setEdge(e.id1,e.id2,l,i)})},q=function(s){w={...w,...s}},M=async function(s,o,f,i){t.log$1.info("Drawing class - ",o);const e=t.getConfig().flowchart??t.getConfig().class,r=t.getConfig().securityLevel;t.log$1.info("config:",e);const l=(e==null?void 0:e.nodeSpacing)??50,c=(e==null?void 0:e.rankSpacing)??50,n=new _.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=i.db.getNamespaces(),d=i.db.getClasses(),g=i.db.getRelations(),p=i.db.getNotes();t.log$1.info(g),D(a,n,o,i),$(d,n,o,i),A(g,n),E(p,n,g.length+1,d);let u;r==="sandbox"&&(u=t.select("#i"+o));const b=r==="sandbox"?t.select(u.nodes()[0].contentDocument.body):t.select("body"),y=b.select(`[id="${o}"]`),x=b.select("#"+o+" g");if(await N.render(x,n,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",o),t.utils.insertTitle(y,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,i.db.getDiagramTitle()),t.setupGraphViewbox$1(n,y,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const S=r==="sandbox"?u.nodes()[0].contentDocument:document,L=S.querySelectorAll('[id="'+o+'"] .edgeLabel .label');for(const m of L){const T=m.getBBox(),h=S.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",T.width),h.setAttribute("height",T.height),m.insertBefore(h,m.firstChild)}}};function C(s){let o;switch(s){case 0:o="aggregation";break;case 1:o="extension";break;case 2:o="composition";break;case 3:o="dependency";break;case 4:o="lollipop";break;default:o="none"}return o}const I={setConf:q,draw:M},B={parser:v.parser$1,db:v.db,renderer:I,styles:v.styles,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,v.db.clear()}};exports.diagram=B;
|
package/dist/layers.CmxZ8EKk.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.D0GEGoV_.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;
|