Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/base/common/codicons.ts
3291 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
import { ThemeIcon } from './themables.js';
6
import { register } from './codiconsUtil.js';
7
import { codiconsLibrary } from './codiconsLibrary.js';
8
9
10
/**
11
* Only to be used by the iconRegistry.
12
*/
13
export function getAllCodicons(): ThemeIcon[] {
14
return Object.values(Codicon);
15
}
16
17
/**
18
* Derived icons, that could become separate icons.
19
* These mappings should be moved into the mapping file in the vscode-codicons repo at some point.
20
*/
21
export const codiconsDerived = {
22
dialogError: register('dialog-error', 'error'),
23
dialogWarning: register('dialog-warning', 'warning'),
24
dialogInfo: register('dialog-info', 'info'),
25
dialogClose: register('dialog-close', 'close'),
26
treeItemExpanded: register('tree-item-expanded', 'chevron-down'), // collapsed is done with rotation
27
treeFilterOnTypeOn: register('tree-filter-on-type-on', 'list-filter'),
28
treeFilterOnTypeOff: register('tree-filter-on-type-off', 'list-selection'),
29
treeFilterClear: register('tree-filter-clear', 'close'),
30
treeItemLoading: register('tree-item-loading', 'loading'),
31
menuSelection: register('menu-selection', 'check'),
32
menuSubmenu: register('menu-submenu', 'chevron-right'),
33
menuBarMore: register('menubar-more', 'more'),
34
scrollbarButtonLeft: register('scrollbar-button-left', 'triangle-left'),
35
scrollbarButtonRight: register('scrollbar-button-right', 'triangle-right'),
36
scrollbarButtonUp: register('scrollbar-button-up', 'triangle-up'),
37
scrollbarButtonDown: register('scrollbar-button-down', 'triangle-down'),
38
toolBarMore: register('toolbar-more', 'more'),
39
quickInputBack: register('quick-input-back', 'arrow-left'),
40
dropDownButton: register('drop-down-button', 0xeab4),
41
symbolCustomColor: register('symbol-customcolor', 0xeb5c),
42
exportIcon: register('export', 0xebac),
43
workspaceUnspecified: register('workspace-unspecified', 0xebc3),
44
newLine: register('newline', 0xebea),
45
thumbsDownFilled: register('thumbsdown-filled', 0xec13),
46
thumbsUpFilled: register('thumbsup-filled', 0xec14),
47
gitFetch: register('git-fetch', 0xec1d),
48
lightbulbSparkleAutofix: register('lightbulb-sparkle-autofix', 0xec1f),
49
debugBreakpointPending: register('debug-breakpoint-pending', 0xebd9),
50
51
} as const;
52
53
/**
54
* The Codicon library is a set of default icons that are built-in in VS Code.
55
*
56
* In the product (outside of base) Codicons should only be used as defaults. In order to have all icons in VS Code
57
* themeable, component should define new, UI component specific icons using `iconRegistry.registerIcon`.
58
* In that call a Codicon can be named as default.
59
*/
60
export const Codicon = {
61
...codiconsLibrary,
62
...codiconsDerived
63
64
} as const;
65
66