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

@livechat/chat-widget-design-tokens

Package Overview
Dependencies
Maintainers
10
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livechat/chat-widget-design-tokens - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

5

dist/chat-widget-design-tokens.cjs.js

@@ -100,6 +100,5 @@ 'use strict';

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {

@@ -111,6 +110,4 @@ if (Object.prototype.hasOwnProperty.call(source, key)) {

}
return target;
};
return _extends.apply(this, arguments);

@@ -117,0 +114,0 @@ }

@@ -96,6 +96,5 @@ import { opacify } from 'polished';

function _extends() {
_extends = Object.assign || function (target) {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {

@@ -107,6 +106,4 @@ if (Object.prototype.hasOwnProperty.call(source, key)) {

}
return target;
};
return _extends.apply(this, arguments);

@@ -113,0 +110,0 @@ }

99

dist/chat-widget-design-tokens.umd.js

@@ -85,3 +85,2 @@ (function (global, factory) {

var source = arguments[i];
for (var key in source) {

@@ -93,6 +92,4 @@ if (Object.prototype.hasOwnProperty.call(source, key)) {

}
return target;
};
return _extends.apply(this, arguments);

@@ -105,3 +102,2 @@ }

}
return self;

@@ -128,3 +124,2 @@ }

};
return _setPrototypeOf(o, p);

@@ -141,3 +136,2 @@ }

if (typeof Proxy === "function") return true;
try {

@@ -164,3 +158,2 @@ Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));

}
return _construct.apply(null, arguments);

@@ -171,20 +164,14 @@ }

