@lexical/link
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -159,3 +159,3 @@ /** | ||
let node = null; | ||
if (domNode instanceof HTMLAnchorElement) { | ||
if (utils.isHTMLAnchorElement(domNode)) { | ||
const content = domNode.textContent; | ||
@@ -162,0 +162,0 @@ if (content !== null && content !== '') { |
@@ -11,3 +11,3 @@ /** | ||
a}getTarget(){return this.getLatest().__target}setTarget(a){this.getWritable().__target=a}getRel(){return this.getLatest().__rel}setRel(a){this.getWritable().__rel=a}insertNewAfter(a,b=!0){a=this.getParentOrThrow().insertNewAfter(a,b);return m.$isElementNode(a)?(b=q(this.__url,{rel:this.__rel,target:this.__target}),a.append(b),b):null}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 c=b.focus.getNode();return this.isParentOf(a)&&this.isParentOf(c)&&0<b.getTextContent().length}}function p(a){let b=null;if(a instanceof HTMLAnchorElement){let c=a.textContent;null!==c&&""!==c&&(b=q(a.getAttribute("href")||"",{rel:a.getAttribute("rel"),target:a.getAttribute("target")}))}return{node:b}}function q(a,b){return m.$applyNodeReplacement(new n(a,b))}function r(a){return a instanceof n} | ||
let c=b.focus.getNode();return this.isParentOf(a)&&this.isParentOf(c)&&0<b.getTextContent().length}}function p(a){let b=null;if(k.isHTMLAnchorElement(a)){let c=a.textContent;null!==c&&""!==c&&(b=q(a.getAttribute("href")||"",{rel:a.getAttribute("rel"),target:a.getAttribute("target")}))}return{node:b}}function q(a,b){return m.$applyNodeReplacement(new n(a,b))}function r(a){return a instanceof n} | ||
class u extends n{static getType(){return"autolink"}static clone(a){return new u(a.__url,{rel:a.__rel,target:a.__target},a.__key)}static importJSON(a){let b=v(a.url,{rel:a.rel,target:a.target});b.setFormat(a.format);b.setIndent(a.indent);b.setDirection(a.direction);return b}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(a,b=!0){a=this.getParentOrThrow().insertNewAfter(a,b);return m.$isElementNode(a)?(b=v(this.__url,{rel:this._rel, | ||
@@ -14,0 +14,0 @@ target:this.__target}),a.append(b),b):null}}function v(a,b){return m.$applyNodeReplacement(new u(a,b))}let w=m.createCommand("TOGGLE_LINK_COMMAND");function x(a){return y(a,b=>r(b))}function y(a,b){for(;null!==a&&null!==(a=a.getParent())&&!b(a););return a}exports.$createAutoLinkNode=v;exports.$createLinkNode=q;exports.$isAutoLinkNode=function(a){return a instanceof u};exports.$isLinkNode=r;exports.AutoLinkNode=u;exports.LinkNode=n;exports.TOGGLE_LINK_COMMAND=w; |
@@ -11,9 +11,9 @@ { | ||
"license": "MIT", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"main": "LexicalLink.js", | ||
"peerDependencies": { | ||
"lexical": "0.8.0" | ||
"lexical": "0.8.1" | ||
}, | ||
"dependencies": { | ||
"@lexical/utils": "0.8.0" | ||
"@lexical/utils": "0.8.1" | ||
}, | ||
@@ -20,0 +20,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
20500
+ Added@lexical/list@0.8.1(transitive)
+ Added@lexical/selection@0.8.1(transitive)
+ Added@lexical/table@0.8.1(transitive)
+ Added@lexical/utils@0.8.1(transitive)
+ Addedlexical@0.8.1(transitive)
- Removed@lexical/list@0.8.0(transitive)
- Removed@lexical/selection@0.8.0(transitive)
- Removed@lexical/table@0.8.0(transitive)
- Removed@lexical/utils@0.8.0(transitive)
- Removedlexical@0.8.0(transitive)
Updated@lexical/utils@0.8.1