@layers-app/editor 0.7.91 → 0.7.92
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.BxJNNCy-.js → layers.-cNYa8FH.js} +1 -1
- package/dist/layers.-go0yqrB.js +346 -0
- package/dist/{layers.CzZEhYA6.js → layers.-mDZECmb.js} +1 -1
- package/dist/{layers.L1TtWkmC.js → layers.2HPpqSIH.js} +1 -1
- package/dist/{layers.DmU5Anc4.js → layers.8fnCtugI.js} +1 -1
- package/dist/{layers.CGShHrLT.js → layers.8jZXu6Rm.js} +1 -1
- package/dist/{layers.CBdEFdre.js → layers.9mcMwZEW.js} +4 -4
- package/dist/{layers.Bmn-T0aX.js → layers.9mdVpQdh.js} +1 -1
- package/dist/{layers.C31JBznY.js → layers.B1ARxIqB.js} +1 -1
- package/dist/{layers.CY8jpw3v.js → layers.B1oYEFZP.js} +1 -1
- package/dist/{layers.DvGS-SSz.js → layers.B3UEoC3V.js} +1 -1
- package/dist/{layers.BNymP4r3.js → layers.B3mTVCFZ.js} +1 -1
- package/dist/{layers.Dzk6fJM5.js → layers.B5DNqRLR.js} +1 -1
- package/dist/{layers.DQTLb9d2.js → layers.B67YEwi2.js} +1 -1
- package/dist/{layers.DNhCU6s5.js → layers.B6iDa8RT.js} +1 -1
- package/dist/{layers.9m-q7HMz.js → layers.B8MrCT1B.js} +1 -1
- package/dist/{layers.yxXv8-qx.js → layers.B8Y8jR5X.js} +1 -1
- package/dist/{layers.DfTfRyZ2.js → layers.B9Jm8gWZ.js} +8 -8
- package/dist/{layers.DvIGamVW.js → layers.BA-Hn-8i.js} +1 -1
- package/dist/{layers.D6LPAQ3H.js → layers.BAJ2-bXH.js} +1 -1
- package/dist/{layers.CSBT0zCi.js → layers.BBvJZ2gd.js} +2 -2
- package/dist/{layers.a9shJm0-.js → layers.BFBYRXUj.js} +1 -1
- package/dist/layers.BFiBXBMU.js +1 -0
- package/dist/{layers.Cx9vuthZ.js → layers.BHIb7oOU.js} +1 -1
- package/dist/{layers.jj3JxHzF.js → layers.BJ9hFtJT.js} +1 -1
- package/dist/{layers.CnipcMUo.js → layers.BNQ1MOkD.js} +1 -1
- package/dist/{layers.BBPVs8ke.js → layers.BNi48siA.js} +1 -1
- package/dist/{layers.C_BuSOXV.js → layers.BOh-DK5k.js} +1 -1
- package/dist/{layers.xYDGOBJ7.js → layers.BQ-H3YLY.js} +4 -4
- package/dist/{layers.DVxOlwho.js → layers.BR01ua_4.js} +1 -1
- package/dist/{layers.cbsF3ABe.js → layers.BUGORd_C.js} +4 -4
- package/dist/{layers.CbOy6iuh.js → layers.BV5O3Yjr.js} +1 -1
- package/dist/{layers.DpPj0eFu.js → layers.BX4qFBHZ.js} +2 -2
- package/dist/layers.BYU-0xYT.js +6 -0
- package/dist/{layers.Dq14e8um.js → layers.BYtl3t4o.js} +1 -1
- package/dist/{layers.DjtdjeMN.js → layers.Ba0lsCQC.js} +1 -1
- package/dist/{layers.C82DUOIJ.js → layers.BcpQT2YY.js} +1 -1
- package/dist/{layers.C1-KIcV0.js → layers.BcsRLUTx.js} +1 -1
- package/dist/{layers.DXhEw3Uf.js → layers.BeWDYex5.js} +1 -1
- package/dist/{layers.BRXB2ojy.js → layers.BexTNd-c.js} +1 -1
- package/dist/{layers.BQ9IFWJb.js → layers.BfpJiswu.js} +65 -65
- package/dist/{layers.BhkVL0ec.js → layers.BgVF9Tny.js} +1 -1
- package/dist/{layers.EsSJyH4p.js → layers.BhE4ByBZ.js} +1 -1
- package/dist/{layers.B99-M2Pq.js → layers.BhIZgvhm.js} +1 -1
- package/dist/{layers.QFXdXzNC.js → layers.BhjR9hmy.js} +1 -1
- package/dist/{layers.ptSKSnsM.js → layers.BjSFrA4f.js} +2 -2
- package/dist/{layers.DZffch6Z.js → layers.BltC4xgl.js} +1 -1
- package/dist/{layers.CF0Pm8JW.js → layers.Bmk77Nl5.js} +1 -1
- package/dist/{layers.DwW9jbSa.js → layers.Bn8tW8p5.js} +1 -1
- package/dist/{layers.iq2p8hfe.js → layers.BoPR0wQt.js} +3 -3
- package/dist/{layers.VNpx-j2F.js → layers.BoX_Wqae.js} +1 -1
- package/dist/{layers.DKl4VJpC.js → layers.BqCSz12w.js} +1 -1
- package/dist/{layers.A_9hYuUz.js → layers.Bqqt2WZE.js} +1 -1
- package/dist/{layers.D9t5OjhB.js → layers.BrsKNoq-.js} +1 -1
- package/dist/{layers.DKEvxn4N.js → layers.BvhzLRzG.js} +1 -1
- package/dist/{layers.BsqLCh4g.js → layers.Bvv96FkK.js} +7 -7
- package/dist/layers.Bvxpmu-2.js +1 -0
- package/dist/{layers.B4bx8nL1.js → layers.BvzEdEXm.js} +1 -1
- package/dist/{layers.DE6n2lbB.js → layers.Bx8how39.js} +1 -1
- package/dist/{layers.GHHvJWs7.js → layers.BxFztpj5.js} +1 -1
- package/dist/{layers.CvjBGGpq.js → layers.BxH_KvZM.js} +1 -1
- package/dist/{layers.D8oafJyy.js → layers.BxY27rS7.js} +1 -1
- package/dist/{layers.BuXkQfJs.js → layers.By_kFoy7.js} +1 -1
- package/dist/{layers.lyzv8Tdh.js → layers.BzC8fzb9.js} +1 -1
- package/dist/{layers.CDLqv7ym.js → layers.BzRIellV.js} +1 -1
- package/dist/{layers.CBNU_L8B.js → layers.BzZqZM22.js} +1 -1
- package/dist/layers.C-hhGDUy.js +8 -0
- package/dist/{layers.DnF_P606.js → layers.C3l4W4QY.js} +1 -1
- package/dist/{layers.CrxxaDR8.js → layers.C4ZTYVln.js} +3 -3
- package/dist/{layers.BPq549HI.js → layers.C5LXz2Dt.js} +1 -1
- package/dist/{layers.Bok_R4HJ.js → layers.C5Oq8KLD.js} +1 -1
- package/dist/{layers.K82Ix00Q.js → layers.C68ajHa1.js} +1 -1
- package/dist/{layers.BqGhYWCx.js → layers.C6i05MYQ.js} +1 -1
- package/dist/{layers.DelKapFT.js → layers.C9OSt3-B.js} +1 -1
- package/dist/{layers.Di_ebgPq.js → layers.CA75s71W.js} +1 -1
- package/dist/{layers.C-Lpwe6Y.js → layers.CARdVtYx.js} +1 -1
- package/dist/{layers.Bjl1_R6Z.js → layers.CAoP3DTW.js} +1 -1
- package/dist/{layers.BAvL9Vgi.js → layers.CCCrplmS.js} +1 -1
- package/dist/{layers.BF7lqemv.js → layers.CCeryKPD.js} +1 -1
- package/dist/{layers.Bq29Ll-w.js → layers.CCyI84zh.js} +1 -1
- package/dist/{layers.Cwv-pH3r.js → layers.CD8wS95C.js} +1 -1
- package/dist/{layers.Btx_w26T.js → layers.CE94zD9l.js} +1 -1
- package/dist/{layers.C0yjCiag.js → layers.CEResW_R.js} +1 -1
- package/dist/{layers.B51O0bab.js → layers.CEoeaJQD.js} +1 -1
- package/dist/{layers.D_cWd6Ci.js → layers.CFzM74P5.js} +1 -1
- package/dist/{layers.DmrZirR9.js → layers.CHC4RiFK.js} +1 -1
- package/dist/{layers.B7QYOT88.js → layers.CI16GYp5.js} +1 -1
- package/dist/layers.CIg6bGPB.js +1 -0
- package/dist/{layers.COnQtCRG.js → layers.CJ6TVAfM.js} +1 -1
- package/dist/{layers.DWTB01CF.js → layers.CJfAmCMO.js} +1 -1
- package/dist/{layers.C9Uu962e.js → layers.CKZ6gFse.js} +1 -1
- package/dist/{layers.BkOUTv0-.js → layers.CMnu34_U.js} +1 -1
- package/dist/{layers.BG_57mAh.js → layers.CNUeObBK.js} +1 -1
- package/dist/{layers.BXY3dau8.js → layers.CPaiSNny.js} +1 -1
- package/dist/{layers.BMyYO1L4.js → layers.CRW9Fwvq.js} +1 -1
- package/dist/{layers.B8ydiUV_.js → layers.CTpPpYwM.js} +1 -1
- package/dist/{layers.B2E3vOjo.js → layers.CTsI8G5d.js} +1 -1
- package/dist/layers.CVCmClj2.js +1 -0
- package/dist/{layers.BesXTWr4.js → layers.CVFxZSWW.js} +1 -1
- package/dist/{layers.asoCYFXt.js → layers.CVH7bHbB.js} +1 -1
- package/dist/{layers.DruYzHRH.js → layers.CcvQrhZG.js} +4 -4
- package/dist/{layers.C7bBkyxI.js → layers.CdTCz5Y3.js} +1 -1
- package/dist/{layers.CDWdO4TY.js → layers.CeayngSI.js} +1 -1
- package/dist/{layers.VASPkGuF.js → layers.Cfdr-h4O.js} +1 -1
- package/dist/{layers.0MCDA6GD.js → layers.CgkVp4lC.js} +1 -1
- package/dist/{layers.DU_eOKX_.js → layers.ChzgxWon.js} +1 -1
- package/dist/{layers.BbTVs0hb.js → layers.Cj01jo54.js} +1 -1
- package/dist/{layers.BhKW4lnv.js → layers.ClQJRYXj.js} +1 -1
- package/dist/layers.CmmYt3Ou.js +1 -0
- package/dist/{layers.CCbAhdPE.js → layers.CmyRYGoE.js} +3 -3
- package/dist/{layers.CS6GZ0E2.js → layers.CpZ9aPMO.js} +3 -3
- package/dist/{layers.xoXACb1H.js → layers.Cpw6B803.js} +1 -1
- package/dist/{layers.te3QRbJL.js → layers.CqyzxURh.js} +1 -1
- package/dist/{layers.CfKCx5re.js → layers.Cs7GlunF.js} +1 -1
- package/dist/{layers.B7VSWicC.js → layers.CsEfNhVM.js} +1 -1
- package/dist/{layers.Cp-q47r3.js → layers.CsMhgQ1t.js} +1 -1
- package/dist/{layers.DbHjUv0g.js → layers.CsWdKhEu.js} +1 -1
- package/dist/{layers.DL_w_37d.js → layers.CsvDJIZ7.js} +1 -1
- package/dist/{layers.BoqksHF8.js → layers.CuPX21JA.js} +1 -1
- package/dist/{layers.DGhDlf0S.js → layers.CwB1NQbd.js} +1 -1
- package/dist/{layers.C-5u25tX.js → layers.Cx-9Emh6.js} +1 -1
- package/dist/{layers.Ci-ifSxX.js → layers.D1bCzAYq.js} +1 -1
- package/dist/{layers.D4-FlYEh.js → layers.D1dsXFS0.js} +1 -1
- package/dist/{layers.1FQfuwxk.js → layers.D24Anxjv.js} +1 -1
- package/dist/layers.D3uB-jsE.js +1 -0
- package/dist/{layers.BpAsaaWJ.js → layers.D4MDjmxL.js} +1 -1
- package/dist/{layers.BZ1tehAT.js → layers.D5hpoy9h.js} +2 -2
- package/dist/{layers.B9i3jaXy.js → layers.D6oKUbDE.js} +1 -1
- package/dist/{layers.jtSThhXP.js → layers.D8An70uL.js} +1 -1
- package/dist/{layers.D5Bmkzi7.js → layers.D8yufb88.js} +1 -1
- package/dist/{layers.Dwx_G-uM.js → layers.D9FgdobB.js} +1 -1
- package/dist/{layers.B7EDfju3.js → layers.D9OpTLfE.js} +1 -1
- package/dist/{layers.BfLRCTr_.js → layers.D9VTCVI3.js} +1 -1
- package/dist/{layers.DIpIP-Vy.js → layers.DCMj-1Uf.js} +1 -1
- package/dist/{layers.Bi62ky0O.js → layers.DCv5ETXp.js} +1 -1
- package/dist/{layers.oIWwbEC6.js → layers.DEKzHuSi.js} +1 -1
- package/dist/layers.DF05j1M2.js +17 -0
- package/dist/{layers.CB0yKett.js → layers.DFYEVVfs.js} +1 -1
- package/dist/{layers.Ci06Jg5Q.js → layers.DFfOmmco.js} +1 -1
- package/dist/{layers.DpEgNhvJ.js → layers.DFjAixjy.js} +6 -6
- package/dist/{layers.BfatF7Hh.js → layers.DHa8WGDC.js} +1 -1
- package/dist/{layers.CyzIJ83u.js → layers.DN0u5Yg6.js} +1 -1
- package/dist/{layers.DJEz0fJY.js → layers.DOrY9DYv.js} +24 -24
- package/dist/{layers.Dk4MxNnO.js → layers.DPgn17B0.js} +1 -1
- package/dist/{layers.DrEFOohr.js → layers.DVpWFLjR.js} +1 -1
- package/dist/{layers.7M4dPalp.js → layers.DZT2dQyG.js} +1 -1
- package/dist/{layers.DIHJym5q.js → layers.D_H6PF0v.js} +1 -1
- package/dist/{layers.CqUy9knK.js → layers.D_YdTiFW.js} +1 -1
- package/dist/{layers.BJW0cUVW.js → layers.DbF4xVBE.js} +3 -3
- package/dist/{layers.DkBfU7g-.js → layers.Ddribg71.js} +1 -1
- package/dist/{layers.znb6JaWQ.js → layers.Dfq7GSQ2.js} +3 -3
- package/dist/{layers.DhS8fXO1.js → layers.DhHQZIJN.js} +1 -1
- package/dist/layers.DilA0qnM.js +54 -0
- package/dist/layers.DjVLYoWg.js +1 -0
- package/dist/{layers.CsZAMBb_.js → layers.DkaXOqLh.js} +1 -1
- package/dist/{layers.PnPB2nn8.js → layers.DnVwZ2Cw.js} +1 -1
- package/dist/{layers.CneI2StO.js → layers.Do_EHOq8.js} +1 -1
- package/dist/{layers.CIBowC3x.js → layers.DowbTgQm.js} +1 -1
- package/dist/{layers.Dh4wDGq5.js → layers.DpBgVacc.js} +1 -1
- package/dist/{layers.BvXPsusn.js → layers.DpQ_bWul.js} +1 -1
- package/dist/{layers.hF5ho8rn.js → layers.DqC47xCC.js} +3 -3
- package/dist/layers.Drh9XlcG.js +309 -0
- package/dist/{layers.BvtO_PCS.js → layers.Du1TNcZd.js} +1 -1
- package/dist/{layers.21eP602X.js → layers.DuAvgcNM.js} +1 -1
- package/dist/{layers.BiQGJYlX.js → layers.DuE9Eexi.js} +3 -3
- package/dist/{layers.BY2JPIgs.js → layers.DvHXCGpY.js} +1 -1
- package/dist/{layers.4lM2vICA.js → layers.DvSpirXT.js} +1 -1
- package/dist/{layers.CIZONehB.js → layers.Dvto57We.js} +1 -1
- package/dist/layers.DxydmUP3.js +533 -0
- package/dist/{layers.BJdjhfwW.js → layers.DyTr0iC-.js} +3 -3
- package/dist/{layers.B3-3ASbV.js → layers.EDqAD98V.js} +1 -1
- package/dist/{layers.DZVHqfks.js → layers.Fdk6MvMH.js} +1 -1
- package/dist/{layers.CeWOvOd5.js → layers.Kal-YH7y.js} +1 -1
- package/dist/{layers.Dga6kbUR.js → layers.L5G2E32S.js} +5 -5
- package/dist/{layers.D0lUHuZS.js → layers.PxPuzt12.js} +1 -1
- package/dist/{layers.4nL2QJu6.js → layers.QABnXFIR.js} +1 -1
- package/dist/{layers.rQCzuZCk.js → layers.QXq1glLQ.js} +3 -3
- package/dist/{layers.sKwo4Pse.js → layers.Rd4Aez_o.js} +1 -1
- package/dist/layers.UCGv1oR7.js +46553 -0
- package/dist/{layers.FYZb1Qxa.js → layers.UNs4NPL2.js} +1 -1
- package/dist/{layers.DSu3h3GW.js → layers.VteHR-nD.js} +2 -2
- package/dist/{layers.C7KfPjce.js → layers.WS0tOiF9.js} +1 -1
- package/dist/layers.Wc4s15q8.js +500 -0
- package/dist/{layers.Drht2cx0.js → layers.YmVu7Jyc.js} +1 -1
- package/dist/{layers.BH8Of-0h.js → layers.c1g3UUys.js} +4 -4
- package/dist/{layers.CmPS8wik.js → layers.cHiyhRv0.js} +1 -1
- package/dist/{layers.BNuDloNS.js → layers.e4WMAP8p.js} +4 -4
- package/dist/{layers.NUGtVi9X.js → layers.gkJkfBXX.js} +1 -1
- package/dist/{layers.B9zBXz3c.js → layers.iUn6qHX-.js} +1 -1
- package/dist/{layers.CoWmapX6.js → layers.jJYSd22J.js} +1 -1
- package/dist/{layers.CT9Hxk6p.js → layers.jNpPtSYq.js} +1 -1
- package/dist/{layers.CviNHuzh.js → layers.nh-jugfR.js} +1 -1
- package/dist/{layers.BcRyWi7P.js → layers.noEAcBug.js} +1 -1
- package/dist/{layers.BWCOE2r1.js → layers.o8IUzzuA.js} +4 -4
- package/dist/{layers.DH4ld0eM.js → layers.poSPbB9X.js} +4 -4
- package/dist/{layers.4c98ipgw.js → layers.qH1Kvygt.js} +3 -3
- package/dist/{layers.DWKg8Tij.js → layers.qfL_NxUA.js} +1 -1
- package/dist/{layers.BmcaRPr9.js → layers.sxqdU83h.js} +1 -1
- package/dist/{layers.BRy_5-TU.js → layers.t-FrNIBD.js} +1 -1
- package/dist/{layers.dCqlJwEm.js → layers.uLbLjX8b.js} +1 -1
- package/dist/{layers.BYen0VP_.js → layers.wZ8wbCG9.js} +1 -1
- package/dist/{layers.CMBnoQyb.js → layers.xI63-j2d.js} +1 -1
- package/dist/{layers.Ca70aMup.js → layers.yAPrlce6.js} +1 -1
- package/dist/{layers.BwN7ktiY.js → layers.zbHQRaAA.js} +5 -5
- package/package.json +192 -166
- package/dist/layers.3wlp4P9d.js +0 -215
- package/dist/layers.B7J5CFj0.js +0 -1
- package/dist/layers.BOHsW04t.js +0 -304
- package/dist/layers.Bb4irhn2.js +0 -1
- package/dist/layers.BdLFy1LQ.js +0 -32095
- package/dist/layers.BwrHLbyv.js +0 -1
- package/dist/layers.C6_k8TfY.js +0 -1
- package/dist/layers.CnXsot8z.js +0 -1
- package/dist/layers.CuAZuCaF.js +0 -6
- package/dist/layers.D8ExizU5.js +0 -1
- package/dist/layers.DNXYPucT.js +0 -8
- package/dist/layers.DR5BxOug.js +0 -295
- package/dist/layers.DXn4_Q99.js +0 -276
- package/dist/layers.DZEfCyxo.js +0 -76
- package/dist/layers.DlSzD9N_.js +0 -271
- package/dist/layers.EQZJkcCG.js +0 -1
- package/dist/layers.gHJCNsHM.js +0 -300
- package/dist/layers.jrsVz6PC.js +0 -1
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, 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;
|
|
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,6 +110,7 @@ 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;
|
|
104
115
|
fetchSmartPastePrompt?: fetchPromptResult;
|
|
105
116
|
fetchSmartPasteStreamPrompt?: fetchPromptStreamResult;
|
|
@@ -181,6 +192,25 @@ declare type fetchPromptStreamResult = (prompt: string, onBlock: (block: string)
|
|
|
181
192
|
|
|
182
193
|
declare type fetchUploadMedia = (file: File, success: SuccessUploadImage, error?: ErrorDeleteImage, signal?: AbortSignal, onProgress?: (percent: number) => void) => void;
|
|
183
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
|
+
|
|
184
214
|
export { FOCUS_COMMAND }
|
|
185
215
|
|
|
186
216
|
export declare function focusEditor(editor: EditorType, atStart?: boolean): void;
|
|
@@ -192,12 +222,21 @@ export declare const Icon: ({ name, iconStyle, ...rest }: {
|
|
|
192
222
|
|
|
193
223
|
declare const iconsBlockTypeToBlockName: Record<string, FC<IconProps>>;
|
|
194
224
|
|
|
225
|
+
declare type ImagePickerGalleryCollection = {
|
|
226
|
+
id: string;
|
|
227
|
+
path: string;
|
|
228
|
+
url: string;
|
|
229
|
+
title: string;
|
|
230
|
+
items: string[];
|
|
231
|
+
};
|
|
232
|
+
|
|
195
233
|
declare type ImagePickerSettings = {
|
|
196
234
|
maxUploadFiles?: number;
|
|
197
235
|
unsplashClientId?: string;
|
|
198
236
|
giphyToken?: string;
|
|
199
237
|
download?: boolean;
|
|
200
238
|
link?: boolean;
|
|
239
|
+
galleryCollection?: ImagePickerGalleryCollection[];
|
|
201
240
|
};
|
|
202
241
|
|
|
203
242
|
declare type Mode = 'comment' | 'default' | 'editor';
|
|
@@ -260,7 +299,7 @@ declare type ResizableContainerProps = {
|
|
|
260
299
|
isEmbed?: boolean;
|
|
261
300
|
alignment?: string;
|
|
262
301
|
disableInteractions?: boolean;
|
|
263
|
-
children:
|
|
302
|
+
children: ReactNode;
|
|
264
303
|
};
|
|
265
304
|
|
|
266
305
|
export declare type Root = SerializedEditorState<SerializedLexicalNode>;
|
|
@@ -296,4 +335,25 @@ export declare type UploadData = {
|
|
|
296
335
|
originalFileName: string;
|
|
297
336
|
};
|
|
298
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
|
+
|
|
299
359
|
export { }
|