@lexical/react 0.26.0 → 0.27.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.
- package/LexicalAutoLinkPlugin.dev.js +7 -1
- package/LexicalAutoLinkPlugin.dev.mjs +7 -1
- package/LexicalAutoLinkPlugin.prod.js +1 -1
- package/LexicalAutoLinkPlugin.prod.mjs +1 -1
- package/LexicalCharacterLimitPlugin.dev.js +7 -1
- package/LexicalCharacterLimitPlugin.dev.mjs +7 -1
- package/LexicalCharacterLimitPlugin.prod.js +1 -1
- package/LexicalCharacterLimitPlugin.prod.mjs +1 -1
- package/LexicalComposerContext.dev.js +7 -1
- package/LexicalComposerContext.dev.mjs +7 -1
- package/LexicalComposerContext.prod.js +1 -1
- package/LexicalComposerContext.prod.mjs +1 -1
- package/LexicalHorizontalRuleNode.dev.js +1 -1
- package/LexicalHorizontalRuleNode.dev.mjs +1 -1
- package/LexicalHorizontalRuleNode.prod.js +1 -1
- package/LexicalHorizontalRuleNode.prod.mjs +1 -1
- package/LexicalNestedComposer.dev.js +7 -1
- package/LexicalNestedComposer.dev.mjs +7 -1
- package/LexicalNestedComposer.prod.js +1 -1
- package/LexicalNestedComposer.prod.mjs +1 -1
- package/package.json +20 -20
|
@@ -22,6 +22,12 @@ var react = require('react');
|
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
// Do not require this module directly! Use normal `invariant` calls.
|
|
26
|
+
|
|
27
|
+
function formatDevErrorMessage(message) {
|
|
28
|
+
throw new Error(message);
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
function createLinkMatcherWithRegExp(regExp, urlTransformer = text => text) {
|
|
26
32
|
return text => {
|
|
27
33
|
const match = regExp.exec(text);
|
|
@@ -299,7 +305,7 @@ function useAutoLink(editor, matchers, onChange) {
|
|
|
299
305
|
react.useEffect(() => {
|
|
300
306
|
if (!editor.hasNodes([link.AutoLinkNode])) {
|
|
301
307
|
{
|
|
302
|
-
|
|
308
|
+
formatDevErrorMessage(`LexicalAutoLinkPlugin: AutoLinkNode not registered on editor`);
|
|
303
309
|
}
|
|
304
310
|
}
|
|
305
311
|
const onChangeWrapped = (url, prevUrl) => {
|
|
@@ -20,6 +20,12 @@ import { useEffect } from 'react';
|
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
+
// Do not require this module directly! Use normal `invariant` calls.
|
|
24
|
+
|
|
25
|
+
function formatDevErrorMessage(message) {
|
|
26
|
+
throw new Error(message);
|
|
27
|
+
}
|
|
28
|
+
|
|
23
29
|
function createLinkMatcherWithRegExp(regExp, urlTransformer = text => text) {
|
|
24
30
|
return text => {
|
|
25
31
|
const match = regExp.exec(text);
|
|
@@ -297,7 +303,7 @@ function useAutoLink(editor, matchers, onChange) {
|
|
|
297
303
|
useEffect(() => {
|
|
298
304
|
if (!editor.hasNodes([AutoLinkNode])) {
|
|
299
305
|
{
|
|
300
|
-
|
|
306
|
+
formatDevErrorMessage(`LexicalAutoLinkPlugin: AutoLinkNode not registered on editor`);
|
|
301
307
|
}
|
|
302
308
|
}
|
|
303
309
|
const onChangeWrapped = (url, prevUrl) => {
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
"use strict";var e=require("@lexical/link"),t=require("@lexical/react/LexicalComposerContext"),n=require("@lexical/utils"),i=require("lexical"),r=require("react");function o(e
|
|
9
|
+
"use strict";var e=require("@lexical/link"),t=require("@lexical/react/LexicalComposerContext"),n=require("@lexical/utils"),i=require("lexical"),r=require("react");function o(e,t){for(let n=0;n<t.length;n++){const i=t[n](e);if(i)return i}return null}const l=/[.,;\s]/;function s(e){return l.test(e)}function u(e){return s(e[e.length-1])}function g(e){return s(e[0])}function c(e){let t=e.getPreviousSibling();return i.$isElementNode(t)&&(t=t.getLastDescendant()),null===t||i.$isLineBreakNode(t)||i.$isTextNode(t)&&u(t.getTextContent())}function a(e){let t=e.getNextSibling();return i.$isElementNode(t)&&(t=t.getFirstDescendant()),null===t||i.$isLineBreakNode(t)||i.$isTextNode(t)&&g(t.getTextContent())}function f(e,t,n,i){if(!(e>0?s(n[e-1]):c(i[0])))return!1;return t<n.length?s(n[t]):a(i[i.length-1])}function d(e,t,n){const i=[],r=[],o=[];let l=0,s=0;const u=[...e];for(;u.length>0;){const e=u[0],g=e.getTextContent().length,c=s;s+g<=t?(i.push(e),l+=g):c>=n?o.push(e):r.push(e),s+=g,u.shift()}return[l,i,r,o]}function x(t,n,r,o){const l=e.$createAutoLinkNode(o.url,o.attributes);if(1===t.length){let e,s=t[0];0===n?[e,s]=s.splitText(r):[,e,s]=s.splitText(n,r);const u=i.$createTextNode(o.text);return u.setFormat(e.getFormat()),u.setDetail(e.getDetail()),u.setStyle(e.getStyle()),l.append(u),e.replace(l),s}if(t.length>1){const e=t[0];let o,s=e.getTextContent().length;0===n?o=e:[,o]=e.splitText(n);const u=[];let g;for(let e=1;e<t.length;e++){const n=t[e],i=n.getTextContent().length,o=s;if(o<r)if(s+i<=r)u.push(n);else{const[e,t]=n.splitText(r-o);u.push(e),g=t}s+=i}const c=i.$getSelection(),a=c?c.getNodes().find(i.$isTextNode):void 0,f=i.$createTextNode(o.getTextContent());return f.setFormat(o.getFormat()),f.setDetail(o.getDetail()),f.setStyle(o.getStyle()),l.append(f,...u),a&&a===o&&(i.$isRangeSelection(c)?f.select(c.anchor.offset,c.focus.offset):i.$isNodeSelection(c)&&f.select(0,f.getTextContent().length)),o.replace(l),g}}function h(e,t,n){const r=e.getChildren(),l=r.length;for(let t=0;t<l;t++){const o=r[t];if(!i.$isTextNode(o)||!o.isSimpleText())return p(e),void n(null,e.getURL())}const s=e.getTextContent(),u=o(s,t);if(null===u||u.text!==s)return p(e),void n(null,e.getURL());if(!c(e)||!a(e))return p(e),void n(null,e.getURL());const g=e.getURL();if(g!==u.url&&(e.setURL(u.url),n(u.url,g)),u.attributes){const t=e.getRel();t!==u.attributes.rel&&(e.setRel(u.attributes.rel||null),n(u.attributes.rel||null,t));const i=e.getTarget();i!==u.attributes.target&&(e.setTarget(u.attributes.target||null),n(u.attributes.target||null,i))}}function p(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map((e=>e.getLatest()))}function T(t,l,s){r.useEffect((()=>{t.hasNodes([e.AutoLinkNode])||function(e,...t){const n=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",e);for(const e of t)i.append("v",e);throw n.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);const r=(e,t)=>{s&&s(e,t)};return n.mergeRegister(t.registerNodeTransform(i.TextNode,(t=>{const n=t.getParentOrThrow(),s=t.getPreviousSibling();if(e.$isAutoLinkNode(n)&&!n.getIsUnlinked())h(n,l,r);else if(!e.$isLinkNode(n)){if(t.isSimpleText()&&(g(t.getTextContent())||!e.$isAutoLinkNode(s))){const e=function(e){const t=[e];let n=e.getNextSibling();for(;null!==n&&i.$isTextNode(n)&&n.isSimpleText()&&(t.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return t}(t);!function(e,t,n){let i=[...e];const r=i.map((e=>e.getTextContent())).join("");let l,s=r,u=0;for(;(l=o(s,t))&&null!==l;){const e=l.index,t=e+l.length;if(f(u+e,u+t,r,i)){const[r,,o,s]=d(i,u+e,u+t),g=x(o,u+e-r,u+t-r,l);i=g?[g,...s]:s,n(l.url,null),u=0}else u+=t;s=s.substring(t)}}(e,l,r)}!function(t,n,i){const r=t.getPreviousSibling(),o=t.getNextSibling(),l=t.getTextContent();var s;!e.$isAutoLinkNode(r)||r.getIsUnlinked()||g(l)&&(s=l,!(r.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(s):/^\.[a-zA-Z0-9]{1,}/.test(s)))||(r.append(t),h(r,n,i),i(null,r.getURL())),!e.$isAutoLinkNode(o)||o.getIsUnlinked()||u(l)||(p(o),h(o,n,i),i(null,o.getURL()))}(t,l,r)}})),t.registerCommand(e.TOGGLE_LINK_COMMAND,(t=>{const n=i.$getSelection();if(null!==t||!i.$isRangeSelection(n))return!1;return n.extract().forEach((t=>{const n=t.getParent();if(e.$isAutoLinkNode(n))return n.setIsUnlinked(!n.getIsUnlinked()),n.markDirty(),!0})),!1}),i.COMMAND_PRIORITY_LOW))}),[t,l,s])}exports.AutoLinkPlugin=function({matchers:e,onChange:n}){const[i]=t.useLexicalComposerContext();return T(i,e,n),null},exports.createLinkMatcherWithRegExp=function(e,t=(e=>e)){return n=>{const i=e.exec(n);return null===i?null:{index:i.index,length:i[0].length,text:i[0],url:t(i[0])}}};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{AutoLinkNode as t,$isAutoLinkNode as e,$isLinkNode as n,TOGGLE_LINK_COMMAND as r,$createAutoLinkNode as l}from"@lexical/link";import{useLexicalComposerContext as
|
|
9
|
+
import{AutoLinkNode as t,$isAutoLinkNode as e,$isLinkNode as n,TOGGLE_LINK_COMMAND as r,$createAutoLinkNode as l}from"@lexical/link";import{useLexicalComposerContext as i}from"@lexical/react/LexicalComposerContext";import{mergeRegister as o}from"@lexical/utils";import{TextNode as s,$getSelection as u,$isRangeSelection as g,COMMAND_PRIORITY_LOW as c,$isTextNode as a,$isElementNode as f,$isLineBreakNode as x,$createTextNode as h,$isNodeSelection as p}from"lexical";import{useEffect as d}from"react";function m(t,e=(t=>t)){return n=>{const r=t.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:e(r[0])}}}function T(t,e){for(let n=0;n<e.length;n++){const r=e[n](t);if(r)return r}return null}const C=/[.,;\s]/;function S(t){return C.test(t)}function b(t){return S(t[t.length-1])}function U(t){return S(t[0])}function v(t){let e=t.getPreviousSibling();return f(e)&&(e=e.getLastDescendant()),null===e||x(e)||a(e)&&b(e.getTextContent())}function L(t){let e=t.getNextSibling();return f(e)&&(e=e.getFirstDescendant()),null===e||x(e)||a(e)&&U(e.getTextContent())}function R(t,e,n,r){if(!(t>0?S(n[t-1]):v(r[0])))return!1;return e<n.length?S(n[e]):L(r[r.length-1])}function k(t,e,n){const r=[],l=[],i=[];let o=0,s=0;const u=[...t];for(;u.length>0;){const t=u[0],g=t.getTextContent().length,c=s;s+g<=e?(r.push(t),o+=g):c>=n?i.push(t):l.push(t),s+=g,u.shift()}return[o,r,l,i]}function D(t,e,n,r){const i=l(r.url,r.attributes);if(1===t.length){let l,o=t[0];0===e?[l,o]=o.splitText(n):[,l,o]=o.splitText(e,n);const s=h(r.text);return s.setFormat(l.getFormat()),s.setDetail(l.getDetail()),s.setStyle(l.getStyle()),i.append(s),l.replace(i),o}if(t.length>1){const r=t[0];let l,o=r.getTextContent().length;0===e?l=r:[,l]=r.splitText(e);const s=[];let c;for(let e=1;e<t.length;e++){const r=t[e],l=r.getTextContent().length,i=o;if(i<n)if(o+l<=n)s.push(r);else{const[t,e]=r.splitText(n-i);s.push(t),c=e}o+=l}const f=u(),x=f?f.getNodes().find(a):void 0,d=h(l.getTextContent());return d.setFormat(l.getFormat()),d.setDetail(l.getDetail()),d.setStyle(l.getStyle()),i.append(d,...s),x&&x===l&&(g(f)?d.select(f.anchor.offset,f.focus.offset):p(f)&&d.select(0,d.getTextContent().length)),l.replace(i),c}}function N(t,e,n){const r=t.getChildren(),l=r.length;for(let e=0;e<l;e++){const l=r[e];if(!a(l)||!l.isSimpleText())return I(t),void n(null,t.getURL())}const i=t.getTextContent(),o=T(i,e);if(null===o||o.text!==i)return I(t),void n(null,t.getURL());if(!v(t)||!L(t))return I(t),void n(null,t.getURL());const s=t.getURL();if(s!==o.url&&(t.setURL(o.url),n(o.url,s)),o.attributes){const e=t.getRel();e!==o.attributes.rel&&(t.setRel(o.attributes.rel||null),n(o.attributes.rel||null,e));const r=t.getTarget();r!==o.attributes.target&&(t.setTarget(o.attributes.target||null),n(o.attributes.target||null,r))}}function I(t){const e=t.getChildren();for(let n=e.length-1;n>=0;n--)t.insertAfter(e[n]);return t.remove(),e.map((t=>t.getLatest()))}function P(l,i,f){d((()=>{l.hasNodes([t])||function(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const t of e)r.append("v",t);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);const x=(t,e)=>{f&&f(t,e)};return o(l.registerNodeTransform(s,(t=>{const r=t.getParentOrThrow(),l=t.getPreviousSibling();if(e(r)&&!r.getIsUnlinked())N(r,i,x);else if(!n(r)){if(t.isSimpleText()&&(U(t.getTextContent())||!e(l))){const e=function(t){const e=[t];let n=t.getNextSibling();for(;null!==n&&a(n)&&n.isSimpleText()&&(e.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return e}(t);!function(t,e,n){let r=[...t];const l=r.map((t=>t.getTextContent())).join("");let i,o=l,s=0;for(;(i=T(o,e))&&null!==i;){const t=i.index,e=t+i.length;if(R(s+t,s+e,l,r)){const[l,,o,u]=k(r,s+t,s+e),g=D(o,s+t-l,s+e-l,i);r=g?[g,...u]:u,n(i.url,null),s=0}else s+=e;o=o.substring(e)}}(e,i,x)}!function(t,n,r){const l=t.getPreviousSibling(),i=t.getNextSibling(),o=t.getTextContent();var s;!e(l)||l.getIsUnlinked()||U(o)&&(s=o,!(l.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(s):/^\.[a-zA-Z0-9]{1,}/.test(s)))||(l.append(t),N(l,n,r),r(null,l.getURL())),!e(i)||i.getIsUnlinked()||b(o)||(I(i),N(i,n,r),r(null,i.getURL()))}(t,i,x)}})),l.registerCommand(r,(t=>{const n=u();if(null!==t||!g(n))return!1;return n.extract().forEach((t=>{const n=t.getParent();if(e(n))return n.setIsUnlinked(!n.getIsUnlinked()),n.markDirty(),!0})),!1}),c))}),[l,i,f])}function w({matchers:t,onChange:e}){const[n]=i();return P(n,t,e),null}export{w as AutoLinkPlugin,m as createLinkMatcherWithRegExp};
|
|
@@ -24,6 +24,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
+
// Do not require this module directly! Use normal `invariant` calls.
|
|
28
|
+
|
|
29
|
+
function formatDevErrorMessage(message) {
|
|
30
|
+
throw new Error(message);
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
function useCharacterLimit(editor, maxCharacters, optional = Object.freeze({})) {
|
|
28
34
|
const {
|
|
29
35
|
strlen = input => input.length,
|
|
@@ -35,7 +41,7 @@ function useCharacterLimit(editor, maxCharacters, optional = Object.freeze({}))
|
|
|
35
41
|
react.useEffect(() => {
|
|
36
42
|
if (!editor.hasNodes([overflow.OverflowNode])) {
|
|
37
43
|
{
|
|
38
|
-
|
|
44
|
+
formatDevErrorMessage(`useCharacterLimit: OverflowNode not registered on editor`);
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
}, [editor]);
|
|
@@ -22,6 +22,12 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
// Do not require this module directly! Use normal `invariant` calls.
|
|
26
|
+
|
|
27
|
+
function formatDevErrorMessage(message) {
|
|
28
|
+
throw new Error(message);
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
function useCharacterLimit(editor, maxCharacters, optional = Object.freeze({})) {
|
|
26
32
|
const {
|
|
27
33
|
strlen = input => input.length,
|
|
@@ -33,7 +39,7 @@ function useCharacterLimit(editor, maxCharacters, optional = Object.freeze({}))
|
|
|
33
39
|
useEffect(() => {
|
|
34
40
|
if (!editor.hasNodes([OverflowNode])) {
|
|
35
41
|
{
|
|
36
|
-
|
|
42
|
+
formatDevErrorMessage(`useCharacterLimit: OverflowNode not registered on editor`);
|
|
37
43
|
}
|
|
38
44
|
}
|
|
39
45
|
}, [editor]);
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("react"),n=require("@lexical/overflow"),r=require("@lexical/text"),o=require("@lexical/utils"),i=require("lexical"),s=require("react/jsx-runtime");function l(e){
|
|
9
|
+
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("react"),n=require("@lexical/overflow"),r=require("@lexical/text"),o=require("@lexical/utils"),i=require("lexical"),s=require("react/jsx-runtime");function l(e,s,l=Object.freeze({})){const{strlen:f=(e=>e.length),remainingCharacters:g=(()=>{})}=l;t.useEffect((()=>{e.hasNodes([n.OverflowNode])||function(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const e of t)r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(57)}),[e]),t.useEffect((()=>{let t=e.getEditorState().read(r.$rootTextContent),l=0;return o.mergeRegister(e.registerTextContentListener((e=>{t=e})),e.registerUpdateListener((({dirtyLeaves:r,dirtyElements:u})=>{const d=e.isComposing(),m=r.size>0||u.size>0;if(d||!m)return;const h=f(t),x=h>s||null!==l&&l>s;if(g(s-h),null===l||x){const r=function(e,t,n){const r=Intl.Segmenter;let o=0,i=0;if("function"==typeof r){const s=(new r).segment(e);for(const{segment:e}of s){const r=i+n(e);if(r>t)break;i=r,o+=e.length}}else{const r=Array.from(e),s=r.length;for(let e=0;e<s;e++){const s=r[e],l=i+n(s);if(l>t)break;i=l,o+=s.length}}return o}(t,s,f);e.update((()=>{!function(e){const t=o.$dfs(),r=t.length;let s=0;for(let l=0;l<r;l+=1){const{node:r}=t[l];if(n.$isOverflowNode(r)){const t=s;if(s+r.getTextContentSize()<=e){const e=r.getParent(),t=r.getPreviousSibling(),n=r.getNextSibling();o.$unwrapNode(r);const s=i.$getSelection();!i.$isRangeSelection(s)||s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()||(i.$isTextNode(t)?t.select():i.$isTextNode(n)?n.select():null!==e&&e.select())}else if(t<e){const n=r.getFirstDescendant(),s=t+(null!==n?n.getTextContentSize():0);(i.$isTextNode(n)&&n.isSimpleText()||s<=e)&&o.$unwrapNode(r)}}else if(i.$isLeafNode(r)){const t=s;if(s+=r.getTextContentSize(),s>e&&!n.$isOverflowNode(r.getParent())){const n=i.$getSelection();let o;if(t<e&&i.$isTextNode(r)&&r.isSimpleText()){const[,n]=r.splitText(e-t);o=c(n)}else o=c(r);null!==n&&i.$setSelection(n),a(o)}}}}(r)}),{tag:"history-merge"})}l=h})),e.registerCommand(i.DELETE_CHARACTER_COMMAND,(e=>{const t=i.$getSelection();if(!i.$isRangeSelection(t))return!1;const n=t.anchor.getNode().getParent(),r=n?n.getParent():null,o=r?r.getNextSibling():null;return t.deleteCharacter(e),r&&r.isEmpty()?r.remove():i.$isElementNode(o)&&o.isEmpty()&&o.remove(),!0}),i.COMMAND_PRIORITY_LOW))}),[e,s,g,f])}function c(e){const t=n.$createOverflowNode();return e.replace(t),t.append(e),t}function a(e){const t=e.getPreviousSibling();if(!n.$isOverflowNode(t))return;const r=e.getFirstChild(),o=t.getChildren(),s=o.length;if(null===r)e.append(...o);else for(let e=0;e<s;e++)r.insertBefore(o[e]);const l=i.$getSelection();if(i.$isRangeSelection(l)){const n=l.anchor,r=n.getNode(),o=l.focus,i=n.getNode();r.is(t)?n.set(e.getKey(),n.offset,"element"):r.is(e)&&n.set(e.getKey(),s+n.offset,"element"),i.is(t)?o.set(e.getKey(),o.offset,"element"):i.is(e)&&o.set(e.getKey(),s+o.offset,"element")}t.remove()}let f=null;function g(e){const t=void 0===window.TextEncoder?null:(null===f&&(f=new window.TextEncoder),f);if(null===t){const t=encodeURIComponent(e).match(/%[89ABab]/g);return e.length+(t?t.length:0)}return t.encode(e).length}function u({remainingCharacters:e}){return s.jsx("span",{className:"characters-limit "+(e<0?"characters-limit-exceeded":""),children:e})}exports.CharacterLimitPlugin=function({charset:n="UTF-16",maxLength:r=5,renderer:o=u}){const[i]=e.useLexicalComposerContext(),[s,c]=t.useState(r),a=t.useMemo((()=>({remainingCharacters:c,strlen:e=>{if("UTF-8"===n)return g(e);if("UTF-16"===n)return e.length;throw new Error("Unrecognized charset")}})),[n]);return l(i,r,a),o({remainingCharacters:s})};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{useLexicalComposerContext as e}from"@lexical/react/LexicalComposerContext";import{useEffect as t,useState as n,useMemo as r}from"react";import{OverflowNode as o,$isOverflowNode as i,$createOverflowNode as s}from"@lexical/overflow";import{$rootTextContent as l}from"@lexical/text";import{mergeRegister as c,$dfs as a,$unwrapNode as f}from"@lexical/utils";import{DELETE_CHARACTER_COMMAND as g,$getSelection as
|
|
9
|
+
import{useLexicalComposerContext as e}from"@lexical/react/LexicalComposerContext";import{useEffect as t,useState as n,useMemo as r}from"react";import{OverflowNode as o,$isOverflowNode as i,$createOverflowNode as s}from"@lexical/overflow";import{$rootTextContent as l}from"@lexical/text";import{mergeRegister as c,$dfs as a,$unwrapNode as f}from"@lexical/utils";import{DELETE_CHARACTER_COMMAND as g,$getSelection as m,$isRangeSelection as u,$isElementNode as d,COMMAND_PRIORITY_LOW as h,$isTextNode as p,$isLeafNode as x,$setSelection as C}from"lexical";import{jsx as S}from"react/jsx-runtime";function v(e,n,r=Object.freeze({})){const{strlen:s=(e=>e.length),remainingCharacters:S=(()=>{})}=r;t((()=>{e.hasNodes([o])||function(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const e of t)r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(57)}),[e]),t((()=>{let t=e.getEditorState().read(l),r=0;return c(e.registerTextContentListener((e=>{t=e})),e.registerUpdateListener((({dirtyLeaves:o,dirtyElements:l})=>{const c=e.isComposing(),g=o.size>0||l.size>0;if(c||!g)return;const d=s(t),h=d>n||null!==r&&r>n;if(S(n-d),null===r||h){const r=function(e,t,n){const r=Intl.Segmenter;let o=0,i=0;if("function"==typeof r){const s=(new r).segment(e);for(const{segment:e}of s){const r=i+n(e);if(r>t)break;i=r,o+=e.length}}else{const r=Array.from(e),s=r.length;for(let e=0;e<s;e++){const s=r[e],l=i+n(s);if(l>t)break;i=l,o+=s.length}}return o}(t,n,s);e.update((()=>{!function(e){const t=a(),n=t.length;let r=0;for(let o=0;o<n;o+=1){const{node:n}=t[o];if(i(n)){const t=r;if(r+n.getTextContentSize()<=e){const e=n.getParent(),t=n.getPreviousSibling(),r=n.getNextSibling();f(n);const o=m();!u(o)||o.anchor.getNode().isAttached()&&o.focus.getNode().isAttached()||(p(t)?t.select():p(r)?r.select():null!==e&&e.select())}else if(t<e){const r=n.getFirstDescendant(),o=t+(null!==r?r.getTextContentSize():0);(p(r)&&r.isSimpleText()||o<=e)&&f(n)}}else if(x(n)){const t=r;if(r+=n.getTextContentSize(),r>e&&!i(n.getParent())){const r=m();let o;if(t<e&&p(n)&&n.isSimpleText()){const[,r]=n.splitText(e-t);o=w(r)}else o=w(n);null!==r&&C(r),T(o)}}}}(r)}),{tag:"history-merge"})}r=d})),e.registerCommand(g,(e=>{const t=m();if(!u(t))return!1;const n=t.anchor.getNode().getParent(),r=n?n.getParent():null,o=r?r.getNextSibling():null;return t.deleteCharacter(e),r&&r.isEmpty()?r.remove():d(o)&&o.isEmpty()&&o.remove(),!0}),h))}),[e,n,S,s])}function w(e){const t=s();return e.replace(t),t.append(e),t}function T(e){const t=e.getPreviousSibling();if(!i(t))return;const n=e.getFirstChild(),r=t.getChildren(),o=r.length;if(null===n)e.append(...r);else for(let e=0;e<o;e++)n.insertBefore(r[e]);const s=m();if(u(s)){const n=s.anchor,r=n.getNode(),i=s.focus,l=n.getNode();r.is(t)?n.set(e.getKey(),n.offset,"element"):r.is(e)&&n.set(e.getKey(),o+n.offset,"element"),l.is(t)?i.set(e.getKey(),i.offset,"element"):l.is(e)&&i.set(e.getKey(),o+i.offset,"element")}t.remove()}let y=null;function N(e){const t=void 0===window.TextEncoder?null:(null===y&&(y=new window.TextEncoder),y);if(null===t){const t=encodeURIComponent(e).match(/%[89ABab]/g);return e.length+(t?t.length:0)}return t.encode(e).length}function b({remainingCharacters:e}){return S("span",{className:"characters-limit "+(e<0?"characters-limit-exceeded":""),children:e})}function E({charset:t="UTF-16",maxLength:o=5,renderer:i=b}){const[s]=e(),[l,c]=n(o);return v(s,o,r((()=>({remainingCharacters:c,strlen:e=>{if("UTF-8"===t)return N(e);if("UTF-16"===t)return e.length;throw new Error("Unrecognized charset")}})),[t])),i({remainingCharacters:l})}export{E as CharacterLimitPlugin};
|
|
@@ -18,6 +18,12 @@ var react = require('react');
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
// Do not require this module directly! Use normal `invariant` calls.
|
|
22
|
+
|
|
23
|
+
function formatDevErrorMessage(message) {
|
|
24
|
+
throw new Error(message);
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
const LexicalComposerContext = /*#__PURE__*/react.createContext(null);
|
|
22
28
|
function createLexicalComposerContext(parent, theme) {
|
|
23
29
|
let parentContext = null;
|
|
@@ -38,7 +44,7 @@ function useLexicalComposerContext() {
|
|
|
38
44
|
const composerContext = react.useContext(LexicalComposerContext);
|
|
39
45
|
if (composerContext == null) {
|
|
40
46
|
{
|
|
41
|
-
|
|
47
|
+
formatDevErrorMessage(`LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext`);
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
return composerContext;
|
|
@@ -16,6 +16,12 @@ import { createContext, useContext } from 'react';
|
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
// Do not require this module directly! Use normal `invariant` calls.
|
|
20
|
+
|
|
21
|
+
function formatDevErrorMessage(message) {
|
|
22
|
+
throw new Error(message);
|
|
23
|
+
}
|
|
24
|
+
|
|
19
25
|
const LexicalComposerContext = /*#__PURE__*/createContext(null);
|
|
20
26
|
function createLexicalComposerContext(parent, theme) {
|
|
21
27
|
let parentContext = null;
|
|
@@ -36,7 +42,7 @@ function useLexicalComposerContext() {
|
|
|
36
42
|
const composerContext = useContext(LexicalComposerContext);
|
|
37
43
|
if (composerContext == null) {
|
|
38
44
|
{
|
|
39
|
-
|
|
45
|
+
formatDevErrorMessage(`LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext`);
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
return composerContext;
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
"use strict";var e=require("react");
|
|
9
|
+
"use strict";var e=require("react");const n=e.createContext(null);exports.LexicalComposerContext=n,exports.createLexicalComposerContext=function(e,n){let t=null;return null!=e&&(t=e[1]),{getTheme:function(){return null!=n?n:null!=t?t.getTheme():null}}},exports.useLexicalComposerContext=function(){const t=e.useContext(n);return null==t&&function(e,...n){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const e of n)r.append("v",e);throw t.search=r.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.`)}(8),t};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{createContext as
|
|
9
|
+
import{createContext as n,useContext as e}from"react";const r=n(null);function t(n,e){let r=null;return null!=n&&(r=n[1]),{getTheme:function(){return null!=e?e:null!=r?r.getTheme():null}}}function o(){const n=e(r);return null==n&&function(n,...e){const r=new URL("https://lexical.dev/docs/error"),t=new URLSearchParams;t.append("code",n);for(const n of e)t.append("v",n);throw r.search=t.toString(),Error(`Minified Lexical error #${n}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),n}export{r as LexicalComposerContext,t as createLexicalComposerContext,o as useLexicalComposerContext};
|
|
@@ -56,7 +56,7 @@ function HorizontalRuleComponent({
|
|
|
56
56
|
}, [clearSelection, editor, isSelected, nodeKey, $onDelete, setSelected]);
|
|
57
57
|
react.useEffect(() => {
|
|
58
58
|
const hrElem = editor.getElementByKey(nodeKey);
|
|
59
|
-
const isSelectedClassName = 'selected';
|
|
59
|
+
const isSelectedClassName = editor._config.theme.hrSelected ?? 'selected';
|
|
60
60
|
if (hrElem !== null) {
|
|
61
61
|
if (isSelected) {
|
|
62
62
|
utils.addClassNamesToElement(hrElem, isSelectedClassName);
|
|
@@ -54,7 +54,7 @@ function HorizontalRuleComponent({
|
|
|
54
54
|
}, [clearSelection, editor, isSelected, nodeKey, $onDelete, setSelected]);
|
|
55
55
|
useEffect(() => {
|
|
56
56
|
const hrElem = editor.getElementByKey(nodeKey);
|
|
57
|
-
const isSelectedClassName = 'selected';
|
|
57
|
+
const isSelectedClassName = editor._config.theme.hrSelected ?? 'selected';
|
|
58
58
|
if (hrElem !== null) {
|
|
59
59
|
if (isSelected) {
|
|
60
60
|
addClassNamesToElement(hrElem, isSelectedClassName);
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("@lexical/react/useLexicalNodeSelection"),r=require("@lexical/utils"),n=require("lexical"),o=require("react"),
|
|
9
|
+
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("@lexical/react/useLexicalNodeSelection"),r=require("@lexical/utils"),n=require("lexical"),o=require("react"),c=require("react/jsx-runtime");const s=n.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:c}){const[s]=e.useLexicalComposerContext(),[a,i,l]=t.useLexicalNodeSelection(c),u=o.useCallback((e=>{const t=n.$getSelection();return a&&n.$isNodeSelection(t)&&(e.preventDefault(),t.getNodes().forEach((e=>{m(e)&&e.remove()}))),!1}),[a]);return o.useEffect((()=>r.mergeRegister(s.registerCommand(n.CLICK_COMMAND,(e=>{const t=s.getElementByKey(c);return e.target===t&&(e.shiftKey||l(),i(!a),!0)}),n.COMMAND_PRIORITY_LOW),s.registerCommand(n.KEY_DELETE_COMMAND,u,n.COMMAND_PRIORITY_LOW),s.registerCommand(n.KEY_BACKSPACE_COMMAND,u,n.COMMAND_PRIORITY_LOW))),[l,s,a,c,u,i]),o.useEffect((()=>{const e=s.getElementByKey(c),t=s._config.theme.hrSelected??"selected";null!==e&&(a?r.addClassNamesToElement(e,t):r.removeClassNamesFromElement(e,t))}),[s,a,c]),null}class i extends n.DecoratorNode{static getType(){return"horizontalrule"}static clone(e){return new i(e.__key)}static importJSON(e){return u().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:l,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const t=document.createElement("hr");return r.addClassNamesToElement(t,e.theme.hr),t}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}decorate(){return c.jsx(a,{nodeKey:this.__key})}}function l(){return{node:u()}}function u(){return n.$applyNodeReplacement(new i)}function m(e){return e instanceof i}exports.$createHorizontalRuleNode=u,exports.$isHorizontalRuleNode=m,exports.HorizontalRuleNode=i,exports.INSERT_HORIZONTAL_RULE_COMMAND=s;
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{useLexicalComposerContext as e}from"@lexical/react/LexicalComposerContext";import{useLexicalNodeSelection as t}from"@lexical/react/useLexicalNodeSelection";import{addClassNamesToElement as r,mergeRegister as n,removeClassNamesFromElement as o}from"@lexical/utils";import{createCommand as c,DecoratorNode as i,$applyNodeReplacement as m,$getSelection as u,$isNodeSelection as a,CLICK_COMMAND as l,COMMAND_PRIORITY_LOW as s,KEY_DELETE_COMMAND as
|
|
9
|
+
import{useLexicalComposerContext as e}from"@lexical/react/LexicalComposerContext";import{useLexicalNodeSelection as t}from"@lexical/react/useLexicalNodeSelection";import{addClassNamesToElement as r,mergeRegister as n,removeClassNamesFromElement as o}from"@lexical/utils";import{createCommand as c,DecoratorNode as i,$applyNodeReplacement as m,$getSelection as u,$isNodeSelection as a,CLICK_COMMAND as l,COMMAND_PRIORITY_LOW as s,KEY_DELETE_COMMAND as d,KEY_BACKSPACE_COMMAND as p}from"lexical";import{useCallback as f,useEffect as x}from"react";import{jsx as h}from"react/jsx-runtime";const y=c("INSERT_HORIZONTAL_RULE_COMMAND");function g({nodeKey:c}){const[i]=e(),[m,h,y]=t(c),g=f((e=>{const t=u();return m&&a(t)&&(e.preventDefault(),t.getNodes().forEach((e=>{E(e)&&e.remove()}))),!1}),[m]);return x((()=>n(i.registerCommand(l,(e=>{const t=i.getElementByKey(c);return e.target===t&&(e.shiftKey||y(),h(!m),!0)}),s),i.registerCommand(d,g,s),i.registerCommand(p,g,s))),[y,i,m,c,g,h]),x((()=>{const e=i.getElementByKey(c),t=i._config.theme.hrSelected??"selected";null!==e&&(m?r(e,t):o(e,t))}),[i,m,c]),null}class O extends i{static getType(){return"horizontalrule"}static clone(e){return new O(e.__key)}static importJSON(e){return C().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:_,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const t=document.createElement("hr");return r(t,e.theme.hr),t}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}decorate(){return h(g,{nodeKey:this.__key})}}function _(){return{node:C()}}function C(){return m(new O)}function E(e){return e instanceof O}export{C as $createHorizontalRuleNode,E as $isHorizontalRuleNode,O as HorizontalRuleNode,y as INSERT_HORIZONTAL_RULE_COMMAND};
|
|
@@ -21,6 +21,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
+
// Do not require this module directly! Use normal `invariant` calls.
|
|
25
|
+
|
|
26
|
+
function formatDevErrorMessage(message) {
|
|
27
|
+
throw new Error(message);
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
function getTransformSetFromKlass(klass) {
|
|
25
31
|
const transform = klass.transform();
|
|
26
32
|
return transform !== null ? new Set([transform]) : new Set();
|
|
@@ -36,7 +42,7 @@ function LexicalNestedComposer({
|
|
|
36
42
|
const parentContext = react.useContext(LexicalComposerContext.LexicalComposerContext);
|
|
37
43
|
if (parentContext == null) {
|
|
38
44
|
{
|
|
39
|
-
|
|
45
|
+
formatDevErrorMessage(`Unexpected parent context null on a nested composer`);
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
const [parentEditor, {
|
|
@@ -19,6 +19,12 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
// Do not require this module directly! Use normal `invariant` calls.
|
|
23
|
+
|
|
24
|
+
function formatDevErrorMessage(message) {
|
|
25
|
+
throw new Error(message);
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
function getTransformSetFromKlass(klass) {
|
|
23
29
|
const transform = klass.transform();
|
|
24
30
|
return transform !== null ? new Set([transform]) : new Set();
|
|
@@ -34,7 +40,7 @@ function LexicalNestedComposer({
|
|
|
34
40
|
const parentContext = useContext(LexicalComposerContext);
|
|
35
41
|
if (parentContext == null) {
|
|
36
42
|
{
|
|
37
|
-
|
|
43
|
+
formatDevErrorMessage(`Unexpected parent context null on a nested composer`);
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
46
|
const [parentEditor, {
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
"use strict";var e=require("@lexical/react/LexicalCollaborationContext"),t=require("@lexical/react/LexicalComposerContext"),r=require("react"),o=require("react/jsx-runtime");function n(e){
|
|
9
|
+
"use strict";var e=require("@lexical/react/LexicalCollaborationContext"),t=require("@lexical/react/LexicalComposerContext"),r=require("react"),o=require("react/jsx-runtime");function n(e){const t=e.transform();return null!==t?new Set([t]):new Set}exports.LexicalNestedComposer=function({initialEditor:s,children:i,initialNodes:l,initialTheme:a,skipCollabChecks:c}){const p=r.useRef(!1),u=r.useContext(t.LexicalComposerContext);null==u&&function(e,...t){const r=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of t)o.append("v",e);throw r.search=o.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(9);const[f,{getTheme:d}]=u,x=r.useMemo((()=>{const e=a||d()||void 0,r=t.createLexicalComposerContext(u,e);if(void 0!==e&&(s._config.theme=e),s._parentEditor=f,l)for(let e of l){let t=null,r=null;if("function"!=typeof e){const o=e;e=o.replace,t=o.with,r=o.withKlass||null}const o=s._nodes.get(e.getType());s._nodes.set(e.getType(),{exportDOM:o?o.exportDOM:void 0,klass:e,replace:t,replaceWithKlass:r,transforms:n(e)})}else{const e=s._nodes=new Map(f._nodes);for(const[t,r]of e)s._nodes.set(t,{exportDOM:r.exportDOM,klass:r.klass,replace:r.replace,replaceWithKlass:r.replaceWithKlass,transforms:n(r.klass)})}return s._config.namespace=f._config.namespace,s._editable=f._editable,[s,r]}),[]),{isCollabActive:h,yjsDocMap:m}=e.useCollaborationContext(),C=c||p.current||m.has(s.getKey());return r.useEffect((()=>{C&&(p.current=!0)}),[C]),r.useEffect((()=>f.registerEditableListener((e=>{s.setEditable(e)}))),[s,f]),o.jsx(t.LexicalComposerContext.Provider,{value:x,children:!h||C?i:null})};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import{useCollaborationContext as e}from"@lexical/react/LexicalCollaborationContext";import{LexicalComposerContext as t,createLexicalComposerContext as r}from"@lexical/react/LexicalComposerContext";import{useRef as o,useContext as n,useMemo as
|
|
9
|
+
import{useCollaborationContext as e}from"@lexical/react/LexicalCollaborationContext";import{LexicalComposerContext as t,createLexicalComposerContext as r}from"@lexical/react/LexicalComposerContext";import{useRef as o,useContext as n,useMemo as i,useEffect as l}from"react";import{jsx as s}from"react/jsx-runtime";function a(e){const t=e.transform();return null!==t?new Set([t]):new Set}function c({initialEditor:c,children:p,initialNodes:f,initialTheme:d,skipCollabChecks:m}){const u=o(!1),h=n(t);null==h&&function(e,...t){const r=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",e);for(const e of t)o.append("v",e);throw r.search=o.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(9);const[x,{getTheme:g}]=h,v=i((()=>{const e=d||g()||void 0,t=r(h,e);if(void 0!==e&&(c._config.theme=e),c._parentEditor=x,f)for(let e of f){let t=null,r=null;if("function"!=typeof e){const o=e;e=o.replace,t=o.with,r=o.withKlass||null}const o=c._nodes.get(e.getType());c._nodes.set(e.getType(),{exportDOM:o?o.exportDOM:void 0,klass:e,replace:t,replaceWithKlass:r,transforms:a(e)})}else{const e=c._nodes=new Map(x._nodes);for(const[t,r]of e)c._nodes.set(t,{exportDOM:r.exportDOM,klass:r.klass,replace:r.replace,replaceWithKlass:r.replaceWithKlass,transforms:a(r.klass)})}return c._config.namespace=x._config.namespace,c._editable=x._editable,[c,t]}),[]),{isCollabActive:_,yjsDocMap:w}=e(),b=m||u.current||w.has(c.getKey());return l((()=>{b&&(u.current=!0)}),[b]),l((()=>x.registerEditableListener((e=>{c.setEditable(e)}))),[c,x]),s(t.Provider,{value:v,children:!_||b?p:null})}export{c as LexicalNestedComposer};
|
package/package.json
CHANGED
|
@@ -8,27 +8,27 @@
|
|
|
8
8
|
"rich-text"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.27.0",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@lexical/clipboard": "0.
|
|
14
|
-
"@lexical/code": "0.
|
|
15
|
-
"@lexical/devtools-core": "0.
|
|
16
|
-
"@lexical/dragon": "0.
|
|
17
|
-
"@lexical/hashtag": "0.
|
|
18
|
-
"@lexical/history": "0.
|
|
19
|
-
"@lexical/link": "0.
|
|
20
|
-
"@lexical/list": "0.
|
|
21
|
-
"@lexical/mark": "0.
|
|
22
|
-
"@lexical/markdown": "0.
|
|
23
|
-
"@lexical/overflow": "0.
|
|
24
|
-
"@lexical/plain-text": "0.
|
|
25
|
-
"@lexical/rich-text": "0.
|
|
26
|
-
"@lexical/selection": "0.
|
|
27
|
-
"@lexical/table": "0.
|
|
28
|
-
"@lexical/text": "0.
|
|
29
|
-
"@lexical/utils": "0.
|
|
30
|
-
"@lexical/yjs": "0.
|
|
31
|
-
"lexical": "0.
|
|
13
|
+
"@lexical/clipboard": "0.27.0",
|
|
14
|
+
"@lexical/code": "0.27.0",
|
|
15
|
+
"@lexical/devtools-core": "0.27.0",
|
|
16
|
+
"@lexical/dragon": "0.27.0",
|
|
17
|
+
"@lexical/hashtag": "0.27.0",
|
|
18
|
+
"@lexical/history": "0.27.0",
|
|
19
|
+
"@lexical/link": "0.27.0",
|
|
20
|
+
"@lexical/list": "0.27.0",
|
|
21
|
+
"@lexical/mark": "0.27.0",
|
|
22
|
+
"@lexical/markdown": "0.27.0",
|
|
23
|
+
"@lexical/overflow": "0.27.0",
|
|
24
|
+
"@lexical/plain-text": "0.27.0",
|
|
25
|
+
"@lexical/rich-text": "0.27.0",
|
|
26
|
+
"@lexical/selection": "0.27.0",
|
|
27
|
+
"@lexical/table": "0.27.0",
|
|
28
|
+
"@lexical/text": "0.27.0",
|
|
29
|
+
"@lexical/utils": "0.27.0",
|
|
30
|
+
"@lexical/yjs": "0.27.0",
|
|
31
|
+
"lexical": "0.27.0",
|
|
32
32
|
"react-error-boundary": "^3.1.4"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|