@mappedin/mappedin-js 6.0.1-alpha.20 → 6.0.1-alpha.22

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.
@@ -3,9 +3,13 @@
3
3
  // ../maker/@mappedin/mvf
4
4
  // ../maker/geojson
5
5
  // ../maker/three
6
+ // ../maker/@mappedin/core-sdk
7
+ // ../maker/@mappedin/core-sdk/src/camera
6
8
  // ../maker/minisearch
7
9
  // ../maker/@turf/turf
8
10
  // ../maker/@tweenjs/tween.js
11
+ // ../maker/lil-gui
12
+ // ../maker/@packages/internal/common
9
13
  // ../maker/n8ao
10
14
  // ../maker/postprocessing
11
15
 
@@ -828,6 +832,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects' {
828
832
  import Hyperlink from '@mappedin/mappedin-js/maker/src/map-data-objects/hyperlink';
829
833
  import Image from '@mappedin/mappedin-js/maker/src/map-data-objects/image';
830
834
  import { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap } from '@mappedin/mvf';
835
+ import { MapDataObjects } from '@mappedin/mappedin-js/maker/src/map-data-objects/types';
831
836
  /**
832
837
  * Internal class representing detailed map data.
833
838
  *
@@ -932,6 +937,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects' {
932
937
  getById(type: 'object', id: string): MapObject | undefined;
933
938
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
934
939
  getById(type: 'annotation', id: string): Annotation | undefined;
940
+ getMapDataById(id: string): MapDataObjects | undefined;
935
941
  /**
936
942
  * Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
937
943
  *
@@ -956,6 +962,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects' {
956
962
  }
957
963
  export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, };
958
964
  export type { TSpaceType } from '@mappedin/mappedin-js/maker/src/map-data-objects/space';
965
+ export type { MapDataObjects };
959
966
  }
960
967
 
961
968
  declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/WatermarkController' {
@@ -1030,18 +1037,20 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-geojson' {
1030
1037
  import { GeoJSONTEvents as TEvents } from '@mappedin/mappedin-js/maker/src/events';
1031
1038
  import { Floor, MapObject, Space } from '@mappedin/mappedin-js/maker/src/map-data-objects';
1032
1039
  import MapData from '@mappedin/mappedin-js/maker/src/map-data';
1033
- import { ICamera, ILabels, IMapView, IMarkers, IPaths, TUpdateState, INavigation, TNavigationTarget, TGetDirectionsOptions } from '@mappedin/mappedin-js/maker/src/map-view-interface';
1034
- import { Directions, Label } from '@mappedin/mappedin-js/maker/src/map-view-objects';
1040
+ import { ICamera, IMapView, IMarkers, IPaths, TUpdateState, INavigation, TNavigationTarget, TGetDirectionsOptions, TGeometryState, TLabelState, TMarkerState } from '@mappedin/mappedin-js/maker/src/map-view-interface';
1041
+ import { Directions, Label, Marker } from '@mappedin/mappedin-js/maker/src/map-view-objects';
1042
+ import type { RendererCore } from '@mappedin/core-sdk';
1043
+ import { LabelsApi } from '@mappedin/mappedin-js/maker/src/api-geojson/labels';
1044
+ import { Inspector } from '@mappedin/mappedin-js/maker/src/api-geojson';
1035
1045
  /**
1036
1046
  * Represents a map with all the interactive features, controls, and actions.
1037
1047
  */
