@rokkit/icons 1.0.0-next.12 → 1.0.0-next.120

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.
Files changed (66) hide show
  1. package/lib/app/chars.json +1 -0
  2. package/lib/app/icons.json +116 -0
  3. package/lib/app/index.d.ts +8 -0
  4. package/lib/app/index.js +9 -0
  5. package/lib/app/index.mjs +6 -0
  6. package/lib/app/info.json +1 -0
  7. package/lib/app/metadata.json +1 -0
  8. package/lib/app/package.json +24 -0
  9. package/lib/app.json +116 -0
  10. package/lib/auth/chars.json +1 -0
  11. package/lib/auth/icons.json +47 -0
  12. package/lib/auth/index.d.ts +8 -0
  13. package/lib/auth/index.js +9 -0
  14. package/lib/auth/index.mjs +6 -0
  15. package/lib/auth/info.json +1 -0
  16. package/lib/auth/metadata.json +1 -0
  17. package/lib/auth/package.json +24 -0
  18. package/lib/auth.json +47 -0
  19. package/lib/base/chars.json +1 -0
  20. package/lib/base/icons.json +209 -0
  21. package/lib/base/index.d.ts +8 -0
  22. package/lib/base/index.js +9 -0
  23. package/lib/base/index.mjs +6 -0
  24. package/lib/base/info.json +1 -0
  25. package/lib/base/metadata.json +1 -0
  26. package/lib/base/package.json +24 -0
  27. package/lib/base.json +209 -0
  28. package/lib/components/chars.json +1 -0
  29. package/lib/components/icons.json +92 -0
  30. package/lib/components/index.d.ts +8 -0
  31. package/lib/components/index.js +9 -0
  32. package/lib/components/index.mjs +6 -0
  33. package/lib/components/info.json +1 -0
  34. package/lib/components/metadata.json +1 -0
  35. package/lib/components/package.json +24 -0
  36. package/lib/components.json +92 -0
  37. package/lib/light/chars.json +1 -0
  38. package/lib/light/icons.json +23 -0
  39. package/lib/light/index.d.ts +8 -0
  40. package/lib/light/index.js +9 -0
  41. package/lib/light/index.mjs +6 -0
  42. package/lib/light/info.json +1 -0
  43. package/lib/light/metadata.json +1 -0
  44. package/lib/light/package.json +24 -0
  45. package/lib/light.json +23 -0
  46. package/lib/solid/chars.json +1 -0
  47. package/lib/solid/icons.json +44 -0
  48. package/lib/solid/index.d.ts +8 -0
  49. package/lib/solid/index.js +9 -0
  50. package/lib/solid/index.mjs +6 -0
  51. package/lib/solid/info.json +1 -0
  52. package/lib/solid/metadata.json +1 -0
  53. package/lib/solid/package.json +24 -0
  54. package/lib/solid.json +44 -0
  55. package/lib/twotone/chars.json +1 -0
  56. package/lib/twotone/icons.json +20 -0
  57. package/lib/twotone/index.d.ts +8 -0
  58. package/lib/twotone/index.js +9 -0
  59. package/lib/twotone/index.mjs +6 -0
  60. package/lib/twotone/info.json +1 -0
  61. package/lib/twotone/metadata.json +1 -0
  62. package/lib/twotone/package.json +24 -0
  63. package/lib/twotone.json +20 -0
  64. package/package.json +28 -27
  65. package/src/convert.js +0 -59
  66. package/src/index.js +0 -6
