@minmaps-dev/material-icon-set 0.2.0-rc.1 → 0.2.0-rc.11
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/README.md +16 -0
- package/dist/generated/registry.js +325 -99
- package/dist/index.d.ts +4 -3
- package/dist/index.js +8 -6
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -34,6 +34,22 @@ Edit `src/curated.mjs` (the curated list with optional search `keywords`), then
|
|
|
34
34
|
`@material-symbols/svg-400/outlined/<name>.svg` and writes `src/generated/registry.ts`.
|
|
35
35
|
Unknown names are logged and skipped (the build won't fail).
|
|
36
36
|
|
|
37
|
+
### Custom (non-Material) icons
|
|
38
|
+
|
|
39
|
+
For an icon Material Symbols doesn't have, drop the SVG in `src/Custom/<name>.svg`
|
|
40
|
+
(file name = the curated `name`, snake_case) and add an entry with `source: 'custom'`:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
{ name: 'vending_machine', keywords: ['vending', 'snacks'], source: 'custom' },
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Both generators resolve SVGs through `scripts/load-icon-svg.mjs`, so a custom icon
|
|
47
|
+
reaches the CMS registry **and** the Martin sprite dirs (`generate:svg`) like any
|
|
48
|
+
other. Custom SVGs are normalized on the way in: root size forced to 48×48, and
|
|
49
|
+
`fill`/`stroke="currentColor"` stripped from child elements so the glyph takes the
|
|
50
|
+
badge color. Use a single-color glyph; multi-color art will be flattened. Names
|
|
51
|
+
must not collide with a Material name already in the list (first entry wins).
|
|
52
|
+
|
|
37
53
|
```bash
|
|
38
54
|
pnpm --filter @minmaps-dev/material-icon-set build
|
|
39
55
|
```
|