@layers-app/editor 2.2.43 → 2.3.0
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 +16 -1
- package/dist/index.js +12 -12
- package/dist/{layers.DMD2Uy-b.js → layers.-2KfQ6RG.js} +1 -1
- package/dist/{layers.D_fmVaW-.js → layers.2VLsd23I.js} +1 -1
- package/dist/layers.3t60RULo.js +1314 -0
- package/dist/layers.5g-d1lPI.js +1019 -0
- package/dist/{layers.DB3g0uv9.js → layers.6fNZWRMy.js} +1 -1
- package/dist/{layers.9fzhTnHG.js → layers.6nxhuUZS.js} +1 -1
- package/dist/{layers.Dv5cum-u.js → layers.77ToS0vJ.js} +1 -1
- package/dist/{layers.UgwPqXW8.js → layers.7oPXw6se.js} +1 -1
- package/dist/{layers.DquK_j31.js → layers.8aC_7H6s.js} +1 -1
- package/dist/{layers.DVH0bxj2.js → layers.9_5gtlo0.js} +1 -1
- package/dist/{layers.D9NG4hfd.js → layers.A2b0zfpv.js} +1 -1
- package/dist/{layers.CtmFs842.js → layers.AHmwp-MB.js} +1 -1
- package/dist/{layers.Q2dvyyyS.js → layers.B-EeOsPN.js} +1 -1
- package/dist/{layers.BaSqDCUi.js → layers.B-knJAmg.js} +1 -1
- package/dist/{layers.L0lr9_dy.js → layers.B0YPk_J2.js} +1 -1
- package/dist/layers.B0aoB6yM.js +1 -0
- package/dist/{layers.BcrIK8qs.js → layers.B0c5OY_G.js} +1 -1
- package/dist/{layers.DqkcR9Cj.js → layers.B1Asn8n_.js} +3 -3
- package/dist/{layers.BvTr3OqB.js → layers.B1QlqLSe.js} +1 -1
- package/dist/{layers.CIjbcwec.js → layers.B1YHDbg8.js} +1 -1
- package/dist/{layers.t9ki07H9.js → layers.B4dgRxLi.js} +8 -8
- package/dist/{layers.BzLOwAv9.js → layers.B4n7r8Ul.js} +1 -1
- package/dist/{layers.CzcULpYV.js → layers.B5AMuW0E.js} +1 -1
- package/dist/{layers.CW1tyuRJ.js → layers.B5R_HMQi.js} +33 -33
- package/dist/{layers.BHmZJxfg.js → layers.B7fR53su.js} +1 -1
- package/dist/{layers.DMrcq2Gr.js → layers.B8XK-8I-.js} +1 -1
- package/dist/{layers.T7eDGkWl.js → layers.B9Xz7B4H.js} +1 -1
- package/dist/{layers.CKVfFH8C.js → layers.BBT4Tvg5.js} +1 -1
- package/dist/{layers.C_qUkVxS.js → layers.BC_YpOSp.js} +1 -1
- package/dist/{layers.ENr5T7WS.js → layers.BD7kYiWS.js} +1 -1
- package/dist/{layers.BHu_YyDc.js → layers.BDQtN1aD.js} +1 -1
- package/dist/{layers.-wUVh76U.js → layers.BExC2g6w.js} +1 -1
- package/dist/{layers.C9Sr1U5-.js → layers.BFreQdwW.js} +13 -13
- package/dist/{layers.I-tHkE95.js → layers.BJkqxsDC.js} +1 -1
- package/dist/{layers.Con-Dh2E.js → layers.BKvhj3Jc.js} +3 -3
- package/dist/{layers.C4I6DUMy.js → layers.BKyKCEyP.js} +24 -24
- package/dist/{layers.BPiBAWd5.js → layers.BPdavEfb.js} +1 -1
- package/dist/{layers.D78A28yU.js → layers.BQjo-s-b.js} +4104 -4138
- package/dist/{layers.DoHU4UID.js → layers.BQy5VO07.js} +6 -6
- package/dist/{layers.CxOau-hs.js → layers.BSWJm3U8.js} +1 -1
- package/dist/{layers.DH3ePdsz.js → layers.BWD2tONt.js} +2 -2
- package/dist/{layers.hGNauRnS.js → layers.BaZ9oGNz.js} +4 -4
- package/dist/{layers.Cglb20ve.js → layers.BatQCiGf.js} +11 -11
- package/dist/{layers.DbbksUuA.js → layers.BccLIbKe.js} +1 -1
- package/dist/{layers.D1YO6sUx.js → layers.BfWe9IcW.js} +1 -1
- package/dist/layers.Bg7BQcmt.js +31 -0
- package/dist/{layers.0cO0ixPk.js → layers.Bgd7myyy.js} +1 -1
- package/dist/{layers.CcY8SYVh.js → layers.BhvmN99n.js} +1 -1
- package/dist/{layers.CjPHxy5F.js → layers.Bi4--lcT.js} +1 -1
- package/dist/{layers.B5iDAMC-.js → layers.Bj2_ntq3.js} +3 -3
- package/dist/{layers.D2uJTLQD.js → layers.Blhb8ubC.js} +1 -1
- package/dist/{layers.DXwUwZdz.js → layers.Bnjo7X5G.js} +31 -31
- package/dist/{layers.B3Z00oIe.js → layers.Bnozyuub.js} +1 -1
- package/dist/{layers.w5M_mTV4.js → layers.Bptrc7aE.js} +27 -27
- package/dist/{layers.BJCeJUWZ.js → layers.BrPGpTKD.js} +14568 -14351
- package/dist/{layers.BaFHpWlD.js → layers.Brsx_95a.js} +1 -1
- package/dist/{layers.B2oAQIVT.js → layers.Bs8dWBby.js} +1 -1
- package/dist/{layers.BU3693bQ.js → layers.Bsr7C4ON.js} +1 -1
- package/dist/{layers.FKGuICkq.js → layers.BtXZCoH_.js} +39 -39
- package/dist/{layers.DsxjlRxg.js → layers.BtXqThYa.js} +1 -1
- package/dist/layers.Bwc-8Isq.js +6 -0
- package/dist/{layers.DMmvRDDM.js → layers.Bx77WE5O.js} +1 -1
- package/dist/{layers.CF_7ZzFo.js → layers.C-78wB0V.js} +3 -3
- package/dist/{layers.C3I87c35.js → layers.C1rqQip5.js} +1 -1
- package/dist/{layers.B4oJOgaL.js → layers.C3_GElaJ.js} +1 -1
- package/dist/{layers.joa0U6F3.js → layers.C53iq2Ma.js} +1 -1
- package/dist/{layers.DKbpSRnS.js → layers.C6LbKv-M.js} +2 -2
- package/dist/{layers.Da0nsXuF.js → layers.C6ueC3Z0.js} +1 -1
- package/dist/{layers.DbYK2pEp.js → layers.C71O9vAp.js} +1 -1
- package/dist/{layers.BhBT87wa.js → layers.C7b_RmTv.js} +1 -1
- package/dist/{layers.BnPxqyuX.js → layers.C8Tfd7sP.js} +1 -1
- package/dist/{layers.DTvOLDFJ.js → layers.C8WbGo3j.js} +1 -1
- package/dist/{layers.Co188iOY.js → layers.C9Lko7YH.js} +1 -1
- package/dist/{layers.BjPDJ-Kw.js → layers.CAFSzILX.js} +21 -21
- package/dist/layers.CCHvuvhF.js +8 -0
- package/dist/{layers.nTJYG5Fr.js → layers.CFAdy1gb.js} +1 -1
- package/dist/{layers.D3fr8EC0.js → layers.CFL3W3X8.js} +2 -2
- package/dist/{layers.CUHCWsr6.js → layers.CFcETIOb.js} +1 -1
- package/dist/{layers.Dbri2FL3.js → layers.CIvcS__9.js} +1 -1
- package/dist/{layers.mOqn0HZL.js → layers.COTQMo6A.js} +1 -1
- package/dist/{layers.rnn88Z_F.js → layers.CQ7hsV-G.js} +1 -1
- package/dist/{layers.skYBIGuA.js → layers.CRRnsu0U.js} +1 -1
- package/dist/layers.CSJKF8Yc.js +1 -0
- package/dist/{layers.0mM7kmYM.js → layers.CT2g1VRg.js} +1 -1
- package/dist/{layers.e5-5q9GW.js → layers.CUGBlmw8.js} +1 -1
- package/dist/{layers.BN7XA9Mz.js → layers.CUV2M_pU.js} +1 -1
- package/dist/{layers.qZ_fMp-N.js → layers.CWkQixNL.js} +1 -1
- package/dist/{layers.Dwfq9cNX.js → layers.CXsKBYuP.js} +1 -1
- package/dist/{layers.DWCTsdNx.js → layers.CZVAUi9T.js} +1 -1
- package/dist/{layers.Dp9QA0Dz.js → layers.CZWgMRsn.js} +1 -1
- package/dist/layers.Ca29Mcjy.js +1 -0
- package/dist/{layers.CxfeVqFB.js → layers.CacnnrTU.js} +1 -1
- package/dist/{layers.5e-XI3nh.js → layers.CbuDjZaw.js} +1 -1
- package/dist/{layers.DFiSzcgX.js → layers.CcwJpgwT.js} +4 -4
- package/dist/{layers.CUGnkSgl.js → layers.CfUup9qJ.js} +1 -1
- package/dist/{layers.R2p30D-p.js → layers.CgjZSo5b.js} +1 -1
- package/dist/{layers.BLtR2kcw.js → layers.ChRuHm3l.js} +1 -1
- package/dist/{layers.phLsmtCV.js → layers.Chpc9546.js} +1 -1
- package/dist/{layers.B07DqX4u.js → layers.Ciq1sahM.js} +1 -1
- package/dist/{layers.DW5NMC_Y.js → layers.CkpDbJMJ.js} +1 -1
- package/dist/{layers.CqOEfQFk.js → layers.ClDrIPRU.js} +1 -1
- package/dist/{layers.Dib9h9Y9.js → layers.CmupXZHN.js} +1 -1
- package/dist/{layers.ByPB1YI0.js → layers.Cn8CWsBB.js} +2 -2
- package/dist/{layers.CyJwHXzH.js → layers.Cr0gsM_j.js} +6 -6
- package/dist/{layers.DXvR0Ic3.js → layers.CrRPE221.js} +1 -1
- package/dist/{layers.BRzmQpbn.js → layers.CsN1TpE_.js} +1 -1
- package/dist/{layers.03AG_Ahp.js → layers.CvePRtuZ.js} +1 -1
- package/dist/{layers.BfM6qako.js → layers.CwAI9EMJ.js} +95 -95
- package/dist/{layers.BcB0Nlwg.js → layers.CwLijGjy.js} +5 -5
- package/dist/{layers.CMJ7A9ld.js → layers.CxcPHDlk.js} +1 -1
- package/dist/layers.CyJLYOzo.js +1 -0
- package/dist/{layers.Btm6c1FD.js → layers.CyqBb3la.js} +1 -1
- package/dist/layers.CzQlolTW.js +1 -0
- package/dist/{layers.Cim2gy1q.js → layers.CzSHWBJE.js} +1 -1
- package/dist/{layers.Bx4TPdVb.js → layers.CztSiz59.js} +1 -1
- package/dist/{layers.BZ-_wuxN.js → layers.D1ALzL8l.js} +1 -1
- package/dist/{layers.CFWmVRYf.js → layers.D1q9XEqC.js} +1 -1
- package/dist/{layers.DGA33SjL.js → layers.D2P7q6AR.js} +2 -2
- package/dist/{layers.Cu4zCXaq.js → layers.D37qejd1.js} +4 -4
- package/dist/{layers.DO67bAdi.js → layers.D53pVbAt.js} +1 -1
- package/dist/layers.D5gltjTL.js +1163 -0
- package/dist/{layers.OZMdOIeE.js → layers.D8s5zGyA.js} +4 -4
- package/dist/{layers.o99xgyrj.js → layers.DBQznnML.js} +1 -1
- package/dist/layers.DGptlsw9.js +8 -0
- package/dist/{layers.Cb8w7m3T.js → layers.DIDIuUgi.js} +1 -1
- package/dist/{layers.DXGbCu9s.js → layers.DIk_oySe.js} +1 -1
- package/dist/layers.DLBYO9Pf.js +7 -0
- package/dist/{layers.DS2xWw5u.js → layers.DLaija6u.js} +1 -1
- package/dist/{layers.CLGJqlQC.js → layers.DLsrdKEz.js} +1 -1
- package/dist/{layers.DHLBQn4i.js → layers.DLyk5obs.js} +3 -3
- package/dist/{layers.D7IERGZB.js → layers.DNSrh1pA.js} +1 -1
- package/dist/{layers.B0xERJEP.js → layers.DO1gXiNA.js} +1 -1
- package/dist/layers.DOK4tUdd.js +90 -0
- package/dist/{layers.GSbMAxhC.js → layers.DP7UYubA.js} +1 -1
- package/dist/{layers.4Bvndpod.js → layers.DPlTEtvi.js} +1 -1
- package/dist/{layers.Dl_n_LxZ.js → layers.DQUdAZyr.js} +25 -25
- package/dist/{layers.sZWWruWl.js → layers.DRN4BpGT.js} +1 -1
- package/dist/{layers.CnLvIdDn.js → layers.DRoyt9-1.js} +4 -4
- package/dist/{layers.C4lKVCKG.js → layers.DUrkRJKo.js} +1 -1
- package/dist/{layers.Xh-WVbYL.js → layers.DX9VTWiX.js} +1 -1
- package/dist/{layers.6IPXZlHV.js → layers.DY8_UsFK.js} +137 -137
- package/dist/{layers.DZNF4hVk.js → layers.DZ-JaYP3.js} +7 -7
- package/dist/{layers.pp1C1Tmj.js → layers.DZDZ3CuA.js} +1 -1
- package/dist/{layers.DtaKuCjp.js → layers.DZZUeo4N.js} +1 -1
- package/dist/{layers.hUNsvmkE.js → layers.DZqU-iL6.js} +40 -40
- package/dist/{layers.Cm4ScAcA.js → layers.DaHHbgHM.js} +1 -1
- package/dist/{layers.BbMtfvwE.js → layers.DaLjgos9.js} +1 -1
- package/dist/{layers.D4WHc1zo.js → layers.DbcVW57C.js} +1 -1
- package/dist/{layers.Dc7NnfUG.js → layers.DbdtbmtQ.js} +1 -1
- package/dist/{layers.DMbmaXEp.js → layers.DcxJ1-U9.js} +1 -1
- package/dist/layers.DeT0xAwz.js +84 -0
- package/dist/{layers.DzZcev45.js → layers.Df3tBKAI.js} +1 -1
- package/dist/{layers.hkL7RA_5.js → layers.DhUwAghN.js} +1 -1
- package/dist/{layers.CJO8izOl.js → layers.Dj860md7.js} +1 -1
- package/dist/{layers.CwQebQGo.js → layers.DkYYvaOJ.js} +2 -2
- package/dist/{layers.B_bY10SW.js → layers.Dn4qgJFc.js} +2 -2
- package/dist/{layers.C_48WisB.js → layers.Dodjwwv6.js} +3 -3
- package/dist/{layers.zw0Kaz0i.js → layers.DohiIE20.js} +1 -1
- package/dist/{layers.Bdo184oK.js → layers.DpKYGJRZ.js} +2 -2
- package/dist/{layers.6hbGirUz.js → layers.DsWcmm1l.js} +1 -1
- package/dist/{layers.D9ajcZP1.js → layers.DvSTgxkV.js} +1 -1
- package/dist/{layers.CnHlffpI.js → layers.Dvv8fKKk.js} +1 -1
- package/dist/{layers.v9an1lHW.js → layers.DwPIhine.js} +1 -1
- package/dist/{layers.DmM2jU0O.js → layers.DwS8V2Or.js} +1 -1
- package/dist/{layers.Bk5Uaw8R.js → layers.DxABmn5O.js} +1 -1
- package/dist/layers.Dxr2o7ON.js +1 -0
- package/dist/{layers.CWyLzhzU.js → layers.DyciwgGK.js} +1 -1
- package/dist/{layers.BxBOl4Dl.js → layers.F57MyVA9.js} +1 -1
- package/dist/{layers.zzb4BOcI.js → layers.FzqiVsy_.js} +1 -1
- package/dist/{layers.BudxiKeS.js → layers.HEL5QDoC.js} +1 -1
- package/dist/{layers.BSzAtyQb.js → layers.HhdqZtv5.js} +1 -1
- package/dist/{layers.D2pb9Wvr.js → layers.IutlLti9.js} +1 -1
- package/dist/{layers.CKtCjDB5.js → layers.JZ7AxwMh.js} +1 -1
- package/dist/{layers.D_dNQ2RW.js → layers.LGDbkgsv.js} +42 -42
- package/dist/{layers.BdpJh8Oo.js → layers.LtQ1yaSI.js} +1 -1
- package/dist/{layers.C2WnW5up.js → layers.SM9QTuDI.js} +16 -16
- package/dist/{layers.D3UpXEwL.js → layers.U7NY32uM.js} +1 -1
- package/dist/{layers.BM0IeEyx.js → layers.U8mTjpv_.js} +1 -1
- package/dist/{layers.CS7HWB4X.js → layers.WQRYkQdm.js} +15 -15
- package/dist/{layers.C5-WLmjg.js → layers.XCBehSH1.js} +1 -1
- package/dist/{layers.pQg8FbPj.js → layers.ZbGNGWJD.js} +12 -12
- package/dist/{layers.B5iuTZ1t.js → layers.Zmw0un-f.js} +1 -1
- package/dist/{layers.Bdnbq1Fc.js → layers.aLsmNBld.js} +3 -3
- package/dist/{layers.Dm1yBfDi.js → layers.avpB9JpP.js} +1 -1
- package/dist/{layers.CPHBPK8k.js → layers.cnMJlmUn.js} +1 -1
- package/dist/{layers.Bxvsg8Mb.js → layers.dL8A7U4Q.js} +1 -1
- package/dist/{layers.STJilcsA.js → layers.eYOpCcnf.js} +1 -1
- package/dist/{layers.CemDejcL.js → layers.ehSnv8t3.js} +1 -1
- package/dist/{layers.Bo56cnSy.js → layers.fpcqoFdd.js} +1 -1
- package/dist/{layers.D_KUnC5f.js → layers.gG-4BCod.js} +1 -1
- package/dist/{layers.CIebvJty.js → layers.iJv3YGd2.js} +1 -1
- package/dist/{layers.n-WUmPth.js → layers.iT9k4umn.js} +1 -1
- package/dist/{layers.BswN_MdX.js → layers.iXNkI0ZC.js} +1 -1
- package/dist/{layers.BjkFiCls.js → layers.mlObVGIf.js} +5 -5
- package/dist/{layers.B7XHIy_4.js → layers.oaAarQby.js} +1 -1
- package/dist/{layers.BSDW_YyL.js → layers.oeHgntpN.js} +1 -1
- package/dist/{layers.DC3-RC1l.js → layers.pRgndjxw.js} +1 -1
- package/dist/{layers.DRtT_PXy.js → layers.tZA_LmJa.js} +1 -1
- package/dist/{layers.CnPbRZ5g.js → layers.teIuFApS.js} +1 -1
- package/dist/{layers.DiAn5oCP.js → layers.trRvrSLF.js} +1 -1
- package/dist/{layers.BnUlk4VQ.js → layers.visFusIB.js} +2982 -4133
- package/dist/{layers.CxqZJUKb.js → layers.wOUIpHWS.js} +1 -1
- package/dist/{layers.CjwpDgRI.js → layers.xFbuP3DI.js} +1 -1
- package/dist/{layers.BzQjss-Y.js → layers.xI6XwkCk.js} +1 -1
- package/dist/{layers.CQ-YrAtS.js → layers.xLIBX5yr.js} +1 -1
- package/dist/{layers.0PDCLAB9.js → layers.y9CU_epE.js} +1 -1
- package/dist/{layers.BRYVeXtX.js → layers.ywa822S7.js} +1 -1
- package/dist/layers.z2kEcNVH.js +5 -0
- package/package.json +2 -1
- package/dist/layers.BGELWsp6.js +0 -6
- package/dist/layers.BbPiDwK6.js +0 -8
- package/dist/layers.Bn8ENbPC.js +0 -1
- package/dist/layers.By6Y9awO.js +0 -1313
- package/dist/layers.CPNJ-TZg.js +0 -5
- package/dist/layers.CasHcfAK.js +0 -84
- package/dist/layers.DQGVM1KB.js +0 -1
- package/dist/layers.DRRyMIft.js +0 -1
- package/dist/layers.Ddrl9HG1.js +0 -96
- package/dist/layers.Dl5fPqLs.js +0 -1
- package/dist/layers.Dsw7pDbX.js +0 -748
package/dist/layers.CPNJ-TZg.js
DELETED
package/dist/layers.CasHcfAK.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { w as ln, c as H } from "./layers.DLwuMfdd.js";
|
|
2
|
-
import { B as rn, D as M, E as D, F as an, G as y, H as on, I as j, J as _, K as un, L as t, M as sn, N as tn, O as fn } from "./layers.BnUlk4VQ.js";
|
|
3
|
-
function cn(l) {
|
|
4
|
-
return l.innerRadius;
|
|
5
|
-
}
|
|
6
|
-
function yn(l) {
|
|
7
|
-
return l.outerRadius;
|
|
8
|
-
}
|
|
9
|
-
function gn(l) {
|
|
10
|
-
return l.startAngle;
|
|
11
|
-
}
|
|
12
|
-
function mn(l) {
|
|
13
|
-
return l.endAngle;
|
|
14
|
-
}
|
|
15
|
-
function pn(l) {
|
|
16
|
-
return l && l.padAngle;
|
|
17
|
-
}
|
|
18
|
-
function dn(l, h, O, E, v, A, J, r) {
|
|
19
|
-
var q = O - l, i = E - h, n = J - v, m = r - A, a = m * q - n * i;
|
|
20
|
-
if (!(a * a < y))
|
|
21
|
-
return a = (n * (h - A) - m * (l - v)) / a, [l + a * q, h + a * i];
|
|
22
|
-
}
|
|
23
|
-
function W(l, h, O, E, v, A, J) {
|
|
24
|
-
var r = l - O, q = h - E, i = (J ? A : -A) / j(r * r + q * q), n = i * q, m = -i * r, a = l + n, s = h + m, f = O + n, c = E + m, K = (a + f) / 2, o = (s + c) / 2, p = f - a, g = c - s, R = p * p + g * g, T = v - A, P = a * c - f * s, B = (g < 0 ? -1 : 1) * j(tn(0, T * T * R - P * P)), F = (P * g - p * B) / R, G = (-P * p - g * B) / R, w = (P * g + p * B) / R, d = (-P * p + g * B) / R, x = F - K, e = G - o, u = w - K, L = d - o;
|
|
25
|
-
return x * x + e * e > u * u + L * L && (F = w, G = d), {
|
|
26
|
-
cx: F,
|
|
27
|
-
cy: G,
|
|
28
|
-
x01: -n,
|
|
29
|
-
y01: -m,
|
|
30
|
-
x11: F * (v / T - 1),
|
|
31
|
-
y11: G * (v / T - 1)
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function vn() {
|
|
35
|
-
var l = cn, h = yn, O = H(0), E = null, v = gn, A = mn, J = pn, r = null, q = ln(i);
|
|
36
|
-
function i() {
|
|
37
|
-
var n, m, a = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - an, c = A.apply(this, arguments) - an, K = un(c - f), o = c > f;
|
|
38
|
-
if (r || (r = n = q()), s < a && (m = s, s = a, a = m), !(s > y)) r.moveTo(0, 0);
|
|
39
|
-
else if (K > on - y)
|
|
40
|
-
r.moveTo(s * M(f), s * D(f)), r.arc(0, 0, s, f, c, !o), a > y && (r.moveTo(a * M(c), a * D(c)), r.arc(0, 0, a, c, f, o));
|
|
41
|
-
else {
|
|
42
|
-
var p = f, g = c, R = f, T = c, P = K, B = K, F = J.apply(this, arguments) / 2, G = F > y && (E ? +E.apply(this, arguments) : j(a * a + s * s)), w = _(un(s - a) / 2, +O.apply(this, arguments)), d = w, x = w, e, u;
|
|
43
|
-
if (G > y) {
|
|
44
|
-
var L = sn(G / a * D(F)), z = sn(G / s * D(F));
|
|
45
|
-
(P -= L * 2) > y ? (L *= o ? 1 : -1, R += L, T -= L) : (P = 0, R = T = (f + c) / 2), (B -= z * 2) > y ? (z *= o ? 1 : -1, p += z, g -= z) : (B = 0, p = g = (f + c) / 2);
|
|
46
|
-
}
|
|
47
|
-
var N = s * M(p), S = s * D(p), C = a * M(T), Q = a * D(T);
|
|
48
|
-
if (w > y) {
|
|
49
|
-
var U = s * M(g), V = s * D(g), X = a * M(R), Y = a * D(R), I;
|
|
50
|
-
if (K < rn)
|
|
51
|
-
if (I = dn(N, S, X, Y, U, V, C, Q)) {
|
|
52
|
-
var Z = N - I[0], $ = S - I[1], k = U - I[0], b = V - I[1], nn = 1 / D(fn((Z * k + $ * b) / (j(Z * Z + $ * $) * j(k * k + b * b))) / 2), en = j(I[0] * I[0] + I[1] * I[1]);
|
|
53
|
-
d = _(w, (a - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
|
|
54
|
-
} else
|
|
55
|
-
d = x = 0;
|
|
56
|
-
}
|
|
57
|
-
B > y ? x > y ? (e = W(X, Y, N, S, s, x, o), u = W(U, V, C, Q, s, x, o), r.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? r.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (r.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, s, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), r.arc(u.cx, u.cy, x, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (r.moveTo(N, S), r.arc(0, 0, s, p, g, !o)) : r.moveTo(N, S), !(a > y) || !(P > y) ? r.lineTo(C, Q) : d > y ? (e = W(C, Q, U, V, a, -d, o), u = W(N, S, X, Y, a, -d, o), r.lineTo(e.cx + e.x01, e.cy + e.y01), d < w ? r.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (r.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(e.y11, e.x11), !o), r.arc(0, 0, a, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), r.arc(u.cx, u.cy, d, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : r.arc(0, 0, a, T, R, o);
|
|
58
|
-
}
|
|
59
|
-
if (r.closePath(), n) return r = null, n + "" || null;
|
|
60
|
-
}
|
|
61
|
-
return i.centroid = function() {
|
|
62
|
-
var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, m = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - rn / 2;
|
|
63
|
-
return [M(m) * n, D(m) * n];
|
|
64
|
-
}, i.innerRadius = function(n) {
|
|
65
|
-
return arguments.length ? (l = typeof n == "function" ? n : H(+n), i) : l;
|
|
66
|
-
}, i.outerRadius = function(n) {
|
|
67
|
-
return arguments.length ? (h = typeof n == "function" ? n : H(+n), i) : h;
|
|
68
|
-
}, i.cornerRadius = function(n) {
|
|
69
|
-
return arguments.length ? (O = typeof n == "function" ? n : H(+n), i) : O;
|
|
70
|
-
}, i.padRadius = function(n) {
|
|
71
|
-
return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : H(+n), i) : E;
|
|
72
|
-
}, i.startAngle = function(n) {
|
|
73
|
-
return arguments.length ? (v = typeof n == "function" ? n : H(+n), i) : v;
|
|
74
|
-
}, i.endAngle = function(n) {
|
|
75
|
-
return arguments.length ? (A = typeof n == "function" ? n : H(+n), i) : A;
|
|
76
|
-
}, i.padAngle = function(n) {
|
|
77
|
-
return arguments.length ? (J = typeof n == "function" ? n : H(+n), i) : J;
|
|
78
|
-
}, i.context = function(n) {
|
|
79
|
-
return arguments.length ? (r = n ?? null, i) : r;
|
|
80
|
-
}, i;
|
|
81
|
-
}
|
|
82
|
-
export {
|
|
83
|
-
vn as a
|
|
84
|
-
};
|
package/dist/layers.DQGVM1KB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./layers.Ddrl9HG1.js"),s=(e,r)=>n.Utils.lang.round(n.Color.parse(e)[r]);exports.channel=s;
|
package/dist/layers.DRRyMIft.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("react"),O=require("react-i18next"),P=require("@lexical/react/LexicalComposerContext"),y=require("@mantine/core"),v=require("lexical"),o=require("./layers.By6Y9awO.js"),_=require("@layers-app/shared"),q=require("@lexical/react/useLexicalEditable"),W=require("@mantine/hooks");require("@lexical/react/LexicalDecoratorBlockNode");require("@lexical/utils");require("@lexical/mark");require("@lexical/code");require("@lexical/selection");require("react-dom");require("@lexical/react/LexicalErrorBoundary");require("@lexical/react/LexicalBlockWithAlignableContents");require("@mantine/notifications");function fe(e,a){const i=document.createElement("a");i.href=e,i.download=a,i.rel="noopener",document.body.appendChild(i),i.click(),i.remove()}function z(e){try{const i=new URL(e,window.location.origin).pathname.split("/").pop()||"image";return i.includes(".")?i:`${i}.png`}catch{return"image"}}async function F(e,a){const i=await fetch(e);if(!i.ok)throw new Error("fetch failed");const s=await i.blob(),c=URL.createObjectURL(s);try{fe(c,a)}finally{setTimeout(()=>URL.revokeObjectURL(c),0)}}function ne({opened:e,onOpenChange:a,t:i,onDownload:s,onDelete:c}){return n.jsxs(y.Menu,{opened:e,onChange:a,transitionProps:o.animationMenu,shadow:"md",position:"bottom-start",offset:4,withinPortal:!0,closeOnItemClick:!0,children:[n.jsx(y.Menu.Target,{children:n.jsx(o.ActionIcon,{label:i("editor.toolbar.more"),icon:o.K1,iconColor:"var(--mantine-color-gray-text)","aria-label":i("editor.toolbar.more")})}),n.jsxs(y.Menu.Dropdown,{p:4,w:164,onMouseDown:l=>l.preventDefault(),children:[n.jsx(y.Menu.Item,{leftSection:n.jsx(y.Flex,{align:"center",justify:"center",c:"gray.6",children:n.jsx(o.HugeiconsIcon,{icon:o.Tm,size:16})}),onClick:l=>{l.stopPropagation(),s()},children:i("editor.gallery.download")}),n.jsx(y.Menu.Item,{color:"red",leftSection:n.jsx(y.Flex,{align:"center",justify:"center",c:"red.6",children:n.jsx(o.HugeiconsIcon,{icon:o.lg,size:16})}),onClick:l=>{l.stopPropagation(),c()},children:i("editor.contextMenu.delete")})]})]})}const ie=({t:e,src:a,setShown:i,id:s})=>{const[c,{open:l,close:h}]=W.useDisclosure(!1),f=o.useCanDownload(),p=r.useMemo(()=>[{id:!s||s==="0"?"":s,Url:a??"",contentType:"image/*",originalFileName:"",fileSize:0,storageType:"",storagePath:"",fileName:"",parentType:"",parentId:"",ownerId:"",createdAt:new Date,updatedAt:new Date,version:0,deleted:!1,deletedAt:new Date}],[a,s]),g=x=>{x?l():h()};return n.jsxs(n.Fragment,{children:[n.jsx(_.AttachmentsGalleryModal,{opened:c,onOpenChange:g,attachments:p,allowDownload:f}),n.jsx(o.ActionIcon,{label:e("editor.image.preview"),icon:o.gn,iconColor:"var(--mantine-color-gray-text)","aria-label":e("editor.image.preview"),onClick:()=>{i(!1),l()}})]})},xe=({nodeKey:e,src:a})=>{const[i]=P.useLexicalComposerContext(),s=q.useLexicalEditable(),[c,l]=r.useState(!1),[h,f]=r.useState(!1),{t:p}=O.useTranslation(),g=r.useCallback(()=>{i.update(()=>{const j=v.$getNodeByKey(e);o.$isImageNode(j)&&j.remove()})},[i,e]),x=r.useCallback(async()=>{if(a)try{await F(a,z(a))}catch{}},[a]);return n.jsxs("div",{className:`media-actions ${s?"":"media-actions--readonly"}`,children:[n.jsx(ie,{t:p,src:a,setShown:()=>{}}),s&&n.jsxs(n.Fragment,{children:[n.jsx(o.NodeAlignmentMenu,{opened:c,setOpened:l,t:p,editor:i,nodeKey:e,setShown:()=>{}}),n.jsx(ne,{opened:h,onOpenChange:f,t:p,onDownload:()=>void x(),onDelete:g})]})]})},be=()=>{};function we({nodeKey:e,src:a,id:i}){const{t:s}=O.useTranslation(),[c]=P.useLexicalComposerContext(),l=q.useLexicalEditable(),[h,f]=r.useState(!1),[p,g]=r.useState(!1),x=r.useCallback(()=>{g(!1),c.update(()=>{const I=v.$getNodeByKey(e);if(!o.$isImageNode(I))return;const N=I.getParent();o.$isImageOverlayWrapperNode(N)?N.remove():I.remove()})},[c,e]),j=r.useCallback(async()=>{if(a)try{await F(a,z(a))}catch{}},[a]);return n.jsxs("div",{className:"media-actions visible",style:{position:"absolute",top:10,right:10,zIndex:10,pointerEvents:"auto",display:"flex",gap:4},onClick:I=>I.stopPropagation(),children:[n.jsx(ie,{t:s,src:a,setShown:be,id:i}),l&&n.jsxs(n.Fragment,{children:[n.jsx(o.NodeAlignmentMenu,{opened:h,setOpened:f,t:s,editor:c,nodeKey:e}),n.jsx(ne,{opened:p,onOpenChange:g,t:s,onDownload:()=>void j(),onDelete:x})]})]})}function ye({nodeKey:e,src:a,id:i}){const{t:s}=O.useTranslation(),[c]=P.useLexicalComposerContext(),l=q.useLexicalEditable(),h=o.useCanDownload(),[f,{open:p,close:g}]=W.useDisclosure(!1),[x,{open:j,close:I}]=W.useDisclosure(!1),N=r.useMemo(()=>[{id:!i||i==="0"?"":i,Url:a??"",contentType:"image/*",originalFileName:"",fileSize:0,storageType:"",storagePath:"",fileName:"",parentType:"",parentId:"",ownerId:"",createdAt:new Date,updatedAt:new Date,version:0,deleted:!1,deletedAt:new Date}],[a,i]),D=()=>{g(),j()},S=r.useCallback(async()=>{if(g(),!!a)try{await F(a,z(a))}catch{}},[a,g]),m=r.useCallback(()=>{g(),c.update(()=>{const b=v.$getNodeByKey(e);o.$isImageNode(b)&&b.remove()})},[c,e,g]);return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"image-touch-actions",style:{position:"absolute",top:8,right:8,zIndex:10,pointerEvents:"auto"},onClick:b=>b.stopPropagation(),children:n.jsx(o.ActionIcon,{label:s("editor.toolbar.more"),icon:o.O1,iconColor:"var(--mantine-color-gray-text)","aria-label":s("editor.toolbar.more"),onClick:p})}),n.jsx(_.AttachmentsGalleryModal,{opened:x,onOpenChange:b=>b?j():I(),attachments:N,allowDownload:h}),n.jsx(o.MobileDrawer,{opened:f,onClose:g,title:s("editor.image.mobileActions"),children:n.jsxs(y.Stack,{gap:4,p:0,children:[n.jsx(y.Button,{type:"button",variant:"subtle",color:"gray",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:D,leftSection:n.jsx(o.HugeiconsIcon,{icon:o.gn,size:16,color:"var(--mantine-color-dimmed)"}),children:s("editor.image.previewFullScreen")}),h&&n.jsx(y.Button,{type:"button",variant:"subtle",color:"gray",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:()=>void S(),leftSection:n.jsx(o.HugeiconsIcon,{icon:o.Tm,size:16,color:"var(--mantine-color-dimmed)"}),children:s("editor.gallery.download")}),l&&n.jsx(y.Button,{type:"button",variant:"subtle",color:"red",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:m,leftSection:n.jsx(o.HugeiconsIcon,{icon:o.lg,size:16,color:"var(--mantine-color-red-6)"}),children:s("editor.actions.delete")})]})})]})}const oe=e=>{const{width:a,height:i,isLoading:s,isError:c,src:l,id:h,altText:f,imageRef:p,maxWidth:g,aspectRatio:x}=e;return n.jsxs("div",{className:"media-wrapper","data-reserved-box":x?"":void 0,style:{width:a,height:x?"auto":i,aspectRatio:x||void 0,display:"inline-flex",position:"relative"},children:[n.jsx(y.LoadingOverlay,{visible:s,zIndex:1e3,overlayProps:{backgroundOpacity:.5},loaderProps:{size:24,color:"black"}}),n.jsx(Ie,{className:null,src:l,altText:f,imageRef:p,width:"inherit",height:"inherit",maxWidth:g||"auto",id:h}),o.IS_TOUCH_DEVICE&&n.jsx(ye,{nodeKey:e.nodeKey,src:l,id:h}),o.IS_TOUCH_TABLET&&n.jsx(we,{nodeKey:e.nodeKey,src:l,id:h}),o.IS_HOVER_CAPABLE&&!o.IS_TOUCH_DEVICE&&!o.IS_TOUCH_TABLET&&n.jsx(xe,{nodeKey:e.nodeKey,src:l})]})};function Ie({altText:e,className:a,imageRef:i,src:s,width:c,height:l,maxWidth:h,id:f}){const[p,g]=r.useState(!1);return n.jsx("img",{className:`${a||void 0} ${p?"":"loading"}`,src:s,alt:e,ref:i,style:{height:l,maxWidth:h,width:c},onLoad:()=>{s.includes("splash")?setTimeout(()=>{g(!0)},100):g(!0)},draggable:"false","data-id":f})}function Ce(e){const{disable:a}=r.useContext(o.Context);return a&&o.ImageNode.isPlaceholderSrc(e.src)?null:n.jsx(ve,{...e})}function ve({src:e,altText:a,nodeKey:i,width:s,height:c,maxWidth:l,showCaption:h,caption:f,id:p,create:g,alignment:x,imagePickerTab:j,aspectRatio:I}){var ee,te;const N=r.useRef(null),[D,S]=r.useState(!0),[m]=P.useLexicalComposerContext(),[b,k]=r.useState(!0),[C,L]=r.useState({width:0,height:0}),{start:B}=o.useCancelUpload(),[je,R]=r.useState(0),{fetchUploadMedia:E,fetchDeleteMedia:H,maxFileSize:Ne,imperativeHandleRef:A,disable:ae}=r.useContext(o.Context),T=o.mediaMap.has(e)&&(((ee=o.mediaMap.get(e))==null?void 0:ee.mediaNodeKeys.length)===0||((te=o.mediaMap.get(e))==null?void 0:te.mediaNodeKeys.length)===void 0||e.trim()===""),{t:M}=O.useTranslation(),V=t=>{if(typeof t=="number")return t>0?t:null;if(typeof t=="string"&&!t.includes("%")){const d=parseFloat(t);return Number.isFinite(d)&&d>0?d:null}return null},G=V(s),X=V(c),Y=G&&X?G/X:void 0,[re,se]=r.useState(void 0),Z=r.useMemo(()=>{try{const t=parseFloat(localStorage.getItem("layers-img-ratio:"+e)||"");return Number.isFinite(t)&&t>0?t:void 0}catch{return}},[e]),le=Y??I??Z??re,[ce,J]=r.useState(!1),de=!ce&&!Y&&(I??Z)!=null,[Se,ue]=r.useState(0);r.useEffect(()=>m.registerDecoratorListener(()=>{ue(t=>t+1)}),[T]),r.useEffect(()=>{const t=m.getElementByKey(i);t&&(t.style.removeProperty("aspect-ratio"),t.style.removeProperty("width"))},[m,i]),r.useEffect(()=>{if(!e||e.startsWith("data:image/")||!e.trim()){S(!1);return}const t=new Image;t.src=e,t.onload=()=>{if(S(!1),t.naturalWidth){const d=t.naturalWidth/t.naturalHeight;if(se(d),t.naturalWidth>=100)try{localStorage.setItem("layers-img-ratio:"+e,String(d))}catch{}!I&&t.naturalWidth>=100&&m.update(()=>{const u=v.$getNodeByKey(i);o.$isImageNode(u)&&u.getAspectRatio()==null&&u.setAspectRatio(d)},{tag:"history-merge"})}},t.onerror=()=>{S(!1)}},[e,T]);const ge=(t,d)=>{m.update(()=>{v.$setSelection(null);const u=v.$getNodeByKey(i);o.$isImageNode(u)&&u.setWidthAndHeight(t,d)})},{historyState:K}=o.useSharedHistoryContext(),{settings:{showNestedEditorTreeView:Q}}=o.useSettings();function me(t){return t.endsWith(".svg")||t.includes("image/svg+xml")}function he(t){return new Promise((d,u)=>{if(me(t)){d(0);return}const w=new Image;w.src=t,w.onload=()=>{d(w.width)},w.onerror=()=>{u(new Error("Failed to load image"))}})}r.useEffect(()=>{let t=s,d=c,u=100;(e.includes("unsplash")?e.trim():!T&&e.trim()||e.includes("upload-src-editor"))&&e!=="upload"&&he(e).then(w=>{typeof t=="number"&&t<u&&w<u?(k(!0),L({width:t,height:d})):w<u?(k(!0),L({width:"auto",height:"auto"})):(L({width:w,height:w}),k(!1)),J(!0)}).catch(w=>{J(!0),console.warn("Ошибка при загрузке изображения:",w.message)})},[e,T]),r.useEffect(()=>{C.width&&C.height&&b&&m.update(()=>{const t=v.$getNodeByKey(i);o.$isImageNode(t)&&t.setWidthAndHeight(C.width,C.height)})},[C.width,C.height,b]);const pe=r.useCallback(t=>o.$writeImagePickerTabToNode(m,i,t),[m,i]),$=r.useCallback((t,d)=>{S(!1),m.update(()=>{const u=v.$getNodeByKey(i);o.$isImageNode(u)&&(u.setSrc(t),u.setId(d))})},[m,i]),U=r.useCallback(t=>{S(!0);const d=B();E&&E(t[0],(u,w)=>{$(u,w),R(0)},u=>{u&&_.showErrorNotification({message:M("editor.gallery.errorFile")}),R(0),$(e.startsWith("blob:")?"upload":"","")},d,u=>{R(u)})},[E,B,M,$,e]);return r.useEffect(()=>m.registerCommand(o.UPLOAD_IMAGE_COMMAND,t=>!e.startsWith("blob:")&&e!=="upload"||t.targetNodeKey!==i?!1:(U(t.files),!0),v.COMMAND_PRIORITY_LOW),[m,U,i,e]),!e||e==="upload"?n.jsx(y.Box,{"data-editor-image-picker-drop-root":!0,w:"100%",children:n.jsx(o.ImagePicker,{inline:!0,nodeKey:i,defaultTabValue:j,onWriteTabToNode:pe,uploading:!1,onUpload:t=>{!E||!t.length||U(t)},popoverProps:{opened:!0,position:"bottom",zIndex:o.EDITOR_UI_MIN_Z_INDEX},onChange:t=>{m.update(()=>{const d=v.$getNodeByKey(i);o.$isImageNode(d)&&d.setSrc(t)})}})}):b&&!de?n.jsx(oe,{width:C.width,height:C.height,isLoading:D,isError:!1,isIcon:b,src:e,id:p,editor:m,nodeKey:i,fetchDeleteMedia:H,altText:a,imageRef:N,maxWidth:l,showCaption:h,caption:f,isCollabActive:!1,historyState:K,showNestedEditorTreeView:Q,t:M}):n.jsx(o.ResizableContainer,{editor:m,isIcon:b,width:o.parseContainerSize(s),height:o.parseContainerSize(c),initialWidth:C.width||"",initialHeight:C.height||"",onResizeEnd:ge,alignment:x,disable:ae,onRegisterDecoratorEnter:t=>{A!=null&&A.current&&(A.current.decoratorEnterAction=t)},onActivate:()=>m.dispatchCommand(o.ON_CHANGE_COMMAND,"show_menu"),children:n.jsx(oe,{width:"inherit",height:"inherit",aspectRatio:le,isLoading:D,isError:!1,isIcon:b,src:e,id:p,editor:m,nodeKey:i,fetchDeleteMedia:H,altText:a,imageRef:N,maxWidth:l,showCaption:h,caption:f,isCollabActive:!1,historyState:K,showNestedEditorTreeView:Q,t:M})})}exports.default=Ce;
|