custom-electron-titlebar 3.2.6 → 3.2.10

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 (239) hide show
  1. package/.github/FUNDING.yml +1 -0
  2. package/README.md +15 -24
  3. package/_config.yml +1 -0
  4. package/{lib → build}/browser/browser.d.ts +0 -0
  5. package/{lib → build}/browser/browser.js +0 -0
  6. package/{lib → build}/browser/browser.js.map +0 -0
  7. package/{lib → build}/browser/event.d.ts +0 -0
  8. package/{lib → build}/browser/event.js +2 -1
  9. package/{lib → build}/browser/event.js.map +1 -1
  10. package/{lib → build}/browser/iframe.d.ts +0 -0
  11. package/{lib → build}/browser/iframe.js +0 -0
  12. package/{lib → build}/browser/iframe.js.map +0 -0
  13. package/{lib → build}/browser/keyboardEvent.d.ts +0 -0
  14. package/{lib → build}/browser/keyboardEvent.js +0 -0
  15. package/{lib → build}/browser/keyboardEvent.js.map +0 -0
  16. package/{lib → build}/browser/mouseEvent.d.ts +0 -0
  17. package/{lib → build}/browser/mouseEvent.js +0 -0
  18. package/{lib → build}/browser/mouseEvent.js.map +0 -0
  19. package/{lib → build}/common/arrays.d.ts +0 -0
  20. package/{lib → build}/common/arrays.js +0 -0
  21. package/{lib → build}/common/arrays.js.map +0 -0
  22. package/{lib → build}/common/async.d.ts +0 -0
  23. package/{lib → build}/common/async.js +0 -0
  24. package/{lib → build}/common/async.js.map +0 -0
  25. package/{lib → build}/common/charCode.d.ts +0 -0
  26. package/{lib → build}/common/charCode.js +0 -0
  27. package/{lib → build}/common/charCode.js.map +0 -0
  28. package/{lib → build}/common/color.d.ts +0 -0
  29. package/{lib → build}/common/color.js +0 -0
  30. package/{lib → build}/common/color.js.map +0 -0
  31. package/{lib → build}/common/dom.d.ts +0 -0
  32. package/{lib → build}/common/dom.js +16 -14
  33. package/build/common/dom.js.map +1 -0
  34. package/{lib → build}/common/event.d.ts +0 -0
  35. package/{lib → build}/common/event.js +1 -1
  36. package/build/common/event.js.map +1 -0
  37. package/{lib → build}/common/iterator.d.ts +0 -0
  38. package/{lib → build}/common/iterator.js +0 -0
  39. package/{lib → build}/common/iterator.js.map +0 -0
  40. package/{lib → build}/common/keyCodes.d.ts +0 -0
  41. package/{lib → build}/common/keyCodes.js +0 -0
  42. package/{lib → build}/common/keyCodes.js.map +0 -0
  43. package/{lib → build}/common/lifecycle.d.ts +0 -0
  44. package/{lib → build}/common/lifecycle.js +0 -0
  45. package/{lib → build}/common/lifecycle.js.map +0 -0
  46. package/{lib → build}/common/linkedList.d.ts +0 -0
  47. package/{lib → build}/common/linkedList.js +0 -0
  48. package/{lib → build}/common/linkedList.js.map +0 -0
  49. package/{lib → build}/common/platform.d.ts +0 -0
  50. package/{lib → build}/common/platform.js +0 -0
  51. package/{lib → build}/common/platform.js.map +0 -0
  52. package/{lib → build}/index.d.ts +0 -0
  53. package/{lib → build}/index.js +0 -0
  54. package/{lib → build}/index.js.map +0 -0
  55. package/{lib → build}/menu/menu.d.ts +0 -0
  56. package/{lib → build}/menu/menu.js +38 -38
  57. package/build/menu/menu.js.map +1 -0
  58. package/{lib → build}/menu/menuitem.d.ts +10 -2
  59. package/{lib → build}/menu/menuitem.js +70 -34
  60. package/build/menu/menuitem.js.map +1 -0
  61. package/{lib → build}/menubar.d.ts +0 -0
  62. package/{lib → build}/menubar.js +29 -30
  63. package/build/menubar.js.map +1 -0
  64. package/{lib → build}/themebar.d.ts +0 -0
  65. package/{lib → build}/themebar.js +2 -2
  66. package/build/themebar.js.map +1 -0
  67. package/{lib → build}/titlebar.d.ts +0 -0
  68. package/{lib → build}/titlebar.js +61 -58
  69. package/build/titlebar.js.map +1 -0
  70. package/package.json +13 -7
  71. package/lib/common/dom.js.map +0 -1
  72. package/lib/common/enableNativeMenuCommands.d.ts +0 -1
  73. package/lib/common/enableNativeMenuCommands.js +0 -32
  74. package/lib/common/enableNativeMenuCommands.js.map +0 -1
  75. package/lib/common/event.js.map +0 -1
  76. package/lib/main.d.ts +0 -1
  77. package/lib/main.js +0 -14
  78. package/lib/main.js.map +0 -1
  79. package/lib/menu/menu.js.map +0 -1
  80. package/lib/menu/menuitem.js.map +0 -1
  81. package/lib/menubar.js.map +0 -1
  82. package/lib/themebar.js.map +0 -1
  83. package/lib/titlebar.js.map +0 -1
  84. package/lib/vs/base/browser/browser.js +0 -150
  85. package/lib/vs/base/browser/canIUse.js +0 -58
  86. package/lib/vs/base/browser/codicons.js +0 -37
  87. package/lib/vs/base/browser/contextmenu.js +0 -9
  88. package/lib/vs/base/browser/dnd.js +0 -113
  89. package/lib/vs/base/browser/dom.js +0 -1417
  90. package/lib/vs/base/browser/event.js +0 -36
  91. package/lib/vs/base/browser/fastDomNode.js +0 -265
  92. package/lib/vs/base/browser/formattedTextRenderer.js +0 -248
  93. package/lib/vs/base/browser/globalMouseMoveMonitor.js +0 -137
  94. package/lib/vs/base/browser/history.js +0 -9
  95. package/lib/vs/base/browser/iframe.js +0 -126
  96. package/lib/vs/base/browser/keyboardEvent.js +0 -599
  97. package/lib/vs/base/browser/mouseEvent.js +0 -155
  98. package/lib/vs/base/browser/touch.js +0 -315
  99. package/lib/vs/base/browser/ui/actionbar/actionViewItems.js +0 -397
  100. package/lib/vs/base/browser/ui/actionbar/actionbar.js +0 -583
  101. package/lib/vs/base/browser/ui/checkbox/checkbox.js +0 -251
  102. package/lib/vs/base/browser/ui/codicons/codiconLabel.js +0 -31
  103. package/lib/vs/base/browser/ui/codicons/codiconStyles.js +0 -47
  104. package/lib/vs/base/browser/ui/contextview/contextview.js +0 -367
  105. package/lib/vs/base/browser/ui/dropdown/dropdown.js +0 -256
  106. package/lib/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +0 -120
  107. package/lib/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +0 -118
  108. package/lib/vs/base/browser/ui/list/list.js +0 -54
  109. package/lib/vs/base/browser/ui/list/listPaging.js +0 -322
  110. package/lib/vs/base/browser/ui/list/listView.js +0 -1388
  111. package/lib/vs/base/browser/ui/list/listWidget.js +0 -1709
  112. package/lib/vs/base/browser/ui/list/rangeMap.js +0 -223
  113. package/lib/vs/base/browser/ui/list/rowCache.js +0 -113
  114. package/lib/vs/base/browser/ui/list/splice.js +0 -23
  115. package/lib/vs/base/browser/ui/menu/menu.js +0 -1371
  116. package/lib/vs/base/browser/ui/menu/menubar.js +0 -1139
  117. package/lib/vs/base/browser/ui/scrollbar/abstractScrollbar.js +0 -278
  118. package/lib/vs/base/browser/ui/scrollbar/horizontalScrollbar.js +0 -115
  119. package/lib/vs/base/browser/ui/scrollbar/scrollableElement.js +0 -646
  120. package/lib/vs/base/browser/ui/scrollbar/scrollableElementOptions.js +0 -9
  121. package/lib/vs/base/browser/ui/scrollbar/scrollbarArrow.js +0 -106
  122. package/lib/vs/base/browser/ui/scrollbar/scrollbarState.js +0 -184
  123. package/lib/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js +0 -116
  124. package/lib/vs/base/browser/ui/scrollbar/verticalScrollbar.js +0 -114
  125. package/lib/vs/base/browser/ui/selectBox/selectBox.js +0 -85
  126. package/lib/vs/base/browser/ui/selectBox/selectBoxCustom.js +0 -985
  127. package/lib/vs/base/browser/ui/selectBox/selectBoxNative.js +0 -188
  128. package/lib/vs/base/browser/ui/toolbar/toolbar.js +0 -206
  129. package/lib/vs/base/browser/ui/widget.js +0 -69
  130. package/lib/vs/base/common/actions.js +0 -224
  131. package/lib/vs/base/common/amd.js +0 -31
  132. package/lib/vs/base/common/arrays.js +0 -641
  133. package/lib/vs/base/common/assert.js +0 -21
  134. package/lib/vs/base/common/async.js +0 -966
  135. package/lib/vs/base/common/buffer.js +0 -250
  136. package/lib/vs/base/common/cache.js +0 -40
  137. package/lib/vs/base/common/cancellation.js +0 -146
  138. package/lib/vs/base/common/charCode.js +0 -9
  139. package/lib/vs/base/common/codicon.js +0 -136
  140. package/lib/vs/base/common/codicons.js +0 -1378
  141. package/lib/vs/base/common/collections.js +0 -133
  142. package/lib/vs/base/common/color.js +0 -716
  143. package/lib/vs/base/common/comparers.js +0 -280
  144. package/lib/vs/base/common/console.js +0 -142
  145. package/lib/vs/base/common/date.js +0 -113
  146. package/lib/vs/base/common/decorators.js +0 -169
  147. package/lib/vs/base/common/errorMessage.js +0 -93
  148. package/lib/vs/base/common/errors.js +0 -213
  149. package/lib/vs/base/common/errorsWithActions.js +0 -28
  150. package/lib/vs/base/common/event.js +0 -873
  151. package/lib/vs/base/common/extpath.js +0 -401
  152. package/lib/vs/base/common/filters.js +0 -948
  153. package/lib/vs/base/common/functional.js +0 -28
  154. package/lib/vs/base/common/fuzzyScorer.js +0 -811
  155. package/lib/vs/base/common/glob.js +0 -696
  156. package/lib/vs/base/common/hash.js +0 -359
  157. package/lib/vs/base/common/history.js +0 -116
  158. package/lib/vs/base/common/htmlContent.js +0 -162
  159. package/lib/vs/base/common/idGenerator.js +0 -25
  160. package/lib/vs/base/common/iterator.js +0 -118
  161. package/lib/vs/base/common/json.js +0 -1624
  162. package/lib/vs/base/common/jsonEdit.js +0 -272
  163. package/lib/vs/base/common/jsonErrorMessages.js +0 -69
  164. package/lib/vs/base/common/jsonFormatter.js +0 -316
  165. package/lib/vs/base/common/jsonSchema.js +0 -9
  166. package/lib/vs/base/common/keyCodes.js +0 -591
  167. package/lib/vs/base/common/keybindingLabels.js +0 -231
  168. package/lib/vs/base/common/keybindingParser.js +0 -142
  169. package/lib/vs/base/common/labels.js +0 -430
  170. package/lib/vs/base/common/lazy.js +0 -71
  171. package/lib/vs/base/common/lifecycle.js +0 -308
  172. package/lib/vs/base/common/linkedList.js +0 -152
  173. package/lib/vs/base/common/linkedText.js +0 -73
  174. package/lib/vs/base/common/map.js +0 -1108
  175. package/lib/vs/base/common/marshalling.js +0 -80
  176. package/lib/vs/base/common/mime.js +0 -321
  177. package/lib/vs/base/common/navigator.js +0 -50
  178. package/lib/vs/base/common/network.js +0 -160
  179. package/lib/vs/base/common/normalization.js +0 -78
  180. package/lib/vs/base/common/numbers.js +0 -55
  181. package/lib/vs/base/common/objects.js +0 -268
  182. package/lib/vs/base/common/paging.js +0 -190
  183. package/lib/vs/base/common/parsers.js +0 -78
  184. package/lib/vs/base/common/path.js +0 -1550
  185. package/lib/vs/base/common/platform.js +0 -245
  186. package/lib/vs/base/common/process.js +0 -52
  187. package/lib/vs/base/common/processes.js +0 -32
  188. package/lib/vs/base/common/range.js +0 -79
  189. package/lib/vs/base/common/resourceTree.js +0 -185
  190. package/lib/vs/base/common/resources.js +0 -421
  191. package/lib/vs/base/common/scanCode.js +0 -1472
  192. package/lib/vs/base/common/scrollable.js +0 -397
  193. package/lib/vs/base/common/search.js +0 -55
  194. package/lib/vs/base/common/sequence.js +0 -64
  195. package/lib/vs/base/common/severity.js +0 -55
  196. package/lib/vs/base/common/skipList.js +0 -234
  197. package/lib/vs/base/common/stopwatch.js +0 -45
  198. package/lib/vs/base/common/stream.js +0 -418
  199. package/lib/vs/base/common/strings.js +0 -1283
  200. package/lib/vs/base/common/styler.js +0 -9
  201. package/lib/vs/base/common/types.js +0 -296
  202. package/lib/vs/base/common/uint.js +0 -46
  203. package/lib/vs/base/common/uri.js +0 -756
  204. package/lib/vs/base/common/uriIpc.js +0 -154
  205. package/lib/vs/base/common/uuid.js +0 -70
  206. package/lib/vs/nls.mock.js +0 -31
  207. package/lib/vs/platform/actions/browser/menuEntryActionViewItem.js +0 -342
  208. package/lib/vs/platform/actions/common/actions.js +0 -456
  209. package/lib/vs/platform/actions/common/menuService.js +0 -194
  210. package/lib/vs/platform/clipboard/browser/clipboardService.js +0 -99
  211. package/lib/vs/platform/clipboard/common/clipboardService.js +0 -14
  212. package/lib/vs/platform/contextkey/common/contextkey.js +0 -1210
  213. package/lib/vs/platform/contextkey/common/contextkeys.js +0 -23
  214. package/lib/vs/platform/contextview/browser/contextView.js +0 -15
  215. package/lib/vs/platform/contextview/browser/contextViewService.js +0 -96
  216. package/lib/vs/platform/environment/common/argv.js +0 -9
  217. package/lib/vs/platform/environment/common/environment.js +0 -15
  218. package/lib/vs/platform/instantiation/common/descriptors.js +0 -25
  219. package/lib/vs/platform/instantiation/common/extensions.js +0 -26
  220. package/lib/vs/platform/instantiation/common/graph.js +0 -93
  221. package/lib/vs/platform/instantiation/common/instantiation.js +0 -84
  222. package/lib/vs/platform/instantiation/common/instantiationService.js +0 -361
  223. package/lib/vs/platform/instantiation/common/serviceCollection.js +0 -39
  224. package/lib/vs/platform/keybinding/common/baseResolvedKeybinding.js +0 -73
  225. package/lib/vs/platform/keybinding/common/keybinding.js +0 -14
  226. package/lib/vs/platform/keybinding/common/keybindingResolver.js +0 -391
  227. package/lib/vs/platform/keybinding/common/keybindingsRegistry.js +0 -229
  228. package/lib/vs/platform/keybinding/common/resolvedKeybindingItem.js +0 -47
  229. package/lib/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js +0 -160
  230. package/lib/vs/platform/layout/browser/layoutService.js +0 -14
  231. package/lib/vs/platform/menubar/common/menubar.js +0 -34
  232. package/lib/vs/platform/registry/common/platform.js +0 -38
  233. package/lib/vs/platform/theme/browser/checkbox.js +0 -32
  234. package/lib/vs/platform/theme/common/colorRegistry.js +0 -1154
  235. package/lib/vs/platform/theme/common/styler.js +0 -290
  236. package/lib/vs/platform/theme/common/theme.js +0 -21
  237. package/lib/vs/platform/theme/common/themeService.js +0 -176
  238. package/lib/vs/platform/theme/common/tokenClassificationRegistry.js +0 -540
  239. package/lib/vs/platform/theme/test/common/testThemeService.js +0 -98
