@layers-app/editor 0.7.77 → 0.7.78
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 +70 -6
- package/dist/index.js +14 -12
- package/dist/{layers.DCmj4pMk.js → layers.0Y1qnl1G.js} +1 -1
- package/dist/{layers.vvHeBwRL.js → layers.0fsVAKhk.js} +1 -1
- package/dist/{layers.CyeiYJsA.js → layers.1-NgjLB1.js} +1 -1
- package/dist/{layers.CCzUe8xK.js → layers.4mXbqwQz.js} +1 -1
- package/dist/{layers.CTa-Cy2b.js → layers.515YmFp2.js} +1 -1
- package/dist/{layers.DxGnQ-WK.js → layers.7PYtla9F.js} +1 -1
- package/dist/{layers.D6qwvAYI.js → layers.80zZkFZy.js} +1 -1
- package/dist/{layers.2WHo1NhR.js → layers.AIWrQESY.js} +1 -1
- package/dist/layers.B0hzGWHm.js +17 -0
- package/dist/{layers.Dl8sVR2P.js → layers.B2NmFuMF.js} +1 -1
- package/dist/{layers.DjxbqAhT.js → layers.B3r9apZY.js} +1 -1
- package/dist/{layers.DdQVuq6G.js → layers.B4Nujy-W.js} +1 -1
- package/dist/{layers.BrGu4vtF.js → layers.B4oqbc3n.js} +1 -1
- package/dist/{layers.Cz5O8MjY.js → layers.B5yHbfHz.js} +1 -1
- package/dist/layers.B93mlMVg.js +1 -0
- package/dist/{layers.B44DiZBh.js → layers.B9UxA7oB.js} +1 -1
- package/dist/{layers.DSOcu2gg.js → layers.BA-KmiPF.js} +1 -1
- package/dist/{layers.Cmw0vQ5Q.js → layers.BBVtioek.js} +1 -1
- package/dist/{layers.STFNqYaS.js → layers.BB_9B4fo.js} +7 -7
- package/dist/{layers.BRq0tnAX.js → layers.BENdLcO-.js} +1 -1
- package/dist/{layers.jSedtSyi.js → layers.BEYYOqjt.js} +1 -1
- package/dist/{layers.BgK7dDnf.js → layers.BHHU17Hh.js} +1 -1
- package/dist/{layers.BSNFhcxo.js → layers.BHbOQ8mW.js} +3 -3
- package/dist/{layers.dkWUYvi-.js → layers.BIGBZTJQ.js} +1 -1
- package/dist/{layers.5ib4tFwZ.js → layers.BL2-bsw_.js} +4 -4
- package/dist/{layers.CVXOJDvI.js → layers.BLGXeqHI.js} +1 -1
- package/dist/layers.BNUA11IQ.js +1 -0
- package/dist/{layers.8U0GBHRZ.js → layers.BNwCX_a3.js} +1 -1
- package/dist/{layers.CUSw_oFl.js → layers.BPY_YIjN.js} +1 -1
- package/dist/{layers.DiJjW0J0.js → layers.BPqRxZ_9.js} +1 -1
- package/dist/layers.BPvkLXia.js +43993 -0
- package/dist/{layers.A4F753ue.js → layers.BSZN9Cbf.js} +1 -1
- package/dist/{layers.DJ7CILqE.js → layers.BUe6Fley.js} +1 -1
- package/dist/{layers.GbFqgFzH.js → layers.BW-MhyT0.js} +1 -1
- package/dist/{layers.DxEDSWCX.js → layers.BWY5OhEO.js} +1 -1
- package/dist/{layers.CQxYOqGJ.js → layers.BWvugbcq.js} +1 -1
- package/dist/{layers.LiZI0ZwD.js → layers.BXwSSGOP.js} +1 -1
- package/dist/{layers.pv4kpRJO.js → layers.BZDPu4w6.js} +1 -1
- package/dist/layers.BcBq8AlG.js +1 -0
- package/dist/{layers.BiS9-lDF.js → layers.BdG3k_hs.js} +8 -8
- package/dist/layers.BeQ9YXA_.js +6 -0
- package/dist/{layers.Dc_eA38A.js → layers.Bf6lLK8a.js} +3 -3
- package/dist/{layers.DGzof1q3.js → layers.BfY7AosZ.js} +1 -1
- package/dist/{layers.BtuDtJ-I.js → layers.BgYEljJ_.js} +1 -1
- package/dist/{layers.GeKAxRPL.js → layers.BgZ80nBG.js} +1 -1
- package/dist/{layers.CI97KuQk.js → layers.BiKZpDTt.js} +1 -1
- package/dist/{layers.DQHVXnNU.js → layers.BiYaXYfe.js} +1 -1
- package/dist/{layers.DjkNgRqL.js → layers.BjEcjDvl.js} +1 -1
- package/dist/{layers.0zMNJxVf.js → layers.Bj_M3P16.js} +3 -3
- package/dist/{layers.DdNBJIBy.js → layers.BktNuMeg.js} +1 -1
- package/dist/{layers.K2QI0Bof.js → layers.BnaFkLXr.js} +1 -1
- package/dist/{layers.BK_djDLj.js → layers.Bny6sOA6.js} +1 -1
- package/dist/{layers.Cqe_oRtA.js → layers.BtlBrRBE.js} +1 -1
- package/dist/{layers.Ds94bRGw.js → layers.Bu8DKvk7.js} +1 -1
- package/dist/{layers.CN9HDgXN.js → layers.BxMs_uR-.js} +1 -1
- package/dist/{layers.sC7L7hjr.js → layers.BxU87ICV.js} +5 -5
- package/dist/{layers.MPGGZrAJ.js → layers.BxyrBHL5.js} +1 -1
- package/dist/{layers.BiFUd4f0.js → layers.Bzua1pmT.js} +1 -1
- package/dist/{layers.pOn23FOQ.js → layers.C-JcVOgm.js} +1 -1
- package/dist/{layers.C5tcvIAA.js → layers.C-Y8p6cn.js} +2 -2
- package/dist/layers.C0Me094z.js +1 -0
- package/dist/{layers.DOKiGPCw.js → layers.C105wwo7.js} +1 -1
- package/dist/{layers.Cmxp8pV5.js → layers.C1Hzs5fa.js} +24 -24
- package/dist/{layers.DCxU6g4r.js → layers.C27kGY5A.js} +1 -1
- package/dist/{layers.0EKkhaN6.js → layers.C2VEZ-qb.js} +3 -3
- package/dist/{layers.DvYO0f59.js → layers.C5mfAwKZ.js} +1 -1
- package/dist/{layers.CSkBQxnC.js → layers.C7umgYWg.js} +1 -1
- package/dist/{layers.ChhsF--O.js → layers.C8orXEHJ.js} +1 -1
- package/dist/{layers.-w6pj3Y4.js → layers.C9OM6nT3.js} +1 -1
- package/dist/layers.CB9cfYZa.js +1 -0
- package/dist/{layers.CnQH92vl.js → layers.CCZ6_Wrw.js} +1 -1
- package/dist/{layers.CMNXIF_5.js → layers.CD1wSFLR.js} +1 -1
- package/dist/{layers.Bv0qz7x9.js → layers.CD9Gpt1y.js} +1 -1
- package/dist/{layers.B4KqxKh1.js → layers.CE2rGRKc.js} +1 -1
- package/dist/{layers.Bt9ZZOjN.js → layers.CEs7S6fZ.js} +1 -1
- package/dist/{layers.T_AjbzD9.js → layers.CF6gZUn8.js} +1 -1
- package/dist/{layers.Jx-gBW2F.js → layers.CGT8RNLy.js} +1 -1
- package/dist/{layers.BOv3MLex.js → layers.CH5sZ9y2.js} +1 -1
- package/dist/{layers.BO-2MPoe.js → layers.CHNwPCcP.js} +1 -1
- package/dist/{layers.Y5Mmv58o.js → layers.CHjfZV3Y.js} +2 -2
- package/dist/{layers.CdzeAqMM.js → layers.CKepCH9l.js} +1 -1
- package/dist/layers.CLEDkiCk.js +346 -0
- package/dist/{layers.D5RNhA0Y.js → layers.CLlpta2X.js} +1 -1
- package/dist/{layers.CZWkZnuM.js → layers.CN5kSOlp.js} +1 -1
- package/dist/{layers.Jfp0TWAa.js → layers.CNWeM8YC.js} +1 -1
- package/dist/{layers.CganRDLp.js → layers.COMdL1L-.js} +2 -2
- package/dist/{layers.CiEV5zOR.js → layers.CRU1QNHI.js} +1 -1
- package/dist/{layers.Cg5aVDZJ.js → layers.CSp_fUX9.js} +1 -1
- package/dist/{layers.D0ectbPH.js → layers.CTmobPht.js} +1 -1
- package/dist/{layers.XGbz3mK3.js → layers.CTyeZA74.js} +1 -1
- package/dist/{layers.BARN-9f4.js → layers.CU-KamiB.js} +1 -1
- package/dist/{layers.DfSW6xJK.js → layers.CVyvMI9c.js} +1 -1
- package/dist/{layers.DgqoyVBV.js → layers.CYLLfE2A.js} +1 -1
- package/dist/{layers.CGf01FUp.js → layers.CZFodX-E.js} +1 -1
- package/dist/{layers.DIFUdtpU.js → layers.CcIycQA5.js} +1 -1
- package/dist/{layers.DsMQaELM.js → layers.CcZ7lvE9.js} +1 -1
- package/dist/{layers.BlfCceBI.js → layers.Cce3uOww.js} +1 -1
- package/dist/{layers.BTBO4eMW.js → layers.CcgC0wyZ.js} +1 -1
- package/dist/{layers.C9rC1J6r.js → layers.CcxNr1WJ.js} +1 -1
- package/dist/{layers.CkkRIbGl.js → layers.CeElkwBf.js} +1 -1
- package/dist/{layers.t_PLMZsR.js → layers.CecVLcyQ.js} +4 -4
- package/dist/{layers.DxK2XlNN.js → layers.CggsYr0c.js} +1 -1
- package/dist/{layers.Bs1jdriv.js → layers.CiJKn6R8.js} +1 -1
- package/dist/{layers.DJA3seAe.js → layers.Cj_3ai7F.js} +5 -5
- package/dist/{layers.HcBlXBPG.js → layers.CjiGu82L.js} +1 -1
- package/dist/layers.CmmYt3Ou.js +1 -0
- package/dist/{layers.DI5443bl.js → layers.CmxdGLsP.js} +1 -1
- package/dist/{layers.C5yQNEdt.js → layers.CmxgG84N.js} +1 -1
- package/dist/{layers.W4dUzBMD.js → layers.CoBd9S7u.js} +1 -1
- package/dist/{layers.ETOR-1_M.js → layers.Co_5xN7g.js} +3 -3
- package/dist/{layers.DIUlujiY.js → layers.CpsZt8D1.js} +3 -3
- package/dist/{layers.BylxlEnO.js → layers.CqA113CL.js} +1 -1
- package/dist/{layers.6G8rsgJa.js → layers.Cr3Askgk.js} +1 -1
- package/dist/{layers.x9L_z5Lo.js → layers.Cr9LsWSp.js} +1 -1
- package/dist/{layers.BA2uiqCQ.js → layers.Cs4W0xng.js} +1 -1
- package/dist/{layers.CMIyfHu5.js → layers.CshIiX8i.js} +1 -1
- package/dist/{layers.usC-HMJr.js → layers.CtDgzw74.js} +1 -1
- package/dist/{layers.Ct55gB0C.js → layers.CtX9oKVv.js} +1 -1
- package/dist/{layers.Bv2jdLOB.js → layers.Cu51YqSE.js} +4 -4
- package/dist/layers.CvcpAYuM.js +296 -0
- package/dist/{layers.62FWtpR6.js → layers.CvuuDQmg.js} +1 -1
- package/dist/layers.D05yrn3O.js +1 -0
- package/dist/layers.D0X8KZzh.js +304 -0
- package/dist/{layers.DMQVNuhC.js → layers.D26fGq9e.js} +1 -1
- package/dist/{layers.CRg-B1vP.js → layers.D3U4gCDM.js} +4 -4
- package/dist/{layers.3UVMaoC9.js → layers.D53ECpyT.js} +3 -3
- package/dist/{layers.BRHKRm7T.js → layers.D5f_UTqz.js} +1 -1
- package/dist/{layers.BGMakO5J.js → layers.D6f5jje7.js} +3 -3
- package/dist/{layers.BEEOG0ub.js → layers.D82NsaKN.js} +1 -1
- package/dist/{layers.BvIFeFai.js → layers.D8T367jD.js} +3 -3
- package/dist/{layers.BVaOozUc.js → layers.D9X0FyWW.js} +1 -1
- package/dist/{layers.aluHBzXL.js → layers.D9n9z8YG.js} +1 -1
- package/dist/{layers.DBn2I3DX.js → layers.DA8ptbxj.js} +1 -1
- package/dist/{layers.BjhL04eE.js → layers.DAZX9DhM.js} +1 -1
- package/dist/layers.DB-vtUk9.js +454 -0
- package/dist/{layers.BElz4lCb.js → layers.DBIp1-89.js} +1 -1
- package/dist/{layers.2l-z2d6S.js → layers.DCMRe4s_.js} +1 -1
- package/dist/{layers.DsEEw19z.js → layers.DCngQBR0.js} +1 -1
- package/dist/{layers.BYcdHN5K.js → layers.DD1kaPgm.js} +1 -1
- package/dist/{layers.BDl4JJUb.js → layers.DFYDyH7z.js} +1 -1
- package/dist/{layers.BNRV7XGA.js → layers.DFkl1ZSl.js} +1 -1
- package/dist/{layers.DV2Gv4v7.js → layers.DGGRbYnV.js} +4 -4
- package/dist/{layers.DOU2Orui.js → layers.DH9O_NeT.js} +1 -1
- package/dist/{layers.F-KRLijT.js → layers.DHgqjuG0.js} +1 -1
- package/dist/{layers.CIzvJORb.js → layers.DLYZRcK4.js} +1 -1
- package/dist/{layers.Dd5UvUyZ.js → layers.DRQG0sOU.js} +1 -1
- package/dist/{layers.DOg6wGU1.js → layers.DRorHC-o.js} +1 -1
- package/dist/{layers.DIFg7xPK.js → layers.DUfrGX_H.js} +1 -1
- package/dist/{layers.B4QOFvW7.js → layers.DXHgwQSF.js} +1 -1
- package/dist/{layers.BDlWEWBN.js → layers.DbiqHLuu.js} +1 -1
- package/dist/{layers.CNppyY-m.js → layers.DdGilF1y.js} +1 -1
- package/dist/{layers.DoxSDodH.js → layers.DhATdRwD.js} +1 -1
- package/dist/{layers.B_v-ekSG.js → layers.DiU6cOXj.js} +1 -1
- package/dist/layers.DilA0qnM.js +54 -0
- package/dist/{layers.BkFTPCRZ.js → layers.Din2GY_v.js} +1 -1
- package/dist/{layers.DdWxLbOb.js → layers.DkOOn3oi.js} +1 -1
- package/dist/{layers.BAvnrwdC.js → layers.Dl0nflkg.js} +1 -1
- package/dist/{layers.v7wAIgcY.js → layers.DoAIxshB.js} +1 -1
- package/dist/{layers.UpXfP8aP.js → layers.DpqsTBtA.js} +1 -1
- package/dist/{layers.CEjGlMKg.js → layers.Dqb3E0zJ.js} +1 -1
- package/dist/{layers.BqOnOcPl.js → layers.Du6LkFzU.js} +1 -1
- package/dist/{layers.UaAliOOU.js → layers.Dv7C-CRq.js} +1 -1
- package/dist/{layers.C0IJF_so.js → layers.DvM6Rvuy.js} +1 -1
- package/dist/{layers.Clxb8f1x.js → layers.DvQ3ACdp.js} +1 -1
- package/dist/{layers.BMj6a3AQ.js → layers.DvnUP-Vo.js} +1 -1
- package/dist/{layers.D0wgX-g3.js → layers.DyN9zqvw.js} +1 -1
- package/dist/{layers.D5-OzEGJ.js → layers.FzN5R_MI.js} +4 -4
- package/dist/{layers.C4JxlowK.js → layers.IKs1cP2i.js} +1 -1
- package/dist/{layers.447Y1Euo.js → layers.JJpurIJD.js} +4 -4
- package/dist/{layers.Ciaj2IT0.js → layers.K3ZUUM9n.js} +1 -1
- package/dist/{layers.umyo4OEQ.js → layers.KZgKtoDw.js} +1 -1
- package/dist/{layers.DAlaatv8.js → layers.KqM0XPII.js} +1 -1
- package/dist/{layers.C71iP9GR.js → layers.M3VtTDPw.js} +1 -1
- package/dist/{layers.BqPCMU8w.js → layers.MEapmzkA.js} +1 -1
- package/dist/{layers.C2reYFHl.js → layers.Mj8hqlJW.js} +1 -1
- package/dist/{layers.CW6vAag6.js → layers.NSLZMsAU.js} +1 -1
- package/dist/{layers.K4cBv23e.js → layers.RSlXJHc_.js} +1 -1
- package/dist/{layers.DK1Ji02P.js → layers.RVU_H6uS.js} +1 -1
- package/dist/{layers.Bn6kIrny.js → layers.SZFN9FKm.js} +1 -1
- package/dist/{layers.BZfE5fLY.js → layers.UNT1qzd1.js} +1 -1
- package/dist/{layers.C8fbK8uf.js → layers.V_xsoN8K.js} +2 -2
- package/dist/{layers.B0Wh8zJI.js → layers.VrUXD08v.js} +1 -1
- package/dist/{layers.DkeXM6bk.js → layers.Xkl8rP3s.js} +3 -3
- package/dist/{layers.C2u4sSH3.js → layers.Ye9pNj24.js} +1 -1
- package/dist/{layers.BPaUJFuE.js → layers._TEMZO38.js} +1 -1
- package/dist/{layers.DMAZ9IbW.js → layers.akRKdkA-.js} +1 -1
- package/dist/{layers.BLiy35t0.js → layers.aoBGq5VX.js} +3 -3
- package/dist/{layers.X1hul86v.js → layers.cADCpzYZ.js} +4 -4
- package/dist/{layers.gG8j92wG.js → layers.dNqRbTzt.js} +4 -4
- package/dist/{layers.PiLmzDCM.js → layers.fHzcdU1b.js} +1 -1
- package/dist/{layers.7qtdKFrd.js → layers.ggRBsGE2.js} +1 -1
- package/dist/{layers.CBPvGloV.js → layers.gtk1_Zb2.js} +1 -1
- package/dist/{layers.D5-JajPy.js → layers.iYBuyc8i.js} +2 -2
- package/dist/{layers.DxDzQDF_.js → layers.jrw0SA_r.js} +1 -1
- package/dist/{layers.DEqzvYv8.js → layers.js2hd4k-.js} +1 -1
- package/dist/{layers.Bqhx3Bvc.js → layers.oASG8w4r.js} +1 -1
- package/dist/{layers.DH1NMJfb.js → layers.oCWE0tph.js} +6 -6
- package/dist/{layers.RO2h68UE.js → layers.p2Zn_qfy.js} +1 -1
- package/dist/{layers.DKhDaFqB.js → layers.pTNqmcpG.js} +1 -1
- package/dist/{layers.DduFwONh.js → layers.r1vLQhL7.js} +1 -1
- package/dist/{layers.Dtg5F4sH.js → layers.s3JW7UmE.js} +2 -2
- package/dist/{layers.BaBYnnag.js → layers.t69kU_aF.js} +1 -1
- package/dist/{layers.DDEta_gE.js → layers.vDkMOGSi.js} +1 -1
- package/dist/{layers.C4YMYmRf.js → layers.zppDmomd.js} +1 -1
- package/package.json +192 -160
- package/dist/layers.BEVwG5HD.js +0 -271
- package/dist/layers.BFjPLKPL.js +0 -299
- package/dist/layers.BRZ7tJR7.js +0 -276
- package/dist/layers.BaycGHUx.js +0 -129
- package/dist/layers.C1SfcqPQ.js +0 -6
- package/dist/layers.C4BHb2Zi.js +0 -1
- package/dist/layers.C4cc5MrZ.js +0 -28641
- package/dist/layers.CB1j9n7I.js +0 -1
- package/dist/layers.CJq9BdUp.js +0 -295
- package/dist/layers.CX_pWFAL.js +0 -76
- package/dist/layers.CiMS62k1.js +0 -1
- package/dist/layers.D5G8QmnT.js +0 -1
- package/dist/layers.D5f6PG-j.js +0 -1
- package/dist/layers.DKHOnSbj.js +0 -1
- package/dist/layers.DMziPH2V.js +0 -1
- package/dist/layers.ePA5rZJO.js +0 -1
- package/dist/layers.t8X_Qdxw.js +0 -213
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ import { NodeKey } from 'lexical';
|
|
|
17
17
|
import { ParagraphNode } from 'lexical';
|
|
18
18
|
import { PropsWithChildren } from 'react';
|
|
19
19
|
import { RangeSelection } from 'lexical';
|
|
20
|
-
import { ReactElement } from 'react';
|
|
21
20
|
import { ReactNode } from 'react';
|
|
22
21
|
import { RootNode } from 'lexical';
|
|
23
22
|
import { SerializedEditorState } from 'lexical';
|
|
@@ -32,16 +31,27 @@ export declare type ActiveUserProfile<DATA extends object> = EditorUser<DATA> &
|
|
|
32
31
|
id: string;
|
|
33
32
|
};
|
|
34
33
|
|
|
35
|
-
export declare const AlignmentImage: ({ editor, nodeKey, opened, setOpened, t, setShown,
|
|
34
|
+
export declare const AlignmentImage: ({ editor, nodeKey, opened, setOpened, t, setShown, flexBorder, }: {
|
|
36
35
|
editor: EditorType;
|
|
37
36
|
nodeKey?: string;
|
|
38
37
|
t: TFunction;
|
|
39
38
|
opened: boolean;
|
|
40
39
|
setOpened: (value: boolean) => void;
|
|
41
40
|
setShown?: (value: boolean) => void;
|
|
42
|
-
|
|
41
|
+
flexBorder?: boolean;
|
|
43
42
|
}) => JSX_2.Element;
|
|
44
43
|
|
|
44
|
+
export declare const AlignmentMenu: FC<AlignmentMenuProps>;
|
|
45
|
+
|
|
46
|
+
declare type AlignmentMenuProps = {
|
|
47
|
+
currentAlignment: AlignValue;
|
|
48
|
+
onAlign: (value: AlignValue) => void;
|
|
49
|
+
className?: string;
|
|
50
|
+
targetLabel?: ReactNode;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
declare type AlignValue = 'left' | 'center' | 'right';
|
|
54
|
+
|
|
45
55
|
export { CLEAR_EDITOR_COMMAND }
|
|
46
56
|
|
|
47
57
|
declare interface CommentActions {
|
|
@@ -89,7 +99,7 @@ export declare const deleteNode: (editor: EditorType, nodeElement: string | Lexi
|
|
|
89
99
|
|
|
90
100
|
export { Dropzone }
|
|
91
101
|
|
|
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, linkablePages, language, shiftEnterInsertNewLine, editorRef, placeholder, plugins, onTrack, }: EditorProps<USER_DATA, CHILD_PAGE>) => JSX_2.Element;
|
|
102
|
+
export declare const Editor: <USER_DATA extends object, CHILD_PAGE extends PageData>({ initialContent, onChange, outputFormat, mode, maxHeight, onBlur, onFocus, fetchUploadMedia, fileChunkUploadApi, fetchPromptResult, fetchSmartPastePrompt, fetchSmartPasteStreamPrompt, fetchDeleteMedia, fetchRestoreMedia, pageId, commentController, maxFileSize, contentModalUploadImage, maxImageSizeError, debounce: debounceMs, disable, ws, excludeNodes, imagePickerSettings, childPages, linkablePages, language, shiftEnterInsertNewLine, editorRef, placeholder, plugins, onTrack, }: EditorProps<USER_DATA, CHILD_PAGE>) => JSX_2.Element;
|
|
93
103
|
|
|
94
104
|
declare interface EditorProps<USER_DATA extends object = object, PAGE_DATA extends PageData = PageData> {
|
|
95
105
|
initialContent: Root | string;
|
|
@@ -100,7 +110,10 @@ declare interface EditorProps<USER_DATA extends object = object, PAGE_DATA exten
|
|
|
100
110
|
mode?: Mode;
|
|
101
111
|
maxHeight?: number;
|
|
102
112
|
fetchUploadMedia?: fetchUploadMedia;
|
|
113
|
+
fileChunkUploadApi?: FileChunkUploadApi;
|
|
103
114
|
fetchPromptResult?: fetchPromptResult;
|
|
115
|
+
fetchSmartPastePrompt?: fetchPromptResult;
|
|
116
|
+
fetchSmartPasteStreamPrompt?: fetchPromptStreamResult;
|
|
104
117
|
fetchDeleteMedia?: fetchDeleteRestoreMedia;
|
|
105
118
|
fetchRestoreMedia?: fetchDeleteRestoreMedia;
|
|
106
119
|
maxFileSize?: number;
|
|
@@ -153,7 +166,7 @@ declare type ExcludeNodes = {
|
|
|
153
166
|
[K in ExcludeNodesKey]?: boolean;
|
|
154
167
|
};
|
|
155
168
|
|
|
156
|
-
declare type ExcludeNodesKey = 'paragraph' | 'quote' | 'code' | 'table' | 'grid' | 'horizontal-rule' | 'caret-right' | 'emoji' | 'excalidraw' | 'childDocs' | 'photo' | 'video' | 'audio' | 'file' | 'embed' | 'form' | 'contents' | 'template' | 'componentPicker' | 'hashtag' | 'list' | 'check' | 'link' | 'comment' | 'swagger' | 'callout' | 'layout' | 'draggableBlock' | 'newParagraph' | 'actionMenu' | 'emptyPage' | 'previewCodeEquation' | '1' | '2' | '3' | 'number' | 'bullet' | 'default' | 'alert' | 'success' | 'warning' | 'images' | 'collapsible' | 'checkList' | 'horizontalRule' | 'inlinePageLink' | 'equation' | 'equation-inline' | 'pageLink' | 'codeHighlight';
|
|
169
|
+
declare type ExcludeNodesKey = 'paragraph' | 'quote' | 'code' | 'table' | 'grid' | 'horizontal-rule' | 'caret-right' | 'emoji' | 'excalidraw' | 'childDocs' | 'photo' | 'video' | 'audio' | 'file' | 'embed' | 'form' | 'contents' | 'template' | 'componentPicker' | 'hashtag' | 'list' | 'check' | 'link' | 'comment' | 'swagger' | 'callout' | 'layout' | 'draggableBlock' | 'newParagraph' | 'actionMenu' | 'emptyPage' | 'previewCodeEquation' | '1' | '2' | '3' | 'number' | 'bullet' | 'default' | 'alert' | 'success' | 'warning' | 'images' | 'collapsible' | 'checkList' | 'horizontalRule' | 'inlinePageLink' | 'equation' | 'equation-inline' | 'pageLink' | 'codeHighlight' | 'smartPaste';
|
|
157
170
|
|
|
158
171
|
export declare class ExtendMarkNode extends MarkNode implements ElementNode {
|
|
159
172
|
__resolve: CommentResolve;
|
|
@@ -175,8 +188,29 @@ declare type fetchDeleteRestoreMedia = (id: string, success: SuccessDeleteImage,
|
|
|
175
188
|
|
|
176
189
|
declare type fetchPromptResult = (prompt: string, success: (data: string) => void, error?: () => void) => void;
|
|
177
190
|
|
|
191
|
+
declare type fetchPromptStreamResult = (prompt: string, onBlock: (block: string) => void, onDone: () => void, onError?: () => void) => void;
|
|
192
|
+
|
|
178
193
|
declare type fetchUploadMedia = (file: File, success: SuccessUploadImage, error?: ErrorDeleteImage, signal?: AbortSignal, onProgress?: (percent: number) => void) => void;
|
|
179
194
|
|
|
195
|
+
declare interface FileChunkUploadApi {
|
|
196
|
+
initAttachment: (file: File, parentId: string, parentType: string) => Promise<{
|
|
197
|
+
attachmentId: string;
|
|
198
|
+
url?: string;
|
|
199
|
+
status?: {
|
|
200
|
+
nextOffset?: number;
|
|
201
|
+
uploadedBytes?: number;
|
|
202
|
+
};
|
|
203
|
+
}>;
|
|
204
|
+
fetchContentStatus: (attachmentId: string) => Promise<{
|
|
205
|
+
nextOffset?: number;
|
|
206
|
+
uploadedBytes?: number;
|
|
207
|
+
}>;
|
|
208
|
+
uploadChunkWithProgress: (attachmentId: string, file: File, offset: number, end: number, total: number, signal?: AbortSignal, onProgress?: (loaded: number) => void, onXhrReady?: (xhr: XMLHttpRequest) => void) => Promise<{
|
|
209
|
+
nextOffset?: number;
|
|
210
|
+
expectedOffset?: number;
|
|
211
|
+
}>;
|
|
212
|
+
}
|
|
213
|
+
|
|
180
214
|
export { FOCUS_COMMAND }
|
|
181
215
|
|
|
182
216
|
export declare function focusEditor(editor: EditorType, atStart?: boolean): void;
|
|
@@ -188,12 +222,21 @@ export declare const Icon: ({ name, iconStyle, ...rest }: {
|
|
|
188
222
|
|
|
189
223
|
declare const iconsBlockTypeToBlockName: Record<string, FC<IconProps>>;
|
|
190
224
|
|
|
225
|
+
declare type ImagePickerGalleryCollection = {
|
|
226
|
+
id: string;
|
|
227
|
+
path: string;
|
|
228
|
+
url: string;
|
|
229
|
+
title: string;
|
|
230
|
+
items: string[];
|
|
231
|
+
};
|
|
232
|
+
|
|
191
233
|
declare type ImagePickerSettings = {
|
|
192
234
|
maxUploadFiles?: number;
|
|
193
235
|
unsplashClientId?: string;
|
|
194
236
|
giphyToken?: string;
|
|
195
237
|
download?: boolean;
|
|
196
238
|
link?: boolean;
|
|
239
|
+
galleryCollection?: ImagePickerGalleryCollection[];
|
|
197
240
|
};
|
|
198
241
|
|
|
199
242
|
declare type Mode = 'comment' | 'default' | 'editor';
|
|
@@ -256,7 +299,7 @@ declare type ResizableContainerProps = {
|
|
|
256
299
|
isEmbed?: boolean;
|
|
257
300
|
alignment?: string;
|
|
258
301
|
disableInteractions?: boolean;
|
|
259
|
-
children:
|
|
302
|
+
children: ReactNode;
|
|
260
303
|
};
|
|
261
304
|
|
|
262
305
|
export declare type Root = SerializedEditorState<SerializedLexicalNode>;
|
|
@@ -292,4 +335,25 @@ export declare type UploadData = {
|
|
|
292
335
|
originalFileName: string;
|
|
293
336
|
};
|
|
294
337
|
|
|
338
|
+
declare interface VideoApiError {
|
|
339
|
+
status: number;
|
|
340
|
+
statusText: string;
|
|
341
|
+
message: string;
|
|
342
|
+
data?: unknown;
|
|
343
|
+
source: VideoApiErrorSource;
|
|
344
|
+
videoId?: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
declare type VideoApiErrorSource = 'init' | 'upload' | 'status' | 'cover' | 'subtitles' | 'chapters' | 'retry' | 'unknown';
|
|
348
|
+
|
|
349
|
+
export declare function videoPlugin(config: VideoPluginConfig): PluginConfig;
|
|
350
|
+
|
|
351
|
+
declare interface VideoPluginConfig {
|
|
352
|
+
pageId?: string;
|
|
353
|
+
maxFileSize?: number;
|
|
354
|
+
onUploadStateChange?: (isUploading: boolean, uploadingCount: number) => void;
|
|
355
|
+
onError?: (error: VideoApiError) => void;
|
|
356
|
+
onTrack?: (event: string, params?: Record<string, unknown>) => void;
|
|
357
|
+
}
|
|
358
|
+
|
|
295
359
|
export { }
|