custom-electron-titlebar 4.2.0 → 4.2.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.
- package/dist/base/browser/browser.d.ts +26 -0
- package/dist/base/browser/browser.js +317 -0
- package/dist/base/browser/event.d.ts +12 -0
- package/dist/base/browser/event.js +215 -0
- package/dist/base/browser/keyboardEvent.d.ts +38 -0
- package/dist/base/browser/keyboardEvent.js +466 -0
- package/dist/base/browser/mouseEvent.d.ts +61 -0
- package/dist/base/browser/mouseEvent.js +327 -0
- package/dist/base/browser/touch.d.ts +39 -0
- package/dist/base/browser/touch.js +454 -0
- package/dist/base/common/arrays.d.ts +10 -0
- package/dist/base/common/arrays.js +210 -0
- package/dist/base/common/async.d.ts +35 -0
- package/dist/base/common/async.js +280 -0
- package/dist/base/common/charCode.d.ts +405 -0
- package/dist/base/common/charCode.js +9 -0
- package/dist/base/common/color.d.ts +159 -0
- package/dist/base/common/color.js +709 -0
- package/dist/base/common/decorators.d.ts +6 -0
- package/dist/base/common/decorators.js +300 -0
- package/dist/base/common/dom.d.ts +221 -0
- package/dist/base/common/dom.js +1478 -0
- package/dist/base/common/event.d.ts +213 -0
- package/dist/base/common/event.js +804 -0
- package/dist/base/common/iterator.d.ts +69 -0
- package/dist/base/common/iterator.js +381 -0
- package/dist/base/common/keyCodes.d.ts +478 -0
- package/dist/base/common/keyCodes.js +479 -0
- package/dist/base/common/lifecycle.d.ts +17 -0
- package/dist/base/common/lifecycle.js +258 -0
- package/dist/base/common/linkedList.d.ts +17 -0
- package/dist/base/common/linkedList.js +319 -0
- package/dist/base/common/platform.d.ts +33 -0
- package/dist/base/common/platform.js +302 -0
- package/dist/base/common/strings.d.ts +23 -0
- package/dist/base/common/strings.js +273 -0
- package/dist/consts.d.ts +49 -0
- package/dist/consts.js +303 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +211 -0
- package/dist/main/attach-titlebar-to-window.d.ts +3 -0
- package/dist/main/attach-titlebar-to-window.js +207 -0
- package/dist/main/index.d.ts +3 -0
- package/dist/main/index.js +202 -0
- package/dist/main/setup-titlebar.d.ts +2 -0
- package/dist/main/setup-titlebar.js +242 -0
- package/dist/menubar/index.d.ts +86 -0
- package/dist/menubar/index.js +1118 -0
- package/dist/menubar/menu/index.d.ts +46 -0
- package/dist/menubar/menu/index.js +556 -0
- package/dist/menubar/menu/item.d.ts +67 -0
- package/dist/menubar/menu/item.js +575 -0
- package/dist/menubar/menu/separator.d.ts +11 -0
- package/dist/menubar/menu/separator.js +213 -0
- package/dist/menubar/menu/submenu.d.ts +32 -0
- package/dist/menubar/menu/submenu.js +372 -0
- package/dist/menubar/menubar-options.d.ts +55 -0
- package/dist/menubar/menubar-options.js +9 -0
- package/dist/titlebar/index.d.ts +99 -0
- package/dist/titlebar/index.js +663 -0
- package/dist/titlebar/options.d.ts +84 -0
- package/dist/titlebar/options.js +9 -0
- package/dist/titlebar/themebar.d.ts +20 -0
- package/dist/titlebar/themebar.js +267 -0
- package/package.json +1 -1
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
}
|