@streamscloud/kit 0.2.21 → 0.2.22

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.
@@ -2,8 +2,8 @@ export declare class ColorHelper {
2
2
  /**
3
3
  * Normalize a color value to a clean hex string.
4
4
  * - Strips 100% alpha (`#FF0000FF` → `#FF0000`)
5
- * - Returns `''` for transparent / empty / invalid values
6
- * - Preserves partial alpha (`#FF000080` stays as-is)
5
+ * - Returns `''` for empty / invalid values
6
+ * - Preserves partial and zero alpha (`#FF000080`, `#FF000000` stay as-is)
7
7
  */
8
8
  static normalizeHex(value: string | null | undefined): string;
9
9
  /**
@@ -5,8 +5,8 @@ export class ColorHelper {
5
5
  /**
6
6
  * Normalize a color value to a clean hex string.
7
7
  * - Strips 100% alpha (`#FF0000FF` → `#FF0000`)
8
- * - Returns `''` for transparent / empty / invalid values
9
- * - Preserves partial alpha (`#FF000080` stays as-is)
8
+ * - Returns `''` for empty / invalid values
9
+ * - Preserves partial and zero alpha (`#FF000080`, `#FF000000` stay as-is)
10
10
  */
11
11
  static normalizeHex(value) {
12
12
  if (!value) {
@@ -17,9 +17,6 @@ export class ColorHelper {
17
17
  return '';
18
18
  }
19
19
  const alpha = parsed.alpha();
20
- if (alpha === 0) {
21
- return '';
22
- }
23
20
  const hex = parsed.toHex().toUpperCase();
24
21
  if (alpha === 1) {
25
22
  return hex.substring(0, 7);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",