@layers-app/editor 0.7.82 → 0.7.84
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/README.md +831 -831
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +65 -5
- package/dist/index.js +14 -12
- package/dist/{layers.S9sXw0g-.js → layers.3ttD_EZK.js} +1 -1
- package/dist/{layers.DzOKAX58.js → layers.5LDY8hF9.js} +1 -1
- package/dist/{layers.D9qlxACG.js → layers.5h0jfjke.js} +1 -1
- package/dist/{layers.B9YxzNS2.js → layers.660VGPLH.js} +1 -1
- package/dist/layers.7GMTASen.js +1 -0
- package/dist/{layers.7DTPSOey.js → layers.7usfK_-Q.js} +5 -5
- package/dist/{layers.D-pvuGfw.js → layers.AQBGf1qx.js} +1 -1
- package/dist/{layers.CcQAEKW5.js → layers.B-dcjV1g.js} +1 -1
- package/dist/{layers.xBUjAr_L.js → layers.B0_pZ8Wl.js} +1 -1
- package/dist/{layers.BFgKUTVC.js → layers.B0q3XgJU.js} +1 -1
- package/dist/{layers.Dx1ZFaXt.js → layers.B8H90AZL.js} +1 -1
- package/dist/{layers.DHJGbN75.js → layers.B9IorBEM.js} +1 -1
- package/dist/{layers.Cp2bmBzz.js → layers.B9MvfZB3.js} +1 -1
- package/dist/{layers.DeRia5LK.js → layers.BAHbyKTI.js} +1 -1
- package/dist/{layers.pFvqZwn5.js → layers.BBb11shn.js} +1 -1
- package/dist/{layers.D2jkWrNa.js → layers.BEQKVl6A.js} +1 -1
- package/dist/{layers.5-lN9ip-.js → layers.BI2tTCES.js} +6 -6
- package/dist/{layers.-C9awJ5D.js → layers.BJZxeErp.js} +24 -24
- package/dist/{layers.CTt6fzlm.js → layers.BKzyedUO.js} +1 -1
- package/dist/{layers.DboeYJcf.js → layers.BPLJO6yY.js} +1 -1
- package/dist/{layers.CilpUjfR.js → layers.BPPyJ7T3.js} +1 -1
- package/dist/{layers.B0kBsfC4.js → layers.BPZk8O3B.js} +1 -1
- package/dist/{layers.DldiHtG8.js → layers.BR1ZeHtq.js} +3 -3
- package/dist/{layers.Lb7bqB3X.js → layers.BReXyMP1.js} +3 -3
- package/dist/{layers.nb3NS5nq.js → layers.BRgep5CM.js} +1 -1
- package/dist/{layers.DCBP8LWH.js → layers.BRwBQRBw.js} +4 -4
- package/dist/{layers.DCoxb2l7.js → layers.BSi7fJpQ.js} +1 -1
- package/dist/{layers.BMgXgOND.js → layers.BWBcNeNm.js} +1 -1
- package/dist/{layers.BVGcmzzn.js → layers.BWFrDCw_.js} +1 -1
- package/dist/{layers.BvZsWvDS.js → layers.BXdFvlYk.js} +1 -1
- package/dist/{layers.BIrFMXcD.js → layers.BXzbZ2bt.js} +1 -1
- package/dist/{layers.BWV-Sgl3.js → layers.BaRbHFQv.js} +1 -1
- package/dist/{layers.DQTdewUI.js → layers.BcLH4bTX.js} +1 -1
- package/dist/{layers.c0gk0VXE.js → layers.BciYyxTd.js} +1 -1
- package/dist/{layers.D_yjpcfa.js → layers.BehL29a3.js} +1 -1
- package/dist/{layers.DH1Nkgiu.js → layers.BfaNu6cT.js} +1 -1
- package/dist/{layers.CsiXHyOx.js → layers.BgV2y1LX.js} +1 -1
- package/dist/{layers.CW_4EVhJ.js → layers.BgiDHAu5.js} +1 -1
- package/dist/{layers.Bgmb-fxu.js → layers.BgxBysUn.js} +1 -1
- package/dist/layers.BhReR8mV.js +45335 -0
- package/dist/{layers.Dr77F6rV.js → layers.BiS82Ah3.js} +1 -1
- package/dist/{layers.B5eEGwNc.js → layers.BmxK4cMQ.js} +1 -1
- package/dist/{layers.C87aBoAV.js → layers.Bo2uUdWq.js} +1 -1
- package/dist/layers.BoEvkl8V.js +304 -0
- package/dist/{layers.CmxEbdFe.js → layers.BoWHcEDI.js} +1 -1
- package/dist/{layers.CqTbcA0v.js → layers.BoaxPkiF.js} +1 -1
- package/dist/{layers.BwPPJKKj.js → layers.BqHl1vOL.js} +1 -1
- package/dist/{layers.DfQwAfpy.js → layers.BrfmPh4h.js} +1 -1
- package/dist/{layers.Cdt8rXbT.js → layers.BsWULi2R.js} +4 -4
- package/dist/{layers.BponvQ1b.js → layers.Bt1x-jBU.js} +1 -1
- package/dist/{layers.CEz0QcVU.js → layers.BtD7rnnP.js} +2 -2
- package/dist/{layers.ZZC53gtG.js → layers.BtgFk9_J.js} +1 -1
- package/dist/{layers.CzoxSFrk.js → layers.BuVfRGSL.js} +1 -1
- package/dist/{layers.Bko5pa5U.js → layers.BxVC0q0O.js} +4 -4
- package/dist/{layers.k98mopM3.js → layers.BzF_UPBp.js} +1 -1
- package/dist/{layers.CYkpPnvd.js → layers.BzYL8dLV.js} +1 -1
- package/dist/{layers.BMWsZ741.js → layers.C06l9Zne.js} +1 -1
- package/dist/{layers.DhxfFU6e.js → layers.C2LIQiyR.js} +1 -1
- package/dist/{layers.Czkc0g-u.js → layers.C2SMpGCy.js} +1 -1
- package/dist/{layers.CdqG4hgs.js → layers.C2s6EBCQ.js} +1 -1
- package/dist/{layers.BXwMRrS4.js → layers.C7skWr7U.js} +1 -1
- package/dist/{layers.Bbvr0RA3.js → layers.C980d8Nd.js} +1 -1
- package/dist/{layers.BbSjcees.js → layers.CAiKaIpy.js} +1 -1
- package/dist/{layers.djZ4ig4L.js → layers.CAojvkOK.js} +1 -1
- package/dist/{layers.DIX2uUom.js → layers.CBClDrA9.js} +1 -1
- package/dist/{layers.BVWAat6B.js → layers.CCzpc2XM.js} +1 -1
- package/dist/{layers.CCC1NbjU.js → layers.CFeg1ljH.js} +1 -1
- package/dist/{layers.CZppSskC.js → layers.CGde-__V.js} +1 -1
- package/dist/{layers.BYpzMqix.js → layers.CLXiEuBY.js} +1 -1
- package/dist/{layers.hW1VE-fv.js → layers.CM6p48QZ.js} +7 -7
- package/dist/{layers.BmeVF_R0.js → layers.CMByv_JC.js} +1 -1
- package/dist/{layers.CxNLa8SG.js → layers.CNtZ5750.js} +1 -1
- package/dist/{layers.CzqlraxS.js → layers.CPQnDAfI.js} +1 -1
- package/dist/{layers.BCB0E8Vv.js → layers.CPc7V8vV.js} +1 -1
- package/dist/{layers.B_RrUO8u.js → layers.CRny5Vhs.js} +1 -1
- package/dist/{layers.DAPvVg4k.js → layers.CTLImrV_.js} +4 -4
- package/dist/{layers.e93dP3BI.js → layers.CUUNO7NC.js} +1 -1
- package/dist/{layers.Bs-oU0-3.js → layers.CVkPVOoO.js} +1 -1
- package/dist/{layers.CXv2PNlp.js → layers.CWM9jAVS.js} +1 -1
- package/dist/{layers.C49UtZAK.js → layers.CWUd5ICZ.js} +1 -1
- package/dist/{layers.DKoqDXFt.js → layers.CbSE8pbT.js} +5 -5
- package/dist/{layers.CM2yDW45.js → layers.CfYin5Er.js} +1 -1
- package/dist/layers.CiAB6Wqk.js +6 -0
- package/dist/{layers.Bydc4B_j.js → layers.CiXrup6j.js} +3 -3
- package/dist/{layers.CsBqYP3Q.js → layers.CjAzvfUi.js} +1 -1
- package/dist/{layers.B8wHqevZ.js → layers.CjD6r90E.js} +3 -3
- package/dist/{layers.DqDXxqZi.js → layers.CkMA93G9.js} +1 -1
- package/dist/{layers.CRMbhR83.js → layers.Ckgrr88o.js} +4 -4
- package/dist/{layers.CdLDkc9r.js → layers.CkibkU4E.js} +1 -1
- package/dist/layers.CmmYt3Ou.js +1 -0
- package/dist/{layers.DFFa5uKC.js → layers.Cn7-tvQd.js} +1 -1
- package/dist/{layers.BafBMKxh.js → layers.CnM_VO8d.js} +1 -1
- package/dist/{layers.DJemAByH.js → layers.CnlomgVK.js} +1 -1
- package/dist/{layers.BgPcnrcW.js → layers.Coe5BZQB.js} +1 -1
- package/dist/{layers.CJzGh6ry.js → layers.Cp8gOVZg.js} +1 -1
- package/dist/{layers.DT8ZNkcM.js → layers.Cqvn4Ghk.js} +1 -1
- package/dist/{layers.vOBlQ-V0.js → layers.CtfTA9wm.js} +1 -1
- package/dist/{layers.Oo_OyVW9.js → layers.CuKB5PQH.js} +1 -1
- package/dist/{layers.CoIfAPdn.js → layers.CwfsdXiF.js} +1 -1
- package/dist/{layers.BCe_JvFF.js → layers.CxPmSslY.js} +1 -1
- package/dist/{layers.C275mwAI.js → layers.CzPfLUnL.js} +3 -3
- package/dist/{layers.Cqfq5qdD.js → layers.D1O867q2.js} +1 -1
- package/dist/{layers.BpQ1SwKi.js → layers.D3yp6byg.js} +1 -1
- package/dist/{layers.BBoKtr3r.js → layers.D4pFUyQc.js} +1 -1
- package/dist/{layers.DxucfQa1.js → layers.D71ftE9n.js} +1 -1
- package/dist/layers.D90g-j4O.js +346 -0
- package/dist/{layers.CPcURSDw.js → layers.DDApHZ03.js} +1 -1
- package/dist/{layers.Do9z7qnX.js → layers.DFfPm1gw.js} +1 -1
- package/dist/{layers.Bdj7-wCM.js → layers.DGL60Zxc.js} +1 -1
- package/dist/{layers.uoT0BXrG.js → layers.DGanGoJD.js} +1 -1
- package/dist/{layers.Ce7vTa56.js → layers.DJGxoM0s.js} +1 -1
- package/dist/{layers.eybXdh_L.js → layers.DKTUA9Qn.js} +1 -1
- package/dist/{layers.DlCNOcsZ.js → layers.DKYNs_CU.js} +1 -1
- package/dist/{layers.CH_cyGTU.js → layers.DM3A2BTi.js} +1 -1
- package/dist/{layers.D_vIfcPT.js → layers.DMaOlxg4.js} +2 -2
- package/dist/{layers.DchclHKS.js → layers.DMo2CuQp.js} +1 -1
- package/dist/{layers.EcZHErQP.js → layers.DNass_AW.js} +1 -1
- package/dist/{layers.CUKI2Ayv.js → layers.DQf6vZpw.js} +1 -1
- package/dist/layers.DSHp4o8G.js +17 -0
- package/dist/{layers.CedPooSe.js → layers.DSOSQ0TI.js} +1 -1
- package/dist/{layers.CwWVDPTj.js → layers.DTqXVHF2.js} +1 -1
- package/dist/{layers.CKeyrwJR.js → layers.DU0SSrWN.js} +4 -4
- package/dist/{layers.Dbx0a-F8.js → layers.DV8uFYnA.js} +1 -1
- package/dist/{layers.Ba8KOuNV.js → layers.DWPHA9B8.js} +1 -1
- package/dist/{layers.md5BO_Gj.js → layers.DXNUBu80.js} +1 -1
- package/dist/{layers.BHB2kElH.js → layers.D_kAA9qL.js} +1 -1
- package/dist/{layers.CVVu5GBB.js → layers.Da2wn6Zc.js} +1 -1
- package/dist/{layers.BdalDkty.js → layers.DaLQ3FRc.js} +1 -1
- package/dist/{layers.BLwual6c.js → layers.Db3F9Xht.js} +1 -1
- package/dist/{layers.Cim-6Rmb.js → layers.Dc1g7Tdd.js} +1 -1
- package/dist/layers.De7xHLnX.js +1 -0
- package/dist/{layers.CcFUs2Pd.js → layers.DeJEPXus.js} +1 -1
- package/dist/{layers.B0oSpctw.js → layers.DeR26nCU.js} +3 -3
- package/dist/{layers.3i-CD3jc.js → layers.Dfg7mZZ_.js} +1 -1
- package/dist/layers.Dg9ASVJB.js +454 -0
- package/dist/{layers.NZ7SsPGh.js → layers.DgUQgDzS.js} +1 -1
- package/dist/{layers.D9GHWvxE.js → layers.Di3SZpUk.js} +1 -1
- package/dist/{layers.DJMzvRbg.js → layers.DiemxYQH.js} +1 -1
- package/dist/layers.DilA0qnM.js +54 -0
- package/dist/{layers.BhCJ-eIN.js → layers.Dj16AL7s.js} +8 -8
- package/dist/{layers.CbMMwH_s.js → layers.DjWqQYKP.js} +1 -1
- package/dist/layers.DkNxNBfM.js +1 -0
- package/dist/layers.DlgVWdcp.js +1 -0
- package/dist/{layers.CtNJ14u1.js → layers.DmaKWX_o.js} +1 -1
- package/dist/{layers.CjbztNZx.js → layers.DmoaeDiV.js} +1 -1
- package/dist/{layers.CM622GxK.js → layers.Dn-ec9WG.js} +2 -2
- package/dist/{layers.BXgSFb-R.js → layers.Dn052lpP.js} +1 -1
- package/dist/{layers.BSAU5roX.js → layers.Dn7N_XxE.js} +4 -4
- package/dist/{layers.vdgMybb6.js → layers.DnCk3akf.js} +1 -1
- package/dist/layers.DnJsFEqv.js +1 -0
- package/dist/{layers.Yl5aCnza.js → layers.DpFNEoh4.js} +1 -1
- package/dist/layers.DpLIZ7AU.js +8 -0
- package/dist/{layers.CSJXULr4.js → layers.Dq9FVA37.js} +1 -1
- package/dist/{layers.DvIwd4u8.js → layers.DrtWEMM0.js} +1 -1
- package/dist/{layers.C-UTLTVk.js → layers.DuRnRhDt.js} +1 -1
- package/dist/{layers.CouYs8zT.js → layers.DvW94-D9.js} +1 -1
- package/dist/{layers.BnGXl8mi.js → layers.DvtA-_wr.js} +2 -2
- package/dist/{layers.BMOH3OgH.js → layers.DwDWuERK.js} +1 -1
- package/dist/{layers.DadtIIfJ.js → layers.DyIJmOpf.js} +1 -1
- package/dist/{layers.DyTC2ILj.js → layers.DyUWvbyL.js} +1 -1
- package/dist/{layers.ZpiYFo-h.js → layers.Dyuut1Do.js} +1 -1
- package/dist/{layers.B4Wkca4i.js → layers.DyxXL2dv.js} +1 -1
- package/dist/{layers.C-fhG5GL.js → layers.Dz1zakYM.js} +1 -1
- package/dist/{layers.B7iVAgr1.js → layers.DzAF3_nF.js} +3 -3
- package/dist/{layers.BZV7UTXr.js → layers.EFS2GS7s.js} +1 -1
- package/dist/{layers.BYVEsX8R.js → layers.FDWSIAON.js} +1 -1
- package/dist/{layers.BE9DHr0q.js → layers.Fu_2GtJz.js} +1 -1
- package/dist/layers.GsZzw8KK.js +1 -0
- package/dist/{layers.ez5WGtnb.js → layers.HDhWea9s.js} +3 -3
- package/dist/{layers.N6prVGfh.js → layers.Ho3d8f_s.js} +1 -1
- package/dist/{layers.DJeAiYuX.js → layers.IEu0gpU1.js} +1 -1
- package/dist/{layers.DUNxDCS4.js → layers.IbqwJCl8.js} +1 -1
- package/dist/{layers.BEKEV-av.js → layers.KQZtpBN5.js} +1 -1
- package/dist/layers.MCk79lJa.js +296 -0
- package/dist/{layers.Y6RSw2tE.js → layers.PEWT33VM.js} +1 -1
- package/dist/{layers.Cpf7R0SV.js → layers.TV0bbpfe.js} +2 -2
- package/dist/{layers.C8ZgqsP4.js → layers.UfoPB0x7.js} +1 -1
- package/dist/{layers.Fj1owQqB.js → layers.VD4Vzi4s.js} +1 -1
- package/dist/{layers.09kX_aKi.js → layers.V_0nAu-4.js} +3 -3
- package/dist/{layers.DD32r043.js → layers.WjBkkibY.js} +1 -1
- package/dist/{layers.apck7HxJ.js → layers.Zq2iwsGh.js} +1 -1
- package/dist/{layers.QECyt8jt.js → layers.b4inQuE7.js} +3 -3
- package/dist/{layers.DkP2U2Bu.js → layers.cCqJlBzb.js} +1 -1
- package/dist/{layers.8L1DFOs8.js → layers.cRR6U8W0.js} +4 -4
- package/dist/{layers.BjA3p48o.js → layers.hbVvyWfL.js} +1 -1
- package/dist/{layers.Dob5bvk9.js → layers.kY76W3YH.js} +1 -1
- package/dist/{layers.Cs-k8vq0.js → layers.l1aB4_0i.js} +1 -1
- package/dist/{layers.CR3YfToR.js → layers.mhtpxqIl.js} +1 -1
- package/dist/{layers.BNDUSC39.js → layers.oKND5jmb.js} +4 -4
- package/dist/{layers.DGHnvTPF.js → layers.pDyyva3v.js} +1 -1
- package/dist/{layers.DfPb7GYL.js → layers.q78-JEaW.js} +1 -1
- package/dist/{layers.Cztq-IBu.js → layers.qP2AeOfJ.js} +1 -1
- package/dist/{layers.DZmuTtgj.js → layers.rW3ZkMNN.js} +1 -1
- package/dist/{layers.CopOwDwy.js → layers.raDKf7HQ.js} +1 -1
- package/dist/{layers.UJyKpjPZ.js → layers.sHa6eov4.js} +1 -1
- package/dist/{layers.CeWd1qVK.js → layers.sf_C9kmK.js} +1 -1
- package/dist/{layers.BEgt-lVf.js → layers.t9aRFd0p.js} +1 -1
- package/dist/{layers.CGEgdrX0.js → layers.v2gHHIgZ.js} +1 -1
- package/dist/{layers.DvipvGgf.js → layers.yGEqadiJ.js} +1 -1
- package/dist/{layers.DGsKAE90.js → layers.yUHpRCIx.js} +1 -1
- package/dist/{layers.BcXAKps9.js → layers.yvWi9NIC.js} +3 -3
- package/dist/{layers.blE7uXvC.js → layers.yxW2eOfP.js} +1 -1
- package/dist/{layers.BXcivJ6K.js → layers.zCqvHYlG.js} +1 -1
- package/dist/{layers.DOMiD2Xg.js → layers.zo-yg3U2.js} +1 -1
- package/package.json +47 -21
- package/dist/layers.4CXv5Cq4.js +0 -1
- package/dist/layers.8b9VmC79.js +0 -76
- package/dist/layers.BK6Aif4E.js +0 -1
- package/dist/layers.BMp5iGOc.js +0 -299
- package/dist/layers.Bmf-iA5d.js +0 -1
- package/dist/layers.BnRGHX9R.js +0 -1
- package/dist/layers.BwMoLcEZ.js +0 -1
- package/dist/layers.CZ258rd4.js +0 -271
- package/dist/layers.CbSVIZXm.js +0 -8
- package/dist/layers.ChSqoH5J.js +0 -213
- package/dist/layers.DVQXxZP6.js +0 -295
- package/dist/layers.DYInS_N4.js +0 -304
- package/dist/layers.P6wShzg6.js +0 -1
- package/dist/layers.TUNPmk3M.js +0 -31956
- package/dist/layers.U_U8GtB4.js +0 -1
- package/dist/layers.YBmOkiVr.js +0 -1
- package/dist/layers.eLN8fYO2.js +0 -276
- package/dist/layers.nrCa61N7.js +0 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layers-app/editor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.84",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "cross-env VITE_LAYERS=true vite --mode full ",
|
|
@@ -18,14 +18,29 @@
|
|
|
18
18
|
"dev:full": "concurrently \"npm run start\" \"npm run server:smart-paste\"",
|
|
19
19
|
"format": "prettier --write .",
|
|
20
20
|
"format:check": "prettier --check .",
|
|
21
|
+
"clean:test": "rm -rf test-results playwright-report .playwright-mcp blob-report && find . -maxdepth 1 -name '*.png' -not -name 'favicon.png' -delete",
|
|
21
22
|
"test:e2e": "playwright test",
|
|
22
23
|
"test:e2e:ui": "playwright test --ui",
|
|
23
24
|
"test:e2e:debug": "playwright test --debug",
|
|
24
25
|
"test:e2e:headed": "playwright test --headed",
|
|
25
26
|
"start-test-server": "VITE_LAYERS=true vite --mode full --port 3000 --strictPort --host localhost",
|
|
27
|
+
"type-check": "tsc --noEmit --project tsconfig.check.json",
|
|
26
28
|
"test": "vitest run",
|
|
27
29
|
"test:watch": "vitest",
|
|
28
|
-
"test:coverage": "vitest run --coverage"
|
|
30
|
+
"test:coverage": "vitest run --coverage",
|
|
31
|
+
"changeset": "changeset",
|
|
32
|
+
"version": "changeset version",
|
|
33
|
+
"release": "npm run build && changeset publish",
|
|
34
|
+
"prepare": "husky"
|
|
35
|
+
},
|
|
36
|
+
"lint-staged": {
|
|
37
|
+
"*.{ts,tsx}": [
|
|
38
|
+
"eslint --fix",
|
|
39
|
+
"prettier --write"
|
|
40
|
+
],
|
|
41
|
+
"*.{scss,css,json,md}": [
|
|
42
|
+
"prettier --write"
|
|
43
|
+
]
|
|
29
44
|
},
|
|
30
45
|
"publishConfig": {
|
|
31
46
|
"access": "public"
|
|
@@ -50,16 +65,21 @@
|
|
|
50
65
|
"yjs": "^13.6.20"
|
|
51
66
|
},
|
|
52
67
|
"devDependencies": {
|
|
68
|
+
"@changesets/cli": "^2.30.0",
|
|
69
|
+
"@commitlint/cli": "^20.5.0",
|
|
70
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
53
71
|
"@eslint/js": "^9.9.0",
|
|
54
|
-
"@hugeicons/core-free-icons": "^4.
|
|
72
|
+
"@hugeicons/core-free-icons": "^4.0.0",
|
|
55
73
|
"@hugeicons/react": "^1.1.1",
|
|
56
|
-
"@layers-app/shared": "
|
|
74
|
+
"@layers-app/shared": "0.3.2",
|
|
75
|
+
"@mantine/carousel": "8.3.5",
|
|
57
76
|
"@mantine/core": "8.3.5",
|
|
58
77
|
"@mantine/dropzone": "8.3.5",
|
|
59
78
|
"@mantine/form": "8.3.5",
|
|
60
79
|
"@mantine/hooks": "8.3.5",
|
|
61
80
|
"@mantine/modals": "8.3.5",
|
|
62
81
|
"@mantine/notifications": "8.3.5",
|
|
82
|
+
"@mantine/tiptap": "8.3.5",
|
|
63
83
|
"@playwright/test": "^1.40.0",
|
|
64
84
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
65
85
|
"@tabler/icons-react": "^3.7.0",
|
|
@@ -82,20 +102,26 @@
|
|
|
82
102
|
"eslint-config-prettier": "^10.1.1",
|
|
83
103
|
"eslint-plugin-prettier": "^5.2.3",
|
|
84
104
|
"eslint-plugin-react": "^7.37.4",
|
|
105
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
85
106
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
86
107
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
87
108
|
"glob": "^10.3.10",
|
|
109
|
+
"husky": "^9.1.7",
|
|
88
110
|
"i18next": "^25.5.2",
|
|
111
|
+
"lint-staged": "^16.4.0",
|
|
89
112
|
"lodash-es": "^4.17.21",
|
|
90
113
|
"postcss-import": "^16.1.0",
|
|
91
114
|
"postcss-preset-mantine": "^1.17.0",
|
|
92
115
|
"prettier": "^3.4.2",
|
|
93
116
|
"prettier-plugin-organize-attributes": "^1.0.0",
|
|
94
117
|
"proper-lockfile": "^4.1.2",
|
|
118
|
+
"react": "^18.3.1",
|
|
119
|
+
"react-dom": "^18.3.1",
|
|
95
120
|
"react-i18next": "^15.7.3",
|
|
96
121
|
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
97
122
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
98
123
|
"sass": "^1.71.1",
|
|
124
|
+
"swagger-ui-react": "^5.32.0",
|
|
99
125
|
"terser": "^5.39.0",
|
|
100
126
|
"typescript": "^5.5.4",
|
|
101
127
|
"typescript-eslint": "^8.2.0",
|
|
@@ -113,12 +139,6 @@
|
|
|
113
139
|
"dompurify": "^3.2.4",
|
|
114
140
|
"mermaid": "^10.9.4",
|
|
115
141
|
"i18next": "^25.5.2",
|
|
116
|
-
"@mantine/core": "8.3.5",
|
|
117
|
-
"@mantine/hooks": "8.3.5",
|
|
118
|
-
"@mantine/form": "8.3.5",
|
|
119
|
-
"@mantine/dropzone": "8.3.5",
|
|
120
|
-
"@mantine/modals": "8.3.5",
|
|
121
|
-
"@mantine/notifications": "8.3.5",
|
|
122
142
|
"@excalidraw/mermaid-to-excalidraw": {
|
|
123
143
|
"nanoid": "^5.0.9"
|
|
124
144
|
},
|
|
@@ -129,30 +149,36 @@
|
|
|
129
149
|
"nanoid": "^5.0.9"
|
|
130
150
|
},
|
|
131
151
|
"ajv": "^8.18.0",
|
|
152
|
+
"eslint": {
|
|
153
|
+
"ajv": "6.14.0"
|
|
154
|
+
},
|
|
155
|
+
"@eslint/eslintrc": {
|
|
156
|
+
"ajv": "6.14.0"
|
|
157
|
+
},
|
|
132
158
|
"minimatch": "^10.2.1"
|
|
133
159
|
},
|
|
134
160
|
"peerDependencies": {
|
|
135
161
|
"@dnd-kit/modifiers": ">=6",
|
|
136
162
|
"@emotion/react": ">=11",
|
|
137
163
|
"@emotion/styled": ">=11",
|
|
138
|
-
"@hugeicons/core-free-icons": "
|
|
164
|
+
"@hugeicons/core-free-icons": "^4.0.0",
|
|
139
165
|
"@hugeicons/react": ">=1",
|
|
140
|
-
"@mantine/carousel": ">=8.0.0",
|
|
141
|
-
"@mantine/colors-generator": ">=8.0.0",
|
|
142
|
-
"@mantine/core": ">=8.0.0",
|
|
143
|
-
"@mantine/dropzone": ">=8.0.0",
|
|
144
|
-
"@mantine/form": ">=8.0.0",
|
|
145
|
-
"@mantine/hooks": ">=8.0.0",
|
|
146
|
-
"@mantine/modals": ">=8.0.0",
|
|
147
|
-
"@mantine/notifications": ">=8.0.0",
|
|
148
|
-
"@mantine/tiptap": ">=8.0.0",
|
|
149
166
|
"@tabler/icons-react": ">=3.7.0",
|
|
167
|
+
"@mantine/carousel": "8.3.5",
|
|
168
|
+
"@mantine/colors-generator": "8.3.5",
|
|
169
|
+
"@mantine/core": "8.3.5",
|
|
170
|
+
"@mantine/dropzone": "8.3.5",
|
|
171
|
+
"@mantine/form": "8.3.5",
|
|
172
|
+
"@mantine/hooks": "8.3.5",
|
|
173
|
+
"@mantine/modals": "8.3.5",
|
|
174
|
+
"@mantine/notifications": "8.3.5",
|
|
175
|
+
"@mantine/tiptap": "8.3.5",
|
|
150
176
|
"@tanstack/react-query": "^5.52.2",
|
|
151
177
|
"@tanstack/react-virtual": ">=3",
|
|
152
178
|
"date-fns-tz": ">=3",
|
|
153
179
|
"i18next": "^25.5.2",
|
|
154
180
|
"js-confetti": ">=0.12",
|
|
155
|
-
"lodash-es": "
|
|
181
|
+
"lodash-es": "^4.17.21",
|
|
156
182
|
"react": "^18.3.1",
|
|
157
183
|
"react-dom": "^18.3.1",
|
|
158
184
|
"react-i18next": "^15.7.3",
|
package/dist/layers.4CXv5Cq4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./layers.DUNxDCS4.js");require("./layers.hW1VE-fv.js");exports.Commands=e.CB;exports.subsetToBase64=e.QB;exports.subsetToBinary=e.NQ;exports.toBase64=e.AI;
|
package/dist/layers.8b9VmC79.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, Fragment as M, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { useState as n, useRef as x, useEffect as O } from "react";
|
|
3
|
-
import { useLexicalComposerContext as N } from "@lexical/react/LexicalComposerContext";
|
|
4
|
-
import { createCommand as g, COMMAND_PRIORITY_EDITOR as w } from "lexical";
|
|
5
|
-
import { e as D, g as S, f as A } from "./layers.TUNPmk3M.js";
|
|
6
|
-
import { C as R, E as I } from "./layers.DVQXxZP6.js";
|
|
7
|
-
const _ = g(
|
|
8
|
-
"INSERT_EXCALIDRAW_COMMAND"
|
|
9
|
-
);
|
|
10
|
-
function k() {
|
|
11
|
-
const [o] = N(), [d, t] = n(!1), [e, f] = n(
|
|
12
|
-
null
|
|
13
|
-
), s = x(null), [m, a] = n(!1);
|
|
14
|
-
O(() => {
|
|
15
|
-
if (!o.hasNodes([D]))
|
|
16
|
-
throw new Error(
|
|
17
|
-
"ExcalidrawPlugin: ExcalidrawNode not registered on editor"
|
|
18
|
-
);
|
|
19
|
-
return o.registerCommand(
|
|
20
|
-
_,
|
|
21
|
-
() => {
|
|
22
|
-
t(!0);
|
|
23
|
-
const r = S();
|
|
24
|
-
return f(r), !0;
|
|
25
|
-
},
|
|
26
|
-
w
|
|
27
|
-
);
|
|
28
|
-
}, [o]);
|
|
29
|
-
const l = () => {
|
|
30
|
-
t(!1), a(!1), s.current = !1;
|
|
31
|
-
};
|
|
32
|
-
return /* @__PURE__ */ p(M, { children: [
|
|
33
|
-
/* @__PURE__ */ c(
|
|
34
|
-
R,
|
|
35
|
-
{
|
|
36
|
-
isCloseModal: m,
|
|
37
|
-
confirmClose: l,
|
|
38
|
-
setCloseModalOpen: a
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ c(
|
|
42
|
-
I,
|
|
43
|
-
{
|
|
44
|
-
initialElements: [],
|
|
45
|
-
initialAppState: {},
|
|
46
|
-
initialFiles: {},
|
|
47
|
-
isShown: d,
|
|
48
|
-
onDelete: () => {
|
|
49
|
-
t(!1);
|
|
50
|
-
},
|
|
51
|
-
onClose: () => {
|
|
52
|
-
s.current ? a(!0) : l();
|
|
53
|
-
},
|
|
54
|
-
onSave: (r, u, C, E) => {
|
|
55
|
-
o.update(() => {
|
|
56
|
-
const i = A();
|
|
57
|
-
i.setData(
|
|
58
|
-
JSON.stringify({
|
|
59
|
-
appState: u,
|
|
60
|
-
elements: r,
|
|
61
|
-
files: C,
|
|
62
|
-
previewSVG: E
|
|
63
|
-
})
|
|
64
|
-
), e && e.getParent() && (e == null || e.replace(i));
|
|
65
|
-
}), t(!1);
|
|
66
|
-
},
|
|
67
|
-
closeOnClickOutside: !1,
|
|
68
|
-
isEdited: s
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
] });
|
|
72
|
-
}
|
|
73
|
-
export {
|
|
74
|
-
_ as INSERT_EXCALIDRAW_COMMAND,
|
|
75
|
-
k as default
|
|
76
|
-
};
|
package/dist/layers.BK6Aif4E.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),R=require("react-i18next"),m=require("@mantine/core"),l=require("react"),H=require("@layers-app/shared"),I=({isCloseModal:a,setCloseModalOpen:t,confirmClose:d})=>{const{t:f}=R.useTranslation();return c.jsx(m.Modal,{opened:a,onClose:()=>{t(!1)},centered:!0,title:f("editor.unsavedChanges.title"),closeOnClickOutside:!0,closeOnEscape:!0,size:"500",zIndex:999,children:c.jsxs("div",{children:[c.jsx(m.Text,{mb:"md",children:f("editor.unsavedChanges.message")}),c.jsxs(m.Flex,{justify:"flex-end",gap:"sm",children:[c.jsx(m.Button,{variant:"default",onClick:()=>{t(!1)},fullWidth:!0,children:f("editor.unsavedChanges.cancel")}),c.jsx(m.Button,{color:"red",onClick:d,fullWidth:!0,children:f("editor.unsavedChanges.closeWithoutSaving")})]})]})})},M={elements:[],files:{},appState:{},previewSVG:null},K=a=>{try{const t=JSON.parse(a);if(Array.isArray(t))return{...M,elements:t};if(t&&typeof t=="object")return{elements:Array.isArray(t.elements)?t.elements:[],files:t.files&&typeof t.files=="object"?t.files:{},appState:t.appState&&typeof t.appState=="object"?t.appState:{},previewSVG:typeof t.previewSVG=="string"?t.previewSVG:typeof t.previewSvg=="string"?t.previewSvg:null}}catch{}return{...M}},U={en:"en-US",ru:"ru-RU",fr:"fr-FR",de:"de-DE",es:"es-ES",it:"it-IT",pt:"pt-BR",zh:"zh-CN",ja:"ja-JP",ko:"ko-KR",ar:"ar-SA",hi:"hi-IN",nl:"nl-NL",tr:"tr-TR",pl:"pl-PL",sv:"sv-SE",cs:"cs-CZ",uk:"uk-UA",ro:"ro-RO",fi:"fi-FI",da:"da-DK",no:"no-NO",el:"el-GR",he:"he-IL",th:"th-TH",id:"id-ID",ms:"ms-MY",vi:"vi-VN"};let p=null;const X=l.lazy(async()=>{var t;const a=await Promise.resolve().then(()=>require("./layers.hW1VE-fv.js")).then(d=>d.index);return!p&&a&&(p=a.exportToSvg||((t=a.default)==null?void 0:t.exportToSvg)||a.default),{default:a.Excalidraw}}),J=()=>{const[a,t]=l.useState(null),d=l.useCallback(f=>t(f),[]);return[a,d]};function P({onSave:a,initialElements:t,initialAppState:d,initialFiles:f,isShown:u=!1,onDelete:L,onClose:q,isEdited:D}){const[n,A]=J(),{i18n:g,t:B}=R.useTranslation(),{colorScheme:N}=m.useMantineColorScheme(),k=l.useRef(!1),[h,W]=l.useState(t),[C,z]=l.useState(f),[_,O]=l.useState(u);l.useEffect(()=>{u&&O(!0)},[u]),l.useEffect(()=>{!u||k.current||(k.current=!0,Promise.resolve().then(()=>require("./layers.Dyvby5gX.js")))},[u]),l.useEffect(()=>{u&&setTimeout(()=>{var e;(e=n==null?void 0:n.refresh)==null||e.call(n)},500)},[u,n]),l.useEffect(()=>{if(!u)return;const e=(r,s)=>{const i=B(r);return i.startsWith("editor.menu")?s:i},x=e("editor.menu.excalidraw.tools.frameTool",g.language==="ru"?"Инструмент рамки":g.language==="es"?"Herramienta de marco":"Frame tool"),o=e("editor.menu.excalidraw.tools.webEmbed",g.language==="ru"?"Веб-встраивание":g.language==="es"?"Incrustación web":"Web Embed"),v=e("editor.menu.excalidraw.tools.generate",g.language==="ru"?"Генерировать":g.language==="es"?"Generar":"Generate"),y={"Frame tool":x,"Web Embed":o,"Web embeded":o,Generate:v},T=()=>{const r=document.querySelector(".App-toolbar__extra-tools-dropdown");if(!r)return;const s=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,null);let i;for(;i=s.nextNode();)if(i.nodeType===Node.TEXT_NODE&&i.textContent){const j=i.textContent.trim();for(const[S,E]of Object.entries(y))if(j===S&&E&&!j.includes(E)){i.textContent=i.textContent.replace(S,E);break}}},b=()=>{setTimeout(()=>{T()},0)},w=setTimeout(()=>{const r=document.querySelector(".excalidraw-container");if(r){const s=r.querySelector(".App-toolbar__extra-tools-trigger");s&&s.addEventListener("click",b)}},300);return()=>{clearTimeout(w);const r=document.querySelector(".excalidraw-container");if(r){const s=r.querySelector(".App-toolbar__extra-tools-trigger");s&&s.removeEventListener("click",b)}}},[u,g.language]);const G=l.useCallback(async()=>{var T,b,w;let e=p;if(!e||typeof e!="function"){const r=await Promise.resolve().then(()=>require("./layers.hW1VE-fv.js")).then(s=>s.index);e=r.exportToSvg||((T=r.default)==null?void 0:T.exportToSvg)||r.default,e&&typeof e=="function"&&(p=e)}if(!e||typeof e!="function"){const r=await Promise.resolve().then(()=>require("./layers.hW1VE-fv.js")).then(i=>i.index),s=r?Object.keys(r):[];throw console.error("Excalidraw module structure:",{keys:s,hasExportToSvg:r&&"exportToSvg"in r,hasDefault:r&&"default"in r,moduleType:typeof r,module:r}),new Error(`exportToSvg is not available from @excalidraw/excalidraw. Module keys: ${s.join(", ")}. Please ensure @excalidraw/excalidraw is properly installed.`)}const x=((b=n==null?void 0:n.getAppState)==null?void 0:b.call(n))??d,o=await e({appState:x,elements:h,files:C}),v=(w=o==null?void 0:o.firstElementChild)==null?void 0:w.firstElementChild,y=o.getAttribute("viewBox");if(y!=null){const r=y.split(" ");o.setAttribute("width",r[2]),o.setAttribute("height",r[3])}return v&&v.tagName==="style"&&v.remove(),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("display","block"),o.classList.add("excalidraw-svg"),o.outerHTML},[h,C,n,d]),V=()=>{if(h&&h.filter(e=>!e.isDeleted).length>0){const e=n==null?void 0:n.getAppState(),x={exportBackground:e==null?void 0:e.exportBackground,exportScale:e==null?void 0:e.exportScale,exportWithDarkMode:(e==null?void 0:e.theme)==="dark",isBindingEnabled:e==null?void 0:e.isBindingEnabled,isLoading:e==null?void 0:e.isLoading,name:e==null?void 0:e.name,theme:e==null?void 0:e.theme,viewBackgroundColor:e==null?void 0:e.viewBackgroundColor,viewModeEnabled:e==null?void 0:e.viewModeEnabled,zenModeEnabled:e==null?void 0:e.zenModeEnabled,zoom:e==null?void 0:e.zoom};(async()=>{const o=await G();a(h,x,C,o)})()}else L()},F=(e,x,o)=>{(e==null?void 0:e.length)!==(t==null?void 0:t.length)&&(D.current=!0),W(e),z(o)};return c.jsx(H.BottomDrawerWithoutHeader,{opened:u,onClose:q,onSave:V,className:"excaildraw-modal",closeOnEscape:!1,children:_&&c.jsx(l.Suspense,{fallback:c.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",minHeight:"400px"},children:c.jsx(m.Loader,{size:"sm"})}),children:c.jsx(X,{langCode:U[g.language],theme:N,onChange:F,excalidrawAPI:A,initialData:{appState:{...d||{isLoading:!1}},elements:t,files:f}})})})}exports.ConfirmModal=I;exports.ExcalidrawModal=P;exports.parseExcalidrawData=K;
|
package/dist/layers.BMp5iGOc.js
DELETED
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as X } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as Z, useState as u, useContext as K, useEffect as g } from "react";
|
|
3
|
-
import { useTranslation as ee } from "react-i18next";
|
|
4
|
-
import { useLexicalComposerContext as te } from "@lexical/react/LexicalComposerContext";
|
|
5
|
-
import { LoadingOverlay as ie } from "@mantine/core";
|
|
6
|
-
import { $getNodeByKey as E, COMMAND_PRIORITY_LOW as oe, $setSelection as ae } from "lexical";
|
|
7
|
-
import { showErrorNotification as ne } from "@layers-app/shared";
|
|
8
|
-
import { u as se, C as re, m as P, a as le, b as de, $ as L, c as he, d as ge, U as ue, I as fe, E as me, R as ce, p as T } from "./layers.TUNPmk3M.js";
|
|
9
|
-
const F = (t) => {
|
|
10
|
-
const {
|
|
11
|
-
width: f,
|
|
12
|
-
height: n,
|
|
13
|
-
isLoading: d,
|
|
14
|
-
isError: b,
|
|
15
|
-
src: m,
|
|
16
|
-
id: c,
|
|
17
|
-
altText: p,
|
|
18
|
-
imageRef: I,
|
|
19
|
-
maxWidth: h
|
|
20
|
-
} = t;
|
|
21
|
-
return /* @__PURE__ */ X(
|
|
22
|
-
"div",
|
|
23
|
-
{
|
|
24
|
-
className: "media-wrapper",
|
|
25
|
-
style: {
|
|
26
|
-
width: f,
|
|
27
|
-
height: n,
|
|
28
|
-
display: "inline-flex",
|
|
29
|
-
position: "relative"
|
|
30
|
-
},
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ l(
|
|
33
|
-
ie,
|
|
34
|
-
{
|
|
35
|
-
visible: d,
|
|
36
|
-
zIndex: 1e3,
|
|
37
|
-
overlayProps: { backgroundOpacity: 0.5 },
|
|
38
|
-
loaderProps: { size: 24, color: "black" }
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ l(
|
|
42
|
-
pe,
|
|
43
|
-
{
|
|
44
|
-
className: null,
|
|
45
|
-
src: m,
|
|
46
|
-
altText: p,
|
|
47
|
-
imageRef: I,
|
|
48
|
-
width: "inherit",
|
|
49
|
-
height: "inherit",
|
|
50
|
-
maxWidth: h || "auto",
|
|
51
|
-
id: c
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
function pe({
|
|
59
|
-
altText: t,
|
|
60
|
-
className: f,
|
|
61
|
-
imageRef: n,
|
|
62
|
-
src: d,
|
|
63
|
-
width: b,
|
|
64
|
-
height: m,
|
|
65
|
-
maxWidth: c,
|
|
66
|
-
id: p
|
|
67
|
-
}) {
|
|
68
|
-
const [I, h] = u(!1);
|
|
69
|
-
return /* @__PURE__ */ l(
|
|
70
|
-
"img",
|
|
71
|
-
{
|
|
72
|
-
className: `${f || void 0} ${I ? "" : "loading"}`,
|
|
73
|
-
src: d,
|
|
74
|
-
alt: t,
|
|
75
|
-
ref: n,
|
|
76
|
-
style: {
|
|
77
|
-
height: m,
|
|
78
|
-
maxWidth: c,
|
|
79
|
-
width: b
|
|
80
|
-
},
|
|
81
|
-
onLoad: () => {
|
|
82
|
-
d.includes("splash") ? setTimeout(() => {
|
|
83
|
-
h(!0);
|
|
84
|
-
}, 100) : h(!0);
|
|
85
|
-
},
|
|
86
|
-
draggable: "false",
|
|
87
|
-
"data-id": p
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
function Le({
|
|
92
|
-
src: t,
|
|
93
|
-
altText: f,
|
|
94
|
-
nodeKey: n,
|
|
95
|
-
width: d,
|
|
96
|
-
height: b,
|
|
97
|
-
maxWidth: m,
|
|
98
|
-
showCaption: c,
|
|
99
|
-
caption: p,
|
|
100
|
-
id: I,
|
|
101
|
-
create: h,
|
|
102
|
-
alignment: j
|
|
103
|
-
}) {
|
|
104
|
-
var D, H;
|
|
105
|
-
const R = Z(null), [x, w] = u(!0), [r] = te(), [C, W] = u(!0), [s, A] = u({
|
|
106
|
-
width: 0,
|
|
107
|
-
height: 0
|
|
108
|
-
}), { start: B, cancel: G } = se(), [V, M] = u(0), { fetchUploadMedia: O, fetchDeleteMedia: z, maxFileSize: Ie } = K(re), N = P.has(t) && (((D = P.get(t)) == null ? void 0 : D.mediaNodeKeys.length) === 0 || ((H = P.get(t)) == null ? void 0 : H.mediaNodeKeys.length) === void 0 || t.trim() === ""), { t: S } = ee(), [we, Y] = u(0);
|
|
109
|
-
g(() => r.registerDecoratorListener(() => {
|
|
110
|
-
Y((e) => e + 1);
|
|
111
|
-
}), [N]), g(() => {
|
|
112
|
-
if (!t || t.startsWith("data:image/") || !t.trim()) {
|
|
113
|
-
w(!1);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
const e = new Image();
|
|
117
|
-
e.src = t, e.onload = () => w(!1), e.onerror = () => {
|
|
118
|
-
w(!1);
|
|
119
|
-
};
|
|
120
|
-
}, [t, N]);
|
|
121
|
-
const q = (e, o) => {
|
|
122
|
-
r.update(() => {
|
|
123
|
-
ae(null);
|
|
124
|
-
const i = E(n);
|
|
125
|
-
L(i) && i.setWidthAndHeight(e, o);
|
|
126
|
-
});
|
|
127
|
-
}, { historyState: U } = le(), {
|
|
128
|
-
settings: { showNestedEditorTreeView: k }
|
|
129
|
-
} = de(), [y, v] = u(!1);
|
|
130
|
-
function J(e) {
|
|
131
|
-
return e.endsWith(".svg") || e.includes("image/svg+xml");
|
|
132
|
-
}
|
|
133
|
-
function Q(e) {
|
|
134
|
-
return new Promise((o, i) => {
|
|
135
|
-
if (J(e)) {
|
|
136
|
-
o(0);
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
const a = new Image();
|
|
140
|
-
a.src = e, a.onload = () => {
|
|
141
|
-
o(a.width);
|
|
142
|
-
}, a.onerror = () => {
|
|
143
|
-
i(new Error("Failed to load image"));
|
|
144
|
-
};
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
g(() => {
|
|
148
|
-
h && v(!0);
|
|
149
|
-
}, [h]), g(() => {
|
|
150
|
-
let e = d, o = b, i = 100;
|
|
151
|
-
(t.includes("unsplash") ? t.trim() : !N && t.trim() || t.includes("upload-src-editor")) && t !== "upload" && Q(t).then((a) => {
|
|
152
|
-
typeof e == "number" && e < i && a < i ? (W(!0), A({
|
|
153
|
-
width: e,
|
|
154
|
-
height: o
|
|
155
|
-
})) : a < i ? (W(!0), A({
|
|
156
|
-
width: "auto",
|
|
157
|
-
height: "auto"
|
|
158
|
-
})) : (A({
|
|
159
|
-
width: a,
|
|
160
|
-
height: a
|
|
161
|
-
}), W(!1));
|
|
162
|
-
}).catch((a) => {
|
|
163
|
-
console.warn("Ошибка при загрузке изображения:", a.message);
|
|
164
|
-
});
|
|
165
|
-
}, [t, N]), g(() => {
|
|
166
|
-
s.width && s.height && C && r.update(() => {
|
|
167
|
-
const e = E(n);
|
|
168
|
-
L(e) && e.setWidthAndHeight(s.width, s.height);
|
|
169
|
-
});
|
|
170
|
-
}, [s.width, s.height, C]), g(() => {
|
|
171
|
-
if (y)
|
|
172
|
-
return he(), () => {
|
|
173
|
-
ge();
|
|
174
|
-
};
|
|
175
|
-
}, [y]), g(() => r.registerCommand(
|
|
176
|
-
ue,
|
|
177
|
-
(e) => (t === "upload" && $(e), !1),
|
|
178
|
-
oe
|
|
179
|
-
), [t, x]);
|
|
180
|
-
const _ = (e, o) => {
|
|
181
|
-
w(!1), r.update(() => {
|
|
182
|
-
const i = E(n);
|
|
183
|
-
L(i) && (i.setSrc(e), i.setId(o));
|
|
184
|
-
});
|
|
185
|
-
}, $ = (e) => {
|
|
186
|
-
w(!0);
|
|
187
|
-
const o = B();
|
|
188
|
-
O && O(
|
|
189
|
-
e[0],
|
|
190
|
-
(i, a) => {
|
|
191
|
-
_(i, a), M(0);
|
|
192
|
-
},
|
|
193
|
-
(i) => {
|
|
194
|
-
i && ne({
|
|
195
|
-
message: S("editor.gallery.errorFile")
|
|
196
|
-
}), M(0), _("", "");
|
|
197
|
-
},
|
|
198
|
-
o,
|
|
199
|
-
(i) => {
|
|
200
|
-
M(i);
|
|
201
|
-
}
|
|
202
|
-
);
|
|
203
|
-
};
|
|
204
|
-
return !t || t === "upload" ? /* @__PURE__ */ l(
|
|
205
|
-
fe,
|
|
206
|
-
{
|
|
207
|
-
uploading: !1,
|
|
208
|
-
onUpload: (e) => {
|
|
209
|
-
!O || !e.length || ($(e), v(!1));
|
|
210
|
-
},
|
|
211
|
-
popoverProps: {
|
|
212
|
-
opened: y,
|
|
213
|
-
position: "bottom",
|
|
214
|
-
onChange: v
|
|
215
|
-
},
|
|
216
|
-
onChange: (e) => {
|
|
217
|
-
v(!1), r.update(() => {
|
|
218
|
-
const o = E(n);
|
|
219
|
-
L(o) && o.setSrc(e);
|
|
220
|
-
});
|
|
221
|
-
},
|
|
222
|
-
children: /* @__PURE__ */ l(
|
|
223
|
-
me,
|
|
224
|
-
{
|
|
225
|
-
title: S("editor.image.add_photo"),
|
|
226
|
-
icon: "photo",
|
|
227
|
-
onClick: () => v(!y),
|
|
228
|
-
isLoading: x,
|
|
229
|
-
progress: V,
|
|
230
|
-
onAfterCancel: () => {
|
|
231
|
-
G(), w(!1);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
)
|
|
235
|
-
}
|
|
236
|
-
) : C ? /* @__PURE__ */ l(
|
|
237
|
-
F,
|
|
238
|
-
{
|
|
239
|
-
width: s.width,
|
|
240
|
-
height: s.height,
|
|
241
|
-
isLoading: x,
|
|
242
|
-
isError: !1,
|
|
243
|
-
isIcon: C,
|
|
244
|
-
src: t,
|
|
245
|
-
id: I,
|
|
246
|
-
editor: r,
|
|
247
|
-
nodeKey: n,
|
|
248
|
-
fetchDeleteMedia: z,
|
|
249
|
-
altText: f,
|
|
250
|
-
imageRef: R,
|
|
251
|
-
maxWidth: m,
|
|
252
|
-
showCaption: c,
|
|
253
|
-
caption: p,
|
|
254
|
-
isCollabActive: !1,
|
|
255
|
-
historyState: U,
|
|
256
|
-
showNestedEditorTreeView: k,
|
|
257
|
-
t: S
|
|
258
|
-
}
|
|
259
|
-
) : /* @__PURE__ */ l(
|
|
260
|
-
ce,
|
|
261
|
-
{
|
|
262
|
-
editor: r,
|
|
263
|
-
isIcon: C,
|
|
264
|
-
width: T(d),
|
|
265
|
-
height: T(b),
|
|
266
|
-
initialWidth: s.width || "",
|
|
267
|
-
initialHeight: s.height || "",
|
|
268
|
-
onResizeEnd: q,
|
|
269
|
-
alignment: j,
|
|
270
|
-
children: /* @__PURE__ */ l(
|
|
271
|
-
F,
|
|
272
|
-
{
|
|
273
|
-
width: "inherit",
|
|
274
|
-
height: "inherit",
|
|
275
|
-
isLoading: x,
|
|
276
|
-
isError: !1,
|
|
277
|
-
isIcon: C,
|
|
278
|
-
src: t,
|
|
279
|
-
id: I,
|
|
280
|
-
editor: r,
|
|
281
|
-
nodeKey: n,
|
|
282
|
-
fetchDeleteMedia: z,
|
|
283
|
-
altText: f,
|
|
284
|
-
imageRef: R,
|
|
285
|
-
maxWidth: m,
|
|
286
|
-
showCaption: c,
|
|
287
|
-
caption: p,
|
|
288
|
-
isCollabActive: !1,
|
|
289
|
-
historyState: U,
|
|
290
|
-
showNestedEditorTreeView: k,
|
|
291
|
-
t: S
|
|
292
|
-
}
|
|
293
|
-
)
|
|
294
|
-
}
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
export {
|
|
298
|
-
Le as default
|
|
299
|
-
};
|
package/dist/layers.Bmf-iA5d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("react"),T=require("react-dom"),d=require("./layers.DYInS_N4.js"),$=require("@lexical/react/LexicalComposerContext"),R=require("@lexical/react/LexicalErrorBoundary"),H=require("@lexical/react/useLexicalEditable"),E=require("@mantine/core"),b=require("lexical"),F=require("./layers.R8mPlCA0.js");function P({equation:s,inline:a,onDoubleClick:c}){const r=o.useRef(null);return o.useEffect(()=>{const l=r.current;l!==null&&F.default.render(s,l,{displayMode:!a,errorColor:"#cc0000",output:"html",strict:"warn",throwOnError:!1,trust:!1})},[s,a]),n.jsxs(n.Fragment,{children:[n.jsx("img",{src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",width:0,height:0,alt:""}),n.jsx("span",{role:"button",tabIndex:-1,onDoubleClick:c,ref:r}),n.jsx("img",{src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",width:0,height:0,alt:""})]})}let I=!1;const N=new Map;function z(s){I||(I=!0,s.registerCommand(d.OPEN_EQUATION_POPUP_COMMAND,a=>{const c=N.get(a);return c?(c(),!0):!1},b.COMMAND_PRIORITY_EDITOR))}function G({equation:s,inline:a,nodeKey:c}){const[r]=$.useLexicalComposerContext(),l=H.useLexicalEditable(),p=o.useRef(null),_=o.useRef(null),[A,C]=o.useState(s),[u,f]=o.useState(!1),[v,L]=o.useState({top:0,left:0}),[O,y]=o.useState(!1),g=o.useCallback(()=>{const e=p.current;if(!e)return;const i=(e.closest(".editor-equation")||e).getBoundingClientRect();L({top:i.bottom+18,left:i.left}),y(!0)},[]);o.useEffect(()=>{z(r)},[r]),o.useEffect(()=>{const e=()=>{l&&f(!0)};return N.set(c,e),()=>{N.delete(c)}},[l,c]);const m=o.useCallback(()=>{if(l){if(u){f(!1);return}g(),f(!0)}},[l,u,g]),q=o.useCallback(()=>{const e=A.trim();r.update(()=>{const t=b.$getNodeByKey(c);if(d.$isEquationNode(t)){if(t.isInline&&t.isInline()&&e===""){t.remove();return}t.setEquation(e)}}),f(!1)},[r,c,A]),j=o.useCallback(()=>{if(!s&&a){r.update(()=>{const e=b.$getNodeByKey(c);d.$isEquationNode(e)&&e.remove()}),f(!1);return}C(s),s&&f(!1)},[r,s,a,c]);o.useEffect(()=>{u||C(s)},[s,u]),o.useEffect(()=>{if(!u){y(!1);return}d.blockScroll(),g();const e=window.requestAnimationFrame(()=>{const t=_.current;if(!t)return;const i=t.value.length;t.focus(),t.setSelectionRange(i,i)});return()=>{window.cancelAnimationFrame(e),d.unblockScroll()}},[u,g]),o.useEffect(()=>{if(!u)return;const e=t=>{const i=t.target,h=p.current,w=document.querySelector(".equation-block__popup");i&&(h!=null&&h.contains(i)||w instanceof HTMLElement&&w.contains(i))||(a&&!A.trim()&&r.update(()=>{const B=b.$getNodeByKey(c);d.$isEquationNode(B)&&B.remove()}),f(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[r,a,u,c,A]);const x=(u?A:s).trim(),k=x.length>0;o.useEffect(()=>{const e=p.current;if(!e)return;const t=e.closest(".editor-equation"),i=x;if(t){if(!i){t.removeAttribute("data-lexical-equation");return}try{const h=btoa(unescape(encodeURIComponent(i)));t.setAttribute("data-lexical-equation",h)}catch{t.setAttribute("data-lexical-equation",i)}}},[x]);const S=a&&!l?n.jsx("span",{className:"equation-inline-trigger",children:n.jsx(R.LexicalErrorBoundary,{onError:e=>{var t;return(t=r._onError)==null?void 0:t.call(r,e)},children:n.jsx(P,{equation:s,inline:a,onDoubleClick:m})})}):a?n.jsx("span",{className:`equation-inline-trigger${k?"":" equation-inline-trigger--empty"}`,onClick:m,ref:p,children:k?n.jsx(R.LexicalErrorBoundary,{onError:e=>{var t;return(t=r._onError)==null?void 0:t.call(r,e)},children:n.jsx(P,{equation:x,inline:a,onDoubleClick:m})}):n.jsxs("span",{className:"equation-inline-placeholder",children:[n.jsx(d.HugeiconsIcon,{icon:d.$tr,size:24}),n.jsx("span",{children:"New equation"})]})}):n.jsx("div",{className:"equation-block",ref:p,children:n.jsx("div",{className:"equation-block__container",onClick:m,style:{cursor:l?"pointer":"default"},children:k?n.jsx(R.LexicalErrorBoundary,{onError:e=>{var t;return(t=r._onError)==null?void 0:t.call(r,e)},children:n.jsx(P,{equation:x,inline:a,onDoubleClick:m})}):n.jsx("div",{className:"equation-block__placeholder",children:"Add a TeX equation"})})}),D=o.useCallback(e=>{e.stopPropagation(),C(e.currentTarget.value)},[]),M=o.useCallback(d.createPopupKeyDownHandler({onConfirm:q,onCancel:j}),[q,j]);return n.jsxs(n.Fragment,{children:[S,u&&O&&T.createPortal(n.jsx("div",{className:"equation-block__popup",style:{position:"fixed",top:v.top,left:v.left,zIndex:400},children:n.jsxs("div",{className:"equation-block__editor",children:[n.jsx(E.Textarea,{autosize:!0,minRows:2,variant:"unstyled",value:A,onChange:D,onKeyDown:M,placeholder:"x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}",classNames:{wrapper:"equation-block__textarea-wrapper"},autoFocus:!0,ref:_}),n.jsxs(E.Group,{justify:"flex-end",gap:"sm",children:[n.jsx(E.Button,{variant:"subtle",color:"gray",onClick:j,children:"Cancel"}),n.jsx(E.Button,{onClick:q,children:"Save"})]})]})}),document.body)]})}exports.default=G;
|
package/dist/layers.BnRGHX9R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),B=require("@lexical/react/LexicalComposerContext"),P=require("@lexical/react/useLexicalEditable"),Y=require("@lexical/react/useLexicalNodeSelection"),W=require("@lexical/utils"),a=require("lexical"),c=require("./layers.DYInS_N4.js"),v=require("./layers.BK6Aif4E.js"),F=require("react-i18next"),C=require("@mantine/core"),G=require("@tabler/icons-react");function H({imageContainerRef:n,editor:u,rootClassName:S=null,width:N="inherit",height:h="inherit",nodeKey:e,alignment:E,setModalOpen:d,previewSVG:M}){const O=i.useMemo(()=>M??"",[M]),[f,j]=i.useState(!1),{t:x}=F.useTranslation(),b=(r,m)=>{u.update(()=>{a.$setSelection(null);const g=a.$getNodeByKey(e);return c.$isExcalidrawNode(g)&&g.setWidthAndHeight(r,m),!0})},I=()=>{c.deleteNode(u,e)};return s.jsx(c.ResizableContainer,{editor:u,isIcon:!1,isEmbed:!0,width:c.parseContainerSize(N),height:c.parseContainerSize(h),onResizeEnd:b,alignment:E,children:s.jsxs(C.Box,{className:"media-wrapper excaildraw",children:[s.jsxs("div",{className:"media-actions",children:[s.jsx(C.Tooltip,{label:x("editor.link.edit"),children:s.jsx(C.ActionIcon,{color:"gray","aria-label":"Settings",className:"media-action",variant:"default",size:24,onClick:()=>{d(!0)},children:s.jsx(G.IconEdit,{size:14})})}),s.jsx(c.AlignmentImage,{opened:f,setOpened:j,t:x,editor:u,nodeKey:e}),s.jsx(C.Tooltip,{label:x("editor.actions.delete"),children:s.jsx(C.ActionIcon,{color:"gray","aria-label":"Settings",className:"media-action",variant:"default",size:24,onClick:I,children:s.jsx(c.Icon,{name:"trash",size:"14"})})})]}),s.jsx(C.Box,{w:"100%",ref:r=>{r&&n&&(n.current=r)},className:S??"",dangerouslySetInnerHTML:{__html:O}})]})})}function V({nodeKey:n,data:u,width:S,height:N,alignment:h}){var q;const[e]=B.useLexicalComposerContext(),E=P.useLexicalEditable(),d=i.useMemo(()=>v.parseExcalidrawData(u),[u]),M=((q=d==null?void 0:d.elements)==null?void 0:q.length)===0&&!d.previewSVG,[O,f]=i.useState(M&&e.isEditable()),[j,x]=i.useState(!1),b=i.useRef(null),I=i.useRef(null),r=i.useRef(null),[m,g,R]=Y.useLexicalNodeSelection(n),w=i.useCallback(t=>(m&&(t.preventDefault(),e.update(()=>{const o=a.$getNodeByKey(n);o&&o.remove()})),!1),[e,m,n]);i.useEffect(()=>{if(!E){m&&R();return}return W.mergeRegister(e.registerCommand(a.CLICK_COMMAND,t=>{const o=I.current,p=t.target;return o!==null&&o.contains(p)?(t.shiftKey||R(),g(!m),t.detail>1&&f(!0),!0):!1},a.COMMAND_PRIORITY_LOW),e.registerCommand(a.KEY_DELETE_COMMAND,w,a.COMMAND_PRIORITY_LOW),e.registerCommand(a.KEY_BACKSPACE_COMMAND,w,a.COMMAND_PRIORITY_LOW))},[R,e,m,w,g,E]);const y=i.useCallback(()=>(f(!1),e.update(()=>{const t=a.$getNodeByKey(n);t&&t.remove()})),[e,n]),L=(t,o,p,A)=>e.update(()=>{const D=a.$getNodeByKey(n);c.$isExcalidrawNode(D)&&(t&&t.length>0||Object.keys(p).length>0?D.setData(JSON.stringify({appState:o,elements:t,files:p,previewSVG:A})):D.remove())}),{elements:l=[],files:k={},appState:T={},previewSVG:$}=d,_=i.useCallback(()=>{f(!1),x(!1),r.current=!1,(l==null?void 0:l.length)===0&&e.update(()=>{const t=a.$getNodeByKey(n);t&&t.remove()})},[e,n,l==null?void 0:l.length]),z=i.useCallback(()=>{r.current?x(!0):_()},[]);return s.jsxs(s.Fragment,{children:[s.jsx(v.ConfirmModal,{isCloseModal:j,confirmClose:_,setCloseModalOpen:x}),s.jsx(v.ExcalidrawModal,{initialElements:l,isEdited:r,initialFiles:k,initialAppState:T,isShown:O,onDelete:y,onClose:z,onSave:(t,o,p,A)=>{L(t,o,p,A),f(!1)},closeOnClickOutside:!1}),(l==null?void 0:l.length)&&s.jsx("div",{style:{display:"flex",justifyContent:h},children:s.jsx(H,{imageContainerRef:b,className:"image",width:S,height:N,editor:e,nodeKey:n,alignment:h,setModalOpen:f,previewSVG:$})})]})}exports.default=V;
|
package/dist/layers.BwMoLcEZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("react"),p=require("@lexical/react/LexicalComposerContext"),C=require("lexical"),l=require("./layers.DYInS_N4.js"),u=require("./layers.BK6Aif4E.js"),f=C.createCommand("INSERT_EXCALIDRAW_COMMAND");function A(){const[s]=p.useLexicalComposerContext(),[x,n]=t.useState(!1),[e,E]=t.useState(null),r=t.useRef(null),[M,i]=t.useState(!1);t.useEffect(()=>{if(!s.hasNodes([l.ExcalidrawNode]))throw new Error("ExcalidrawPlugin: ExcalidrawNode not registered on editor");return s.registerCommand(f,()=>{n(!0);const a=l.getCurrentElement();return E(a),!0},C.COMMAND_PRIORITY_EDITOR)},[s]);const c=()=>{n(!1),i(!1),r.current=!1},m=()=>{r.current?i(!0):c()},O=()=>{n(!1)},N=(a,S,R,g)=>{s.update(()=>{const d=l.$createExcalidrawNode();d.setData(JSON.stringify({appState:S,elements:a,files:R,previewSVG:g})),e&&e.getParent()&&(e==null||e.replace(d))}),n(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(u.ConfirmModal,{isCloseModal:M,confirmClose:c,setCloseModalOpen:i}),o.jsx(u.ExcalidrawModal,{initialElements:[],initialAppState:{},initialFiles:{},isShown:x,onDelete:O,onClose:m,onSave:N,closeOnClickOutside:!1,isEdited:r})]})}exports.INSERT_EXCALIDRAW_COMMAND=f;exports.default=A;
|