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

@draft-js-plugins/counter

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@draft-js-plugins/counter - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

70

lib/index.cjs.js

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

var decodeUnicode = function decodeUnicode(str) {
return punycode__default['default'].ucs2.decode(str);
return punycode__default["default"].ucs2.decode(str);
}; // func to handle unicode characters

@@ -58,4 +58,4 @@

var getClassNames = function getClassNames(count) {
var defaultStyle = clsx__default['default'](theme.counter, className);
var overLimitStyle = clsx__default['default'](theme.counterOverLimit, className);
var defaultStyle = clsx__default["default"](theme.counter, className);
var overLimitStyle = clsx__default["default"](theme.counterOverLimit, className);
return count > limit ? overLimitStyle : defaultStyle;

@@ -66,3 +66,3 @@ };

var classNames = getClassNames(count);
return /*#__PURE__*/React__default['default'].createElement("span", {
return /*#__PURE__*/React__default["default"].createElement("span", {
className: classNames

@@ -73,7 +73,8 @@ }, count);

CharCounter.propTypes = {
theme: PropTypes__default['default'].any,
className: PropTypes__default['default'].any,
store: PropTypes__default['default'].any,
limit: PropTypes__default['default'].any
theme: PropTypes__default["default"].any,
className: PropTypes__default["default"].any,
store: PropTypes__default["default"].any,
limit: PropTypes__default["default"].any
};
var CharCounter$1 = CharCounter;

@@ -99,4 +100,4 @@ var WordCounter = function WordCounter(_ref) {

var getClassNames = function getClassNames(count) {
var defaultStyle = clsx__default['default'](theme.counter, className);
var overLimitStyle = clsx__default['default'](theme.counterOverLimit, className);
var defaultStyle = clsx__default["default"](theme.counter, className);
var overLimitStyle = clsx__default["default"](theme.counterOverLimit, className);
return count > limit ? overLimitStyle : defaultStyle;

@@ -107,3 +108,3 @@ };

var classNames = getClassNames(count);
return /*#__PURE__*/React__default['default'].createElement("span", {
return /*#__PURE__*/React__default["default"].createElement("span", {
className: classNames

@@ -114,5 +115,6 @@ }, count);

WordCounter.propTypes = {
theme: PropTypes__default['default'].any,
limit: PropTypes__default['default'].number
theme: PropTypes__default["default"].any,
limit: PropTypes__default["default"].number
};
var WordCounter$1 = WordCounter;

@@ -132,4 +134,4 @@ var LineCounter = function LineCounter(_ref) {

var getClassNames = function getClassNames(count) {
var defaultStyle = clsx__default['default'](theme.counter, className);
var overLimitStyle = clsx__default['default'](theme.counterOverLimit, className);
var defaultStyle = clsx__default["default"](theme.counter, className);
var overLimitStyle = clsx__default["default"](theme.counterOverLimit, className);
return count > limit ? overLimitStyle : defaultStyle;

@@ -140,3 +142,3 @@ };

var classNames = getClassNames(count);
return /*#__PURE__*/React__default['default'].createElement("span", {
return /*#__PURE__*/React__default["default"].createElement("span", {
className: classNames

@@ -147,7 +149,8 @@ }, count);

LineCounter.propTypes = {
theme: PropTypes__default['default'].any,
store: PropTypes__default['default'].any,
className: PropTypes__default['default'].any,
limit: PropTypes__default['default'].number
theme: PropTypes__default["default"].any,
store: PropTypes__default["default"].any,
className: PropTypes__default["default"].any,
limit: PropTypes__default["default"].number
};
var LineCounter$1 = LineCounter;

@@ -164,4 +167,4 @@ var CustomCounter = function CustomCounter(_ref) {

var getClassNames = function getClassNames(count) {
var defaultStyle = clsx__default['default'](theme.counter, className);
var overLimitStyle = clsx__default['default'](theme.counterOverLimit, className);
var defaultStyle = clsx__default["default"](theme.counter, className);
var overLimitStyle = clsx__default["default"](theme.counterOverLimit, className);
return count > limit ? overLimitStyle : defaultStyle;

@@ -173,3 +176,3 @@ };

var classNames = getClassNames(count);
return /*#__PURE__*/React__default['default'].createElement("span", {
return /*#__PURE__*/React__default["default"].createElement("span", {
className: classNames

@@ -180,8 +183,9 @@ }, count);

CustomCounter.propTypes = {
theme: PropTypes__default['default'].any,
store: PropTypes__default['default'].any,
className: PropTypes__default['default'].any,
limit: PropTypes__default['default'].number,
countFunction: PropTypes__default['default'].func.isRequired
theme: PropTypes__default["default"].any,
store: PropTypes__default["default"].any,
className: PropTypes__default["default"].any,
limit: PropTypes__default["default"].number,
countFunction: PropTypes__default["default"].func.isRequired
};
var CustomCounter$1 = CustomCounter;

@@ -211,3 +215,3 @@ var defaultTheme = {

var DecoratedCharCounter = function DecoratedCharCounter(props) {
return /*#__PURE__*/React__default['default'].createElement(CharCounter, _extends({}, props, {
return /*#__PURE__*/React__default["default"].createElement(CharCounter$1, _extends({}, props, {
theme: theme,

@@ -219,3 +223,3 @@ store: store

var DecoratedWordCounter = function DecoratedWordCounter(props) {
return /*#__PURE__*/React__default['default'].createElement(WordCounter, _extends({}, props, {
return /*#__PURE__*/React__default["default"].createElement(WordCounter$1, _extends({}, props, {
theme: theme,

@@ -227,3 +231,3 @@ store: store

var DecoratedLineCounter = function DecoratedLineCounter(props) {
return /*#__PURE__*/React__default['default'].createElement(LineCounter, _extends({}, props, {
return /*#__PURE__*/React__default["default"].createElement(LineCounter$1, _extends({}, props, {
theme: theme,

@@ -235,3 +239,3 @@ store: store

var DecoratedCustomCounter = function DecoratedCustomCounter(props) {
return /*#__PURE__*/React__default['default'].createElement(CustomCounter, _extends({}, props, {
return /*#__PURE__*/React__default["default"].createElement(CustomCounter$1, _extends({}, props, {
theme: theme,

@@ -256,2 +260,2 @@ store: store

exports.default = index;
exports["default"] = index;

@@ -64,2 +64,3 @@ import React from 'react';

};
var CharCounter$1 = CharCounter;

@@ -101,2 +102,3 @@ var WordCounter = function WordCounter(_ref) {

};
var WordCounter$1 = WordCounter;

@@ -134,2 +136,3 @@ var LineCounter = function LineCounter(_ref) {

};
var LineCounter$1 = LineCounter;

@@ -166,2 +169,3 @@ var CustomCounter = function CustomCounter(_ref) {

};
var CustomCounter$1 = CustomCounter;

@@ -191,3 +195,3 @@ var defaultTheme = {

var DecoratedCharCounter = function DecoratedCharCounter(props) {
return /*#__PURE__*/React.createElement(CharCounter, _extends({}, props, {
return /*#__PURE__*/React.createElement(CharCounter$1, _extends({}, props, {
theme: theme,

@@ -199,3 +203,3 @@ store: store

var DecoratedWordCounter = function DecoratedWordCounter(props) {
return /*#__PURE__*/React.createElement(WordCounter, _extends({}, props, {
return /*#__PURE__*/React.createElement(WordCounter$1, _extends({}, props, {
theme: theme,

@@ -207,3 +211,3 @@ store: store

var DecoratedLineCounter = function DecoratedLineCounter(props) {
return /*#__PURE__*/React.createElement(LineCounter, _extends({}, props, {
return /*#__PURE__*/React.createElement(LineCounter$1, _extends({}, props, {
theme: theme,

@@ -215,3 +219,3 @@ store: store

var DecoratedCustomCounter = function DecoratedCustomCounter(props) {
return /*#__PURE__*/React.createElement(CustomCounter, _extends({}, props, {
return /*#__PURE__*/React.createElement(CustomCounter$1, _extends({}, props, {
theme: theme,

@@ -236,2 +240,2 @@ store: store

export default index;
export { index as default };
{
"name": "@draft-js-plugins/counter",
"version": "4.1.1",
"version": "4.1.2",
"sideEffects": [

@@ -44,3 +44,3 @@ "*.css"

"clsx": "^1.0.4",
"prop-types": "^15.5.8",
"prop-types": "^15.8.1",
"punycode": "^2.0.1"

@@ -50,4 +50,4 @@ },

"draft-js": "^0.10.1 || ^0.11.0",
"react": "^15.5.0 || ^16.0.0 || ^17.0.0",
"react-dom": "^15.5.0 || ^16.0.0 || ^17.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},

@@ -54,0 +54,0 @@ "publishConfig": {

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