custom-electron-titlebar 4.1.0 → 4.1.1

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 (34) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/enums/menu-state.d.ts +6 -0
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/interfaces.d.ts +2 -2
  7. package/dist/main.js +1 -1
  8. package/dist/{menu/menu.d.ts → menu.d.ts} +9 -9
  9. package/dist/menubar.d.ts +10 -11
  10. package/dist/{menu/menuitem.d.ts → menuitem.d.ts} +18 -17
  11. package/dist/titlebar.d.ts +50 -30
  12. package/dist/types/custom-item.d.ts +7 -0
  13. package/dist/types/declaration.d.ts +6 -0
  14. package/dist/types/menubar-options.d.ts +35 -0
  15. package/dist/types/titlebar-options.d.ts +62 -0
  16. package/dist/utils/color.d.ts +2 -0
  17. package/dist/{browser → vs/base/browser}/browser.d.ts +3 -3
  18. package/dist/{browser → vs/base/browser}/event.d.ts +1 -1
  19. package/dist/{browser → vs/base/browser}/iframe.d.ts +0 -0
  20. package/dist/{browser → vs/base/browser}/keyboardEvent.d.ts +1 -1
  21. package/dist/{browser → vs/base/browser}/mouseEvent.d.ts +0 -0
  22. package/dist/{common → vs/base/common}/arrays.d.ts +0 -0
  23. package/dist/{common → vs/base/common}/async.d.ts +1 -1
  24. package/dist/{common → vs/base/common}/charCode.d.ts +0 -0
  25. package/dist/{common → vs/base/common}/color.d.ts +2 -5
  26. package/dist/{common → vs/base/common}/dom.d.ts +4 -4
  27. package/dist/{common → vs/base/common}/event.d.ts +4 -4
  28. package/dist/{common → vs/base/common}/iterator.d.ts +1 -1
  29. package/dist/{common → vs/base/common}/keyCodes.d.ts +1 -1
  30. package/dist/{common → vs/base/common}/lifecycle.d.ts +0 -0
  31. package/dist/{common → vs/base/common}/linkedList.d.ts +1 -1
  32. package/dist/{common → vs/base/common}/platform.d.ts +1 -18
  33. package/package.json +19 -18
  34. package/_config.yml +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 Alex Torres
3
+ Copyright (c) 2018 - now Alex Torres
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -4,6 +4,7 @@ This project is a typescript library for electron that allows you to configure a
4
4
 
5
5
  [![LICENSE](https://img.shields.io/github/license/AlexTorresSk/custom-electron-titlebar.svg)](https://github.com/AlexTorresSk/custom-electron-titlebar/blob/master/LICENSE)
6
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)
7
8
 
8
9
  ![Screenshot 1](screenshots/cet-001.jpg)
9
10
 
@@ -12,7 +13,7 @@ This project is a typescript library for electron that allows you to configure a
12
13
  ![Screenshot 3](screenshots/cet-003.jpg)
13
14
  <br><br>
14
15
 
15
- # 📦 Intalling
16
+ # 📦 Installing
16
17
  You can install this package with `npm`.
17
18
  ```sh
18
19
  npm install custom-electron-titlebar
@@ -30,6 +31,17 @@ import { setupTitlebar, attachTitlebarToWindow } from "custom-electron-titlebar/
30
31
  setupTitlebar();
31
32
 
32
33
  function createWindow() {
34
+ // Create the browser window.
35
+ const mainWindow = new BrowserWindow({
36
+ width: 800,
37
+ height: 600,
38
+ titleBarStyle: 'hidden',
39
+ //frame: false, // needed if process.versions.electron < 14
40
+ webPreferences: {
41
+ preload: path.join(__dirname, 'preload.js')
42
+ }
43
+ });
44
+
33
45
  ...
34
46
 
35
47
  // attach fullscreen(f11 and not 'maximized') && focus listeners
@@ -0,0 +1,6 @@
1
+ export declare enum MenubarState {
2
+ HIDDEN = 0,
3
+ VISIBLE = 1,
4
+ FOCUSED = 2,
5
+ OPEN = 3
6
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Titlebar from './titlebar';
2
- import { Color } from './common/color';
2
+ import { Color } from 'vs/base/common/color';
3
3
  declare const _default: {
4
4
  Titlebar: typeof Titlebar;
5
5
  Color: typeof Color;