@mappedin/react-native-sdk 4.1.0-beta.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -5,9 +5,8 @@
5
5
  // ../react-native-webview/lib/WebViewTypes
6
6
  // ../three
7
7
  // ../@tweenjs/tween.js
8
- // ../three/src/math/Color
9
- // ../three/src/core/Object3D
10
- // ../three/src/math/Vector3
8
+ // ../minisearch
9
+ // ../geojson
11
10
 
12
11
  declare module '@mappedin/react-native-sdk' {
13
12
  export { MiMapView } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView';
@@ -16,18 +15,21 @@ declare module '@mappedin/react-native-sdk' {
16
15
  export type { TMiMiniMapProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap';
17
16
  export type { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
18
17
  export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
19
- export type { TGetVenueOptions, TGetVenueBundleOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
18
+ export type { TGetVenueOptions, TGetVenueBundleOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
20
19
  export { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
21
- export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
20
+ export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
22
21
  export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
23
22
  import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
24
- export type { TJourneyOptions, TGeolocationObject, TPathOptions, TFlatLabelPolygonOptions, TFloatingLabelPolygonOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TFocusOnTargets, TCommonLabelOptions, TCameraAnimationOptions, TFocusOnOptions, TAnimatePositionOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
23
+ export type { TJourneyOptions, TGeolocationObject, TPathOptions, TFlatLabelPolygonOptions, TFloatingLabelPolygonOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TFocusOnTargets, TCommonLabelOptions, TCameraAnimationOptions, TFocusOnOptions, TAnimatePositionOptions, TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
25
24
  export type { TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptionsBase };
26
25
  export type TEnableBlueDotOptions = Omit<TEnableBlueDotOptionsBase, 'positionUpdater' | 'geolocationSource'>;
27
26
  export type TLabelAllLocationCommonOptions = Omit<TLabelAllLocationCommonOptionsBase, 'sortFunction' | 'translationMap'>;
27
+ export type { TMapViewRNOptions } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
28
+ export type { TMiMapViewVenueOptions } from '@mappedin/react-native-sdk/wrappers/common';
28
29
  export type { IDirectionsResult, MappedinDirections, TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
29
- export type { TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
30
- export { E_GET_DIRECTIONS_MESSAGES, BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
30
+ export type { TShowVenueOptions, E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
31
+ export { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
32
+ export { BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
31
33
  }
32
34
 
33
35
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView' {
@@ -36,6 +38,8 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
36
38
  import { STATE } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
37
39
  import { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
38
40
  import type { TBlueDotPositionUpdate, TBlueDotStateChange, MappedinPolygon, MappedinMap, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
41
+ import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
42
+ import { TMapViewRNOptions } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
39
43
  export type TMiMapViewProps = {
40
44
  /**
41
45
  * The MapViewStore instance will be returned here
@@ -44,18 +48,12 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
44
48
  /**
45
49
  * Options to initialze MiMapView with
46
50
  */
47
- options: TMiMapViewOptions & {
48
- /**
49
- * Use a bundle for venue loading and cache it for faster subsequent loading
50
- * @beta
51
- */
52
- useBundle?: boolean;
53
- };
51
+ options: TMiMapViewOptions & TMapViewRNOptions;
54
52
  /**
55
53
  * Venue Data to render inside the MapView. This is returned by {@link getVenue} or {@link getVenueBundle}
56
54
  */
57
55
  venueData?: Mappedin;
58
- style?: any;
56
+ style?: React.CSSProperties;
59
57
  /**
60
58
  * Called when an interactive polygon is clicked
61
59
  */
@@ -100,6 +98,16 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
100
98
  onStateChanged?: (prop: {
101
99
  state: STATE;
102
100
  }) => void;
101
+ /**
102
+ * Called if an error occurs loading the venue map
103
+ */
104
+ onVenueLoadError?: (prop: {
105
+ error: {
106
+ name: ERROR;
107
+ message: ERROR_MESSAGES;
108
+ stack?: string;
109
+ };
110
+ }) => void;
103
111
  };
104
112
  /**
105
113
  * Mappedin MapView component
@@ -108,7 +116,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
108
116
  /**
109
117
  * @category Component
110
118
  */
111
- export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "options" | "style" | "onFirstMapLoaded" | "onDataLoaded" | "venueData" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onNothingClicked" | "onMapChanged" | "onStateChanged"> & React.RefAttributes<MapViewStore>>>;
119
+ export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "style" | "options" | "onFirstMapLoaded" | "onDataLoaded" | "venueData" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onNothingClicked" | "onMapChanged" | "onStateChanged" | "onVenueLoadError"> & React.RefAttributes<MapViewStore>>>;
112
120
  }
113
121
 
114
122
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap' {
@@ -116,6 +124,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
116
124
  import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
117
125
  import { TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
118
126
  import type { MappedinLocation, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
127
+ import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
119
128
  export type TMiMiniMapProps = {
120
129
  /**
121
130
  * Options to initialze MiMapView with
@@ -133,6 +142,16 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
133
142
  venueData?: Mappedin;
134
143
  location: MappedinLocation['id'] | MappedinLocation;
135
144
  focusOptions?: TFocusOnOptions;
145
+ /**
146
+ * Called if there's an error loading the minimap
147
+ */
148
+ onMiniMapLoadError?: (prop: {
149
+ error: {
150
+ name: ERROR;
151
+ message: ERROR_MESSAGES;
152
+ stack?: string;
153
+ };
154
+ }) => void;
136
155
  };
137
156
  /**
138
157
  * Mappedin MiniMap component
@@ -148,8 +167,8 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
148
167
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store' {
149
168
  import { RNMappedinController } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController';
150
169
  import { TReactNativeFlatLabelAllLocations, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelPolygonOptions, TReactNativeFloatingLabelPolygonOptions, TSerializableJourneyOptions } from '@mappedin/react-native-sdk/wrappers/common';
151
- import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TFocusOnOptions, TAnimatePositionOptions, TLabelAllLocationFloatingLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
152
- import { STATE, Mappedin, MappedinNode, MappedinMap, MappedinLocation, MappedinDirections, MappedinPolygon, TGetVenueOptions, TShowVenueOptions, MappedinCoordinate, MappedinDestinationSet, TCreateMarkerOptions, E_BLUEDOT_STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
170
+ import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TFocusOnOptions, TAnimatePositionOptions, TLabelAllLocationFloatingLabelOptions, TMappedinOfflineSearchOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
171
+ import { STATE, Mappedin, MappedinNode, MappedinMap, MappedinLocation, MappedinDirections, MappedinCategory, MappedinPolygon, TGetVenueOptions, TShowVenueOptions, MappedinCoordinate, MappedinDestinationSet, TCreateMarkerOptions, E_BLUEDOT_STATE, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
153
172
  import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
154
173
  export class MapViewStore extends RNMappedinController {
155
174
  #private;
@@ -170,12 +189,18 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
170
189
  /**
171
190
  * @hidden
172
191
  */
173
- loadVenue(options: TGetVenueOptions, showVenueOptions: TShowVenueOptions): Promise<Mappedin | undefined>;
192
+ loadVenue(options: TGetVenueOptions, showVenueOptions: TShowVenueOptions & {
193
+ prepareSearch?: boolean;
194
+ searchOptions?: TMappedinOfflineSearchOptions;
195
+ }): Promise<unknown>;
174
196
  /**
175
197
  *
176
198
  * @hidden
177
199
  */
178
- showVenue(venueData: Mappedin, showVenueOptions: TShowVenueOptions): Promise<void>;
200
+ showVenue(venueData: Mappedin, showVenueOptions: TShowVenueOptions & {
201
+ prepareSearch?: boolean;
202
+ searchOptions?: TMappedinOfflineSearchOptions;
203
+ }): Promise<unknown>;
179
204
  /**
180
205
  * Clear any cached venue bundles that were downloaded as part of LOAD_VENUE with useBundle: true
181
206
  * This ensure that the next time keys are passed in, we get a fresh bundle
@@ -264,12 +289,12 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
264
289
  */
265
290
  setTilt: (tilt: number) => Promise<undefined>;
266
291
  /**
267
- * The current rotation in degrees from north.
292
+ * The current rotation in radians from north.
268
293
  * @deprecated Use CameraControls.rotation instead
269
294
  */
270
295
  rotation: number;
271
296
  /**
272
- * @param rotation The new value to set the rotation to, in degrees from north..
297
+ * @param rotation The new value to set the rotation to, in radians from north..
273
298
  * @deprecated Use CameraControls.setRotation instead
274
299
  */
275
300
  setRotation: (rotation: number) => Promise<undefined>;
@@ -287,7 +312,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
287
312
  */
288
313
  set: (positionOptions?: TAnimatePositionOptions | undefined) => Promise<unknown>;
289
314
  /**
290
- * The current rotation in degrees from north.
315
+ * The current rotation in radians from north.
291
316
  */
292
317
  rotation: number;
293
318
  /**
@@ -364,6 +389,32 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
364
389
  * Draw a path based on a list of Nodes
365
390
  */
366
391
  drawPath(pathNodesOrNodeIds: (MappedinNode | MappedinNode['id'])[], pathOptions: TPathOptions): Promise<unknown>;
392
+ OfflineSearch: {
393
+ /**
394
+ *
395
+ * @param query String to search for
396
+ */
397
+ search: (query: string) => Promise<TMappedinOfflineSearchResult[]>;
398
+ /**
399
+ *
400
+ * @param query Get a list of suggestions for query
401
+ */
402
+ suggest: (query: string) => Promise<TMappedinOfflineSearchSuggestions>;
403
+ addQuery: (params: {
404
+ /**
405
+ * Query string to match for this object
406
+ */
407
+ query: string;
408
+ /**
409
+ * Object that is returned when query matches
410
+ */
411
+ object: MappedinLocation | MappedinCategory | Record<string, unknown>;
412
+ /**
413
+ * Optional weight to multiply by the score
414
+ */
415
+ weight?: number;
416
+ }) => Promise<unknown>;
417
+ };
367
418
  /**
368
419
  * @hidden
369
420
  */
@@ -380,8 +431,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/index.rn' {
380
431
  export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TCommonLabelOptions, TFlatLabelOptions, TFlatLabelPolygonOptions, TFloatingLabelPolygonOptions, TLabelAllLocationCommonOptions, TLabelAllLocationFloatingLabelOptions, TLabelAllLocationFlatLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
381
432
  export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator';
382
433
  export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
383
- export type { TGetVenueBundleOptions, TGetVenueOptions, TMappedinDirective, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
384
- export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings } from '@mappedin/react-native-sdk/core/packages/get-venue';
434
+ export type { TGetVenueBundleOptions, TGetVenueOptions, TMappedinDirective, TShowVenueOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions } from '@mappedin/react-native-sdk/core/packages/get-venue';
435
+ export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings, MAP_RENDER_MODE, OfflineSearch, MappedinCollectionType } from '@mappedin/react-native-sdk/core/packages/get-venue';
385
436
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
386
437
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
387
438
  }
@@ -393,6 +444,67 @@ declare module '@mappedin/react-native-sdk/wrappers/common' {
393
444
  export { PubSub } from '@mappedin/react-native-sdk/wrappers/common/pub-sub';
394
445
  }
395
446
 
447
+ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types' {
448
+ import { MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
449
+ import { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
450
+ import type { MappedinCategory, MappedinLocation, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult } from '@mappedin/react-native-sdk/core/packages/get-venue';
451
+ import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
452
+ export type TPolygonColorOptions = {
453
+ color: string;
454
+ opacity?: number;
455
+ textColor?: string;
456
+ };
457
+ export type { TFocusOptionsLegacy };
458
+ export type TFocusOptionsLegacySerializable = Omit<TFocusOptionsLegacy, 'nodes' | 'polygons'> & {
459
+ nodes: (MappedinNode | MappedinNode['id'])[];
460
+ polygons: (MappedinPolygon['id'] | MappedinPolygon)[];
461
+ };
462
+ export type TMapViewRNOptions = {
463
+ /**
464
+ * Use a bundle for venue loading and cache it for faster subsequent loading
465
+ * @beta
466
+ */
467
+ useBundle?: boolean;
468
+ loadOptions?: {
469
+ /**
470
+ * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU
471
+ * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY`
472
+ */
473
+ mapRenderStrategy?: MAP_RENDER_MODE;
474
+ };
475
+ /**
476
+ * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs.
477
+ * @default false
478
+ */
479
+ prepareSearch?: boolean;
480
+ /**
481
+ * Customize search weights
482
+ */
483
+ searchOptions?: TMappedinOfflineSearchOptions;
484
+ };
485
+ export type TMappedinOfflineSearchBridgeResult = Omit<TMappedinOfflineSearchResult, 'object'> & {
486
+ object: {
487
+ type: 'MappedinLocation' | 'MappedinCategory' | 'Custom';
488
+ id: string;
489
+ };
490
+ };
491
+ export type TMappedinCustomSearchObject = MappedinLocation | MappedinCategory | Record<string, unknown>;
492
+ }
493
+
494
+ declare module '@mappedin/react-native-sdk/wrappers/common/errors' {
495
+ export enum ERROR {
496
+ LOAD_VENUE_FAILED = "LOAD_VENUE_FAILED",
497
+ SHOW_VENUE_FAILED = "SHOW_VENUE_FAILED",
498
+ SET_MAP_FAILED = "SET_MAP_FAILED",
499
+ SHOW_MINIMAP_ERROR = "SHOW_MINIMAP_ERROR",
500
+ LOAD_MINIMAP_ERROR = "LOAD_MINIMAP_ERROR"
501
+ }
502
+ export enum ERROR_MESSAGES {
503
+ GENERIC_LOAD_VENUE_ERROR = "Unable to load Venue. Please check your keys",
504
+ GENERIC_SET_MAP_ERROR = "Unable to set map, check that you're passing a valid map"
505
+ }
506
+ }
507
+
396
508
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' {
397
509
  export { MiMapView } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView';
398
510
  export type { TMiMapViewProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView';
@@ -400,18 +512,21 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' {
400
512
  export type { TMiMiniMapProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap';
401
513
  export type { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
402
514
  export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
403
- export type { TGetVenueOptions, TGetVenueBundleOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
515
+ export type { TGetVenueOptions, TGetVenueBundleOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
404
516
  export { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
405
- export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
517
+ export { COLLISION_RANKING_TIERS, MARKER_ANCHOR, E_BLUEDOT_STATE, MappedinCoordinate, labelThemes, E_BLUEDOT_MARKER_STATE, E_BLUEDOT_STATE_REASON, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
406
518
  export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
407
519
  import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
408
- export type { TJourneyOptions, TGeolocationObject, TPathOptions, TFlatLabelPolygonOptions, TFloatingLabelPolygonOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TFocusOnTargets, TCommonLabelOptions, TCameraAnimationOptions, TFocusOnOptions, TAnimatePositionOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
520
+ export type { TJourneyOptions, TGeolocationObject, TPathOptions, TFlatLabelPolygonOptions, TFloatingLabelPolygonOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TFocusOnTargets, TCommonLabelOptions, TCameraAnimationOptions, TFocusOnOptions, TAnimatePositionOptions, TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
409
521
  export type { TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptionsBase };
410
522
  export type TEnableBlueDotOptions = Omit<TEnableBlueDotOptionsBase, 'positionUpdater' | 'geolocationSource'>;
411
523
  export type TLabelAllLocationCommonOptions = Omit<TLabelAllLocationCommonOptionsBase, 'sortFunction' | 'translationMap'>;
524
+ export type { TMapViewRNOptions } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
525
+ export type { TMiMapViewVenueOptions } from '@mappedin/react-native-sdk/wrappers/common';
412
526
  export type { IDirectionsResult, MappedinDirections, TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
413
- export type { TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
414
- export { E_GET_DIRECTIONS_MESSAGES, BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
527
+ export type { TShowVenueOptions, E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
528
+ export { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
529
+ export { BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
415
530
  }
416
531
 
417
532
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController' {
@@ -458,26 +573,11 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/Mappedi
458
573
  }
459
574
  }
460
575
 
461
- declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types' {
462
- import { MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
463
- import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
464
- export type TPolygonColorOptions = {
465
- color: string;
466
- opacity?: number;
467
- textColor?: string;
468
- };
469
- export type { TFocusOptionsLegacy };
470
- export type TFocusOptionsLegacySerializable = Omit<TFocusOptionsLegacy, 'nodes' | 'polygons'> & {
471
- nodes: (MappedinNode | MappedinNode['id'])[];
472
- polygons: (MappedinPolygon['id'] | MappedinPolygon)[];
473
- };
474
- }
475
-
476
576
  declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
477
577
  import type { TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
478
578
  import { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
479
579
  /** Classes */
480
- export { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
580
+ export { Mappedin, MappedinCollectionType } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
481
581
  export { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
482
582
  export { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolygon';
483
583
  export { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode';
@@ -497,9 +597,12 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
497
597
  export type { IDirectionsResult } from '@mappedin/react-native-sdk/core/packages/navigator';
498
598
  export type { TOperationHoursMap } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
499
599
  export type { TDirectionToOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavigatable';
600
+ export { OfflineSearch } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.OfflineSearch';
601
+ export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.OfflineSearch';
500
602
  /** API data types */
501
603
  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/react-native-sdk/core/packages/get-venue/Mappedin.API.types';
502
604
  export type { TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
605
+ import { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
503
606
  export type TShowVenueOptions = {
504
607
  /**
505
608
  * Sets the initial background color of the map, including while loading.
@@ -511,14 +614,24 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
511
614
  */
512
615
  backgroundAlpha?: number;
513
616
  /**
514
- * Whether or not to display labels initially
617
+ * Whether or not to display default styled Floating Labels initially
515
618
  */
516
619
  labelAllLocationsOnInit?: boolean;
517
620
  /**
518
621
  * The id of the first map to show on map load
519
622
  */
520
623
  firstMapId?: string;
624
+ loadOptions?: {
625
+ /**
626
+ * Set the map render strategy in order to optimize FPS
627
+ *
628
+ * @beta
629
+ */
630
+ mapRenderStrategy?: MAP_RENDER_MODE;
631
+ };
521
632
  };
633
+ export { MAP_RENDER_MODE };
634
+ export function getVenueMVF(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
522
635
  /**
523
636
  * Get Venue Data for a Mappedin Venue
524
637
  */
@@ -555,6 +668,23 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
555
668
  url: any;
556
669
  updated_at: any;
557
670
  }): Promise<Mappedin>;
671
+ /**
672
+ * Get the bundle URL and updated_at time.
673
+ * @internal
674
+ */
675
+ export function getVenueMVFURL(userOptions: TGetVenueBundleOptions): Promise<{
676
+ url: string;
677
+ updated_at: string;
678
+ }>;
679
+ /**
680
+ * @internal
681
+ */
682
+ export function downloadVenueBundleMVF(options: TGetVenueBundleOptions,
683
+ /**
684
+ * use Web Workers to speed up MVF parsing. This is likely only benefitial for larger venues,
685
+ * and may be determental to smaller ones, hence it is off by default
686
+ */
687
+ useWorker?: boolean): Promise<unknown>;
558
688
  }
559
689
 
560
690
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums' {
@@ -587,30 +717,30 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
587
717
  CUSTOM_GEOLOCATION_PROVIDER_ERROR = 3
588
718
  }
589
719
  /**
590
- What we currently know about the user's position, and how confident we are.
720
+ What we currently know about the user's position and how confident we are.
591
721
  */
592
722
  export enum E_BLUEDOT_STATE {
593
723
  /**
594
- * We haven't started listening to position updates
724
+ * Not listening to Blue Dot position updates
595
725
  */
596
726
  NOT_LISTENING = 0,
597
727
  /**
598
- * We have started listening to position updates
728
+ * Listenign for listening to position updates but have not yet received a position
599
729
  */
600
730
  LISTENING = 1,
601
731
  /**
602
- * We've received relevant positions, and user is inside the venue
732
+ * Received relevant positions and user is in the venue
603
733
  */
604
734
  HAS_POSITION = 2,
605
735
  /**
606
736
  * We've received a relevant position, and we have enough information to determine
607
737
  * which floor the user is on - either because we received a floor level, the venue
608
- * only has one floor, or we're allowing implicit floor level.
738
+ * only has one floor or we're allowing implicit floor level detection.
609
739
  */
610
740
  HAS_INDOOR_POSITION = 3,
611
741
  /**
612
742
  * We are uncertain about the user's position, likely because we haven't received
613
- * a relevant position in a while
743
+ * a relevant position in a while. Blue Dot will be rendered grey to indicate uncertainty of the actual position.
614
744
  */
615
745
  LOCATION_UNCERTAIN = 4
616
746
  }
@@ -619,26 +749,29 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
619
749
  */
620
750
  export enum E_BLUEDOT_MARKER_STATE {
621
751
  /**
622
- * BlueDot is hidden
752
+ * Blue Dot is hidden
623
753
  */
624
754
  HIDDEN = 0,
625
755
  /**
626
- * BlueDot is transparent
756
+ * Blue Dot is transparent indicating the position is on a different floor
627
757
  */
628
758
  GHOST = 1,
629
759
  /**
630
- * BlueDot is visible and opaque
760
+ * Blue Dot is visible and opaque indicating accurate positioning on the current floor
631
761
  */
632
762
  NORMAL = 2,
633
763
  /**
634
- * BlueDot is grayed out
764
+ * Blue Dot is grayed out due to uncertainty about user's location, most likely due to not receiving recent position updates.
635
765
  */
636
766
  UNCERTAIN = 3
637
767
  }
638
768
  export enum STATE {
769
+ /**
770
+ * The map is in exploration mode where the user controls the camera position.
771
+ */
639
772
  EXPLORE = "explore",
640
773
  /**
641
- * FOLLOW state follows user's current location (BlueDot)
774
+ * Follows user's current location by keeping the camera centered on the Blue Dot.
642
775
  */
643
776
  FOLLOW = "follow"
644
777
  /**
@@ -654,19 +787,19 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
654
787
  }
655
788
  export enum E_SDK_EVENT {
656
789
  /**
657
- * Emitted when the map is clicked
790
+ * Emitted when the map is clicked or tapped on a touch screen.
658
791
  */
659
792
  CLICK = "CLICK",
660
793
  /**
661
- * Emitted when the {@link STATE | SDK state} changes
794
+ * Emitted when the {@link STATE | SDK state} changes.
662
795
  */
663
796
  STATE_CHANGE = "STATE_CHANGE",
664
797
  /**
665
- * Emitted when a polygon is clicked
798
+ * Emitted when an interactive {@link MappedinPolygon | polygon} is clicked
666
799
  */
667
800
  POLYGON_CLICKED = "POLYGON_CLICKED",
668
801
  /**
669
- * Emitted when nothing is clicked
802
+ * Emitted when nothing (outside of interactive polygons) is clicked
670
803
  */
671
804
  NOTHING_CLICKED = "NOTHING_CLICKED",
672
805
  /**
@@ -687,6 +820,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
687
820
  ROTATION_CHANGED = "ROTATION_CHANGED",
688
821
  TILT_CHANGED = "TILT_CHANGED"
689
822
  }
823
+ export { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
690
824
  }
691
825
 
692
826
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types' {
@@ -696,7 +830,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
696
830
  import { TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
697
831
  import { TOOLTIP_ANCHOR } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
698
832
  import type { Euler, Object3D, Vector3 } from 'three';
699
- import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
833
+ import { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
700
834
  export type { TEnableBlueDotOptions, TFloatingLabelAppearance };
701
835
  /**
702
836
  An extension of the GeolocationPosition type.
@@ -905,6 +1039,13 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
905
1039
  * The rank of the object used when comparing colliders to determine which should be shown.
906
1040
  */
907
1041
  collisionRank?: COLLISION_RANKING_TIERS;
1042
+ /**
1043
+ * By default, we don't hide tooltips when they collide. This is
1044
+ * so that for floor switching tooltips we don't lose where the elevator is
1045
+ * This option will override that behavior
1046
+ * @default true
1047
+ */
1048
+ alwaysVisible?: boolean;
908
1049
  };
909
1050
  export type TCreateTextTooltipOptions = TCreateTooltipCommonOptions & {
910
1051
  /**
@@ -959,19 +1100,27 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
959
1100
  scale?: Vector3;
960
1101
  };
961
1102
  export type TMapViewOptions = {
1103
+ /**
1104
+ * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
1105
+ */
962
1106
  backgroundColor?: number | string;
963
1107
  /**
964
1108
  * The opacity of the initial background color.
965
1109
  */
966
1110
  backgroundAlpha?: number;
967
1111
  /**
968
- * Controls whether antialiasing is on. Defaults to true, as long as devicePixelRatio is 1. This is very expensive on high resolution screens.
1112
+ * Controls whether antialiasing is on. Defaults to `true`, as long as devicePixelRatio is 1. This is very expensive on high resolution screens.
969
1113
  * @default true
970
1114
  */
971
1115
  antialias?: boolean;
972
1116
  disableHover?: boolean;
973
1117
  disableZoomOnMapSizeChange?: boolean;
974
1118
  loadOptions?: {
1119
+ /**
1120
+ * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU
1121
+ * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY`
1122
+ */
1123
+ mapRenderStrategy?: MAP_RENDER_MODE;
975
1124
  async?: boolean;
976
1125
  zoomOverrides?: {
977
1126
  zoomMultiplier?: number;
@@ -980,7 +1129,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
980
1129
  };
981
1130
  };
982
1131
  /**
983
- * What map should the SDK initialize to?
1132
+ * First map to be rendered
984
1133
  */
985
1134
  firstMap?: MappedinMap | string;
986
1135
  /**
@@ -999,6 +1148,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
999
1148
  onWebGLRendererError?: () => void;
1000
1149
  };
1001
1150
  export type TMapViewOptionsLegacy = {
1151
+ /**
1152
+ * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
1153
+ */
1002
1154
  backgroundColor?: number | string;
1003
1155
  /**
1004
1156
  * The opacity of the initial background color.
@@ -1032,7 +1184,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1032
1184
  };
1033
1185
  };
1034
1186
  /**
1035
- * What map should the SDK initialize to?
1187
+ * First map to be rendered
1036
1188
  */
1037
1189
  firstMap?: MappedinMap | string;
1038
1190
  /**
@@ -1102,21 +1254,21 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1102
1254
  */
1103
1255
  height?: number;
1104
1256
  /**
1105
- * The amount of space to leave before starting the text
1257
+ * The amount of space to leave before starting the text in pixels
1106
1258
  * @default 5
1107
1259
  */
1108
1260
  margin?: number;
1109
1261
  /**
1110
- * A optional color
1262
+ * Optional color in hexadecimal string e.g. `#2e2e2e`.
1111
1263
  */
1112
1264
  color?: string;
1113
1265
  /**
1114
- * How big to make the font. Defaults to 12
1266
+ * Size of the font in pixels.
1115
1267
  * @default 12
1116
1268
  */
1117
1269
  fontSize?: number;
1118
1270
  /**
1119
- * 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.
1271
+ * 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.
1120
1272
  */
1121
1273
  font?: string;
1122
1274
  /**
@@ -1125,7 +1277,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1125
1277
  */
1126
1278
  scaleMin?: number;
1127
1279
  /**
1128
- * 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,
1280
+ * 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,
1129
1281
  * you can set this and and scaleMin to 0.1 to fit everything except really long names perfectly.
1130
1282
  * @default 0.25
1131
1283
  */
@@ -1135,7 +1287,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1135
1287
  scale?: number;
1136
1288
  flatLabels?: false | undefined;
1137
1289
  /**
1138
- * Custom Rank - this determines how likely a Floating Label will appear
1290
+ * Ranking tier to determine how likely a {@link FloatingLabel} will appear
1139
1291
  */
1140
1292
  rank?: COLLISION_RANKING_TIERS | number;
1141
1293
  /**
@@ -1170,7 +1322,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1170
1322
  [key in string]: string;
1171
1323
  };
1172
1324
  /**
1173
- * Display label despite the polygon having an image on it
1325
+ * Display label despite the {@link MappedinPolygon} having an image on it. Often these images represent store logos.
1174
1326
  * @default false
1175
1327
  */
1176
1328
  createDespiteImage?: boolean;
@@ -1205,7 +1357,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1205
1357
  longitude: number;
1206
1358
  };
1207
1359
  /**
1208
- * A list of MappedinPolygons corresponding to every polygon that a user's
1360
+ * A list of {@link MappedinPolygon}s corresponding to every polygon that a user's
1209
1361
  * click passed through. These are in order of first to last intersected.
1210
1362
  * Will be empty if no interactive polygons were clicked.
1211
1363
  */
@@ -1295,6 +1447,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1295
1447
  zoom?: number;
1296
1448
  tilt?: number;
1297
1449
  rotation?: number;
1450
+ position?: MappedinCoordinate | MappedinNode;
1298
1451
  };
1299
1452
  export const ANIMATION_TWEENS: {
1300
1453
  linear: any;
@@ -1309,6 +1462,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1309
1462
  EASE_IN_OUT = "ease-in-out"
1310
1463
  }
1311
1464
  export type TCameraAnimationOptions = {
1465
+ /**
1466
+ * Animation duration in milliseconds
1467
+ */
1312
1468
  duration?: number;
1313
1469
  easing?: CAMERA_EASING_MODE;
1314
1470
  };
@@ -1345,29 +1501,66 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1345
1501
  */
1346
1502
  get zoom(): number;
1347
1503
  /**
1348
- * Current Camera rotation (in radians)
1504
+ * Current Camera rotation (in radians) from north
1349
1505
  */
1350
1506
  get rotation(): number;
1351
1507
  /**
1352
- * Current Camera tilt
1508
+ * Current camera tilt angle (in radians), relative to a top-down view.
1509
+ *
1510
+ * ex: 0 means the camera is facing top-down, π/2 means the camera is
1511
+ * facing directly from the side.
1353
1512
  */
1354
1513
  get tilt(): number;
1355
1514
  /**
1356
- * Minimum distance (in meters) the camera is allowed to get to the ground.
1515
+ * Get the minimum distance (in meters) the camera is allowed to get to the ground.
1357
1516
  */
1358
1517
  get minZoom(): number;
1359
1518
  /**
1360
- * Minimum distance (in meters) the camera is allowed to get to the ground.
1519
+ * Set the minimum distance (in meters) the camera is allowed to get to the ground.
1361
1520
  */
1362
1521
  set minZoom(meters: number);
1363
1522
  /**
1364
- * Maximum distance (in meters) the camera is allowed to get to the ground.
1523
+ * Get the maximum distance (in meters) the camera is allowed to get from the ground.
1365
1524
  */
1366
1525
  get maxZoom(): number;
1367
1526
  /**
1368
- * Maximum distance (in meters) the camera is allowed to get to the ground.
1527
+ * Set the maximum distance (in meters) the camera is allowed to get from the ground.
1369
1528
  */
1370
1529
  set maxZoom(meters: number);
1530
+ /**
1531
+ * Get the current maximum tilt angle (in radians) the camera is allowed to use.
1532
+ */
1533
+ get maxTilt(): number;
1534
+ /**
1535
+ * Sets the maximum tilt angle (in radians) the camera is allowed to use.
1536
+ *
1537
+ * Tilt angle must be between 0 and π/2 radians. It will be clamped within
1538
+ * this range if it exceeds it on either end.
1539
+ *
1540
+ * As tilt angle approaches π/2 radians, this will impact overall touch controls
1541
+ * and should be used sparingly.
1542
+ */
1543
+ set maxTilt(radians: number);
1544
+ /**
1545
+ * Get the current camera position, which is at the center of the map.
1546
+ * @returns the position as a coordinate
1547
+ */
1548
+ get position(): MappedinCoordinate;
1549
+ /**
1550
+ * User camera interactions
1551
+ */
1552
+ interactions: {
1553
+ /**
1554
+ * Enable all user interactions. This does not affect programmatic
1555
+ * Camera controls, such as `set` and `focusOn`
1556
+ */
1557
+ enable: () => void;
1558
+ /**
1559
+ * Disable all user interactions. This does not affect programmatic
1560
+ * Camera controls, such as `set` and `focusOn`
1561
+ */
1562
+ disable: () => void;
1563
+ };
1371
1564
  setSafeAreaInsets(insets: {
1372
1565
  top: number;
1373
1566
  left: number;
@@ -1376,7 +1569,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1376
1569
  }): void;
1377
1570
  getSafeAreaInsets(): any;
1378
1571
  /**
1379
- * Determine a new Camera view state based on a collection of targets, and start animating to that state.
1572
+ * Focus the Camera view on a collection of targets and animate to that state.
1380
1573
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1381
1574
  */
1382
1575
  focusOn(options: TFocusOnOptions): Promise<any>;
@@ -1386,7 +1579,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1386
1579
  set(positionOptions?: TAnimatePositionOptions): void;
1387
1580
  /**
1388
1581
  * Animate the Camera's view to smoothly transition to a new state over time.
1389
- * Returns a promise that resolves when the animation completes and gets rejected if the animation is cancelled.
1390
1582
  *
1391
1583
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1392
1584
  */
@@ -1475,7 +1667,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1475
1667
  CLEAR_JOURNEY = "CLEAR_JOURNEY",
1476
1668
  SET_COOKIE = "SET_COOKIE",
1477
1669
  GET_NEAREST_NODE_BY_SCREEN_COORDINATES = "GET_NEAREST_NODE_BY_SCREEN_COORDINATES",
1478
- CLEAR_BUNDLE_CACHE = "CLEAR_BUNDLE_CACHE"
1670
+ CLEAR_BUNDLE_CACHE = "CLEAR_BUNDLE_CACHE",
1671
+ SEARCH = "SEARCH",
1672
+ SUGGEST = "SUGGEST",
1673
+ ADD_SEARCH_QUERY = "ADD_SEARCH_QUERY"
1479
1674
  }
1480
1675
  export enum WAYFINDING_EVENT {
1481
1676
  GET_MAPS_IN_NAVIGATION = "GET_MAPS_IN_NAVIGATION",
@@ -1505,7 +1700,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1505
1700
  }
1506
1701
 
1507
1702
  declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1508
- import { IDirectionsResult, MappedinMap, MappedinNode, TBlueDotPositionUpdate, TBlueDotStateChange, TGetVenueOptions, TFloatingLabelPolygonOptions, TFlatLabelPolygonOptions, TAnimatePositionOptions, TPathOptions, TShowVenueOptions, STATE, TGeolocationObject, TEnableBlueDotOptions, MappedinLocation, TLabelAllLocationFloatingLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1703
+ import { IDirectionsResult, MappedinMap, MappedinNode, TBlueDotPositionUpdate, TBlueDotStateChange, TGetVenueOptions, TFloatingLabelPolygonOptions, TFlatLabelPolygonOptions, TAnimatePositionOptions, TPathOptions, TShowVenueOptions, STATE, TGeolocationObject, TEnableBlueDotOptions, MappedinLocation, TLabelAllLocationFloatingLabelOptions, TMappedinOfflineSearchOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1509
1704
  import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common/types';
1510
1705
  import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, TFocusOnOptionsLegacySerializable, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelAllLocations, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
1511
1706
  import { TSerializableJourneyOptions, TFocusOnOptionsSerializable, TSerializedLocation, TSerializedNode, TSerializedPolygon } from '@mappedin/react-native-sdk/wrappers/common/types';
@@ -1579,12 +1774,32 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1579
1774
  options: TGetVenueOptions & {
1580
1775
  useBundle?: boolean;
1581
1776
  };
1582
- showVenueOptions: TShowVenueOptions;
1777
+ showVenueOptions: TShowVenueOptions & {
1778
+ /**
1779
+ * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs.
1780
+ * @default false
1781
+ */
1782
+ prepareSearch?: boolean;
1783
+ /**
1784
+ * Customize search weights
1785
+ */
1786
+ searchOptions?: TMappedinOfflineSearchOptions;
1787
+ };
1583
1788
  };
1584
1789
  [EVENT.SHOW_VENUE]: {
1585
1790
  venueData: string;
1586
1791
  format: 'jsonstring';
1587
- showVenueOptions: TShowVenueOptions;
1792
+ showVenueOptions: TShowVenueOptions & {
1793
+ /**
1794
+ * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs.
1795
+ * @default false
1796
+ */
1797
+ prepareSearch?: boolean;
1798
+ /**
1799
+ * Customize search weights
1800
+ */
1801
+ searchOptions?: TMappedinOfflineSearchOptions;
1802
+ };
1588
1803
  };
1589
1804
  [EVENT.SET_MAP]: {
1590
1805
  mapId: string;
@@ -1711,6 +1926,20 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1711
1926
  y: number;
1712
1927
  map?: MappedinMap['id'];
1713
1928
  };
1929
+ [EVENT.SEARCH]: {
1930
+ query: string;
1931
+ };
1932
+ [EVENT.SUGGEST]: {
1933
+ query: string;
1934
+ };
1935
+ [EVENT.ADD_SEARCH_QUERY]: {
1936
+ query: string;
1937
+ object: {
1938
+ type: 'MappedinLocation' | 'MappedinCategory' | 'Custom';
1939
+ id: string;
1940
+ };
1941
+ weight?: number;
1942
+ };
1714
1943
  };
1715
1944
  }
1716
1945
 
@@ -1745,7 +1974,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
1745
1974
  departureMarkerTemplateString?: string;
1746
1975
  color?: string;
1747
1976
  };
1748
- export type TMiMapViewOptions = TShowVenueOptions & {
1977
+ export type TMiMapViewVenueOptions = {
1749
1978
  /**
1750
1979
  * Client ID
1751
1980
  */
@@ -1766,6 +1995,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
1766
1995
  noAuth?: boolean;
1767
1996
  language?: string;
1768
1997
  };
1998
+ export type TMiMapViewOptions = TShowVenueOptions & TMiMapViewVenueOptions;
1769
1999
  export type TReactNativeFloatingLabelPolygonOptions = TFloatingLabelPolygonOptions & {
1770
2000
  /**
1771
2001
  * @deprecated
@@ -1802,136 +2032,357 @@ declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' {
1802
2032
  }
1803
2033
  }
1804
2034
 
1805
- declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
1806
- import { BRIDGE_EVENT, BRIDGE_EVENT_PAYLOADS } from '@mappedin/react-native-sdk/wrappers/common';
1807
- import { PubSub } from '@mappedin/react-native-sdk/wrappers/common';
1808
- export function uuid(): string;
1809
- export class MappedinController {
1810
- #private;
1811
- privateEventBus: PubSub<{
1812
- REJECT: {
1813
- msgID?: string | undefined;
1814
- data: any;
1815
- };
1816
- RESOLVE: {
1817
- msgID?: string | undefined;
1818
- data: any;
1819
- };
1820
- READY: {
1821
- msgID?: string | undefined;
1822
- data: null;
1823
- };
1824
- LOG: {
1825
- msgID?: string | undefined;
1826
- data: string;
1827
- };
1828
- GET_IMAGE: {
1829
- msgID?: string | undefined;
1830
- data: {
1831
- fileName: string;
1832
- };
1833
- };
1834
- GET_MAP_POLYGONS: {
1835
- msgID?: string | undefined;
1836
- data: {
1837
- mapId: string;
1838
- };
1839
- };
1840
- MINIMAP_READY: {
1841
- msgID?: string | undefined;
1842
- data: null;
1843
- };
1844
- SHOW_MINIMAP: {
1845
- msgID?: string | undefined;
1846
- data: {
1847
- format: "jsonstring";
1848
- venueData: string;
1849
- options: import("./types").TMiMapViewOptions;
1850
- };
1851
- };
1852
- LOAD_MINIMAP: {
1853
- msgID?: string | undefined;
1854
- data: {
1855
- options: import("../react-native-sdk/src").TGetVenueOptions;
1856
- };
1857
- };
1858
- CACHE_IMAGE: {
1859
- msgID?: string | undefined;
1860
- data: {
1861
- url?: string | undefined;
1862
- options: import("../react-native-sdk/src").TGetVenueOptions;
1863
- locationId: string;
1864
- polygonHighlightColor?: string | undefined;
1865
- focusOptions?: Omit<import("./types").TFocusOnOptionsSerializable, "targets"> | undefined;
1866
- };
1867
- };
1868
- CLEAR_BUNDLE_CACHE: {
1869
- msgID?: string | undefined;
1870
- data: null;
1871
- };
1872
- NOTHING_CLICKED: {
1873
- msgID?: string | undefined;
1874
- data: null;
1875
- };
1876
- STATE_CHANGED: {
1877
- msgID?: string | undefined;
1878
- data: {
1879
- state: import("../react-native-sdk/src").STATE;
1880
- };
1881
- };
1882
- DATA_LOADED: {
1883
- msgID?: string | undefined;
1884
- data: {
1885
- venueData: any;
1886
- };
1887
- };
1888
- FIRST_MAP_LOADED: {
1889
- msgID?: string | undefined;
1890
- data: {
1891
- venueData?: any;
1892
- };
1893
- };
1894
- MAP_CHANGED: {
1895
- msgID?: string | undefined;
1896
- data: {
1897
- mapId: string;
1898
- };
1899
- };
1900
- POLYGON_CLICKED: {
1901
- msgID?: string | undefined;
1902
- data: {
1903
- polygonId: string;
1904
- };
1905
- };
1906
- ROTATION_CHANGED: {
1907
- msgID?: string | undefined;
1908
- data: {
1909
- rotation: number;
1910
- };
1911
- };
1912
- TILT_CHANGED: {
1913
- msgID?: string | undefined;
1914
- data: {
1915
- tilt: number;
1916
- };
1917
- };
1918
- UPDATE_GEOLOCATION: {
1919
- msgID?: string | undefined;
1920
- data: {
1921
- msgID: undefined;
1922
- data: unknown;
1923
- };
1924
- };
1925
- BLUEDOT_STATE_CHANGE: {
1926
- msgID?: string | undefined;
1927
- data: {
1928
- stateChange: import("../../core/packages/renderer").TBlueDotStateChange;
1929
- };
1930
- };
1931
- BLUEDOT_POSITION_UPDATE: {
1932
- msgID?: string | undefined;
1933
- data: {
1934
- update: Omit<import("../../core/packages/renderer").TBlueDotPositionUpdate, "map" | "nearestNode"> & {
2035
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface' {
2036
+ import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
2037
+ import { Vector2, Vector3 } from 'three';
2038
+ import { changeListenerFn, TMapViewOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
2039
+ import RENDER from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks';
2040
+ import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
2041
+ import { TPadding } from '@mappedin/react-native-sdk/core/packages/renderer';
2042
+ import Tween, { Easing } from '@tweenjs/tween.js';
2043
+ export type TFocusOptionsLegacy = {
2044
+ /**
2045
+ * An array of Nodes to focus in on
2046
+ */
2047
+ nodes?: (MappedinNode | MappedinNode['id'])[];
2048
+ /**
2049
+ * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.
2050
+ */
2051
+ polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
2052
+ /**
2053
+ * The duration (in ms) the focus animation should last for.
2054
+ * @defaultValue `100`
2055
+ */
2056
+ duration?: number;
2057
+ /**
2058
+ * Whether to zoom the camera in or out, or just pan it.
2059
+ * @defaultValue `true`
2060
+ */
2061
+ changeZoom?: boolean;
2062
+ /**
2063
+ * The animation curve to use for zooming in. Uses the animateCamera one by default.
2064
+ */
2065
+ curve?: typeof Easing;
2066
+ /**
2067
+ * Camera tilt between 0 (top-down) to 1 (from the side)
2068
+ */
2069
+ tilt?: number;
2070
+ /**
2071
+ * Rotation in degrees
2072
+ */
2073
+ rotation?: number;
2074
+ /**
2075
+ * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.
2076
+ */
2077
+ focusZoomFactor?: number;
2078
+ /**
2079
+ * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.
2080
+ * @defaultValue: 0
2081
+ */
2082
+ minZoom?: number;
2083
+ padding?: TPadding;
2084
+ points?: any[];
2085
+ };
2086
+ export interface ICore {
2087
+ new (container: HTMLElement, venue: Mappedin, options?: TMapViewOptions): ICore;
2088
+ /**
2089
+ * @internal
2090
+ */
2091
+ currentScale: number;
2092
+ loadOptions?: TMapViewOptions['loadOptions'];
2093
+ imageFlippingEnabled: boolean;
2094
+ imageFlippingCache: any;
2095
+ cachedPadding: any;
2096
+ polygonMeshesById: any;
2097
+ textLabelsByPolygonId: any;
2098
+ renderer: any;
2099
+ scene: any;
2100
+ cameraParameters: Vector2;
2101
+ resolution: Vector2;
2102
+ determineNewLabelSize: any;
2103
+ on<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
2104
+ off<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
2105
+ publish<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void;
2106
+ /**
2107
+ * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}},
2108
+ * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}.
2109
+ * Some of the functions don't do anything in 2D.
2110
+ *
2111
+ */
2112
+ controls: any;
2113
+ /**
2114
+ * The Venue data this MapView is using.
2115
+ *
2116
+ * @property venue {MappedinVenue}
2117
+ * @final
2118
+ */
2119
+ readonly venue: Mappedin;
2120
+ /**
2121
+ * The div MapView is using.
2122
+ *
2123
+ * @property container {Div}
2124
+ * @final
2125
+ */
2126
+ readonly container: HTMLElement;
2127
+ /**
2128
+ * The ID of the Map currently being displayed.
2129
+ *
2130
+ */
2131
+ readonly currentMap: string;
2132
+ /**
2133
+ * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call.
2134
+ *
2135
+ * @property focusZoomFactor {Integer}
2136
+ * @default 3
2137
+ */
2138
+ focusZoomFactor: number;
2139
+ /**
2140
+ * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly.
2141
+ *
2142
+ * @return The zoom level that will fit the Polygon
2143
+ */
2144
+ getZoomLevelForPolygon(props: {
2145
+ /**
2146
+ * The Polygon or Polygon ID to get the zoom level for
2147
+ */
2148
+ polygonOrPolygonId: MappedinPolygon | string;
2149
+ }): number;
2150
+ /**
2151
+ * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly.
2152
+ *
2153
+ * @return The zoom level that will fit the {@link IMapView3D.currentMap}.
2154
+ */
2155
+ getZoomLevelForCurrentMap(): number;
2156
+ /**
2157
+ * Returns the angle that points to north, in radians, from the default orientation.
2158
+ *
2159
+ * @return The angle to north from the default orientation, in radians.
2160
+ */
2161
+ getNorth(): number;
2162
+ /**
2163
+ * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked
2164
+ * on north. If you would like to align it do a different direction, or a different side of the element, pass in an offset. This
2165
+ * is how you would do a compass rose.
2166
+ *
2167
+ * This will modify your element's transform.
2168
+ *
2169
+ * @param element The element on the page to rotate.
2170
+ * @param offset The amount to offset the rotation by, in radians.
2171
+ *
2172
+ */
2173
+ lockNorth(element: HTMLElement, offset?: number): void;
2174
+ /**
2175
+ * Stops the MapView from trying to rotate your element with the camera. Do this if you remove the element, or want to stop it from rotating.
2176
+ * @param element The node to stop rotating. It won't reset the transform, just leave it as is.
2177
+ */
2178
+ unlockNorth(element: HTMLElement): void;
2179
+ currentInteractionEvent: string;
2180
+ interactivePolygons: any;
2181
+ highlightedPolygons: any;
2182
+ cameraPlane: any;
2183
+ /**
2184
+ * Called any time a user touches or clicks the map. Only fires on "single" touches/clicks.
2185
+ *
2186
+ * @param position Object containing the latitude & longitude of the location touched on the map
2187
+ * @param polygons Array of polygon IDs that were touched, in order of front to back.
2188
+ * @param nearBlueDot Whether the touch was close enough to the Blue Dot to be considered a touch on the Blue Dot.
2189
+ */
2190
+ onMapClicked(position: {
2191
+ latitude: number;
2192
+ longitude: number;
2193
+ }, polygons: string[], nearBlueDot: boolean): void;
2194
+ /**
2195
+ * This is called when an interactive Polygon is clicked on.
2196
+ * You will almost certainly want to replace this with your own function in your client app.
2197
+ * Return "false" if you have consumed the event and it shouldn't bubble down to other Polygons beneath this one.
2198
+ *
2199
+ * @param polygonId polygonId passed in when tapping an interactive polygon
2200
+ */
2201
+ onPolygonClicked(polygonId: string): boolean | void;
2202
+ onMapChanged(map: string): void;
2203
+ getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string): Vector3;
2204
+ getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
2205
+ /**
2206
+ * Takes an x/y pair in Mappedin coordinate space and gives you a Vector3 in scene space
2207
+ * @param nodeOrCoordinate a node or coordinate
2208
+ */
2209
+ convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3;
2210
+ /**
2211
+ * Converts a Vector-like object into a MappedinCoordinate for a map.
2212
+ * @param position an object with x and y, like a Vector3
2213
+ * @param mapClass An optional map; otherwise, the current map will be used.
2214
+ */
2215
+ convert3DMapPositionToCoordinate(position: {
2216
+ x: number;
2217
+ y: number;
2218
+ }, mapClass?: MappedinMap): MappedinCoordinate;
2219
+ setPadding(padding: {
2220
+ top: number;
2221
+ left: number;
2222
+ bottom: number;
2223
+ right: number;
2224
+ }): void;
2225
+ /**
2226
+ * This is fired when the user taps/clicks on the MapView without hitting an interactive Polygon.
2227
+ * You will almost certainly want to replace this with your own function in your client app.
2228
+ * You would probably use this to clear any Polygon highlighting, in certain situations.
2229
+ */
2230
+ onNothingClicked(): void;
2231
+ smartCollisionEngine: any;
2232
+ mapObjects: any;
2233
+ /**
2234
+ * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
2235
+ * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
2236
+ * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that.
2237
+ * Ignored in 2D.
2238
+ */
2239
+ tryRendering(renderMode?: typeof RENDER): void;
2240
+ setMap(mapOrMapId: MappedinMap | string): Promise<null>;
2241
+ getPositionNode(node: MappedinNode): Vector3;
2242
+ cameraObject: any;
2243
+ setBackgroundColor(color: number | string, alpha?: number): void;
2244
+ mapManager: any;
2245
+ focusOn(focusOptions: TFocusOptionsLegacy): Tween;
2246
+ canvasWidth: number;
2247
+ canvasHeight: number;
2248
+ /**
2249
+ * Resets the MapView to the default state.
2250
+ */
2251
+ resetState(): void;
2252
+ destroy(): void;
2253
+ }
2254
+ }
2255
+
2256
+ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2257
+ import { BRIDGE_EVENT, BRIDGE_EVENT_PAYLOADS } from '@mappedin/react-native-sdk/wrappers/common';
2258
+ import { PubSub } from '@mappedin/react-native-sdk/wrappers/common';
2259
+ export function uuid(): string;
2260
+ export class MappedinController {
2261
+ #private;
2262
+ privateEventBus: PubSub<{
2263
+ REJECT: {
2264
+ msgID?: string | undefined;
2265
+ data: any;
2266
+ };
2267
+ RESOLVE: {
2268
+ msgID?: string | undefined;
2269
+ data: any;
2270
+ };
2271
+ READY: {
2272
+ msgID?: string | undefined;
2273
+ data: null;
2274
+ };
2275
+ LOG: {
2276
+ msgID?: string | undefined;
2277
+ data: string;
2278
+ };
2279
+ GET_IMAGE: {
2280
+ msgID?: string | undefined;
2281
+ data: {
2282
+ fileName: string;
2283
+ };
2284
+ };
2285
+ GET_MAP_POLYGONS: {
2286
+ msgID?: string | undefined;
2287
+ data: {
2288
+ mapId: string;
2289
+ };
2290
+ };
2291
+ MINIMAP_READY: {
2292
+ msgID?: string | undefined;
2293
+ data: null;
2294
+ };
2295
+ SHOW_MINIMAP: {
2296
+ msgID?: string | undefined;
2297
+ data: {
2298
+ format: "jsonstring";
2299
+ venueData: string;
2300
+ options: import("./types").TMiMapViewOptions;
2301
+ };
2302
+ };
2303
+ LOAD_MINIMAP: {
2304
+ msgID?: string | undefined;
2305
+ data: {
2306
+ options: import("../react-native-sdk/src").TGetVenueOptions;
2307
+ };
2308
+ };
2309
+ CACHE_IMAGE: {
2310
+ msgID?: string | undefined;
2311
+ data: {
2312
+ url?: string | undefined;
2313
+ options: import("../react-native-sdk/src").TGetVenueOptions;
2314
+ locationId: string;
2315
+ polygonHighlightColor?: string | undefined;
2316
+ focusOptions?: Omit<import("./types").TFocusOnOptionsSerializable, "targets"> | undefined;
2317
+ };
2318
+ };
2319
+ CLEAR_BUNDLE_CACHE: {
2320
+ msgID?: string | undefined;
2321
+ data: null;
2322
+ };
2323
+ NOTHING_CLICKED: {
2324
+ msgID?: string | undefined;
2325
+ data: null;
2326
+ };
2327
+ STATE_CHANGED: {
2328
+ msgID?: string | undefined;
2329
+ data: {
2330
+ state: import("../react-native-sdk/src").STATE;
2331
+ };
2332
+ };
2333
+ DATA_LOADED: {
2334
+ msgID?: string | undefined;
2335
+ data: {
2336
+ venueData: any;
2337
+ };
2338
+ };
2339
+ FIRST_MAP_LOADED: {
2340
+ msgID?: string | undefined;
2341
+ data: {
2342
+ venueData?: any;
2343
+ };
2344
+ };
2345
+ MAP_CHANGED: {
2346
+ msgID?: string | undefined;
2347
+ data: {
2348
+ mapId: string;
2349
+ };
2350
+ };
2351
+ POLYGON_CLICKED: {
2352
+ msgID?: string | undefined;
2353
+ data: {
2354
+ polygonId: string;
2355
+ };
2356
+ };
2357
+ ROTATION_CHANGED: {
2358
+ msgID?: string | undefined;
2359
+ data: {
2360
+ rotation: number;
2361
+ };
2362
+ };
2363
+ TILT_CHANGED: {
2364
+ msgID?: string | undefined;
2365
+ data: {
2366
+ tilt: number;
2367
+ };
2368
+ };
2369
+ UPDATE_GEOLOCATION: {
2370
+ msgID?: string | undefined;
2371
+ data: {
2372
+ msgID: undefined;
2373
+ data: unknown;
2374
+ };
2375
+ };
2376
+ BLUEDOT_STATE_CHANGE: {
2377
+ msgID?: string | undefined;
2378
+ data: {
2379
+ stateChange: import("../react-native-sdk/src").TBlueDotStateChange;
2380
+ };
2381
+ };
2382
+ BLUEDOT_POSITION_UPDATE: {
2383
+ msgID?: string | undefined;
2384
+ data: {
2385
+ update: Omit<import("../react-native-sdk/src").TBlueDotPositionUpdate, "map" | "nearestNode"> & {
1935
2386
  nearestNode?: string | undefined;
1936
2387
  map?: string | undefined;
1937
2388
  };
@@ -1949,7 +2400,35 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
1949
2400
  options: import("../react-native-sdk/src").TGetVenueOptions & {
1950
2401
  useBundle?: boolean | undefined;
1951
2402
  };
1952
- showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions;
2403
+ showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions & {
2404
+ prepareSearch?: boolean | undefined;
2405
+ searchOptions?: Partial<{
2406
+ stopWords?: string[] | undefined;
2407
+ searchTags?: boolean | undefined;
2408
+ searchDescriptions?: boolean | undefined;
2409
+ searchTagsInCategories?: boolean | undefined; /**
2410
+ * Handle rejection from the other side, typically when the request results in an error
2411
+ * @hidden
2412
+ searchDescriptionsInCategories?: boolean | undefined;
2413
+ jsonIndex?: string | undefined;
2414
+ useLocationRank?: boolean | undefined;
2415
+ emitAnalyticsEvents?: boolean | undefined;
2416
+ constants: {
2417
+ PRIMARY_INDEX_FUZZYNESS: number;
2418
+ PRIMARY_INDEX_WEIGHT: number;
2419
+ SECONDARY_INDEX_WEIGHT: number;
2420
+ LOCATION_NAME_WEIGHT: number;
2421
+ CATEGORY_NAME_WEIGHT: number;
2422
+ CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number;
2423
+ CATEGORY_LOCATION_TAGS_WEIGHT: number;
2424
+ CATEGORY_LOCATION_NAME_WEIGHT: number;
2425
+ PRIMARY_INDEX_TAGS_NAME_WEIGHT: number;
2426
+ LOCATION_DEFAULT_RANK: number;
2427
+ RATIO_OF_FUZZY_TO_EXACT: number;
2428
+ RATIO_OF_PREFIX_TO_EXACT: number;
2429
+ };
2430
+ }> | undefined;
2431
+ };
1953
2432
  };
1954
2433
  };
1955
2434
  SHOW_VENUE: {
@@ -1957,7 +2436,35 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
1957
2436
  data: {
1958
2437
  venueData: string;
1959
2438
  format: "jsonstring";
1960
- showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions;
2439
+ showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions & {
2440
+ prepareSearch?: boolean | undefined;
2441
+ searchOptions?: Partial<{
2442
+ stopWords?: string[] | undefined;
2443
+ searchTags?: boolean | undefined;
2444
+ searchDescriptions?: boolean | undefined;
2445
+ searchTagsInCategories?: boolean | undefined; /**
2446
+ * Handle rejection from the other side, typically when the request results in an error
2447
+ * @hidden
2448
+ searchDescriptionsInCategories?: boolean | undefined;
2449
+ jsonIndex?: string | undefined;
2450
+ useLocationRank?: boolean | undefined;
2451
+ emitAnalyticsEvents?: boolean | undefined;
2452
+ constants: {
2453
+ PRIMARY_INDEX_FUZZYNESS: number;
2454
+ PRIMARY_INDEX_WEIGHT: number;
2455
+ SECONDARY_INDEX_WEIGHT: number;
2456
+ LOCATION_NAME_WEIGHT: number;
2457
+ CATEGORY_NAME_WEIGHT: number;
2458
+ CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number;
2459
+ CATEGORY_LOCATION_TAGS_WEIGHT: number;
2460
+ CATEGORY_LOCATION_NAME_WEIGHT: number;
2461
+ PRIMARY_INDEX_TAGS_NAME_WEIGHT: number;
2462
+ LOCATION_DEFAULT_RANK: number;
2463
+ RATIO_OF_FUZZY_TO_EXACT: number;
2464
+ RATIO_OF_PREFIX_TO_EXACT: number;
2465
+ };
2466
+ }> | undefined;
2467
+ };
1961
2468
  };
1962
2469
  };
1963
2470
  SET_MAP: {
@@ -2187,6 +2694,29 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2187
2694
  map?: string | undefined;
2188
2695
  };
2189
2696
  };
2697
+ SEARCH: {
2698
+ msgID?: string | undefined;
2699
+ data: {
2700
+ query: string;
2701
+ };
2702
+ };
2703
+ SUGGEST: {
2704
+ msgID?: string | undefined;
2705
+ data: {
2706
+ query: string;
2707
+ };
2708
+ };
2709
+ ADD_SEARCH_QUERY: {
2710
+ msgID?: string | undefined;
2711
+ data: {
2712
+ query: string;
2713
+ object: {
2714
+ type: "MappedinLocation" | "MappedinCategory" | "Custom";
2715
+ id: string;
2716
+ };
2717
+ weight?: number | undefined;
2718
+ };
2719
+ };
2190
2720
  }>;
2191
2721
  /**
2192
2722
  * Message received from the other side of the bridge
@@ -2218,268 +2748,73 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2218
2748
  /**
2219
2749
  * Handle rejection from the other side, typically when the request results in an error
2220
2750
  * @hidden
2221
- */
2222
- protected handleRejection: <EVENT_NAME extends BRIDGE_EVENT>(payload: {
2223
- msgID: string;
2224
- data: {
2225
- payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
2226
- };
2227
- }) => void;
2228
- /**
2229
- * Emitting a message without expecting a response
2230
- * @hidden
2231
- */
2232
- emit<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): void;
2233
- /**
2234
- * Emitting a message and waiting for a reponse, via a promise
2235
- * @hidden
2236
- */
2237
- emitAsync<T, EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): Promise<T>;
2238
- }
2239
- }
2240
-
2241
- declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface' {
2242
- import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
2243
- import CameraControls from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.CameraControls';
2244
- import { Vector2, Vector3 } from 'three';
2245
- import { changeListenerFn, TMapViewOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
2246
- import RENDER from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks';
2247
- import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
2248
- import { TPadding } from '@mappedin/react-native-sdk/core/packages/renderer';
2249
- import Tween, { Easing } from '@tweenjs/tween.js';
2250
- export type TFocusOptionsLegacy = {
2251
- /**
2252
- * An array of Nodes to focus in on
2253
- */
2254
- nodes?: (MappedinNode | MappedinNode['id'])[];
2255
- /**
2256
- * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.
2257
- */
2258
- polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
2259
- /**
2260
- * The duration the focus animation should last for.
2261
- * @defaultValue `100`
2262
- */
2263
- duration?: number;
2264
- /**
2265
- * Whether to zoom the camera in or out, or just pan it.
2266
- * @defaultValue `true`
2267
- */
2268
- changeZoom?: boolean;
2269
- /**
2270
- * The animation curve to use for zooming in. Uses the animateCamera one by default.
2271
- */
2272
- curve?: typeof Easing;
2273
- /**
2274
- * Camera tilt between 0 (top-down) to 1 (from the side)
2275
- */
2276
- tilt?: number;
2277
- /**
2278
- * Rotation in degrees
2279
- */
2280
- rotation?: number;
2281
- /**
2282
- * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.
2283
- */
2284
- focusZoomFactor?: number;
2285
- /**
2286
- * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.
2287
- * @defaultValue: 0
2288
- */
2289
- minZoom?: number;
2290
- padding?: TPadding;
2291
- points?: any[];
2292
- };
2293
- export interface ICore {
2294
- new (container: HTMLElement, venue: Mappedin, options?: TMapViewOptions): ICore;
2295
- /**
2296
- * @internal
2297
- */
2298
- currentScale: number;
2299
- imageFlippingEnabled: boolean;
2300
- imageFlippingCache: any;
2301
- cachedPadding: any;
2302
- polygonMeshesById: any;
2303
- textLabelsByPolygonId: any;
2304
- renderer: any;
2305
- scene: any;
2306
- cameraParameters: Vector2;
2307
- resolution: Vector2;
2308
- determineNewLabelSize: any;
2309
- on<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
2310
- off<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
2311
- publish<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void;
2312
- /**
2313
- * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}},
2314
- * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}.
2315
- * Some of the functions don't do anything in 2D.
2316
- *
2317
- */
2318
- controls?: typeof CameraControls;
2319
- /**
2320
- * The Venue data this MapView is using.
2321
- *
2322
- * @property venue {MappedinVenue}
2323
- * @final
2324
- */
2325
- readonly venue: Mappedin;
2326
- /**
2327
- * The div MapView is using.
2328
- *
2329
- * @property container {Div}
2330
- * @final
2331
- */
2332
- readonly container: HTMLElement;
2333
- /**
2334
- * The ID of the Map currently being displayed.
2335
- *
2336
- */
2337
- readonly currentMap: string;
2338
- /**
2339
- * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call.
2340
- *
2341
- * @property focusZoomFactor {Integer}
2342
- * @default 3
2343
- */
2344
- focusZoomFactor: number;
2345
- /**
2346
- * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly.
2347
- *
2348
- * @return The zoom level that will fit the Polygon
2349
- */
2350
- getZoomLevelForPolygon(props: {
2351
- /**
2352
- * The Polygon or Polygon ID to get the zoom level for
2353
- */
2354
- polygonOrPolygonId: MappedinPolygon | string;
2355
- }): number;
2356
- /**
2357
- * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly.
2358
- *
2359
- * @return The zoom level that will fit the {@link IMapView3D.currentMap}.
2360
- */
2361
- getZoomLevelForCurrentMap(): number;
2362
- /**
2363
- * Returns the angle that points to north, in radians, from the default orientation.
2364
- *
2365
- * @return The angle to north from the default orientation, in radians.
2366
- */
2367
- getNorth(): number;
2368
- /**
2369
- * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked
2370
- * on north. If you would like to align it do a different direction, or a different side of the element, pass in an offset. This
2371
- * is how you would do a compass rose.
2372
- *
2373
- * This will modify your element's transform.
2374
- *
2375
- * @param element The element on the page to rotate.
2376
- * @param offset The amount to offset the rotation by, in radians.
2377
- *
2378
- */
2379
- lockNorth(element: HTMLElement, offset?: number): void;
2380
- /**
2381
- * Stops the MapView from trying to rotate your element with the camera. Do this if you remove the element, or want to stop it from rotating.
2382
- * @param element The node to stop rotating. It won't reset the transform, just leave it as is.
2383
- */
2384
- unlockNorth(element: HTMLElement): void;
2385
- currentInteractionEvent: string;
2386
- interactivePolygons: any;
2387
- highlightedPolygons: any;
2388
- cameraPlane: any;
2389
- /**
2390
- * Called any time a user touches or clicks the map. Only fires on "single" touches/clicks.
2391
- *
2392
- * @param position Object containing the latitude & longitude of the location touched on the map
2393
- * @param polygons Array of polygon IDs that were touched, in order of front to back.
2394
- * @param nearBlueDot Whether the touch was close enough to the Blue Dot to be considered a touch on the Blue Dot.
2395
- */
2396
- onMapClicked(position: {
2397
- latitude: number;
2398
- longitude: number;
2399
- }, polygons: string[], nearBlueDot: boolean): void;
2400
- /**
2401
- * This is called when an interactive Polygon is clicked on.
2402
- * You will almost certainly want to replace this with your own function in your client app.
2403
- * Return "false" if you have consumed the event and it shouldn't bubble down to other Polygons beneath this one.
2404
- *
2405
- * @param polygonId polygonId passed in when tapping an interactive polygon
2406
- */
2407
- onPolygonClicked(polygonId: string): boolean | void;
2408
- onMapChanged(map: string): void;
2409
- getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string): Vector3;
2410
- getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
2411
- convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3;
2412
- setPadding(padding: {
2413
- top: number;
2414
- left: number;
2415
- bottom: number;
2416
- right: number;
2417
- }): void;
2418
- /**
2419
- * This is fired when the user taps/clicks on the MapView without hitting an interactive Polygon.
2420
- * You will almost certainly want to replace this with your own function in your client app.
2421
- * You would probably use this to clear any Polygon highlighting, in certain situations.
2422
- */
2423
- onNothingClicked(): void;
2424
- smartCollisionEngine: any;
2425
- mapObjects: any;
2751
+ */
2752
+ protected handleRejection: <EVENT_NAME extends BRIDGE_EVENT>(payload: {
2753
+ msgID: string;
2754
+ data: {
2755
+ payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
2756
+ };
2757
+ }) => void;
2426
2758
  /**
2427
- * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
2428
- * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
2429
- * You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that.
2430
- * Ignored in 2D.
2759
+ * Emitting a message without expecting a response
2760
+ * @hidden
2431
2761
  */
2432
- tryRendering(renderMode?: typeof RENDER): void;
2433
- setMap(mapOrMapId: MappedinMap | string): Promise<null>;
2434
- getPositionNode(node: MappedinNode): Vector3;
2435
- cameraObject: any;
2436
- setBackgroundColor(color: number | string, alpha?: number): void;
2437
- mapManager: any;
2438
- focusOn(focusOptions: TFocusOptionsLegacy): Tween;
2439
- canvasWidth: number;
2440
- canvasHeight: number;
2762
+ emit<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): void;
2441
2763
  /**
2442
- * Resets the MapView to the default state.
2764
+ * Emitting a message and waiting for a reponse, via a promise
2765
+ * @hidden
2443
2766
  */
2444
- resetState(): void;
2445
- destroy(): void;
2767
+ emitAsync<T, EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): Promise<T>;
2446
2768
  }
2447
2769
  }
2448
2770
 
2449
2771
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types' {
2450
2772
  export type TGetVenueOptions = {
2451
- accessToken?: string;
2452
- clientId?: string;
2453
- clientSecret?: string;
2454
- baseUrl?: string;
2455
- includeHidden?: boolean;
2456
- noAuth?: boolean;
2457
- perspective?: string;
2458
- language?: string;
2459
- headers?: {
2460
- [key in string]: string;
2461
- };
2462
- venue: string;
2463
- things?: any;
2773
+ accessToken?: string;
2774
+ clientId?: string;
2775
+ clientSecret?: string;
2776
+ baseUrl?: string;
2777
+ includeHidden?: boolean;
2778
+ noAuth?: boolean;
2779
+ perspective?: string;
2780
+ language?: string;
2781
+ headers?: {
2782
+ [key in string]: string;
2783
+ };
2784
+ venue: string;
2785
+ things?: any;
2786
+ useDraftData?: boolean;
2787
+ platformString?: string;
2464
2788
  };
2465
2789
  export type TGetVenueOptionsInternal = {
2466
- baseUrl?: string;
2467
- supplementaryUrl?: string;
2468
- noAuth?: boolean;
2469
- includeHidden?: boolean;
2470
- apiGateway?: string;
2471
- authorization?: string;
2472
- /**
2473
- * @deprecated 2D support will be removed in the future
2474
- */
2475
- do2D?: boolean;
2476
- things?: any;
2477
- headers?: any;
2790
+ baseUrl?: string;
2791
+ supplementaryUrl?: string;
2792
+ noAuth?: boolean;
2793
+ includeHidden?: boolean;
2794
+ apiGateway?: string;
2795
+ authorization?: string;
2796
+ /**
2797
+ * @deprecated 2D support will be removed in the future
2798
+ */
2799
+ do2D?: boolean;
2800
+ things?: any;
2801
+ headers?: any;
2478
2802
  };
2803
+ export enum MAP_RENDER_MODE {
2804
+ /** Each polygon, its geometry and mesh are sent to the GPU every render frame.
2805
+ * This was the default rendering mode before 4.0.17
2806
+ */
2807
+ MULTI_GEOMETRY = "MULTI_GEOMETRY",
2808
+ /** Polygons' geometries are grouped by material and merged together, resulting in far fewer
2809
+ * draw calls to the GPU. Default rendering mode since 4.0.17
2810
+ */
2811
+ SINGLE_GEOMETRY = "SINGLE_GEOMETRY"
2812
+ }
2479
2813
  }
2480
2814
 
2481
2815
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2482
2816
  import { Navigator } from '@mappedin/react-native-sdk/core/packages/navigator';
2817
+ import { MVFData } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.MVF.types';
2483
2818
  import type { TGetVenueOptions, TGetVenueOptionsInternal } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
2484
2819
  import { MappedinCategory } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCategory';
2485
2820
  import { MappedinEvent } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinEvent';
@@ -2494,8 +2829,9 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2494
2829
  import { MappedinTheme } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinTheme';
2495
2830
  import { MappedinVenue } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVenue';
2496
2831
  import { MappedinVortex } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVortex';
2832
+ import Analytics from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Analytics';
2497
2833
  export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
2498
- export enum CollectionType {
2834
+ export enum MappedinCollectionType {
2499
2835
  CATEGORY = "categories",
2500
2836
  EVENT = "events",
2501
2837
  LOCATION = "locations",
@@ -2506,14 +2842,14 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2506
2842
  VORTEX = "vortexes"
2507
2843
  }
2508
2844
  type TAccessors = {
2509
- [CollectionType.CATEGORY]: MappedinCategory;
2510
- [CollectionType.EVENT]: MappedinEvent;
2511
- [CollectionType.LOCATION]: MappedinLocation;
2512
- [CollectionType.MAPGROUP]: MappedinMapGroup;
2513
- [CollectionType.MAP]: MappedinMap;
2514
- [CollectionType.NODE]: MappedinNode;
2515
- [CollectionType.POLYGON]: MappedinPolygon;
2516
- [CollectionType.VORTEX]: MappedinVortex;
2845
+ [MappedinCollectionType.CATEGORY]: MappedinCategory;
2846
+ [MappedinCollectionType.EVENT]: MappedinEvent;
2847
+ [MappedinCollectionType.LOCATION]: MappedinLocation;
2848
+ [MappedinCollectionType.MAPGROUP]: MappedinMapGroup;
2849
+ [MappedinCollectionType.MAP]: MappedinMap;
2850
+ [MappedinCollectionType.NODE]: MappedinNode;
2851
+ [MappedinCollectionType.POLYGON]: MappedinPolygon;
2852
+ [MappedinCollectionType.VORTEX]: MappedinVortex;
2517
2853
  };
2518
2854
  const THINGS: {
2519
2855
  categories: typeof MappedinCategory;
@@ -2709,6 +3045,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2709
3045
  [id: string]: MappedinRankings;
2710
3046
  };
2711
3047
  getCollectionItemById<T extends keyof TAccessors, I extends string>(name: T, id: I): TAccessors[T] | null;
3048
+ /**
3049
+ * @hidden
3050
+ * @internal
3051
+ */
3052
+ hydrateFromMVF(mvfData: MVFData): Promise<undefined>;
2712
3053
  /**
2713
3054
  *
2714
3055
  * [experimental] Hydrate the Mappedin instance using a response from either {@link IMappedin.toString()}, {@link getVenueBundle} or by downloading the bundle manually
@@ -2717,9 +3058,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2717
3058
  */
2718
3059
  hydrate(mappedinSerializableData: string | object, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<undefined>;
2719
3060
  images: any;
3061
+ imageBinaries?: Map<string, Uint8Array>;
2720
3062
  scenes: any;
2721
3063
  fetch(): Promise<void>;
2722
3064
  constructor(options: TGetVenueOptionsInternal & TGetVenueOptions);
3065
+ analytics: Analytics;
2723
3066
  /**
2724
3067
  * @hidden
2725
3068
  */
@@ -2843,6 +3186,60 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolyg
2843
3186
  export class MappedinPolygon extends MappedinNavigatable {
2844
3187
  #private;
2845
3188
  geometry: any;
3189
+ image?: {
3190
+ visible: boolean;
3191
+ url: string | Blob;
3192
+ original: string | Blob;
3193
+ useLocalScaling: boolean;
3194
+ viewBox: {
3195
+ width: number;
3196
+ height: number;
3197
+ };
3198
+ scale: {
3199
+ x: number;
3200
+ y: number;
3201
+ };
3202
+ fitToBounds: boolean;
3203
+ position: {
3204
+ x: number;
3205
+ y: number;
3206
+ z: number;
3207
+ };
3208
+ rotation: {
3209
+ x: number;
3210
+ y: number;
3211
+ z: number;
3212
+ };
3213
+ _isAbsolutelyPositioned?: boolean;
3214
+ };
3215
+ holes?: unknown[];
3216
+ textures?: {
3217
+ image: any;
3218
+ name: 'front' | 'side';
3219
+ useFrontFaceImage?: boolean;
3220
+ }[];
3221
+ material: {
3222
+ color: string;
3223
+ opacity?: number;
3224
+ };
3225
+ label?: {
3226
+ visible: boolean;
3227
+ text: string;
3228
+ align: string;
3229
+ position: {
3230
+ x: number;
3231
+ y: number;
3232
+ z: number;
3233
+ };
3234
+ rotation: {
3235
+ x: number;
3236
+ y: number;
3237
+ z: number;
3238
+ };
3239
+ fontFamily: string;
3240
+ fontSize: number;
3241
+ color: string;
3242
+ };
2846
3243
  /**
2847
3244
  * Node ID.
2848
3245
  *
@@ -3029,6 +3426,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
3029
3426
  import type { TGeoReference } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.types';
3030
3427
  import type { MappedinMapGroup } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMapGroup';
3031
3428
  import { MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoordinate';
3429
+ import { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue';
3032
3430
  /**
3033
3431
  * 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.
3034
3432
  *
@@ -3055,6 +3453,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
3055
3453
  shortName: string;
3056
3454
  elevation: number;
3057
3455
  scale?: number;
3456
+ layers: {
3457
+ visible: boolean;
3458
+ name: string;
3459
+ id: string;
3460
+ }[];
3058
3461
  x_scale?: number;
3059
3462
  perspectiveId?: string;
3060
3463
  scene: any;
@@ -3069,6 +3472,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
3069
3472
  * @property polygons {[MappedinPolygon]}
3070
3473
  */
3071
3474
  get polygons(): MappedinPolygon[] | undefined;
3475
+ /**
3476
+ * Locations on this map
3477
+ */
3478
+ get locations(): MappedinLocation[];
3479
+ get nodes(): import("./MappedinNode").MappedinNode[];
3072
3480
  /**
3073
3481
  * Map Group this map belongs to.
3074
3482
  *
@@ -3092,7 +3500,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap'
3092
3500
  createCoordinate(lat: number, lon: number): MappedinCoordinate;
3093
3501
  /**
3094
3502
  *
3095
- * @returns map rotation in degrees from North
3503
+ * @returns map rotation in radians from north
3096
3504
  */
3097
3505
  getNorth(): any;
3098
3506
  static hydrate(maps: any, mappedin: Mappedin): MappedinMap[];
@@ -3106,28 +3514,56 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinEvent
3106
3514
  import type { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
3107
3515
  import type { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
3108
3516
  /**
3109
- * An event.
3517
+ * 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.
3110
3518
  *
3111
3519
  * @class MappedinEvent
3112
3520
  */
3113
3521
  export class MappedinEvent {
3114
3522
  #private;
3523
+ /**
3524
+ * Unique id string of the event.
3525
+ */
3115
3526
  id: string;
3116
3527
  type: string;
3528
+ /**
3529
+ * Event name
3530
+ */
3117
3531
  name: string;
3532
+ /**
3533
+ * Optional, longer description of the event.
3534
+ */
3118
3535
  description?: string | undefined;
3536
+ /**
3537
+ * Optional image to be used for displaying the event.
3538
+ */
3119
3539
  image?: TImage | undefined;
3540
+ /**
3541
+ * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
3542
+ */
3120
3543
  startDate?: number | undefined;
3544
+ /**
3545
+ * Start timestamp of the event. Javascript date in milliseconds since 1 January 1970 UTC.
3546
+ */
3121
3547
  endDate?: number | undefined;
3548
+ /**
3549
+ * Timestamp when the event should be displayed. Javascript date in milliseconds since 1 January 1970 UTC.
3550
+ */
3122
3551
  showDate?: number | undefined;
3552
+ /**
3553
+ * @internal
3554
+ */
3123
3555
  constructor(mappedin: Mappedin, data: any);
3124
3556
  /**
3125
- * Location this Event is occuring at.
3126
- *
3127
- * @property location {MappedinLocation}
3557
+ * Location this event is occuring at.
3128
3558
  */
3129
3559
  location(): MappedinLocation | undefined;
3560
+ /**
3561
+ * @internal
3562
+ */
3130
3563
  static hydrate(events: any, mappedin: Mappedin): MappedinEvent[];
3564
+ /**
3565
+ * @internal
3566
+ */
3131
3567
  static fetch(mappedin: Mappedin): Promise<MappedinEvent[]>;
3132
3568
  toJSON(): any;
3133
3569
  }
@@ -3200,9 +3636,10 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVenue
3200
3636
  tzidOverride: string;
3201
3637
  utcOffset: string;
3202
3638
  website: string;
3203
- constructor(data: any);
3204
- static hydrate(data: any): MappedinVenue;
3639
+ constructor(mappedin: Mappedin, data: any);
3640
+ static hydrate(data: any, mappedin: Mappedin): MappedinVenue;
3205
3641
  static fetch(mappedin: Mappedin): Promise<MappedinVenue>;
3642
+ get isMultiBuilding(): any;
3206
3643
  toJSON(): any;
3207
3644
  }
3208
3645
  }
@@ -3419,6 +3856,229 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavig
3419
3856
  }
3420
3857
  }
3421
3858
 
3859
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.OfflineSearch' {
3860
+ import { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
3861
+ import type { SearchOptions } from 'minisearch';
3862
+ import { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
3863
+ import { MappedinCategory } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCategory';
3864
+ export const removeAccents: (it: string) => string;
3865
+ export type { SearchOptions };
3866
+ /**
3867
+ * A {@link Mappedin.OfflineSearch} is an offline search module
3868
+ *
3869
+ *
3870
+ * @class Mappedin.OfflineSearch
3871
+ */
3872
+ type TOfflineSearchAllOptions = {
3873
+ /**
3874
+ * Array of stopwords to ignore when searching, default: english stopwords
3875
+ */
3876
+ stopWords?: string[];
3877
+ /**
3878
+ * Index location tags - typically better to use either tags or descriptions, depending on what's available
3879
+ * @default true
3880
+ */
3881
+ searchTags?: boolean;
3882
+ /**
3883
+ * Index location descriptions - typically better to use either tags or descriptions, depending on what's available
3884
+ * @default true
3885
+ */
3886
+ searchDescriptions?: boolean;
3887
+ /**
3888
+ * Also index all tags for every location in every category (caution: this may slow down indexing and search)
3889
+ * @default false
3890
+ */
3891
+ searchTagsInCategories?: boolean;
3892
+ /**
3893
+ * Also index all tags for every location in every category (caution: this may slow down indexing and search)
3894
+ * @default false
3895
+ */
3896
+ searchDescriptionsInCategories?: boolean;
3897
+ /**
3898
+ * Initialize Search with a previously indexed JSON string (outputted by OfflineSearch.toJSON())
3899
+ */
3900
+ jsonIndex?: string;
3901
+ /**
3902
+ * Use the location polygons' rank in weighing results
3903
+ */
3904
+ useLocationRank?: boolean;
3905
+ /**
3906
+ * Emit Analytics events when doing search
3907
+ * @default true when running in production
3908
+ */
3909
+ emitAnalyticsEvents?: boolean;
3910
+ /**
3911
+ * Fine tune search constants
3912
+ */
3913
+ constants: {
3914
+ /**
3915
+ * Fuzziness index for location names and tags
3916
+ * @default 0.09
3917
+ */
3918
+ PRIMARY_INDEX_FUZZYNESS: number;
3919
+ /**
3920
+ * Multiplier for location names (1 by default)
3921
+ * @default 1
3922
+ */
3923
+ PRIMARY_INDEX_WEIGHT: number;
3924
+ /**
3925
+ * Multiplier for descriptions
3926
+ * @default 0.025
3927
+ */
3928
+ SECONDARY_INDEX_WEIGHT: number;
3929
+ /**
3930
+ * Multiplier for location names
3931
+ * @default 1
3932
+ */
3933
+ LOCATION_NAME_WEIGHT: number;
3934
+ /**
3935
+ * Multiplier for category names
3936
+ * @default 0.5
3937
+ */
3938
+ CATEGORY_NAME_WEIGHT: number;
3939
+ /**
3940
+ * Multiplier for category locations' descriptions
3941
+ * @default 0.0005
3942
+ */
3943
+ CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number;
3944
+ /**
3945
+ * Multiplier for category locations' tags
3946
+ * @default 0.0005
3947
+ */
3948
+ CATEGORY_LOCATION_TAGS_WEIGHT: number;
3949
+ /**
3950
+ * Multiplier for category locations' names
3951
+ * @default 0.01
3952
+ */
3953
+ CATEGORY_LOCATION_NAME_WEIGHT: number;
3954
+ /**
3955
+ * Multiplier for location tags
3956
+ * @default 0.05
3957
+ */
3958
+ PRIMARY_INDEX_TAGS_NAME_WEIGHT: number;
3959
+ /**
3960
+ * Default rank when one isn't available in the data, default = 1
3961
+ * @default 1
3962
+ */
3963
+ LOCATION_DEFAULT_RANK: number;
3964
+ /**
3965
+ * Ratio of Fuzzy Searches of Location names and tags relative to exact
3966
+ * @default 0.01
3967
+ */
3968
+ RATIO_OF_FUZZY_TO_EXACT: number;
3969
+ /**
3970
+ * Ratio of Prefix Searches of Location names and tags relative to exact
3971
+ * @default 0.2
3972
+ */
3973
+ RATIO_OF_PREFIX_TO_EXACT: number;
3974
+ };
3975
+ };
3976
+ export type TMappedinOfflineAllSearchMatch = {
3977
+ /**
3978
+ * The term that was found
3979
+ */
3980
+ term: string;
3981
+ /**
3982
+ * Term's weight
3983
+ */
3984
+ weight: number;
3985
+ /**
3986
+ * What field the search matched on
3987
+ */
3988
+ matchesOn: string;
3989
+ /**
3990
+ * The value of that field
3991
+ */
3992
+ value?: string;
3993
+ };
3994
+ export type TMappedinOfflineSearchOptions = Partial<TOfflineSearchAllOptions>;
3995
+ export type TMappedinOfflineSearchResult = {
3996
+ /**
3997
+ * Type describing the object
3998
+ */
3999
+ type: 'MappedinLocation' | 'MappedinCategory' | 'Custom';
4000
+ /**
4001
+ * Details on why the result was returned
4002
+ */
4003
+ matches: TMappedinOfflineAllSearchMatch[];
4004
+ /**
4005
+ * Found object
4006
+ */
4007
+ object: MappedinLocation | MappedinCategory | Record<string, unknown>;
4008
+ /**
4009
+ * Total score of the result
4010
+ */
4011
+ score: number;
4012
+ };
4013
+ export type TMappedinOfflineSearchSuggestions = {
4014
+ /**
4015
+ * Total number of suggestions generated
4016
+ */
4017
+ total: number;
4018
+ /**
4019
+ * List of suggestions
4020
+ */
4021
+ hits: {
4022
+ /**
4023
+ * Suggestion text
4024
+ */
4025
+ text: string;
4026
+ }[];
4027
+ };
4028
+ /**
4029
+ * 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 TMappedinOfflineAllSearchOptions} options.
4030
+ *
4031
+ *
4032
+ * @class Mappedin.OfflineSearch
4033
+ */
4034
+ export class OfflineSearch {
4035
+ #private;
4036
+ constructor(
4037
+ /**
4038
+ * Mappedin Venue Object, typically returned by `getVenue`/`showVenue`
4039
+ */
4040
+ mappedin: Mappedin, options?: TMappedinOfflineSearchOptions);
4041
+ /**
4042
+ * Get Suggestions for term
4043
+ */
4044
+ suggest(
4045
+ /**
4046
+ * Search term
4047
+ */
4048
+ term: string): Promise<TMappedinOfflineSearchSuggestions>;
4049
+ /**
4050
+ * Search for a term
4051
+ */
4052
+ search(
4053
+ /**
4054
+ * Search term
4055
+ */
4056
+ term: string): Promise<TMappedinOfflineSearchResult[]>;
4057
+ /**
4058
+ * Export search index to JSON for storage/caching - this would avoid having to re-index
4059
+ * on page reload
4060
+ */
4061
+ toJSON(): Promise<string>;
4062
+ /**
4063
+ * Add a custom query to the search index
4064
+ */
4065
+ addQuery(params: {
4066
+ /**
4067
+ * Query string to match for this object
4068
+ */
4069
+ query: string;
4070
+ /**
4071
+ * Object that is returned when query matches
4072
+ */
4073
+ object: MappedinLocation | MappedinCategory | Record<string, unknown>;
4074
+ /**
4075
+ * Optional weight to multiply by the score
4076
+ */
4077
+ weight?: number;
4078
+ }): Promise<void>;
4079
+ }
4080
+ }
4081
+
3422
4082
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.types' {
3423
4083
  /**
3424
4084
  * This file contains the API types for MappedinSDK - before they get turned into Classes
@@ -3534,9 +4194,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.
3534
4194
  export type TMapGroup = {
3535
4195
  name: string;
3536
4196
  id: string;
3537
- maps: {
3538
- id: TMap['id'];
3539
- }[];
3540
4197
  };
3541
4198
  export type TBuilding = TLocation & {
3542
4199
  groupId: string;
@@ -3589,27 +4246,32 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.
3589
4246
  entranceNodeId: string;
3590
4247
  score: number;
3591
4248
  };
3592
- export type TVenue = {
3593
- address: string;
3594
- city: string;
3595
- countrycode: string;
3596
- defaultMap: string;
3597
- externalId: string;
4249
+ export type TLocationState = {
3598
4250
  id: string;
3599
- latitude: number;
3600
- logo: TLogo;
3601
- longitude: number;
3602
- metadata?: any;
3603
4251
  name: string;
3604
- operationHours: TOpeningHours[];
3605
- postal: string;
3606
- slug: string;
3607
- state: string;
3608
- telephone: string;
3609
- tzid: string;
3610
- tzidOverride: string;
3611
- utcOffset: string;
3612
- website: string;
4252
+ value: string;
4253
+ };
4254
+ export type TVenue = {
4255
+ address?: string;
4256
+ city?: string;
4257
+ countrycode?: string;
4258
+ defaultMap?: string;
4259
+ externalId?: string;
4260
+ id?: string;
4261
+ latitude?: number;
4262
+ logo?: TLogo;
4263
+ longitude?: number;
4264
+ metadata?: any;
4265
+ name?: string;
4266
+ operationHours?: TOpeningHours[];
4267
+ postal?: string;
4268
+ slug?: string;
4269
+ state?: string;
4270
+ telephone?: string;
4271
+ tzid?: string;
4272
+ tzidOverride?: string;
4273
+ utcOffset?: string;
4274
+ website?: string;
3613
4275
  };
3614
4276
  export type TMappedinAPI = {
3615
4277
  nodes: TNode[];
@@ -3621,6 +4283,8 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.
3621
4283
  themes: any;
3622
4284
  venue: TVenue;
3623
4285
  vortexes: TVortex[];
4286
+ locationStates?: TLocationState[];
4287
+ imageBinaries?: Map<string, Uint8Array>;
3624
4288
  };
3625
4289
  }
3626
4290
 
@@ -3759,6 +4423,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3759
4423
  RIGHT = "right"
3760
4424
  }
3761
4425
  class FloatingLabel extends BaseCollider implements ISmarterLabel {
4426
+ #private;
3762
4427
  lines: number;
3763
4428
  contextConfigured: boolean;
3764
4429
  fillText: TDrawFn | undefined;
@@ -3768,20 +4433,19 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3768
4433
  clearColor: () => void;
3769
4434
  zoomProportion: number;
3770
4435
  _cache: {};
3771
- _dirty: boolean;
3772
4436
  appearance: TAppearanceFilledIn;
3773
4437
  mapView: ICore;
3774
4438
  constructor(options: TFloatingLabelOptionsInternal, mapView: ICore);
3775
- enable(): void;
4439
+ enable(updateEngine?: boolean): void;
3776
4440
  get strategies(): TColliderStrategy[];
3777
4441
  getCachedSymbol(orientation: any, textAlign: any, xCoordinate: any): any;
3778
4442
  colliderDidMount(): void;
3779
- colliderDidUpdatePosition(x: any, y: any): void;
4443
+ colliderDidUpdatePosition(pos: any): void;
3780
4444
  setPriority(priority: any): void;
3781
4445
  colliderDidUpdateVisiblity(): void;
3782
4446
  colliderDidGoOutsideGrid(): void;
3783
4447
  colliderDidNotFindAHome(): void;
3784
- disable(): void;
4448
+ disable(updateEngine?: boolean): void;
3785
4449
  draw(context: CanvasRenderingContext2D): void;
3786
4450
  static original: FloatingLabel;
3787
4451
  static clone(options: TFloatingLabelOptionsInternal, mapView: ICore): any;
@@ -3912,19 +4576,19 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3912
4576
  }
3913
4577
  export type TBlueDotPositionUpdate = {
3914
4578
  /**
3915
- * What Map is Blue Dot on
4579
+ * The {@link MappedinMap} Blue Dot position is on
3916
4580
  */
3917
4581
  map?: MappedinMap;
3918
4582
  /**
3919
- * The nearest Node to the BlueDot
4583
+ * The nearest {@link MappedinNode} to the Blue Dot position
3920
4584
  */
3921
4585
  nearestNode?: MappedinNode;
3922
4586
  /**
3923
- * Actual position of BlueDot (post smoothing, if smoothing is on)
4587
+ * Actual position of Blue Dot (post smoothing, if smoothing is enabled)
3924
4588
  */
3925
4589
  position?: TGeolocationObject;
3926
4590
  /**
3927
- * Current BlueDot bearing
4591
+ * Current Blue Dot bearing
3928
4592
  */
3929
4593
  bearing?: number;
3930
4594
  };
@@ -3934,11 +4598,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3934
4598
  */
3935
4599
  name: E_BLUEDOT_STATE;
3936
4600
  /**
3937
- * Visiblity State of the BlueDot marker
4601
+ * Visiblity state of the Blue Dot marker
3938
4602
  */
3939
4603
  markerVisibility?: E_BLUEDOT_MARKER_STATE;
3940
4604
  /**
3941
- * Reason why BlueDot may be in the current state
4605
+ * Reason why Blue Dot may be in the current state
3942
4606
  */
3943
4607
  reason?: E_BLUEDOT_STATE_REASON;
3944
4608
  /**
@@ -3958,79 +4622,84 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3958
4622
  FakeGeolocation: typeof FakeGeolocation;
3959
4623
  };
3960
4624
  export default BlueDot;
3961
- }
3962
-
3963
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip' {
3964
- import './Mappedin.SmartTooltip.scss';
3965
- import { COLLISION_RANKING_TIERS } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
3966
- import HTMLCollider, { IHTMLCollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.HTMLCollider';
3967
- import { Vector3 } from 'three';
3968
- import { TColliderStrategy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
3969
- /**
3970
- *
3971
- * A Tooltip is an html element that attempts to orient itself around an anchor in 3D space. It will always maintain the same size on the screen, but will attempt to change its orientation based on other colliders in the scene.
3972
- *
3973
- * Make your own and add it directly to the map with {{#crossLink "MapView/createTooltip:method"}}{{/crossLink}}, or use the constructor and add it when you want.
3974
- *
3975
- * You will need to specify at least `options.position` and one of `options.html` and `options.selector` OR `options.contentHtml`.
3976
- *
3977
- *
3978
- * @class Tooltip
3979
- *
3980
- * @constructor
3981
- * @param options {Object} Passes on options (e.g. html, text, position, map, padding, defaultAnchorType, enabledAnchorTypes, collisionRank) to MapView.Tooltip's options argument.
3982
- * @param [options.html] Pass in custom html for your marker, if using this method you must also pass in a selector for your content.
3983
- * @param [options.selector] Used in conjuction with the html property to select the div for repositioning
3984
- * @param [options.contentHtml] Use mappedin's default tooltip styling with custom inner html content
3985
- * @param [options.text] Instead of passing html pass in plain text to be displayed in the tooltip
3986
- * @param [options.position] should be something you got from {{#crossLink "MapView/getPositionPolygon:method"}}{{/crossLink}} or {{#crossLink "MapView/getPositionNode:method"}}{{/crossLink}}.
3987
- * @param [options.map] The map ID where the tooltip should be displayed
3988
- * @param [options.defaultAnchorType] The default orientation to place the tooltip.
3989
- * @param [options.padding] The distance in pixel to offset the tooltip from the anchor point.
3990
- * @param [options.enabledAnchorTypes] An object used to disable certain anchor positions from being used.
3991
- * @param [options.collisionRank] The rank of the object used when comparing colliders to determine which should be shown.
3992
- */
4625
+ }
4626
+
4627
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip' {
4628
+ import './Mappedin.SmartTooltip.scss';
4629
+ import { COLLISION_RANKING_TIERS } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
4630
+ import HTMLCollider, { IHTMLCollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.HTMLCollider';
4631
+ import { Vector3 } from 'three';
4632
+ import { TColliderStrategy } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
4633
+ /**
4634
+ *
4635
+ * A Tooltip is an html element that attempts to orient itself around an anchor in 3D space. It will always maintain the same size on the screen, but will attempt to change its orientation based on other colliders in the scene.
4636
+ *
4637
+ * Make your own and add it directly to the map with {{#crossLink "MapView/createTooltip:method"}}{{/crossLink}}, or use the constructor and add it when you want.
4638
+ *
4639
+ * You will need to specify at least `options.position` and one of `options.html` and `options.selector` OR `options.contentHtml`.
4640
+ *
4641
+ *
4642
+ * @class Tooltip
4643
+ *
4644
+ * @constructor
4645
+ * @param options {Object} Passes on options (e.g. html, text, position, map, padding, defaultAnchorType, enabledAnchorTypes, collisionRank) to MapView.Tooltip's options argument.
4646
+ * @param [options.html] Pass in custom html for your marker, if using this method you must also pass in a selector for your content.
4647
+ * @param [options.selector] Used in conjuction with the html property to select the div for repositioning
4648
+ * @param [options.contentHtml] Use mappedin's default tooltip styling with custom inner html content
4649
+ * @param [options.text] Instead of passing html pass in plain text to be displayed in the tooltip
4650
+ * @param [options.position] should be something you got from {{#crossLink "MapView/getPositionPolygon:method"}}{{/crossLink}} or {{#crossLink "MapView/getPositionNode:method"}}{{/crossLink}}.
4651
+ * @param [options.map] The map ID where the tooltip should be displayed
4652
+ * @param [options.defaultAnchorType] The default orientation to place the tooltip.
4653
+ * @param [options.padding] The distance in pixel to offset the tooltip from the anchor point.
4654
+ * @param [options.enabledAnchorTypes] An object used to disable certain anchor positions from being used.
4655
+ * @param [options.collisionRank] The rank of the object used when comparing colliders to determine which should be shown.
4656
+ */
3993
4657
  export type TSmartTooltipOptions = {
3994
- html?: string;
3995
- contentHtml?: string;
3996
- text?: string;
3997
- position: Vector3;
3998
- selector?: string;
3999
- map: string;
4000
- padding?: number;
4001
- collisionRank?: COLLISION_RANKING_TIERS;
4002
- defaultAnchorType?: string;
4003
- enabledAnchorTypes?: {
4004
- [type: string]: boolean;
4005
- };
4658
+ html?: string;
4659
+ contentHtml?: string;
4660
+ text?: string;
4661
+ position: Vector3;
4662
+ selector?: string;
4663
+ map: string;
4664
+ padding?: number;
4665
+ alwaysVisible?: boolean;
4666
+ collisionRank?: COLLISION_RANKING_TIERS;
4667
+ defaultAnchorType?: string;
4668
+ enabledAnchorTypes?: {
4669
+ [type: string]: boolean;
4670
+ };
4006
4671
  };
4007
4672
  type TTooltipStyle = {
4008
- top?: string;
4009
- left?: string;
4673
+ top?: string;
4674
+ left?: string;
4010
4675
  };
4011
4676
  export type TOOLTIP_ANCHOR = {
4012
- top?: boolean;
4013
- left?: boolean;
4014
- topLeft?: boolean;
4015
- right?: boolean;
4016
- topRight?: boolean;
4017
- bottom?: boolean;
4018
- bottomLeft?: boolean;
4019
- bottomRight?: boolean;
4677
+ top?: boolean;
4678
+ left?: boolean;
4679
+ topLeft?: boolean;
4680
+ right?: boolean;
4681
+ topRight?: boolean;
4682
+ bottom?: boolean;
4683
+ bottomLeft?: boolean;
4684
+ bottomRight?: boolean;
4020
4685
  };
4021
4686
  class SmartTooltip extends HTMLCollider implements IHTMLCollider {
4022
- className: string;
4023
- _el: Element | null;
4024
- style: TTooltipStyle;
4025
- constructor(options: TSmartTooltipOptions);
4026
- updateClassName: (className: any) => void;
4027
- get strategies(): TColliderStrategy[];
4028
- colliderDidMount(): void;
4029
- setAction(action: any): void;
4030
- updateDimensions(): void;
4031
- colliderDidNotFindAHome(): void;
4032
- colliderDidGoOffscreen(): void;
4033
- colliderDidUpdateVisiblity(): void;
4687
+ #private;
4688
+ className: string;
4689
+ _el: Element | null;
4690
+ style: TTooltipStyle;
4691
+ constructor(options: TSmartTooltipOptions);
4692
+ updateClassName: (className: any) => void;
4693
+ get strategies(): TColliderStrategy[];
4694
+ colliderDidMount(): void;
4695
+ /**
4696
+ * @internal
4697
+ */
4698
+ updateDimensionsImmediately(): void;
4699
+ setAction(action: any): void;
4700
+ colliderDidNotFindAHome(): void;
4701
+ colliderDidGoOffscreen(): void;
4702
+ colliderDidUpdateVisiblity(): void;
4034
4703
  }
4035
4704
  export default SmartTooltip;
4036
4705
  }
@@ -4042,6 +4711,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot
4042
4711
  import { TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4043
4712
  import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
4044
4713
  import EventSystemLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSystem';
4714
+ /**
4715
+ * 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.
4716
+ */
4045
4717
  class BlueDotLayer extends PubSub<E_BLUEDOT_EVENT_PAYLOAD, E_BLUEDOT_EVENT> {
4046
4718
  #private;
4047
4719
  /**
@@ -4053,7 +4725,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot
4053
4725
  */
4054
4726
  enable(options?: TEnableBlueDotOptions): void;
4055
4727
  /**
4056
- * Disable BlueDot
4728
+ * Disables Blue Dot and stops emitting events.
4057
4729
  */
4058
4730
  disable(): void;
4059
4731
  }
@@ -4072,7 +4744,17 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/Journey
4072
4744
  */
4073
4745
  constructor(mapView: MapView, core: ICore);
4074
4746
  /**
4075
- * Draw a Journey
4747
+ * Draw a Journey based on directions. Example usage:
4748
+ *
4749
+ * ```typescript
4750
+ * const startLocation = venue.locations.find(location => location.name === "Cleo");
4751
+ * const endLocation = venue.locations.find(location => location.name === "American Eagle");
4752
+ *
4753
+ * const directions = startLocation.directionsTo(endLocation);
4754
+ * mapView.Journey.draw(directions);
4755
+ * ```
4756
+ *
4757
+ * 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.
4076
4758
  */
4077
4759
  draw(directions: MappedinDirections | MappedinDirections[], options?: TJourneyOptions): Journey;
4078
4760
  /**
@@ -4105,8 +4787,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4105
4787
  }
4106
4788
  export class FlatLabel {
4107
4789
  constructor(options: any, venue: any, mapObject: any, DEFAULT_FONT: any, polygonMeshesById: any, textLabelsByPolygonId: any, mapView: any, scope: any, atlas: any);
4790
+ id: any;
4108
4791
  text: any;
4109
4792
  stateText: string;
4793
+ fullText: any;
4110
4794
  font: any;
4111
4795
  atlas: any;
4112
4796
  canvasBounds: any;
@@ -4120,8 +4804,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4120
4804
  polygonMeshesById: any;
4121
4805
  polyId: any;
4122
4806
  map: any;
4123
- color: Color;
4124
- baseColor: Color;
4807
+ color: any;
4808
+ baseColor: any;
4125
4809
  hideOnCreate: boolean;
4126
4810
  hoverLabelText: any;
4127
4811
  fontSize: number;
@@ -4152,7 +4836,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4152
4836
  index: any;
4153
4837
  layout(map: any, origin: any, size: any, rotation: any, uv: any, color: any): void;
4154
4838
  }
4155
- import { Color } from "three/src/math/Color";
4156
4839
  export {};
4157
4840
  }
4158
4841
 
@@ -4330,23 +5013,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-s
4330
5013
  }
4331
5014
  }
4332
5015
 
4333
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.CameraControls' {
4334
- export default CameraControls;
4335
- /**
4336
- * 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.
4337
- * 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.
4338
- *
4339
- * 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.
4340
- * 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.
4341
- *
4342
- * Created for you automatically with a MapView, don't re-create yourself.
4343
- * @type {any}
4344
- *
4345
- * @class CameraControls
4346
- */
4347
- let CameraControls: any;
4348
- }
4349
-
4350
5016
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks' {
4351
5017
  export default RENDER;
4352
5018
  namespace RENDER {
@@ -4680,6 +5346,19 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4680
5346
  * @param polygon The Polygon you want the primary Location of.
4681
5347
  */
4682
5348
  getPrimaryLocationForPolygon(polygon: MappedinPolygon): MappedinLocation;
5349
+ /**
5350
+ * Finds all polygons that contain the specified MappedinCoordinate. If multiple
5351
+ * polygons are stacked on top of each other, the array of polygons returned will be
5352
+ * in the order of top to bottom.
5353
+ *
5354
+ * By default, this only considers interactive polygons.
5355
+ *
5356
+ * @param coordinate The MappedinCoordinate to check
5357
+ * @param includeNonInteractive Specifies if all polygons should be included rather
5358
+ * than just interactive polygons.
5359
+ * @returns MappedinPolygon[]
5360
+ */
5361
+ getPolygonsAtCoordinate(coordinate: MappedinCoordinate, includeNonInteractive?: boolean): MappedinPolygon[];
4683
5362
  /**
4684
5363
  * Destroy instance and clean up memory
4685
5364
  */
@@ -4689,9 +5368,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4689
5368
 
4690
5369
  declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4691
5370
  import Search from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search';
4692
- import Analytics from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Analytics';
5371
+ import Analytics from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Analytics';
4693
5372
  import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
4694
- import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
5373
+ import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4695
5374
  import { PositionUpdater } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
4696
5375
  import type { TMapViewOptions, TJourneyOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4697
5376
  import { labelThemes } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
@@ -4722,9 +5401,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4722
5401
  */
4723
5402
  function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
4724
5403
  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/react-native-sdk/core/packages/renderer/MapView.enums';
4725
- export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
5404
+ export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
4726
5405
  import DefaultAssetManager from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager';
4727
- const setAssetManager: (am: any) => void;
5406
+ const setAssetManager: <T extends DefaultAssetManager>(am: T) => void;
4728
5407
  /**
4729
5408
  * @internal
4730
5409
  */
@@ -4738,8 +5417,234 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4738
5417
  export type { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
4739
5418
  export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4740
5419
  export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4741
- export type { TGetVenueOptions, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4742
- export { Mappedin, MappedinDirections } from '@mappedin/react-native-sdk/core/packages/get-venue';
5420
+ export type { TGetVenueOptions, TShowVenueOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch } from '@mappedin/react-native-sdk/core/packages/get-venue';
5421
+ export { Mappedin, MappedinDirections, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, OfflineSearch, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
5422
+ export { BundleAssetManager } from '@mappedin/react-native-sdk/core/packages/renderer/bundle-asset-manager';
5423
+ }
5424
+
5425
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.MVF.types' {
5426
+ import { FeatureCollection, Polygon, Point, MultiPolygon, Position } from 'geojson';
5427
+ type ManifestFile = {
5428
+ type: 'file';
5429
+ name: string;
5430
+ };
5431
+ type ManifestFolder = {
5432
+ type: 'folder';
5433
+ name: string;
5434
+ children: ManifestFile[];
5435
+ };
5436
+ type OpeningHours = {
5437
+ opens: string;
5438
+ closes: string;
5439
+ dayOfWeek: string;
5440
+ validFrom?: string;
5441
+ validThrough?: string;
5442
+ };
5443
+ type Image = {
5444
+ original?: string;
5445
+ xlarge?: string;
5446
+ xxlarge?: string;
5447
+ medium?: string;
5448
+ '140x140'?: string;
5449
+ xsmall?: string;
5450
+ xxsmall?: string;
5451
+ '66x66'?: string;
5452
+ small?: string;
5453
+ large?: string;
5454
+ };
5455
+ type PolygonImage = string;
5456
+ type Phone = {
5457
+ number: string;
5458
+ extension?: string;
5459
+ };
5460
+ type Link = {
5461
+ label: string;
5462
+ url: string;
5463
+ };
5464
+ type Social = {
5465
+ facebook?: string;
5466
+ twitter?: string;
5467
+ instagram?: string;
5468
+ website?: string;
5469
+ };
5470
+ type LocationState = {
5471
+ type: string;
5472
+ start?: string;
5473
+ end?: string;
5474
+ };
5475
+ type SiblingGroup = {
5476
+ label: string;
5477
+ siblings: string[];
5478
+ };
5479
+ export type MILocationProperties = {
5480
+ id: string;
5481
+ address?: string | null;
5482
+ categories: string[];
5483
+ description?: string | null;
5484
+ email?: string | null;
5485
+ externalId?: string | null;
5486
+ hours?: OpeningHours[] | null;
5487
+ links?: Link[] | null;
5488
+ logo?: Image | null;
5489
+ name: string;
5490
+ phone?: Phone | null;
5491
+ picture?: Image | null;
5492
+ services?: string | null;
5493
+ siblingGroups?: SiblingGroup[] | null;
5494
+ social?: Social | null;
5495
+ spaces?: TLocationSpaceReference[] | null;
5496
+ states?: LocationState[] | null;
5497
+ type: string;
5498
+ };
5499
+ export type MICategoryProperties = {
5500
+ id: string;
5501
+ name: string;
5502
+ picture?: Image;
5503
+ };
5504
+ export type MIBuildingProperties = {
5505
+ id: string;
5506
+ name: string;
5507
+ venue: string;
5508
+ };
5509
+ export type MILevelProperties = {
5510
+ id: string;
5511
+ abbreviation?: string;
5512
+ building?: string;
5513
+ elevation?: number;
5514
+ name: string;
5515
+ };
5516
+ export type MIPolygonlikeProperties = {
5517
+ id: string;
5518
+ altitude?: string;
5519
+ color?: string;
5520
+ externalId?: string | null;
5521
+ height?: string;
5522
+ layer?: string;
5523
+ level: string;
5524
+ parent?: string | null;
5525
+ };
5526
+ type TPseudoNodeSpaceReference = {
5527
+ node: string;
5528
+ map: string;
5529
+ };
5530
+ export type TRealSpaceReference = {
5531
+ id: string;
5532
+ map: string;
5533
+ };
5534
+ type TLocationSpaceReference = TPseudoNodeSpaceReference | TRealSpaceReference;
5535
+ export type TEntrances = {
5536
+ id: string;
5537
+ level: string;
5538
+ };
5539
+ export type MISpaceProperties = MIPolygonlikeProperties & {
5540
+ entrances: TEntrances[];
5541
+ };
5542
+ export type MIObstructionProperties = MIPolygonlikeProperties;
5543
+ export type MIConnectionProperties = {
5544
+ id: string;
5545
+ accessible: boolean;
5546
+ destinations: string[];
5547
+ level: string;
5548
+ multiplier: number;
5549
+ name: string;
5550
+ type: string;
5551
+ weight: number;
5552
+ };
5553
+ export type MINodeProperties = {
5554
+ id: string;
5555
+ accessible: boolean;
5556
+ externalId: string | null;
5557
+ level: string;
5558
+ multiplier: number;
5559
+ neighbors: string[];
5560
+ weight: number;
5561
+ };
5562
+ export type MIManifestProperties = {
5563
+ name: string;
5564
+ folder_struct: (ManifestFolder | ManifestFile)[];
5565
+ version: string;
5566
+ time: string;
5567
+ };
5568
+ export type MIStyle = {
5569
+ id: string;
5570
+ /** The altitude of the bottom of the geometry, in metres. */
5571
+ altitude: number;
5572
+ color: string;
5573
+ height: number;
5574
+ image?: PolygonImage;
5575
+ opacity: number;
5576
+ };
5577
+ export type MIImageInstance = {
5578
+ /** The local path or URL of the image. */
5579
+ path: string;
5580
+ /** The position of the centre of the image, in [long, lat] form. */
5581
+ position: Position;
5582
+ /** The altitude of the image, in metres. */
5583
+ altitude: number;
5584
+ /** Euler angles representing the rotation of the image, in degrees. Angles are in XYZ order. */
5585
+ rotation: {
5586
+ x: number;
5587
+ y: number;
5588
+ z: number;
5589
+ };
5590
+ /** The size of the image, in metres. */
5591
+ size: {
5592
+ x: number;
5593
+ y: number;
5594
+ };
5595
+ /** The portion of the image to display. */
5596
+ viewBox: {
5597
+ top: number;
5598
+ left: number;
5599
+ width: number;
5600
+ height: number;
5601
+ };
5602
+ /**
5603
+ * A space or obstruction to associate this image with. If provided,
5604
+ * changes to the polygon's visibility will affect this image.
5605
+ * */
5606
+ polygonId?: string;
5607
+ };
5608
+ export type MIGeoJSONManifestCollection = FeatureCollection<Point, MIManifestProperties>;
5609
+ export type MIGeoJSONBuildingCollection = FeatureCollection<Polygon, MIBuildingProperties>;
5610
+ export type MIGeoJSONConnectionCollection = FeatureCollection<Point, MIConnectionProperties>;
5611
+ export type MIGeoJSONLevelCollection = FeatureCollection<Polygon | MultiPolygon, MILevelProperties>;
5612
+ export type MIGeoJSONSpaceCollection = FeatureCollection<Polygon, MISpaceProperties>;
5613
+ export type MIGeoJSONObstructionCollection = FeatureCollection<Polygon, MIObstructionProperties>;
5614
+ export type MIGeoJSONNodeCollection = FeatureCollection<Point, MINodeProperties>;
5615
+ export type MIGeoJSONLocationCollection = FeatureCollection<null, MILocationProperties>;
5616
+ export type MIGeoJSONCategoryCollection = FeatureCollection<null, MICategoryProperties>;
5617
+ export type WithIDs<T> = Map<string, T>;
5618
+ export type MIStyleCollection = MIStyle[];
5619
+ /**
5620
+ * A mapping of polygon IDs to style IDs;
5621
+ */
5622
+ export type MIPolygonStyle = {
5623
+ [key in string]: string;
5624
+ };
5625
+ export type MIImageInstanceCollection = MIImageInstance[];
5626
+ /**
5627
+ * The entire data collection for an MVF, in a single JSON collection.
5628
+ *
5629
+ */
5630
+ export type MVFDataJSON = {
5631
+ connection: WithIDs<MIGeoJSONConnectionCollection>;
5632
+ level: WithIDs<MIGeoJSONLevelCollection>;
5633
+ node: WithIDs<MIGeoJSONNodeCollection>;
5634
+ obstruction: WithIDs<MIGeoJSONObstructionCollection>;
5635
+ space: WithIDs<MIGeoJSONSpaceCollection>;
5636
+ building: MIGeoJSONBuildingCollection;
5637
+ category: MIGeoJSONCategoryCollection;
5638
+ style: MIStyleCollection;
5639
+ polygonStyle: WithIDs<MIPolygonStyle>;
5640
+ imageInstance: WithIDs<MIImageInstanceCollection>;
5641
+ location: MIGeoJSONLocationCollection;
5642
+ manifest: MIGeoJSONManifestCollection;
5643
+ };
5644
+ export type MVFData = MVFDataJSON & {
5645
+ imageBinaries: WithIDs<Uint8Array>;
5646
+ };
5647
+ export {};
4743
5648
  }
4744
5649
 
4745
5650
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocationRankings' {
@@ -4791,9 +5696,95 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinTheme
4791
5696
  }
4792
5697
  }
4793
5698
 
5699
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Analytics' {
5700
+ type AnalyticsOptions = {
5701
+ clientId?: string;
5702
+ clientSecret?: string;
5703
+ accessToken?: string;
5704
+ noAuth?: boolean;
5705
+ venue: string;
5706
+ testMode?: boolean | string;
5707
+ context?: string;
5708
+ platformString?: string;
5709
+ };
5710
+ /**
5711
+ * A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
5712
+ * 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`.
5713
+ *
5714
+ * @type {any}
5715
+ *
5716
+ * @class Analytics
5717
+ * @param options {Object} A list of configuration options for the Analytics API.
5718
+ * @param [options.clientId] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
5719
+ * @param [options.clientSecret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
5720
+ * @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
5721
+ * @param [options.context] {String} The context to pass with the analytics request. Defaults to "websdk".
5722
+ * @param [options.noAuth] {Boolean} Whether authentication should not be sent with analytics requests.
5723
+ * @param [options.testMode] {Boolean} Whether analytics events should be dropped because this is running in a test environment.
5724
+ */
5725
+ class Analytics {
5726
+ #private;
5727
+ constructor(options: AnalyticsOptions);
5728
+ track(target: any, query: any): void;
5729
+ /**
5730
+ * Whenever a location is selected, you should fire this event. What "selected" means can vary by venue,
5731
+ * but a good rule of thumb is that you fire the event whenever you would show the location's details.
5732
+ * Typically this is when the user taps it's polygon on the map, picks it from search results or a category list.
5733
+ * or deep links directly into the map.
5734
+ * @method locationSelected
5735
+ * @param location {MappedinLocation} The location the user selected.
5736
+ */
5737
+ locationSelected(location: any): void;
5738
+ /**
5739
+ * Whenever a category is selected, you should fire this event.
5740
+ * @method categorySelected
5741
+ * @param category {MappedinCategory} The category the user selected.
5742
+ */
5743
+ categorySelected(category: any): void;
5744
+ mapViewLoaded(type: any, forced: any, benchmark: any, reason: any): void;
5745
+ /**
5746
+ * Whenever a user requests directions, you should fire this event.
5747
+ * @method getDirections
5748
+ * @param start {MappedinLocation} The start location for wayfinding.
5749
+ * @param end {MappedinLocation} The end location for wayfinding.
5750
+ */
5751
+ getDirections(start: any, end: any): void;
5752
+ getSessionID(): string;
5753
+ getDeviceID(): string;
5754
+ /**
5755
+ * @param mode {Boolean} Indicates whether the user's geolocation is enabled.
5756
+ */
5757
+ setGeolocationMode(mode: any): void;
5758
+ /**
5759
+ * Track an event.
5760
+ * @method trackBlueDotEvent
5761
+ * @param event {String}
5762
+ * event param should be a property of the {{#crossLink "Analytics/BLUEDOT_EVENT:property"}}{{/crossLink}} property.
5763
+ */
5764
+ trackBlueDotEvent(blueDotEvent: any): void;
5765
+ trackSearch(searchAnalyticsObject: any): void;
5766
+ trackSearchSuggest(searchAnalyticsObject: any): void;
5767
+ /**
5768
+ * Enum of valid bluedot events.
5769
+ * Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method.
5770
+ * Valid properties are: ATTEMPT_BLUEDOT, FOUND_POSITION, FOUND_FLOOR.
5771
+ * @property BLUEDOT_EVENT {Object}
5772
+ * @example
5773
+ * Analytics.trackBlueDotEvent(Analytics.BLUEDOT_EVENT.ATTEMPT_BLUEDOT)
5774
+ */
5775
+ static BLUEDOT_EVENT: {
5776
+ ATTEMPT_BLUEDOT: string;
5777
+ FOUND_POSITION: string;
5778
+ FOUND_FLOOR: string;
5779
+ };
5780
+ }
5781
+ export default Analytics;
5782
+ }
5783
+
4794
5784
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider' {
4795
- import { ISmartCollisionEngine } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine';
5785
+ import SmartCollisionEngine from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine';
4796
5786
  import { Vector3 } from 'three';
5787
+ import { Rectangle } from '@mappedin/react-native-sdk/core/packages/renderer/internal/quad-tree';
4797
5788
  export type TRange = [number, number, number, number];
4798
5789
  type TCustomCollider<T> = ICollider & T;
4799
5790
  export type TColliderStrategyProps = {
@@ -4807,6 +5798,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4807
5798
  getBoundingBox: (TColliderStrategyProps: any) => TRange;
4808
5799
  onStrategySelected: (collider: TCustomCollider<any>) => void;
4809
5800
  };
5801
+ export type TGetBoundingBox = ({ x, y }: {
5802
+ x: any;
5803
+ y: any;
5804
+ }) => [number, number, number, number];
4810
5805
  export type TDimensions = {
4811
5806
  width: number;
4812
5807
  height: number;
@@ -4819,17 +5814,23 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4819
5814
  export interface ICollider {
4820
5815
  dimensions: TDimensions;
4821
5816
  screenPosition: [number, number];
4822
- currentStrategyName: string | null;
5817
+ getBoundingBoxForCurrentStrategy?: TGetBoundingBox;
4823
5818
  options?: Record<string, unknown>;
4824
5819
  mapId: string;
4825
5820
  visible: boolean;
4826
5821
  rank: number;
4827
- _dirty?: boolean;
4828
5822
  id: string;
5823
+ _bboxes?: [
5824
+ string,
5825
+ Rectangle,
5826
+ (collider: TCustomCollider<any>) => void,
5827
+ TGetBoundingBox
5828
+ ][];
5829
+ offscreen?: boolean;
4829
5830
  setAction: (action: EColliderAction) => void;
4830
5831
  action?: EColliderAction;
4831
5832
  position: Vector3;
4832
- __engine?: ISmartCollisionEngine;
5833
+ __engine?: SmartCollisionEngine;
4833
5834
  enable: () => void;
4834
5835
  disable: () => void;
4835
5836
  enabled: boolean;
@@ -4843,21 +5844,22 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4843
5844
  colliderDidGoOffscreen?: () => void;
4844
5845
  colliderDidGoOutsideGrid?: () => void;
4845
5846
  colliderDidUpdateVisiblity?: () => void;
4846
- colliderDidUpdatePosition?: (x: number, y: number) => void;
5847
+ colliderDidUpdatePosition?: (prop: [x: number, y: number]) => void;
4847
5848
  }
4848
5849
  class BaseCollider implements ICollider {
4849
5850
  __engine: any;
4850
5851
  _initialRank: number;
4851
5852
  screenPosition: [number, number];
4852
- currentStrategyName: null;
4853
5853
  enabled: boolean;
4854
5854
  options: any;
4855
5855
  mapId: string;
4856
5856
  id: string;
4857
5857
  action: EColliderAction;
5858
+ getBoundingBoxForCurrentStrategy: undefined;
4858
5859
  rank: number;
4859
5860
  visible: boolean;
4860
- position: Vector3;
5861
+ offscreen: boolean;
5862
+ position: any;
4861
5863
  dimensions: {
4862
5864
  width: number;
4863
5865
  height: number;
@@ -4873,7 +5875,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4873
5875
  removeSelf(): void;
4874
5876
  enable(): void;
4875
5877
  disable(): void;
4876
- colliderDidUpdatePosition(x: any, y: any): void;
5878
+ colliderDidUpdatePosition(pos: any): void;
4877
5879
  colliderDidNotFindAHome(): void;
4878
5880
  colliderDidMount(): void;
4879
5881
  colliderDidUpdateVisiblity(): void;
@@ -5096,6 +6098,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5096
6098
  contentEl: any;
5097
6099
  }
5098
6100
  class HTMLCollider extends BaseCollider {
6101
+ #private;
5099
6102
  contentEl: any;
5100
6103
  containerEl: any;
5101
6104
  removeSelf(): void;
@@ -5103,7 +6106,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5103
6106
  disable(): void;
5104
6107
  colliderDidGoOffscreen(): void;
5105
6108
  colliderDidNotFindAHome(): void;
5106
- colliderDidUpdatePosition(x: any, y: any): void;
6109
+ colliderDidUpdatePosition(pos: any): void;
6110
+ updateDimensions(): void;
6111
+ /**
6112
+ * @internal
6113
+ */
6114
+ updateDimensionsImmediately(): void;
5107
6115
  colliderDidMount(): void;
5108
6116
  colliderDidUpdateVisiblity(): void;
5109
6117
  }
@@ -5111,11 +6119,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5111
6119
  }
5112
6120
 
5113
6121
  declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSystem' {
5114
- import { Object3D, Raycaster } from 'three';
6122
+ import { Object3D } from 'three';
5115
6123
  import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer';
5116
6124
  import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
5117
6125
  import BlueDotManager from '@mappedin/react-native-sdk/core/packages/renderer/internal/blue-dot-manager';
5118
- export const raycaster: Raycaster;
6126
+ export const raycaster: any;
5119
6127
  class EventSystemLayer {
5120
6128
  mapView: MapView;
5121
6129
  core: ICore;
@@ -5158,7 +6166,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSy
5158
6166
  };
5159
6167
  hasTouched: boolean;
5160
6168
  calculateMouseCoordinates: (event: any) => void;
5161
- getMouseRayIntersects: (objects: Object3D | Object3D[]) => import("three").Intersection[];
6169
+ getMouseRayIntersects: (objects: Object3D | Object3D[]) => any;
5162
6170
  detectPolygonsUnderMouse: () => any[];
5163
6171
  getMouseMapPosition: () => {
5164
6172
  x: number;
@@ -5338,7 +6346,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5338
6346
  get strategies(): TColliderStrategy[];
5339
6347
  colliderDidMount(): void;
5340
6348
  setAction(action: any): void;
5341
- updateDimensions(): void;
6349
+ colliderDidNotFindAHome(): void;
5342
6350
  colliderDidGoOffscreen(): void;
5343
6351
  colliderDidUpdateVisiblity(): void;
5344
6352
  }
@@ -5346,6 +6354,15 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5346
6354
  }
5347
6355
 
5348
6356
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject' {
6357
+ export namespace TASK_PRIORITY {
6358
+ const VISIBLE_MAP_HIGH: number;
6359
+ const VISIBLE_MAP_LOW: number;
6360
+ const VISIBLE_MAP_MARKER: number;
6361
+ const ASYNC_MAP_HIGH: number;
6362
+ const ASYNC_MAP_LOW: number;
6363
+ const ASYNC_MAP_MARKER: number;
6364
+ const MAP_LOADED: number;
6365
+ }
5349
6366
  export const SCENE_FROM_LIVE_JSON: false;
5350
6367
  /**
5351
6368
  * A handle to a 3D marker added to a map.
@@ -5375,10 +6392,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5375
6392
  _started: boolean;
5376
6393
  _loaderPromise: null;
5377
6394
  _promiseResolve: null;
6395
+ hoverableMeshChildren: any[];
5378
6396
  objectsDictionary: {};
5379
6397
  north: null;
5380
6398
  mapScale: null;
5381
- object: Object3D;
6399
+ object: any;
5382
6400
  labels: Set<any>;
5383
6401
  tooltips: Set<any>;
5384
6402
  markers: Set<any>;
@@ -5395,6 +6413,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5395
6413
  loadAsync: any;
5396
6414
  _taskScheduler: any;
5397
6415
  id: any;
6416
+ mapRenderingStrategy: any;
5398
6417
  _highPriorityTasks: FrameTaskGroup;
5399
6418
  _lowPriorityTasks: FrameTaskGroup;
5400
6419
  _markerTasks: FrameTaskGroup;
@@ -5402,11 +6421,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5402
6421
  _visibilityLatch: boolean | null;
5403
6422
  _objLoadedComplete: boolean;
5404
6423
  _objLoaded(object: any): any;
6424
+ _objLoadedMerged(object: any): void;
5405
6425
  enableImageFlipping(polygonId: any, rotation: any): void;
5406
6426
  elements: any;
5407
6427
  boundingBox: {
5408
- min: Vector3;
5409
- max: Vector3;
6428
+ min: any;
6429
+ max: any;
5410
6430
  } | undefined;
5411
6431
  loadPolygonNow(polygonId: any): void;
5412
6432
  _addElementToScene(element: any): void;
@@ -5483,10 +6503,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5483
6503
  * @return {ThreeJSMarkerHandle} a unique identifier for the marker
5484
6504
  */
5485
6505
  addThreeJSMarker(options: {
5486
- object?: Object3D | undefined;
5487
- position?: Vector3 | undefined;
6506
+ object?: any;
6507
+ position?: any;
5488
6508
  rotation?: any;
5489
- scale?: Vector3 | undefined;
6509
+ scale?: any;
5490
6510
  }): ThreeJSMarkerHandle;
5491
6511
  /**
5492
6512
  * Remove the given `ThreeJSMarker` from this map.
@@ -5518,9 +6538,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5518
6538
  _popinChildObjects(): void;
5519
6539
  }
5520
6540
  import { PubSub } from "@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub";
5521
- import { Object3D } from "three/src/core/Object3D";
5522
- import { FrameTaskGroup } from "@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.TaskScheduler";
5523
- import { Vector3 } from "three/src/math/Vector3";
6541
+ import { FrameTaskGroup } from "@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.TaskScheduler";
5524
6542
  }
5525
6543
 
5526
6544
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search' {
@@ -5542,78 +6560,113 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5542
6560
  let Search: any;
5543
6561
  }
5544
6562
 
5545
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Analytics' {
5546
- export default Analytics;
5547
- /**
5548
- * A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
5549
- * 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`.
5550
- *
5551
- * @type {any}
5552
- *
5553
- * @class Analytics
5554
- * @param options {Object} A list of configuration options for the Analytics API.
5555
- * @param [options.key] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
5556
- * @param [options.secret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
5557
- * @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
5558
- */
5559
- var Analytics: any;
5560
- }
5561
-
5562
6563
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager' {
5563
- import { TextureLoader } from 'three';
6564
+ import { Texture } from 'three';
5564
6565
  import type { MappedinMap } from '@mappedin/react-native-sdk/core/packages/renderer';
5565
6566
  export default class DefaultAssetManager {
5566
- textureLoader: TextureLoader;
6567
+ textureLoader: any;
5567
6568
  loadMapPolygons(map: MappedinMap): Promise<any>;
5568
- loadImage(url: string): Promise<unknown>;
6569
+ loadImage(url: string): Promise<Texture>;
6570
+ }
6571
+ }
6572
+
6573
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/bundle-asset-manager' {
6574
+ import type { Texture } from 'three';
6575
+ import { Mappedin, MappedinMap } from '@mappedin/react-native-sdk/core/packages/renderer';
6576
+ import AssetManager from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager';
6577
+ export class BundleAssetManager extends AssetManager {
6578
+ venueData: Mappedin;
6579
+ constructor(venueData: Mappedin);
6580
+ loadMapPolygons(map: MappedinMap): Promise<Record<string, any>>;
6581
+ loadImage(url: string): Promise<Texture>;
5569
6582
  }
5570
6583
  }
5571
6584
 
5572
6585
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollisionEngine' {
5573
6586
  import { Vector3 } from 'three';
5574
6587
  import './Mappedin.SmartCollisionEngine.scss';
5575
- import { ICollider } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
6588
+ import { ICollider, TRange } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartCollider';
6589
+ import { MappedinMap, MapView } from '@mappedin/react-native-sdk/core/packages/renderer';
6590
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
6591
+ import { Rectangle, QuadTree } from '@mappedin/react-native-sdk/core/packages/renderer/internal/quad-tree';
5576
6592
  export const COLLIDER_STRATEGY_LOW_PRIORITY = "LOW_PRIORITY";
5577
- type TProjectFn = ({ position, mapId }: {
5578
- position: Vector3;
5579
- mapId: string;
5580
- }) => [number, number];
5581
- export interface ISmartCollisionEngine {
6593
+ class SmartCollisionEngine {
6594
+ #private;
6595
+ colliderCanvas: HTMLCanvasElement;
6596
+ debugCanvas: HTMLCanvasElement;
6597
+ colliderCanvasContext: CanvasRenderingContext2D;
6598
+ debugCanvasContext: CanvasRenderingContext2D;
6599
+ collisionEngineContainerEl: HTMLDivElement;
6600
+ stepsX: any;
6601
+ stepsY: any;
6602
+ totalWidth: any;
6603
+ totalHeight: any;
6604
+ project: any;
6605
+ colliders: Map<string, ICollider>;
6606
+ offscreenRanges: TRange[];
6607
+ get sortedColliders(): ICollider[];
6608
+ initialized: boolean;
6609
+ mapView: MapView;
6610
+ core: ICore;
6611
+ screen: Rectangle;
6612
+ constructor(mapView: any, core: ICore);
6613
+ init: (container: HTMLDivElement, projectFn: ({ position, mapId }: {
6614
+ position: any;
6615
+ mapId: MappedinMap['id'];
6616
+ }) => {
6617
+ x: number;
6618
+ y: number;
6619
+ }) => void;
6620
+ qtree: QuadTree;
6621
+ recompute: () => void;
6622
+ draw: () => void;
6623
+ reposition: () => void;
5582
6624
  add: (colliderId: string, collider: ICollider) => void;
5583
6625
  remove: (colliderId: string) => void;
5584
- init: (container: HTMLElement, projectFn: TProjectFn) => void;
5585
- resize: (container: HTMLElement) => void;
5586
- resort: () => void;
5587
- updatePosition: () => void;
5588
- updateVisibility: () => void;
5589
- makeCollidersDirty: () => void;
5590
6626
  update: () => void;
6627
+ resize: (container: any) => void;
5591
6628
  destroy: () => void;
5592
- makeCollidersDirtyThrottled: (time: number) => void;
5593
- _makeCollidersDirtyThrottled?: [() => void, number];
5594
6629
  }
5595
- const SmartCollisionEngine: () => ISmartCollisionEngine;
5596
6630
  export default SmartCollisionEngine;
5597
6631
  }
5598
6632
 
5599
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.TaskScheduler' {
5600
- export namespace UPDATE_ORDERING {
5601
- const BEFORE_CAMERA: number;
5602
- const CAMERA: number;
5603
- const AFTER_CAMERA: number;
5604
- const RENDER: number;
5605
- const AFTER_RENDER: number;
5606
- const AFTER_ALL_UPDATES: number;
6633
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/quad-tree' {
6634
+ export function contains(rect1: Rectangle, rect2: Rectangle): boolean;
6635
+ export function intersects(rect1: Rectangle, rect2: Rectangle): boolean;
6636
+ class Rectangle {
6637
+ x: number;
6638
+ y: number;
6639
+ w: number;
6640
+ h: number;
6641
+ userData?: any;
6642
+ constructor(x: number, y: number, w: number, h: number, userData?: any);
6643
+ contains(rectangle: Rectangle): boolean;
6644
+ intersects(rectangle: Rectangle): boolean;
6645
+ draw(context: CanvasRenderingContext2D): void;
5607
6646
  }
5608
- export namespace TASK_PRIORITY {
5609
- const VISIBLE_MAP_HIGH: number;
5610
- const VISIBLE_MAP_LOW: number;
5611
- const VISIBLE_MAP_MARKER: number;
5612
- const ASYNC_MAP_HIGH: number;
5613
- const ASYNC_MAP_LOW: number;
5614
- const ASYNC_MAP_MARKER: number;
5615
- const MAP_LOADED: number;
6647
+ class QuadTree {
6648
+ #private;
6649
+ boundary: Rectangle;
6650
+ capacity: number;
6651
+ objects: Rectangle[];
6652
+ topLeft: QuadTree;
6653
+ topRight: QuadTree;
6654
+ bottomLeft: QuadTree;
6655
+ bottomRight: QuadTree;
6656
+ divided: boolean;
6657
+ parent?: QuadTree;
6658
+ getSize(): any;
6659
+ constructor(boundary: Rectangle, parent?: QuadTree);
6660
+ subdivide(): void;
6661
+ query(rectangle: Rectangle): Rectangle[];
6662
+ insert(rectangle: Rectangle): boolean;
6663
+ drawObjects(context: CanvasRenderingContext2D): void;
6664
+ draw(context: CanvasRenderingContext2D): void;
5616
6665
  }
6666
+ export { QuadTree, Rectangle };
6667
+ }
6668
+
6669
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.TaskScheduler' {
5617
6670
  /**
5618
6671
  * A function that can be submitted to the Task Scheduler to run each frame for
5619
6672
  * some provided number of frames. A single update can be repeatedly submitted;
@@ -5647,22 +6700,22 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5647
6700
  * @param [options.userdata] {Any}
5648
6701
  * Arbitrary data that you can store along with this update.
5649
6702
  */
5650
- constructor(options?: {
5651
- callback?: Function | undefined;
5652
- frameCount?: number | undefined;
5653
- ordering?: number | undefined;
5654
- supersededBy?: [FrameUpdate] | undefined;
5655
- name?: string | undefined;
5656
- userdata?: any;
5657
- } | undefined);
5658
- _callback: Function | undefined;
6703
+ constructor(options: {
6704
+ callback: Function;
6705
+ frameCount?: number;
6706
+ ordering?: number;
6707
+ supersededBy?: Set<never>;
6708
+ name: string;
6709
+ userdata?: Record<string, any>;
6710
+ });
6711
+ _callback: Function;
5659
6712
  _frameCount: number;
5660
6713
  _ordering: number;
5661
- _supersededBy: Set<any>;
5662
- name: string | undefined;
5663
- userdata: any;
6714
+ _supersededBy: Set<never>;
6715
+ name: string;
5664
6716
  _remainingFrameCount: number;
5665
6717
  _lastFrameTime: number;
6718
+ userdata?: Record<string, any>;
5666
6719
  /**
5667
6720
  * Return the amount of time that this frame update took to execute during
5668
6721
  * its most recent execution, in milliseconds. If called during this frame
@@ -5702,24 +6755,25 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5702
6755
  * @param [options.userdata] {Any}
5703
6756
  * Arbitrary data that you can store along with this task.
5704
6757
  */
5705
- constructor(options?: {
5706
- callback?: Function | undefined;
5707
- group?: FrameTaskGroup | undefined;
5708
- priority?: number | undefined;
5709
- postponeOnAdd?: number | undefined;
5710
- name?: string | undefined;
5711
- userdata?: any;
5712
- } | undefined);
5713
- _callback: Function | undefined;
5714
- _group: FrameTaskGroup | null;
5715
- _priority: number;
6758
+ constructor(options: {
6759
+ userdata: Record<string, any>;
6760
+ priority: number;
6761
+ group?: FrameTaskGroup;
6762
+ postponeOnAdd: number | boolean;
6763
+ name: string;
6764
+ lastFrameTime: number;
6765
+ callback: Function;
6766
+ });
5716
6767
  _postponed: number | boolean;
5717
- name: string | undefined;
5718
- userdata: any;
6768
+ userdata: Record<string, any>;
6769
+ _priority: number;
6770
+ _group: FrameTaskGroup | null;
6771
+ name: string;
6772
+ _lastFrameTime: number;
6773
+ _callback: Function;
5719
6774
  _complete: boolean;
5720
6775
  _scheduled: boolean;
5721
6776
  _cancelled: boolean;
5722
- _lastFrameTime: number;
5723
6777
  /**
5724
6778
  * Return true if this task has been run at least once.
5725
6779
  *
@@ -5766,18 +6820,18 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5766
6820
  * @param [options.userdata] {Any}
5767
6821
  * Arbitrary data that you can store along with this task group.
5768
6822
  */
5769
- constructor(options?: {
5770
- onComplete?: Function | undefined;
5771
- priority?: number | undefined;
5772
- postponeOnAdd?: number | undefined;
5773
- name?: string | undefined;
5774
- userdata?: any;
5775
- } | undefined);
6823
+ constructor(options: {
6824
+ onComplete?: Function;
6825
+ priority?: number;
6826
+ userdata: Record<string, any>;
6827
+ postponeOnAdd: number | boolean;
6828
+ name: string;
6829
+ });
6830
+ _postponed: number | boolean;
5776
6831
  _onComplete: Function;
5777
6832
  _priority: number;
5778
- _postponed: number | boolean;
5779
- name: string | undefined;
5780
- userdata: any;
6833
+ userdata: Record<string, any>;
6834
+ name: string;
5781
6835
  _tasks: Set<any>;
5782
6836
  _scheduledTasks: Set<any>;
5783
6837
  _scheduled: boolean;
@@ -5796,13 +6850,22 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5796
6850
  * @method tasks
5797
6851
  * @return {[FrameTask]} list of tasks in this group
5798
6852
  */
5799
- getTasks(): [FrameTask];
6853
+ getTasks(): any[];
5800
6854
  /**
5801
6855
  * Empty this task group. This will trivially satisfy `isComplete`.
5802
6856
  *
5803
6857
  * @method clear
5804
6858
  */
5805
6859
  clear(): void;
6860
+ /**
6861
+ * Return one arbitrary incomplete task from this group, or undefined if
6862
+ * there are none.
6863
+ *
6864
+ * @method _popTask
6865
+ * @return {FrameTask} arbitrary scheduled task
6866
+ * @private
6867
+ */
6868
+ _popTask(): any;
5806
6869
  }
5807
6870
  /**
5808
6871
  * A timer for the task scheduler that uses real wall-time to determine if there's
@@ -5812,6 +6875,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5812
6875
  * @private
5813
6876
  */
5814
6877
  export class RealTimeTimer {
6878
+ _maxMillisecondsPerFrame: number;
6879
+ _time: number;
5815
6880
  /**
5816
6881
  * @constructor
5817
6882
  * @param [options] {Object} Options for the timer
@@ -5820,10 +6885,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5820
6885
  * or equal to this value, then another task may be executed
5821
6886
  */
5822
6887
  constructor(options?: {
5823
- maxMillisecondsPerFrame?: any;
5824
- } | undefined);
5825
- _maxMillisecondsPerFrame: any;
5826
- _time: any;
6888
+ maxMillisecondsPerFrame?: number;
6889
+ });
5827
6890
  /**
5828
6891
  * Begin timing a frame.
5829
6892
  *
@@ -5845,6 +6908,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5845
6908
  * @private
5846
6909
  */
5847
6910
  export class FixedTimer {
6911
+ _ticks: number;
6912
+ maxTasksPerFrame: number;
5848
6913
  /**
5849
6914
  * @constructor
5850
6915
  * @param [options] {Object} Options for the timer
@@ -5853,10 +6918,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5853
6918
  * Can be modified as the `maxTasksPerFrame` property on this boject.
5854
6919
  */
5855
6920
  constructor(options?: {
5856
- maxTasksPerFrame?: any;
5857
- } | undefined);
5858
- maxTasksPerFrame: any;
5859
- _ticks: number;
6921
+ maxTasksPerFrame?: number;
6922
+ });
5860
6923
  /**
5861
6924
  * Begin timing a frame.
5862
6925
  *
@@ -5900,11 +6963,11 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5900
6963
  * performance information.
5901
6964
  */
5902
6965
  constructor(options?: {
5903
- timer?: any;
5904
- performance?: any;
5905
- } | undefined);
5906
- _timer: any;
5907
- _performance: any;
6966
+ timer?: RealTimeTimer;
6967
+ performance?: boolean;
6968
+ });
6969
+ _timer: RealTimeTimer;
6970
+ _performance: boolean;
5908
6971
  _scheduledUpdatesByOrdering: Multimap;
5909
6972
  _scheduledTasksByPriority: Multimap;
5910
6973
  _postponedTasks: Set<any>;
@@ -5912,18 +6975,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5912
6975
  _updatesToRunThisFrame: any[];
5913
6976
  _lastFrameTime: number;
5914
6977
  _updatesRunLastFrame: Set<any>;
5915
- /**
5916
- * Run all scheduled updates, and re-schedule another animation frame if any
5917
- * scheduled updates still exist. If any scheduled update specifies
5918
- * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the
5919
- * frame time runs out.
5920
- *
5921
- * @method update
5922
- * @param timestamp {number} the current animation time, as returned from
5923
- * `performance.now()`; will be automatically filled in by
5924
- * `requestAnimationFrame` when it triggers this as a callback
5925
- */
5926
- update(timestamp: number): void;
5927
6978
  /**
5928
6979
  * Empty the task scheduler's queue. All tasks in it will be cancelled.
5929
6980
  *
@@ -5943,6 +6994,18 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5943
6994
  * @method requestAnimationFrame
5944
6995
  */
5945
6996
  requestAnimationFrame(): void;
6997
+ /**
6998
+ * Run all scheduled updates, and re-schedule another animation frame if any
6999
+ * scheduled updates still exist. If any scheduled update specifies
7000
+ * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the
7001
+ * frame time runs out.
7002
+ *
7003
+ * @method update
7004
+ * @param timestamp {number} the current animation time, as returned from
7005
+ * `performance.now()`; will be automatically filled in by
7006
+ * `requestAnimationFrame` when it triggers this as a callback
7007
+ */
7008
+ update(timestamp: number): void;
5946
7009
  /**
5947
7010
  * Execute all tasks that are currently pending, without regard for the
5948
7011
  * available frame time.
@@ -5967,7 +7030,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5967
7030
  * has not yet been run or if the scheduler has been cleared.
5968
7031
  */
5969
7032
  getUpdatesRunLastFrame(): Set<any>;
5970
- _executeOneTask(timestamp: any): void;
7033
+ _executeOneTask(timestamp: number): void;
5971
7034
  /**
5972
7035
  * Schedule an update to be run for the next `update.frameCount` frames. If
5973
7036
  * the update already exists in the scheduler, the update's frame count will
@@ -5977,7 +7040,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5977
7040
  * @method scheduleUpdate
5978
7041
  * @param task {FrameUpdate} the update to schedule
5979
7042
  */
5980
- scheduleUpdate(update: any): void;
7043
+ scheduleUpdate(update: FrameUpdate): void;
5981
7044
  /**
5982
7045
  * Schedule a task to be run during a frame update. This will also schedule
5983
7046
  * an animation frame to begin processing the task queue.
@@ -5992,7 +7055,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5992
7055
  * @method cancelUpdate
5993
7056
  * @param task {FrameUpdate} the update to cancel
5994
7057
  */
5995
- cancelUpdate(update: any): void;
7058
+ cancelUpdate(update: FrameUpdate): void;
5996
7059
  /**
5997
7060
  * If the given task or group is in the queue, remove it. Cancelling a
5998
7061
  * completed task is a no-op.
@@ -6003,7 +7066,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6003
7066
  * @method cancelTask
6004
7067
  * @param task {FrameTask or FrameTaskGroup} the task to cancel
6005
7068
  */
6006
- cancelTask(task: FrameTask): void;
7069
+ cancelTask(task: FrameTask | FrameTaskGroup): void;
6007
7070
  /**
6008
7071
  * Set the provided task or group not to run, until it's resumed using `resumeTask`.
6009
7072
  *
@@ -6013,7 +7076,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6013
7076
  * @method postponeTask
6014
7077
  * @param task {FrameTask or FrameTaskGroup} the task to postpone
6015
7078
  */
6016
- postponeTask(task: FrameTask): void;
7079
+ postponeTask(task: FrameTask | FrameTaskGroup): void;
6017
7080
  /**
6018
7081
  * Allow a postponed task or task group to resume processing. This will also
6019
7082
  * request an animation frame to allow the resumed task to be processed.
@@ -6024,7 +7087,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6024
7087
  * @method resumeTask
6025
7088
  * @param task {FrameTask or FrameTaskGroup} the task to resume
6026
7089
  */
6027
- resumeTask(task: FrameTask): void;
7090
+ resumeTask(task: FrameTask | FrameTaskGroup): void;
6028
7091
  /**
6029
7092
  * Change the priority of the given scheduled task or task group.
6030
7093
  *
@@ -6032,7 +7095,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6032
7095
  * @param task {FrameTask or FrameTaskGroup} the task whose priority will be changed
6033
7096
  * @param priority {number} the priority to assign the task
6034
7097
  */
6035
- setTaskPriority(task: FrameTask, priority: number): void;
7098
+ setTaskPriority(task: FrameTask | FrameTaskGroup, priority: number): void;
6036
7099
  }
6037
7100
  /**
6038
7101
  * A map that maps a numeric key to a set of values.
@@ -6043,6 +7106,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6043
7106
  * @private
6044
7107
  */
6045
7108
  class Multimap {
7109
+ /**
7110
+ * @method constructor
7111
+ */
7112
+ constructor();
6046
7113
  _map: Map<any, any>;
6047
7114
  _size: number;
6048
7115
  _sortedKeys: any[];
@@ -6102,7 +7169,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6102
7169
  * @method values
6103
7170
  * @return {Iterator} iterator over the values in the map
6104
7171
  */
6105
- values(): Iterator<any, any, undefined>;
7172
+ values(): {
7173
+ [Symbol.iterator]: () => any;
7174
+ next: () => any;
7175
+ };
6106
7176
  /**
6107
7177
  * A list of keys in this set, sorted by numeric value. Not cloned,
6108
7178
  * for efficiency's sake, so please don't mutate it.
@@ -6110,7 +7180,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
6110
7180
  * @method keys
6111
7181
  * @return {[number]} sorted list of numeric keys in the map
6112
7182
  */
6113
- keys(): [number];
7183
+ keys(): any[];
6114
7184
  /**
6115
7185
  * The number of elements in this multimap, equal to the sum of the sizes
6116
7186
  * of each key's set of values.