-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.ts
97 lines (91 loc) · 1.72 KB
/
theme.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
/**
* Theme interface, defining the border and divider characters.
*/
export type Theme = {
/**
* Characters used for the border.
*/
border: Border;
/**
* Characters used for dividers.
*/
divider: Divider;
/**
* Characters used for the spinner.
*/
spinner?: readonly string[];
/**
* Characters used for the head symbol of the input component.
*/
headSymbol?: string;
/**
* Characters used for the fail symbol of the input component.
*/
failSymbol?: string;
/**
* Icon used for the matcher indicator.
*/
matcherIcon?: string;
/**
* Icon used for the sorter indicator.
*/
sorterIcon?: string;
/**
* Icon used for the renderer indicator.
*/
rendererIcon?: string;
/**
* Icon used for the previewer indicator.
*/
previewerIcon?: string;
};
/**
* Index mapping for border positions.
*/
export const BorderIndex = {
TopLeft: 0,
Top: 1,
TopRight: 2,
Right: 3,
BottomRight: 4,
Bottom: 5,
BottomLeft: 6,
Left: 7,
} as const;
export type BorderIndex = typeof BorderIndex[keyof typeof BorderIndex];
/**
* Characters used to create borders.
*/
export type Border = readonly [
topleft: string,
top: string,
topright: string,
right: string,
botright: string,
bottom: string,
botleft: string,
left: string,
];
/**
* Index mapping for divider positions.
*/
export const DividerIndex = {
Left: 0,
Horizontal: 1,
Right: 2,
Top: 3,
Vertical: 4,
Bottom: 5,
} as const;
export type DividerIndex = typeof DividerIndex[keyof typeof DividerIndex];
/**
* Characters used to create dividers.
*/
export type Divider = readonly [
left: string,
horizontal: string,
right: string,
top: string,
vertical: string,
bottom: string,
];