var _cache = typeof Map === "function" ? new Map() : undefined;
_wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !_isNativeFunction(Class)) return Class;
if (typeof Class !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class)) return _cache.get(Class);
_cache.set(Class, Wrapper);
}
function Wrapper() {
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class.prototype, {

@@ -200,6 +187,7 @@ constructor: {

};
return _wrapNativeSuper(Class);
}
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
/**

@@ -209,3 +197,2 @@ * Parse errors.md and turn it into a simple hash of code: message

*/
var ERRORS = {

@@ -294,11 +281,8 @@ "1": "Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",

}
var a = args[0];
var b = [];
var c;
for (c = 1; c < args.length; c += 1) {
b.push(args[c]);
}
b.forEach(function (d) {

@@ -315,9 +299,7 @@ a = a.replace(/%[a-z]/, d);

var PolishedError = /*#__PURE__*/function (_Error) {
var PolishedError = /*#__PURE__*/
function (_Error) {
_inheritsLoose(PolishedError, _Error);
function PolishedError(code) {
var _this;
if (process.env.NODE_ENV === 'production') {

@@ -329,20 +311,15 @@ _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/master/src/internalHelpers/errors.md#" + code + " for more information.") || this;

}
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
}
return _assertThisInitialized(_this);
}
return PolishedError;
}( /*#__PURE__*/_wrapNativeSuper(Error));
}( /*#__PURE__*/
_wrapNativeSuper(Error));
function colorToInt(color) {
return Math.round(color * 255);
}
function convertToInt(red, green, blue) {
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
}
function hslToRgb(hue, saturation, lightness, convert) {

@@ -352,3 +329,2 @@ if (convert === void 0) {

}
if (saturation === 0) {

@@ -359,3 +335,2 @@ // achromatic

var huePrime = (hue % 360 + 360) % 360 / 60;

@@ -367,3 +342,2 @@ var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;

var blue = 0;
if (huePrime >= 0 && huePrime < 1) {

@@ -388,3 +362,2 @@ red = chroma;

}
var lightnessModification = lightness - chroma / 2;

@@ -396,3 +369,2 @@ var finalRed = red + lightnessModification;

}
var namedColorMap = {

@@ -551,3 +523,2 @@ aliceblue: 'f0f8ff',

*/
};

@@ -560,3 +531,2 @@

}
var hexRegex = /^#[a-fA-F0-9]{6}$/;

@@ -586,5 +556,3 @@ var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;

}
var normalizedColor = nameToHex(color);
if (normalizedColor.match(hexRegex)) {

@@ -597,3 +565,2 @@ return {

}
if (normalizedColor.match(hexRgbaRegex)) {

@@ -608,3 +575,2 @@ var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));

}
if (normalizedColor.match(reducedHexRegex)) {

@@ -617,6 +583,4 @@ return {

}
if (normalizedColor.match(reducedRgbaHexRegex)) {
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
return {

@@ -629,5 +593,3 @@ red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),

}
var rgbMatched = rgbRegex.exec(normalizedColor);
if (rgbMatched) {

@@ -640,5 +602,3 @@ return {

}
var rgbaMatched = rgbaRegex.exec(normalizedColor);
if (rgbaMatched) {

@@ -652,5 +612,3 @@ return {

}
var hslMatched = hslRegex.exec(normalizedColor);
if (hslMatched) {

@@ -662,7 +620,5 @@ var hue = parseInt("" + hslMatched[1], 10);

var hslRgbMatched = rgbRegex.exec(rgbColorString);
if (!hslRgbMatched) {
throw new PolishedError(4, normalizedColor, rgbColorString);
}
return {

@@ -674,20 +630,12 @@ red: parseInt("" + hslRgbMatched[1], 10),

}
var hslaMatched = hslaRegex.exec(normalizedColor);
if (hslaMatched) {
var _hue = parseInt("" + hslaMatched[1], 10);
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
if (!_hslRgbMatched) {
throw new PolishedError(4, normalizedColor, _rgbColorString);
}
return {

@@ -700,5 +648,5 @@ red: parseInt("" + _hslRgbMatched[1], 10),

}
throw new PolishedError(5);
}
/**

@@ -708,4 +656,2 @@ * Reduces hex values if possible e.g. #ff8866 to #f86

*/
var reduceHexValue = function reduceHexValue(value) {

@@ -715,6 +661,4 @@ if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {

}
return value;
};
function numberToHex(value) {

@@ -724,2 +668,3 @@ var hex = value.toString(16);

}
/**

@@ -748,4 +693,2 @@ * Returns a string value for the color. The returned result is the smallest possible hex notation.

*/
function rgb(value, green, blue) {

@@ -757,5 +700,5 @@ if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {

}
throw new PolishedError(6);
}
/**

@@ -795,4 +738,2 @@ * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.

*/
function rgba(firstValue, secondValue, thirdValue, fourthValue) {

@@ -807,10 +748,9 @@ if (typeof firstValue === 'string' && typeof secondValue === 'number') {

}
throw new PolishedError(7);
}
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line no-redeclare
function curried(f, length, acc) {

@@ -824,3 +764,2 @@ return function fn() {

function curry(f) {

@@ -830,6 +769,6 @@ // eslint-disable-line no-redeclare

}
function guard(lowerBoundary, upperBoundary, value) {
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
}
/**

@@ -867,15 +806,12 @@ * Increases the opacity of a color. Its range for the amount is between 0 to 1.

var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
var colorWithAlpha = _extends({}, parsedColor, {
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
});
return rgba(colorWithAlpha);
} // prettier-ignore
var curriedOpacify = /*#__PURE__*/
curry
/* ::<number | string, string, string> */(opacify);
var curriedOpacify = /*#__PURE__*/curry
/* ::<number | string, string, string> */
(opacify);
var baseShadowColor = 'rgba(0, 0, 0, 0)';

@@ -900,6 +836,5 @@ var xs$1 = "0px 1px 2px " + curriedOpacify(0.1, baseShadowColor);

function _extends$1() {
_extends$1 = Object.assign || function (target) {
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {

@@ -911,6 +846,4 @@ if (Object.prototype.hasOwnProperty.call(source, key)) {

}
return target;
};
return _extends$1.apply(this, arguments);

@@ -917,0 +850,0 @@ }

{
"name": "@livechat/chat-widget-design-tokens",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

@@ -25,7 +25,7 @@ "contributors": [

"devDependencies": {
"@babel/core": "^7.10.5",
"@babel/core": "7.20.7",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-babel": "^5.2.1",

@@ -36,3 +36,3 @@ "@rollup/plugin-node-resolve": "^9.0.0",

"rollup": "^2.27.1",
"typescript": "^3.9.7"
"typescript": "4.9.4"
},

@@ -39,0 +39,0 @@ "scripts": {

@@ -1,7 +0,7 @@

export declare const xs: string;
export declare const sm: string;
export declare const md: string;
export declare const lg: string;
export declare const floating: string;
export declare const outline: string;
export declare const xs: `0px 1px 2px ${string}`;
export declare const sm: `0px 0px 8px ${string}`;
export declare const md: `0px 1px 10px ${string}`;
export declare const lg: `0px 0px 24px ${string}`;
export declare const floating: `0 4px 12px ${string}`;
export declare const outline: "0 0 0 1px #2000F0";
//# sourceMappingURL=boxShadows.d.ts.map
export declare const yellow: {
50: string;
100: string;
500: string;
800: string;
readonly 50: "#FFFAE5";
readonly 100: "#F7C56E";
readonly 500: "#FFD000";
readonly 800: "#3A352C";
};
export declare const red: {
100: string;
500: string;
readonly 100: "#FF7C6B";
readonly 500: "#D93311";
};
export declare const green: {
100: string;
500: string;
readonly 100: "#77Cf9D";
readonly 500: "#268750";
};
export declare const ruby: {
100: string;
500: string;
readonly 100: "#FA6681";
readonly 500: "#E30D34";
};

@@ -22,21 +22,21 @@ export declare const accent = "#2000F0";

export declare const grayscale: {
0: string;
15: string;
25: string;
50: string;
100: string;
200: string;
300: string;
400: string;
500: string;
550: string;
600: string;
700: string;
800: string;
900: string;
readonly 0: "#FFFFFF";
readonly 15: "#F6F6F7";
readonly 25: "#F0F0F0";
readonly 50: "#F8F8F8";
readonly 100: "#E3E3E3";
readonly 200: "#D5D5D5";
readonly 300: "#C0C0C0";
readonly 400: "#B3B3B3";
readonly 500: "#757575";
readonly 550: "#6E6E6E";
readonly 600: "#575757";
readonly 700: "#2E2E2E";
readonly 800: "#252525";
readonly 900: "#111111";
};
export declare const brand: {
orange: string;
black: string;
readonly orange: "#FF5100";
readonly black: "#1B1B20";
};
//# sourceMappingURL=colorPalette.d.ts.map
export declare const light: {
border: string;
divider: string;
error: string;
errorContrast: string;
subtleFeedback: string;
subtleFeedbackContrast: string;
caution: string;
cautionContrast: string;
success: string;
successContrast: string;
primaryTextColor: string;
secondaryTextColor: string;
tertiaryTextColor: string;
surface: string;
surfaceVariant: string;
surfaceInteractive: string;
surfaceInteractivePressed: string;
surfaceDecorative: string;
surfaceFade: string;
hintSurface: string;
floatSurface: string;
pressedElement: string;
notification: string;
notificationContrast: string;
widgetBackground: string;
disabled: string;
disabledContrast: string;
inactiveElement: string;
formIconColor: string;
trademarkFooterText: string;
homescreenBackground: string;
decorations: {
decorOne: string;
decorTwo: string;
decorThree: string;
decorFour: string;
decorFive: string;
readonly border: "#757575";
readonly divider: "#E3E3E3";
readonly error: "#D93311";
readonly errorContrast: "#FFFFFF";
readonly subtleFeedback: "#FFFAE5";
readonly subtleFeedbackContrast: "#111111";
readonly caution: "#FFD000";
readonly cautionContrast: "#111111";
readonly success: "#268750";
readonly successContrast: "#FFFFFF";
readonly primaryTextColor: "#111111";
readonly secondaryTextColor: "#6E6E6E";
readonly tertiaryTextColor: "#B3B3B3";
readonly surface: "#FFFFFF";
readonly surfaceVariant: "#F0F0F0";
readonly surfaceInteractive: "#F8F8F8";
readonly surfaceInteractivePressed: "#575757";
readonly surfaceDecorative: "#E3E3E3";
readonly surfaceFade: "#F6F6F7";
readonly hintSurface: "#252525";
readonly floatSurface: "#FFFFFF";
readonly pressedElement: "#D5D5D5";
readonly notification: "#E30D34";
readonly notificationContrast: "#FFFFFF";
readonly widgetBackground: "#F8F8F8";
readonly disabled: "#E3E3E3";
readonly disabledContrast: "#575757";
readonly inactiveElement: "#C0C0C0";
readonly formIconColor: "#F8F8F8";
readonly trademarkFooterText: "#575757";
readonly homescreenBackground: "#F8F8F8";
readonly decorations: {
readonly decorOne: "#FFDAB9";
readonly decorTwo: "#D9CCFA";
readonly decorThree: "#FACCCC";
readonly decorFour: "#F4F791";
readonly decorFive: "#F1C9FC";
};
yellow: {
50: string;
100: string;
500: string;
800: string;
readonly yellow: {
readonly 50: "#FFFAE5";
readonly 100: "#F7C56E";
readonly 500: "#FFD000";
readonly 800: "#3A352C";
};
red: {
100: string;
500: string;
readonly red: {
readonly 100: "#FF7C6B";
readonly 500: "#D93311";
};
green: {
100: string;
500: string;
readonly green: {
readonly 100: "#77Cf9D";
readonly 500: "#268750";
};
ruby: {
100: string;
500: string;
readonly ruby: {
readonly 100: "#FA6681";
readonly 500: "#E30D34";
};
accent: "#2000F0";
webkitOutline: "#3B99FC";
grayscale: {
0: string;
15: string;
25: string;
50: string;
100: string;
200: string;
300: string;
400: string;
500: string;
550: string;
600: string;
700: string;
800: string;
900: string;
readonly accent: "#2000F0";
readonly webkitOutline: "#3B99FC";
readonly grayscale: {
readonly 0: "#FFFFFF";
readonly 15: "#F6F6F7";
readonly 25: "#F0F0F0";
readonly 50: "#F8F8F8";
readonly 100: "#E3E3E3";
readonly 200: "#D5D5D5";
readonly 300: "#C0C0C0";
readonly 400: "#B3B3B3";
readonly 500: "#757575";
readonly 550: "#6E6E6E";
readonly 600: "#575757";
readonly 700: "#2E2E2E";
readonly 800: "#252525";
readonly 900: "#111111";
};
brand: {
orange: string;
black: string;
readonly brand: {
readonly orange: "#FF5100";
readonly black: "#1B1B20";
};
};
export declare const dark: {
border: string;
divider: string;
error: string;
errorContrast: string;
subtleFeedback: string;
subtleFeedbackContrast: string;
caution: string;
cautionContrast: string;
success: string;
successContrast: string;
primaryTextColor: string;
secondaryTextColor: string;
tertiaryTextColor: string;
surface: string;
surfaceVariant: string;
surfaceInteractive: string;
surfaceInteractivePressed: string;
surfaceDecorative: string;
surfaceFade: string;
hintSurface: string;
floatSurface: string;
pressedElement: string;
notification: string;
notificationContrast: string;
widgetBackground: string;
disabled: string;
disabledContrast: string;
inactiveElement: string;
formIconColor: string;
trademarkFooterText: string;
homescreenBackground: string;
decorations: {
decorOne: string;
decorTwo: string;
decorThree: string;
decorFour: string;
decorFive: string;
readonly border: "#575757";
readonly divider: "#575757";
readonly error: "#FF7C6B";
readonly errorContrast: "#111111";
readonly subtleFeedback: "#3A352C";
readonly subtleFeedbackContrast: "#F7C56E";
readonly caution: "#F7C56E";
readonly cautionContrast: "#111111";
readonly success: "#77Cf9D";
readonly successContrast: "#111111";
readonly primaryTextColor: "#FFFFFF";
readonly secondaryTextColor: "#B3B3B3";
readonly tertiaryTextColor: "#575757";
readonly surface: "#252525";
readonly surfaceVariant: "#2E2E2E";
readonly surfaceInteractive: "#2E2E2E";
readonly surfaceInteractivePressed: "#B3B3B3";
readonly surfaceDecorative: "#2E2E2E";
readonly surfaceFade: "#2E2E2E";
readonly hintSurface: "#6E6E6E";
readonly floatSurface: "#2E2E2E";
readonly pressedElement: "#575757";
readonly notification: "#FA6681";
readonly notificationContrast: "#111111";
readonly widgetBackground: "#111111";
readonly disabled: "#2E2E2E";
readonly disabledContrast: "#757575";
readonly inactiveElement: "#575757";
readonly formIconColor: "#111111";
readonly trademarkFooterText: "#B3B3B3";
readonly homescreenBackground: "#111111";
readonly decorations: {
readonly decorOne: "#D7650F";
readonly decorTwo: "#400CC6";
readonly decorThree: "#AF3C3C";
readonly decorFour: "#ACB125";
readonly decorFive: "#831AA2";
};
yellow: {
50: string;
100: string;
500: string;
800: string;
readonly yellow: {
readonly 50: "#FFFAE5";
readonly 100: "#F7C56E";
readonly 500: "#FFD000";
readonly 800: "#3A352C";
};
red: {
100: string;
500: string;
readonly red: {
readonly 100: "#FF7C6B";
readonly 500: "#D93311";
};
green: {
100: string;
500: string;
readonly green: {
readonly 100: "#77Cf9D";
readonly 500: "#268750";
};
ruby: {
100: string;
500: string;
readonly ruby: {
readonly 100: "#FA6681";
readonly 500: "#E30D34";
};
accent: "#2000F0";
webkitOutline: "#3B99FC";
grayscale: {
0: string;
15: string;
25: string;
50: string;
100: string;
200: string;
300: string;
400: string;
500: string;
550: string;
600: string;
700: string;
800: string;
900: string;
readonly accent: "#2000F0";
readonly webkitOutline: "#3B99FC";
readonly grayscale: {
readonly 0: "#FFFFFF";
readonly 15: "#F6F6F7";
readonly 25: "#F0F0F0";
readonly 50: "#F8F8F8";
readonly 100: "#E3E3E3";
readonly 200: "#D5D5D5";
readonly 300: "#C0C0C0";
readonly 400: "#B3B3B3";
readonly 500: "#757575";
readonly 550: "#6E6E6E";
readonly 600: "#575757";
readonly 700: "#2E2E2E";
readonly 800: "#252525";
readonly 900: "#111111";
};
brand: {
orange: string;
black: string;
readonly brand: {
readonly orange: "#FF5100";
readonly black: "#1B1B20";
};
};
//# sourceMappingURL=colors.d.ts.map
export declare const easings: {
linear: string;
sharp: string;
smooth: string;
swift: string;
spring: string;
readonly linear: "cubic-bezier(0, 0, 1, 1)";
readonly sharp: "cubic-bezier(0.33, 0, 0, 1)";
readonly smooth: "cubic-bezier(0.33, 0, 0.67, 1)";
readonly swift: "cubic-bezier(0.14, 0, 0, 1)";
readonly spring: "cubic-bezier(0.18, 0.89, 0.32, 1.28)";
};
//# sourceMappingURL=transitions.d.ts.map
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