@iconify/json 2.2.71 → 2.2.73
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/collections.json +13 -13
- package/collections.md +13 -13
- package/composer.json +1 -1
- package/dist/index.cjs +1 -1
- package/json/academicons.json +175 -154
- package/json/devicon.json +8 -2
- package/json/healthicons.json +588 -588
- package/json/ion.json +1 -1
- package/json/lucide.json +76 -10
- package/json/material-symbols.json +8 -8
- package/json/nonicons.json +18 -3
- package/json/openmoji.json +7 -2
- package/json/pajamas.json +12 -3
- package/json/tabler.json +58 -4
- package/package.json +9 -9
- package/readme.md +54 -46
package/json/tabler.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"prefix": "tabler",
|
|
3
3
|
"info": {
|
|
4
4
|
"name": "Tabler Icons",
|
|
5
|
-
"total":
|
|
6
|
-
"version": "2.
|
|
5
|
+
"total": 4231,
|
|
6
|
+
"version": "2.21.0",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Paweł Kuna",
|
|
9
9
|
"url": "https://github.com/tabler/tabler-icons"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"category": "General",
|
|
23
23
|
"palette": false
|
|
24
24
|
},
|
|
25
|
-
"lastModified":
|
|
25
|
+
"lastModified": 1685685432,
|
|
26
26
|
"icons": {
|
|
27
27
|
"123": {
|
|
28
28
|
"body": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m3 10l2-2v8m4-8h3a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h3m4-8h2.5A1.5 1.5 0 0 1 21 9.5v1a1.5 1.5 0 0 1-1.5 1.5H18h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5H17\"/>"
|
|
@@ -1132,6 +1132,9 @@
|
|
|
1132
1132
|
"backpack-off": {
|
|
1133
1133
|
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M10 6h3a6 6 0 0 1 6 6v3m-.129 3.872A3 3 0 0 1 16 21H8a3 3 0 0 1-3-3v-6a5.99 5.99 0 0 1 2.285-4.712M10 6V5a2 2 0 1 1 4 0v1\"/><path d=\"M9 21v-4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v4M3 3l18 18\"/></g>"
|
|
1134
1134
|
},
|
|
1135
|
+
"backslash": {
|
|
1136
|
+
"body": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m7 5l10 14\"/>"
|
|
1137
|
+
},
|
|
1135
1138
|
"backspace": {
|
|
1136
1139
|
"body": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9l-5-5a1.5 1.5 0 0 1 0-2l5-5zm-8 4l4 4m0-4l-4 4\"/>"
|
|
1137
1140
|
},
|
|
@@ -4785,7 +4788,7 @@
|
|
|
4785
4788
|
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5 6a7 3 0 1 0 14 0A7 3 0 1 0 5 6\"/><path d=\"M5 6v12c0 1.657 3.134 3 7 3s7-1.343 7-3V6\"/></g>"
|
|
4786
4789
|
},
|
|
4787
4790
|
"cylinder-off": {
|
|
4788
|
-
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5.23 5.233C5.08 5.478 5 5.735 5 6c0 1.131 1.461 2.117 3.62 2.
|
|
4791
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5.23 5.233C5.08 5.478 5 5.735 5 6c0 1.131 1.461 2.117 3.62 2.628m4.357.343C16.381 8.767 19 7.515 19 6c0-1.657-3.134-3-7-3c-1.645 0-3.158.243-4.353.65\"/><path d=\"M5 6v12c0 1.657 3.134 3 7 3c3.245 0 5.974-.946 6.767-2.23M19 15V6M3 3l18 18\"/></g>"
|
|
4789
4792
|
},
|
|
4790
4793
|
"cylinder-plus": {
|
|
4791
4794
|
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5 6a7 3 0 1 0 14 0A7 3 0 1 0 5 6\"/><path d=\"M5 6v12c0 1.657 3.134 3 7 3c.173 0 .345-.003.515-.008M19 12V6m-3 13h6m-3-3v6\"/></g>"
|
|
@@ -9975,6 +9978,54 @@
|
|
|
9975
9978
|
"resize": {
|
|
9976
9979
|
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M4 11v8a1 1 0 0 0 1 1h8M4 6V5a1 1 0 0 1 1-1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1-1 1h-1\"/><path d=\"M4 12h7a1 1 0 0 1 1 1v7\"/></g>"
|
|
9977
9980
|
},
|
|
9981
|
+
"rewind-backward-10": {
|
|
9982
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M7 9L4 6l3-3\"/><path d=\"M15.997 17.918A6.002 6.002 0 0 0 15 6H4m2 8v6m3-4.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0z\"/></g>"
|
|
9983
|
+
},
|
|
9984
|
+
"rewind-backward-15": {
|
|
9985
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M8 20h2a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1H8v-3h3m4 4a6 6 0 1 0 0-12H4m1 8v6\"/><path d=\"M7 9L4 6l3-3\"/></g>"
|
|
9986
|
+
},
|
|
9987
|
+
"rewind-backward-20": {
|
|
9988
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M19.007 16.466A6 6 0 0 0 15 6H4\"/><path d=\"M7 9L4 6l3-3m5 12.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0zM6 14h2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H7a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h2\"/></g>"
|
|
9989
|
+
},
|
|
9990
|
+
"rewind-backward-30": {
|
|
9991
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M19.007 16.466A6 6 0 0 0 15 6H4m8 9.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0zM6 14h1.5a1.5 1.5 0 0 1 0 3H7h.5a1.5 1.5 0 0 1 0 3H6\"/><path d=\"M7 9L4 6l3-3\"/></g>"
|
|
9992
|
+
},
|
|
9993
|
+
"rewind-backward-40": {
|
|
9994
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M19.007 16.466A6 6 0 0 0 15 6H4m8 9.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0zM6 14v2a1 1 0 0 0 1 1h1m1-3v6\"/><path d=\"M7 9L4 6l3-3\"/></g>"
|
|
9995
|
+
},
|
|
9996
|
+
"rewind-backward-5": {
|
|
9997
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M15 18a6 6 0 1 0 0-12H4\"/><path d=\"M7 9L4 6l3-3m1 17h2a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1H8v-3h3\"/></g>"
|
|
9998
|
+
},
|
|
9999
|
+
"rewind-backward-50": {
|
|
10000
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M19.007 16.466A6 6 0 0 0 15 6H4m8 9.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0zM6 20h1.5a1.5 1.5 0 0 0 0-3H6v-3h3\"/><path d=\"M7 9L4 6l3-3\"/></g>"
|
|
10001
|
+
},
|
|
10002
|
+
"rewind-backward-60": {
|
|
10003
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M19.007 16.466A6 6 0 0 0 15 6H4\"/><path d=\"M7 9L4 6l3-3m5 12.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0zM9 14H7a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1H6\"/></g>"
|
|
10004
|
+
},
|
|
10005
|
+
"rewind-forward-10": {
|
|
10006
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m17 9l3-3l-3-3\"/><path d=\"M8 17.918A5.997 5.997 0 0 1 3 12a6 6 0 0 1 6-6h11m-8 8v6m3-4.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0z\"/></g>"
|
|
10007
|
+
},
|
|
10008
|
+
"rewind-forward-15": {
|
|
10009
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m17 9l3-3l-3-3\"/><path d=\"M9 18A6 6 0 1 1 9 6h11m-4 14h2a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1h-2v-3h3m-6 0v6\"/></g>"
|
|
10010
|
+
},
|
|
10011
|
+
"rewind-forward-20": {
|
|
10012
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5.007 16.478A6 6 0 0 1 9 6h11m-5 9.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0z\"/><path d=\"m17 9l3-3l-3-3M9 14h2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h2\"/></g>"
|
|
10013
|
+
},
|
|
10014
|
+
"rewind-forward-30": {
|
|
10015
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5.007 16.478A6 6 0 0 1 9 6h11m-5 9.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0z\"/><path d=\"m17 9l3-3l-3-3M9 14h1.5a1.5 1.5 0 0 1 0 3H10h.5a1.5 1.5 0 0 1 0 3H9\"/></g>"
|
|
10016
|
+
},
|
|
10017
|
+
"rewind-forward-40": {
|
|
10018
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5.007 16.478A6 6 0 0 1 9 6h11m-5 9.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0z\"/><path d=\"m17 9l3-3l-3-3M9 14v2a1 1 0 0 0 1 1h1m1-3v6\"/></g>"
|
|
10019
|
+
},
|
|
10020
|
+
"rewind-forward-5": {
|
|
10021
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M9 18A6 6 0 1 1 9 6h11m-7 14h2a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1h-2v-3h3\"/><path d=\"m17 9l3-3l-3-3\"/></g>"
|
|
10022
|
+
},
|
|
10023
|
+
"rewind-forward-50": {
|
|
10024
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5.007 16.478A6 6 0 0 1 9 6h11m-5 9.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0z\"/><path d=\"m17 9l3-3l-3-3M9 20h1.5a1.5 1.5 0 0 0 0-3H9v-3h3\"/></g>"
|
|
10025
|
+
},
|
|
10026
|
+
"rewind-forward-60": {
|
|
10027
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M5.007 16.478A6 6 0 0 1 9 6h11m-5 9.5v3a1.5 1.5 0 0 0 3 0v-3a1.5 1.5 0 0 0-3 0z\"/><path d=\"m17 9l3-3l-3-3m-5 11h-2a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1H9\"/></g>"
|
|
10028
|
+
},
|
|
9978
10029
|
"ribbon-health": {
|
|
9979
10030
|
"body": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M7 21s9.286-9.841 9.286-13.841a3.864 3.864 0 0 0-1.182-3.008A4.13 4.13 0 0 0 12 3.007A4.13 4.13 0 0 0 8.896 4.15a3.864 3.864 0 0 0-1.182 3.01C7.714 11.16 17 21 17 21\"/>"
|
|
9980
10031
|
},
|
|
@@ -10614,6 +10665,9 @@
|
|
|
10614
10665
|
"skateboard-off": {
|
|
10615
10666
|
"body": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 15a2 2 0 1 0 4 0a2 2 0 1 0-4 0m10 0a2 2 0 0 0 2 2m2-2a2 2 0 0 0-2-2M3 9c0 .552.895 1 2 1h5m4 0h5c1.105 0 2-.448 2-1M3 3l18 18\"/>"
|
|
10616
10667
|
},
|
|
10668
|
+
"skateboarding": {
|
|
10669
|
+
"body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M16 4a1 1 0 1 0 2 0a1 1 0 0 0-2 0M5.5 15H9l.75-1.5M14 19v-5l-2.5-3L14 7\"/><path d=\"m8 8l3-1h4l1 3h3\"/><path fill=\"currentColor\" d=\"M17.5 21a.5.5 0 1 0 0-1a.5.5 0 0 0 0 1z\"/><path d=\"M3 18c0 .552.895 1 2 1h14c1.105 0 2-.448 2-1\"/><path fill=\"currentColor\" d=\"M6.5 21a.5.5 0 1 0 0-1a.5.5 0 0 0 0 1z\"/></g>"
|
|
10670
|
+
},
|
|
10617
10671
|
"skip-back": {
|
|
10618
10672
|
"body": "<g class=\"icon-tabler\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 18V6a2 2 0 0 0-2.75-1.84L9 10.26a2 2 0 0 0 0 3.5l8.25 6.1A2 2 0 0 0 20 18.11\"/><path d=\"M4 20V4\"/></g>",
|
|
10619
10673
|
"hidden": true
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iconify/json",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "Hundreds of open source icon sets in IconifyJSON format",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "2.2.
|
|
5
|
+
"version": "2.2.73",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://iconify.design/icon-sets/",
|
|
8
8
|
"bugs": "https://github.com/iconify/icon-sets/issues",
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@iconify/types": "*",
|
|
53
|
-
"pathe": "^1.
|
|
53
|
+
"pathe": "^1.1.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@types/jest": "^29.2
|
|
57
|
-
"@types/node": "^18.
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
56
|
+
"@types/jest": "^29.5.2",
|
|
57
|
+
"@types/node": "^18.16.16",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
|
59
59
|
"cross-env": "^7.0.3",
|
|
60
|
-
"eslint": "^8.
|
|
61
|
-
"unbuild": "^1.
|
|
62
|
-
"vitest": "^0.
|
|
60
|
+
"eslint": "^8.41.0",
|
|
61
|
+
"unbuild": "^1.2.1",
|
|
62
|
+
"vitest": "^0.31.3"
|
|
63
63
|
}
|
|
64
64
|
}
|
package/readme.md
CHANGED
|
@@ -1,22 +1,36 @@
|
|
|
1
1
|
# Iconify icon sets in JSON format
|
|
2
2
|
|
|
3
|
-
This is collection of
|
|
3
|
+
This is a big collection of open source vector icons, all validated, cleaned up and converted to the same easy to use format.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Even though all icon sets are open source, some icon sets require attribution.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
See [collections.md](./collections.md) for list of icon sets and their licenses.
|
|
8
|
+
|
|
9
|
+
## Validation and clean up
|
|
10
|
+
|
|
11
|
+
All icons have been processed with [Iconify Tools](https://iconify.design/docs/libraries/tools/) to clean them up.
|
|
12
|
+
|
|
13
|
+
Icon parsing process includes:
|
|
14
|
+
|
|
15
|
+
- Very strict validation and clean up. Icons do not contain scripts, even listeners, fonts, raster images, external resources and unknown elements.
|
|
8
16
|
- Colors for monotone icons have been replaced with `currentColor`, making it easy to change icon color by changing text color.
|
|
9
17
|
- Icon content has been optimised to reduce its size.
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
## Maintenance
|
|
20
|
+
|
|
21
|
+
This repository is automatically updated several times a week, so it always contains the latest icons for all icon sets.
|
|
12
22
|
|
|
13
|
-
## Format
|
|
23
|
+
## Format
|
|
14
24
|
|
|
15
|
-
Icon sets are stored in `IconifyJSON` format. TypeScript definition is available in `@iconify/types` package. Documentation is [available on Iconify Documentation website](https://
|
|
25
|
+
Icon sets are stored in `IconifyJSON` format. TypeScript definition is available in `@iconify/types` package. Documentation is [available on Iconify Documentation website](https://iconify.design/docs/types/iconify-json.html).
|
|
16
26
|
|
|
17
|
-
To work with icon sets, use [Iconify Utils](https://
|
|
27
|
+
To work with icon sets, use [Iconify Utils](https://iconify.design/docs/libraries/utils/). Utils package works in any JavaScript environment: Node.js, Deno, browsers, isolated JavaScript environments.
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
These icons can be used with many tools, plugins and components. They can also be exported as individual SVG files.
|
|
32
|
+
|
|
33
|
+
See [Iconify documentation](https://iconify.design/docs/usage/) for more details.
|
|
20
34
|
|
|
21
35
|
## How to get this repository
|
|
22
36
|
|
|
@@ -78,7 +92,7 @@ Icons used by Iconify are in directory json, in Iconify JSON format.
|
|
|
78
92
|
Why JSON instead of SVG? There are several reasons for that:
|
|
79
93
|
|
|
80
94
|
- Easy to store images in bulk.
|
|
81
|
-
- Contains only content of icon without
|
|
95
|
+
- Contains only content of icon without `<svg>` element, making it easy to manipulate content without doing complex parsing. It also makes it easier to create components, such as React icon component, allowing to use framework native SVG element.
|
|
82
96
|
- Data can contain additional content: aliases for icons, icon set information, categories/tags/themes.
|
|
83
97
|
|
|
84
98
|
Why not XML?
|
|
@@ -144,13 +158,11 @@ When multiple icons have the same value, it is moved to root object to reduce du
|
|
|
144
158
|
|
|
145
159
|
In example above, "icon1" and "icon2" are 24x24, "icon-20" is 20x20.
|
|
146
160
|
|
|
147
|
-
For more information see developer documentation on [https://
|
|
161
|
+
For more information see developer documentation on [https://iconify.design/docs/types/iconify-json.html](https://docs.iconify.design/types/iconify-json.html)
|
|
148
162
|
|
|
149
163
|
## Extracting individual SVG icons
|
|
150
164
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
For JavaScript use [Iconify Utils](https://docs.iconify.design/tools/utils/), though Iconify JSON Tools are also available (but deprecated).
|
|
165
|
+
You can use [Iconify Utils](https://iconify.design/docs/libraries/utils/) for simple export process or [Iconify Tools](https://iconify.design/docs/libraries/tools/) for more options.
|
|
154
166
|
|
|
155
167
|
Example using Iconify Utils (TypeScript):
|
|
156
168
|
|
|
@@ -227,53 +239,49 @@ import { defaults } from '@iconify/utils/lib/customisations';
|
|
|
227
239
|
})();
|
|
228
240
|
```
|
|
229
241
|
|
|
230
|
-
|
|
242
|
+
Same example using Iconify Tools:
|
|
231
243
|
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
|
|
244
|
+
```ts
|
|
245
|
+
import { readFile, writeFile, mkdir } from 'fs';
|
|
246
|
+
import { SVG } from '@iconify/tools';
|
|
235
247
|
|
|
236
248
|
const outputDir = 'mdi-export';
|
|
249
|
+
|
|
250
|
+
// Create target directory
|
|
237
251
|
try {
|
|
238
|
-
|
|
252
|
+
await mkdir(outputDir, {
|
|
239
253
|
recursive: true,
|
|
240
254
|
});
|
|
241
255
|
} catch (err) {
|
|
242
256
|
//
|
|
243
257
|
}
|
|
244
258
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
259
|
+
// Locate icons
|
|
260
|
+
const filename = locate('mdi');
|
|
261
|
+
|
|
262
|
+
// Load icon set
|
|
263
|
+
const data = JSON.parse(await fs.readFile(filename, 'utf8'));
|
|
264
|
+
|
|
265
|
+
// Create IconSet instance
|
|
266
|
+
const iconSet = new IconSet(data);
|
|
267
|
+
|
|
268
|
+
// Export all icons
|
|
269
|
+
await iconSet.forEach(async (name) => {
|
|
270
|
+
const svg = iconSet.toString(name);
|
|
271
|
+
if (!svg) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Save to file
|
|
276
|
+
await writeFile(`${outputDir}/${name}.svg`, svg, 'utf8');
|
|
277
|
+
console.log(`Saved ${outputDir}/${name}.svg (${svg.length} bytes)`);
|
|
255
278
|
});
|
|
256
279
|
```
|
|
257
280
|
|
|
258
|
-
|
|
259
|
-
use \Iconify\JSONTools\Collection;
|
|
260
|
-
use \Iconify\JSONTools\SVG;
|
|
261
|
-
|
|
262
|
-
$outputDir = 'mdi-export';
|
|
263
|
-
@mkdir($outputDir, 0777, true);
|
|
264
|
-
|
|
265
|
-
$collection = new Collection();
|
|
266
|
-
$collection->loadIconifyCollection('mdi');
|
|
267
|
-
foreach ($collection->listIcons(true) as $icon) {
|
|
268
|
-
$svg = new SVG($collection->getIconData($icon));
|
|
269
|
-
file_put_contents($outputDir . '/' . $icon . '.svg', $svg->getSVG([
|
|
270
|
-
'height' => 'auto'
|
|
271
|
-
]));
|
|
272
|
-
}
|
|
273
|
-
```
|
|
281
|
+
See [Iconify Tools documentation](https://iconify.design/docs/libraries/tools/export/) for more export options.
|
|
274
282
|
|
|
275
283
|
## License
|
|
276
284
|
|
|
277
|
-
This is collection of
|
|
285
|
+
This is collection of icon sets created by various authors.
|
|
278
286
|
|
|
279
|
-
See [collections.md](./collections.md) for list of
|
|
287
|
+
See [collections.md](./collections.md) for list of icon sets and their licenses.
|