@rfkit/charts 1.12.0 → 1.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rfkit/charts",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "type": "module",
5
5
  "description": "Chart components for wireless monitoring web applications",
6
6
  "exports": {
@@ -0,0 +1,36 @@
1
+ export interface RgbaColor {
2
+ r: number;
3
+ g: number;
4
+ b: number;
5
+ a: number;
6
+ }
7
+ type ColorMixTone = 'dark' | 'light';
8
+ interface AlphaMixDefinition {
9
+ name: string;
10
+ base: string;
11
+ weight: number;
12
+ mode: 'alpha';
13
+ }
14
+ interface SolidMixDefinition {
15
+ name: string;
16
+ base: string;
17
+ second: string;
18
+ weight: number;
19
+ mode: 'mix';
20
+ space: 'srgb' | 'oklab';
21
+ fallback?: string;
22
+ }
23
+ export type ColorMixDefinition = AlphaMixDefinition | SolidMixDefinition;
24
+ export declare const COLOR_MIX_DEFINITIONS: ColorMixDefinition[];
25
+ interface ThemeVariableDefinitionLike {
26
+ name: string;
27
+ dark: string;
28
+ light: string;
29
+ }
30
+ export declare const parseThemeColor: (value: string) => RgbaColor | null;
31
+ export declare const mixThemeColors: (foreground: RgbaColor, background: RgbaColor, weight: number) => RgbaColor;
32
+ export declare const mixOklabColors: (foreground: RgbaColor, background: RgbaColor, weight: number) => RgbaColor;
33
+ export declare const toRgbCss: (color: RgbaColor) => string;
34
+ export declare const toRgbaCss: (color: RgbaColor) => string;
35
+ export declare const buildColorMixDeclarations: (configs: ThemeVariableDefinitionLike[], tone: ColorMixTone) => string;
36
+ export {};