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

@grammarly/editor-sdk

Package Overview
Dependencies
Maintainers
7
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 1.9.3 to 1.9.4

2

lib/index.esm.js

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

*/
class r extends Error{args;code;url;constructor(r,t,n=""){super();const e=new URL("https://developer.grammarly.com/docs/error-explainer");e.searchParams.set("code",r.toString()),t.forEach((r=>e.searchParams.append("args",String(r)))),null!=this.stack&&e.searchParams.set("trace",this.stack),this.message=`Minified error #${r}: ${n} See ${e.toString()} for details.`,this.args=t,this.code=r,this.url=e.toString()}}const t=new WeakMap;async function n(n,e,o){if("undefined"==typeof window&&void 0===o)throw new r(21,[]);const s=await async function(n,e,o){const s=t.get(n);if(null!=s)return await s;!function(r){null==r.Grammarly&&(r.Grammarly={})}(n);const a=new Promise(((t,s)=>{try{let t=function(r,t){return r.document.querySelectorAll(`script[src^="${t}"]`)[0]}(n,e);null!=t?a():(t=function(r,t){const n=r.document.createElement("script");return n.src=t,r.document.head.appendChild(n),n}(n,null!=o?`${e}?clientId=${o}`:e),t.addEventListener("load",a),t.addEventListener("error",(function(){try{throw new r(23,[])}catch(r){s(r)}})))}catch(r){return s(r)}function a(){try{if(null==n.Grammarly||"function"!=typeof n.Grammarly.EditorSDK)throw new r(22,[]);t(n.Grammarly)}catch(r){s(r)}}}));return t.set(n,a),await a}(o??window,"https://js.grammarly.com/grammarly-editor-sdk@1.9",n);if(null!=n)return new s.EditorSDK(n,e)}const e={onBeforeSuggestionCardOpen:"before-suggestion-card-open",onSuggestionCardOpen:"suggestion-card-open",onSuggestionCardClose:"suggestion-card-close",onPluginTurnedOff:"plugin-turned-off",onPluginError:"plugin-error",onDocumentStats:"document-stats",onSessionStats:"session-stats"};export{e as callbackToEventName,n as init};
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}class r extends Error{constructor(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";super(),t(this,"args",void 0),t(this,"code",void 0),t(this,"url",void 0);var o=new URL("https://developer.grammarly.com/docs/error-explainer");o.searchParams.set("code",r.toString()),n.forEach((t=>o.searchParams.append("args",String(t)))),null!=this.stack&&o.searchParams.set("trace",this.stack),this.message="Minified error #".concat(r,": ").concat(e," See ").concat(o.toString()," for details."),this.args=n,this.code=r,this.url=o.toString()}}const n=new WeakMap;async function e(t,e,o){if("undefined"==typeof window&&void 0===o)throw new r(21,[]);const a=await async function(t,e,o){const a=n.get(t);if(null!=a)return await a;!function(t){null==t.Grammarly&&(t.Grammarly={})}(t);const s=new Promise(((n,a)=>{try{let n=function(t,r){return t.document.querySelectorAll(`script[src^="${r}"]`)[0]}(t,e);null!=n?s():(n=function(t,r){const n=t.document.createElement("script");return n.src=r,t.document.head.appendChild(n),n}(t,null!=o?`${e}?clientId=${o}`:e),n.addEventListener("load",s),n.addEventListener("error",(function(){try{throw new r(23,[])}catch(t){a(t)}})))}catch(t){return a(t)}function s(){try{if(null==t.Grammarly||"function"!=typeof t.Grammarly.EditorSDK)throw new r(22,[]);n(t.Grammarly)}catch(t){a(t)}}}));return n.set(t,s),await s}(null!=o?o:window,"https://js.grammarly.com/grammarly-editor-sdk@1.9",t);if(null!=t)return new a.EditorSDK(t,e)}const o={onBeforeSuggestionCardOpen:"before-suggestion-card-open",onSuggestionCardOpen:"suggestion-card-open",onSuggestionCardClose:"suggestion-card-close",onPluginTurnedOff:"plugin-turned-off",onPluginError:"plugin-error",onDocumentStats:"document-stats",onSessionStats:"session-stats"};export{o as callbackToEventName,e as init};

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

*/
!function(){"use strict";class t extends Error{args;code;url;constructor(t,r,n=""){super();const e=new URL("https://developer.grammarly.com/docs/error-explainer");e.searchParams.set("code",t.toString()),r.forEach((t=>e.searchParams.append("args",String(t)))),null!=this.stack&&e.searchParams.set("trace",this.stack),this.message=`Minified error #${t}: ${n} See ${e.toString()} for details.`,this.args=r,this.code=t,this.url=e.toString()}}const r=new WeakMap;async function n(n,e,c){if("undefined"==typeof window&&void 0===c)throw new t(21,[]);const a=await async function(n,e,c){const a=r.get(n);if(null!=a)return await a;!function(t){null==t.Grammarly&&(t.Grammarly={})}(n);const i=new Promise(((r,a)=>{try{let r=function(t,r){return t.document.querySelectorAll('script[src^="https://js.grammarly.com/grammarly-editor-sdk@1.9"]')[0]}(n);null!=r?i():(r=function(t,r){const n=t.document.createElement("script");return n.src=r,t.document.head.appendChild(n),n}(n,null!=c?`${e}?clientId=${c}`:e),r.addEventListener("load",i),r.addEventListener("error",(function(){try{throw new t(23,[])}catch(t){a(t)}})))}catch(t){return a(t)}function i(){try{if(null==n.Grammarly||"function"!=typeof n.Grammarly.EditorSDK)throw new t(22,[]);r(n.Grammarly)}catch(t){a(t)}}}));return r.set(n,i),await i}(c??window,"https://js.grammarly.com/grammarly-editor-sdk@1.9",n);if(null!=n)return new a.EditorSDK(n,e)}const e=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}}(),c=async function(t){return await t.catch((t=>{console.error(t.message)}))}(null!=e?n(e):n());window.Grammarly.init=async(r=e)=>{const a=e===r?await c:null!=r?await n(r):void 0;if(null==a)throw new t(20,[]);return a}}();
!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}class r extends Error{constructor(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";super(),t(this,"args",void 0),t(this,"code",void 0),t(this,"url",void 0);var a=new URL("https://developer.grammarly.com/docs/error-explainer");a.searchParams.set("code",r.toString()),n.forEach((t=>a.searchParams.append("args",String(t)))),null!=this.stack&&a.searchParams.set("trace",this.stack),this.message="Minified error #".concat(r,": ").concat(e," See ").concat(a.toString()," for details."),this.args=n,this.code=r,this.url=a.toString()}}const n=new WeakMap;async function e(t,e,a){if("undefined"==typeof window&&void 0===a)throw new r(21,[]);const c=await async function(t,e,a){const c=n.get(t);if(null!=c)return await c;!function(t){null==t.Grammarly&&(t.Grammarly={})}(t);const i=new Promise(((n,c)=>{try{let n=function(t,r){return t.document.querySelectorAll('script[src^="https://js.grammarly.com/grammarly-editor-sdk@1.9"]')[0]}(t);null!=n?i():(n=function(t,r){const n=t.document.createElement("script");return n.src=r,t.document.head.appendChild(n),n}(t,null!=a?`${e}?clientId=${a}`:e),n.addEventListener("load",i),n.addEventListener("error",(function(){try{throw new r(23,[])}catch(t){c(t)}})))}catch(t){return c(t)}function i(){try{if(null==t.Grammarly||"function"!=typeof t.Grammarly.EditorSDK)throw new r(22,[]);n(t.Grammarly)}catch(t){c(t)}}}));return n.set(t,i),await i}(null!=a?a:window,"https://js.grammarly.com/grammarly-editor-sdk@1.9",t);if(null!=t)return new c.EditorSDK(t,e)}const a=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}}(),c=async function(t){return await t.catch((t=>{console.error(t.message)}))}(null!=a?e(a):e());window.Grammarly.init=async(t=a)=>{const n=a===t?await c:null!=t?await e(t):void 0;if(null==n)throw new r(20,[]);return n}}();

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

*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class e extends Error{args;code;url;constructor(e,t,r=""){super();const n=new URL("https://developer.grammarly.com/docs/error-explainer");n.searchParams.set("code",e.toString()),t.forEach((e=>n.searchParams.append("args",String(e)))),null!=this.stack&&n.searchParams.set("trace",this.stack),this.message=`Minified error #${e}: ${r} See ${n.toString()} for details.`,this.args=t,this.code=e,this.url=n.toString()}}const t=new WeakMap;exports.callbackToEventName={onBeforeSuggestionCardOpen:"before-suggestion-card-open",onSuggestionCardOpen:"suggestion-card-open",onSuggestionCardClose:"suggestion-card-close",onPluginTurnedOff:"plugin-turned-off",onPluginError:"plugin-error",onDocumentStats:"document-stats",onSessionStats:"session-stats"},exports.init=async function(r,n,o){if("undefined"==typeof window&&void 0===o)throw new e(21,[]);const s=await async function(r,n,o){const s=t.get(r);if(null!=s)return await s;!function(e){null==e.Grammarly&&(e.Grammarly={})}(r);const a=new Promise(((t,s)=>{try{let t=function(e,t){return e.document.querySelectorAll(`script[src^="${t}"]`)[0]}(r,n);null!=t?a():(t=function(e,t){const r=e.document.createElement("script");return r.src=t,e.document.head.appendChild(r),r}(r,null!=o?`${n}?clientId=${o}`:n),t.addEventListener("load",a),t.addEventListener("error",(function(){try{throw new e(23,[])}catch(e){s(e)}})))}catch(e){return s(e)}function a(){try{if(null==r.Grammarly||"function"!=typeof r.Grammarly.EditorSDK)throw new e(22,[]);t(r.Grammarly)}catch(e){s(e)}}}));return t.set(r,a),await a}(o??window,"https://js.grammarly.com/grammarly-editor-sdk@1.9",r);if(null!=r)return new s.EditorSDK(r,n)};
"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class t extends Error{constructor(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";super(),e(this,"args",void 0),e(this,"code",void 0),e(this,"url",void 0);var o=new URL("https://developer.grammarly.com/docs/error-explainer");o.searchParams.set("code",t.toString()),r.forEach((e=>o.searchParams.append("args",String(e)))),null!=this.stack&&o.searchParams.set("trace",this.stack),this.message="Minified error #".concat(t,": ").concat(n," See ").concat(o.toString()," for details."),this.args=r,this.code=t,this.url=o.toString()}}const r=new WeakMap;exports.callbackToEventName={onBeforeSuggestionCardOpen:"before-suggestion-card-open",onSuggestionCardOpen:"suggestion-card-open",onSuggestionCardClose:"suggestion-card-close",onPluginTurnedOff:"plugin-turned-off",onPluginError:"plugin-error",onDocumentStats:"document-stats",onSessionStats:"session-stats"},exports.init=async function(e,n,o){if("undefined"==typeof window&&void 0===o)throw new t(21,[]);const a=await async function(e,n,o){const a=r.get(e);if(null!=a)return await a;!function(e){null==e.Grammarly&&(e.Grammarly={})}(e);const s=new Promise(((r,a)=>{try{let r=function(e,t){return e.document.querySelectorAll(`script[src^="${t}"]`)[0]}(e,n);null!=r?s():(r=function(e,t){const r=e.document.createElement("script");return r.src=t,e.document.head.appendChild(r),r}(e,null!=o?`${n}?clientId=${o}`:n),r.addEventListener("load",s),r.addEventListener("error",(function(){try{throw new t(23,[])}catch(e){a(e)}})))}catch(e){return a(e)}function s(){try{if(null==e.Grammarly||"function"!=typeof e.Grammarly.EditorSDK)throw new t(22,[]);r(e.Grammarly)}catch(e){a(e)}}}));return r.set(e,s),await s}(null!=o?o:window,"https://js.grammarly.com/grammarly-editor-sdk@1.9",e);if(null!=e)return new a.EditorSDK(e,n)};

@@ -5,3 +5,3 @@ {

"description": "Grammarly writing SDK for web editors",
"version": "1.9.3",
"version": "1.9.4",
"main": "./lib/index.js",

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

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

@@ -35,0 +35,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