custom-electron-titlebar 3.2.9 → 4.0.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.
- package/README.md +10 -203
- package/{build → dist}/browser/browser.d.ts +0 -0
- package/{build → dist}/browser/event.d.ts +0 -0
- package/{build → dist}/browser/iframe.d.ts +0 -0
- package/{build → dist}/browser/keyboardEvent.d.ts +0 -0
- package/{build → dist}/browser/mouseEvent.d.ts +0 -0
- package/{build → dist}/common/arrays.d.ts +0 -0
- package/{build → dist}/common/async.d.ts +0 -0
- package/{build → dist}/common/charCode.d.ts +0 -0
- package/{build → dist}/common/color.d.ts +0 -0
- package/{build → dist}/common/dom.d.ts +0 -0
- package/{build → dist}/common/event.d.ts +0 -0
- package/{build → dist}/common/iterator.d.ts +0 -0
- package/{build → dist}/common/keyCodes.d.ts +0 -0
- package/{build → dist}/common/lifecycle.d.ts +0 -0
- package/{build → dist}/common/linkedList.d.ts +0 -0
- package/{build → dist}/common/platform.d.ts +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1 -0
- package/dist/interfaces.d.ts +95 -0
- package/{build → dist}/menu/menu.d.ts +3 -1
- package/{build → dist}/menu/menuitem.d.ts +3 -4
- package/{build → dist}/menubar.d.ts +1 -24
- package/dist/titlebar.d.ts +77 -0
- package/package.json +23 -16
- package/webpack.config.js +37 -0
- package/.github/ISSUE_TEMPLATE/issue-report.md +0 -29
- package/.vscode/launch.json +0 -49
- package/.vscode/tasks.json +0 -34
- package/build/browser/browser.js +0 -157
- package/build/browser/browser.js.map +0 -1
- package/build/browser/event.js +0 -30
- package/build/browser/event.js.map +0 -1
- package/build/browser/iframe.js +0 -110
- package/build/browser/iframe.js.map +0 -1
- package/build/browser/keyboardEvent.js +0 -226
- package/build/browser/keyboardEvent.js.map +0 -1
- package/build/browser/mouseEvent.js +0 -110
- package/build/browser/mouseEvent.js.map +0 -1
- package/build/common/arrays.js +0 -18
- package/build/common/arrays.js.map +0 -1
- package/build/common/async.js +0 -95
- package/build/common/async.js.map +0 -1
- package/build/common/charCode.js +0 -7
- package/build/common/charCode.js.map +0 -1
- package/build/common/color.js +0 -494
- package/build/common/color.js.map +0 -1
- package/build/common/dom.js +0 -984
- package/build/common/dom.js.map +0 -1
- package/build/common/event.js +0 -611
- package/build/common/event.js.map +0 -1
- package/build/common/iterator.js +0 -164
- package/build/common/iterator.js.map +0 -1
- package/build/common/keyCodes.js +0 -268
- package/build/common/keyCodes.js.map +0 -1
- package/build/common/lifecycle.js +0 -63
- package/build/common/lifecycle.js.map +0 -1
- package/build/common/linkedList.js +0 -139
- package/build/common/linkedList.js.map +0 -1
- package/build/common/platform.js +0 -115
- package/build/common/platform.js.map +0 -1
- package/build/index.d.ts +0 -3
- package/build/index.js +0 -20
- package/build/index.js.map +0 -1
- package/build/menu/menu.js +0 -538
- package/build/menu/menu.js.map +0 -1
- package/build/menu/menuitem.js +0 -339
- package/build/menu/menuitem.js.map +0 -1
- package/build/menubar.js +0 -608
- package/build/menubar.js.map +0 -1
- package/build/themebar.d.ts +0 -20
- package/build/themebar.js +0 -568
- package/build/themebar.js.map +0 -1
- package/build/titlebar.d.ts +0 -135
- package/build/titlebar.js +0 -453
- package/build/titlebar.js.map +0 -1
package/build/themebar.js
DELETED
|
@@ -1,568 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*--------------------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) 2018 Alex Torres
|
|
4
|
-
* Licensed under the MIT License. See License in the project root for license information.
|
|
5
|
-
*
|
|
6
|
-
* This file has parts of one or more project files (VS Code) from Microsoft
|
|
7
|
-
* You can check your respective license and the original file in https://github.com/Microsoft/vscode/
|
|
8
|
-
*-------------------------------------------------------------------------------------------------------*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.Themebar = void 0;
|
|
11
|
-
const lifecycle_1 = require("./common/lifecycle");
|
|
12
|
-
class ThemingRegistry extends lifecycle_1.Disposable {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
this.theming = [];
|
|
16
|
-
this.theming = [];
|
|
17
|
-
}
|
|
18
|
-
onThemeChange(theme) {
|
|
19
|
-
this.theming.push(theme);
|
|
20
|
-
return (0, lifecycle_1.toDisposable)(() => {
|
|
21
|
-
const idx = this.theming.indexOf(theme);
|
|
22
|
-
this.theming.splice(idx, 1);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
getTheming() {
|
|
26
|
-
return this.theming;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
class Themebar extends ThemingRegistry {
|
|
30
|
-
constructor() {
|
|
31
|
-
super();
|
|
32
|
-
// Titlebar
|
|
33
|
-
this.registerTheme((collector) => {
|
|
34
|
-
collector.addRule(`
|
|
35
|
-
.titlebar {
|
|
36
|
-
position: absolute;
|
|
37
|
-
top: 0;
|
|
38
|
-
left: 0;
|
|
39
|
-
right: 0;
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
width: 100%;
|
|
42
|
-
font-size: 13px;
|
|
43
|
-
padding: 0 16px;
|
|
44
|
-
overflow: hidden;
|
|
45
|
-
flex-shrink: 0;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
user-select: none;
|
|
49
|
-
zoom: 1;
|
|
50
|
-
line-height: 22px;
|
|
51
|
-
height: 22px;
|
|
52
|
-
display: flex;
|
|
53
|
-
z-index: 99999;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.titlebar.cet-windows, .titlebar.cet-linux {
|
|
57
|
-
padding: 0;
|
|
58
|
-
height: 30px;
|
|
59
|
-
line-height: 30px;
|
|
60
|
-
justify-content: left;
|
|
61
|
-
overflow: visible;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.titlebar.inverted, .titlebar.inverted .menubar,
|
|
65
|
-
.titlebar.inverted .window-controls-container {
|
|
66
|
-
flex-direction: row-reverse;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.titlebar.inverted .window-controls-container {
|
|
70
|
-
margin: 0 5px 0 0;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.titlebar.first-buttons .window-controls-container {
|
|
74
|
-
order: -1;
|
|
75
|
-
margin: 0 5px 0 0;
|
|
76
|
-
}
|
|
77
|
-
`);
|
|
78
|
-
});
|
|
79
|
-
// Drag region
|
|
80
|
-
this.registerTheme((collector) => {
|
|
81
|
-
collector.addRule(`
|
|
82
|
-
.titlebar .titlebar-drag-region {
|
|
83
|
-
top: 0;
|
|
84
|
-
left: 0;
|
|
85
|
-
display: block;
|
|
86
|
-
position: absolute;
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 100%;
|
|
89
|
-
z-index: -1;
|
|
90
|
-
-webkit-app-region: drag;
|
|
91
|
-
}
|
|
92
|
-
`);
|
|
93
|
-
});
|
|
94
|
-
// icon app
|
|
95
|
-
this.registerTheme((collector) => {
|
|
96
|
-
collector.addRule(`
|
|
97
|
-
.titlebar > .window-appicon {
|
|
98
|
-
width: 35px;
|
|
99
|
-
height: 30px;
|
|
100
|
-
position: relative;
|
|
101
|
-
z-index: 99;
|
|
102
|
-
background-repeat: no-repeat;
|
|
103
|
-
background-position: center center;
|
|
104
|
-
background-size: 16px;
|
|
105
|
-
flex-shrink: 0;
|
|
106
|
-
}
|
|
107
|
-
`);
|
|
108
|
-
});
|
|
109
|
-
// Menubar
|
|
110
|
-
this.registerTheme((collector) => {
|
|
111
|
-
collector.addRule(`
|
|
112
|
-
.menubar {
|
|
113
|
-
display: flex;
|
|
114
|
-
flex-shrink: 1;
|
|
115
|
-
box-sizing: border-box;
|
|
116
|
-
height: 30px;
|
|
117
|
-
overflow: hidden;
|
|
118
|
-
flex-wrap: wrap;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.menubar.bottom {
|
|
122
|
-
order: 1;
|
|
123
|
-
width: 100%;
|
|
124
|
-
padding: 0 5px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.menubar .menubar-menu-button {
|
|
128
|
-
align-items: center;
|
|
129
|
-
box-sizing: border-box;
|
|
130
|
-
padding: 0px 8px;
|
|
131
|
-
cursor: default;
|
|
132
|
-
-webkit-app-region: no-drag;
|
|
133
|
-
zoom: 1;
|
|
134
|
-
white-space: nowrap;
|
|
135
|
-
outline: 0;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.menubar .menubar-menu-button.disabled {
|
|
139
|
-
opacity: 0.4;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.menubar .menubar-menu-button:not(.disabled):focus,
|
|
143
|
-
.menubar .menubar-menu-button:not(.disabled).open,
|
|
144
|
-
.menubar .menubar-menu-button:not(.disabled):hover {
|
|
145
|
-
background-color: rgba(255, 255, 255, .1);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.titlebar.light .menubar .menubar-menu-button:focus,
|
|
149
|
-
.titlebar.light .menubar .menubar-menu-button.open,
|
|
150
|
-
.titlebar.light .menubar .menubar-menu-button:hover {
|
|
151
|
-
background-color: rgba(0, 0, 0, .1);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.menubar-menu-container {
|
|
155
|
-
position: absolute;
|
|
156
|
-
display: block;
|
|
157
|
-
left: 0px;
|
|
158
|
-
opacity: 1;
|
|
159
|
-
outline: 0;
|
|
160
|
-
border: none;
|
|
161
|
-
text-align: left;
|
|
162
|
-
margin: 0 auto;
|
|
163
|
-
padding: .5em 0;
|
|
164
|
-
margin-left: 0;
|
|
165
|
-
overflow-x: visible;
|
|
166
|
-
overflow-y: visible;
|
|
167
|
-
-webkit-overflow-scrolling: touch;
|
|
168
|
-
justify-content: flex-end;
|
|
169
|
-
white-space: nowrap;
|
|
170
|
-
box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
|
|
171
|
-
z-index: 99999;
|
|
172
|
-
}
|
|
173
|
-
.menubar-menu-container::-webkit-scrollbar {
|
|
174
|
-
width: 8px;
|
|
175
|
-
height: 4px;
|
|
176
|
-
cursor: pointer;
|
|
177
|
-
background-color: rbga(0,0,0,0);
|
|
178
|
-
}
|
|
179
|
-
.menubar-menu-container::-webkit-scrollbar-track {
|
|
180
|
-
border: none;
|
|
181
|
-
background-color: rbga(0,0,0,0);
|
|
182
|
-
}
|
|
183
|
-
.menubar-menu-container::-webkit-scrollbar-thumb{
|
|
184
|
-
border-radius: 10px;
|
|
185
|
-
background-color: rgba(110, 110, 110, 0.2);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.menubar-menu-container:focus {
|
|
189
|
-
outline: 0;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.menubar-menu-container .action-item {
|
|
193
|
-
padding: 0;
|
|
194
|
-
transform: none;
|
|
195
|
-
display: -ms-flexbox;
|
|
196
|
-
display: flex;
|
|
197
|
-
outline: none;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.menubar-menu-container .action-item.active {
|
|
201
|
-
transform: none;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.menubar-menu-container .action-menu-item {
|
|
205
|
-
-ms-flex: 1 1 auto;
|
|
206
|
-
flex: 1 1 auto;
|
|
207
|
-
display: -ms-flexbox;
|
|
208
|
-
display: flex;
|
|
209
|
-
height: 2.5em;
|
|
210
|
-
align-items: center;
|
|
211
|
-
position: relative;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.menubar-menu-container .action-label {
|
|
215
|
-
-ms-flex: 1 1 auto;
|
|
216
|
-
flex: 1 1 auto;
|
|
217
|
-
text-decoration: none;
|
|
218
|
-
padding: 0 1em;
|
|
219
|
-
background: none;
|
|
220
|
-
font-size: 12px;
|
|
221
|
-
line-height: 1;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.menubar-menu-container .action-label:not(.separator),
|
|
225
|
-
.menubar-menu-container .keybinding {
|
|
226
|
-
padding: 0 2em 0 1em;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.menubar-menu-container .keybinding,
|
|
230
|
-
.menubar-menu-container .submenu-indicator {
|
|
231
|
-
display: inline-block;
|
|
232
|
-
-ms-flex: 2 1 auto;
|
|
233
|
-
flex: 2 1 auto;
|
|
234
|
-
padding: 0 2em 0 1em;
|
|
235
|
-
text-align: right;
|
|
236
|
-
font-size: 12px;
|
|
237
|
-
line-height: 1;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.menubar-menu-container .submenu-indicator {
|
|
241
|
-
height: 100%;
|
|
242
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.52 12.364L9.879 7 4.52 1.636l.615-.615L11.122 7l-5.986 5.98-.615-.616z' fill='%23000'/%3E%3C/svg%3E") no-repeat right center/13px 13px;
|
|
243
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.52 12.364L9.879 7 4.52 1.636l.615-.615L11.122 7l-5.986 5.98-.615-.616z' fill='%23000'/%3E%3C/svg%3E") no-repeat right center/13px 13px;
|
|
244
|
-
font-size: 60%;
|
|
245
|
-
margin: 0 2em 0 1em;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.menubar-menu-container .action-item.disabled .action-menu-item,
|
|
249
|
-
.menubar-menu-container .action-label.separator {
|
|
250
|
-
opacity: 0.4;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.menubar-menu-container .action-label:not(.separator) {
|
|
254
|
-
display: inline-block;
|
|
255
|
-
-webkit-box-sizing: border-box;
|
|
256
|
-
-o-box-sizing: border-box;
|
|
257
|
-
-moz-box-sizing: border-box;
|
|
258
|
-
-ms-box-sizing: border-box;
|
|
259
|
-
box-sizing: border-box;
|
|
260
|
-
margin: 0;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.menubar-menu-container .action-item .submenu {
|
|
264
|
-
position: absolute;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.menubar-menu-container .action-label.separator {
|
|
268
|
-
font-size: inherit;
|
|
269
|
-
padding: .2em 0 0;
|
|
270
|
-
margin-left: .8em;
|
|
271
|
-
margin-right: .8em;
|
|
272
|
-
margin-bottom: .2em;
|
|
273
|
-
width: 100%;
|
|
274
|
-
border-bottom: 1px solid transparent;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.menubar-menu-container .action-label.separator.text {
|
|
278
|
-
padding: 0.7em 1em 0.1em 1em;
|
|
279
|
-
font-weight: bold;
|
|
280
|
-
opacity: 1;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.menubar-menu-container .action-label:hover {
|
|
284
|
-
color: inherit;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.menubar-menu-container .menu-item-check {
|
|
288
|
-
position: absolute;
|
|
289
|
-
visibility: hidden;
|
|
290
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='-2 -2 16 16'%3E%3Cpath fill='%23424242' d='M9 0L4.5 9 3 6H0l3 6h3l6-12z'/%3E%3C/svg%3E") no-repeat 50% 56%/15px 15px;
|
|
291
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='-2 -2 16 16'%3E%3Cpath fill='%23424242' d='M9 0L4.5 9 3 6H0l3 6h3l6-12z'/%3E%3C/svg%3E") no-repeat 50% 56%/15px 15px;
|
|
292
|
-
width: 2em;
|
|
293
|
-
height: 2em;
|
|
294
|
-
margin: 0 0 0 0.7em;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.menubar-menu-container .menu-item-icon {
|
|
298
|
-
width: 18px;
|
|
299
|
-
height: 18px;
|
|
300
|
-
margin: 0 0 0 1.1em;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.menubar-menu-container .menu-item-icon img {
|
|
304
|
-
display: inherit;
|
|
305
|
-
width: 100%;
|
|
306
|
-
height: 100%;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.menubar-menu-container .action-menu-item.checked .menu-item-icon {
|
|
310
|
-
visibility: hidden;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.menubar-menu-container .action-menu-item.checked .menu-item-check {
|
|
314
|
-
visibility: visible;
|
|
315
|
-
}
|
|
316
|
-
`);
|
|
317
|
-
});
|
|
318
|
-
// Title
|
|
319
|
-
this.registerTheme((collector) => {
|
|
320
|
-
collector.addRule(`
|
|
321
|
-
.titlebar .window-title {
|
|
322
|
-
flex: 0 1 auto;
|
|
323
|
-
font-size: 12px;
|
|
324
|
-
overflow: hidden;
|
|
325
|
-
white-space: nowrap;
|
|
326
|
-
text-overflow: ellipsis;
|
|
327
|
-
margin: 0 auto;
|
|
328
|
-
zoom: 1;
|
|
329
|
-
}
|
|
330
|
-
`);
|
|
331
|
-
});
|
|
332
|
-
// Window controls
|
|
333
|
-
this.registerTheme((collector) => {
|
|
334
|
-
collector.addRule(`
|
|
335
|
-
.titlebar .window-controls-container {
|
|
336
|
-
display: flex;
|
|
337
|
-
flex-grow: 0;
|
|
338
|
-
flex-shrink: 0;
|
|
339
|
-
text-align: center;
|
|
340
|
-
position: relative;
|
|
341
|
-
z-index: 99;
|
|
342
|
-
-webkit-app-region: no-drag;
|
|
343
|
-
height: 30px;
|
|
344
|
-
margin-left: 5px;
|
|
345
|
-
}
|
|
346
|
-
`);
|
|
347
|
-
});
|
|
348
|
-
// Resizer
|
|
349
|
-
this.registerTheme((collector) => {
|
|
350
|
-
collector.addRule(`
|
|
351
|
-
.titlebar.cet-windows .resizer, .titlebar.cet-linux .resizer {
|
|
352
|
-
-webkit-app-region: no-drag;
|
|
353
|
-
position: absolute;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.titlebar.cet-windows .resizer.top, .titlebar.cet-linux .resizer.top {
|
|
357
|
-
top: 0;
|
|
358
|
-
width: 100%;
|
|
359
|
-
height: 6px;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.titlebar.cet-windows .resizer.left, .titlebar.cet-linux .resizer.left {
|
|
363
|
-
top: 0;
|
|
364
|
-
left: 0;
|
|
365
|
-
width: 6px;
|
|
366
|
-
height: 100%;
|
|
367
|
-
}
|
|
368
|
-
`);
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
registerTheme(theme) {
|
|
372
|
-
this.onThemeChange(theme);
|
|
373
|
-
let cssRules = [];
|
|
374
|
-
let hasRule = {};
|
|
375
|
-
let ruleCollector = {
|
|
376
|
-
addRule: (rule) => {
|
|
377
|
-
if (!hasRule[rule]) {
|
|
378
|
-
cssRules.push(rule);
|
|
379
|
-
hasRule[rule] = true;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
this.getTheming().forEach(p => p(ruleCollector));
|
|
384
|
-
_applyRules(cssRules.join('\n'), 'titlebar-style');
|
|
385
|
-
}
|
|
386
|
-
static get win() {
|
|
387
|
-
return ((collector) => {
|
|
388
|
-
collector.addRule(`
|
|
389
|
-
.titlebar .window-controls-container .window-icon-bg {
|
|
390
|
-
display: inline-block;
|
|
391
|
-
-webkit-app-region: no-drag;
|
|
392
|
-
height: 100%;
|
|
393
|
-
width: 46px;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.titlebar .window-controls-container .window-icon-bg .window-icon {
|
|
397
|
-
height: 100%;
|
|
398
|
-
width: 100%;
|
|
399
|
-
-webkit-mask-size: 23.1%;
|
|
400
|
-
mask-size: 23.1%;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.titlebar .window-controls-container .window-icon-bg .window-icon.window-close {
|
|
404
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath 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' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
405
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath 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' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.titlebar .window-controls-container .window-icon-bg .window-icon.window-close:hover {
|
|
409
|
-
background-color: #ffffff!important;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.titlebar .window-controls-container .window-icon-bg .window-icon.window-unmaximize {
|
|
413
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 8.798H8.798V11H0V2.202h2.202V0H11v8.798zm-3.298-5.5h-6.6v6.6h6.6v-6.6zM9.9 1.1H3.298v1.101h5.5v5.5h1.1v-6.6z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
414
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 8.798H8.798V11H0V2.202h2.202V0H11v8.798zm-3.298-5.5h-6.6v6.6h6.6v-6.6zM9.9 1.1H3.298v1.101h5.5v5.5h1.1v-6.6z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
.titlebar .window-controls-container .window-icon-bg .window-icon.window-maximize {
|
|
418
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 0v11H0V0h11zM9.899 1.101H1.1V9.9h8.8V1.1z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
419
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 0v11H0V0h11zM9.899 1.101H1.1V9.9h8.8V1.1z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.titlebar .window-controls-container .window-icon-bg .window-icon.window-minimize {
|
|
423
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4.399V5.5H0V4.399h11z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
424
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4.399V5.5H0V4.399h11z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.titlebar .window-controls-container .window-icon-bg.window-close-bg:hover {
|
|
428
|
-
background-color: rgba(232, 17, 35, 0.9)!important;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.titlebar .window-controls-container .window-icon-bg.window-close-bg:active {
|
|
432
|
-
background-color: rgba(232, 17, 35, 0.5)!important;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.titlebar .window-controls-container .window-icon-bg.inactive {
|
|
436
|
-
background-color: transparent!important;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.titlebar .window-controls-container .window-icon-bg.inactive .window-icon {
|
|
440
|
-
opacity: .4;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
.titlebar .window-controls-container .window-icon {
|
|
444
|
-
background-color: #eeeeee;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.titlebar.light .window-controls-container .window-icon {
|
|
448
|
-
background-color: #333333;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.titlebar.inactive .window-controls-container .window-icon {
|
|
452
|
-
opacity: .7;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive):hover {
|
|
456
|
-
background-color: rgba(255, 255, 255, .1);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive):active {
|
|
460
|
-
background-color: rgba(255, 255, 255, 0.3);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.titlebar.light .window-controls-container .window-icon-bg:not(.inactive):hover {
|
|
464
|
-
background-color: rgba(0, 0, 0, .1);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.titlebar.light .window-controls-container .window-icon-bg:not(.inactive):active {
|
|
468
|
-
background-color: rgba(0, 0, 0, .2);
|
|
469
|
-
}
|
|
470
|
-
`);
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
static get mac() {
|
|
474
|
-
return ((collector) => {
|
|
475
|
-
collector.addRule(`
|
|
476
|
-
.titlebar .window-controls-container .window-icon-bg {
|
|
477
|
-
display: inline-block;
|
|
478
|
-
-webkit-app-region: no-drag;
|
|
479
|
-
height: 15px;
|
|
480
|
-
width: 15px;
|
|
481
|
-
margin: 7.5px 6px;
|
|
482
|
-
border-radius: 50%;
|
|
483
|
-
overflow: hidden;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
.titlebar .window-controls-container .window-icon-bg.inactive {
|
|
487
|
-
background-color: #cdcdcd;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.titlebar .window-controls-container .window-icon-bg:nth-child(2n) {
|
|
491
|
-
order: -1;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive) .window-icon {
|
|
495
|
-
height: 100%;
|
|
496
|
-
width: 100%;
|
|
497
|
-
background-color: transparent;
|
|
498
|
-
-webkit-mask-size: 100% !important;
|
|
499
|
-
mask-size: 100% !important;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive) .window-icon:hover {
|
|
503
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive):first-child {
|
|
507
|
-
background-color: #febc28;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive):first-child:hover {
|
|
511
|
-
background-color: #feb30a;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive):nth-child(2n) {
|
|
515
|
-
background-color: #01cc4e;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive):nth-child(2n):hover {
|
|
519
|
-
background-color: #01ae42;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive).window-close-bg {
|
|
523
|
-
background-color: #ff5b5d;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive).window-close-bg:hover {
|
|
527
|
-
background-color: #ff3c3f;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive).window-close-bg .window-close {
|
|
531
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
532
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive) .window-maximize {
|
|
536
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.17,12L15,8.83L16.41,7.41L21,12L16.41,16.58L15,15.17L18.17,12M5.83,12L9,15.17L7.59,16.59L3,12L7.59,7.42L9,8.83L5.83,12Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
537
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.17,12L15,8.83L16.41,7.41L21,12L16.41,16.58L15,15.17L18.17,12M5.83,12L9,15.17L7.59,16.59L3,12L7.59,7.42L9,8.83L5.83,12Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
538
|
-
transform: rotate(-45deg);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive) .window-unmaximize {
|
|
542
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.41,7.41L10,12L5.41,16.59L4,15.17L7.17,12L4,8.83L5.41,7.41M18.59,16.59L14,12L18.59,7.42L20,8.83L16.83,12L20,15.17L18.59,16.59Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
543
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.41,7.41L10,12L5.41,16.59L4,15.17L7.17,12L4,8.83L5.41,7.41M18.59,16.59L14,12L18.59,7.42L20,8.83L16.83,12L20,15.17L18.59,16.59Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
544
|
-
transform: rotate(-45deg);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
.titlebar .window-controls-container .window-icon-bg:not(.inactive) .window-minimize {
|
|
548
|
-
-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19,13H5V11H19V13Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
549
|
-
mask: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19,13H5V11H19V13Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
|
550
|
-
}
|
|
551
|
-
`);
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
exports.Themebar = Themebar;
|
|
556
|
-
function _applyRules(styleSheetContent, rulesClassName) {
|
|
557
|
-
let themeStyles = document.head.getElementsByClassName(rulesClassName);
|
|
558
|
-
if (themeStyles.length === 0) {
|
|
559
|
-
let styleElement = document.createElement('style');
|
|
560
|
-
styleElement.className = rulesClassName;
|
|
561
|
-
styleElement.innerHTML = styleSheetContent;
|
|
562
|
-
document.head.appendChild(styleElement);
|
|
563
|
-
}
|
|
564
|
-
else {
|
|
565
|
-
themeStyles[0].innerHTML = styleSheetContent;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
//# sourceMappingURL=themebar.js.map
|
package/build/themebar.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themebar.js","sourceRoot":"","sources":["../src/themebar.ts"],"names":[],"mappings":";AAAA;;;;;;2GAM2G;;;AAE3G,kDAA2E;AAE3E,MAAM,eAAgB,SAAQ,sBAAU;IAGpC;QACI,KAAK,EAAE,CAAC;QAHK,YAAO,GAAY,EAAE,CAAC;QAKnC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;IAES,aAAa,CAAC,KAAY;QAChC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,IAAA,wBAAY,EAAC,GAAG,EAAE;YACrB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACxC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACP,CAAC;IAES,UAAU;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ;AAED,MAAa,QAAS,SAAQ,eAAe;IAEzC;QACI,KAAK,EAAE,CAAC;QAER,WAAW;QACX,IAAI,CAAC,aAAa,CAAC,CAAC,SAAmB,EAAE,EAAE;YACvC,SAAS,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2CjB,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,cAAc;QACd,IAAI,CAAC,aAAa,CAAC,CAAC,SAAmB,EAAE,EAAE;YACvC,SAAS,CAAC,OAAO,CAAC;;;;;;;;;;;aA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