1038
1048
  export class MapViewGeoJson extends PubSub<TEvents> implements IMapView {
1039
- #private;
1040
1049
  /**
1041
1050
  * Controls for the map's labels *{@link ILabels}).
1042
1051
  * @type {ILabels}
1043
1052
  */
1044
- Labels: ILabels;
1053
+ Labels: LabelsApi;
1045
1054
  /**
1046
1055
  * Controls for the map's markers ({@link IMarkers}).
1047
1056
  * @type {IMarkers}
@@ -1062,6 +1071,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-geojson' {
1062
1071
  * @type {INavigation}
1063
1072
  */
1064
1073
  Navigation: INavigation;
1074
+ Inspector: Inspector;
1065
1075
  /**
1066
1076
  * Constructs a {@link MapView} instance
1067
1077
  *
@@ -1069,7 +1079,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-geojson' {
1069
1079
  * @param options The options to customize the map display.
1070
1080
  * @internal
1071
1081
  */
1072
- constructor(el: HTMLElement, options?: any);
1082
+ constructor(rendererCore: RendererCore);
1073
1083
  /**
1074
1084
  * @internal - unused until we use GeoJSON API underneath
1075
1085
  */
@@ -1091,20 +1101,11 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-geojson' {
1091
1101
  * // Update the color of a space to red.
1092
1102
  * map.updateState(space, { color: 'red' });
1093
1103
  */
1094
- updateState<T extends Space | MapObject | Label>(target: T, state: TUpdateState<T>): void;
1104
+ updateState<T extends Space | MapObject | Label | Marker | string>(target: T, state: TUpdateState<T>): void;
1095
1105
  setHoverColor(c: string): void;
1096
- getHoverColor(): string | undefined;
1097
- getState(target: Space | Label | MapObject): {
1098
- appearance: import("../../geojson/src/components/label").LabelAppearance | undefined;
1099
- interactive: boolean | undefined;
1100
- opacity: number;
1101
- color?: undefined;
1102
- } | {
1103
- interactive: boolean | undefined;
1104
- color: string;
1105
- opacity: number;
1106
- appearance?: undefined;
1107
- } | undefined;
1106
+ getHoverColor(): any;
1107
+ getState(id: string): TGeometryState | TLabelState | undefined;
1108
+ getState(target: Space | Label | Marker | MapObject): TGeometryState | TLabelState | TMarkerState;
1108
1109
  /**
1109
1110
  * Retrieves the current floor of the map.
1110
1111
  *
@@ -1144,6 +1145,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1144
1145
  import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection } from '@mappedin/mappedin-js/maker/src/map-data-objects';
1145
1146
  import { Label, Marker, Path, Directions } from '@mappedin/mappedin-js/maker/src/map-view-objects';
1146
1147
  import type { MapData, TNavigationOptions } from '@mappedin/mappedin-js/maker/src';
1148
+ import { EasingCurve } from '@mappedin/core-sdk/src/camera';
1147
1149
  /**
1148
1150
  * Interface defining the controls and actions for a label on the map.
1149
1151
  */
@@ -1158,6 +1160,20 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1158
1160
  */
1159
1161
  readonly __type: 'Label';
1160
1162
  }
1163
+ /**
1164
+ * Interface defining the controls and actions for a label on the map.
1165
+ */
1166
+ export interface IMarker {
1167
+ /**
1168
+ * Label's id
1169
+ */
1170
+ id: string;
1171
+ /**
1172
+ * Label's internal type
1173
+ * @internal
1174
+ */
1175
+ readonly __type: 'Marker';
1176
+ }
1161
1177
  /**
1162
1178
  * Interface defining the controls and actions for labels ({@link Label}) on the map.
1163
1179
  */
@@ -1171,7 +1187,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1171
1187
  * // Add all the labels to the map
1172
1188
  * map.Labels.all();
1173
1189
  */
1174
- all: () => void;
1190
+ all: () => Label[];
1175
1191
  /**
1176
1192
  * Adds a label to the map.
1177
1193
  *
@@ -1198,7 +1214,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1198
1214
  * @example
1199
1215
  * map.Labels.removeAll();
1200
1216
  */
1201
- removeAll: () => void;
1217
+ removeAll: () => Label[];
1202
1218
  }
1203
1219
  /**
1204
1220
  * Interface defining the controls and actions for markers ({@link Marker}) on the map.
@@ -1230,7 +1246,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1230
1246
  * @example
1231
1247
  * map.Markers.removeAll();
1232
1248
  */
1233
- removeAll: () => void;
1249
+ removeAll: () => Marker[];
1234
1250
  }
1235
1251
  /**
1236
1252
  * Interface defining the controls and actions for paths ({@link Path}) on the map.
@@ -1279,6 +1295,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1279
1295
  * Defines the state for a label when its appearance is updated.
1280
1296
  */
1281
1297
  export type TLabelState = {
1298
+ type: 'label';
1282
1299
  /**
1283
1300
  * Appearance settings for the label.
1284
1301
  */
@@ -1287,11 +1304,25 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1287
1304
  * Priority level of the label, used for determining display order.
1288
1305
  */
1289
1306
  priority: number | 'initial';
1307
+ interactive: boolean;
1308
+ };
1309
+ export type TMarkerState = {
1310
+ type: 'marker';
1311
+ /**
1312
+ * HTML element for the marker.
1313
+ */
1314
+ element: HTMLElement;
1315
+ /**
1316
+ * Priority level of the marker, used for determining display order.
1317
+ */
1318
+ priority: number | 'initial';
1319
+ interactive: boolean;
1290
1320
  };
1291
1321
  /**
1292
1322
  * Defines the state for geometry elements like {@link Space} when updated.
1293
1323
  */
1294
1324
  export type TGeometryState = {
1325
+ type: 'geometry';
1295
1326
  /**
1296
1327
  * Color of the geometry element. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1297
1328
  */
@@ -1308,7 +1339,8 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1308
1339
  /**
1309
1340
  * The type for updating the state of map elements (colors, texts, etc.).
1310
1341
  */
1311
- export type TUpdateState<T> = T extends ILabel ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : never;
1342
+ export type TUpdateState<T> = T extends IMarker ? Partial<TMarkerState> : T extends ILabel ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
1343
+ export type TGetState<T> = T extends Marker ? TMarkerState : T extends Label ? TLabelState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | undefined : never;
1312
1344
  /**
1313
1345
  * Options for {@link ICamera} animations on the map.
1314
1346
  */
@@ -1320,7 +1352,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1320
1352
  /**
1321
1353
  * Easing function to use for the animation.
1322
1354
  */
1323
- easing?: TEasingFunction;
1355
+ easing?: EasingCurve;
1324
1356
  };
1325
1357
  /**
1326
1358
  * Types of easing for animations.
@@ -1755,7 +1787,7 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-interface' {
1755
1787
  * - `fill` will stretch the icon to fill the marker.
1756
1788
  * - `cover` will maintain aspect ratio and fill the marker.
1757
1789
  * - `contain` will maintain aspect ratio and fit the icon inside the marker.
1758
- * @default 'fill'
1790
+ * @default 'cover'
1759
1791
  */
1760
1792
  iconFit?: 'contain' | 'fill' | 'cover';
1761
1793
  /**
@@ -4968,6 +5000,18 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/image' {
4968
5000
  export default Image;
4969
5001
  }
4970
5002
 
5003
+ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/types' {
5004
+ import Door from '@mappedin/mappedin-js/maker/src/map-data-objects/door';
5005
+ import Floor from '@mappedin/mappedin-js/maker/src/map-data-objects/floor';
5006
+ import Node from '@mappedin/mappedin-js/maker/src/map-data-objects/node';
5007
+ import Space from '@mappedin/mappedin-js/maker/src/map-data-objects/space';
5008
+ import PointOfInterest from '@mappedin/mappedin-js/maker/src/map-data-objects/poi';
5009
+ import Annotation from '@mappedin/mappedin-js/maker/src/map-data-objects/annotation';
5010
+ import Connection from '@mappedin/mappedin-js/maker/src/map-data-objects/connection';
5011
+ import MapObject from '@mappedin/mappedin-js/maker/src/map-data-objects/object';
5012
+ export type MapDataObjects = Space | Floor | Node | Door | Connection | MapObject | PointOfInterest | Annotation;
5013
+ }
5014
+
4971
5015
  declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core.interface' {
4972
5016
  import { Color, Vector2, Vector3, Mesh } from 'three';
4973
5017
  import type { TPadding, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TileManager, BillboardManager, StackedMapsController, SmartCollisionEngine, OutdoorViewController, LayerController } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
@@ -5251,6 +5295,36 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/Core.inte
5251
5295
  }
5252
5296
  }
5253
5297
 
5298
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson/labels' {
5299
+ import { ILabels, TAddLabelOptions } from '@mappedin/mappedin-js/maker/src/map-view-interface';
5300
+ import { Label } from '@mappedin/mappedin-js/maker/src/map-view-objects';
5301
+ import { GeojsonApiMapObject } from '@mappedin/mappedin-js/maker/src/api-geojson/map-object';
5302
+ import { PointOfInterest, MapObject } from '@mappedin/mappedin-js/maker/src';
5303
+ import { Space, Door, Coordinate } from '@mappedin/mappedin-js/maker/src/map-data-objects';
5304
+ export class LabelsApi implements ILabels {
5305
+ get currentMap(): GeojsonApiMapObject | undefined;
5306
+ constructor({ currentMapGetter }: {
5307
+ currentMapGetter: CurrentMapGetter;
5308
+ });
5309
+ getById(id: string): {
5310
+ label: Label;
5311
+ entityId: string;
5312
+ } | undefined;
5313
+ add(target: Space | Door | Coordinate | PointOfInterest | MapObject, text: string, options?: TAddLabelOptions | undefined): Label;
5314
+ all(): Label[];
5315
+ remove(label: Label): void;
5316
+ removeAll(): Label[];
5317
+ }
5318
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
5319
+ export {};
5320
+ }
5321
+
5322
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson' {
5323
+ export { GeoJsonApi } from '@mappedin/mappedin-js/maker/src/api-geojson/api';
5324
+ export { convertPriorityToCollisionTier } from '@mappedin/mappedin-js/maker/src/api-geojson/utils';
5325
+ export { Inspector } from '@mappedin/mappedin-js/maker/src/api-geojson/inspector';
5326
+ }
5327
+
5254
5328
  declare module '@mappedin/mappedin-js/maker/src/map-view-objects/label' {
5255
5329
  import { ILabel } from '@mappedin/mappedin-js/maker/src/map-view-interface';
5256
5330
  /**
@@ -5294,7 +5368,11 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects/marker' {
5294
5368
  /**
5295
5369
  * @internal
5296
5370
  */
5297
- readonly __type: 'Marker';
5371
+ static readonly __type = "Marker";
5372
+ /**
5373
+ * @internal
5374
+ */
5375
+ readonly __type = "Marker";
5298
5376
  /**
5299
5377
  * The HTML element that represents the marker.
5300
5378
  */
@@ -5303,6 +5381,13 @@ declare module '@mappedin/mappedin-js/maker/src/map-view-objects/marker' {
5303
5381
  * Updates the marker's position on the map.
5304
5382
  */
5305
5383
  readonly update: () => void;
5384
+ /**
5385
+ * Checks if the provided instance is of type Label.
5386
+ *
5387
+ * @param instance The instance to check.
5388
+ * @returns {boolean} True if the instance is a Label, false otherwise.
5389
+ */
5390
+ static is(instance: object): instance is Marker;
5306
5391
  /**
5307
5392
  * @internal
5308
5393
  */
@@ -6916,29 +7001,33 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/internal/json-sce
6916
7001
  import { MappedinMap, MappedinPolygon } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
6917
7002
  import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.enums';
6918
7003
  class JSONSceneLoader {
6919
- defaultExtrudeSettings: {
6920
- amount: number;
6921
- bevelEnabled: boolean;
6922
- };
6923
- materials: {};
6924
- scale: number;
6925
- assetManager: DefaultAssetManager;
6926
- setAssetManager<T extends DefaultAssetManager>(am: T): void;
6927
- overlayHeight: number;
6928
- /**
6929
- Takes in either an object containing polygons and generates a 3D scene based
6930
- on it, or a string URL to fetch those polygons from.
6931
- **/
6932
- load(polygons: string | MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE): Promise<{
6933
- container: Group<import("three").Object3DEventMap>;
6934
- elements: (Element | null)[];
6935
- visibleLayers: Set<unknown>;
6936
- }>;
6937
- _build(polygons: MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE): Promise<{
6938
- container: Group<import("three").Object3DEventMap>;
6939
- elements: (Element | null)[];
6940
- visibleLayers: Set<unknown>;
6941
- }>;
7004
+ defaultExtrudeSettings: {
7005
+ amount: number;
7006
+ bevelEnabled: boolean;
7007
+ };
7008
+ materials: {};
7009
+ scale: number;
7010
+ assetManager: DefaultAssetManager;
7011
+ setAssetManager<T extends DefaultAssetManager>(am: T): void;
7012
+ overlayHeight: number;
7013
+ /**
7014
+ Takes in either an object containing polygons and generates a 3D scene based
7015
+ on it, or a string URL to fetch those polygons from.
7016
+ **/
7017
+ load(polygons: string | MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE, allLayersVisible?: boolean): Promise<{
7018
+ container: Group<import("three").Object3DEventMap>;
7019
+ elements: (Element | null)[];
7020
+ visibleLayers: Set<unknown>;
7021
+ }>;
7022
+ _build(polygons: MappedinPolygon[], mapClass: MappedinMap, mapLoadingStrategy?: MAP_RENDER_MODE,
7023
+ /**
7024
+ * If true, sets all layers to be visible. If false, uses the layer visibility from the mapClass.
7025
+ */
7026
+ allLayersVisible?: boolean): Promise<{
7027
+ container: Group<import("three").Object3DEventMap>;
7028
+ elements: (Element | null)[];
7029
+ visibleLayers: Set<unknown>;
7030
+ }>;
6942
7031
  }
6943
7032
  const _default: JSONSceneLoader;
6944
7033
  export default _default;
@@ -9686,7 +9775,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9686
9775
  declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controllers/StackedMapsController' {
9687
9776
  import { MappedinDirections, MappedinMap, MappedinNode } from '@mappedin/mappedin-js/packages/get-venue';
9688
9777
  import { STACKED_MAPS_STATE, MapViewScene, MapViewStackScene, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9689
- import type { ICore, TCameraTransform } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9778
+ import type { ICore, TCameraTransform, TCameraAnimationOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
9690
9779
  import { TStackedMapsOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
9691
9780
  enum ACTION {
9692
9781
  enable = "enable",
@@ -9705,18 +9794,24 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9705
9794
  stackScene: MapViewStackScene;
9706
9795
  directions: MappedinDirections | MappedinDirections[];
9707
9796
  verticalDistanceBetweenMaps?: number;
9797
+ animationOptions?: TCameraAnimationOptions;
9708
9798
  } | {
9709
9799
  stackScene: MapViewStackScene;
9710
9800
  verticalDistanceBetweenMaps?: number;
9711
9801
  map: MappedinMap;
9712
9802
  nodes: MappedinNode[];
9803
+ cameraOptions?: TCameraTransform & TCameraAnimationOptions;
9804
+ duration?: number;
9805
+ animationOptions?: TCameraAnimationOptions;
9713
9806
  } | {
9714
9807
  stackScene: MapViewStackScene;
9715
9808
  map: MappedinMap;
9716
9809
  nodes: MappedinNode[];
9717
9810
  rotation: number;
9718
- cameraTransform?: TCameraTransform;
9811
+ cameraOptions?: TCameraTransform & TCameraAnimationOptions;
9719
9812
  verticalDistanceBetweenMaps?: number;
9813
+ duration?: number;
9814
+ animationOptions?: TCameraAnimationOptions;
9720
9815
  };
9721
9816
  type TActionFn = [STACKED_MAPS_STATE, TTargetTransitionFunction[]];
9722
9817
  type TState = {
@@ -9749,6 +9844,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9749
9844
  tilt: number;
9750
9845
  rotation: number;
9751
9846
  position?: MappedinNode | import("../../internal").MappedinCoordinate | undefined;
9847
+ duration?: number | undefined;
9752
9848
  easing: CAMERA_EASING_MODE;
9753
9849
  };
9754
9850
  };
@@ -9760,8 +9856,9 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9760
9856
  activeMap: MappedinMap;
9761
9857
  focusOn: {
9762
9858
  options: {
9763
- tilt: number;
9764
9859
  duration: number;
9860
+ easing?: CAMERA_EASING_MODE | undefined;
9861
+ tilt: number;
9765
9862
  };
9766
9863
  };
9767
9864
  verticalDistanceBetweenMaps: number | undefined;
@@ -9777,6 +9874,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9777
9874
  };
9778
9875
  };
9779
9876
  activeMap: MappedinMap;
9877
+ duration: number | undefined;
9780
9878
  })[] | undefined;
