@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/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { registry } from './generated/registry.js';
|
|
2
|
+
import type { IconEntry } from './types.js';
|
|
3
|
+
export type { IconEntry };
|
|
4
|
+
/** The full curated icon registry ({ name, keywords, svg }[]), sorted by name. */
|
|
5
|
+
export { registry };
|
|
6
|
+
/** Just the icon names — handy for the CMS picker / validation. */
|
|
7
|
+
export declare const iconNames: string[];
|
|
8
|
+
/** Returns the inline SVG for a curated icon name, or `undefined` if not curated. */
|
|
9
|
+
export declare function getIconSvg(name: string | null | undefined): string | undefined;
|
|
10
|
+
/** Returns the full entry for a curated icon name, or `undefined` if not curated. */
|
|
11
|
+
export declare function getIcon(name: string | null | undefined): IconEntry | undefined;
|
|
12
|
+
/** Whether `name` is part of the curated, SDK-renderable set. */
|
|
13
|
+
export declare function hasIcon(name: string | null | undefined): boolean;
|
|
14
|
+
/** The Material Symbols style this set ships (for `extensors.iconSet`). */
|
|
15
|
+
export declare const ICON_SET: "material-symbols-outlined";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { registry } from './generated/registry.js';
|
|
2
|
+
/** The full curated icon registry ({ name, keywords, svg }[]), sorted by name. */
|
|
3
|
+
export { registry };
|
|
4
|
+
/** Just the icon names — handy for the CMS picker / validation. */
|
|
5
|
+
export const iconNames = registry.map((e) => e.name);
|
|
6
|
+
const byName = new Map(registry.map((e) => [e.name, e]));
|
|
7
|
+
/** Returns the inline SVG for a curated icon name, or `undefined` if not curated. */
|
|
8
|
+
export function getIconSvg(name) {
|
|
9
|
+
if (!name)
|
|
10
|
+
return undefined;
|
|
11
|
+
return byName.get(name)?.svg;
|
|
12
|
+
}
|
|
13
|
+
/** Returns the full entry for a curated icon name, or `undefined` if not curated. */
|
|
14
|
+
export function getIcon(name) {
|
|
15
|
+
if (!name)
|
|
16
|
+
return undefined;
|
|
17
|
+
return byName.get(name);
|
|
18
|
+
}
|
|
19
|
+
/** Whether `name` is part of the curated, SDK-renderable set. */
|
|
20
|
+
export function hasIcon(name) {
|
|
21
|
+
if (!name)
|
|
22
|
+
return false;
|
|
23
|
+
return byName.has(name);
|
|
24
|
+
}
|
|
25
|
+
/** The Material Symbols style this set ships (for `extensors.iconSet`). */
|
|
26
|
+
export const ICON_SET = 'material-symbols-outlined';
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** A single curated icon: its Material Symbols name, search keywords, and inline SVG. */
|
|
2
|
+
export interface IconEntry {
|
|
3
|
+
/** Material Symbols name (snake_case), e.g. `restaurant`. Stored as `extensors.iconName`. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Extra search terms for the CMS picker (the name itself is always searchable). */
|
|
6
|
+
keywords: string[];
|
|
7
|
+
/** Inline outlined SVG markup, ready to recolor + composite. */
|
|
8
|
+
svg: string;
|
|
9
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@minmaps-dev/material-icon-set",
|
|
3
|
+
"version": "0.2.0-rc.0",
|
|
4
|
+
"description": "Curated Material Symbols icon registry for the MinuteMaps CMS + Web SDK. Replaces @minmaps-dev/default-amenity-icons.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "MTS LLC",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@material-symbols/svg-400": "^0.28.0",
|
|
29
|
+
"typescript": "^5"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+ssh://git@github.com/MTS-LLC/mm-web-sdk.git",
|
|
34
|
+
"directory": "packages/icon-set"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"minutemaps",
|
|
38
|
+
"material-symbols",
|
|
39
|
+
"icons",
|
|
40
|
+
"wayfinding",
|
|
41
|
+
"amenity"
|
|
42
|
+
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"generate": "node scripts/generate-registry.mjs",
|
|
45
|
+
"build": "npm run generate && tsc -p tsconfig.json",
|
|
46
|
+
"typecheck": "npm run generate && tsc --noEmit -p tsconfig.json"
|
|
47
|
+
}
|
|
48
|
+
}
|