@mappedin/mappedin-js 6.0.1-beta.8 → 6.0.1-beta.9

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.
@@ -8,6 +8,7 @@
8
8
  // ../mappedin-js/@packages/internal/common
9
9
  // ../mappedin-js/@mappedin/core-sdk
10
10
  // ../mappedin-js/@mappedin/core-sdk/src/camera
11
+ // ../mappedin-js/@tweenjs/tween.js
11
12
  // ../mappedin-js/three
12
13
  // ../mappedin-js/zod
13
14
  // ../mappedin-js/@packages/internal/shave-text/shave-text
@@ -19,7 +20,6 @@
19
20
  // ../mappedin-js/three/addons/loaders/GLTFLoader.js
20
21
  // ../mappedin-js/@mapbox/point-geometry
21
22
  // ../mappedin-js/@maplibre/maplibre-gl-style-spec
22
- // ../mappedin-js/@tweenjs/tween.js
23
23
  // ../mappedin-js/gl-matrix
24
24
  // ../mappedin-js/@mapbox/vector-tile
25
25
  // ../mappedin-js/potpack
@@ -281,9 +281,9 @@ declare module '@mappedin/mappedin-js' {
281
281
  * Returns a {@link MapData} instance from a parsed MVF object.
282
282
  */
283
283
  export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions) => Promise<MapData>;
284
- export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
285
284
  /**
286
- * @internal temporary until we can detect which route to use based on keys
285
+ * @internal
286
+ * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
287
287
  */
288
288
  export function setUseEnterpriseAPI(value: boolean): void;
289
289
  /**
@@ -296,6 +296,11 @@ declare module '@mappedin/mappedin-js' {
296
296
  * const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
297
297
  */
298
298
  export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
299
+ /**
300
+ * @internal
301
+ * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
302
+ */
303
+ export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
299
304
  /**
300
305
  * Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
301
306
  * @experimental
@@ -311,16 +316,17 @@ declare module '@mappedin/mappedin-js' {
311
316
  export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
312
317
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
313
318
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
314
- export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
319
+ export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
315
320
  export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
316
321
  export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
322
+ export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
317
323
  }
318
324
 
319
325
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
320
326
  import { Analytics } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
321
327
  import { PubSub } from '@packages/internal/common';
322
328
  import type { TSearchOptions } from '@packages/internal/mvf-utils';
323
- import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
329
+ import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
324
330
  import type EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
325
331
  import type EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
326
332
  import type EnterpriseVenue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
@@ -421,6 +427,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
421
427
  * const floors = mapData.getByType('floor');
422
428
  */
423
429
  getByType(type: 'floor'): Floor[];
430
+ /**
431
+ * @returns The stacks of floors ({@link FloorStack}) within the map.
432
+ * @example
433
+ * const floorStacks = mapData.getByType('floor-stack');
434
+ */
435
+ getByType(type: 'floor-stack'): FloorStack[];
424
436
  /**
425
437
  * @returns The connections ({@link Connection}) on the map.
426
438
  * @example
@@ -475,6 +487,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
475
487
  getById(type: 'space', id: string): Space | undefined;
476
488
  getById(type: 'door', id: string): Door | undefined;
477
489
  getById(type: 'floor', id: string): Floor | undefined;
490
+ getById(type: 'floor-stack', id: string): FloorStack | undefined;
478
491
  getById(type: 'connection', id: string): Connection | undefined;
479
492
  getById(type: 'object', id: string): MapObject | undefined;
480
493
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
@@ -622,7 +635,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
622
635
  import Annotation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation';
623
636
  import Hyperlink from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink';
624
637
  import Image from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image';
625
- import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap, EnterpriseLocationId, EnterpriseCategoryId, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
638
+ import FloorStack from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-stack';
639
+ import type { MapDataRecords } from '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation';
640
+ import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, FloorProperties as MVFFloor, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
626
641
  import { AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
627
642
  import EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
628
643
  import EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
@@ -664,26 +679,28 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
664
679
  readonly obstructionIdByEntranceId: Record<string, string>;
665
680
  readonly venue?: EnterpriseVenue;
666
681
  enterpriseMode: boolean;
667
- nodesById: Record<string, Node>;
668
- spacesById: Record<string, Space>;
669
- floorsById: Record<string, Floor>;
670
- connectionsById: Record<string, Connection>;
671
- objectsById: Record<string, MapObject>;
672
- doorsById: Record<string, Door>;
673
- pointsOfInterestById: Record<string, PointOfInterest>;
674
- annotationsById: Record<string, Annotation>;
675
- locationsById: Record<EnterpriseLocationId, EnterpriseLocation>;
676
- categoriesById: Record<EnterpriseCategoryId, EnterpriseCategory>;
677
- doorsByNodeId: Record<string, Door>;
678
- locationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
679
- mvfAnnotationsById: Record<string, AnnotationCollection['features'][number]>;
680
- mvfConnectionsById: Record<string, MVFConnection>;
681
- mvfConnectionsByNodeId: Record<string, MVFConnection>;
682
- mvfEntrancesById: Record<string, EntranceCollection['features'][number]>;
683
- mvfNodesById: Record<string, NodeCollection['features'][number]>;
684
- mvfObstructionById: Record<string, ObstructionCollection['features'][number]>;
685
- mvfSpacesById: Record<string, SpaceCollection['features'][number]>;
686
- mvfMapsById: Record<string, MVFMap>;
682
+ nodesById: MapDataRecords['nodesById'];
683
+ spacesById: MapDataRecords['spacesById'];
684
+ floorsById: MapDataRecords['floorsById'];
685
+ floorStacksById: MapDataRecords['floorStacksById'];
686
+ connectionsById: MapDataRecords['connectionsById'];
687
+ objectsById: MapDataRecords['objectsById'];
688
+ doorsById: MapDataRecords['doorsById'];
689
+ pointsOfInterestById: MapDataRecords['poisById'];
690
+ annotationsById: MapDataRecords['annotationsById'];
691
+ locationsById: MapDataRecords['locationsById'];
692
+ categoriesById: MapDataRecords['categoriesById'];
693
+ doorsByNodeId: MapDataRecords['doorsByNodeId'];
694
+ locationsBySpaceId: MapDataRecords['mvfLocationsBySpaceId'];
695
+ mvfAnnotationsById: MapDataRecords['mvfAnnotationsById'];
696
+ mvfConnectionsById: MapDataRecords['mvfConnectionsById'];
697
+ mvfConnectionsByNodeId: MapDataRecords['mvfConnectionsByNodeId'];
698
+ mvfEntrancesById: MapDataRecords['mvfEntrancesById'];
699
+ mvfNodesById: MapDataRecords['mvfNodesById'];
700
+ mvfObstructionById: MapDataRecords['mvfObstructionById'];
701
+ mvfSpacesById: MapDataRecords['mvfSpacesById'];
702
+ mvfFloorsById: MapDataRecords['mvfFloorsById'];
703
+ mvfFloorStacksById: MapDataRecords['mvfFloorStacksById'];
687
704
  /**
688
705
  * @internal
689
706
  */
