@minmaps-dev/mm-web-sdk 1.0.0-rc.29 → 1.0.0-rc.30
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +63 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.ts +14 -0
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/themes/alt3-hybrid-style.json +47 -14
package/dist/index.d.ts
CHANGED
|
@@ -225,7 +225,7 @@ type RoutePoint = {
|
|
|
225
225
|
isEndpoint?: boolean;
|
|
226
226
|
};
|
|
227
227
|
|
|
228
|
-
type WayfindStep = DepartStep | TurnStep | ContinueStep | TransitionStep | ArriveStep;
|
|
228
|
+
type WayfindStep = DepartStep | TurnStep | ContinueStep | TransitionStep$1 | ArriveStep;
|
|
229
229
|
type StepBase = {
|
|
230
230
|
/** Indices into the input `points` array that this step spans. */
|
|
231
231
|
pointRange: [startInclusive: number, endInclusive: number];
|
|
@@ -247,7 +247,7 @@ type TurnStep = StepBase & {
|
|
|
247
247
|
type ContinueStep = StepBase & {
|
|
248
248
|
type: 'continue';
|
|
249
249
|
};
|
|
250
|
-
type TransitionStep = StepBase & {
|
|
250
|
+
type TransitionStep$1 = StepBase & {
|
|
251
251
|
type: 'transition';
|
|
252
252
|
transition: 'elevator' | 'stairs' | 'escalator';
|
|
253
253
|
fromFloorId: number | null;
|
|
@@ -336,6 +336,20 @@ interface SDKOptions {
|
|
|
336
336
|
* mirror their app's `prefers-reduced-motion` state into this.
|
|
337
337
|
*/
|
|
338
338
|
reducedMotion?: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* Whether a freshly computed route auto-highlights its first step's
|
|
341
|
+
* segment (the brighter `route-line-active` overlay). Defaults to
|
|
342
|
+
* `true`, preserving the turn-by-turn segment highlight that
|
|
343
|
+
* `setActiveStep` drives.
|
|
344
|
+
*
|
|
345
|
+
* Set `false` for kiosk-style "show the whole route at once" UIs:
|
|
346
|
+
* the entire route line is shown without singling out one segment,
|
|
347
|
+
* which reads more clearly at a glance and avoids implying the visitor
|
|
348
|
+
* must step through the route. `setActiveStep` still works when called
|
|
349
|
+
* explicitly (e.g. a paginated QR-handoff / mobile flow) — this only
|
|
350
|
+
* controls the automatic highlight on `routeReady`.
|
|
351
|
+
*/
|
|
352
|
+
routeStepHighlight?: boolean;
|
|
339
353
|
initialFloor?: string | number;
|
|
340
354
|
enableInteractions?: boolean;
|
|
341
355
|
customSprite?: string;
|
|
@@ -543,6 +557,14 @@ declare class MinuteMaps {
|
|
|
543
557
|
animate?: boolean;
|
|
544
558
|
duration?: number;
|
|
545
559
|
}): void;
|
|
560
|
+
/**
|
|
561
|
+
* Update the bounds padding (camera insets) used by route + floor fits.
|
|
562
|
+
* Consumers measure their on-screen chrome (panels, rails) and pass the
|
|
563
|
+
* insets so a fit frames the path in the visible, unobscured area rather
|
|
564
|
+
* than under the UI. Stored; the next fit / `refit()` uses it (clamped so
|
|
565
|
+
* a fit always lands — see `clampPadding`).
|
|
566
|
+
*/
|
|
567
|
+
setBoundsPadding(p: BoundsPadding): void;
|
|
546
568
|
private fitToBounds;
|
|
547
569
|
set3dEnabled(enabled: boolean): void;
|
|
548
570
|
toggle3d(): void;
|
|
@@ -841,5 +863,42 @@ declare class MinuteMaps {
|
|
|
841
863
|
}
|
|
842
864
|
declare function createMinuteMapsSDK(config: SDKConfig): MinuteMaps;
|
|
843
865
|
|
|
844
|
-
|
|
845
|
-
|
|
866
|
+
type TransitionStep = Extract<WayfindStep, {
|
|
867
|
+
type: 'transition';
|
|
868
|
+
}>;
|
|
869
|
+
type RouteFloorSection = {
|
|
870
|
+
/** Floor (JACS `mapId`) this section is on. `null` only for a degenerate
|
|
871
|
+
* floorless route (straight-line fallback with no `mapId`). */
|
|
872
|
+
floorId: number | null;
|
|
873
|
+
/** This floor's steps, each with its index into the original flat array
|
|
874
|
+
* so the consumer can call `setActiveStep` / highlight by index. */
|
|
875
|
+
steps: Array<{
|
|
876
|
+
step: WayfindStep;
|
|
877
|
+
index: number;
|
|
878
|
+
}>;
|
|
879
|
+
/** Index of this section's first step in the original array — the target
|
|
880
|
+
* for `setActiveStep` when advancing INTO this section. */
|
|
881
|
+
firstStepIndex: number;
|
|
882
|
+
/** The transition step that leaves this floor for the next section, if
|
|
883
|
+
* any. Absent on the final section. Its `text` ("Take the elevator to
|
|
884
|
+
* Basement") makes a good "continue" button label. */
|
|
885
|
+
exit?: {
|
|
886
|
+
step: TransitionStep;
|
|
887
|
+
index: number;
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
/**
|
|
891
|
+
* Group steps into per-floor sections. Single-floor routes return one
|
|
892
|
+
* section (so a consumer can keep its whole-route view for that case).
|
|
893
|
+
*/
|
|
894
|
+
declare function groupStepsIntoFloorSections(steps: WayfindStep[]): RouteFloorSection[];
|
|
895
|
+
/**
|
|
896
|
+
* Which section is "active" given the active step index — the last section
|
|
897
|
+
* whose `firstStepIndex` is at or before `activeStepIndex`. Returns 0 when
|
|
898
|
+
* nothing matches (e.g. index points at the leading transition, which
|
|
899
|
+
* shouldn't happen since routes start with a depart step).
|
|
900
|
+
*/
|
|
901
|
+
declare function activeSectionIndex(sections: RouteFloorSection[], activeStepIndex: number): number;
|
|
902
|
+
|
|
903
|
+
export { MinuteMaps, activeSectionIndex, createMinuteMapsSDK, groupStepsIntoFloorSections };
|
|
904
|
+
export type { Amenity, AmenityBadgeStyle, AmenityWithFloor, Bounds, BoundsPadding, CameraState, Destination, DestinationChipStyle, EventCallback, Floor, FloorMetadata, JMapAuth, JMapConfig, JacsAuth, JacsConfig, MapEvent, POI, POISearchResult, RouteFloorSection, RoutePoint, RoutingOptions, SDKConfig, SDKOptions, ThemeName, TransitionStep, ViewOptions, WayfindCenterMode, WayfindStep, Waypoint };
|