@minmaps-dev/material-icon-set 0.2.0-rc.0 → 0.2.0-rc.2

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/dist/index.d.ts CHANGED
@@ -1,8 +1,15 @@
1
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. */
2
+ import type { IconEntry, IconGroup } from './types.js';
3
+ export type { IconEntry, IconGroup };
4
+ /** The full curated icon registry ({ name, keywords, svg, group }[]), sorted by name. */
5
5
  export { registry };
6
+ /**
7
+ * Icons offered to a given picker. One-way overlap: `'amenity'` is a SUPERSET —
8
+ * it returns every icon (amenity + shared + connector), because an amenity may
9
+ * legitimately reuse a connector glyph. `'connector'` stays scoped to connector +
10
+ * shared (`both`) icons so amenity-only icons don't clutter the path-type picker.
11
+ */
12
+ export declare function iconsForGroup(group: IconGroup): IconEntry[];
6
13
  /** Just the icon names — handy for the CMS picker / validation. */
7
14
  export declare const iconNames: string[];
8
15
  /** Returns the inline SVG for a curated icon name, or `undefined` if not curated. */
package/dist/index.js CHANGED
@@ -1,6 +1,18 @@
1
1
  import { registry } from './generated/registry.js';
2
- /** The full curated icon registry ({ name, keywords, svg }[]), sorted by name. */
2
+ /** The full curated icon registry ({ name, keywords, svg, group }[]), sorted by name. */
3
3
  export { registry };
4
+ /**
5
+ * Icons offered to a given picker. One-way overlap: `'amenity'` is a SUPERSET —
6
+ * it returns every icon (amenity + shared + connector), because an amenity may
7
+ * legitimately reuse a connector glyph. `'connector'` stays scoped to connector +
8
+ * shared (`both`) icons so amenity-only icons don't clutter the path-type picker.
9
+ */
10
+ export function iconsForGroup(group) {
11
+ if (group === 'connector') {
12
+ return registry.filter((e) => e.group === 'connector' || e.group === 'both');
13
+ }
14
+ return registry; // 'amenity' and 'both' see the full set
15
+ }
4
16
  /** Just the icon names — handy for the CMS picker / validation. */
5
17
  export const iconNames = registry.map((e) => e.name);
6
18
  const byName = new Map(registry.map((e) => [e.name, e]));
package/dist/types.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /** Which picker(s) an icon shows in. `amenity` (default) for POIs/destinations,
2
+ * `connector` for path-type/connector icons, `both` for ones used in either. */
3
+ export type IconGroup = 'amenity' | 'connector' | 'both';
1
4
  /** A single curated icon: its Material Symbols name, search keywords, and inline SVG. */
2
5
  export interface IconEntry {
3
6
  /** Material Symbols name (snake_case), e.g. `restaurant`. Stored as `extensors.iconName`. */
@@ -6,4 +9,6 @@ export interface IconEntry {
6
9
  keywords: string[];
7
10
  /** Inline outlined SVG markup, ready to recolor + composite. */
8
11
  svg: string;
12
+ /** Which picker(s) offer this icon. Defaults to `amenity`. */
13
+ group: IconGroup;
9
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minmaps-dev/material-icon-set",
3
- "version": "0.2.0-rc.0",
3
+ "version": "0.2.0-rc.2",
4
4
  "description": "Curated Material Symbols icon registry for the MinuteMaps CMS + Web SDK. Replaces @minmaps-dev/default-amenity-icons.",
5
5
  "license": "MIT",
6
6
  "author": "MTS LLC",