@mappedin/mappedin-js 6.0.1-alpha.17 → 6.0.1-alpha.19

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.
@@ -1050,42 +1050,17 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-geojson' {
1050
1050
  */
1051
1051
  updateState<T extends Space | MapObject | Label>(target: T, state: TUpdateState<T>): void;
1052
1052
  setHoverColor(c: string): void;
1053
- getHoverColor(): string;
1053
+ getHoverColor(): string | undefined;
1054
1054
  getState(target: Space | Label | MapObject): {
1055
- interactive: boolean;
1056
- hoverColor: string | undefined;
1057
- color: string;
1058
- initialColor: string;
1059
- hover: boolean | undefined;
1060
- opacity: number | undefined;
1055
+ appearance: import("../../geojson/src/components/label").LabelAppearance | undefined;
1056
+ interactive: boolean | undefined;
1057
+ opacity: number;
1058
+ color?: undefined;
1061
1059
  } | {
1062
- appearance: {
1063
- margin: number;
1064
- text: {
1065
- numLines: number;
1066
- lineHeight: number;
1067
- size: number;
1068
- maxWidth: number;
1069
- foregroundColor: string;
1070
- backgroundColor: string;
1071
- };
1072
- marker: {
1073
- size: number;
1074
- foregroundColor: {
1075
- active: string;
1076
- inactive: string;
1077
- };
1078
- backgroundColor: {
1079
- active: string;
1080
- inactive: string;
1081
- };
1082
- iconSize?: number | undefined;
1083
- icon?: string | undefined;
1084
- iconVisibilityThreshold?: number | undefined;
1085
- };
1086
- };
1087
- interactive: boolean;
1060
+ interactive: boolean | undefined;
1061
+ color: string;
1088
1062
  opacity: number;
1063
+ appearance?: undefined;
1089
1064
  } | undefined;
1090
1065
  /**
1091
1066
  * Retrieves the current floor of the map.
@@ -1116,6 +1091,9 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-geojson' {
1116
1091
  * const directions = await map.getDirections(space1, space2);
1117
1092
  */
1118
1093
  getDirections(from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], options?: TGetDirectionsOptions): Directions | undefined;
1094
+ Outdoor: {
1095
+ setStyle: (style: any) => void;
1096
+ };
1119
1097
  }
1120
1098
  }
1121
1099
 
@@ -1760,11 +1738,27 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1760
1738
  */
1761
1739
  accessible?: boolean;
1762
1740
  /**
1763
- * Enable or disable path smoothing.
1741
+ * Enable or disable line-of-sight directions smoothing.
1742
+ * With this option enabled, the directions will be simplified to provide a more visually appealing path and shorter instructions.
1743
+ *
1744
+ * Can be a boolean to enable or disable smoothing, or an object with a radius property to specify the line of sight radius in metres.
1764
1745
  *
1765
1746
  * @default true
1747
+ *
1748
+ * @example
1749
+ * ```ts
1750
+ * // Enable smoothing with a radius of 3 metres
1751
+ * mapView.getDirections(firstSpace, secondSpace, {
1752
+ * smoothing: {
1753
+ * radius: 3,
1754
+ * }
1755
+ * })
1756
+ * ```
1766
1757
  */
1767
- smoothing?: boolean;
1758
+ smoothing?: boolean | {
1759
+ enabled?: boolean;
1760
+ radius: number;
1761
+ };
1768
1762
  };
1769
1763
  /**
1770
1764
  * Options for controlling the behavior of a {@link Marker}.
@@ -6826,6 +6820,23 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types' {
6826
6820
  export type { TOutdoorViewOptions, TOutdoorViewOptionsWithHeaders, TOutdoorViewOptionsWithAuthURL };
6827
6821
  export type { default as BlueDotController } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/BlueDotController';
6828
6822
  export type { default as Journey } from '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Journey';
6823
+ export type TStackedMapsOptions = {
6824
+ /**
6825
+ * The vertical distance between maps in overview, in metres.
6826
+ * @default 50
6827
+ */
6828
+ verticalDistanceBetweenMaps?: number;
6829
+ /**
6830
+ * Whether to show map level labels in overview.
6831
+ * @default true
6832
+ */
6833
+ mapLabels?: boolean;
6834
+ /**
6835
+ * Whether to show only Journey maps in the stack if a Journey is active and the current map is part of the Journey.
6836
+ * @default true
6837
+ */
6838
+ prioritizeJourneyMaps?: boolean;
6839
+ };
6829
6840
  }