9781
9879
  getRestackOptions: (params: TParams) => (MapViewStackScene | {
9782
9880
  activeMap: MappedinMap;
@@ -9802,10 +9900,10 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/private/controlle
9802
9900
  disable: () => Promise<void>;
9803
9901
  enable: (opts?: TStackedMapsOptions) => Promise<void>;
9804
9902
  get nodesInJourneyOrMap(): any[];
9805
- showOverview: () => Promise<void>;
9806
- scrollToMap: (map: MappedinMap) => Promise<void>;
9903
+ showOverview: (animationOptions?: TCameraAnimationOptions) => Promise<void>;
9904
+ scrollToMap: (map: MappedinMap, duration?: number) => Promise<void>;
9807
9905
  restack: (options?: TStackedMapsOptions) => Promise<void>;
9808
- zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
9906
+ zoomInToMap: (map: MappedinMap, cameraOptions?: TCameraTransform & TCameraAnimationOptions) => Promise<void>;
9809
9907
  get currentMap(): MappedinMap;
9810
9908
  }
9811
9909
  export default StackedMapsController;
@@ -12977,6 +13075,139 @@ declare module '@mappedin/mappedin-js/maker/src/map-data-objects/base-metadata-o
12977
13075
  }
12978
13076
  }
12979
13077
 
