@discordeno/utils 22.0.1-next.df1658d → 22.0.1-next.dff1cc0

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.
Files changed (46) hide show
  1. package/dist/Collection.d.ts.map +1 -1
  2. package/dist/Collection.js +1 -1
  3. package/dist/base64.d.ts +6 -0
  4. package/dist/base64.d.ts.map +1 -1
  5. package/dist/base64.js +90 -13
  6. package/dist/bucket.d.ts.map +1 -1
  7. package/dist/bucket.js +2 -2
  8. package/dist/builders/embeds.d.ts +3 -3
  9. package/dist/builders/embeds.d.ts.map +1 -1
  10. package/dist/builders/embeds.js +2 -2
  11. package/dist/builders.d.ts.map +1 -1
  12. package/dist/builders.js +1 -1
  13. package/dist/casing.d.ts.map +1 -1
  14. package/dist/casing.js +1 -3
  15. package/dist/colors.d.ts +1 -223
  16. package/dist/colors.d.ts.map +1 -1
  17. package/dist/colors.js +2 -371
  18. package/dist/constants.d.ts +1 -1
  19. package/dist/constants.d.ts.map +1 -1
  20. package/dist/constants.js +2 -2
  21. package/dist/hash.js +1 -1
  22. package/dist/images.d.ts +40 -64
  23. package/dist/images.d.ts.map +1 -1
  24. package/dist/images.js +29 -5
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +2 -2
  28. package/dist/logger.d.ts.map +1 -1
  29. package/dist/logger.js +1 -1
  30. package/dist/oauth2.d.ts +45 -7
  31. package/dist/oauth2.d.ts.map +1 -1
  32. package/dist/oauth2.js +35 -3
  33. package/dist/permissions.d.ts.map +1 -1
  34. package/dist/permissions.js +1 -1
  35. package/dist/reactions.js +1 -1
  36. package/dist/snowflakes.d.ts.map +1 -1
  37. package/dist/snowflakes.js +1 -1
  38. package/dist/token.js +1 -1
  39. package/dist/typeguards.d.ts +1 -2
  40. package/dist/typeguards.d.ts.map +1 -1
  41. package/dist/typeguards.js +1 -4
  42. package/dist/urlToBase64.js +1 -1
  43. package/dist/urls.d.ts.map +1 -1
  44. package/dist/urls.js +1 -1
  45. package/dist/utils.js +1 -1
  46. package/package.json +19 -21
package/dist/colors.d.ts CHANGED
@@ -3,12 +3,6 @@ export interface Code {
3
3
  close: string;
4
4
  regexp: RegExp;
5
5
  }
6
- /** RGB 8-bits per channel. Each in range `0->255` or `0x00->0xff` */
7
- export interface Rgb {
8
- r: number;
9
- g: number;
10
- b: number;
11
- }
12
6
  /**
13
7
  * Set changing text color to enabled or disabled
14
8
  * @param value
@@ -16,46 +10,16 @@ export interface Rgb {
16
10
  export declare function setColorEnabled(value: boolean): void;
17
11
  /** Get whether text color change is enabled or disabled. */
18
12
  export declare function getColorEnabled(): boolean;
19
- /**
20
- * Reset the text modified
21
- * @param str text to reset
22
- */
23
- export declare function reset(str: string): string;
24
13
  /**
25
14
  * Make the text bold.
26
15
  * @param str text to make bold
27
16
  */
28
17
  export declare function bold(str: string): string;
29
- /**
30
- * The text emits only a small amount of light.
31
- * @param str text to dim
32
- */
33
- export declare function dim(str: string): string;
34
18
  /**
35
19
  * Make the text italic.
36
20
  * @param str text to make italic
37
21
  */
38
22
  export declare function italic(str: string): string;
39
- /**
40
- * Make the text underline.
41
- * @param str text to underline
42
- */
43
- export declare function underline(str: string): string;
44
- /**
45
- * Invert background color and text color.
46
- * @param str text to invert its color
47
- */
48
- export declare function inverse(str: string): string;
49
- /**
50
- * Make the text hidden.
51
- * @param str text to hide
52
- */
53
- export declare function hidden(str: string): string;
54
- /**
55
- * Put horizontal line through the center of the text.
56
- * @param str text to strike through
57
- */
58
- export declare function strikethrough(str: string): string;
59
23
  /**
60
24
  * Set text color to black.
61
25
  * @param str text to make black
@@ -66,210 +30,24 @@ export declare function black(str: string): string;
66
30
  * @param str text to make red
67
31
  */
68
32
  export declare function red(str: string): string;
69
- /**
70
- * Set text color to green.
71
- * @param str text to make green
72
- */
73
- export declare function green(str: string): string;
74
33
  /**
75
34
  * Set text color to yellow.
76
35
  * @param str text to make yellow
77
36
  */
78
37
  export declare function yellow(str: string): string;
79
- /**
80
- * Set text color to blue.
81
- * @param str text to make blue
82
- */
83
- export declare function blue(str: string): string;
84
- /**
85
- * Set text color to magenta.
86
- * @param str text to make magenta
87
- */
88
- export declare function magenta(str: string): string;
89
38
  /**
90
39
  * Set text color to cyan.
91
40
  * @param str text to make cyan
92
41
  */
93
42
  export declare function cyan(str: string): string;
94
- /**
95
- * Set text color to white.
96
- * @param str text to make white
97
- */
98
- export declare function white(str: string): string;
99
- /**
100
- * Set text color to gray.
101
- * @param str text to make gray
102
- */
103
- export declare function gray(str: string): string;
104
43
  /**
105
44
  * Set text color to bright black.
106
45
  * @param str text to make bright-black
107
46
  */
