@layers-app/editor 0.7.91 → 0.7.93
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.BvtO_PCS.js → layers.-qD_IlHz.js} +1 -1
- package/dist/layers.-tiwgsIy.js +17 -0
- package/dist/{layers.BuXkQfJs.js → layers.268NfhIX.js} +1 -1
- package/dist/{layers.DNhCU6s5.js → layers.4vqpsuc3.js} +1 -1
- package/dist/{layers.NUGtVi9X.js → layers.5usI25Xs.js} +1 -1
- package/dist/{layers.Bok_R4HJ.js → layers.7jwh_MfI.js} +1 -1
- package/dist/{layers.Dq14e8um.js → layers.811TSpOY.js} +1 -1
- package/dist/{layers.DvIGamVW.js → layers.9iTOFkOz.js} +1 -1
- package/dist/{layers.C7bBkyxI.js → layers.B0R-ifEH.js} +1 -1
- package/dist/{layers.1FQfuwxk.js → layers.B5LuOdoA.js} +1 -1
- package/dist/{layers.DvGS-SSz.js → layers.B6rOc-Ti.js} +1 -1
- package/dist/{layers.znb6JaWQ.js → layers.B7ml1wOj.js} +3 -3
- package/dist/{layers.DZVHqfks.js → layers.BDiPbruK.js} +1 -1
- package/dist/{layers.jj3JxHzF.js → layers.BEGCfKQE.js} +1 -1
- package/dist/{layers.Dwx_G-uM.js → layers.BEKTKoir.js} +1 -1
- package/dist/layers.BF5czbZm.js +310 -0
- package/dist/{layers.BbTVs0hb.js → layers.BGJFkxfG.js} +1 -1
- package/dist/{layers.Cp-q47r3.js → layers.BHnL_Uok.js} +1 -1
- package/dist/{layers.4nL2QJu6.js → layers.BKTJE34P.js} +1 -1
- package/dist/{layers.C1-KIcV0.js → layers.BLCWQ59V.js} +1 -1
- package/dist/{layers.CneI2StO.js → layers.BLpNviKk.js} +1 -1
- package/dist/{layers.DSu3h3GW.js → layers.BPni5cr6.js} +2 -2
- package/dist/{layers.CCbAhdPE.js → layers.BRP3PhII.js} +3 -3
- package/dist/{layers.iq2p8hfe.js → layers.BUFOBCMy.js} +3 -3
- package/dist/{layers.B8ydiUV_.js → layers.BUhQr1my.js} +1 -1
- package/dist/{layers.BG_57mAh.js → layers.BV-g-xzT.js} +1 -1
- package/dist/{layers.BNymP4r3.js → layers.BZp78mT0.js} +1 -1
- package/dist/{layers.CvjBGGpq.js → layers.BaDwWFkk.js} +1 -1
- package/dist/{layers.D_cWd6Ci.js → layers.BalFy4Pd.js} +1 -1
- package/dist/{layers.BXY3dau8.js → layers.BcCelUDj.js} +1 -1
- package/dist/{layers.BZ1tehAT.js → layers.Bcb3CJTF.js} +2 -2
- package/dist/{layers.B9zBXz3c.js → layers.BeIbAvhr.js} +1 -1
- package/dist/{layers.GHHvJWs7.js → layers.BfyTGtGq.js} +1 -1
- package/dist/{layers.a9shJm0-.js → layers.Bk7jKmXI.js} +1 -1
- package/dist/{layers.D0lUHuZS.js → layers.BkHV48yv.js} +1 -1
- package/dist/{layers.0MCDA6GD.js → layers.Bksq8_Qt.js} +1 -1
- package/dist/{layers.BqGhYWCx.js → layers.BnBIaczk.js} +1 -1
- package/dist/{layers.BQ9IFWJb.js → layers.BoOiKUQt.js} +65 -65
- package/dist/{layers.Ci-ifSxX.js → layers.BpnHi2Sm.js} +1 -1
- package/dist/layers.Brbunzgb.js +1 -0
- package/dist/{layers.DWTB01CF.js → layers.Brrg4jj_.js} +1 -1
- package/dist/{layers.D4-FlYEh.js → layers.BtJnQ0mI.js} +1 -1
- package/dist/{layers.BF7lqemv.js → layers.BufejxmY.js} +1 -1
- package/dist/{layers.DmrZirR9.js → layers.Bzd_kEIv.js} +1 -1
- package/dist/{layers.C0yjCiag.js → layers.BzoSDIc-.js} +1 -1
- package/dist/{layers.DWKg8Tij.js → layers.C-Q16oCj.js} +1 -1
- package/dist/{layers.Dk4MxNnO.js → layers.C01LyZL_.js} +1 -1
- package/dist/{layers.BesXTWr4.js → layers.C2fhjYrc.js} +1 -1
- package/dist/{layers.BhKW4lnv.js → layers.C8DpC6Mn.js} +1 -1
- package/dist/layers.C8scOXtX.js +46873 -0
- package/dist/{layers.CDLqv7ym.js → layers.C94ZEZX8.js} +1 -1
- package/dist/{layers.BoqksHF8.js → layers.CBaBV2iZ.js} +1 -1
- package/dist/{layers.DJEz0fJY.js → layers.CC44ZlQZ.js} +24 -24
- package/dist/{layers.cbsF3ABe.js → layers.CDOF7D2m.js} +4 -4
- package/dist/{layers.CSBT0zCi.js → layers.CF7penQ9.js} +2 -2
- package/dist/{layers.CT9Hxk6p.js → layers.CFML777f.js} +1 -1
- package/dist/{layers.rQCzuZCk.js → layers.CFZqbydb.js} +3 -3
- package/dist/{layers.oIWwbEC6.js → layers.CG4NZuoY.js} +1 -1
- package/dist/{layers.BwN7ktiY.js → layers.CGwmNznF.js} +5 -5
- package/dist/{layers.DbHjUv0g.js → layers.CKJZJ_ts.js} +1 -1
- package/dist/{layers.BsqLCh4g.js → layers.CLVPhrnI.js} +7 -7
- package/dist/{layers.asoCYFXt.js → layers.CM5hqLt_.js} +1 -1
- package/dist/{layers.lyzv8Tdh.js → layers.CN2AORSh.js} +1 -1
- package/dist/layers.CNASfKEr.js +1 -0
- package/dist/{layers.CsZAMBb_.js → layers.CNUJb-Qd.js} +1 -1
- package/dist/{layers.B3-3ASbV.js → layers.CNcMdVwf.js} +1 -1
- package/dist/{layers.DkBfU7g-.js → layers.CRV0BKlE.js} +1 -1
- package/dist/{layers.Cwv-pH3r.js → layers.CRgtKhyz.js} +1 -1
- package/dist/{layers.Bmn-T0aX.js → layers.CTGsC808.js} +1 -1
- package/dist/{layers.xoXACb1H.js → layers.CV9JMOd0.js} +1 -1
- package/dist/{layers.Cx9vuthZ.js → layers.CWTCSE0f.js} +1 -1
- package/dist/{layers.L1TtWkmC.js → layers.CWjT_Kbq.js} +1 -1
- package/dist/{layers.DmU5Anc4.js → layers.CWuSuPfS.js} +1 -1
- package/dist/{layers.DH4ld0eM.js → layers.CXoinSNf.js} +4 -4
- package/dist/{layers.BvXPsusn.js → layers.CZ4Y6y3c.js} +1 -1
- package/dist/{layers.CnipcMUo.js → layers.C_ZG_NmP.js} +1 -1
- package/dist/layers.Ce5d3c4K.js +1 -0
- package/dist/{layers.BRy_5-TU.js → layers.CeI3w2iY.js} +1 -1
- package/dist/{layers.VNpx-j2F.js → layers.CfDwsZU0.js} +1 -1
- package/dist/{layers.CF0Pm8JW.js → layers.CfocA5Re.js} +1 -1
- package/dist/{layers.B99-M2Pq.js → layers.ChEJ2zyQ.js} +1 -1
- package/dist/{layers.DjtdjeMN.js → layers.Chx21Noj.js} +1 -1
- package/dist/{layers.DKl4VJpC.js → layers.CjgXNJBg.js} +1 -1
- package/dist/{layers.DwW9jbSa.js → layers.CjvUFr5W.js} +1 -1
- package/dist/{layers.7M4dPalp.js → layers.CmFR2uKv.js} +1 -1
- package/dist/{layers.Drht2cx0.js → layers.CmNwAjIw.js} +1 -1
- package/dist/layers.CmmYt3Ou.js +1 -0
- package/dist/layers.CnCND_tm.js +533 -0
- package/dist/{layers.BfatF7Hh.js → layers.CpvsNStS.js} +1 -1
- package/dist/{layers.BxJNNCy-.js → layers.Csi-9lrm.js} +1 -1
- package/dist/{layers.CMBnoQyb.js → layers.CsqTB_b0.js} +1 -1
- package/dist/{layers.CoWmapX6.js → layers.CxiX7XmH.js} +1 -1
- package/dist/{layers.DelKapFT.js → layers.Cz_0Xe5w.js} +1 -1
- package/dist/{layers.B7EDfju3.js → layers.D0l4OEP1.js} +1 -1
- package/dist/{layers.DnF_P606.js → layers.D1UqHxFG.js} +1 -1
- package/dist/{layers.Ci06Jg5Q.js → layers.D4BL-_g4.js} +1 -1
- package/dist/{layers.BAvL9Vgi.js → layers.D4QdQ1B8.js} +1 -1
- package/dist/{layers.B7VSWicC.js → layers.D5ldRac_.js} +1 -1
- package/dist/{layers.DpPj0eFu.js → layers.D6sxU8A2.js} +2 -2
- package/dist/{layers.BRXB2ojy.js → layers.D9BOJQ5y.js} +1 -1
- package/dist/{layers.BNuDloNS.js → layers.DAvGftUZ.js} +4 -4
- package/dist/layers.DBe4vr1J.js +6 -0
- package/dist/{layers.DruYzHRH.js → layers.DDQgSWZM.js} +4 -4
- package/dist/{layers.VASPkGuF.js → layers.DDZzHO2e.js} +1 -1
- package/dist/{layers.FYZb1Qxa.js → layers.DEkU827U.js} +1 -1
- package/dist/{layers.C7KfPjce.js → layers.DFmZFu4s.js} +1 -1
- package/dist/{layers.hF5ho8rn.js → layers.DFmhjbPv.js} +3 -3
- package/dist/{layers.4lM2vICA.js → layers.DFuWTxaW.js} +1 -1
- package/dist/layers.DGYg3grQ.js +346 -0
- package/dist/{layers.B4bx8nL1.js → layers.DGh8drOs.js} +1 -1
- package/dist/layers.DH0uo8fs.js +1 -0
- package/dist/{layers.DQTLb9d2.js → layers.DHzGmamJ.js} +1 -1
- package/dist/{layers.CviNHuzh.js → layers.DM5FQGwH.js} +1 -1
- package/dist/{layers.CqUy9knK.js → layers.DNoj8uH2.js} +1 -1
- package/dist/{layers.21eP602X.js → layers.DOTdJgPv.js} +1 -1
- package/dist/{layers.A_9hYuUz.js → layers.DRGSxBgi.js} +1 -1
- package/dist/{layers.B51O0bab.js → layers.DSzKKGJF.js} +1 -1
- package/dist/{layers.C-Lpwe6Y.js → layers.DTBSutEB.js} +1 -1
- package/dist/{layers.B9i3jaXy.js → layers.DTCgqxVH.js} +1 -1
- package/dist/{layers.BJW0cUVW.js → layers.DTUuZqOa.js} +3 -3
- package/dist/{layers.Dga6kbUR.js → layers.DTkHkrLG.js} +5 -5
- package/dist/{layers.B2E3vOjo.js → layers.DUlvtU8P.js} +1 -1
- package/dist/{layers.yxXv8-qx.js → layers.DVTq8SE9.js} +1 -1
- package/dist/{layers.BcRyWi7P.js → layers.DWAnuPjJ.js} +1 -1
- package/dist/{layers.CY8jpw3v.js → layers.DXe2VR26.js} +1 -1
- package/dist/{layers.K82Ix00Q.js → layers.DYnnh-09.js} +1 -1
- package/dist/{layers.DKEvxn4N.js → layers.D_1KCN2L.js} +1 -1
- package/dist/{layers.9m-q7HMz.js → layers.D_CVQ8_U.js} +1 -1
- package/dist/{layers.BMyYO1L4.js → layers.D_gH0Is5.js} +1 -1
- package/dist/{layers.BJdjhfwW.js → layers.D_m-25Ic.js} +3 -3
- package/dist/{layers.BiQGJYlX.js → layers.Daizjhsk.js} +3 -3
- package/dist/{layers.Btx_w26T.js → layers.DcVK6qgi.js} +1 -1
- package/dist/layers.Dh7vm0BH.js +500 -0
- package/dist/{layers.D9t5OjhB.js → layers.DhR_eZa8.js} +1 -1
- package/dist/{layers.DE6n2lbB.js → layers.Dhtl9hTt.js} +1 -1
- package/dist/{layers.Ca70aMup.js → layers.DhwgnsWZ.js} +1 -1
- package/dist/layers.DilA0qnM.js +54 -0
- package/dist/{layers.dCqlJwEm.js → layers.DkwDMTq9.js} +1 -1
- package/dist/{layers.BH8Of-0h.js → layers.DmvODDQ0.js} +4 -4
- package/dist/{layers.DL_w_37d.js → layers.DqwY2YKL.js} +1 -1
- package/dist/{layers.CeWOvOd5.js → layers.DryQJgTf.js} +1 -1
- package/dist/{layers.Bjl1_R6Z.js → layers.DuqUo0oU.js} +1 -1
- package/dist/{layers.te3QRbJL.js → layers.DwFHPFXW.js} +1 -1
- package/dist/{layers.D8oafJyy.js → layers.DxYNx_WJ.js} +1 -1
- package/dist/layers.Dybb-MrJ.js +1 -0
- package/dist/{layers.COnQtCRG.js → layers.Dyd9_aH-.js} +1 -1
- package/dist/{layers.DU_eOKX_.js → layers.DzZ61AN4.js} +1 -1
- package/dist/{layers.4c98ipgw.js → layers.Dzvv_LWT.js} +3 -3
- package/dist/{layers.CzZEhYA6.js → layers.Fp2xKhlB.js} +1 -1
- package/dist/{layers.BpAsaaWJ.js → layers.FuV5aVfW.js} +1 -1
- package/dist/{layers.C_BuSOXV.js → layers.GVr5uU5W.js} +1 -1
- package/dist/{layers.DfTfRyZ2.js → layers.GsD0_GxX.js} +8 -8
- package/dist/{layers.D5Bmkzi7.js → layers.I1SLD0UK.js} +1 -1
- package/dist/{layers.DGhDlf0S.js → layers.IkYeHNd-.js} +1 -1
- package/dist/{layers.sKwo4Pse.js → layers.JabcC5VX.js} +1 -1
- package/dist/{layers.DhS8fXO1.js → layers.LQ0WKJCL.js} +1 -1
- package/dist/{layers.CDWdO4TY.js → layers.Lm3yzugI.js} +1 -1
- package/dist/{layers.DXhEw3Uf.js → layers.M4h6tkxO.js} +1 -1
- package/dist/{layers.CyzIJ83u.js → layers.MqC_9V6k.js} +1 -1
- package/dist/{layers.CrxxaDR8.js → layers.OFbtrZYp.js} +3 -3
- package/dist/{layers.DrEFOohr.js → layers.PvxtC1eC.js} +1 -1
- package/dist/{layers.BmcaRPr9.js → layers.QnTzffzI.js} +1 -1
- package/dist/{layers.DIpIP-Vy.js → layers.Qr2h1-VC.js} +1 -1
- package/dist/{layers.B7QYOT88.js → layers.SWM1KY20.js} +1 -1
- package/dist/{layers.BfLRCTr_.js → layers.Stx3Iboc.js} +1 -1
- package/dist/{layers.C9Uu962e.js → layers.UWbJSE_q.js} +1 -1
- package/dist/layers.UyyKG0j1.js +8 -0
- package/dist/{layers.BY2JPIgs.js → layers.V9lJ9Ccb.js} +1 -1
- package/dist/{layers.BhkVL0ec.js → layers.VBselTAE.js} +1 -1
- package/dist/{layers.Dh4wDGq5.js → layers.VjAp6vpG.js} +1 -1
- package/dist/{layers.BYen0VP_.js → layers.XxXB7ixR.js} +1 -1
- package/dist/{layers.C82DUOIJ.js → layers.Y7kZzQzI.js} +1 -1
- package/dist/{layers.DVxOlwho.js → layers._LRYHSJ0.js} +1 -1
- package/dist/{layers.Di_ebgPq.js → layers._TXR7_BW.js} +1 -1
- package/dist/{layers.BPq549HI.js → layers._ram0v-H.js} +1 -1
- package/dist/{layers.xYDGOBJ7.js → layers.aZyt0ZhK.js} +4 -4
- package/dist/{layers.CfKCx5re.js → layers.cYc9Mkkl.js} +1 -1
- package/dist/{layers.Bq29Ll-w.js → layers.czDrchz1.js} +1 -1
- package/dist/{layers.Bi62ky0O.js → layers.fsKnbvfV.js} +1 -1
- package/dist/{layers.D6LPAQ3H.js → layers.gCS_1NW6.js} +1 -1
- package/dist/{layers.CIZONehB.js → layers.hmEL7VCj.js} +1 -1
- package/dist/{layers.CB0yKett.js → layers.iCGkfdqe.js} +1 -1
- package/dist/{layers.EsSJyH4p.js → layers.iYPrW38K.js} +1 -1
- package/dist/{layers.DpEgNhvJ.js → layers.igq8-CrV.js} +6 -6
- package/dist/{layers.Dzk6fJM5.js → layers.jI-GVlXe.js} +1 -1
- package/dist/{layers.CmPS8wik.js → layers.kpBucBt1.js} +1 -1
- package/dist/{layers.QFXdXzNC.js → layers.l9IaJ8Na.js} +1 -1
- package/dist/{layers.DZffch6Z.js → layers.mCNNRzMK.js} +1 -1
- package/dist/{layers.jtSThhXP.js → layers.mCqe-cvO.js} +1 -1
- package/dist/{layers.C-5u25tX.js → layers.mRg6Wxq7.js} +1 -1
- package/dist/{layers.CBdEFdre.js → layers.msmp08Xf.js} +4 -4
- package/dist/{layers.BWCOE2r1.js → layers.nltEsUBo.js} +4 -4
- package/dist/{layers.CBNU_L8B.js → layers.orgRZ2V9.js} +1 -1
- package/dist/{layers.BkOUTv0-.js → layers.qRe_lZMu.js} +1 -1
- package/dist/{layers.BBPVs8ke.js → layers.rulLZ93L.js} +1 -1
- package/dist/{layers.CS6GZ0E2.js → layers.sFmfgHo4.js} +3 -3
- package/dist/{layers.DIHJym5q.js → layers.vU738QAp.js} +1 -1
- package/dist/{layers.C31JBznY.js → layers.ve-b1iUI.js} +1 -1
- package/dist/layers.vgzUgI4K.js +1 -0
- package/dist/{layers.CIBowC3x.js → layers.vvoHMkog.js} +1 -1
- package/dist/{layers.ptSKSnsM.js → layers.yFxcgyah.js} +2 -2
- package/dist/{layers.PnPB2nn8.js → layers.yasiEV95.js} +1 -1
- package/dist/{layers.CbOy6iuh.js → layers.zE2Ag_LD.js} +1 -1
- package/dist/{layers.CGShHrLT.js → layers.zW7UNB56.js} +1 -1
- package/package.json +46 -20
- 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 { }
|