@muraldevkit/ui-toolkit 4.62.1 → 4.63.0-dev-VRgs.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.
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
type RgbTuple = [number, number, number];
|
|
2
|
+
/**
|
|
3
|
+
* Returns `true` when the input is a valid `#rgb` or `#rrggbb` CSS color string.
|
|
4
|
+
* @param {string} color CSS-like hex color string
|
|
5
|
+
* @returns {boolean} whether the string is a valid hex color
|
|
6
|
+
*/
|
|
7
|
+
export declare const isValidHexColor: (color: string) => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Returns `true` when the input is a valid `rgb(r, g, b)` CSS color string.
|
|
10
|
+
* @param {string} color CSS-like rgb color string
|
|
11
|
+
* @returns {boolean} whether the string is a valid rgb color
|
|
12
|
+
*/
|
|
13
|
+
export declare const isValidRgbString: (color: string) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Returns `true` when the input is a valid `rgba(r, g, b, a)` CSS color string.
|
|
16
|
+
* @param {string} color CSS-like rgba color string
|
|
17
|
+
* @returns {boolean} whether the string is a valid rgba color
|
|
18
|
+
*/
|
|
19
|
+
export declare const isValidRgbaString: (color: string) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Converts a valid hex color string to its `[r, g, b]` tuple representation.
|
|
22
|
+
* @param {string} hexColor valid hex color string
|
|
23
|
+
* @returns {RgbTuple} rgb tuple representation of the color
|
|
24
|
+
*/
|
|
25
|
+
export declare const hexToRgb: (hexColor: string) => RgbTuple;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the preferred text token for a background color using the same luminance threshold
|
|
28
|
+
* and alpha handling as the previous `@tactivos/mural-shared` helper.
|
|
29
|
+
* @param {string} backgroundColor background color to evaluate
|
|
30
|
+
* @param {string} blackTextColor token returned for light/transparent backgrounds
|
|
31
|
+
* @param {string} whiteTextColor token returned for dark backgrounds
|
|
32
|
+
* @returns {string} selected text token
|
|
33
|
+
*/
|
|
34
|
+
export declare const stickyTextColor: <T extends string>(backgroundColor: string, blackTextColor: T, whiteTextColor: T) => T;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './colors';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muraldevkit/ui-toolkit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.63.0-dev-VRgs.1",
|
|
4
4
|
"description": "Mural's UI Toolkit",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
},
|
|
42
42
|
"license": "https://www.mural.co/terms/developer-addendum",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@tactivos/mural-shared": "2.8.0",
|
|
45
44
|
"lottie-web": "^5.9.6"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|