custom-electron-titlebar 4.2.3 → 4.2.5

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 (66) hide show
  1. package/README.md +8 -5
  2. package/{dist/base → base}/browser/keyboardEvent.js +0 -2
  3. package/{dist/base → base}/browser/touch.js +2 -2
  4. package/{dist/base → base}/common/color.js +2 -3
  5. package/{dist/base → base}/common/event.js +2 -2
  6. package/{dist/base → base}/common/iterator.js +1 -1
  7. package/{dist/base → base}/common/keyCodes.js +1 -1
  8. package/{dist/base → base}/common/lifecycle.js +1 -1
  9. package/{dist/base → base}/common/platform.d.ts +7 -4
  10. package/{dist/base → base}/common/platform.js +16 -4
  11. package/{dist/consts.d.ts → consts.d.ts} +8 -0
  12. package/{dist/consts.js → consts.js} +8 -0
  13. package/{dist/menubar → menubar}/index.js +8 -5
  14. package/{dist/menubar → menubar}/menu/index.js +15 -1
  15. package/package.json +31 -24
  16. package/{dist/titlebar → titlebar}/index.d.ts +5 -0
  17. package/{dist/titlebar → titlebar}/index.js +22 -10
  18. package/{dist/titlebar → titlebar}/themebar.js +1 -1
  19. /package/{dist/base → base}/browser/browser.d.ts +0 -0
  20. /package/{dist/base → base}/browser/browser.js +0 -0
  21. /package/{dist/base → base}/browser/event.d.ts +0 -0
  22. /package/{dist/base → base}/browser/event.js +0 -0
  23. /package/{dist/base → base}/browser/keyboardEvent.d.ts +0 -0
  24. /package/{dist/base → base}/browser/mouseEvent.d.ts +0 -0
  25. /package/{dist/base → base}/browser/mouseEvent.js +0 -0
  26. /package/{dist/base → base}/browser/touch.d.ts +0 -0
  27. /package/{dist/base → base}/common/arrays.d.ts +0 -0
  28. /package/{dist/base → base}/common/arrays.js +0 -0
  29. /package/{dist/base → base}/common/async.d.ts +0 -0
  30. /package/{dist/base → base}/common/async.js +0 -0
  31. /package/{dist/base → base}/common/charCode.d.ts +0 -0
  32. /package/{dist/base → base}/common/charCode.js +0 -0
  33. /package/{dist/base → base}/common/color.d.ts +0 -0
  34. /package/{dist/base → base}/common/decorators.d.ts +0 -0
  35. /package/{dist/base → base}/common/decorators.js +0 -0
  36. /package/{dist/base → base}/common/dom.d.ts +0 -0
  37. /package/{dist/base → base}/common/dom.js +0 -0
  38. /package/{dist/base → base}/common/event.d.ts +0 -0
  39. /package/{dist/base → base}/common/iterator.d.ts +0 -0
  40. /package/{dist/base → base}/common/keyCodes.d.ts +0 -0
  41. /package/{dist/base → base}/common/lifecycle.d.ts +0 -0
  42. /package/{dist/base → base}/common/linkedList.d.ts +0 -0
  43. /package/{dist/base → base}/common/linkedList.js +0 -0
  44. /package/{dist/base → base}/common/strings.d.ts +0 -0
  45. /package/{dist/base → base}/common/strings.js +0 -0
  46. /package/{dist/index.d.ts → index.d.ts} +0 -0
  47. /package/{dist/index.js → index.js} +0 -0
  48. /package/{dist/main → main}/attach-titlebar-to-window.d.ts +0 -0
  49. /package/{dist/main → main}/attach-titlebar-to-window.js +0 -0
  50. /package/{dist/main → main}/index.d.ts +0 -0
  51. /package/{dist/main → main}/index.js +0 -0
  52. /package/{dist/main → main}/setup-titlebar.d.ts +0 -0
  53. /package/{dist/main → main}/setup-titlebar.js +0 -0
  54. /package/{dist/menubar → menubar}/index.d.ts +0 -0
  55. /package/{dist/menubar → menubar}/menu/index.d.ts +0 -0
  56. /package/{dist/menubar → menubar}/menu/item.d.ts +0 -0
  57. /package/{dist/menubar → menubar}/menu/item.js +0 -0
  58. /package/{dist/menubar → menubar}/menu/separator.d.ts +0 -0
  59. /package/{dist/menubar → menubar}/menu/separator.js +0 -0
  60. /package/{dist/menubar → menubar}/menu/submenu.d.ts +0 -0
  61. /package/{dist/menubar → menubar}/menu/submenu.js +0 -0
  62. /package/{dist/menubar → menubar}/menubar-options.d.ts +0 -0
  63. /package/{dist/menubar → menubar}/menubar-options.js +0 -0
  64. /package/{dist/titlebar → titlebar}/options.d.ts +0 -0
  65. /package/{dist/titlebar → titlebar}/options.js +0 -0
  66. /package/{dist/titlebar → titlebar}/themebar.d.ts +0 -0
package/README.md CHANGED
@@ -2,9 +2,10 @@
2
2
 
3
3
  This project is a typescript library for electron that allows you to configure a fully customizable title bar.
