11import { ValuesFromObject } from "../../type/mod.ts" ;
2+ import colors from './colors.ts' ;
3+ import fonts from './fonts.ts' ;
4+ import ideograms from './ideograms.ts' ;
5+ import scripts from './scripts.ts' ;
6+ import textDecorations from './text_decoreations.ts' ;
27
38/**
49 * This object contains all format codes.
@@ -10,113 +15,19 @@ import { ValuesFromObject } from "../../type/mod.ts";
1015const formats = {
1116 /** Reset or normal */
1217 RESET : '0' ,
13- /** Bold or increased intensity */
14- FONT_WEIGHT_BOLD : '1' ,
15- /** Faint, decreased intensity, or dim */
16- FONT_WEIGHT_DIM : '2' ,
17- /** Italic */
18- ITALIC : '3' ,
19- /** Underline */
20- UNDERLINE : '4' ,
2118 /** Slow blink */
2219 BLINK_SLOW : '5' ,
2320 /** Rapid blink */
2421 BLINK_RAPID : '6' ,
25- /** [Reverse video](https://en.wikipedia.org/wiki/Reverse_video) or invert */
26- SWAP_FOREGROUND_BACKGROUND_COLOR : '7' ,
2722 /** Conceal or hide */
2823 HIDE : '8' ,
29- /** [Crosser-out](https://en.wikipedia.org/wiki/Strikethrough), or strike */
30- STRIKETHROUGH : '9' ,
31- /** Primary (default) font */
32- FONT_DEFAULT : '10' ,
33- /** Alternative font 1 */
34- FONT_ALTERNATIVE_1 : '11' ,
35- /** Alternative font 2 */
36- FONT_ALTERNATIVE_2 : '12' ,
37- /** Alternative font 3 */
38- FONT_ALTERNATIVE_3 : '13' ,
39- /** Alternative font 4 */
40- FONT_ALTERNATIVE_4 : '14' ,
41- /** Alternative font 5 */
42- FONT_ALTERNATIVE_5 : '15' ,
43- /** Alternative font 6 */
44- FONT_ALTERNATIVE_6 : '16' ,
45- /** Alternative font 7 */
46- FONT_ALTERNATIVE_7 : '17' ,
47- /** Alternative font 8 */
48- FONT_ALTERNATIVE_8 : '18' ,
49- /** Alternative font 9 */
50- FONT_ALTERNATIVE_9 : '19' ,
51- /** [Fraktur](https://en.wikipedia.org/wiki/Fraktur) (Gothic) */
52- FONT_FRACTURE : '20' ,
53- /** Doubly underlined; or: not bold */
54- DOUBLE_UNDERLINE : '21' ,
55- /** Normal intensity */
56- FONT_WEIGHT_NORMAL : '22' ,
57- /** Neither italic, nor blackletter */
58- ITALIC_RESET : '23' ,
59- /** Not underlined */
60- UNDERLINE_RESET : '24' ,
61- /** Not blinking */
62- BLINK_RESET : '25' ,
63- /** Proportional spacing */
64- PROPORTIONAL_SPACING : '26' ,
65- /** Not reversed */
66- REVERSED_RESET : '27' ,
6724 /** Reveal */
6825 HIDE_RESET : '28' ,
69- /** Not crossed out */
70- STRIKETHROUGH_RESET : '29' ,
71- // FOREGROUND_COLOR: 30 - 37
72- /** Set foreground [color](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) */
73- FOREGROUND_COLOR : '38' ,
74- /** Default foreground color */
75- FOREGROUND_COLOR_DEFAULT : '39' ,
76- // BACKGROUND_COLOR: 40 - 47
77- /** Set background [color](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) */
78- BACKGROUND_COLOR : '48' ,
79- /** Default background color */
80- BACKGROUND_COLOR_DEFAULT : '49' ,
81- /** Disable proportional spacing */
82- PROPORTIONAL_SPACING_RESET : '50' ,
83- /** Framed */
84- FRAME : '51' ,
85- /** Encircled */
86- ENCIRCLE : '52' ,
87- /** Overlined */
88- OVERLINE : '53' ,
89- /** Neither framed nor encircled */
90- FRAME_ENCIRCLE_RESET : '54' ,
91- /** Not overlined */
92- OVERLINE_RESET : '55' ,
93- // 56 - 57
94- /** Set underline [color](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) */
95- UNDERLINE_COLOR : '58' ,
96- /** Default underline color */
97- UNDERLINE_COLOR_DEFAULT : '59' ,
98- /** Ideogram underline or right side line */
99- IDEOGRAM_RIGHT_SIDE_LINE : '60' ,
100- /** Ideogram double underline, or double line on the right side */
101- IDEOGRAM_DOUBLE_RIGHT_SIDE_LINE : '61' ,
102- /** Ideogram overline or left side line */
103- IDEOGRAM_LEFT_SIDE_LINE : '62' ,
104- /** Ideogram double overline, or double line on the left side */
105- IDEOGRAM_DOUBLE_LEFT_SIDE_LINE : '63' ,
106- /** Ideogram stress marking */
107- IDEOGRAM_STRESS_ERROR_MARK : '64' ,
108- /** No ideogram attributes */
109- IDEOGRAM_REST : '65' ,
110- // 66 - 72
111- /** Superscript */
112- SUPERSCRIPT : '73' ,
113- /** Subscript */
114- SUBSCRIPT : '74' ,
115- /** Neither superscript nor subscript */
116- SUPERSCRIPT_SUBSCRIPT_RESET : '75'
117- // BRIGHT_FOREGROUND_COLOR: 90 - 97
118- // 98 - 99
119- // BRIGHT_BACKGROUND_COLOR: 100 - 107
26+ ...colors ,
27+ ...fonts ,
28+ ...ideograms ,
29+ ...scripts ,
30+ ...textDecorations
12031} as const ;
12132
12233export default formats ;
0 commit comments