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

@grammarly/react-textarea

Package Overview
Dependencies
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammarly/react-textarea - npm Package Compare versions

Comparing version 0.10.18 to 0.11.0

67

lib/index.d.ts

@@ -5,4 +5,2 @@ /// <reference types="react" />

declare const GRAMMARLY_HIGHLIGHT_TAG = "grammarly-internal-suggestion";
/**

@@ -27,2 +25,30 @@ * Identifier used to authenticate with Grammarly.

/**
* Statistics about the Grammarly session.
*
* @public
*/
interface SessionStats {
/** Duration of the editing session, in seconds. */
duration: number;
/** Total words checked during the session. */
wordsChecked: number;
/** Suggestions provided by Grammarly. */
suggestionsSent: SessionSuggestionBreakdown;
/** Suggestions accepted by user. */
suggestionsAccepted: SessionSuggestionBreakdown;
}
/**
* Suggestion total along with counts by type.
*
* @public
*/
interface SessionSuggestionBreakdown {
total: number;
correctness: number;
delivery: number;
clarity: number;
engagement: number;
}
/**
* Time in hours, minutes, and seconds.

@@ -58,5 +84,18 @@ *

speakingTime: Time;
/** Stats about the overall session. */
session: SessionStats;
}
/**
* Provides more detail when the plugin is disabled by a user.
*
* @remarks
* Clarifies whether the user disabled the plugin for the current session only
* or for all future sessions?
* In either case, the user can change their mind later.
*
* @public
*/
declare type PluginDisableReason = "user-next-visit" | "user-forever";
/**
* Allows customizing the Grammarly experience.

@@ -68,3 +107,6 @@ *

features?: GrammarlyFeaturesConfig;
/** Callback to receive stats about the user-entered text and Grammarly session. */
onTextStats?: (stats: TextStats) => void;
/** Triggered when the user consciously disables the plugin. Not triggered again once already disabled. */
onPluginDisable?: (reason: PluginDisableReason) => void;
}

