@projectwallace/css-design-tokens 0.11.0 → 0.11.2

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,14 +0,0 @@
1
- import { ColorValue } from './types.js';
2
- export type CssLength = {
3
- value: number;
4
- unit: string;
5
- };
6
- export type ShadowValue = {
7
- color: ColorValue | undefined;
8
- offsetX: CssLength | undefined;
9
- offsetY: CssLength | undefined;
10
- blur: CssLength | undefined;
11
- spread: CssLength | undefined;
12
- inset: boolean | undefined;
13
- };
14
- export declare function destructure_box_shadow(value: string): null | ShadowValue[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import { Easing } from './types.js';
2
- export declare function destructure_easing(easing: string): Easing | null;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import { FontFamilyValue } from './types.js';
2
- export declare function destructure_font_family(value: string): FontFamilyValue | undefined;
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { Length } from './types';
2
- /**
3
- * @description Destructure a line-height from a string
4
- * The line-height property is specified as any one of the following:
5
- * - a `<number>`
6
- * - a `<length>`
7
- * - a `<percentage>`
8
- * - the keyword `normal`.
9
- */
10
- export declare function destructure_line_height(value: string): Length | number | null;
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export declare const color_dict: Map<number, string>;
2
- type AuthoredColor = string;
3
- export declare function group_colors(colors: Record<AuthoredColor, unknown>): [number, string[]][];
4
- export {};
package/dist/hash.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function hash(input: string | undefined | number): string;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- type DesignTokenLength = {
2
- value: number;
3
- unit: 'px' | 'rem';
4
- };
5
- /**
6
- * @description Parse a length from a css value
7
- * - a `<number>`
8
- * - a `<length>`
9
- * - a `<percentage>`
10
- * - the keyword `normal`.
11
- */
12
- export declare function parse_length(value: string): DesignTokenLength | null;
13
- export {};
@@ -1 +0,0 @@
1
- export {};
package/dist/types.d.ts DELETED
@@ -1,70 +0,0 @@
1
- import { analyze } from '@projectwallace/css-analyzer';
2
- import { ShadowValue } from './destructure-box-shadow';
3
- export type CssAnalysis = ReturnType<typeof analyze>;
4
- export declare const EXTENSION_AUTHORED_AS = "com.projectwallace.css-authored-as";
5
- export declare const EXTENSION_USAGE_COUNT = "com.projectwallace.usage-count";
6
- export declare const EXTENSION_CSS_PROPERTIES = "com.projectwallace.css-properties";
7
- export type Easing = [number, number, number, number];
8
- export type BaseToken = {
9
- $extensions: {
10
- [EXTENSION_AUTHORED_AS]: string;
11
- [EXTENSION_USAGE_COUNT]: number;
12
- };
13
- };
14
- export type Unit = 'rem' | 'px';
15
- export type Length = {
16
- value: number;
17
- unit: Unit;
18
- };
19
- export type DurationValue = {
20
- value: number;
21
- unit: 'ms';
22
- };
23
- export type DurationToken = BaseToken & {
24
- $type: 'duration';
25
- $value: DurationValue;
26
- };
27
- export type UnparsedToken = BaseToken & {
28
- $value: string;
29
- $type?: never;
30
- };
31
- export type ColorSpace = 'srgb' | 'display-p3' | 'hsl' | 'hwb' | 'lab' | 'lch' | 'oklab' | 'oklch' | 'display-p3' | 'a98-rgb' | 'prophoto-rgb' | 'rec2020' | 'xyz-d65' | 'xyz-d50';
32
- export type ColorComponent = number | 'none';
33
- export type ColorValue = {
34
- colorSpace: ColorSpace;
35
- components: [ColorComponent, ColorComponent, ColorComponent];
36
- alpha: number;
37
- hex?: string;
38
- };
39
- export type ColorToken = BaseToken & {
40
- $type: 'color';
41
- $value: ColorValue;
42
- $extensions: {
43
- [EXTENSION_CSS_PROPERTIES]: Array<string>;
44
- };
45
- };
46
- export type DimensionValue = {
47
- value: number;
48
- unit: Unit;
49
- };
50
- export type DimensionToken = BaseToken & {
51
- $type: 'dimension';
52
- $value: DimensionValue;
53
- };
54
- export type NumberToken = BaseToken & {
55
- $type: 'number';
56
- $value: number;
57
- };
58
- export type CubicBezierToken = BaseToken & {
59
- $type: 'cubicBezier';
60
- $value: Easing;
61
- };
62
- export type FontFamilyValue = string[];
63
- export type FontFamilyToken = BaseToken & {
64
- $type: 'fontFamily';
65
- $value: FontFamilyValue;
66
- };
67
- export type ShadowToken = BaseToken & {
68
- $type: 'shadow';
69
- $value: ShadowValue | ShadowValue[];
70
- };
package/dist/unquote.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function unquote(input: string): string;
@@ -1 +0,0 @@
1
- export {};