custom-electron-titlebar 4.2.6 → 4.2.8

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/README.md CHANGED
@@ -7,29 +7,35 @@ This project is a typescript library for electron that allows you to configure a
7
7
  [![NPM](https://badgen.net/npm/v/custom-electron-titlebar?label=NPM)](https://npmjs.org/package/custom-electron-titlebar)
8
8
  [![Install size](https://badgen.net/packagephobia/install/custom-electron-titlebar?label=Install%20size)](https://packagephobia.com/result?p=custom-electron-titlebar)
9
9
 
10
- [📄 Visit Documentation](https://cet.alextrs.dev)
10
+ [📄 Documentation](https://github.com/AlexTorresDev/custom-electron-titlebar/wiki)
11
11
 
12
- Standard Title Bar
12
+ ### Standard Title Bar
13
13
 
14
- ![Screenshot 1](screenshots/cet-1.png)
14
+ ![Screenshot 1](screenshots/70shots_so.jpg)
15
15
 
16
- Bottom Menu Bar
16
+ ### Bottom Menu Bar
17
17
 
18
- ![Screenshot 2](screenshots/cet-2.png)
18
+ ![Screenshot 2](screenshots/544shots_so.jpg)
19
19
 
20
- Menu
20
+ ### Menu
21
21
 
22
- ![Screenshot 3](screenshots/cet-3.png)
22
+ ![Screenshot 3](screenshots/780shots_so.jpg)
23
23
 
24
- Custom color
24
+ ### Custom color
25
25
 
26
- ![Screenshot 4](screenshots/cet-4.png)
26
+ ![Screenshot 4](screenshots/262shots_so.jpg)
27
27
 
28
28
  # 📦 Installing
29
- You can install this package with `npm`.
29
+ You can install this package with `npm`, `pnpm` or `yarn`.
30
30
  ```sh
31
31
  npm install custom-electron-titlebar
32
32
  ```
33
+ ```sh
34
+ pnpm add custom-electron-titlebar
35
+ ```
36
+ ```sh
37
+ yarn add custom-electron-titlebar
38
+ ```
33
39
 
34
40
  # 🛠️ Usage
35
41
  The implementation is done as follows:
@@ -46,8 +52,10 @@ function createWindow() {
46
52
  const mainWindow = new BrowserWindow({
47
53
  width: 800,
48
54
  height: 600,
49
- titleBarStyle: 'hidden',
50
55
  //frame: false, // needed if process.versions.electron < 14
56
+ titleBarStyle: 'hidden',
57
+ /* You can use *titleBarOverlay: true* to use the original Windows controls */
58
+ titleBarOverlay: true,
51
59
  webPreferences: {
52
60
  sandbox: false,
53
61
  preload: path.join(__dirname, 'preload.js')
@@ -174,7 +174,6 @@ const INVERSE_KEY_CODE_MAP = new Array(112 /* KeyCode.MAX_VALUE */);
174
174
  define(92, 57 /* KeyCode.Meta */);
175
175
  }
176
176
  })();
177
-
178
177
  function extractKeyCode(e) {
179
178
  if (e.charCode) {
180
179
  // "keypress" events mostly
@@ -183,7 +182,6 @@ function extractKeyCode(e) {
183
182
  }
184
183
  return _get__("KEY_CODE_MAP")[e.keyCode] || 0 /* KeyCode.Unknown */;
185
184
  }
186
-
187
185
  function getCodeForKeyCode(keyCode) {
188
186
  return _get__("INVERSE_KEY_CODE_MAP")[keyCode];
189
187
  }
@@ -211,191 +211,191 @@ export declare const enum CharCode {
211
211
  * The `~` character.
212
212
  */
213
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,
214
+ U_Combining_Grave_Accent = 768,// U+0300 Combining Grave Accent
215
+ U_Combining_Acute_Accent = 769,// U+0301 Combining Acute Accent
216
+ U_Combining_Circumflex_Accent = 770,// U+0302 Combining Circumflex Accent
217
+ U_Combining_Tilde = 771,// U+0303 Combining Tilde
218
+ U_Combining_Macron = 772,// U+0304 Combining Macron
219
+ U_Combining_Overline = 773,// U+0305 Combining Overline
220
+ U_Combining_Breve = 774,// U+0306 Combining Breve
221
+ U_Combining_Dot_Above = 775,// U+0307 Combining Dot Above
222
+ U_Combining_Diaeresis = 776,// U+0308 Combining Diaeresis
223
+ U_Combining_Hook_Above = 777,// U+0309 Combining Hook Above
224
+ U_Combining_Ring_Above = 778,// U+030A Combining Ring Above
225
+ U_Combining_Double_Acute_Accent = 779,// U+030B Combining Double Acute Accent
226
+ U_Combining_Caron = 780,// U+030C Combining Caron
227
+ U_Combining_Vertical_Line_Above = 781,// U+030D Combining Vertical Line Above
228
+ U_Combining_Double_Vertical_Line_Above = 782,// U+030E Combining Double Vertical Line Above
229
+ U_Combining_Double_Grave_Accent = 783,// U+030F Combining Double Grave Accent
230
+ U_Combining_Candrabindu = 784,// U+0310 Combining Candrabindu
231
+ U_Combining_Inverted_Breve = 785,// U+0311 Combining Inverted Breve
232
+ U_Combining_Turned_Comma_Above = 786,// U+0312 Combining Turned Comma Above
233
+ U_Combining_Comma_Above = 787,// U+0313 Combining Comma Above
234
+ U_Combining_Reversed_Comma_Above = 788,// U+0314 Combining Reversed Comma Above
235
+ U_Combining_Comma_Above_Right = 789,// U+0315 Combining Comma Above Right
236
+ U_Combining_Grave_Accent_Below = 790,// U+0316 Combining Grave Accent Below
237
+ U_Combining_Acute_Accent_Below = 791,// U+0317 Combining Acute Accent Below
238
+ U_Combining_Left_Tack_Below = 792,// U+0318 Combining Left Tack Below
239
+ U_Combining_Right_Tack_Below = 793,// U+0319 Combining Right Tack Below
240
+ U_Combining_Left_Angle_Above = 794,// U+031A Combining Left Angle Above
241
+ U_Combining_Horn = 795,// U+031B Combining Horn
242
+ U_Combining_Left_Half_Ring_Below = 796,// U+031C Combining Left Half Ring Below
243
+ U_Combining_Up_Tack_Below = 797,// U+031D Combining Up Tack Below
244
+ U_Combining_Down_Tack_Below = 798,// U+031E Combining Down Tack Below
245
+ U_Combining_Plus_Sign_Below = 799,// U+031F Combining Plus Sign Below
246
+ U_Combining_Minus_Sign_Below = 800,// U+0320 Combining Minus Sign Below
247
+ U_Combining_Palatalized_Hook_Below = 801,// U+0321 Combining Palatalized Hook Below
248
+ U_Combining_Retroflex_Hook_Below = 802,// U+0322 Combining Retroflex Hook Below
249
+ U_Combining_Dot_Below = 803,// U+0323 Combining Dot Below
250
+ U_Combining_Diaeresis_Below = 804,// U+0324 Combining Diaeresis Below
251
+ U_Combining_Ring_Below = 805,// U+0325 Combining Ring Below
252
+ U_Combining_Comma_Below = 806,// U+0326 Combining Comma Below
253
+ U_Combining_Cedilla = 807,// U+0327 Combining Cedilla
254
+ U_Combining_Ogonek = 808,// U+0328 Combining Ogonek
255
+ U_Combining_Vertical_Line_Below = 809,// U+0329 Combining Vertical Line Below
256
+ U_Combining_Bridge_Below = 810,// U+032A Combining Bridge Below
257
+ U_Combining_Inverted_Double_Arch_Below = 811,// U+032B Combining Inverted Double Arch Below
258
+ U_Combining_Caron_Below = 812,// U+032C Combining Caron Below
259
+ U_Combining_Circumflex_Accent_Below = 813,// U+032D Combining Circumflex Accent Below
260
+ U_Combining_Breve_Below = 814,// U+032E Combining Breve Below
261
+ U_Combining_Inverted_Breve_Below = 815,// U+032F Combining Inverted Breve Below
262
+ U_Combining_Tilde_Below = 816,// U+0330 Combining Tilde Below
263
+ U_Combining_Macron_Below = 817,// U+0331 Combining Macron Below
264
+ U_Combining_Low_Line = 818,// U+0332 Combining Low Line
265
+ U_Combining_Double_Low_Line = 819,// U+0333 Combining Double Low Line
266
+ U_Combining_Tilde_Overlay = 820,// U+0334 Combining Tilde Overlay
267
+ U_Combining_Short_Stroke_Overlay = 821,// U+0335 Combining Short Stroke Overlay
268
+ U_Combining_Long_Stroke_Overlay = 822,// U+0336 Combining Long Stroke Overlay
269
+ U_Combining_Short_Solidus_Overlay = 823,// U+0337 Combining Short Solidus Overlay
270
+ U_Combining_Long_Solidus_Overlay = 824,// U+0338 Combining Long Solidus Overlay
271
+ U_Combining_Right_Half_Ring_Below = 825,// U+0339 Combining Right Half Ring Below
272
+ U_Combining_Inverted_Bridge_Below = 826,// U+033A Combining Inverted Bridge Below
273
+ U_Combining_Square_Below = 827,// U+033B Combining Square Below
274
+ U_Combining_Seagull_Below = 828,// U+033C Combining Seagull Below
275
+ U_Combining_X_Above = 829,// U+033D Combining X Above
276
+ U_Combining_Vertical_Tilde = 830,// U+033E Combining Vertical Tilde
277
+ U_Combining_Double_Overline = 831,// U+033F Combining Double Overline
278
+ U_Combining_Grave_Tone_Mark = 832,// U+0340 Combining Grave Tone Mark
279
+ U_Combining_Acute_Tone_Mark = 833,// U+0341 Combining Acute Tone Mark
280
+ U_Combining_Greek_Perispomeni = 834,// U+0342 Combining Greek Perispomeni
281
+ U_Combining_Greek_Koronis = 835,// U+0343 Combining Greek Koronis
282
+ U_Combining_Greek_Dialytika_Tonos = 836,// U+0344 Combining Greek Dialytika Tonos
283
+ U_Combining_Greek_Ypogegrammeni = 837,// U+0345 Combining Greek Ypogegrammeni
284
+ U_Combining_Bridge_Above = 838,// U+0346 Combining Bridge Above
285
+ U_Combining_Equals_Sign_Below = 839,// U+0347 Combining Equals Sign Below
286
+ U_Combining_Double_Vertical_Line_Below = 840,// U+0348 Combining Double Vertical Line Below
287
+ U_Combining_Left_Angle_Below = 841,// U+0349 Combining Left Angle Below
288
+ U_Combining_Not_Tilde_Above = 842,// U+034A Combining Not Tilde Above
289
+ U_Combining_Homothetic_Above = 843,// U+034B Combining Homothetic Above
290
+ U_Combining_Almost_Equal_To_Above = 844,// U+034C Combining Almost Equal To Above
291
+ U_Combining_Left_Right_Arrow_Below = 845,// U+034D Combining Left Right Arrow Below
292
+ U_Combining_Upwards_Arrow_Below = 846,// U+034E Combining Upwards Arrow Below
293
+ U_Combining_Grapheme_Joiner = 847,// U+034F Combining Grapheme Joiner
294
+ U_Combining_Right_Arrowhead_Above = 848,// U+0350 Combining Right Arrowhead Above
295
+ U_Combining_Left_Half_Ring_Above = 849,// U+0351 Combining Left Half Ring Above
296
+ U_Combining_Fermata = 850,// U+0352 Combining Fermata
297
+ U_Combining_X_Below = 851,// U+0353 Combining X Below
298
+ U_Combining_Left_Arrowhead_Below = 852,// U+0354 Combining Left Arrowhead Below
299
+ U_Combining_Right_Arrowhead_Below = 853,// U+0355 Combining Right Arrowhead Below
300
+ U_Combining_Right_Arrowhead_And_Up_Arrowhead_Below = 854,// U+0356 Combining Right Arrowhead And Up Arrowhead Below
301
+ U_Combining_Right_Half_Ring_Above = 855,// U+0357 Combining Right Half Ring Above
302
+ U_Combining_Dot_Above_Right = 856,// U+0358 Combining Dot Above Right
303
+ U_Combining_Asterisk_Below = 857,// U+0359 Combining Asterisk Below
304
+ U_Combining_Double_Ring_Below = 858,// U+035A Combining Double Ring Below
305
+ U_Combining_Zigzag_Above = 859,// U+035B Combining Zigzag Above
306
+ U_Combining_Double_Breve_Below = 860,// U+035C Combining Double Breve Below
307
+ U_Combining_Double_Breve = 861,// U+035D Combining Double Breve
308
+ U_Combining_Double_Macron = 862,// U+035E Combining Double Macron
309
+ U_Combining_Double_Macron_Below = 863,// U+035F Combining Double Macron Below
310
+ U_Combining_Double_Tilde = 864,// U+0360 Combining Double Tilde
311
+ U_Combining_Double_Inverted_Breve = 865,// U+0361 Combining Double Inverted Breve
312
+ U_Combining_Double_Rightwards_Arrow_Below = 866,// U+0362 Combining Double Rightwards Arrow Below
313
+ U_Combining_Latin_Small_Letter_A = 867,// U+0363 Combining Latin Small Letter A
314
+ U_Combining_Latin_Small_Letter_E = 868,// U+0364 Combining Latin Small Letter E
315
+ U_Combining_Latin_Small_Letter_I = 869,// U+0365 Combining Latin Small Letter I
316
+ U_Combining_Latin_Small_Letter_O = 870,// U+0366 Combining Latin Small Letter O
317
+ U_Combining_Latin_Small_Letter_U = 871,// U+0367 Combining Latin Small Letter U
318
+ U_Combining_Latin_Small_Letter_C = 872,// U+0368 Combining Latin Small Letter C
319
+ U_Combining_Latin_Small_Letter_D = 873,// U+0369 Combining Latin Small Letter D
320
+ U_Combining_Latin_Small_Letter_H = 874,// U+036A Combining Latin Small Letter H
321
+ U_Combining_Latin_Small_Letter_M = 875,// U+036B Combining Latin Small Letter M
322
+ U_Combining_Latin_Small_Letter_R = 876,// U+036C Combining Latin Small Letter R
323
+ U_Combining_Latin_Small_Letter_T = 877,// U+036D Combining Latin Small Letter T
324
+ U_Combining_Latin_Small_Letter_V = 878,// U+036E Combining Latin Small Letter V
325
+ U_Combining_Latin_Small_Letter_X = 879,// U+036F Combining Latin Small Letter X
326
326
  /**
327
327
  * Unicode Character 'LINE SEPARATOR' (U+2028)
328
328
  * http://www.fileformat.info/info/unicode/char/2028/index.htm
329
329
  */
330
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,
331
+ U_CIRCUMFLEX = 94,// U+005E CIRCUMFLEX
332
+ U_GRAVE_ACCENT = 96,// U+0060 GRAVE ACCENT
333
+ U_DIAERESIS = 168,// U+00A8 DIAERESIS
334
+ U_MACRON = 175,// U+00AF MACRON
335
+ U_ACUTE_ACCENT = 180,// U+00B4 ACUTE ACCENT
336
+ U_CEDILLA = 184,// U+00B8 CEDILLA
337
+ U_MODIFIER_LETTER_LEFT_ARROWHEAD = 706,// U+02C2 MODIFIER LETTER LEFT ARROWHEAD
338
+ U_MODIFIER_LETTER_RIGHT_ARROWHEAD = 707,// U+02C3 MODIFIER LETTER RIGHT ARROWHEAD
339
+ U_MODIFIER_LETTER_UP_ARROWHEAD = 708,// U+02C4 MODIFIER LETTER UP ARROWHEAD
340
+ U_MODIFIER_LETTER_DOWN_ARROWHEAD = 709,// U+02C5 MODIFIER LETTER DOWN ARROWHEAD
341
+ U_MODIFIER_LETTER_CENTRED_RIGHT_HALF_RING = 722,// U+02D2 MODIFIER LETTER CENTRED RIGHT HALF RING
342
+ U_MODIFIER_LETTER_CENTRED_LEFT_HALF_RING = 723,// U+02D3 MODIFIER LETTER CENTRED LEFT HALF RING
343
+ U_MODIFIER_LETTER_UP_TACK = 724,// U+02D4 MODIFIER LETTER UP TACK
344
+ U_MODIFIER_LETTER_DOWN_TACK = 725,// U+02D5 MODIFIER LETTER DOWN TACK
345
+ U_MODIFIER_LETTER_PLUS_SIGN = 726,// U+02D6 MODIFIER LETTER PLUS SIGN
346
+ U_MODIFIER_LETTER_MINUS_SIGN = 727,// U+02D7 MODIFIER LETTER MINUS SIGN
347
+ U_BREVE = 728,// U+02D8 BREVE
348
+ U_DOT_ABOVE = 729,// U+02D9 DOT ABOVE
349
+ U_RING_ABOVE = 730,// U+02DA RING ABOVE
350
+ U_OGONEK = 731,// U+02DB OGONEK
351
+ U_SMALL_TILDE = 732,// U+02DC SMALL TILDE
352
+ U_DOUBLE_ACUTE_ACCENT = 733,// U+02DD DOUBLE ACUTE ACCENT
353
+ U_MODIFIER_LETTER_RHOTIC_HOOK = 734,// U+02DE MODIFIER LETTER RHOTIC HOOK
354
+ U_MODIFIER_LETTER_CROSS_ACCENT = 735,// U+02DF MODIFIER LETTER CROSS ACCENT
355
+ U_MODIFIER_LETTER_EXTRA_HIGH_TONE_BAR = 741,// U+02E5 MODIFIER LETTER EXTRA-HIGH TONE BAR
356
+ U_MODIFIER_LETTER_HIGH_TONE_BAR = 742,// U+02E6 MODIFIER LETTER HIGH TONE BAR
357
+ U_MODIFIER_LETTER_MID_TONE_BAR = 743,// U+02E7 MODIFIER LETTER MID TONE BAR
358
+ U_MODIFIER_LETTER_LOW_TONE_BAR = 744,// U+02E8 MODIFIER LETTER LOW TONE BAR
359
+ U_MODIFIER_LETTER_EXTRA_LOW_TONE_BAR = 745,// U+02E9 MODIFIER LETTER EXTRA-LOW TONE BAR
360
+ U_MODIFIER_LETTER_YIN_DEPARTING_TONE_MARK = 746,// U+02EA MODIFIER LETTER YIN DEPARTING TONE MARK
361
+ U_MODIFIER_LETTER_YANG_DEPARTING_TONE_MARK = 747,// U+02EB MODIFIER LETTER YANG DEPARTING TONE MARK
362
+ U_MODIFIER_LETTER_UNASPIRATED = 749,// U+02ED MODIFIER LETTER UNASPIRATED
363
+ U_MODIFIER_LETTER_LOW_DOWN_ARROWHEAD = 751,// U+02EF MODIFIER LETTER LOW DOWN ARROWHEAD
364
+ U_MODIFIER_LETTER_LOW_UP_ARROWHEAD = 752,// U+02F0 MODIFIER LETTER LOW UP ARROWHEAD
365
+ U_MODIFIER_LETTER_LOW_LEFT_ARROWHEAD = 753,// U+02F1 MODIFIER LETTER LOW LEFT ARROWHEAD
366
+ U_MODIFIER_LETTER_LOW_RIGHT_ARROWHEAD = 754,// U+02F2 MODIFIER LETTER LOW RIGHT ARROWHEAD
367
+ U_MODIFIER_LETTER_LOW_RING = 755,// U+02F3 MODIFIER LETTER LOW RING
368
+ U_MODIFIER_LETTER_MIDDLE_GRAVE_ACCENT = 756,// U+02F4 MODIFIER LETTER MIDDLE GRAVE ACCENT
369
+ U_MODIFIER_LETTER_MIDDLE_DOUBLE_GRAVE_ACCENT = 757,// U+02F5 MODIFIER LETTER MIDDLE DOUBLE GRAVE ACCENT
370
+ U_MODIFIER_LETTER_MIDDLE_DOUBLE_ACUTE_ACCENT = 758,// U+02F6 MODIFIER LETTER MIDDLE DOUBLE ACUTE ACCENT
371
+ U_MODIFIER_LETTER_LOW_TILDE = 759,// U+02F7 MODIFIER LETTER LOW TILDE
372
+ U_MODIFIER_LETTER_RAISED_COLON = 760,// U+02F8 MODIFIER LETTER RAISED COLON
373
+ U_MODIFIER_LETTER_BEGIN_HIGH_TONE = 761,// U+02F9 MODIFIER LETTER BEGIN HIGH TONE
374
+ U_MODIFIER_LETTER_END_HIGH_TONE = 762,// U+02FA MODIFIER LETTER END HIGH TONE
375
+ U_MODIFIER_LETTER_BEGIN_LOW_TONE = 763,// U+02FB MODIFIER LETTER BEGIN LOW TONE
376
+ U_MODIFIER_LETTER_END_LOW_TONE = 764,// U+02FC MODIFIER LETTER END LOW TONE
377
+ U_MODIFIER_LETTER_SHELF = 765,// U+02FD MODIFIER LETTER SHELF
378
+ U_MODIFIER_LETTER_OPEN_SHELF = 766,// U+02FE MODIFIER LETTER OPEN SHELF
379
+ U_MODIFIER_LETTER_LOW_LEFT_ARROW = 767,// U+02FF MODIFIER LETTER LOW LEFT ARROW
380
+ U_GREEK_LOWER_NUMERAL_SIGN = 885,// U+0375 GREEK LOWER NUMERAL SIGN
381
+ U_GREEK_TONOS = 900,// U+0384 GREEK TONOS
382
+ U_GREEK_DIALYTIKA_TONOS = 901,// U+0385 GREEK DIALYTIKA TONOS
383
+ U_GREEK_KORONIS = 8125,// U+1FBD GREEK KORONIS
384
+ U_GREEK_PSILI = 8127,// U+1FBF GREEK PSILI
385
+ U_GREEK_PERISPOMENI = 8128,// U+1FC0 GREEK PERISPOMENI
386
+ U_GREEK_DIALYTIKA_AND_PERISPOMENI = 8129,// U+1FC1 GREEK DIALYTIKA AND PERISPOMENI
387
+ U_GREEK_PSILI_AND_VARIA = 8141,// U+1FCD GREEK PSILI AND VARIA
388
+ U_GREEK_PSILI_AND_OXIA = 8142,// U+1FCE GREEK PSILI AND OXIA
389
+ U_GREEK_PSILI_AND_PERISPOMENI = 8143,// U+1FCF GREEK PSILI AND PERISPOMENI
390
+ U_GREEK_DASIA_AND_VARIA = 8157,// U+1FDD GREEK DASIA AND VARIA
391
+ U_GREEK_DASIA_AND_OXIA = 8158,// U+1FDE GREEK DASIA AND OXIA
392
+ U_GREEK_DASIA_AND_PERISPOMENI = 8159,// U+1FDF GREEK DASIA AND PERISPOMENI
393
+ U_GREEK_DIALYTIKA_AND_VARIA = 8173,// U+1FED GREEK DIALYTIKA AND VARIA
394
+ U_GREEK_DIALYTIKA_AND_OXIA = 8174,// U+1FEE GREEK DIALYTIKA AND OXIA
395
+ U_GREEK_VARIA = 8175,// U+1FEF GREEK VARIA
396
+ U_GREEK_OXIA = 8189,// U+1FFD GREEK OXIA
397
+ U_GREEK_DASIA = 8190,// U+1FFE GREEK DASIA
398
+ U_OVERLINE = 8254,// Unicode Character 'OVERLINE'
399
399
  /**
400
400
  * UTF-8 BOM
401
401
  * Unicode Character 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF)
@@ -450,12 +450,10 @@ class AnimationFrameQueueItem {
450
450
  function measure(callback) {
451
451
  return (0, exports.scheduleAtNextAnimationFrame)(callback, 10000 /* must be early */);
452
452
  }
453
-
454
453
  exports.measure = _get__("measure");
455
454
  function modify(callback) {
456
455
  return (0, exports.scheduleAtNextAnimationFrame)(callback, -10000 /* must be late */);
457
456
  }
458
-
459
457
  exports.modify = _get__("modify");
460
458
  const MINIMUM_TIME_MS = 16;
461
459
  const DEFAULT_EVENT_MERGER = function (lastEvent, currentEvent) {
@@ -11,7 +11,7 @@ export type IteratorResult<T> = IteratorDefinedResult<T> | IteratorUndefinedResu
11
11
  export interface Iterator<T> {
12
12
  next(): IteratorResult<T>;
13
13
  }
14
- export declare module Iterator {
14
+ export declare namespace Iterator {
15
15
  function empty<T>(): Iterator<T>;
16
16
  function fromArray<T>(array: T[], index?: number, length?: number): Iterator<T>;
17
17
  function from<T>(elements: Iterator<T> | T[] | undefined): Iterator<T>;
@@ -156,7 +156,6 @@ class MappedIterator {
156
156
  this.fn = fn;
157
157
  // noop
158
158
  }
159
-
160
159
  next() {
161
160
  return this.fn(this.iterator.next());
162
161
  }
@@ -151,28 +151,28 @@ export declare const enum KeyCode {
151
151
  * Either the angle bracket key or the backslash key on the RT 102-key keyboard.
152
152
  */
153
153
  OEM_102 = 92,
154
- NUMPAD_0 = 93,
155
- NUMPAD_1 = 94,
156
- NUMPAD_2 = 95,
157
- NUMPAD_3 = 96,
158
- NUMPAD_4 = 97,
159
- NUMPAD_5 = 98,
160
- NUMPAD_6 = 99,
161
- NUMPAD_7 = 100,
162
- NUMPAD_8 = 101,
163
- NUMPAD_9 = 102,
164
- NUMPAD_MULTIPLY = 103,
165
- NUMPAD_ADD = 104,
166
- NUMPAD_SEPARATOR = 105,
167
- NUMPAD_SUBTRACT = 106,
168
- NUMPAD_DECIMAL = 107,
169
- NUMPAD_DIVIDE = 108,
154
+ NUMPAD_0 = 93,// VK_NUMPAD0, 0x60, Numeric keypad 0 key
155
+ NUMPAD_1 = 94,// VK_NUMPAD1, 0x61, Numeric keypad 1 key
156
+ NUMPAD_2 = 95,// VK_NUMPAD2, 0x62, Numeric keypad 2 key
157
+ NUMPAD_3 = 96,// VK_NUMPAD3, 0x63, Numeric keypad 3 key
158
+ NUMPAD_4 = 97,// VK_NUMPAD4, 0x64, Numeric keypad 4 key
159
+ NUMPAD_5 = 98,// VK_NUMPAD5, 0x65, Numeric keypad 5 key
160
+ NUMPAD_6 = 99,// VK_NUMPAD6, 0x66, Numeric keypad 6 key
161
+ NUMPAD_7 = 100,// VK_NUMPAD7, 0x67, Numeric keypad 7 key
162
+ NUMPAD_8 = 101,// VK_NUMPAD8, 0x68, Numeric keypad 8 key
163
+ NUMPAD_9 = 102,// VK_NUMPAD9, 0x69, Numeric keypad 9 key
164
+ NUMPAD_MULTIPLY = 103,// VK_MULTIPLY, 0x6A, Multiply key
165
+ NUMPAD_ADD = 104,// VK_ADD, 0x6B, Add key
166
+ NUMPAD_SEPARATOR = 105,// VK_SEPARATOR, 0x6C, Separator key
167
+ NUMPAD_SUBTRACT = 106,// VK_SUBTRACT, 0x6D, Subtract key
168
+ NUMPAD_DECIMAL = 107,// VK_DECIMAL, 0x6E, Decimal key
169
+ NUMPAD_DIVIDE = 108,// VK_DIVIDE, 0x6F,
170
170
  /**
171
171
  * Cover all key codes when IME is processing input.
172
172
  */
173
173
  KEY_IN_COMPOSITION = 109,
174
- ABNT_C1 = 110,
175
- ABNT_C2 = 111,
174
+ ABNT_C1 = 110,// Brazilian (ABNT) Keyboard
175
+ ABNT_C2 = 111,// Brazilian (ABNT) Keyboard
176
176
  /**
177
177
  * Placed last to cover the length of the enum.
178
178
  * Please do not depend on this value!
@@ -24,7 +24,6 @@ class KeyCodeStrMap {
24
24
  return this._strToKeyCode[str.toLowerCase()] || 0 /* KeyCode.Unknown */;
25
25
  }
26
26
  }
27
-
28
27
  const scanCodeIntToStr = [];
29
28
  const scanCodeStrToInt = Object.create(null);
30
29
  const scanCodeLowerCaseStrToInt = Object.create(null);
@@ -215,7 +214,6 @@ class SimpleKeybinding {
215
214
  return this.ctrlKey && this.keyCode === 5 /* KeyCode.Ctrl */ || this.shiftKey && this.keyCode === 4 /* KeyCode.Shift */ || this.altKey && this.keyCode === 6 /* KeyCode.Alt */ || this.metaKey && this.keyCode === 57 /* KeyCode.Meta */;
216
215
  }
217
216
  }
218
-
219
217
  exports.SimpleKeybinding = _get__("SimpleKeybinding");
220
218
  class ChordKeybinding {
221
219
  constructor(firstPart, chordPart) {
package/consts.d.ts CHANGED
@@ -6,9 +6,9 @@ export declare const INACTIVE_FOREGROUND: Color;
6
6
  export declare const ACTIVE_FOREGROUND: Color;
7
7
  export declare const DEFAULT_ITEM_SELECTOR: Color;
8
8
  export declare const IS_MAC_BIGSUR_OR_LATER: boolean;
9
- export declare const BOTTOM_TITLEBAR_HEIGHT = "60px";
10
- export declare const TOP_TITLEBAR_HEIGHT_MAC: string;
11
- export declare const TOP_TITLEBAR_HEIGHT_WIN = "32px";
9
+ export declare const BOTTOM_TITLEBAR_HEIGHT = 60;
10
+ export declare const TOP_TITLEBAR_HEIGHT_MAC: number;
11
+ export declare const TOP_TITLEBAR_HEIGHT_WIN = 30;
12
12
  export declare const WINDOW_MIN_WIDTH = 400;
13
13
  export declare const WINDOW_MIN_HEIGHT = 270;
14
14
  export declare const MENU_MNEMONIC_REGEX: RegExp;
@@ -34,6 +34,7 @@ interface ITitlebarIcons extends IMenuIcons {
34
34
  };
35
35
  }
36
36
  export declare const menuIcons: ITitlebarIcons;
37
+ export declare function getPx(value: number): string;
37
38
  /**
38
39
  * Handles mnemonics for menu items. Depending on OS:
39
40
  * - Windows: Supported via & character (replace && with &)
package/consts.js CHANGED
@@ -7,7 +7,7 @@
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.loadWindowIcons = exports.applyFill = exports.parseAccelerator = exports.cleanMnemonic = exports.mnemonicButtonLabel = exports.mnemonicMenuLabel = exports.menuIcons = exports.MENU_ESCAPED_MNEMONIC_REGEX = exports.MENU_MNEMONIC_REGEX = exports.WINDOW_MIN_HEIGHT = exports.WINDOW_MIN_WIDTH = exports.TOP_TITLEBAR_HEIGHT_WIN = exports.TOP_TITLEBAR_HEIGHT_MAC = exports.BOTTOM_TITLEBAR_HEIGHT = exports.IS_MAC_BIGSUR_OR_LATER = exports.DEFAULT_ITEM_SELECTOR = exports.ACTIVE_FOREGROUND = exports.INACTIVE_FOREGROUND = exports.ACTIVE_FOREGROUND_DARK = exports.INACTIVE_FOREGROUND_DARK = void 0;
10
+ exports.loadWindowIcons = exports.applyFill = exports.parseAccelerator = exports.cleanMnemonic = exports.mnemonicButtonLabel = exports.mnemonicMenuLabel = exports.getPx = exports.menuIcons = exports.MENU_ESCAPED_MNEMONIC_REGEX = exports.MENU_MNEMONIC_REGEX = exports.WINDOW_MIN_HEIGHT = exports.WINDOW_MIN_WIDTH = exports.TOP_TITLEBAR_HEIGHT_WIN = exports.TOP_TITLEBAR_HEIGHT_MAC = exports.BOTTOM_TITLEBAR_HEIGHT = exports.IS_MAC_BIGSUR_OR_LATER = exports.DEFAULT_ITEM_SELECTOR = exports.ACTIVE_FOREGROUND = exports.INACTIVE_FOREGROUND = exports.ACTIVE_FOREGROUND_DARK = exports.INACTIVE_FOREGROUND_DARK = void 0;
11
11
  const color_1 = require("./base/common/color");
12
12
  const platform_1 = require("./base/common/platform");
13
13
  exports.INACTIVE_FOREGROUND_DARK = _get__("color_1").Color.fromHex('#222222');
@@ -16,9 +16,9 @@ exports.INACTIVE_FOREGROUND = _get__("color_1").Color.fromHex('#EEEEEE');
16
16
  exports.ACTIVE_FOREGROUND = _get__("color_1").Color.fromHex('#FFFFFF');
17
17
  exports.DEFAULT_ITEM_SELECTOR = _get__("color_1").Color.fromHex('#0000001F');
18
18
  exports.IS_MAC_BIGSUR_OR_LATER = _get__("platform_1").isMacintosh && parseInt(process.getSystemVersion().split('.')[0]) >= 11;
19
- exports.BOTTOM_TITLEBAR_HEIGHT = '60px';
20
- exports.TOP_TITLEBAR_HEIGHT_MAC = exports.IS_MAC_BIGSUR_OR_LATER ? '28px' : '22px';
21
- exports.TOP_TITLEBAR_HEIGHT_WIN = '32px';
19
+ exports.BOTTOM_TITLEBAR_HEIGHT = 60;
20
+ exports.TOP_TITLEBAR_HEIGHT_MAC = exports.IS_MAC_BIGSUR_OR_LATER ? 28 : 22;
21
+ exports.TOP_TITLEBAR_HEIGHT_WIN = 30;
22
22
  exports.WINDOW_MIN_WIDTH = 400;
23
23
  exports.WINDOW_MIN_HEIGHT = 270;
24
24
  exports.MENU_MNEMONIC_REGEX = /\(&([^\s&])\)|(^|[^&])&([^\s&])/;
@@ -47,6 +47,10 @@ exports.menuIcons = {
47
47
  close: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path d="M6.279 5.5L11 10.221l-.779.779L5.5 6.279.779 11 0 10.221 4.721 5.5 0 .779.779 0 5.5 4.721 10.221 0 11 .779 6.279 5.5z"/></svg>'
48
48
  }
49
49
  };
50
+ function getPx(value) {
51
+ return `${value}px`;
52
+ }
53
+ exports.getPx = _get__("getPx");
50
54
  /**
51
55
  * Handles mnemonics for menu items. Depending on OS:
52
56
  * - Windows: Supported via & character (replace && with &)
@@ -205,6 +209,8 @@ function _get_original__(variableName) {
205
209
  return color_1;
206
210
  case "platform_1":
207
211
  return platform_1;
212
+ case "getPx":
213
+ return getPx;
208
214
  case "mnemonicMenuLabel":
209
215
  return mnemonicMenuLabel;
210
216
  case "mnemonicButtonLabel":
@@ -1,3 +1,3 @@
1
1
  import { BrowserWindow } from 'electron';
2
2
  declare const _default: (browserWindow: BrowserWindow) => void;
3
- export = _default;
3
+ export default _default;
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  /* ---------------------------------------------------------------------------------------------
4
7
  * Copyright (c) AlexTorresDev. All rights reserved.
5
8
  * Licensed under the MIT License. See License.txt in the project root for license information.
6
9
  *-------------------------------------------------------------------------------------------- */
7
10
  const consts_1 = require("../consts");
8
- module.exports = browserWindow => {
11
+ exports.default = browserWindow => {
9
12
  browserWindow.setMinimumSize(_get__("consts_1").WINDOW_MIN_WIDTH, _get__("consts_1").WINDOW_MIN_HEIGHT);
10
13
  browserWindow.on('enter-full-screen', () => {
11
14
  browserWindow.webContents.send('window-fullscreen', true);
@@ -1,2 +1,2 @@
1
1
  declare const _default: () => void;
2
- export = _default;
2
+ export default _default;
@@ -4,22 +4,15 @@
4
4
  * Copyright (c) AlexTorresDev. All rights reserved.
5
5
  * Licensed under the MIT License. See License.txt in the project root for license information.
6
6
  *-------------------------------------------------------------------------------------------- */
7
- function getMenuItemByCommandId(commandId, menu) {
8
- if (!menu) return undefined;
9
- for (const item of menu.items) {
10
- if (item.submenu) {
11
- const submenuItem = _get__("getMenuItemByCommandId")(commandId, item.submenu);
12
- if (submenuItem) return submenuItem;
13
- } else if (item.commandId === commandId) return item;
14
- }
15
- return undefined;
16
- }
17
- module.exports = () => {
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.default = () => {
18
11
  if (process.type !== 'browser') return;
19
12
  const {
20
13
  BrowserWindow,
21
- nativeImage,
22
14
  Menu,
15
+ MenuItem,
23
16
  ipcMain
24
17
  } = require('electron');
25
18
  // Send menu to renderer title bar process
@@ -27,6 +20,7 @@ module.exports = () => {
27
20
  // Handle window events
28
21
  ipcMain.on('window-event', (event, eventName) => {
29
22
  const window = BrowserWindow.fromWebContents(event.sender);
23
+ /* eslint-disable indent */
30
24
  if (window) {
31
25
  switch (eventName) {
32
26
  case 'window-minimize':
@@ -60,7 +54,26 @@ module.exports = () => {
60
54
  event.returnValue = null;
61
55
  }
62
56
  });
57
+ ipcMain.on('update-window-controls', (event, args) => {
58
+ const window = BrowserWindow.fromWebContents(event.sender);
59
+ try {
60
+ if (window) window.setTitleBarOverlay(args);
61
+ event.returnValue = true;
62
+ } catch (_) {
63
+ event.returnValue = false;
64
+ }
65
+ });
63
66
  };
67
+ function getMenuItemByCommandId(commandId, menu) {
68
+ if (!menu) return undefined;
69
+ for (const item of menu.items) {
70
+ if (item.submenu) {
71
+ const submenuItem = _get__("getMenuItemByCommandId")(commandId, item.submenu);
72
+ if (submenuItem) return submenuItem;
73
+ } else if (item.commandId === commandId) return item;
74
+ }
75
+ return undefined;
76
+ }
64
77
  function _getGlobalObject() {
65
78
  try {
66
79
  if (!!global) {
package/menubar/index.js CHANGED
@@ -301,7 +301,6 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
301
301
  triggerKeys.push(15 /* KeyCode.LeftArrow */);
302
302
  }
303
303
  }
304
-
305
304
  if (triggerKeys.some(k => event.equals(k)) && !this.isOpen) {
306
305
  this.focusedMenu = {
307
306
  index: _get__("MenuBar").OVERFLOW_INDEX
@@ -851,15 +850,15 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
851
850
  showMenu(menuIndex, selectFirst = true) {
852
851
  const actualMenuIndex = menuIndex >= this.numMenusShown ? _get__("MenuBar").OVERFLOW_INDEX : menuIndex;
853
852
  const customMenu = actualMenuIndex === _get__("MenuBar").OVERFLOW_INDEX ? this.overflowMenu : this.menus[actualMenuIndex];
854
- if (!customMenu.actions || !customMenu.buttonElement || !customMenu.titleElement) {
853
+ if (!customMenu.actions || !customMenu.buttonElement) {
855
854
  return;
856
855
  }
857
856
  const menuHolder = _get__("$")('.cet-menubar-menu-container', {
858
857
  title: ''
859
858
  });
860
859
  customMenu.buttonElement.classList.add('open');
861
- const titleBoundingRect = customMenu.titleElement.getBoundingClientRect();
862
- const titleBoundingRectZoom = _get__("DOM").getDomNodeZoomLevel(customMenu.titleElement);
860
+ const titleBoundingRect = customMenu.buttonElement.getBoundingClientRect();
861
+ const titleBoundingRectZoom = _get__("DOM").getDomNodeZoomLevel(customMenu.buttonElement);
863
862
  if (this.options.compactMode === _get__("menu_1").Direction.Right) {
864
863
  menuHolder.style.top = `${titleBoundingRect.top}px`;
865
864
  menuHolder.style.left = `${titleBoundingRect.left + this.container.clientWidth}px`;
@@ -880,7 +879,6 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
880
879
  // expandDirection: this.isCompact ? this.options.compactMode : Direction.Right,
881
880
  // useEventAsContext: true
882
881
  };
883
-
884
882
  const menuWidget = this._register(new (_get__("menu_1").CETMenu)(menuHolder, this.menuIcons, this.currentOptions, menuOptions, this.closeMenu));
885
883
  menuWidget.createMenu(customMenu.actions?.items ?? []);
886
884
  menuWidget.applyStyle(this.menuStyle);
@@ -13,7 +13,6 @@ const lifecycle_1 = require("../../base/common/lifecycle");
13
13
  const item_1 = require("./item");
14
14
  const keyCodes_1 = require("../../base/common/keyCodes");
15
15
  const keyboardEvent_1 = require("../../base/browser/keyboardEvent");
16
- const color_1 = require("../../base/common/color");
17
16
  const event_1 = require("../../base/common/event");
18
17
  const separator_1 = require("./separator");
19
18
  const submenu_1 = require("./submenu");
@@ -319,7 +318,6 @@ class CETMenu extends _get__("lifecycle_1").Disposable {
319
318
  if (document.activeElement instanceof HTMLElement) {
320
319
  document.activeElement.blur(); // remove focus from focused action
321
320
  }
322
-
323
321
  this._onDidCancel.fire();
324
322
  }
325
323
  focusItemByElement(element) {
@@ -339,8 +337,7 @@ class CETMenu extends _get__("lifecycle_1").Disposable {
339
337
  if (transparency < 0) transparency = 0;
340
338
  if (transparency > 1) transparency = 1;
341
339
  const rgba = style.backgroundColor?.rgba;
342
- const color = new (_get__("color_1").Color)(new (_get__("color_1").RGBA)(rgba.r, rgba.g, rgba.b, 1 - transparency));
343
- container.style.backgroundColor = color.toString();
340
+ container.style.backgroundColor = `rgb(${rgba.r} ${rgba.g} ${rgba.b} / ${1 - transparency})`;
344
341
  }
345
342
  if (this.items) {
346
343
  this.items.forEach(item => {
@@ -467,8 +464,6 @@ function _get_original__(variableName) {
467
464
  return separator_1;
468
465
  case "item_1":
469
466
  return item_1;
470
- case "color_1":
471
- return color_1;
472
467
  case "lifecycle_1":
473
468
  return lifecycle_1;
474
469
  case "CETMenu":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "custom-electron-titlebar",
3
- "version": "4.2.6",
3
+ "version": "4.2.8",
4
4
  "description": "Library for electron that allows you to configure a fully customizable title bar.",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./index.ts",
@@ -47,28 +47,28 @@
47
47
  "electron": ">20.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@babel/cli": "7.22.9",
51
- "@babel/core": "7.22.9",
52
- "@jest/globals": "29.6.1",
53
- "@typescript-eslint/eslint-plugin": "6.1.0",
54
- "@typescript-eslint/parser": "6.1.0",
55
- "babel-plugin-import-require-as-string": "1.0.2",
56
- "babel-plugin-module-resolver": "5.0.0",
57
- "babel-plugin-rewire": "1.2.0",
58
- "electron": "25.3.1",
59
- "eslint": "8.45.0",
60
- "eslint-config-prettier": "8.8.0",
61
- "eslint-config-standard": "17.1.0",
62
- "eslint-plugin-import": "2.27.5",
63
- "eslint-plugin-n": "16.0.1",
64
- "eslint-plugin-promise": "6.1.1",
65
- "jest": "^29.6.1",
66
- "jest-environment-jsdom": "29.6.1",
67
- "rimraf": "5.0.1",
68
- "standard": "17.1.0",
69
- "ts-jest": "29.1.1",
70
- "tsc-alias": "1.8.7",
71
- "typescript": "5.1.6"
50
+ "@babel/cli": "^7.23.4",
51
+ "@babel/core": "^7.23.7",
52
+ "@jest/globals": "^29.7.0",
53
+ "@typescript-eslint/eslint-plugin": "^6.18.1",
54
+ "@typescript-eslint/parser": "^6.18.1",
55
+ "babel-plugin-import-require-as-string": "^1.0.2",
56
+ "babel-plugin-module-resolver": "^5.0.0",
57
+ "babel-plugin-rewire": "^1.2.0",
58
+ "electron": "^28.1.3",
59
+ "eslint": "^8.56.0",
60
+ "eslint-config-prettier": "^9.1.0",
61
+ "eslint-config-standard": "^17.1.0",
62
+ "eslint-plugin-import": "^2.29.1",
63
+ "eslint-plugin-n": "^16.6.2",
64
+ "eslint-plugin-promise": "^6.1.1",
65
+ "jest": "^29.7.0",
66
+ "jest-environment-jsdom": "^29.7.0",
67
+ "rimraf": "^5.0.5",
68
+ "standard": "^17.1.0",
69
+ "ts-jest": "^29.1.1",
70
+ "tsc-alias": "^1.8.8",
71
+ "typescript": "^5.3.3"
72
72
  },
73
73
  "eslintConfig": {
74
74
  "extends": "./node_modules/standard/eslintrc.json"
@@ -48,6 +48,7 @@ export declare class CustomTitlebar extends ThemeBar {
48
48
  private onDidChangeMaximized;
49
49
  private updateMenu;
50
50
  private updateStyles;
51
+ private canCenterTitle;
51
52
  /**
52
53
  * Update title bar styles based on focus state.
53
54
  * @param hasFocus focus state of the window
package/titlebar/index.js CHANGED
@@ -24,7 +24,6 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
24
24
  super();
25
25
  this.isInactive = false;
26
26
  this.currentOptions = {
27
- backgroundColor: _get__("color_1").Color.WHITE,
28
27
  closeable: true,
29
28
  enableMnemonics: true,
30
29
  // hideWhenClickingClose: false,
@@ -42,7 +41,8 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
42
41
  maximize: 'Maximize',
43
42
  minimize: 'Minimize',
44
43
  restoreDown: 'Restore Down'
45
- }
44
+ },
45
+ unfocusEffect: true
46
46
  };
47
47
  // TODO: Refactor, verify if is possible use into menubar
48
48
  this.closeMenu = () => {
@@ -86,7 +86,6 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
86
86
  this.loadEvents();
87
87
  // this.registerTheme(ThemeBar.win)
88
88
  }
89
-
90
89
  loadIcons() {
91
90
  const icons = this.currentOptions.icons;
92
91
  if (icons) {
@@ -209,6 +208,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
209
208
  const minimizable = this.currentOptions.minimizable;
210
209
  const maximizable = this.currentOptions.maximizable;
211
210
  const closeable = this.currentOptions.closeable;
211
+ this.onDidChangeMaximized(_get__("electron_1").ipcRenderer.sendSync('window-event', 'window-is-maximized'));
212
212
  _get__("electron_1").ipcRenderer.on('window-maximize', (_, isMaximized) => this.onDidChangeMaximized(isMaximized));
213
213
  _get__("electron_1").ipcRenderer.on('window-fullscreen', (_, isFullScreen) => this.onWindowFullScreen(isFullScreen));
214
214
  _get__("electron_1").ipcRenderer.on('window-focus', (_, isFocused) => this.onWindowFocus(isFocused));
@@ -259,7 +259,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
259
259
  const maximize = this.controls.maximize;
260
260
  if (maximize) {
261
261
  maximize.title = isMaximized ? this.currentOptions.tooltips?.restoreDown : this.currentOptions.tooltips?.maximize;
262
- maximize.innerHTML = isMaximized ? this.platformIcons.restore : this.platformIcons.maximize;
262
+ maximize.innerHTML = isMaximized ? this.platformIcons?.restore : this.platformIcons?.maximize;
263
263
  }
264
264
  if (this.resizer) {
265
265
  if (isMaximized) (0, _get__("dom_1").hide)(this.resizer.top, this.resizer.left);else (0, _get__("dom_1").show)(this.resizer.top, this.resizer.left);
@@ -283,19 +283,29 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
283
283
  } else {
284
284
  (0, _get__("dom_1").removeClass)(this.titlebar, 'inactive');
285
285
  }
286
- const backgroundColor = this.isInactive ? this.currentOptions.backgroundColor?.lighten(0.12) : this.currentOptions.backgroundColor;
286
+ const backgroundColor = this.isInactive && this.currentOptions.unfocusEffect ? this.currentOptions.backgroundColor?.lighten(0.12) : this.currentOptions.backgroundColor;
287
287
  if (backgroundColor) {
288
- this.titlebar.style.backgroundColor = backgroundColor.toString();
288
+ this.titlebar.style.backgroundColor = backgroundColor?.toString();
289
289
  }
290
290
  let foregroundColor;
291
291
  if (backgroundColor?.isLighter()) {
292
292
  (0, _get__("dom_1").addClass)(this.titlebar, 'light');
293
- foregroundColor = this.isInactive ? _get__("consts_1").INACTIVE_FOREGROUND_DARK : _get__("consts_1").ACTIVE_FOREGROUND_DARK;
293
+ foregroundColor = this.isInactive && this.currentOptions.unfocusEffect ? _get__("consts_1").INACTIVE_FOREGROUND_DARK : _get__("consts_1").ACTIVE_FOREGROUND_DARK;
294
294
  } else {
295
295
  (0, _get__("dom_1").removeClass)(this.titlebar, 'light');
296
- foregroundColor = this.isInactive ? _get__("consts_1").INACTIVE_FOREGROUND : _get__("consts_1").ACTIVE_FOREGROUND;
296
+ foregroundColor = this.isInactive && this.currentOptions.unfocusEffect ? _get__("consts_1").INACTIVE_FOREGROUND : _get__("consts_1").ACTIVE_FOREGROUND;
297
297
  }
298
298
  this.titlebar.style.color = foregroundColor?.toString();
299
+ const updatedWindowControls = _get__("electron_1").ipcRenderer.sendSync('update-window-controls', {
300
+ color: backgroundColor?.toString(),
301
+ symbolColor: foregroundColor?.toString(),
302
+ height: _get__("consts_1").TOP_TITLEBAR_HEIGHT_WIN
303
+ });
304
+ if (updatedWindowControls) {
305
+ (0, _get__("dom_1").hide)(this.controlsContainer);
306
+ } else {
307
+ (0, _get__("dom_1").show)(this.controlsContainer);
308
+ }
299
309
  if (this.menuBar) {
300
310
  let fgColor;
301
311
  const backgroundColor = this.currentOptions.menuBarBackgroundColor || this.currentOptions.backgroundColor.darken(0.12);
@@ -316,6 +326,11 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
316
326
  });
317
327
  }
318
328
  }
329
+ canCenterTitle() {
330
+ const menuBarContainerMargin = 20;
331
+ const menuSpaceLimit = window.innerWidth / 2 - this.menuBarContainer.getBoundingClientRect().right - menuBarContainerMargin;
332
+ return this.title.getBoundingClientRect().width / 2 <= menuSpaceLimit;
333
+ }
319
334
  /// Public methods
320
335
  /**
321
336
  * Update title bar styles based on focus state.
@@ -338,6 +353,8 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
338
353
  * @param fullscreen Fullscreen state of the window
339
354
  */
340
355
  onWindowFullScreen(fullscreen) {
356
+ const height = _get__("platform_1").isMacintosh ? _get__("consts_1").TOP_TITLEBAR_HEIGHT_MAC : _get__("consts_1").TOP_TITLEBAR_HEIGHT_WIN;
357
+ const hasShadow = this.currentOptions.shadow;
341
358
  if (!_get__("platform_1").isMacintosh) {
342
359
  if (fullscreen) {
343
360
  (0, _get__("dom_1").hide)(this.titlebar);
@@ -345,10 +362,10 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
345
362
  } else {
346
363
  (0, _get__("dom_1").show)(this.titlebar);
347
364
  if (this.currentOptions.menuPosition === 'bottom') {
348
- this.container.style.top = _get__("consts_1").BOTTOM_TITLEBAR_HEIGHT;
349
- this.controlsContainer.style.height = _get__("consts_1").TOP_TITLEBAR_HEIGHT_WIN;
365
+ this.container.style.top = (0, _get__("consts_1").getPx)(_get__("consts_1").BOTTOM_TITLEBAR_HEIGHT);
366
+ this.controlsContainer.style.height = (0, _get__("consts_1").getPx)(_get__("consts_1").TOP_TITLEBAR_HEIGHT_WIN);
350
367
  } else {
351
- this.container.style.top = _get__("platform_1").isMacintosh ? _get__("consts_1").TOP_TITLEBAR_HEIGHT_MAC : _get__("consts_1").TOP_TITLEBAR_HEIGHT_WIN;
368
+ this.container.style.top = (0, _get__("consts_1").getPx)(height + (hasShadow ? 1 : 0));
352
369
  }
353
370
  }
354
371
  }
@@ -400,14 +417,16 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
400
417
  (0, _get__("dom_1").removeClass)(this.title, 'cet-title-right');
401
418
  (0, _get__("dom_1").removeClass)(this.title, 'cet-title-center');
402
419
  if (menuPosition !== 'bottom') {
403
- /* addDisposableListener(window, 'resize', () => {
404
- if (window.innerWidth >= 1188) {
405
- addClass(this.title, 'cet-title-center')
406
- } else {
407
- removeClass(this.title, 'cet-title-center')
408
- }
409
- }) */
410
- (0, _get__("dom_1").addClass)(this.title, 'cet-title-center');
420
+ (0, _get__("dom_1").addDisposableListener)(window, 'resize', () => {
421
+ if (this.canCenterTitle()) {
422
+ (0, _get__("dom_1").addClass)(this.title, 'cet-title-center');
423
+ } else {
424
+ (0, _get__("dom_1").removeClass)(this.title, 'cet-title-center');
425
+ }
426
+ });
427
+ if (this.canCenterTitle()) {
428
+ (0, _get__("dom_1").addClass)(this.title, 'cet-title-center');
429
+ }
411
430
  }
412
431
  if (!_get__("platform_1").isMacintosh && order === 'first-buttons') {
413
432
  this.controlsContainer.style.marginLeft = 'auto';
@@ -452,15 +471,16 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
452
471
  updateMenuPosition(menuPosition) {
453
472
  const height = _get__("platform_1").isMacintosh ? _get__("consts_1").TOP_TITLEBAR_HEIGHT_MAC : _get__("consts_1").TOP_TITLEBAR_HEIGHT_WIN;
454
473
  const onlyRendererMenuBar = this.currentOptions.onlyShowMenuBar;
474
+ const hasShadow = this.currentOptions.shadow;
455
475
  this.currentOptions.menuPosition = menuPosition;
456
476
  if (menuPosition === 'left' || onlyRendererMenuBar) {
457
- this.titlebar.style.height = height;
458
- this.container.style.top = height;
477
+ this.titlebar.style.height = (0, _get__("consts_1").getPx)(height + (hasShadow ? 1 : 0));
478
+ this.container.style.top = (0, _get__("consts_1").getPx)(height + (hasShadow ? 1 : 0));
459
479
  (0, _get__("dom_1").removeClass)(this.menuBarContainer, 'bottom');
460
480
  } else {
461
- this.titlebar.style.height = _get__("consts_1").BOTTOM_TITLEBAR_HEIGHT;
462
- this.container.style.top = _get__("consts_1").BOTTOM_TITLEBAR_HEIGHT;
463
- this.controlsContainer.style.height = height;
481
+ this.titlebar.style.height = (0, _get__("consts_1").getPx)(_get__("consts_1").BOTTOM_TITLEBAR_HEIGHT);
482
+ this.container.style.top = (0, _get__("consts_1").getPx)(_get__("consts_1").BOTTOM_TITLEBAR_HEIGHT);
483
+ this.controlsContainer.style.height = (0, _get__("consts_1").getPx)(height);
464
484
  (0, _get__("dom_1").addClass)(this.menuBarContainer, 'bottom');
465
485
  }
466
486
  return this;
@@ -573,14 +593,14 @@ function _get__(variableName) {
573
593
  }
574
594
  function _get_original__(variableName) {
575
595
  switch (variableName) {
576
- case "color_1":
577
- return color_1;
578
596
  case "consts_1":
579
597
  return consts_1;
580
598
  case "platform_1":
581
599
  return platform_1;
582
600
  case "dom_1":
583
601
  return dom_1;
602
+ case "color_1":
603
+ return color_1;
584
604
  case "electron_1":
585
605
  return electron_1;
586
606
  case "menubar_1":
@@ -81,4 +81,9 @@ export interface TitleBarOptions extends MenuBarOptions {
81
81
  */
82
82
  close?: string;
83
83
  };
84
+ /**
85
+ * Enables or disables the blur option in titlebar.
86
+ * *The default is true*
87
+ */
88
+ unfocusEffect?: boolean;
84
89
  }
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports.ThemeBar = void 0;
11
11
  const lifecycle_1 = require("../base/common/lifecycle");
12
- const baseTheme = "body {\n margin: 0 !important;\n overflow: hidden !important;\n}\n\n/* Titlebar */\n.cet-titlebar {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n flex-wrap: wrap;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n font-size: 13px;\n font-family: Arial, Helvetica, sans-serif;\n box-sizing: border-box;\n padding: 0 16px;\n overflow: hidden;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n zoom: 1;\n width: 100%;\n height: 31px;\n line-height: 31px;\n z-index: 99999;\n}\n\n.cet-titlebar *,\n.cet-titlebar *:before,\n.cet-titlebar *:after {\n box-sizing: border-box;\n}\n\n.cet-titlebar.cet-windows,\n.cet-titlebar.cet-linux,\n.cet-titlebar.cet-freebsd {\n padding: 0;\n height: 30px;\n line-height: 30px;\n justify-content: left;\n overflow: visible;\n}\n\n/* Inverted */\n.cet-titlebar.cet-inverted {\n flex-direction: row-reverse;\n}\n\n.cet-titlebar.cet-inverted .cet-menubar,\n.cet-titlebar.cet-inverted .cet-window-controls {\n flex-direction: row-reverse;\n margin-left: 20px;\n margin-right: 0;\n}\n\n/* First buttons */\n.cet-titlebar.cet-first-buttons .cet-window-controls {\n order: -1;\n margin: 0 5px 0 0;\n}\n\n.cet-titlebar.cet-inverted .cet-window-controls {\n margin: 0 5px 0 0;\n}\n\n/* Shadow */\n.cet-titlebar.cet-shadow {\n box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);\n}\n\n/* Drag region */\n.cet-drag-region {\n top: 0;\n left: 0;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: -1;\n -webkit-app-region: drag;\n}\n\n/* Icon */\n.cet-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 30px;\n z-index: 99;\n overflow: hidden;\n}\n\n/* Title */\n.cet-title {\n flex: 0 1 auto;\n font-size: 12px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n zoom: 1;\n}\n\n/* Title alignment */\n.cet-title.cet-title-left {\n margin-left: 8px;\n margin-right: auto;\n}\n\n.cet-title.cet-title-right {\n margin-left: auto;\n margin-right: 8px;\n}\n\n.cet-title.cet-title-center {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.cet-title.cet-bigsur {\n font-size: 13px;\n font-weight: 600;\n}\n\n/* Window controls */\n.cet-window-controls {\n display: flex;\n flex-grow: 0;\n flex-shrink: 0;\n text-align: center;\n position: relative;\n z-index: 99;\n -webkit-app-region: no-drag;\n height: 30px;\n font-family: initial !important;\n margin-left: auto;\n}\n\n.cet-control-icon {\n width: 46px;\n}\n\n.cet-control-icon:not(.inactive):hover {\n background-color: rgb(255 255 255 / 12%);\n}\n\n.light .cet-control-icon:not(.inactive):hover {\n background-color: rgb(0 0 0 / 12%);\n}\n\n.cet-control-icon.inactive svg {\n opacity: 0.4;\n}\n\n.cet-control-icon svg {\n width: 10px;\n height: -webkit-fill-available;\n fill: #fff;\n display: initial !important;\n vertical-align: unset !important;\n}\n\n.cet-titlebar.light .cet-control-icon svg {\n fill: #222222 !important;\n}\n\n.cet-control-close:not(.inactive):hover {\n background-color: rgb(232 17 35 / 90%) !important;\n}\n\n.cet-control-close:not(.inactive):hover svg {\n fill: #fff !important;\n}\n\n/* Resizer */\n.cet-resizer {\n -webkit-app-region: no-drag;\n position: absolute;\n}\n\n.cet-resizer.left {\n top: 0;\n left: 0;\n width: 6px;\n height: 100%;\n}\n\n.cet-resizer.top {\n top: 0;\n width: 100%;\n height: 6px;\n}\n\n/* Container */\n.cet-container {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: auto;\n z-index: 1;\n}\n\n/* MenuBar */\n.cet-menubar {\n display: flex;\n flex-shrink: 1;\n box-sizing: border-box;\n overflow: hidden;\n flex-wrap: wrap;\n margin-right: 20px;\n}\n\n.cet-menubar.bottom {\n order: 1;\n width: 100%;\n padding: 0 5px 5px;\n margin-right: 0;\n}\n\n.cet-menubar.bottom .cet-menubar-menu-button {\n border-radius: 4px;\n}\n\n.cet-menubar.bottom .cet-menubar-menu-button .cet-menubar-menu-title {\n line-height: 26px;\n}\n\n.cet-menubar .cet-menubar-menu-button {\n box-sizing: border-box;\n padding: 0px 8px;\n height: 100%;\n cursor: default;\n zoom: 1;\n white-space: nowrap;\n -webkit-app-region: no-drag;\n outline: 0;\n}\n\n.cet-menubar .cet-menubar-menu-button .cet-menubar-menu-title {\n font-size: 12px;\n}\n\n.cet-menubar .cet-menubar-menu-button.disabled {\n opacity: 0.4;\n}\n\n.cet-menubar .cet-menubar-menu-button:not(.disabled):hover,\n.cet-menubar .cet-menubar-menu-button:not(.disabled).open {\n background-color: rgb(255 255 255 / 12%);\n}\n\n.cet-titlebar.light .cet-menubar .cet-menubar-menu-button:not(.disabled):hover,\n.cet-titlebar.light .cet-menubar .cet-menubar-menu-button:not(.disabled).open {\n background-color: rgb(0 0 0 / 12%);\n}\n\n.cet-menubar-menu-container {\n position: absolute;\n display: block;\n left: 0px;\n opacity: 1;\n outline: 0;\n border: none;\n text-align: left;\n margin: 0 auto;\n margin-left: 0;\n font-size: inherit;\n overflow-x: visible;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n justify-content: flex-end;\n white-space: nowrap;\n border-radius: 7px;\n backdrop-filter: blur(5px);\n box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n z-index: 99999;\n}\n\n.cet-menubar-menu-container::-webkit-scrollbar {\n width: 8px;\n height: 4px;\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0);\n}\n\n.cet-menubar-menu-container::-webkit-scrollbar-track {\n border: none;\n background-color: rgba(0, 0, 0, 0);\n}\n\n.cet-menubar-menu-container::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background-color: rgba(110, 110, 110, 0.2);\n}\n\n.cet-menubar-menu-container:focus {\n outline: 0;\n}\n\n.cet-menubar-menu-container .cet-action-item {\n padding: 0;\n margin: 0;\n transform: none;\n display: -ms-flexbox;\n display: flex;\n outline: none;\n}\n\n.cet-menubar-menu-container .cet-action-item.active {\n transform: none;\n}\n\n.cet-menubar-menu-container .cet-action-item.disabled .cet-action-menu-item {\n opacity: 0.4;\n}\n\n.cet-menubar-menu-container .cet-action-item .cet-submenu {\n position: absolute;\n}\n\n.cet-menubar-menu-container .cet-action-menu-item {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -ms-flexbox;\n display: flex;\n height: 2.231em;\n margin: 4px 3px;\n align-items: center;\n position: relative;\n border-radius: 4px;\n text-decoration: none;\n}\n\n.cet-menubar-menu-container .cet-action-label {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n text-decoration: none;\n padding: 0 1em;\n background: none;\n font-size: 12px;\n line-height: 1;\n}\n\n.cet-menubar-menu-container .cet-action-label:not(.separator) {\n display: inline-block;\n -webkit-box-sizing: border-box;\n -o-box-sizing: border-box;\n -moz-box-sizing: border-box;\n -ms-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0 2em 0 0.8em;\n}\n\n.cet-menubar-menu-container .cet-action-label.separator {\n opacity: 0.1;\n font-size: inherit;\n width: 100%;\n border-bottom: 1px solid transparent;\n}\n\n.cet-menubar-menu-container .cet-action-label.separator.text {\n padding: 0.7em 1em 0.1em 1em;\n font-weight: bold;\n opacity: 1;\n}\n\n.cet-menubar-menu-container .cet-action-label:hover {\n color: inherit;\n}\n\n.cet-menubar-menu-container .keybinding,\n.cet-menubar-menu-container .cet-submenu-indicator {\n display: inline-block;\n -ms-flex: 2 1 auto;\n flex: 2 1 auto;\n padding: 0 2em 0 1em;\n text-align: right;\n font-size: 11px;\n line-height: 1;\n}\n\n.cet-menubar-menu-container .cet-submenu-indicator {\n position: absolute;\n right: 4px;\n height: 12px;\n width: 12px;\n padding: 0;\n}\n\n.cet-menubar-menu-container .cet-submenu-indicator img,\n.cet-menubar-menu-container .cet-menu-item-icon .icon,\n.cet-menubar-menu-container .cet-submenu-indicator svg,\n.cet-menubar-menu-container .cet-menu-item-icon svg {\n display: inherit;\n width: 100%;\n height: 100%;\n}\n\n.cet-menubar-menu-container .cet-action-menu-item.checked>.cet-menu-item-icon.checkbox {\n visibility: visible;\n}\n\n.cet-menubar-menu-container .cet-menu-item-icon {\n width: 14px;\n height: 14px;\n margin: 0 0 0 12px;\n}\n\n.cet-menubar-menu-container .cet-menu-item-icon.checkbox {\n visibility: hidden;\n}";
12
+ const baseTheme = "body {\n margin: 0 !important;\n overflow: hidden !important;\n}\n\n/* Titlebar */\n.cet-titlebar {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n flex-wrap: wrap;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n font-size: 13px;\n font-family: Arial, Helvetica, sans-serif;\n box-sizing: border-box;\n padding: 0 16px;\n overflow: hidden;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n zoom: 1;\n width: 100%;\n height: 31px;\n line-height: 31px;\n z-index: 99999;\n}\n\n.cet-titlebar *,\n.cet-titlebar *:before,\n.cet-titlebar *:after {\n box-sizing: border-box;\n}\n\n.cet-titlebar.cet-windows,\n.cet-titlebar.cet-linux,\n.cet-titlebar.cet-freebsd {\n padding: 0;\n height: 30px;\n line-height: 30px;\n justify-content: left;\n overflow: visible;\n}\n\n/* Inverted */\n.cet-titlebar.cet-inverted {\n flex-direction: row-reverse;\n}\n\n.cet-titlebar.cet-inverted .cet-menubar,\n.cet-titlebar.cet-inverted .cet-window-controls {\n flex-direction: row-reverse;\n margin-left: 20px;\n margin-right: 0;\n}\n\n/* First buttons */\n.cet-titlebar.cet-first-buttons .cet-window-controls {\n order: -1;\n margin: 0 5px 0 0;\n}\n\n.cet-titlebar.cet-inverted .cet-window-controls {\n margin: 0 5px 0 0;\n}\n\n/* Shadow */\n.cet-titlebar.cet-shadow {\n box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);\n}\n\n/* Drag region */\n.cet-drag-region {\n top: 0;\n left: 0;\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: -1;\n -webkit-app-region: drag;\n}\n\n/* Icon */\n.cet-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 30px;\n z-index: 99;\n overflow: hidden;\n}\n\n/* Title */\n.cet-title {\n flex: 0 1 auto;\n font-size: 12px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n zoom: 1;\n}\n\n/* Title alignment */\n.cet-title.cet-title-left {\n margin-left: 8px;\n margin-right: auto;\n}\n\n.cet-title.cet-title-right {\n margin-left: auto;\n margin-right: 8px;\n}\n\n.cet-title.cet-title-center {\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.cet-title.cet-bigsur {\n font-size: 13px;\n font-weight: 600;\n}\n\n/* Window controls */\n.cet-window-controls {\n display: flex;\n flex-grow: 0;\n flex-shrink: 0;\n text-align: center;\n position: relative;\n z-index: 99;\n -webkit-app-region: no-drag;\n height: 30px;\n font-family: initial !important;\n margin-left: auto;\n}\n\n.cet-control-icon {\n width: 2.85rem;\n}\n\n.cet-control-icon:not(.inactive):hover {\n background-color: rgb(255 255 255 / 12%);\n}\n\n.light .cet-control-icon:not(.inactive):hover {\n background-color: rgb(0 0 0 / 12%);\n}\n\n.cet-control-icon.inactive svg {\n opacity: 0.4;\n}\n\n.cet-control-icon svg {\n width: 10px;\n height: -webkit-fill-available;\n fill: #fff;\n display: initial !important;\n vertical-align: unset !important;\n}\n\n.cet-titlebar.light .cet-control-icon svg {\n fill: #222222 !important;\n}\n\n.cet-control-close:not(.inactive):hover {\n background-color: rgb(232 17 35 / 90%) !important;\n}\n\n.cet-control-close:not(.inactive):hover svg {\n fill: #fff !important;\n}\n\n/* Resizer */\n.cet-resizer {\n -webkit-app-region: no-drag;\n position: absolute;\n}\n\n.cet-resizer.left {\n top: 0;\n left: 0;\n width: 6px;\n height: 100%;\n}\n\n.cet-resizer.top {\n top: 0;\n width: 100%;\n height: 6px;\n}\n\n/* Container */\n.cet-container {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: auto;\n z-index: 1;\n}\n\n/* MenuBar */\n.cet-menubar {\n display: flex;\n flex-shrink: 1;\n box-sizing: border-box;\n overflow: hidden;\n flex-wrap: wrap;\n margin-right: 20px;\n}\n\n.cet-menubar.bottom {\n order: 1;\n width: 100%;\n padding: 0 5px 5px;\n margin-right: 0;\n}\n\n.cet-menubar.bottom .cet-menubar-menu-button {\n border-radius: 4px;\n}\n\n.cet-menubar.bottom .cet-menubar-menu-button .cet-menubar-menu-title {\n line-height: 26px;\n}\n\n.cet-menubar .cet-menubar-menu-button {\n box-sizing: border-box;\n padding: 0px 8px;\n height: 100%;\n cursor: default;\n zoom: 1;\n white-space: nowrap;\n -webkit-app-region: no-drag;\n outline: 0;\n}\n\n.cet-menubar .cet-menubar-menu-button .cet-menubar-menu-title {\n font-size: 12px;\n}\n\n.cet-menubar .cet-menubar-menu-button.disabled {\n opacity: 0.4;\n}\n\n.cet-menubar .cet-menubar-menu-button:not(.disabled):hover,\n.cet-menubar .cet-menubar-menu-button:not(.disabled).open {\n background-color: rgb(255 255 255 / 12%);\n}\n\n.cet-titlebar.light .cet-menubar .cet-menubar-menu-button:not(.disabled):hover,\n.cet-titlebar.light .cet-menubar .cet-menubar-menu-button:not(.disabled).open {\n background-color: rgb(0 0 0 / 12%);\n}\n\n.cet-menubar-menu-container {\n position: absolute;\n display: block;\n left: 0px;\n opacity: 1;\n outline: 0;\n border: none;\n text-align: left;\n margin: 0 auto;\n margin-left: 0;\n font-size: inherit;\n overflow-x: visible;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n justify-content: flex-end;\n white-space: nowrap;\n border-radius: 7px;\n backdrop-filter: blur(10px);\n box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n z-index: 99999;\n}\n\n.cet-menubar-menu-container::-webkit-scrollbar {\n width: 8px;\n height: 4px;\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0);\n}\n\n.cet-menubar-menu-container::-webkit-scrollbar-track {\n border: none;\n background-color: rgba(0, 0, 0, 0);\n}\n\n.cet-menubar-menu-container::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background-color: rgba(110, 110, 110, 0.2);\n}\n\n.cet-menubar-menu-container:focus {\n outline: 0;\n}\n\n.cet-menubar-menu-container .cet-action-item {\n padding: 0;\n margin: 0;\n transform: none;\n display: -ms-flexbox;\n display: flex;\n outline: none;\n}\n\n.cet-menubar-menu-container .cet-action-item.active {\n transform: none;\n}\n\n.cet-menubar-menu-container .cet-action-item.disabled .cet-action-menu-item {\n opacity: 0.4;\n}\n\n.cet-menubar-menu-container .cet-action-item .cet-submenu {\n position: absolute;\n}\n\n.cet-menubar-menu-container .cet-action-menu-item {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -ms-flexbox;\n display: flex;\n height: 2.231em;\n margin: 4px 3px;\n align-items: center;\n position: relative;\n border-radius: 4px;\n text-decoration: none;\n}\n\n.cet-menubar-menu-container .cet-action-label {\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n text-decoration: none;\n padding: 0 1em;\n background: none;\n font-size: 12px;\n line-height: 1;\n}\n\n.cet-menubar-menu-container .cet-action-label:not(.separator) {\n display: inline-block;\n -webkit-box-sizing: border-box;\n -o-box-sizing: border-box;\n -moz-box-sizing: border-box;\n -ms-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0 2em 0 0.8em;\n}\n\n.cet-menubar-menu-container .cet-action-label.separator {\n opacity: 0.1;\n font-size: inherit;\n width: 100%;\n border-bottom: 1px solid transparent;\n}\n\n.cet-menubar-menu-container .cet-action-label.separator.text {\n padding: 0.7em 1em 0.1em 1em;\n font-weight: bold;\n opacity: 1;\n}\n\n.cet-menubar-menu-container .cet-action-label:hover {\n color: inherit;\n}\n\n.cet-menubar-menu-container .keybinding,\n.cet-menubar-menu-container .cet-submenu-indicator {\n display: inline-block;\n -ms-flex: 2 1 auto;\n flex: 2 1 auto;\n padding: 0 2em 0 1em;\n text-align: right;\n font-size: 11px;\n line-height: 1;\n}\n\n.cet-menubar-menu-container .cet-submenu-indicator {\n position: absolute;\n right: 4px;\n height: 12px;\n width: 12px;\n padding: 0;\n}\n\n.cet-menubar-menu-container .cet-submenu-indicator img,\n.cet-menubar-menu-container .cet-menu-item-icon .icon,\n.cet-menubar-menu-container .cet-submenu-indicator svg,\n.cet-menubar-menu-container .cet-menu-item-icon svg {\n display: inherit;\n width: 100%;\n height: 100%;\n}\n\n.cet-menubar-menu-container .cet-action-menu-item.checked>.cet-menu-item-icon.checkbox {\n visibility: visible;\n}\n\n.cet-menubar-menu-container .cet-menu-item-icon {\n width: 14px;\n height: 14px;\n margin: 0 0 0 12px;\n}\n\n.cet-menubar-menu-container .cet-menu-item-icon.checkbox {\n visibility: hidden;\n}";
13
13
  const macTheme = "";
14
14
  const winTheme = "";
15
15
  class ThemingRegistry extends _get__("lifecycle_1").Disposable {