@iconify/tools 4.0.3 → 4.0.5
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/colors/parse.d.cts +1 -0
- package/lib/colors/parse.d.mts +1 -0
- package/lib/colors/parse.d.ts +1 -0
- package/lib/colors/validate.d.cts +1 -0
- package/lib/colors/validate.d.mts +1 -0
- package/lib/colors/validate.d.ts +1 -0
- package/lib/import/figma/nodes.cjs +1 -1
- package/lib/import/figma/nodes.mjs +1 -1
- package/lib/import/figma/types/nodes.d.cts +1 -1
- package/lib/import/figma/types/nodes.d.mts +1 -1
- package/lib/import/figma/types/nodes.d.ts +1 -1
- package/lib/index.d.cts +1 -0
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/misc/cheerio.d.cts +4 -3
- package/lib/misc/cheerio.d.mts +4 -3
- package/lib/misc/cheerio.d.ts +4 -3
- package/lib/svg/analyse/error.d.cts +1 -0
- package/lib/svg/analyse/error.d.mts +1 -0
- package/lib/svg/analyse/error.d.ts +1 -0
- package/lib/svg/analyse/types.d.cts +1 -0
- package/lib/svg/analyse/types.d.mts +1 -0
- package/lib/svg/analyse/types.d.ts +1 -0
- package/lib/svg/analyse.d.cts +1 -0
- package/lib/svg/analyse.d.mts +1 -0
- package/lib/svg/analyse.d.ts +1 -0
- package/lib/svg/index.cjs +1 -0
- package/lib/svg/index.mjs +1 -0
- package/lib/svg/parse-style.d.cts +1 -0
- package/lib/svg/parse-style.d.mts +1 -0
- package/lib/svg/parse-style.d.ts +1 -0
- package/lib/svg/parse.d.cts +1 -0
- package/lib/svg/parse.d.mts +1 -0
- package/lib/svg/parse.d.ts +1 -0
- package/package.json +13 -12
package/lib/colors/parse.d.cts
CHANGED
package/lib/colors/parse.d.mts
CHANGED
package/lib/colors/parse.d.ts
CHANGED
package/lib/colors/validate.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import '../../../svg/index.cjs';
|
|
|
8
8
|
import 'cheerio';
|
|
9
9
|
import '@iconify/utils/lib/icon-set/tree';
|
|
10
10
|
|
|
11
|
-
type FigmaImportParentNodeType = 'CANVAS' | 'FRAME' | 'GROUP' | 'SECTION' | '
|
|
11
|
+
type FigmaImportParentNodeType = 'CANVAS' | 'FRAME' | 'GROUP' | 'SECTION' | 'COMPONENT_SET';
|
|
12
12
|
type FigmaImportIconNodeType = IconFigmaNode['type'];
|
|
13
13
|
/**
|
|
14
14
|
* Node information passed to callback
|
|
@@ -8,7 +8,7 @@ import '../../../svg/index.mjs';
|
|
|
8
8
|
import 'cheerio';
|
|
9
9
|
import '@iconify/utils/lib/icon-set/tree';
|
|
10
10
|
|
|
11
|
-
type FigmaImportParentNodeType = 'CANVAS' | 'FRAME' | 'GROUP' | 'SECTION' | '
|
|
11
|
+
type FigmaImportParentNodeType = 'CANVAS' | 'FRAME' | 'GROUP' | 'SECTION' | 'COMPONENT_SET';
|
|
12
12
|
type FigmaImportIconNodeType = IconFigmaNode['type'];
|
|
13
13
|
/**
|
|
14
14
|
* Node information passed to callback
|
|
@@ -8,7 +8,7 @@ import '../../../svg/index.js';
|
|
|
8
8
|
import 'cheerio';
|
|
9
9
|
import '@iconify/utils/lib/icon-set/tree';
|
|
10
10
|
|
|
11
|
-
type FigmaImportParentNodeType = 'CANVAS' | 'FRAME' | 'GROUP' | 'SECTION' | '
|
|
11
|
+
type FigmaImportParentNodeType = 'CANVAS' | 'FRAME' | 'GROUP' | 'SECTION' | 'COMPONENT_SET';
|
|
12
12
|
type FigmaImportIconNodeType = IconFigmaNode['type'];
|
|
13
13
|
/**
|
|
14
14
|
* Node information passed to callback
|
package/lib/index.d.cts
CHANGED
|
@@ -55,6 +55,7 @@ import 'cheerio';
|
|
|
55
55
|
import '@iconify/types';
|
|
56
56
|
import '@iconify/utils/lib/customisations/defaults';
|
|
57
57
|
import './misc/cheerio.cjs';
|
|
58
|
+
import 'domhandler';
|
|
58
59
|
import './css/parser/types.cjs';
|
|
59
60
|
import './svg/analyse/types.cjs';
|
|
60
61
|
import './icon-set/types.cjs';
|
package/lib/index.d.mts
CHANGED
|
@@ -55,6 +55,7 @@ import 'cheerio';
|
|
|
55
55
|
import '@iconify/types';
|
|
56
56
|
import '@iconify/utils/lib/customisations/defaults';
|
|
57
57
|
import './misc/cheerio.mjs';
|
|
58
|
+
import 'domhandler';
|
|
58
59
|
import './css/parser/types.mjs';
|
|
59
60
|
import './svg/analyse/types.mjs';
|
|
60
61
|
import './icon-set/types.mjs';
|
package/lib/index.d.ts
CHANGED
package/lib/misc/cheerio.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Element } from 'domhandler';
|
|
2
|
+
import { Cheerio } from 'cheerio';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Shortcuts for Cheerio elements
|
|
5
6
|
*/
|
|
6
|
-
type CheerioElement =
|
|
7
|
-
type WrappedCheerioElement =
|
|
7
|
+
type CheerioElement = Element;
|
|
8
|
+
type WrappedCheerioElement = Cheerio<CheerioElement>;
|
|
8
9
|
|
|
9
10
|
export type { CheerioElement, WrappedCheerioElement };
|
package/lib/misc/cheerio.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Element } from 'domhandler';
|
|
2
|
+
import { Cheerio } from 'cheerio';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Shortcuts for Cheerio elements
|
|
5
6
|
*/
|
|
6
|
-
type CheerioElement =
|
|
7
|
-
type WrappedCheerioElement =
|
|
7
|
+
type CheerioElement = Element;
|
|
8
|
+
type WrappedCheerioElement = Cheerio<CheerioElement>;
|
|
8
9
|
|
|
9
10
|
export type { CheerioElement, WrappedCheerioElement };
|
package/lib/misc/cheerio.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Element } from 'domhandler';
|
|
2
|
+
import { Cheerio } from 'cheerio';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Shortcuts for Cheerio elements
|
|
5
6
|
*/
|
|
6
|
-
type CheerioElement =
|
|
7
|
-
type WrappedCheerioElement =
|
|
7
|
+
type CheerioElement = Element;
|
|
8
|
+
type WrappedCheerioElement = Cheerio<CheerioElement>;
|
|
8
9
|
|
|
9
10
|
export type { CheerioElement, WrappedCheerioElement };
|
package/lib/svg/analyse.d.cts
CHANGED
package/lib/svg/analyse.d.mts
CHANGED
package/lib/svg/analyse.d.ts
CHANGED
package/lib/svg/index.cjs
CHANGED
|
@@ -136,6 +136,7 @@ class SVG {
|
|
|
136
136
|
remove('xml:space="preserve"', "", "");
|
|
137
137
|
content = content.replace(/<g>\s*<\/g>/g, "");
|
|
138
138
|
this.$svg = cheerio__namespace.load(content.trim(), {
|
|
139
|
+
// @ts-expect-error Legacy attribute, kept because Cheerio types are a mess
|
|
139
140
|
lowerCaseAttributeNames: false,
|
|
140
141
|
xmlMode: true
|
|
141
142
|
});
|
package/lib/svg/index.mjs
CHANGED
|
@@ -120,6 +120,7 @@ class SVG {
|
|
|
120
120
|
remove('xml:space="preserve"', "", "");
|
|
121
121
|
content = content.replace(/<g>\s*<\/g>/g, "");
|
|
122
122
|
this.$svg = cheerio.load(content.trim(), {
|
|
123
|
+
// @ts-expect-error Legacy attribute, kept because Cheerio types are a mess
|
|
123
124
|
lowerCaseAttributeNames: false,
|
|
124
125
|
xmlMode: true
|
|
125
126
|
});
|
package/lib/svg/parse-style.d.ts
CHANGED
package/lib/svg/parse.d.cts
CHANGED
package/lib/svg/parse.d.mts
CHANGED
package/lib/svg/parse.d.ts
CHANGED
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": "4.0.
|
|
6
|
+
"version": "4.0.5",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"bugs": "https://github.com/iconify/tools/issues",
|
|
9
9
|
"homepage": "https://github.com/iconify/tools",
|
|
@@ -16,30 +16,31 @@
|
|
|
16
16
|
"types": "./lib/index.d.ts",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@iconify/types": "^2.0.0",
|
|
19
|
-
"@iconify/utils": "^2.1.
|
|
20
|
-
"@types/tar": "^6.1.
|
|
21
|
-
"axios": "^1.
|
|
22
|
-
"cheerio": "1.0.0
|
|
19
|
+
"@iconify/utils": "^2.1.29",
|
|
20
|
+
"@types/tar": "^6.1.13",
|
|
21
|
+
"axios": "^1.7.3",
|
|
22
|
+
"cheerio": "1.0.0",
|
|
23
|
+
"domhandler": "^5.0.3",
|
|
23
24
|
"extract-zip": "^2.0.1",
|
|
24
25
|
"local-pkg": "^0.5.0",
|
|
25
26
|
"pathe": "^1.1.2",
|
|
26
|
-
"svgo": "^3.2
|
|
27
|
+
"svgo": "^3.3.2",
|
|
27
28
|
"tar": "^6.2.1"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@types/jest": "^29.5.12",
|
|
31
|
-
"@types/node": "^20.
|
|
32
|
+
"@types/node": "^20.14.14",
|
|
32
33
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
33
34
|
"@typescript-eslint/parser": "^6.21.0",
|
|
34
35
|
"cross-env": "^7.0.3",
|
|
35
36
|
"eslint": "^8.57.0",
|
|
36
37
|
"eslint-config-prettier": "^9.1.0",
|
|
37
|
-
"eslint-plugin-prettier": "^5.1
|
|
38
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
38
39
|
"jest": "^29.7.0",
|
|
39
|
-
"prettier": "^3.
|
|
40
|
-
"rimraf": "^
|
|
41
|
-
"ts-jest": "^29.
|
|
42
|
-
"typescript": "^5.4
|
|
40
|
+
"prettier": "^3.3.3",
|
|
41
|
+
"rimraf": "^6.0.1",
|
|
42
|
+
"ts-jest": "^29.2.4",
|
|
43
|
+
"typescript": "^5.5.4",
|
|
43
44
|
"unbuild": "^2.0.0"
|
|
44
45
|
},
|
|
45
46
|
"exports": {
|