@grammarly/sdk
Advanced tools
Comparing version 2.3.18 to 2.4.0
@@ -17,2 +17,2 @@ /** | ||
*/ | ||
const n={async load(n,r){throw new Error("SDK loader is not configured.")}};function r(r){n.load=r}async function t(r,t){return new((await n.load("https://js.grammarly.com/grammarly-sdk@2.3",r)).SDK)(r,t)}function e(){const n=globalThis.Grammarly;if(null==n)throw new Error("Grammarly SDK is not loaded.");return n}if("function"==typeof importScripts)r((async n=>(importScripts(n),e())));else{let n=null;r((async r=>(null!=n||(n=new Promise(((n,t)=>{try{let n=function(n){return document.querySelectorAll(`script[src^="${n}"]`)[0]}(r);null!=n?(console.warn(`<script src="${r}" /> already exists.`),o()):(n=function(n){const r=document.createElement("script");return r.src=n,document.head.appendChild(r),r}(r),n.addEventListener("load",o),n.addEventListener("error",a))}catch(n){a(n)}function o(){n(e())}function a(n){t(n)}}))),await n)))}export{t as init}; | ||
const n={async load(n,r){throw new Error("SDK loader is not configured.")}};function r(r){n.load=r}async function t(r,t){return new((await n.load("https://js.grammarly.com/grammarly-sdk@2.4",r)).SDK)(r,t)}function e(){const n=globalThis.Grammarly;if(null==n)throw new Error("Grammarly SDK is not loaded.");return n}if("function"==typeof importScripts)r((async n=>(importScripts(n),e())));else{let n=null;r((async r=>(null!=n||(n=new Promise(((n,t)=>{try{let n=function(n){return document.querySelectorAll(`script[src^="${n}"]`)[0]}(r);null!=n?(console.warn(`<script src="${r}" /> already exists.`),o()):(n=function(n){const r=document.createElement("script");return r.src=n,document.head.appendChild(r),r}(r),n.addEventListener("load",o),n.addEventListener("error",a))}catch(n){a(n)}function o(){n(e())}function a(n){t(n)}}))),await n)))}export{t as init}; |
@@ -17,2 +17,2 @@ /** | ||
*/ | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={async load(t,r){throw new Error("SDK loader is not configured.")}};function r(r){t.load=r}function e(){const t=globalThis.Grammarly;if(null==t)throw new Error("Grammarly SDK is not loaded.");return t}if("function"==typeof importScripts)r((async t=>(importScripts(t),e())));else{let t=null;r((async r=>(null!=t||(t=new Promise(((t,n)=>{try{let t=function(t){return document.querySelectorAll(`script[src^="${t}"]`)[0]}(r);null!=t?(console.warn(`<script src="${r}" /> already exists.`),o()):(t=function(t){const r=document.createElement("script");return r.src=t,document.head.appendChild(r),r}(r),t.addEventListener("load",o),t.addEventListener("error",a))}catch(t){a(t)}function o(){t(e())}function a(t){n(t)}}))),await t)))}exports.init=async function(r,e){return new((await t.load("https://js.grammarly.com/grammarly-sdk@2.3",r)).SDK)(r,e)}; | ||
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={async load(t,r){throw new Error("SDK loader is not configured.")}};function r(r){t.load=r}function e(){const t=globalThis.Grammarly;if(null==t)throw new Error("Grammarly SDK is not loaded.");return t}if("function"==typeof importScripts)r((async t=>(importScripts(t),e())));else{let t=null;r((async r=>(null!=t||(t=new Promise(((t,n)=>{try{let t=function(t){return document.querySelectorAll(`script[src^="${t}"]`)[0]}(r);null!=t?(console.warn(`<script src="${r}" /> already exists.`),o()):(t=function(t){const r=document.createElement("script");return r.src=t,document.head.appendChild(r),r}(r),t.addEventListener("load",o),t.addEventListener("error",a))}catch(t){a(t)}function o(){t(e())}function a(t){n(t)}}))),await t)))}exports.init=async function(r,e){return new((await t.load("https://js.grammarly.com/grammarly-sdk@2.4",r)).SDK)(r,e)}; |
@@ -235,6 +235,14 @@ /** | ||
/** | ||
* Offer to complete phrases for your users as they type. {@link https://developer.grammarly.com/docs/autocomplete | Learn more} | ||
* Offers to complete phrases and emojis for your users as they type. {@link https://developer.grammarly.com/docs/autocomplete | Learn more} | ||
* | ||
* Autocomplete is not currently supported for `<input>` fields. | ||
* | ||
* - `"on"`: Plugin offers autocomplete and emoji autocomplete suggestions | ||
* | ||
* - `"text"`: Plugin offers autocomplete suggestions without emoji autocomplete | ||
* | ||
* - `"emoji"`: Plugin offers emoji autocomplete suggestions without core autocomplete functionality | ||
* | ||
* - `"off"`: Plugin does not offer autocomplete or emoji autocomplete suggestions | ||
* | ||
* If you have a Content Security Policy (CSP), you will need to update it as described | ||
@@ -249,3 +257,3 @@ * {@link https://developer.grammarly.com/docs/faq#how-do-i-add-grammarly-to-my-content-security-policy-csp | here}. | ||
*/ | ||
autocomplete?: "on" | "off"; | ||
autocomplete?: string; | ||
/** | ||
@@ -287,5 +295,5 @@ * URI to redirect to after successful account connection. | ||
* | ||
* - focus: Plugin activates once the text field is focused | ||
* - `"focus"`: Plugin activates once the text field is focused | ||
* | ||
* - immediate: Plugin activates immediately | ||
* - `"immediate"`: Plugin activates immediately | ||
* | ||
@@ -292,0 +300,0 @@ * @defaultValue "focus" |
@@ -235,6 +235,14 @@ /** | ||
/** | ||
* Offer to complete phrases for your users as they type. {@link https://developer.grammarly.com/docs/autocomplete | Learn more} | ||
* Offers to complete phrases and emojis for your users as they type. {@link https://developer.grammarly.com/docs/autocomplete | Learn more} | ||
* | ||
* Autocomplete is not currently supported for `<input>` fields. | ||
* | ||
* - `"on"`: Plugin offers autocomplete and emoji autocomplete suggestions | ||
* | ||
* - `"text"`: Plugin offers autocomplete suggestions without emoji autocomplete | ||
* | ||
* - `"emoji"`: Plugin offers emoji autocomplete suggestions without core autocomplete functionality | ||
* | ||
* - `"off"`: Plugin does not offer autocomplete or emoji autocomplete suggestions | ||
* | ||
* If you have a Content Security Policy (CSP), you will need to update it as described | ||
@@ -249,3 +257,3 @@ * {@link https://developer.grammarly.com/docs/faq#how-do-i-add-grammarly-to-my-content-security-policy-csp | here}. | ||
*/ | ||
autocomplete?: "on" | "off"; | ||
autocomplete?: string; | ||
/** | ||
@@ -287,5 +295,5 @@ * URI to redirect to after successful account connection. | ||
* | ||
* - focus: Plugin activates once the text field is focused | ||
* - `"focus"`: Plugin activates once the text field is focused | ||
* | ||
* - immediate: Plugin activates immediately | ||
* - `"immediate"`: Plugin activates immediately | ||
* | ||
@@ -292,0 +300,0 @@ * @defaultValue "focus" |
@@ -5,3 +5,3 @@ { | ||
"description": "Grammarly writing SDK (no UI)", | ||
"version": "2.3.18", | ||
"version": "2.4.0", | ||
"license": "Apache-2.0", | ||
@@ -41,5 +41,5 @@ "sideEffects": false, | ||
"devDependencies": { | ||
"@grammarly/plugin-core": "2.3.18", | ||
"@grammarly/plugin-reactivity": "2.3.18", | ||
"@grammarly/plugin-sdk": "2.3.18", | ||
"@grammarly/plugin-core": "2.4.0", | ||
"@grammarly/plugin-reactivity": "2.4.0", | ||
"@grammarly/plugin-sdk": "2.4.0", | ||
"@microsoft/api-extractor": "^7.28.7", | ||
@@ -46,0 +46,0 @@ "@types/jest": "^26.0.22", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
491213
3671