-
-
Notifications
You must be signed in to change notification settings - Fork 136
/
Copy pathstandardToken.d.ts
59 lines (50 loc) · 1.31 KB
/
standardToken.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import type { BlendType } from './valueTypes'
export type customTokenTypes = 'custom-spacing' |
'custom-radius' |
'custom-fontStyle' |
'custom-shadow' |
'custom-transition' |
'custom-stroke' |
'custom-grid' |
'custom-gradient' |
'custom-opacity'
export type StandardTokenTypes = 'string' |
'number' |
'object' |
'array' |
'boolean' |
'null' |
'color' |
'dimension' |
'font' |
customTokenTypes
export type StandardTokenValueType = string | number | Array<any> | Object | Boolean | null
export type StandardCompositeTokenValueType = {
[key: string]: StandardTokenValueType,
}
export type StandardTokenGroup = {
[name: string]: {
description?: string
[name: string | number]: StandardTokenDataInterface | string
}
}
export type pluginExtensionKey = 'org.lukasoppermann.figmaDesignTokens'
export type StandardTokenExtensionsInterface = {
[key: string | pluginExtensionKey]: any | {
styleId?: string,
exportKey?: string,
category?: string,
group?: string,
unit?: string,
}
}
export type StandardTokenDataInterface = {
description?: string,
value: StandardTokenValueType | StandardCompositeTokenValueType,
type: StandardTokenTypes,
blendMode?: BlendType,
extensions?: StandardTokenExtensionsInterface
}
export type StandardTokenInterface = {
name: string
} & StandardTokenDataInterface