Socket
Socket
Sign inDemoInstall

@grammarly/editor-sdk

Package Overview
Dependencies
Maintainers
8
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammarly/editor-sdk - npm Package Compare versions

Comparing version 2.3.8 to 2.3.9

2

lib/index.iife.js

@@ -17,2 +17,2 @@ /**

*/
!function(){"use strict";function t(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var r=new Map;class n extends Error{constructor(r,n){super(),t(this,"args",void 0),t(this,"code",void 0),t(this,"url",void 0),t(this,"_c",void 0);var e=new URL("https://developer.grammarly.com/docs/error-explainer");e.searchParams.set("code",r.toString()),n.forEach((t=>e.searchParams.append("args",function(t){if(t instanceof Error)return t.message+"\n"+String(t.stack);if(null==t)return"null";if("object"==typeof t)try{return Object.prototype.toString.call(t)}catch(t){}return String(t)}(t)))),null!=this.stack&&e.searchParams.set("trace",this.stack),this.message="Minified error #".concat(r,": See ").concat(e.toString()," for details."),this.args=n,this.code=r,this.url=e.toString()}toUserMessage(){var t=r.get("".concat(this.code));if(null==t)return[this];var n=new Map(this.args.map(((t,r)=>["${".concat(r,"}"),t])));return t.split(/(\${\d+})/).filter((t=>""!==t)).map((t=>{var r;return null!==(r=n.get(t))&&void 0!==r?r:t}))}toJSON(){return{name:"InvariantError",message:this.message,description:this._c,code:this.code,args:this.args,stack:this.stack}}static setMessages(t){r=t}static create(t,r,e,a){null!=a&&r.push(a);var i=new n(t,r,e);return i.stack=null==a?void 0:a.stack,i._c=e,i}}const e=new WeakMap;async function a(t,r,a){return await async function(t,r,a,i){if("undefined"==typeof window&&void 0===i)throw new n(21,[]);const o=function(t){return"null"!==t.location.origin?t.location.origin:"null"!==t.origin?t.origin:"null"}(null!=i?i:window);"null"===o&&(null!=i?i:window).top!==(null!=i?i:window)&&console.warn("Grammarly is not supported in IFrames with `null` origin. Consider adding `sandbox='allow-same-origin allow-scripts'` to <iframe> element.");const s=new URL("https://js.grammarly.com/grammarly-editor-sdk@2.3",o);null!=r&&s.searchParams.set("clientId",r),s.searchParams.set("packageName","@grammarly/editor-sdk");const c=await async function(t,r){const a=e.get(t);if(null!=a)return await a;!function(t){null==t.Grammarly&&(t.Grammarly={})}(t);const i=new Promise(((e,a)=>{try{let e=function(t,r){return t.document.querySelectorAll(`script[src^="${r.replace(/\?.*$/,"")}"]`)[0]}(t,r);null!=e?i():(e=function(t,r){const n=t.document.createElement("script");return n.src=r,t.document.head.appendChild(n),n}(t,r),e.addEventListener("load",i),e.addEventListener("error",(function(){try{throw new n(23,[])}catch(t){a(t)}})))}catch(t){return a(t)}function i(){try{if(null==t.Grammarly||"function"!=typeof t.Grammarly.EditorSDK)throw new n(22,[]);e(t.Grammarly)}catch(t){a(t)}}}));return e.set(t,i),await i}(null!=i?i:window,s.toString());if(null!=r)return new c.EditorSDK(r,a)}(0,t,r,a)}const i=function(){const t=function(){if(document.currentScript instanceof HTMLScriptElement)return document.currentScript}();if(t){const r=t.src;if(r){const t=new URL(r).searchParams.get("clientId");if(null!=t)return t}const n=t.getAttribute("clientId");if(null!=n)return n}}(),o=async function(t){return await t.catch((t=>{console.error(t.message)}))}(null!=i?a(i):a());window.Grammarly.init=async(t=i)=>{const r=i===t?await o:null!=t?await a(t):void 0;if(null==r)throw new n(20,[]);return r}}();
!function(){"use strict";function t(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var r=new Map;class n extends Error{constructor(r,n){super(),t(this,"args",void 0),t(this,"code",void 0),t(this,"url",void 0),t(this,"_c",void 0);var e=new URL("https://developer.grammarly.com/docs/error-explainer");e.searchParams.set("code",r.toString()),n.forEach((t=>e.searchParams.append("args",function(t){if(t instanceof Error)return t.message+"\n"+String(t.stack);if(null==t)return"null";if("object"==typeof t)try{return Object.prototype.toString.call(t)}catch(t){}return String(t)}(t)))),null!=this.stack&&e.searchParams.set("trace",this.stack),this.message="Minified error #".concat(r,": See ").concat(e.toString()," for details."),this.args=n,this.code=r,this.url=e.toString()}toUserMessage(){var t=r.get("".concat(this.code));if(null==t)return[this];var n=new Map(this.args.map(((t,r)=>["${".concat(r,"}"),t])));return t.split(/(\${\d+})/).filter((t=>""!==t)).map((t=>{var r;return null!==(r=n.get(t))&&void 0!==r?r:t}))}toJSON(){return{name:"InvariantError",message:this.message,description:this._c,code:this.code,args:this.args,stack:this.stack}}static setMessages(t){r=t}static create(t,r,e,a){null!=a&&r.push(a);var i=new n(t,r,e);return i.stack=null==a?void 0:a.stack,i._c=e,i}}const e=new WeakMap;async function a(t,r,a){return await async function(t,r,a,i){if("undefined"==typeof window&&void 0===i)throw new n(21,[]);const o=function(t){return"null"!==t.location.origin?t.location.origin:"null"!==t.origin?t.origin:"null"}(null!=i?i:window);"null"===o&&(null!=i?i:window).top!==(null!=i?i:window)&&console.warn("Grammarly is not supported in IFrames with `null` origin. Consider adding `sandbox='allow-same-origin allow-scripts'` to <iframe> element.");const s=new URL("https://js.grammarly.com/grammarly-editor-sdk@2.3",o);null!=r&&s.searchParams.set("clientId",r),s.searchParams.set("packageName","@grammarly/editor-sdk");const c=await async function(t,r){const a=e.get(t);if(null!=a)return await a;!function(t){null==t.Grammarly&&(t.Grammarly={})}(t);const i=new Promise(((e,a)=>{try{let e=function(t,r){return t.document.querySelectorAll(`script[src^="${r.replace(/\?.*$/,"")}"]`)[0]}(t,r);null!=e?i():(e=function(t,r){const n=t.document.createElement("script");return n.src=r,t.document.head.appendChild(n),n}(t,r),e.addEventListener("load",i),e.addEventListener("error",(function(){try{throw new n(23,[])}catch(t){a(t)}})))}catch(t){return a(t)}function i(){try{if(null==t.Grammarly||"function"!=typeof t.Grammarly.EditorSDK)throw new n(22,[]);e(t.Grammarly)}catch(t){a(t)}}}));return e.set(t,i),await i}(null!=i?i:window,s.toString());if(null!=r)return new c.EditorSDK(r,a)}(0,t,r,a)}const i=document.currentScript instanceof HTMLScriptElement?document.currentScript:void 0;const o=function(){const t=i;if(t){const r=t.src;if(r){const t=new URL(r).searchParams.get("clientId");if(null!=t)return t}const n=t.getAttribute("clientId");if(null!=n)return n}}(),s=async function(t){return await t.catch((t=>{console.error(t.message)}))}(null!=o?a(o):a());window.Grammarly.init=async(t=o)=>{const r=o===t?await s:null!=t?await a(t):void 0;if(null==r)throw new n(20,[]);return r}}();

@@ -16,3 +16,3 @@ {

],
"version": "2.3.8",
"version": "2.3.9",
"main": "./lib/index.js",

@@ -40,6 +40,6 @@ "module": "./lib/index.esm.js",

"devDependencies": {
"@grammarly/plugin-core": "2.3.8",
"@grammarly/plugin-editor": "2.3.8",
"@grammarly/plugin-invariant": "2.3.8",
"@grammarly/plugin-reactivity": "2.3.8",
"@grammarly/plugin-core": "2.3.9",
"@grammarly/plugin-editor": "2.3.9",
"@grammarly/plugin-invariant": "2.3.9",
"@grammarly/plugin-reactivity": "2.3.9",
"@microsoft/api-extractor": "^7.28.7",

@@ -46,0 +46,0 @@ "@testing-library/jest-dom": "^5.11.10",

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