@layers-app/editor 0.7.90 → 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.DZSz_qcH.js → layers.-cNYa8FH.js} +1 -1
- package/dist/layers.-go0yqrB.js +346 -0
- package/dist/{layers.uebdwOKq.js → layers.-mDZECmb.js} +1 -1
- package/dist/{layers.D-ZGP1Xn.js → layers.2HPpqSIH.js} +1 -1
- package/dist/{layers.CY7XlSSp.js → layers.8fnCtugI.js} +1 -1
- package/dist/{layers.CaORVRrA.js → layers.8jZXu6Rm.js} +1 -1
- package/dist/{layers.Bshn8mWt.js → layers.9mcMwZEW.js} +4 -4
- package/dist/{layers.tHtpSE5k.js → layers.9mdVpQdh.js} +1 -1
- package/dist/{layers.BjZd_s7H.js → layers.B1ARxIqB.js} +1 -1
- package/dist/{layers.2X0cNWjm.js → layers.B1oYEFZP.js} +1 -1
- package/dist/{layers.DzNZFg56.js → layers.B3UEoC3V.js} +1 -1
- package/dist/{layers.DKIpiQlq.js → layers.B3mTVCFZ.js} +1 -1
- package/dist/{layers.COJEfyVy.js → layers.B5DNqRLR.js} +1 -1
- package/dist/{layers.C5k4ynsr.js → layers.B67YEwi2.js} +1 -1
- package/dist/{layers.CugBQAoy.js → layers.B6iDa8RT.js} +1 -1
- package/dist/{layers.CE0SHuy7.js → layers.B8MrCT1B.js} +1 -1
- package/dist/{layers.B3JN31_h.js → layers.B8Y8jR5X.js} +1 -1
- package/dist/{layers.CvhEIibf.js → layers.B9Jm8gWZ.js} +8 -8
- package/dist/{layers.D4rj-cy7.js → layers.BA-Hn-8i.js} +1 -1
- package/dist/{layers.Co9eTmwb.js → layers.BAJ2-bXH.js} +1 -1
- package/dist/{layers.1zs2Qv-c.js → layers.BBvJZ2gd.js} +2 -2
- package/dist/{layers.BuF2UUJr.js → layers.BFBYRXUj.js} +1 -1
- package/dist/layers.BFiBXBMU.js +1 -0
- package/dist/{layers.DaqlQ6l8.js → layers.BHIb7oOU.js} +1 -1
- package/dist/{layers.PqGzg4Wa.js → layers.BJ9hFtJT.js} +1 -1
- package/dist/{layers.BUtbUni3.js → layers.BNQ1MOkD.js} +1 -1
- package/dist/{layers.CAzggtgk.js → layers.BNi48siA.js} +1 -1
- package/dist/{layers.DsWuLdeN.js → layers.BOh-DK5k.js} +1 -1
- package/dist/{layers.CicD3V5E.js → layers.BQ-H3YLY.js} +4 -4
- package/dist/{layers.B8PPrHUo.js → layers.BR01ua_4.js} +1 -1
- package/dist/{layers.Dptsbk1a.js → layers.BUGORd_C.js} +4 -4
- package/dist/{layers.BkRSoXvG.js → layers.BV5O3Yjr.js} +1 -1
- package/dist/{layers.Brj5jmuH.js → layers.BX4qFBHZ.js} +2 -2
- package/dist/layers.BYU-0xYT.js +6 -0
- package/dist/{layers.DXz2vpQo.js → layers.BYtl3t4o.js} +1 -1
- package/dist/{layers.BEcN1aad.js → layers.Ba0lsCQC.js} +1 -1
- package/dist/{layers.CkWgmSL1.js → layers.BcpQT2YY.js} +1 -1
- package/dist/{layers.Dc19W8CG.js → layers.BcsRLUTx.js} +1 -1
- package/dist/{layers.CmrEgPZd.js → layers.BeWDYex5.js} +1 -1
- package/dist/{layers.B-NmPm-M.js → layers.BexTNd-c.js} +1 -1
- package/dist/{layers.CG38BVMd.js → layers.BfpJiswu.js} +65 -65
- package/dist/{layers.BxLMsfZS.js → layers.BgVF9Tny.js} +1 -1
- package/dist/{layers.C38EcvG7.js → layers.BhE4ByBZ.js} +1 -1
- package/dist/{layers.C-MqLihs.js → layers.BhIZgvhm.js} +1 -1
- package/dist/{layers.eSeNVzGh.js → layers.BhjR9hmy.js} +1 -1
- package/dist/{layers.DZSYa27_.js → layers.BjSFrA4f.js} +2 -2
- package/dist/{layers.DvUK3Ggv.js → layers.BltC4xgl.js} +1 -1
- package/dist/{layers.DqOAppIs.js → layers.Bmk77Nl5.js} +1 -1
- package/dist/{layers.9UczJ4vv.js → layers.Bn8tW8p5.js} +1 -1
- package/dist/{layers.B_WNyvAi.js → layers.BoPR0wQt.js} +3 -3
- package/dist/{layers.CGaAy3Xi.js → layers.BoX_Wqae.js} +1 -1
- package/dist/{layers.CtgMEq45.js → layers.BqCSz12w.js} +1 -1
- package/dist/{layers.Bx5KOkkY.js → layers.Bqqt2WZE.js} +1 -1
- package/dist/{layers.B181WnFI.js → layers.BrsKNoq-.js} +1 -1
- package/dist/{layers.BGQMU4xB.js → layers.BvhzLRzG.js} +1 -1
- package/dist/{layers.Bee4DHJ8.js → layers.Bvv96FkK.js} +7 -7
- package/dist/layers.Bvxpmu-2.js +1 -0
- package/dist/{layers.B0rPCgpv.js → layers.BvzEdEXm.js} +1 -1
- package/dist/{layers.j7s86aHJ.js → layers.Bx8how39.js} +1 -1
- package/dist/{layers.B_kGQGU-.js → layers.BxFztpj5.js} +1 -1
- package/dist/{layers.D5IdYbgv.js → layers.BxH_KvZM.js} +1 -1
- package/dist/{layers.CeayNQPT.js → layers.BxY27rS7.js} +1 -1
- package/dist/{layers.DesA1u0m.js → layers.By_kFoy7.js} +1 -1
- package/dist/{layers.C93k0YTq.js → layers.BzC8fzb9.js} +1 -1
- package/dist/{layers.DIMun4V1.js → layers.BzRIellV.js} +1 -1
- package/dist/{layers.DiEVfr13.js → layers.BzZqZM22.js} +1 -1
- package/dist/layers.C-hhGDUy.js +8 -0
- package/dist/{layers.BGyDRVRM.js → layers.C3l4W4QY.js} +1 -1
- package/dist/{layers.q9cS-tqP.js → layers.C4ZTYVln.js} +3 -3
- package/dist/{layers.DZfIleWT.js → layers.C5LXz2Dt.js} +1 -1
- package/dist/{layers.CNLbL98v.js → layers.C5Oq8KLD.js} +1 -1
- package/dist/{layers.D_AEQcCl.js → layers.C68ajHa1.js} +1 -1
- package/dist/{layers.C02KXUsb.js → layers.C6i05MYQ.js} +1 -1
- package/dist/{layers.CYGESLKC.js → layers.C9OSt3-B.js} +1 -1
- package/dist/{layers.BR6PIOSW.js → layers.CA75s71W.js} +1 -1
- package/dist/{layers.EEGob-u7.js → layers.CARdVtYx.js} +1 -1
- package/dist/{layers.DH3mSYIB.js → layers.CAoP3DTW.js} +1 -1
- package/dist/{layers.DWYXSDOM.js → layers.CCCrplmS.js} +1 -1
- package/dist/{layers.HvIWaOXy.js → layers.CCeryKPD.js} +1 -1
- package/dist/{layers.DKg10KZB.js → layers.CCyI84zh.js} +1 -1
- package/dist/{layers.P7na5DJY.js → layers.CD8wS95C.js} +1 -1
- package/dist/{layers.D6MTqech.js → layers.CE94zD9l.js} +1 -1
- package/dist/{layers.kQXCAPat.js → layers.CEResW_R.js} +1 -1
- package/dist/{layers.C_Ee9AkE.js → layers.CEoeaJQD.js} +1 -1
- package/dist/{layers.CPFyyRSF.js → layers.CFzM74P5.js} +1 -1
- package/dist/{layers.aOEKWS6D.js → layers.CHC4RiFK.js} +1 -1
- package/dist/{layers.BCnC5z1t.js → layers.CI16GYp5.js} +1 -1
- package/dist/layers.CIg6bGPB.js +1 -0
- package/dist/{layers.D2Mt8zQK.js → layers.CJ6TVAfM.js} +1 -1
- package/dist/{layers.DXqeJtVc.js → layers.CJfAmCMO.js} +1 -1
- package/dist/{layers.B4FVwgRF.js → layers.CKZ6gFse.js} +1 -1
- package/dist/{layers.B3KN6XJu.js → layers.CMnu34_U.js} +1 -1
- package/dist/{layers.CRRR8g8w.js → layers.CNUeObBK.js} +1 -1
- package/dist/{layers.CMybm99P.js → layers.CPaiSNny.js} +1 -1
- package/dist/{layers.rDezalXZ.js → layers.CRW9Fwvq.js} +1 -1
- package/dist/{layers.bgswgA43.js → layers.CTpPpYwM.js} +1 -1
- package/dist/{layers.CAvwD5QS.js → layers.CTsI8G5d.js} +1 -1
- package/dist/layers.CVCmClj2.js +1 -0
- package/dist/{layers.jaJzZVal.js → layers.CVFxZSWW.js} +1 -1
- package/dist/{layers.Cxlp5UHa.js → layers.CVH7bHbB.js} +1 -1
- package/dist/{layers.C5agR8-F.js → layers.CcvQrhZG.js} +4 -4
- package/dist/{layers.nEimMZ8b.js → layers.CdTCz5Y3.js} +1 -1
- package/dist/{layers.PYsLSU6b.js → layers.CeayngSI.js} +1 -1
- package/dist/{layers.i00CYzC1.js → layers.Cfdr-h4O.js} +1 -1
- package/dist/{layers.Dk8zEBKw.js → layers.CgkVp4lC.js} +1 -1
- package/dist/{layers.Cr01gCzZ.js → layers.ChzgxWon.js} +1 -1
- package/dist/{layers.Dxds0GzQ.js → layers.Cj01jo54.js} +1 -1
- package/dist/{layers.CrLbWNKh.js → layers.ClQJRYXj.js} +1 -1
- package/dist/layers.CmmYt3Ou.js +1 -0
- package/dist/{layers.rK6ewRwh.js → layers.CmyRYGoE.js} +3 -3
- package/dist/{layers.qtA_3tKG.js → layers.CpZ9aPMO.js} +3 -3
- package/dist/{layers.IfE8bLpj.js → layers.Cpw6B803.js} +1 -1
- package/dist/{layers.BJJPeSyw.js → layers.CqyzxURh.js} +1 -1
- package/dist/{layers.kW7tsVpS.js → layers.Cs7GlunF.js} +1 -1
- package/dist/{layers.DNpKxyt9.js → layers.CsEfNhVM.js} +1 -1
- package/dist/{layers.CTXd-FYQ.js → layers.CsMhgQ1t.js} +1 -1
- package/dist/{layers.BWMRirB2.js → layers.CsWdKhEu.js} +1 -1
- package/dist/{layers.DZrEzEsl.js → layers.CsvDJIZ7.js} +1 -1
- package/dist/{layers.DypVaTsA.js → layers.CuPX21JA.js} +1 -1
- package/dist/{layers.DpBixfTD.js → layers.CwB1NQbd.js} +1 -1
- package/dist/{layers.LT15-Q-_.js → layers.Cx-9Emh6.js} +1 -1
- package/dist/{layers.CdTLwbIf.js → layers.D1bCzAYq.js} +1 -1
- package/dist/{layers.Dm3Pbxlr.js → layers.D1dsXFS0.js} +1 -1
- package/dist/{layers.DhxESdI8.js → layers.D24Anxjv.js} +1 -1
- package/dist/layers.D3uB-jsE.js +1 -0
- package/dist/{layers.CvhW4MLA.js → layers.D4MDjmxL.js} +1 -1
- package/dist/{layers.Cw9CNne-.js → layers.D5hpoy9h.js} +2 -2
- package/dist/{layers.Dn5IGdx4.js → layers.D6oKUbDE.js} +1 -1
- package/dist/{layers.DzJItmZW.js → layers.D8An70uL.js} +1 -1
- package/dist/{layers.CnmnenRk.js → layers.D8yufb88.js} +1 -1
- package/dist/{layers.BM44FsqE.js → layers.D9FgdobB.js} +1 -1
- package/dist/{layers.Ckl5OieF.js → layers.D9OpTLfE.js} +1 -1
- package/dist/{layers.pBXgNI_H.js → layers.D9VTCVI3.js} +1 -1
- package/dist/{layers.D_urYm60.js → layers.DCMj-1Uf.js} +1 -1
- package/dist/{layers.zcnVAnt0.js → layers.DCv5ETXp.js} +1 -1
- package/dist/{layers.BEl6Mt7w.js → layers.DEKzHuSi.js} +1 -1
- package/dist/layers.DF05j1M2.js +17 -0
- package/dist/{layers.B6VnFAx8.js → layers.DFYEVVfs.js} +1 -1
- package/dist/{layers.KpcceaZu.js → layers.DFfOmmco.js} +1 -1
- package/dist/{layers.CXu2BABT.js → layers.DFjAixjy.js} +6 -6
- package/dist/{layers.DwTRhHxk.js → layers.DHa8WGDC.js} +1 -1
- package/dist/{layers.DM7ZdQpT.js → layers.DN0u5Yg6.js} +1 -1
- package/dist/{layers.D9KIFVJ3.js → layers.DOrY9DYv.js} +24 -24
- package/dist/{layers.66MvLO4S.js → layers.DPgn17B0.js} +1 -1
- package/dist/{layers.tSQSqHjR.js → layers.DVpWFLjR.js} +1 -1
- package/dist/{layers.CCQRVfuN.js → layers.DZT2dQyG.js} +1 -1
- package/dist/{layers.BBCFyocu.js → layers.D_H6PF0v.js} +1 -1
- package/dist/{layers.CJJDIEOx.js → layers.D_YdTiFW.js} +1 -1
- package/dist/{layers.BfZ6Mst_.js → layers.DbF4xVBE.js} +3 -3
- package/dist/{layers.DjcG9r8h.js → layers.Ddribg71.js} +1 -1
- package/dist/{layers.Dujw3bP1.js → layers.Dfq7GSQ2.js} +3 -3
- package/dist/{layers.DLBZs3M5.js → layers.DhHQZIJN.js} +1 -1
- package/dist/layers.DilA0qnM.js +54 -0
- package/dist/layers.DjVLYoWg.js +1 -0
- package/dist/{layers.DkjKFZ8B.js → layers.DkaXOqLh.js} +1 -1
- package/dist/{layers.rsbv22Ai.js → layers.DnVwZ2Cw.js} +1 -1
- package/dist/{layers.Bv91xv-u.js → layers.Do_EHOq8.js} +1 -1
- package/dist/{layers.Dx9DMAmE.js → layers.DowbTgQm.js} +1 -1
- package/dist/{layers.Dvlk9h6Y.js → layers.DpBgVacc.js} +1 -1
- package/dist/{layers.CWoSUxrU.js → layers.DpQ_bWul.js} +1 -1
- package/dist/{layers.hSyvo6b8.js → layers.DqC47xCC.js} +3 -3
- package/dist/layers.Drh9XlcG.js +309 -0
- package/dist/{layers.Dse005Td.js → layers.Du1TNcZd.js} +1 -1
- package/dist/{layers.BErhwaUR.js → layers.DuAvgcNM.js} +1 -1
- package/dist/{layers.Zh250Ssd.js → layers.DuE9Eexi.js} +3 -3
- package/dist/{layers.BTzSiuQ2.js → layers.DvHXCGpY.js} +1 -1
- package/dist/{layers.CDjhPok3.js → layers.DvSpirXT.js} +1 -1
- package/dist/{layers.GO8lOgpW.js → layers.Dvto57We.js} +1 -1
- package/dist/layers.DxydmUP3.js +533 -0
- package/dist/{layers.B9T4UM5C.js → layers.DyTr0iC-.js} +3 -3
- package/dist/{layers.k1ATmvz-.js → layers.EDqAD98V.js} +1 -1
- package/dist/{layers.cQ-qlNfh.js → layers.Fdk6MvMH.js} +1 -1
- package/dist/{layers.CjX4JQxt.js → layers.Kal-YH7y.js} +1 -1
- package/dist/{layers.BAKFkwhy.js → layers.L5G2E32S.js} +5 -5
- package/dist/{layers.BmoG90gX.js → layers.PxPuzt12.js} +1 -1
- package/dist/{layers._OUekajf.js → layers.QABnXFIR.js} +1 -1
- package/dist/{layers.Cdg-RQ1L.js → layers.QXq1glLQ.js} +3 -3
- package/dist/{layers.BJr2gHne.js → layers.Rd4Aez_o.js} +1 -1
- package/dist/layers.UCGv1oR7.js +46553 -0
- package/dist/{layers.DvQObHxB.js → layers.UNs4NPL2.js} +1 -1
- package/dist/{layers.BeCvdBEM.js → layers.VteHR-nD.js} +2 -2
- package/dist/{layers.Be1gZD22.js → layers.WS0tOiF9.js} +1 -1
- package/dist/layers.Wc4s15q8.js +500 -0
- package/dist/{layers.CkYercJO.js → layers.YmVu7Jyc.js} +1 -1
- package/dist/{layers.DUdFdurh.js → layers.c1g3UUys.js} +4 -4
- package/dist/{layers.CTd8v_h2.js → layers.cHiyhRv0.js} +1 -1
- package/dist/{layers.jSgLLqNz.js → layers.e4WMAP8p.js} +4 -4
- package/dist/{layers.CJboMklD.js → layers.gkJkfBXX.js} +1 -1
- package/dist/{layers.BUZV_oEF.js → layers.iUn6qHX-.js} +1 -1
- package/dist/{layers.CTj6BuBS.js → layers.jJYSd22J.js} +1 -1
- package/dist/{layers.Cj8SPWV6.js → layers.jNpPtSYq.js} +1 -1
- package/dist/{layers.Ds76sUmU.js → layers.nh-jugfR.js} +1 -1
- package/dist/{layers.10Bi4EHS.js → layers.noEAcBug.js} +1 -1
- package/dist/{layers.Dr9w4QMa.js → layers.o8IUzzuA.js} +4 -4
- package/dist/{layers.cmL8khG9.js → layers.poSPbB9X.js} +4 -4
- package/dist/{layers.osFw9BPT.js → layers.qH1Kvygt.js} +3 -3
- package/dist/{layers.g8Ev98Ji.js → layers.qfL_NxUA.js} +1 -1
- package/dist/{layers.NuhKP__R.js → layers.sxqdU83h.js} +1 -1
- package/dist/{layers.CrKCVFrl.js → layers.t-FrNIBD.js} +1 -1
- package/dist/{layers.DtZ5MHFk.js → layers.uLbLjX8b.js} +1 -1
- package/dist/{layers.CqczWgOo.js → layers.wZ8wbCG9.js} +1 -1
- package/dist/{layers.CfhWIEqU.js → layers.xI63-j2d.js} +1 -1
- package/dist/{layers.D56u-dDE.js → layers.yAPrlce6.js} +1 -1
- package/dist/{layers.hR6Du8ay.js → layers.zbHQRaAA.js} +5 -5
- package/package.json +192 -166
- package/dist/layers.BFXGrUiH.js +0 -32086
- package/dist/layers.BKc8Qoya.js +0 -1
- package/dist/layers.Bg8hFFcE.js +0 -215
- package/dist/layers.BiMx1FPw.js +0 -1
- package/dist/layers.C5w6wZ0t.js +0 -295
- package/dist/layers.C6eKIfoF.js +0 -1
- package/dist/layers.CPhHypWY.js +0 -1
- package/dist/layers.CQynkg93.js +0 -300
- package/dist/layers.CiKcQeoB.js +0 -76
- package/dist/layers.CilwCma3.js +0 -8
- package/dist/layers.D240lV9-.js +0 -6
- package/dist/layers.DaCzxiYh.js +0 -271
- package/dist/layers.Df8wf57V.js +0 -1
- package/dist/layers.DiA6OaHn.js +0 -1
- package/dist/layers.Dk8Fey47.js +0 -276
- package/dist/layers.ZfAh3Y9b.js +0 -1
- package/dist/layers.cvEfXQem.js +0 -1
- package/dist/layers.l9POGoKk.js +0 -304
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 { }
|