-
Notifications
You must be signed in to change notification settings - Fork 98
/
definitions.ts
167 lines (150 loc) · 4.07 KB
/
definitions.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
import type { InputAsset } from './input-asset';
export interface Assets {
logo: InputAsset | null;
logoDark: InputAsset | null;
icon: InputAsset | null;
iconForeground: InputAsset | null;
iconBackground: InputAsset | null;
splash: InputAsset | null;
splashDark: InputAsset | null;
iosIcon?: InputAsset | null;
iosSplash?: InputAsset | null;
iosSplashDark?: InputAsset | null;
androidIcon?: InputAsset | null;
androidIconForeground?: InputAsset | null;
androidIconBackground?: InputAsset | null;
androidSplash?: InputAsset | null;
androidSplashDark?: InputAsset | null;
androidNotificationIcon?: InputAsset | null;
pwaIcon?: InputAsset | null;
pwaSplash?: InputAsset | null;
pwaSplashDark?: InputAsset | null;
}
export const enum AssetKind {
Logo = 'logo',
LogoDark = 'logo-dark',
AdaptiveIcon = 'adaptive-icon',
Icon = 'icon',
IconForeground = 'icon-foreground',
IconBackground = 'icon-background',
NotificationIcon = 'notification-icon',
Splash = 'splash',
SplashDark = 'splash-dark',
}
export const enum Platform {
Any = 'any',
Ios = 'ios',
Android = 'android',
Pwa = 'pwa',
// Windows = 'windows'
}
export const enum Format {
Png = 'png',
Jpeg = 'jpeg',
Svg = 'svg',
WebP = 'webp',
Unknown = 'unknown',
}
export const enum Orientation {
Default = '',
Portrait = 'portrait',
Landscape = 'landscape',
}
export const enum Theme {
Any = 'any',
Light = 'light',
Dark = 'dark',
}
export const enum AndroidDensity {
Default = '',
Ldpi = 'ldpi',
Mdpi = 'mdpi',
Hdpi = 'hdpi',
Xhdpi = 'xhdpi',
Xxhdpi = 'xxhdpi',
Xxxhdpi = 'xxxhdpi',
LandLdpi = 'land-ldpi',
LandMdpi = 'land-mdpi',
LandHdpi = 'land-hdpi',
LandXhdpi = 'land-xhdpi',
LandXxhdpi = 'land-xxhdpi',
LandXxxhdpi = 'land-xxxhdpi',
PortLdpi = 'port-ldpi',
PortMdpi = 'port-mdpi',
PortHdpi = 'port-hdpi',
PortXhdpi = 'port-xhdpi',
PortXxhdpi = 'port-xxhdpi',
PortXxxhdpi = 'port-xxxhdpi',
DefaultNight = 'night',
LdpiNight = 'night-ldpi',
MdpiNight = 'night-mdpi',
HdpiNight = 'night-hdpi',
XhdpiNight = 'night-xhdpi',
XxhdpiNight = 'night-xxhdpi',
XxxhdpiNight = 'night-xxxhdpi',
LandLdpiNight = 'land-night-ldpi',
LandMdpiNight = 'land-night-mdpi',
LandHdpiNight = 'land-night-hdpi',
LandXhdpiNight = 'land-night-xhdpi',
LandXxhdpiNight = 'land-night-xxhdpi',
LandXxxhdpiNight = 'land-night-xxxhdpi',
PortLdpiNight = 'port-night-ldpi',
PortMdpiNight = 'port-night-mdpi',
PortHdpiNight = 'port-night-hdpi',
PortXhdpiNight = 'port-night-xhdpi',
PortXxhdpiNight = 'port-night-xxhdpi',
PortXxxhdpiNight = 'port-night-xxxhdpi',
}
export interface OutputAssetTemplate {
platform: Platform;
kind: AssetKind;
format: Format;
width: number;
height: number;
scale?: number;
}
export interface IosOutputAssetTemplate extends OutputAssetTemplate {
name: string;
idiom: IosIdiom;
}
// https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/ImageSetType.html#//apple_ref/doc/uid/TP40015170-CH25-SW2
export const enum IosIdiom {
Universal = 'universal',
iPhone = 'iphone',
iPad = 'ipad',
Watch = 'watch',
TV = 'tv',
}
export type IosOutputAssetTemplateIcon = IosOutputAssetTemplate;
export interface IosOutputAssetTemplateSplash extends IosOutputAssetTemplate {
orientation: Orientation;
theme: Theme;
}
export interface PwaOutputAssetTemplate extends OutputAssetTemplate {
name: string;
orientation?: Orientation;
density?: string;
}
export interface AndroidOutputAssetTemplate extends OutputAssetTemplate {
density: AndroidDensity;
}
export interface AndroidOutputAssetTemplateSplash extends OutputAssetTemplate {
density: AndroidDensity;
orientation: Orientation;
}
export interface AndroidOutputAssetTemplateAdaptiveIcon extends OutputAssetTemplate {
density: AndroidDensity;
}
// Shape of the Contents.json file inside of ios app appiconset and imageset folders
export interface IosContents {
images: {
filename: string;
size: string;
scale: string;
idiom: string;
}[];
info?: {
version: number;
author: string;
};
}