13078
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson/map-object' {
13079
+ import { ParsedMVF } from '@mappedin/mvf';
13080
+ import { FloorObject } from '@mappedin/mappedin-js/maker/src/api-geojson/floor-object';
13081
+ import { Position } from '@mappedin/core-sdk';
13082
+ import { TAddMarkerOptions } from '@mappedin/mappedin-js/maker/src';
13083
+ import { AddLabelOptions, Geometry2D, RendererCore } from '@mappedin/core-sdk';
13084
+ export class GeojsonApiMapObject {
13085
+ floors: FloorObject[];
13086
+ currentFloorId: string;
13087
+ renderer: RendererCore;
13088
+ mvf: ParsedMVF;
13089
+ get currentFloor(): FloorObject;
13090
+ setFloor(floorId: string): void;
13091
+ Markers: {
13092
+ add: (coordinate: Position, html: string, opts?: TAddMarkerOptions & {
13093
+ floorId?: string;
13094
+ }) => import("@mappedin/core-sdk").Marker;
13095
+ remove: (_id: string) => void;
13096
+ getContentEl: (id: string) => any;
13097
+ removeAll: () => void;
13098
+ all({ onCreate }: {
13099
+ onCreate: (entity: Geometry2D) => void;
13100
+ }): void;
13101
+ };
13102
+ Labels: {
13103
+ all: ({ onCreate }: {
13104
+ onCreate: (labelId: string | number, text: string) => void;
13105
+ }) => void;
13106
+ add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
13107
+ floorId?: string;
13108
+ }) => {
13109
+ id: string | number;
13110
+ type: 'label';
13111
+ };
13112
+ remove: (targetId: string) => void;
13113
+ removeAll: () => void;
13114
+ };
13115
+ Paths: {
13116
+ add: (coordinates: {
13117
+ floor: string;
13118
+ longitude: number;
13119
+ latitude: number;
13120
+ }[]) => void;
13121
+ };
13122
+ constructor(id: string, mvf: any, renderer: RendererCore);
13123
+ }
13124
+ }
13125
+
13126
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson/api' {
13127
+ /**
13128
+ * integrating V6 api
13129
+ * Note:
13130
+ * - We are not handling multi-building yet
13131
+ */
13132
+ import MapData from '@mappedin/mappedin-js/maker/src/map-data';
13133
+ import { Coordinate, Floor, MapDataInternal, Space, MapObject } from '@mappedin/mappedin-js/maker/src/map-data-objects';
13134
+ import { ICamera, IMapView, INavigation, TGetState, TUpdateState } from '@mappedin/mappedin-js/maker/src/map-view-interface';
13135
+ import { CameraTransform, Label, Marker, Path } from '@mappedin/mappedin-js/maker/src/map-view-objects';
13136
+ import { RendererCore, InteractionPayload } from '@mappedin/core-sdk';
13137
+ import { GeojsonApiMapObject } from '@mappedin/mappedin-js/maker/src/api-geojson/map-object';
13138
+ import GUI from 'lil-gui';
13139
+ import { PubSub } from '@packages/internal/common';
13140
+ import { LabelsApi } from '@mappedin/mappedin-js/maker/src/api-geojson/labels';
13141
+ import { MarkersApi } from '@mappedin/mappedin-js/maker/src/api-geojson/markers';
13142
+ export class GeoJsonApi extends PubSub<{
13143
+ 'camera-change': CameraTransform;
13144
+ hover: InteractionPayload;
13145
+ click: InteractionPayload;
13146
+ }> implements IMapView {
13147
+ #private;
13148
+ outdoors: GeojsonApiMapObject;
13149
+ id: string;
13150
+ mapDataExternal: {
13151
+ [key in string]: MapData;
13152
+ };
13153
+ currentMap?: GeojsonApiMapObject;
13154
+ Camera: ICamera;
13155
+ Labels: LabelsApi;
13156
+ Markers: MarkersApi;
13157
+ constructor(rendererCore: RendererCore, _options?: any);
13158
+ updateStackState: RendererCore['updateStackState'];
13159
+ updateState<T extends Space | MapObject | Label | Marker | string>(target: T, state: TUpdateState<T>): void;
13160
+ update: () => void;
13161
+ getMapData(): MapDataInternal | undefined;
13162
+ addMap(mapData: MapData): Promise<MapData>;
13163
+ setFloor(floor: Floor | string): void;
13164
+ get currentFloor(): Floor;
13165
+ Paths: {
13166
+ add: (_coordinates: Coordinate[]) => Path;
13167
+ remove: (_label: any) => void;
13168
+ removeAll: () => void;
13169
+ };
13170
+ getState<T extends Space | MapObject | Label | Marker | string>(target: T): TGetState<T> | undefined;
13171
+ setHoverColor(c: string): void;
13172
+ getHoverColor(): any;
13173
+ getDirections: IMapView['getDirections'];
13174
+ Navigation: INavigation;
13175
+ createCoordinate(latitude: number, longitude: number, floor?: Floor): Coordinate;
13176
+ createCoordinateFromScreenCoordinate(): Coordinate;
13177
+ auto(): void;
13178
+ Outdoor: {
13179
+ setStyle: (style: any) => void;
13180
+ };
13181
+ debug(gui: GUI): void;
13182
+ /**
13183
+ * @internal
13184
+ */
13185
+ get __core(): RendererCore;
13186
+ }
13187
+ }
13188
+
13189
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson/utils' {
13190
+ import { Coordinate } from '@mappedin/mappedin-js/maker/src/map-data-objects';
13191
+ import type { Position, EntranceCollection, LineString, ObstructionProperties } from '@mappedin/mvf';
13192
+ import { FeatureCollection } from '@turf/turf';
13193
+ import { Feature, MultiLineString } from 'geojson';
13194
+ import { CollisionRankingTier, LabelState, MarkerState } from '@mappedin/core-sdk';
13195
+ import { TGeometryState, TLabelState } from '@mappedin/mappedin-js/maker/src';
13196
+ import { GeometryState } from '@mappedin/core-sdk';
13197
+ import { TMarkerState } from '@mappedin/mappedin-js/maker/src/map-view-interface';
13198
+ export function convertCoordinateToPosition(coord: Coordinate): Position;
13199
+ export function convertPositionToCoordinate(coord: Position): Coordinate;
13200
+ export const cutEntracesFromLineStrings: (lineStrings: FeatureCollection<LineString, ObstructionProperties>['features'], entranceCollection: EntranceCollection['features']) => Feature<MultiLineString, any>;
13201
+ export function convertPriorityToCollisionTier(priority: TLabelState['priority']): CollisionRankingTier;
13202
+ export function translateLabelStateToGeojsonCore(state: Partial<TLabelState>): Partial<LabelState>;
13203
+ export function translateMarkerStateToGeojsonCore(state: Partial<TMarkerState>): Partial<MarkerState>;
13204
+ export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>): Partial<GeometryState>;
13205
+ }
13206
+
13207
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson/inspector' {
13208
+ export { Inspector } from '@mappedin/mappedin-js/maker/src/api-geojson/inspector/debug';
13209
+ }
13210
+
12980
13211
  declare module '@mappedin/mappedin-js/maker/src/api-cms/api-cms' {
12981
13212
  import { MapData, TShow3DMapOptions } from '@mappedin/mappedin-js/maker/src';
12982
13213
  import { IDirectionsResult, MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
@@ -12989,7 +13220,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-cms/api-cms' {
12989
13220
  import { Marker, Directions, Label } from '@mappedin/mappedin-js/maker/src/map-view-objects';
12990
13221
  import { DefaultTheme } from '@mappedin/mappedin-js/maker/src/themes/default';
12991
13222
  import { Navigation } from '@mappedin/mappedin-js/maker/src/navigation';
12992
- export function getMappedinCoordinate(coordinate: Coordinate, mvCore: Core): import("../../../packages/get-venue").MappedinCoordinate;
13223
+ export function getMappedinCoordinate(coordinate: Coordinate, mvCore: Core): import("@packages/internal/get-venue/MappedinCoordinate").MappedinCoordinate;
12993
13224
  export class CMSAPI implements IMapView {
12994
13225
  mvCore: Core;
12995
13226
  el: HTMLElement;
@@ -13018,7 +13249,7 @@ declare module '@mappedin/mappedin-js/maker/src/api-cms/api-cms' {
13018
13249
  createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor | undefined): Coordinate;
13019
13250
  convertMappedinXYToCoordinate(x: number, y: number, map: MappedinMap | string): Coordinate;
13020
13251
  updateState<T extends Space | MapObject | Label>(object: T, state: TUpdateState<T>): void;
13021
- getNearestNodeToCoordinate(coordinate: Coordinate): import("../../../packages/get-venue").MappedinNode;
13252
+ getNearestNodeToCoordinate(coordinate: Coordinate): import("@packages/internal/get-venue/MappedinNode").MappedinNode;
13022
13253
  getDestinationNodesFromTarget: (target: TNavigationTarget) => string[];
13023
13254
  getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], options?: TGetDirectionsOptions) => Directions | undefined;
13024
13255
  }