6830
6841
 
6831
6842
  declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/json-scene-loader' {
@@ -9562,142 +9573,126 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9562
9573
  import { MappedinDirections, MappedinMap, MappedinNode } from '@mappedin/mappedin-js/packages/get-venue';
9563
9574
  import { STACKED_MAPS_STATE, MapViewScene, MapViewStackScene, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9564
9575
  import type { ICore, TCameraTransform } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9576
+ import { TStackedMapsOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
9565
9577
  enum ACTION {
9566
- enable = "enable",
9567
- disable = "disable",
9568
- showOverview = "showOverview",
9569
- zoomInToMap = "zoomInToMap",
9570
- scrollToMap = "scrollToMap",
9571
- restack = "restack"
9578
+ enable = "enable",
9579
+ disable = "disable",
9580
+ showOverview = "showOverview",
9581
+ zoomInToMap = "zoomInToMap",
9582
+ scrollToMap = "scrollToMap",
9583
+ restack = "restack"
9572
9584
  }
9573
9585
  type TTargetTransitionFunction = ((options: TParams) => () => Promise<void>) | ((options: TParams) => void);
9574
9586
  type TParams = {
9575
- map: MappedinMap;
9587
+ map: MappedinMap;
9576
9588
  } | {
9577
- directions: MappedinDirections | MappedinDirections[];
9589
+ directions: MappedinDirections | MappedinDirections[];
9578
9590
  } | {
9579
- stackScene: MapViewStackScene;
9580
- directions: MappedinDirections | MappedinDirections[];
9581
- verticalDistanceBetweenMaps?: number;
9591
+ stackScene: MapViewStackScene;
9592
+ directions: MappedinDirections | MappedinDirections[];
9593
+ verticalDistanceBetweenMaps?: number;
9582
9594
  } | {
9583
- stackScene: MapViewStackScene;
9584
- verticalDistanceBetweenMaps?: number;
9585
- map: MappedinMap;
9586
- nodes: MappedinNode[];
9595
+ stackScene: MapViewStackScene;
9596
+ verticalDistanceBetweenMaps?: number;
9597
+ map: MappedinMap;
9598
+ nodes: MappedinNode[];
9587
9599
  } | {
9588
- stackScene: MapViewStackScene;
9589
- map: MappedinMap;
9590
- nodes: MappedinNode[];
9591
- rotation: number;
9592
- cameraTransform?: TCameraTransform;
9593
- verticalDistanceBetweenMaps?: number;
9600
+ stackScene: MapViewStackScene;
9601
+ map: MappedinMap;
9602
+ nodes: MappedinNode[];
9603
+ rotation: number;
9604
+ cameraTransform?: TCameraTransform;
9605
+ verticalDistanceBetweenMaps?: number;
9594
9606
  };
9595
9607
  type TActionFn = [STACKED_MAPS_STATE, TTargetTransitionFunction[]];
9596
9608
  type TState = {
9597
- [stateName in STACKED_MAPS_STATE]?: {
9598
- actions: {
9599
- [actionName in ACTION]?: TActionFn;
9600
- };
9609
+ [stateName in STACKED_MAPS_STATE]?: {
9610
+ actions: {
9611
+ [actionName in ACTION]?: TActionFn;
9601
9612
  };
9613
+ };
9602
9614
  };
9603
9615
  export type TInternalTransitionOptions = {
9604
- animate?: boolean;
9605
- };
9606
- export type TStackedMapsOptions = {
9607
- /**
9608
- * The vertical distance between maps in overview, in metres.
9609
- * @default 50
9610
- */
9611
- verticalDistanceBetweenMaps?: number;
9612
- /**
9613
- * Whether to show map level labels in overview.
9614
- * @default true
9615
- */
9616
- mapLabels?: boolean;
9617
- /**
9618
- * Whether to show only Journey maps in the stack if a Journey is active and the current map is part of the Journey.
9619
- * @default true
9620
- */
9621
- prioritizeJourneyMaps?: boolean;
9616
+ animate?: boolean;
9622
9617
  };
9623
9618
  class StackedMapsController {
9624
- #private;
9625
- options: TStackedMapsOptions;
9626
- enabled: boolean;
9627
- stackScene: MapViewStackScene;
9628
- constructor(core: ICore);
9629
- needsUpdate: boolean;
9630
- currentState: STACKED_MAPS_STATE;
9631
- mapsInStack: MappedinMap[];
9632
- getZoomIntoMapOptions: (params: TParams) => (MapViewScene | {
9633
- activeMap: MappedinMap;
9634
- focusOn: {
9635
- targets: {
9636
- nodes: MappedinNode[];
9637
- };
9638
- options: {
9639
- zoom?: number | undefined;
9640
- tilt: number;
9641
- rotation: number;
9642
- position?: MappedinNode | import("../../internal").MappedinCoordinate | undefined;
9643
- easing: CAMERA_EASING_MODE;
9644
- };
9645
- };
9646
- })[] | undefined;
9647
- getDisableOptions: (params: TParams) => (MapViewScene | {
9648
- activeMap: MappedinMap;
9649
- })[] | undefined;
9650
- getShowOverviewOptions: (params: TParams) => (MapViewStackScene | {
9651
- activeMap: MappedinMap;
9652
- focusOn: {
9653
- options: {
9654
- tilt: number;
9655
- duration: number;
9656
- };
9657
- };
9658
- verticalDistanceBetweenMaps: number | undefined;
9659
- })[] | undefined;
9660
- getScrollToMapOptions: (params: TParams) => (MapViewStackScene | {
9661
- focusOn: {
9662
- targets: {
9663
- nodes: MappedinNode[];
9664
- };
9665
- options: {
9666
- tilt: number;
9667
- easing: CAMERA_EASING_MODE;
9668
- };
9669
- };
9670
- activeMap: MappedinMap;
9671
- })[] | undefined;
9672
- getRestackOptions: (params: TParams) => (MapViewStackScene | {
9673
- activeMap: MappedinMap;
9674
- focusOn: {
9675
- options: {
9676
- tilt: number;
9677
- duration: number;
9678
- };
9679
- };
9680
- verticalDistanceBetweenMaps: number | undefined;
9681
- })[] | undefined;
9682
- getEnableOptions: () => void;
9683
- getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9684
- getZoomInToMapTransition: (options: any) => () => Promise<void>;
9685
- getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9686
- getRestackTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9687
- getDisableTransition: (options: any) => () => Promise<void>;
9688
- getEnableTransition: () => () => void;
9689
- states: TState;
9690
- get determineMapStack(): MappedinMap[];
9691
- transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void;
9692
- exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise<void>;
9693
- disable: () => Promise<void>;
9694
- enable: (opts?: TStackedMapsOptions) => Promise<void>;
9695
- get nodesInJourneyOrMap(): any[];
9696
- showOverview: () => Promise<void>;
9697
- scrollToMap: (map: MappedinMap) => Promise<void>;
9698
- restack: (options?: TStackedMapsOptions) => Promise<void>;
9699
- zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
9700
- get currentMap(): MappedinMap;
9619
+ #private;
9620
+ options: TStackedMapsOptions;
9621
+ enabled: boolean;
9622
+ stackScene: MapViewStackScene;
9623
+ constructor(core: ICore);
9624
+ needsUpdate: boolean;
9625
+ currentState: STACKED_MAPS_STATE;
9626
+ mapsInStack: MappedinMap[];
9627
+ getZoomIntoMapOptions: (params: TParams) => (MapViewScene | {
9628
+ activeMap: MappedinMap;
9629
+ focusOn: {
9630
+ targets: {
9631
+ nodes: MappedinNode[];
9632
+ };
9633
+ options: {
9634
+ zoom?: number | undefined;
9635
+ tilt: number;
9636
+ rotation: number;
9637
+ position?: MappedinNode | import("../../internal").MappedinCoordinate | undefined;
9638
+ easing: CAMERA_EASING_MODE;
9639
+ };
9640
+ };
9641
+ })[] | undefined;
9642
+ getDisableOptions: (params: TParams) => (MapViewScene | {
9643
+ activeMap: MappedinMap;
9644
+ })[] | undefined;
9645
+ getShowOverviewOptions: (params: TParams) => (MapViewStackScene | {
9646
+ activeMap: MappedinMap;
9647
+ focusOn: {
9648
+ options: {
9649
+ tilt: number;
9650
+ duration: number;
9651
+ };
9652
+ };
9653
+ verticalDistanceBetweenMaps: number | undefined;
9654
+ })[] | undefined;
9655
+ getScrollToMapOptions: (params: TParams) => (MapViewStackScene | {
9656
+ focusOn: {
9657
+ targets: {
9658
+ nodes: MappedinNode[];
9659
+ };
9660
+ options: {
9661
+ tilt: number;
9662
+ easing: CAMERA_EASING_MODE;
9663
+ };
9664
+ };
9665
+ activeMap: MappedinMap;
9666
+ })[] | undefined;
9667
+ getRestackOptions: (params: TParams) => (MapViewStackScene | {
9668
+ activeMap: MappedinMap;
9669
+ focusOn: {
9670
+ options: {
9671
+ tilt: number;
9672
+ duration: number;
9673
+ };
9674
+ };
9675
+ verticalDistanceBetweenMaps: number | undefined;
9676
+ })[] | undefined;
9677
+ getEnableOptions: () => void;
9678
+ getShowOverviewTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9679
+ getZoomInToMapTransition: (options: any) => () => Promise<void>;
9680
+ getScrollToMapTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9681
+ getRestackTransition: (options: any, inTransit?: boolean) => () => Promise<void>;
9682
+ getDisableTransition: (options: any) => () => Promise<void>;
9683
+ getEnableTransition: () => () => void;
9684
+ states: TState;
9685
+ get determineMapStack(): MappedinMap[];
9686
+ transition(currentState: STACKED_MAPS_STATE, actionName: ACTION): TTargetTransitionFunction[] | void;
9687
+ exec(transitions: TTargetTransitionFunction[] | void, params: TParams): Promise<void>;
9688
+ disable: () => Promise<void>;
9689
+ enable: (opts?: TStackedMapsOptions) => Promise<void>;
9690
+ get nodesInJourneyOrMap(): any[];
9691
+ showOverview: () => Promise<void>;
9692
+ scrollToMap: (map: MappedinMap) => Promise<void>;
9693
+ restack: (options?: TStackedMapsOptions) => Promise<void>;
9694
+ zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
9695
+ get currentMap(): MappedinMap;
9701
9696
  }
9702
9697
  export default StackedMapsController;
9703
9698
  }
@@ -14328,8 +14323,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Camera
14328
14323
 
14329
14324
  declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/StackedMaps' {
14330
14325
  import { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
14326
+ import { TStackedMapsOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
14331
14327
  import { STACKED_MAPS_STATE, StackedMapsController, TCameraTransform } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
14332
- import { TStackedMapsOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/StackedMapsController';
14333
14328
  /**
14334
14329
  * @experimental
14335
14330
  * API for showing multiple maps involved in a {@link Journey} as a vertical stack.
@@ -14342,7 +14337,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
14342
14337
  constructor(markersController: StackedMapsController);
14343
14338
  /**
14344
14339
  * @experimental
14345
- * Enable Stacked Maps. A {@link Journey} must be drawn beforehand or this method will fail.
14340
+ * Enable Stacked Maps. If a {@link Journey} is drawn beforehand the default behaviour is to only display the floors that are part of the journey.
14341
+ * {@link TStackedMapsOptions} can be used to enabling display of all maps including those that are not part of the journey.
14346
14342
  * Use {@link showOverview} to expand the maps vertically after enabling.
14347
14343
  *
14348
14344
  * Upon enabling, map state will become {@link STATE.STACKED | STACKED} and Stacked Maps state will become {@link STACKED_MAPS_STATE.ACTIVE | ACTIVE}.
@@ -14380,7 +14376,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
14380
14376
  /**
14381
14377
  * @experimental
14382
14378
  *
14383
- * Expand the maps in the current {@link Journey} vertically and add vertical paths between connections.
14379
+ * Expand and display all maps in the current {@link MapGroup}. If a {@link Journey} has been drawn, vertical paths between connections are displayed.
14384
14380
  * Stacked Maps must be enabled beforehand and state will become {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW}.
14385
14381
  *
14386
14382
  * @example
@@ -14435,7 +14431,8 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
14435
14431
  * @experimental
14436
14432
  *
14437
14433
  * Used when in {@link STACKED_MAPS_STATE.OVERVIEW | OVERVIEW} state to replace the maps in the
14438
- * current stack if there is a new Journey or Journey is cleared.
14434
+ * current stack after clearing or creating a {@link Journey}.
14435
+ * Use this to hide maps that are not part of the journey or to display all maps in the {@link MapGroup}.
14439
14436
  *
14440
14437
  * @param options - Options to adjust the overview. Each option defaults to the setting passed in {@link enable}, unless provided.
14441
14438
  *