🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@lexical/react

Package Overview
Dependencies
Maintainers
5
Versions
403
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lexical/react - npm Package Compare versions

Comparing version

to
0.3.3

4

LexicalCollaborationPlugin.d.ts

@@ -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