custom-electron-titlebar 4.2.0-alpha.2 → 4.2.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.
Files changed (63) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +83 -65
  3. package/package.json +69 -58
  4. package/dist/enums/menu-state.d.ts +0 -6
  5. package/dist/index.d.ts +0 -3
  6. package/dist/index.js +0 -1
  7. package/dist/titlebar.d.ts +0 -143
  8. package/dist/types/menubar-options.d.ts +0 -41
  9. package/dist/types/scss.d.ts +0 -6
  10. package/dist/types/titlebar-options.d.ts +0 -66
  11. package/dist/utils/color.d.ts +0 -2
  12. package/dist/vs/base/browser/browser.d.ts +0 -40
  13. package/dist/vs/base/browser/canIUse.d.ts +0 -17
  14. package/dist/vs/base/browser/dom.d.ts +0 -325
  15. package/dist/vs/base/browser/event.d.ts +0 -27
  16. package/dist/vs/base/browser/fastDomNode.d.ts +0 -59
  17. package/dist/vs/base/browser/globalMouseMoveMonitor.d.ts +0 -29
  18. package/dist/vs/base/browser/iframe.d.ts +0 -33
  19. package/dist/vs/base/browser/keyboardEvent.d.ts +0 -42
  20. package/dist/vs/base/browser/mouseEvent.d.ts +0 -69
  21. package/dist/vs/base/browser/touch.d.ts +0 -39
  22. package/dist/vs/base/browser/ui/actionbar/actionViewItems.d.ts +0 -58
  23. package/dist/vs/base/browser/ui/actionbar/actionbar.d.ts +0 -95
  24. package/dist/vs/base/browser/ui/contextview/contextview.d.ts +0 -94
  25. package/dist/vs/base/browser/ui/menu/menu.d.ts +0 -58
  26. package/dist/vs/base/browser/ui/menu/menubar.d.ts +0 -78
  27. package/dist/vs/base/browser/ui/scrollbar/abstractScrollbar.d.ts +0 -67
  28. package/dist/vs/base/browser/ui/scrollbar/horizontalScrollbar.d.ts +0 -15
  29. package/dist/vs/base/browser/ui/scrollbar/scrollableElement.d.ts +0 -107
  30. package/dist/vs/base/browser/ui/scrollbar/scrollableElementOptions.d.ts +0 -157
  31. package/dist/vs/base/browser/ui/scrollbar/scrollbarArrow.d.ts +0 -25
  32. package/dist/vs/base/browser/ui/scrollbar/scrollbarState.d.ts +0 -75
  33. package/dist/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.d.ts +0 -24
  34. package/dist/vs/base/browser/ui/scrollbar/verticalScrollbar.d.ts +0 -15
  35. package/dist/vs/base/browser/ui/widget.d.ts +0 -16
  36. package/dist/vs/base/common/actions.d.ts +0 -115
  37. package/dist/vs/base/common/arrays.d.ts +0 -168
  38. package/dist/vs/base/common/async.d.ts +0 -510
  39. package/dist/vs/base/common/cache.d.ts +0 -23
  40. package/dist/vs/base/common/cancellation.d.ts +0 -29
  41. package/dist/vs/base/common/charCode.d.ts +0 -405
  42. package/dist/vs/base/common/color.d.ts +0 -159
  43. package/dist/vs/base/common/decorators.d.ts +0 -7
  44. package/dist/vs/base/common/errors.d.ts +0 -77
  45. package/dist/vs/base/common/event.d.ts +0 -274
  46. package/dist/vs/base/common/functional.d.ts +0 -1
  47. package/dist/vs/base/common/iterator.d.ts +0 -31
  48. package/dist/vs/base/common/keyCodes.d.ts +0 -429
  49. package/dist/vs/base/common/keybindings.d.ts +0 -99
  50. package/dist/vs/base/common/lazy.d.ts +0 -19
  51. package/dist/vs/base/common/lifecycle.d.ts +0 -129
  52. package/dist/vs/base/common/linkedList.d.ts +0 -15
  53. package/dist/vs/base/common/platform.d.ts +0 -85
  54. package/dist/vs/base/common/range.d.ts +0 -18
  55. package/dist/vs/base/common/scrollable.d.ts +0 -141
  56. package/dist/vs/base/common/strings.d.ts +0 -215
  57. package/dist/vs/base/common/types.d.ts +0 -89
  58. package/dist/vs/base/common/uint.d.ts +0 -31
  59. package/dist/vs/nls.d.ts +0 -18
  60. package/main/attach-titlebar-to-window.d.ts +0 -3
  61. package/main/index.d.ts +0 -5
  62. package/main/main.js +0 -1
  63. package/main/setup-main.d.ts +0 -2
