material-icon-theme 4.25.0 → 4.27.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 (169) hide show
  1. package/README.md +5 -4
  2. package/dist/material-icons.json +5704 -0
  3. package/icons/c.svg +4 -1
  4. package/icons/cpp.svg +4 -1
  5. package/icons/csharp.svg +4 -1
  6. package/icons/deno.svg +1 -0
  7. package/icons/deno_light.svg +1 -0
  8. package/icons/file.svg +1 -1
  9. package/icons/folder-godot-open.svg +2 -0
  10. package/icons/folder-godot.svg +8 -0
  11. package/icons/folder-mercurial-open.svg +5 -0
  12. package/icons/folder-mercurial.svg +2 -0
  13. package/icons/folder-netlify-open.svg +5 -1
  14. package/icons/folder-netlify.svg +2 -1
  15. package/icons/folder-open.svg +1 -0
  16. package/icons/folder-plastic-open.svg +8 -0
  17. package/icons/folder-plastic.svg +2 -0
  18. package/icons/folder-root-open.svg +1 -0
  19. package/icons/folder-root.svg +1 -0
  20. package/icons/folder.svg +1 -0
  21. package/icons/godot-assets.svg +7 -1
  22. package/icons/godot.svg +7 -1
  23. package/icons/ifanr-cloud.svg +10 -0
  24. package/icons/mercurial.svg +6 -0
  25. package/icons/mermaid.svg +4 -0
  26. package/icons/netlify.svg +7 -1
  27. package/icons/netlify_light.svg +7 -0
  28. package/icons/objective-c.svg +4 -1
  29. package/icons/plastic.svg +7 -0
  30. package/icons/qwik.svg +2 -0
  31. package/icons/rc.svg +2 -0
  32. package/icons/typst.svg +2 -0
  33. package/package.json +18 -1
  34. package/.eslintignore +0 -1
  35. package/.eslintrc.json +0 -51
  36. package/.github/FUNDING.yml +0 -3
  37. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -34
  38. package/.github/ISSUE_TEMPLATE/icon_request.md +0 -27
  39. package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +0 -7
  40. package/.github/workflows/build.yml +0 -45
  41. package/.github/workflows/color-check.yml +0 -22
  42. package/.github/workflows/release.yml +0 -73
  43. package/.prettierrc +0 -7
  44. package/.vscode/extensions.json +0 -3
  45. package/.vscode/launch.json +0 -43
  46. package/.vscode/settings.json +0 -14
  47. package/.vscode/tasks.json +0 -32
  48. package/.vscodeignore +0 -22
  49. package/CHANGELOG.md +0 -1325
  50. package/CONTRIBUTING.md +0 -232
  51. package/build/web-extension.webpack.config.js +0 -62
  52. package/build/webpack.config.js +0 -39
  53. package/changelog.config.json +0 -4
  54. package/images/commandPalette.png +0 -0
  55. package/images/contributors.png +0 -0
  56. package/images/fileIcons.png +0 -0
  57. package/images/folderIcons.png +0 -0
  58. package/images/how-tos/folder-icon-parts.png +0 -0
  59. package/images/how-tos/pick-folder-colors.png +0 -0
  60. package/images/how-tos/pick-folder-colors.svg +0 -301
  61. package/images/how-tos/svg-folder-icon-with-correct-colors.png +0 -0
  62. package/images/how-tos/svg-folder-icon-with-wrong-colors.png +0 -0
  63. package/images/how-tos/svg-with-light-color.png +0 -0
  64. package/images/how-tos/svg-with-spacing.png +0 -0
  65. package/images/how-tos/svg-with-too-dark-color.png +0 -0
  66. package/images/how-tos/svg-with-wrong-color.png +0 -0
  67. package/images/how-tos/svg-without-spacing.png +0 -0
  68. package/images/set-folder-color.gif +0 -0
  69. package/images/set-folder-theme.gif +0 -0
  70. package/images/stepsize.png +0 -0
  71. package/logo.png +0 -0
  72. package/logo.svg +0 -21
  73. package/material-colors.yml +0 -257
  74. package/package.nls.de.json +0 -32
  75. package/package.nls.es.json +0 -29
  76. package/package.nls.fr.json +0 -29
  77. package/package.nls.ja.json +0 -32
  78. package/package.nls.json +0 -32
  79. package/package.nls.nl.json +0 -32
  80. package/package.nls.pl.json +0 -32
  81. package/package.nls.pt-BR.json +0 -29
  82. package/package.nls.pt-PT.json +0 -29
  83. package/package.nls.ru.json +0 -29
  84. package/package.nls.zh-CN.json +0 -29
  85. package/package.nls.zh-TW.json +0 -29
  86. package/src/commands/activate.ts +0 -28
  87. package/src/commands/explorerArrows.ts +0 -55
  88. package/src/commands/folderColor.ts +0 -96
  89. package/src/commands/folders.ts +0 -55
  90. package/src/commands/grayscale.ts +0 -55
  91. package/src/commands/iconPacks.ts +0 -64
  92. package/src/commands/index.ts +0 -30
  93. package/src/commands/opacity.ts +0 -46
  94. package/src/commands/restoreConfig.ts +0 -14
  95. package/src/commands/saturation.ts +0 -46
  96. package/src/extension.ts +0 -37
  97. package/src/helpers/changeDetection.ts +0 -109
  98. package/src/helpers/customIcons.ts +0 -8
  99. package/src/helpers/fileConfig.ts +0 -37
  100. package/src/helpers/index.ts +0 -88
  101. package/src/helpers/objects.ts +0 -58
  102. package/src/helpers/types.ts +0 -7
  103. package/src/i18n/index.ts +0 -78
  104. package/src/i18n/lang-de.ts +0 -43
  105. package/src/i18n/lang-en.ts +0 -43
  106. package/src/i18n/lang-es.ts +0 -43
  107. package/src/i18n/lang-fr.ts +0 -43
  108. package/src/i18n/lang-ja.ts +0 -43
  109. package/src/i18n/lang-nl.ts +0 -43
  110. package/src/i18n/lang-pl.ts +0 -43
  111. package/src/i18n/lang-pt-br.ts +0 -43
  112. package/src/i18n/lang-pt-pt.ts +0 -43
  113. package/src/i18n/lang-ru.ts +0 -43
  114. package/src/i18n/lang-uk.ts +0 -43
  115. package/src/i18n/lang-zh-cn.ts +0 -43
  116. package/src/i18n/lang-zh-tw.ts +0 -43
  117. package/src/icons/fileIcons.ts +0 -2240
  118. package/src/icons/folderIcons.ts +0 -823
  119. package/src/icons/generator/constants.ts +0 -29
  120. package/src/icons/generator/fileGenerator.ts +0 -216
  121. package/src/icons/generator/folderGenerator.ts +0 -340
  122. package/src/icons/generator/iconOpacity.ts +0 -111
  123. package/src/icons/generator/iconSaturation.ts +0 -140
  124. package/src/icons/generator/index.ts +0 -7
  125. package/src/icons/generator/jsonGenerator.ts +0 -191
  126. package/src/icons/generator/languageGenerator.ts +0 -127
  127. package/src/icons/index.ts +0 -4
  128. package/src/icons/languageIcons.ts +0 -144
  129. package/src/models/i18n/index.ts +0 -1
  130. package/src/models/i18n/translation.ts +0 -41
  131. package/src/models/iconConfiguration.ts +0 -37
  132. package/src/models/icons/defaultIcon.ts +0 -16
  133. package/src/models/icons/files/fileIcon.ts +0 -49
  134. package/src/models/icons/files/fileTypes.ts +0 -14
  135. package/src/models/icons/files/index.ts +0 -2
  136. package/src/models/icons/folders/folderIcon.ts +0 -34
  137. package/src/models/icons/folders/folderTheme.ts +0 -23
  138. package/src/models/icons/folders/index.ts +0 -2
  139. package/src/models/icons/iconJsonOptions.ts +0 -21
  140. package/src/models/icons/iconPack.ts +0 -12
  141. package/src/models/icons/index.ts +0 -6
  142. package/src/models/icons/languages/index.ts +0 -1
  143. package/src/models/icons/languages/languageIdentifier.ts +0 -26
  144. package/src/models/index.ts +0 -3
  145. package/src/models/scripts/contributors/contributor.ts +0 -22
  146. package/src/models/scripts/contributors/contributorsConfig.ts +0 -10
  147. package/src/scripts/contributors/contributors.css +0 -24
  148. package/src/scripts/contributors/index.ts +0 -138
  149. package/src/scripts/helpers/painter.ts +0 -5
  150. package/src/scripts/helpers/screenshots.ts +0 -32
  151. package/src/scripts/helpers/similarity.ts +0 -47
  152. package/src/scripts/helpers/titleCase.ts +0 -7
  153. package/src/scripts/icons/checks/checkIconAvailability.ts +0 -215
  154. package/src/scripts/icons/checks/checkIconConflicts.ts +0 -152
  155. package/src/scripts/icons/checks/checkIconUsage.ts +0 -137
  156. package/src/scripts/icons/checks/index.ts +0 -7
  157. package/src/scripts/icons/generateJson.ts +0 -11
  158. package/src/scripts/preview/index.ts +0 -40
  159. package/src/scripts/preview/preview.ts +0 -163
  160. package/src/scripts/preview/style.css +0 -48
  161. package/src/test/runTest.ts +0 -26
  162. package/src/test/spec/i18n/i18n.spec.ts +0 -54
  163. package/src/test/spec/icons/fileIcons.spec.ts +0 -250
  164. package/src/test/spec/icons/folderIcons.spec.ts +0 -418
  165. package/src/test/spec/icons/languageIcons.spec.ts +0 -184
  166. package/src/test/spec/index.ts +0 -36
  167. package/src/web/extension.ts +0 -10
  168. package/svgo.config.js +0 -12
  169. package/tsconfig.json +0 -23
