@iconify/tools 5.0.5 → 5.0.7
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.
- package/lib/optimise/global-style.js +1 -3
- package/package.json +10 -10
|
@@ -33,6 +33,7 @@ function cleanupGlobalStyle(svg) {
|
|
|
33
33
|
});
|
|
34
34
|
const removeClasses = /* @__PURE__ */ new Set();
|
|
35
35
|
try {
|
|
36
|
+
console.log("Parsing global style");
|
|
36
37
|
parseSVGStyle(svg, (styleItem) => {
|
|
37
38
|
const returnValue = styleItem.value;
|
|
38
39
|
if (styleItem.type !== "global") return returnValue;
|
|
@@ -82,9 +83,6 @@ function cleanupGlobalStyle(svg) {
|
|
|
82
83
|
const tempDataValue = attribs[tempDataAttrbiute];
|
|
83
84
|
const addedAttributes = new Set(typeof tempDataValue === "string" ? splitClassName(tempDataValue) : []);
|
|
84
85
|
const prop = styleItem.prop;
|
|
85
|
-
if (attribs[prop] !== void 0) {
|
|
86
|
-
if (addedAttributes.has(prop)) throw new Error("Duplicate attribute");
|
|
87
|
-
}
|
|
88
86
|
attribs[prop] = styleItem.value;
|
|
89
87
|
addedAttributes.add(prop);
|
|
90
88
|
attribs[tempDataAttrbiute] = Array.from(addedAttributes).join(" ");
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Collection of functions for cleaning up and parsing SVG for Iconify project",
|
|
5
5
|
"author": "Vjacheslav Trushkin",
|
|
6
|
-
"version": "5.0.
|
|
6
|
+
"version": "5.0.7",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"bugs": "https://github.com/iconify/tools/issues",
|
|
9
9
|
"homepage": "https://github.com/iconify/tools",
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
"module": "./lib/index.js",
|
|
15
15
|
"types": "./lib/index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@cyberalien/svg-utils": "^1.2.
|
|
17
|
+
"@cyberalien/svg-utils": "^1.2.8",
|
|
18
18
|
"@iconify/types": "^2.0.0",
|
|
19
19
|
"@iconify/utils": "^3.1.0",
|
|
20
20
|
"fflate": "^0.8.2",
|
|
21
|
-
"modern-tar": "^0.7.
|
|
21
|
+
"modern-tar": "^0.7.6",
|
|
22
22
|
"pathe": "^2.0.3",
|
|
23
23
|
"svgo": "^4.0.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@eslint/eslintrc": "^3.3.
|
|
27
|
-
"@eslint/js": "^9.39.
|
|
26
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
27
|
+
"@eslint/js": "^9.39.4",
|
|
28
28
|
"@types/jest": "^30.0.0",
|
|
29
|
-
"@types/node": "^24.
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
31
|
-
"@typescript-eslint/parser": "^8.
|
|
29
|
+
"@types/node": "^24.12.0",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^8.57.2",
|
|
31
|
+
"@typescript-eslint/parser": "^8.57.2",
|
|
32
32
|
"cross-env": "^10.1.0",
|
|
33
|
-
"eslint": "^9.39.
|
|
33
|
+
"eslint": "^9.39.4",
|
|
34
34
|
"eslint-config-prettier": "^10.1.8",
|
|
35
35
|
"eslint-plugin-prettier": "^5.5.5",
|
|
36
36
|
"globals": "^16.5.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"rimraf": "^6.1.3",
|
|
39
39
|
"tsdown": "^0.20.3",
|
|
40
40
|
"typescript": "^5.9.3",
|
|
41
|
-
"vitest": "^4.
|
|
41
|
+
"vitest": "^4.1.2"
|
|
42
42
|
},
|
|
43
43
|
"exports": {
|
|
44
44
|
"./*": "./*",
|