@@ -1,290 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Licensed under the MIT License. See License.txt in the project root for license information.
5
- *--------------------------------------------------------------------------------------------*/
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.attachDialogStyler = exports.defaultDialogStyles = exports.attachMenuStyler = exports.defaultMenuStyles = exports.attachBreadcrumbsStyler = exports.defaultBreadcrumbsStyles = exports.attachStylerCallback = exports.attachProgressBarStyler = exports.attachLinkStyler = exports.attachButtonStyler = exports.defaultListStyles = exports.attachListStyler = exports.attachQuickInputStyler = exports.attachFindReplaceInputBoxStyler = exports.attachSelectBoxStyler = exports.attachInputBoxStyler = exports.attachBadgeStyler = exports.attachCheckboxStyler = exports.attachStyler = exports.computeStyles = void 0;
11
-
12
- const colorRegistry_1 = require("./colorRegistry");
13
-
14
- function computeStyles(theme, styleMap) {
15
- const styles = Object.create(null);
16
-
17
- for (let key in styleMap) {
18
- const value = styleMap[key];
19
-
20
- if (value) {
21
- styles[key] = colorRegistry_1.resolveColorValue(value, theme);
22
- }
23
- }
24
-
25
- return styles;
26
- }
27
-
28
- exports.computeStyles = computeStyles;
29
-
30
- function attachStyler(themeService, styleMap, widgetOrCallback) {
31
- function applyStyles(theme) {
32
- const styles = computeStyles(themeService.getColorTheme(), styleMap);
33
-
34
- if (typeof widgetOrCallback === 'function') {
35
- widgetOrCallback(styles);
36
- } else {
37
- widgetOrCallback.style(styles);
38
- }
39
- }
40
-
41
- applyStyles(themeService.getColorTheme());
42
- return themeService.onDidColorThemeChange(applyStyles);
43
- }
44
-
45
- exports.attachStyler = attachStyler;
46
-
47
- function attachCheckboxStyler(widget, themeService, style) {
48
- return attachStyler(themeService, {
49
- inputActiveOptionBorder: style && style.inputActiveOptionBorderColor || colorRegistry_1.inputActiveOptionBorder,
50
- inputActiveOptionForeground: style && style.inputActiveOptionForegroundColor || colorRegistry_1.inputActiveOptionForeground,
51
- inputActiveOptionBackground: style && style.inputActiveOptionBackgroundColor || colorRegistry_1.inputActiveOptionBackground
52
- }, widget);
53
- }
54
-
55
- exports.attachCheckboxStyler = attachCheckboxStyler;
56
-
57
- function attachBadgeStyler(widget, themeService, style) {
58
- return attachStyler(themeService, {
59
- badgeBackground: style && style.badgeBackground || colorRegistry_1.badgeBackground,
60
- badgeForeground: style && style.badgeForeground || colorRegistry_1.badgeForeground,
61
- badgeBorder: colorRegistry_1.contrastBorder
62
- }, widget);
63
- }
64
-
65
- exports.attachBadgeStyler = attachBadgeStyler;
66
-
67
- function attachInputBoxStyler(widget, themeService, style) {
68
- return attachStyler(themeService, {
69
- inputBackground: style && style.inputBackground || colorRegistry_1.inputBackground,
70
- inputForeground: style && style.inputForeground || colorRegistry_1.inputForeground,
71
- inputBorder: style && style.inputBorder || colorRegistry_1.inputBorder,
72
- inputValidationInfoBorder: style && style.inputValidationInfoBorder || colorRegistry_1.inputValidationInfoBorder,
73
- inputValidationInfoBackground: style && style.inputValidationInfoBackground || colorRegistry_1.inputValidationInfoBackground,
74
- inputValidationInfoForeground: style && style.inputValidationInfoForeground || colorRegistry_1.inputValidationInfoForeground,
75
- inputValidationWarningBorder: style && style.inputValidationWarningBorder || colorRegistry_1.inputValidationWarningBorder,
76
- inputValidationWarningBackground: style && style.inputValidationWarningBackground || colorRegistry_1.inputValidationWarningBackground,
77
- inputValidationWarningForeground: style && style.inputValidationWarningForeground || colorRegistry_1.inputValidationWarningForeground,
78
- inputValidationErrorBorder: style && style.inputValidationErrorBorder || colorRegistry_1.inputValidationErrorBorder,
79
- inputValidationErrorBackground: style && style.inputValidationErrorBackground || colorRegistry_1.inputValidationErrorBackground,
80
- inputValidationErrorForeground: style && style.inputValidationErrorForeground || colorRegistry_1.inputValidationErrorForeground
81
- }, widget);
82
- }
83
-
84
- exports.attachInputBoxStyler = attachInputBoxStyler;
85
-
86
- function attachSelectBoxStyler(widget, themeService, style) {
87
- return attachStyler(themeService, {
88
- selectBackground: style && style.selectBackground || colorRegistry_1.selectBackground,
89
- selectListBackground: style && style.selectListBackground || colorRegistry_1.selectListBackground,
90
- selectForeground: style && style.selectForeground || colorRegistry_1.selectForeground,
91
- decoratorRightForeground: style && style.pickerGroupForeground || colorRegistry_1.pickerGroupForeground,
92
- selectBorder: style && style.selectBorder || colorRegistry_1.selectBorder,
93
- focusBorder: style && style.focusBorder || colorRegistry_1.focusBorder,
94
- listFocusBackground: style && style.listFocusBackground || colorRegistry_1.listFocusBackground,
95
- listFocusForeground: style && style.listFocusForeground || colorRegistry_1.listFocusForeground,
96
- listFocusOutline: style && style.listFocusOutline || colorRegistry_1.activeContrastBorder,
97
- listHoverBackground: style && style.listHoverBackground || colorRegistry_1.listHoverBackground,
98
- listHoverForeground: style && style.listHoverForeground || colorRegistry_1.listHoverForeground,
99
- listHoverOutline: style && style.listFocusOutline || colorRegistry_1.activeContrastBorder,
100
- selectListBorder: style && style.selectListBorder || colorRegistry_1.editorWidgetBorder
101
- }, widget);
102
- }
103
-
104
- exports.attachSelectBoxStyler = attachSelectBoxStyler;
105
-
106
- function attachFindReplaceInputBoxStyler(widget, themeService, style) {
107
- return attachStyler(themeService, {
108
- inputBackground: style && style.inputBackground || colorRegistry_1.inputBackground,
109
- inputForeground: style && style.inputForeground || colorRegistry_1.inputForeground,
110
- inputBorder: style && style.inputBorder || colorRegistry_1.inputBorder,
111
- inputActiveOptionBorder: style && style.inputActiveOptionBorder || colorRegistry_1.inputActiveOptionBorder,
112
- inputActiveOptionForeground: style && style.inputActiveOptionForeground || colorRegistry_1.inputActiveOptionForeground,
113
- inputActiveOptionBackground: style && style.inputActiveOptionBackground || colorRegistry_1.inputActiveOptionBackground,
114
- inputValidationInfoBorder: style && style.inputValidationInfoBorder || colorRegistry_1.inputValidationInfoBorder,
115
- inputValidationInfoBackground: style && style.inputValidationInfoBackground || colorRegistry_1.inputValidationInfoBackground,
116
- inputValidationInfoForeground: style && style.inputValidationInfoForeground || colorRegistry_1.inputValidationInfoForeground,
117
- inputValidationWarningBorder: style && style.inputValidationWarningBorder || colorRegistry_1.inputValidationWarningBorder,
118
- inputValidationWarningBackground: style && style.inputValidationWarningBackground || colorRegistry_1.inputValidationWarningBackground,
119
- inputValidationWarningForeground: style && style.inputValidationWarningForeground || colorRegistry_1.inputValidationWarningForeground,
120
- inputValidationErrorBorder: style && style.inputValidationErrorBorder || colorRegistry_1.inputValidationErrorBorder,
121
- inputValidationErrorBackground: style && style.inputValidationErrorBackground || colorRegistry_1.inputValidationErrorBackground,
122
- inputValidationErrorForeground: style && style.inputValidationErrorForeground || colorRegistry_1.inputValidationErrorForeground
123
- }, widget);
124
- }
125
-
126
- exports.attachFindReplaceInputBoxStyler = attachFindReplaceInputBoxStyler;
127
-
128
- function attachQuickInputStyler(widget, themeService, style) {
129
- return attachStyler(themeService, {
130
- foreground: style && style.foreground || colorRegistry_1.foreground,
131
- background: style && style.background || colorRegistry_1.editorBackground,
132
- borderColor: style && style.borderColor || colorRegistry_1.contrastBorder,
133
- widgetShadow: style && style.widgetShadow || colorRegistry_1.widgetShadow,
134
- progressBarBackground: style && style.progressBarBackground || colorRegistry_1.progressBarBackground,
135
- pickerGroupForeground: style && style.pickerGroupForeground || colorRegistry_1.pickerGroupForeground,
136
- pickerGroupBorder: style && style.pickerGroupBorder || colorRegistry_1.pickerGroupBorder,
137
- inputBackground: style && style.inputBackground || colorRegistry_1.inputBackground,
138
- inputForeground: style && style.inputForeground || colorRegistry_1.inputForeground,
139
- inputBorder: style && style.inputBorder || colorRegistry_1.inputBorder,
140
- inputValidationInfoBorder: style && style.inputValidationInfoBorder || colorRegistry_1.inputValidationInfoBorder,
141
- inputValidationInfoBackground: style && style.inputValidationInfoBackground || colorRegistry_1.inputValidationInfoBackground,
142
- inputValidationInfoForeground: style && style.inputValidationInfoForeground || colorRegistry_1.inputValidationInfoForeground,
143
- inputValidationWarningBorder: style && style.inputValidationWarningBorder || colorRegistry_1.inputValidationWarningBorder,
144
- inputValidationWarningBackground: style && style.inputValidationWarningBackground || colorRegistry_1.inputValidationWarningBackground,
145
- inputValidationWarningForeground: style && style.inputValidationWarningForeground || colorRegistry_1.inputValidationWarningForeground,
146
- inputValidationErrorBorder: style && style.inputValidationErrorBorder || colorRegistry_1.inputValidationErrorBorder,
147
- inputValidationErrorBackground: style && style.inputValidationErrorBackground || colorRegistry_1.inputValidationErrorBackground,
148
- inputValidationErrorForeground: style && style.inputValidationErrorForeground || colorRegistry_1.inputValidationErrorForeground,
149
- listFocusBackground: style && style.listFocusBackground || colorRegistry_1.listFocusBackground,
150
- listFocusForeground: style && style.listFocusForeground || colorRegistry_1.listFocusForeground,
151
- listActiveSelectionBackground: style && style.listActiveSelectionBackground || colorRegistry_1.darken(colorRegistry_1.listActiveSelectionBackground, 0.1),
152
- listActiveSelectionForeground: style && style.listActiveSelectionForeground || colorRegistry_1.listActiveSelectionForeground,
153
- listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || colorRegistry_1.listActiveSelectionBackground,
154
- listFocusAndSelectionForeground: style && style.listFocusAndSelectionForeground || colorRegistry_1.listActiveSelectionForeground,
155
- listInactiveSelectionBackground: style && style.listInactiveSelectionBackground || colorRegistry_1.listInactiveSelectionBackground,
156
- listInactiveSelectionForeground: style && style.listInactiveSelectionForeground || colorRegistry_1.listInactiveSelectionForeground,
157
- listInactiveFocusBackground: style && style.listInactiveFocusBackground || colorRegistry_1.listInactiveFocusBackground,
158
- listHoverBackground: style && style.listHoverBackground || colorRegistry_1.listHoverBackground,
159
- listHoverForeground: style && style.listHoverForeground || colorRegistry_1.listHoverForeground,
160
- listDropBackground: style && style.listDropBackground || colorRegistry_1.listDropBackground,
161
- listFocusOutline: style && style.listFocusOutline || colorRegistry_1.activeContrastBorder,
162
- listSelectionOutline: style && style.listSelectionOutline || colorRegistry_1.activeContrastBorder,
163
- listHoverOutline: style && style.listHoverOutline || colorRegistry_1.activeContrastBorder
164
- }, widget);
165
- }
166
-
167
- exports.attachQuickInputStyler = attachQuickInputStyler;
168
-
169
- function attachListStyler(widget, themeService, overrides) {
170
- return attachStyler(themeService, { ...exports.defaultListStyles,
171
- ...(overrides || {})
172
- }, widget);
173
- }
174
-
175
- exports.attachListStyler = attachListStyler;
176
- exports.defaultListStyles = {
177
- listFocusBackground: colorRegistry_1.listFocusBackground,
178
- listFocusForeground: colorRegistry_1.listFocusForeground,
179
- listActiveSelectionBackground: colorRegistry_1.darken(colorRegistry_1.listActiveSelectionBackground, 0.1),
180
- listActiveSelectionForeground: colorRegistry_1.listActiveSelectionForeground,
181
- listFocusAndSelectionBackground: colorRegistry_1.listActiveSelectionBackground,
182
- listFocusAndSelectionForeground: colorRegistry_1.listActiveSelectionForeground,
183
- listInactiveSelectionBackground: colorRegistry_1.listInactiveSelectionBackground,
184
- listInactiveSelectionForeground: colorRegistry_1.listInactiveSelectionForeground,
185
- listInactiveFocusBackground: colorRegistry_1.listInactiveFocusBackground,
186
- listHoverBackground: colorRegistry_1.listHoverBackground,
187
- listHoverForeground: colorRegistry_1.listHoverForeground,
188
- listDropBackground: colorRegistry_1.listDropBackground,
189
- listFocusOutline: colorRegistry_1.activeContrastBorder,
190
- listSelectionOutline: colorRegistry_1.activeContrastBorder,
191
- listHoverOutline: colorRegistry_1.activeContrastBorder,
192
- listFilterWidgetBackground: colorRegistry_1.listFilterWidgetBackground,
193
- listFilterWidgetOutline: colorRegistry_1.listFilterWidgetOutline,
194
- listFilterWidgetNoMatchesOutline: colorRegistry_1.listFilterWidgetNoMatchesOutline,
195
- listMatchesShadow: colorRegistry_1.widgetShadow,
196
- treeIndentGuidesStroke: colorRegistry_1.treeIndentGuidesStroke
197
- };
198
-
199
- function attachButtonStyler(widget, themeService, style) {
200
- return attachStyler(themeService, {
201
- buttonForeground: style && style.buttonForeground || colorRegistry_1.buttonForeground,
202
- buttonBackground: style && style.buttonBackground || colorRegistry_1.buttonBackground,
203
- buttonHoverBackground: style && style.buttonHoverBackground || colorRegistry_1.buttonHoverBackground,
204
- buttonSecondaryForeground: style && style.buttonSecondaryForeground || colorRegistry_1.buttonSecondaryForeground,
205
- buttonSecondaryBackground: style && style.buttonSecondaryBackground || colorRegistry_1.buttonSecondaryBackground,
206
- buttonSecondaryHoverBackground: style && style.buttonSecondaryHoverBackground || colorRegistry_1.buttonSecondaryHoverBackground,
207
- buttonBorder: colorRegistry_1.contrastBorder
208
- }, widget);
209
- }
210
-
211
- exports.attachButtonStyler = attachButtonStyler;
212
-
213
- function attachLinkStyler(widget, themeService, style) {
214
- return attachStyler(themeService, {
215
- textLinkForeground: style && style.textLinkForeground || colorRegistry_1.textLinkForeground
216
- }, widget);
217
- }
218
-
219
- exports.attachLinkStyler = attachLinkStyler;
220
-
221
- function attachProgressBarStyler(widget, themeService, style) {
222
- return attachStyler(themeService, {
223
- progressBarBackground: style && style.progressBarBackground || colorRegistry_1.progressBarBackground
224
- }, widget);
225
- }
226
-
227
- exports.attachProgressBarStyler = attachProgressBarStyler;
228
-
229
- function attachStylerCallback(themeService, colors, callback) {
230
- return attachStyler(themeService, colors, callback);
231
- }
232
-
233
- exports.attachStylerCallback = attachStylerCallback;
234
- exports.defaultBreadcrumbsStyles = {
235
- breadcrumbsBackground: colorRegistry_1.breadcrumbsBackground,
236
- breadcrumbsForeground: colorRegistry_1.breadcrumbsForeground,
237
- breadcrumbsHoverForeground: colorRegistry_1.breadcrumbsFocusForeground,
238
- breadcrumbsFocusForeground: colorRegistry_1.breadcrumbsFocusForeground,
239
- breadcrumbsFocusAndSelectionForeground: colorRegistry_1.breadcrumbsActiveSelectionForeground
240
- };
241
-
242
- function attachBreadcrumbsStyler(widget, themeService, style) {
243
- return attachStyler(themeService, { ...exports.defaultBreadcrumbsStyles,
244
- ...style
245
- }, widget);
246
- }
247
-
248
- exports.attachBreadcrumbsStyler = attachBreadcrumbsStyler;
249
- exports.defaultMenuStyles = {
250
- shadowColor: colorRegistry_1.widgetShadow,
251
- borderColor: colorRegistry_1.menuBorder,
252
- foregroundColor: colorRegistry_1.menuForeground,
253
- backgroundColor: colorRegistry_1.menuBackground,
254
- selectionForegroundColor: colorRegistry_1.menuSelectionForeground,
255
- selectionBackgroundColor: colorRegistry_1.menuSelectionBackground,
256
- selectionBorderColor: colorRegistry_1.menuSelectionBorder,
257
- separatorColor: colorRegistry_1.menuSeparatorBackground
258
- };
259
-
260
- function attachMenuStyler(widget, themeService, style) {
261
- return attachStyler(themeService, { ...exports.defaultMenuStyles,
262
- ...style
263
- }, widget);
264
- }
265
-
266
- exports.attachMenuStyler = attachMenuStyler;
267
- exports.defaultDialogStyles = {
268
- dialogBackground: colorRegistry_1.editorWidgetBackground,
269
- dialogForeground: colorRegistry_1.editorWidgetForeground,
270
- dialogShadow: colorRegistry_1.widgetShadow,
271
- dialogBorder: colorRegistry_1.contrastBorder,
272
- buttonForeground: colorRegistry_1.buttonForeground,
273
- buttonBackground: colorRegistry_1.buttonBackground,
274
- buttonHoverBackground: colorRegistry_1.buttonHoverBackground,
275
- buttonBorder: colorRegistry_1.contrastBorder,
276
- checkboxBorder: colorRegistry_1.simpleCheckboxBorder,
277
- checkboxBackground: colorRegistry_1.simpleCheckboxBackground,
278
- checkboxForeground: colorRegistry_1.simpleCheckboxForeground,
279
- errorIconForeground: colorRegistry_1.problemsErrorIconForeground,
280
- warningIconForeground: colorRegistry_1.problemsWarningIconForeground,
281
- infoIconForeground: colorRegistry_1.problemsInfoIconForeground
282
- };
283
-
284
- function attachDialogStyler(widget, themeService, style) {
285
- return attachStyler(themeService, { ...exports.defaultDialogStyles,
286
- ...style
287
- }, widget);
288
- }
289
-
290
- exports.attachDialogStyler = attachDialogStyler;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Licensed under the MIT License. See License.txt in the project root for license information.
5
- *--------------------------------------------------------------------------------------------*/
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.ColorScheme = void 0;
11
- /**
12
- * Color scheme used by the OS and by color themes.
13
- */
14
-
15
- var ColorScheme;
16
-
17
- (function (ColorScheme) {
18
- ColorScheme["DARK"] = "dark";
19
- ColorScheme["LIGHT"] = "light";
20
- ColorScheme["HIGH_CONTRAST"] = "hc";
21
- })(ColorScheme = exports.ColorScheme || (exports.ColorScheme = {}));
@@ -1,176 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Licensed under the MIT License. See License.txt in the project root for license information.
5
- *--------------------------------------------------------------------------------------------*/
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.Themable = exports.registerThemingParticipant = exports.Extensions = exports.getThemeTypeSelector = exports.FolderThemeIcon = exports.FileThemeIcon = exports.ThemeIcon = exports.themeColorFromId = exports.IThemeService = void 0;
11
-
12
- const instantiation_1 = require("../../instantiation/common/instantiation");
13
-
14
- const lifecycle_1 = require("../../../base/common/lifecycle");
15
-
16
- const platform = require("../../registry/common/platform");
17
-
18
- const event_1 = require("../../../base/common/event");
19
-
20
- const theme_1 = require("./theme");
21
-
22
- exports.IThemeService = instantiation_1.createDecorator('themeService');
23
-
24
- function themeColorFromId(id) {
25
- return {
26
- id
27
- };
28
- }
29
-
30
- exports.themeColorFromId = themeColorFromId;
31
- var ThemeIcon;
32
-
33
- (function (ThemeIcon) {
34
- function isThemeIcon(obj) {
35
- return obj && typeof obj === 'object' && typeof obj.id === 'string';
36
- }
37
-
38
- ThemeIcon.isThemeIcon = isThemeIcon;
39
- const _regexFromString = /^\$\(([a-z.]+\/)?([a-z-~]+)\)$/i;
40
-
41
- function fromString(str) {
42
- const match = _regexFromString.exec(str);
43
-
44
- if (!match) {
45
- return undefined;
46
- }
47
-
48
- let [, owner, name] = match;
49
-
50
- if (!owner) {
51
- owner = `codicon/`;
52
- }
53
-
54
- return {
55
- id: owner + name
56
- };
57
- }
58
-
59
- ThemeIcon.fromString = fromString;
60
- const _regexAsClassName = /^(codicon\/)?([a-z-]+)(~[a-z]+)?$/i;
61
-
62
- function asClassName(icon) {
63
- // todo@martin,joh -> this should go into the ThemeService
64
- const match = _regexAsClassName.exec(icon.id);
65
-
66
- if (!match) {
67
- return undefined;
68
- }
69
-
70
- let [,, name, modifier] = match;
71
- let className = `codicon codicon-${name}`;
72
-
73
- if (modifier) {
74
- className += ` ${modifier.substr(1)}`;
75
- }
76
-
77
- return className;
78
- }
79
-
80
- ThemeIcon.asClassName = asClassName;
81
- })(ThemeIcon = exports.ThemeIcon || (exports.ThemeIcon = {}));
82
-
83
- exports.FileThemeIcon = {
84
- id: 'file'
85
- };
86
- exports.FolderThemeIcon = {
87
- id: 'folder'
88
- };
89
-
90
- function getThemeTypeSelector(type) {
91
- switch (type) {
92
- case theme_1.ColorScheme.DARK:
93
- return 'vs-dark';
94
-
95
- case theme_1.ColorScheme.HIGH_CONTRAST:
96
- return 'hc-black';
97
-
98
- default:
99
- return 'vs';
100
- }
101
- }
102
-
103
- exports.getThemeTypeSelector = getThemeTypeSelector; // static theming participant
104
-
105
- exports.Extensions = {
106
- ThemingContribution: 'base.contributions.theming'
107
- };
108
-
109
- class ThemingRegistry {
110
- constructor() {
111
- this.themingParticipants = [];
112
- this.themingParticipants = [];
113
- this.onThemingParticipantAddedEmitter = new event_1.Emitter();
114
- }
115
-
116
- onColorThemeChange(participant) {
117
- this.themingParticipants.push(participant);
118
- this.onThemingParticipantAddedEmitter.fire(participant);
119
- return lifecycle_1.toDisposable(() => {
120
- const idx = this.themingParticipants.indexOf(participant);
121
- this.themingParticipants.splice(idx, 1);
122
- });
123
- }
124
-
125
- get onThemingParticipantAdded() {
126
- return this.onThemingParticipantAddedEmitter.event;
127
- }
128
-
129
- getThemingParticipants() {
130
- return this.themingParticipants;
131
- }
132
-
133
- }
134
-
135
- let themingRegistry = new ThemingRegistry();
136
- platform.Registry.add(exports.Extensions.ThemingContribution, themingRegistry);
137
-
138
- function registerThemingParticipant(participant) {
139
- return themingRegistry.onColorThemeChange(participant);
140
- }
141
-
142
- exports.registerThemingParticipant = registerThemingParticipant;
143
- /**
144
- * Utility base class for all themable components.
145
- */
146
-
147
- class Themable extends lifecycle_1.Disposable {
148
- constructor(themeService) {
149
- super();
150
- this.themeService = themeService;
151
- this.theme = themeService.getColorTheme(); // Hook up to theme changes
152
-
153
- this._register(this.themeService.onDidColorThemeChange(theme => this.onThemeChange(theme)));
154
- }
155
-
156
- onThemeChange(theme) {
157
- this.theme = theme;
158
- this.updateStyles();
159
- }
160
-
161
- updateStyles() {// Subclasses to override
162
- }
163
-
164
- getColor(id, modify) {
165
- let color = this.theme.getColor(id);
166
-
167
- if (color && modify) {
168
- color = modify(color, this.theme);
169
- }
170
-
171
- return color ? color.toString() : null;
172
- }
173
-
174
- }
175
-
176
- exports.Themable = Themable;