@layers-app/editor 0.7.24 → 0.7.26
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 +79 -7
- package/dist/index.js +15 -9
- package/dist/{layers.DpAWXloN.js → layers.-wjKgffX.js} +10 -7
- package/dist/{layers.DPP6_cbD.js → layers.1bJ3Mbz9.js} +9 -6
- package/dist/{layers.CP3EufOe.js → layers.2T1xhom9.js} +1 -1
- package/dist/{layers.C20Qi890.js → layers.6sikPcq3.js} +1 -1
- package/dist/{layers.V-9Fvifr.js → layers.6w8B4hFk.js} +1 -1
- package/dist/{layers.Lc29kAuz.js → layers.8RkOJVIE.js} +1 -1
- package/dist/{layers.jTaJiZzk.js → layers.8VJeG9rG.js} +1 -1
- package/dist/{layers.CDPIcOqa.js → layers.AAIYJoWX.js} +1 -1
- package/dist/{layers.BVHCv5uJ.js → layers.B2YKwjXz.js} +7 -4
- package/dist/{layers.D0ptqEmo.js → layers.B2qAOIlo.js} +1 -1
- package/dist/{layers.IPxhkSfj.js → layers.B2yHR68Q.js} +1 -1
- package/dist/{layers.Czdt779o.js → layers.B33gaZah.js} +1 -1
- package/dist/{layers.D8vSQAh0.js → layers.B3I1RQ68.js} +5867 -5583
- package/dist/{layers.DyvnTlHi.js → layers.B3z0mDcg.js} +1 -1
- package/dist/{layers.MHEFRzDP.js → layers.B4bWwT6u.js} +8 -5
- package/dist/{layers.BhOCkx36.js → layers.B4ck5N3X.js} +1 -1
- package/dist/{layers.DfgtWeVl.js → layers.B6c3HMGt.js} +1 -1
- package/dist/{layers.CiFtNCp_.js → layers.B6rDUX-b.js} +1 -1
- package/dist/layers.B7edFg4K.js +8 -0
- package/dist/{layers.lG7Mase1.js → layers.B7mfWigl.js} +1 -1
- package/dist/{layers.DnvUnO-4.js → layers.BB8EnLVz.js} +1 -1
- package/dist/{layers.BCDRxkn5.js → layers.BFEVByrk.js} +86 -84
- package/dist/layers.BFc73oZr.js +1 -0
- package/dist/{layers.BNxa_eCc.js → layers.BG--DwYt.js} +1 -1
- package/dist/{layers.MNW-ShKu.js → layers.BGC5ykCP.js} +14 -11
- package/dist/{layers.BwHEZWKu.js → layers.BIEejIsW.js} +1 -1
- package/dist/{layers.BZv7cxTR.js → layers.BIHazuDa.js} +92 -89
- package/dist/{layers.Bv1xDmd0.js → layers.BKpRcWnp.js} +1 -1
- package/dist/{layers.rzToPUAK.js → layers.BMNubRvf.js} +1 -1
- package/dist/{layers.-qmjZJBI.js → layers.BN9FdsoO.js} +1 -1
- package/dist/{layers.gnAUWHV-.js → layers.BNk35KKQ.js} +1 -1
- package/dist/{layers.BGGuOo27.js → layers.BO9n3EnR.js} +1 -1
- package/dist/{layers.Bdzg4UkM.js → layers.BPcVGKN8.js} +1 -1
- package/dist/{layers.BE_-JA1T.js → layers.BRzgC6KB.js} +1 -1
- package/dist/{layers.D9yXBIuK.js → layers.BTCB0JpX.js} +1 -1
- package/dist/{layers.DXyBsBF5.js → layers.BTeJHhdu.js} +1 -1
- package/dist/{layers.oJ61CNkw.js → layers.BTuPozoV.js} +1 -1
- package/dist/{layers.BI0TTMdG.js → layers.BTzUbI88.js} +1 -1
- package/dist/{layers.jZvrWKJt.js → layers.BV21urwt.js} +1 -1
- package/dist/{layers.DQIT2lCm.js → layers.BXpw5pIX.js} +1 -1
- package/dist/layers.BYSykmoC.js +1 -0
- package/dist/{layers.eNGl-u4H.js → layers.BY_J4jYD.js} +1 -1
- package/dist/{layers.BuGAznjj.js → layers.B_VEfl-c.js} +4 -4
- package/dist/{layers.BwtMeyCj.js → layers.B_o3asJK.js} +3 -3
- package/dist/{layers.mnoq184J.js → layers.BaT04AWS.js} +1 -1
- package/dist/{layers.D6XgZ8Az.js → layers.BaVjgFII.js} +1 -1
- package/dist/{layers.BdiCSpJ4.js → layers.BbH61zxx.js} +1 -1
- package/dist/{layers.BrUMsy26.js → layers.BbPfMVtY.js} +1 -1
- package/dist/{layers.CadrukAB.js → layers.Bc3f0bzg.js} +1 -1
- package/dist/{layers.BV2fpDYI.js → layers.BcdMFEfM.js} +1 -1
- package/dist/{layers.DU7EZINs.js → layers.Bd3FesAt.js} +1 -1
- package/dist/{layers.Co1X8jDP.js → layers.Bd6kH7xt.js} +1 -1
- package/dist/{layers.FlOgidCp.js → layers.Be7W7XL8.js} +1 -1
- package/dist/{layers.CFSfvSsm.js → layers.Bex4q159.js} +1 -1
- package/dist/{layers.CDexQZa_.js → layers.Bh3bOLvQ.js} +8 -5
- package/dist/{layers.DcKjvxHE.js → layers.BiSuaFI7.js} +1 -1
- package/dist/{layers.CvU_g0Ek.js → layers.Bi_FdRT_.js} +1 -1
- package/dist/{layers.B6C5kDa3.js → layers.BiyAv8aG.js} +1 -1
- package/dist/{layers.BY9o3NTY.js → layers.BjMl2wQQ.js} +1 -1
- package/dist/{layers.Dq9b1xqh.js → layers.BjOHqBbv.js} +1 -1
- package/dist/{layers.edPrT81i.js → layers.BlEI10xV.js} +1 -1
- package/dist/{layers.BiD-9uwr.js → layers.Bq8p214x.js} +1 -1
- package/dist/{layers.CH4plVEu.js → layers.BqdhwtFO.js} +3 -3
- package/dist/{layers.cf3uaysm.js → layers.BsEw_gIa.js} +1 -1
- package/dist/{layers.X0J3BhYy.js → layers.Bsoxckn8.js} +7 -4
- package/dist/{layers.DH-cj5fE.js → layers.BtVBENDV.js} +2 -2
- package/dist/{layers.Me9S-22r.js → layers.BtjJdW-J.js} +10 -7
- package/dist/{layers.RpoUh8kq.js → layers.BuslMnX9.js} +1 -1
- package/dist/{layers.D4VJ5B0e.js → layers.Bw8iToJZ.js} +1 -1
- package/dist/{layers.DM9hpazD.js → layers.BwDyCg1e.js} +1 -1
- package/dist/{layers.fiMaf-_a.js → layers.Bwkdf-_V.js} +3 -3
- package/dist/{layers.BB-2khdc.js → layers.Bxp23eQH.js} +4 -4
- package/dist/{layers.CQMssu5A.js → layers.ByrUhAUL.js} +1 -1
- package/dist/{layers.BqkB6bfG.js → layers.Bze40RCj.js} +1 -1
- package/dist/layers.BztYpZSr.js +257 -0
- package/dist/{layers.d9OooXQC.js → layers.C0Ws-fCa.js} +1 -1
- package/dist/{layers.nNlLwZ_E.js → layers.C1tEKsbt.js} +1 -1
- package/dist/{layers.y0ia1Vp6.js → layers.C2FJqDkI.js} +1 -1
- package/dist/{layers.DmEW632Y.js → layers.C2k_QfG3.js} +2 -2
- package/dist/{layers.ekCtLRbA.js → layers.C34ZNIfL.js} +1 -1
- package/dist/layers.C3DvXqUP.js +1 -0
- package/dist/{layers.I85BW5o2.js → layers.C4MSW5Y5.js} +1 -1
- package/dist/{layers.C-UCCxZT.js → layers.C7AUSLfi.js} +1 -1
- package/dist/layers.C7mlmYdC.js +129 -0
- package/dist/{layers.Ca_hxCzh.js → layers.C8N13X_Z.js} +1 -1
- package/dist/{layers.6Og6_hox.js → layers.C8ZWzhQl.js} +1 -1
- package/dist/{layers.BSwRsFvu.js → layers.C8d3D9Lb.js} +7 -7
- package/dist/{layers.BVSO7aWV.js → layers.C92GKFB8.js} +1 -1
- package/dist/{layers.DAF65Eyh.js → layers.CHGPKVlh.js} +1 -1
- package/dist/{layers.W66NF2U9.js → layers.CJF69bGz.js} +1 -1
- package/dist/layers.CMFoKFfW.js +26971 -0
- package/dist/{layers.D_XM1OQx.js → layers.COGWYVIo.js} +3 -3
- package/dist/layers.CQJnLKvH.js +8 -0
- package/dist/{layers.CPIxu6GO.js → layers.CVUrxvM-.js} +8 -5
- package/dist/{layers.BKOg8e2U.js → layers.CY5BDIai.js} +1 -1
- package/dist/{layers.CfJUJqdv.js → layers.CYkqJ9mA.js} +1 -1
- package/dist/{layers.BfK7Zksy.js → layers.C_X4Kdn2.js} +1 -1
- package/dist/{layers.A6MvZ2Sd.js → layers.CaPlf6cQ.js} +4 -4
- package/dist/{layers.Cf85CE4j.js → layers.Caliy2g7.js} +1 -1
- package/dist/{layers.Q-xFVVwC.js → layers.CanJemCn.js} +1 -1
- package/dist/{layers.CLT1Xhw2.js → layers.CcZVMGJ2.js} +1 -1
- package/dist/{layers.B1l2IEoW.js → layers.CfOpBTNW.js} +1 -1
- package/dist/{layers.CeuPBpSS.js → layers.CgywpxNj.js} +1 -1
- package/dist/{layers.BG9jBVsg.js → layers.ChP80TqX.js} +1 -1
- package/dist/{layers.CXp0yiA_.js → layers.CickKalz.js} +1 -1
- package/dist/{layers.Bi8uSmnl.js → layers.CkYHBZT_.js} +1 -1
- package/dist/{layers.CRKCl3-s.js → layers.ClGUwzhg.js} +1 -1
- package/dist/{layers.mgh4Cwfx.js → layers.ClfyzbH1.js} +1 -1
- package/dist/layers.CmxS83Nk.js +1225 -0
- package/dist/layers.Cn5BBMoQ.js +1 -0
- package/dist/{layers.BW593_YD.js → layers.Cnp_kKHs.js} +1 -1
- package/dist/{layers.BBgqB-dj.js → layers.CqUEj4Gr.js} +1 -1
- package/dist/{layers.Cc1VRWwn.js → layers.CqVF0OGH.js} +1 -1
- package/dist/{layers.DNOD_LF5.js → layers.CsPg2KjG.js} +1 -1
- package/dist/{layers.zDfwTCmT.js → layers.CtQWlaO1.js} +1 -1
- package/dist/{layers.h4L4Mc41.js → layers.Cv6S_9I-.js} +1 -1
- package/dist/{layers.5U6DsNQ8.js → layers.CxWefKHI.js} +9 -6
- package/dist/{layers.nFMauJSN.js → layers.Cx_nY6Y7.js} +1 -1
- package/dist/{layers.B2nS5rBS.js → layers.D01DTzLv.js} +1 -1
- package/dist/{layers.WwL-1p8w.js → layers.D0KthgS6.js} +1 -1
- package/dist/{layers.CYMmJIgK.js → layers.D1wXYOhT.js} +7 -4
- package/dist/{layers.DO1NcRAM.js → layers.D3nu7CUH.js} +1 -1
- package/dist/{layers.BFDXAxa6.js → layers.D4aYlLPZ.js} +1 -1
- package/dist/{layers.iyoop3cH.js → layers.D5OBgP7h.js} +3 -3
- package/dist/{layers.Df79MJjN.js → layers.D5VfbQu6.js} +3 -3
- package/dist/{layers.B4ZRP4dv.js → layers.D5g62wy8.js} +1 -1
- package/dist/{layers.DrprvZC4.js → layers.D6CpOfiQ.js} +1 -1
- package/dist/{layers.53hChJFF.js → layers.D8wPyzG6.js} +6 -6
- package/dist/{layers.C0BLZbdT.js → layers.D9Tic5tu.js} +1 -1
- package/dist/{layers.-58OrB2h.js → layers.D9_JSxkr.js} +1 -1
- package/dist/{layers.Bq3WRO3x.js → layers.DAxsOQEh.js} +1 -1
- package/dist/{layers.CSi2XRJ2.js → layers.DBfOwxPO.js} +1 -1
- package/dist/layers.DEjsgTOR.js +6 -0
- package/dist/{layers.D33lu-eC.js → layers.DElPAzG2.js} +1 -1
- package/dist/{layers.XS2AIvBG.js → layers.DEpxDMdS.js} +1 -1
- package/dist/{layers.CqggRfmv.js → layers.DFF50PT4.js} +1 -1
- package/dist/{layers.BqxiZwrm.js → layers.DIPoQibL.js} +1 -1
- package/dist/layers.DIlNlcqo.js +118 -0
- package/dist/{layers.BbDBKF7d.js → layers.DKm1mN2X.js} +1 -1
- package/dist/layers.DLV3QO1y.js +76 -0
- package/dist/{layers.BDuP7QP1.js → layers.DMqa4UuA.js} +7 -7
- package/dist/{layers.B8qo87mf.js → layers.DOQpvHnX.js} +1 -1
- package/dist/{layers.CCqe9zp9.js → layers.DOZaSqiR.js} +1 -1
- package/dist/{layers.Cynva3D_.js → layers.DQ5ZJRxN.js} +1 -1
- package/dist/layers.DQ7Ue1Fv.js +22 -0
- package/dist/{layers.DD5DttRP.js → layers.DQ87eVFA.js} +1 -1
- package/dist/{layers.5R_vfSOI.js → layers.DS_qYTUu.js} +1 -1
- package/dist/{layers.BqikkqHY.js → layers.DT1Fui5R.js} +1 -1
- package/dist/{layers.BFclfxlH.js → layers.DTagsNpb.js} +3 -3
- package/dist/layers.DWkC7jVJ.js +1 -0
- package/dist/{layers.C47JbXwl.js → layers.D_ZvKS4q.js} +1 -1
- package/dist/{layers.C5JgdF76.js → layers.DagwUHWb.js} +1 -1
- package/dist/{layers.CXPJGJnh.js → layers.Ddc-JH2d.js} +1 -1
- package/dist/{layers.Bvra5UGQ.js → layers.DeTIo1zr.js} +1 -1
- package/dist/{layers.CR8SQeln.js → layers.Df5vGs9k.js} +227 -224
- package/dist/{layers.eaKLR5Q2.js → layers.DfDXn4TD.js} +1 -1
- package/dist/{layers.BKWiI_4a.js → layers.DfsVAKCW.js} +1 -1
- package/dist/{layers.BOWoLhye.js → layers.DiSdECjm.js} +3 -3
- package/dist/{layers.adnwY8ML.js → layers.DkHHkcwB.js} +1 -1
- package/dist/layers.DlaPU6IV.js +1 -0
- package/dist/layers.DmSHn1Q-.js +1 -0
- package/dist/{layers.90LiGxII.js → layers.DosSADRb.js} +8 -5
- package/dist/{layers.XZft6Ook.js → layers.DptMIwKT.js} +1 -1
- package/dist/{layers.SsSYgMGG.js → layers.DpvmCmKj.js} +1 -1
- package/dist/{layers.BLERpK_S.js → layers.DrAry1Kf.js} +1 -1
- package/dist/{layers.EXQpfQWq.js → layers.Ds_tgW-V.js} +1 -1
- package/dist/{layers.DRZylWPP.js → layers.DtdLS6Dk.js} +1 -1
- package/dist/{layers.DJ7ZL_sW.js → layers.DujvWPQs.js} +9 -6
- package/dist/{layers.DvNvJZss.js → layers.Dx95JHIq.js} +1 -1
- package/dist/{layers.B-Ftwt7z.js → layers.DxYMwPJD.js} +1 -1
- package/dist/{layers.DenZLHkn.js → layers.DxqWMo04.js} +1 -1
- package/dist/{layers.DrZAE5o5.js → layers.DzhNjcrw.js} +1 -1
- package/dist/{layers.BJOmz-8E.js → layers.EtcHUsqn.js} +1 -1
- package/dist/{layers.B5V9R6dS.js → layers.GQBWZE5I.js} +92 -89
- package/dist/{layers.B0gBsd1G.js → layers.IAIKoo0h.js} +18 -15
- package/dist/{layers.CkEhuwys.js → layers.LvEP7msO.js} +11 -8
- package/dist/{layers.BsV8AKqE.js → layers.My9kZFhO.js} +9 -6
- package/dist/{layers.CoCdUjOH.js → layers.NDz-9Ggu.js} +1 -1
- package/dist/{layers.CA5feGxW.js → layers.NZf4E-Wg.js} +1 -1
- package/dist/{layers.BxX_THjw.js → layers.O1t5sl2z.js} +1 -1
- package/dist/layers.RIwhwY8U.js +213 -0
- package/dist/{layers.Aw65tqqV.js → layers.W7ATjiDf.js} +1 -1
- package/dist/layers.X8-JMNQm.js +1 -0
- package/dist/layers.XMCRkU_N.js +271 -0
- package/dist/{layers.CmWWurhR.js → layers.bf7CMgrh.js} +1 -1
- package/dist/{layers.waYEJRmN.js → layers.d30Rgcib.js} +1 -1
- package/dist/{layers.8HXImnXe.js → layers.dyig4B3u.js} +40 -40
- package/dist/{layers.CHa9lFoT.js → layers.em6rytD5.js} +1 -1
- package/dist/{layers.CV3PBAi0.js → layers.gGLUL8Z7.js} +1 -1
- package/dist/{layers.B2SmhxzW.js → layers.hoCWKOtV.js} +1 -1
- package/dist/{layers.soJefnD3.js → layers.iFeAlI6H.js} +1 -1
- package/dist/{layers.FBzg3C04.js → layers.jfJgHirm.js} +50 -50
- package/dist/layers.kZlGqXlo.js +2 -0
- package/dist/{layers.l-ywSwa2.js → layers.lel7gNeu.js} +1 -1
- package/dist/{layers.DjGdrDC1.js → layers.mBB8ss0I.js} +1 -1
- package/dist/{layers.Bzrkz_Q7.js → layers.mGvgS9vW.js} +1 -1
- package/dist/{layers.C2-P7-v8.js → layers.nFOcuDzr.js} +1 -1
- package/dist/{layers.DNJEfwiQ.js → layers.obwBR-PL.js} +1 -1
- package/dist/{layers.CUV1fBKt.js → layers.pWVdZ1OI.js} +15 -12
- package/dist/{layers.D-iLQKYz.js → layers.qT-9akPN.js} +1 -1
- package/dist/layers.s4n1roZI.js +1 -0
- package/dist/{layers.DzghPRf3.js → layers.vJOgspvU.js} +3229 -3812
- package/dist/layers.ylvIcl1z.js +96 -0
- package/dist/layers.zi2jGsFZ.js +2 -0
- package/package.json +1 -1
- package/dist/layers.1s4BbICk.js +0 -1
- package/dist/layers.BLvWGmxZ.js +0 -304
- package/dist/layers.BPXa6Xko.js +0 -8
- package/dist/layers.BUT_cQlY.js +0 -1
- package/dist/layers.BZMHF27f.js +0 -6
- package/dist/layers.Bfcc7TOH.js +0 -1
- package/dist/layers.BjtEPALX.js +0 -19
- package/dist/layers.BlT1aHiA.js +0 -1
- package/dist/layers.Br5DTynl.js +0 -74
- package/dist/layers.CQR0Nl7I.js +0 -1
- package/dist/layers.CgDb5aPr.js +0 -2
- package/dist/layers.CmxZ8EKk.js +0 -1
- package/dist/layers.Cp63Ydn2.js +0 -50707
- package/dist/layers.CtCTIWni.js +0 -1
- package/dist/layers.Ctzw3Xb5.js +0 -1
- package/dist/layers.Cw5bBQfp.js +0 -118
- package/dist/layers.D0GEGoV_.js +0 -373
- package/dist/layers.D5DNThwz.js +0 -208
- package/dist/layers.D71D_04V.js +0 -1359
- package/dist/layers.DJnnhy8m.js +0 -96
- package/dist/layers.DgCaJXYg.js +0 -257
- package/dist/layers.Dvl1mlTI.js +0 -1
- package/dist/layers.DzDR_oG4.js +0 -8
- package/dist/layers.Qn6nodoY.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,19 +4,27 @@ import { Dropzone } from '@mantine/dropzone';
|
|
|
4
4
|
import { EditorConfig } from 'lexical';
|
|
5
5
|
import { LexicalEditor as EditorType } from 'lexical';
|
|
6
6
|
import { ElementNode } from 'lexical';
|
|
7
|
+
import { FC } from 'react';
|
|
7
8
|
import { FOCUS_COMMAND } from 'lexical';
|
|
9
|
+
import { IconProps } from '../../../../@tabler/icons-react/dist/esm/icons/index.mjs';
|
|
8
10
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
|
+
import { Klass } from 'lexical';
|
|
9
12
|
import { LexicalCommand } from 'lexical';
|
|
13
|
+
import { LexicalNode } from 'lexical';
|
|
10
14
|
import { MarkNode } from '@lexical/mark';
|
|
11
15
|
import { MouseEventHandler } from 'react';
|
|
12
16
|
import { NodeKey } from 'lexical';
|
|
13
17
|
import { ParagraphNode } from 'lexical';
|
|
18
|
+
import { PropsWithChildren } from 'react';
|
|
14
19
|
import { RangeSelection } from 'lexical';
|
|
20
|
+
import { ReactElement } from 'react';
|
|
21
|
+
import { ReactNode } from 'react';
|
|
15
22
|
import { RootNode } from 'lexical';
|
|
16
23
|
import { SerializedEditorState } from 'lexical';
|
|
17
24
|
import { SerializedElementNode } from 'lexical';
|
|
18
25
|
import { SerializedLexicalNode } from 'lexical';
|
|
19
26
|
import { Spread } from 'lexical';
|
|
27
|
+
import { TFunction } from 'i18next';
|
|
20
28
|
|
|
21
29
|
export declare const $createNewParagraph: (editor: EditorType) => void;
|
|
22
30
|
|
|
@@ -24,6 +32,16 @@ export declare type ActiveUserProfile<DATA extends object> = EditorUser<DATA> &
|
|
|
24
32
|
id: string;
|
|
25
33
|
};
|
|
26
34
|
|
|
35
|
+
export declare const AlignmentImage: ({ editor, nodeKey, opened, setOpened, t, setShown, isShown, }: {
|
|
36
|
+
editor: EditorType;
|
|
37
|
+
nodeKey?: string;
|
|
38
|
+
t: TFunction;
|
|
39
|
+
opened: boolean;
|
|
40
|
+
setOpened: (value: boolean) => void;
|
|
41
|
+
setShown?: (value: boolean) => void;
|
|
42
|
+
isShown?: boolean;
|
|
43
|
+
}) => JSX_2.Element;
|
|
44
|
+
|
|
27
45
|
export { CLEAR_EDITOR_COMMAND }
|
|
28
46
|
|
|
29
47
|
declare interface CommentActions {
|
|
@@ -50,9 +68,9 @@ declare interface CommentAttachment {
|
|
|
50
68
|
declare interface CommentController {
|
|
51
69
|
activeCommentId: {
|
|
52
70
|
id: string | null;
|
|
53
|
-
source:
|
|
71
|
+
source: "editor" | "panel" | null;
|
|
54
72
|
};
|
|
55
|
-
onHighlight?: (id: string | null, source:
|
|
73
|
+
onHighlight?: (id: string | null, source: "editor" | "panel") => void;
|
|
56
74
|
actions: CommentActions;
|
|
57
75
|
editorComments: Map<string, {
|
|
58
76
|
id: string;
|
|
@@ -65,9 +83,13 @@ declare type CommentResolve = 'ACCEPTED' | 'REJECTED' | null | 'NONE';
|
|
|
65
83
|
|
|
66
84
|
export declare const CREATE_TEMPLATE: LexicalCommand<unknown>;
|
|
67
85
|
|
|
86
|
+
export declare const createMediaComponent: (imageNode: LexicalNode) => true | undefined;
|
|
87
|
+
|
|
88
|
+
export declare const deleteNode: (editor: EditorType, nodeElement: string | LexicalNode | null) => void;
|
|
89
|
+
|
|
68
90
|
export { Dropzone }
|
|
69
91
|
|
|
70
|
-
export declare const Editor: <USER_DATA extends object, CHILD_PAGE extends PageData>({ initialContent, onChange, outputFormat, mode, maxHeight, onBlur, onFocus, fetchUploadMedia, fetchPromptResult,
|
|
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, language, shiftEnterInsertNewLine, editorRef, placeholder, plugins, }: EditorProps<USER_DATA, CHILD_PAGE>) => JSX_2.Element;
|
|
71
93
|
|
|
72
94
|
declare interface EditorProps<USER_DATA extends object = object, PAGE_DATA extends PageData = PageData> {
|
|
73
95
|
initialContent: Root | string;
|
|
@@ -79,8 +101,6 @@ declare interface EditorProps<USER_DATA extends object = object, PAGE_DATA exten
|
|
|
79
101
|
maxHeight?: number;
|
|
80
102
|
fetchUploadMedia?: fetchUploadMedia;
|
|
81
103
|
fetchPromptResult?: fetchPromptResult;
|
|
82
|
-
fetchSmartPastePrompt?: fetchPromptResult;
|
|
83
|
-
fetchSmartPasteStreamPrompt?: fetchPromptStreamResult;
|
|
84
104
|
fetchDeleteMedia?: fetchDeleteRestoreMedia;
|
|
85
105
|
fetchRestoreMedia?: fetchDeleteRestoreMedia;
|
|
86
106
|
maxFileSize?: number;
|
|
@@ -103,6 +123,7 @@ declare interface EditorProps<USER_DATA extends object = object, PAGE_DATA exten
|
|
|
103
123
|
current: EditorType | null;
|
|
104
124
|
};
|
|
105
125
|
placeholder?: string;
|
|
126
|
+
plugins?: PluginConfig[];
|
|
106
127
|
}
|
|
107
128
|
|
|
108
129
|
export { EditorType }
|
|
@@ -145,14 +166,19 @@ declare type fetchDeleteRestoreMedia = (id: string, success: SuccessDeleteImage,
|
|
|
145
166
|
|
|
146
167
|
declare type fetchPromptResult = (prompt: string, success: (data: string) => void, error?: () => void) => void;
|
|
147
168
|
|
|
148
|
-
declare type fetchPromptStreamResult = (prompt: string, onBlock: (block: string) => void, onDone: () => void, onError?: () => void) => void;
|
|
149
|
-
|
|
150
169
|
declare type fetchUploadMedia = (file: File, success: SuccessUploadImage, error?: ErrorDeleteImage, signal?: AbortSignal, onProgress?: (percent: number) => void) => void;
|
|
151
170
|
|
|
152
171
|
export { FOCUS_COMMAND }
|
|
153
172
|
|
|
154
173
|
export declare function focusEditor(editor: EditorType, atStart?: boolean): void;
|
|
155
174
|
|
|
175
|
+
export declare const Icon: ({ name, iconStyle, ...rest }: {
|
|
176
|
+
name: keyof typeof iconsBlockTypeToBlockName;
|
|
177
|
+
[key: string]: any;
|
|
178
|
+
}) => JSX_2.Element;
|
|
179
|
+
|
|
180
|
+
declare const iconsBlockTypeToBlockName: Record<string, FC<IconProps>>;
|
|
181
|
+
|
|
156
182
|
declare type ImagePickerSettings = {
|
|
157
183
|
maxUploadFiles?: number;
|
|
158
184
|
unsplashClientId?: string;
|
|
@@ -177,8 +203,43 @@ declare interface PageData {
|
|
|
177
203
|
|
|
178
204
|
export { ParagraphNode }
|
|
179
205
|
|
|
206
|
+
export declare interface PluginConfig {
|
|
207
|
+
key: string;
|
|
208
|
+
node: Klass<LexicalNode>;
|
|
209
|
+
Plugin: React.ComponentType;
|
|
210
|
+
Provider: React.ComponentType<{
|
|
211
|
+
children: ReactNode;
|
|
212
|
+
}>;
|
|
213
|
+
slashMenu: SlashMenuConfig;
|
|
214
|
+
modes?: PluginModeConfig;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare interface PluginModeConfig {
|
|
218
|
+
comment: boolean;
|
|
219
|
+
default: boolean;
|
|
220
|
+
editor: boolean;
|
|
221
|
+
}
|
|
222
|
+
|
|
180
223
|
export { RangeSelection }
|
|
181
224
|
|
|
225
|
+
export declare const ResizableContainer: FC<PropsWithChildren<ResizableContainerProps>>;
|
|
226
|
+
|
|
227
|
+
declare type ResizableContainerProps = {
|
|
228
|
+
editor: EditorType;
|
|
229
|
+
width: number | string | 'inherit';
|
|
230
|
+
height: number | string | 'inherit';
|
|
231
|
+
isIcon: boolean;
|
|
232
|
+
initialHeight?: number | string;
|
|
233
|
+
initialWidth?: number | string;
|
|
234
|
+
type?: 'video';
|
|
235
|
+
onResizeEnd: (width: 'inherit' | number | string, height: 'inherit' | number | string) => void;
|
|
236
|
+
onResizeStart?: () => void;
|
|
237
|
+
isEmbed?: boolean;
|
|
238
|
+
alignment?: string;
|
|
239
|
+
disableInteractions?: boolean;
|
|
240
|
+
children: ReactElement;
|
|
241
|
+
};
|
|
242
|
+
|
|
182
243
|
export declare type Root = SerializedEditorState<SerializedLexicalNode>;
|
|
183
244
|
|
|
184
245
|
export { RootNode }
|
|
@@ -187,6 +248,17 @@ declare type SerializedMarkNode = Spread<{
|
|
|
187
248
|
ids: Array<string>;
|
|
188
249
|
}, SerializedElementNode>;
|
|
189
250
|
|
|
251
|
+
export declare interface SlashMenuConfig {
|
|
252
|
+
parentKey: string;
|
|
253
|
+
name: string;
|
|
254
|
+
description: string;
|
|
255
|
+
hint?: string;
|
|
256
|
+
keywords: string[];
|
|
257
|
+
icon: ReactNode;
|
|
258
|
+
command: LexicalCommand<string>;
|
|
259
|
+
commandPayload: string;
|
|
260
|
+
}
|
|
261
|
+
|
|
190
262
|
export declare const StylesProvider: ({ children }: {
|
|
191
263
|
children: React.ReactNode;
|
|
192
264
|
}) => JSX_2.Element;
|