@lexical/react 0.4.1 → 0.5.0

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.
Files changed (58) hide show
  1. package/DEPRECATED_useLexical.js.flow +0 -1
  2. package/DEPRECATED_useLexicalPlainText.d.ts +2 -2
  3. package/DEPRECATED_useLexicalPlainText.dev.js +4 -4
  4. package/DEPRECATED_useLexicalPlainText.js.flow +0 -1
  5. package/DEPRECATED_useLexicalPlainText.prod.js +2 -2
  6. package/DEPRECATED_useLexicalRichText.d.ts +2 -2
  7. package/DEPRECATED_useLexicalRichText.dev.js +4 -4
  8. package/DEPRECATED_useLexicalRichText.js.flow +0 -1
  9. package/DEPRECATED_useLexicalRichText.prod.js +2 -2
  10. package/LexicalAutoEmbedPlugin.d.ts +0 -2
  11. package/LexicalAutoEmbedPlugin.dev.js +0 -1
  12. package/LexicalAutoEmbedPlugin.prod.js +4 -4
  13. package/LexicalAutoLinkPlugin.dev.js +2 -1
  14. package/LexicalAutoLinkPlugin.prod.js +3 -3
  15. package/LexicalBlockWithAlignableContents.dev.js +1 -1
  16. package/LexicalBlockWithAlignableContents.prod.js +1 -1
  17. package/LexicalCollaborationPlugin.d.ts +5 -1
  18. package/LexicalCollaborationPlugin.dev.js +54 -16
  19. package/LexicalCollaborationPlugin.js.flow +1 -0
  20. package/LexicalCollaborationPlugin.prod.js +9 -9
  21. package/LexicalComposer.d.ts +1 -2
  22. package/LexicalComposer.dev.js +15 -1
  23. package/LexicalComposer.js.flow +14 -7
  24. package/LexicalComposer.prod.js +3 -3
  25. package/LexicalContentEditable.dev.js +1 -1
  26. package/LexicalContentEditable.prod.js +1 -1
  27. package/LexicalHorizontalRuleNode.d.ts +4 -2
  28. package/LexicalHorizontalRuleNode.dev.js +24 -2
  29. package/LexicalHorizontalRuleNode.js.flow +0 -1
  30. package/LexicalHorizontalRuleNode.prod.js +5 -5
  31. package/LexicalNestedComposer.d.ts +4 -2
  32. package/LexicalNestedComposer.dev.js +25 -3
  33. package/LexicalNestedComposer.js.flow +1 -0
  34. package/LexicalNestedComposer.prod.js +3 -3
  35. package/LexicalOnChangePlugin.d.ts +1 -2
  36. package/LexicalOnChangePlugin.dev.js +3 -9
  37. package/LexicalOnChangePlugin.js.flow +0 -2
  38. package/LexicalOnChangePlugin.prod.js +2 -2
  39. package/LexicalPlainTextPlugin.d.ts +1 -3
  40. package/LexicalPlainTextPlugin.dev.js +4 -29
  41. package/LexicalPlainTextPlugin.js.flow +0 -1
  42. package/LexicalPlainTextPlugin.prod.js +4 -4
  43. package/LexicalRichTextPlugin.d.ts +1 -3
  44. package/LexicalRichTextPlugin.dev.js +4 -29
  45. package/LexicalRichTextPlugin.js.flow +0 -1
  46. package/LexicalRichTextPlugin.prod.js +4 -4
  47. package/LexicalTableOfContents__EXPERIMENTAL.js.flow +1 -1
  48. package/LexicalTablePlugin.dev.js +1 -1
  49. package/LexicalTablePlugin.prod.js +1 -1
  50. package/LexicalTreeView.dev.js +4 -4
  51. package/LexicalTreeView.prod.js +4 -4
  52. package/LexicalTypeaheadMenuPlugin.d.ts +5 -2
  53. package/LexicalTypeaheadMenuPlugin.dev.js +13 -10
  54. package/LexicalTypeaheadMenuPlugin.prod.js +16 -16
  55. package/package.json +19 -19
  56. package/shared/usePlainTextSetup.d.ts +1 -2
  57. package/shared/useRichTextSetup.d.ts +1 -2
  58. package/shared/useYjsCollaboration.d.ts +4 -1
