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,159 +0,0 @@
1
- export declare class RGBA {
2
- /**
3
- * Red: integer in [0-255]
4
- */
5
- readonly r: number;
6
- /**
7
- * Green: integer in [0-255]
8
- */
9
- readonly g: number;
10
- /**
11
- * Blue: integer in [0-255]
12
- */
13
- readonly b: number;
14
- /**
15
- * Alpha: float in [0-1]
16
- */
17
- readonly a: number;
18
- constructor(r: number, g: number, b: number, a?: number);
19
- static equals(a: RGBA, b: RGBA): boolean;
20
- }
21
- export declare class HSLA {
22
- /**
23
- * Hue: integer in [0, 360]
24
- */
25
- readonly h: number;
26
- /**
27
- * Saturation: float in [0, 1]
28
- */
29
- readonly s: number;
30
- /**
31
- * Luminosity: float in [0, 1]
32
- */
33
- readonly l: number;
34
- /**
35
- * Alpha: float in [0, 1]
36
- */
37
- readonly a: number;
38
- constructor(h: number, s: number, l: number, a: number);
39
- static equals(a: HSLA, b: HSLA): boolean;
40
- /**
41
- * Converts an RGB color value to HSL. Conversion formula
42
- * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
43
- * Assumes r, g, and b are contained in the set [0, 255] and
44
- * returns h in the set [0, 360], s, and l in the set [0, 1].
45
- */
46
- static fromRGBA(rgba: RGBA): HSLA;
47
- private static _hue2rgb;
48
- /**
49
- * Converts an HSL color value to RGB. Conversion formula
50
- * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
51
- * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and
52
- * returns r, g, and b in the set [0, 255].
53
- */
54
- static toRGBA(hsla: HSLA): RGBA;
55
- }
56
- export declare class HSVA {
57
- /**
58
- * Hue: integer in [0, 360]
59
- */
60
- readonly h: number;
61
- /**
62
- * Saturation: float in [0, 1]
63
- */
64
- readonly s: number;
65
- /**
66
- * Value: float in [0, 1]
67
- */
68
- readonly v: number;
69
- /**
70
- * Alpha: float in [0, 1]
71
- */
72
- readonly a: number;
73
- constructor(h: number, s: number, v: number, a: number);
74
- static equals(a: HSVA, b: HSVA): boolean;
75
- static fromRGBA(rgba: RGBA): HSVA;
76
- static toRGBA(hsva: HSVA): RGBA;
77
- }
78
- export declare class Color {
79
- static fromHex(hex: string): Color;
80
- readonly rgba: RGBA;
81
- private _hsla?;
82
- get hsla(): HSLA;
83
- private _hsva?;
84
- get hsva(): HSVA;
85
- constructor(arg: RGBA | HSLA | HSVA);
86
- equals(other: Color): boolean;
87
- /**
88
- * http://www.w3.org/TR/WCAG20/#relativeluminancedef
89
- * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.
90
- */
91
- getRelativeLuminance(): number;
92
- private static _relativeLuminanceForComponent;
93
- /**
94
- * http://www.w3.org/TR/WCAG20/#contrast-ratiodef
95
- * Returns the contrast ration number in the set [1, 21].
96
- */
97
- getContrastRatio(another: Color): number;
98
- /**
99
- * http://24ways.org/2010/calculating-color-contrast
100
- * Return 'true' if darker color otherwise 'false'
101
- */
102
- isDarker(): boolean;
103
- /**
104
- * http://24ways.org/2010/calculating-color-contrast
105
- * Return 'true' if lighter color otherwise 'false'
106
- */
107
- isLighter(): boolean;
108
- isLighterThan(another: Color): boolean;
109
- isDarkerThan(another: Color): boolean;
110
- lighten(factor: number): Color;
111
- darken(factor: number): Color;
112
- transparent(factor: number): Color;
113
- isTransparent(): boolean;
114
- isOpaque(): boolean;
115
- opposite(): Color;
116
- blend(c: Color): Color;
117
- flatten(...backgrounds: Color[]): Color;
118
- private static _flatten;
119
- toString(): string;
120
- static getLighterColor(of: Color, relative: Color, factor?: number): Color;
121
- static getDarkerColor(of: Color, relative: Color, factor?: number): Color;
122
- static readonly WHITE: Color;
123
- static readonly BLACK: Color;
124
- static readonly RED: Color;
125
- static readonly BLUE: Color;
126
- static readonly GREEN: Color;
127
- static readonly CYAN: Color;
128
- static readonly LIGHTGREY: Color;
129
- static readonly TRANSPARENT: Color;
130
- }
131
- export declare namespace Color {
132
- namespace Format {
133
- namespace CSS {
134
- function formatRGB(color: Color): string;
135
- function formatRGBA(color: Color): string;
136
- function formatHSL(color: Color): string;
137
- function formatHSLA(color: Color): string;
138
- /**
139
- * Formats the color as #RRGGBB
140
- */
141
- function formatHex(color: Color): string;
142
- /**
143
- * Formats the color as #RRGGBBAA
144
- * If 'compact' is set, colors without transparancy will be printed as #RRGGBB
145
- */
146
- function formatHexA(color: Color, compact?: boolean): string;
147
- /**
148
- * The default format will use HEX if opaque and RGBA otherwise.
149
- */
150
- function format(color: Color): string | null;
151
- /**
152
- * Converts an Hex color value to a Color.
153
- * returns r, g, and b are contained in the set [0, 255]
154
- * @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA).
155
- */
156
- function parseHex(hex: string): Color | null;
157
- }
158
- }
159
- }