@rokkit/icons 1.0.0-next.93 → 1.0.0-next.95

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.
@@ -110,7 +110,7 @@
110
110
  "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 15c0 2.828 0 4.243.879 5.121C4.757 21 6.172 21 9 21h6c2.828 0 4.243 0 5.121-.879C21 19.243 21 17.828 21 15\" opacity=\".5\"/><path d=\"M12 16V3m0 0 4 4.375M12 3 8 7.375\"/></g>"
111
111
  }
112
112
  },
113
- "lastModified": 1709716157,
113
+ "lastModified": 1717410886,
114
114
  "width": 24,
115
115
  "height": 24
116
116
  }
package/lib/app.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "prefix": "app",
3
- "lastModified": 1709716157,
3
+ "lastModified": 1717410886,
4
4
  "icons": {
5
5
  "alert-bell": {
6
6
  "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><path d=\"M18.75 9.71v-.705C18.75 5.136 15.726 2 12 2S5.25 5.136 5.25 9.005v.705a4.4 4.4 0 01-.692 2.375L3.45 13.81c-1.011 1.575-.239 3.716 1.52 4.214a25.8 25.8 0 0014.06 0c1.759-.498 2.531-2.639 1.52-4.213l-1.108-1.725a4.4 4.4 0 01-.693-2.375Z\"/><path stroke-linecap=\"round\" d=\"M7.5 19c.655 1.748 2.422 3 4.5 3s3.845-1.252 4.5-3\" opacity=\".5\"/></g>"
@@ -41,7 +41,7 @@
41
41
  "body": "<path fill=\"#55ACEE\" d=\"M24 4.542a9.9 9.9 0 01-2.828.776 4.94 4.94 0 002.165-2.725 9.9 9.9 0 01-3.127 1.195 4.924 4.924 0 00-8.39 4.491A13.98 13.98 0 011.67 3.135a4.9 4.9 0 00-.666 2.475c0 1.708.87 3.215 2.19 4.098a4.9 4.9 0 01-2.23-.616v.062a4.93 4.93 0 003.95 4.829 4.9 4.9 0 01-2.224.084 4.93 4.93 0 004.6 3.42 9.88 9.88 0 01-6.115 2.107q-.597 0-1.175-.069a13.94 13.94 0 007.548 2.213c9.057 0 14.01-7.503 14.01-14.01q0-.32-.015-.637A10 10 0 0024 4.542\"/>"
42
42
  }
43
43
  },
44
- "lastModified": 1709716156,
44
+ "lastModified": 1717410886,
45
45
  "width": 24,
46
46
  "height": 24
47
47
  }
package/lib/auth.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "prefix": "auth",
3
- "lastModified": 1709716156,
3
+ "lastModified": 1717410886,
4
4
  "icons": {
5
5
  "apple": {
6
6
  "body": "<path d=\"M18.576 12.726c.033 3.625 3.18 4.832 3.215 4.847-.027.085-.503 1.719-1.658 3.407-.999 1.46-2.035 2.913-3.667 2.943-1.604.03-2.12-.951-3.954-.951-1.833 0-2.406.921-3.924.98-1.576.06-2.776-1.577-3.782-3.031-2.057-2.974-3.63-8.404-1.519-12.07C4.336 7.032 6.21 5.88 8.244 5.85c1.547-.03 3.008 1.04 3.954 1.04.945 0 2.72-1.287 4.585-1.098.781.033 2.973.316 4.381 2.376-.113.07-2.616 1.527-2.588 4.558M15.56 3.825c.837-1.013 1.4-2.422 1.246-3.825-1.206.048-2.664.804-3.529 1.815-.775.897-1.453 2.331-1.27 3.706 1.344.104 2.717-.683 3.553-1.696\"/>"
@@ -203,7 +203,7 @@
203
203
  "body": "<path fill=\"currentColor\" d=\"M22.2 17.633 14.002 3.396a2.322 2.322 0 00-4.004 0L1.8 17.633a2.2 2.2 0 000 2.224A2.28 2.28 0 003.802 21h16.397a2.28 2.28 0 002-1.143 2.2 2.2 0 00.001-2.224M11.25 9.75a.75.75 0 111.5 0v3.75a.75.75 0 11-1.5 0zM12 18a1.124 1.124 0 110-2.249A1.124 1.124 0 0112 18\"/>"
204
204
  }
205
205
  },
