@minmaps-dev/mm-web-sdk 1.0.0-rc.33 → 1.0.0-rc.35

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/react.d.ts CHANGED
@@ -17,6 +17,17 @@ interface POI {
17
17
  floorId: string | number;
18
18
  /** Category/type of amenity (e.g., 'restroom', 'elevator') */
19
19
  amenityType?: string;
20
+ /** Locale-stable classification text (name + type + keywords, frozen at
21
+ * load before any locale patch can translate them). Copied from the
22
+ * source `Amenity.classifyText`; used by `amenityCategoryFor`/rank
23
+ * instead of the live, possibly-translated fields. See `Amenity.classifyText`. */
24
+ classifyText?: string;
25
+ /** Which amenity icon layer this POI renders in — `'connector'`,
26
+ * `'entrance'`, `'parking'`, `'bus'`, `'information'` or `'other'`.
27
+ * Derived from the amenity's connector flag, name, type and keywords;
28
+ * emitted as the `amenityCategory` feature property the theme filters on.
29
+ * Amenities only. See `amenityCategoryFor`. */
30
+ amenityCategory?: 'connector' | 'entrance' | 'parking' | 'bus' | 'information' | 'other';
20
31
  /** Search keywords */
21
32
  keywords?: string[];
22
33
  /** Additional properties */
@@ -49,6 +60,9 @@ interface Waypoint {
49
60
  zoneId?: string | number;
50
61
  }
51
62
 
63
+ /** SW/NE bounding box */
64
+ type Bounds = [[number, number], [number, number]];
65
+
52
66
  /**
53
67
  * Padding kept clear inside the viewport when the SDK frames bounds —
54
68
  * the initial venue/floor fit and the wayfinding route fit. A plain
@@ -81,16 +95,16 @@ type AmenityBadgeStyle = {
81
95
  /** Ring width in logical px. Default `2`. */
82
96
  ringWidth?: number;
83
97
  };
84
- type DestinationChipStyle = {
85
- /** Chip fill colour. Default `'#FFFFFF'`. */
86
- color?: string;
87
- /** Chip border colour. Default navy `'#162e51'`. */
88
- borderColor?: string;
89
- /** Chip border width in logical px. Default `2`. */
90
- borderWidth?: number;
91
- };
92
98
  interface SDKOptions {
93
99
  debug?: boolean;
100
+ /**
101
+ * `window` key the SDK instance is published under while `debug` is on, so
102
+ * a running kiosk can be driven from devtools (`mm.debug.hide('labels')`,
103
+ * `mm.getMap()`). Defaults to `'mm'`. Pass another name to avoid a clash,
104
+ * or `false` to publish nothing even in debug mode. Ignored entirely when
105
+ * `debug` is off.
106
+ */
107
+ debugGlobal?: string | false;
94
108
  /**
95
109
  * Initial theme. `'default'` uses the bundled hybrid 3D theme.
96
110
  * `'high-contrast'` uses the WCAG-AA tuned theme. Pass a
@@ -117,6 +131,20 @@ interface SDKOptions {
117
131
  * controls the automatic highlight on `routeReady`.
118
132
  */
119
133
  routeStepHighlight?: boolean;
134
+ /**
135
+ * Whether restroom pins that are too close together to draw individually
136
+ * collapse into a single Material `wc` badge. Defaults to `true`.
137
+ *
138
+ * Venues author men's and women's restrooms as two amenities a few metres
139
+ * apart. Both are wayfinding-critical (rank 0) and both draw on a layer that
140
+ * doesn't allow icon overlap, so without this MapLibre resolves the collision
141
+ * by hiding one of them outright until the camera is very close in. Grouping
142
+ * shows one badge in their place and hands back *all* the members when it's
143
+ * tapped, so the consumer can offer directions to each.
144
+ *
145
+ * Set `false` to opt out and get the raw collision behaviour back.
146
+ */
147
+ groupRestroomIcons?: boolean;
120
148
  initialFloor?: string | number;
121
149
  enableInteractions?: boolean;
122
150
  customSprite?: string;
@@ -129,6 +157,16 @@ interface SDKOptions {
129
157
  */
130
158
  wallThickness?: number;
131
159
  boundsPadding?: BoundsPadding;
160
+ /**
161
+ * Caps how far a visitor can pan/zoom out. By default the SDK derives this
162
+ * from the venue's own bounds, scaled to 3x its width/height around the
163
+ * same center — enough room to pan around the building without drifting
164
+ * into an empty, un-tiled region. Pass a number to use a different
165
+ * multiplier (e.g. `1.5` for a tighter leash), explicit `[[west, south],
166
+ * [east, north]]` bounds to override entirely, or `false` to disable
167
+ * max-bounds clamping.
168
+ */
169
+ maxBounds?: Bounds | number | false;
132
170
  /**
133
171
  * Pitch (deg) for the opening view, applied centred on the kiosk ("You
134
172
  * are here"). Omit for top-down.
@@ -180,13 +218,20 @@ interface SDKOptions {
180
218
  */
181
219
  connectorBadge?: AmenityBadgeStyle | false;
182
220
  /**
183
- * Chip composited behind each destination's uploaded logo. Destinations are
184
- * full-colour brand images (not recoloured), so they get a neutral white
185
- * rounded chip for legibility instead of the amenity gold badge. Pass `false`
186
- * to render the logo bare, or an object to tune the chip fill / border.
187
- * Defaults to a white chip with a 2px navy border.
221
+ * Badge for information-desk amenities (curated `information`/`info`
222
+ * icon). These render as their own visual class — a green disc with a
223
+ * white glyph by default — so information reads distinct from the gold
224
+ * service amenities. Pass `false` to fall them back into the regular gold
225
+ * badge, or an object to tune the disc / ring. When `amenityBadge` is
226
+ * `false`, information icons are badge-less too unless this is set
227
+ * explicitly.
228
+ */
229
+ informationBadge?: AmenityBadgeStyle | false;
230
+ /**
231
+ * Glyph colour for information icons on their badge. Default white
232
+ * (matches `informationBadge`'s default green disc).
188
233
  */
189
- destinationChip?: DestinationChipStyle | false;
234
+ informationIconColor?: string;
190
235
  styleMode?: 'venueStyleUrl' | 'sdkTemplate';
191
236
  templateOverrideMode?: 'colorsOnly' | 'colorsAndConstants' | 'all';
192
237
  }