@@ -4,19 +4,19 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- 'use strict';var m=require("@lexical/react/LexicalComposerContext"),n=require("@lexical/utils"),w=require("lexical"),x=require("react"),y="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?x.useLayoutEffect:x.useEffect;class z{constructor(b){this.key=b;this.ref={current:null};this.setRefElement=this.setRefElement.bind(this)}setRefElement(b){this.ref={current:b}}}
8
- let A=b=>{var a=document.getElementById("typeahead-menu");if(a){a=a.getBoundingClientRect();const c=b.getBoundingClientRect();c.bottom>a.bottom?b.scrollIntoView(!1):c.top<a.top&&b.scrollIntoView()}};function C(b,a){var c=window.getSelection();if(null===c||!c.isCollapsed)return!1;let e=c.anchorNode;c=c.anchorOffset;if(null==e||null==c)return!1;try{a.setStart(e,b),a.setEnd(e,c)}catch(f){return!1}return!0}
9
- function D(b){let a=null;b.getEditorState().read(()=>{var c=w.$getSelection();if(w.$isRangeSelection(c)){var e=c.anchor;"text"!==e.type?a=null:(c=e.getNode(),c.isSimpleText()?(e=e.offset,a=c.getTextContent().slice(0,e)):a=null)}});return a}
10
- function E(b,a){b=w.$getSelection();if(!w.$isRangeSelection(b)||!b.isCollapsed())return null;var c=b.anchor;if("text"!==c.type)return null;b=c.getNode();if(!b.isSimpleText())return null;c=c.offset;let e=b.getTextContent().slice(0,c);var f=a.matchingString;a=a.replaceableString.length;for(let k=a;k<=f.length;k++)e.substr(-k)===f.substr(0,k)&&(a=k);a=c-a;if(0>a)return null;let d;0===a?[d]=b.splitText(c):[,d]=b.splitText(a,c);return d}
11
- function F(b,a){return 0!==a?!1:b.getEditorState().read(()=>{var c=w.$getSelection();return w.$isRangeSelection(c)?(c=c.anchor.getNode().getPreviousSibling(),w.$isTextNode(c)&&c.isTextEntity()):!1})}function G(b){x.startTransition?x.startTransition(b):b()}
12
- function H({close:b,editor:a,anchorElement:c,resolution:e,options:f,menuRenderFn:d,onSelectOption:k}){let [g,q]=x.useState(null);x.useEffect(()=>{q(0)},[e.match.matchingString]);let r=x.useCallback(async h=>{a.update(()=>{const l=E(a,e.match);k(h,l,b,e.match.matchingString)})},[b,a,e.match,k]),p=x.useCallback(h=>{const l=a.getRootElement();null!==l&&(l.setAttribute("aria-activedescendant","typeahead-item-"+h),q(h))},[a]);x.useEffect(()=>()=>{let h=a.getRootElement();null!==h&&h.removeAttribute("aria-activedescendant")},
13
- [a]);y(()=>{null===f?q(null):null===g&&p(0)},[f,g,p]);x.useEffect(()=>n.mergeRegister(a.registerCommand(w.KEY_ARROW_DOWN_COMMAND,h=>{if(null!==f&&f.length&&null!==g){var l=g!==f.length-1?g+1:0;p(l);l=f[l];null!=l.ref&&l.ref.current&&A(l.ref.current);h.preventDefault();h.stopImmediatePropagation()}return!0},w.COMMAND_PRIORITY_NORMAL),a.registerCommand(w.KEY_ARROW_UP_COMMAND,h=>{if(null!==f&&f.length&&null!==g){var l=0!==g?g-1:f.length-1;p(l);l=f[l];null!=l.ref&&l.ref.current&&A(l.ref.current);h.preventDefault();
14
- h.stopImmediatePropagation()}return!0},w.COMMAND_PRIORITY_NORMAL),a.registerCommand(w.KEY_ESCAPE_COMMAND,h=>{h.preventDefault();h.stopImmediatePropagation();b();return!0},w.COMMAND_PRIORITY_NORMAL),a.registerCommand(w.KEY_TAB_COMMAND,h=>{if(null===f||null===g||null==f[g])return!1;h.preventDefault();h.stopImmediatePropagation();r(f[g]);return!0},w.COMMAND_PRIORITY_NORMAL),a.registerCommand(w.KEY_ENTER_COMMAND,h=>{if(null===f||null===g||null==f[g])return!1;null!==h&&(h.preventDefault(),h.stopImmediatePropagation());
15
- r(f[g]);return!0},w.COMMAND_PRIORITY_NORMAL)),[r,b,a,f,g,p]);let t=x.useMemo(()=>({selectOptionAndCleanUp:r,selectedIndex:g,setHighlightedIndex:q}),[r,g]);return d(c,t,e.match.matchingString)}
16
- function I(b){let [a]=m.useLexicalComposerContext(),c=x.useRef(document.createElement("div"));x.useEffect(()=>{function e(){let d=c.current;d.setAttribute("aria-label","Typeahead menu");d.setAttribute("id","typeahead-menu");d.setAttribute("role","listbox");if(null!==f&&null!==b){let {left:k,top:g,height:q}=b.getRect();d.style.top=`${g+q+5+window.pageYOffset}px`;d.style.left=`${k+window.pageXOffset}px`;d.style.display="block";d.style.position="absolute";d.isConnected||document.body.append(d);c.current=
17
- d;f.setAttribute("aria-controls","typeahead-menu")}}let f=a.getRootElement();if(null!==b)return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e);null!==f&&f.removeAttribute("aria-controls")}},[a,b]);return c}
18
- exports.LexicalNodeMenuPlugin=function({options:b,nodeKey:a,onClose:c,onSelectOption:e,menuRenderFn:f}){let [d]=m.useLexicalComposerContext(),[k,g]=x.useState(null),q=I(k);x.useEffect(()=>{a&&null==k?d.update(()=>{let r=w.$getNodeByKey(a),p=d.getElementByKey(a);if(null!=r&&null!=p){let t=r.getTextContent();G(()=>g({getRect:()=>p.getBoundingClientRect(),match:{leadOffset:t.length,matchingString:t,replaceableString:t}}))}}):null==a&&null!=k&&g(null)},[d,a,k]);return null===k||null===d?null:x.createElement(H,
19
- {close:c,resolution:k,editor:d,anchorElement:q.current,options:b,menuRenderFn:f,onSelectOption:e})};
20
- exports.LexicalTypeaheadMenuPlugin=function({options:b,onQueryChange:a,onSelectOption:c,menuRenderFn:e,triggerFn:f}){let [d]=m.useLexicalComposerContext(),[k,g]=x.useState(null),q=I(k);x.useEffect(()=>{let p=document.createRange(),t=null,h=d.registerUpdateListener(()=>{d.getEditorState().read(()=>{const l=p,B=w.$getSelection(),v=D(d);if(w.$isRangeSelection(B)&&B.isCollapsed()&&v!==t&&null!==v&&null!==l){t=v;var u=f(v,d);a(u?u.matchingString:null);null===u||F(d,u.leadOffset)||null===C(u.leadOffset,
21
- l)?g(null):G(()=>g({getRect:()=>l.getBoundingClientRect(),match:u}))}else g(null)})});return()=>{p=null;h()}},[d,f,a,k]);let r=x.useCallback(()=>{g(null)},[]);return null===k||null===d?null:x.createElement(H,{close:r,resolution:k,editor:d,anchorElement:q.current,options:b,menuRenderFn:e,onSelectOption:c})};exports.PUNCTUATION="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";exports.TypeaheadOption=z;
22
- exports.useBasicTypeaheadTriggerMatch=function(b,{minLength:a=1,maxLength:c=75}){return x.useCallback(e=>{e=(new RegExp("(^|\\s|\\()(["+b+"]((?:[^"+(b+"\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;\\s]){0,")+c+"}))$")).exec(e);if(null!==e){let f=e[1],d=e[3];if(d.length>=a)return{leadOffset:e.index+f.length,matchingString:d,replaceableString:e[2]}}return null},[c,a,b])}
7
+ 'use strict';var m=require("@lexical/react/LexicalComposerContext"),n=require("@lexical/utils"),v=require("lexical"),w=require("react"),x="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?w.useLayoutEffect:w.useEffect;class y{constructor(b){this.key=b;this.ref={current:null};this.setRefElement=this.setRefElement.bind(this)}setRefElement(b){this.ref={current:b}}}
8
+ let z=b=>{var a=document.getElementById("typeahead-menu");if(a){a=a.getBoundingClientRect();const c=b.getBoundingClientRect();c.bottom>a.bottom?b.scrollIntoView(!1):c.top<a.top&&b.scrollIntoView()}};function C(b,a){var c=window.getSelection();if(null===c||!c.isCollapsed)return!1;let d=c.anchorNode;c=c.anchorOffset;if(null==d||null==c)return!1;try{a.setStart(d,b),a.setEnd(d,c)}catch(e){return!1}return!0}
9
+ function D(b){let a=null;b.getEditorState().read(()=>{var c=v.$getSelection();if(v.$isRangeSelection(c)){var d=c.anchor;"text"!==d.type?a=null:(c=d.getNode(),c.isSimpleText()?(d=d.offset,a=c.getTextContent().slice(0,d)):a=null)}});return a}
10
+ function E(b,a){b=v.$getSelection();if(!v.$isRangeSelection(b)||!b.isCollapsed())return null;var c=b.anchor;if("text"!==c.type)return null;b=c.getNode();if(!b.isSimpleText())return null;c=c.offset;let d=b.getTextContent().slice(0,c);var e=a.matchingString;a=a.replaceableString.length;for(let h=a;h<=e.length;h++)d.substr(-h)===e.substr(0,h)&&(a=h);a=c-a;if(0>a)return null;let k;0===a?[k]=b.splitText(c):[,k]=b.splitText(a,c);return k}
11
+ function F(b,a){return 0!==a?!1:b.getEditorState().read(()=>{var c=v.$getSelection();return v.$isRangeSelection(c)?(c=c.anchor.getNode().getPreviousSibling(),v.$isTextNode(c)&&c.isTextEntity()):!1})}function G(b){w.startTransition?w.startTransition(b):b()}
12
+ function H({close:b,editor:a,anchorElement:c,resolution:d,options:e,menuRenderFn:k,onSelectOption:h}){let [f,p]=w.useState(null);w.useEffect(()=>{p(0)},[d.match.matchingString]);let q=w.useCallback(g=>{a.update(()=>{const l=E(a,d.match);h(g,l,b,d.match.matchingString)})},[b,a,d.match,h]),r=w.useCallback(g=>{const l=a.getRootElement();null!==l&&(l.setAttribute("aria-activedescendant","typeahead-item-"+g),p(g))},[a]);w.useEffect(()=>()=>{let g=a.getRootElement();null!==g&&g.removeAttribute("aria-activedescendant")},
13
+ [a]);x(()=>{null===e?p(null):null===f&&r(0)},[e,f,r]);w.useEffect(()=>n.mergeRegister(a.registerCommand(v.KEY_ARROW_DOWN_COMMAND,g=>{if(null!==e&&e.length&&null!==f){var l=f!==e.length-1?f+1:0;r(l);l=e[l];null!=l.ref&&l.ref.current&&z(l.ref.current);g.preventDefault();g.stopImmediatePropagation()}return!0},v.COMMAND_PRIORITY_NORMAL),a.registerCommand(v.KEY_ARROW_UP_COMMAND,g=>{if(null!==e&&e.length&&null!==f){var l=0!==f?f-1:e.length-1;r(l);l=e[l];null!=l.ref&&l.ref.current&&z(l.ref.current);g.preventDefault();
14
+ g.stopImmediatePropagation()}return!0},v.COMMAND_PRIORITY_NORMAL),a.registerCommand(v.KEY_ESCAPE_COMMAND,g=>{g.preventDefault();g.stopImmediatePropagation();b();return!0},v.COMMAND_PRIORITY_NORMAL),a.registerCommand(v.KEY_TAB_COMMAND,g=>{if(null===e||null===f||null==e[f])return!1;g.preventDefault();g.stopImmediatePropagation();q(e[f]);return!0},v.COMMAND_PRIORITY_NORMAL),a.registerCommand(v.KEY_ENTER_COMMAND,g=>{if(null===e||null===f||null==e[f])return!1;null!==g&&(g.preventDefault(),g.stopImmediatePropagation());
15
+ q(e[f]);return!0},v.COMMAND_PRIORITY_NORMAL)),[q,b,a,e,f,r]);let t=w.useMemo(()=>({selectOptionAndCleanUp:q,selectedIndex:f,setHighlightedIndex:p}),[q,f]);return k(c,t,d.match.matchingString)}
16
+ function I(b){let [a]=m.useLexicalComposerContext(),c=w.useRef(document.createElement("div"));w.useEffect(()=>{function d(){let k=c.current;k.setAttribute("aria-label","Typeahead menu");k.setAttribute("id","typeahead-menu");k.setAttribute("role","listbox");if(null!==e&&null!==b){let {left:h,top:f,width:p,height:q}=b.getRect();k.style.top=`${f+q+5+window.pageYOffset}px`;k.style.left=`${h+("start"===b.position?0:p)+window.pageXOffset}px`;k.style.display="block";k.style.position="absolute";k.isConnected||
17
+ document.body.append(k);c.current=k;e.setAttribute("aria-controls","typeahead-menu")}}let e=a.getRootElement();if(null!==b)return d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d);null!==e&&e.removeAttribute("aria-controls")}},[a,b]);return c}
18
+ exports.LexicalNodeMenuPlugin=function({options:b,nodeKey:a,position:c="end",onClose:d,onSelectOption:e,menuRenderFn:k}){let [h]=m.useLexicalComposerContext(),[f,p]=w.useState(null),q=I(f);w.useEffect(()=>{a&&null==f?h.update(()=>{let r=v.$getNodeByKey(a),t=h.getElementByKey(a);if(null!=r&&null!=t){let g=r.getTextContent();G(()=>p({getRect:()=>t.getBoundingClientRect(),match:{leadOffset:g.length,matchingString:g,replaceableString:g},position:c}))}}):null==a&&null!=f&&p(null)},[h,a,c,f]);return null===
19
+ f||null===h?null:w.createElement(H,{close:d,resolution:f,editor:h,anchorElement:q.current,options:b,menuRenderFn:k,onSelectOption:e})};
20
+ exports.LexicalTypeaheadMenuPlugin=function({options:b,onQueryChange:a,onSelectOption:c,menuRenderFn:d,triggerFn:e,position:k="start"}){let [h]=m.useLexicalComposerContext(),[f,p]=w.useState(null),q=I(f);w.useEffect(()=>{let t=document.createRange(),g=h.registerUpdateListener(()=>{h.getEditorState().read(()=>{const l=t,A=v.$getSelection(),B=D(h);if(v.$isRangeSelection(A)&&A.isCollapsed()&&null!==B&&null!==l){var u=e(B,h);a(u?u.matchingString:null);null===u||F(h,u.leadOffset)||null===C(u.leadOffset,
21
+ l)?p(null):G(()=>p({getRect:()=>l.getBoundingClientRect(),match:u,position:k}))}else p(null)})});return()=>{t=null;g()}},[h,e,a,f,k]);let r=w.useCallback(()=>{p(null)},[]);return null===f||null===h?null:w.createElement(H,{close:r,resolution:f,editor:h,anchorElement:q.current,options:b,menuRenderFn:d,onSelectOption:c})};exports.PUNCTUATION="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";exports.TypeaheadOption=y;
22
+ exports.useBasicTypeaheadTriggerMatch=function(b,{minLength:a=1,maxLength:c=75}){return w.useCallback(d=>{d=(new RegExp("(^|\\s|\\()(["+b+"]((?:[^"+(b+"\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;\\s]){0,")+c+"}))$")).exec(d);if(null!==d){let e=d[1],k=d[3];if(k.length>=a)return{leadOffset:d.index+e.length,matchingString:k,replaceableString:d[2]}}return null},[c,a,b])}
package/package.json CHANGED
@@ -8,28 +8,28 @@
8
8
  "rich-text"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.4.1",
