material-icon-theme 4.23.0 → 4.23.1
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/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 +1292 -1281
- package/README.md +199 -199
- 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-supabase-open.svg +5 -5
- package/icons/folder-supabase.svg +2 -2
- package/icons/sonarcloud.svg +4 -4
- package/icons/stylable.svg +10 -10
- package/icons/supabase.svg +4 -4
- package/icons/vitest.svg +6 -0
- package/images/contributors.png +0 -0
- package/images/fileIcons.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 +2197 -2182
- package/src/icons/folderIcons.ts +806 -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 +141 -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
|
@@ -1,184 +1,184 @@
|
|
|
1
|
-
import { deepStrictEqual } from 'assert';
|
|
2
|
-
import merge from 'lodash.merge';
|
|
3
|
-
import {
|
|
4
|
-
getDefaultIconOptions,
|
|
5
|
-
loadLanguageIconDefinitions,
|
|
6
|
-
} from '../../../icons/index';
|
|
7
|
-
import {
|
|
8
|
-
IconConfiguration,
|
|
9
|
-
IconPack,
|
|
10
|
-
LanguageIcon,
|
|
11
|
-
} from '../../../models/index';
|
|
12
|
-
|
|
13
|
-
describe('language icons', () => {
|
|
14
|
-
let expectedConfig: IconConfiguration;
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
expectedConfig = merge({}, new IconConfiguration(), {
|
|
18
|
-
options: getDefaultIconOptions(),
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should configure icon definitions', () => {
|
|
23
|
-
const languageIcons: LanguageIcon[] = [
|
|
24
|
-
{ icon: { name: 'a' }, ids: ['a'] },
|
|
25
|
-
{ icon: { name: 'b' }, ids: ['b'] },
|
|
26
|
-
{ icon: { name: 'c' }, ids: ['c', 'd'] },
|
|
27
|
-
];
|
|
28
|
-
const options = getDefaultIconOptions();
|
|
29
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
30
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
31
|
-
languageIcons,
|
|
32
|
-
iconConfig,
|
|
33
|
-
options
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
expectedConfig.iconDefinitions = {
|
|
37
|
-
a: {
|
|
38
|
-
iconPath: './../icons/a.svg',
|
|
39
|
-
},
|
|
40
|
-
b: {
|
|
41
|
-
iconPath: './../icons/b.svg',
|
|
42
|
-
},
|
|
43
|
-
c: {
|
|
44
|
-
iconPath: './../icons/c.svg',
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
expectedConfig.languageIds = {
|
|
48
|
-
a: 'a',
|
|
49
|
-
b: 'b',
|
|
50
|
-
c: 'c',
|
|
51
|
-
d: 'c',
|
|
52
|
-
};
|
|
53
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('should disable icon definitions', () => {
|
|
57
|
-
const languageIcons: LanguageIcon[] = [
|
|
58
|
-
{ icon: { name: 'a' }, ids: ['a'] },
|
|
59
|
-
{ icon: { name: 'c' }, ids: ['c', 'd'], disabled: true },
|
|
60
|
-
];
|
|
61
|
-
const options = getDefaultIconOptions();
|
|
62
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
63
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
64
|
-
languageIcons,
|
|
65
|
-
iconConfig,
|
|
66
|
-
options
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
expectedConfig.iconDefinitions = {
|
|
70
|
-
a: {
|
|
71
|
-
iconPath: './../icons/a.svg',
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
expectedConfig.languageIds = {
|
|
75
|
-
a: 'a',
|
|
76
|
-
};
|
|
77
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it('should disable icon packs', () => {
|
|
81
|
-
const languageIcons: LanguageIcon[] = [
|
|
82
|
-
{ icon: { name: 'a' }, ids: ['a'], enabledFor: [IconPack.Angular] },
|
|
83
|
-
{ icon: { name: 'c' }, ids: ['c', 'd'], disabled: true },
|
|
84
|
-
];
|
|
85
|
-
const options = getDefaultIconOptions();
|
|
86
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
87
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
88
|
-
languageIcons,
|
|
89
|
-
iconConfig,
|
|
90
|
-
{ ...options, activeIconPack: '' }
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
expectedConfig.iconDefinitions = {};
|
|
94
|
-
expectedConfig.languageIds = {};
|
|
95
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('should configure language icons for light and high contrast', () => {
|
|
99
|
-
const languageIcons: LanguageIcon[] = [
|
|
100
|
-
{ icon: { name: 'a', light: true, highContrast: true }, ids: ['a'] },
|
|
101
|
-
{ icon: { name: 'b', light: true, highContrast: true }, ids: ['b'] },
|
|
102
|
-
];
|
|
103
|
-
const options = getDefaultIconOptions();
|
|
104
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
105
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
106
|
-
languageIcons,
|
|
107
|
-
iconConfig,
|
|
108
|
-
options
|
|
109
|
-
);
|
|
110
|
-
/* eslint-disable camelcase */
|
|
111
|
-
expectedConfig.iconDefinitions = {
|
|
112
|
-
a: {
|
|
113
|
-
iconPath: './../icons/a.svg',
|
|
114
|
-
},
|
|
115
|
-
a_light: {
|
|
116
|
-
iconPath: './../icons/a_light.svg',
|
|
117
|
-
},
|
|
118
|
-
a_highContrast: {
|
|
119
|
-
iconPath: './../icons/a_highContrast.svg',
|
|
120
|
-
},
|
|
121
|
-
b: {
|
|
122
|
-
iconPath: './../icons/b.svg',
|
|
123
|
-
},
|
|
124
|
-
b_light: {
|
|
125
|
-
iconPath: './../icons/b_light.svg',
|
|
126
|
-
},
|
|
127
|
-
b_highContrast: {
|
|
128
|
-
iconPath: './../icons/b_highContrast.svg',
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
expectedConfig.languageIds = {
|
|
132
|
-
a: 'a',
|
|
133
|
-
b: 'b',
|
|
134
|
-
};
|
|
135
|
-
expectedConfig.light = {
|
|
136
|
-
fileExtensions: {},
|
|
137
|
-
fileNames: {},
|
|
138
|
-
languageIds: {
|
|
139
|
-
a: 'a_light',
|
|
140
|
-
b: 'b_light',
|
|
141
|
-
},
|
|
142
|
-
};
|
|
143
|
-
expectedConfig.highContrast = {
|
|
144
|
-
fileExtensions: {},
|
|
145
|
-
fileNames: {},
|
|
146
|
-
languageIds: {
|
|
147
|
-
a: 'a_highContrast',
|
|
148
|
-
b: 'b_highContrast',
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
/* eslint-enable camelcase */
|
|
152
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
it('should configure custom icon associations', () => {
|
|
156
|
-
const languageIcons: LanguageIcon[] = [
|
|
157
|
-
{ icon: { name: 'json' }, ids: ['a'] },
|
|
158
|
-
];
|
|
159
|
-
const options = getDefaultIconOptions();
|
|
160
|
-
options.languages.associations = {
|
|
161
|
-
xml: 'json',
|
|
162
|
-
};
|
|
163
|
-
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
164
|
-
const iconDefinitions = loadLanguageIconDefinitions(
|
|
165
|
-
languageIcons,
|
|
166
|
-
iconConfig,
|
|
167
|
-
options
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
expectedConfig.iconDefinitions = {
|
|
171
|
-
json: {
|
|
172
|
-
iconPath: './../icons/json.svg',
|
|
173
|
-
},
|
|
174
|
-
};
|
|
175
|
-
expectedConfig.languageIds = {
|
|
176
|
-
a: 'json',
|
|
177
|
-
xml: 'json',
|
|
178
|
-
};
|
|
179
|
-
expectedConfig.options!.languages!.associations = {
|
|
180
|
-
xml: 'json',
|
|
181
|
-
};
|
|
182
|
-
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
183
|
-
});
|
|
184
|
-
});
|
|
1
|
+
import { deepStrictEqual } from 'assert';
|
|
2
|
+
import merge from 'lodash.merge';
|
|
3
|
+
import {
|
|
4
|
+
getDefaultIconOptions,
|
|
5
|
+
loadLanguageIconDefinitions,
|
|
6
|
+
} from '../../../icons/index';
|
|
7
|
+
import {
|
|
8
|
+
IconConfiguration,
|
|
9
|
+
IconPack,
|
|
10
|
+
LanguageIcon,
|
|
11
|
+
} from '../../../models/index';
|
|
12
|
+
|
|
13
|
+
describe('language icons', () => {
|
|
14
|
+
let expectedConfig: IconConfiguration;
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
expectedConfig = merge({}, new IconConfiguration(), {
|
|
18
|
+
options: getDefaultIconOptions(),
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should configure icon definitions', () => {
|
|
23
|
+
const languageIcons: LanguageIcon[] = [
|
|
24
|
+
{ icon: { name: 'a' }, ids: ['a'] },
|
|
25
|
+
{ icon: { name: 'b' }, ids: ['b'] },
|
|
26
|
+
{ icon: { name: 'c' }, ids: ['c', 'd'] },
|
|
27
|
+
];
|
|
28
|
+
const options = getDefaultIconOptions();
|
|
29
|
+
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
30
|
+
const iconDefinitions = loadLanguageIconDefinitions(
|
|
31
|
+
languageIcons,
|
|
32
|
+
iconConfig,
|
|
33
|
+
options
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
expectedConfig.iconDefinitions = {
|
|
37
|
+
a: {
|
|
38
|
+
iconPath: './../icons/a.svg',
|
|
39
|
+
},
|
|
40
|
+
b: {
|
|
41
|
+
iconPath: './../icons/b.svg',
|
|
42
|
+
},
|
|
43
|
+
c: {
|
|
44
|
+
iconPath: './../icons/c.svg',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
expectedConfig.languageIds = {
|
|
48
|
+
a: 'a',
|
|
49
|
+
b: 'b',
|
|
50
|
+
c: 'c',
|
|
51
|
+
d: 'c',
|
|
52
|
+
};
|
|
53
|
+
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it('should disable icon definitions', () => {
|
|
57
|
+
const languageIcons: LanguageIcon[] = [
|
|
58
|
+
{ icon: { name: 'a' }, ids: ['a'] },
|
|
59
|
+
{ icon: { name: 'c' }, ids: ['c', 'd'], disabled: true },
|
|
60
|
+
];
|
|
61
|
+
const options = getDefaultIconOptions();
|
|
62
|
+
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
63
|
+
const iconDefinitions = loadLanguageIconDefinitions(
|
|
64
|
+
languageIcons,
|
|
65
|
+
iconConfig,
|
|
66
|
+
options
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
expectedConfig.iconDefinitions = {
|
|
70
|
+
a: {
|
|
71
|
+
iconPath: './../icons/a.svg',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
expectedConfig.languageIds = {
|
|
75
|
+
a: 'a',
|
|
76
|
+
};
|
|
77
|
+
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('should disable icon packs', () => {
|
|
81
|
+
const languageIcons: LanguageIcon[] = [
|
|
82
|
+
{ icon: { name: 'a' }, ids: ['a'], enabledFor: [IconPack.Angular] },
|
|
83
|
+
{ icon: { name: 'c' }, ids: ['c', 'd'], disabled: true },
|
|
84
|
+
];
|
|
85
|
+
const options = getDefaultIconOptions();
|
|
86
|
+
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
87
|
+
const iconDefinitions = loadLanguageIconDefinitions(
|
|
88
|
+
languageIcons,
|
|
89
|
+
iconConfig,
|
|
90
|
+
{ ...options, activeIconPack: '' }
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
expectedConfig.iconDefinitions = {};
|
|
94
|
+
expectedConfig.languageIds = {};
|
|
95
|
+
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it('should configure language icons for light and high contrast', () => {
|
|
99
|
+
const languageIcons: LanguageIcon[] = [
|
|
100
|
+
{ icon: { name: 'a', light: true, highContrast: true }, ids: ['a'] },
|
|
101
|
+
{ icon: { name: 'b', light: true, highContrast: true }, ids: ['b'] },
|
|
102
|
+
];
|
|
103
|
+
const options = getDefaultIconOptions();
|
|
104
|
+
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
105
|
+
const iconDefinitions = loadLanguageIconDefinitions(
|
|
106
|
+
languageIcons,
|
|
107
|
+
iconConfig,
|
|
108
|
+
options
|
|
109
|
+
);
|
|
110
|
+
/* eslint-disable camelcase */
|
|
111
|
+
expectedConfig.iconDefinitions = {
|
|
112
|
+
a: {
|
|
113
|
+
iconPath: './../icons/a.svg',
|
|
114
|
+
},
|
|
115
|
+
a_light: {
|
|
116
|
+
iconPath: './../icons/a_light.svg',
|
|
117
|
+
},
|
|
118
|
+
a_highContrast: {
|
|
119
|
+
iconPath: './../icons/a_highContrast.svg',
|
|
120
|
+
},
|
|
121
|
+
b: {
|
|
122
|
+
iconPath: './../icons/b.svg',
|
|
123
|
+
},
|
|
124
|
+
b_light: {
|
|
125
|
+
iconPath: './../icons/b_light.svg',
|
|
126
|
+
},
|
|
127
|
+
b_highContrast: {
|
|
128
|
+
iconPath: './../icons/b_highContrast.svg',
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
expectedConfig.languageIds = {
|
|
132
|
+
a: 'a',
|
|
133
|
+
b: 'b',
|
|
134
|
+
};
|
|
135
|
+
expectedConfig.light = {
|
|
136
|
+
fileExtensions: {},
|
|
137
|
+
fileNames: {},
|
|
138
|
+
languageIds: {
|
|
139
|
+
a: 'a_light',
|
|
140
|
+
b: 'b_light',
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
expectedConfig.highContrast = {
|
|
144
|
+
fileExtensions: {},
|
|
145
|
+
fileNames: {},
|
|
146
|
+
languageIds: {
|
|
147
|
+
a: 'a_highContrast',
|
|
148
|
+
b: 'b_highContrast',
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
/* eslint-enable camelcase */
|
|
152
|
+
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it('should configure custom icon associations', () => {
|
|
156
|
+
const languageIcons: LanguageIcon[] = [
|
|
157
|
+
{ icon: { name: 'json' }, ids: ['a'] },
|
|
158
|
+
];
|
|
159
|
+
const options = getDefaultIconOptions();
|
|
160
|
+
options.languages.associations = {
|
|
161
|
+
xml: 'json',
|
|
162
|
+
};
|
|
163
|
+
const iconConfig = merge({}, new IconConfiguration(), { options });
|
|
164
|
+
const iconDefinitions = loadLanguageIconDefinitions(
|
|
165
|
+
languageIcons,
|
|
166
|
+
iconConfig,
|
|
167
|
+
options
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
expectedConfig.iconDefinitions = {
|
|
171
|
+
json: {
|
|
172
|
+
iconPath: './../icons/json.svg',
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
expectedConfig.languageIds = {
|
|
176
|
+
a: 'json',
|
|
177
|
+
xml: 'json',
|
|
178
|
+
};
|
|
179
|
+
expectedConfig.options!.languages!.associations = {
|
|
180
|
+
xml: 'json',
|
|
181
|
+
};
|
|
182
|
+
deepStrictEqual(iconDefinitions, expectedConfig);
|
|
183
|
+
});
|
|
184
|
+
});
|