Comparing version 0.1.31 to 0.1.32
@@ -37,2 +37,6 @@ export declare type RGBA = [number, number, number, number]; | ||
export declare function getAlphaString(base: string | RGB | RGBA): string; | ||
export declare function roundAlpha(value: number | string): number; | ||
export declare function roundDeg(value: number | string): number; | ||
export declare function roundChannel(value: number | string): number; | ||
export declare function roundPercent(value: number | string): number; | ||
export declare function toRgbString(base: string | RGB | RGBA): string; | ||
@@ -39,0 +43,0 @@ export declare function toRgbaString(base: RGBA | RGB): string; |
@@ -168,3 +168,3 @@ import colors from './colors'; | ||
} | ||
function roundAlpha(value) { | ||
export function roundAlpha(value) { | ||
const v = Math.round(Number(value) * 100) / 100; | ||
@@ -177,3 +177,3 @@ if (v > 1) | ||
} | ||
function roundDeg(value) { | ||
export function roundDeg(value) { | ||
const v = Math.round(Number(value)); | ||
@@ -186,3 +186,3 @@ if (v >= 360) | ||
} | ||
function roundChannel(value) { | ||
export function roundChannel(value) { | ||
const v = Math.round(Number(value)); | ||
@@ -195,3 +195,3 @@ if (v > 255) | ||
} | ||
function roundPercent(value) { | ||
export function roundPercent(value) { | ||
const v = Math.round(Number(value)); | ||
@@ -198,0 +198,0 @@ if (v > 100) |
@@ -7,3 +7,3 @@ export { beforeNextFrameOnce } from './animation/next-frame-once'; | ||
export { depx, pxfy, getPadding, getMargin, getGap, parseResponsiveProp, parseResponsivePropValue, Position, Margin } from './css'; | ||
export { changeColor, rgba, composite, scaleColor, getAlphaString, getAlpha, hsv2hsl, hsl2hsv, hsv2rgb, rgb2hsv, rgb2hsl, hsl2rgb, hsla, hsva, toHslString, toHslaString, toHsvString, toHsvaString, toRgbaString, toRgbString, toHexaString, toHexString, ChangeColorOptions, ScaleColorOptions, RGB, RGBA, HSL, HSLA, HSV, HSVA } from './color'; | ||
export { changeColor, rgba, composite, scaleColor, getAlphaString, getAlpha, hsv2hsl, hsl2hsv, hsv2rgb, rgb2hsv, rgb2hsl, hsl2rgb, hsla, hsva, toHslString, toHslaString, toHsvString, toHsvaString, toRgbaString, toRgbString, toHexaString, toHexString, roundPercent, roundDeg, roundAlpha, roundChannel, ChangeColorOptions, ScaleColorOptions, RGB, RGBA, HSL, HSLA, HSV, HSVA } from './color'; | ||
export { createId } from './misc/index'; |
@@ -7,3 +7,3 @@ export { beforeNextFrameOnce } from './animation/next-frame-once'; | ||
export { depx, pxfy, getPadding, getMargin, getGap, parseResponsiveProp, parseResponsivePropValue } from './css'; | ||
export { changeColor, rgba, composite, scaleColor, getAlphaString, getAlpha, hsv2hsl, hsl2hsv, hsv2rgb, rgb2hsv, rgb2hsl, hsl2rgb, hsla, hsva, toHslString, toHslaString, toHsvString, toHsvaString, toRgbaString, toRgbString, toHexaString, toHexString } from './color'; | ||
export { changeColor, rgba, composite, scaleColor, getAlphaString, getAlpha, hsv2hsl, hsl2hsv, hsv2rgb, rgb2hsv, rgb2hsl, hsl2rgb, hsla, hsva, toHslString, toHslaString, toHsvString, toHsvaString, toRgbaString, toRgbString, toHexaString, toHexString, roundPercent, roundDeg, roundAlpha, roundChannel } from './color'; | ||
export { createId } from './misc/index'; |
@@ -37,2 +37,6 @@ export declare type RGBA = [number, number, number, number]; | ||
export declare function getAlphaString(base: string | RGB | RGBA): string; | ||
export declare function roundAlpha(value: number | string): number; | ||
export declare function roundDeg(value: number | string): number; | ||
export declare function roundChannel(value: number | string): number; | ||
export declare function roundPercent(value: number | string): number; | ||
export declare function toRgbString(base: string | RGB | RGBA): string; | ||
@@ -39,0 +43,0 @@ export declare function toRgbaString(base: RGBA | RGB): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hsl2rgb = exports.rgb2hsl = exports.rgb2hsv = exports.hsv2rgb = exports.hsv2hsl = exports.hsl2hsv = exports.toHexString = exports.toHexaString = exports.toHslaString = exports.toHslString = exports.toHsvaString = exports.toHsvString = exports.toRgbaString = exports.toRgbString = exports.getAlphaString = exports.getAlpha = exports.scaleColor = exports.changeColor = exports.composite = exports.rgba = exports.hsva = exports.hsla = void 0; | ||
exports.hsl2rgb = exports.rgb2hsl = exports.rgb2hsv = exports.hsv2rgb = exports.hsv2hsl = exports.hsl2hsv = exports.toHexString = exports.toHexaString = exports.toHslaString = exports.toHslString = exports.toHsvaString = exports.toHsvString = exports.toRgbaString = exports.toRgbString = exports.roundPercent = exports.roundChannel = exports.roundDeg = exports.roundAlpha = exports.getAlphaString = exports.getAlpha = exports.scaleColor = exports.changeColor = exports.composite = exports.rgba = exports.hsva = exports.hsla = void 0; | ||
const colors_1 = require("./colors"); | ||
@@ -187,2 +187,3 @@ const prefix = '^\\s*'; | ||
} | ||
exports.roundAlpha = roundAlpha; | ||
function roundDeg(value) { | ||
@@ -196,2 +197,3 @@ const v = Math.round(Number(value)); | ||
} | ||
exports.roundDeg = roundDeg; | ||
function roundChannel(value) { | ||
@@ -205,2 +207,3 @@ const v = Math.round(Number(value)); | ||
} | ||
exports.roundChannel = roundChannel; | ||
function roundPercent(value) { | ||
@@ -214,2 +217,3 @@ const v = Math.round(Number(value)); | ||
} | ||
exports.roundPercent = roundPercent; | ||
function toRgbString(base) { | ||
@@ -216,0 +220,0 @@ const [r, g, b] = Array.isArray(base) ? base : rgba(base); |
@@ -7,3 +7,3 @@ export { beforeNextFrameOnce } from './animation/next-frame-once'; | ||
export { depx, pxfy, getPadding, getMargin, getGap, parseResponsiveProp, parseResponsivePropValue, Position, Margin } from './css'; | ||
export { changeColor, rgba, composite, scaleColor, getAlphaString, getAlpha, hsv2hsl, hsl2hsv, hsv2rgb, rgb2hsv, rgb2hsl, hsl2rgb, hsla, hsva, toHslString, toHslaString, toHsvString, toHsvaString, toRgbaString, toRgbString, toHexaString, toHexString, ChangeColorOptions, ScaleColorOptions, RGB, RGBA, HSL, HSLA, HSV, HSVA } from './color'; | ||
export { changeColor, rgba, composite, scaleColor, getAlphaString, getAlpha, hsv2hsl, hsl2hsv, hsv2rgb, rgb2hsv, rgb2hsl, hsl2rgb, hsla, hsva, toHslString, toHslaString, toHsvString, toHsvaString, toRgbaString, toRgbString, toHexaString, toHexString, roundPercent, roundDeg, roundAlpha, roundChannel, ChangeColorOptions, ScaleColorOptions, RGB, RGBA, HSL, HSLA, HSV, HSVA } from './color'; | ||
export { createId } from './misc/index'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createId = exports.toHexString = exports.toHexaString = exports.toRgbString = exports.toRgbaString = exports.toHsvaString = exports.toHsvString = exports.toHslaString = exports.toHslString = exports.hsva = exports.hsla = exports.hsl2rgb = exports.rgb2hsl = exports.rgb2hsv = exports.hsv2rgb = exports.hsl2hsv = exports.hsv2hsl = exports.getAlpha = exports.getAlphaString = exports.scaleColor = exports.composite = exports.rgba = exports.changeColor = exports.parseResponsivePropValue = exports.parseResponsiveProp = exports.getGap = exports.getMargin = exports.getPadding = exports.pxfy = exports.depx = exports.happensIn = exports.unwrapElement = exports.getScrollParent = exports.beforeNextFrame = exports.beforeNextFrameOnce = void 0; | ||
exports.createId = exports.roundChannel = exports.roundAlpha = exports.roundDeg = exports.roundPercent = exports.toHexString = exports.toHexaString = exports.toRgbString = exports.toRgbaString = exports.toHsvaString = exports.toHsvString = exports.toHslaString = exports.toHslString = exports.hsva = exports.hsla = exports.hsl2rgb = exports.rgb2hsl = exports.rgb2hsv = exports.hsv2rgb = exports.hsl2hsv = exports.hsv2hsl = exports.getAlpha = exports.getAlphaString = exports.scaleColor = exports.composite = exports.rgba = exports.changeColor = exports.parseResponsivePropValue = exports.parseResponsiveProp = exports.getGap = exports.getMargin = exports.getPadding = exports.pxfy = exports.depx = exports.happensIn = exports.unwrapElement = exports.getScrollParent = exports.beforeNextFrame = exports.beforeNextFrameOnce = void 0; | ||
var next_frame_once_1 = require("./animation/next-frame-once"); | ||
@@ -45,3 +45,7 @@ Object.defineProperty(exports, "beforeNextFrameOnce", { enumerable: true, get: function () { return next_frame_once_1.beforeNextFrameOnce; } }); | ||
Object.defineProperty(exports, "toHexString", { enumerable: true, get: function () { return color_1.toHexString; } }); | ||
Object.defineProperty(exports, "roundPercent", { enumerable: true, get: function () { return color_1.roundPercent; } }); | ||
Object.defineProperty(exports, "roundDeg", { enumerable: true, get: function () { return color_1.roundDeg; } }); | ||
Object.defineProperty(exports, "roundAlpha", { enumerable: true, get: function () { return color_1.roundAlpha; } }); | ||
Object.defineProperty(exports, "roundChannel", { enumerable: true, get: function () { return color_1.roundChannel; } }); | ||
var index_1 = require("./misc/index"); | ||
Object.defineProperty(exports, "createId", { enumerable: true, get: function () { return index_1.createId; } }); |
{ | ||
"name": "seemly", | ||
"version": "0.1.31", | ||
"version": "0.1.32", | ||
"description": "Utils for user interface.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
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
63806
1572