New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@trackunit/ui-design-tokens

Package Overview
Dependencies
Maintainers
4
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trackunit/ui-design-tokens - npm Package Compare versions

Comparing version 1.0.1 to 1.0.3

13

index.cjs.js

@@ -106,7 +106,6 @@ 'use strict';

const getHEX = (variable) => {
var _a, _b, _c, _d, _e;
const regex = /rgb\(var\((.*?)\) \/ var\(--tw-bg-opacity\)\)/g;
const root = document.documentElement;
const match = regex.exec(variable);
const colorValue = getComputedStyle(root).getPropertyValue((_b = (_a = match === null || match === void 0 ? void 0 : match[1]) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : variable);
const colorValue = getComputedStyle(root).getPropertyValue(match?.[1]?.trim() ?? variable);
const RGB = colorValue

@@ -116,3 +115,3 @@ .trim()

.map(channel => Number(channel));
return rgbToHex((_c = RGB[0]) !== null && _c !== void 0 ? _c : NaN, (_d = RGB[1]) !== null && _d !== void 0 ? _d : NaN, (_e = RGB[2]) !== null && _e !== void 0 ? _e : NaN);
return rgbToHex(RGB[0] ?? NaN, RGB[1] ?? NaN, RGB[2] ?? NaN);
};

@@ -599,9 +598,9 @@

function color(ColorKey, arg2, arg3) {
var _a, _b;
const colorName = themeColors[ColorKey].name;
const colorVariants = themeColors[ColorKey].variants;
// defaultVariant or 600 or the "middel" value available.
const defaultVariant = (_b = (_a = themeColors[ColorKey].defaultVariant) !== null && _a !== void 0 ? _a :
// @ts-ignore - suppressImplicitAnyIndexErrors
(colorVariants[600] && 600)) !== null && _b !== void 0 ? _b : Object.keys(colorVariants)[Math.floor(Object.keys(colorVariants).length / 2)];
const defaultVariant = themeColors[ColorKey].defaultVariant ??
// @ts-ignore - suppressImplicitAnyIndexErrors
(colorVariants[600] && 600) ??
Object.keys(colorVariants)[Math.floor(Object.keys(colorVariants).length / 2)];
let variant = defaultVariant;

@@ -608,0 +607,0 @@ let output = "CSS";

@@ -104,7 +104,6 @@ /**

const getHEX = (variable) => {
var _a, _b, _c, _d, _e;
const regex = /rgb\(var\((.*?)\) \/ var\(--tw-bg-opacity\)\)/g;
const root = document.documentElement;
const match = regex.exec(variable);
const colorValue = getComputedStyle(root).getPropertyValue((_b = (_a = match === null || match === void 0 ? void 0 : match[1]) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : variable);
const colorValue = getComputedStyle(root).getPropertyValue(match?.[1]?.trim() ?? variable);
const RGB = colorValue

@@ -114,3 +113,3 @@ .trim()

.map(channel => Number(channel));
return rgbToHex((_c = RGB[0]) !== null && _c !== void 0 ? _c : NaN, (_d = RGB[1]) !== null && _d !== void 0 ? _d : NaN, (_e = RGB[2]) !== null && _e !== void 0 ? _e : NaN);
return rgbToHex(RGB[0] ?? NaN, RGB[1] ?? NaN, RGB[2] ?? NaN);
};

@@ -597,9 +596,9 @@

function color(ColorKey, arg2, arg3) {
var _a, _b;
const colorName = themeColors[ColorKey].name;
const colorVariants = themeColors[ColorKey].variants;
// defaultVariant or 600 or the "middel" value available.
const defaultVariant = (_b = (_a = themeColors[ColorKey].defaultVariant) !== null && _a !== void 0 ? _a :
// @ts-ignore - suppressImplicitAnyIndexErrors
(colorVariants[600] && 600)) !== null && _b !== void 0 ? _b : Object.keys(colorVariants)[Math.floor(Object.keys(colorVariants).length / 2)];
const defaultVariant = themeColors[ColorKey].defaultVariant ??
// @ts-ignore - suppressImplicitAnyIndexErrors
(colorVariants[600] && 600) ??
Object.keys(colorVariants)[Math.floor(Object.keys(colorVariants).length / 2)];
let variant = defaultVariant;

@@ -606,0 +605,0 @@ let output = "CSS";

{
"name": "@trackunit/ui-design-tokens",
"version": "1.0.1",
"version": "1.0.3",
"repository": "https://github.com/Trackunit/manager",

@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.txt",

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