material-icon-theme 4.23.1 → 4.24.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 (94) 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 +1305 -1292
  8. package/CONTRIBUTING.md +199 -29
  9. package/README.md +199 -199
  10. package/icons/craco.svg +45 -45
  11. package/icons/folder-changesets-open.svg +5 -5
  12. package/icons/folder-changesets.svg +2 -2
  13. package/icons/folder-decorators-open.svg +2 -2
  14. package/icons/folder-decorators.svg +5 -5
  15. package/icons/folder-supabase-open.svg +5 -5
  16. package/icons/folder-supabase.svg +2 -2
  17. package/icons/sonarcloud.svg +4 -4
  18. package/icons/stylable.svg +10 -10
  19. package/icons/supabase.svg +4 -4
  20. package/icons/vitest.svg +6 -6
  21. package/images/contributors.png +0 -0
  22. package/images/how-tos/folder-icon-parts.png +0 -0
  23. package/images/how-tos/pick-folder-colors.png +0 -0
  24. package/images/how-tos/pick-folder-colors.svg +301 -0
  25. package/images/how-tos/svg-folder-icon-with-correct-colors.png +0 -0
  26. package/images/how-tos/svg-folder-icon-with-wrong-colors.png +0 -0
  27. package/images/how-tos/svg-with-light-color.png +0 -0
  28. package/images/how-tos/svg-with-spacing.png +0 -0
  29. package/images/how-tos/svg-with-too-dark-color.png +0 -0
  30. package/images/how-tos/svg-with-wrong-color.png +0 -0
  31. package/images/how-tos/svg-without-spacing.png +0 -0
  32. package/package.json +252 -252
  33. package/package.nls.de.json +32 -32
  34. package/package.nls.es.json +29 -29
  35. package/package.nls.fr.json +29 -29
  36. package/package.nls.ja.json +32 -32
  37. package/package.nls.json +32 -32
  38. package/package.nls.nl.json +32 -32
  39. package/package.nls.pl.json +32 -32
  40. package/package.nls.pt-BR.json +29 -29
  41. package/package.nls.pt-PT.json +29 -29
  42. package/package.nls.ru.json +29 -29
  43. package/package.nls.zh-CN.json +29 -29
  44. package/package.nls.zh-TW.json +29 -29
  45. package/src/commands/activate.ts +28 -28
  46. package/src/commands/explorerArrows.ts +55 -55
  47. package/src/commands/folderColor.ts +96 -96
  48. package/src/commands/folders.ts +55 -55
  49. package/src/commands/grayscale.ts +55 -55
  50. package/src/commands/iconPacks.ts +64 -64
  51. package/src/commands/index.ts +30 -30
  52. package/src/commands/opacity.ts +46 -46
  53. package/src/commands/saturation.ts +46 -46
  54. package/src/extension.ts +37 -37
  55. package/src/helpers/customIcons.ts +8 -8
  56. package/src/helpers/index.ts +88 -88
  57. package/src/i18n/index.ts +78 -78
  58. package/src/i18n/lang-de.ts +43 -43
  59. package/src/i18n/lang-en.ts +43 -43
  60. package/src/i18n/lang-es.ts +43 -43
  61. package/src/i18n/lang-fr.ts +43 -43
  62. package/src/i18n/lang-ja.ts +43 -43
  63. package/src/i18n/lang-nl.ts +43 -43
  64. package/src/i18n/lang-pl.ts +43 -43
  65. package/src/i18n/lang-pt-br.ts +43 -43
  66. package/src/i18n/lang-pt-pt.ts +43 -43
  67. package/src/i18n/lang-ru.ts +43 -43
  68. package/src/i18n/lang-uk.ts +43 -43
  69. package/src/i18n/lang-zh-cn.ts +43 -43
  70. package/src/i18n/lang-zh-tw.ts +43 -43
  71. package/src/icons/fileIcons.ts +2206 -2197
  72. package/src/icons/folderIcons.ts +818 -806
  73. package/src/icons/generator/folderGenerator.ts +340 -340
  74. package/src/icons/generator/iconOpacity.ts +111 -111
  75. package/src/icons/generator/iconSaturation.ts +140 -140
  76. package/src/icons/generator/jsonGenerator.ts +191 -191
  77. package/src/icons/languageIcons.ts +141 -141
  78. package/src/models/i18n/translation.ts +41 -41
  79. package/src/models/iconConfiguration.ts +37 -37
  80. package/src/models/icons/iconJsonOptions.ts +21 -21
  81. package/src/models/index.ts +3 -3
  82. package/src/scripts/contributors/index.ts +138 -138
  83. package/src/scripts/helpers/screenshots.ts +32 -32
  84. package/src/scripts/icons/checks/checkIconAvailability.ts +215 -215
  85. package/src/scripts/icons/checks/checkIconConflicts.ts +152 -152
  86. package/src/scripts/icons/checks/checkIconUsage.ts +137 -137
  87. package/src/scripts/icons/checks/index.ts +7 -7
  88. package/src/scripts/preview/index.ts +40 -40
  89. package/src/scripts/preview/preview.ts +163 -163
  90. package/src/test/runTest.ts +26 -26
  91. package/src/test/spec/i18n/i18n.spec.ts +54 -54
  92. package/src/test/spec/icons/fileIcons.spec.ts +250 -250
  93. package/src/test/spec/icons/folderIcons.spec.ts +418 -418
  94. 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
+ });