4
4
 
5
- [![LICENSE](https://img.shields.io/github/license/AlexTorresDev/custom-electron-titlebar.svg)](https://github.com/AlexTorresDev/custom-electron-titlebar/blob/master/LICENSE)
6
- [![NPM Version](https://img.shields.io/npm/v/custom-electron-titlebar.svg)](https://npmjs.org/package/custom-electron-titlebar)
7
- [![install size](https://packagephobia.com/badge?p=custom-electron-titlebar)](https://packagephobia.com/result?p=custom-electron-titlebar)
5
+ [![CI](https://badgen.net/github/checks/AlexTorresDev/custom-electron-titlebar?label=CI)](https://github.com/AlexTorresDev/custom-electron-titlebar/actions/workflows/build-release.yml)
6
+ [![License](https://badgen.net/github/license/AlexTorresDev/custom-electron-titlebar?label=License)](https://github.com/AlexTorresDev/custom-electron-titlebar/blob/master/LICENSE)
7
+ [![NPM](https://badgen.net/npm/v/custom-electron-titlebar?label=NPM)](https://npmjs.org/package/custom-electron-titlebar)
8
+ [![Install size](https://badgen.net/packagephobia/install/custom-electron-titlebar?label=Install%20size)](https://packagephobia.com/result?p=custom-electron-titlebar)
8
9
 
9
10
  [📄 Visit Documentation](https://cet.alextrs.dev)
10
11
 
@@ -72,12 +73,14 @@ window.addEventListener('DOMContentLoaded', () => {
72
73
  To see the options you can include in the Title Bar constructor, such as color of elements, icons, menu position, and much more, and the methods you can use, go to the [wiki](https://github.com/AlexTorresDev/custom-electron-titlebar/wiki)
73
74
 
74
75
  ## 💰 Support
75
- If you want to support my development, you can do so by donating through [Buy me a coffee](https://www.buymeacoffee.com/AlexTorresDev)
76
+ If you want to support my development, you can do so by donating through [💖 Sponsor](https://github.com/sponsors/AlexTorresDev)
76
77
 
77
78
 
78
- ## 📝 Collaborators
79
+ ## 📝 Contributors
79
80
  I would like to express my sincere gratitude to all the people who have collaborated in the development and advancement of this project. I appreciate your contributions.
80
81
 
82
+ [![](https://contrib.rocks/image?repo=AlexTorresDev/custom-electron-titlebar)](https://github.com/AlexTorresDev/custom-electron-titlebar/graphs/contributors)
83
+
81
84
 
82
85
  ## ✅ License
83
86
  This project is under the [MIT](https://github.com/AlexTorresDev/custom-electron-titlebar/blob/master/LICENSE) license.
@@ -210,9 +210,7 @@ class StandardKeyboardEvent {
210
210
  this.metaKey = this.metaKey || this.keyCode === 57 /* KeyCode.Meta */;
211
211
  this._asKeybinding = this._computeKeybinding();
212
212
  this._asRuntimeKeybinding = this._computeRuntimeKeybinding();
213
- // console.log(`code: ${e.code}, keyCode: ${e.keyCode}, key: ${e.key}`);
214
213
  }
215
-
216
214
  preventDefault() {
217
215
  if (this.browserEvent && this.browserEvent.preventDefault) {
218
216
  this.browserEvent.preventDefault();
@@ -50,7 +50,7 @@ var EventType;
50
50
  EventType.Start = '-monaco-gesturestart';
51
51
  EventType.End = '-monaco-gesturesend';
52
52
  EventType.Contextmenu = '-monaco-gesturecontextmenu';
53
- })(_assign__("EventType", exports.EventType || (exports.EventType = {})));
53
+ })(_get__("EventType") || (exports.EventType = _assign__("EventType", {})));
54
54
  class Gesture extends _get__("lifecycle_1").Disposable {
55
55
  constructor() {
56
56
  super();
@@ -250,10 +250,10 @@ class Gesture extends _get__("lifecycle_1").Disposable {
250
250
  }
251
251
  }
252
252
  }
253
+ exports.Gesture = _get__("Gesture");
253
254
  _get__("Gesture").SCROLL_FRICTION = -0.005;
254
255
  _get__("Gesture").HOLD_DELAY = 700;
255
256
  _get__("Gesture").CLEAR_TAP_COUNT_TIME = 400; // ms
256
- exports.Gesture = _get__("Gesture");
257
257
  function _getGlobalObject() {
258
258
  try {
259
259
  if (!!global) {
@@ -340,6 +340,7 @@ class Color {
340
340
  return of.darken(factor);
341
341
  }
342
342
  }
343
+ exports.Color = _get__("Color");
343
344
  _get__("Color").WHITE = new (_get__("Color"))(new (_get__("RGBA"))(255, 255, 255, 1));
344
345
  _get__("Color").BLACK = new (_get__("Color"))(new (_get__("RGBA"))(0, 0, 0, 1));
345
346
  _get__("Color").RED = new (_get__("Color"))(new (_get__("RGBA"))(255, 0, 0, 1));
@@ -348,7 +349,6 @@ _get__("Color").GREEN = new (_get__("Color"))(new (_get__("RGBA"))(0, 255, 0, 1)
348
349
  _get__("Color").CYAN = new (_get__("Color"))(new (_get__("RGBA"))(0, 255, 255, 1));
349
350
  _get__("Color").LIGHTGREY = new (_get__("Color"))(new (_get__("RGBA"))(211, 211, 211, 1));
350
351
  _get__("Color").TRANSPARENT = new (_get__("Color"))(new (_get__("RGBA"))(0, 0, 0, 0));
351
- exports.Color = _get__("Color");
352
352
  (function (Color) {
353
353
  let Format;
354
354
  (function (Format) {
@@ -515,8 +515,7 @@ exports.Color = _get__("Color");
515
515
  }
516
516
  })(CSS = Format.CSS || (Format.CSS = {}));
517
517
  })(Format = Color.Format || (Color.Format = {}));
518
- })(_assign__("Color", exports.Color || (exports.Color = {})));
519
- exports.Color = _get__("Color");
518
+ })(_get__("Color") || (exports.Color = _assign__("Color", {})));
520
519
  function _getGlobalObject() {
521
520
  try {
522
521
  if (!!global) {
@@ -298,7 +298,7 @@ var Event;
298
298
  return new Promise(c => once(event)(c));
299
299
  }
300
300
  Event.toPromise = toPromise;
301
- })(_assign__("Event", exports.Event || (exports.Event = {})));
301
+ })(_get__("Event") || (exports.Event = _assign__("Event", {})));
302
302
  let _globalLeakWarningThreshold = -1;
303
303
  function setGlobalLeakWarningThreshold(n) {
304
304
  const oldValue = _get__("_globalLeakWarningThreshold");
@@ -479,8 +479,8 @@ class Emitter {
479
479
  this._disposed = true;
480
480
  }
481
481
  }
482
- _get__("Emitter")._noop = function () {};
483
482
  exports.Emitter = _get__("Emitter");
483
+ _get__("Emitter")._noop = function () {};
484
484
  class AsyncEmitter extends _get__("Emitter") {
485
485
  async fireAsync(eventFn) {
486
486
  if (!this._listeners) {
@@ -94,7 +94,7 @@ var Iterator;
94
94
  return result;
95
95
  }
96
96
  Iterator.collect = collect;
97
- })(_assign__("Iterator", exports.Iterator || (exports.Iterator = {})));
97
+ })(_get__("Iterator") || (exports.Iterator = _assign__("Iterator", {})));
98
98
  function getSequenceIterator(arg) {
99
99
  if (Array.isArray(arg)) {
100
100
  return _get__("Iterator").fromArray(arg);
@@ -176,7 +176,7 @@ var KeyCodeUtils;
176
176
  return _get__("userSettingsUSMap").strToKeyCode(key) || _get__("userSettingsGeneralMap").strToKeyCode(key);
177
177
  }
178
178
  KeyCodeUtils.fromUserSettings = fromUserSettings;
179
- })(_assign__("KeyCodeUtils", exports.KeyCodeUtils || (exports.KeyCodeUtils = {})));
179
+ })(_get__("KeyCodeUtils") || (exports.KeyCodeUtils = _assign__("KeyCodeUtils", {})));
180
180
  function KeyChord(firstPart, secondPart) {
181
181
  const chordPart = (secondPart & 0x0000FFFF) << 16 >>> 0;
182
182
  return (firstPart | chordPart) >>> 0;
@@ -65,10 +65,10 @@ class Disposable {
65
65
  return t;
66
66
  }
67
67
  }
68
+ exports.Disposable = _get__("Disposable");
68
69
  _get__("Disposable").None = Object.freeze({
69
70
  dispose() {}
70
71
  });
71
- exports.Disposable = _get__("Disposable");
72
72
  function _getGlobalObject() {
73
73
  try {
74
74
  if (!!global) {
@@ -5,12 +5,14 @@ export declare const enum Platform {
5
5
  Web = 0,
6
6
  Mac = 1,
7
7
  Linux = 2,
8
- Windows = 3
8
+ FreeBSD = 3,
9
+ Windows = 4
9
10
  }
10
- export declare function PlatformToString(platform: Platform): "Windows" | "Linux" | "Web" | "Mac";
11
+ export declare function PlatformToString(platform: Platform): "Windows" | "Linux" | "FreeBSD" | "Web" | "Mac";
11
12
  export declare const isWindows: boolean;
12
13
  export declare const isMacintosh: boolean;
13
14
  export declare const isLinux: boolean;
15
+ export declare const isFreeBSD: boolean;
14
16
  export declare const isNative: boolean;
15
17
  export declare const isWeb: boolean;
16
18
  export declare const platform: Platform;
@@ -20,9 +22,10 @@ export declare function setImmediate(callback: (...args: any[]) => void): number
20
22
  export declare const enum OperatingSystem {
21
23
  Windows = 1,
22
24
  Macintosh = 2,
23
- Linux = 3
25
+ Linux = 3,
26
+ FreeBSD = 4
24
27
  }
25
- export declare const OS: OperatingSystem;
28
+ export declare const OS: number;
26
29
  export declare const enum AccessibilitySupport {
27
30
  /**
28
31
  * This should be the browser case where it is not known if a screen reader is attached or no.
@@ -8,10 +8,11 @@
8
8
  Object.defineProperty(exports, "__esModule", {
9
9
  value: true
10
10
  });
11
- exports.OS = exports.setImmediate = exports.globals = exports.isRootUser = exports.platform = exports.isWeb = exports.isNative = exports.isLinux = exports.isMacintosh = exports.isWindows = exports.PlatformToString = void 0;
11
+ exports.OS = exports.setImmediate = exports.globals = exports.isRootUser = exports.platform = exports.isWeb = exports.isNative = exports.isFreeBSD = exports.isLinux = exports.isMacintosh = exports.isWindows = exports.PlatformToString = void 0;
12
12
  let _isWindows = false;
13
13
  let _isMacintosh = false;
14
14
  let _isLinux = false;
15
+ let _isFreeBSD = false;
15
16
  let _isNative = false;
16
17
  let _isWeb = false;
17
18
  const isElectronRenderer = typeof process !== 'undefined' && typeof process.versions !== 'undefined' && typeof process.versions.electron !== 'undefined' && process.type === 'renderer';
@@ -21,11 +22,13 @@ if (typeof navigator === 'object' && !_get__("isElectronRenderer")) {
21
22
  _assign__("_isWindows", userAgent.indexOf('Windows') >= 0);
22
23
  _assign__("_isMacintosh", userAgent.indexOf('Macintosh') >= 0);
23
24
  _assign__("_isLinux", userAgent.indexOf('Linux') >= 0);
25
+ _assign__("_isFreeBSD", userAgent.indexOf('FreeBSD') >= 0);
24
26
  _assign__("_isWeb", true);
25
27
  } else if (typeof process === 'object') {
26
28
  _assign__("_isWindows", process.platform === 'win32');
27
29
  _assign__("_isMacintosh", process.platform === 'darwin');
28
30
  _assign__("_isLinux", process.platform === 'linux');
31
+ _assign__("_isFreeBSD", process.platform === 'freebsd');
29
32
  _assign__("_isNative", true);
30
33
  }
31
34
  function PlatformToString(platform) {
@@ -36,7 +39,9 @@ function PlatformToString(platform) {
36
39
  return 'Mac';
37
40
  case 2 /* Platform.Linux */:
38
41
  return 'Linux';
39
- case 3 /* Platform.Windows */:
42
+ case 3 /* Platform.FreeBSD */:
43
+ return 'FreeBSD';
44
+ case 4 /* Platform.Windows */:
40
45
  return 'Windows';
41
46
  }
42
47
  }
@@ -46,14 +51,17 @@ if (_get__("_isNative")) {
46
51
  if (_get__("_isMacintosh")) {
47
52
  _assign__("_platform", 1) /* Platform.Mac */;
48
53
  } else if (_get__("_isWindows")) {
49
- _assign__("_platform", 3) /* Platform.Windows */;
54
+ _assign__("_platform", 4) /* Platform.Windows */;
50
55
  } else if (_get__("_isLinux")) {
51
56
  _assign__("_platform", 2) /* Platform.Linux */;
57
+ } else if (_get__("_isFreeBSD")) {
58
+ _assign__("_platform", 3) /* Platform.FreeBSD */;
52
59
  }
53
60
  }
54
61
  exports.isWindows = _get__("_isWindows");
55
62
  exports.isMacintosh = _get__("_isMacintosh");
56
63
  exports.isLinux = _get__("_isLinux");
64
+ exports.isFreeBSD = _get__("_isFreeBSD");
57
65
  exports.isNative = _get__("_isNative");
58
66
  exports.isWeb = _get__("_isWeb");
59
67
  exports.platform = _get__("_platform");
@@ -78,7 +86,7 @@ function setImmediate(callback) {
78
86
  return _get__("_setImmediate")(callback);
79
87
  }
80
88
  exports.setImmediate = _get__("setImmediate");
81
- const _wl = _get__("_isWindows") ? 1 /* OperatingSystem.Windows */ : 3 /* OperatingSystem.Linux */;
89
+ const _wl = _get__("_isWindows") ? 1 /* OperatingSystem.Windows */ : 3 /* OperatingSystem.Linux */ | 4 /* OperatingSystem.FreeBSD */;
82
90
  exports.OS = _get__("_isMacintosh") ? 2 /* OperatingSystem.Macintosh */ : _get__("_wl");
83
91
  function _getGlobalObject() {
84
92
  try {
@@ -173,6 +181,8 @@ function _get_original__(variableName) {
173
181
  return _isMacintosh;
174
182
  case "_isLinux":
175
183
  return _isLinux;
184
+ case "_isFreeBSD":
185
+ return _isFreeBSD;
176
186
  case "_isWeb":
177
187
  return _isWeb;
178
188
  case "_isNative":
@@ -212,6 +222,8 @@ function _set_original__(variableName, _value) {
212
222
  return _isMacintosh = _value;
213
223
  case "_isLinux":
214
224
  return _isLinux = _value;
225
+ case "_isFreeBSD":
226
+ return _isFreeBSD = _value;
215
227
  case "_isWeb":
216
228
  return _isWeb = _value;
217
229
  case "_isNative":
@@ -20,6 +20,12 @@ interface ITitlebarIcons extends IMenuIcons {
20
20
  restore: string;
21
21
  close: string;
22
22
  };
23
+ freebsd: {
24
+ minimize: string;
25
+ maximize: string;
26
+ restore: string;
27
+ close: string;
28
+ };
23
29
  windows: {
24
30
  minimize: string;
25
31
  maximize: string;
@@ -32,6 +38,7 @@ export declare const menuIcons: ITitlebarIcons;
32
38
  * Handles mnemonics for menu items. Depending on OS:
33
39
  * - Windows: Supported via & character (replace && with &)
34
40
  * - Linux: Supported via & character (replace && with &)
41
+ * - FreeBSD: Supported via & character (replace && with &)
35
42
  * - macOS: Unsupported (replace && with empty string)
36
43
  */
37
44
  export declare function mnemonicMenuLabel(label: string, forceDisableMnemonics?: boolean): string;
@@ -39,6 +46,7 @@ export declare function mnemonicMenuLabel(label: string, forceDisableMnemonics?:
39
46
  * Handles mnemonics for buttons. Depending on OS:
40
47
  * - Windows: Supported via & character (replace && with & and & with && for escaping)
41
48
  * - Linux: Supported via _ character (replace && with _)
49
+ * - FreeBSD: Supported via _ character (replace && with _)
42
50
  * - macOS: Unsupported (replace && with empty string)
43
51
  */
44
52
  export declare function mnemonicButtonLabel(label: string, forceDisableMnemonics?: boolean): string;
@@ -34,6 +34,12 @@ exports.menuIcons = {
34
34
  restore: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path d="M7.9,2.2h-7C0.4,2.2,0,2.6,0,3.1v7C0,10.6,0.4,11,0.9,11h7c0.5,0,0.9-0.4,0.9-0.9v-7C8.8,2.6,8.4,2.2,7.9,2.2z M7.7,9.6 c0,0.2-0.1,0.3-0.3,0.3h-6c-0.2,0-0.3-0.1-0.3-0.3v-6c0-0.2,0.1-0.3,0.3-0.3h6c0.2,0,0.3,0.1,0.3,0.3V9.6z M10,0.9 c0,0.5-0.4,0.9-0.9,0.9h-2.1 c-0.5,0-0.9-0.4-0.9-0.9V0.9c0-0.5,0.4-0.9,0.9-0.9h2.1C9.6,0,10,0.4,10,0.9z"/></svg>',
35
35
  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>'
36
36
  },
37
+ freebsd: {
38
+ minimize: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path d="M11,4.9v1.1H0V4.399h11z"/></svg>',
39
+ maximize: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path d="M0,1.7v7.6C0,10.2,0.8,11,1.7,11h7.6c0.9,0,1.7-0.8,1.7-1.7V1.7C11,0.8,10.2,0,9.3,0H1.7C0.8,0,0,0.8,0,1.7z M8.8,9.9H2.2c-0.6,0-1.1-0.5-1.1-1.1V2.2c0-0.6,0.5-1.1,1.1-1.1h6.7c0.6,0,1.1,0.5,1.1,1.1v6.7C9.9,9.4,9.4,9.9,8.8,9.9z"/></svg>',
40
+ restore: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path d="M7.9,2.2h-7C0.4,2.2,0,2.6,0,3.1v7C0,10.6,0.4,11,0.9,11h7c0.5,0,0.9-0.4,0.9-0.9v-7C8.8,2.6,8.4,2.2,7.9,2.2z M7.7,9.6 c0,0.2-0.1,0.3-0.3,0.3h-6c-0.2,0-0.3-0.1-0.3-0.3v-6c0-0.2,0.1-0.3,0.3-0.3h6c0.2,0,0.3,0.1,0.3,0.3V9.6z M10,0.9 c0,0.5-0.4,0.9-0.9,0.9h-2.1 c-0.5,0-0.9-0.4-0.9-0.9V0.9c0-0.5,0.4-0.9,0.9-0.9h2.1C9.6,0,10,0.4,10,0.9z"/></svg>',
41
+ 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>'
42
+ },
37
43
  windows: {
38
44
  minimize: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path d="M11,4.9v1.1H0V4.399h11z"/></svg>',
39
45
  maximize: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path d="M0,1.7v7.6C0,10.2,0.8,11,1.7,11h7.6c0.9,0,1.7-0.8,1.7-1.7V1.7C11,0.8,10.2,0,9.3,0H1.7C0.8,0,0,0.8,0,1.7z M8.8,9.9H2.2c-0.6,0-1.1-0.5-1.1-1.1V2.2c0-0.6,0.5-1.1,1.1-1.1h6.7c0.6,0,1.1,0.5,1.1,1.1v6.7C9.9,9.4,9.4,9.9,8.8,9.9z"/></svg>',
@@ -45,6 +51,7 @@ exports.menuIcons = {
45
51
  * Handles mnemonics for menu items. Depending on OS:
46
52
  * - Windows: Supported via & character (replace && with &)
47
53
  * - Linux: Supported via & character (replace && with &)
54
+ * - FreeBSD: Supported via & character (replace && with &)
48
55
  * - macOS: Unsupported (replace && with empty string)
49
56
  */
50
57
  function mnemonicMenuLabel(label, forceDisableMnemonics) {
@@ -58,6 +65,7 @@ exports.mnemonicMenuLabel = _get__("mnemonicMenuLabel");
58
65
  * Handles mnemonics for buttons. Depending on OS:
59
66
  * - Windows: Supported via & character (replace && with & and & with && for escaping)
60
67
  * - Linux: Supported via _ character (replace && with _)
68
+ * - FreeBSD: Supported via _ character (replace && with _)
61
69
  * - macOS: Unsupported (replace && with empty string)
62
70
  */
63
71
  function mnemonicButtonLabel(label, forceDisableMnemonics) {
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", {
39
39
  value: true
40
40
  });
41
41
  exports.MenuBar = void 0;
42
+ const electron_1 = require("electron");
42
43
  const DOM = _get__("__importStar")(require("../base/common/dom"));
43
44
  const event_1 = require("../base/common/event");
44
45
  const lifecycle_1 = require("../base/common/lifecycle");
@@ -153,7 +154,6 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
153
154
  if (!this.options.enableMnemonics || !e.altKey || e.ctrlKey || e.defaultPrevented) {
154
155
  return;
155
156
  }
156
- console.log(this.mnemonics);
157
157
  const key = e.key.toLocaleLowerCase();
158
158
  if (!this.mnemonics.has(key)) {
159
159
  return;
@@ -730,9 +730,6 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
730
730
  }
731
731
  }
732
732
  updateMnemonicVisibility(visible) {
733
- console.log({
734
- visible
735
- });
736
733
  if (this.menus) {
737
734
  this.menus.forEach(menuBarMenu => {
738
735
  if (menuBarMenu.titleElement && menuBarMenu.titleElement.children.length) {
@@ -769,6 +766,10 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
769
766
  return this._onFocusStateChange.event;
770
767
  }
771
768
  onMenuTriggered(menuIndex, clicked) {
769
+ if (!this.menus[menuIndex].actions) {
770
+ _get__("electron_1").ipcRenderer.send('menu-event', menuIndex + 1);
771
+ return;
772
+ }
772
773
  if (this.isOpen) {
773
774
  if (this.isCurrentMenu(menuIndex)) {
774
775
  this.setUnfocusedState();
@@ -898,8 +899,8 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
898
899
  };
899
900
  }
900
901
  }
901
- _get__("MenuBar").OVERFLOW_INDEX = -1;
902
902
  exports.MenuBar = _get__("MenuBar");
903
+ _get__("MenuBar").OVERFLOW_INDEX = -1;
903
904
  function _getGlobalObject() {
904
905
  try {
905
906
  if (!!global) {
@@ -1019,6 +1020,8 @@ function _get_original__(variableName) {
1019
1020
  return lifecycle_1;
1020
1021
  case "strings":
1021
1022
  return strings;
1023
+ case "electron_1":
1024
+ return electron_1;
1022
1025
  case "keyCodes_1":
1023
1026
  return keyCodes_1;
1024
1027
  }
@@ -22,7 +22,7 @@ var Direction;
22
22
  (function (Direction) {
23
23
  Direction[Direction["Right"] = 0] = "Right";
24
24
  Direction[Direction["Left"] = 1] = "Left";
25
- })(_assign__("Direction", exports.Direction || (exports.Direction = {})));
25
+ })(_get__("Direction") || (exports.Direction = _assign__("Direction", {})));
26
26
  class CETMenu extends _get__("lifecycle_1").Disposable {
27
27
  constructor(menuContainer, menuIcons, parentOptions, currentOptions, closeSubMenu = () => {}) {
28
28
  super();
@@ -114,6 +114,20 @@ class CETMenu extends _get__("lifecycle_1").Disposable {
114
114
  }
115
115
  }));
116
116
  }
117
+ if (_get__("platform_1").isFreeBSD) {
118
+ this._register((0, _get__("dom_1").addDisposableListener)(this.menuContainer, _get__("dom_1").EventType.KEY_DOWN, e => {
119
+ const event = new (_get__("keyboardEvent_1").StandardKeyboardEvent)(e);
120
+ if (event.equals(14 /* KeyCode.Home */) || event.equals(11 /* KeyCode.PageUp */)) {
121
+ this.focusedItem = this.items.length - 1;
122
+ this.focusNext();
123
+ _get__("dom_1").EventHelper.stop(e, true);
124
+ } else if (event.equals(13 /* KeyCode.End */) || event.equals(12 /* KeyCode.PageDown */)) {
125
+ this.focusedItem = 0;
126
+ this.focusPrevious();
127
+ _get__("dom_1").EventHelper.stop(e, true);
128
+ }
129
+ }));
130
+ }
117
131
  this._register((0, _get__("dom_1").addDisposableListener)(this.menuContainer, _get__("dom_1").EventType.MOUSE_OUT, e => {
118
132
  const relatedTarget = e.relatedTarget;
119
133
  if (!(0, _get__("dom_1").isAncestor)(relatedTarget, this.menuContainer)) {
package/package.json CHANGED
@@ -1,26 +1,28 @@
1
1
  {
2
2
  "name": "custom-electron-titlebar",
3
- "version": "4.2.3",
3
+ "version": "4.2.5",
4
4
  "description": "Library for electron that allows you to configure a fully customizable title bar.",
5
- "types": "./dist/index.d.ts",
5
+ "types": "./index.d.ts",
6
+ "main": "./index.ts",
6
7
  "typesVersions": {
7
8
  "*": {
8
9
  "main": [
9
- "./dist/main/index.d.ts"
10
+ "./main/index.d.ts"
10
11
  ]
11
12
  }
12
13
  },
13
14
  "exports": {
14
- ".": "./dist/index.js",
15
- "./main": "./dist/main/index.js"
15
+ ".": "./index.js",
16
+ "./main": "./main/index.js"
16
17
  },
17
18
  "scripts": {
18
- "clean": "rimraf ./dist",
19
+ "clean": "rimraf .",
19
20
  "build:package": "tsc && tsc-alias",
20
- "build:babel": "babel ./dist --out-dir ./dist --extensions \".js\"",
21
+ "build:babel": "babel . --out-dir . --extensions \".js\"",
21
22
  "start": "electron example/main.js",
22
23
  "dev": "npm run build && npm run start",
23
- "build": "npm run clean && npm run build:package && npm run build:babel"
24
+ "build": "npm run clean && npm run build:package && npm run build:babel",
25
+ "test": "jest"
24
26
  },
25
27
  "author": "AlexTorresDev <alextorressk@gmail.com>",
26
28
  "license": "MIT",
@@ -34,36 +36,41 @@
34
36
  "title bar",
35
37
  "menubar",
36
38
  "windows",
37
- "linux"
39
+ "linux",
40
+ "freebsd"
38
41
  ],
39
42
  "bugs": {
40
43
  "url": "https://github.com/AlexTorresDev/custom-electron-titlebar/issues"
41
44
  },
42
45
  "homepage": "https://github.com/AlexTorresDev/custom-electron-titlebar#readme",
43
- "directories": {
44
- "example": "example",
45
- "dist": "dist"
46
- },
47
46
  "peerDependencies": {
48
47
  "electron": ">20.0.0"
49
48
  },
50
49
  "devDependencies": {
51
- "@babel/cli": "7.21.5",
52
- "@babel/core": "7.21.8",
53
- "@typescript-eslint/eslint-plugin": "5.59.2",
54
- "@typescript-eslint/parser": "5.59.2",
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
55
  "babel-plugin-import-require-as-string": "1.0.2",
56
56
  "babel-plugin-module-resolver": "5.0.0",
57
57
  "babel-plugin-rewire": "1.2.0",
58
- "electron": "24.2.0",
59
- "eslint": "8.40.0",
58
+ "electron": "25.3.1",
59
+ "eslint": "8.45.0",
60
60
  "eslint-config-prettier": "8.8.0",
61
- "eslint-config-standard": "17.0.0",
61
+ "eslint-config-standard": "17.1.0",
62
62
  "eslint-plugin-import": "2.27.5",
63
- "eslint-plugin-n": "15.7.0",
63
+ "eslint-plugin-n": "16.0.1",
64
64
  "eslint-plugin-promise": "6.1.1",
65
- "rimraf": "5.0.0",
66
- "tsc-alias": "1.8.6",
67
- "typescript": "5.0.4"
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"
72
+ },
73
+ "eslintConfig": {
74
+ "extends": "./node_modules/standard/eslintrc.json"
68
75
  }
69
76
  }
@@ -1,4 +1,5 @@
1
1
  import { Color } from '../base/common/color';
2
+ import { MenuBar } from '../menubar';
2
3
  import { TitleBarOptions } from './options';
3
4
  import { ThemeBar } from './themebar';
4
5
  export declare class CustomTitlebar extends ThemeBar {
@@ -96,4 +97,8 @@ export declare class CustomTitlebar extends ThemeBar {
96
97
  * Remove the titlebar, menubar and all methods.
97
98
  */
98
99
  dispose(): void;
100
+ get titlebarElement(): HTMLElement;
101
+ get menubarElement(): MenuBar | undefined;
102
+ get containerElement(): HTMLElement;
103
+ get titleElement(): HTMLElement;
99
104
  }
@@ -53,7 +53,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
53
53
  ...this.currentOptions,
54
54
  ...options
55
55
  };
56
- const jWindowIcons = _get__("consts_1").menuIcons[(0, _get__("platform_1").PlatformToString)(_get__("platform_1").platform).toLocaleLowerCase()];
56
+ const jWindowIcons = _get__("consts_1").menuIcons[(0, _get__("platform_1").PlatformToString)(_get__("platform_1").platform)?.toLocaleLowerCase()];
57
57
  this.platformIcons = jWindowIcons;
58
58
  this.titlebar = (0, _get__("dom_1").$)('.cet-titlebar');
59
59
  this.dragRegion = (0, _get__("dom_1").$)('.cet-drag-region');
@@ -145,7 +145,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
145
145
  this.icon.firstElementChild.setAttribute('style', `height: ${size}px`);
146
146
  }
147
147
  setupMenubar() {
148
- _get__("electron_1").ipcRenderer.invoke('request-application-menu').then(menu => this.updateMenu(menu));
148
+ _get__("electron_1").ipcRenderer.invoke('request-application-menu')?.then(menu => this.updateMenu(menu));
149
149
  const menuPosition = this.currentOptions.menuPosition;
150
150
  if (menuPosition) {
151
151
  this.updateMenuPosition(menuPosition);
@@ -172,9 +172,9 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
172
172
  const onlyRendererMenuBar = this.currentOptions.onlyShowMenuBar;
173
173
  const tooltips = this.currentOptions.tooltips;
174
174
  if (_get__("platform_1").isMacintosh || onlyRendererMenuBar) return;
175
- this.createControlButton(this.controls.minimize, this.platformIcons.minimize, tooltips.minimize, this.currentOptions.minimizable);
176
- this.createControlButton(this.controls.maximize, this.platformIcons.maximize, tooltips.maximize, this.currentOptions.maximizable);
177
- this.createControlButton(this.controls.close, this.platformIcons.close, tooltips.close, this.currentOptions.closeable);
175
+ this.createControlButton(this.controls.minimize, this.platformIcons?.minimize, tooltips.minimize, this.currentOptions.minimizable);
176
+ this.createControlButton(this.controls.maximize, this.platformIcons?.maximize, tooltips.maximize, this.currentOptions.maximizable);
177
+ this.createControlButton(this.controls.close, this.platformIcons?.close, tooltips.close, this.currentOptions.closeable);
178
178
  (0, _get__("dom_1").append)(this.titlebar, this.controlsContainer);
179
179
  }
180
180
  setupContainer() {
@@ -190,7 +190,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
190
190
  setupTitleBar() {
191
191
  const order = this.currentOptions.order;
192
192
  const hasShadow = this.currentOptions.shadow;
193
- (0, _get__("dom_1").addClass)(this.titlebar, `cet-${(0, _get__("platform_1").PlatformToString)(_get__("platform_1").platform).toLocaleLowerCase()}`);
193
+ (0, _get__("dom_1").addClass)(this.titlebar, `cet-${(0, _get__("platform_1").PlatformToString)(_get__("platform_1").platform)?.toLocaleLowerCase()}`);
194
194
  if (order) {
195
195
  (0, _get__("dom_1").addClass)(this.titlebar, `cet-${order}`);
196
196
  }
@@ -241,7 +241,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
241
241
  this.updateStyles();
242
242
  }
243
243
  onMenuBarVisibilityChanged(visible) {
244
- if (_get__("platform_1").isWindows || _get__("platform_1").isLinux) {
244
+ if (_get__("platform_1").isWindows || _get__("platform_1").isLinux || _get__("platform_1").isFreeBSD) {
245
245
  if (visible) {
246
246
  // Hack to fix issue #52522 with layered webkit-app-region elements appearing under cursor
247
247
  (0, _get__("dom_1").hide)(this.dragRegion);
@@ -250,7 +250,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
250
250
  }
251
251
  }
252
252
  onMenuBarFocusChanged(focused) {
253
- if (_get__("platform_1").isWindows || _get__("platform_1").isLinux) {
253
+ if (_get__("platform_1").isWindows || _get__("platform_1").isLinux || _get__("platform_1").isFreeBSD) {
254
254
  if (focused) (0, _get__("dom_1").hide)(this.dragRegion);else (0, _get__("dom_1").show)(this.dragRegion);
255
255
  }
256
256
  }
@@ -421,7 +421,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
421
421
  */
422
422
  updateBackground(backgroundColor) {
423
423
  this.currentOptions.backgroundColor = backgroundColor;
424
- // this.updateStyles()
424
+ this.updateStyles();
425
425
  return this;
426
426
  }
427
427
  /**
@@ -430,7 +430,7 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
430
430
  */
431
431
  updateItemBGColor(itemBGColor) {
432
432
  this.currentOptions.itemBackgroundColor = itemBGColor;
433
- // this._updateStyles()
433
+ this.updateStyles();
434
434
  return this;
435
435
  }
436
436
  /**
@@ -471,6 +471,18 @@ class CustomTitlebar extends _get__("themebar_1").ThemeBar {
471
471
  while (this.container.firstChild) (0, _get__("dom_1").append)(document.body, this.container.firstChild);
472
472
  this.container.remove();
473
473
  }
474
+ get titlebarElement() {
475
+ return this.titlebar;
476
+ }
477
+ get menubarElement() {
478
+ return this.menuBar;
479
+ }
480
+ get containerElement() {
481
+ return this.container;
482
+ }
483
+ get titleElement() {
484
+ return this.title;
485
+ }
474
486
  }
475
487
  exports.CustomTitlebar = _get__("CustomTitlebar");
476
488
  function _getGlobalObject() {
@@ -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 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):focus,\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):focus,\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: 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):focus,\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):focus,\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}";
13
13
  const macTheme = "";
14
14
  const winTheme = "";
15
15
  class ThemingRegistry extends _get__("lifecycle_1").Disposable {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes