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.
Files changed (108) hide show
  1. package/.eslintrc.json +51 -51
  2. package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +7 -0
  3. package/.github/workflows/build.yml +45 -45
  4. package/.github/workflows/color-check.yml +22 -22
  5. package/.github/workflows/release.yml +73 -73
  6. package/.vscodeignore +21 -21
  7. package/CHANGELOG.md +1325 -1292
  8. package/CONTRIBUTING.md +199 -29
  9. package/README.md +198 -199
  10. package/icons/bitbucket.svg +13 -1
  11. package/icons/bun.svg +2 -0
  12. package/icons/bun_light.svg +2 -0
  13. package/icons/craco.svg +45 -45
  14. package/icons/folder-changesets-open.svg +5 -5
  15. package/icons/folder-changesets.svg +2 -2
  16. package/icons/folder-decorators-open.svg +2 -2
  17. package/icons/folder-decorators.svg +5 -5
  18. package/icons/folder-gamemaker-open.svg +2 -0
  19. package/icons/folder-gamemaker.svg +2 -0
  20. package/icons/folder-supabase-open.svg +5 -5
  21. package/icons/folder-supabase.svg +2 -2
  22. package/icons/gamemaker.svg +4 -0
  23. package/icons/objective-c.svg +1 -0
  24. package/icons/objective-cpp.svg +1 -0
  25. package/icons/pascal.svg +6 -1
  26. package/icons/sonarcloud.svg +4 -4
  27. package/icons/stylable.svg +10 -10
  28. package/icons/supabase.svg +4 -4
  29. package/icons/tldraw.svg +4 -0
  30. package/icons/tldraw_light.svg +4 -0
  31. package/icons/vitest.svg +6 -6
  32. package/images/contributors.png +0 -0
  33. package/images/fileIcons.png +0 -0
  34. package/images/folderIcons.png +0 -0
  35. package/images/how-tos/folder-icon-parts.png +0 -0
  36. package/images/how-tos/pick-folder-colors.png +0 -0
  37. package/images/how-tos/pick-folder-colors.svg +301 -0
  38. package/images/how-tos/svg-folder-icon-with-correct-colors.png +0 -0
  39. package/images/how-tos/svg-folder-icon-with-wrong-colors.png +0 -0
  40. package/images/how-tos/svg-with-light-color.png +0 -0
  41. package/images/how-tos/svg-with-spacing.png +0 -0
  42. package/images/how-tos/svg-with-too-dark-color.png +0 -0
  43. package/images/how-tos/svg-with-wrong-color.png +0 -0
  44. package/images/how-tos/svg-without-spacing.png +0 -0
  45. package/package.json +252 -252
  46. package/package.nls.de.json +32 -32
  47. package/package.nls.es.json +29 -29
  48. package/package.nls.fr.json +29 -29
  49. package/package.nls.ja.json +32 -32
  50. package/package.nls.json +32 -32
  51. package/package.nls.nl.json +32 -32
  52. package/package.nls.pl.json +32 -32
  53. package/package.nls.pt-BR.json +29 -29
  54. package/package.nls.pt-PT.json +29 -29
  55. package/package.nls.ru.json +29 -29
  56. package/package.nls.zh-CN.json +29 -29
  57. package/package.nls.zh-TW.json +29 -29
  58. package/src/commands/activate.ts +28 -28
  59. package/src/commands/explorerArrows.ts +55 -55
  60. package/src/commands/folderColor.ts +96 -96
  61. package/src/commands/folders.ts +55 -55
  62. package/src/commands/grayscale.ts +55 -55
  63. package/src/commands/iconPacks.ts +64 -64
  64. package/src/commands/index.ts +30 -30
  65. package/src/commands/opacity.ts +46 -46
  66. package/src/commands/saturation.ts +46 -46
  67. package/src/extension.ts +37 -37
  68. package/src/helpers/customIcons.ts +8 -8
  69. package/src/helpers/index.ts +88 -88
  70. package/src/i18n/index.ts +78 -78
  71. package/src/i18n/lang-de.ts +43 -43
  72. package/src/i18n/lang-en.ts +43 -43
  73. package/src/i18n/lang-es.ts +43 -43
  74. package/src/i18n/lang-fr.ts +43 -43
  75. package/src/i18n/lang-ja.ts +43 -43
  76. package/src/i18n/lang-nl.ts +43 -43
  77. package/src/i18n/lang-pl.ts +43 -43
  78. package/src/i18n/lang-pt-br.ts +43 -43
  79. package/src/i18n/lang-pt-pt.ts +43 -43
  80. package/src/i18n/lang-ru.ts +43 -43
  81. package/src/i18n/lang-uk.ts +43 -43
  82. package/src/i18n/lang-zh-cn.ts +43 -43
  83. package/src/i18n/lang-zh-tw.ts +43 -43
  84. package/src/icons/fileIcons.ts +2240 -2197
  85. package/src/icons/folderIcons.ts +823 -806
  86. package/src/icons/generator/folderGenerator.ts +340 -340
  87. package/src/icons/generator/iconOpacity.ts +111 -111
  88. package/src/icons/generator/iconSaturation.ts +140 -140
  89. package/src/icons/generator/jsonGenerator.ts +191 -191
  90. package/src/icons/languageIcons.ts +144 -141
  91. package/src/models/i18n/translation.ts +41 -41
  92. package/src/models/iconConfiguration.ts +37 -37
  93. package/src/models/icons/iconJsonOptions.ts +21 -21
  94. package/src/models/index.ts +3 -3
  95. package/src/scripts/contributors/index.ts +138 -138
  96. package/src/scripts/helpers/screenshots.ts +32 -32
  97. package/src/scripts/icons/checks/checkIconAvailability.ts +215 -215
  98. package/src/scripts/icons/checks/checkIconConflicts.ts +152 -152
  99. package/src/scripts/icons/checks/checkIconUsage.ts +137 -137
  100. package/src/scripts/icons/checks/index.ts +7 -7
  101. package/src/scripts/preview/index.ts +40 -40
  102. package/src/scripts/preview/preview.ts +163 -163
  103. package/src/test/runTest.ts +26 -26
  104. package/src/test/spec/i18n/i18n.spec.ts +54 -54
  105. package/src/test/spec/icons/fileIcons.spec.ts +250 -250
  106. package/src/test/spec/icons/folderIcons.spec.ts +418 -418
  107. package/src/test/spec/icons/languageIcons.spec.ts +184 -184
  108. package/images/bloop.png +0 -0
@@ -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
+ });
package/images/bloop.png DELETED
Binary file