@minmaps-dev/mm-web-sdk 1.0.0-rc.34 → 1.0.0-rc.36

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,12 +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;
20
25
  /** Which amenity icon layer this POI renders in — `'connector'`,
21
- * `'entrance'`, `'parking'`, `'bus'` or `'other'`. Derived from the
22
- * amenity's connector flag, name, type and keywords; emitted as the
23
- * `amenityCategory` feature property the theme filters on. Amenities
24
- * only. See `amenityCategoryFor`. */
25
- amenityCategory?: 'connector' | 'entrance' | 'parking' | 'bus' | 'other';
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';
26
31
  /** Search keywords */
27
32
  keywords?: string[];
28
33
  /** Additional properties */
@@ -36,6 +41,12 @@ interface POI {
36
41
  /** For kiosk POIs only: compass heading the device physically faces, in
37
42
  * degrees clockwise from north. Sourced from JACS `Device.heading`. */
38
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;
39
50
  }
40
51
  /**
41
52
  * Waypoint - a specific point location
@@ -53,8 +64,20 @@ interface Waypoint {
53
64
  * link between a location and its department — read at runtime across the
54
65
  * data provider (see the package CLAUDE.md zone landmine). */
55
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
+ }>;
56
76
  }
57
77
 
78
+ /** SW/NE bounding box */
79
+ type Bounds = [[number, number], [number, number]];
80
+
58
81
  /**
59
82
  * Padding kept clear inside the viewport when the SDK frames bounds —
60
83
  * the initial venue/floor fit and the wayfinding route fit. A plain
@@ -86,6 +109,11 @@ type AmenityBadgeStyle = {
86
109
  ringColor?: string;
87
110
  /** Ring width in logical px. Default `2`. */
88
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;
89
117
  };
90
118
  interface SDKOptions {
91
119
  debug?: boolean;
@@ -123,18 +151,67 @@ interface SDKOptions {
123
151
  * controls the automatic highlight on `routeReady`.
124
152
  */
125
153
  routeStepHighlight?: boolean;
154
+ /**
155
+ * Whether restroom pins that are too close together to draw individually
156
+ * collapse into a single Material `wc` badge. Defaults to `true`.
157
+ *
158
+ * Venues author men's and women's restrooms as two amenities a few metres
159
+ * apart. Both are wayfinding-critical (rank 0) and both draw on a layer that
160
+ * doesn't allow icon overlap, so without this MapLibre resolves the collision
161
+ * by hiding one of them outright until the camera is very close in. Grouping
162
+ * shows one badge in their place and hands back *all* the members when it's
163
+ * tapped, so the consumer can offer directions to each.
164
+ *
165
+ * Set `false` to opt out and get the raw collision behaviour back.
166
+ */
167
+ groupRestroomIcons?: boolean;
126
168
  initialFloor?: string | number;
127
169
  enableInteractions?: boolean;
128
170
  customSprite?: string;
129
171
  minIndoorZoom?: number;
130
172
  /**
131
- * Interior unit-wall thickness in feet (default 1). Each wall is built by
132
- * insetting a ring into each unit by `wallThickness / 2`, so adjacent units
133
- * share a wall (their rings abut at the common edge). Floored at 0.5 — a
134
- * 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.
135
181
  */
136
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;
137
202
  boundsPadding?: BoundsPadding;
203
+ /**
204
+ * Caps how far a visitor can pan/zoom out. By default the SDK derives this
205
+ * from the venue's own bounds, scaled to 3x its width/height around the
206
+ * same center — enough room to pan around the building without drifting
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
210
+ * multiplier (e.g. `1.5` for a tighter leash), explicit `[[west, south],
211
+ * [east, north]]` bounds to override entirely, or `false` to disable
212
+ * max-bounds clamping.
213
+ */
214
+ maxBounds?: Bounds | number | false;
138
215
  /**
139
216
  * Pitch (deg) for the opening view, applied centred on the kiosk ("You
140
217
  * are here"). Omit for top-down.
@@ -155,6 +232,16 @@ interface SDKOptions {
155
232
  * massing/region. `0` locks zoom-out exactly to the opening view.
156
233
  */
157
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;
158
245
  /**
159
246
  * Override the colour the SDK recolours every amenity SVG to before it
160
247
  * composites the badge. `none` / `transparent` fills are preserved so
@@ -185,6 +272,21 @@ interface SDKOptions {
185
272
  * unless this is set explicitly.
186
273
  */
187
274
  connectorBadge?: AmenityBadgeStyle | false;
275
+ /**
276
+ * Badge for information-desk amenities (curated `information`/`info`
277
+ * icon). These render as their own visual class — a green disc with a
278
+ * white glyph by default — so information reads distinct from the gold
279
+ * service amenities. Pass `false` to fall them back into the regular gold
280
+ * badge, or an object to tune the disc / ring. When `amenityBadge` is
281
+ * `false`, information icons are badge-less too unless this is set
282
+ * explicitly.
283
+ */
284
+ informationBadge?: AmenityBadgeStyle | false;
285
+ /**
286
+ * Glyph colour for information icons on their badge. Default white
287
+ * (matches `informationBadge`'s default green disc).
288
+ */
289
+ informationIconColor?: string;
188
290
  styleMode?: 'venueStyleUrl' | 'sdkTemplate';
189
291
  templateOverrideMode?: 'colorsOnly' | 'colorsAndConstants' | 'all';
190
292
  }