108
- export declare function brightBlack(str: string): string;
109
- /**
110
- * Set text color to bright red.
111
- * @param str text to make bright-red
112
- */
113
- export declare function brightRed(str: string): string;
114
- /**
115
- * Set text color to bright green.
116
- * @param str text to make bright-green
117
- */
118
- export declare function brightGreen(str: string): string;
119
- /**
120
- * Set text color to bright yellow.
121
- * @param str text to make bright-yellow
122
- */
123
- export declare function brightYellow(str: string): string;
124
- /**
125
- * Set text color to bright blue.
126
- * @param str text to make bright-blue
127
- */
128
- export declare function brightBlue(str: string): string;
129
- /**
130
- * Set text color to bright magenta.
131
- * @param str text to make bright-magenta
132
- */
133
- export declare function brightMagenta(str: string): string;
134
- /**
135
- * Set text color to bright cyan.
136
- * @param str text to make bright-cyan
137
- */
138
- export declare function brightCyan(str: string): string;
139
- /**
140
- * Set text color to bright white.
141
- * @param str text to make bright-white
142
- */
143
- export declare function brightWhite(str: string): string;
144
- /**
145
- * Set background color to black.
146
- * @param str text to make its background black
147
- */
148
- export declare function bgBlack(str: string): string;
149
- /**
150
- * Set background color to red.
151
- * @param str text to make its background red
152
- */
153
- export declare function bgRed(str: string): string;
154
- /**
155
- * Set background color to green.
156
- * @param str text to make its background green
157
- */
158
- export declare function bgGreen(str: string): string;
159
- /**
160
- * Set background color to yellow.
161
- * @param str text to make its background yellow
162
- */
163
- export declare function bgYellow(str: string): string;
164
- /**
165
- * Set background color to blue.
166
- * @param str text to make its background blue
167
- */
168
- export declare function bgBlue(str: string): string;
169
- /**
170
- * Set background color to magenta.
171
- * @param str text to make its background magenta
172
- */
173
- export declare function bgMagenta(str: string): string;
174
- /**
175
- * Set background color to cyan.
176
- * @param str text to make its background cyan
177
- */
178
- export declare function bgCyan(str: string): string;
179
- /**
180
- * Set background color to white.
181
- * @param str text to make its background white
182
- */
183
- export declare function bgWhite(str: string): string;
184
- /**
185
- * Set background color to bright black.
186
- * @param str text to make its background bright-black
187
- */
188
- export declare function bgBrightBlack(str: string): string;
189
- /**
190
- * Set background color to bright red.
191
- * @param str text to make its background bright-red
192
- */
193
- export declare function bgBrightRed(str: string): string;
194
- /**
195
- * Set background color to bright green.
196
- * @param str text to make its background bright-green
197
- */
198
- export declare function bgBrightGreen(str: string): string;
199
- /**
200
- * Set background color to bright yellow.
201
- * @param str text to make its background bright-yellow
202
- */
203
- export declare function bgBrightYellow(str: string): string;
204
- /**
205
- * Set background color to bright blue.
206
- * @param str text to make its background bright-blue
207
- */
208
- export declare function bgBrightBlue(str: string): string;
47
+ export declare function gray(str: string): string;
209
48
  /**
210
49
  * Set background color to bright magenta.
211
50
  * @param str text to make its background bright-magenta
212
51
  */
213
52
  export declare function bgBrightMagenta(str: string): string;
214
- /**
215
- * Set background color to bright cyan.
216
- * @param str text to make its background bright-cyan
217
- */
218
- export declare function bgBrightCyan(str: string): string;
219
- /**
220
- * Set background color to bright white.
221
- * @param str text to make its background bright-white
222
- */
223
- export declare function bgBrightWhite(str: string): string;
224
- /**
225
- * Set text color using paletted 8bit colors.
226
- * https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
227
- * @param str text color to apply paletted 8bit colors to
228
- * @param color code
229
- */
230
- export declare function rgb8(str: string, color: number): string;
231
- /**
232
- * Set background color using paletted 8bit colors.
233
- * https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
234
- * @param str text color to apply paletted 8bit background colors to
235
- * @param color code
236
- */
237
- export declare function bgRgb8(str: string, color: number): string;
238
- /**
239
- * Set text color using 24bit rgb.
240
- * `color` can be a number in range `0x000000` to `0xffffff` or
241
- * an `Rgb`.
242
- *
243
- * To produce the color magenta:
244
- *
245
- * ```ts
246
- * import { rgb24 } from "./colors.ts";
247
- * rgb24("foo", 0xff00ff);
248
- * rgb24("foo", {r: 255, g: 0, b: 255});
249
- * ```
250
- * @param str text color to apply 24bit rgb to
251
- * @param color code
252
- */
253
- export declare function rgb24(str: string, color: number | Rgb): string;
254
- /**
255
- * Set background color using 24bit rgb.
256
- * `color` can be a number in range `0x000000` to `0xffffff` or
257
- * an `Rgb`.
258
- *
259
- * To produce the color magenta:
260
- *
261
- * ```ts
262
- * import { bgRgb24 } from "./colors.ts";
263
- * bgRgb24("foo", 0xff00ff);
264
- * bgRgb24("foo", {r: 255, g: 0, b: 255});
265
- * ```
266
- * @param str text color to apply 24bit rgb to
267
- * @param color code
268
- */
269
- export declare function bgRgb24(str: string, color: number | Rgb): string;
270
- /**
271
- * Remove ANSI escape codes from the string.
272
- * @param string to remove ANSI escape codes from
273
- */
274
- export declare function stripColor(string: string): string;
275
53
  //# sourceMappingURL=colors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,qEAAqE;AACrE,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAID;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,QAE7C;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAwBD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM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