-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
133 lines (113 loc) · 6.35 KB
/
index.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
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
declare module 'leeks.js' {
type Styles = 'reset' | 'bold' | 'dim' | 'italic' | 'underline' | 'overline' | 'blink' | 'inverse' | 'strikethrough' | 'nostrikethrough' | 'nounderline' | 'nooverline' | 'noblink' | 'noinverse';
type Colors = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | 'grey' |
'blackBright' | 'redBright' | 'yellowBright' | 'blueBright' | 'magentaBright' | 'cyanBright' | 'whiteBright' | 'greenBright' |
'bgBlack' | 'bgRed' | 'bgGreen' | 'bgYellow' | 'bgBlue' | 'bgMagenta' | 'bgCyan' | 'bgWhite' |
'bgBlackBright' | 'bgRedBright' | 'bgGreenBright' | 'bgBlueBright' | 'bgMagentaBright' | 'bgCyanBright' | 'bgWhiteBright' | 'bgYellowBright' |
'bgGray' | 'bgGrey';
type Keywords = 'black' | 'silver' | 'gray' | 'white' | 'maroon' | 'red' | 'purple' | 'fuchsia' | 'green' | 'lime' | 'olive' |
'yellow' | 'navy' | 'blue' | 'teal' | 'aqua' | 'aliceblue' | 'antiquewhite' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'blanchedalmond' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' |
'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' |
'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' |
'deeppink' | 'deepskyblue' | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'greenyellow' | 'grey' | 'honeydew' |
'hotpink' | 'indianred' | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' |
'lightgrey' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'limegreen' | 'linen' | 'magenta' | 'mediumaquamarine' | 'mediumblue' |
'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'oldlace' |
'olivedrab' | 'orange' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'rosybrown' | 'royalblue' |
'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'skyblue' | 'slateblue' | 'slategray' | 'slategrey' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'thistle' | 'tomato' | 'turquoise' |
'violet' | 'wheat' | 'whitesmoke' | 'yellowgreen';
/** Alias for `colours` */
export const colors: {
[x in Colors]: (t: string) => string;
};
/**
* Change the colour of the given text (List: https://docs.davidcralph.co.uk/#/leeks)
* @param {string} t The text to change the colour of
*/
export const colours: {
[x in Colors]: (t: string) => string
};
/**
* Change the style of the given text (List: https://docs.davidcralph.co.uk/#/leeks)
* @param {string} t The text to change the style of
*/
export const styles: {
[x in Styles]: (t: string) => string
};
/**
* Change the colour of the given text (List: https://docs.davidcralph.co.uk/#/leeks)
* @param {string} t The text to change the colour of
*/
export const keywords: {
[x in Keywords]: (t: string) => string
};
/**
* Change the background colour of the given text (List: https://docs.davidcralph.co.uk/#/leeks)
* @param {string} t The text to change the colour of
*/
export const bgKeywords: {
[x in Keywords]: (t: string) => string
};
/** Alias for `supportsColour` */
export const supportsColor: boolean;
/** Check if colours are supported (returns false on browser) */
export const supportsColour: boolean;
/**
* Change the background colour of the given text using 8-bit colours
* @param i The 8-bit colour to use
* @param t The text to show with the 8-bit colour
*/
export const eightBit: (i: string, t: string) => string;
/**
* Change the background colour of the given text using 8-bit colours
* @param i The 8-bit colour to use
* @param t The text to show with the 8-bit colour
*/
export const eightBitBg: (i: string, t: string) => string;
/**
* Change the colour of the given text using RGB
* @param rgb An array of the RGB to use
* @param t The text to show with the RGB color
*/
export const rgb: (rgb: [number, number, number], t: string) => string;
/**
* Change the background colour of the given text using RGB
* @param rgb An array of the RGB to use
* @param t The text to show with the RGB colour
*/
export const rgbBg: (rgb: [number, number, number], t: string) => string;
/**
* Change the colour of the given text using hexadecimals
* @param {string} hex The hex to use
* @param {string} t The text to show with the hexadecimal colour
* @credit [Stack Overflow](https://stackoverflow.com/q/5623838)
*/
export const hex: (hex: string, t: string) => string;
/**
* Change the background colour of the given text using hexadecimals
* @param {string} hex The hex to use
* @param {string} t The text to show with the hexadecimal colour
* @credit [Stack Overflow](https://stackoverflow.com/q/5623838)
*/
export const hexBg: (hex: string, t: string) => string;
/**
* Add colours and styles to a string using short codes
* @param {string} t The text to format
*/
export const short: (t: string) => string;
/**
* Set an alias
* @param {string} name The name of the alias
* @param {string} type Either "colours", "colors" or "styles"
* @param {string} value The colour/style you want to use, e.g leeks.colours.green
*/
export const alias: (name: string, type: 'colours' | 'colors' | 'styled', value: any) => void;
/** Enable colour support for leeks.js */
export const enableColours: () => void;
/** Alias for `enableColours` */
export const enableColors: () => void;
/** Disable colour support for leeks.js */
export const disableColours: () => void;
/** Alias for `disableColours` */
export const disableColors: () => void;
}