@@ -720,6 +737,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
720
737
  * @returns {Floor[]} An array of Floor objects.
721
738
  */
722
739
  get floors(): Floor[];
740
+ get floorStacks(): FloorStack[];
723
741
  /**
724
742
  * Retrieves all doors in the map.
725
743
  *
@@ -759,6 +777,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
759
777
  getById(type: 'space', id: string): Space | undefined;
760
778
  getById(type: 'door', id: string): Door | undefined;
761
779
  getById(type: 'floor', id: string): Floor | undefined;
780
+ getById(type: 'floor-stack', id: string): FloorStack | undefined;
762
781
  getById(type: 'connection', id: string): Connection | undefined;
763
782
  getById(type: 'object', id: string): MapObject | undefined;
764
783
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
@@ -776,7 +795,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
776
795
  getMVFFeatureById(type: 'space', id: string): SpaceCollection['features'][number] | undefined;
777
796
  getMVFFeatureById(type: 'node', id: string): NodeCollection['features'][number] | undefined;
778
797
  getMVFFeatureById(type: 'obstruction', id: string): ObstructionCollection['features'][number] | undefined;
779
- getMVFFeatureById(type: 'map', id: string): MVFMap | undefined;
798
+ getMVFFeatureById(type: 'map', id: string): MVFFloor | undefined;
780
799
  getMVFFeatureById(type: 'connection', id: string): MVFConnection | undefined;
781
800
  getMVFFeatureById(type: 'entrance', id: string): EntranceCollection['features'][number] | undefined;
782
801
  getMVFFeatureById(type: 'annotation', id: string): AnnotationCollection['features'][number] | undefined;
@@ -808,7 +827,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
808
827
  */
809
828
  destroy(): void;
810
829
  }
811
- export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, };
830
+ export { MapDataInternal, Space, Floor, FloorStack, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, };
812
831
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
813
832
  export type { Places };
814
833
  }
