@projectwallace/css-design-tokens 0.8.1 → 0.9.0
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,9 +1,9 @@
|
|
|
1
1
|
import { ColorValue } from './types.js';
|
|
2
|
-
type CssLength = {
|
|
2
|
+
export type CssLength = {
|
|
3
3
|
value: number;
|
|
4
4
|
unit: string;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type ShadowValue = {
|
|
7
7
|
color: ColorValue | undefined;
|
|
8
8
|
offsetX: CssLength | undefined;
|
|
9
9
|
offsetY: CssLength | undefined;
|
|
@@ -11,5 +11,4 @@ export type DestructuredShadow = {
|
|
|
11
11
|
spread: CssLength | undefined;
|
|
12
12
|
inset: boolean | undefined;
|
|
13
13
|
};
|
|
14
|
-
export declare function destructure_box_shadow(value: string): null |
|
|
15
|
-
export {};
|
|
14
|
+
export declare function destructure_box_shadow(value: string): null | ShadowValue[];
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { FontFamilyValue } from './types.js';
|
|
2
|
+
export declare function destructure_font_family(value: string): FontFamilyValue | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { CubicBezierToken, DimensionToken, DurationToken, FontFamilyToken, NumberToken, UnparsedToken, ColorToken, CssAnalysis, ShadowToken } from './types.js';
|
|
2
|
+
export { EXTENSION_AUTHORED_AS, EXTENSION_USAGE_COUNT, EXTENSION_CSS_PROPERTIES, type Easing, type CubicBezierToken, type DimensionValue, type DimensionToken, type DurationToken, type DurationValue, type FontFamilyToken, type NumberToken, type UnparsedToken, type CssAnalysis, type ShadowToken, type ColorSpace, type ColorToken, type ColorValue, type ColorComponent, } from './types.js';
|
|
3
|
+
export type { CssLength, ShadowValue } from './destructure-box-shadow.js';
|
|
2
4
|
export declare function css_to_tokens(css: string): Tokens;
|
|
3
5
|
type TokenID = string;
|
|
4
6
|
export type Tokens = {
|
|
@@ -13,4 +15,3 @@ export type Tokens = {
|
|
|
13
15
|
easing: Record<TokenID, CubicBezierToken | UnparsedToken>;
|
|
14
16
|
};
|
|
15
17
|
export declare function analysis_to_tokens(analysis: CssAnalysis): Tokens;
|
|
16
|
-
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { analyze } from '@projectwallace/css-analyzer';
|
|
2
|
-
import {
|
|
2
|
+
import { ShadowValue } from './destructure-box-shadow';
|
|
3
3
|
export type CssAnalysis = ReturnType<typeof analyze>;
|
|
4
4
|
export declare const EXTENSION_AUTHORED_AS = "com.projectwallace.css-authored-as";
|
|
5
5
|
export declare const EXTENSION_USAGE_COUNT = "com.projectwallace.usage-count";
|
|
@@ -11,7 +11,7 @@ export type BaseToken = {
|
|
|
11
11
|
[EXTENSION_USAGE_COUNT]: number;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
type DurationValue = {
|
|
14
|
+
export type DurationValue = {
|
|
15
15
|
value: number;
|
|
16
16
|
unit: 'ms';
|
|
17
17
|
};
|
|
@@ -23,7 +23,7 @@ export type UnparsedToken = BaseToken & {
|
|
|
23
23
|
$value: string;
|
|
24
24
|
$type?: never;
|
|
25
25
|
};
|
|
26
|
-
type ColorSpace = string | 'srgb' | 'display-p3' | 'hsl' | 'hwb' | 'lab' | 'lch' | 'oklab' | 'oklch' | 'display-p3' | 'a98-rgb' | 'prophoto-rgb' | 'rec2020' | 'xyz-d65' | 'xyz-d50';
|
|
26
|
+
export type ColorSpace = string | 'srgb' | 'display-p3' | 'hsl' | 'hwb' | 'lab' | 'lch' | 'oklab' | 'oklch' | 'display-p3' | 'a98-rgb' | 'prophoto-rgb' | 'rec2020' | 'xyz-d65' | 'xyz-d50';
|
|
27
27
|
export type ColorComponent = number | 'none';
|
|
28
28
|
export type ColorValue = {
|
|
29
29
|
colorSpace: ColorSpace;
|
|
@@ -54,12 +54,12 @@ export type CubicBezierToken = BaseToken & {
|
|
|
54
54
|
$type: 'cubicBezier';
|
|
55
55
|
$value: Easing;
|
|
56
56
|
};
|
|
57
|
+
export type FontFamilyValue = string[];
|
|
57
58
|
export type FontFamilyToken = BaseToken & {
|
|
58
59
|
$type: 'fontFamily';
|
|
59
|
-
$value:
|
|
60
|
+
$value: FontFamilyValue;
|
|
60
61
|
};
|
|
61
62
|
export type ShadowToken = BaseToken & {
|
|
62
63
|
$type: 'shadow';
|
|
63
|
-
$value:
|
|
64
|
+
$value: ShadowValue | ShadowValue[];
|
|
64
65
|
};
|
|
65
|
-
export {};
|
package/package.json
CHANGED