@@ -14440,7 +14671,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Camera
14440
14671
  declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/StackedMaps' {
14441
14672
  import { MappedinMap } from '@mappedin/mappedin-js/packages/get-venue';
14442
14673
  import { TStackedMapsOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/MapView.types';
14443
- import { STACKED_MAPS_STATE, StackedMapsController, TCameraTransform } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
14674
+ import { STACKED_MAPS_STATE, StackedMapsController, TCameraTransform, TCameraAnimationOptions } from '@mappedin/mappedin-js/packages/legacy-renderer/internal';
14444
14675
  /**
14445
14676
  * @experimental
14446
14677
  * API for showing multiple maps involved in a {@link Journey} as a vertical stack.
@@ -14504,7 +14735,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
14504
14735
  *
14505
14736
  * @returns Promise when all animations are complete.
14506
14737
  */
14507
- showOverview: () => Promise<void>;
14738
+ showOverview: (animationOptions?: TCameraAnimationOptions) => Promise<void>;
14508
14739
  /**
14509
14740
  * @experimental
14510
14741
  *
@@ -14512,7 +14743,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
14512
14743
  *
14513
14744
  * @example
14514
14745
  * ```ts
14515
- * // Zoom into a clicked map if Stacked Maps is in Overview state
14746
+ * // Scroll the camera to a specific map if Stacked Maps is in Overview state
14516
14747
  * mapView.on(E_SDK_EVENT.CLICK, ({ maps }) => {
14517
14748
  * if (maps.length <= 0) return;
14518
14749
  * if (mapView.StackedMaps.state === STACKED_MAPS_STATE.OVERVIEW) {
@@ -14523,7 +14754,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
14523
14754
  *
14524
14755
  * @returns Promise when all animations are complete.
14525
14756
  */
14526
- scrollToMap: (map: MappedinMap) => Promise<void>;
14757
+ scrollToMap: (map: MappedinMap, duration?: number) => Promise<void>;
14527
14758
  /**
14528
14759
  * @experimental
14529
14760
  *
@@ -14542,7 +14773,7 @@ declare module '@mappedin/mappedin-js/packages/legacy-renderer/public/api/Stacke
14542
14773
  *
14543
14774
  * @returns Promise when all animations are complete.
14544
14775
  */
14545
- zoomInToMap: (map: MappedinMap, cameraTransform?: TCameraTransform) => Promise<void>;
14776
+ zoomInToMap: (map: MappedinMap, cameraOptions?: TCameraTransform & TCameraAnimationOptions) => Promise<void>;
14546
14777
  /**
14547
14778
  * @experimental
14548
14779
  *
@@ -15046,6 +15277,61 @@ declare module '@mappedin/mappedin-js/packages/navigator/interfaces/IPolygon' {
15046
15277
  export default IPolygon;
15047
15278
  }
15048
15279
 
15280
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson/floor-object' {
15281
+ import type { ParsedMVF, StyleCollection } from '@mappedin/mvf';
15282
+ import { RendererCore } from '@mappedin/core-sdk';
15283
+ export class FloorObject {
15284
+ id: string;
15285
+ name: string;
15286
+ elevation: number;
15287
+ containerId: string;
15288
+ layers: Map<string, string>;
15289
+ constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, mvf?: ParsedMVF, styles?: StyleCollection);
15290
+ load: () => this;
15291
+ }
15292
+ }
15293
+
15294
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson/markers' {
15295
+ import { TAddMarkerOptions } from '@mappedin/mappedin-js/maker/src/map-view-interface';
15296
+ import { Marker } from '@mappedin/mappedin-js/maker/src/map-view-objects';
15297
+ import { GeojsonApiMapObject } from '@mappedin/mappedin-js/maker/src/api-geojson/map-object';
15298
+ import { IMarkers } from '@mappedin/mappedin-js/maker/src';
15299
+ import { Space, Door, Coordinate } from '@mappedin/mappedin-js/maker/src/map-data-objects';
15300
+ export class MarkersApi implements IMarkers {
15301
+ get currentMap(): GeojsonApiMapObject | undefined;
15302
+ constructor({ currentMapGetter }: {
15303
+ currentMapGetter: CurremtMapGetter;
15304
+ });
15305
+ /**
15306
+ * internal
15307
+ */
15308
+ getById(id: string): {
15309
+ marker: Marker;
15310
+ entityId: string;
15311
+ } | undefined;
15312
+ add(target: Space | Door | Coordinate, html: string, options?: TAddMarkerOptions): Marker;
15313
+ all(): Marker[];
15314
+ remove(target: Marker): void;
15315
+ removeAll(): Marker[];
15316
+ }
15317
+ type CurremtMapGetter = () => GeojsonApiMapObject | undefined;
15318
+ export {};
15319
+ }
15320
+
15321
+ declare module '@mappedin/mappedin-js/maker/src/api-geojson/inspector/debug' {
15322
+ import MapData from '@mappedin/mappedin-js/maker/src/map-data';
15323
+ import { MapViewGeoJson } from '@mappedin/mappedin-js/maker/src/map-view-geojson';
15324
+ import { GeoJsonApi } from '@mappedin/mappedin-js/maker/src/api-geojson/api';
15325
+ export class Inspector {
15326
+ storeStateToLocalStorageEnabled: boolean;
15327
+ constructor(mv: MapViewGeoJson, api: GeoJsonApi);
15328
+ setMapData(data: MapData): void;
15329
+ enable(): Promise<void>;
15330
+ get enabled(): boolean;
15331
+ storeState(id: string, state: any): void;
15332
+ }
15333
+ }
15334
+
15049
15335
  declare module '@mappedin/mappedin-js/cms/src' {
15050
15336
  import { MapView } from '@mappedin/mappedin-js/packages/legacy-renderer/public/MapView';
15051
15337
  import { getVenue, getVenueMVF, getVenueBundle, getVenueMaker, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions, hydrateVenue, GET_VENUE_EVENT } from '@mappedin/mappedin-js/packages/get-venue';