@@ -826,6 +845,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
826
845
  import type { Label, Marker, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
827
846
  import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
828
847
  import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
848
+ import type { TShowStackOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
829
849
  export class MapView extends PubSub<TEvents> {
830
850
  #private;
831
851
  /**
@@ -920,6 +940,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
920
940
  expand(opts?: {
921
941
  excludeFloors: Floor[];
922
942
  }): Promise<void> | undefined;
943
+ showStack(opts?: TShowStackOptions): Promise<void> | undefined;
923
944
  /**
924
945
  * @experimental
925
946
  * @hidden
@@ -936,7 +957,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
936
957
  * Sets the current floor ({@link Floor}) of the map.
937
958
  * @param floor The floor or floor ID to set.
938
959
  */
939
- setFloor(floor: Floor | string): void;
960
+ setFloor(floor: Floor | string): Promise<void> | undefined;
940
961
  /**
941
962
  * The current floor ({@link Floor}) of the map.
942
963
  */
@@ -1995,14 +2016,19 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
1995
2016
  animateArrowsOnPath?: boolean;
1996
2017
  };
1997
2018
  /**
1998
- * Options for the departure and destination polygons.
2019
+ * Options for the markers at the departure and destination.
1999
2020
  */
2000
- polygons?: {
2021
+ markerOptions?: {
2001
2022
  /**
2002
- * The color of the departure polygon.
2003
- * @default '#40A9FF'
2023
+ * The color of the departure marker.
2024
+ * @default '#1890FF'
2004
2025
  */
2005
- departure?: string;
2026
+ departureColor?: string;
2027
+ /**
2028
+ * The color of the destination marker.
2029
+ * @default '#722ED1'
2030
+ */
2031
+ destinationColor?: string;
2006
2032
  };
2007
2033
  };
2008
2034
  export class Navigation {
@@ -2053,7 +2079,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/search' {
2053
2079
 
2054
2080
  declare module '@mappedin/mappedin-js/mappedin-js/src/analytics' {
2055
2081
  export { Analytics, AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
2056
- export type { AnalyticsUpdateOptions } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
2082
+ export type { AnalyticsUpdateOptions, AnalyticState, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
2057
2083
  }
2058
2084
 
2059
2085
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category' {
@@ -2272,27 +2298,37 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
2272
2298
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
2273
2299
  import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
2274
2300
  import type { RendererCore } from '@mappedin/core-sdk';
2275
- import type { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
2301
+ import TWEEN from '@tweenjs/tween.js';
2276
2302
  import { PubSub } from '@packages/internal/common';
2277
- export const GAP_BELOW_FLOORS = 30;
2303
+ import type { TFocusOnOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
2304
+ export const GAP_BELOW_FLOORS = 50;
2278
2305
  export const DURATION = 1000;
2279
2306
  export type TStackedMapsEvents = {
2280
2307
  expanded: void;
2281
2308
  collapsed: void;
2282
2309
  };
2310
+ export type TShowStackOptions = {
2311
+ numFloors?: number;
2312
+ cameraOptions?: TFocusOnOptions;
2313
+ };
2283
2314
  export class StackedMaps extends PubSub<TStackedMapsEvents> {
2284
2315
  #private;
2285
2316
  constructor(api: GeojsonApiMapObject, core: RendererCore);
2286
- includedFloors: FloorObject[];
2287
- get percentExpanded(): number;
2288
- set percentExpanded(value: number);
2289
- animateToCurrentFloor(): void;
2317
+ percentExpanded: number;
2318
+ animateToCurrentFloorTween: TWEEN.Tween | null;
2290
2319
  expanded: boolean;
2320
+ handlePreRender: () => void;
2321
+ handleUserInteractionStart: () => void;
2322
+ handleUserInteractionEnd: () => void;
2323
+ animateToCurrentFloor(): Promise<void>;
2291
2324
  expand(opts?: {
2292
2325
  excludeFloorIds: string[];
2293
2326
  }): Promise<void>;
2294
2327
  collapse(): Promise<void>;
2295
- animate(direction: 'expand' | 'collapse'): Promise<void>;
2328
+ showStack(opts?: TShowStackOptions): Promise<void>;
2329
+ animate(direction: 'expand' | 'collapse', options?: {
2330
+ duration: number;
2331
+ }): Promise<void>;
2296
2332
  }
2297
2333
  }
2298
2334
 
@@ -2618,8 +2654,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
2618
2654
  }
2619
2655
 
2620
2656
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
2621
- import type { Map } from '@mappedin/mvf';
2622
- import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2657
+ import type { FloorProperties as MVFFloor } from '@mappedin/mvf';
2658
+ import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject, FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2623
2659
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
2624
2660
  /**
2625
2661
  * A class representing floor data within the map.
@@ -2647,7 +2683,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
2647
2683
  * @internal
2648
2684
  */
2649
2685
  constructor(data: MapDataInternal, options: {
2650
- mvfData: Map;
2686
+ mvfData: MVFFloor;
2651
2687
  });
2652
2688
  /**
2653
2689
  * Gets the name of the floor.
@@ -2697,6 +2733,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
2697
2733
  * @returns {PointOfInterest[]} An array of PointOfInterest objects on this floor.
2698
2734
  */
2699
2735
  get pois(): PointOfInterest[];
2736
+ /**
2737
+ * Gets the FloorStack ({@link FloorStack}) that this floor belongs to.
2738
+ *
2739
+ * @returns {FloorStack} The FloorStack that this floor belongs to.
2740
+ */
2741
+ get floorStack(): FloorStack;
2700
2742
  /**
2701
2743
  * Serializes the floor data to JSON.
2702
2744
  *
@@ -3258,6 +3300,161 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image' {
3258
3300
  export default Image;
3259
3301
  }
3260
3302
 
3303
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-stack' {
3304
+ import type { FloorStack as MVFFloorStack } from '@mappedin/mvf';
3305
+ import type { MapDataInternal, Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3306
+ import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
3307
+ /**
3308
+ * A class representing floor stack data within the map.
3309
+ *
3310
+ * FloorStacks are used to represent a group of floors that are part of a single entity.
3311
+ */
3312
+ class FloorStack extends BaseMapData {
3313
+ #private;
3314
+ /**
3315
+ * @internal
3316
+ */
3317
+ static readonly __type = "floor-stack";
3318
+ /**
3319
+ * @internal
3320
+ */
3321
+ readonly __type = "floor-stack";
3322
+ /**
3323
+ * Checks if the provided instance is of type FloorStack.
3324
+ *
3325
+ * @param instance The instance to check.
3326
+ * @returns {boolean} True if the instance is a FloorStack, false otherwise.
3327
+ */
3328
+ static is(instance: object): instance is FloorStack;
3329
+ /**
3330
+ * @internal
3331
+ */
3332
+ constructor(data: MapDataInternal, options: {
3333
+ mvfData: MVFFloorStack;
3334
+ });
3335
+ /**
3336
+ * Gets the type of FloorStack.
3337
+ */
3338
+ get type(): MVFFloorStack['type'];
3339
+ /**
3340
+ * Gets the name of the FloorStack.
3341
+ *
3342
+ * @returns {string} The name of the FloorStack.
3343
+ */
3344
+ get name(): string;
3345
+ /**
3346
+ * Gets the floors ({@link Floor}) included in this FloorStack.
3347
+ *
3348
+ * @returns {Floor[]} An array of Floor objects in this FloorStack.
3349
+ */
3350
+ get floors(): Floor[];
3351
+ /**
3352
+ * Serializes the FloorStack data to JSON.
3353
+ *
3354
+ * @returns An object representing the FloorStack.
3355
+ */
3356
+ toJSON(): {
3357
+ id: string;
3358
+ name: string;
3359
+ type: "Building" | "Outdoor" | undefined;
3360
+ floors: string[];
3361
+ };
3362
+ /**
3363
+ * Cleans up resources used by the instance.
3364
+ *
3365
+ * @internal
3366
+ */
3367
+ destroy(): void;
3368
+ }
3369
+ export default FloorStack;
3370
+ }
3371
+
3372
+ declare module '@mappedin/mappedin-js/mappedin-js/src/utils/data-creation' {
3373
+ import type { Feature, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, NodeCollection, ObstructionCollection, Point, SpaceCollection, SpaceProperties, Connection as MVFConnection, EntranceCollection, AnnotationCollection, ParsedMVF, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseLocationId as MVFEnterpriseLocationId, EnterpriseCategoryId as MVFEnterpriseCategoryId, EnterpriseCategory as MVFEnterpriseCategory, EnterpriseVenue as MVFEnterpriseVenue } from '@mappedin/mvf';
3374
+ import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3375
+ import { Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3376
+ import Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
3377
+ import EnterpriseLocation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
3378
+ import EnterpriseCategory from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
3379
+ import FloorStack from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor-stack';
3380
+ export type MapDataRecords = {
3381
+ spacesById: Record<string, Space>;
3382
+ nodesById: Record<string, Node>;
3383
+ objectsById: Record<string, MapObject>;
3384
+ floorsById: Record<string, Floor>;
3385
+ floorStacksById: Record<string, FloorStack>;
3386
+ connectionsById: Record<string, Connection>;
3387
+ doorsById: Record<string, Door>;
3388
+ doorsByNodeId: Record<string, Door>;
3389
+ poisById: Record<string, PointOfInterest>;
3390
+ annotationsById: Record<string, Annotation>;
3391
+ locationsById: Record<MVFEnterpriseLocationId, EnterpriseLocation>;
3392
+ categoriesById: Record<MVFEnterpriseCategoryId, EnterpriseCategory>;
3393
+ venue: MVFEnterpriseVenue;
3394
+ spaceIdsByDestinationNodeId: Record<string, string[]>;
3395
+ objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
3396
+ obstructionIdByEntranceId: Record<string, string>;
3397
+ connectionIdsByLatLon: Record<string, string[]>;
3398
+ mvfSpacesById: Record<string, SpaceCollection['features'][number]>;
3399
+ mvfNodesById: Record<string, NodeCollection['features'][number]>;
3400
+ mvfObstructionById: Record<string, ObstructionCollection['features'][number]>;
3401
+ mvfFloorsById: Record<string, MVFFloor>;
3402
+ mvfFloorStacksById: Record<string, MVFFloorStack>;
3403
+ mvfConnectionsById: Record<string, MVFConnection>;
3404
+ mvfConnectionsByNodeId: Record<string, MVFConnection>;
3405
+ mvfEntrancesById: Record<string, EntranceCollection['features'][number]>;
3406
+ mvfAnnotationsById: Record<string, AnnotationCollection['features'][number]>;
3407
+ mvfCategoriesById: Record<string, MVFEnterpriseCategory>;
3408
+ mvfLocationsById: Record<string, MVFEnterpriseLocation>;
3409
+ mvfLocationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
3410
+ };
3411
+ export const processMVFFloors: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "floorsById" | "mvfFloorsById">;
3412
+ export const processMVFFloorStacks: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "floorStacksById" | "mvfFloorStacksById">;
3413
+ /**
3414
+ * @internal
3415
+ */
3416
+ export const createEnterpriseDataFromMVF: (mvf: ParsedMVF, data: MapDataInternal) => {
3417
+ locationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
3418
+ mvfLocationsById: Record<string, MVFEnterpriseLocation>;
3419
+ mvfCategoriesById: Record<string, MVFEnterpriseCategory>;
3420
+ locationsById: Record<string, EnterpriseLocation>;
3421
+ categoriesById: Record<string, EnterpriseCategory>;
3422
+ venue: MVFEnterpriseVenue;
3423
+ };
3424
+ /**
3425
+ * @internal
3426
+ */
3427
+ export const createDataFromMVF: (mvf: ParsedMVF, data: MapDataInternal) => {
3428
+ spacesById: Record<string, Space>;
3429
+ nodesById: Record<string, Node>;
3430
+ objectsById: Record<string, MapObject>;
3431
+ floorsById: Record<string, Floor>;
3432
+ floorStacksById: Record<string, FloorStack>;
3433
+ connectionsById: Record<string, Connection>;
3434
+ doorsById: Record<string, Door>;
3435
+ doorsByNodeId: Record<string, Door>;
3436
+ poisById: Record<string, PointOfInterest>;
3437
+ annotationsById: Record<string, Annotation>;
3438
+ spaceIdsByDestinationNodeId: Record<string, string[]>;
3439
+ objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
3440
+ obstructionIdByEntranceId: Record<string, string>;
3441
+ connectionIdsByLatLon: Record<string, string[]>;
3442
+ mvfSpacesById: Record<string, Feature<Point | import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon, SpaceProperties>>;
3443
+ mvfNodesById: Record<string, Feature<Point, import("@mappedin/mvf").NodeProperties>>;
3444
+ mvfObstructionById: Record<string, Feature<import("@mappedin/mvf").LineString | import("@mappedin/mvf").Polygon, import("@mappedin/mvf").ObstructionProperties>>;
3445
+ mvfFloorsById: Record<string, MVFFloor>;
3446
+ mvfFloorStacksById: Record<string, MVFFloorStack>;
3447
+ mvfConnectionsById: Record<string, MVFConnection>;
3448
+ mvfConnectionsByNodeId: Record<string, MVFConnection>;
3449
+ mvfEntrancesById: Record<string, Feature<import("@mappedin/mvf").LineString, import("@mappedin/mvf").EntranceProperties>>;
3450
+ mvfAnnotationsById: Record<string, {
3451
+ type: import("@mappedin/mvf").FeatureType;
3452
+ geometry: Point;
3453
+ properties: import("@mappedin/mvf").AnnotationProperties;
3454
+ }>;
3455
+ };
3456
+ }
3457
+
3261
3458
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
3262
3459
  import type Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
3263
3460
  import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
@@ -3525,9 +3722,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3525
3722
  * Returns a {@link MapData} instance from a parsed MVF object.
3526
3723
  */
3527
3724
  export const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions) => Promise<MapData>;
3528
- export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
3529
3725
  /**
3530
- * @internal temporary until we can detect which route to use based on keys
3726
+ * @internal
3727
+ * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
3531
3728
  */
3532
3729
  export function setUseEnterpriseAPI(value: boolean): void;
3533
3730
  /**
@@ -3540,6 +3737,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3540
3737
  * const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
3541
3738
  */
3542
3739
  export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
3740
+ /**
3741
+ * @internal
3742
+ * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
3743
+ */
3744
+ export const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
3543
3745
  /**
3544
3746
  * Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
3545
3747
  * @experimental
@@ -3555,9 +3757,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3555
3757
  export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
3556
3758
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
3557
3759
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3558
- export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3760
+ export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, type Places, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3559
3761
  export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
3560
3762
  export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/mappedin-js/mappedin-js/src/search';
3763
+ export type { Analytics, TAnalyticsUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
3561
3764
  }
3562
3765
 
3563
3766
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
@@ -4804,6 +5007,10 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
4804
5007
  * Geometries can be added to the focus listener via `mapView.setState(.., { focusable: true })`.
4805
5008
  */
4806
5009
  'geometry-in-focus': string | number | null;
5010
+ /**
5011
+ * Fired before the scene is rendered. Use this to modify the scene before it is rendered.
5012
+ */
5013
+ 'pre-render': undefined;
4807
5014
  };
4808
5015
  /**
4809
5016
  * The payload of an event. See also {@link MapEvent}.
@@ -5301,13 +5508,9 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
5301
5508
  import { type ImageProperties, type ImageState, type ImageStyle } from '@mappedin/mappedin-js/geojson/src/components/image';
5302
5509
  import { MeshDetachmentSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system';
5303
5510
  import { MeshModificationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system';
5511
+ import { PreRenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/pre-render/system';
5304
5512
  export type * from '@mappedin/mappedin-js/geojson/src/types';
5305
5513
  export const raycaster: Raycaster;
5306
- export const DEFAULT_ZOOM_LEVEL = 18;
5307
- export const DEFAULT_MIN_ZOOM_LEVEL = 12;
5308
- export const DEFAULT_MAX_ZOOM_LEVEL = 22;
5309
- export const DEFAULT_PITCH = 0;
5310
- export const DEFAULT_BEARING = 0;
5311
5514
  /**
5312
5515
  * Some preset orderings for updates.
5313
5516
  */
@@ -5319,6 +5522,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
5319
5522
  AFTER_RENDER: number;
5320
5523
  AFTER_ALL_UPDATES: number;
5321
5524
  };
5525
+ export const DEFAULT_PITCH: number, DEFAULT_BEARING: number, DEFAULT_ZOOM_LEVEL: number, DEFAULT_MIN_ZOOM_LEVEL: number, DEFAULT_MAX_ZOOM_LEVEL: number;
5322
5526
  export type Systems = {
5323
5527
  cameraSystem: CameraSystem;
5324
5528
  panBoundsSystem: PanBoundsSystem;
@@ -5346,6 +5550,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
5346
5550
  geometryInFocusSystem: GeometryInFocusSystem;
5347
5551
  meshDetachmentSystem: MeshDetachmentSystem;
5348
5552
  meshModificationSystem: MeshModificationSystem;
5553
+ preRenderSystem: PreRenderSystem;
5349
5554
  };
5350
5555
  export type MapViewState = {
5351
5556
  readonly type: 'map-view';
@@ -5509,6 +5714,10 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
5509
5714
  * Sets the background color of the renderer. Only applies to "standalone mode"
5510
5715
  */
5511
5716
  setBackgroundColor: (color: any, alpha: any) => void;
5717
+ /**
5718
+ * Returns the background color of the renderer. Only applies to "standalone mode"
5719
+ */
5720
+ get backgroundColor(): import("three").Color;
5512
5721
  /**
5513
5722
  * Returns the current scale of the map in metres per pixel.
5514
5723
  */
@@ -5663,13 +5872,23 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
5663
5872
  * How far the camera can zoom out away from the ground
5664
5873
  */
5665
5874
  get minZoomLevel(): number;
5875
+ /**
5876
+ * Toggle the mode of the camera to automatically set the minimum zoom level based on the size of the scene.
5877
+ * It will be automatically disabled when the minimum zoom level is set manually.
5878
+ * @param value The new value for the auto min zoom level mode.
5879
+ */
5880
+ setAutoMinZoomLevel(value: boolean): void;
5881
+ /**
5882
+ * The mode of the camera to automatically set the minimum zoom level based on the size of the scene.
5883
+ */
5884
+ get autoMinZoomLevel(): boolean;
5666
5885
  /**
5667
5886
  * How far out the camera can zoom
5668
5887
  *
5669
5888
  * @param zoomLevel The minimum zoom level in mercator zoom level units.
5670
5889
  * @default 0
5671
5890
  */
5672
- setMinZoomLevel(zoomLevel: number): void;
5891
+ setMinZoomLevel(zoomLevel: number, disableAutoMinZoomLevel?: boolean): void;
5673
5892
  /**
5674
5893
  * How far in the camera can zoom
5675
5894
  *
@@ -6291,7 +6510,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
6291
6510
  styleMap: AggregatedStyleMap;
6292
6511
  StackedMaps: StackedMaps;
6293
6512
  get currentFloor(): FloorObject;
6294
- setFloor(floorId: string, reason?: TFloorChangeReason): void;
6513
+ setFloor(floorId: string, reason?: TFloorChangeReason): Promise<void> | undefined;
6295
6514
  Models: {
6296
6515
  add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
6297
6516
  floorId?: string;
@@ -6366,6 +6585,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
6366
6585
  import { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
6367
6586
  import { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
6368
6587
  import Outdoor from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
6588
+ import type { TShowStackOptions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
6369
6589
  export class GeoJsonApi {
6370
6590
  core: RendererCore;
6371
6591
  outdoors: GeojsonApiMapObject;
@@ -6398,8 +6618,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
6398
6618
  excludeFloors: Floor[];
6399
6619
  }): Promise<void> | undefined;
6400
6620
  collapse(): Promise<void> | undefined;
6621
+ showStack(opts?: TShowStackOptions): Promise<void> | undefined;
6401
6622
  addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
6402
- setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
6623
+ setFloor(floor: Floor | string, reason?: TFloorChangeReason): Promise<void> | undefined;
6403
6624
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
6404
6625
  get currentFloor(): Floor;
6405
6626
  getState<T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T): TGetState<T> | undefined;
@@ -6459,6 +6680,16 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera' {
6459
6680
  * The current center coordinate ({@link Coordinate}) of the camera.
6460
6681
  */
6461
6682
  get center(): Coordinate;
6683
+ /**
6684
+ * Toggle the mode of the camera to automatically set the minimum zoom level based on the size of the scene.
6685
+ * It will be automatically disabled when the minimum zoom level is set manually.
6686
+ * @param value The new value for the auto min zoom level mode.
6687
+ */
6688
+ setAutoMinZoomLevel(value: boolean): void;
6689
+ /**
6690
+ * The mode of the camera to automatically set the minimum zoom level based on the size of the scene.
6691
+ */
6692
+ get autoMinZoomLevel(): boolean;
6462
6693
  /**
6463
6694
  * The current zoom level of the camera in mercator zoom levels.
6464
6695
  *
@@ -6913,6 +7144,19 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor' {
6913
7144
  * Whether the outdoorView is enabled.
6914
7145
  */
6915
7146
  get enabled(): boolean;
7147
+ /**
7148
+ * Whether the outdoorView is visible.
7149
+ */
7150
+ get visible(): boolean;
7151
+ /**
7152
+ * Show the outdoor view.
7153
+ */
7154
+ show(): void;
7155
+ /**
7156
+ * Hide the outdoor view.
7157
+ * @param excludedStyleLayerIds {string[]} E
7158
+ */
7159
+ hide(excludedStyleLayerIds?: string[]): void;
6916
7160
  }
6917
7161
  }
6918
7162
 
@@ -7310,7 +7554,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
7310
7554
  * Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
7311
7555
  * If a set context is not in this list, it will default to the first VALID_CONTEXTS value.
7312
7556
  */
7313
- export const VALID_CONTEXTS: readonly ["websdk", "web", "webv2", "kiosk-v2", "mobile", "iossdk", "androidsdk", "reactnativesdk"];
7557
+ export const VALID_CONTEXTS: readonly ["websdk", "web", "webv2", "kiosk-v2", "mobile", "iossdk", "androidsdk", "reactnativesdk", "gen7", "bespoke"];
7314
7558
  type ValidContext = (typeof VALID_CONTEXTS)[number];
7315
7559
  export const DEFAULT_CONTEXT: "websdk";
7316
7560
  export const ANALYTICS_URL = "https://api-gateway.mappedin.com/track-analytics/a/";
@@ -7355,66 +7599,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
7355
7599
  sendGetDirectionsEvent: (start: string, end: string) => void;
7356
7600
  sendBlueDotEvents(event: BlueDotEvents): void | Promise<Response> | Promise<void>;
7357
7601
  }