206
- "lastModified": 1709716157,
206
+ "lastModified": 1717410887,
207
207
  "width": 24,
208
208
  "height": 24
209
209
  }
package/lib/base.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "prefix": "base",
3
- "lastModified": 1709716157,
3
+ "lastModified": 1717410887,
4
4
  "icons": {
5
5
  "accordion-closed": {
6
6
  "body": "<path fill=\"currentColor\" d=\"M16.5 12 9 19.5l-1.05-1.05L14.4 12 7.95 5.55 9 4.5z\"/>"
@@ -86,7 +86,7 @@
86
86
  "body": "<g fill=\"none\"><path fill=\"currentColor\" d=\"M2.91 7h18.18c.503 0 .91-.448.91-1V3c0-.552-.407-1-.91-1H2.91C2.406 2 2 2.448 2 3v3c0 .552.407 1 .91 1m4.772 7.5h13.636c.377 0 .682-.448.682-1v-3c0-.552-.305-1-.682-1H7.682c-.377 0-.682.448-.682 1v3c0 .552.305 1 .682 1m0 7.5h13.636c.377 0 .682-.448.682-1v-3c0-.552-.305-1-.682-1H7.682C7.305 17 7 17.448 7 18v3c0 .552.305 1 .682 1\"/><path stroke=\"currentColor\" stroke-linecap=\"round\" d=\"M4.5 7v12.5m0 0h3\"/><path stroke=\"currentColor\" d=\"M4 12h3\"/></g>"
87
87
  }
88
88
  },
89
- "lastModified": 1709716157,
89
+ "lastModified": 1717410886,
90
90
  "width": 24,
91
91
  "height": 24
92
92
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "prefix": "components",
3
- "lastModified": 1709716157,
3
+ "lastModified": 1717410886,
4
4
  "icons": {
5
5
  "accordion": {
6
6
  "body": "<g fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M3 17a1 1 0 00-1 1v3a1 1 0 001 1h18a1 1 0 001-1v-3a1 1 0 00-1-1zm16.133 2.492L18 18.409l.668-.699 1.832 1.75-1.75 1.832-.7-.667z\" clip-rule=\"evenodd\"/><path fill-opacity=\".5\" d=\"M2 7h20v7.5a1 1 0 01-1 1H3a1 1 0 01-1-1z\"/><path fill-rule=\"evenodd\" d=\"M3 2a1 1 0 00-1 1v4h20V3a1 1 0 00-1-1zm15.8 2.383 1.084-1.133.698.668-1.75 1.832L17 4l.668-.7z\" clip-rule=\"evenodd\"/></g>"
@@ -17,7 +17,7 @@
17
17
  "body": "<path fill=\"currentColor\" d=\"m22.038 17.727-8.2-14.238a2.132 2.132 0 00-3.676 0l-8.2 14.238a2.02 2.02 0 000 2.036 2.1 2.1 0 001.84 1.05h16.397a2.1 2.1 0 001.837-1.05 2.02 2.02 0 00.002-2.036m-.976 1.473a.98.98 0 01-.864.488H3.802a.98.98 0 01-.864-.488.89.89 0 010-.911L11.137 4.05a1.007 1.007 0 011.726 0l8.2 14.238a.89.89 0 01-.001.911m-9.624-5.7V9.75a.562.562 0 111.125 0v3.75a.563.563 0 01-1.125 0m1.5 3.375a.938.938 0 11-1.876 0 .938.938 0 011.876 0\"/>"
18
18
  }
19
19
  },
20
- "lastModified": 1709716156,
20
+ "lastModified": 1717410886,
21
21
  "width": 24,
22
22
  "height": 24
23
23
  }