@@ -1,140 +0,0 @@
1
- import { readdirSync, readFileSync, writeFileSync } from 'fs';
2
- import { basename, join } from 'path';
3
- import { getCustomIconPaths } from '../../helpers/customIcons';
4
- import { IconJsonOptions } from '../../models';
5
-
6
- /**
7
- * Changes saturation of all icons in the set.
8
- * @param options Icon JSON options which include the saturation value.
9
- * @param fileNames Only change the saturation of certain file names.
10
- */
11
- export const setIconSaturation = (
12
- options: IconJsonOptions,
13
- fileNames?: string[]
14
- ) => {
15
- if (!validateSaturationValue(options.saturation)) {
16
- return console.error(
17
- 'Invalid saturation value! Saturation must be a decimal number between 0 and 1!'
18
- );
19
- }
20
-
21
- let iconsPath = '';
22
- if (basename(__dirname) === 'dist') {
23
- iconsPath = join(__dirname, '..', 'icons');
24
- } else {
25
- // executed via script
26
- iconsPath = join(__dirname, '..', '..', '..', 'icons');
27
- }
28
-
29
- const customIconPaths = getCustomIconPaths(options);
30
- const iconFiles = readdirSync(iconsPath);
31
-
32
- // read all icon files from the icons folder
33
- try {
34
- (fileNames || iconFiles).forEach(adjustSaturation(iconsPath, options));
35
-
36
- customIconPaths.forEach((iconPath) => {
37
- const customIcons = readdirSync(iconPath);
38
- customIcons.forEach(adjustSaturation(iconPath, options));
39
- });
40
- } catch (error) {
41
- console.error(error);
42
- }
43
- };
44
-
45
- /**
46
- * Get the SVG root element.
47
- * @param svg SVG file as string.
48
- */
49
- const getSVGRootElement = (svg: string) => {
50
- const result = new RegExp(/<svg[^>]*>/).exec(svg);
51
- return result?.[0];
52
- };
53
-
54
- /**
55
- * Add an filter attribute to the SVG icon.
56
- * @param svgRoot Root element of the SVG icon.
57
- */
58
- const addFilterAttribute = (svgRoot: string) => {
59
- const pattern = new RegExp(/\sfilter="[^"]+?"/);
60
- // if the filter attribute already exists
61
- if (pattern.test(svgRoot)) {
62
- return svgRoot.replace(pattern, ' filter="url(#saturation)"');
63
- } else {
64
- return svgRoot.replace(/^<svg/, '<svg filter="url(#saturation)"');
65
- }
66
- };
67
-
68
- /**
69
- * Remove the filter attribute of the SVG icon.
70
- * @param svgRoot Root element of the SVG icon.
71
- */
72
- const removeFilterAttribute = (svgRoot: string) => {
73
- const pattern = new RegExp(/\sfilter="[^"]+?"/);
74
- return svgRoot.replace(pattern, '');
75
- };
76
-
77
- /**
78
- * Add filter element to the SVG icon.
79
- * @param svg SVG file as string.
80
- */
81
- const addFilterElement = (svg: string, value: number) => {
82
- const pattern = new RegExp(/<filter id="saturation".+<\/filter>(.*<\/svg>)/);
83
- const filterElement = `<filter id="saturation"><feColorMatrix type="saturate" values="${value}"/></filter>`;
84
- if (pattern.test(svg)) {
85
- return svg.replace(pattern, `${filterElement}$1`);
86
- } else {
87
- return svg.replace(/<\/svg>/, `${filterElement}</svg>`);
88
- }
89
- };
90
-
91
- /**
92
- * Remove filter element from the SVG icon.
93
- * @param svg SVG file as string.
94
- */
95
- const removeFilterElement = (svg: string) => {
96
- const pattern = new RegExp(/<filter id="saturation".+<\/filter>(.*<\/svg>)/);
97
- return svg.replace(pattern, '$1');
98
- };
99
-
100
- /**
101
- * Validate the saturation value.
102
- * @param saturation Saturation value
103
- */
104
- export const validateSaturationValue = (saturation: number | undefined) => {
105
- return saturation !== undefined && saturation <= 1 && saturation >= 0;
106
- };
107
-
108
- const adjustSaturation = (
109
- iconsPath: any,
110
- options: IconJsonOptions
111
- ): ((value: string, index: number, array: string[]) => void) => {
112
- return (iconFileName) => {
113
- const svgFilePath = join(iconsPath, iconFileName);
114
-
115
- // Read SVG file
116
- const svg = readFileSync(svgFilePath, 'utf-8');
117
-
118
- // Get the root element of the SVG file
119
- const svgRootElement = getSVGRootElement(svg);
120
- if (!svgRootElement) return;
121
-
122
- let updatedRootElement: string;
123
-
124
- if (options.saturation !== undefined && options.saturation < 1) {
125
- updatedRootElement = addFilterAttribute(svgRootElement);
126
- } else {
127
- updatedRootElement = removeFilterAttribute(svgRootElement);
128
- }
129
-
130
- let updatedSVG = svg.replace(/<svg[^>]*>/, updatedRootElement);
131
-
132
- if (options.saturation !== undefined && options.saturation < 1) {
133
- updatedSVG = addFilterElement(updatedSVG, options.saturation);
134
- } else {
135
- updatedSVG = removeFilterElement(updatedSVG);
136
- }
137
-
138
- writeFileSync(svgFilePath, updatedSVG);
139
- };
140
- };
@@ -1,7 +0,0 @@
1
- export * from './fileGenerator';
2
- export * from './folderGenerator';
3
- export * from './languageGenerator';
4
- export * from './constants';
5
- export * from './jsonGenerator';
6
- export * from './iconOpacity';
7
- export * from './iconSaturation';
@@ -1,191 +0,0 @@
1
- import {
2
- existsSync,
3
- readdirSync,
4
- renameSync,
5
- unlinkSync,
6
- writeFileSync,
7
- } from 'fs';
8
- import merge from 'lodash.merge';
9
- import { basename, join } from 'path';
10
- import { getCustomIconPaths } from '../../helpers/customIcons';
11
- import { getFileConfigHash } from '../../helpers/fileConfig';
12
- import { IconConfiguration, IconJsonOptions } from '../../models/index';
13
- import { fileIcons } from '../fileIcons';
14
- import { folderIcons } from '../folderIcons';
15
- import { languageIcons } from '../languageIcons';
16
- import { iconJsonName } from './constants';
17
- import {
18
- generateFolderIcons,
19
- loadFileIconDefinitions,
20
- loadFolderIconDefinitions,
21
- loadLanguageIconDefinitions,
22
- setIconOpacity,
23
- setIconSaturation,
24
- validateHEXColorCode,
25
- validateOpacityValue,
26
- validateSaturationValue,
27
- } from './index';
28
-
29
- /**
30
- * Generate the complete icon configuration object that can be written as JSON file.
31
- */
32
- export const generateIconConfigurationObject = (
33
- options: IconJsonOptions
34
- ): IconConfiguration => {
35
- const iconConfig = merge({}, new IconConfiguration(), { options });
36
- const languageIconDefinitions = loadLanguageIconDefinitions(
37
- languageIcons,
38
- iconConfig,
39
- options
40
- );
41
- const fileIconDefinitions = loadFileIconDefinitions(
42
- fileIcons,
43
- iconConfig,
44
- options
45
- );
46
- const folderIconDefinitions = loadFolderIconDefinitions(
47
- folderIcons,
48
- iconConfig,
49
- options
50
- );
51
-
52
- return merge(
53
- {},
54
- languageIconDefinitions,
55
- fileIconDefinitions,
56
- folderIconDefinitions
57
- );
58
- };
59
-
60
- /**
61
- * Create the JSON file that is responsible for the icons in the editor.
62
- * @param updatedConfigs Options that have been changed.
63
- * @param updatedJSONConfig New JSON options that already include the updatedConfigs.
64
- */
65
- export const createIconFile = (
66
- updatedConfigs?: IconJsonOptions,
67
- updatedJSONConfig: IconJsonOptions = {}
68
- ) => {
69
- // override the default options with the new options
70
- const options: IconJsonOptions = merge(
71
- {},
72
- getDefaultIconOptions(),
73
- updatedJSONConfig
74
- );
75
- const json = generateIconConfigurationObject(options);
76
-
77
- // make sure that the folder color, opacity and saturation values are entered correctly
78
- if (
79
- updatedConfigs?.opacity &&
80
- !validateOpacityValue(updatedConfigs?.opacity)
81
- ) {
82
- throw Error('Material Icons: Invalid opacity value!');
83
- }
84
- if (
85
- updatedConfigs?.saturation &&
86
- !validateSaturationValue(updatedConfigs?.saturation)
87
- ) {
88
- throw Error('Material Icons: Invalid saturation value!');
89
- }
90
- if (
91
- updatedConfigs?.folders?.color &&
92
- !validateHEXColorCode(updatedConfigs?.folders?.color)
93
- ) {
94
- throw Error('Material Icons: Invalid folder color value!');
95
- }
96
-
97
- try {
98
- let iconJsonPath = __dirname;
99
- // if executed via script
100
- if (basename(__dirname) !== 'dist') {
101
- iconJsonPath = join(__dirname, '..', '..', '..', 'dist');
102
- }
103
- if (!updatedConfigs || (updatedConfigs.folders || {}).color) {
104
- // if updatedConfigs do not exist (because of initial setup)
105
- // or new config value was detected by the change detection
106
- generateFolderIcons(options.folders?.color);
107
- setIconOpacity(options, [
108
- 'folder.svg',
109
- 'folder-open.svg',
110
- 'folder-root.svg',
111
- 'folder-root-open.svg',
112
- ]);
113
- }
114
- if (!updatedConfigs || updatedConfigs.opacity !== undefined) {
115
- setIconOpacity(options);
116
- }
117
- if (!updatedConfigs || updatedConfigs.saturation !== undefined) {
118
- setIconSaturation(options);
119
- }
120
- renameIconFiles(iconJsonPath, options);
121
- } catch (error) {
122
- throw new Error('Failed to update icons: ' + error);
123
- }
124
-
125
- try {
126
- let iconJsonPath = __dirname;
127
- // if executed via script
128
- if (basename(__dirname) !== 'dist') {
129
- iconJsonPath = join(__dirname, '..', '..', '..', 'dist');
130
- }
131
- writeFileSync(
132
- join(iconJsonPath, iconJsonName),
133
- JSON.stringify(json, undefined, 2),
134
- 'utf-8'
135
- );
136
- } catch (error) {
137
- throw new Error('Failed to create icon file: ' + error);
138
- }
139
-
140
- return iconJsonName;
141
- };
142
-
143
- /**
144
- * The options control the generator and decide which icons are disabled or not.
145
- */
146
- export const getDefaultIconOptions = (): Required<IconJsonOptions> => ({
147
- folders: {
148
- theme: 'specific',
149
- color: '#90a4ae',
150
- associations: {},
151
- },
152
- activeIconPack: 'angular',
153
- hidesExplorerArrows: false,
154
- opacity: 1,
155
- saturation: 1,
156
- files: { associations: {} },
157
- languages: { associations: {} },
158
- });
159
-
160
- /**
161
- * Rename all icon files according their respective config
162
- * @param iconJsonPath Path of icon json folder
163
- * @param options Icon Json Options
164
- */
165
- const renameIconFiles = (iconJsonPath: string, options: IconJsonOptions) => {
166
- const customPaths = getCustomIconPaths(options);
167
- const defaultIconPath = join(iconJsonPath, '..', 'icons');
168
- const iconPaths = [defaultIconPath, ...customPaths];
169
-
170
- iconPaths.forEach((iconPath) => {
171
- readdirSync(iconPath)
172
- .filter((f) => f.match(/\.svg/gi))
173
- .forEach((f) => {
174
- const filePath = join(iconPath, f);
175
- const fileConfigHash = getFileConfigHash(options);
176
-
177
- // append file config to file name
178
- const newFilePath = join(
179
- iconPath,
180
- f.replace(/(^[^\.~]+)(.*)\.svg/, `$1${fileConfigHash}.svg`)
181
- );
182
-
183
- // if generated files are already in place, do not overwrite them
184
- if (filePath !== newFilePath && existsSync(newFilePath)) {
185
- unlinkSync(filePath);
186
- } else {
187
- renameSync(filePath, newFilePath);
188
- }
189
- });
190
- });
191
- };
@@ -1,127 +0,0 @@
1
- import merge from 'lodash.merge';
2
- import { getFileConfigHash } from '../../helpers/fileConfig';
3
- import {
4
- DefaultIcon,
5
- IconAssociations,
6
- IconConfiguration,
7
- IconJsonOptions,
8
- LanguageIcon,
9
- } from '../../models/index';
10
- import {
11
- highContrastColorFileEnding,
12
- iconFolderPath,
13
- lightColorFileEnding,
14
- } from './constants';
15
-
16
- /**
17
- * Get all file icons that can be used in this theme.
18
- */
19
- export const loadLanguageIconDefinitions = (
20
- languages: LanguageIcon[],
21
- config: IconConfiguration,
22
- options: IconJsonOptions
23
- ): IconConfiguration => {
24
- config = merge({}, config);
25
- const enabledLanguages = disableLanguagesByPack(
26
- languages,
27
- options.activeIconPack
28
- );
29
- const customIcons = getCustomIcons(options.languages?.associations);
30
- const allLanguageIcons = [...enabledLanguages, ...customIcons];
31
-
32
- allLanguageIcons.forEach((lang) => {
33
- if (lang.disabled) return;
34
- config = setIconDefinitions(config, lang.icon);
35
- config = merge(
36
- {},
37
- config,
38
- setLanguageIdentifiers(lang.icon.name, lang.ids)
39
- );
40
- config.light = lang.icon.light
41
- ? merge(
42
- {},
43
- config.light,
44
- setLanguageIdentifiers(
45
- lang.icon.name + lightColorFileEnding,
46
- lang.ids
47
- )
48
- )
49
- : config.light;
50
- config.highContrast = lang.icon.highContrast
51
- ? merge(
52
- {},
53
- config.highContrast,
54
- setLanguageIdentifiers(
55
- lang.icon.name + highContrastColorFileEnding,
56
- lang.ids
57
- )
58
- )
59
- : config.highContrast;
60
- });
61
-
62
- return config;
63
- };
64
-
65
- const setIconDefinitions = (config: IconConfiguration, icon: DefaultIcon) => {
66
- config = merge({}, config);
67
- config = createIconDefinitions(config, icon.name);
68
- config = merge(
69
- {},
70
- config,
71
- icon.light
72
- ? createIconDefinitions(config, icon.name + lightColorFileEnding)
73
- : config.light
74
- );
75
- config = merge(
76
- {},
77
- config,
78
- icon.highContrast
79
- ? createIconDefinitions(config, icon.name + highContrastColorFileEnding)
80
- : config.highContrast
81
- );
82
- return config;
83
- };
84
-
85
- const createIconDefinitions = (config: IconConfiguration, iconName: string) => {
86
- config = merge({}, config);
87
- const fileConfigHash = getFileConfigHash(config.options ?? {});
88
- if (config.iconDefinitions) {
89
- config.iconDefinitions[iconName] = {
90
- iconPath: `${iconFolderPath}${iconName}${fileConfigHash}.svg`,
91
- };
92
- }
93
- return config;
94
- };
95
-
96
- const setLanguageIdentifiers = (iconName: string, languageIds: string[]) => {
97
- const obj: Partial<IconConfiguration> = { languageIds: {} };
98
- languageIds.forEach((id) => {
99
- obj.languageIds![id as keyof IconConfiguration] = iconName;
100
- });
101
- return obj;
102
- };
103
-
104
- const getCustomIcons = (languageAssociations: IconAssociations | undefined) => {
105
- if (!languageAssociations) return [];
106
-
107
- const icons: LanguageIcon[] = Object.keys(languageAssociations).map((fa) => ({
108
- icon: { name: languageAssociations[fa].toLowerCase() },
109
- ids: [fa.toLowerCase()],
110
- }));
111
-
112
- return icons;
113
- };
114
-
115
- /**
116
- * Disable all file icons that are in a pack which is disabled.
117
- */
118
- const disableLanguagesByPack = (
119
- languageIcons: LanguageIcon[],
120
- activatedIconPack: string | undefined
121
- ) => {
122
- return languageIcons.filter((language) => {
123
- return !language.enabledFor
124
- ? true
125
- : language.enabledFor.some((p) => p === activatedIconPack);
126
- });
127
- };
@@ -1,4 +0,0 @@
1
- export * from './generator';
2
- export * from './fileIcons';
3
- export * from './folderIcons';
4
- export * from './languageIcons';
@@ -1,144 +0,0 @@
1
- import { LanguageIcon } from '../models';
2
-
3
- /**
4
- * Defines icons for language ids
5
- */
6
- export const languageIcons: LanguageIcon[] = [
7
- { icon: { name: 'git' }, ids: ['git', 'git-commit', 'git-rebase', 'ignore'] },
8
- { icon: { name: 'yaml' }, ids: ['yaml'] },
9
- { icon: { name: 'xml' }, ids: ['xml', 'xquery', 'xsl'] },
10
- { icon: { name: 'matlab' }, ids: ['matlab'] },
11
- {
12
- icon: { name: 'settings' },
13
- ids: ['makefile', 'toml', 'ini', 'properties'],
14
- },
15
- { icon: { name: 'shaderlab' }, ids: ['shaderlab'] },
16
- { icon: { name: 'diff' }, ids: ['diff'] },
17
- { icon: { name: 'json' }, ids: ['json', 'jsonc', 'json5'] },
18
- { icon: { name: 'blink' }, ids: ['blink'] },
19
- { icon: { name: 'java' }, ids: ['java'] },
20
- { icon: { name: 'razor' }, ids: ['razor', 'aspnetcorerazor'] },
21
- { icon: { name: 'python' }, ids: ['python'] },
22
- { icon: { name: 'javascript' }, ids: ['javascript'] },
23
- { icon: { name: 'typescript' }, ids: ['typescript'] },
24
- { icon: { name: 'scala' }, ids: ['scala'] },
25
- { icon: { name: 'handlebars' }, ids: ['handlebars'] },
26
- { icon: { name: 'perl' }, ids: ['perl', 'perl6'] },
27
- { icon: { name: 'haxe' }, ids: ['haxe', 'hxml'] },
28
- { icon: { name: 'puppet' }, ids: ['puppet'] },
29
- { icon: { name: 'elixir' }, ids: ['elixir'] },
30
- { icon: { name: 'livescript' }, ids: ['livescript'] },
31
- { icon: { name: 'erlang' }, ids: ['erlang'] },
32
- { icon: { name: 'twig' }, ids: ['twig'] },
33
- { icon: { name: 'julia' }, ids: ['julia'] },
34
- { icon: { name: 'elm' }, ids: ['elm'] },
35
- { icon: { name: 'purescript' }, ids: ['purescript'] },
36
- { icon: { name: 'stylus' }, ids: ['stylus'] },
37
- { icon: { name: 'nunjucks' }, ids: ['nunjucks'] },
38
- { icon: { name: 'pug' }, ids: ['pug'] },
39
- { icon: { name: 'robot' }, ids: ['robotframework'] },
40
- { icon: { name: 'sass' }, ids: ['sass', 'scss'] },
41
- { icon: { name: 'less' }, ids: ['less'] },
42
- { icon: { name: 'css' }, ids: ['css'] },
43
- { icon: { name: 'visualstudio' }, ids: ['testOutput', 'vb'] },
44
- { icon: { name: 'angular' }, ids: ['ng-template'] },
45
- { icon: { name: 'graphql' }, ids: ['graphql'] },
46
- { icon: { name: 'solidity' }, ids: ['solidity'] },
47
- { icon: { name: 'autoit' }, ids: ['autoit'] },
48
- { icon: { name: 'haml' }, ids: ['haml'] },
49
- { icon: { name: 'yang' }, ids: ['yang'] },
50
- { icon: { name: 'terraform' }, ids: ['terraform'] },
51
- { icon: { name: 'applescript' }, ids: ['applescript'] },
52
- { icon: { name: 'cake' }, ids: ['cake'] },
53
- { icon: { name: 'cucumber' }, ids: ['cucumber'] },
54
- { icon: { name: 'nim' }, ids: ['nim', 'nimble'] },
55
- { icon: { name: 'apiblueprint' }, ids: ['apiblueprint'] },
56
- { icon: { name: 'riot' }, ids: ['riot'] },
57
- { icon: { name: 'postcss' }, ids: ['postcss'] },
58
- { icon: { name: 'coldfusion' }, ids: ['lang-cfml'] },
59
- { icon: { name: 'haskell' }, ids: ['haskell'] },
60
- { icon: { name: 'dhall' }, ids: ['dhall'] },
61
- { icon: { name: 'cabal' }, ids: ['cabal'] },
62
- { icon: { name: 'nix' }, ids: ['nix'] },
63
- { icon: { name: 'ruby' }, ids: ['ruby'] },
64
- { icon: { name: 'slim' }, ids: ['slim'] },
65
- { icon: { name: 'php' }, ids: ['php'] },
66
- { icon: { name: 'php_elephant' }, ids: [] },
67
- { icon: { name: 'php_elephant_pink' }, ids: [] },
68
- { icon: { name: 'hack' }, ids: ['hack'] },
69
- { icon: { name: 'react' }, ids: ['javascriptreact'] },
70
- { icon: { name: 'mjml' }, ids: ['mjml'] },
71
- { icon: { name: 'processing' }, ids: ['processing'] },
72
- { icon: { name: 'hcl' }, ids: ['hcl'] },
73
- { icon: { name: 'go' }, ids: ['go'] },
74
- { icon: { name: 'go_gopher' }, ids: [] },
75
- { icon: { name: 'nodejs_alt' }, ids: [] },
76
- { icon: { name: 'django' }, ids: ['django-html', 'django-txt'] },
77
- { icon: { name: 'html' }, ids: ['html'] },
78
- { icon: { name: 'godot' }, ids: ['gdscript'] },
79
- { icon: { name: 'godot-assets' }, ids: ['gdresource', 'gdshader'] },
80
- { icon: { name: 'vim' }, ids: ['viml'] },
81
- { icon: { name: 'silverstripe' }, ids: [] },
82
- { icon: { name: 'prolog' }, ids: ['prolog'] },
83
- { icon: { name: 'pawn' }, ids: ['pawn'] },
84
- { icon: { name: 'reason' }, ids: ['reason', 'reason_lisp'] },
85
- { icon: { name: 'sml' }, ids: ['sml'] },
86
- { icon: { name: 'tex' }, ids: ['tex', 'doctex', 'latex', 'latex-expl3'] },
87
- { icon: { name: 'salesforce' }, ids: ['apex'] },
88
- { icon: { name: 'sas' }, ids: ['sas'] },
89
- { icon: { name: 'docker' }, ids: ['dockerfile'] },
90
- { icon: { name: 'table' }, ids: ['csv', 'tsv', 'psv'] },
91
- { icon: { name: 'csharp' }, ids: ['csharp'] },
92
- { icon: { name: 'console' }, ids: ['bat', 'awk', 'shellscript'] },
93
- { icon: { name: 'c' }, ids: ['c'] },
94
- { icon: { name: 'cpp' }, ids: ['cpp'] },
95
- { icon: { name: 'objective-c' }, ids: ['objective-c'] },
96
- { icon: { name: 'objective-cpp' }, ids: ['objective-cpp'] },
97
- { icon: { name: 'coffee' }, ids: ['coffeescript'] },
98
- { icon: { name: 'fsharp' }, ids: ['fsharp'] },
99
- { icon: { name: 'editorconfig' }, ids: ['editorconfig'] },
100
- { icon: { name: 'clojure' }, ids: ['clojure'] },
101
- { icon: { name: 'groovy' }, ids: ['groovy'] },
102
- { icon: { name: 'markdown' }, ids: ['markdown'] },
103
- { icon: { name: 'jinja' }, ids: ['jinja'] },
104
- { icon: { name: 'proto' }, ids: ['proto'] },
105
- { icon: { name: 'python-misc' }, ids: ['pip-requirements'] },
106
- { icon: { name: 'vue' }, ids: ['vue', 'vue-postcss', 'vue-html'] },
107
- { icon: { name: 'lua' }, ids: ['lua'] },
108
- { icon: { name: 'lib' }, ids: ['bibtex', 'bibtex-style'] },
109
- { icon: { name: 'log' }, ids: ['log'] },
110
- { icon: { name: 'jupyter' }, ids: ['jupyter'] },
111
- { icon: { name: 'document' }, ids: ['plaintext'] },
112
- { icon: { name: 'pdf' }, ids: ['pdf'] },
113
- { icon: { name: 'powershell' }, ids: ['powershell'] },
114
- { icon: { name: 'pug' }, ids: ['jade'] },
115
- { icon: { name: 'r' }, ids: ['r', 'rsweave'] },
116
- { icon: { name: 'rust' }, ids: ['rust'] },
117
- { icon: { name: 'database' }, ids: ['sql'] },
118
- { icon: { name: 'kusto' }, ids: ['kql'] },
119
- { icon: { name: 'lock' }, ids: ['ssh_config'] },
120
- { icon: { name: 'svg' }, ids: ['svg'] },
121
- { icon: { name: 'swift' }, ids: ['swift'] },
122
- { icon: { name: 'react_ts' }, ids: ['typescriptreact'] },
123
- { icon: { name: 'search' }, ids: ['search-result'] },
124
- { icon: { name: 'minecraft' }, ids: ['mcfunction'] },
125
- { icon: { name: 'rescript' }, ids: ['rescript'] },
126
- { icon: { name: 'otne' }, ids: ['otne'] },
127
- {
128
- icon: { name: 'twine' },
129
- ids: ['twee3', 'twee3-harlowe-3', 'twee3-chapbook-1', 'twee3-sugarcube-2'],
130
- },
131
- { icon: { name: 'grain' }, ids: ['grain'] },
132
- { icon: { name: 'lolcode' }, ids: ['lolcode'] },
133
- { icon: { name: 'idris' }, ids: ['idris'] },
134
- { icon: { name: 'chess' }, ids: ['pgn'] },
135
- { icon: { name: 'gemini' }, ids: ['gemini', 'text-gemini'] },
136
- { icon: { name: 'vlang' }, ids: ['v'] },
137
- { icon: { name: 'wolframlanguage' }, ids: ['wolfram'] },
138
- { icon: { name: 'shader' }, ids: ['hlsl', 'glsl', 'wgsl'] },
139
- { icon: { name: 'tree' }, ids: ['tree'] },
140
- { icon: { name: 'svelte' }, ids: ['svelte'] },
141
- { icon: { name: 'dart' }, ids: ['dart'] },
142
- { icon: { name: 'cadence' }, ids: ['cadence'] },
143
- { icon: { name: 'stylable' }, ids: ['stylable'] },
144
- ];
@@ -1 +0,0 @@
1
- export * from './translation';
@@ -1,41 +0,0 @@
1
- export interface Translation {
2
- activate: string;
3
- activated: string;
4
- iconPacks: {
5
- selectPack: string;
6
- description: string;
7
- disabled: string;
8
- };
9
- folders: {
10
- toggleIcons: string;
11
- color: string;
12
- hexCode: string;
13
- wrongHexCode: string;
14
- disabled: string;
15
- theme: {
16
- description: string;
17
- };
18
- };
19
- opacity: {
20
- inputPlaceholder: string;
21
- wrongValue: string;
22
- };
23
- toggleSwitch: {
24
- on: string;
25
- off: string;
26
- };
27
- explorerArrows: {
28
- toggle: string;
29
- enable: string;
30
- disable: string;
31
- };
32
- grayscale: {
33
- toggle: string;
34
- enable: string;
35
- disable: string;
36
- };
37
- saturation: {
38
- inputPlaceholder: string;
39
- wrongValue: string;
40
- };
41
- }