7358
- type AnalyticsUserPosition = {
7359
- bluedotTimestamp: number;
7360
- latitude: number;
7361
- longitude: number;
7362
- floorLevel?: number;
7363
- accuracy: number;
7364
- };
7365
- type AnalyticsOptions = {
7366
- /** The ID of the map to be used for analytics. */
7367
- mapId?: string;
7368
- /** The API key for authentication. */
7369
- key?: string;
7370
- /** The API secret for authentication. */
7371
- secret?: string;
7372
- /** The access token for authentication. */
7373
- accessToken?: string;
7374
- /** Flag to disable authentication. */
7375
- noAuth?: boolean;
7376
- /** Flag to enable logging of events. */
7377
- logEvents?: boolean;
7378
- /** Flag to enable sending of events. */
7379
- sendEvents?: boolean;
7380
- /** The context in which the analytics are being used. */
7381
- context?: string;
7382
- /** The platform string to be included in analytics. */
7383
- platformString?: string;
7384
- /** The base URI for the analytics endpoint. */
7385
- baseUri?: string;
7386
- };
7387
- export type AnalyticsUpdateOptions = Omit<AnalyticsOptions, 'mapId' | 'key' | 'secret' | 'accessToken'> & {
7388
- /** The ID of the map to be used for analytics. */
7389
- mapId: string;
7390
- } & ({
7391
- /** The API key for authentication. */
7392
- key: string;
7393
- /** The API secret for authentication. */
7394
- secret: string;
7395
- } | {
7396
- /** The access token for authentication. */
7397
- accessToken: string;
7398
- });
7399
- export type AnalyticState = {
7400
- accessToken?: string | undefined;
7401
- version: string;
7402
- platformString: string;
7403
- baseUri: string;
7404
- analyticsBaseUrl: string;
7405
- noAuth: boolean;
7406
- geolocationMode: boolean;
7407
- mi_uuid: string;
7408
- mi_session: string;
7409
- context: ValidContext;
7410
- userPosition?: AnalyticsUserPosition;
7411
- mapId?: string;
7412
- key?: string;
7413
- secret?: string;
7414
- logEvents: boolean;
7415
- sendEvents: boolean;
7416
- };
7417
- type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken'>>;
7602
+ type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken' | 'sessionId'>>;
7418
7603
  type CaptureEventsPayloadMap = {
7419
7604
  '$select-location': {
7420
7605
  id: string;
@@ -7434,12 +7619,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
7434
7619
  export const analyticsInternal: AnalyticsInternal;
7435
7620
  export class Analytics {
7436
7621
  #private;
7437
- constructor(internalAnalytics: AnalyticsInternal);
7438
7622
  /**
7439
- * Initializes the analytics with the provided options.
7440
- * @param args - The options to initialize the analytics.
7623
+ * @internal
7441
7624
  */
7442
- init(options: AnalyticsUpdateOptions): void;
7625
+ constructor(internalAnalytics: AnalyticsInternal);
7443
7626
  /**
7444
7627
  * Captures an analytic event with a custom target and query payload.
7445
7628
  *
@@ -7452,14 +7635,89 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
7452
7635
  * Updates the analytics state with the provided parameters.
7453
7636
  * @param update - The state parameters to update.
7454
7637
  */
7455
- updateState: (update: Partial<Pick<AnalyticState, 'logEvents' | 'sendEvents' | 'logEvents' | 'baseUri' | 'accessToken'>>) => void;
7638
+ updateState: (update: TAnalyticsUpdateState) => void;
7456
7639
  /**
7457
7640
  * Returns the current analytics state.
7458
7641
  * @internal
7459
7642
  * @returns the current analytics state
7460
7643
  */
7461
- getState(): AnalyticState;
7644
+ getState(): {
7645
+ version: string;
7646
+ /** The platform string to be included in analytics. */
7647
+ platformString: string;
7648
+ /** The base URI for the analytics endpoint. */
7649
+ baseUri: string;
7650
+ /** The base URI with mapId appended. */
7651
+ analyticsBaseUrl: string;
7652
+ /** Flag to disable authentication. */
7653
+ noAuth: boolean;
7654
+ /** Flag to enable geolocation mode. */
7655
+ geolocationMode: boolean;
7656
+ /** The device ID to be used for analytics. */
7657
+ deviceId: string;
7658
+ /** The session ID to be used for analytics. */
7659
+ sessionId: string;
7660
+ /** The context in which the analytics are being used. */
7661
+ context: ValidContext;
7662
+ /** The last known user position. */
7663
+ userPosition?: AnalyticsUserPosition;
7664
+ /** The ID of the map to be used for analytics. */
7665
+ mapId?: string;
7666
+ /** Flag to enable logging of events. */
7667
+ logEvents: boolean;
7668
+ /** Flag to enable sending of events. */
7669
+ sendEvents: boolean;
7670
+ } & AnalyticsAuth;
7462
7671
  }
7672
+ type AnalyticsUserPosition = {
7673
+ bluedotTimestamp: number;
7674
+ latitude: number;
7675
+ longitude: number;
7676
+ floorLevel?: number;
7677
+ accuracy: number;
7678
+ };
7679
+ type AnalyticsAuth = {
7680
+ /** The API key for authentication. */
7681
+ key?: string;
7682
+ /** The API secret for authentication. */
7683
+ secret?: string;
7684
+ /** The access token for authentication. */
7685
+ accessToken?: string;
7686
+ };
7687
+ export type AnalyticState = {
7688
+ version: string;
7689
+ /** The platform string to be included in analytics. */
7690
+ platformString: string;
7691
+ /** The base URI for the analytics endpoint. */
7692
+ baseUri: string;
7693
+ /** The base URI with mapId appended. */
7694
+ analyticsBaseUrl: string;
7695
+ /** Flag to disable authentication. */
7696
+ noAuth: boolean;
7697
+ /** Flag to enable geolocation mode. */
7698
+ geolocationMode: boolean;
7699
+ /** The device ID to be used for analytics. */
7700
+ deviceId: string;
7701
+ /** The session ID to be used for analytics. */
7702
+ sessionId: string;
7703
+ /** The context in which the analytics are being used. */
7704
+ context: ValidContext;
7705
+ /** The last known user position. */
7706
+ userPosition?: AnalyticsUserPosition;
7707
+ /** The ID of the map to be used for analytics. */
7708
+ mapId?: string;
7709
+ /** Flag to enable logging of events. */
7710
+ logEvents: boolean;
7711
+ /** Flag to enable sending of events. */
7712
+ sendEvents: boolean;
7713
+ } & AnalyticsAuth;
7714
+ type AnalyticsOptions = Partial<Omit<AnalyticState, 'version' | 'analyticsBaseUrl' | 'geolocationMode' | 'deviceId' | 'userPosition'>>;
7715
+ export type AnalyticsUpdateOptions = Omit<AnalyticsOptions, keyof AnalyticsAuth> & ((Required<Pick<AnalyticsAuth, 'key' | 'secret'>> & Partial<Pick<AnalyticsAuth, 'accessToken'>>) | (Required<Pick<AnalyticsAuth, 'accessToken'>> & Partial<Pick<AnalyticsAuth, 'key' | 'secret'>>));
7716
+ /**
7717
+ * Options for updating the current state of analytics.
7718
+ * @interface
7719
+ */
7720
+ export type TAnalyticsUpdateState = Pick<Partial<AnalyticState>, 'logEvents' | 'sendEvents' | 'baseUri' | 'accessToken'>;
7463
7721
  export {};
7464
7722
  }
7465
7723
 
@@ -7481,22 +7739,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-obje
7481
7739
  }
