@minmaps-dev/material-icon-set 0.2.0-rc.0
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/LICENSE +21 -0
- package/README.md +49 -0
- package/dist/generated/registry.d.ts +2 -0
- package/dist/generated/registry.js +2062 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +26 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.js +1 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MTS LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @minmaps-dev/material-icon-set
|
|
2
|
+
|
|
3
|
+
Curated **Material Symbols** icon registry shared by the MinuteMaps **CMS** (icon picker)
|
|
4
|
+
and the **Web SDK** (map rendering). Replaces the legacy `@minmaps-dev/default-amenity-icons`
|
|
5
|
+
package (165 numbered, non-semantic SVGs).
|
|
6
|
+
|
|
7
|
+
## What it is
|
|
8
|
+
|
|
9
|
+
A build-time–generated registry of a **curated subset** (~200) of Material Symbols
|
|
10
|
+
(`outlined`), each as inline SVG. It is the **single source of truth** for which icons:
|
|
11
|
+
|
|
12
|
+
- the **CMS** offers in its amenity / destination / path-type picker, and
|
|
13
|
+
- the **SDK** can render from a stored icon **name** (no per-icon upload, no runtime fetch).
|
|
14
|
+
|
|
15
|
+
Icons are stored on entities as `extensors.iconName` (e.g. `restaurant`); the SDK resolves
|
|
16
|
+
that name to the inline SVG here and runs it through its existing recolor + badge pipeline.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { registry, iconNames, getIconSvg, hasIcon, ICON_SET } from '@minmaps-dev/material-icon-set'
|
|
22
|
+
|
|
23
|
+
registry // IconEntry[] -> { name, keywords, svg }, sorted by name
|
|
24
|
+
iconNames // string[] -> just the names
|
|
25
|
+
getIconSvg('wc') // string | undefined -> inline SVG for a name
|
|
26
|
+
hasIcon('wc') // boolean -> is this name in the curated set?
|
|
27
|
+
ICON_SET // 'material-symbols-outlined'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Adding / removing icons
|
|
31
|
+
|
|
32
|
+
Edit `src/curated.mjs` (the curated list with optional search `keywords`), then rebuild.
|
|
33
|
+
`scripts/generate-registry.mjs` pulls each name's SVG from
|
|
34
|
+
`@material-symbols/svg-400/outlined/<name>.svg` and writes `src/generated/registry.ts`.
|
|
35
|
+
Unknown names are logged and skipped (the build won't fail).
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm --filter @minmaps-dev/material-icon-set build
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The SDK consumes this via `workspace:*` (devDep, rollup-inlined → `dependencies` stays
|
|
42
|
+
empty). The CMS consumes the **published** package. Publishing goes through Changesets,
|
|
43
|
+
like the SDK.
|
|
44
|
+
|
|
45
|
+
## Roadmap (deferred)
|
|
46
|
+
|
|
47
|
+
Governance UI in the CMS to manage the globally-available set, and an automated
|
|
48
|
+
"promote a used icon into the curated bundle" flow, are planned follow-ups. Until then,
|
|
49
|
+
icons outside this set are handled by the CMS's existing custom-SVG **upload** path.
|