@lexical/react 0.41.0 → 0.41.1-nightly.20260227.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.
@@ -10,7 +10,7 @@ import { untracked, signal, getExtensionDependencyFromEditor, effect } from '@le
10
10
  import { ReactExtension } from '@lexical/react/ReactExtension';
11
11
  import { ReactProviderExtension } from '@lexical/react/ReactProviderExtension';
12
12
  import { mergeRegister } from '@lexical/utils';
13
- import { createCommand, defineExtension, configExtension, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_EDITOR } from 'lexical';
13
+ import { createCommand, defineExtension, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_EDITOR, configExtension } from 'lexical';
14
14
  import { useState, useEffect, Suspense } from 'react';
15
15
  import { createPortal } from 'react-dom';
16
16
  import { createRoot } from 'react-dom/client';
@@ -6,4 +6,4 @@
6
6
  *
7
7
  */
8
8
 
9
- import{untracked as e,signal as n,getExtensionDependencyFromEditor as t,effect as o}from"@lexical/extension";import{ReactExtension as r}from"@lexical/react/ReactExtension";import{ReactProviderExtension as i}from"@lexical/react/ReactProviderExtension";import{mergeRegister as l}from"@lexical/utils";import{createCommand as u,defineExtension as c,configExtension as a,COMMAND_PRIORITY_CRITICAL as s,COMMAND_PRIORITY_EDITOR as m}from"lexical";import{useState as p,useEffect as d,Suspense as f}from"react";import{createPortal as g}from"react-dom";import{createRoot as x}from"react-dom/client";import{jsx as h,Fragment as P}from"react/jsx-runtime";function v(e,n){const{props:o,extension:r,...i}=n,{Component:l}=t(e,r).output;C(e,{...i,element:o?h(l,{...o}):null})}function R(e,n){const{Component:t,props:o,...r}=n;C(e,{...r,element:o?h(t,{...o}):null})}function C(e,n){t(e,M).output.mountReactPlugin(n)}function _(e,n){t(e,M).output.mountReactPluginHost(n)}const E=u("REACT_PLUGIN_HOST_MOUNT_ROOT_COMMAND"),O=u("REACT_PLUGIN_HOST_MOUNT_PLUGIN_COMMAND");const M=c({build:(e,t,o)=>({mountReactPlugin:n=>{e.dispatchCommand(O,n)},mountReactPluginHost:n=>e.dispatchCommand(E,{root:x(n)}),mountedPluginsStore:n({plugins:new Map})}),dependencies:[i,a(r,{decorators:[function({context:[e]}){const{mountedPluginsStore:n}=t(e,M).output,{ErrorBoundary:i}=t(e,r).config,l=e._onError.bind(e),[{plugins:u},c]=p(()=>n.peek());d(()=>o(()=>c(n.value)),[n]);const a=[];for(const{key:e,element:n,domNode:t}of u.values()){if(!n)continue;const o=h(i,{onError:l,children:h(f,{fallback:null,children:n})},e);a.push(t?g(o,t,e):o)}return a.length>0?h(P,{children:a}):null}]})],name:"@lexical/react/ReactPluginHost",register(n,t,o){let i;const{mountedPluginsStore:u}=o.getOutput(),{Component:c}=o.getDependency(r).output;return l(()=>{i&&i.unmount(),e(()=>{u.value.plugins.clear()})},n.registerCommand(O,n=>(e(()=>{const{plugins:e}=u.value;e.set(n.key,n),u.value={plugins:e}}),!1),s),n.registerCommand(E,e=>(void 0!==i&&function(e,...n){const t=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of n)o.append("v",e);throw t.search=o.toString(),Error(`Minified Lexical error #${e}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(322),i=e.root,i.render(h(c,{contentEditable:null})),!0),m))}});export{O as REACT_PLUGIN_HOST_MOUNT_PLUGIN_COMMAND,E as REACT_PLUGIN_HOST_MOUNT_ROOT_COMMAND,M as ReactPluginHostExtension,v as mountReactExtensionComponent,R as mountReactPluginComponent,C as mountReactPluginElement,_ as mountReactPluginHost};
9
+ import{untracked as e,signal as n,getExtensionDependencyFromEditor as t,effect as o}from"@lexical/extension";import{ReactExtension as r}from"@lexical/react/ReactExtension";import{ReactProviderExtension as i}from"@lexical/react/ReactProviderExtension";import{mergeRegister as l}from"@lexical/utils";import{createCommand as u,defineExtension as c,COMMAND_PRIORITY_CRITICAL as a,COMMAND_PRIORITY_EDITOR as s,configExtension as m}from"lexical";import{useState as p,useEffect as d,Suspense as f}from"react";import{createPortal as g}from"react-dom";import{createRoot as x}from"react-dom/client";import{jsx as h,Fragment as P}from"react/jsx-runtime";function v(e,n){const{props:o,extension:r,...i}=n,{Component:l}=t(e,r).output;C(e,{...i,element:o?h(l,{...o}):null})}function R(e,n){const{Component:t,props:o,...r}=n;C(e,{...r,element:o?h(t,{...o}):null})}function C(e,n){t(e,M).output.mountReactPlugin(n)}function _(e,n){t(e,M).output.mountReactPluginHost(n)}const E=u("REACT_PLUGIN_HOST_MOUNT_ROOT_COMMAND"),O=u("REACT_PLUGIN_HOST_MOUNT_PLUGIN_COMMAND");const M=c({build:(e,t,o)=>({mountReactPlugin:n=>{e.dispatchCommand(O,n)},mountReactPluginHost:n=>e.dispatchCommand(E,{root:x(n)}),mountedPluginsStore:n({plugins:new Map})}),dependencies:[i,m(r,{decorators:[function({context:[e]}){const{mountedPluginsStore:n}=t(e,M).output,{ErrorBoundary:i}=t(e,r).config,l=e._onError.bind(e),[{plugins:u},c]=p(()=>n.peek());d(()=>o(()=>c(n.value)),[n]);const a=[];for(const{key:e,element:n,domNode:t}of u.values()){if(!n)continue;const o=h(i,{onError:l,children:h(f,{fallback:null,children:n})},e);a.push(t?g(o,t,e):o)}return a.length>0?h(P,{children:a}):null}]})],name:"@lexical/react/ReactPluginHost",register(n,t,o){let i;const{mountedPluginsStore:u}=o.getOutput(),{Component:c}=o.getDependency(r).output;return l(()=>{i&&i.unmount(),e(()=>{u.value.plugins.clear()})},n.registerCommand(O,n=>(e(()=>{const{plugins:e}=u.value;e.set(n.key,n),u.value={plugins:e}}),!1),a),n.registerCommand(E,e=>(void 0!==i&&function(e,...n){const t=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of n)o.append("v",e);throw t.search=o.toString(),Error(`Minified Lexical error #${e}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(322),i=e.root,i.render(h(c,{contentEditable:null})),!0),s))}});export{O as REACT_PLUGIN_HOST_MOUNT_PLUGIN_COMMAND,E as REACT_PLUGIN_HOST_MOUNT_ROOT_COMMAND,M as ReactPluginHostExtension,v as mountReactExtensionComponent,R as mountReactPluginComponent,C as mountReactPluginElement,_ as mountReactPluginHost};
package/package.json CHANGED
@@ -8,26 +8,26 @@
8
8
  "rich-text"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "0.41.0",
11
+ "version": "0.41.1-nightly.20260227.0",
12
12
  "dependencies": {
13
13
  "@floating-ui/react": "^0.27.16",
14
- "@lexical/devtools-core": "0.41.0",
15
- "@lexical/dragon": "0.41.0",
16
- "@lexical/extension": "0.41.0",
17
- "@lexical/hashtag": "0.41.0",
18
- "@lexical/history": "0.41.0",
19
- "@lexical/link": "0.41.0",
20
- "@lexical/list": "0.41.0",
21
- "@lexical/mark": "0.41.0",
22
- "@lexical/markdown": "0.41.0",
23
- "@lexical/overflow": "0.41.0",
24
- "@lexical/plain-text": "0.41.0",
25
- "@lexical/rich-text": "0.41.0",
26
- "@lexical/table": "0.41.0",
27
- "@lexical/text": "0.41.0",
28
- "@lexical/utils": "0.41.0",
29
- "@lexical/yjs": "0.41.0",
30
- "lexical": "0.41.0",
14
+ "@lexical/devtools-core": "0.41.1-nightly.20260227.0",
15
+ "@lexical/dragon": "0.41.1-nightly.20260227.0",
16
+ "@lexical/extension": "0.41.1-nightly.20260227.0",
17
+ "@lexical/hashtag": "0.41.1-nightly.20260227.0",
18
+ "@lexical/history": "0.41.1-nightly.20260227.0",
19
+ "@lexical/link": "0.41.1-nightly.20260227.0",
20
+ "@lexical/list": "0.41.1-nightly.20260227.0",
21
+ "@lexical/mark": "0.41.1-nightly.20260227.0",
22
+ "@lexical/markdown": "0.41.1-nightly.20260227.0",
23
+ "@lexical/overflow": "0.41.1-nightly.20260227.0",
24
+ "@lexical/plain-text": "0.41.1-nightly.20260227.0",
25
+ "@lexical/rich-text": "0.41.1-nightly.20260227.0",
26
+ "@lexical/table": "0.41.1-nightly.20260227.0",
27
+ "@lexical/text": "0.41.1-nightly.20260227.0",
28
+ "@lexical/utils": "0.41.1-nightly.20260227.0",
29
+ "@lexical/yjs": "0.41.1-nightly.20260227.0",
30
+ "lexical": "0.41.1-nightly.20260227.0",
31
31
  "react-error-boundary": "^6.0.0"
32
32
  },
33
33
  "peerDependencies": {