ahmedelgabri 8.0.4 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/deps/jsr.io/@std/fmt/1.0.3/colors.js +903 -0
- package/esm/mod.js +2 -2
- package/package.json +2 -2
- package/script/deps/jsr.io/@std/fmt/1.0.3/colors.js +976 -0
- package/script/mod.js +3 -4
- package/types/deps/jsr.io/@std/fmt/1.0.3/colors.d.ts +700 -0
- package/types/deps/jsr.io/@std/fmt/1.0.3/colors.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fmt/0.221.0/colors.js +0 -489
- package/script/deps/jsr.io/@std/fmt/0.221.0/colors.js +0 -564
- package/types/deps/jsr.io/@std/fmt/0.221.0/colors.d.ts +0 -286
- package/types/deps/jsr.io/@std/fmt/0.221.0/colors.d.ts.map +0 -1
package/script/mod.js
CHANGED
|
@@ -26,17 +26,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.getCard =
|
|
29
|
+
exports.getCard = getCard;
|
|
30
30
|
require("./_dnt.polyfills.js");
|
|
31
31
|
const dntShim = __importStar(require("./_dnt.shims.js"));
|
|
32
|
-
const c = __importStar(require("./deps/jsr.io/@std/fmt/0.
|
|
32
|
+
const c = __importStar(require("./deps/jsr.io/@std/fmt/1.0.3/colors.js"));
|
|
33
33
|
const boxen_1 = __importDefault(require("boxen"));
|
|
34
34
|
const fullname = "Ahmed El Gabri";
|
|
35
35
|
const social = fullname.toLowerCase().replaceAll(" ", "");
|
|
36
36
|
const jsrUserName = fullname.toLowerCase().split(" ").at(0);
|
|
37
37
|
const domain = fullname.toLowerCase().split(" ").at(-1);
|
|
38
38
|
const handle = c.blue(social);
|
|
39
|
-
const work = c.reset(`
|
|
39
|
+
const work = c.reset(`Principal Engineer ${c.yellow("@Mirohq")}`);
|
|
40
40
|
const twitter = c.blue(`https://twitter.com/${handle}`);
|
|
41
41
|
const github = c.blue(`https://github.com/${handle}`);
|
|
42
42
|
const linkedin = c.blue(`https://linkedin.com/in/${handle}`);
|
|
@@ -72,7 +72,6 @@ function getCard() {
|
|
|
72
72
|
borderColor: dntShim.Deno.env.get("NO_COLOR") ? undefined : "blue",
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
exports.getCard = getCard;
|
|
76
75
|
// Needed for deno run ...
|
|
77
76
|
// card.ts is needed for npx ...
|
|
78
77
|
if ((require.main === module)) {
|
|
@@ -0,0 +1,700 @@
|
|
|
1
|
+
/** RGB 8-bits per channel. Each in range `0->255` or `0x00->0xff` */
|
|
2
|
+
export interface Rgb {
|
|
3
|
+
/** Red component value */
|
|
4
|
+
r: number;
|
|
5
|
+
/** Green component value */
|
|
6
|
+
g: number;
|
|
7
|
+
/** Blue component value */
|
|
8
|
+
b: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Enable or disable text color when styling.
|
|
12
|
+
*
|
|
13
|
+
* `@std/fmt/colors` automatically detects NO_COLOR environmental variable
|
|
14
|
+
* and disables text color. Use this API only when the automatic detection
|
|
15
|
+
* doesn't work.
|
|
16
|
+
*
|
|
17
|
+
* @example Usage
|
|
18
|
+
* ```ts no-assert
|
|
19
|
+
* import { setColorEnabled } from "@std/fmt/colors";
|
|
20
|
+
*
|
|
21
|
+
* // Disable text color
|
|
22
|
+
* setColorEnabled(false);
|
|
23
|
+
*
|
|
24
|
+
* // Enable text color
|
|
25
|
+
* setColorEnabled(true);
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param value The boolean value to enable or disable text color
|
|
29
|
+
*/
|
|
30
|
+
export declare function setColorEnabled(value: boolean): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get whether text color change is enabled or disabled.
|
|
33
|
+
*
|
|
34
|
+
* @example Usage
|
|
35
|
+
* ```ts no-assert
|
|
36
|
+
* import { getColorEnabled } from "@std/fmt/colors";
|
|
37
|
+
*
|
|
38
|
+
* console.log(getColorEnabled()); // true if enabled, false if disabled
|
|
39
|
+
* ```
|
|
40
|
+
* @returns `true` if text color is enabled, `false` otherwise
|
|
41
|
+
*/
|
|
42
|
+
export declare function getColorEnabled(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Reset the text modified.
|
|
45
|
+
*
|
|
46
|
+
* @example Usage
|
|
47
|
+
* ```ts no-assert
|
|
48
|
+
* import { reset } from "@std/fmt/colors";
|
|
49
|
+
*
|
|
50
|
+
* console.log(reset("Hello, world!"));
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param str The text to reset
|
|
54
|
+
* @returns The text with reset color
|
|
55
|
+
*/
|
|
56
|
+
export declare function reset(str: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Make the text bold.
|
|
59
|
+
*
|
|
60
|
+
* @example Usage
|
|
61
|
+
* ```ts no-assert
|
|
62
|
+
* import { bold } from "@std/fmt/colors";
|
|
63
|
+
*
|
|
64
|
+
* console.log(bold("Hello, world!"));
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @param str The text to make bold
|
|
68
|
+
* @returns The bold text
|
|
69
|
+
*/
|
|
70
|
+
export declare function bold(str: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* The text emits only a small amount of light.
|
|
73
|
+
*
|
|
74
|
+
* @example Usage
|
|
75
|
+
* ```ts no-assert
|
|
76
|
+
* import { dim } from "@std/fmt/colors";
|
|
77
|
+
*
|
|
78
|
+
* console.log(dim("Hello, world!"));
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @param str The text to dim
|
|
82
|
+
* @returns The dimmed text
|
|
83
|
+
*
|
|
84
|
+
* Warning: Not all terminal emulators support `dim`.
|
|
85
|
+
* For compatibility across all terminals, use {@linkcode gray} or {@linkcode brightBlack} instead.
|
|
86
|
+
*/
|
|
87
|
+
export declare function dim(str: string): string;
|
|
88
|
+
/**
|
|
89
|
+
* Make the text italic.
|
|
90
|
+
*
|
|
91
|
+
* @example Usage
|
|
92
|
+
* ```ts no-assert
|
|
93
|
+
* import { italic } from "@std/fmt/colors";
|
|
94
|
+
*
|
|
95
|
+
* console.log(italic("Hello, world!"));
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* @param str The text to make italic
|
|
99
|
+
* @returns The italic text
|
|
100
|
+
*/
|
|
101
|
+
export declare function italic(str: string): string;
|
|
102
|
+
/**
|
|
103
|
+
* Make the text underline.
|
|
104
|
+
*
|
|
105
|
+
* @example Usage
|
|
106
|
+
* ```ts no-assert
|
|
107
|
+
* import { underline } from "@std/fmt/colors";
|
|
108
|
+
*
|
|
109
|
+
* console.log(underline("Hello, world!"));
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* @param str The text to underline
|
|
113
|
+
* @returns The underlined text
|
|
114
|
+
*/
|
|
115
|
+
export declare function underline(str: string): string;
|
|
116
|
+
/**
|
|
117
|
+
* Invert background color and text color.
|
|
118
|
+
*
|
|
119
|
+
* @example Usage
|
|
120
|
+
* ```ts no-assert
|
|
121
|
+
* import { inverse } from "@std/fmt/colors";
|
|
122
|
+
*
|
|
123
|
+
* console.log(inverse("Hello, world!"));
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* @param str The text to invert its color
|
|
127
|
+
* @returns The inverted text
|
|
128
|
+
*/
|
|
129
|
+
export declare function inverse(str: string): string;
|
|
130
|
+
/**
|
|
131
|
+
* Make the text hidden.
|
|
132
|
+
*
|
|
133
|
+
* @example Usage
|
|
134
|
+
* ```ts no-assert
|
|
135
|
+
* import { hidden } from "@std/fmt/colors";
|
|
136
|
+
*
|
|
137
|
+
* console.log(hidden("Hello, world!"));
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* @param str The text to hide
|
|
141
|
+
* @returns The hidden text
|
|
142
|
+
*/
|
|
143
|
+
export declare function hidden(str: string): string;
|
|
144
|
+
/**
|
|
145
|
+
* Put horizontal line through the center of the text.
|
|
146
|
+
*
|
|
147
|
+
* @example Usage
|
|
148
|
+
* ```ts no-assert
|
|
149
|
+
* import { strikethrough } from "@std/fmt/colors";
|
|
150
|
+
*
|
|
151
|
+
* console.log(strikethrough("Hello, world!"));
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* @param str The text to strike through
|
|
155
|
+
* @returns The text with horizontal line through the center
|
|
156
|
+
*/
|
|
157
|
+
export declare function strikethrough(str: string): string;
|
|
158
|
+
/**
|
|
159
|
+
* Set text color to black.
|
|
160
|
+
*
|
|
161
|
+
* @example Usage
|
|
162
|
+
* ```ts no-assert
|
|
163
|
+
* import { black } from "@std/fmt/colors";
|
|
164
|
+
*
|
|
165
|
+
* console.log(black("Hello, world!"));
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* @param str The text to make black
|
|
169
|
+
* @returns The black text
|
|
170
|
+
*/
|
|
171
|
+
export declare function black(str: string): string;
|
|
172
|
+
/**
|
|
173
|
+
* Set text color to red.
|
|
174
|
+
*
|
|
175
|
+
* @example Usage
|
|
176
|
+
* ```ts no-assert
|
|
177
|
+
* import { red } from "@std/fmt/colors";
|
|
178
|
+
*
|
|
179
|
+
* console.log(red("Hello, world!"));
|
|
180
|
+
* ```
|
|
181
|
+
*
|
|
182
|
+
* @param str The text to make red
|
|
183
|
+
* @returns The red text
|
|
184
|
+
*/
|
|
185
|
+
export declare function red(str: string): string;
|
|
186
|
+
/**
|
|
187
|
+
* Set text color to green.
|
|
188
|
+
*
|
|
189
|
+
* @example Usage
|
|
190
|
+
* ```ts no-assert
|
|
191
|
+
* import { green } from "@std/fmt/colors";
|
|
192
|
+
*
|
|
193
|
+
* console.log(green("Hello, world!"));
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @param str The text to make green
|
|
197
|
+
* @returns The green text
|
|
198
|
+
*/
|
|
199
|
+
export declare function green(str: string): string;
|
|
200
|
+
/**
|
|
201
|
+
* Set text color to yellow.
|
|
202
|
+
*
|
|
203
|
+
* @example Usage
|
|
204
|
+
* ```ts no-assert
|
|
205
|
+
* import { yellow } from "@std/fmt/colors";
|
|
206
|
+
*
|
|
207
|
+
* console.log(yellow("Hello, world!"));
|
|
208
|
+
* ```
|
|
209
|
+
*
|
|
210
|
+
* @param str The text to make yellow
|
|
211
|
+
* @returns The yellow text
|
|
212
|
+
*/
|
|
213
|
+
export declare function yellow(str: string): string;
|
|
214
|
+
/**
|
|
215
|
+
* Set text color to blue.
|
|
216
|
+
*
|
|
217
|
+
* @example Usage
|
|
218
|
+
* ```ts no-assert
|
|
219
|
+
* import { blue } from "@std/fmt/colors";
|
|
220
|
+
*
|
|
221
|
+
* console.log(blue("Hello, world!"));
|
|
222
|
+
* ```
|
|
223
|
+
*
|
|
224
|
+
* @param str The text to make blue
|
|
225
|
+
* @returns The blue text
|
|
226
|
+
*/
|
|
227
|
+
export declare function blue(str: string): string;
|
|
228
|
+
/**
|
|
229
|
+
* Set text color to magenta.
|
|
230
|
+
*
|
|
231
|
+
* @example Usage
|
|
232
|
+
* ```ts no-assert
|
|
233
|
+
* import { magenta } from "@std/fmt/colors";
|
|
234
|
+
*
|
|
235
|
+
* console.log(magenta("Hello, world!"));
|
|
236
|
+
* ```
|
|
237
|
+
*
|
|
238
|
+
* @param str The text to make magenta
|
|
239
|
+
* @returns The magenta text
|
|
240
|
+
*/
|
|
241
|
+
export declare function magenta(str: string): string;
|
|
242
|
+
/**
|
|
243
|
+
* Set text color to cyan.
|
|
244
|
+
*
|
|
245
|
+
* @example Usage
|
|
246
|
+
* ```ts no-assert
|
|
247
|
+
* import { cyan } from "@std/fmt/colors";
|
|
248
|
+
*
|
|
249
|
+
* console.log(cyan("Hello, world!"));
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* @param str The text to make cyan
|
|
253
|
+
* @returns The cyan text
|
|
254
|
+
*/
|
|
255
|
+
export declare function cyan(str: string): string;
|
|
256
|
+
/**
|
|
257
|
+
* Set text color to white.
|
|
258
|
+
*
|
|
259
|
+
* @example Usage
|
|
260
|
+
* ```ts no-assert
|
|
261
|
+
* import { white } from "@std/fmt/colors";
|
|
262
|
+
*
|
|
263
|
+
* console.log(white("Hello, world!"));
|
|
264
|
+
* ```
|
|
265
|
+
*
|
|
266
|
+
* @param str The text to make white
|
|
267
|
+
* @returns The white text
|
|
268
|
+
*/
|
|
269
|
+
export declare function white(str: string): string;
|
|
270
|
+
/**
|
|
271
|
+
* Set text color to gray.
|
|
272
|
+
*
|
|
273
|
+
* @example Usage
|
|
274
|
+
* ```ts no-assert
|
|
275
|
+
* import { gray } from "@std/fmt/colors";
|
|
276
|
+
*
|
|
277
|
+
* console.log(gray("Hello, world!"));
|
|
278
|
+
* ```
|
|
279
|
+
*
|
|
280
|
+
* @param str The text to make gray
|
|
281
|
+
* @returns The gray text
|
|
282
|
+
*/
|
|
283
|
+
export declare function gray(str: string): string;
|
|
284
|
+
/**
|
|
285
|
+
* Set text color to bright black.
|
|
286
|
+
*
|
|
287
|
+
* @example Usage
|
|
288
|
+
* ```ts no-assert
|
|
289
|
+
* import { brightBlack } from "@std/fmt/colors";
|
|
290
|
+
*
|
|
291
|
+
* console.log(brightBlack("Hello, world!"));
|
|
292
|
+
* ```
|
|
293
|
+
*
|
|
294
|
+
* @param str The text to make bright black
|
|
295
|
+
* @returns The bright black text
|
|
296
|
+
*/
|
|
297
|
+
export declare function brightBlack(str: string): string;
|
|
298
|
+
/**
|
|
299
|
+
* Set text color to bright red.
|
|
300
|
+
*
|
|
301
|
+
* @example Usage
|
|
302
|
+
* ```ts no-assert
|
|
303
|
+
* import { brightRed } from "@std/fmt/colors";
|
|
304
|
+
*
|
|
305
|
+
* console.log(brightRed("Hello, world!"));
|
|
306
|
+
* ```
|
|
307
|
+
*
|
|
308
|
+
* @param str The text to make bright red
|
|
309
|
+
* @returns The bright red text
|
|
310
|
+
*/
|
|
311
|
+
export declare function brightRed(str: string): string;
|
|
312
|
+
/**
|
|
313
|
+
* Set text color to bright green.
|
|
314
|
+
*
|
|
315
|
+
* @example Usage
|
|
316
|
+
* ```ts no-assert
|
|
317
|
+
* import { brightGreen } from "@std/fmt/colors";
|
|
318
|
+
*
|
|
319
|
+
* console.log(brightGreen("Hello, world!"));
|
|
320
|
+
* ```
|
|
321
|
+
*
|
|
322
|
+
* @param str The text to make bright green
|
|
323
|
+
* @returns The bright green text
|
|
324
|
+
*/
|
|
325
|
+
export declare function brightGreen(str: string): string;
|
|
326
|
+
/**
|
|
327
|
+
* Set text color to bright yellow.
|
|
328
|
+
*
|
|
329
|
+
* @example Usage
|
|
330
|
+
* ```ts no-assert
|
|
331
|
+
* import { brightYellow } from "@std/fmt/colors";
|
|
332
|
+
*
|
|
333
|
+
* console.log(brightYellow("Hello, world!"));
|
|
334
|
+
* ```
|
|
335
|
+
*
|
|
336
|
+
* @param str The text to make bright yellow
|
|
337
|
+
* @returns The bright yellow text
|
|
338
|
+
*/
|
|
339
|
+
export declare function brightYellow(str: string): string;
|
|
340
|
+
/**
|
|
341
|
+
* Set text color to bright blue.
|
|
342
|
+
*
|
|
343
|
+
* @example Usage
|
|
344
|
+
* ```ts no-assert
|
|
345
|
+
* import { brightBlue } from "@std/fmt/colors";
|
|
346
|
+
*
|
|
347
|
+
* console.log(brightBlue("Hello, world!"));
|
|
348
|
+
* ```
|
|
349
|
+
*
|
|
350
|
+
* @param str The text to make bright blue
|
|
351
|
+
* @returns The bright blue text
|
|
352
|
+
*/
|
|
353
|
+
export declare function brightBlue(str: string): string;
|
|
354
|
+
/**
|
|
355
|
+
* Set text color to bright magenta.
|
|
356
|
+
*
|
|
357
|
+
* @example Usage
|
|
358
|
+
* ```ts no-assert
|
|
359
|
+
* import { brightMagenta } from "@std/fmt/colors";
|
|
360
|
+
*
|
|
361
|
+
* console.log(brightMagenta("Hello, world!"));
|
|
362
|
+
* ```
|
|
363
|
+
*
|
|
364
|
+
* @param str The text to make bright magenta
|
|
365
|
+
* @returns The bright magenta text
|
|
366
|
+
*/
|
|
367
|
+
export declare function brightMagenta(str: string): string;
|
|
368
|
+
/**
|
|
369
|
+
* Set text color to bright cyan.
|
|
370
|
+
*
|
|
371
|
+
* @example Usage
|
|
372
|
+
* ```ts no-assert
|
|
373
|
+
* import { brightCyan } from "@std/fmt/colors";
|
|
374
|
+
*
|
|
375
|
+
* console.log(brightCyan("Hello, world!"));
|
|
376
|
+
* ```
|
|
377
|
+
*
|
|
378
|
+
* @param str The text to make bright cyan
|
|
379
|
+
* @returns The bright cyan text
|
|
380
|
+
*/
|
|
381
|
+
export declare function brightCyan(str: string): string;
|
|
382
|
+
/**
|
|
383
|
+
* Set text color to bright white.
|
|
384
|
+
*
|
|
385
|
+
* @example Usage
|
|
386
|
+
* ```ts no-assert
|
|
387
|
+
* import { brightWhite } from "@std/fmt/colors";
|
|
388
|
+
*
|
|
389
|
+
* console.log(brightWhite("Hello, world!"));
|
|
390
|
+
* ```
|
|
391
|
+
*
|
|
392
|
+
* @param str The text to make bright white
|
|
393
|
+
* @returns The bright white text
|
|
394
|
+
*/
|
|
395
|
+
export declare function brightWhite(str: string): string;
|
|
396
|
+
/**
|
|
397
|
+
* Set background color to black.
|
|
398
|
+
*
|
|
399
|
+
* @example Usage
|
|
400
|
+
* ```ts no-assert
|
|
401
|
+
* import { bgBlack } from "@std/fmt/colors";
|
|
402
|
+
*
|
|
403
|
+
* console.log(bgBlack("Hello, world!"));
|
|
404
|
+
* ```
|
|
405
|
+
*
|
|
406
|
+
* @param str The text to make its background black
|
|
407
|
+
* @returns The text with black background
|
|
408
|
+
*/
|
|
409
|
+
export declare function bgBlack(str: string): string;
|
|
410
|
+
/**
|
|
411
|
+
* Set background color to red.
|
|
412
|
+
*
|
|
413
|
+
* @example Usage
|
|
414
|
+
* ```ts no-assert
|
|
415
|
+
* import { bgRed } from "@std/fmt/colors";
|
|
416
|
+
*
|
|
417
|
+
* console.log(bgRed("Hello, world!"));
|
|
418
|
+
* ```
|
|
419
|
+
*
|
|
420
|
+
* @param str The text to make its background red
|
|
421
|
+
* @returns The text with red background
|
|
422
|
+
*/
|
|
423
|
+
export declare function bgRed(str: string): string;
|
|
424
|
+
/**
|
|
425
|
+
* Set background color to green.
|
|
426
|
+
*
|
|
427
|
+
* @example Usage
|
|
428
|
+
* ```ts no-assert
|
|
429
|
+
* import { bgGreen } from "@std/fmt/colors";
|
|
430
|
+
*
|
|
431
|
+
* console.log(bgGreen("Hello, world!"));
|
|
432
|
+
* ```
|
|
433
|
+
*
|
|
434
|
+
* @param str The text to make its background green
|
|
435
|
+
* @returns The text with green background
|
|
436
|
+
*/
|
|
437
|
+
export declare function bgGreen(str: string): string;
|
|
438
|
+
/**
|
|
439
|
+
* Set background color to yellow.
|
|
440
|
+
*
|
|
441
|
+
* @example Usage
|
|
442
|
+
* ```ts no-assert
|
|
443
|
+
* import { bgYellow } from "@std/fmt/colors";
|
|
444
|
+
*
|
|
445
|
+
* console.log(bgYellow("Hello, world!"));
|
|
446
|
+
* ```
|
|
447
|
+
*
|
|
448
|
+
* @param str The text to make its background yellow
|
|
449
|
+
* @returns The text with yellow background
|
|
450
|
+
*/
|
|
451
|
+
export declare function bgYellow(str: string): string;
|
|
452
|
+
/**
|
|
453
|
+
* Set background color to blue.
|
|
454
|
+
*
|
|
455
|
+
* @example Usage
|
|
456
|
+
* ```ts no-assert
|
|
457
|
+
* import { bgBlue } from "@std/fmt/colors";
|
|
458
|
+
*
|
|
459
|
+
* console.log(bgBlue("Hello, world!"));
|
|
460
|
+
* ```
|
|
461
|
+
*
|
|
462
|
+
* @param str The text to make its background blue
|
|
463
|
+
* @returns The text with blue background
|
|
464
|
+
*/
|
|
465
|
+
export declare function bgBlue(str: string): string;
|
|
466
|
+
/**
|
|
467
|
+
* Set background color to magenta.
|
|
468
|
+
*
|
|
469
|
+
* @example Usage
|
|
470
|
+
* ```ts no-assert
|
|
471
|
+
* import { bgMagenta } from "@std/fmt/colors";
|
|
472
|
+
*
|
|
473
|
+
* console.log(bgMagenta("Hello, world!"));
|
|
474
|
+
* ```
|
|
475
|
+
*
|
|
476
|
+
* @param str The text to make its background magenta
|
|
477
|
+
* @returns The text with magenta background
|
|
478
|
+
*/
|
|
479
|
+
export declare function bgMagenta(str: string): string;
|
|
480
|
+
/**
|
|
481
|
+
* Set background color to cyan.
|
|
482
|
+
*
|
|
483
|
+
* @example Usage
|
|
484
|
+
* ```ts no-assert
|
|
485
|
+
* import { bgCyan } from "@std/fmt/colors";
|
|
486
|
+
*
|
|
487
|
+
* console.log(bgCyan("Hello, world!"));
|
|
488
|
+
* ```
|
|
489
|
+
*
|
|
490
|
+
* @param str The text to make its background cyan
|
|
491
|
+
* @returns The text with cyan background
|
|
492
|
+
*/
|
|
493
|
+
export declare function bgCyan(str: string): string;
|
|
494
|
+
/**
|
|
495
|
+
* Set background color to white.
|
|
496
|
+
*
|
|
497
|
+
* @example Usage
|
|
498
|
+
* ```ts no-assert
|
|
499
|
+
* import { bgWhite } from "@std/fmt/colors";
|
|
500
|
+
*
|
|
501
|
+
* console.log(bgWhite("Hello, world!"));
|
|
502
|
+
* ```
|
|
503
|
+
*
|
|
504
|
+
* @param str The text to make its background white
|
|
505
|
+
* @returns The text with white background
|
|
506
|
+
*/
|
|
507
|
+
export declare function bgWhite(str: string): string;
|
|
508
|
+
/**
|
|
509
|
+
* Set background color to bright black.
|
|
510
|
+
*
|
|
511
|
+
* @example Usage
|
|
512
|
+
* ```ts no-assert
|
|
513
|
+
* import { bgBrightBlack } from "@std/fmt/colors";
|
|
514
|
+
*
|
|
515
|
+
* console.log(bgBrightBlack("Hello, world!"));
|
|
516
|
+
* ```
|
|
517
|
+
*
|
|
518
|
+
* @param str The text to make its background bright black
|
|
519
|
+
* @returns The text with bright black background
|
|
520
|
+
*/
|
|
521
|
+
export declare function bgBrightBlack(str: string): string;
|
|
522
|
+
/**
|
|
523
|
+
* Set background color to bright red.
|
|
524
|
+
*
|
|
525
|
+
* @example Usage
|
|
526
|
+
* ```ts no-assert
|
|
527
|
+
* import { bgBrightRed } from "@std/fmt/colors";
|
|
528
|
+
*
|
|
529
|
+
* console.log(bgBrightRed("Hello, world!"));
|
|
530
|
+
* ```
|
|
531
|
+
*
|
|
532
|
+
* @param str The text to make its background bright red
|
|
533
|
+
* @returns The text with bright red background
|
|
534
|
+
*/
|
|
535
|
+
export declare function bgBrightRed(str: string): string;
|
|
536
|
+
/**
|
|
537
|
+
* Set background color to bright green.
|
|
538
|
+
*
|
|
539
|
+
* @example Usage
|
|
540
|
+
* ```ts no-assert
|
|
541
|
+
* import { bgBrightGreen } from "@std/fmt/colors";
|
|
542
|
+
*
|
|
543
|
+
* console.log(bgBrightGreen("Hello, world!"));
|
|
544
|
+
* ```
|
|
545
|
+
*
|
|
546
|
+
* @param str The text to make its background bright green
|
|
547
|
+
* @returns The text with bright green background
|
|
548
|
+
*/
|
|
549
|
+
export declare function bgBrightGreen(str: string): string;
|
|
550
|
+
/**
|
|
551
|
+
* Set background color to bright yellow.
|
|
552
|
+
*
|
|
553
|
+
* @example Usage
|
|
554
|
+
* ```ts no-assert
|
|
555
|
+
* import { bgBrightYellow } from "@std/fmt/colors";
|
|
556
|
+
*
|
|
557
|
+
* console.log(bgBrightYellow("Hello, world!"));
|
|
558
|
+
* ```
|
|
559
|
+
*
|
|
560
|
+
* @param str The text to make its background bright yellow
|
|
561
|
+
* @returns The text with bright yellow background
|
|
562
|
+
*/
|
|
563
|
+
export declare function bgBrightYellow(str: string): string;
|
|
564
|
+
/**
|
|
565
|
+
* Set background color to bright blue.
|
|
566
|
+
*
|
|
567
|
+
* @example Usage
|
|
568
|
+
* ```ts no-assert
|
|
569
|
+
* import { bgBrightBlue } from "@std/fmt/colors";
|
|
570
|
+
*
|
|
571
|
+
* console.log(bgBrightBlue("Hello, world!"));
|
|
572
|
+
* ```
|
|
573
|
+
*
|
|
574
|
+
* @param str The text to make its background bright blue
|
|
575
|
+
* @returns The text with bright blue background
|
|
576
|
+
*/
|
|
577
|
+
export declare function bgBrightBlue(str: string): string;
|
|
578
|
+
/**
|
|
579
|
+
* Set background color to bright magenta.
|
|
580
|
+
*
|
|
581
|
+
* @example Usage
|
|
582
|
+
* ```ts no-assert
|
|
583
|
+
* import { bgBrightMagenta } from "@std/fmt/colors";
|
|
584
|
+
*
|
|
585
|
+
* console.log(bgBrightMagenta("Hello, world!"));
|
|
586
|
+
* ```
|
|
587
|
+
*
|
|
588
|
+
* @param str The text to make its background bright magenta
|
|
589
|
+
* @returns The text with bright magenta background
|
|
590
|
+
*/
|
|
591
|
+
export declare function bgBrightMagenta(str: string): string;
|
|
592
|
+
/**
|
|
593
|
+
* Set background color to bright cyan.
|
|
594
|
+
*
|
|
595
|
+
* @example Usage
|
|
596
|
+
* ```ts no-assert
|
|
597
|
+
* import { bgBrightCyan } from "@std/fmt/colors";
|
|
598
|
+
*
|
|
599
|
+
* console.log(bgBrightCyan("Hello, world!"));
|
|
600
|
+
* ```
|
|
601
|
+
*
|
|
602
|
+
* @param str The text to make its background bright cyan
|
|
603
|
+
* @returns The text with bright cyan background
|
|
604
|
+
*/
|
|
605
|
+
export declare function bgBrightCyan(str: string): string;
|
|
606
|
+
/**
|
|
607
|
+
* Set background color to bright white.
|
|
608
|
+
*
|
|
609
|
+
* @example Usage
|
|
610
|
+
* ```ts no-assert
|
|
611
|
+
* import { bgBrightWhite } from "@std/fmt/colors";
|
|
612
|
+
*
|
|
613
|
+
* console.log(bgBrightWhite("Hello, world!"));
|
|
614
|
+
* ```
|
|
615
|
+
*
|
|
616
|
+
* @param str The text to make its background bright white
|
|
617
|
+
* @returns The text with bright white background
|
|
618
|
+
*/
|
|
619
|
+
export declare function bgBrightWhite(str: string): string;
|
|
620
|
+
/**
|
|
621
|
+
* Set text color using paletted 8bit colors.
|
|
622
|
+
* https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
|
|
623
|
+
*
|
|
624
|
+
* @example Usage
|
|
625
|
+
* ```ts no-assert
|
|
626
|
+
* import { rgb8 } from "@std/fmt/colors";
|
|
627
|
+
*
|
|
628
|
+
* console.log(rgb8("Hello, world!", 42));
|
|
629
|
+
* ```
|
|
630
|
+
*
|
|
631
|
+
* @param str The text color to apply paletted 8bit colors to
|
|
632
|
+
* @param color The color code
|
|
633
|
+
* @returns The text with paletted 8bit color
|
|
634
|
+
*/
|
|
635
|
+
export declare function rgb8(str: string, color: number): string;
|
|
636
|
+
/**
|
|
637
|
+
* Set background color using paletted 8bit colors.
|
|
638
|
+
* https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
|
|
639
|
+
*
|
|
640
|
+
* @example Usage
|
|
641
|
+
* ```ts no-assert
|
|
642
|
+
* import { bgRgb8 } from "@std/fmt/colors";
|
|
643
|
+
*
|
|
644
|
+
* console.log(bgRgb8("Hello, world!", 42));
|
|
645
|
+
* ```
|
|
646
|
+
*
|
|
647
|
+
* @param str The text color to apply paletted 8bit background colors to
|
|
648
|
+
* @param color code
|
|
649
|
+
* @returns The text with paletted 8bit background color
|
|
650
|
+
*/
|
|
651
|
+
export declare function bgRgb8(str: string, color: number): string;
|
|
652
|
+
/**
|
|
653
|
+
* Set text color using 24bit rgb.
|
|
654
|
+
* `color` can be a number in range `0x000000` to `0xffffff` or
|
|
655
|
+
* an `Rgb`.
|
|
656
|
+
*
|
|
657
|
+
* @example To produce the color magenta:
|
|
658
|
+
* ```ts no-assert
|
|
659
|
+
* import { rgb24 } from "@std/fmt/colors";
|
|
660
|
+
*
|
|
661
|
+
* rgb24("foo", 0xff00ff);
|
|
662
|
+
* rgb24("foo", {r: 255, g: 0, b: 255});
|
|
663
|
+
* ```
|
|
664
|
+
* @param str The text color to apply 24bit rgb to
|
|
665
|
+
* @param color The color code
|
|
666
|
+
* @returns The text with 24bit rgb color
|
|
667
|
+
*/
|
|
668
|
+
export declare function rgb24(str: string, color: number | Rgb): string;
|
|
669
|
+
/**
|
|
670
|
+
* Set background color using 24bit rgb.
|
|
671
|
+
* `color` can be a number in range `0x000000` to `0xffffff` or
|
|
672
|
+
* an `Rgb`.
|
|
673
|
+
*
|
|
674
|
+
* @example To produce the color magenta:
|
|
675
|
+
* ```ts no-assert
|
|
676
|
+
* import { bgRgb24 } from "@std/fmt/colors";
|
|
677
|
+
*
|
|
678
|
+
* bgRgb24("foo", 0xff00ff);
|
|
679
|
+
* bgRgb24("foo", {r: 255, g: 0, b: 255});
|
|
680
|
+
* ```
|
|
681
|
+
* @param str The text color to apply 24bit rgb to
|
|
682
|
+
* @param color The color code
|
|
683
|
+
* @returns The text with 24bit rgb color
|
|
684
|
+
*/
|
|
685
|
+
export declare function bgRgb24(str: string, color: number | Rgb): string;
|
|
686
|
+
/**
|
|
687
|
+
* Remove ANSI escape codes from the string.
|
|
688
|
+
*
|
|
689
|
+
* @example Usage
|
|
690
|
+
* ```ts no-assert
|
|
691
|
+
* import { stripAnsiCode, red } from "@std/fmt/colors";
|
|
692
|
+
*
|
|
693
|
+
* console.log(stripAnsiCode(red("Hello, world!")));
|
|
694
|
+
* ```
|
|
695
|
+
*
|
|
696
|
+
* @param string The text to remove ANSI escape codes from
|
|
697
|
+
* @returns The text without ANSI escape codes
|
|
698
|
+
*/
|
|
699
|
+
export declare function stripAnsiCode(string: string): string;
|
|
700
|
+
//# sourceMappingURL=colors.d.ts.map
|