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

@lexical/dragon

Package Overview
Dependencies
Maintainers
6
Versions
191
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 0.6.1-next.0 to 0.6.2

6

LexicalDragon.dev.js

@@ -13,3 +13,9 @@ /**

function registerDragonSupport(editor) {
const origin = window.location.origin;
const handler = event => {
if (event.origin !== origin) {
return;
}
const rootElement = editor.getRootElement();

@@ -16,0 +22,0 @@

4

LexicalDragon.prod.js

@@ -8,3 +8,3 @@ /**

'use strict';var g=require("lexical");
exports.registerDragonSupport=function(l){let r=m=>{var h=l.getRootElement();if(document.activeElement===h&&(h=m.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,t]=a;l.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+t,e=b.getTextContentSize(),c=c>e?e:c,d=d>e?e:d,f.setTextNodeRange(b,c,b,d));m.stopImmediatePropagation()}})}}};window.addEventListener("message",r,!0);return()=>{window.removeEventListener("message",r,!0)}}
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)}}

@@ -12,6 +12,6 @@ {

"license": "MIT",
"version": "0.6.1-next.0",
"version": "0.6.2",
"main": "LexicalDragon.js",
"peerDependencies": {
"lexical": "0.6.1-next.0"
"lexical": "0.6.2"
},

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

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