Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lexical/link

Package Overview
Dependencies
Maintainers
5
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lexical/link - npm Package Compare versions

Comparing version 0.16.2-nightly.20240722.0 to 0.16.2-nightly.20240723.0

2

index.d.ts

@@ -55,2 +55,4 @@ /**

extractWithChild(child: LexicalNode, selection: BaseSelection, destination: 'clone' | 'html'): boolean;
isEmailURI(): boolean;
isWebSiteURI(): boolean;
}

@@ -57,0 +59,0 @@ /**

@@ -203,2 +203,8 @@ /**

}
isEmailURI() {
return this.__url.startsWith('mailto:');
}
isWebSiteURI() {
return this.__url.startsWith('https://') || this.__url.startsWith('http://');
}
}

@@ -205,0 +211,0 @@ function $convertAnchorElement(domNode) {

4

LexicalLink.prod.js

@@ -13,4 +13,4 @@ /**

b.setDirection(a.direction);return b}sanitizeUrl(a){try{let b=new URL(a);if(!n.has(b.protocol))return"about:blank"}catch(b){}return a}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(a){this.getWritable().__url=a}getTarget(){return this.getLatest().__target}setTarget(a){this.getWritable().__target=a}getRel(){return this.getLatest().__rel}setRel(a){this.getWritable().__rel=
a}getTitle(){return this.getLatest().__title}setTitle(a){this.getWritable().__title=a}insertNewAfter(a,b=!0){a=r(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});this.insertAfter(a,b);return a}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(a,b){if(!m.$isRangeSelection(b))return!1;a=b.anchor.getNode();let d=b.focus.getNode();return this.isParentOf(a)&&this.isParentOf(d)&&0<b.getTextContent().length}}
function q(a){let b=null;if(l.isHTMLAnchorElement(a)){let d=a.textContent;if(null!==d&&""!==d||0<a.children.length)b=r(a.getAttribute("href")||"",{rel:a.getAttribute("rel"),target:a.getAttribute("target"),title:a.getAttribute("title")})}return{node:b}}function r(a,b){return m.$applyNodeReplacement(new p(a,b))}function u(a){return a instanceof p}
a}getTitle(){return this.getLatest().__title}setTitle(a){this.getWritable().__title=a}insertNewAfter(a,b=!0){a=r(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});this.insertAfter(a,b);return a}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(a,b){if(!m.$isRangeSelection(b))return!1;a=b.anchor.getNode();let d=b.focus.getNode();return this.isParentOf(a)&&this.isParentOf(d)&&0<b.getTextContent().length}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||
this.__url.startsWith("http://")}}function q(a){let b=null;if(l.isHTMLAnchorElement(a)){let d=a.textContent;if(null!==d&&""!==d||0<a.children.length)b=r(a.getAttribute("href")||"",{rel:a.getAttribute("rel"),target:a.getAttribute("target"),title:a.getAttribute("title")})}return{node:b}}function r(a,b){return m.$applyNodeReplacement(new p(a,b))}function u(a){return a instanceof p}
class v extends p{constructor(a,b={},d){super(a,b,d);this.__isUnlinked=void 0!==b.isUnlinked&&null!==b.isUnlinked?b.isUnlinked:!1}static getType(){return"autolink"}static clone(a){return new v(a.__url,{isUnlinked:a.__isUnlinked,rel:a.__rel,target:a.__target,title:a.__title},a.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(a){let b=this.getWritable();b.__isUnlinked=a;return b}createDOM(a){return this.__isUnlinked?document.createElement("span"):super.createDOM(a)}updateDOM(a,b,d){return super.updateDOM(a,

@@ -17,0 +17,0 @@ b,d)||a.__isUnlinked!==this.__isUnlinked}static importJSON(a){let b=w(a.url,{isUnlinked:a.isUnlinked,rel:a.rel,target:a.target,title:a.title});b.setFormat(a.format);b.setIndent(a.indent);b.setDirection(a.direction);return b}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked,type:"autolink",version:1}}insertNewAfter(a,b=!0){a=this.getParentOrThrow().insertNewAfter(a,b);return m.$isElementNode(a)?(b=w(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,

@@ -11,8 +11,8 @@ {

"license": "MIT",
"version": "0.16.2-nightly.20240722.0",
"version": "0.16.2-nightly.20240723.0",
"main": "LexicalLink.js",
"types": "index.d.ts",
"dependencies": {
"@lexical/utils": "0.16.2-nightly.20240722.0",
"lexical": "0.16.2-nightly.20240722.0"
"@lexical/utils": "0.16.2-nightly.20240723.0",
"lexical": "0.16.2-nightly.20240723.0"
},

@@ -19,0 +19,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc