-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcommon.d.ts
60 lines (48 loc) · 1.49 KB
/
common.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
60
import Gradient from "./values/gradient";
declare namespace zesk {
type BackgroundImage = Gradient;
type StyleParams = AllParams | ColorParams | LengthParams;
interface StyleValue {
valueOf(): string;
equals(other: StyleValue);
// TODO: add @zeplin/extension-model types
toStyleValue(params: StyleParams, colorNameResolver: (colorObject: object) => string): string;
}
interface StyleDeclaration {
name: string;
hasDefaultValue?(): boolean;
equals(other: StyleDeclaration): boolean;
// TODO: add @zeplin/extension-model types
toStyleValue(params: StyleParams, colorNameResolver: (colorObject: object) => string): string;
}
interface AllParams {
densityDivisor?: number;
colorFormat?: string;
unitlessLineHeight?: boolean;
}
interface ColorParams {
colorFormat: string;
}
interface RemPreferences {
useForFontSizes: boolean;
useForMeasurements: boolean;
rootFontSize: number;
}
interface LengthParams {
densityDivisor: number;
remPreferences?: RemPreferences;
}
interface LengthOptions {
precision?: number;
useRemUnit?: boolean | ((remPreferences: RemPreferences) => boolean);
useDensityDivisor?: boolean;
}
interface StyleFunction {
fn: string,
args: Array<string | StyleValue>
}
interface VariableMap {
[key: string]: string
}
}
export = zesk;