7482
7740
  }
7483
7741
 
7484
- declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object' {
7485
- import type { ParsedMVF } from '@mappedin/mvf';
7486
- import type { RendererCore } from '@mappedin/core-sdk';
7487
- import type { AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
7488
- import type { TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
7489
- export class FloorObject {
7490
- id: string;
7491
- name: string;
7492
- elevation: number;
7493
- containerId: string;
7494
- layers: Map<string, string>;
7495
- constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf: ParsedMVF, styleMap?: AggregatedStyleMap);
7496
- load: () => this;
7497
- }
7498
- }
7499
-
7500
7742
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object' {
7501
7743
  export default abstract class BaseMetaData {
7502
7744
  /**
@@ -8343,8 +8585,12 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/dom-resize/system' {
8343
8585
  declare module '@mappedin/mappedin-js/geojson/src/systems/pan-bounds/system' {
8344
8586
  import type { CameraSystem } from '@mappedin/mappedin-js/geojson/src/systems/camera';
8345
8587
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
8346
- export class PanBoundsSystem {
8588
+ import { PubSub } from '@packages/internal/common';
8589
+ export class PanBoundsSystem extends PubSub<{
8590
+ update: void;
8591
+ }> {
8347
8592
  dirty: boolean;
8593
+ autoMinZoomLevel: boolean;
8348
8594
  constructor(state: RendererState, cameraSystem: CameraSystem);
8349
8595
  /**
8350
8596
  * Recomputes the pan bounds based on the current 2D and 3D entities in the scene
@@ -8473,6 +8719,19 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/syst
8473
8719
  }
8474
8720
  }
8475
8721
 
8722
+ declare module '@mappedin/mappedin-js/geojson/src/systems/pre-render/system' {
8723
+ import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
8724
+ /**
8725
+ * This system runs any tasks at the very start of the render loop.
8726
+ * This is useful for ensuring that animations are synced with the render loop.
8727
+ */
8728
+ export class PreRenderSystem {
8729
+ #private;
8730
+ constructor(core: RendererCore);
8731
+ update(): void;
8732
+ }
8733
+ }
8734
+
8476
8735
  declare module '@mappedin/mappedin-js/packages/geojson-navigator/src' {
8477
8736
  export { Navigator } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator';
8478
8737
  export type { SimplifyDirectionsOptions } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator/navigator';
@@ -8578,6 +8837,22 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
8578
8837
  }
