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

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
@@ -41,6 +41,12 @@ interface POI {
41
41
  /** For kiosk POIs only: compass heading the device physically faces, in
42
42
  * degrees clockwise from north. Sourced from JACS `Device.heading`. */
43
43
  heading?: number | null;
44
+ /** Per-instance name for this specific placement of an amenity (e.g.
45
+ * "Parking Lot A" for a "Parking" amenity), resolved from the waypoint's
46
+ * `amenityAssociations`. Distinct from `name`, which is the amenity's
47
+ * type-level name shared by every instance — see `Amenity.name`. Amenities
48
+ * only, and only set when JACS actually returned an instance name. */
49
+ instanceName?: string;
44
50
  }
45
51
  /**
46
52
  * Waypoint - a specific point location
@@ -58,6 +64,15 @@ interface Waypoint {
58
64
  * link between a location and its department — read at runtime across the
59
65
  * data provider (see the package CLAUDE.md zone landmine). */
60
66
  zoneId?: string | number;
67
+ /** Per-instance names JACS attaches to this waypoint's amenities (e.g. a
68
+ * "Parking" amenity placed twice as "Parking Lot A" / "Parking Lot B").
69
+ * `id` matches an `Amenity.id`, not this waypoint — a waypoint can carry
70
+ * more than one amenity, so a consumer must find the entry for the
71
+ * specific amenity it's rendering rather than assuming index 0. */
72
+ amenityAssociations?: Array<{
73
+ id: string | number;
74
+ name: string;
75
+ }>;
61
76
  }
62
77
 
63
78
  /** SW/NE bounding box */
@@ -94,6 +109,11 @@ type AmenityBadgeStyle = {
94
109
  ringColor?: string;
95
110
  /** Ring width in logical px. Default `2`. */
96
111
  ringWidth?: number;
112
+ /** Extra inset between the icon and the badge's inner edge, in logical px
113
+ * (applied on all sides). Default `0` — the icon fills ~85% of the disc
114
+ * as before. Raise this if an icon's own artwork reaches close to its
115
+ * viewBox edges and ends up touching the ring. */
116
+ padding?: number;
97
117
  };
98
118
  interface SDKOptions {
99
119
  debug?: boolean;
@@ -150,18 +170,43 @@ interface SDKOptions {
150
170
  customSprite?: string;
151
171
  minIndoorZoom?: number;
152
172
  /**
153
- * Interior unit-wall thickness in feet (default 1). Each wall is built by
154
- * insetting a ring into each unit by `wallThickness / 2`, so adjacent units
155
- * share a wall (their rings abut at the common edge). Floored at 0.5 — a
156
- * thinner value collapses the negative buffer and drops the wall.
173
+ * How far, in **metres** (default `0.3`, ≈1 ft), extruded interior polygons
174
+ * (restrooms, back-of-house, obstacles, connectors) are inset so their edges
175
+ * don't z-fight the neighbouring room block. A polygon too thin to survive
176
+ * the inset (it would keep under half its area, e.g. a ~0.3 m back-of-house
177
+ * perimeter band) is left at its original size rather than erased. Metres to match the theme's
178
+ * `fill-extrusion-height` values, which MapLibre defines in metres — unlike
179
+ * the distances shown to visitors, which are in feet. Was feet before this
180
+ * option changed units; a value of `1` is now ~3.3× thicker.
157
181
  */
158
182
  wallThickness?: number;
183
+ /**
184
+ * How much costlier a candidate on a **different floor** from the kiosk is
185
+ * treated when choosing the closest instance of an amenity (default `1.5`).
186
+ * Used by `findClosestByWalkTime`, and so by `navigateFromKioskToClosestAmenity`
187
+ * and `highlightAmenity`.
188
+ *
189
+ * A multiplier on the trip's effort — walk time plus the elevator wait — not
190
+ * a distance: `1.5` means another floor's instance has to be a third cheaper
191
+ * to beat one on the kiosk's floor. It is a *preference* for not making the
192
+ * visitor change floors, layered on top of the physical cost of doing so
193
+ * (which is already in the effort). `1` turns it off and ranks by effort
194
+ * alone; a value below `1` is treated as `1`. It only affects which instance
195
+ * is chosen — never a route.
196
+ *
197
+ * For scale: at the Las Vegas VA the nearest other-floor Lactation Pod costs
198
+ * ~400 ft-equivalent against ~530 for the one on the kiosk's floor, so it
199
+ * takes a value above ~1.32 to keep the visitor on their floor.
200
+ */
201
+ otherFloorPenalty?: number;
159
202
  boundsPadding?: BoundsPadding;
160
203
  /**
161
204
  * Caps how far a visitor can pan/zoom out. By default the SDK derives this
162
205
  * from the venue's own bounds, scaled to 3x its width/height around the
163
206
  * 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
207
+ * into an empty, un-tiled region. The default box is never smaller than
208
+ * ~3.7 km a side, so a small venue isn't forced to zoom in tighter than a
209
+ * large one. Pass a number to use a different
165
210
  * multiplier (e.g. `1.5` for a tighter leash), explicit `[[west, south],
166
211
  * [east, north]]` bounds to override entirely, or `false` to disable
167
212
  * max-bounds clamping.
@@ -187,6 +232,16 @@ interface SDKOptions {
187
232
  * massing/region. `0` locks zoom-out exactly to the opening view.
188
233
  */
189
234
  minZoomBelowInitialFit?: number;
235
+ /**
236
+ * Zoom-out floor expressed as ground scale: the most metres one CSS pixel
237
+ * may span. The SDK converts it to a `minZoom` at the venue's latitude, so
238
+ * every venue shows the same amount of surrounding map when fully zoomed
239
+ * out — a plain zoom number doesn't, because Web Mercator shows less ground
240
+ * per zoom level the further a venue is from the equator. Takes precedence
241
+ * over `minZoomBelowInitialFit`. For scale, `1.207` is zoom 15.8 at Orlando
242
+ * (about 2.3 km x 1.3 km on a 1920x1080 screen).
243
+ */
244
+ minZoomMetersPerPixel?: number;
190
245
  /**
191
246
  * Override the colour the SDK recolours every amenity SVG to before it
192
247
  * composites the badge. `none` / `transparent` fills are preserved so
@@ -232,6 +287,22 @@ interface SDKOptions {
232
287
  * (matches `informationBadge`'s default green disc).
233
288
  */
234
289
  informationIconColor?: string;
290
+ /**
291
+ * Badge for the end-of-route flag (`poi-route-end-flag`) shown in place of a
292
+ * destination's dot while a route to it is displayed. Has its own defaults
293
+ * (green disc, white ring) that don't follow `amenityBadge`. Pass an object
294
+ * to tune the disc / ring, or `false` for the bare flag glyph with no badge.
295
+ * When `amenityBadge` is `false`, the flag is badge-less too unless this is
296
+ * set explicitly. Under the high-contrast theme the disc colour is forced to
297
+ * the high-contrast amenity yellow, like the amenity and connector badges.
298
+ */
299
+ routeEndBadge?: AmenityBadgeStyle | false;
300
+ /**
301
+ * Flag glyph colour on the end-of-route badge. Default white (contrasts the
302
+ * default green disc); doesn't follow `amenityIconColor`. Ignored under the
303
+ * high-contrast theme, which forces its own glyph colour.
304
+ */
305
+ routeEndIconColor?: string;
235
306
  styleMode?: 'venueStyleUrl' | 'sdkTemplate';
236
307
  templateOverrideMode?: 'colorsOnly' | 'colorsAndConstants' | 'all';
237
308
  }