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.
Files changed (83) hide show
  1. package/.eslintrc.json +51 -51
  2. package/.github/workflows/build.yml +45 -45
  3. package/.github/workflows/color-check.yml +22 -22
  4. package/.github/workflows/release.yml +73 -73
  5. package/.vscodeignore +21 -21
  6. package/CHANGELOG.md +1292 -1281
  7. package/README.md +199 -199
  8. package/icons/craco.svg +45 -45
  9. package/icons/folder-changesets-open.svg +5 -5
  10. package/icons/folder-changesets.svg +2 -2
  11. package/icons/folder-decorators-open.svg +2 -2
  12. package/icons/folder-decorators.svg +5 -5
  13. package/icons/folder-supabase-open.svg +5 -5
  14. package/icons/folder-supabase.svg +2 -2
  15. package/icons/sonarcloud.svg +4 -4
  16. package/icons/stylable.svg +10 -10
  17. package/icons/supabase.svg +4 -4
  18. package/icons/vitest.svg +6 -0
  19. package/images/contributors.png +0 -0
  20. package/images/fileIcons.png +0 -0
  21. package/package.json +252 -252
  22. package/package.nls.de.json +32 -32
  23. package/package.nls.es.json +29 -29
  24. package/package.nls.fr.json +29 -29
  25. package/package.nls.ja.json +32 -32
  26. package/package.nls.json +32 -32
  27. package/package.nls.nl.json +32 -32
  28. package/package.nls.pl.json +32 -32
  29. package/package.nls.pt-BR.json +29 -29
  30. package/package.nls.pt-PT.json +29 -29
  31. package/package.nls.ru.json +29 -29
  32. package/package.nls.zh-CN.json +29 -29
  33. package/package.nls.zh-TW.json +29 -29
  34. package/src/commands/activate.ts +28 -28
  35. package/src/commands/explorerArrows.ts +55 -55
  36. package/src/commands/folderColor.ts +96 -96
  37. package/src/commands/folders.ts +55 -55
  38. package/src/commands/grayscale.ts +55 -55
  39. package/src/commands/iconPacks.ts +64 -64
  40. package/src/commands/index.ts +30 -30
  41. package/src/commands/opacity.ts +46 -46
  42. package/src/commands/saturation.ts +46 -46
  43. package/src/extension.ts +37 -37
  44. package/src/helpers/customIcons.ts +8 -8
  45. package/src/helpers/index.ts +88 -88
  46. package/src/i18n/index.ts +78 -78
  47. package/src/i18n/lang-de.ts +43 -43
  48. package/src/i18n/lang-en.ts +43 -43
  49. package/src/i18n/lang-es.ts +43 -43
  50. package/src/i18n/lang-fr.ts +43 -43
  51. package/src/i18n/lang-ja.ts +43 -43
  52. package/src/i18n/lang-nl.ts +43 -43
  53. package/src/i18n/lang-pl.ts +43 -43
  54. package/src/i18n/lang-pt-br.ts +43 -43
  55. package/src/i18n/lang-pt-pt.ts +43 -43
  56. package/src/i18n/lang-ru.ts +43 -43
  57. package/src/i18n/lang-uk.ts +43 -43
  58. package/src/i18n/lang-zh-cn.ts +43 -43
  59. package/src/i18n/lang-zh-tw.ts +43 -43
  60. package/src/icons/fileIcons.ts +2197 -2182
  61. package/src/icons/folderIcons.ts +806 -806
  62. package/src/icons/generator/folderGenerator.ts +340 -340
  63. package/src/icons/generator/iconOpacity.ts +111 -111
  64. package/src/icons/generator/iconSaturation.ts +140 -140
  65. package/src/icons/generator/jsonGenerator.ts +191 -191
  66. package/src/icons/languageIcons.ts +141 -141
  67. package/src/models/i18n/translation.ts +41 -41
  68. package/src/models/iconConfiguration.ts +37 -37
  69. package/src/models/icons/iconJsonOptions.ts +21 -21
  70. package/src/models/index.ts +3 -3
  71. package/src/scripts/contributors/index.ts +138 -138
  72. package/src/scripts/helpers/screenshots.ts +32 -32
  73. package/src/scripts/icons/checks/checkIconAvailability.ts +215 -215
  74. package/src/scripts/icons/checks/checkIconConflicts.ts +152 -152
  75. package/src/scripts/icons/checks/checkIconUsage.ts +137 -137
  76. package/src/scripts/icons/checks/index.ts +7 -7
  77. package/src/scripts/preview/index.ts +40 -40
  78. package/src/scripts/preview/preview.ts +163 -163
  79. package/src/test/runTest.ts +26 -26
  80. package/src/test/spec/i18n/i18n.spec.ts +54 -54
  81. package/src/test/spec/icons/fileIcons.spec.ts +250 -250
  82. package/src/test/spec/icons/folderIcons.spec.ts +418 -418
  83. 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
+ });