@@ -0,0 +1,9 @@
1
+ const icons = require('./icons.json');
2
+ const info = {};
3
+ const metadata = {};
4
+ const chars = {};
5
+
6
+ exports.icons = icons;
7
+ exports.info = info;
8
+ exports.metadata = metadata;
9
+ exports.chars = chars;
@@ -0,0 +1,6 @@
1
+ import icons from './icons.json' with { type: 'json' };
2
+
3
+ const info = {};
4
+ const metadata = {};
5
+ const chars = {};
6
+ export { icons, info, metadata, chars };
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@rokkit/twotone",
3
+ "description": "twotone icon set in Iconify JSON format",
4
+ "version": "1.0.0",
5
+ "main": "index.js",
6
+ "module": "index.mjs",
7
+ "types": "index.d.ts",
8
+ "homepage": "https://github.com/jerrythomas/rokkit",
9
+ "exports": {
10
+ "./*": "./*",
11
+ ".": {
12
+ "types": "./index.d.ts",
13
+ "require": "./index.js",
14
+ "import": "./index.mjs"
15
+ },
16
+ "./icons.json": "./icons.json"
17
+ },
18
+ "iconSet": {
19
+ "icons": "icons.json"
20
+ },
21
+ "dependencies": {
22
+ "@iconify/types": "*"
23
+ }
24
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "prefix": "twotone",
3
+ "lastModified": 1748289407,
4
+ "icons": {
5
+ "heart": {
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>"
7
+ },
8
+ "state-info": {
9
+ "body": "<g fill=\"currentColor\"><path d=\"M21 12a9 9 0 11-17.999 0A9 9 0 0121 12\" opacity=\".2\"/><path d=\"M13.5 16.5a.75.75 0 01-.75.75 1.5 1.5 0 01-1.5-1.5V12a.75.75 0 110-1.5 1.5 1.5 0 011.5 1.5v3.75a.75.75 0 01.75.75m8.25-4.5A9.75 9.75 0 1112 2.25 9.76 9.76 0 0121.75 12m-1.5 0A8.25 8.25 0 1012 20.25 8.26 8.26 0 0020.25 12m-8.625-3a1.125 1.125 0 100-2.25 1.125 1.125 0 000 2.25\"/></g>"
10
+ },
11
+ "state-unknown": {
12
+ "body": "<g fill=\"currentColor\"><path d=\"M21 12a9 9 0 11-17.999 0A9 9 0 0121 12\" opacity=\".2\"/><path d=\"M13.125 16.875a1.125 1.125 0 11-2.25 0 1.125 1.125 0 012.25 0M12 6.75c-2.068 0-3.75 1.514-3.75 3.375v.375a.75.75 0 101.5 0v-.375c0-1.031 1.01-1.875 2.25-1.875s2.25.844 2.25 1.875S13.24 12 12 12a.75.75 0 00-.75.75v.75a.75.75 0 101.5 0v-.068c1.71-.314 3-1.678 3-3.307 0-1.86-1.682-3.375-3.75-3.375M21.75 12A9.75 9.75 0 1112 2.25 9.76 9.76 0 0121.75 12m-1.5 0A8.25 8.25 0 1012 20.25 8.26 8.26 0 0020.25 12\"/></g>"
13
+ },
14
+ "state-warning": {
15
+ "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>"
16
+ }
17
+ },
18
+ "width": 24,
19
+ "height": 24
20
+ }
package/package.json CHANGED
@@ -1,37 +1,38 @@
1
1
  {
2
2
  "name": "@rokkit/icons",
3
- "version": "1.0.0-next.12",
4
- "description": "A minimal icon set for use in applications.",
3
+ "version": "1.0.0-next.120",
5
4
  "author": "Jerry Thomas <me@jerrythomas.name>",
5
+ "exports": {
6
+ "./package.json": "./package.json",
7
+ "./ui.json": "./lib/base.json",
8
+ "./light.json": "./lib/light.json",
9
+ "./solid.json": "./lib/solid.json",
10
+ "./twotone.json": "./lib/twotone.json",
11
+ "./components.json": "./lib/components.json",
12
+ "./auth.json": "./lib/auth.json",
13
+ "./app.json": "./lib/app.json",
14
+ ".": "./lib/base.json",
15
+ "./utils": "./src/convert.js"
16
+ },
17
+ "description": "A minimal icon set for use in applications.",
18
+ "files": [
19
+ "lib/**/*",
20
+ "README.md",
21
+ "package.json"
22
+ ],
6
23
  "license": "MIT",
7
- "bin": "src/index.js",
8
- "main": "src/index.js",
9
- "module": "src/index.js",
10
- "type": "module",
11
24
  "publishConfig": {
12
25
  "access": "public"
13
26
  },
14
- "dependencies": {
15
- "@mdi/svg": "^7.1.96"
16
- },
17
27
  "devDependencies": {
18
- "@iconify/tools": "2.2.1",
19
- "@iconify/types": "^2.0.0",
20
- "iconify": "^1.4.0"
21
- },
22
- "files": [
23
- "src/**/*.js",
24
- "!src/**/*.spec.js"
25
- ],
26
- "exports": {
27
- "./lib": "./lib",
28
- "./package.json": "./package.json",
29
- "./states.json": "./lib/states.json",
30
- "./components.json": "./lib/components.json",
31
- "./auth.json": "./lib/auth.json",
32
- ".": "./lib/states.json"
28
+ "@rokkit/cli": "link:@rokkit/cli"
33
29
  },
34
30
  "scripts": {
35
- "build": "node src/index.js"
36
- }
37
- }
31
+ "format": "prettier --write .",
32
+ "lint": "eslint --fix .",
33
+ "build": "rokkit-cli build",
34
+ "latest": "pnpm upgrade --latest",
35
+ "release": "pnpm publish --access public"
36
+ },
37
+ "type": "module"
38
+ }
package/src/convert.js DELETED
@@ -1,59 +0,0 @@
1
- import {
2
- importDirectory,
3
- cleanupSVG,
4
- runSVGO,
5
- parseColors,
6
- isEmptyColor
7
- } from '@iconify/tools'
8
- import fs from 'fs'
9
-
10
- export async function convert(folder, prefix, color = false) {
11
- // Import icons
12
- const iconSet = await importDirectory(folder, {
13
- prefix
14
- })
15
-
16
- // Validate, clean up, fix palette and optimise
17
- await iconSet.forEach(async (name, type) => {
18
- if (type !== 'icon') {
19
- return
20
- }
21
-
22
- const svg = iconSet.toSVG(name)
23
- if (!svg) {
24
- // Invalid icon
25
- iconSet.remove(name)
26
- return
27
- }
28
-
29
- // Clean up and optimise icons
30
- try {
31
- // Clean up icon code
32
- await cleanupSVG(svg)
33
-
34
- if (!color) {
35
- await parseColors(svg, {
36
- defaultColor: 'currentColor',
37
- callback: (attr, colorStr, color) => {
38
- return !color || isEmptyColor(color) ? colorStr : 'currentColor'
39
- }
40
- })
41
- }
42
-
43
- // Optimise
44
- await runSVGO(svg)
45
- } catch (err) {
46
- // Invalid icon
47
- console.error(`Error parsing ${name}:`, err)
48
- iconSet.remove(name)
49
- return
50
- }
51
-
52
- // Update icon
53
- iconSet.fromSVG(name, svg)
54
- })
55
-
56
- // Export
57
- const collection = JSON.stringify(iconSet.export(), null, 2)
58
- fs.writeFileSync(`./lib/${prefix}.json`, collection, 'utf8')
59
- }
package/src/index.js DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import { convert } from './convert.js'
3
-
4
- convert('./src/states', 'states')
5
- convert('./src/components', 'components')
6
- convert('./src/auth', 'auth', false)