material-icon-theme 4.23.1 → 4.25.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/.eslintrc.json +51 -51
- package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +7 -0
- package/.github/workflows/build.yml +45 -45
- package/.github/workflows/color-check.yml +22 -22
- package/.github/workflows/release.yml +73 -73
- package/.vscodeignore +21 -21
- package/CHANGELOG.md +1325 -1292
- package/CONTRIBUTING.md +199 -29
- package/README.md +198 -199
- package/icons/bitbucket.svg +13 -1
- package/icons/bun.svg +2 -0
- package/icons/bun_light.svg +2 -0
- package/icons/craco.svg +45 -45
- package/icons/folder-changesets-open.svg +5 -5
- package/icons/folder-changesets.svg +2 -2
- package/icons/folder-decorators-open.svg +2 -2
- package/icons/folder-decorators.svg +5 -5
- package/icons/folder-gamemaker-open.svg +2 -0
- package/icons/folder-gamemaker.svg +2 -0
- package/icons/folder-supabase-open.svg +5 -5
- package/icons/folder-supabase.svg +2 -2
- package/icons/gamemaker.svg +4 -0
- package/icons/objective-c.svg +1 -0
- package/icons/objective-cpp.svg +1 -0
- package/icons/pascal.svg +6 -1
- package/icons/sonarcloud.svg +4 -4
- package/icons/stylable.svg +10 -10
- package/icons/supabase.svg +4 -4
- package/icons/tldraw.svg +4 -0
- package/icons/tldraw_light.svg +4 -0
- package/icons/vitest.svg +6 -6
- package/images/contributors.png +0 -0
- package/images/fileIcons.png +0 -0
- package/images/folderIcons.png +0 -0
- package/images/how-tos/folder-icon-parts.png +0 -0
- package/images/how-tos/pick-folder-colors.png +0 -0
- package/images/how-tos/pick-folder-colors.svg +301 -0
- package/images/how-tos/svg-folder-icon-with-correct-colors.png +0 -0
- package/images/how-tos/svg-folder-icon-with-wrong-colors.png +0 -0
- package/images/how-tos/svg-with-light-color.png +0 -0
- package/images/how-tos/svg-with-spacing.png +0 -0
- package/images/how-tos/svg-with-too-dark-color.png +0 -0
- package/images/how-tos/svg-with-wrong-color.png +0 -0
- package/images/how-tos/svg-without-spacing.png +0 -0
- package/package.json +252 -252
- package/package.nls.de.json +32 -32
- package/package.nls.es.json +29 -29
- package/package.nls.fr.json +29 -29
- package/package.nls.ja.json +32 -32
- package/package.nls.json +32 -32
- package/package.nls.nl.json +32 -32
- package/package.nls.pl.json +32 -32
- package/package.nls.pt-BR.json +29 -29
- package/package.nls.pt-PT.json +29 -29
- package/package.nls.ru.json +29 -29
- package/package.nls.zh-CN.json +29 -29
- package/package.nls.zh-TW.json +29 -29
- package/src/commands/activate.ts +28 -28
- package/src/commands/explorerArrows.ts +55 -55
- package/src/commands/folderColor.ts +96 -96
- package/src/commands/folders.ts +55 -55
- package/src/commands/grayscale.ts +55 -55
- package/src/commands/iconPacks.ts +64 -64
- package/src/commands/index.ts +30 -30
- package/src/commands/opacity.ts +46 -46
- package/src/commands/saturation.ts +46 -46
- package/src/extension.ts +37 -37
- package/src/helpers/customIcons.ts +8 -8
- package/src/helpers/index.ts +88 -88
- package/src/i18n/index.ts +78 -78
- package/src/i18n/lang-de.ts +43 -43
- package/src/i18n/lang-en.ts +43 -43
- package/src/i18n/lang-es.ts +43 -43
- package/src/i18n/lang-fr.ts +43 -43
- package/src/i18n/lang-ja.ts +43 -43
- package/src/i18n/lang-nl.ts +43 -43
- package/src/i18n/lang-pl.ts +43 -43
- package/src/i18n/lang-pt-br.ts +43 -43
- package/src/i18n/lang-pt-pt.ts +43 -43
- package/src/i18n/lang-ru.ts +43 -43
- package/src/i18n/lang-uk.ts +43 -43
- package/src/i18n/lang-zh-cn.ts +43 -43
- package/src/i18n/lang-zh-tw.ts +43 -43
- package/src/icons/fileIcons.ts +2240 -2197
- package/src/icons/folderIcons.ts +823 -806
- package/src/icons/generator/folderGenerator.ts +340 -340
- package/src/icons/generator/iconOpacity.ts +111 -111
- package/src/icons/generator/iconSaturation.ts +140 -140
- package/src/icons/generator/jsonGenerator.ts +191 -191
- package/src/icons/languageIcons.ts +144 -141
- package/src/models/i18n/translation.ts +41 -41
- package/src/models/iconConfiguration.ts +37 -37
- package/src/models/icons/iconJsonOptions.ts +21 -21
- package/src/models/index.ts +3 -3
- package/src/scripts/contributors/index.ts +138 -138
- package/src/scripts/helpers/screenshots.ts +32 -32
- package/src/scripts/icons/checks/checkIconAvailability.ts +215 -215
- package/src/scripts/icons/checks/checkIconConflicts.ts +152 -152
- package/src/scripts/icons/checks/checkIconUsage.ts +137 -137
- package/src/scripts/icons/checks/index.ts +7 -7
- package/src/scripts/preview/index.ts +40 -40
- package/src/scripts/preview/preview.ts +163 -163
- package/src/test/runTest.ts +26 -26
- package/src/test/spec/i18n/i18n.spec.ts +54 -54
- package/src/test/spec/icons/fileIcons.spec.ts +250 -250
- package/src/test/spec/icons/folderIcons.spec.ts +418 -418
- package/src/test/spec/icons/languageIcons.spec.ts +184 -184
- package/images/bloop.png +0 -0
package/CONTRIBUTING.md
CHANGED
|
@@ -1,62 +1,232 @@
|
|
|
1
|
-
<h1>
|
|
1
|
+
<h1>How to contribute</h1>
|
|
2
|
+
|
|
3
|
+
Glad you're here and interested in expanding this project 🎉 In order to make this work in the best possible way, there are hints and tips for successful contributors on this page. Please read everything carefully and your contributions will be valuable and gratefully received.
|
|
2
4
|
|
|
3
5
|
<!-- TOC -->
|
|
4
6
|
|
|
5
|
-
- [
|
|
7
|
+
- [Icon Requests](#icon-requests)
|
|
6
8
|
- [Add new icons](#add-new-icons)
|
|
7
|
-
|
|
8
|
-
- [
|
|
9
|
-
- [Use
|
|
9
|
+
- [How-To's](#how-tos)
|
|
10
|
+
- [Create icon as SVG](#create-icon-as-svg)
|
|
11
|
+
- [Use Material Design colors](#material-design-colors)
|
|
12
|
+
- [Design folder icons](#design-folder-icons)
|
|
13
|
+
- [Icon spacing](#icon-spacing)
|
|
14
|
+
- [Icons for color themes](#icons-for-color-themes)
|
|
15
|
+
- [Unique assignment to file and folder names](#icon-assignments)
|
|
16
|
+
- [Create icon packs](#icon-packs)
|
|
10
17
|
- [Add translations](#add-translations)
|
|
11
18
|
- [Update API](#update-api)
|
|
12
19
|
|
|
13
20
|
<!-- /TOC -->
|
|
14
21
|
|
|
15
|
-
##
|
|
22
|
+
## Icon Requests
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
A new icon for a file name, file extension or folder name is needed? Please create an issue and follow the rules below:
|
|
18
25
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
26
|
+
- Describe if a file and/or folder icon is needed
|
|
27
|
+
- List the file names/endings and folder names
|
|
28
|
+
- Mention some graphic ideas (how can the icon look like)
|
|
29
|
+
- Show an example image of the icon or provide a link to the related website
|
|
21
30
|
|
|
22
31
|
## Add new icons
|
|
23
32
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- fileIcons.ts
|
|
28
|
-
- folderIcons.ts
|
|
29
|
-
- languageIcons.ts
|
|
33
|
+
It is always welcome to add new icons to the extension. However, there are a few things you should take into account so that the icon can be included in the extension.
|
|
34
|
+
|
|
35
|
+
**Checklist**
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
1. [ ] Create icon as SVG ([how to](#create-icon-as-svg))
|
|
38
|
+
2. [ ] Icon color fits to Material Design ([how to](#material-design-colors))
|
|
39
|
+
3. [ ] SVG has some space around the icon ([how to](#spacing))
|
|
40
|
+
4. [ ] Unique assignment to file and folder names ([how to](#icon-assignments))
|
|
41
|
+
5. [ ] Provide separate icons for color themes if necessary ([how to](#icons-for-color-themes))
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
## How tos
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
<h3 id="create-icon-as-svg">Create icon as SVG</h3>
|
|
46
|
+
|
|
47
|
+
These free tools are recommended to create or edit new SVG icons:
|
|
36
48
|
|
|
37
49
|
- [Inkscape](https://inkscape.org/en/) is a free, open source SVG editor
|
|
38
50
|
- There are tools available to convert PNG/JPG images to SVG - [Autotracer.org](https://autotracer.org) and [Vectorizer.io](https://vectorizer.io) are two examples.
|
|
39
|
-
- It's important to produce fully _vectorized_ graphic (don't include a base64 image string in the svg).
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
> **Note**
|
|
53
|
+
> It's important to produce fully _vectorized_ graphic (don't include a base64 image string in the svg).
|
|
54
|
+
|
|
55
|
+
When you create a folder icon, please keep in mind that two SVG files are needed here: one that represents the folder closed and another that represents it open.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
📁 folder-example.svg
|
|
59
|
+
📂 folder-example-open.svg
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Of course, there is also the possibility to add existing SVGs. Mostly, however, the color has to be adjusted or the styling has to be changed, so that the other points from the above checklist are also fulfilled.
|
|
63
|
+
|
|
64
|
+
<h4>Known icon sources</h4>
|
|
42
65
|
|
|
43
66
|
- [Material Design Icons](https://materialdesignicons.com/)
|
|
44
|
-
- download them as SVG and edit the icons e.g. with Inkscape
|
|
45
|
-
- you can use any other source **as long as the icons are free to use!** This icon theme is absolutely non-commercial, but you should always check the license of your sources!
|
|
46
67
|
|
|
47
|
-
|
|
48
|
-
|
|
68
|
+
<h3 id="material-design-colors">Use Material Design colors</h3>
|
|
69
|
+
|
|
70
|
+
An important success factor of this icon extension is the fact that all colors fit together harmoniously. This is due to the fact that all icons exist only from colors of the [Material Design color palette](https://material.io/design/color/the-color-system.html#tools-for-picking-colors). This creates nice contrasts and the icons are easily recognizable.
|
|
71
|
+
|
|
72
|
+
Now it often happens that many programming languages already have icons with their own colors. To find the matching color from the Material Design color palette based on a known color, there is the [Material Color Converter](https://pkief.github.io/material-color-converter/). With its help any color can be converted into a Material Design color.
|
|
73
|
+
|
|
74
|
+
Continue reading [here](#design-folder-icons) to find out about colors for the folder icons.
|
|
75
|
+
|
|
76
|
+
| ✅ | ❌ |
|
|
77
|
+
| ----------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
78
|
+
| <img src="./images/how-tos/svg-with-spacing.png" width="200px" /> | <img src="./images/how-tos/svg-with-wrong-color.png" width="200px" /> |
|
|
79
|
+
|
|
80
|
+
<h3 id="design-folder-icons">Design folder icons</h3>
|
|
81
|
+
|
|
82
|
+
When designing folder icons there are also a few points to consider. A folder icon always consists of two icons - the folder in the background and a motive in the foreground:
|
|
83
|
+
|
|
84
|
+
<img src="./images/how-tos/folder-icon-parts.png" width="300px" />
|
|
85
|
+
|
|
86
|
+
For the motive, only colors from the second row in the [color palette](https://pkief.com/material-color-converter/) are allowed. For the background choose a slightly darker hue (mostly in rows 4-6 in the palette).
|
|
87
|
+
|
|
88
|
+
<img src="./images/how-tos/pick-folder-colors.png" width="500px" />
|
|
89
|
+
|
|
90
|
+
This uniform color selection makes the folder icons look more consistent and fit well together. This ensures a good quality of the icons.
|
|
91
|
+
|
|
92
|
+
| ✅ | ❌ |
|
|
93
|
+
| ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
|
|
94
|
+
| <img src="./images/how-tos/svg-folder-icon-with-correct-colors.png" width="200px" /> | <img src="./images/how-tos/svg-folder-icon-with-wrong-colors.png" width="200px" /> |
|
|
95
|
+
|
|
96
|
+
<h3 id="icon-spacing">Icon spacing</h3>
|
|
97
|
+
|
|
98
|
+
All icons have a small distance to the edge. This way they don't seem so pressed together and have a little more air. It is not defined how much margin you have to leave them, because this is always a bit different. Just make sure that there is a space to the outside.
|
|
99
|
+
|
|
100
|
+
| ✅ | ❌ |
|
|
101
|
+
| ----------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
102
|
+
| <img src="./images/how-tos/svg-with-spacing.png" width="200px" /> | <img src="./images/how-tos/svg-without-spacing.png" width="200px" /> |
|
|
103
|
+
|
|
104
|
+
<h3 id="icon-assignments">Assignment to file and folder names and language ids</h3>
|
|
105
|
+
|
|
106
|
+
Icons are assigned to file names, folder names or registered languages of VS Code in these files:
|
|
107
|
+
|
|
108
|
+
- [fileIcons.ts](src/icons/fileIcons.ts)
|
|
109
|
+
- [folderIcons.ts](src/icons/folderIcons.ts)
|
|
110
|
+
- [languageIcons.ts](src/icons/languageIcons.ts)
|
|
111
|
+
|
|
112
|
+
> **Note**
|
|
113
|
+
> It is very important that icons are only assigned to the file and folder names that really apply to them. This means that you should be careful which files and folders you assign icons to. There are many people with different projects all over the world and not everyone expects that e.g. a file name will have a special framework based icon even though the framework is not used at all by this one user.
|
|
114
|
+
>
|
|
115
|
+
> A solution for this can be [icon packs](#icon-packs).
|
|
116
|
+
|
|
117
|
+
#### File icons
|
|
118
|
+
|
|
119
|
+
Here's an example of how the SVG icon 'sample.svg' is assigned to file names and extensions:
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
{
|
|
123
|
+
name: 'sample',
|
|
124
|
+
fileNames: ['sample.js', 'sample.ts', 'sample.html'],
|
|
125
|
+
fileExtensions: ['sample'],
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
This will apply an icon for the files 'sample.js', 'sample.ts' and 'sample.html' as well as for files that end with 'sample' like 'another-file.sample'.
|
|
49
130
|
|
|
131
|
+
#### Folder icons
|
|
132
|
+
|
|
133
|
+
Here's an example of how a folder icon can be assigned to folder icons:
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
{
|
|
137
|
+
name: 'folder-sample',
|
|
138
|
+
folderNames: ['sample', 'samples'],
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
This will apply a folder icon for the folders 'sample' and 'samples'.
|
|
143
|
+
|
|
144
|
+
#### Language icons
|
|
145
|
+
|
|
146
|
+
Here's an example of how a file icon can be assigned to language ids:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
{ icon: { name: 'sample' }, ids: ['css'] },
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
This will apply the sample.svg icon to all files which could be associated by VS Code with the CSS programming language.
|
|
153
|
+
|
|
154
|
+
<h3 id="icons-for-color-themes">Icons for color themes</h3>
|
|
155
|
+
|
|
156
|
+
VS Code can be customized so that the background color is either light or dark. This must also be considered for the icons, because a dark icon on a dark background does not provide the necessary contrast it needs to be recognizable.
|
|
157
|
+
|
|
158
|
+
| ✅ | ❌ |
|
|
159
|
+
| --------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
160
|
+
| <img src="./images/how-tos/svg-with-light-color.png" width="200px" /> | <img src="./images/how-tos/svg-with-too-dark-color.png" width="200px" /> |
|
|
161
|
+
|
|
162
|
+
Preferably, the icon has a color that looks good on both backgrounds. If this is ever not possible because it would otherwise no longer match the icon's branding, different icons can be provided for the respective color scheme.
|
|
163
|
+
|
|
164
|
+
This separation is possible by using the `light` attribute in the icon configuration:
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
{ name: 'sample', fileNames: ['sample.txt'], light: true },
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
If the `light` attribute is set to `true`, it is necessary to provide two icon files:
|
|
171
|
+
|
|
172
|
+
- sample.svg
|
|
173
|
+
- sample_light.svg
|
|
174
|
+
|
|
175
|
+
The icon with the ending '\_light' will be automatically chosen when VS Code is using a light background color. So the icon should then look a bit darker to have a good contrast on the lighter background.
|
|
176
|
+
|
|
177
|
+
In addition, there's also the possibility to provide a separate icon for high contrast backgrounds like this:
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
{ name: 'sample', fileNames: ['sample.txt'], highContrast: true },
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
If the `highContrast` attribute is set to `true`, it is necessary to provide two icon files:
|
|
184
|
+
|
|
185
|
+
- sample.svg
|
|
186
|
+
- sample_highContrast.svg
|
|
187
|
+
|
|
188
|
+
<h3 id="icon-packs">Create icon packs</h3>
|
|
189
|
+
|
|
190
|
+
Sometimes it can happen that certain files or folders need an icon, but you cannot avoid that there could be different icons for them. An icon pack can bundle different icons and as an end user you can decide which icons to display.
|
|
191
|
+
|
|
192
|
+
Here's an example that shows how two icons can be assigned to the same file name by using icon packs:
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
{
|
|
196
|
+
name: 'sample-blue',
|
|
197
|
+
fileNames: ['sample.txt'],
|
|
198
|
+
enabledFor: [IconPack.Blue],
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'sample-red',
|
|
202
|
+
fileNames: ['sample.txt'],
|
|
203
|
+
enabledFor: [IconPack.Red],
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
To create an icon pack, the following steps have to be completed:
|
|
208
|
+
|
|
209
|
+
1. Add the name of the icon pack to the enum in [iconPack.ts](src/models/icons/iconPack.ts)
|
|
210
|
+
2. Add translations to the package.nls.\*.json files under the section `configuration.activeIconPack` (at least to [package.nls.json](package.nls.json), the English translation file)
|
|
211
|
+
3. Adjust [package.json](package.json) under `configuration.properties.material-icon-theme.activeIconPack`
|
|
212
|
+
4. Use the icon pack inside the [fileIcons.ts](src/icons/fileIcons.ts),[folderIcons.ts](src/icons/folderIcons.ts) or [languageIcons.ts](src/icons/languageIcons.ts) files in the `enabledFor` attribute
|
|
50
213
|
|
|
51
214
|
## Add translations
|
|
52
215
|
|
|
216
|
+
This project offers translations into different languages. If you notice an error here, please help to fix it. You can do this as follows:
|
|
217
|
+
|
|
53
218
|
- Create or edit the translations in the `src/i18n` directory.
|
|
54
219
|
- Create or edit the `package.nls.*.json` files in the root folder
|
|
55
220
|
|
|
56
|
-
##
|
|
221
|
+
## Debug extension locally
|
|
222
|
+
|
|
223
|
+
This icon extension consists not only of icons but also brings some code. This is necessary to simplify various things and enable multiple functionalities. If you want to change something here, the following steps are to be considered:
|
|
57
224
|
|
|
58
|
-
1. Install
|
|
59
|
-
2.
|
|
60
|
-
3.
|
|
61
|
-
4.
|
|
225
|
+
1. Install [Node.js](https://nodejs.org/en/) on your machine
|
|
226
|
+
2. Install node dependencies with `npm install`
|
|
227
|
+
3. Open project with VS Code
|
|
228
|
+
4. Install required [VS Code extensions](.vscode/extensions.json)
|
|
229
|
+
5. Press `F5` or run `Launch Extension` in the debug window
|
|
230
|
+
6. Run tests with `Launch Tests`
|
|
62
231
|
|
|
232
|
+
You will find more information about the official extension API in the [extension guides of VS Code](https://code.visualstudio.com/api/extension-guides/file-icon-theme).
|