@layers-app/editor 0.7.15 → 0.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +77 -1
- package/dist/index.js +15 -9
- package/dist/{layers.BQfSzTMx.js → layers.-fM6L_z3.js} +1 -1
- package/dist/{layers.BHcs7CqU.js → layers.0KANPDnB.js} +1 -1
- package/dist/{layers.DW62kNPb.js → layers.1Nv-nANB.js} +9 -6
- package/dist/layers.1bdyQGVP.js +8 -0
- package/dist/{layers.D3Vd3dna.js → layers.49H_5LNr.js} +1 -1
- package/dist/{layers.DEBfJf6Q.js → layers.4HZb3jXk.js} +1 -1
- package/dist/{layers.DZ1-iKEC.js → layers.4RmaHEsu.js} +1 -1
- package/dist/{layers.DB1s8GND.js → layers.5WzirB7G.js} +1 -1
- package/dist/{layers.C2Snani7.js → layers.5bSjIKfg.js} +1 -1
- package/dist/{layers.DWpXde7j.js → layers.7oLFJZ8l.js} +1 -1
- package/dist/{layers.D5TYe_t6.js → layers.7xkZRnuM.js} +1 -1
- package/dist/{layers.D3GALwgA.js → layers.ABhWEnmQ.js} +1 -1
- package/dist/{layers.DF6gld-u.js → layers.B-8gEV_E.js} +3 -3
- package/dist/{layers.Coz7xkYs.js → layers.B-9QQMGw.js} +1 -1
- package/dist/{layers.D17Dmom7.js → layers.B0sBopW9.js} +1 -1
- package/dist/{layers.Bc5nZC3Y.js → layers.B1ySJNCM.js} +1 -1
- package/dist/{layers.DsHK2Ar2.js → layers.B2BhJZ0D.js} +1 -1
- package/dist/{layers.C8f8Dvmj.js → layers.B2iVWMcm.js} +1 -1
- package/dist/{layers.B-uN2dv6.js → layers.B6Va7v9s.js} +1 -1
- package/dist/layers.B82wcYq0.js +271 -0
- package/dist/{layers.D-ozIqh2.js → layers.BAU0IeY7.js} +1 -1
- package/dist/layers.BCD7sjs8.js +1 -0
- package/dist/{layers.CP8mkVAF.js → layers.BEUJQJGq.js} +1 -1
- package/dist/{layers.NAvAltHE.js → layers.BGDCJs-p.js} +1 -1
- package/dist/{layers.BBTHDb_P.js → layers.BHz2k1im.js} +1 -1
- package/dist/{layers.mA-ZoRCk.js → layers.BIM8NeWS.js} +1 -1
- package/dist/{layers.BGG2KrZD.js → layers.BIbdMSbX.js} +92 -89
- package/dist/{layers.DJK9E0iz.js → layers.BJhjIY5r.js} +1 -1
- package/dist/{layers.q9n8pS5N.js → layers.BJmaj5SY.js} +1 -1
- package/dist/{layers.BaZPyxUt.js → layers.BKy18lBk.js} +1 -1
- package/dist/{layers.AmrlbWu1.js → layers.BL3wEq7M.js} +1 -1
- package/dist/{layers.Dxu3Xyi3.js → layers.BLKD1Tiy.js} +1 -1
- package/dist/{layers.NsLqNUEF.js → layers.BNR6f37h.js} +1 -1
- package/dist/{layers.DPxVCpug.js → layers.BNkwxNgt.js} +1 -1
- package/dist/layers.BOMC5c1j.js +2 -0
- package/dist/{layers.Bd22pBlW.js → layers.BQL01Vq6.js} +1 -1
- package/dist/{layers.C99Cexqw.js → layers.BQm21WlP.js} +1 -1
- package/dist/{layers.qGNJ--WQ.js → layers.BRGRJfuK.js} +1 -1
- package/dist/{layers.oVkUiGD5.js → layers.BXDV2XaW.js} +1 -1
- package/dist/{layers.Clg4qKJE.js → layers.B_Vwa8Hx.js} +1 -1
- package/dist/{layers.B69R6aNe.js → layers.B_jUVHTe.js} +1 -1
- package/dist/{layers.fMORkKD1.js → layers.BakV9gnD.js} +1 -1
- package/dist/{layers.CMeoX_6d.js → layers.BbbyE_Pc.js} +1 -1
- package/dist/{layers.Cyriz6h0.js → layers.Bd6ptC9U.js} +1 -1
- package/dist/{layers.Dvj9GF2t.js → layers.BeCuix4V.js} +1 -1
- package/dist/{layers.BqwXjSdW.js → layers.BeFEsW5q.js} +1 -1
- package/dist/{layers.DTpQsyHL.js → layers.BfVGjstp.js} +1 -1
- package/dist/{layers.tKYD6YFQ.js → layers.BgEbqAdb.js} +3 -3
- package/dist/{layers.Cf3UeiB-.js → layers.Bk40urId.js} +3 -3
- package/dist/{layers.Dl2HBQxC.js → layers.Blc4R7F2.js} +1 -1
- package/dist/{layers.D7rWRjC3.js → layers.Bny7BWT9.js} +1 -1
- package/dist/layers.Bpnbfq-r.js +1 -0
- package/dist/{layers.CxdXwrxt.js → layers.BrbcqGdA.js} +11 -8
- package/dist/{layers.B5bpf_7p.js → layers.BvGgfImM.js} +7 -7
- package/dist/{layers.DYpK4YMg.js → layers.BywviGiP.js} +1 -1
- package/dist/layers.C-_ynqvr.js +1 -0
- package/dist/{layers.CfQfH2uJ.js → layers.C1actZbK.js} +1 -1
- package/dist/{layers.BUVnl6Le.js → layers.C3DRx9On.js} +4 -4
- package/dist/{layers.KwB0GlFE.js → layers.C3SAUwXb.js} +1 -1
- package/dist/{layers.BRERX0Ta.js → layers.C3yLkCio.js} +1 -1
- package/dist/layers.C6fD5O8g.js +6 -0
- package/dist/{layers.CChpNaZS.js → layers.C8YD8pwl.js} +1 -1
- package/dist/{layers.CZ1OaFnb.js → layers.C92R-ENv.js} +1 -1
- package/dist/layers.C9QCrDzm.js +1 -0
- package/dist/{layers.CmhjLkPQ.js → layers.C9_vX7IO.js} +3 -3
- package/dist/{layers.BleViEhx.js → layers.CA_fw2Dw.js} +1 -1
- package/dist/layers.CB61rfHO.js +1225 -0
- package/dist/{layers.DKXsz8De.js → layers.CCur6VEj.js} +2 -2
- package/dist/{layers.ymjb604H.js → layers.CFLfRAu0.js} +2 -2
- package/dist/{layers.nZCdSvk1.js → layers.CFcHk-z5.js} +7 -4
- package/dist/{layers.DKW7xVDB.js → layers.CFmNZSAJ.js} +1 -1
- package/dist/{layers.CnNiivey.js → layers.CGajZ1Yz.js} +1 -1
- package/dist/{layers.DtSwBGHi.js → layers.CHhFVTiW.js} +1 -1
- package/dist/{layers.CxgVGyGF.js → layers.CJ1YRhUh.js} +1 -1
- package/dist/{layers.BKe6olqL.js → layers.CJtE2LxP.js} +227 -224
- package/dist/{layers.BiR2CF-2.js → layers.CJyO2xrs.js} +1 -1
- package/dist/{layers.CoQmjZ4J.js → layers.CMyb9_FE.js} +1 -1
- package/dist/{layers.DXEokfvb.js → layers.COjckA33.js} +1 -1
- package/dist/{layers.DveaDpN8.js → layers.CPJSmpbw.js} +1 -1
- package/dist/{layers.DSl-zfQT.js → layers.CQvaw3yb.js} +1 -1
- package/dist/{layers.3fYhTnFF.js → layers.CRht5Nqq.js} +17 -14
- package/dist/{layers.D8UT-P1H.js → layers.CSXAHvGG.js} +1 -1
- package/dist/{layers.-HEzHycj.js → layers.CTaitOnb.js} +1 -1
- package/dist/{layers.DekD8orP.js → layers.CV8UgwCq.js} +36 -36
- package/dist/{layers.Cz9QvGey.js → layers.CVJOismf.js} +1 -1
- package/dist/{layers.CCH5qSih.js → layers.CXWtqfTe.js} +10 -7
- package/dist/layers.CYPfnKfS.js +96 -0
- package/dist/{layers.B00-1iAV.js → layers.CYdP1IhC.js} +1 -1
- package/dist/{layers.D3j9uNzd.js → layers.CYneLciB.js} +13 -10
- package/dist/layers.CZLVHOh5.js +8 -0
- package/dist/{layers.BE-zaOC2.js → layers.CbBTbZIx.js} +1 -1
- package/dist/layers.CcP6Z-gZ.js +118 -0
- package/dist/{layers.qhcxehdz.js → layers.CcTyCqqv.js} +1 -1
- package/dist/{layers.sLOyQZcV.js → layers.Cd3kGFCJ.js} +1 -1
- package/dist/{layers.Dbb-j6ep.js → layers.Ce7-wBOK.js} +1 -1
- package/dist/{layers.cM9zXLVC.js → layers.Cf5sVqJX.js} +1 -1
- package/dist/{layers.JEEhIg0m.js → layers.CfISeAkt.js} +86 -84
- package/dist/{layers.Dlplq5Vl.js → layers.Cg3Hqyp6.js} +1 -1
- package/dist/{layers.CXfyEibx.js → layers.Cg60w1Fn.js} +7 -4
- package/dist/layers.Chd1p2rt.js +26645 -0
- package/dist/{layers.Bv10AxGq.js → layers.CiTNX3uh.js} +1 -1
- package/dist/{layers.DYLSrRDw.js → layers.CkwenT1M.js} +1 -1
- package/dist/{layers.Dq67pw8V.js → layers.CnN8JfiX.js} +9 -6
- package/dist/{layers.Y0IKjrt2.js → layers.Coh6z7rV.js} +1 -1
- package/dist/{layers.ae6QjKlD.js → layers.CpJSdiMb.js} +1 -1
- package/dist/{layers.D_ZNOxp7.js → layers.Cryqj610.js} +8 -5
- package/dist/{layers.CTCi1Zya.js → layers.Cs-83js7.js} +1 -1
- package/dist/{layers.7OvdxGRE.js → layers.CsivQuv1.js} +1 -1
- package/dist/{layers.DGBPtrAj.js → layers.Cud-IArB.js} +1 -1
- package/dist/{layers.DB79nMwy.js → layers.CwL02t3J.js} +1 -1
- package/dist/{layers.iQx1OnXH.js → layers.CwsNJfmi.js} +1 -1
- package/dist/{layers.D2ept2hx.js → layers.CxIhyFb7.js} +6 -2
- package/dist/{layers.CDED3tG-.js → layers.Cxh-oez0.js} +6 -6
- package/dist/layers.D-uio-rN.js +423 -0
- package/dist/{layers.QbyGQk-s.js → layers.D0RX234F.js} +1 -1
- package/dist/{layers.BcdD4Kub.js → layers.D176Ljko.js} +1 -1
- package/dist/{layers.8-443yyd.js → layers.D2cVaX5z.js} +20 -17
- package/dist/layers.D4Bw_BrO.js +1 -0
- package/dist/{layers.1nXpKAJ2.js → layers.D8fFj0P_.js} +1 -1
- package/dist/{layers.b-XvW4-V.js → layers.D9N3lSue.js} +6 -6
- package/dist/{layers.DqIJvqbu.js → layers.DAmxkO9p.js} +1 -1
- package/dist/{layers.vSt9xurF.js → layers.DBwG7x-W.js} +1 -1
- package/dist/{layers.DC-Esj9C.js → layers.DDFbkCJT.js} +1 -1
- package/dist/{layers.DZNtacAC.js → layers.DDnI7-13.js} +1 -1
- package/dist/{layers.XqsjM4Js.js → layers.DE6w34F3.js} +1 -1
- package/dist/{layers.0Ig7SAGH.js → layers.DEaAvR_W.js} +18 -15
- package/dist/{layers.rigCtjVk.js → layers.DEtMl_i3.js} +1 -1
- package/dist/{layers.D5aMPhta.js → layers.DHNIckw6.js} +1 -1
- package/dist/layers.DHVcgZzL.js +257 -0
- package/dist/{layers.iA_Fgo9z.js → layers.DHcbExrH.js} +3 -3
- package/dist/{layers.CyNyXxvj.js → layers.DIpDvY-A.js} +1 -1
- package/dist/{layers.DuDf1ezU.js → layers.DJM_OF_R.js} +1 -1
- package/dist/{layers.LqgkRSDx.js → layers.DLJtS0JJ.js} +1 -1
- package/dist/{layers.DQ9tLViO.js → layers.DNJtYtN1.js} +1 -1
- package/dist/layers.DUlTmlus.js +213 -0
- package/dist/{layers.BP0cLCdC.js → layers.DUutOP8h.js} +1 -1
- package/dist/{layers.BHNil4iz.js → layers.DVWaIKgr.js} +12 -9
- package/dist/{layers.B7KSJCCk.js → layers.D_WwW4Fn.js} +1 -1
- package/dist/{layers.Bv7vodST.js → layers.D_fPGQ6i.js} +1 -1
- package/dist/{layers.BzhWDlph.js → layers.D_faABvp.js} +3744 -3749
- package/dist/{layers.BvBoMXd2.js → layers.DaIprEGs.js} +1 -1
- package/dist/{layers.D4YtD7iL.js → layers.Db0NyGA-.js} +1 -1
- package/dist/{layers.CoSEj_NH.js → layers.DdMy9cRx.js} +7 -7
- package/dist/{layers.DHkz5z4N.js → layers.De35CioU.js} +1 -1
- package/dist/{layers.fMMLMI12.js → layers.DgO3Q5mW.js} +1 -1
- package/dist/{layers.DGBh4sVh.js → layers.Di-PcJK6.js} +1 -1
- package/dist/{layers.BBLGcPGg.js → layers.DjCXWv2m.js} +1 -1
- package/dist/{layers.CmyzESvD.js → layers.Dk2S8boy.js} +1 -1
- package/dist/{layers.CTlgEeVk.js → layers.DkBjWcDH.js} +8 -5
- package/dist/{layers.Se5UBbOF.js → layers.DnRaD217.js} +3231 -3814
- package/dist/{layers.CjVZz9BF.js → layers.DnvnGxUC.js} +1 -1
- package/dist/{layers.DZGTkrsO.js → layers.DrarpmaN.js} +7 -4
- package/dist/{layers.DTj0lXel.js → layers.DukGouVT.js} +1 -1
- package/dist/{layers.BbBLP9cJ.js → layers.DvYYNhUp.js} +1 -1
- package/dist/layers.Dv_6xN7s.js +2 -0
- package/dist/layers.DwWUZK6s.js +129 -0
- package/dist/{layers.DZRyTn6M.js → layers.DwzO2zcv.js} +1 -1
- package/dist/{layers.Da2uCCzT.js → layers.DzD-lWXV.js} +8 -5
- package/dist/{layers.BHv2-g4M.js → layers.E0TLXdrR.js} +1 -1
- package/dist/{layers.EMkoiu95.js → layers.EcqLW9Mh.js} +1 -1
- package/dist/{layers.CxUvO3nD.js → layers.F4d4ILBH.js} +95 -92
- package/dist/{layers.CSGRMqOI.js → layers.G3enfHRT.js} +1 -1
- package/dist/{layers.B7TEkwGs.js → layers.HFONz6O9.js} +4 -4
- package/dist/{layers.BlxPj2ft.js → layers.IUqwmZRd.js} +3 -3
- package/dist/{layers.HJGAV_6P.js → layers.IbJq0D6U.js} +1 -1
- package/dist/{layers.B6ZBiQ9y.js → layers.Ic3KgoPg.js} +1 -1
- package/dist/{layers.CMTtWk9r.js → layers.JNgL8WWu.js} +1 -1
- package/dist/{layers.0huivShe.js → layers.KT-QFgdb.js} +1 -1
- package/dist/{layers.DhJGs9D9.js → layers.LCfVvo3T.js} +1 -1
- package/dist/{layers.CxE_w_kd.js → layers.LR-nMBU_.js} +8 -5
- package/dist/layers.Qt2qr0-t.js +76 -0
- package/dist/{layers.DS6uH7WL.js → layers.R8mPlCA0.js} +1 -1
- package/dist/{layers.CrNTTDsw.js → layers.SCsPWeXb.js} +1 -1
- package/dist/{layers.BFh4kozj.js → layers.U4NCf2-l.js} +3 -3
- package/dist/{layers.B44wzkNx.js → layers.UewvnK33.js} +1 -1
- package/dist/{layers.CsC8UAA5.js → layers.VfVZmEbK.js} +1 -1
- package/dist/{layers.Bxqbtq5y.js → layers.Vh-KvhZg.js} +1 -1
- package/dist/{layers.LSr3ZSq0.js → layers.Y3D9xjCC.js} +1 -1
- package/dist/{layers.DXl6OGkS.js → layers.YT6D6D2x.js} +1 -1
- package/dist/{layers.DMlO9Mu6.js → layers._y8hExIw.js} +9 -6
- package/dist/layers.a8-4vDzD.js +22 -0
- package/dist/{layers.CfFB1Jdb.js → layers.aGzHUJ1W.js} +4 -4
- package/dist/{layers.C6SjTJMZ.js → layers.b9B2NY7n.js} +2 -2
- package/dist/{layers.Cc0Vj494.js → layers.ck9pUJ0W.js} +1 -1
- package/dist/{layers.2QIBFyz0.js → layers.d3HoUueQ.js} +1 -1
- package/dist/layers.dWB4bggP.js +1 -0
- package/dist/{layers.DXSG6UTB.js → layers.dh8xLSwh.js} +1 -1
- package/dist/{layers.Csay1TY9.js → layers.eT_ZPmHS.js} +1 -1
- package/dist/{layers.DFPipsvw.js → layers.fumrrA0i.js} +3 -3
- package/dist/{layers.oMvas05W.js → layers.gVfRcFrJ.js} +1 -1
- package/dist/{layers.CBhNW4x3.js → layers.js7-Kn9p.js} +1 -1
- package/dist/{layers.D2kxkk3M.js → layers.kW7XFPN_.js} +1 -1
- package/dist/layers.mobYTQXI.js +1 -0
- package/dist/{layers.2FGRH0to.js → layers.mvotlTNZ.js} +1 -1
- package/dist/{layers.Br03igaE.js → layers.n1dibO8I.js} +1 -1
- package/dist/layers.nRPZ1e3g.js +1 -0
- package/dist/layers.o2u1uDM3.js +1 -0
- package/dist/layers.oJ31-KOl.js +6 -0
- package/dist/{layers.BaF5V6eT.js → layers.ojcNGNgi.js} +1 -1
- package/dist/{layers.C14IhTUb.js → layers.otxU0wtq.js} +1 -1
- package/dist/layers.rE9xnPLC.js +1 -0
- package/dist/{layers.YCN45krj.js → layers.s0KLXd5N.js} +1 -1
- package/dist/{layers.CXMTQ4Qs.js → layers.sqH5TpK8.js} +1 -1
- package/dist/{layers.Cic_oB60.js → layers.t_MFWlU6.js} +1 -1
- package/dist/{layers.2rBPbs2X.js → layers.xrt74v23.js} +1 -1
- package/dist/{layers.eqg2Wrbo.js → layers.zNb0110W.js} +1 -1
- package/package.json +24 -23
- package/dist/layers.1BQdieb-.js +0 -198
- package/dist/layers.B8bQ9R7v.js +0 -1
- package/dist/layers.BEoiYZ9C.js +0 -2
- package/dist/layers.BEwSO8pM.js +0 -118
- package/dist/layers.BRp0FVsS.js +0 -1
- package/dist/layers.Bbe25s3_.js +0 -1
- package/dist/layers.BkR5zRHn.js +0 -2
- package/dist/layers.BkpzTL2k.js +0 -1
- package/dist/layers.BqIIcYfB.js +0 -1
- package/dist/layers.BxEWWb9m.js +0 -96
- package/dist/layers.C4sqTK_F.js +0 -1
- package/dist/layers.CQIsVcwC.js +0 -6
- package/dist/layers.CTRdszML.js +0 -208
- package/dist/layers.CqT_gss2.js +0 -48035
- package/dist/layers.CsWTu1pX.js +0 -1
- package/dist/layers.CslnYMwL.js +0 -1
- package/dist/layers.CxWy2u81.js +0 -257
- package/dist/layers.D8q8EQ25.js +0 -19
- package/dist/layers.DSizcPmk.js +0 -304
- package/dist/layers.DrCX7uk-.js +0 -1
- package/dist/layers.DwoR4aww.js +0 -1
- package/dist/layers.F-T8S6hH.js +0 -423
- package/dist/layers.JZD2ERjq.js +0 -8
- package/dist/layers.SCq_rm-E.js +0 -74
- package/dist/layers.VNi0OGm-.js +0 -1359
- package/dist/layers.lU1KJbBR.js +0 -8
- package/dist/layers.wUbLWqHf.js +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -4,19 +4,27 @@ import { Dropzone } from '@mantine/dropzone';
|
|
|
4
4
|
import { EditorConfig } from 'lexical';
|
|
5
5
|
import { LexicalEditor as EditorType } from 'lexical';
|
|
6
6
|
import { ElementNode } from 'lexical';
|
|
7
|
+
import { FC } from 'react';
|
|
7
8
|
import { FOCUS_COMMAND } from 'lexical';
|
|
9
|
+
import { IconProps } from '../../../../@tabler/icons-react/dist/esm/icons/index.mjs';
|
|
8
10
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
|
+
import { Klass } from 'lexical';
|
|
9
12
|
import { LexicalCommand } from 'lexical';
|
|
13
|
+
import { LexicalNode } from 'lexical';
|
|
10
14
|
import { MarkNode } from '@lexical/mark';
|
|
11
15
|
import { MouseEventHandler } from 'react';
|
|
12
16
|
import { NodeKey } from 'lexical';
|
|
13
17
|
import { ParagraphNode } from 'lexical';
|
|
18
|
+
import { PropsWithChildren } from 'react';
|
|
14
19
|
import { RangeSelection } from 'lexical';
|
|
20
|
+
import { ReactElement } from 'react';
|
|
21
|
+
import { ReactNode } from 'react';
|
|
15
22
|
import { RootNode } from 'lexical';
|
|
16
23
|
import { SerializedEditorState } from 'lexical';
|
|
17
24
|
import { SerializedElementNode } from 'lexical';
|
|
18
25
|
import { SerializedLexicalNode } from 'lexical';
|
|
19
26
|
import { Spread } from 'lexical';
|
|
27
|
+
import { TFunction } from 'i18next';
|
|
20
28
|
|
|
21
29
|
export declare const $createNewParagraph: (editor: EditorType) => void;
|
|
22
30
|
|
|
@@ -24,6 +32,16 @@ export declare type ActiveUserProfile<DATA extends object> = EditorUser<DATA> &
|
|
|
24
32
|
id: string;
|
|
25
33
|
};
|
|
26
34
|
|
|
35
|
+
export declare const AlignmentImage: ({ editor, nodeKey, opened, setOpened, t, setShown, isShown, }: {
|
|
36
|
+
editor: EditorType;
|
|
37
|
+
nodeKey?: string;
|
|
38
|
+
t: TFunction;
|
|
39
|
+
opened: boolean;
|
|
40
|
+
setOpened: (value: boolean) => void;
|
|
41
|
+
setShown?: (value: boolean) => void;
|
|
42
|
+
isShown?: boolean;
|
|
43
|
+
}) => JSX_2.Element;
|
|
44
|
+
|
|
27
45
|
export { CLEAR_EDITOR_COMMAND }
|
|
28
46
|
|
|
29
47
|
declare interface CommentActions {
|
|
@@ -65,9 +83,13 @@ declare type CommentResolve = 'ACCEPTED' | 'REJECTED' | null | 'NONE';
|
|
|
65
83
|
|
|
66
84
|
export declare const CREATE_TEMPLATE: LexicalCommand<unknown>;
|
|
67
85
|
|
|
86
|
+
export declare const createMediaComponent: (imageNode: LexicalNode) => true | undefined;
|
|
87
|
+
|
|
88
|
+
export declare const deleteNode: (editor: EditorType, nodeElement: string | LexicalNode | null) => void;
|
|
89
|
+
|
|
68
90
|
export { Dropzone }
|
|
69
91
|
|
|
70
|
-
export declare const Editor: <USER_DATA extends object, CHILD_PAGE extends PageData>({ initialContent, onChange, outputFormat, mode, maxHeight, onBlur, onFocus, fetchUploadMedia, fetchPromptResult, fetchDeleteMedia, fetchRestoreMedia, pageId, commentController, maxFileSize, contentModalUploadImage, maxImageSizeError, debounce: debounceMs, disable, ws, excludeNodes, imagePickerSettings, childPages, language, shiftEnterInsertNewLine, editorRef, placeholder, }: EditorProps<USER_DATA, CHILD_PAGE>) => JSX_2.Element;
|
|
92
|
+
export declare const Editor: <USER_DATA extends object, CHILD_PAGE extends PageData>({ initialContent, onChange, outputFormat, mode, maxHeight, onBlur, onFocus, fetchUploadMedia, fetchPromptResult, fetchDeleteMedia, fetchRestoreMedia, pageId, commentController, maxFileSize, contentModalUploadImage, maxImageSizeError, debounce: debounceMs, disable, ws, excludeNodes, imagePickerSettings, childPages, language, shiftEnterInsertNewLine, editorRef, placeholder, plugins, }: EditorProps<USER_DATA, CHILD_PAGE>) => JSX_2.Element;
|
|
71
93
|
|
|
72
94
|
declare interface EditorProps<USER_DATA extends object = object, PAGE_DATA extends PageData = PageData> {
|
|
73
95
|
initialContent: Root | string;
|
|
@@ -101,6 +123,7 @@ declare interface EditorProps<USER_DATA extends object = object, PAGE_DATA exten
|
|
|
101
123
|
current: EditorType | null;
|
|
102
124
|
};
|
|
103
125
|
placeholder?: string;
|
|
126
|
+
plugins?: PluginConfig[];
|
|
104
127
|
}
|
|
105
128
|
|
|
106
129
|
export { EditorType }
|
|
@@ -149,6 +172,13 @@ export { FOCUS_COMMAND }
|
|
|
149
172
|
|
|
150
173
|
export declare function focusEditor(editor: EditorType, atStart?: boolean): void;
|
|
151
174
|
|
|
175
|
+
export declare const Icon: ({ name, iconStyle, ...rest }: {
|
|
176
|
+
name: keyof typeof iconsBlockTypeToBlockName;
|
|
177
|
+
[key: string]: any;
|
|
178
|
+
}) => JSX_2.Element;
|
|
179
|
+
|
|
180
|
+
declare const iconsBlockTypeToBlockName: Record<string, FC<IconProps>>;
|
|
181
|
+
|
|
152
182
|
declare type ImagePickerSettings = {
|
|
153
183
|
maxUploadFiles?: number;
|
|
154
184
|
unsplashClientId?: string;
|
|
@@ -173,8 +203,43 @@ declare interface PageData {
|
|
|
173
203
|
|
|
174
204
|
export { ParagraphNode }
|
|
175
205
|
|
|
206
|
+
export declare interface PluginConfig {
|
|
207
|
+
key: string;
|
|
208
|
+
node: Klass<LexicalNode>;
|
|
209
|
+
Plugin: React.ComponentType;
|
|
210
|
+
Provider: React.ComponentType<{
|
|
211
|
+
children: ReactNode;
|
|
212
|
+
}>;
|
|
213
|
+
slashMenu: SlashMenuConfig;
|
|
214
|
+
modes?: PluginModeConfig;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare interface PluginModeConfig {
|
|
218
|
+
comment: boolean;
|
|
219
|
+
default: boolean;
|
|
220
|
+
editor: boolean;
|
|
221
|
+
}
|
|
222
|
+
|
|
176
223
|
export { RangeSelection }
|
|
177
224
|
|
|
225
|
+
export declare const ResizableContainer: FC<PropsWithChildren<ResizableContainerProps>>;
|
|
226
|
+
|
|
227
|
+
declare type ResizableContainerProps = {
|
|
228
|
+
editor: EditorType;
|
|
229
|
+
width: number | string | 'inherit';
|
|
230
|
+
height: number | string | 'inherit';
|
|
231
|
+
isIcon: boolean;
|
|
232
|
+
initialHeight?: number | string;
|
|
233
|
+
initialWidth?: number | string;
|
|
234
|
+
type?: 'video';
|
|
235
|
+
onResizeEnd: (width: 'inherit' | number | string, height: 'inherit' | number | string) => void;
|
|
236
|
+
onResizeStart?: () => void;
|
|
237
|
+
isEmbed?: boolean;
|
|
238
|
+
alignment?: string;
|
|
239
|
+
disableInteractions?: boolean;
|
|
240
|
+
children: ReactElement;
|
|
241
|
+
};
|
|
242
|
+
|
|
178
243
|
export declare type Root = SerializedEditorState<SerializedLexicalNode>;
|
|
179
244
|
|
|
180
245
|
export { RootNode }
|
|
@@ -183,6 +248,17 @@ declare type SerializedMarkNode = Spread<{
|
|
|
183
248
|
ids: Array<string>;
|
|
184
249
|
}, SerializedElementNode>;
|
|
185
250
|
|
|
251
|
+
export declare interface SlashMenuConfig {
|
|
252
|
+
parentKey: string;
|
|
253
|
+
name: string;
|
|
254
|
+
description: string;
|
|
255
|
+
hint?: string;
|
|
256
|
+
keywords: string[];
|
|
257
|
+
icon: ReactNode;
|
|
258
|
+
command: LexicalCommand<string>;
|
|
259
|
+
commandPayload: string;
|
|
260
|
+
}
|
|
261
|
+
|
|
186
262
|
export declare const StylesProvider: ({ children }: {
|
|
187
263
|
children: React.ReactNode;
|
|
188
264
|
}) => JSX_2.Element;
|