Socket
Book a DemoInstallSign in
Socket

@lexical/dragon

Package Overview
Dependencies
Maintainers
5
Versions
418
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lexical/dragon - npm Package Compare versions

Comparing version

to
0.23.2-nightly.20250115.0

4

LexicalDragon.prod.js

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

'use strict';var g=require("lexical");
exports.registerDragonSupport=function(m){let t=window.location.origin,r=l=>{if(l.origin===t){var h=m.getRootElement();if(document.activeElement===h&&(h=l.data,"string"===typeof h)){try{var a=JSON.parse(h)}catch(k){return}if(a&&"nuanria_messaging"===a.protocol&&"request"===a.type&&(a=a.payload)&&"makeChanges"===a.functionId&&(a=a.args)){const [k,n,p,q,u]=a;m.update(()=>{const f=g.$getSelection();if(g.$isRangeSelection(f)){var e=f.anchor;let b=e.getNode(),c=0,d=0;g.$isTextNode(b)&&0<=k&&0<=n&&(c=k,
d=k+n,f.setTextNodeRange(b,c,b,d));if(c!==d||""!==p)f.insertRawText(p),b=e.getNode();g.$isTextNode(b)&&(c=q,d=q+u,e=b.getTextContentSize(),c=c>e?e:c,d=d>e?e:d,f.setTextNodeRange(b,c,b,d));l.stopImmediatePropagation()}})}}}};window.addEventListener("message",r,!0);return()=>{window.removeEventListener("message",r,!0)}}
"use strict";var e=require("lexical");exports.registerDragonSupport=function(t){const n=window.location.origin,o=o=>{if(o.origin!==n)return;const i=t.getRootElement();if(document.activeElement!==i)return;const s=o.data;if("string"==typeof s){let n;try{n=JSON.parse(s)}catch(e){return}if(n&&"nuanria_messaging"===n.protocol&&"request"===n.type){const i=n.payload;if(i&&"makeChanges"===i.functionId){const n=i.args;if(n){const[i,s,r,a,c,g]=n;t.update((()=>{const t=e.$getSelection();if(e.$isRangeSelection(t)){const n=t.anchor;let g=n.getNode(),d=0,u=0;if(e.$isTextNode(g)&&i>=0&&s>=0&&(d=i,u=i+s,t.setTextNodeRange(g,d,g,u)),d===u&&""===r||(t.insertRawText(r),g=n.getNode()),e.$isTextNode(g)){d=a,u=a+c;const e=g.getTextContentSize();d=d>e?e:d,u=u>e?e:u,t.setTextNodeRange(g,d,g,u)}o.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",o,!0),()=>{window.removeEventListener("message",o,!0)}};

@@ -12,3 +12,3 @@ {

"license": "MIT",
"version": "0.23.2-nightly.20250114.0",
"version": "0.23.2-nightly.20250115.0",
"main": "LexicalDragon.js",

@@ -41,4 +41,4 @@ "types": "index.d.ts",

"dependencies": {
"lexical": "0.23.2-nightly.20250114.0"
"lexical": "0.23.2-nightly.20250115.0"
}
}
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.