@yamada-ui/utils
Advanced tools
Comparing version 1.0.4 to 1.0.5-dev-20240208162658
@@ -33,3 +33,4 @@ import { Dict } from './index.types.js'; | ||
declare const hsvTo: ([h, s, v, a]: [number, number, number, number?], fallback?: string) => (format?: ColorFormat) => string | undefined; | ||
declare const sameColor: (color: string | undefined, comparison: string | undefined) => boolean; | ||
export { type ColorFormat, alphaToHex, calcFormat, convertColor, darkenColor, getAlpha, getColor, hslaTo, hsvTo, hues, isAccessible, isDark, isGray, isLight, isTone, lightenColor, parseToHsla, parseToHsv, parseToRgba, randomColor, rgbaTo, shadeColor, tintColor, toneColor, toneColors, transparentizeColor }; | ||
export { type ColorFormat, alphaToHex, calcFormat, convertColor, darkenColor, getAlpha, getColor, hslaTo, hsvTo, hues, isAccessible, isDark, isGray, isLight, isTone, lightenColor, parseToHsla, parseToHsv, parseToRgba, randomColor, rgbaTo, sameColor, shadeColor, tintColor, toneColor, toneColors, transparentizeColor }; |
@@ -53,2 +53,3 @@ "use strict"; | ||
rgbaTo: () => rgbaTo, | ||
sameColor: () => sameColor, | ||
shadeColor: () => shadeColor, | ||
@@ -348,2 +349,12 @@ tintColor: () => tintColor, | ||
}; | ||
var sameColor = (color, comparison) => { | ||
var _a, _b; | ||
if (!color) | ||
return false; | ||
if (!comparison) | ||
return false; | ||
const a = (_a = parseToRgba2(color)) != null ? _a : []; | ||
const b = (_b = parseToRgba2(comparison)) != null ? _b : []; | ||
return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -371,2 +382,3 @@ 0 && (module.exports = { | ||
rgbaTo, | ||
sameColor, | ||
shadeColor, | ||
@@ -373,0 +385,0 @@ tintColor, |
@@ -9,3 +9,3 @@ export { Dict, Length, Merge, Path, Primitive, StringLiteral, Union } from './index.types.js'; | ||
export { Operand, calc } from './calc.js'; | ||
export { ColorFormat, alphaToHex, calcFormat, convertColor, darkenColor, getAlpha, getColor, hslaTo, hsvTo, hues, isAccessible, isDark, isGray, isLight, isTone, lightenColor, parseToHsla, parseToHsv, parseToRgba, randomColor, rgbaTo, shadeColor, tintColor, toneColor, toneColors, transparentizeColor } from './color.js'; | ||
export { ColorFormat, alphaToHex, calcFormat, convertColor, darkenColor, getAlpha, getColor, hslaTo, hsvTo, hues, isAccessible, isDark, isGray, isLight, isTone, lightenColor, parseToHsla, parseToHsv, parseToRgba, randomColor, rgbaTo, sameColor, shadeColor, tintColor, toneColor, toneColors, transparentizeColor } from './color.js'; | ||
export { filterEmpty } from './array.js'; | ||
@@ -12,0 +12,0 @@ export { clampNumber, countDecimal, percentToValue, roundNumberToStep, toPrecision, valueToPercent } from './number.js'; |
@@ -136,2 +136,3 @@ "use strict"; | ||
runIfFunc: () => runIfFunc, | ||
sameColor: () => sameColor, | ||
shadeColor: () => shadeColor, | ||
@@ -892,2 +893,12 @@ splitObject: () => splitObject, | ||
}; | ||
var sameColor = (color, comparison) => { | ||
var _a, _b; | ||
if (!color) | ||
return false; | ||
if (!comparison) | ||
return false; | ||
const a = (_a = parseToRgba2(color)) != null ? _a : []; | ||
const b = (_b = parseToRgba2(comparison)) != null ? _b : []; | ||
return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; | ||
}; | ||
@@ -1075,2 +1086,3 @@ // src/array.ts | ||
runIfFunc, | ||
sameColor, | ||
shadeColor, | ||
@@ -1077,0 +1089,0 @@ splitObject, |
{ | ||
"name": "@yamada-ui/utils", | ||
"version": "1.0.4", | ||
"version": "1.0.5-dev-20240208162658", | ||
"description": "Yamada UI utils", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
365751
4387
1