package/lib/light.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "prefix": "light",
3
- "lastModified": 1709716156,
3
+ "lastModified": 1717410886,
4
4
  "icons": {
5
5
  "minus-circle": {
6
6
  "body": "<g fill=\"currentColor\"><path d=\"M12 2a10 10 0 100 20 10 10 0 000-20m0 18a8 8 0 110-16 8 8 0 010 16\"/><path d=\"M15 11H9a1 1 0 000 2h6a1 1 0 000-2\"/></g>"
@@ -38,7 +38,7 @@
38
38
  "body": "<path fill=\"currentColor\" d=\"M18 3H6a3 3 0 00-3 3v12a3 3 0 003 3h12a3 3 0 003-3V6a3 3 0 00-3-3m-3 10h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V9a1 1 0 012 0v2h2a1 1 0 010 2\"/>"
39
39
  }
40
40
  },
41
- "lastModified": 1709716156,
41
+ "lastModified": 1717410886,
42
42
  "width": 24,
43
43
  "height": 24
44
44
  }
package/lib/solid.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "prefix": "solid",
3
- "lastModified": 1709716156,
3
+ "lastModified": 1717410886,
4
4
  "icons": {
5
5
  "action-add": {
6
6
  "body": "<path fill=\"currentColor\" d=\"M12 2a10 10 0 100 20 10 10 0 000-20m3 11h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V9a1 1 0 012 0v2h2a1 1 0 010 2\"/>"
@@ -14,7 +14,7 @@
14
14
  "body": "<g fill=\"currentColor\"><path d=\"M20.2 20.25H3.8c-1.183 0-1.925-1.239-1.35-2.242l8.199-14.237c.59-1.032 2.111-1.032 2.702 0l8.2 14.237c.574 1.003-.168 2.242-1.352 2.242\" opacity=\".2\"/><path d=\"M22.2 17.633 14.002 3.396a2.322 2.322 0 00-4.004 0L1.8 17.633a2.2 2.2 0 000 2.224A2.28 2.28 0 003.802 21h16.397a2.28 2.28 0 002-1.143 2.2 2.2 0 00.001-2.224m-1.3 1.473a.8.8 0 01-.701.394H3.802a.8.8 0 01-.702-.394.71.71 0 010-.724l8.2-14.237a.82.82 0 011.406 0l8.199 14.237a.71.71 0 01-.004.724M11.25 13.5V9.75a.75.75 0 111.5 0v3.75a.75.75 0 11-1.5 0m1.875 3.375a1.125 1.125 0 11-2.25 0 1.125 1.125 0 012.25 0\"/></g>"
15
15
  }
16
16
  },
17
- "lastModified": 1709716156,
17
+ "lastModified": 1717410886,
18
18
  "width": 24,
19
19
  "height": 24
20
20
  }
