Socket
Socket
Sign inDemoInstall

@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.10.4 to 1.11.0

2

lib/index.esm.js

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

*/
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.10",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};
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.11",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";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.10"]')[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.10",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}}();
!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.11"]')[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.11",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";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.10",e);if(null!=e)return new a.EditorSDK(e,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.11",e);if(null!=e)return new a.EditorSDK(e,n)};

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

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

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

"devDependencies": {
"@grammarly/plugin-core": "1.10.4",
"@grammarly/plugin-editor": "1.10.4",
"@grammarly/plugin-invariant": "1.10.4",
"@grammarly/plugin-reactivity": "1.10.4",
"@grammarly/plugin-core": "1.11.0",
"@grammarly/plugin-editor": "1.11.0",
"@grammarly/plugin-invariant": "1.11.0",
"@grammarly/plugin-reactivity": "1.11.0",
"@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