11
+ "version": "0.5.0",
12
12
  "dependencies": {
13
- "@lexical/clipboard": "0.4.1",
14
- "@lexical/code": "0.4.1",
15
- "@lexical/dragon": "0.4.1",
16
- "@lexical/hashtag": "0.4.1",
17
- "@lexical/history": "0.4.1",
18
- "@lexical/link": "0.4.1",
19
- "@lexical/list": "0.4.1",
20
- "@lexical/mark": "0.4.1",
21
- "@lexical/markdown": "0.4.1",
22
- "@lexical/overflow": "0.4.1",
23
- "@lexical/plain-text": "0.4.1",
24
- "@lexical/rich-text": "0.4.1",
25
- "@lexical/selection": "0.4.1",
26
- "@lexical/table": "0.4.1",
27
- "@lexical/text": "0.4.1",
28
- "@lexical/utils": "0.4.1",
29
- "@lexical/yjs": "0.4.1"
13
+ "@lexical/clipboard": "0.5.0",
14
+ "@lexical/code": "0.5.0",
15
+ "@lexical/dragon": "0.5.0",
16
+ "@lexical/hashtag": "0.5.0",
17
+ "@lexical/history": "0.5.0",
18
+ "@lexical/link": "0.5.0",
19
+ "@lexical/list": "0.5.0",
20
+ "@lexical/mark": "0.5.0",
21
+ "@lexical/markdown": "0.5.0",
22
+ "@lexical/overflow": "0.5.0",
23
+ "@lexical/plain-text": "0.5.0",
24
+ "@lexical/rich-text": "0.5.0",
25
+ "@lexical/selection": "0.5.0",
26
+ "@lexical/table": "0.5.0",
27
+ "@lexical/text": "0.5.0",
28
+ "@lexical/utils": "0.5.0",
29
+ "@lexical/yjs": "0.5.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "lexical": "0.4.1",
32
+ "lexical": "0.5.0",
33
33
  "react": ">=17.x",
34
34
  "react-dom": ">=17.x"
35
35
  },
