UNPKG

1.53 kBTypeScriptView Raw
1/**
2Style of the box border.
3*/
4export type BoxStyle = {
5 readonly topLeft: string;
6 readonly top: string;
7 readonly topRight: string;
8 readonly right: string;
9 readonly bottomRight: string;
10 readonly bottom: string;
11 readonly bottomLeft: string;
12 readonly left: string;
13};
14
15/**
16All box styles.
17*/
18export type Boxes = {
19 /**
20 @example
21 ```
22 ┌────┐
23 │ │
24 └────┘
25 ```
26 */
27 readonly single: BoxStyle;
28
29 /**
30 @example
31 ```
32 ╔════╗
33 ║ ║
34 ╚════╝
35 ```
36 */
37 readonly double: BoxStyle;
38
39 /**
40 @example
41 ```
42 ╭────╮
43 │ │
44 ╰────╯
45 ```
46 */
47 readonly round: BoxStyle;
48
49 /**
50 @example
51 ```
52 ┏━━━━┓
53 ┃ ┃
54 ┗━━━━┛
55 ```
56 */
57 readonly bold: BoxStyle;
58
59 /**
60 @example
61 ```
62 ╓────╖
63 ║ ║
64 ╙────╜
65 ```
66 */
67 readonly singleDouble: BoxStyle;
68
69 /**
70 @example
71 ```
72 ╒════╕
73 │ │
74 ╘════╛
75 ```
76 */
77 readonly doubleSingle: BoxStyle;
78
79 /**
80 @example
81 ```
82 +----+
83 | |
84 +----+
85 ```
86 */
87 readonly classic: BoxStyle;
88
89 /**
90 @example
91 ```
92 ↘↓↓↓↓↙
93 → ←
94 ↗↑↑↑↑↖
95 ```
96 */
97 readonly arrow: BoxStyle;
98};
99
100/**
101Boxes for use in the terminal.
102
103@example
104```
105import cliBoxes from 'cli-boxes';
106
107console.log(cliBoxes.single);
108// {
109// topLeft: '┌',
110// top: '─',
111// topRight: '┐',
112// right: '│',
113// bottomRight: '┘',
114// bottom: '─',
115// bottomLeft: '└',
116// left: '│'
117// }
118```
119*/
120declare const cliBoxes: Boxes;
121
122export default cliBoxes;