@projectwallace/css-design-tokens 0.9.0 → 0.11.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.
- package/dist/css-design-tokens.js +1393 -319
- package/dist/destructure-line-height.d.ts +1 -5
- package/dist/index.d.ts +1 -0
- package/dist/types.d.ts +7 -2
- package/package.json +6 -7
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
value: number;
|
|
3
|
-
unit: string;
|
|
4
|
-
};
|
|
1
|
+
import { Length } from './types';
|
|
5
2
|
/**
|
|
6
3
|
* @description Destructure a line-height from a string
|
|
7
4
|
* The line-height property is specified as any one of the following:
|
|
@@ -11,4 +8,3 @@ type Length = {
|
|
|
11
8
|
* - the keyword `normal`.
|
|
12
9
|
*/
|
|
13
10
|
export declare function destructure_line_height(value: string): Length | number | null;
|
|
14
|
-
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CubicBezierToken, DimensionToken, DurationToken, FontFamilyToken, NumberToken, UnparsedToken, ColorToken, CssAnalysis, ShadowToken } from './types.js';
|
|
2
|
+
export { color_to_token } from './colors.js';
|
|
2
3
|
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
4
|
export type { CssLength, ShadowValue } from './destructure-box-shadow.js';
|
|
4
5
|
export declare function css_to_tokens(css: string): Tokens;
|
package/dist/types.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ export type BaseToken = {
|
|
|
11
11
|
[EXTENSION_USAGE_COUNT]: number;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
+
export type Unit = 'rem' | 'px';
|
|
15
|
+
export type Length = {
|
|
16
|
+
value: number;
|
|
17
|
+
unit: Unit;
|
|
18
|
+
};
|
|
14
19
|
export type DurationValue = {
|
|
15
20
|
value: number;
|
|
16
21
|
unit: 'ms';
|
|
@@ -23,7 +28,7 @@ export type UnparsedToken = BaseToken & {
|
|
|
23
28
|
$value: string;
|
|
24
29
|
$type?: never;
|
|
25
30
|
};
|
|
26
|
-
export type ColorSpace =
|
|
31
|
+
export type ColorSpace = 'srgb' | 'display-p3' | 'hsl' | 'hwb' | 'lab' | 'lch' | 'oklab' | 'oklch' | 'display-p3' | 'a98-rgb' | 'prophoto-rgb' | 'rec2020' | 'xyz-d65' | 'xyz-d50';
|
|
27
32
|
export type ColorComponent = number | 'none';
|
|
28
33
|
export type ColorValue = {
|
|
29
34
|
colorSpace: ColorSpace;
|
|
@@ -40,7 +45,7 @@ export type ColorToken = BaseToken & {
|
|
|
40
45
|
};
|
|
41
46
|
export type DimensionValue = {
|
|
42
47
|
value: number;
|
|
43
|
-
unit:
|
|
48
|
+
unit: Unit;
|
|
44
49
|
};
|
|
45
50
|
export type DimensionToken = BaseToken & {
|
|
46
51
|
$type: 'dimension';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectwallace/css-design-tokens",
|
|
3
3
|
"description": "Generate spec-compliant Design Tokens from CSS.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
6
6
|
"author": "Bart Veneman <bart@projectwallace.com>",
|
|
7
7
|
"repository": {
|
|
@@ -34,15 +34,14 @@
|
|
|
34
34
|
"check": "tsc --noEmit"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@projectwallace/css-analyzer": "^
|
|
37
|
+
"@projectwallace/css-analyzer": "^8.0.2",
|
|
38
|
+
"@projectwallace/css-parser": "^0.12.3",
|
|
38
39
|
"color-sorter": "^7.0.0",
|
|
39
|
-
"colorjs.io": "^0.6.
|
|
40
|
-
"css-time-sort": "^3.0.0"
|
|
41
|
-
"css-tree": "^3.1.0"
|
|
40
|
+
"colorjs.io": "^0.6.1",
|
|
41
|
+
"css-time-sort": "^3.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"
|
|
45
|
-
"vite": "^7.0.4",
|
|
44
|
+
"vite": "^7.3.1",
|
|
46
45
|
"vite-plugin-dts": "^4.5.4",
|
|
47
46
|
"vitest": "^3.2.4"
|
|
48
47
|
}
|