material-icon-theme 4.24.0 → 4.26.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/CHANGELOG.md +38 -0
- package/README.md +5 -5
- package/icons/bitbucket.svg +13 -1
- package/icons/bun.svg +2 -0
- package/icons/bun_light.svg +2 -0
- package/icons/c.svg +4 -1
- package/icons/cpp.svg +4 -1
- package/icons/csharp.svg +4 -1
- package/icons/deno.svg +1 -0
- package/icons/deno_light.svg +1 -0
- package/icons/folder-gamemaker-open.svg +2 -0
- package/icons/folder-gamemaker.svg +2 -0
- package/icons/folder-godot-open.svg +2 -0
- package/icons/folder-godot.svg +8 -0
- package/icons/folder-mercurial-open.svg +5 -0
- package/icons/folder-mercurial.svg +2 -0
- package/icons/folder-netlify-open.svg +5 -1
- package/icons/folder-netlify.svg +2 -1
- package/icons/folder-plastic-open.svg +8 -0
- package/icons/folder-plastic.svg +2 -0
- package/icons/gamemaker.svg +4 -0
- package/icons/godot-assets.svg +7 -1
- package/icons/godot.svg +7 -1
- package/icons/mercurial.svg +6 -0
- package/icons/netlify.svg +7 -1
- package/icons/netlify_light.svg +7 -0
- package/icons/objective-c.svg +4 -0
- package/icons/objective-cpp.svg +1 -0
- package/icons/pascal.svg +6 -1
- package/icons/plastic.svg +7 -0
- package/icons/rc.svg +2 -0
- package/icons/tldraw.svg +4 -0
- package/icons/tldraw_light.svg +4 -0
- package/icons/typst.svg +2 -0
- package/images/contributors.png +0 -0
- package/images/fileIcons.png +0 -0
- package/images/folderIcons.png +0 -0
- package/package.json +12 -1
- package/package.nls.de.json +2 -0
- package/package.nls.json +2 -0
- package/src/commands/fileColor.ts +96 -0
- package/src/commands/folderColor.ts +3 -3
- package/src/commands/index.ts +2 -0
- package/src/commands/restoreConfig.ts +1 -0
- package/src/helpers/fileConfig.ts +2 -1
- package/src/i18n/lang-de.ts +5 -3
- package/src/i18n/lang-en.ts +5 -3
- package/src/i18n/lang-es.ts +5 -3
- package/src/i18n/lang-fr.ts +5 -3
- package/src/i18n/lang-ja.ts +5 -3
- package/src/i18n/lang-nl.ts +5 -3
- package/src/i18n/lang-pl.ts +5 -3
- package/src/i18n/lang-pt-br.ts +5 -3
- package/src/i18n/lang-pt-pt.ts +5 -3
- package/src/i18n/lang-ru.ts +5 -3
- package/src/i18n/lang-uk.ts +5 -3
- package/src/i18n/lang-zh-cn.ts +5 -3
- package/src/i18n/lang-zh-tw.ts +5 -3
- package/src/icons/fileIcons.ts +97 -9
- package/src/icons/folderIcons.ts +18 -1
- package/src/icons/generator/fileGenerator.ts +17 -0
- package/src/icons/generator/folderGenerator.ts +3 -3
- package/src/icons/generator/jsonGenerator.ts +17 -1
- package/src/icons/languageIcons.ts +4 -1
- package/src/models/i18n/translation.ts +5 -3
- package/src/models/icons/iconJsonOptions.ts +1 -0
- package/icons/file.svg +0 -1
- package/images/bloop.png +0 -0
- package/images/stepsize.png +0 -0
package/src/icons/folderIcons.ts
CHANGED
|
@@ -111,7 +111,7 @@ export const folderIcons: FolderTheme[] = [
|
|
|
111
111
|
'.submodules',
|
|
112
112
|
],
|
|
113
113
|
},
|
|
114
|
-
{ name: 'folder-github', folderNames: ['.github'] },
|
|
114
|
+
{ name: 'folder-github', folderNames: ['.github', 'github'] },
|
|
115
115
|
{ name: 'folder-gitlab', folderNames: ['.gitlab'] },
|
|
116
116
|
{ name: 'folder-vscode', folderNames: ['.vscode', '.vscode-test'] },
|
|
117
117
|
{
|
|
@@ -423,6 +423,7 @@ export const folderIcons: FolderTheme[] = [
|
|
|
423
423
|
name: 'folder-gulp',
|
|
424
424
|
folderNames: [
|
|
425
425
|
'gulp',
|
|
426
|
+
'gulp-tasks',
|
|
426
427
|
'gulpfile.js',
|
|
427
428
|
'gulpfile.mjs',
|
|
428
429
|
'gulpfile.ts',
|
|
@@ -807,6 +808,22 @@ export const folderIcons: FolderTheme[] = [
|
|
|
807
808
|
name: 'folder-proto',
|
|
808
809
|
folderNames: ['protobufs', 'proto'],
|
|
809
810
|
},
|
|
811
|
+
{
|
|
812
|
+
name: 'folder-plastic',
|
|
813
|
+
folderNames: ['plastic', '.plastic'],
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
name: 'folder-gamemaker',
|
|
817
|
+
folderNames: ['gamemaker', 'gamemaker2'],
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
name: 'folder-mercurial',
|
|
821
|
+
folderNames: ['.hg', 'hghooks', '.hghooks', '.hgext'],
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
name: 'folder-godot',
|
|
825
|
+
folderNames: ['godot', '.godot', 'godot-cpp', '.godot-cpp'],
|
|
826
|
+
},
|
|
810
827
|
],
|
|
811
828
|
},
|
|
812
829
|
{
|
|
@@ -13,6 +13,12 @@ import {
|
|
|
13
13
|
lightColorFileEnding,
|
|
14
14
|
wildcardPattern,
|
|
15
15
|
} from './constants';
|
|
16
|
+
import {
|
|
17
|
+
validateHEXColorCode,
|
|
18
|
+
writeSVGFiles,
|
|
19
|
+
getSVG,
|
|
20
|
+
getPath,
|
|
21
|
+
} from './folderGenerator';
|
|
16
22
|
|
|
17
23
|
/**
|
|
18
24
|
* Get all file icons that can be used in this theme.
|
|
@@ -193,6 +199,17 @@ const setIconDefinition = (
|
|
|
193
199
|
return obj;
|
|
194
200
|
};
|
|
195
201
|
|
|
202
|
+
export const generateFileIcons = (color: string | undefined) => {
|
|
203
|
+
if (!color || !validateHEXColorCode(color)) {
|
|
204
|
+
return console.error('Invalid color code for file icons');
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const fileIcon =
|
|
208
|
+
'M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m5 2H6v16h12v-9h-7V4z';
|
|
209
|
+
|
|
210
|
+
writeSVGFiles('file', getSVG(getPath(fileIcon, color)));
|
|
211
|
+
};
|
|
212
|
+
|
|
196
213
|
const getCustomIcons = (fileAssociations: IconAssociations | undefined) => {
|
|
197
214
|
if (!fileAssociations) return [];
|
|
198
215
|
|
|
@@ -309,12 +309,12 @@ export const generateFolderIcons = (color: string | undefined) => {
|
|
|
309
309
|
writeSVGFiles('folder-root-open', getSVG(getPath(rootFolderIconOpen, color)));
|
|
310
310
|
};
|
|
311
311
|
|
|
312
|
-
const getPath = (d: string, color: string) =>
|
|
312
|
+
export const getPath = (d: string, color: string) =>
|
|
313
313
|
`<path d="${d}" fill="${color}" />`;
|
|
314
|
-
const getSVG = (path: string) =>
|
|
314
|
+
export const getSVG = (path: string) =>
|
|
315
315
|
`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">${path}</svg>`;
|
|
316
316
|
|
|
317
|
-
const writeSVGFiles = (iconName: string, svg: string) => {
|
|
317
|
+
export const writeSVGFiles = (iconName: string, svg: string) => {
|
|
318
318
|
let iconsPath;
|
|
319
319
|
if (basename(__dirname) === 'dist') {
|
|
320
320
|
iconsPath = join(__dirname, '..', 'icons');
|
|
@@ -15,6 +15,7 @@ import { folderIcons } from '../folderIcons';
|
|
|
15
15
|
import { languageIcons } from '../languageIcons';
|
|
16
16
|
import { iconJsonName } from './constants';
|
|
17
17
|
import {
|
|
18
|
+
generateFileIcons,
|
|
18
19
|
generateFolderIcons,
|
|
19
20
|
loadFileIconDefinitions,
|
|
20
21
|
loadFolderIconDefinitions,
|
|
@@ -93,6 +94,12 @@ export const createIconFile = (
|
|
|
93
94
|
) {
|
|
94
95
|
throw Error('Material Icons: Invalid folder color value!');
|
|
95
96
|
}
|
|
97
|
+
if (
|
|
98
|
+
updatedConfigs?.files?.color &&
|
|
99
|
+
!validateHEXColorCode(updatedConfigs?.files?.color)
|
|
100
|
+
) {
|
|
101
|
+
throw Error('Material Icons: Invalid file color value!');
|
|
102
|
+
}
|
|
96
103
|
|
|
97
104
|
try {
|
|
98
105
|
let iconJsonPath = __dirname;
|
|
@@ -100,6 +107,12 @@ export const createIconFile = (
|
|
|
100
107
|
if (basename(__dirname) !== 'dist') {
|
|
101
108
|
iconJsonPath = join(__dirname, '..', '..', '..', 'dist');
|
|
102
109
|
}
|
|
110
|
+
if (!updatedConfigs || (updatedConfigs.files || {}).color) {
|
|
111
|
+
// if updatedConfigs do not exist (because of initial setup)
|
|
112
|
+
// or new config value was detected by the change detection
|
|
113
|
+
generateFileIcons(options.files?.color);
|
|
114
|
+
setIconOpacity(options, ['file.svg']);
|
|
115
|
+
}
|
|
103
116
|
if (!updatedConfigs || (updatedConfigs.folders || {}).color) {
|
|
104
117
|
// if updatedConfigs do not exist (because of initial setup)
|
|
105
118
|
// or new config value was detected by the change detection
|
|
@@ -153,7 +166,10 @@ export const getDefaultIconOptions = (): Required<IconJsonOptions> => ({
|
|
|
153
166
|
hidesExplorerArrows: false,
|
|
154
167
|
opacity: 1,
|
|
155
168
|
saturation: 1,
|
|
156
|
-
files: {
|
|
169
|
+
files: {
|
|
170
|
+
color: '#90a4ae',
|
|
171
|
+
associations: {},
|
|
172
|
+
},
|
|
157
173
|
languages: { associations: {} },
|
|
158
174
|
});
|
|
159
175
|
|
|
@@ -5,7 +5,6 @@ import { LanguageIcon } from '../models';
|
|
|
5
5
|
*/
|
|
6
6
|
export const languageIcons: LanguageIcon[] = [
|
|
7
7
|
{ icon: { name: 'git' }, ids: ['git', 'git-commit', 'git-rebase', 'ignore'] },
|
|
8
|
-
{ icon: { name: 'c' }, ids: ['c', 'objective-c', 'objective-cpp'] },
|
|
9
8
|
{ icon: { name: 'yaml' }, ids: ['yaml'] },
|
|
10
9
|
{ icon: { name: 'xml' }, ids: ['xml', 'xquery', 'xsl'] },
|
|
11
10
|
{ icon: { name: 'matlab' }, ids: ['matlab'] },
|
|
@@ -77,6 +76,7 @@ export const languageIcons: LanguageIcon[] = [
|
|
|
77
76
|
{ icon: { name: 'django' }, ids: ['django-html', 'django-txt'] },
|
|
78
77
|
{ icon: { name: 'html' }, ids: ['html'] },
|
|
79
78
|
{ icon: { name: 'godot' }, ids: ['gdscript'] },
|
|
79
|
+
{ icon: { name: 'godot-assets' }, ids: ['gdresource', 'gdshader'] },
|
|
80
80
|
{ icon: { name: 'vim' }, ids: ['viml'] },
|
|
81
81
|
{ icon: { name: 'silverstripe' }, ids: [] },
|
|
82
82
|
{ icon: { name: 'prolog' }, ids: ['prolog'] },
|
|
@@ -90,7 +90,10 @@ export const languageIcons: LanguageIcon[] = [
|
|
|
90
90
|
{ icon: { name: 'table' }, ids: ['csv', 'tsv', 'psv'] },
|
|
91
91
|
{ icon: { name: 'csharp' }, ids: ['csharp'] },
|
|
92
92
|
{ icon: { name: 'console' }, ids: ['bat', 'awk', 'shellscript'] },
|
|
93
|
+
{ icon: { name: 'c' }, ids: ['c'] },
|
|
93
94
|
{ icon: { name: 'cpp' }, ids: ['cpp'] },
|
|
95
|
+
{ icon: { name: 'objective-c' }, ids: ['objective-c'] },
|
|
96
|
+
{ icon: { name: 'objective-cpp' }, ids: ['objective-cpp'] },
|
|
94
97
|
{ icon: { name: 'coffee' }, ids: ['coffeescript'] },
|
|
95
98
|
{ icon: { name: 'fsharp' }, ids: ['fsharp'] },
|
|
96
99
|
{ icon: { name: 'editorconfig' }, ids: ['editorconfig'] },
|
|
@@ -8,14 +8,16 @@ export interface Translation {
|
|
|
8
8
|
};
|
|
9
9
|
folders: {
|
|
10
10
|
toggleIcons: string;
|
|
11
|
-
color: string;
|
|
12
|
-
hexCode: string;
|
|
13
|
-
wrongHexCode: string;
|
|
14
11
|
disabled: string;
|
|
15
12
|
theme: {
|
|
16
13
|
description: string;
|
|
17
14
|
};
|
|
18
15
|
};
|
|
16
|
+
colorSelect: {
|
|
17
|
+
color: string;
|
|
18
|
+
hexCode: string;
|
|
19
|
+
wrongHexCode: string;
|
|
20
|
+
};
|
|
19
21
|
opacity: {
|
|
20
22
|
inputPlaceholder: string;
|
|
21
23
|
wrongValue: string;
|
package/icons/file.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m5 2H6v16h12v-9h-7V4z" fill="#42a5f5"/></svg>
|
package/images/bloop.png
DELETED
|
Binary file
|
package/images/stepsize.png
DELETED
|
Binary file
|