@lexical/text
Advanced tools
Comparing version 0.7.1 to 0.7.2
@@ -99,3 +99,3 @@ /** | ||
if (lexical.$isElementNode(topBlock)) { | ||
if (topBlock.__type !== 'paragraph') { | ||
if (!lexical.$isParagraphNode(topBlock)) { | ||
return false; | ||
@@ -102,0 +102,0 @@ } |
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
'use strict';var h=require("lexical");function r(c,g=!0){if(c)return!1;c=t();g&&(c=c.trim());return""===c}function t(){return h.$getRoot().getTextContent()}function u(c){if(!r(c,!1))return!1;c=h.$getRoot().getChildren();let g=c.length;if(1<g)return!1;for(let e=0;e<g;e++){var b=c[e];if(h.$isElementNode(b)){if("paragraph"!==b.__type||0!==b.__indent)return!1;b=b.getChildren();let n=b.length;for(let p=0;p<n;p++)if(!h.$isTextNode(b[e]))return!1}}return!0}exports.$canShowPlaceholder=u; | ||
'use strict';var h=require("lexical");function r(c,g=!0){if(c)return!1;c=t();g&&(c=c.trim());return""===c}function t(){return h.$getRoot().getTextContent()}function u(c){if(!r(c,!1))return!1;c=h.$getRoot().getChildren();let g=c.length;if(1<g)return!1;for(let e=0;e<g;e++){var b=c[e];if(h.$isElementNode(b)){if(!h.$isParagraphNode(b)||0!==b.__indent)return!1;b=b.getChildren();let n=b.length;for(let p=0;p<n;p++)if(!h.$isTextNode(b[e]))return!1}}return!0}exports.$canShowPlaceholder=u; | ||
exports.$canShowPlaceholderCurry=function(c){return()=>u(c)};exports.$findTextIntersectionFromCharacters=function(c,g){var b=c.getFirstChild();c=0;a:for(;null!==b;){if(h.$isElementNode(b)){var e=b.getFirstChild();if(null!==e){b=e;continue}}else if(h.$isTextNode(b)){e=b.getTextContentSize();if(c+e>g)return{node:b,offset:g-c};c+=e}e=b.getNextSibling();if(null!==e)b=e;else{for(b=b.getParent();null!==b;){e=b.getNextSibling();if(null!==e){b=e;continue a}b=b.getParent()}break}}return null}; | ||
@@ -10,0 +10,0 @@ exports.$isRootTextContentEmpty=r;exports.$isRootTextContentEmptyCurry=function(c,g){return()=>r(c,g)};exports.$rootTextContent=t; |
@@ -12,6 +12,6 @@ { | ||
"license": "MIT", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"main": "LexicalText.js", | ||
"peerDependencies": { | ||
"lexical": "0.7.1" | ||
"lexical": "0.7.2" | ||
}, | ||
@@ -18,0 +18,0 @@ "repository": { |
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
14787