custom-electron-titlebar 4.2.7 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +43 -19
  2. package/index.d.mts +684 -0
  3. package/index.d.ts +684 -3
  4. package/index.js +5225 -175
  5. package/index.js.map +1 -0
  6. package/index.mjs +5227 -0
  7. package/index.mjs.map +1 -0
  8. package/main/index.d.mts +21 -0
  9. package/main/index.d.ts +21 -3
  10. package/main/index.js +793 -175
  11. package/main/index.js.map +1 -0
  12. package/main/index.mjs +785 -0
  13. package/main/index.mjs.map +1 -0
  14. package/package.json +56 -33
  15. package/theme/base.css +425 -0
  16. package/theme/mac.css +0 -0
  17. package/theme/win.css +0 -0
  18. package/base/browser/browser.d.ts +0 -26
  19. package/base/browser/browser.js +0 -317
  20. package/base/browser/event.d.ts +0 -12
  21. package/base/browser/event.js +0 -215
  22. package/base/browser/keyboardEvent.d.ts +0 -38
  23. package/base/browser/keyboardEvent.js +0 -464
  24. package/base/browser/mouseEvent.d.ts +0 -61
  25. package/base/browser/mouseEvent.js +0 -327
  26. package/base/browser/touch.d.ts +0 -39
  27. package/base/browser/touch.js +0 -454
  28. package/base/common/arrays.d.ts +0 -10
  29. package/base/common/arrays.js +0 -210
  30. package/base/common/async.d.ts +0 -35
  31. package/base/common/async.js +0 -280
  32. package/base/common/charCode.d.ts +0 -405
  33. package/base/common/charCode.js +0 -9
  34. package/base/common/color.d.ts +0 -159
  35. package/base/common/color.js +0 -708
  36. package/base/common/decorators.d.ts +0 -6
  37. package/base/common/decorators.js +0 -300
  38. package/base/common/dom.d.ts +0 -221
  39. package/base/common/dom.js +0 -1478
  40. package/base/common/event.d.ts +0 -213
  41. package/base/common/event.js +0 -804
  42. package/base/common/iterator.d.ts +0 -69
  43. package/base/common/iterator.js +0 -381
  44. package/base/common/keyCodes.d.ts +0 -478
  45. package/base/common/keyCodes.js +0 -479
  46. package/base/common/lifecycle.d.ts +0 -17
  47. package/base/common/lifecycle.js +0 -258
  48. package/base/common/linkedList.d.ts +0 -17
  49. package/base/common/linkedList.js +0 -319
  50. package/base/common/platform.d.ts +0 -36
  51. package/base/common/platform.js +0 -314
  52. package/base/common/strings.d.ts +0 -23
  53. package/base/common/strings.js +0 -273
  54. package/consts.d.ts +0 -58
  55. package/consts.js +0 -317
  56. package/main/attach-titlebar-to-window.d.ts +0 -3
  57. package/main/attach-titlebar-to-window.js +0 -210
  58. package/main/setup-titlebar.d.ts +0 -2
  59. package/main/setup-titlebar.js +0 -255
  60. package/menubar/index.d.ts +0 -86
  61. package/menubar/index.js +0 -1121
  62. package/menubar/menu/index.d.ts +0 -46
  63. package/menubar/menu/index.js +0 -566
  64. package/menubar/menu/item.d.ts +0 -67
  65. package/menubar/menu/item.js +0 -575
  66. package/menubar/menu/separator.d.ts +0 -11
  67. package/menubar/menu/separator.js +0 -213
  68. package/menubar/menu/submenu.d.ts +0 -32
  69. package/menubar/menu/submenu.js +0 -372
  70. package/menubar/menubar-options.d.ts +0 -47
  71. package/menubar/menubar-options.js +0 -9
  72. package/titlebar/index.d.ts +0 -104
  73. package/titlebar/index.js +0 -696
  74. package/titlebar/options.d.ts +0 -84
  75. package/titlebar/options.js +0 -9
  76. package/titlebar/themebar.d.ts +0 -20
  77. package/titlebar/themebar.js +0 -267
@@ -1,104 +0,0 @@
1
- import { Color } from '../base/common/color';
2
- import { MenuBar } from '../menubar';
3
- import { TitleBarOptions } from './options';
4
- import { ThemeBar } from './themebar';
5
- export declare class CustomTitlebar extends ThemeBar {
6
- private titlebar;
7
- private dragRegion;
8
- private icon;
9
- private menuBarContainer;
10
- private title;
11
- private controlsContainer;
12
- private container;
13
- private menuBar?;
14
- private isInactive;
15
- private controls;
16
- private resizer;
17
- private currentOptions;
18
- private platformIcons;
19
- /**
20
- * Create a new TitleBar instance
21
- * @param options The options for the title bar
22
- */
23
- constructor(options: TitleBarOptions);
24
- private loadIcons;
25
- /**
26
- * Setup the background color of the title bar
27
- * By default, it will use the meta theme-color or msapplication-TileColor and if it doesn't exist, it will use white
28
- */
29
- private setupBackgroundColor;
30
- /**
31
- * Render the icon of the title bar, if is mac, it will not render
32
- * By default, it will use the first icon found in the head of the document
33
- */
34
- private createIcon;
35
- private setIconSize;
36
- private setupMenubar;
37
- private setupTitle;
38
- private createControlButton;
39
- private setupWindowControls;
40
- private setupContainer;
41
- private setupTitleBar;
42
- private loadEvents;
43
- private closeMenu;
44
- private onBlur;
45
- private onFocus;
46
- private onMenuBarVisibilityChanged;
47
- private onMenuBarFocusChanged;
48
- private onDidChangeMaximized;
49
- private updateMenu;
50
- private updateStyles;
51
- /**
52
- * Update title bar styles based on focus state.
53
- * @param hasFocus focus state of the window
54
- */
55
- onWindowFocus(focus: boolean): void;
56
- /**
57
- * Update the full screen state and hide or show the title bar.
58
- * @param fullscreen Fullscreen state of the window
59
- */
60
- onWindowFullScreen(fullscreen: boolean): void;
61
- /**
62
- * Update the title of the title bar.
63
- * You can use this method if change the content of `<title>` tag on your html.
64
- * @param title The title of the title bar and document.
65
- */
66
- updateTitle(title: string): this;
67
- /**
68
- * It method set new icon to title-bar-icon of title-bar.
69
- * @param path path to icon
70
- */
71
- updateIcon(path: string): this;
72
- /**
73
- * Horizontal alignment of the title.
74
- * @param side `left`, `center` or `right`.
75
- */
76
- updateTitleAlignment(side: 'left' | 'center' | 'right'): this;
77
- /**
78
- * Update the background color of the title bar
79
- * @param backgroundColor The color for the background
80
- */
81
- updateBackground(backgroundColor: Color): this;
82
- /**
83
- * Update the item background color of the menubar
84
- * @param itemBGColor The color for the item background
85
- */
86
- updateItemBGColor(itemBGColor: Color): this;
87
- /**
88
- * Update the menu from Menu.getApplicationMenu()
89
- */
90
- refreshMenu(): Promise<this>;
91
- /**
92
- * Update the position of menubar.
93
- * @param menuPosition The position of the menu `left` or `bottom`.
94
- */
95
- updateMenuPosition(menuPosition: 'left' | 'bottom'): this;
96
- /**
97
- * Remove the titlebar, menubar and all methods.
98
- */
99
- dispose(): void;
100
- get titlebarElement(): HTMLElement;
101
- get menubarElement(): MenuBar | undefined;
102
- get containerElement(): HTMLElement;
103
- get titleElement(): HTMLElement;
104
- }