feeef 0.7.3 → 0.7.4

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.
@@ -1,17 +1,27 @@
1
1
  /**
2
- * Converts a Dart color (0xffXXXXXX) to a CSS-compatible number (0xXXXXXXFF).
2
+ * Converts a Dart color (AARRGGBB — alpha in high byte) to a CSS-compatible number (RRGGBBAA).
3
+ * Flutter/Dart uses 32-bit color with alpha first; CSS and the editor use alpha last.
3
4
  *
4
- * @param dartColor - The Dart color represented as a 32-bit integer (0xffXXXXXX).
5
- * @returns A number representing the color in CSS format (0xXXXXXXFF).
5
+ * @param dartColor - The Dart color as a 32-bit integer (AARRGGBB).
6
+ * @returns A number in CSS format (0xRRGGBBAA).
6
7
  */
7
8
  export declare const convertDartColorToCssNumber: (dartColor: number) => number;
8
9
  /**
9
- * Converts a CSS color (0xXXXXXXFF) to HSL format.
10
+ * Converts a CSS color number (0xRRGGBBAA) to an HSL component string "h, s%, l%".
10
11
  *
11
- * @param cssColor - The CSS color represented as a 32-bit integer (0xXXXXXXFF).
12
- * @returns An object with HSL values {h, s, l}.
12
+ * @param cssColor - The CSS color as a 32-bit integer (0xRRGGBBAA).
13
+ * @returns A string suitable for hsl(): e.g. "120, 50%, 50%".
13
14
  */
14
15
  export declare const cssColorToHslString: (cssColor: number) => string;
16
+ /**
17
+ * Converts a Dart color (AARRGGBB) from props to a CSS color string for inline styles.
18
+ * Use this for any color prop that comes from the Flutter dashboard (e.g. backgroundColor, color).
19
+ * Raw number must not be used in style — CSS expects a string and byte order differs (Dart: alpha first; CSS: alpha last).
20
+ *
21
+ * @param dartColor - Color from props (Dart AARRGGBB format), or undefined/null.
22
+ * @returns A CSS color string (e.g. "hsl(120, 50%, 50%)") or empty string if no color.
23
+ */
24
+ export declare const dartColorToCssColor: (dartColor: number | null | undefined) => string;
15
25
  /**
16
26
  * Trims and attempts to fix the phone number by:
17
27
  * - Removing all non-numeric characters
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "feeef",
3
3
  "description": "feeef sdk for javascript",
4
- "version": "0.7.3",
4
+ "version": "0.7.4",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
7
7
  "files": [