diff --git a/.svgo.config.js b/.svgo.config.js
index e2abffbd..492f6874 100644
--- a/.svgo.config.js
+++ b/.svgo.config.js
@@ -1,55 +1,40 @@
/**
* SVGO Configuration
+ * Compatible to v2.4.0+
* Recommended options from:
* https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
*/
-const { extendDefaultPlugins } = require( 'svgo' );
module.exports = {
- multipass: true,
- plugins: extendDefaultPlugins( [
+ plugins: [
{
- name: 'cleanupIDs',
- active: false
+ // Set of built-in plugins enabled by default.
+ name: 'preset-default',
+ params: {
+ overrides: {
+ cleanupIDs: false,
+ removeDesc: false,
+ removeTitle: false,
+ removeViewBox: false,
+ // If the SVG doesn't start with an XML declaration, then its MIME type will
+ // be detected as "text/plain" rather than "image/svg+xml" by libmagic and,
+ // consequently, MediaWiki's CSSMin CSS minifier. libmagic's default database
+ // currently requires that SVGs contain an XML declaration:
+ // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5
+ removeXMLProcInst: false
+ }
+ }
},
- {
- name: 'removeDesc',
- active: false
- },
- {
- name: 'removeRasterImages',
- active: true
- },
- {
- name: 'removeTitle',
- active: false
- },
- {
- name: 'removeViewBox',
- active: false
- },
- {
- // If the SVG doesn't start with an XML declaration, then its MIME type will
- // be detected as "text/plain" rather than "image/svg+xml" by libmagic and,
- // consequently, MediaWiki's CSSMin CSS minifier. libmagic's default database
- // currently requires that SVGs contain an XML declaration:
- // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5
- name: 'removeXMLProcInst',
- active: false
- },
- {
- name: 'sortAttrs',
- active: true
- }
- ] ),
-
- // Configure the indent (default 4 spaces) used by `--pretty` here:
- // @see https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
- //
- // Unfortunately EOL cannot be configured, SVGO uses the platform's EOL marker.
- // On non-unix systems the linebreaks will be normalized to LF (unix) only at git commit,
- // assuming `core.autocrlf` is 'true' (default) or 'input'.
+ 'removeRasterImages',
+ 'sortAttrs'
+ ],
+ // Set whitespace according to Wikimedia Coding Conventions.
+ // @see https://github.com/svg/svgo/blob/v2.8.0/lib/stringifier.js#L41 for available options.
js2svg: {
- indent: "\t",
- pretty: true,
- }
-}
+ eol: 'lf',
+ finalNewline: true,
+ // Configure the indent to tabs (default 4 spaces) used by `--pretty` here.
+ indent: '\t',
+ pretty: true
+ },
+ multipass: true
+};
diff --git a/package-lock.json b/package-lock.json
index c3785069..f0cadc0f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -28,7 +28,7 @@
"node-fetch": "2.6.1",
"pre-commit": "1.2.2",
"stylelint-config-wikimedia": "0.11.1",
- "svgo": "2.3.1",
+ "svgo": "2.8.0",
"typescript": "4.5.5",
"vue": "2.6.11",
"vue-jest": "3.0.7"
@@ -3132,9 +3132,9 @@
}
},
"node_modules/@trysound/sax": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.1.1.tgz",
- "integrity": "sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==",
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz",
+ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==",
"dev": true,
"engines": {
"node": ">=10.13.0"
@@ -22243,17 +22243,17 @@
"dev": true
},
"node_modules/svgo": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.3.1.tgz",
- "integrity": "sha512-riDDIQgXpEnn0BEl9Gvhh1LNLIyiusSpt64IR8upJu7MwxnzetmF/Y57pXQD2NMX2lVyMRzXt5f2M5rO4wG7Dw==",
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz",
+ "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==",
"dev": true,
"dependencies": {
- "@trysound/sax": "0.1.1",
- "chalk": "^4.1.0",
- "commander": "^7.1.0",
+ "@trysound/sax": "0.2.0",
+ "commander": "^7.2.0",
"css-select": "^4.1.3",
- "css-tree": "^1.1.2",
+ "css-tree": "^1.1.3",
"csso": "^4.2.0",
+ "picocolors": "^1.0.0",
"stable": "^0.1.8"
},
"bin": {
@@ -22263,55 +22263,6 @@
"node": ">=10.13.0"
}
},
- "node_modules/svgo/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/svgo/node_modules/chalk": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
- "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/svgo/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/svgo/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"node_modules/svgo/node_modules/commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
@@ -22413,15 +22364,6 @@
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
- "node_modules/svgo/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/svgo/node_modules/nth-check": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz",
@@ -22434,18 +22376,6 @@
"url": "https://github.com/fb55/nth-check?sponsor=1"
}
},
- "node_modules/svgo/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/symbol-tree": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
@@ -27097,9 +27027,9 @@
"dev": true
},
"@trysound/sax": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.1.1.tgz",
- "integrity": "sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==",
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz",
+ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==",
"dev": true
},
"@types/anymatch": {
@@ -42386,54 +42316,20 @@
"dev": true
},
"svgo": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.3.1.tgz",
- "integrity": "sha512-riDDIQgXpEnn0BEl9Gvhh1LNLIyiusSpt64IR8upJu7MwxnzetmF/Y57pXQD2NMX2lVyMRzXt5f2M5rO4wG7Dw==",
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz",
+ "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==",
"dev": true,
"requires": {
- "@trysound/sax": "0.1.1",
- "chalk": "^4.1.0",
- "commander": "^7.1.0",
+ "@trysound/sax": "0.2.0",
+ "commander": "^7.2.0",
"css-select": "^4.1.3",
- "css-tree": "^1.1.2",
+ "css-tree": "^1.1.3",
"csso": "^4.2.0",
+ "picocolors": "^1.0.0",
"stable": "^0.1.8"
},
"dependencies": {
- "ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
- "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
"commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
@@ -42502,12 +42398,6 @@
"integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
"dev": true
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"nth-check": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz",
@@ -42516,15 +42406,6 @@
"requires": {
"boolbase": "^1.0.0"
}
- },
- "supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
}
}
},
diff --git a/package.json b/package.json
index 5c03ea5e..dcbdf5f9 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"lint:i18n": "banana-checker --requireLowerCase=0 i18n/",
"doc": "jsdoc -c jsdoc.json && npm run build-storybook -s resources/skins.vector.styles",
"build-storybook": "bash dev-scripts/setup-storybook.sh && build-storybook --quiet --loglevel warn -o docs/ui",
- "minify-svg": "svgo --config=.svgo.config.js -q -r -f resources/",
+ "minify-svg": "svgo --config=.svgo.config.js --quiet --recursive --folder resources/",
"pre-commit": "[ \"${PRE_COMMIT:-1}\" -eq 0 ] || npm -s t"
},
"pre-commit": "pre-commit",
@@ -40,7 +40,7 @@
"node-fetch": "2.6.1",
"pre-commit": "1.2.2",
"stylelint-config-wikimedia": "0.11.1",
- "svgo": "2.3.1",
+ "svgo": "2.8.0",
"typescript": "4.5.5",
"vue": "2.6.11",
"vue-jest": "3.0.7"
diff --git a/resources/common/images/arrow-down-invert.svg b/resources/common/images/arrow-down-invert.svg
index a8660fba..64f13d08 100644
--- a/resources/common/images/arrow-down-invert.svg
+++ b/resources/common/images/arrow-down-invert.svg
@@ -1,4 +1,4 @@
diff --git a/resources/common/images/unwatch-icon-hl.svg b/resources/common/images/unwatch-icon-hl.svg
index f9c35551..afaa4571 100644
--- a/resources/common/images/unwatch-icon-hl.svg
+++ b/resources/common/images/unwatch-icon-hl.svg
@@ -6,7 +6,7 @@
-
+
diff --git a/resources/common/images/unwatch-icon.svg b/resources/common/images/unwatch-icon.svg
index fe3f94af..0afaff4f 100644
--- a/resources/common/images/unwatch-icon.svg
+++ b/resources/common/images/unwatch-icon.svg
@@ -9,7 +9,7 @@
-
+