@layers-app/editor 0.7.77 → 0.7.79
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.-0O_onOX.js +304 -0
- package/dist/{layers.DxEDSWCX.js → layers.2kl1aRUj.js} +1 -1
- package/dist/{layers.BYcdHN5K.js → layers.3JuVpxXb.js} +1 -1
- package/dist/{layers.ETOR-1_M.js → layers.6mdz-Na2.js} +3 -3
- package/dist/{layers.CEjGlMKg.js → layers.7kExnlZ3.js} +1 -1
- package/dist/{layers.DfSW6xJK.js → layers.8Edx0vxr.js} +1 -1
- package/dist/{layers.CkkRIbGl.js → layers.ADMZntNg.js} +1 -1
- package/dist/{layers.BRHKRm7T.js → layers.B1oRpBrL.js} +1 -1
- package/dist/{layers.CyeiYJsA.js → layers.B2Rh_x8m.js} +1 -1
- package/dist/{layers.BgK7dDnf.js → layers.B2fELUiM.js} +1 -1
- package/dist/{layers.C9rC1J6r.js → layers.B6bs5Fa-.js} +1 -1
- package/dist/{layers.CUSw_oFl.js → layers.B6jWFkL_.js} +1 -1
- package/dist/{layers.pOn23FOQ.js → layers.B707QLSG.js} +1 -1
- package/dist/{layers.CW6vAag6.js → layers.B8BHbr5w.js} +1 -1
- package/dist/{layers.CTa-Cy2b.js → layers.B8wcmc88.js} +1 -1
- package/dist/{layers.CNppyY-m.js → layers.BEadygXO.js} +1 -1
- package/dist/{layers.DjkNgRqL.js → layers.BFHrTCu6.js} +1 -1
- package/dist/{layers.x9L_z5Lo.js → layers.BGxxpIwr.js} +1 -1
- package/dist/{layers.DOg6wGU1.js → layers.BIQ6JYQZ.js} +1 -1
- package/dist/{layers.7qtdKFrd.js → layers.BInHVDvJ.js} +1 -1
- package/dist/{layers.Bt9ZZOjN.js → layers.BKoNyXJR.js} +1 -1
- package/dist/{layers.DdWxLbOb.js → layers.BKvr1Tcc.js} +1 -1
- package/dist/{layers.C5tcvIAA.js → layers.BL8qCZOe.js} +2 -2
- package/dist/{layers.CMNXIF_5.js → layers.BLfjvoiA.js} +1 -1
- package/dist/{layers.BiFUd4f0.js → layers.BMFWRw1e.js} +1 -1
- package/dist/{layers.STFNqYaS.js → layers.BNWsN93S.js} +7 -7
- package/dist/{layers.DxGnQ-WK.js → layers.BNtYfeEC.js} +1 -1
- package/dist/{layers.jSedtSyi.js → layers.BOIxfgsV.js} +1 -1
- package/dist/{layers.5ib4tFwZ.js → layers.BOYb-ebd.js} +4 -4
- package/dist/{layers.vvHeBwRL.js → layers.BRDVo5EI.js} +1 -1
- package/dist/{layers.BRq0tnAX.js → layers.BRfvZDuh.js} +1 -1
- package/dist/{layers.C2u4sSH3.js → layers.BS1hxdXe.js} +1 -1
- package/dist/{layers.DMAZ9IbW.js → layers.BTCPfVTk.js} +1 -1
- package/dist/{layers.W4dUzBMD.js → layers.BTYzCwGf.js} +1 -1
- package/dist/{layers.DOKiGPCw.js → layers.BTdD6Q_D.js} +1 -1
- package/dist/{layers.aluHBzXL.js → layers.BW8tHuyL.js} +1 -1
- package/dist/{layers.DBn2I3DX.js → layers.BWqKB8Tp.js} +1 -1
- package/dist/{layers.F-KRLijT.js → layers.BXpDL2TM.js} +1 -1
- package/dist/{layers.Bs1jdriv.js → layers.BYe8thFA.js} +1 -1
- package/dist/{layers.XGbz3mK3.js → layers.BYgZ-KvZ.js} +1 -1
- package/dist/{layers.T_AjbzD9.js → layers.BaX-1WMw.js} +1 -1
- package/dist/{layers.C4YMYmRf.js → layers.BapitDDl.js} +1 -1
- package/dist/{layers.C71iP9GR.js → layers.BbTSHM-R.js} +1 -1
- package/dist/layers.BcY5trq3.js +296 -0
- package/dist/{layers.DEqzvYv8.js → layers.BdGy4Ku-.js} +1 -1
- package/dist/{layers.BqOnOcPl.js → layers.BdysQaP9.js} +1 -1
- package/dist/{layers.CGf01FUp.js → layers.Beujd2gV.js} +1 -1
- package/dist/{layers.Jfp0TWAa.js → layers.Bi-QHBcd.js} +1 -1
- package/dist/{layers.CZWkZnuM.js → layers.BjEh95nH.js} +1 -1
- package/dist/{layers.BDl4JJUb.js → layers.BkGNkMxK.js} +1 -1
- package/dist/{layers.BVaOozUc.js → layers.BkHmSHan.js} +1 -1
- package/dist/{layers.DsMQaELM.js → layers.Bkira6Tt.js} +1 -1
- package/dist/{layers.CVXOJDvI.js → layers.Bl7kgUIS.js} +1 -1
- package/dist/{layers.BvIFeFai.js → layers.BleVyog3.js} +3 -3
- package/dist/{layers.DMQVNuhC.js → layers.BmzD2tT6.js} +1 -1
- package/dist/{layers.D6qwvAYI.js → layers.BnvU3-7C.js} +1 -1
- package/dist/{layers.DoxSDodH.js → layers.Bo3872e1.js} +1 -1
- package/dist/{layers.Jx-gBW2F.js → layers.BqByVzA3.js} +1 -1
- package/dist/{layers.BPaUJFuE.js → layers.BujYQGMz.js} +1 -1
- package/dist/{layers.DKhDaFqB.js → layers.BvAafL9L.js} +1 -1
- package/dist/{layers.B4KqxKh1.js → layers.BvCFLeTR.js} +1 -1
- package/dist/{layers.Ds94bRGw.js → layers.BzDN8T7e.js} +1 -1
- package/dist/{layers.A4F753ue.js → layers.C-qmTNFy.js} +1 -1
- package/dist/{layers.CN9HDgXN.js → layers.C1FTyTvU.js} +1 -1
- package/dist/{layers.CBPvGloV.js → layers.C2XuxKbl.js} +1 -1
- package/dist/{layers.D5-OzEGJ.js → layers.C2bsLW-V.js} +4 -4
- package/dist/{layers.BZfE5fLY.js → layers.C3u7j4et.js} +1 -1
- package/dist/layers.C4P7Q4ju.js +1 -0
- package/dist/{layers.gG8j92wG.js → layers.C5-KsS9l.js} +4 -4
- package/dist/{layers.Bv0qz7x9.js → layers.CACntamY.js} +1 -1
- package/dist/{layers.umyo4OEQ.js → layers.CAN9vlS-.js} +1 -1
- package/dist/{layers.DjxbqAhT.js → layers.CArpuehS.js} +1 -1
- package/dist/{layers.D0wgX-g3.js → layers.CBOug2uu.js} +1 -1
- package/dist/{layers.2l-z2d6S.js → layers.CBQZm2e7.js} +1 -1
- package/dist/{layers.Cz5O8MjY.js → layers.CBdylbSi.js} +1 -1
- package/dist/{layers.Bqhx3Bvc.js → layers.CBzz8__b.js} +1 -1
- package/dist/{layers.DxK2XlNN.js → layers.CCEUvI5d.js} +1 -1
- package/dist/{layers.DH1NMJfb.js → layers.CCKu4hKE.js} +6 -6
- package/dist/{layers.DDEta_gE.js → layers.CFCTy-Yu.js} +1 -1
- package/dist/{layers.0zMNJxVf.js → layers.CI9mmWI6.js} +3 -3
- package/dist/{layers.C2reYFHl.js → layers.CLyZjoes.js} +1 -1
- package/dist/{layers.2WHo1NhR.js → layers.CNjmcrIc.js} +1 -1
- package/dist/{layers.B44DiZBh.js → layers.COkRWQkr.js} +1 -1
- package/dist/{layers.BEEOG0ub.js → layers.COzdgI_q.js} +1 -1
- package/dist/{layers.C5yQNEdt.js → layers.CQKwzZBP.js} +1 -1
- package/dist/{layers.C0IJF_so.js → layers.CRsj8jgj.js} +1 -1
- package/dist/{layers.DGzof1q3.js → layers.CSIF_jBD.js} +1 -1
- package/dist/{layers.BARN-9f4.js → layers.CTeHGuV0.js} +1 -1
- package/dist/{layers.DIUlujiY.js → layers.CTjRAJwk.js} +3 -3
- package/dist/{layers.DSOcu2gg.js → layers.CWgs7Ylx.js} +1 -1
- package/dist/{layers.CganRDLp.js → layers.CXCD93Xx.js} +2 -2
- package/dist/{layers.Ciaj2IT0.js → layers.CYmtPuff.js} +1 -1
- package/dist/{layers.62FWtpR6.js → layers.CdV-iM5a.js} +1 -1
- package/dist/{layers.CnQH92vl.js → layers.Ce_vM4CM.js} +1 -1
- package/dist/{layers.D0ectbPH.js → layers.CfTHKUqx.js} +1 -1
- package/dist/{layers.CQxYOqGJ.js → layers.CgEPPGNk.js} +1 -1
- package/dist/{layers.ChhsF--O.js → layers.CgcpyDQN.js} +1 -1
- package/dist/layers.Cj16hdv5.js +1 -0
- package/dist/{layers.DCmj4pMk.js → layers.CjEUyNjP.js} +1 -1
- package/dist/{layers.BLiy35t0.js → layers.CjfPccZD.js} +3 -3
- package/dist/{layers.DkeXM6bk.js → layers.CjxpNr33.js} +3 -3
- package/dist/{layers.DQHVXnNU.js → layers.CkieCy7R.js} +1 -1
- package/dist/{layers.6G8rsgJa.js → layers.CmLRj4Tg.js} +1 -1
- package/dist/layers.CmmYt3Ou.js +1 -0
- package/dist/{layers.BAvnrwdC.js → layers.CnhYIwP1.js} +1 -1
- package/dist/{layers.GeKAxRPL.js → layers.CoOD1WPr.js} +1 -1
- package/dist/{layers.Ct55gB0C.js → layers.CqZWYINg.js} +1 -1
- package/dist/layers.CtSQ_xs8.js +1 -0
- package/dist/{layers.pv4kpRJO.js → layers.CtyNVkPX.js} +1 -1
- package/dist/{layers.BylxlEnO.js → layers.Cu9_FKnF.js} +1 -1
- package/dist/{layers.DsEEw19z.js → layers.D0FP90Rx.js} +1 -1
- package/dist/{layers.DIFg7xPK.js → layers.D0ex43Sd.js} +1 -1
- package/dist/{layers.Dtg5F4sH.js → layers.D1EG4_KB.js} +2 -2
- package/dist/{layers.Cmxp8pV5.js → layers.D4c48hOc.js} +24 -24
- package/dist/{layers.Dl8sVR2P.js → layers.D56Tfhmk.js} +1 -1
- package/dist/{layers.BDlWEWBN.js → layers.D6Atcltc.js} +1 -1
- package/dist/layers.D6Rqlluc.js +8 -0
- package/dist/{layers.C4JxlowK.js → layers.D7AgOP2Q.js} +1 -1
- package/dist/{layers.BiS9-lDF.js → layers.D8sE8uHE.js} +8 -8
- package/dist/{layers.BTBO4eMW.js → layers.DBVHuw-w.js} +1 -1
- package/dist/{layers.8U0GBHRZ.js → layers.DC6dMnJc.js} +1 -1
- package/dist/{layers.DAlaatv8.js → layers.DCEcRZzx.js} +1 -1
- package/dist/{layers.X1hul86v.js → layers.DE1igpPm.js} +4 -4
- package/dist/{layers.BSNFhcxo.js → layers.DFFhOqpa.js} +3 -3
- package/dist/{layers.CRg-B1vP.js → layers.DG-JxETp.js} +4 -4
- package/dist/{layers.C8fbK8uf.js → layers.DJOVnwM2.js} +2 -2
- package/dist/{layers.3UVMaoC9.js → layers.DKm2qNyS.js} +3 -3
- package/dist/{layers.BNRV7XGA.js → layers.DLJD83oe.js} +1 -1
- package/dist/layers.DNZpmwzY.js +1 -0
- package/dist/{layers.CCzUe8xK.js → layers.DO1IXM7s.js} +1 -1
- package/dist/{layers.BqPCMU8w.js → layers.DOkhborM.js} +1 -1
- package/dist/{layers.Bn6kIrny.js → layers.DPTwQEic.js} +1 -1
- package/dist/{layers.DV2Gv4v7.js → layers.DRYcao5O.js} +4 -4
- package/dist/{layers.K4cBv23e.js → layers.DUu5ONqk.js} +1 -1
- package/dist/{layers.CSkBQxnC.js → layers.D_CF8aTh.js} +1 -1
- package/dist/layers.D_jo1wBE.js +1 -0
- package/dist/{layers.BkFTPCRZ.js → layers.Db1m4LYG.js} +1 -1
- package/dist/{layers.Dd5UvUyZ.js → layers.DbBiHbPW.js} +1 -1
- package/dist/layers.DbT3gbC2.js +1 -0
- package/dist/{layers.v7wAIgcY.js → layers.DbYcHeQn.js} +1 -1
- package/dist/{layers.BO-2MPoe.js → layers.DfYqcDoS.js} +1 -1
- package/dist/{layers.DI5443bl.js → layers.DhiI16il.js} +1 -1
- package/dist/{layers.D5RNhA0Y.js → layers.DhnMVCTe.js} +1 -1
- package/dist/layers.DilA0qnM.js +54 -0
- package/dist/{layers.DduFwONh.js → layers.DiqKogMY.js} +1 -1
- package/dist/{layers.UpXfP8aP.js → layers.DjXVVFJ6.js} +1 -1
- package/dist/{layers.CIzvJORb.js → layers.DkB4TLLx.js} +1 -1
- package/dist/{layers.K2QI0Bof.js → layers.DkoCrPjT.js} +1 -1
- package/dist/{layers.BGMakO5J.js → layers.DlMc9MQp.js} +3 -3
- package/dist/{layers.BjhL04eE.js → layers.Dm1R5-Bc.js} +1 -1
- package/dist/{layers.UaAliOOU.js → layers.DnklT_6f.js} +1 -1
- package/dist/{layers.BrGu4vtF.js → layers.DrytRiPP.js} +1 -1
- package/dist/{layers.-w6pj3Y4.js → layers.DsQWXcJg.js} +1 -1
- package/dist/layers.Dtoqj1Fs.js +17 -0
- package/dist/{layers.BA2uiqCQ.js → layers.DuGuDpd7.js} +1 -1
- package/dist/layers.DuMcCkrh.js +346 -0
- package/dist/{layers.LiZI0ZwD.js → layers.Dun64x33.js} +1 -1
- package/dist/layers.DvWEGYe1.js +454 -0
- package/dist/{layers.DvYO0f59.js → layers.DvXoBIUZ.js} +1 -1
- package/dist/{layers.BlfCceBI.js → layers.Dwpj_vFw.js} +1 -1
- package/dist/{layers.DgqoyVBV.js → layers.Dx6ZLQwW.js} +1 -1
- package/dist/{layers.Clxb8f1x.js → layers.DxKmenFC.js} +1 -1
- package/dist/{layers.Cqe_oRtA.js → layers.Dy1gtAJp.js} +1 -1
- package/dist/{layers.BtuDtJ-I.js → layers.DylcSpUB.js} +1 -1
- package/dist/{layers.BElz4lCb.js → layers.Ed24dDlF.js} +1 -1
- package/dist/{layers.CdzeAqMM.js → layers.IQeql6ox.js} +1 -1
- package/dist/{layers.B_v-ekSG.js → layers.Igj9Z_X5.js} +1 -1
- package/dist/{layers.t_PLMZsR.js → layers.LRYgh6hQ.js} +4 -4
- package/dist/{layers.BaBYnnag.js → layers.LlaEJBRG.js} +1 -1
- package/dist/{layers.Cg5aVDZJ.js → layers.MusRfIms.js} +1 -1
- package/dist/{layers.MPGGZrAJ.js → layers.PRjOncxz.js} +1 -1
- package/dist/{layers.DdQVuq6G.js → layers.QSWdqOub.js} +1 -1
- package/dist/{layers.DiJjW0J0.js → layers.UDrjC5Tj.js} +1 -1
- package/dist/{layers.CiEV5zOR.js → layers.UeY82rK1.js} +1 -1
- package/dist/{layers.Y5Mmv58o.js → layers.UnFXRP-h.js} +2 -2
- package/dist/{layers.DOU2Orui.js → layers.VUgha0GG.js} +1 -1
- package/dist/layers.W2PJ02K_.js +6 -0
- package/dist/{layers.GbFqgFzH.js → layers.ZH0qMQEf.js} +1 -1
- package/dist/{layers.B4QOFvW7.js → layers.ZZ3oZOeo.js} +1 -1
- package/dist/layers.Za1xNAZb.js +44129 -0
- package/dist/{layers.BK_djDLj.js → layers.ZbZH407Q.js} +1 -1
- package/dist/{layers.DJ7CILqE.js → layers.abCaEHQx.js} +1 -1
- package/dist/{layers.0EKkhaN6.js → layers.bHeq9TkF.js} +3 -3
- package/dist/{layers.BOv3MLex.js → layers.c2NkOi_M.js} +1 -1
- package/dist/{layers.CMIyfHu5.js → layers.cPP8dR9B.js} +1 -1
- package/dist/{layers.DJA3seAe.js → layers.cu_xTYUL.js} +5 -5
- package/dist/{layers.DK1Ji02P.js → layers.eU7eT5YK.js} +1 -1
- package/dist/{layers.usC-HMJr.js → layers.hXAYMeaM.js} +1 -1
- package/dist/{layers.CI97KuQk.js → layers.j9IemQgB.js} +1 -1
- package/dist/{layers.DxDzQDF_.js → layers.jEw_qKmc.js} +1 -1
- package/dist/{layers.HcBlXBPG.js → layers.kOe1DpNx.js} +1 -1
- package/dist/{layers.sC7L7hjr.js → layers.l6FaPfT8.js} +5 -5
- package/dist/{layers.Bv2jdLOB.js → layers.lmJ2S5UE.js} +4 -4
- package/dist/{layers.B0Wh8zJI.js → layers.mcGDz8zt.js} +1 -1
- package/dist/{layers.dkWUYvi-.js → layers.nRX25E69.js} +1 -1
- package/dist/{layers.BMj6a3AQ.js → layers.oHdFw2-y.js} +1 -1
- package/dist/{layers.DIFUdtpU.js → layers.sX3WD0ma.js} +1 -1
- package/dist/{layers.PiLmzDCM.js → layers.vTnx63BV.js} +1 -1
- package/dist/{layers.DdNBJIBy.js → layers.vU34cz08.js} +1 -1
- package/dist/{layers.Cmw0vQ5Q.js → layers.wLREEZrM.js} +1 -1
- package/dist/{layers.447Y1Euo.js → layers.wf0Idf__.js} +4 -4
- package/dist/{layers.RO2h68UE.js → layers.wy9jNSUy.js} +1 -1
- package/dist/{layers.DCxU6g4r.js → layers.y6q4BoT7.js} +1 -1
- package/dist/{layers.Dc_eA38A.js → layers.ylAWGnrt.js} +3 -3
- 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.D5-JajPy.js +0 -8
- 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 { }
|