package/lib/twotone.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "prefix": "twotone",
3
- "lastModified": 1709716156,
3
+ "lastModified": 1717410886,
4
4
  "icons": {
5
5
  "heart": {
6
6
  "body": "<g fill=\"currentColor\"><path d=\"M21.633 6.647a6.1 6.1 0 00-1.334-1.94A6.22 6.22 0 0015.93 2.93 6.26 6.26 0 0012 4.315 6.26 6.26 0 008.07 2.93 6.22 6.22 0 003.7 4.706a6.06 6.06 0 00-1.825 4.33c0 .78.16 1.593.476 2.42.265.692.644 1.409 1.13 2.133.768 1.146 1.825 2.342 3.138 3.553a35 35 0 004.42 3.453l.556.356a.75.75 0 00.808 0l.556-.357a35.5 35.5 0 004.42-3.452c1.312-1.211 2.37-2.407 3.138-3.553.485-.724.867-1.441 1.13-2.133.316-.827.476-1.64.476-2.42a6 6 0 00-.49-2.39M12 19.097S3.656 13.75 3.656 9.035c0-2.388 1.976-4.324 4.414-4.324 1.713 0 3.199.956 3.93 2.353a4.43 4.43 0 013.93-2.353c2.438 0 4.414 1.936 4.414 4.324 0 4.716-8.344 10.062-8.344 10.062\"/><path fill-opacity=\".15\" d=\"M15.93 4.71A4.43 4.43 0 0012 7.064a4.43 4.43 0 00-3.93-2.353c-2.438 0-4.414 1.936-4.414 4.324C3.656 13.751 12 19.097 12 19.097s8.344-5.346 8.344-10.062c0-2.388-1.976-4.324-4.414-4.324\"/></g>"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokkit/icons",
3
- "version": "1.0.0-next.93",
3
+ "version": "1.0.0-next.95",
4
4
  "description": "A minimal icon set for use in applications.",
5
5
  "author": "Jerry Thomas <me@jerrythomas.name>",
6
6
  "license": "MIT",
@@ -15,7 +15,7 @@
15
15
  "@mdi/svg": "^7.4.47"
16
16
  },
17
17
  "devDependencies": {
18
- "@iconify/tools": "4.0.2",
18
+ "@iconify/tools": "4.0.4",
19
19
  "@iconify/types": "^2.0.0",
20
20
  "iconify": "^1.4.0"
21
21
  },
package/src/convert.js CHANGED
@@ -8,12 +8,19 @@ import {
8
8
  } from '@iconify/tools'
9
9
  import fs from 'fs'
10
10
 
11
+ /**
12
+ * Convert icons
13
+ *
14
+ * @param {string} folder Folder with icons
15
+ * @param {string} prefix Prefix for icon set
16
+ * @param {boolean} color True if color should be preserved
17
+ */
11
18
  export async function convert(folder, prefix, color = false) {
12
19
  // Import icons
13
20
  const iconSet = await importDirectory(folder, { prefix })
14
21
 
15
22
  // Validate, clean up, fix palette and optimise
16
- await processIcons(iconSet, color)
23
+ processIcons(iconSet, color)
17
24
 
18
25
  // Export
19
26
  const collection = JSON.stringify(iconSet.export(), null, 2)
@@ -31,8 +38,14 @@ export async function convert(folder, prefix, color = false) {
31
38
  })
32
39
  }
33
40
 
34
- async function processIcons(iconSet, color) {
35
- await iconSet.forEach(async (name, type) => {
41
+ /**
42
+ * Process icons
43
+ *
44
+ * @param {IconifyTools} iconSet Icon set
45
+ * @param {boolean} color True if color should be preserved
46
+ */
47
+ function processIcons(iconSet, color) {
48
+ iconSet.forEach((name, type) => {
36
49
  if (type !== 'icon') {
37
50
  return
38
51
  }
@@ -46,7 +59,7 @@ async function processIcons(iconSet, color) {
46
59
 
47
60
  // Clean up and optimise icons
48
61
  try {
49
- await cleanAndOptimizeIcon(svg, color)
62
+ cleanAndOptimizeIcon(svg, color)
50
63
  } catch (err) {
51
64
  // Invalid icon
52
65
  console.error(`Error parsing ${name}:`, err)
@@ -59,15 +72,21 @@ async function processIcons(iconSet, color) {
59
72
  })
60
73
  }
61
74
 
62
- async function cleanAndOptimizeIcon(svg, color) {
75
+ /**
76
+ * Clean up and optimise SVG icon
77
+ *
78
+ * @param {string} svg SVG code
79
+ * @param {boolean} color True if color should be preserved
80
+ */
81
+ function cleanAndOptimizeIcon(svg, color) {
63
82
  // Clean up icon code
64
83
  cleanupSVG(svg)
65
84
 
66
85
  if (!color) {
67
- await parseColors(svg, {
86
+ parseColors(svg, {
68
87
  defaultColor: 'currentColor',
69
- callback: (attr, colorStr, color) => {
70
- return !color || isEmptyColor(color) ? colorStr : 'currentColor'
88
+ callback: (_, colorStr, value) => {
89
+ return !value || isEmptyColor(value) ? colorStr : 'currentColor'
71
90
  }
72
91
  })
73
92
  }