@@ -6,5 +6,4 @@
6
6
  *
7
7
  */
8
8
  import type { LexicalEditor } from 'lexical';
9
- import { InitialEditorStateType } from '@lexical/plain-text';
10
- export declare function usePlainTextSetup(editor: LexicalEditor, initialEditorState?: InitialEditorStateType): void;
9
+ export declare function usePlainTextSetup(editor: LexicalEditor): void;
@@ -5,6 +5,5 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import type { InitialEditorStateType } from '@lexical/rich-text';
9
8
  import type { LexicalEditor } from 'lexical';
10
- export declare function useRichTextSetup(editor: LexicalEditor, initialEditorState?: InitialEditorStateType): void;
9
+ export declare function useRichTextSetup(editor: LexicalEditor): void;
@@ -8,7 +8,10 @@
8
8
  import type { Binding } from '@lexical/yjs';
9
9
  import type { LexicalEditor } from 'lexical';
10
10
  import type { Doc } from 'yjs';
11
+ import * as React from 'react';
11
12
  import { WebsocketProvider } from 'y-websocket';
12
- export declare function useYjsCollaboration(editor: LexicalEditor, id: string, provider: WebsocketProvider, docMap: Map<string, Doc>, name: string, color: string, shouldBootstrap: boolean): [JSX.Element, Binding];
13
+ import { InitialEditorStateType } from '../LexicalComposer';
14
+ export declare type CursorsContainerRef = React.MutableRefObject<HTMLElement | null>;
15
+ export declare function useYjsCollaboration(editor: LexicalEditor, id: string, provider: WebsocketProvider, docMap: Map<string, Doc>, name: string, color: string, shouldBootstrap: boolean, cursorsContainerRef?: CursorsContainerRef, initialEditorState?: InitialEditorStateType): [JSX.Element, Binding];
13
16
  export declare function useYjsFocusTracking(editor: LexicalEditor, provider: WebsocketProvider, name: string, color: string): void;
14
17
  export declare function useYjsHistory(editor: LexicalEditor, binding: Binding): () => void;