nhb-toolbox 1.9.6 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/colors/Color.d.ts +9 -13
- package/dist/colors/Color.d.ts.map +1 -1
- package/dist/colors/Color.js +16 -28
- package/dist/colors/convert.d.ts +17 -0
- package/dist/colors/convert.d.ts.map +1 -1
- package/dist/colors/convert.js +72 -26
- package/dist/colors/helpers.d.ts +7 -1
- package/dist/colors/helpers.d.ts.map +1 -1
- package/dist/colors/helpers.js +13 -4
- package/dist/colors/types.d.ts +11 -11
- package/dist/colors/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/colors/Color.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AlphaColors, ColorType, Hex6, Hex8, HSL, HSLA, OpacityValue, RGB, RGBA, SolidColors } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* * Class representing a color and its conversions between Hex, RGB, and HSL formats.
|
|
4
|
-
* * It has
|
|
4
|
+
* * It has 1 instance method to apply opacity to `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` color.
|
|
5
|
+
* * It has 6 static methods that can be used to check if a color is in `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` format.
|
|
5
6
|
*
|
|
6
7
|
* @property {Hex} hex - The color in `Hex` format.
|
|
7
8
|
* @property {RGB} rgb - The color in `RGB` format.
|
|
@@ -21,7 +22,7 @@ export declare class Color {
|
|
|
21
22
|
rgb: RGB | RGBA;
|
|
22
23
|
hsl: HSL | HSLA;
|
|
23
24
|
/** - Iterates over the color representations (Hex, RGB, HSL). */
|
|
24
|
-
[Symbol.iterator](): Generator<Hex6 |
|
|
25
|
+
[Symbol.iterator](): Generator<Hex6 | RGB | HSL | Hex8 | RGBA | HSLA, void, unknown>;
|
|
25
26
|
/**
|
|
26
27
|
* * Creates a new Color instance, optionally converting an input color.
|
|
27
28
|
*
|
|
@@ -47,11 +48,6 @@ export declare class Color {
|
|
|
47
48
|
* console.log(alpha75.hex8); // #ff0000bf
|
|
48
49
|
*/
|
|
49
50
|
applyOpacity(opacity: OpacityValue): SolidColors & AlphaColors;
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new Color instance from a hex string
|
|
52
|
-
* @param hex The hex color string
|
|
53
|
-
*/
|
|
54
|
-
static fromHex(hex: string): Color;
|
|
55
51
|
/**
|
|
56
52
|
* @static
|
|
57
53
|
* Checks if a color is in `Hex6` format.
|
|
@@ -59,7 +55,7 @@ export declare class Color {
|
|
|
59
55
|
* @param color Color to check.
|
|
60
56
|
* @returns Boolean: `true` if it's a `Hex6` color, `false` if not.
|
|
61
57
|
*/
|
|
62
|
-
static isHex6(color:
|
|
58
|
+
static isHex6(color: string): color is Hex6;
|
|
63
59
|
/**
|
|
64
60
|
* @static
|
|
65
61
|
* Checks if a color is in `Hex8` format.
|
|
@@ -67,7 +63,7 @@ export declare class Color {
|
|
|
67
63
|
* @param color Color to check.
|
|
68
64
|
* @returns Boolean: `true` if it's a `Hex8` color, `false` if not.
|
|
69
65
|
*/
|
|
70
|
-
static isHex8(color:
|
|
66
|
+
static isHex8(color: string): color is Hex8;
|
|
71
67
|
/**
|
|
72
68
|
* @static
|
|
73
69
|
* Checks if a color is in `RGB` format.
|
|
@@ -75,7 +71,7 @@ export declare class Color {
|
|
|
75
71
|
* @param color Color to check.
|
|
76
72
|
* @returns Boolean: `true` if it's an `RGB` color, `false` if not.
|
|
77
73
|
*/
|
|
78
|
-
static isRGB(color:
|
|
74
|
+
static isRGB(color: string): color is RGB;
|
|
79
75
|
/**
|
|
80
76
|
* @static
|
|
81
77
|
* Checks if a color is in `RGBA` format.
|
|
@@ -83,7 +79,7 @@ export declare class Color {
|
|
|
83
79
|
* @param color Color to check.
|
|
84
80
|
* @returns Boolean: `true` if it's an `RGBA` color, `false` if not.
|
|
85
81
|
*/
|
|
86
|
-
static isRGBA(color:
|
|
82
|
+
static isRGBA(color: string): color is RGBA;
|
|
87
83
|
/**
|
|
88
84
|
* @static
|
|
89
85
|
* Checks if a color is in `HSL` format.
|
|
@@ -91,7 +87,7 @@ export declare class Color {
|
|
|
91
87
|
* @param color Color to check.
|
|
92
88
|
* @returns Boolean: `true` if it's an `HSL` color, `false` if not.
|
|
93
89
|
*/
|
|
94
|
-
static isHSL(color:
|
|
90
|
+
static isHSL(color: string): color is HSL;
|
|
95
91
|
/**
|
|
96
92
|
* @static
|
|
97
93
|
* Checks if a color is in `HSLA` format.
|
|
@@ -99,7 +95,7 @@ export declare class Color {
|
|
|
99
95
|
* @param color Color to check.
|
|
100
96
|
* @returns Boolean: `true` if it's an `HSLA` color, `false` if not.
|
|
101
97
|
*/
|
|
102
|
-
static isHSLA(color:
|
|
98
|
+
static isHSLA(color: string): color is HSLA;
|
|
103
99
|
/**
|
|
104
100
|
* - Converts the given color to all other formats while preserving the original.
|
|
105
101
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../src/colors/Color.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,WAAW,EACX,MAAM,SAAS,CAAC;AAKjB
|
|
1
|
+
{"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../src/colors/Color.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,WAAW,EACX,MAAM,SAAS,CAAC;AAKjB;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,KAAK;IACV,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC;IACjB,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;IAChB,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;IAEvB,iEAAiE;IAChE,CAAC,MAAM,CAAC,QAAQ,CAAC;IAMlB;;;;OAIG;gBACS,SAAS,CAAC,EAAE,SAAS;IAuBjC;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,GAAG,WAAW;IAgC9D;;;;;;OAMG;WACW,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI;IAIlD;;;;;;OAMG;WACW,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI;IAIlD;;;;;;OAMG;WACW,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG;IAIhD;;;;;;OAMG;WACW,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI;IAMlD;;;;;;OAMG;WACW,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG;IAIhD;;;;;;OAMG;WACW,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI;IAMlD;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;CAuB7B"}
|
package/dist/colors/Color.js
CHANGED
|
@@ -8,7 +8,8 @@ const hsl = (0, random_1.generateRandomHSLColor)();
|
|
|
8
8
|
const hexRGB = (0, convert_1.convertColorCode)(hsl);
|
|
9
9
|
/**
|
|
10
10
|
* * Class representing a color and its conversions between Hex, RGB, and HSL formats.
|
|
11
|
-
* * It has
|
|
11
|
+
* * It has 1 instance method to apply opacity to `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` color.
|
|
12
|
+
* * It has 6 static methods that can be used to check if a color is in `Hex`, `Hex8` `RGB`, `RGBA`, `HSL` or `HSLA` format.
|
|
12
13
|
*
|
|
13
14
|
* @property {Hex} hex - The color in `Hex` format.
|
|
14
15
|
* @property {RGB} rgb - The color in `RGB` format.
|
|
@@ -106,19 +107,6 @@ class Color {
|
|
|
106
107
|
hsla: `hsla(${hslValues[0]}, ${hslValues[1]}%, ${hslValues[2]}%, ${alphaDecimal})`,
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Creates a new Color instance from a hex string
|
|
111
|
-
* @param hex The hex color string
|
|
112
|
-
*/
|
|
113
|
-
static fromHex(hex) {
|
|
114
|
-
if (this.isHex6(hex)) {
|
|
115
|
-
return new Color(hex);
|
|
116
|
-
}
|
|
117
|
-
if (this.isHex8(hex)) {
|
|
118
|
-
return new Color(hex);
|
|
119
|
-
}
|
|
120
|
-
throw new Error(`Unrecognized Hex Format: ${hex}`);
|
|
121
|
-
}
|
|
122
110
|
/**
|
|
123
111
|
* @static
|
|
124
112
|
* Checks if a color is in `Hex6` format.
|
|
@@ -147,7 +135,7 @@ class Color {
|
|
|
147
135
|
* @returns Boolean: `true` if it's an `RGB` color, `false` if not.
|
|
148
136
|
*/
|
|
149
137
|
static isRGB(color) {
|
|
150
|
-
return /^rgb\(\d{1,3}
|
|
138
|
+
return /^rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\)$/.test(color);
|
|
151
139
|
}
|
|
152
140
|
/**
|
|
153
141
|
* @static
|
|
@@ -157,7 +145,7 @@ class Color {
|
|
|
157
145
|
* @returns Boolean: `true` if it's an `RGBA` color, `false` if not.
|
|
158
146
|
*/
|
|
159
147
|
static isRGBA(color) {
|
|
160
|
-
return /^rgba\(\d{1,3}
|
|
148
|
+
return /^rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*(0|1|0?\.\d+)\)$/.test(color);
|
|
161
149
|
}
|
|
162
150
|
/**
|
|
163
151
|
* @static
|
|
@@ -167,7 +155,7 @@ class Color {
|
|
|
167
155
|
* @returns Boolean: `true` if it's an `HSL` color, `false` if not.
|
|
168
156
|
*/
|
|
169
157
|
static isHSL(color) {
|
|
170
|
-
return /^hsl\(\d{1,3}
|
|
158
|
+
return /^hsl\(\d{1,3},\s*\d{1,3}%,\s*\d{1,3}%\)$/.test(color);
|
|
171
159
|
}
|
|
172
160
|
/**
|
|
173
161
|
* @static
|
|
@@ -177,7 +165,7 @@ class Color {
|
|
|
177
165
|
* @returns Boolean: `true` if it's an `HSLA` color, `false` if not.
|
|
178
166
|
*/
|
|
179
167
|
static isHSLA(color) {
|
|
180
|
-
return /^hsla\(\d{1,3}
|
|
168
|
+
return /^hsla\(\d{1,3},\s*\d{1,3}%,\s*\d{1,3}%,\s*(0|1|0?\.\d+)\)$/.test(color);
|
|
181
169
|
}
|
|
182
170
|
/**
|
|
183
171
|
* - Converts the given color to all other formats while preserving the original.
|
|
@@ -189,29 +177,29 @@ class Color {
|
|
|
189
177
|
_convertColorToOthers(color) {
|
|
190
178
|
if (Color.isHex6(color)) {
|
|
191
179
|
const { rgb, hsl } = (0, convert_1.convertColorCode)(color);
|
|
192
|
-
return { hex: color, rgb
|
|
180
|
+
return { hex: color, rgb, hsl };
|
|
193
181
|
}
|
|
194
182
|
else if (Color.isRGB(color)) {
|
|
195
183
|
const { hex, hsl } = (0, convert_1.convertColorCode)(color);
|
|
196
|
-
return { hex
|
|
184
|
+
return { hex, rgb: color, hsl };
|
|
197
185
|
}
|
|
198
186
|
else if (Color.isHSL(color)) {
|
|
199
187
|
const { hex, rgb } = (0, convert_1.convertColorCode)(color);
|
|
200
|
-
return { hex
|
|
188
|
+
return { hex, rgb, hsl: color };
|
|
201
189
|
}
|
|
202
190
|
else if (Color.isHex8(color)) {
|
|
203
191
|
const { rgba, hsla } = (0, convert_1.convertColorCode)(color);
|
|
204
|
-
return { hex8: color, rgba
|
|
205
|
-
}
|
|
206
|
-
else if (Color.isHSLA(color)) {
|
|
207
|
-
const { hex8, rgba } = (0, convert_1.convertColorCode)(color);
|
|
208
|
-
return { hex8: hex8, rgba: rgba, hsla: color };
|
|
192
|
+
return { hex8: color, rgba, hsla };
|
|
209
193
|
}
|
|
210
194
|
else if (Color.isRGBA(color)) {
|
|
211
195
|
const { hex8, hsla } = (0, convert_1.convertColorCode)(color);
|
|
212
|
-
return { hex8
|
|
196
|
+
return { hex8, rgba: color, hsla };
|
|
197
|
+
}
|
|
198
|
+
else if (Color.isHSLA(color)) {
|
|
199
|
+
const { hex8, rgba } = (0, convert_1.convertColorCode)(color);
|
|
200
|
+
return { hex8, rgba, hsla: color };
|
|
213
201
|
}
|
|
214
|
-
throw new Error(`Unrecognized Color Format
|
|
202
|
+
throw new Error(`Unrecognized Color Format! ${color}`);
|
|
215
203
|
}
|
|
216
204
|
}
|
|
217
205
|
exports.Color = Color;
|
package/dist/colors/convert.d.ts
CHANGED
|
@@ -96,6 +96,23 @@ export declare const convertRgbaToHsla: (r: number, g: number, b: number, a?: nu
|
|
|
96
96
|
* @returns A string representing the color in RGBA format (e.g., `rgba(255, 0, 0, 0.5)`).
|
|
97
97
|
*/
|
|
98
98
|
export declare const convertHex8ToRgba: (hex8: Hex8) => RGBA;
|
|
99
|
+
/**
|
|
100
|
+
* * Converts HSLA to Hex8 color format, including alpha channel.
|
|
101
|
+
*
|
|
102
|
+
* @param h - The hue component of the HSL color, in degrees (0 to 360).
|
|
103
|
+
* @param s - The saturation component of the HSL color, as a percentage (0 to 100).
|
|
104
|
+
* @param l - The lightness component of the HSL color, as a percentage (0 to 100).
|
|
105
|
+
* @param a - The alpha (opacity) value, in the range 0 to 1.
|
|
106
|
+
* @returns A string representing the color in Hex8 format (e.g., `#658789DF`).
|
|
107
|
+
*/
|
|
108
|
+
export declare const convertHslaToHex8: (h: number, s: number, l: number, a?: number) => Hex8;
|
|
109
|
+
/**
|
|
110
|
+
* * Converts Hex8 to HSLA color format.
|
|
111
|
+
*
|
|
112
|
+
* @param hex - A string representing the color in Hex format (e.g., `#FF0000DE`).
|
|
113
|
+
* @returns A string representing the color in HSLA format..
|
|
114
|
+
*/
|
|
115
|
+
export declare const convertHex8ToHsla: (hex8: Hex8) => HSLA;
|
|
99
116
|
/**
|
|
100
117
|
* * Converts a `Hex` color code to `RGB` and `HSL` formats.
|
|
101
118
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/colors/convert.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/colors/convert.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAGX,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,IAAI,EAEJ,GAAG,EACH,IAAI,EACJ,MAAM,SAAS,CAAC;AAEjB;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,MAAO,MAAM,KAAK,MAAM,KAAK,MAAM,KAAG,GAyBjE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,MAAO,MAAM,KAAK,MAAM,KAAK,MAAM,KAAG,GAkCjE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,MAAO,MAAM,KAAK,MAAM,KAAK,MAAM,KAAG,IAIjE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,IAAI,GAAG,MAAM,KAAG,GAepD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,MAAO,MAAM,KAAK,MAAM,KAAK,MAAM,KAAG,IAOjE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,IAAI,GAAG,MAAM,KAAG,GAgBpD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,MACzB,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,KACP,IAUF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,MAC1B,MAAM,KACN,MAAM,KACN,MAAM,MACN,MAAM,KACP,IAgBF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,MAC1B,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AAE,IAAI,CAAC;CACX,CAAC"}
|
package/dist/colors/convert.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertHex8ToRgba = exports.convertRgbaToHsla = exports.convertHslaToRgba = exports.convertRgbaToHex8 = exports.convertRgbToRgba = exports.convertHexToRgb = exports.convertRgbToHex = exports.convertHexToHsl = exports.convertHslToHex = exports.convertRgbToHsl = exports.convertHslToRgb = void 0;
|
|
3
|
+
exports.convertHex8ToHsla = exports.convertHslaToHex8 = exports.convertHex8ToRgba = exports.convertRgbaToHsla = exports.convertHslaToRgba = exports.convertRgbaToHex8 = exports.convertRgbToRgba = exports.convertHexToRgb = exports.convertRgbToHex = exports.convertHexToHsl = exports.convertHslToHex = exports.convertRgbToHsl = exports.convertHslToRgb = void 0;
|
|
4
4
|
exports.convertColorCode = convertColorCode;
|
|
5
5
|
const helpers_1 = require("./helpers");
|
|
6
6
|
/**
|
|
@@ -152,7 +152,12 @@ exports.convertHexToRgb = convertHexToRgb;
|
|
|
152
152
|
* @returns A string representing the color in RGBA format (e.g., `rgba(255, 0, 0, 0.5)`).
|
|
153
153
|
*/
|
|
154
154
|
const convertRgbToRgba = (r, g, b, a = 1) => {
|
|
155
|
-
|
|
155
|
+
let newAlpha = a;
|
|
156
|
+
if (!(0, helpers_1._isValidAlpha)(a)) {
|
|
157
|
+
newAlpha = 1;
|
|
158
|
+
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
159
|
+
}
|
|
160
|
+
return `rgba(${r}, ${g}, ${b}, ${parseFloat(newAlpha.toFixed(1))})`;
|
|
156
161
|
};
|
|
157
162
|
exports.convertRgbToRgba = convertRgbToRgba;
|
|
158
163
|
/**
|
|
@@ -165,13 +170,13 @@ exports.convertRgbToRgba = convertRgbToRgba;
|
|
|
165
170
|
* @returns A string representing the color in Hex8 format (e.g., `#FF000080`).
|
|
166
171
|
*/
|
|
167
172
|
const convertRgbaToHex8 = (r, g, b, a = 1) => {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
let newAlpha = a;
|
|
174
|
+
if (!(0, helpers_1._isValidAlpha)(a)) {
|
|
175
|
+
newAlpha = 1;
|
|
176
|
+
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
177
|
+
}
|
|
178
|
+
const hex = (0, exports.convertRgbToHex)(r, g, b);
|
|
179
|
+
const alphaHex = (0, helpers_1._convertOpacityToHex)(Math.round(newAlpha * 100));
|
|
175
180
|
return `#${hex}${alphaHex}`;
|
|
176
181
|
};
|
|
177
182
|
exports.convertRgbaToHex8 = convertRgbaToHex8;
|
|
@@ -185,9 +190,14 @@ exports.convertRgbaToHex8 = convertRgbaToHex8;
|
|
|
185
190
|
* @returns A string representing the color in RGBA format (e.g., `rgba(255, 0, 0, 0.5)`).
|
|
186
191
|
*/
|
|
187
192
|
const convertHslaToRgba = (h, s, l, a = 1) => {
|
|
193
|
+
let newAlpha = a;
|
|
194
|
+
if (!(0, helpers_1._isValidAlpha)(a)) {
|
|
195
|
+
newAlpha = 1;
|
|
196
|
+
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
197
|
+
}
|
|
188
198
|
const rgb = (0, exports.convertHslToRgb)(h, s, l);
|
|
189
199
|
const rgbNumbers = (0, helpers_1._extractSolidColorValues)(rgb);
|
|
190
|
-
return (0, exports.convertRgbToRgba)(rgbNumbers[0], rgbNumbers[1], rgbNumbers[2],
|
|
200
|
+
return (0, exports.convertRgbToRgba)(rgbNumbers[0], rgbNumbers[1], rgbNumbers[2], parseFloat(newAlpha.toFixed(1)));
|
|
191
201
|
};
|
|
192
202
|
exports.convertHslaToRgba = convertHslaToRgba;
|
|
193
203
|
/**
|
|
@@ -200,9 +210,14 @@ exports.convertHslaToRgba = convertHslaToRgba;
|
|
|
200
210
|
* @returns A string representing the color in HSLA format (e.g., `hsla(0, 100%, 50%, 0.5)`).
|
|
201
211
|
*/
|
|
202
212
|
const convertRgbaToHsla = (r, g, b, a = 1) => {
|
|
213
|
+
let newAlpha = a;
|
|
214
|
+
if (!(0, helpers_1._isValidAlpha)(a)) {
|
|
215
|
+
newAlpha = 1;
|
|
216
|
+
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
217
|
+
}
|
|
203
218
|
const hsl = (0, exports.convertRgbToHsl)(r, g, b);
|
|
204
219
|
const hslNumbers = (0, helpers_1._extractSolidColorValues)(hsl);
|
|
205
|
-
return `hsla(${hslNumbers[0]}, ${hslNumbers[1]}%, ${hslNumbers[2]}%, ${
|
|
220
|
+
return `hsla(${hslNumbers[0]}, ${hslNumbers[1]}%, ${hslNumbers[2]}%, ${parseFloat(newAlpha.toFixed(1))})`;
|
|
206
221
|
};
|
|
207
222
|
exports.convertRgbaToHsla = convertRgbaToHsla;
|
|
208
223
|
/**
|
|
@@ -217,9 +232,40 @@ const convertHex8ToRgba = (hex8) => {
|
|
|
217
232
|
const g = parseInt(hex.slice(2, 4), 16);
|
|
218
233
|
const b = parseInt(hex.slice(4, 6), 16);
|
|
219
234
|
const a = parseInt(hex.slice(6, 8), 16) / 255;
|
|
220
|
-
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
|
235
|
+
return `rgba(${r}, ${g}, ${b}, ${parseFloat(a.toFixed(1))})`;
|
|
221
236
|
};
|
|
222
237
|
exports.convertHex8ToRgba = convertHex8ToRgba;
|
|
238
|
+
/**
|
|
239
|
+
* * Converts HSLA to Hex8 color format, including alpha channel.
|
|
240
|
+
*
|
|
241
|
+
* @param h - The hue component of the HSL color, in degrees (0 to 360).
|
|
242
|
+
* @param s - The saturation component of the HSL color, as a percentage (0 to 100).
|
|
243
|
+
* @param l - The lightness component of the HSL color, as a percentage (0 to 100).
|
|
244
|
+
* @param a - The alpha (opacity) value, in the range 0 to 1.
|
|
245
|
+
* @returns A string representing the color in Hex8 format (e.g., `#658789DF`).
|
|
246
|
+
*/
|
|
247
|
+
const convertHslaToHex8 = (h, s, l, a = 1) => {
|
|
248
|
+
let newAlpha = a;
|
|
249
|
+
if (!(0, helpers_1._isValidAlpha)(a)) {
|
|
250
|
+
newAlpha = 1;
|
|
251
|
+
console.warn(`Alpha value must be between 0-1, ${a} converted to 1!`);
|
|
252
|
+
}
|
|
253
|
+
const hex = (0, exports.convertHslToHex)(h, s, l);
|
|
254
|
+
const alphaHex = (0, helpers_1._convertOpacityToHex)(Math.round(newAlpha * 100));
|
|
255
|
+
return `#${hex}${alphaHex}`;
|
|
256
|
+
};
|
|
257
|
+
exports.convertHslaToHex8 = convertHslaToHex8;
|
|
258
|
+
/**
|
|
259
|
+
* * Converts Hex8 to HSLA color format.
|
|
260
|
+
*
|
|
261
|
+
* @param hex - A string representing the color in Hex format (e.g., `#FF0000DE`).
|
|
262
|
+
* @returns A string representing the color in HSLA format..
|
|
263
|
+
*/
|
|
264
|
+
const convertHex8ToHsla = (hex8) => {
|
|
265
|
+
const rgba = (0, exports.convertHex8ToRgba)(hex8);
|
|
266
|
+
return (0, exports.convertRgbaToHsla)(...(0, helpers_1._extractAlphaColorValues)(rgba));
|
|
267
|
+
};
|
|
268
|
+
exports.convertHex8ToHsla = convertHex8ToHsla;
|
|
223
269
|
/**
|
|
224
270
|
* * Converts a color from `Hex`, `RGB`, or `HSL` format to its equivalent representations.
|
|
225
271
|
*
|
|
@@ -235,38 +281,38 @@ function convertColorCode(color) {
|
|
|
235
281
|
};
|
|
236
282
|
}
|
|
237
283
|
if ((0, helpers_1._isRGB)(color)) {
|
|
284
|
+
const rgbValues = (0, helpers_1._extractSolidColorValues)(color);
|
|
238
285
|
return {
|
|
239
|
-
hex: (0, exports.convertRgbToHex)(...
|
|
240
|
-
hsl: (0, exports.convertRgbToHsl)(...
|
|
286
|
+
hex: (0, exports.convertRgbToHex)(...rgbValues),
|
|
287
|
+
hsl: (0, exports.convertRgbToHsl)(...rgbValues),
|
|
241
288
|
};
|
|
242
289
|
}
|
|
243
290
|
if ((0, helpers_1._isHSL)(color)) {
|
|
291
|
+
const hslValues = (0, helpers_1._extractSolidColorValues)(color);
|
|
244
292
|
return {
|
|
245
|
-
hex: (0, exports.convertHslToHex)(...
|
|
246
|
-
rgb: (0, exports.convertHslToRgb)(...
|
|
293
|
+
hex: (0, exports.convertHslToHex)(...hslValues),
|
|
294
|
+
rgb: (0, exports.convertHslToRgb)(...hslValues),
|
|
247
295
|
};
|
|
248
296
|
}
|
|
249
297
|
if ((0, helpers_1._isHex8)(color)) {
|
|
250
|
-
const rgba = (0, exports.convertHex8ToRgba)(color);
|
|
251
298
|
return {
|
|
252
|
-
rgba:
|
|
253
|
-
hsla: (0, exports.
|
|
299
|
+
rgba: (0, exports.convertHex8ToRgba)(color),
|
|
300
|
+
hsla: (0, exports.convertHex8ToHsla)(color),
|
|
254
301
|
};
|
|
255
302
|
}
|
|
256
303
|
if ((0, helpers_1._isRGBA)(color)) {
|
|
304
|
+
const rgbaValues = (0, helpers_1._extractAlphaColorValues)(color);
|
|
257
305
|
return {
|
|
258
|
-
hex8: (0, exports.convertRgbaToHex8)(...
|
|
259
|
-
hsla: (0, exports.convertRgbaToHsla)(...
|
|
306
|
+
hex8: (0, exports.convertRgbaToHex8)(...rgbaValues),
|
|
307
|
+
hsla: (0, exports.convertRgbaToHsla)(...rgbaValues),
|
|
260
308
|
};
|
|
261
309
|
}
|
|
262
310
|
if ((0, helpers_1._isHSLA)(color)) {
|
|
263
311
|
const hslaValues = (0, helpers_1._extractAlphaColorValues)(color);
|
|
264
|
-
const hex = (0, exports.convertHslToHex)(hslaValues[0], hslaValues[1], hslaValues[2]);
|
|
265
|
-
const alphaHex = (0, helpers_1._convertOpacityToHex)(Math.round(hslaValues[3] * 100));
|
|
266
312
|
return {
|
|
267
|
-
hex8:
|
|
268
|
-
rgba: (0, exports.convertHslaToRgba)(...
|
|
313
|
+
hex8: (0, exports.convertHslaToHex8)(...hslaValues),
|
|
314
|
+
rgba: (0, exports.convertHslaToRgba)(...hslaValues),
|
|
269
315
|
};
|
|
270
316
|
}
|
|
271
|
-
throw new Error(`Unrecognized Color Format
|
|
317
|
+
throw new Error(`Unrecognized Color Format! ${color}`);
|
|
272
318
|
}
|
package/dist/colors/helpers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColorNumbers, ColorNumbersAlpha, Hex6, Hex8, HSL, HSLA, OpacityValue, RGB, RGBA } from './types';
|
|
1
|
+
import type { AlphaValue, ColorNumbers, ColorNumbersAlpha, Hex6, Hex8, HSL, HSLA, OpacityValue, RGB, RGBA } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* * Converts opacity percentage (0-100) to a 2-digit hex string.
|
|
4
4
|
*
|
|
@@ -89,4 +89,10 @@ export declare function _isRGBA(color: string): color is RGBA;
|
|
|
89
89
|
* @returns Boolean: `true` if it's an `HSLA` color, `false` if not.
|
|
90
90
|
*/
|
|
91
91
|
export declare function _isHSLA(color: string): color is HSLA;
|
|
92
|
+
/**
|
|
93
|
+
* * Type guard to validate alpha value.
|
|
94
|
+
* @param value Alpha value to check.
|
|
95
|
+
* @returns Boolean: `true` if it's a valid alpha value, `false` if not.
|
|
96
|
+
*/
|
|
97
|
+
export declare function _isValidAlpha(value: number): value is AlphaValue;
|
|
92
98
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/colors/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,iBAAiB,EACjB,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,IAAI,EACJ,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,YAAa,YAAY,KAAG,MAO5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,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AAM,kBAAkB,QAAO,GAKrC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,iBACd,MAAM,EAAE,YACZ,MAAM,KACd,OA2BF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,gBACvB,GAAG,GAAG,GAAG,KACpB,YAIF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,gBACvB,IAAI,GAAG,IAAI,KACtB,iBAIF,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI,CAIpD;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,IAAI,CAIpD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAEhE"}
|
package/dist/colors/helpers.js
CHANGED
|
@@ -7,6 +7,7 @@ exports._isHSL = _isHSL;
|
|
|
7
7
|
exports._isHex8 = _isHex8;
|
|
8
8
|
exports._isRGBA = _isRGBA;
|
|
9
9
|
exports._isHSLA = _isHSLA;
|
|
10
|
+
exports._isValidAlpha = _isValidAlpha;
|
|
10
11
|
/**
|
|
11
12
|
* * Converts opacity percentage (0-100) to a 2-digit hex string.
|
|
12
13
|
*
|
|
@@ -111,7 +112,7 @@ function _isHex6(color) {
|
|
|
111
112
|
* @returns Boolean: `true` if it's an `RGB` color, `false` if not.
|
|
112
113
|
*/
|
|
113
114
|
function _isRGB(color) {
|
|
114
|
-
return /^rgb\(\d{1,3}
|
|
115
|
+
return /^rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\)$/.test(color);
|
|
115
116
|
}
|
|
116
117
|
/**
|
|
117
118
|
* * Checks if a color is in `HSL` format.
|
|
@@ -120,7 +121,7 @@ function _isRGB(color) {
|
|
|
120
121
|
* @returns Boolean: `true` if it's an `HSL` color, `false` if not.
|
|
121
122
|
*/
|
|
122
123
|
function _isHSL(color) {
|
|
123
|
-
return /^hsl\(\d{1,3}
|
|
124
|
+
return /^hsl\(\d{1,3},\s*\d{1,3}%,\s*\d{1,3}%\)$/.test(color);
|
|
124
125
|
}
|
|
125
126
|
/**
|
|
126
127
|
* @static
|
|
@@ -140,7 +141,7 @@ function _isHex8(color) {
|
|
|
140
141
|
* @returns Boolean: `true` if it's an `RGBA` color, `false` if not.
|
|
141
142
|
*/
|
|
142
143
|
function _isRGBA(color) {
|
|
143
|
-
return /^rgba\(\d{1,3}
|
|
144
|
+
return /^rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*(0|1|0?\.\d+)\)$/.test(color);
|
|
144
145
|
}
|
|
145
146
|
/**
|
|
146
147
|
* @static
|
|
@@ -150,5 +151,13 @@ function _isRGBA(color) {
|
|
|
150
151
|
* @returns Boolean: `true` if it's an `HSLA` color, `false` if not.
|
|
151
152
|
*/
|
|
152
153
|
function _isHSLA(color) {
|
|
153
|
-
return /^hsla\(\d{1,3}
|
|
154
|
+
return /^hsla\(\d{1,3},\s*\d{1,3}%,\s*\d{1,3}%,\s*(0|1|0?\.\d+)\)$/.test(color);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* * Type guard to validate alpha value.
|
|
158
|
+
* @param value Alpha value to check.
|
|
159
|
+
* @returns Boolean: `true` if it's a valid alpha value, `false` if not.
|
|
160
|
+
*/
|
|
161
|
+
function _isValidAlpha(value) {
|
|
162
|
+
return value >= 0 && value <= 1 && !isNaN(value);
|
|
154
163
|
}
|
package/dist/colors/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Branded } from '../types';
|
|
1
2
|
/** - A string, number for generating color. */
|
|
2
3
|
export type ColorInput = string | number;
|
|
3
4
|
/** - An array of strings/numbers or nested arrays of strings/numbers for generating colors. */
|
|
@@ -14,9 +15,7 @@ export type Hex = `#${string}`;
|
|
|
14
15
|
* * Represents a hexadecimal color code.
|
|
15
16
|
* * Format: `#3C6945`
|
|
16
17
|
*/
|
|
17
|
-
export type Hex6 =
|
|
18
|
-
__hex6Brand: never;
|
|
19
|
-
};
|
|
18
|
+
export type Hex6 = Branded<`#${string}`, 'Hex6'>;
|
|
20
19
|
/**
|
|
21
20
|
* * Represents an RGB color string.
|
|
22
21
|
* * Format: `rgb(R, G, B)`
|
|
@@ -25,7 +24,7 @@ export type Hex6 = `#${string}` & {
|
|
|
25
24
|
* - G (Green): 0-255
|
|
26
25
|
* - B (Blue): 0-255
|
|
27
26
|
*/
|
|
28
|
-
export type RGB = `rgb(${number}, ${number}, ${number})`;
|
|
27
|
+
export type RGB = `rgb(${number}, ${number}, ${number})` | `rgb(${number},${number},${number})`;
|
|
29
28
|
/**
|
|
30
29
|
* * Represents an HSL color string.
|
|
31
30
|
* * Format: `hsl(H, S%, L%)`
|
|
@@ -34,28 +33,28 @@ export type RGB = `rgb(${number}, ${number}, ${number})`;
|
|
|
34
33
|
* - S (Saturation): 0-100%
|
|
35
34
|
* - L (Lightness): 0-100%
|
|
36
35
|
*/
|
|
37
|
-
export type HSL = `hsl(${number}, ${number}%, ${number}%)`;
|
|
36
|
+
export type HSL = `hsl(${number}, ${number}%, ${number}%)` | `hsl(${number},${number}%,${number}%)`;
|
|
38
37
|
/**
|
|
39
38
|
* * Represents a hexadecimal color code with optional alpha channel.
|
|
40
39
|
* * Format: `#3C6945FF`
|
|
41
40
|
*/
|
|
42
|
-
export type Hex8 =
|
|
43
|
-
__hex8Brand: never;
|
|
44
|
-
};
|
|
41
|
+
export type Hex8 = Branded<`#${string}`, 'Hex8'>;
|
|
45
42
|
/**
|
|
46
43
|
* * Represents an RGBA color string, now includes optional alpha (opacity).
|
|
47
44
|
* * Format: `rgba(R, G, B, A)`
|
|
48
45
|
*/
|
|
49
|
-
export type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
46
|
+
export type RGBA = `rgba(${number}, ${number}, ${number}, ${number})` | `rgba(${number},${number},${number},${number})`;
|
|
50
47
|
/**
|
|
51
48
|
* * Represents an HSLA color string with optional alpha channel.
|
|
52
49
|
* * Format: `hsla(H, S%, L%, A)`
|
|
53
50
|
*/
|
|
54
|
-
export type HSLA = `hsla(${number}, ${number}%, ${number}%, ${number})`;
|
|
51
|
+
export type HSLA = `hsla(${number}, ${number}%, ${number}%, ${number})` | `hsla(${number},${number}%,${number}%,${number})`;
|
|
55
52
|
/** * Union type representing a color in Hex6, RGB, or HSL format. */
|
|
56
53
|
export type ColorTypeSolid = Hex6 | RGB | HSL;
|
|
57
54
|
/** * Union type representing a color in Hex8, RGBA, or HSLA format. */
|
|
58
55
|
export type ColorTypeAlpha = Hex8 | RGBA | HSLA;
|
|
56
|
+
/** * Union of Alpha & Solid `Hex`, `RGB` and `HSL` */
|
|
57
|
+
export type ColorType = Hex | Hex6 | RGB | HSL | Hex8 | RGBA | HSLA;
|
|
59
58
|
/** - Colors Object that includes `Hex8`, `RGBA` and `HSLA` formats of the same color. */
|
|
60
59
|
export interface SolidColors {
|
|
61
60
|
hex: Hex6;
|
|
@@ -68,7 +67,6 @@ export interface AlphaColors {
|
|
|
68
67
|
rgba: RGBA;
|
|
69
68
|
hsla: HSLA;
|
|
70
69
|
}
|
|
71
|
-
export type ColorType = ColorTypeSolid | ColorTypeAlpha | Hex;
|
|
72
70
|
/** * Represents a tuple of three numerical values corresponding to RGB or HSL color components. */
|
|
73
71
|
export type ColorNumbers = [number, number, number];
|
|
74
72
|
/** * Represents a tuple of three numerical values corresponding to RGB or HSL color components. */
|
|
@@ -96,4 +94,6 @@ export interface ConvertedColors<T extends ColorType> extends Record<string, Col
|
|
|
96
94
|
/** - The HSLA representation (excluded if the input is already HSLA). */
|
|
97
95
|
hsla: T extends HSLA | ColorTypeSolid ? never : HSLA;
|
|
98
96
|
}
|
|
97
|
+
/** Represents an alpha value between 0 and 1 */
|
|
98
|
+
export type AlphaValue = Branded<number, 'AlphaValue'>;
|
|
99
99
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/colors/types.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,+FAA+F;AAC/F,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,UAAU,GAAG,eAAe,CAAC;CAAG;AAE/E,wBAAwB;AACxB,MAAM,MAAM,YAAY,GACrB,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,GAAG,CAAC;AAEP;;;GAGG;AACH,MAAM,MAAM,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC;AAE/B;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG,IAAI,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/colors/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,+FAA+F;AAC/F,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,UAAU,GAAG,eAAe,CAAC;CAAG;AAE/E,wBAAwB;AACxB,MAAM,MAAM,YAAY,GACrB,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,E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AE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjE;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,SAAS,CACnD,SAAQ,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IACjC,uEAAuE;IACvE,GAAG,EAAE,CAAC,SAAS,IAAI,GAAG,cAAc,GAAG,KAAK,GAAG,IAAI,CAAC;IACpD,uEAAuE;IACvE,GAAG,EAAE,CAAC,SAAS,GAAG,GAAG,cAAc,GAAG,KAAK,GAAG,GAAG,CAAC;IAClD,uEAAuE;IACvE,GAAG,EAAE,CAAC,SAAS,GAAG,GAAG,cAAc,GAAG,KAAK,GAAG,GAAG,CAAC;IAClD,sFAAsF;IACtF,IAAI,EAAE,CAAC,SAAS,IAAI,GAAG,cAAc,GAAG,KAAK,GAAG,IAAI,CAAC;IACrD,yEAAyE;IACzE,IAAI,EAAE,CAAC,SAAS,IAAI,GAAG,cAAc,GAAG,KAAK,GAAG,IAAI,CAAC;IACrD,yEAAyE;IACzE,IAAI,EAAE,CAAC,SAAS,IAAI,GAAG,cAAc,GAAG,KAAK,GAAG,IAAI,CAAC;CACrD;AAED,gDAAgD;AAChD,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { findPrimeNumbers, isPrime } from './number/prime';
|
|
|
7
7
|
export { getNumbersInRange } from './number/range';
|
|
8
8
|
export { getColorForInitial } from './colors/initials';
|
|
9
9
|
export { generateRandomColorInHexRGB, generateRandomHSLColor, } from './colors/random';
|
|
10
|
-
export { convertColorCode, convertHex8ToRgba, convertHexToHsl, convertHexToRgb, convertHslaToRgba, convertHslToHex, convertHslToRgb, convertRgbaToHex8, convertRgbaToHsla, convertRgbToHex, convertRgbToHsl, convertRgbToRgba, } from './colors/convert';
|
|
10
|
+
export { convertColorCode, convertHex8ToHsla, convertHex8ToRgba, convertHexToHsl, convertHexToRgb, convertHslaToHex8, convertHslaToRgba, convertHslToHex, convertHslToRgb, convertRgbaToHex8, convertRgbaToHsla, convertRgbToHex, convertRgbToHsl, convertRgbToRgba, } from './colors/convert';
|
|
11
11
|
export { Color } from './colors/Color';
|
|
12
12
|
export { filterArrayOfObjects, flattenArray, isValidButEmptyArray, shuffleArray, } from './array/basics';
|
|
13
13
|
export { sortAnArray } from './array/sort';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,cAAc,GACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EACN,2BAA2B,EAC3B,sBAAsB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EACN,oBAAoB,EACpB,YAAY,EACZ,oBAAoB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vD,OAAO,EACN,2BAA2B,EAC3B,sBAAsB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,gBAAgB,GAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EACN,oBAAoB,EACpB,YAAY,EACZ,oBAAoB,EACpB,YAAY,GACZ,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EACN,kBAAkB,EAClB,yBAAyB,GACzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,QAAQ,GACR,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,gBAAgB,EAChB,0BAA0B,EAC1B,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,YAAY,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.isDeepEqual = exports.convertArrayToString = exports.convertObjectValues = void 0;
|
|
3
|
+
exports.mergeAndFlattenObjects = exports.flattenObject = exports.extractUpdatedFields = exports.extractUpdatedAndNewFields = exports.extractNewFields = exports.isObject = exports.isEmptyObject = exports.generateQueryParams = exports.countObjectFields = exports.cloneObject = exports.createControlledFormData = exports.isEmptyFormData = exports.convertIntoFormData = exports.removeDuplicatesFromArray = exports.createOptionsArray = exports.sortAnArray = exports.shuffleArray = exports.isValidButEmptyArray = exports.flattenArray = exports.filterArrayOfObjects = exports.Color = exports.convertRgbToRgba = exports.convertRgbToHsl = exports.convertRgbToHex = exports.convertRgbaToHsla = exports.convertRgbaToHex8 = exports.convertHslToRgb = exports.convertHslToHex = exports.convertHslaToRgba = exports.convertHslaToHex8 = exports.convertHexToRgb = exports.convertHexToHsl = exports.convertHex8ToRgba = exports.convertHex8ToHsla = exports.convertColorCode = exports.generateRandomHSLColor = exports.generateRandomColorInHexRGB = exports.getColorForInitial = exports.getNumbersInRange = exports.isPrime = exports.findPrimeNumbers = exports.numberToWords = exports.getRandomNumber = exports.convertToDecimal = exports.convertStringCase = exports.generateAnagrams = exports.truncateString = exports.trimString = exports.generateRandomID = exports.capitalizeString = void 0;
|
|
4
|
+
exports.isDeepEqual = exports.convertArrayToString = exports.convertObjectValues = exports.sanitizeData = exports.mergeObjects = void 0;
|
|
5
5
|
var basics_1 = require("./string/basics");
|
|
6
6
|
Object.defineProperty(exports, "capitalizeString", { enumerable: true, get: function () { return basics_1.capitalizeString; } });
|
|
7
7
|
Object.defineProperty(exports, "generateRandomID", { enumerable: true, get: function () { return basics_1.generateRandomID; } });
|
|
@@ -28,9 +28,11 @@ Object.defineProperty(exports, "generateRandomColorInHexRGB", { enumerable: true
|
|
|
28
28
|
Object.defineProperty(exports, "generateRandomHSLColor", { enumerable: true, get: function () { return random_1.generateRandomHSLColor; } });
|
|
29
29
|
var convert_3 = require("./colors/convert");
|
|
30
30
|
Object.defineProperty(exports, "convertColorCode", { enumerable: true, get: function () { return convert_3.convertColorCode; } });
|
|
31
|
+
Object.defineProperty(exports, "convertHex8ToHsla", { enumerable: true, get: function () { return convert_3.convertHex8ToHsla; } });
|
|
31
32
|
Object.defineProperty(exports, "convertHex8ToRgba", { enumerable: true, get: function () { return convert_3.convertHex8ToRgba; } });
|
|
32
33
|
Object.defineProperty(exports, "convertHexToHsl", { enumerable: true, get: function () { return convert_3.convertHexToHsl; } });
|
|
33
34
|
Object.defineProperty(exports, "convertHexToRgb", { enumerable: true, get: function () { return convert_3.convertHexToRgb; } });
|
|
35
|
+
Object.defineProperty(exports, "convertHslaToHex8", { enumerable: true, get: function () { return convert_3.convertHslaToHex8; } });
|
|
34
36
|
Object.defineProperty(exports, "convertHslaToRgba", { enumerable: true, get: function () { return convert_3.convertHslaToRgba; } });
|
|
35
37
|
Object.defineProperty(exports, "convertHslToHex", { enumerable: true, get: function () { return convert_3.convertHslToHex; } });
|
|
36
38
|
Object.defineProperty(exports, "convertHslToRgb", { enumerable: true, get: function () { return convert_3.convertHslToRgb; } });
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
/** Uncontrolled any to use for edge cases */
|
|
2
2
|
export type UncontrolledAny = any;
|
|
3
|
+
declare const __brand: unique symbol;
|
|
4
|
+
type Brand<B> = {
|
|
5
|
+
[__brand]: B;
|
|
6
|
+
};
|
|
7
|
+
/** Create a branded type. */
|
|
8
|
+
export type Branded<T, B> = T & Brand<B>;
|
|
9
|
+
export {};
|
|
3
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC;AAElC,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,KAAK,KAAK,CAAC,CAAC,IAAI;IAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC;AAEjC,6BAA6B;AAC7B,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED