@mappedin/mappedin-js 4.1.0-beta.2 → 4.1.2

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.
@@ -1,16 +1,15 @@
1
1
  // Generated by dts-bundle v0.7.3
2
2
  // Dependencies for this module:
3
3
  // ../three
4
- // ../three/src/core/Object3D
5
- // ../three/src/math/Vector3
4
+ // ../minisearch
6
5
  // ../@tweenjs/tween.js
7
- // ../three/src/math/Color
6
+ // ../geojson
8
7
 
9
8
  declare module '@mappedin/mappedin-js' {
10
9
  import Search from '@mappedin/mappedin-js/renderer/internal/Mappedin.Search';
11
- import Analytics from '@mappedin/mappedin-js/renderer/internal/Mappedin.Analytics';
10
+ import Analytics from '@mappedin/mappedin-js/get-venue/Mappedin.Analytics';
12
11
  import { MapView } from '@mappedin/mappedin-js/renderer/MapView';
13
- import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/mappedin-js/get-venue';
12
+ import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/mappedin-js/get-venue';
14
13
  import { PositionUpdater } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
15
14
  import type { TMapViewOptions, TJourneyOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
16
15
  import { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
@@ -41,9 +40,9 @@ declare module '@mappedin/mappedin-js' {
41
40
  */
42
41
  function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
43
42
  export { COLLISION_RANKING_TIERS, STATE, E_SDK_EVENT, E_BLUEDOT_STATE_REASON, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_EVENT, E_BLUEDOT_STATE, E_CAMERA_EVENT } from '@mappedin/mappedin-js/renderer/MapView.enums';
44
- export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
43
+ export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
45
44
  import DefaultAssetManager from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
46
- const setAssetManager: (am: any) => void;
45
+ const setAssetManager: <T extends DefaultAssetManager>(am: T) => void;
47
46
  /**
48
47
  * @internal
49
48
  */
@@ -57,8 +56,9 @@ declare module '@mappedin/mappedin-js' {
57
56
  export type { MapView } from '@mappedin/mappedin-js/renderer/MapView';
58
57
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/mappedin-js/renderer/Camera';
59
58
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/renderer/Camera';
60
- export type { TGetVenueOptions, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, TShowVenueOptions } from '@mappedin/mappedin-js/get-venue';
61
- export { Mappedin, MappedinDirections } from '@mappedin/mappedin-js/get-venue';
59
+ export type { TGetVenueOptions, TShowVenueOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions } from '@mappedin/mappedin-js/get-venue';
60
+ export { Mappedin, MappedinDirections, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, OfflineSearch, MAP_RENDER_MODE, setFetchFn } from '@mappedin/mappedin-js/get-venue';
61
+ export { BundleAssetManager } from '@mappedin/mappedin-js/renderer/bundle-asset-manager';
62
62
  }
63
63
 
64
64
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Search' {
@@ -80,21 +80,89 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Search' {
80
80
  let Search: any;
81
81
  }
82
82
 
83
- declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Analytics' {
84
- export default Analytics;
83
+ declare module '@mappedin/mappedin-js/get-venue/Mappedin.Analytics' {
84
+ type AnalyticsOptions = {
85
+ clientId?: string;
86
+ clientSecret?: string;
87
+ accessToken?: string;
88
+ noAuth?: boolean;
89
+ venue: string;
90
+ testMode?: boolean | string;
91
+ context?: string;
92
+ platformString?: string;
93
+ };
85
94
  /**
86
- * A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
87
- * This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use `locationSelected`.
88
- *
89
- * @type {any}
90
- *
91
- * @class Analytics
92
- * @param options {Object} A list of configuration options for the Analytics API.
93
- * @param [options.key] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
94
- * @param [options.secret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
95
- * @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
96
- */
97
- var Analytics: any;
95
+ * A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
96
+ * This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use `locationSelected`.
97
+ *
98
+ * @type {any}
99
+ *
100
+ * @class Analytics
101
+ * @param options {Object} A list of configuration options for the Analytics API.
102
+ * @param [options.clientId] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
103
+ * @param [options.clientSecret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
104
+ * @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
105
+ * @param [options.context] {String} The context to pass with the analytics request. Defaults to "websdk".
106
+ * @param [options.noAuth] {Boolean} Whether authentication should not be sent with analytics requests.
107
+ * @param [options.testMode] {Boolean} Whether analytics events should be dropped because this is running in a test environment.
108
+ */
109
+ class Analytics {
110
+ #private;
111
+ constructor(options: AnalyticsOptions);
112
+ track(target: any, query: any): void;
113
+ /**
114
+ * Whenever a location is selected, you should fire this event. What "selected" means can vary by venue,
115
+ * but a good rule of thumb is that you fire the event whenever you would show the location's details.
116
+ * Typically this is when the user taps it's polygon on the map, picks it from search results or a category list.
117
+ * or deep links directly into the map.
118
+ * @method locationSelected
119
+ * @param location {MappedinLocation} The location the user selected.
120
+ */
121
+ locationSelected(location: any): void;
122
+ /**
123
+ * Whenever a category is selected, you should fire this event.
124
+ * @method categorySelected
125
+ * @param category {MappedinCategory} The category the user selected.
126
+ */
127
+ categorySelected(category: any): void;
128
+ mapViewLoaded(type: any, forced: any, benchmark: any, reason: any): void;
129
+ /**
130
+ * Whenever a user requests directions, you should fire this event.
131
+ * @method getDirections
132
+ * @param start {MappedinLocation} The start location for wayfinding.
133
+ * @param end {MappedinLocation} The end location for wayfinding.
134
+ */
135
+ getDirections(start: any, end: any): void;
136
+ getSessionID(): string;
137
+ getDeviceID(): string;
138
+ /**
139
+ * @param mode {Boolean} Indicates whether the user's geolocation is enabled.
140
+ */
141
+ setGeolocationMode(mode: any): void;
142
+ /**
143
+ * Track an event.
144
+ * @method trackBlueDotEvent
145
+ * @param event {String}
146
+ * event param should be a property of the {{#crossLink "Analytics/BLUEDOT_EVENT:property"}}{{/crossLink}} property.
147
+ */
148
+ trackBlueDotEvent(blueDotEvent: any): void;
149
+ trackSearch(searchAnalyticsObject: any): void;
150
+ trackSearchSuggest(searchAnalyticsObject: any): void;
151
+ /**
152
+ * Enum of valid bluedot events.
153
+ * Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method.
154
+ * Valid properties are: ATTEMPT_BLUEDOT, FOUND_POSITION, FOUND_FLOOR.
155
+ * @property BLUEDOT_EVENT {Object}
156
+ * @example
157
+ * Analytics.trackBlueDotEvent(Analytics.BLUEDOT_EVENT.ATTEMPT_BLUEDOT)
158
+ */
159
+ static BLUEDOT_EVENT: {
160
+ ATTEMPT_BLUEDOT: string;
161
+ FOUND_POSITION: string;
162
+ FOUND_FLOOR: string;
163
+ };
164
+ }
165
+ export default Analytics;
98
166
  }
99
167
 
100
168
  declare module '@mappedin/mappedin-js/renderer/MapView' {
@@ -443,8 +511,21 @@ declare module '@mappedin/mappedin-js/renderer/MapView' {
443
511
  declare module '@mappedin/mappedin-js/get-venue' {
444
512
  import type { TGetVenueOptions } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
445
513
  import { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
514
+ /**
515
+ * This is how we can avoid bundling in node-fetch (via isomorphic fetch),
516
+ * which keeps popping up in security advisories
517
+ * This is a pattern that most isomorphic libraries appear to use,
518
+ * where when running in node, you can pass your own fetch function
519
+ * as one is not provided by Node.js.
520
+ *
521
+ */
522
+ export function isomorphicFetch(): Window['fetch'];
523
+ /**
524
+ * Overwrite the internal `fetch` function with your own. Typically for use in Node.js and Jest
525
+ */
526
+ export function setFetchFn(fetchFn: any): void;
446
527
  /** Classes */
447
- export { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
528
+ export { Mappedin, MappedinCollectionType } from '@mappedin/mappedin-js/get-venue/Mappedin';
448
529
  export { MappedinLocation } from '@mappedin/mappedin-js/get-venue/MappedinLocation';
449
530
  export { MappedinPolygon } from '@mappedin/mappedin-js/get-venue/MappedinPolygon';
450
531
  export { MappedinNode } from '@mappedin/mappedin-js/get-venue/MappedinNode';
@@ -464,9 +545,12 @@ declare module '@mappedin/mappedin-js/get-venue' {
464
545
  export type { IDirectionsResult } from '@mappedin/mappedin-js/navigator';
465
546
  export type { TOperationHoursMap } from '@mappedin/mappedin-js/get-venue/MappedinLocation';
466
547
  export type { TDirectionToOptions } from '@mappedin/mappedin-js/get-venue/MappedinNavigatable';
548
+ export { OfflineSearch } from '@mappedin/mappedin-js/get-venue/Mappedin.OfflineSearch';
549
+ export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions } from '@mappedin/mappedin-js/get-venue/Mappedin.OfflineSearch';
467
550
  /** API data types */
468
551
  export type { TLocationType, TNode, TImage, TLogo, TGalleryImage, TPhone, TSocial, TColor, TVortex, TPicture, TOpeningHours, TSiblingGroup, TState, TCategory, TEvent, TGeoReference, TMap, TMapGroup, TBuilding, TLocation, TPolygon, TPolygonRanking, TVenue, TMappedinAPI } from '@mappedin/mappedin-js/get-venue/Mappedin.API.types';
469
552
  export type { TGetVenueOptions } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
553
+ import { MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
470
554
  export type TShowVenueOptions = {
471
555
  /**
472
556
  * Sets the initial background color of the map, including while loading.
@@ -478,14 +562,24 @@ declare module '@mappedin/mappedin-js/get-venue' {
478
562
  */
479
563
  backgroundAlpha?: number;
480
564
  /**
481
- * Whether or not to display labels initially
565
+ * Whether or not to display default styled Floating Labels initially
482
566
  */
483
567
  labelAllLocationsOnInit?: boolean;
484
568
  /**
485
569
  * The id of the first map to show on map load
486
570
  */
487
571
  firstMapId?: string;
572
+ loadOptions?: {
573
+ /**
574
+ * Set the map render strategy in order to optimize FPS
575
+ *
576
+ * @beta
577
+ */
578
+ mapRenderStrategy?: MAP_RENDER_MODE;
579
+ };
488
580
  };
581
+ export { MAP_RENDER_MODE };
582
+ export function getVenueMVF(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
489
583
  /**
490
584
  * Get Venue Data for a Mappedin Venue
491
585
  */
@@ -522,6 +616,23 @@ declare module '@mappedin/mappedin-js/get-venue' {
522
616
  url: any;
523
617
  updated_at: any;
524
618
  }): Promise<Mappedin>;
619
+ /**
620
+ * Get the bundle URL and updated_at time.
621
+ * @internal
622
+ */
623
+ export function getVenueMVFURL(userOptions: TGetVenueBundleOptions): Promise<{
624
+ url: string;
625
+ updated_at: string;
626
+ }>;
627
+ /**
628
+ * @internal
629
+ */
630
+ export function downloadVenueBundleMVF(options: TGetVenueBundleOptions,
631
+ /**
632
+ * use Web Workers to speed up MVF parsing. This is likely only benefitial for larger venues,
633
+ * and may be determental to smaller ones, hence it is off by default
634
+ */
635
+ useWorker?: boolean): Promise<unknown>;
525
636
  }
526
637
 
527
638
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core' {
@@ -647,19 +758,19 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedi
647
758
  }
648
759
  export type TBlueDotPositionUpdate = {
649
760
  /**
650
- * What Map is Blue Dot on
761
+ * The {@link MappedinMap} Blue Dot position is on
651
762
  */
652
763
  map?: MappedinMap;
653
764
  /**
654
- * The nearest Node to the BlueDot
765
+ * The nearest {@link MappedinNode} to the Blue Dot position
655
766
  */
656
767
  nearestNode?: MappedinNode;
657
768
  /**
658
- * Actual position of BlueDot (post smoothing, if smoothing is on)
769
+ * Actual position of Blue Dot (post smoothing, if smoothing is enabled)
659
770
  */
660
771
  position?: TGeolocationObject;
661
772
  /**
662
- * Current BlueDot bearing
773
+ * Current Blue Dot bearing
663
774
  */
664
775
  bearing?: number;
665
776
  };
@@ -669,11 +780,11 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedi
669
780
  */
670
781
  name: E_BLUEDOT_STATE;
671
782
  /**
672
- * Visiblity State of the BlueDot marker
783
+ * Visiblity state of the Blue Dot marker
673
784
  */
674
785
  markerVisibility?: E_BLUEDOT_MARKER_STATE;
675
786
  /**
676
- * Reason why BlueDot may be in the current state
787
+ * Reason why Blue Dot may be in the current state
677
788
  */
678
789
  reason?: E_BLUEDOT_STATE_REASON;
679
790
  /**
@@ -681,6 +792,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedi
681
792
  */
682
793
  message?: GeolocationPositionError | string;
683
794
  };
795
+ export const FALLBACK_TO_GPS_TIMEOUT = 10000;
684
796
  type TBlueDotProps = {
685
797
  data: any;
686
798
  mapView: MapView;
@@ -702,7 +814,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
702
814
  import { TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
703
815
  import { TOOLTIP_ANCHOR } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip';
704
816
  import type { Euler, Object3D, Vector3 } from 'three';
705
- import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT } from '@mappedin/mappedin-js/renderer/MapView.enums';
817
+ import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE } from '@mappedin/mappedin-js/renderer/MapView.enums';
706
818
  export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
707
819
  /**
708
820
  An extension of the GeolocationPosition type.
@@ -972,19 +1084,27 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
972
1084
  scale?: Vector3;
973
1085
  };
974
1086
  export type TMapViewOptions = {
1087
+ /**
1088
+ * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
1089
+ */
975
1090
  backgroundColor?: number | string;
976
1091
  /**
977
1092
  * The opacity of the initial background color.
978
1093
  */
979
1094
  backgroundAlpha?: number;
980
1095
  /**
981
- * Controls whether antialiasing is on. Defaults to true, as long as devicePixelRatio is 1. This is very expensive on high resolution screens.
1096
+ * Controls whether antialiasing is on. Defaults to `true`, as long as devicePixelRatio is 1. This is very expensive on high resolution screens.
982
1097
  * @default true
983
1098
  */
984
1099
  antialias?: boolean;
985
1100
  disableHover?: boolean;
986
1101
  disableZoomOnMapSizeChange?: boolean;
987
1102
  loadOptions?: {
1103
+ /**
1104
+ * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU
1105
+ * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY`
1106
+ */
1107
+ mapRenderStrategy?: MAP_RENDER_MODE;
988
1108
  async?: boolean;
989
1109
  zoomOverrides?: {
990
1110
  zoomMultiplier?: number;
@@ -993,7 +1113,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
993
1113
  };
994
1114
  };
995
1115
  /**
996
- * What map should the SDK initialize to?
1116
+ * First map to be rendered
997
1117
  */
998
1118
  firstMap?: MappedinMap | string;
999
1119
  /**
@@ -1012,6 +1132,9 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1012
1132
  onWebGLRendererError?: () => void;
1013
1133
  };
1014
1134
  export type TMapViewOptionsLegacy = {
1135
+ /**
1136
+ * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
1137
+ */
1015
1138
  backgroundColor?: number | string;
1016
1139
  /**
1017
1140
  * The opacity of the initial background color.
@@ -1045,7 +1168,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1045
1168
  };
1046
1169
  };
1047
1170
  /**
1048
- * What map should the SDK initialize to?
1171
+ * First map to be rendered
1049
1172
  */
1050
1173
  firstMap?: MappedinMap | string;
1051
1174
  /**
@@ -1115,21 +1238,21 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1115
1238
  */
1116
1239
  height?: number;
1117
1240
  /**
1118
- * The amount of space to leave before starting the text
1241
+ * The amount of space to leave before starting the text in pixels
1119
1242
  * @default 5
1120
1243
  */
1121
1244
  margin?: number;
1122
1245
  /**
1123
- * A optional color
1246
+ * Optional color in hexadecimal string e.g. `#2e2e2e`.
1124
1247
  */
1125
1248
  color?: string;
1126
1249
  /**
1127
- * How big to make the font. Defaults to 12
1250
+ * Size of the font in pixels.
1128
1251
  * @default 12
1129
1252
  */
1130
1253
  fontSize?: number;
1131
1254
  /**
1132
- * A CSS style string font. ie "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here.
1255
+ * A CSS style string font, e.g. "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here.
1133
1256
  */
1134
1257
  font?: string;
1135
1258
  /**
@@ -1138,7 +1261,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1138
1261
  */
1139
1262
  scaleMin?: number;
1140
1263
  /**
1141
- * How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If * you are only labeling a few Polygons rather than everything,
1264
+ * How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If you are only labeling a few {@link MappedinPolygon}s rather than everything,
1142
1265
  * you can set this and and scaleMin to 0.1 to fit everything except really long names perfectly.
1143
1266
  * @default 0.25
1144
1267
  */
@@ -1148,7 +1271,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1148
1271
  scale?: number;
1149
1272
  flatLabels?: false | undefined;
1150
1273
  /**
1151
- * Custom Rank - this determines how likely a Floating Label will appear
1274
+ * Ranking tier to determine how likely a {@link FloatingLabel} will appear
1152
1275
  */
1153
1276
  rank?: COLLISION_RANKING_TIERS | number;
1154
1277
  /**
@@ -1183,7 +1306,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1183
1306
  [key in string]: string;
1184
1307
  };
1185
1308
  /**
1186
- * Display label despite the polygon having an image on it
1309
+ * Display label despite the {@link MappedinPolygon} having an image on it. Often these images represent store logos.
1187
1310
  * @default false
1188
1311
  */
1189
1312
  createDespiteImage?: boolean;
@@ -1218,7 +1341,7 @@ declare module '@mappedin/mappedin-js/renderer/MapView.types' {
1218
1341
  longitude: number;
1219
1342
  };
1220
1343
  /**
1221
- * A list of MappedinPolygons corresponding to every polygon that a user's
1344
+ * A list of {@link MappedinPolygon}s corresponding to every polygon that a user's
1222
1345
  * click passed through. These are in order of first to last intersected.
1223
1346
  * Will be empty if no interactive polygons were clicked.
1224
1347
  */
@@ -1317,6 +1440,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Marker' {
1317
1440
  get strategies(): TColliderStrategy[];
1318
1441
  colliderDidMount(): void;
1319
1442
  setAction(action: any): void;
1443
+ colliderDidNotFindAHome(): void;
1320
1444
  colliderDidGoOffscreen(): void;
1321
1445
  colliderDidUpdateVisiblity(): void;
1322
1446
  }
@@ -1362,30 +1486,30 @@ declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
1362
1486
  CUSTOM_GEOLOCATION_PROVIDER_ERROR = 3
1363
1487
  }
1364
1488
  /**
1365
- What we currently know about the user's position, and how confident we are.
1489
+ What we currently know about the user's position and how confident we are.
1366
1490
  */
1367
1491
  export enum E_BLUEDOT_STATE {
1368
1492
  /**
1369
- * We haven't started listening to position updates
1493
+ * Not listening to Blue Dot position updates
1370
1494
  */
1371
1495
  NOT_LISTENING = 0,
1372
1496
  /**
1373
- * We have started listening to position updates
1497
+ * Listenign for listening to position updates but have not yet received a position
1374
1498
  */
1375
1499
  LISTENING = 1,
1376
1500
  /**
1377
- * We've received relevant positions, and user is inside the venue
1501
+ * Received relevant positions and user is in the venue
1378
1502
  */
1379
1503
  HAS_POSITION = 2,
1380
1504
  /**
1381
1505
  * We've received a relevant position, and we have enough information to determine
1382
1506
  * which floor the user is on - either because we received a floor level, the venue
1383
- * only has one floor, or we're allowing implicit floor level.
1507
+ * only has one floor or we're allowing implicit floor level detection.
1384
1508
  */
1385
1509
  HAS_INDOOR_POSITION = 3,
1386
1510
  /**
1387
1511
  * We are uncertain about the user's position, likely because we haven't received
1388
- * a relevant position in a while
1512
+ * a relevant position in a while. Blue Dot will be rendered grey to indicate uncertainty of the actual position.
1389
1513
  */
1390
1514
  LOCATION_UNCERTAIN = 4
1391
1515
  }
@@ -1394,26 +1518,29 @@ declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
1394
1518
  */
1395
1519
  export enum E_BLUEDOT_MARKER_STATE {
1396
1520
  /**
1397
- * BlueDot is hidden
1521
+ * Blue Dot is hidden
1398
1522
  */
1399
1523
  HIDDEN = 0,
1400
1524
  /**
1401
- * BlueDot is transparent
1525
+ * Blue Dot is transparent indicating the position is on a different floor
1402
1526
  */
1403
1527
  GHOST = 1,
1404
1528
  /**
1405
- * BlueDot is visible and opaque
1529
+ * Blue Dot is visible and opaque indicating accurate positioning on the current floor
1406
1530
  */
1407
1531
  NORMAL = 2,
1408
1532
  /**
1409
- * BlueDot is grayed out
1533
+ * Blue Dot is grayed out due to uncertainty about user's location, most likely due to not receiving recent position updates.
1410
1534
  */
1411
1535
  UNCERTAIN = 3
1412
1536
  }
1413
1537
  export enum STATE {
1538
+ /**
1539
+ * The map is in exploration mode where the user controls the camera position.
1540
+ */
1414
1541
  EXPLORE = "explore",
1415
1542
  /**
1416
- * FOLLOW state follows user's current location (BlueDot)
1543
+ * Follows user's current location by keeping the camera centered on the Blue Dot.
1417
1544
  */
1418
1545
  FOLLOW = "follow"
1419
1546
  /**
@@ -1429,19 +1556,19 @@ declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
1429
1556
  }
1430
1557
  export enum E_SDK_EVENT {
1431
1558
  /**
1432
- * Emitted when the map is clicked
1559
+ * Emitted when the map is clicked or tapped on a touch screen.
1433
1560
  */
1434
1561
  CLICK = "CLICK",
1435
1562
  /**
1436
- * Emitted when the {@link STATE | SDK state} changes
1563
+ * Emitted when the {@link STATE | SDK state} changes.
1437
1564
  */
1438
1565
  STATE_CHANGE = "STATE_CHANGE",
1439
1566
  /**
1440
- * Emitted when a polygon is clicked
1567
+ * Emitted when an interactive {@link MappedinPolygon | polygon} is clicked
1441
1568
  */
1442
1569
  POLYGON_CLICKED = "POLYGON_CLICKED",
1443
1570
  /**
1444
- * Emitted when nothing is clicked
1571
+ * Emitted when nothing (outside of interactive polygons) is clicked
1445
1572
  */
1446
1573
  NOTHING_CLICKED = "NOTHING_CLICKED",
1447
1574
  /**
@@ -1462,15 +1589,16 @@ declare module '@mappedin/mappedin-js/renderer/MapView.enums' {
1462
1589
  ROTATION_CHANGED = "ROTATION_CHANGED",
1463
1590
  TILT_CHANGED = "TILT_CHANGED"
1464
1591
  }
1592
+ export { MAP_RENDER_MODE } from '@mappedin/mappedin-js/get-venue';
1465
1593
  }
1466
1594
 
1467
1595
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager' {
1468
- import { TextureLoader } from 'three';
1596
+ import { Texture } from 'three';
1469
1597
  import type { MappedinMap } from '@mappedin/mappedin-js/renderer';
1470
1598
  export default class DefaultAssetManager {
1471
- textureLoader: TextureLoader;
1599
+ textureLoader: any;
1472
1600
  loadMapPolygons(map: MappedinMap): Promise<any>;
1473
- loadImage(url: string): Promise<unknown>;
1601
+ loadImage(url: string): Promise<Texture>;
1474
1602
  }
1475
1603
  }
1476
1604
 
@@ -1667,6 +1795,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
1667
1795
  RIGHT = "right"
1668
1796
  }
1669
1797
  class FloatingLabel extends BaseCollider implements ISmarterLabel {
1798
+ #private;
1670
1799
  lines: number;
1671
1800
  contextConfigured: boolean;
1672
1801
  fillText: TDrawFn | undefined;
@@ -1676,11 +1805,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
1676
1805
  clearColor: () => void;
1677
1806
  zoomProportion: number;
1678
1807
  _cache: {};
1679
- _dirty: boolean;
1680
1808
  appearance: TAppearanceFilledIn;
1681
1809
  mapView: ICore;
1682
1810
  constructor(options: TFloatingLabelOptionsInternal, mapView: ICore);
1683
- enable(): void;
1811
+ enable(updateEngine?: boolean): void;
1684
1812
  get strategies(): TColliderStrategy[];
1685
1813
  getCachedSymbol(orientation: any, textAlign: any, xCoordinate: any): any;
1686
1814
  colliderDidMount(): void;
@@ -1689,7 +1817,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
1689
1817
  colliderDidUpdateVisiblity(): void;
1690
1818
  colliderDidGoOutsideGrid(): void;
1691
1819
  colliderDidNotFindAHome(): void;
1692
- disable(): void;
1820
+ disable(updateEngine?: boolean): void;
1693
1821
  draw(context: CanvasRenderingContext2D): void;
1694
1822
  static original: FloatingLabel;
1695
1823
  static clone(options: TFloatingLabelOptionsInternal, mapView: ICore): any;
@@ -1732,6 +1860,7 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1732
1860
  zoom?: number;
1733
1861
  tilt?: number;
1734
1862
  rotation?: number;
1863
+ position?: MappedinCoordinate | MappedinNode;
1735
1864
  };
1736
1865
  export const ANIMATION_TWEENS: {
1737
1866
  linear: any;
@@ -1746,6 +1875,9 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1746
1875
  EASE_IN_OUT = "ease-in-out"
1747
1876
  }
1748
1877
  export type TCameraAnimationOptions = {
1878
+ /**
1879
+ * Animation duration in milliseconds
1880
+ */
1749
1881
  duration?: number;
1750
1882
  easing?: CAMERA_EASING_MODE;
1751
1883
  };
@@ -1782,29 +1914,66 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1782
1914
  */
1783
1915
  get zoom(): number;
1784
1916
  /**
1785
- * Current Camera rotation (in radians)
1917
+ * Current Camera rotation (in radians) from north
1786
1918
  */
1787
1919
  get rotation(): number;
1788
1920
  /**
1789
- * Current Camera tilt
1921
+ * Current camera tilt angle (in radians), relative to a top-down view.
1922
+ *
1923
+ * ex: 0 means the camera is facing top-down, π/2 means the camera is
1924
+ * facing directly from the side.
1790
1925
  */
1791
1926
  get tilt(): number;
1792
1927
  /**
1793
- * Minimum distance (in meters) the camera is allowed to get to the ground.
1928
+ * Get the minimum distance (in meters) the camera is allowed to get to the ground.
1794
1929
  */
1795
1930
  get minZoom(): number;
1796
1931
  /**
1797
- * Minimum distance (in meters) the camera is allowed to get to the ground.
1932
+ * Set the minimum distance (in meters) the camera is allowed to get to the ground.
1798
1933
  */
1799
1934
  set minZoom(meters: number);
1800
1935
  /**
1801
- * Maximum distance (in meters) the camera is allowed to get to the ground.
1936
+ * Get the maximum distance (in meters) the camera is allowed to get from the ground.
1802
1937
  */
1803
1938
  get maxZoom(): number;
1804
1939
  /**
1805
- * Maximum distance (in meters) the camera is allowed to get to the ground.
1940
+ * Set the maximum distance (in meters) the camera is allowed to get from the ground.
1806
1941
  */
1807
1942
  set maxZoom(meters: number);
1943
+ /**
1944
+ * Get the current maximum tilt angle (in radians) the camera is allowed to use.
1945
+ */
1946
+ get maxTilt(): number;
1947
+ /**
1948
+ * Sets the maximum tilt angle (in radians) the camera is allowed to use.
1949
+ *
1950
+ * Tilt angle must be between 0 and π/2 radians. It will be clamped within
1951
+ * this range if it exceeds it on either end.
1952
+ *
1953
+ * As tilt angle approaches π/2 radians, this will impact overall touch controls
1954
+ * and should be used sparingly.
1955
+ */
1956
+ set maxTilt(radians: number);
1957
+ /**
1958
+ * Get the current camera position, which is at the center of the map.
1959
+ * @returns the position as a coordinate
1960
+ */
1961
+ get position(): MappedinCoordinate;
1962
+ /**
1963
+ * User camera interactions
1964
+ */
1965
+ interactions: {
1966
+ /**
1967
+ * Enable all user interactions. This does not affect programmatic
1968
+ * Camera controls, such as `set` and `focusOn`
1969
+ */
1970
+ enable: () => void;
1971
+ /**
1972
+ * Disable all user interactions. This does not affect programmatic
1973
+ * Camera controls, such as `set` and `focusOn`
1974
+ */
1975
+ disable: () => void;
1976
+ };
1808
1977
  setSafeAreaInsets(insets: {
1809
1978
  top: number;
1810
1979
  left: number;
@@ -1813,7 +1982,7 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1813
1982
  }): void;
1814
1983
  getSafeAreaInsets(): any;
1815
1984
  /**
1816
- * Determine a new Camera view state based on a collection of targets, and start animating to that state.
1985
+ * Focus the Camera view on a collection of targets and animate to that state.
1817
1986
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1818
1987
  */
1819
1988
  focusOn(options: TFocusOnOptions): Promise<any>;
@@ -1823,7 +1992,6 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1823
1992
  set(positionOptions?: TAnimatePositionOptions): void;
1824
1993
  /**
1825
1994
  * Animate the Camera's view to smoothly transition to a new state over time.
1826
- * Returns a promise that resolves when the animation completes and gets rejected if the animation is cancelled.
1827
1995
  *
1828
1996
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1829
1997
  */
@@ -1839,6 +2007,18 @@ declare module '@mappedin/mappedin-js/renderer/Camera' {
1839
2007
  export default Camera;
1840
2008
  }
1841
2009
 
2010
+ declare module '@mappedin/mappedin-js/renderer/bundle-asset-manager' {
2011
+ import type { Texture } from 'three';
2012
+ import { Mappedin, MappedinMap } from '@mappedin/mappedin-js/renderer';
2013
+ import AssetManager from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
2014
+ export class BundleAssetManager extends AssetManager {
2015
+ venueData: Mappedin;
2016
+ constructor(venueData: Mappedin);
2017
+ loadMapPolygons(map: MappedinMap): Promise<Record<string, any>>;
2018
+ loadImage(url: string): Promise<Texture>;
2019
+ }
2020
+ }
2021
+
1842
2022
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip' {
1843
2023
  import './Mappedin.SmartTooltip.scss';
1844
2024
  import { COLLISION_RANKING_TIERS } from '@mappedin/mappedin-js/renderer/MapView.enums';
@@ -1947,6 +2127,9 @@ declare module '@mappedin/mappedin-js/renderer/layers/BlueDot' {
1947
2127
  import { TEnableBlueDotOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
1948
2128
  import { PubSub } from '@mappedin/mappedin-js/renderer/internal/pub-sub.typed';
1949
2129
  import EventSystemLayer from '@mappedin/mappedin-js/renderer/layers/EventSystem';
2130
+ /**
2131
+ * Blue Dot Layer used for controlling the Blue Dot and listening to Blue Dot state change and position update events. Use the {@link on}-method to set listeners for {@link TBlueDotStateChange} and {@link TBlueDotPositionUpdate} events.
2132
+ */
1950
2133
  class BlueDotLayer extends PubSub<E_BLUEDOT_EVENT_PAYLOAD, E_BLUEDOT_EVENT> {
1951
2134
  #private;
1952
2135
  /**
@@ -1958,7 +2141,7 @@ declare module '@mappedin/mappedin-js/renderer/layers/BlueDot' {
1958
2141
  */
1959
2142
  enable(options?: TEnableBlueDotOptions): void;
1960
2143
  /**
1961
- * Disable BlueDot
2144
+ * Disables Blue Dot and stops emitting events.
1962
2145
  */
1963
2146
  disable(): void;
1964
2147
  }
@@ -1977,7 +2160,17 @@ declare module '@mappedin/mappedin-js/renderer/layers/Journey' {
1977
2160
  */
1978
2161
  constructor(mapView: MapView, core: ICore);
1979
2162
  /**
1980
- * Draw a Journey
2163
+ * Draw a Journey based on directions. Example usage:
2164
+ *
2165
+ * ```typescript
2166
+ * const startLocation = venue.locations.find(location => location.name === "Cleo");
2167
+ * const endLocation = venue.locations.find(location => location.name === "American Eagle");
2168
+ *
2169
+ * const directions = startLocation.directionsTo(endLocation);
2170
+ * mapView.Journey.draw(directions);
2171
+ * ```
2172
+ *
2173
+ * Use options to set connection (such as elevators and escalators) HTML tooltip template, departure and destination marker templates, path style and polygon higlight color. If no options are set, sane defaults are used to draw markers, tooltips and polygon highlights.
1981
2174
  */
1982
2175
  draw(directions: MappedinDirections | MappedinDirections[], options?: TJourneyOptions): Journey;
1983
2176
  /**
@@ -1993,6 +2186,15 @@ declare module '@mappedin/mappedin-js/renderer/layers/Journey' {
1993
2186
  }
1994
2187
 
1995
2188
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2189
+ export namespace TASK_PRIORITY {
2190
+ const VISIBLE_MAP_HIGH: number;
2191
+ const VISIBLE_MAP_LOW: number;
2192
+ const VISIBLE_MAP_MARKER: number;
2193
+ const ASYNC_MAP_HIGH: number;
2194
+ const ASYNC_MAP_LOW: number;
2195
+ const ASYNC_MAP_MARKER: number;
2196
+ const MAP_LOADED: number;
2197
+ }
1996
2198
  export const SCENE_FROM_LIVE_JSON: false;
1997
2199
  /**
1998
2200
  * A handle to a 3D marker added to a map.
@@ -2022,10 +2224,11 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2022
2224
  _started: boolean;
2023
2225
  _loaderPromise: null;
2024
2226
  _promiseResolve: null;
2227
+ hoverableMeshChildren: any[];
2025
2228
  objectsDictionary: {};
2026
2229
  north: null;
2027
2230
  mapScale: null;
2028
- object: Object3D;
2231
+ object: any;
2029
2232
  labels: Set<any>;
2030
2233
  tooltips: Set<any>;
2031
2234
  markers: Set<any>;
@@ -2042,6 +2245,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2042
2245
  loadAsync: any;
2043
2246
  _taskScheduler: any;
2044
2247
  id: any;
2248
+ mapRenderingStrategy: any;
2045
2249
  _highPriorityTasks: FrameTaskGroup;
2046
2250
  _lowPriorityTasks: FrameTaskGroup;
2047
2251
  _markerTasks: FrameTaskGroup;
@@ -2049,11 +2253,12 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2049
2253
  _visibilityLatch: boolean | null;
2050
2254
  _objLoadedComplete: boolean;
2051
2255
  _objLoaded(object: any): any;
2256
+ _objLoadedMerged(object: any): void;
2052
2257
  enableImageFlipping(polygonId: any, rotation: any): void;
2053
2258
  elements: any;
2054
2259
  boundingBox: {
2055
- min: Vector3;
2056
- max: Vector3;
2260
+ min: any;
2261
+ max: any;
2057
2262
  } | undefined;
2058
2263
  loadPolygonNow(polygonId: any): void;
2059
2264
  _addElementToScene(element: any): void;
@@ -2130,10 +2335,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2130
2335
  * @return {ThreeJSMarkerHandle} a unique identifier for the marker
2131
2336
  */
2132
2337
  addThreeJSMarker(options: {
2133
- object?: Object3D | undefined;
2134
- position?: Vector3 | undefined;
2338
+ object?: any;
2339
+ position?: any;
2135
2340
  rotation?: any;
2136
- scale?: Vector3 | undefined;
2341
+ scale?: any;
2137
2342
  }): ThreeJSMarkerHandle;
2138
2343
  /**
2139
2344
  * Remove the given `ThreeJSMarker` from this map.
@@ -2165,16 +2370,14 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.MapObject' {
2165
2370
  _popinChildObjects(): void;
2166
2371
  }
2167
2372
  import { PubSub } from "@mappedin/mappedin-js/renderer/internal/pub-sub";
2168
- import { Object3D } from "three/src/core/Object3D";
2169
- import { FrameTaskGroup } from "@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler";
2170
- import { Vector3 } from "three/src/math/Vector3";
2373
+ import { FrameTaskGroup } from "@mappedin/mappedin-js/get-venue/Mappedin.TaskScheduler";
2171
2374
  }
2172
2375
 
2173
2376
  declare module '@mappedin/mappedin-js/renderer' {
2174
2377
  import Search from '@mappedin/mappedin-js/renderer/internal/Mappedin.Search';
2175
- import Analytics from '@mappedin/mappedin-js/renderer/internal/Mappedin.Analytics';
2378
+ import Analytics from '@mappedin/mappedin-js/get-venue/Mappedin.Analytics';
2176
2379
  import { MapView } from '@mappedin/mappedin-js/renderer/MapView';
2177
- import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/mappedin-js/get-venue';
2380
+ import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/mappedin-js/get-venue';
2178
2381
  import { PositionUpdater } from '@mappedin/mappedin-js/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
2179
2382
  import type { TMapViewOptions, TJourneyOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
2180
2383
  import { labelThemes } from '@mappedin/mappedin-js/renderer/MapView.types';
@@ -2205,9 +2408,9 @@ declare module '@mappedin/mappedin-js/renderer' {
2205
2408
  */
2206
2409
  function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
2207
2410
  export { COLLISION_RANKING_TIERS, STATE, E_SDK_EVENT, E_BLUEDOT_STATE_REASON, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_EVENT, E_BLUEDOT_STATE, E_CAMERA_EVENT } from '@mappedin/mappedin-js/renderer/MapView.enums';
2208
- export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
2411
+ export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
2209
2412
  import DefaultAssetManager from '@mappedin/mappedin-js/renderer/internal/Mappedin.AssetManager';
2210
- const setAssetManager: (am: any) => void;
2413
+ const setAssetManager: <T extends DefaultAssetManager>(am: T) => void;
2211
2414
  /**
2212
2415
  * @internal
2213
2416
  */
@@ -2221,44 +2424,58 @@ declare module '@mappedin/mappedin-js/renderer' {
2221
2424
  export type { MapView } from '@mappedin/mappedin-js/renderer/MapView';
2222
2425
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/mappedin-js/renderer/Camera';
2223
2426
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/mappedin-js/renderer/Camera';
2224
- export type { TGetVenueOptions, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, TShowVenueOptions } from '@mappedin/mappedin-js/get-venue';
2225
- export { Mappedin, MappedinDirections } from '@mappedin/mappedin-js/get-venue';
2427
+ export type { TGetVenueOptions, TShowVenueOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions } from '@mappedin/mappedin-js/get-venue';
2428
+ export { Mappedin, MappedinDirections, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, OfflineSearch, MAP_RENDER_MODE, setFetchFn } from '@mappedin/mappedin-js/get-venue';
2429
+ export { BundleAssetManager } from '@mappedin/mappedin-js/renderer/bundle-asset-manager';
2226
2430
  }
2227
2431
 
2228
2432
  declare module '@mappedin/mappedin-js/get-venue/Mappedin.types' {
2229
2433
  export type TGetVenueOptions = {
2230
- accessToken?: string;
2231
- clientId?: string;
2232
- clientSecret?: string;
2233
- baseUrl?: string;
2234
- includeHidden?: boolean;
2235
- noAuth?: boolean;
2236
- perspective?: string;
2237
- language?: string;
2238
- headers?: {
2239
- [key in string]: string;
2240
- };
2241
- venue: string;
2242
- things?: any;
2434
+ accessToken?: string;
2435
+ clientId?: string;
2436
+ clientSecret?: string;
2437
+ baseUrl?: string;
2438
+ includeHidden?: boolean;
2439
+ noAuth?: boolean;
2440
+ perspective?: string;
2441
+ language?: string;
2442
+ headers?: {
2443
+ [key in string]: string;
2444
+ };
2445
+ venue: string;
2446
+ things?: any;
2447
+ useDraftData?: boolean;
2448
+ platformString?: string;
2243
2449
  };
2244
2450
  export type TGetVenueOptionsInternal = {
2245
- baseUrl?: string;
2246
- supplementaryUrl?: string;
2247
- noAuth?: boolean;
2248
- includeHidden?: boolean;
2249
- apiGateway?: string;
2250
- authorization?: string;
2251
- /**
2252
- * @deprecated 2D support will be removed in the future
2253
- */
2254
- do2D?: boolean;
2255
- things?: any;
2256
- headers?: any;
2451
+ baseUrl?: string;
2452
+ supplementaryUrl?: string;
2453
+ noAuth?: boolean;
2454
+ includeHidden?: boolean;
2455
+ apiGateway?: string;
2456
+ authorization?: string;
2457
+ /**
2458
+ * @deprecated 2D support will be removed in the future
2459
+ */
2460
+ do2D?: boolean;
2461
+ things?: any;
2462
+ headers?: any;
2257
2463
  };
2464
+ export enum MAP_RENDER_MODE {
2465
+ /** Each polygon, its geometry and mesh are sent to the GPU every render frame.
2466
+ * This was the default rendering mode before 4.0.17
2467
+ */
2468
+ MULTI_GEOMETRY = "MULTI_GEOMETRY",
2469
+ /** Polygons' geometries are grouped by material and merged together, resulting in far fewer
2470
+ * draw calls to the GPU. Default rendering mode since 4.0.17
2471
+ */
2472
+ SINGLE_GEOMETRY = "SINGLE_GEOMETRY"
2473
+ }
2258
2474
  }
2259
2475
 
2260
2476
  declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2261
2477
  import { Navigator } from '@mappedin/mappedin-js/navigator';
2478
+ import { MVFData } from '@mappedin/mappedin-js/get-venue/Mappedin.MVF.types';
2262
2479
  import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/mappedin-js/get-venue/Mappedin.types';
2263
2480
  import { MappedinCategory } from '@mappedin/mappedin-js/get-venue/MappedinCategory';
2264
2481
  import { MappedinEvent } from '@mappedin/mappedin-js/get-venue/MappedinEvent';
@@ -2273,8 +2490,9 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2273
2490
  import { MappedinTheme } from '@mappedin/mappedin-js/get-venue/MappedinTheme';
2274
2491
  import { MappedinVenue } from '@mappedin/mappedin-js/get-venue/MappedinVenue';
2275
2492
  import { MappedinVortex } from '@mappedin/mappedin-js/get-venue/MappedinVortex';
2493
+ import Analytics from '@mappedin/mappedin-js/get-venue/Mappedin.Analytics';
2276
2494
  export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
2277
- export enum CollectionType {
2495
+ export enum MappedinCollectionType {
2278
2496
  CATEGORY = "categories",
2279
2497
  EVENT = "events",
2280
2498
  LOCATION = "locations",
@@ -2285,14 +2503,14 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2285
2503
  VORTEX = "vortexes"
2286
2504
  }
2287
2505
  type TAccessors = {
2288
- [CollectionType.CATEGORY]: MappedinCategory;
2289
- [CollectionType.EVENT]: MappedinEvent;
2290
- [CollectionType.LOCATION]: MappedinLocation;
2291
- [CollectionType.MAPGROUP]: MappedinMapGroup;
2292
- [CollectionType.MAP]: MappedinMap;
2293
- [CollectionType.NODE]: MappedinNode;
2294
- [CollectionType.POLYGON]: MappedinPolygon;
2295
- [CollectionType.VORTEX]: MappedinVortex;
2506
+ [MappedinCollectionType.CATEGORY]: MappedinCategory;
2507
+ [MappedinCollectionType.EVENT]: MappedinEvent;
2508
+ [MappedinCollectionType.LOCATION]: MappedinLocation;
2509
+ [MappedinCollectionType.MAPGROUP]: MappedinMapGroup;
2510
+ [MappedinCollectionType.MAP]: MappedinMap;
2511
+ [MappedinCollectionType.NODE]: MappedinNode;
2512
+ [MappedinCollectionType.POLYGON]: MappedinPolygon;
2513
+ [MappedinCollectionType.VORTEX]: MappedinVortex;
2296
2514
  };
2297
2515
  const THINGS: {
2298
2516
  categories: typeof MappedinCategory;
@@ -2488,6 +2706,11 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2488
2706
  [id: string]: MappedinRankings;
2489
2707
  };
2490
2708
  getCollectionItemById<T extends keyof TAccessors, I extends string>(name: T, id: I): TAccessors[T] | null;
2709
+ /**
2710
+ * @hidden
2711
+ * @internal
2712
+ */
2713
+ hydrateFromMVF(mvfData: MVFData): Promise<undefined>;
2491
2714
  /**
2492
2715
  *
2493
2716
  * [experimental] Hydrate the Mappedin instance using a response from either {@link IMappedin.toString()}, {@link getVenueBundle} or by downloading the bundle manually
@@ -2496,9 +2719,11 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin' {
2496
2719
  */
2497
2720
  hydrate(mappedinSerializableData: string | object, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<undefined>;
2498
2721
  images: any;
2722
+ imageBinaries?: Map<string, Uint8Array>;
2499
2723
  scenes: any;
2500
2724
  fetch(): Promise<void>;
2501
2725
  constructor(options: TGetVenueOptionsInternal & TGetVenueOptions);
2726
+ analytics: Analytics;
2502
2727
  /**
2503
2728
  * @hidden
2504
2729
  */
@@ -2622,6 +2847,60 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinPolygon' {
2622
2847
  export class MappedinPolygon extends MappedinNavigatable {
2623
2848
  #private;
2624
2849
  geometry: any;
2850
+ image?: {
2851
+ visible: boolean;
2852
+ url: string | Blob;
2853
+ original: string | Blob;
2854
+ useLocalScaling: boolean;
2855
+ viewBox: {
2856
+ width: number;
2857
+ height: number;
2858
+ };
2859
+ scale: {
2860
+ x: number;
2861
+ y: number;
2862
+ };
2863
+ fitToBounds: boolean;
2864
+ position: {
2865
+ x: number;
2866
+ y: number;
2867
+ z: number;
2868
+ };
2869
+ rotation: {
2870
+ x: number;
2871
+ y: number;
2872
+ z: number;
2873
+ };
2874
+ _isAbsolutelyPositioned?: boolean;
2875
+ };
2876
+ holes?: unknown[];
2877
+ textures?: {
2878
+ image: any;
2879
+ name: 'front' | 'side';
2880
+ useFrontFaceImage?: boolean;
2881
+ }[];
2882
+ material: {
2883
+ color: string;
2884
+ opacity?: number;
2885
+ };
2886
+ label?: {
2887
+ visible: boolean;
2888
+ text: string;
2889
+ align: string;
2890
+ position: {
2891
+ x: number;
2892
+ y: number;
2893
+ z: number;
2894
+ };
2895
+ rotation: {
2896
+ x: number;
2897
+ y: number;
2898
+ z: number;
2899
+ };
2900
+ fontFamily: string;
2901
+ fontSize: number;
2902
+ color: string;
2903
+ };
2625
2904
  /**
2626
2905
  * Node ID.
2627
2906
  *
@@ -2808,6 +3087,7 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinMap' {
2808
3087
  import type { TGeoReference } from '@mappedin/mappedin-js/get-venue/Mappedin.API.types';
2809
3088
  import type { MappedinMapGroup } from '@mappedin/mappedin-js/get-venue/MappedinMapGroup';
2810
3089
  import { MappedinCoordinate } from '@mappedin/mappedin-js/get-venue/MappedinCoordinate';
3090
+ import { MappedinLocation } from '@mappedin/mappedin-js/get-venue';
2811
3091
  /**
2812
3092
  * A {@link MappedinMap} belonging to a specific {@link MappedinVenue}. Typically represents a certain floor. Give this to a {@link MapView} to display to the user.
2813
3093
  *
@@ -2834,6 +3114,11 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinMap' {
2834
3114
  shortName: string;
2835
3115
  elevation: number;
2836
3116
  scale?: number;
3117
+ layers: {
3118
+ visible: boolean;
3119
+ name: string;
3120
+ id: string;
3121
+ }[];
2837
3122
  x_scale?: number;
2838
3123
  perspectiveId?: string;
2839
3124
  scene: any;
@@ -2848,6 +3133,11 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinMap' {
2848
3133
  * @property polygons {[MappedinPolygon]}
2849
3134
  */
2850
3135
  get polygons(): MappedinPolygon[] | undefined;
3136
+ /**
3137
+ * Locations on this map
3138
+ */
3139
+ get locations(): MappedinLocation[];
3140
+ get nodes(): import("./MappedinNode").MappedinNode[];
2851
3141
  /**
2852
3142
  * Map Group this map belongs to.
2853
3143
  *
@@ -2885,28 +3175,56 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinEvent' {
2885
3175
  import type { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
2886
3176
  import type { MappedinLocation } from '@mappedin/mappedin-js/get-venue/MappedinLocation';
2887
3177
  /**
2888
- * An event.
3178
+ * An event such as a promotion attached to a location in a venue for a period of time. Events can be created in the Mappedin CMS.
2889
3179
  *
2890
3180
  * @class MappedinEvent
2891
3181
  */
2892
3182
  export class MappedinEvent {
2893
3183
  #private;
3184
+ /**
3185
+ * Unique id string of the event.
3186
+ */
2894
3187
  id: string;
2895
3188
  type: string;
3189
+ /**
3190
+ * Event name
3191
+ */
2896
3192
  name: string;
3193
+ /**
3194
+ * Optional, longer description of the event.
3195
+ */
2897
3196
  description?: string | undefined;
3197
+ /**
3198
+ * Optional image to be used for displaying the event.
3199
+ */
2898
3200
  image?: TImage | undefined;
3201
+ /**
3202
+ * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
3203
+ */
2899
3204
  startDate?: number | undefined;
3205
+ /**
3206
+ * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
3207
+ */
2900
3208
  endDate?: number | undefined;
3209
+ /**
3210
+ * Timestamp when the event should be displayed. Javascript date in milliseconds since 1 January 1970 UTC.
3211
+ */
2901
3212
  showDate?: number | undefined;
3213
+ /**
3214
+ * @internal
3215
+ */
2902
3216
  constructor(mappedin: Mappedin, data: any);
2903
3217
  /**
2904
- * Location this Event is occuring at.
2905
- *
2906
- * @property location {MappedinLocation}
3218
+ * Location this event is occuring at.
2907
3219
  */
2908
3220
  location(): MappedinLocation | undefined;
3221
+ /**
3222
+ * @internal
3223
+ */
2909
3224
  static hydrate(events: any, mappedin: Mappedin): MappedinEvent[];
3225
+ /**
3226
+ * @internal
3227
+ */
2910
3228
  static fetch(mappedin: Mappedin): Promise<MappedinEvent[]>;
2911
3229
  toJSON(): any;
2912
3230
  }
@@ -2979,9 +3297,10 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinVenue' {
2979
3297
  tzidOverride: string;
2980
3298
  utcOffset: string;
2981
3299
  website: string;
2982
- constructor(data: any);
2983
- static hydrate(data: any): MappedinVenue;
3300
+ constructor(mappedin: Mappedin, data: any);
3301
+ static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
2984
3302
  static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
3303
+ get isMultiBuilding(): any;
2985
3304
  toJSON(): any;
2986
3305
  }
2987
3306
  }
@@ -3140,6 +3459,229 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinNavigatable' {
3140
3459
  }
3141
3460
  }
3142
3461
 
3462
+ declare module '@mappedin/mappedin-js/get-venue/Mappedin.OfflineSearch' {
3463
+ import { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
3464
+ import type { SearchOptions } from 'minisearch';
3465
+ import { MappedinLocation } from '@mappedin/mappedin-js/get-venue/MappedinLocation';
3466
+ import { MappedinCategory } from '@mappedin/mappedin-js/get-venue/MappedinCategory';
3467
+ export const removeAccents: (it: string) => string;
3468
+ export type { SearchOptions };
3469
+ /**
3470
+ * A {@link Mappedin.OfflineSearch} is an offline search module
3471
+ *
3472
+ *
3473
+ * @class Mappedin.OfflineSearch
3474
+ */
3475
+ export type TMappedinOfflineSearchAllOptions = {
3476
+ /**
3477
+ * Array of stopwords to ignore when searching, default: english stopwords
3478
+ */
3479
+ stopWords?: string[];
3480
+ /**
3481
+ * Index location tags - typically better to use either tags or descriptions, depending on what's available
3482
+ * @default true
3483
+ */
3484
+ searchTags?: boolean;
3485
+ /**
3486
+ * Index location descriptions - typically better to use either tags or descriptions, depending on what's available
3487
+ * @default true
3488
+ */
3489
+ searchDescriptions?: boolean;
3490
+ /**
3491
+ * Also index all tags for every location in every category (caution: this may slow down indexing and search)
3492
+ * @default false
3493
+ */
3494
+ searchTagsInCategories?: boolean;
3495
+ /**
3496
+ * Also index all tags for every location in every category (caution: this may slow down indexing and search)
3497
+ * @default false
3498
+ */
3499
+ searchDescriptionsInCategories?: boolean;
3500
+ /**
3501
+ * Initialize Search with a previously indexed JSON string (outputted by OfflineSearch.toJSON())
3502
+ */
3503
+ jsonIndex?: string;
3504
+ /**
3505
+ * Use the location polygons' rank in weighing results
3506
+ */
3507
+ useLocationRank?: boolean;
3508
+ /**
3509
+ * Emit Analytics events when doing search
3510
+ * @default true when running in production
3511
+ */
3512
+ emitAnalyticsEvents?: boolean;
3513
+ /**
3514
+ * Fine tune search constants
3515
+ */
3516
+ constants: {
3517
+ /**
3518
+ * Fuzziness index for location names and tags
3519
+ * @default 0.09
3520
+ */
3521
+ PRIMARY_INDEX_FUZZYNESS: number;
3522
+ /**
3523
+ * Multiplier for location names (1 by default)
3524
+ * @default 1
3525
+ */
3526
+ PRIMARY_INDEX_WEIGHT: number;
3527
+ /**
3528
+ * Multiplier for descriptions
3529
+ * @default 0.025
3530
+ */
3531
+ SECONDARY_INDEX_WEIGHT: number;
3532
+ /**
3533
+ * Multiplier for location names
3534
+ * @default 1
3535
+ */
3536
+ LOCATION_NAME_WEIGHT: number;
3537
+ /**
3538
+ * Multiplier for category names
3539
+ * @default 0.5
3540
+ */
3541
+ CATEGORY_NAME_WEIGHT: number;
3542
+ /**
3543
+ * Multiplier for category locations' descriptions
3544
+ * @default 0.0005
3545
+ */
3546
+ CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number;
3547
+ /**
3548
+ * Multiplier for category locations' tags
3549
+ * @default 0.0005
3550
+ */
3551
+ CATEGORY_LOCATION_TAGS_WEIGHT: number;
3552
+ /**
3553
+ * Multiplier for category locations' names
3554
+ * @default 0.01
3555
+ */
3556
+ CATEGORY_LOCATION_NAME_WEIGHT: number;
3557
+ /**
3558
+ * Multiplier for location tags
3559
+ * @default 0.05
3560
+ */
3561
+ PRIMARY_INDEX_TAGS_NAME_WEIGHT: number;
3562
+ /**
3563
+ * Default rank when one isn't available in the data, default = 1
3564
+ * @default 1
3565
+ */
3566
+ LOCATION_DEFAULT_RANK: number;
3567
+ /**
3568
+ * Ratio of Fuzzy Searches of Location names and tags relative to exact
3569
+ * @default 0.01
3570
+ */
3571
+ RATIO_OF_FUZZY_TO_EXACT: number;
3572
+ /**
3573
+ * Ratio of Prefix Searches of Location names and tags relative to exact
3574
+ * @default 0.2
3575
+ */
3576
+ RATIO_OF_PREFIX_TO_EXACT: number;
3577
+ };
3578
+ };
3579
+ export type TMappedinOfflineAllSearchMatch = {
3580
+ /**
3581
+ * The term that was found
3582
+ */
3583
+ term: string;
3584
+ /**
3585
+ * Term's weight
3586
+ */
3587
+ weight: number;
3588
+ /**
3589
+ * What field the search matched on
3590
+ */
3591
+ matchesOn: string;
3592
+ /**
3593
+ * The value of that field
3594
+ */
3595
+ value?: string;
3596
+ };
3597
+ export type TMappedinOfflineSearchOptions = Partial<TMappedinOfflineSearchAllOptions>;
3598
+ export type TMappedinOfflineSearchResult = {
3599
+ /**
3600
+ * Type describing the object
3601
+ */
3602
+ type: 'MappedinLocation' | 'MappedinCategory' | 'Custom';
3603
+ /**
3604
+ * Details on why the result was returned
3605
+ */
3606
+ matches: TMappedinOfflineAllSearchMatch[];
3607
+ /**
3608
+ * Found object
3609
+ */
3610
+ object: MappedinLocation | MappedinCategory | Record<string, unknown>;
3611
+ /**
3612
+ * Total score of the result
3613
+ */
3614
+ score: number;
3615
+ };
3616
+ export type TMappedinOfflineSearchSuggestions = {
3617
+ /**
3618
+ * Total number of suggestions generated
3619
+ */
3620
+ total: number;
3621
+ /**
3622
+ * List of suggestions
3623
+ */
3624
+ hits: {
3625
+ /**
3626
+ * Suggestion text
3627
+ */
3628
+ text: string;
3629
+ }[];
3630
+ };
3631
+ /**
3632
+ * A {@link OfflineSearch} is an offline search module. It can be initialized at any time by passing the {@link Mappedin} object and a set of {@link TMappedinOfflineSearchOptions} options.
3633
+ *
3634
+ *
3635
+ * @class Mappedin.OfflineSearch
3636
+ */
3637
+ export class OfflineSearch {
3638
+ #private;
3639
+ constructor(
3640
+ /**
3641
+ * Mappedin Venue Object, typically returned by `getVenue`/`showVenue`
3642
+ */
3643
+ mappedin: Mappedin, options?: TMappedinOfflineSearchOptions);
3644
+ /**
3645
+ * Get Suggestions for term
3646
+ */
3647
+ suggest(
3648
+ /**
3649
+ * Search term
3650
+ */
3651
+ term: string): Promise<TMappedinOfflineSearchSuggestions>;
3652
+ /**
3653
+ * Search for a term
3654
+ */
3655
+ search(
3656
+ /**
3657
+ * Search term
3658
+ */
3659
+ term: string): Promise<TMappedinOfflineSearchResult[]>;
3660
+ /**
3661
+ * Export search index to JSON for storage/caching - this would avoid having to re-index
3662
+ * on page reload
3663
+ */
3664
+ toJSON(): Promise<string>;
3665
+ /**
3666
+ * Add a custom query to the search index
3667
+ */
3668
+ addQuery(params: {
3669
+ /**
3670
+ * Query string to match for this object
3671
+ */
3672
+ query: string;
3673
+ /**
3674
+ * Object that is returned when query matches
3675
+ */
3676
+ object: MappedinLocation | MappedinCategory | Record<string, unknown>;
3677
+ /**
3678
+ * Optional weight to multiply by the score
3679
+ */
3680
+ weight?: number;
3681
+ }): Promise<void>;
3682
+ }
3683
+ }
3684
+
3143
3685
  declare module '@mappedin/mappedin-js/get-venue/Mappedin.API.types' {
3144
3686
  /**
3145
3687
  * This file contains the API types for MappedinSDK - before they get turned into Classes
@@ -3255,9 +3797,6 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.API.types' {
3255
3797
  export type TMapGroup = {
3256
3798
  name: string;
3257
3799
  id: string;
3258
- maps: {
3259
- id: TMap['id'];
3260
- }[];
3261
3800
  };
3262
3801
  export type TBuilding = TLocation & {
3263
3802
  groupId: string;
@@ -3310,27 +3849,32 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.API.types' {
3310
3849
  entranceNodeId: string;
3311
3850
  score: number;
3312
3851
  };
3313
- export type TVenue = {
3314
- address: string;
3315
- city: string;
3316
- countrycode: string;
3317
- defaultMap: string;
3318
- externalId: string;
3852
+ export type TLocationState = {
3319
3853
  id: string;
3320
- latitude: number;
3321
- logo: TLogo;
3322
- longitude: number;
3323
- metadata?: any;
3324
3854
  name: string;
3325
- operationHours: TOpeningHours[];
3326
- postal: string;
3327
- slug: string;
3328
- state: string;
3329
- telephone: string;
3330
- tzid: string;
3331
- tzidOverride: string;
3332
- utcOffset: string;
3333
- website: string;
3855
+ value: string;
3856
+ };
3857
+ export type TVenue = {
3858
+ address?: string;
3859
+ city?: string;
3860
+ countrycode?: string;
3861
+ defaultMap?: string;
3862
+ externalId?: string;
3863
+ id?: string;
3864
+ latitude?: number;
3865
+ logo?: TLogo;
3866
+ longitude?: number;
3867
+ metadata?: any;
3868
+ name?: string;
3869
+ operationHours?: TOpeningHours[];
3870
+ postal?: string;
3871
+ slug?: string;
3872
+ state?: string;
3873
+ telephone?: string;
3874
+ tzid?: string;
3875
+ tzidOverride?: string;
3876
+ utcOffset?: string;
3877
+ website?: string;
3334
3878
  };
3335
3879
  export type TMappedinAPI = {
3336
3880
  nodes: TNode[];
@@ -3342,6 +3886,8 @@ declare module '@mappedin/mappedin-js/get-venue/Mappedin.API.types' {
3342
3886
  themes: any;
3343
3887
  venue: TVenue;
3344
3888
  vortexes: TVortex[];
3889
+ locationStates?: TLocationState[];
3890
+ imageBinaries?: Map<string, Uint8Array>;
3345
3891
  };
3346
3892
  }
3347
3893
 
@@ -3431,7 +3977,6 @@ declare module '@mappedin/mappedin-js/renderer/internal/pub-sub' {
3431
3977
 
3432
3978
  declare module '@mappedin/mappedin-js/renderer/Core.interface' {
3433
3979
  import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/mappedin-js/get-venue';
3434
- import CameraControls from '@mappedin/mappedin-js/renderer/internal/Mappedin.CameraControls';
3435
3980
  import { Vector2, Vector3 } from 'three';
3436
3981
  import { changeListenerFn, TMapViewOptions } from '@mappedin/mappedin-js/renderer/MapView.types';
3437
3982
  import RENDER from '@mappedin/mappedin-js/renderer/internal/Mappedin.RenderTasks';
@@ -3448,7 +3993,7 @@ declare module '@mappedin/mappedin-js/renderer/Core.interface' {
3448
3993
  */
3449
3994
  polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
3450
3995
  /**
3451
- * The duration the focus animation should last for.
3996
+ * The duration (in ms) the focus animation should last for.
3452
3997
  * @defaultValue `100`
3453
3998
  */
3454
3999
  duration?: number;
@@ -3487,6 +4032,7 @@ declare module '@mappedin/mappedin-js/renderer/Core.interface' {
3487
4032
  * @internal
3488
4033
  */
3489
4034
  currentScale: number;
4035
+ loadOptions?: TMapViewOptions['loadOptions'];
3490
4036
  imageFlippingEnabled: boolean;
3491
4037
  imageFlippingCache: any;
3492
4038
  cachedPadding: any;
@@ -3506,7 +4052,7 @@ declare module '@mappedin/mappedin-js/renderer/Core.interface' {
3506
4052
  * Some of the functions don't do anything in 2D.
3507
4053
  *
3508
4054
  */
3509
- controls?: typeof CameraControls;
4055
+ controls: any;
3510
4056
  /**
3511
4057
  * The Venue data this MapView is using.
3512
4058
  *
@@ -3599,7 +4145,20 @@ declare module '@mappedin/mappedin-js/renderer/Core.interface' {
3599
4145
  onMapChanged(map: string): void;
3600
4146
  getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string): Vector3;
3601
4147
  getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
4148
+ /**
4149
+ * Takes an x/y pair in Mappedin coordinate space and gives you a Vector3 in scene space
4150
+ * @param nodeOrCoordinate a node or coordinate
4151
+ */
3602
4152
  convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3;
4153
+ /**
4154
+ * Converts a Vector-like object into a MappedinCoordinate for a map.
4155
+ * @param position an object with x and y, like a Vector3
4156
+ * @param mapClass An optional map; otherwise, the current map will be used.
4157
+ */
4158
+ convert3DMapPositionToCoordinate(position: {
4159
+ x: number;
4160
+ y: number;
4161
+ }, mapClass?: MappedinMap): MappedinCoordinate;
3603
4162
  setPadding(padding: {
3604
4163
  top: number;
3605
4164
  left: number;
@@ -3760,8 +4319,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.LabelAtlas' {
3760
4319
  }
3761
4320
  export class FlatLabel {
3762
4321
  constructor(options: any, venue: any, mapObject: any, DEFAULT_FONT: any, polygonMeshesById: any, textLabelsByPolygonId: any, mapView: any, scope: any, atlas: any);
4322
+ id: any;
3763
4323
  text: any;
3764
4324
  stateText: string;
4325
+ fullText: any;
3765
4326
  font: any;
3766
4327
  atlas: any;
3767
4328
  canvasBounds: any;
@@ -3775,8 +4336,8 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.LabelAtlas' {
3775
4336
  polygonMeshesById: any;
3776
4337
  polyId: any;
3777
4338
  map: any;
3778
- color: Color;
3779
- baseColor: Color;
4339
+ color: any;
4340
+ baseColor: any;
3780
4341
  hideOnCreate: boolean;
3781
4342
  hoverLabelText: any;
3782
4343
  fontSize: number;
@@ -3807,7 +4368,6 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.LabelAtlas' {
3807
4368
  index: any;
3808
4369
  layout(map: any, origin: any, size: any, rotation: any, uv: any, color: any): void;
3809
4370
  }
3810
- import { Color } from "three/src/math/Color";
3811
4371
  export {};
3812
4372
  }
3813
4373
 
@@ -3846,6 +4406,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.HTMLCollider' {
3846
4406
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider' {
3847
4407
  import SmartCollisionEngine from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionEngine';
3848
4408
  import { Vector3 } from 'three';
4409
+ import { Rectangle } from '@mappedin/mappedin-js/renderer/internal/quad-tree';
3849
4410
  export type TRange = [number, number, number, number];
3850
4411
  type TCustomCollider<T> = ICollider & T;
3851
4412
  export type TColliderStrategyProps = {
@@ -3859,6 +4420,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
3859
4420
  getBoundingBox: (TColliderStrategyProps: any) => TRange;
3860
4421
  onStrategySelected: (collider: TCustomCollider<any>) => void;
3861
4422
  };
4423
+ export type TGetBoundingBox = ({ x, y }: {
4424
+ x: any;
4425
+ y: any;
4426
+ }) => [number, number, number, number];
3862
4427
  export type TDimensions = {
3863
4428
  width: number;
3864
4429
  height: number;
@@ -3871,13 +4436,19 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
3871
4436
  export interface ICollider {
3872
4437
  dimensions: TDimensions;
3873
4438
  screenPosition: [number, number];
3874
- currentStrategyName: string | null;
4439
+ getBoundingBoxForCurrentStrategy?: TGetBoundingBox;
3875
4440
  options?: Record<string, unknown>;
3876
4441
  mapId: string;
3877
4442
  visible: boolean;
3878
4443
  rank: number;
3879
- _dirty?: boolean;
3880
4444
  id: string;
4445
+ _bboxes?: [
4446
+ string,
4447
+ Rectangle,
4448
+ (collider: TCustomCollider<any>) => void,
4449
+ TGetBoundingBox
4450
+ ][];
4451
+ offscreen?: boolean;
3881
4452
  setAction: (action: EColliderAction) => void;
3882
4453
  action?: EColliderAction;
3883
4454
  position: Vector3;
@@ -3901,15 +4472,16 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider'
3901
4472
  __engine: any;
3902
4473
  _initialRank: number;
3903
4474
  screenPosition: [number, number];
3904
- currentStrategyName: null;
3905
4475
  enabled: boolean;
3906
4476
  options: any;
3907
4477
  mapId: string;
3908
4478
  id: string;
3909
4479
  action: EColliderAction;
4480
+ getBoundingBoxForCurrentStrategy: undefined;
3910
4481
  rank: number;
3911
4482
  visible: boolean;
3912
- position: Vector3;
4483
+ offscreen: boolean;
4484
+ position: any;
3913
4485
  dimensions: {
3914
4486
  width: number;
3915
4487
  height: number;
@@ -4101,11 +4673,11 @@ declare module '@mappedin/mappedin-js/renderer/internal/shave-text' {
4101
4673
  }
4102
4674
 
4103
4675
  declare module '@mappedin/mappedin-js/renderer/layers/EventSystem' {
4104
- import { Object3D, Raycaster } from 'three';
4676
+ import { Object3D } from 'three';
4105
4677
  import { MapView } from '@mappedin/mappedin-js/renderer';
4106
4678
  import { ICore } from '@mappedin/mappedin-js/renderer/Core.interface';
4107
4679
  import BlueDotManager from '@mappedin/mappedin-js/renderer/internal/blue-dot-manager';
4108
- export const raycaster: Raycaster;
4680
+ export const raycaster: any;
4109
4681
  class EventSystemLayer {
4110
4682
  mapView: MapView;
4111
4683
  core: ICore;
@@ -4148,7 +4720,7 @@ declare module '@mappedin/mappedin-js/renderer/layers/EventSystem' {
4148
4720
  };
4149
4721
  hasTouched: boolean;
4150
4722
  calculateMouseCoordinates: (event: any) => void;
4151
- getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection[];
4723
+ getMouseRayIntersects: (objects: Object3D | Object3D[]) => any;
4152
4724
  detectPolygonsUnderMouse: () => any[];
4153
4725
  getMouseMapPosition: () => {
4154
4726
  x: number;
@@ -4196,24 +4768,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.Journey' {
4196
4768
  }
4197
4769
  }
4198
4770
 
4199
- declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler' {
4200
- export namespace UPDATE_ORDERING {
4201
- const BEFORE_CAMERA: number;
4202
- const CAMERA: number;
4203
- const AFTER_CAMERA: number;
4204
- const RENDER: number;
4205
- const AFTER_RENDER: number;
4206
- const AFTER_ALL_UPDATES: number;
4207
- }
4208
- export namespace TASK_PRIORITY {
4209
- const VISIBLE_MAP_HIGH: number;
4210
- const VISIBLE_MAP_LOW: number;
4211
- const VISIBLE_MAP_MARKER: number;
4212
- const ASYNC_MAP_HIGH: number;
4213
- const ASYNC_MAP_LOW: number;
4214
- const ASYNC_MAP_MARKER: number;
4215
- const MAP_LOADED: number;
4216
- }
4771
+ declare module '@mappedin/mappedin-js/get-venue/Mappedin.TaskScheduler' {
4217
4772
  /**
4218
4773
  * A function that can be submitted to the Task Scheduler to run each frame for
4219
4774
  * some provided number of frames. A single update can be repeatedly submitted;
@@ -4247,22 +4802,22 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4247
4802
  * @param [options.userdata] {Any}
4248
4803
  * Arbitrary data that you can store along with this update.
4249
4804
  */
4250
- constructor(options?: {
4251
- callback?: Function | undefined;
4252
- frameCount?: number | undefined;
4253
- ordering?: number | undefined;
4254
- supersededBy?: [FrameUpdate] | undefined;
4255
- name?: string | undefined;
4256
- userdata?: any;
4257
- } | undefined);
4258
- _callback: Function | undefined;
4805
+ constructor(options: {
4806
+ callback: Function;
4807
+ frameCount?: number;
4808
+ ordering?: number;
4809
+ supersededBy?: Set<never>;
4810
+ name: string;
4811
+ userdata?: Record<string, any>;
4812
+ });
4813
+ _callback: Function;
4259
4814
  _frameCount: number;
4260
4815
  _ordering: number;
4261
- _supersededBy: Set<any>;
4262
- name: string | undefined;
4263
- userdata: any;
4816
+ _supersededBy: Set<never>;
4817
+ name: string;
4264
4818
  _remainingFrameCount: number;
4265
4819
  _lastFrameTime: number;
4820
+ userdata?: Record<string, any>;
4266
4821
  /**
4267
4822
  * Return the amount of time that this frame update took to execute during
4268
4823
  * its most recent execution, in milliseconds. If called during this frame
@@ -4302,24 +4857,25 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4302
4857
  * @param [options.userdata] {Any}
4303
4858
  * Arbitrary data that you can store along with this task.
4304
4859
  */
4305
- constructor(options?: {
4306
- callback?: Function | undefined;
4307
- group?: FrameTaskGroup | undefined;
4308
- priority?: number | undefined;
4309
- postponeOnAdd?: number | undefined;
4310
- name?: string | undefined;
4311
- userdata?: any;
4312
- } | undefined);
4313
- _callback: Function | undefined;
4314
- _group: FrameTaskGroup | null;
4315
- _priority: number;
4860
+ constructor(options: {
4861
+ userdata: Record<string, any>;
4862
+ priority: number;
4863
+ group?: FrameTaskGroup;
4864
+ postponeOnAdd: number | boolean;
4865
+ name: string;
4866
+ lastFrameTime: number;
4867
+ callback: Function;
4868
+ });
4316
4869
  _postponed: number | boolean;
4317
- name: string | undefined;
4318
- userdata: any;
4870
+ userdata: Record<string, any>;
4871
+ _priority: number;
4872
+ _group: FrameTaskGroup | null;
4873
+ name: string;
4874
+ _lastFrameTime: number;
4875
+ _callback: Function;
4319
4876
  _complete: boolean;
4320
4877
  _scheduled: boolean;
4321
4878
  _cancelled: boolean;
4322
- _lastFrameTime: number;
4323
4879
  /**
4324
4880
  * Return true if this task has been run at least once.
4325
4881
  *
@@ -4366,18 +4922,18 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4366
4922
  * @param [options.userdata] {Any}
4367
4923
  * Arbitrary data that you can store along with this task group.
4368
4924
  */
4369
- constructor(options?: {
4370
- onComplete?: Function | undefined;
4371
- priority?: number | undefined;
4372
- postponeOnAdd?: number | undefined;
4373
- name?: string | undefined;
4374
- userdata?: any;
4375
- } | undefined);
4925
+ constructor(options: {
4926
+ onComplete?: Function;
4927
+ priority?: number;
4928
+ userdata: Record<string, any>;
4929
+ postponeOnAdd: number | boolean;
4930
+ name: string;
4931
+ });
4932
+ _postponed: number | boolean;
4376
4933
  _onComplete: Function;
4377
4934
  _priority: number;
4378
- _postponed: number | boolean;
4379
- name: string | undefined;
4380
- userdata: any;
4935
+ userdata: Record<string, any>;
4936
+ name: string;
4381
4937
  _tasks: Set<any>;
4382
4938
  _scheduledTasks: Set<any>;
4383
4939
  _scheduled: boolean;
@@ -4396,13 +4952,22 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4396
4952
  * @method tasks
4397
4953
  * @return {[FrameTask]} list of tasks in this group
4398
4954
  */
4399
- getTasks(): [FrameTask];
4955
+ getTasks(): any[];
4400
4956
  /**
4401
4957
  * Empty this task group. This will trivially satisfy `isComplete`.
4402
4958
  *
4403
4959
  * @method clear
4404
4960
  */
4405
4961
  clear(): void;
4962
+ /**
4963
+ * Return one arbitrary incomplete task from this group, or undefined if
4964
+ * there are none.
4965
+ *
4966
+ * @method _popTask
4967
+ * @return {FrameTask} arbitrary scheduled task
4968
+ * @private
4969
+ */
4970
+ _popTask(): any;
4406
4971
  }
4407
4972
  /**
4408
4973
  * A timer for the task scheduler that uses real wall-time to determine if there's
@@ -4412,6 +4977,8 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4412
4977
  * @private
4413
4978
  */
4414
4979
  export class RealTimeTimer {
4980
+ _maxMillisecondsPerFrame: number;
4981
+ _time: number;
4415
4982
  /**
4416
4983
  * @constructor
4417
4984
  * @param [options] {Object} Options for the timer
@@ -4420,10 +4987,8 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4420
4987
  * or equal to this value, then another task may be executed
4421
4988
  */
4422
4989
  constructor(options?: {
4423
- maxMillisecondsPerFrame?: any;
4424
- } | undefined);
4425
- _maxMillisecondsPerFrame: any;
4426
- _time: any;
4990
+ maxMillisecondsPerFrame?: number;
4991
+ });
4427
4992
  /**
4428
4993
  * Begin timing a frame.
4429
4994
  *
@@ -4445,6 +5010,8 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4445
5010
  * @private
4446
5011
  */
4447
5012
  export class FixedTimer {
5013
+ _ticks: number;
5014
+ maxTasksPerFrame: number;
4448
5015
  /**
4449
5016
  * @constructor
4450
5017
  * @param [options] {Object} Options for the timer
@@ -4453,10 +5020,8 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4453
5020
  * Can be modified as the `maxTasksPerFrame` property on this boject.
4454
5021
  */
4455
5022
  constructor(options?: {
4456
- maxTasksPerFrame?: any;
4457
- } | undefined);
4458
- maxTasksPerFrame: any;
4459
- _ticks: number;
5023
+ maxTasksPerFrame?: number;
5024
+ });
4460
5025
  /**
4461
5026
  * Begin timing a frame.
4462
5027
  *
@@ -4500,11 +5065,11 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4500
5065
  * performance information.
4501
5066
  */
4502
5067
  constructor(options?: {
4503
- timer?: any;
4504
- performance?: any;
4505
- } | undefined);
4506
- _timer: any;
4507
- _performance: any;
5068
+ timer?: RealTimeTimer;
5069
+ performance?: boolean;
5070
+ });
5071
+ _timer: RealTimeTimer;
5072
+ _performance: boolean;
4508
5073
  _scheduledUpdatesByOrdering: Multimap;
4509
5074
  _scheduledTasksByPriority: Multimap;
4510
5075
  _postponedTasks: Set<any>;
@@ -4512,18 +5077,6 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4512
5077
  _updatesToRunThisFrame: any[];
4513
5078
  _lastFrameTime: number;
4514
5079
  _updatesRunLastFrame: Set<any>;
4515
- /**
4516
- * Run all scheduled updates, and re-schedule another animation frame if any
4517
- * scheduled updates still exist. If any scheduled update specifies
4518
- * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the
4519
- * frame time runs out.
4520
- *
4521
- * @method update
4522
- * @param timestamp {number} the current animation time, as returned from
4523
- * `performance.now()`; will be automatically filled in by
4524
- * `requestAnimationFrame` when it triggers this as a callback
4525
- */
4526
- update(timestamp: number): void;
4527
5080
  /**
4528
5081
  * Empty the task scheduler's queue. All tasks in it will be cancelled.
4529
5082
  *
@@ -4543,6 +5096,18 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4543
5096
  * @method requestAnimationFrame
4544
5097
  */
4545
5098
  requestAnimationFrame(): void;
5099
+ /**
5100
+ * Run all scheduled updates, and re-schedule another animation frame if any
5101
+ * scheduled updates still exist. If any scheduled update specifies
5102
+ * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the
5103
+ * frame time runs out.
5104
+ *
5105
+ * @method update
5106
+ * @param timestamp {number} the current animation time, as returned from
5107
+ * `performance.now()`; will be automatically filled in by
5108
+ * `requestAnimationFrame` when it triggers this as a callback
5109
+ */
5110
+ update(timestamp: number): void;
4546
5111
  /**
4547
5112
  * Execute all tasks that are currently pending, without regard for the
4548
5113
  * available frame time.
@@ -4567,7 +5132,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4567
5132
  * has not yet been run or if the scheduler has been cleared.
4568
5133
  */
4569
5134
  getUpdatesRunLastFrame(): Set<any>;
4570
- _executeOneTask(timestamp: any): void;
5135
+ _executeOneTask(timestamp: number): void;
4571
5136
  /**
4572
5137
  * Schedule an update to be run for the next `update.frameCount` frames. If
4573
5138
  * the update already exists in the scheduler, the update's frame count will
@@ -4577,7 +5142,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4577
5142
  * @method scheduleUpdate
4578
5143
  * @param task {FrameUpdate} the update to schedule
4579
5144
  */
4580
- scheduleUpdate(update: any): void;
5145
+ scheduleUpdate(update: FrameUpdate): void;
4581
5146
  /**
4582
5147
  * Schedule a task to be run during a frame update. This will also schedule
4583
5148
  * an animation frame to begin processing the task queue.
@@ -4592,7 +5157,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4592
5157
  * @method cancelUpdate
4593
5158
  * @param task {FrameUpdate} the update to cancel
4594
5159
  */
4595
- cancelUpdate(update: any): void;
5160
+ cancelUpdate(update: FrameUpdate): void;
4596
5161
  /**
4597
5162
  * If the given task or group is in the queue, remove it. Cancelling a
4598
5163
  * completed task is a no-op.
@@ -4603,7 +5168,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4603
5168
  * @method cancelTask
4604
5169
  * @param task {FrameTask or FrameTaskGroup} the task to cancel
4605
5170
  */
4606
- cancelTask(task: FrameTask): void;
5171
+ cancelTask(task: FrameTask | FrameTaskGroup): void;
4607
5172
  /**
4608
5173
  * Set the provided task or group not to run, until it's resumed using `resumeTask`.
4609
5174
  *
@@ -4613,7 +5178,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4613
5178
  * @method postponeTask
4614
5179
  * @param task {FrameTask or FrameTaskGroup} the task to postpone
4615
5180
  */
4616
- postponeTask(task: FrameTask): void;
5181
+ postponeTask(task: FrameTask | FrameTaskGroup): void;
4617
5182
  /**
4618
5183
  * Allow a postponed task or task group to resume processing. This will also
4619
5184
  * request an animation frame to allow the resumed task to be processed.
@@ -4624,7 +5189,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4624
5189
  * @method resumeTask
4625
5190
  * @param task {FrameTask or FrameTaskGroup} the task to resume
4626
5191
  */
4627
- resumeTask(task: FrameTask): void;
5192
+ resumeTask(task: FrameTask | FrameTaskGroup): void;
4628
5193
  /**
4629
5194
  * Change the priority of the given scheduled task or task group.
4630
5195
  *
@@ -4632,7 +5197,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4632
5197
  * @param task {FrameTask or FrameTaskGroup} the task whose priority will be changed
4633
5198
  * @param priority {number} the priority to assign the task
4634
5199
  */
4635
- setTaskPriority(task: FrameTask, priority: number): void;
5200
+ setTaskPriority(task: FrameTask | FrameTaskGroup, priority: number): void;
4636
5201
  }
4637
5202
  /**
4638
5203
  * A map that maps a numeric key to a set of values.
@@ -4643,6 +5208,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4643
5208
  * @private
4644
5209
  */
4645
5210
  class Multimap {
5211
+ /**
5212
+ * @method constructor
5213
+ */
5214
+ constructor();
4646
5215
  _map: Map<any, any>;
4647
5216
  _size: number;
4648
5217
  _sortedKeys: any[];
@@ -4702,7 +5271,10 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4702
5271
  * @method values
4703
5272
  * @return {Iterator} iterator over the values in the map
4704
5273
  */
4705
- values(): Iterator<any, any, undefined>;
5274
+ values(): {
5275
+ [Symbol.iterator]: () => any;
5276
+ next: () => any;
5277
+ };
4706
5278
  /**
4707
5279
  * A list of keys in this set, sorted by numeric value. Not cloned,
4708
5280
  * for efficiency's sake, so please don't mutate it.
@@ -4710,7 +5282,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4710
5282
  * @method keys
4711
5283
  * @return {[number]} sorted list of numeric keys in the map
4712
5284
  */
4713
- keys(): [number];
5285
+ keys(): any[];
4714
5286
  /**
4715
5287
  * The number of elements in this multimap, equal to the sum of the sizes
4716
5288
  * of each key's set of values.
@@ -4722,6 +5294,231 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.TaskScheduler'
4722
5294
  export {};
4723
5295
  }
4724
5296
 
5297
+ declare module '@mappedin/mappedin-js/get-venue/Mappedin.MVF.types' {
5298
+ import { FeatureCollection, Polygon, Point, MultiPolygon, Position } from 'geojson';
5299
+ type ManifestFile = {
5300
+ type: 'file';
5301
+ name: string;
5302
+ };
5303
+ type ManifestFolder = {
5304
+ type: 'folder';
5305
+ name: string;
5306
+ children: ManifestFile[];
5307
+ };
5308
+ type OpeningHours = {
5309
+ opens: string;
5310
+ closes: string;
5311
+ dayOfWeek: string;
5312
+ validFrom?: string;
5313
+ validThrough?: string;
5314
+ };
5315
+ type Image = {
5316
+ original?: string;
5317
+ xlarge?: string;
5318
+ xxlarge?: string;
5319
+ medium?: string;
5320
+ '140x140'?: string;
5321
+ xsmall?: string;
5322
+ xxsmall?: string;
5323
+ '66x66'?: string;
5324
+ small?: string;
5325
+ large?: string;
5326
+ };
5327
+ type PolygonImage = string;
5328
+ type Phone = {
5329
+ number: string;
5330
+ extension?: string;
5331
+ };
5332
+ type Link = {
5333
+ label: string;
5334
+ url: string;
5335
+ };
5336
+ type Social = {
5337
+ facebook?: string;
5338
+ twitter?: string;
5339
+ instagram?: string;
5340
+ website?: string;
5341
+ };
5342
+ type LocationState = {
5343
+ type: string;
5344
+ start?: string;
5345
+ end?: string;
5346
+ };
5347
+ type SiblingGroup = {
5348
+ label: string;
5349
+ siblings: string[];
5350
+ };
5351
+ export type MILocationProperties = {
5352
+ id: string;
5353
+ address?: string | null;
5354
+ categories: string[];
5355
+ description?: string | null;
5356
+ email?: string | null;
5357
+ externalId?: string | null;
5358
+ hours?: OpeningHours[] | null;
5359
+ links?: Link[] | null;
5360
+ logo?: Image | null;
5361
+ name: string;
5362
+ phone?: Phone | null;
5363
+ picture?: Image | null;
5364
+ services?: string | null;
5365
+ siblingGroups?: SiblingGroup[] | null;
5366
+ social?: Social | null;
5367
+ spaces?: TLocationSpaceReference[] | null;
5368
+ states?: LocationState[] | null;
5369
+ type: string;
5370
+ };
5371
+ export type MICategoryProperties = {
5372
+ id: string;
5373
+ name: string;
5374
+ picture?: Image;
5375
+ };
5376
+ export type MIBuildingProperties = {
5377
+ id: string;
5378
+ name: string;
5379
+ venue: string;
5380
+ };
5381
+ export type MILevelProperties = {
5382
+ id: string;
5383
+ abbreviation?: string;
5384
+ building?: string;
5385
+ elevation?: number;
5386
+ name: string;
5387
+ };
5388
+ export type MIPolygonlikeProperties = {
5389
+ id: string;
5390
+ altitude?: string;
5391
+ color?: string;
5392
+ externalId?: string | null;
5393
+ height?: string;
5394
+ layer?: string;
5395
+ level: string;
5396
+ parent?: string | null;
5397
+ };
5398
+ type TPseudoNodeSpaceReference = {
5399
+ node: string;
5400
+ map: string;
5401
+ };
5402
+ export type TRealSpaceReference = {
5403
+ id: string;
5404
+ map: string;
5405
+ };
5406
+ type TLocationSpaceReference = TPseudoNodeSpaceReference | TRealSpaceReference;
5407
+ export type TEntrances = {
5408
+ id: string;
5409
+ level: string;
5410
+ };
5411
+ export type MISpaceProperties = MIPolygonlikeProperties & {
5412
+ entrances: TEntrances[];
5413
+ };
5414
+ export type MIObstructionProperties = MIPolygonlikeProperties;
5415
+ export type MIConnectionProperties = {
5416
+ id: string;
5417
+ accessible: boolean;
5418
+ destinations: string[];
5419
+ level: string;
5420
+ multiplier: number;
5421
+ name: string;
5422
+ type: string;
5423
+ weight: number;
5424
+ };
5425
+ export type MINodeProperties = {
5426
+ id: string;
5427
+ accessible: boolean;
5428
+ externalId: string | null;
5429
+ level: string;
5430
+ multiplier: number;
5431
+ neighbors: string[];
5432
+ weight: number;
5433
+ };
5434
+ export type MIManifestProperties = {
5435
+ name: string;
5436
+ folder_struct: (ManifestFolder | ManifestFile)[];
5437
+ version: string;
5438
+ time: string;
5439
+ };
5440
+ export type MIStyle = {
5441
+ id: string;
5442
+ /** The altitude of the bottom of the geometry, in metres. */
5443
+ altitude: number;
5444
+ color: string;
5445
+ height: number;
5446
+ image?: PolygonImage;
5447
+ opacity: number;
5448
+ };
5449
+ export type MIImageInstance = {
5450
+ /** The local path or URL of the image. */
5451
+ path: string;
5452
+ /** The position of the centre of the image, in [long, lat] form. */
5453
+ position: Position;
5454
+ /** The altitude of the image, in metres. */
5455
+ altitude: number;
5456
+ /** Euler angles representing the rotation of the image, in degrees. Angles are in XYZ order. */
5457
+ rotation: {
5458
+ x: number;
5459
+ y: number;
5460
+ z: number;
5461
+ };
5462
+ /** The size of the image, in metres. */
5463
+ size: {
5464
+ x: number;
5465
+ y: number;
5466
+ };
5467
+ /** The portion of the image to display. */
5468
+ viewBox: {
5469
+ top: number;
5470
+ left: number;
5471
+ width: number;
5472
+ height: number;
5473
+ };
5474
+ /**
5475
+ * A space or obstruction to associate this image with. If provided,
5476
+ * changes to the polygon's visibility will affect this image.
5477
+ * */
5478
+ polygonId?: string;
5479
+ };
5480
+ export type MIGeoJSONManifestCollection = FeatureCollection<Point, MIManifestProperties>;
5481
+ export type MIGeoJSONBuildingCollection = FeatureCollection<Polygon, MIBuildingProperties>;
5482
+ export type MIGeoJSONConnectionCollection = FeatureCollection<Point, MIConnectionProperties>;
5483
+ export type MIGeoJSONLevelCollection = FeatureCollection<Polygon | MultiPolygon, MILevelProperties>;
5484
+ export type MIGeoJSONSpaceCollection = FeatureCollection<Polygon, MISpaceProperties>;
5485
+ export type MIGeoJSONObstructionCollection = FeatureCollection<Polygon, MIObstructionProperties>;
5486
+ export type MIGeoJSONNodeCollection = FeatureCollection<Point, MINodeProperties>;
5487
+ export type MIGeoJSONLocationCollection = FeatureCollection<null, MILocationProperties>;
5488
+ export type MIGeoJSONCategoryCollection = FeatureCollection<null, MICategoryProperties>;
5489
+ export type WithIDs<T> = Map<string, T>;
5490
+ export type MIStyleCollection = MIStyle[];
5491
+ /**
5492
+ * A mapping of polygon IDs to style IDs;
5493
+ */
5494
+ export type MIPolygonStyle = {
5495
+ [key in string]: string;
5496
+ };
5497
+ export type MIImageInstanceCollection = MIImageInstance[];
5498
+ /**
5499
+ * The entire data collection for an MVF, in a single JSON collection.
5500
+ *
5501
+ */
5502
+ export type MVFDataJSON = {
5503
+ connection: WithIDs<MIGeoJSONConnectionCollection>;
5504
+ level: WithIDs<MIGeoJSONLevelCollection>;
5505
+ node: WithIDs<MIGeoJSONNodeCollection>;
5506
+ obstruction: WithIDs<MIGeoJSONObstructionCollection>;
5507
+ space: WithIDs<MIGeoJSONSpaceCollection>;
5508
+ building: MIGeoJSONBuildingCollection;
5509
+ category: MIGeoJSONCategoryCollection;
5510
+ style: MIStyleCollection;
5511
+ polygonStyle: WithIDs<MIPolygonStyle>;
5512
+ imageInstance: WithIDs<MIImageInstanceCollection>;
5513
+ location: MIGeoJSONLocationCollection;
5514
+ manifest: MIGeoJSONManifestCollection;
5515
+ };
5516
+ export type MVFData = MVFDataJSON & {
5517
+ imageBinaries: WithIDs<Uint8Array>;
5518
+ };
5519
+ export {};
5520
+ }
5521
+
4725
5522
  declare module '@mappedin/mappedin-js/get-venue/MappedinLocationRankings' {
4726
5523
  import type { Mappedin } from '@mappedin/mappedin-js/get-venue/Mappedin';
4727
5524
  import type { TLocation } from '@mappedin/mappedin-js/get-venue/Mappedin.API.types';
@@ -4771,23 +5568,6 @@ declare module '@mappedin/mappedin-js/get-venue/MappedinTheme' {
4771
5568
  }
4772
5569
  }
4773
5570
 
4774
- declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.CameraControls' {
4775
- export default CameraControls;
4776
- /**
4777
- * The advanced, manual camera controls for {{#crossLink "MapView"}}{{/crossLink}}. You probably don't need to use this at all, instead relying on the MapView's {{#crossLink "MapView/focusOn:method"}}{{/crossLink}}, {{#crossLink "MapView/resetCamera:method"}}{{/crossLink}} and built in touch/mouse controls.
4778
- * This class will let you do things like change the min/max zoom, tilt, and pan, attach to camera events, and move/animate the camera to specifc points.
4779
- *
4780
- * The camera works by setting an anchor point on the scene at ground level and pointing the camera at it. {{#crossLink "CameraControls/zoom:method"}}{{/crossLink}} controls how far the camera is from the anchor, and {{#crossLink "CameraControls/tilt:method"}}{{/crossLink}}/{{#crossLink "CameraControls/rotate:method"}}{{/crossLink}} controls the angle the camera is rotated about it.
4781
- * The camera will always be pointed directly at the anchor point. {{#crossLink "CameraControls/pan:method"}}{{/crossLink}} or {{#crossLink "CameraControls/setPosition:method"}}{{/crossLink}} will move that anchor around on the 2D ground plane.
4782
- *
4783
- * Created for you automatically with a MapView, don't re-create yourself.
4784
- * @type {any}
4785
- *
4786
- * @class CameraControls
4787
- */
4788
- let CameraControls: any;
4789
- }
4790
-
4791
5571
  declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.RenderTasks' {
4792
5572
  export default RENDER;
4793
5573
  namespace RENDER {
@@ -4803,56 +5583,85 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollisionE
4803
5583
  import './Mappedin.SmartCollisionEngine.scss';
4804
5584
  import { ICollider, TRange } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
4805
5585
  import { MappedinMap, MapView } from '@mappedin/mappedin-js/renderer';
5586
+ import { ICore } from '@mappedin/mappedin-js/renderer/Core.interface';
5587
+ import { Rectangle, QuadTree } from '@mappedin/mappedin-js/renderer/internal/quad-tree';
4806
5588
  export const COLLIDER_STRATEGY_LOW_PRIORITY = "LOW_PRIORITY";
4807
5589
  class SmartCollisionEngine {
4808
- #private;
4809
- _makeCollidersDirtyThrottled: any;
4810
- colliderCanvas: HTMLCanvasElement;
4811
- debugCanvas: HTMLCanvasElement;
4812
- colliderCanvasContext: CanvasRenderingContext2D;
4813
- debugCanvasContext: CanvasRenderingContext2D;
4814
- collisionEngineContainerEl: HTMLDivElement;
4815
- stepsX: any;
4816
- stepsY: any;
4817
- totalWidth: any;
4818
- totalHeight: any;
4819
- project: any;
4820
- grid: Uint8Array;
4821
- colliders: Map<string, ICollider>;
4822
- offscreenRanges: TRange[];
4823
- get sortedColliders(): ICollider[];
4824
- initialized: boolean;
4825
- mapView: MapView;
4826
- constructor(mapView: any);
4827
- init: (container: HTMLDivElement, projectFn: ({ position, mapId }: {
4828
- position: Vector3;
4829
- mapId: MappedinMap['id'];
4830
- }) => {
4831
- x: number;
4832
- y: number;
4833
- }) => void;
4834
- updatePosition: () => void;
4835
- updateVisibility: () => void;
4836
- add: (colliderId: string, collider: ICollider) => void;
4837
- remove: (colliderId: string) => void;
4838
- /**
4839
- * When adding/removing new colliders, or when updating their priorty, we need to make all colliders around them as "dirty",
4840
- * so they can be reconcilded correctly
4841
- */
4842
- makeCollidersDirty: () => void;
4843
- /**
4844
- * Allow to throttle making collders dirty. This is useful for things like BlueDot follow mode,
4845
- * As we follow the BlueDot, colliders will overlap, but constantly updating their visiblity makes
4846
- * for a bad experience
4847
- */
4848
- makeCollidersDirtyThrottled: (time: any) => void;
4849
- resize: (container: any) => void;
4850
- update: () => void;
4851
- destroy: () => void;
5590
+ #private;
5591
+ colliderCanvas: HTMLCanvasElement;
5592
+ debugCanvas: HTMLCanvasElement;
5593
+ colliderCanvasContext: CanvasRenderingContext2D;
5594
+ debugCanvasContext: CanvasRenderingContext2D;
5595
+ collisionEngineContainerEl: HTMLDivElement;
5596
+ stepsX: any;
5597
+ stepsY: any;
5598
+ totalWidth: any;
5599
+ totalHeight: any;
5600
+ project: any;
5601
+ colliders: Map<string, ICollider>;
5602
+ offscreenRanges: TRange[];
5603
+ get sortedColliders(): ICollider[];
5604
+ initialized: boolean;
5605
+ mapView: MapView;
5606
+ core: ICore;
5607
+ screen: Rectangle;
5608
+ constructor(mapView: any, core: ICore);
5609
+ init: (container: HTMLDivElement, projectFn: ({ position, mapId }: {
5610
+ position: any;
5611
+ mapId: MappedinMap['id'];
5612
+ }) => {
5613
+ x: number;
5614
+ y: number;
5615
+ }) => void;
5616
+ qtree: QuadTree;
5617
+ recompute: () => void;
5618
+ draw: () => void;
5619
+ reposition: () => void;
5620
+ add: (colliderId: string, collider: ICollider) => void;
5621
+ remove: (colliderId: string) => void;
5622
+ update: () => void;
5623
+ resize: (container: any) => void;
5624
+ destroy: () => void;
4852
5625
  }
4853
5626
  export default SmartCollisionEngine;
4854
5627
  }
4855
5628
 
5629
+ declare module '@mappedin/mappedin-js/renderer/internal/quad-tree' {
5630
+ export function contains(rect1: Rectangle, rect2: Rectangle): boolean;
5631
+ export function intersects(rect1: Rectangle, rect2: Rectangle): boolean;
5632
+ class Rectangle {
5633
+ x: number;
5634
+ y: number;
5635
+ w: number;
5636
+ h: number;
5637
+ userData?: any;
5638
+ constructor(x: number, y: number, w: number, h: number, userData?: any);
5639
+ contains(rectangle: Rectangle): boolean;
5640
+ intersects(rectangle: Rectangle): boolean;
5641
+ draw(context: CanvasRenderingContext2D): void;
5642
+ }
5643
+ class QuadTree {
5644
+ #private;
5645
+ boundary: Rectangle;
5646
+ capacity: number;
5647
+ objects: Rectangle[];
5648
+ topLeft: QuadTree;
5649
+ topRight: QuadTree;
5650
+ bottomLeft: QuadTree;
5651
+ bottomRight: QuadTree;
5652
+ divided: boolean;
5653
+ parent?: QuadTree;
5654
+ getSize(): any;
5655
+ constructor(boundary: Rectangle, parent?: QuadTree);
5656
+ subdivide(): void;
5657
+ query(rectangle: Rectangle): Rectangle[];
5658
+ insert(rectangle: Rectangle): boolean;
5659
+ drawObjects(context: CanvasRenderingContext2D): void;
5660
+ draw(context: CanvasRenderingContext2D): void;
5661
+ }
5662
+ export { QuadTree, Rectangle };
5663
+ }
5664
+
4856
5665
  declare module '@mappedin/mappedin-js/navigator/Edge' {
4857
5666
  import INode from '@mappedin/mappedin-js/navigator/interfaces/INode';
4858
5667
  import IVortex from '@mappedin/mappedin-js/navigator/interfaces/IVortex';