@lexical/react 0.4.0 → 0.4.1

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.
@@ -74,7 +74,7 @@ function LexicalComposer({
74
74
  useLayoutEffect(() => {
75
75
  const isEditable = initialConfig.editable;
76
76
  const [editor] = composerContext;
77
- editor.setEditable(isEditable || true); // We only do this for init
77
+ editor.setEditable(isEditable !== undefined ? isEditable : true); // We only do this for init
78
78
  // eslint-disable-next-line react-hooks/exhaustive-deps
79
79
  }, []);
80
80
  return /*#__PURE__*/React.createElement(LexicalComposerContext.LexicalComposerContext.Provider, {
@@ -4,6 +4,6 @@
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 c=require("@lexical/react/LexicalComposerContext"),f=require("lexical"),l=require("react"),m="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?l.useLayoutEffect:l.useEffect;let n={tag:"history-merge"};
8
- function p(b,a){if(null!==a&&void 0!==a&&null!==a)switch(typeof a){case "string":let d=b.parseEditorState(a);b.setEditorState(d,n);break;case "object":b.setEditorState(a,n);break;case "function":b.update(()=>{f.$getRoot().isEmpty()&&a(b)},n)}}
9
- exports.LexicalComposer=function({initialConfig:b,children:a}){let d=l.useMemo(()=>{const {theme:e,namespace:g,editor__DEPRECATED:q,nodes:r,onError:t,editorState:u}=b,v=c.createLexicalComposerContext(null,e);let h=q||null;if(null===h){const k=f.createEditor({editable:!1,namespace:g,nodes:r,onError:w=>t(w,k),theme:e});p(k,u);h=k}return[h,v]},[]);m(()=>{let e=b.editable,[g]=d;g.setEditable(e||!0)},[]);return l.createElement(c.LexicalComposerContext.Provider,{value:d},a)}
7
+ 'use strict';var d=require("@lexical/react/LexicalComposerContext"),f=require("lexical"),l=require("react"),m="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?l.useLayoutEffect:l.useEffect;let n={tag:"history-merge"};
8
+ function p(b,a){if(null!==a&&void 0!==a&&null!==a)switch(typeof a){case "string":let e=b.parseEditorState(a);b.setEditorState(e,n);break;case "object":b.setEditorState(a,n);break;case "function":b.update(()=>{f.$getRoot().isEmpty()&&a(b)},n)}}
9
+ exports.LexicalComposer=function({initialConfig:b,children:a}){let e=l.useMemo(()=>{const {theme:c,namespace:g,editor__DEPRECATED:q,nodes:r,onError:t,editorState:u}=b,v=d.createLexicalComposerContext(null,c);let h=q||null;if(null===h){const k=f.createEditor({editable:!1,namespace:g,nodes:r,onError:w=>t(w,k),theme:c});p(k,u);h=k}return[h,v]},[]);m(()=>{let c=b.editable,[g]=e;g.setEditable(void 0!==c?c:!0)},[]);return l.createElement(d.LexicalComposerContext.Provider,{value:e},a)}
package/package.json CHANGED
@@ -8,28 +8,28 @@
8
8
  "rich-text"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.4.0",
11
+ "version": "0.4.1",
12
12
  "dependencies": {
13
- "@lexical/clipboard": "0.4.0",
14
- "@lexical/code": "0.4.0",
15
- "@lexical/dragon": "0.4.0",
16
- "@lexical/hashtag": "0.4.0",
17
- "@lexical/history": "0.4.0",
18
- "@lexical/link": "0.4.0",
19
- "@lexical/list": "0.4.0",
20
- "@lexical/mark": "0.4.0",
21
- "@lexical/markdown": "0.4.0",
22
- "@lexical/overflow": "0.4.0",
23
- "@lexical/plain-text": "0.4.0",
24
- "@lexical/rich-text": "0.4.0",
25
- "@lexical/selection": "0.4.0",
26
- "@lexical/table": "0.4.0",
27
- "@lexical/text": "0.4.0",
28
- "@lexical/utils": "0.4.0",
29
- "@lexical/yjs": "0.4.0"
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"
30
30
  },
31
31
  "peerDependencies": {
32
- "lexical": "0.4.0",
32
+ "lexical": "0.4.1",
33
33
  "react": ">=17.x",
34
34
  "react-dom": ">=17.x"
35
35
  },