8579
8838
  }
8580
8839
 
8840
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object' {
8841
+ import type { ParsedMVF } from '@mappedin/mvf';
8842
+ import type { RendererCore } from '@mappedin/core-sdk';
8843
+ import type { AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
8844
+ import type { TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
8845
+ export class FloorObject {
8846
+ id: string;
8847
+ name: string;
8848
+ elevation: number;
8849
+ containerId: string;
8850
+ layers: Map<string, string>;
8851
+ constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf: ParsedMVF, styleMap?: AggregatedStyleMap);
8852
+ load: () => this;
8853
+ }
8854
+ }
8855
+
8581
8856
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
8582
8857
  import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8583
8858
  import type { Position, EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
@@ -8833,9 +9108,9 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
8833
9108
  };
8834
9109
  'pedestal-change': {
8835
9110
  pedestal: number;
8836
- scrolledToTop: boolean;
8837
- scrolledToBottom: boolean;
8838
- scrollPercent: number;
9111
+ scrolledToTop?: boolean;
9112
+ scrolledToBottom?: boolean;
9113
+ scrollPercent?: number;
8839
9114
  };
8840
9115
  };
8841
9116
  type CameraEvents = {
@@ -8943,6 +9218,10 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
8943
9218
  * @default Infinity
8944
9219
  */
8945
9220
  setMaxZoomLevel(zoomLevel: number): void;
9221
+ /**
9222
+ * The default minimum zoom level of the camera in mercator zoom levels.
9223
+ */
9224
+ get defaultMinZoomLevel(): number;
8946
9225
  /**
8947
9226
  * How far the camera can zoom out away from the ground.
8948
9227
  *
@@ -9004,6 +9283,10 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
9004
9283
  * 0% == camera is as far down as it will go
9005
9284
  */
9006
9285
  get scrollPercent(): number;
9286
+ /**
9287
+ * Returns current field of view(FOV) in degrees
9288
+ */
9289
+ get fov(): number;
9007
9290
  /**
9008
9291
  * Returns whether the maps are scrolled to bottom
9009
9292
  */
@@ -9409,6 +9692,11 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/constants' {
9409
9692
  export const BLOCK_MERCATOR_ZOOM_LEVEL = 17;
9410
9693
  export const ROOM_MERCATOR_ZOOM_LEVEL = 20;
9411
9694
  export const EVENTS: readonly ["change", "pan-start", "pan-end", "rotate-start", "rotate-end", "zoom-start", "zoom-end", "multi-start", "multi-end", "multi-cancel", "pedestal-start", "pedestal-change", "pedestal-end", "user-pan-start", "user-pedestal-start", "user-rotate-start", "user-dolly-start", "user-zoom-start", "user-tilt-start", "user-pan-end", "user-pedestal-end", "user-rotate-end", "user-dolly-end", "user-zoom-end", "user-tilt-end", "position-updated", "zoom-updated", "tilt-updated", "rotation-updated"];
9695
+ export const DEFAULT_ZOOM_LEVEL = 18;
9696
+ export const DEFAULT_MIN_ZOOM_LEVEL = 12;
9697
+ export const DEFAULT_MAX_ZOOM_LEVEL = 22;
9698
+ export const DEFAULT_PITCH = 0;
9699
+ export const DEFAULT_BEARING = 0;
9412
9700
  }
9413
9701
 
9414
9702
  declare module '@mappedin/mappedin-js/packages/outdoor-context-v4/ui/map' {