@@ -113,21 +155,2 @@ /**

declare global {
interface Window {
Grammarly: any;
__grammarly_deps: Record<string, any>;
}
}
declare type SuggestionType = "critical" | "clarity" | "engagement" | "tone" | "advanced" | "originality" | "vox";
declare global {
namespace JSX {
interface IntrinsicElements {
[GRAMMARLY_HIGHLIGHT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> & JSX.IntrinsicAttributes & {
type: SuggestionType;
active?: boolean;
};
}
}
}
/**

@@ -170,2 +193,2 @@ * Base props for the GrammarlyTextArea component.

export { BaseGrammarlyTextAreaProps, ButtonOffset, ClientId, GrammarlyFeaturesConfig, GrammarlyOptions, GrammarlyTextArea, GrammarlyTextAreaProps, TextStats, Time };
export { BaseGrammarlyTextAreaProps, ButtonOffset, ClientId, GrammarlyFeaturesConfig, GrammarlyOptions, GrammarlyTextArea, GrammarlyTextAreaProps, PluginDisableReason, SessionStats, SessionSuggestionBreakdown, TextStats, Time };

@@ -80,3 +80,3 @@ import * as React from 'react';

var css_248z = ".highlight {\n --gr-color-red: 242, 115, 136;\n --gr-color-cyan: 117, 225, 235;\n --gr-color-blue: 121, 168, 242;\n --gr-color-green: 135, 232, 209;\n --gr-color-purple: 189, 121, 237;\n --gr-color-yellow: 255, 201, 64;\n --gr-color-neutral: 159, 166, 191;\n}\n\n.highlight {\n --gr-highlight-color: var(--gr-color-red);\n --gr-highlight-bg-color: transparent;\n --gr-highlight-border-color: rgba(var(--gr-highlight-color), 0.65);\n}\n\n.active,\n.hover,\n.highlight:hover {\n --gr-highlight-bg-color: rgba(var(--gr-highlight-color), 0.25);\n --gr-highlight-border-color: rgba(var(--gr-highlight-color), 1);\n}\n\n.underline {\n transition: background-color ease-in-out 350ms;\n background-color: var(--gr-highlight-bg-color);\n border: none;\n border-bottom: 3px solid var(--gr-highlight-border-color);\n box-sizing: content-box;\n}\n\n.highlight > .underline {\n position: absolute;\n}\n\n.critical {\n --gr-highlight-color: var(--gr-color-red);\n}\n.clarity {\n --gr-highlight-color: var(--gr-color-blue);\n}\n.engagement {\n --gr-highlight-color: var(--gr-color-green);\n}\n.tone {\n --gr-highlight-color: var(--gr-color-purple);\n}\n.advanced {\n --gr-highlight-color: var(--gr-color-yellow);\n}\n.originality {\n --gr-highlight-color: var(--gr-color-cyan);\n}\n.vox {\n --gr-highlight-color: var(--gr-color-gray);\n}\n";
var css_248z = ".highlight {\n --gr-color-red: 242, 115, 136;\n --gr-color-cyan: 117, 225, 235;\n --gr-color-blue: 121, 168, 242;\n --gr-color-green: 135, 232, 209;\n --gr-color-purple: 189, 121, 237;\n --gr-color-yellow: 255, 201, 64;\n --gr-color-neutral: 159, 166, 191;\n}\n\n.highlight {\n --gr-highlight-color: var(--gr-color-red);\n --gr-highlight-bg-color: transparent;\n --gr-highlight-border-color: rgba(var(--gr-highlight-color), 0.65);\n}\n\n.active,\n.hover,\n.highlight:hover {\n --gr-highlight-bg-color: rgba(var(--gr-highlight-color), 0.25);\n --gr-highlight-border-color: rgba(var(--gr-highlight-color), 1);\n}\n\n.underline {\n transition: background-color ease-in-out 350ms;\n background-color: var(--gr-highlight-bg-color);\n border: none;\n border-bottom: 3px solid var(--gr-highlight-border-color);\n box-sizing: content-box;\n}\n\n.underline:after {\n content: attr(data-id);\n font-size: 8px;\n font-weight: bold;\n}\n\n.highlight > .underline {\n position: absolute;\n}\n\n.critical {\n --gr-highlight-color: var(--gr-color-red);\n}\n.clarity {\n --gr-highlight-color: var(--gr-color-blue);\n}\n.engagement {\n --gr-highlight-color: var(--gr-color-green);\n}\n.tone {\n --gr-highlight-color: var(--gr-color-purple);\n}\n.advanced {\n --gr-highlight-color: var(--gr-color-yellow);\n}\n.originality {\n --gr-highlight-color: var(--gr-color-cyan);\n}\n.vox {\n --gr-highlight-color: var(--gr-color-gray);\n}\n";
function injectCSS(id, css) {

@@ -89,3 +89,3 @@ if (!window.Grammarly) window.Grammarly = { CSS: [] };

const [versionMajor, versionMinor] = "0.10.18".split(".");
const [versionMajor, versionMinor] = "0.11.0".split(".");
async function getGrammarlyModule() {

@@ -92,0 +92,0 @@ return await loadGrammarly({

@@ -106,3 +106,3 @@ 'use strict';

var css_248z = ".highlight {\n --gr-color-red: 242, 115, 136;\n --gr-color-cyan: 117, 225, 235;\n --gr-color-blue: 121, 168, 242;\n --gr-color-green: 135, 232, 209;\n --gr-color-purple: 189, 121, 237;\n --gr-color-yellow: 255, 201, 64;\n --gr-color-neutral: 159, 166, 191;\n}\n\n.highlight {\n --gr-highlight-color: var(--gr-color-red);\n --gr-highlight-bg-color: transparent;\n --gr-highlight-border-color: rgba(var(--gr-highlight-color), 0.65);\n}\n\n.active,\n.hover,\n.highlight:hover {\n --gr-highlight-bg-color: rgba(var(--gr-highlight-color), 0.25);\n --gr-highlight-border-color: rgba(var(--gr-highlight-color), 1);\n}\n\n.underline {\n transition: background-color ease-in-out 350ms;\n background-color: var(--gr-highlight-bg-color);\n border: none;\n border-bottom: 3px solid var(--gr-highlight-border-color);\n box-sizing: content-box;\n}\n\n.highlight > .underline {\n position: absolute;\n}\n\n.critical {\n --gr-highlight-color: var(--gr-color-red);\n}\n.clarity {\n --gr-highlight-color: var(--gr-color-blue);\n}\n.engagement {\n --gr-highlight-color: var(--gr-color-green);\n}\n.tone {\n --gr-highlight-color: var(--gr-color-purple);\n}\n.advanced {\n --gr-highlight-color: var(--gr-color-yellow);\n}\n.originality {\n --gr-highlight-color: var(--gr-color-cyan);\n}\n.vox {\n --gr-highlight-color: var(--gr-color-gray);\n}\n";
var css_248z = ".highlight {\n --gr-color-red: 242, 115, 136;\n --gr-color-cyan: 117, 225, 235;\n --gr-color-blue: 121, 168, 242;\n --gr-color-green: 135, 232, 209;\n --gr-color-purple: 189, 121, 237;\n --gr-color-yellow: 255, 201, 64;\n --gr-color-neutral: 159, 166, 191;\n}\n\n.highlight {\n --gr-highlight-color: var(--gr-color-red);\n --gr-highlight-bg-color: transparent;\n --gr-highlight-border-color: rgba(var(--gr-highlight-color), 0.65);\n}\n\n.active,\n.hover,\n.highlight:hover {\n --gr-highlight-bg-color: rgba(var(--gr-highlight-color), 0.25);\n --gr-highlight-border-color: rgba(var(--gr-highlight-color), 1);\n}\n\n.underline {\n transition: background-color ease-in-out 350ms;\n background-color: var(--gr-highlight-bg-color);\n border: none;\n border-bottom: 3px solid var(--gr-highlight-border-color);\n box-sizing: content-box;\n}\n\n.underline:after {\n content: attr(data-id);\n font-size: 8px;\n font-weight: bold;\n}\n\n.highlight > .underline {\n position: absolute;\n}\n\n.critical {\n --gr-highlight-color: var(--gr-color-red);\n}\n.clarity {\n --gr-highlight-color: var(--gr-color-blue);\n}\n.engagement {\n --gr-highlight-color: var(--gr-color-green);\n}\n.tone {\n --gr-highlight-color: var(--gr-color-purple);\n}\n.advanced {\n --gr-highlight-color: var(--gr-color-yellow);\n}\n.originality {\n --gr-highlight-color: var(--gr-color-cyan);\n}\n.vox {\n --gr-highlight-color: var(--gr-color-gray);\n}\n";
function injectCSS(id, css) {

@@ -115,3 +115,3 @@ if (!window.Grammarly) window.Grammarly = { CSS: [] };

const [versionMajor, versionMinor] = "0.10.18".split(".");
const [versionMajor, versionMinor] = "0.11.0".split(".");
async function getGrammarlyModule() {

@@ -118,0 +118,0 @@ return await loadGrammarly({

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

"description": "Grammarly plugin for React + textarea",
"version": "0.10.18",
"version": "0.11.0",
"main": "lib/index.js",

@@ -33,4 +33,4 @@ "module": "lib/index.esm.js",

"devDependencies": {
"@grammarly/plugin-core": "0.10.18",
"@grammarly/plugin-textarea": "0.10.18",
"@grammarly/plugin-core": "0.11.0",
"@grammarly/plugin-textarea": "0.11.0",
"@microsoft/api-extractor": "^7.13.0",

@@ -37,0 +37,0 @@ "@types/jest": "^26.0.14",

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