@lexical/react
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -9,3 +9,3 @@ /** | ||
import {WebsocketProvider} from 'y-websocket'; | ||
import type {Provider} from '@lexical/yjs'; | ||
import type {Doc, RelativePosition} from 'yjs'; | ||
@@ -35,3 +35,3 @@ | ||
id: string; | ||
providerFactory(id: string, yjsDocMap: Map<string, Doc>): WebsocketProvider; | ||
providerFactory(id: string, yjsDocMap: Map<string, Doc>): Provider; | ||
shouldBootstrap: boolean; | ||
@@ -38,0 +38,0 @@ username?: string; |
@@ -14,2 +14,3 @@ /** | ||
initialConfig: { | ||
namespace: string; | ||
editor__DEPRECATED?: LexicalEditor | null; | ||
@@ -16,0 +17,0 @@ readOnly?: boolean; |
@@ -46,2 +46,3 @@ /** | ||
theme, | ||
namespace, | ||
editor__DEPRECATED: initialEditor, | ||
@@ -56,2 +57,3 @@ nodes, | ||
const newEditor = lexical.createEditor({ | ||
namespace, | ||
nodes, | ||
@@ -58,0 +60,0 @@ onError: error => onError(error, newEditor), |
@@ -8,2 +8,2 @@ /** | ||
'use strict';var a=require("@lexical/react/LexicalComposerContext"),e=require("lexical"),k=require("react"),l="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?k.useLayoutEffect:k.useEffect; | ||
exports.LexicalComposer=function({initialConfig:f,children:m}){let h=k.useMemo(()=>{const {theme:b,editor__DEPRECATED:c,nodes:n,onError:p}=f,q=a.createLexicalComposerContext(null,b);let d=c||null;if(null===d){const g=e.createEditor({nodes:n,onError:r=>p(r,g),readOnly:!0,theme:b});d=g}return[d,q]},[]);l(()=>{let b=f.readOnly,[c]=h;c.setReadOnly(b||!1)},[]);return k.createElement(a.LexicalComposerContext.Provider,{value:h},m)} | ||
exports.LexicalComposer=function({initialConfig:f,children:m}){let h=k.useMemo(()=>{const {theme:b,namespace:c,editor__DEPRECATED:n,nodes:p,onError:q}=f,r=a.createLexicalComposerContext(null,b);let d=n||null;if(null===d){const g=e.createEditor({namespace:c,nodes:p,onError:t=>q(t,g),readOnly:!0,theme:b});d=g}return[d,r]},[]);l(()=>{let b=f.readOnly,[c]=h;c.setReadOnly(b||!1)},[]);return k.createElement(a.LexicalComposerContext.Provider,{value:h},m)} |
@@ -44,2 +44,3 @@ /** | ||
initialEditor._nodes = parentEditor._nodes; | ||
initialEditor._config.namespace = parentEditor._config.namespace; | ||
return [initialEditor, context]; | ||
@@ -46,0 +47,0 @@ }, // We only do this for init |
@@ -8,3 +8,3 @@ /** | ||
'use strict';var c=require("@lexical/react/LexicalCollaborationPlugin"),d=require("@lexical/react/LexicalComposerContext"),h=require("react"); | ||
exports.LexicalNestedComposer=function({initialEditor:a,children:k,initialTheme:l}){let e=h.useContext(d.LexicalComposerContext);if(null==e)throw Error("Minified Lexical error #9; see codes.json for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");let p=h.useMemo(()=>{const [g,m]=e,f=l||m.getTheme()||void 0,n=d.createLexicalComposerContext(e,f);void 0!==f&&(a._config.theme=f);a._parentEditor=g;a._nodes=g._nodes;return[a,n]},[]);var {yjsDocMap:b}= | ||
c.useCollaborationContext();let q=void 0!==b.get("main");b=b.has(a.getKey());return h.createElement(d.LexicalComposerContext.Provider,{value:p},!q||b?k:null)} | ||
exports.LexicalNestedComposer=function({initialEditor:a,children:k,initialTheme:l}){let e=h.useContext(d.LexicalComposerContext);if(null==e)throw Error("Minified Lexical error #9; see codes.json for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");let p=h.useMemo(()=>{const [f,m]=e,g=l||m.getTheme()||void 0,n=d.createLexicalComposerContext(e,g);void 0!==g&&(a._config.theme=g);a._parentEditor=f;a._nodes=f._nodes;a._config.namespace=f._config.namespace; | ||
return[a,n]},[]);var {yjsDocMap:b}=c.useCollaborationContext();let q=void 0!==b.get("main");b=b.has(a.getKey());return h.createElement(d.LexicalComposerContext.Provider,{value:p},!q||b?k:null)} |
@@ -9,5 +9,5 @@ /** | ||
import type {EditorState} from 'lexical'; | ||
import {InitialEditorStateType} from '@lexical/plain-text'; | ||
import type {EditorState, LexicalEditor} from 'lexical'; | ||
type InitialEditorStateType = null | string | EditorState | (() => void); | ||
export function PlainTextPlugin(arg0: { | ||
@@ -14,0 +14,0 @@ contentEditable: JSX.Element | null; |
@@ -9,5 +9,5 @@ /** | ||
import type {EditorState} from 'lexical'; | ||
import {InitialEditorStateType} from '@lexical/rich-text'; | ||
import type {EditorState, LexicalEditor} from 'lexical'; | ||
type InitialEditorStateType = null | string | EditorState | (() => void); | ||
export function RichTextPlugin(arg0: { | ||
@@ -14,0 +14,0 @@ contentEditable: JSX.Element | null; |
@@ -11,24 +11,24 @@ { | ||
"license": "MIT", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"dependencies": { | ||
"@lexical/clipboard": "0.3.2", | ||
"@lexical/list": "0.3.2", | ||
"@lexical/table": "0.3.2", | ||
"@lexical/yjs": "0.3.2", | ||
"@lexical/hashtag": "0.3.2", | ||
"@lexical/selection": "0.3.2", | ||
"@lexical/utils": "0.3.2", | ||
"@lexical/dragon": "0.3.2", | ||
"@lexical/plain-text": "0.3.2", | ||
"@lexical/rich-text": "0.3.2", | ||
"@lexical/code": "0.3.2", | ||
"@lexical/text": "0.3.2", | ||
"@lexical/link": "0.3.2", | ||
"@lexical/overflow": "0.3.2", | ||
"@lexical/history": "0.3.2", | ||
"@lexical/markdown": "0.3.2", | ||
"@lexical/mark": "0.3.2" | ||
"@lexical/clipboard": "0.3.3", | ||
"@lexical/code": "0.3.3", | ||
"@lexical/dragon": "0.3.3", | ||
"@lexical/hashtag": "0.3.3", | ||
"@lexical/history": "0.3.3", | ||
"@lexical/link": "0.3.3", | ||
"@lexical/list": "0.3.3", | ||
"@lexical/mark": "0.3.3", | ||
"@lexical/markdown": "0.3.3", | ||
"@lexical/overflow": "0.3.3", | ||
"@lexical/plain-text": "0.3.3", | ||
"@lexical/rich-text": "0.3.3", | ||
"@lexical/selection": "0.3.3", | ||
"@lexical/table": "0.3.3", | ||
"@lexical/text": "0.3.3", | ||
"@lexical/utils": "0.3.3", | ||
"@lexical/yjs": "0.3.3" | ||
}, | ||
"peerDependencies": { | ||
"lexical": "0.3.2", | ||
"lexical": "0.3.3", | ||
"react": ">=17.x", | ||
@@ -41,3 +41,6 @@ "react-dom": ">=17.x" | ||
"directory": "packages/lexical-react" | ||
}, | ||
"devDependencies": { | ||
"utility-types": "^3.10.0" | ||
} | ||
} |
@@ -69,2 +69,3 @@ # `@lexical/react` | ||
const initialConfig = { | ||
namespace: 'MyEditor', | ||
theme, | ||
@@ -74,4 +75,2 @@ onError, | ||
return ( | ||
@@ -78,0 +77,0 @@ <LexicalComposer initialConfig={initialConfig}> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240862
4653
1
87
+ Added@lexical/clipboard@0.3.3(transitive)
+ Added@lexical/code@0.3.3(transitive)
+ Added@lexical/dragon@0.3.3(transitive)
+ Added@lexical/hashtag@0.3.3(transitive)
+ Added@lexical/history@0.3.3(transitive)
+ Added@lexical/html@0.3.3(transitive)
+ Added@lexical/link@0.3.3(transitive)
+ Added@lexical/list@0.3.3(transitive)
+ Added@lexical/mark@0.3.3(transitive)
+ Added@lexical/markdown@0.3.3(transitive)
+ Added@lexical/offset@0.3.3(transitive)
+ Added@lexical/overflow@0.3.3(transitive)
+ Added@lexical/plain-text@0.3.3(transitive)
+ Added@lexical/rich-text@0.3.3(transitive)
+ Added@lexical/selection@0.3.3(transitive)
+ Added@lexical/table@0.3.3(transitive)
+ Added@lexical/text@0.3.3(transitive)
+ Added@lexical/utils@0.3.3(transitive)
+ Added@lexical/yjs@0.3.3(transitive)
+ Addedlexical@0.3.3(transitive)
- Removed@lexical/clipboard@0.3.2(transitive)
- Removed@lexical/code@0.3.2(transitive)
- Removed@lexical/dragon@0.3.2(transitive)
- Removed@lexical/hashtag@0.3.2(transitive)
- Removed@lexical/history@0.3.2(transitive)
- Removed@lexical/html@0.3.2(transitive)
- Removed@lexical/link@0.3.2(transitive)
- Removed@lexical/list@0.3.2(transitive)
- Removed@lexical/mark@0.3.2(transitive)
- Removed@lexical/markdown@0.3.2(transitive)
- Removed@lexical/offset@0.3.2(transitive)
- Removed@lexical/overflow@0.3.2(transitive)
- Removed@lexical/plain-text@0.3.2(transitive)
- Removed@lexical/rich-text@0.3.2(transitive)
- Removed@lexical/selection@0.3.2(transitive)
- Removed@lexical/table@0.3.2(transitive)
- Removed@lexical/text@0.3.2(transitive)
- Removed@lexical/utils@0.3.2(transitive)
- Removed@lexical/yjs@0.3.2(transitive)
- Removedlexical@0.3.2(transitive)
Updated@lexical/clipboard@0.3.3
Updated@lexical/code@0.3.3
Updated@lexical/dragon@0.3.3
Updated@lexical/hashtag@0.3.3
Updated@lexical/history@0.3.3
Updated@lexical/link@0.3.3
Updated@lexical/list@0.3.3
Updated@lexical/mark@0.3.3
Updated@lexical/markdown@0.3.3
Updated@lexical/overflow@0.3.3
Updated@lexical/plain-text@0.3.3
Updated@lexical/rich-text@0.3.3
Updated@lexical/selection@0.3.3
Updated@lexical/table@0.3.3
Updated@lexical/text@0.3.3
Updated@lexical/utils@0.3.3
Updated@lexical/yjs@0.3.3