@@ -1,23 +0,0 @@
1
- import { CancellationToken } from 'vs/base/common/cancellation';
2
- import { IDisposable } from 'vs/base/common/lifecycle';
3
- export interface CacheResult<T> extends IDisposable {
4
- promise: Promise<T>;
5
- }
6
- export declare class Cache<T> {
7
- private task;
8
- private result;
9
- constructor(task: (ct: CancellationToken) => Promise<T>);
10
- get(): CacheResult<T>;
11
- }
12
- /**
13
- * Uses a LRU cache to make a given parametrized function cached.
14
- * Caches just the last value.
15
- * The key must be JSON serializable.
16
- */
17
- export declare class LRUCachedComputed<TArg, TComputed> {
18
- private readonly computeFn;
19
- private lastCache;
20
- private lastArgKey;
21
- constructor(computeFn: (arg: TArg) => TComputed);
22
- get(arg: TArg): TComputed;
23
- }
@@ -1,29 +0,0 @@
1
- import { IDisposable } from 'vs/base/common/lifecycle';
2
- export interface CancellationToken {
3
- /**
4
- * A flag signalling is cancellation has been requested.
5
- */
6
- readonly isCancellationRequested: boolean;
7
- /**
8
- * An event which fires when cancellation is requested. This event
9
- * only ever fires `once` as cancellation can only happen once. Listeners
10
- * that are registered after cancellation will be called (next event loop run),
11
- * but also only once.
12
- *
13
- * @event
14
- */
15
- readonly onCancellationRequested: (listener: (e: any) => any, thisArgs?: any, disposables?: IDisposable[]) => IDisposable;
16
- }
17
- export declare namespace CancellationToken {
18
- function isCancellationToken(thing: unknown): thing is CancellationToken;
19
- const None: CancellationToken;
20
- const Cancelled: CancellationToken;
21
- }
22
- export declare class CancellationTokenSource {
23
- private _token?;
24
- private _parentListener?;
25
- constructor(parent?: CancellationToken);
26
- get token(): CancellationToken;
27
- cancel(): void;
28
- dispose(cancel?: boolean): void;
29
- }
@@ -1,405 +0,0 @@
1
- /**
2
- * An inlined enum containing useful character codes (to be used with String.charCodeAt).
3
- * Please leave the const keyword such that it gets inlined when compiled to JavaScript!
4
- */
5
- export declare const enum CharCode {
6
- Null = 0,
7
- /**
8
- * The `\b` character.
9
- */
10
- Backspace = 8,
11
- /**
12
- * The `\t` character.
13
- */
14
- Tab = 9,
15
- /**
16
- * The `\n` character.
17
- */
18
- LineFeed = 10,
19
- /**
20
- * The `\r` character.
21
- */
22
- CarriageReturn = 13,
23
- Space = 32,
24
- /**
25
- * The `!` character.
26
- */
27
- ExclamationMark = 33,
28
- /**
29
- * The `"` character.
30
- */
31
- DoubleQuote = 34,
32
- /**
33
- * The `#` character.
34
- */
35
- Hash = 35,
36
- /**
37
- * The `$` character.
38
- */
39
- DollarSign = 36,
40
- /**
41
- * The `%` character.
42
- */
43
- PercentSign = 37,
44
- /**
45
- * The `&` character.
46
- */
47
- Ampersand = 38,
48
- /**
49
- * The `'` character.
50
- */
51
- SingleQuote = 39,
52
- /**
53
- * The `(` character.
54
- */
55
- OpenParen = 40,
56
- /**
57
- * The `)` character.
58
- */
59
- CloseParen = 41,
60
- /**
61
- * The `*` character.
62
- */
63
- Asterisk = 42,
64
- /**
65
- * The `+` character.
66
- */
67
- Plus = 43,
68
- /**
69
- * The `,` character.
70
- */
71
- Comma = 44,
72
- /**
73
- * The `-` character.
74
- */
75
- Dash = 45,
76
- /**
77
- * The `.` character.
78
- */
79
- Period = 46,
80
- /**
81
- * The `/` character.
82
- */
83
- Slash = 47,
84
- Digit0 = 48,
85
- Digit1 = 49,
86
- Digit2 = 50,
87
- Digit3 = 51,
88
- Digit4 = 52,
89
- Digit5 = 53,
90
- Digit6 = 54,
91
- Digit7 = 55,
92
- Digit8 = 56,
93
- Digit9 = 57,
94
- /**
95
- * The `:` character.
96
- */
97
- Colon = 58,
98
- /**
99
- * The `;` character.
100
- */
101
- Semicolon = 59,
102
- /**
103
- * The `<` character.
104
- */
105
- LessThan = 60,
106
- /**
107
- * The `=` character.
108
- */
109
- Equals = 61,
110
- /**
111
- * The `>` character.
112
- */
113
- GreaterThan = 62,
114
- /**
115
- * The `?` character.
116
- */
117
- QuestionMark = 63,
118
- /**
119
- * The `@` character.
120
- */
121
- AtSign = 64,
122
- A = 65,
123
- B = 66,
124
- C = 67,
125
- D = 68,
126
- E = 69,
127
- F = 70,
128
- G = 71,
129
- H = 72,
130
- I = 73,
131
- J = 74,
132
- K = 75,
133
- L = 76,
134
- M = 77,
135
- N = 78,
136
- O = 79,
137
- P = 80,
138
- Q = 81,
139
- R = 82,
140
- S = 83,
141
- T = 84,
142
- U = 85,
143
- V = 86,
144
- W = 87,
145
- X = 88,
146
- Y = 89,
147
- Z = 90,
148
- /**
149
- * The `[` character.
150
- */
151
- OpenSquareBracket = 91,
152
- /**
153
- * The `\` character.
154
- */
155
- Backslash = 92,
156
- /**
157
- * The `]` character.
158
- */
159
- CloseSquareBracket = 93,
160
- /**
161
- * The `^` character.
162
- */
163
- Caret = 94,
164
- /**
165
- * The `_` character.
166
- */
167
- Underline = 95,
168
- /**
169
- * The ``(`)`` character.
170
- */
171
- BackTick = 96,
172
- a = 97,
173
- b = 98,
174
- c = 99,
175
- d = 100,
176
- e = 101,
177
- f = 102,
178
- g = 103,
179
- h = 104,
180
- i = 105,
181
- j = 106,
182
- k = 107,
183
- l = 108,
184
- m = 109,
185
- n = 110,
186
- o = 111,
187
- p = 112,
188
- q = 113,
189
- r = 114,
190
- s = 115,
191
- t = 116,
192
- u = 117,
193
- v = 118,
194
- w = 119,
195
- x = 120,
196
- y = 121,
197
- z = 122,
198
- /**
199
- * The `{` character.
200
- */
201
- OpenCurlyBrace = 123,
202
- /**
203
- * The `|` character.
204
- */
205
- Pipe = 124,
206
- /**
207
- * The `}` character.
208
- */
209
- CloseCurlyBrace = 125,
210
- /**
211
- * The `~` character.
212
- */
213
- Tilde = 126,
214
- U_Combining_Grave_Accent = 768,
215
- U_Combining_Acute_Accent = 769,
216
- U_Combining_Circumflex_Accent = 770,
217
- U_Combining_Tilde = 771,
218
- U_Combining_Macron = 772,
219
- U_Combining_Overline = 773,
220
- U_Combining_Breve = 774,
221
- U_Combining_Dot_Above = 775,
222
- U_Combining_Diaeresis = 776,
223
- U_Combining_Hook_Above = 777,
224
- U_Combining_Ring_Above = 778,
225
- U_Combining_Double_Acute_Accent = 779,
226
- U_Combining_Caron = 780,
227
- U_Combining_Vertical_Line_Above = 781,
228
- U_Combining_Double_Vertical_Line_Above = 782,
229
- U_Combining_Double_Grave_Accent = 783,
230
- U_Combining_Candrabindu = 784,
231
- U_Combining_Inverted_Breve = 785,
232
- U_Combining_Turned_Comma_Above = 786,
233
- U_Combining_Comma_Above = 787,
234
- U_Combining_Reversed_Comma_Above = 788,
235
- U_Combining_Comma_Above_Right = 789,
236
- U_Combining_Grave_Accent_Below = 790,
237
- U_Combining_Acute_Accent_Below = 791,
238
- U_Combining_Left_Tack_Below = 792,
239
- U_Combining_Right_Tack_Below = 793,
240
- U_Combining_Left_Angle_Above = 794,
241
- U_Combining_Horn = 795,
242
- U_Combining_Left_Half_Ring_Below = 796,
243
- U_Combining_Up_Tack_Below = 797,
244
- U_Combining_Down_Tack_Below = 798,
245
- U_Combining_Plus_Sign_Below = 799,
246
- U_Combining_Minus_Sign_Below = 800,
247
- U_Combining_Palatalized_Hook_Below = 801,
248
- U_Combining_Retroflex_Hook_Below = 802,
249
- U_Combining_Dot_Below = 803,
250
- U_Combining_Diaeresis_Below = 804,
251
- U_Combining_Ring_Below = 805,
252
- U_Combining_Comma_Below = 806,
253
- U_Combining_Cedilla = 807,
254
- U_Combining_Ogonek = 808,
255
- U_Combining_Vertical_Line_Below = 809,
256
- U_Combining_Bridge_Below = 810,
257
- U_Combining_Inverted_Double_Arch_Below = 811,
258
- U_Combining_Caron_Below = 812,
259
- U_Combining_Circumflex_Accent_Below = 813,
260
- U_Combining_Breve_Below = 814,
261
- U_Combining_Inverted_Breve_Below = 815,
262
- U_Combining_Tilde_Below = 816,
263
- U_Combining_Macron_Below = 817,
264
- U_Combining_Low_Line = 818,
265
- U_Combining_Double_Low_Line = 819,
266
- U_Combining_Tilde_Overlay = 820,
267
- U_Combining_Short_Stroke_Overlay = 821,
268
- U_Combining_Long_Stroke_Overlay = 822,
269
- U_Combining_Short_Solidus_Overlay = 823,
270
- U_Combining_Long_Solidus_Overlay = 824,
271
- U_Combining_Right_Half_Ring_Below = 825,
272
- U_Combining_Inverted_Bridge_Below = 826,
273
- U_Combining_Square_Below = 827,
274
- U_Combining_Seagull_Below = 828,
275
- U_Combining_X_Above = 829,
276
- U_Combining_Vertical_Tilde = 830,
277
- U_Combining_Double_Overline = 831,
278
- U_Combining_Grave_Tone_Mark = 832,
279
- U_Combining_Acute_Tone_Mark = 833,
280
- U_Combining_Greek_Perispomeni = 834,
281
- U_Combining_Greek_Koronis = 835,
282
- U_Combining_Greek_Dialytika_Tonos = 836,
283
- U_Combining_Greek_Ypogegrammeni = 837,
284
- U_Combining_Bridge_Above = 838,
285
- U_Combining_Equals_Sign_Below = 839,
286
- U_Combining_Double_Vertical_Line_Below = 840,
287
- U_Combining_Left_Angle_Below = 841,
288
- U_Combining_Not_Tilde_Above = 842,
289
- U_Combining_Homothetic_Above = 843,
290
- U_Combining_Almost_Equal_To_Above = 844,
291
- U_Combining_Left_Right_Arrow_Below = 845,
292
- U_Combining_Upwards_Arrow_Below = 846,
293
- U_Combining_Grapheme_Joiner = 847,
294
- U_Combining_Right_Arrowhead_Above = 848,
295
- U_Combining_Left_Half_Ring_Above = 849,
296
- U_Combining_Fermata = 850,
297
- U_Combining_X_Below = 851,
298
- U_Combining_Left_Arrowhead_Below = 852,
299
- U_Combining_Right_Arrowhead_Below = 853,
300
- U_Combining_Right_Arrowhead_And_Up_Arrowhead_Below = 854,
301
- U_Combining_Right_Half_Ring_Above = 855,
302
- U_Combining_Dot_Above_Right = 856,
303
- U_Combining_Asterisk_Below = 857,
304
- U_Combining_Double_Ring_Below = 858,
305
- U_Combining_Zigzag_Above = 859,
306
- U_Combining_Double_Breve_Below = 860,
307
- U_Combining_Double_Breve = 861,
308
- U_Combining_Double_Macron = 862,
309
- U_Combining_Double_Macron_Below = 863,
310
- U_Combining_Double_Tilde = 864,
311
- U_Combining_Double_Inverted_Breve = 865,
312
- U_Combining_Double_Rightwards_Arrow_Below = 866,
313
- U_Combining_Latin_Small_Letter_A = 867,
314
- U_Combining_Latin_Small_Letter_E = 868,
315
- U_Combining_Latin_Small_Letter_I = 869,
316
- U_Combining_Latin_Small_Letter_O = 870,
317
- U_Combining_Latin_Small_Letter_U = 871,
318
- U_Combining_Latin_Small_Letter_C = 872,
319
- U_Combining_Latin_Small_Letter_D = 873,
320
- U_Combining_Latin_Small_Letter_H = 874,
321
- U_Combining_Latin_Small_Letter_M = 875,
322
- U_Combining_Latin_Small_Letter_R = 876,
323
- U_Combining_Latin_Small_Letter_T = 877,
324
- U_Combining_Latin_Small_Letter_V = 878,
325
- U_Combining_Latin_Small_Letter_X = 879,
326
- /**
327
- * Unicode Character 'LINE SEPARATOR' (U+2028)
328
- * http://www.fileformat.info/info/unicode/char/2028/index.htm
329
- */
330
- LINE_SEPARATOR_2028 = 8232,
331
- U_CIRCUMFLEX = 94,
332
- U_GRAVE_ACCENT = 96,
333
- U_DIAERESIS = 168,
334
- U_MACRON = 175,
335
- U_ACUTE_ACCENT = 180,
336
- U_CEDILLA = 184,
337
- U_MODIFIER_LETTER_LEFT_ARROWHEAD = 706,
338
- U_MODIFIER_LETTER_RIGHT_ARROWHEAD = 707,
339
- U_MODIFIER_LETTER_UP_ARROWHEAD = 708,
340
- U_MODIFIER_LETTER_DOWN_ARROWHEAD = 709,
341
- U_MODIFIER_LETTER_CENTRED_RIGHT_HALF_RING = 722,
342
- U_MODIFIER_LETTER_CENTRED_LEFT_HALF_RING = 723,
343
- U_MODIFIER_LETTER_UP_TACK = 724,
344
- U_MODIFIER_LETTER_DOWN_TACK = 725,
345
- U_MODIFIER_LETTER_PLUS_SIGN = 726,
346
- U_MODIFIER_LETTER_MINUS_SIGN = 727,
347
- U_BREVE = 728,
348
- U_DOT_ABOVE = 729,
349
- U_RING_ABOVE = 730,
350
- U_OGONEK = 731,
351
- U_SMALL_TILDE = 732,
352
- U_DOUBLE_ACUTE_ACCENT = 733,
353
- U_MODIFIER_LETTER_RHOTIC_HOOK = 734,
354
- U_MODIFIER_LETTER_CROSS_ACCENT = 735,
355
- U_MODIFIER_LETTER_EXTRA_HIGH_TONE_BAR = 741,
356
- U_MODIFIER_LETTER_HIGH_TONE_BAR = 742,
357
- U_MODIFIER_LETTER_MID_TONE_BAR = 743,
358
- U_MODIFIER_LETTER_LOW_TONE_BAR = 744,
359
- U_MODIFIER_LETTER_EXTRA_LOW_TONE_BAR = 745,
360
- U_MODIFIER_LETTER_YIN_DEPARTING_TONE_MARK = 746,
361
- U_MODIFIER_LETTER_YANG_DEPARTING_TONE_MARK = 747,
362
- U_MODIFIER_LETTER_UNASPIRATED = 749,
363
- U_MODIFIER_LETTER_LOW_DOWN_ARROWHEAD = 751,
364
- U_MODIFIER_LETTER_LOW_UP_ARROWHEAD = 752,
365
- U_MODIFIER_LETTER_LOW_LEFT_ARROWHEAD = 753,
366
- U_MODIFIER_LETTER_LOW_RIGHT_ARROWHEAD = 754,
367
- U_MODIFIER_LETTER_LOW_RING = 755,
368
- U_MODIFIER_LETTER_MIDDLE_GRAVE_ACCENT = 756,
369
- U_MODIFIER_LETTER_MIDDLE_DOUBLE_GRAVE_ACCENT = 757,
370
- U_MODIFIER_LETTER_MIDDLE_DOUBLE_ACUTE_ACCENT = 758,
371
- U_MODIFIER_LETTER_LOW_TILDE = 759,
372
- U_MODIFIER_LETTER_RAISED_COLON = 760,
373
- U_MODIFIER_LETTER_BEGIN_HIGH_TONE = 761,
374
- U_MODIFIER_LETTER_END_HIGH_TONE = 762,
375
- U_MODIFIER_LETTER_BEGIN_LOW_TONE = 763,
376
- U_MODIFIER_LETTER_END_LOW_TONE = 764,
377
- U_MODIFIER_LETTER_SHELF = 765,
378
- U_MODIFIER_LETTER_OPEN_SHELF = 766,
379
- U_MODIFIER_LETTER_LOW_LEFT_ARROW = 767,
380
- U_GREEK_LOWER_NUMERAL_SIGN = 885,
381
- U_GREEK_TONOS = 900,
382
- U_GREEK_DIALYTIKA_TONOS = 901,
383
- U_GREEK_KORONIS = 8125,
384
- U_GREEK_PSILI = 8127,
385
- U_GREEK_PERISPOMENI = 8128,
386
- U_GREEK_DIALYTIKA_AND_PERISPOMENI = 8129,
387
- U_GREEK_PSILI_AND_VARIA = 8141,
388
- U_GREEK_PSILI_AND_OXIA = 8142,
389
- U_GREEK_PSILI_AND_PERISPOMENI = 8143,
390
- U_GREEK_DASIA_AND_VARIA = 8157,
391
- U_GREEK_DASIA_AND_OXIA = 8158,
392
- U_GREEK_DASIA_AND_PERISPOMENI = 8159,
393
- U_GREEK_DIALYTIKA_AND_VARIA = 8173,
394
- U_GREEK_DIALYTIKA_AND_OXIA = 8174,
395
- U_GREEK_VARIA = 8175,
396
- U_GREEK_OXIA = 8189,
397
- U_GREEK_DASIA = 8190,
398
- U_OVERLINE = 8254,
399
- /**
400
- * UTF-8 BOM
401
- * Unicode Character 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF)
402
- * http://www.fileformat.info/info/unicode/char/feff/index.htm
403
- */
404
- UTF8_BOM = 65279
405
- }
@@ -1,159 +0,0 @@
1
- export declare class RGBA {
2
- /**
3
- * Red: integer in [0-255]
4
- */
5
- readonly r: number;
6
- /**
7
- * Green: integer in [0-255]
8
- */
9
- readonly g: number;
10
- /**
11
- * Blue: integer in [0-255]
12
- */
13
- readonly b: number;
14
- /**
15
- * Alpha: float in [0-1]
16
- */
17
- readonly a: number;
18
- constructor(r: number, g: number, b: number, a?: number);
19
- static equals(a: RGBA, b: RGBA): boolean;
20
- }
21
- export declare class HSLA {
22
- /**
23
- * Hue: integer in [0, 360]
24
- */
25
- readonly h: number;
26
- /**
27
- * Saturation: float in [0, 1]
28
- */
29
- readonly s: number;
30
- /**
31
- * Luminosity: float in [0, 1]
32
- */
33
- readonly l: number;
34
- /**
35
- * Alpha: float in [0, 1]
36
- */
37
- readonly a: number;
38
- constructor(h: number, s: number, l: number, a: number);
39
- static equals(a: HSLA, b: HSLA): boolean;
40
- /**
41
- * Converts an RGB color value to HSL. Conversion formula
42
- * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
43
- * Assumes r, g, and b are contained in the set [0, 255] and
44
- * returns h in the set [0, 360], s, and l in the set [0, 1].
45
- */
46
- static fromRGBA(rgba: RGBA): HSLA;
47
- private static _hue2rgb;
48
- /**
49
- * Converts an HSL color value to RGB. Conversion formula
50
- * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
51
- * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and
52
- * returns r, g, and b in the set [0, 255].
53
- */
54
- static toRGBA(hsla: HSLA): RGBA;
55
- }
56
- export declare class HSVA {
57
- /**
58
- * Hue: integer in [0, 360]
59
- */
60
- readonly h: number;
61
- /**
62
- * Saturation: float in [0, 1]
63
- */
64
- readonly s: number;
65
- /**
66
- * Value: float in [0, 1]
67
- */
68
- readonly v: number;
69
- /**
70
- * Alpha: float in [0, 1]
71
- */
72
- readonly a: number;
73
- constructor(h: number, s: number, v: number, a: number);
74
- static equals(a: HSVA, b: HSVA): boolean;
75
- static fromRGBA(rgba: RGBA): HSVA;
76
- static toRGBA(hsva: HSVA): RGBA;
77
- }
78
- export declare class Color {
79
- static fromHex(hex: string): Color;
80
- readonly rgba: RGBA;
81
- private _hsla?;
82
- get hsla(): HSLA;
83
- private _hsva?;
84
- get hsva(): HSVA;
85
- constructor(arg: RGBA | HSLA | HSVA);
86
- equals(other: Color): boolean;
87
- /**
88
- * http://www.w3.org/TR/WCAG20/#relativeluminancedef
89
- * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.
90
- */
91
- getRelativeLuminance(): number;
92
- private static _relativeLuminanceForComponent;
93
- /**
94
- * http://www.w3.org/TR/WCAG20/#contrast-ratiodef
95
- * Returns the contrast ration number in the set [1, 21].
96
- */
97
- getContrastRatio(another: Color): number;
98
- /**
99
- * http://24ways.org/2010/calculating-color-contrast
100
- * Return 'true' if darker color otherwise 'false'
101
- */
102
- isDarker(): boolean;
103
- /**
104
- * http://24ways.org/2010/calculating-color-contrast
105
- * Return 'true' if lighter color otherwise 'false'
106
- */
107
- isLighter(): boolean;
108
- isLighterThan(another: Color): boolean;
109
- isDarkerThan(another: Color): boolean;
110
- lighten(factor: number): Color;
111
- darken(factor: number): Color;
112
- transparent(factor: number): Color;
113
- isTransparent(): boolean;
114
- isOpaque(): boolean;
115
- opposite(): Color;
116
- blend(c: Color): Color;
117
- flatten(...backgrounds: Color[]): Color;
118
- private static _flatten;
119
- toString(): string;
120
- static getLighterColor(of: Color, relative: Color, factor?: number): Color;
121
- static getDarkerColor(of: Color, relative: Color, factor?: number): Color;
122
- static readonly WHITE: Color;
123
- static readonly BLACK: Color;
124
- static readonly RED: Color;
125
- static readonly BLUE: Color;
126
- static readonly GREEN: Color;
127
- static readonly CYAN: Color;
128
- static readonly LIGHTGREY: Color;
129
- static readonly TRANSPARENT: Color;
130
- }
131
- export declare namespace Color {
132
- namespace Format {
133
- namespace CSS {
134
- function formatRGB(color: Color): string;
135
- function formatRGBA(color: Color): string;
136
- function formatHSL(color: Color): string;
137
- function formatHSLA(color: Color): string;
138
- /**
139
- * Formats the color as #RRGGBB
140
- */
141
- function formatHex(color: Color): string;
142
- /**
143
- * Formats the color as #RRGGBBAA
144
- * If 'compact' is set, colors without transparancy will be printed as #RRGGBB
145
- */
146
- function formatHexA(color: Color, compact?: boolean): string;
147
- /**
148
- * The default format will use HEX if opaque and RGBA otherwise.
149
- */
150
- function format(color: Color): string | null;
151
- /**
152
- * Converts an Hex color value to a Color.
153
- * returns r, g, and b are contained in the set [0, 255]
154
- * @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA).
155
- */
156
- function parseHex(hex: string): Color | null;
157
- }
158
- }
159
- }
@@ -1,7 +0,0 @@
1
- export declare function createDecorator(mapFn: (fn: Function, key: string) => Function): Function;
2
- export declare function memoize(_target: any, key: string, descriptor: any): void;
3
- export interface IDebounceReducer<T> {
4
- (previousValue: T, ...args: any[]): T;
5
- }
6
- export declare function debounce<T>(delay: number, reducer?: IDebounceReducer<T>, initialValueProvider?: () => T): Function;
7
- export declare function throttle<T>(delay: number, reducer?: IDebounceReducer<T>, initialValueProvider?: () => T): Function;
@@ -1,77 +0,0 @@
1
- export interface ErrorListenerCallback {
2
- (error: any): void;
3
- }
4
- export interface ErrorListenerUnbind {
5
- (): void;
6
- }
7
- export declare class ErrorHandler {
8
- private unexpectedErrorHandler;
9
- private listeners;
10
- constructor();
11
- addListener(listener: ErrorListenerCallback): ErrorListenerUnbind;
12
- private emit;
13
- private _removeListener;
14
- setUnexpectedErrorHandler(newUnexpectedErrorHandler: (e: any) => void): void;
15
- getUnexpectedErrorHandler(): (e: any) => void;
16
- onUnexpectedError(e: any): void;
17
- onUnexpectedExternalError(e: any): void;
18
- }
19
- export declare const errorHandler: ErrorHandler;
20
- export declare function setUnexpectedErrorHandler(newUnexpectedErrorHandler: (e: any) => void): void;
21
- export declare function onUnexpectedError(e: any): undefined;
22
- export declare function onUnexpectedExternalError(e: any): undefined;
23
- export interface SerializedError {
24
- readonly $isError: true;
25
- readonly name: string;
26
- readonly message: string;
27
- readonly stack: string;
28
- }
29
- export declare function transformErrorForSerialization(error: Error): SerializedError;
30
- export declare function transformErrorForSerialization(error: any): any;
31
- export interface V8CallSite {
32
- getThis(): any;
33
- getTypeName(): string;
34
- getFunction(): string;
35
- getFunctionName(): string;
36
- getMethodName(): string;
37
- getFileName(): string;
38
- getLineNumber(): number;
39
- getColumnNumber(): number;
40
- getEvalOrigin(): string;
41
- isToplevel(): boolean;
42
- isEval(): boolean;
43
- isNative(): boolean;
44
- isConstructor(): boolean;
45
- toString(): string;
46
- }
47
- /**
48
- * Checks if the given error is a promise in canceled state
49
- */
50
- export declare function isCancellationError(error: any): boolean;
51
- export declare class CancellationError extends Error {
52
- constructor();
53
- }
54
- /**
55
- * @deprecated use {@link CancellationError `new CancellationError()`} instead
56
- */
57
- export declare function canceled(): Error;
58
- export declare function illegalArgument(name?: string): Error;
59
- export declare function illegalState(name?: string): Error;
60
- export declare function readonly(name?: string): Error;
61
- export declare function disposed(what: string): Error;
62
- export declare function getErrorMessage(err: any): string;
63
- export declare class NotImplementedError extends Error {
64
- constructor(message?: string);
65
- }
66
- export declare class NotSupportedError extends Error {
67
- constructor(message?: string);
68
- }
69
- export declare class ExpectedError extends Error {
70
- readonly isExpected = true;
71
- }
72
- /**
73
- * Error that when thrown won't be logged in telemetry as an unhandled error.
74
- */
75
- export declare class ErrorNoTelemetry extends Error {
76
- readonly logTelemetry = false;
77
- }