@mappedin/react-native-sdk 5.0.0-beta.1 → 5.0.0-beta.10

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,6 +5,7 @@
5
5
  // ../react-native-webview/lib/WebViewTypes
6
6
  // ../three
7
7
  // ../@tweenjs/tween.js
8
+ // ../minisearch
8
9
  // ../geojson
9
10
 
10
11
  declare module '@mappedin/react-native-sdk' {
@@ -14,19 +15,21 @@ declare module '@mappedin/react-native-sdk' {
14
15
  export type { TMiMiniMapProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap';
15
16
  export type { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
16
17
  export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
17
- export type { TGetVenueOptions, TGetVenueBundleOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
18
+ export type { TGetVenueOptions, TGetVenueBundleOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
18
19
  export { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
19
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';
20
21
  export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
21
22
  import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
22
- 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, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TAddFlatLabelOptions, TAddFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TCameraTargets, TCameraAnimationOptions, TCameraTransform, TBlueDotPositionUpdate, TBlueDotStateChange, CAMERA_EVENT_PAYLOAD, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
23
24
  export type { TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptionsBase };
24
- export type TEnableBlueDotOptions = Omit<TEnableBlueDotOptionsBase, 'positionUpdater' | 'geolocationSource'>;
25
+ export type TEnableBlueDotOptions = Omit<TEnableBlueDotOptionsBase, 'positionUpdater'>;
25
26
  export type TLabelAllLocationCommonOptions = Omit<TLabelAllLocationCommonOptionsBase, 'sortFunction' | 'translationMap'>;
26
- export type { IDirectionsResult, MappedinDirections, TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
27
- export type { TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
27
+ export type { TMapViewRNOptions, TCameraChange } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
28
+ export type { TMiMapViewVenueOptions } from '@mappedin/react-native-sdk/wrappers/common';
29
+ export type { IDirectionsResult, MappedinDirections, TMappedinDirective, IFlatLabels, TFlatLabelAllLocationsOptions, IFloatingLabels, TFloatingLabelAllLocationsOptions } 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';
28
31
  export { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
29
- 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';
32
+ export { BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet, E_CAMERA_DIRECTION, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
30
33
  }
31
34
 
32
35
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView' {
@@ -34,8 +37,9 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
34
37
  import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
35
38
  import { STATE } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
36
39
  import { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
37
- import type { TBlueDotPositionUpdate, TBlueDotStateChange, MappedinPolygon, MappedinMap, Mappedin, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
40
+ import type { TBlueDotPositionUpdate, TBlueDotStateChange, MappedinPolygon, MappedinMap, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
38
41
  import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
42
+ import { TCameraChange, 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,27 +48,15 @@ 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
- loadOptions?: {
54
- /**
55
- * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU
56
- * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY`
57
- */
58
- mapRenderStrategy?: MAP_RENDER_MODE;
59
- };
60
- };
51
+ options: TMiMapViewOptions & TMapViewRNOptions;
61
52
  /**
62
53
  * Venue Data to render inside the MapView. This is returned by {@link getVenue} or {@link getVenueBundle}
63
54
  */
64
55
  venueData?: Mappedin;
65
- style?: any;
56
+ style?: React.CSSProperties;
66
57
  /**
67
- * Called when an interactive polygon is clicked
58
+ * @deprecated
59
+ * Use onClick. Called when an interactive polygon is clicked
68
60
  */
69
61
  onPolygonClicked?: (prop: {
70
62
  polygon: MappedinPolygon;
@@ -81,6 +73,12 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
81
73
  onBlueDotPositionUpdated?: (prop: {
82
74
  update: TBlueDotPositionUpdate;
83
75
  }) => void;
76
+ /**
77
+ * Called when the camera is updated
78
+ */
79
+ onCameraChanged?: (prop: {
80
+ change: TCameraChange;
81
+ }) => void;
84
82
  /**
85
83
  * Called when data is loaded for this venue
86
84
  */
@@ -88,9 +86,21 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
88
86
  venueData: Mappedin;
89
87
  }) => void;
90
88
  /**
91
- * Called when clicking outside any interactive polygons
89
+ * @deprecated
90
+ * Use onClick. Called when clicking outside any interactive polygons
92
91
  */
93
92
  onNothingClicked?: () => void;
93
+ /**
94
+ * Called when the map is clicked. Payload contains the lat-lon of the click event, an array of interactive polygons that were clicked, and a flag indicating whether the click is likely above the blue dot.
95
+ */
96
+ onClick?: (prop: {
97
+ position: {
98
+ latitude: number;
99
+ longitude: number;
100
+ };
101
+ polygons: MappedinPolygon[];
102
+ nearBlueDot: boolean;
103
+ }) => void;
94
104
  /**
95
105
  * Called when the map is ready for interaction
96
106
  */
@@ -125,14 +135,13 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
125
135
  /**
126
136
  * @category Component
127
137
  */
128
- export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "style" | "options" | "onFirstMapLoaded" | "onDataLoaded" | "venueData" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onNothingClicked" | "onMapChanged" | "onStateChanged" | "onVenueLoadError"> & React.RefAttributes<MapViewStore>>>;
138
+ export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "onFirstMapLoaded" | "onDataLoaded" | "venueData" | "style" | "options" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onCameraChanged" | "onNothingClicked" | "onClick" | "onMapChanged" | "onStateChanged" | "onVenueLoadError"> & React.RefAttributes<MapViewStore>>>;
129
139
  }
130
140
 
131
141
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap' {
132
142
  import React from 'react';
133
143
  import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
134
- import { TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
135
- import type { MappedinLocation, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
144
+ import type { MappedinLocation, Mappedin, TFocusOnCameraOptions, TCameraAnimationOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
136
145
  import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
137
146
  export type TMiMiniMapProps = {
138
147
  /**
@@ -150,7 +159,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
150
159
  */
151
160
  venueData?: Mappedin;
152
161
  location: MappedinLocation['id'] | MappedinLocation;
153
- focusOptions?: TFocusOnOptions;
162
+ focusOptions?: TFocusOnCameraOptions & TCameraAnimationOptions;
154
163
  /**
155
164
  * Called if there's an error loading the minimap
156
165
  */
@@ -174,18 +183,15 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
174
183
  }
175
184
 
176
185
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store' {
186
+ import { IFlatLabels, IFloatingLabels, TGetPolygonsAtCoordinateOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
177
187
  import { RNMappedinController } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController';
178
- import { TReactNativeFlatLabelAllLocations, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelPolygonOptions, TReactNativeFloatingLabelPolygonOptions, TSerializableJourneyOptions } from '@mappedin/react-native-sdk/wrappers/common';
179
- import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TFocusOnOptions, TAnimatePositionOptions, TLabelAllLocationFloatingLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
180
- 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';
181
- import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
188
+ import { TReactNativeFlatLabelAllLocations, TReactNativeFlatLabelAllLocationsLegacy, TSerializableJourneyOptions } from '@mappedin/react-native-sdk/wrappers/common';
189
+ import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TLabelAllLocationFloatingLabelOptions, TMappedinOfflineSearchOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
190
+ import { STATE, Mappedin, MappedinNode, MappedinMap, MappedinLocation, MappedinDirections, MappedinCategory, MappedinPolygon, TGetVenueOptions, TShowVenueOptions, MappedinCoordinate, MappedinDestinationSet, TCreateMarkerOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
191
+ import { TCameraManager } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
182
192
  export class MapViewStore extends RNMappedinController {
183
193
  #private;
184
194
  state: STATE;
185
- /**
186
- * @deprecated Use BlueDot Events instead
187
- */
188
- BlueDotState: E_BLUEDOT_STATE;
189
195
  /**
190
196
  * @hidden
191
197
  */
@@ -198,12 +204,18 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
198
204
  /**
199
205
  * @hidden
200
206
  */
201
- loadVenue(options: TGetVenueOptions, showVenueOptions: TShowVenueOptions): Promise<unknown>;
207
+ loadVenue(options: TGetVenueOptions, showVenueOptions: TShowVenueOptions & {
208
+ prepareSearch?: boolean;
209
+ searchOptions?: TMappedinOfflineSearchOptions;
210
+ }): Promise<unknown>;
202
211
  /**
203
212
  *
204
213
  * @hidden
205
214
  */
206
- showVenue(venueData: Mappedin, showVenueOptions: TShowVenueOptions): Promise<unknown>;
215
+ showVenue(venueData: Mappedin, showVenueOptions: TShowVenueOptions & {
216
+ prepareSearch?: boolean;
217
+ searchOptions?: TMappedinOfflineSearchOptions;
218
+ }): Promise<unknown>;
207
219
  /**
208
220
  * Clear any cached venue bundles that were downloaded as part of LOAD_VENUE with useBundle: true
209
221
  * This ensure that the next time keys are passed in, we get a fresh bundle
@@ -229,7 +241,15 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
229
241
  /**
230
242
  * Set Polygon Color
231
243
  */
232
- setPolygonColor(polygonIdOrPolygon: MappedinPolygon['id'] | MappedinPolygon, color: string, opacity?: number, textColor?: string): Promise<unknown>;
244
+ setPolygonColor(
245
+ /**
246
+ * Polygon
247
+ */
248
+ polygon: MappedinPolygon,
249
+ /**
250
+ * Color to use
251
+ */
252
+ color: string): Promise<unknown>;
233
253
  /**
234
254
  * Clear Polygon Color
235
255
  */
@@ -246,6 +266,10 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
246
266
  * Remove all interactive polygons
247
267
  */
248
268
  removeAllInteractivePolygons(): Promise<unknown>;
269
+ /**
270
+ * Enables image flipping for a specific polygon
271
+ */
272
+ enableImageFlippingForPolygon(polygon: MappedinPolygon): Promise<unknown>;
249
273
  /**
250
274
  * Remove all paths
251
275
  */
@@ -258,92 +282,21 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
258
282
  * Gets the nearest node by screen coordinate
259
283
  */
260
284
  getNearestNodeByScreenCoordinates(x: number, y: number, mapIdOrMap?: MappedinMap['id'] | MappedinMap): Promise<MappedinNode | null | undefined>;
261
- labelAllLocations(options?: TLabelAllLocationFloatingLabelOptions): Promise<unknown>;
262
- labelAllLocations(options?: TReactNativeFlatLabelAllLocations | TReactNativeFlatLabelAllLocationsLegacy): Promise<unknown>;
263
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TReactNativeFloatingLabelPolygonOptions): Promise<unknown>;
264
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TReactNativeFlatLabelPolygonOptions): Promise<unknown>;
265
285
  /**
266
- * @param focusOptions You should provide at least one Node or Polygon, but everything else is optional.
267
- * @deprecated Use Camera.focusOn instead
286
+ * Label all polygons with locations either loaded via the API or passed in
287
+ * @deprecated Please use FloatingLabels.labelAllLocations or FlatLabels.labelAllLocations instead.
268
288
  */
269
- focusOn(focusOptions: TFocusOptionsLegacy): Promise<unknown>;
289
+ labelAllLocations(options?: TLabelAllLocationFloatingLabelOptions | TReactNativeFlatLabelAllLocations | TReactNativeFlatLabelAllLocationsLegacy): Promise<void>;
290
+ FlatLabels: IFlatLabels<Promise<void>>;
291
+ FloatingLabels: IFloatingLabels<Promise<void>>;
270
292
  /**
271
- * Padding - this is so that the map can be positioned on a portion of the screen
272
- * @deprecated Use Camera.setSafeAreaInsets instead
293
+ * Get all polygons that intersect with a specific coordinate.
273
294
  */
274
- setSafeArea(padding: {
275
- top: number;
276
- bottom: number;
277
- left: number;
278
- right: number;
279
- }): void;
280
- /**
281
- V3 Camera controls interface
282
- */
283
- CameraControls: {
284
- /**
285
- * The current tilt in radians from top-down view.
286
- * @deprecated Use CameraControls.tilt instead
287
- */
288
- tilt: number;
289
- /**
290
- * @param tilt The new value to set the tilt to, in radians from top-down view.
291
- * @deprecated Use CameraControls.setTilt instead
292
- */
293
- setTilt: (tilt: number) => Promise<undefined>;
294
- /**
295
- * The current rotation in radians from north.
296
- * @deprecated Use CameraControls.rotation instead
297
- */
298
- rotation: number;
299
- /**
300
- * @param rotation The new value to set the rotation to, in radians from north..
301
- * @deprecated Use CameraControls.setRotation instead
302
- */
303
- setRotation: (rotation: number) => Promise<undefined>;
304
- };
295
+ getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): Promise<MappedinPolygon[]>;
305
296
  /**
306
297
  Camera controls interface
307
298
  */
308
- Camera: {
309
- /**
310
- * The current tilt in radians from top-down view.
311
- */
312
- tilt: number;
313
- /**
314
- * Set Camera options immediately
315
- */
316
- set: (positionOptions?: TAnimatePositionOptions | undefined) => Promise<unknown>;
317
- /**
318
- * The current rotation in radians from north.
319
- */
320
- rotation: number;
321
- /**
322
- * @param focusOptions You should provide at least one Node or Polygon, but everything else is optional.
323
- */
324
- focusOn(focusOptions: TFocusOnOptions & {
325
- animationOptions?: TAnimatePositionOptions;
326
- }): Promise<unknown>;
327
- /**
328
- * This is so that the map can be positioned on a portion of the screen, (example padding)
329
- */
330
- setSafeAreaInsets: (safeAreaInsets: {
331
- top: number;
332
- bottom: number;
333
- left: number;
334
- right: number;
335
- }) => void;
336
- };
337
- /**
338
- * Visualize directions by drawing paths, and adding connection markers
339
- * @deprecated Use {@link MapViewStore.Journey}'s draw method instead
340
- */
341
- drawJourney(directions: MappedinDirections | MappedinDirections[], options?: TSerializableJourneyOptions): Promise<unknown>;
342
- /**
343
- * Remove any paths and markers associated with journey
344
- * @deprecated Use mapView.Journey.clear instead
345
- */
346
- clearJourney(): Promise<unknown>;
299
+ Camera: TCameraManager;
347
300
  /**
348
301
  * Journey management interface
349
302
  */
@@ -392,6 +345,32 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
392
345
  * Draw a path based on a list of Nodes
393
346
  */
394
347
  drawPath(pathNodesOrNodeIds: (MappedinNode | MappedinNode['id'])[], pathOptions: TPathOptions): Promise<unknown>;
348
+ OfflineSearch: {
349
+ /**
350
+ *
351
+ * @param query String to search for
352
+ */
353
+ search: (query: string) => Promise<TMappedinOfflineSearchResult[]>;
354
+ /**
355
+ *
356
+ * @param query Get a list of suggestions for query
357
+ */
358
+ suggest: (query: string) => Promise<TMappedinOfflineSearchSuggestions>;
359
+ addQuery: (params: {
360
+ /**
361
+ * Query string to match for this object
362
+ */
363
+ query: string;
364
+ /**
365
+ * Object that is returned when query matches
366
+ */
367
+ object: MappedinLocation | MappedinCategory | Record<string, unknown>;
368
+ /**
369
+ * Optional weight to multiply by the score
370
+ */
371
+ weight?: number;
372
+ }) => Promise<unknown>;
373
+ };
395
374
  /**
396
375
  * @hidden
397
376
  */
@@ -401,17 +380,19 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
401
380
 
402
381
  declare module '@mappedin/react-native-sdk/core/packages/renderer/index.rn' {
403
382
  import { getVenue, getVenueBundle, Mappedin, MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/get-venue';
383
+ import { randomId } from '@mappedin/react-native-sdk/core/common/random-id';
404
384
  export * from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
405
- export { getVenue, getVenueBundle, MappedinDestinationSet, Mappedin };
406
- export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
385
+ export { getVenue, getVenueBundle, MappedinDestinationSet, Mappedin, randomId };
386
+ export { GEOLOCATION_STATUS, COLLISION_RANKING_TIERS, E_BLUEDOT_STATE_REASON, E_BLUEDOT_STATE, E_BLUEDOT_MARKER_STATE, STATE, MARKER_ANCHOR, E_SDK_EVENT, E_BLUEDOT_EVENT, E_CAMERA_EVENT, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
407
387
  export { labelThemes } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
408
- 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';
388
+ export type { IFlatLabels } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.FlatLabels';
389
+ export type { IFloatingLabels } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.FloatingLabels';
390
+ export type { TBlueDotPositionUpdate, TBlueDotStateChange, TJourneyOptions, TMapViewOptions, TCreateMarkerOptions, TGeolocationObject, TPathOptions, TFlatLabelOptions, TAddFloatingLabelOptions, TAddFlatLabelOptions, TLabelAllLocationCommonOptions, TFloatingLabelAllLocationsOptions, TFlatLabelAllLocationsOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TEnableBlueDotOptions, TFloatingLabelAppearance, TFlatLabelAppearance, CAMERA_EVENT_PAYLOAD, TGetPolygonsAtCoordinateOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
409
391
  export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator';
410
392
  export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
411
- export type { TGetVenueBundleOptions, TGetVenueOptions, TMappedinDirective, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
412
- export { MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinDirections, MappedinNavigatable, MappedinCoordinate, MappedinRankings, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
413
- export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
414
- export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
393
+ export type { TGetVenueBundleOptions, TGetVenueOptions, TMappedinDirective, TShowVenueOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch } from '@mappedin/react-native-sdk/core/packages/get-venue';
394
+ 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';
395
+ export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraAnimationOptions } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
415
396
  }
416
397
 
417
398
  declare module '@mappedin/react-native-sdk/wrappers/common' {
@@ -421,6 +402,77 @@ declare module '@mappedin/react-native-sdk/wrappers/common' {
421
402
  export { PubSub } from '@mappedin/react-native-sdk/wrappers/common/pub-sub';
422
403
  }
423
404
 
405
+ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types' {
406
+ import { MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
407
+ import { MappedinCoordinate, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
408
+ import type { MappedinCategory, MappedinLocation, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult } from '@mappedin/react-native-sdk/core/packages/get-venue';
409
+ import { CAMERA_EVENT_PAYLOAD, E_CAMERA_EVENT, E_CAMERA_DIRECTION, TCameraTransform, TCameraTargets, TFocusOnCameraOptions, TCameraAnimationOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
410
+ import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
411
+ export type TPolygonColorOptions = {
412
+ color: string;
413
+ opacity?: number;
414
+ textColor?: string;
415
+ };
416
+ export type { TFocusOptionsLegacy };
417
+ export type TFocusOptionsLegacySerializable = Omit<TFocusOptionsLegacy, 'nodes' | 'polygons'> & {
418
+ nodes: (MappedinNode | MappedinNode['id'])[];
419
+ polygons: (MappedinPolygon['id'] | MappedinPolygon)[];
420
+ };
421
+ export type TMapViewRNOptions = {
422
+ /**
423
+ * Use a bundle for venue loading and cache it for faster subsequent loading
424
+ * @beta
425
+ */
426
+ useBundle?: boolean;
427
+ loadOptions?: {
428
+ /**
429
+ * By default, the SDK will merge all geometries by material to reduce the number of draw calls to the GPU
430
+ * To rever back to using a single geometry for every polygon, pass `MAP_RENDER_MODE.MULTI_GEOMETRY`
431
+ */
432
+ mapRenderStrategy?: MAP_RENDER_MODE;
433
+ };
434
+ /**
435
+ * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs.
436
+ * @default false
437
+ */
438
+ prepareSearch?: boolean;
439
+ /**
440
+ * Customize search weights
441
+ */
442
+ searchOptions?: TMappedinOfflineSearchOptions;
443
+ };
444
+ export type TMappedinOfflineSearchBridgeResult = Omit<TMappedinOfflineSearchResult, 'object'> & {
445
+ object: {
446
+ type: 'MappedinLocation' | 'MappedinCategory' | 'Custom';
447
+ id: string;
448
+ };
449
+ };
450
+ export type TMappedinCustomSearchObject = MappedinLocation | MappedinCategory | Record<string, unknown>;
451
+ /**
452
+ * Camera changed payload
453
+ */
454
+ export type TCameraChange = CAMERA_EVENT_PAYLOAD[E_CAMERA_EVENT.CHANGED];
455
+ export type TCameraManager = {
456
+ position?: MappedinCoordinate;
457
+ tilt: number;
458
+ zoom: number;
459
+ rotation: number;
460
+ set: (positionOptions: TCameraTransform) => Promise<unknown>;
461
+ focusOn: (targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions) => Promise<unknown>;
462
+ animate: (config: TCameraTransform, options?: TCameraAnimationOptions) => Promise<unknown>;
463
+ translate: (direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions) => Promise<unknown>;
464
+ setMaxTilt: (radians: number) => Promise<unknown>;
465
+ setMinZoom: (meters: number) => Promise<unknown>;
466
+ setMaxZoom: (meters: number) => Promise<unknown>;
467
+ setSafeAreaInsets: (safeAreaInsets: {
468
+ top: number;
469
+ bottom: number;
470
+ left: number;
471
+ right: number;
472
+ }) => void;
473
+ };
474
+ }
475
+
424
476
  declare module '@mappedin/react-native-sdk/wrappers/common/errors' {
425
477
  export enum ERROR {
426
478
  LOAD_VENUE_FAILED = "LOAD_VENUE_FAILED",
@@ -442,19 +494,21 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' {
442
494
  export type { TMiMiniMapProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap';
443
495
  export type { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
444
496
  export { getVenue, getVenueBundle } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
445
- export type { TGetVenueOptions, TGetVenueBundleOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
497
+ export type { TGetVenueOptions, TGetVenueBundleOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchAllOptions, TMappedinOfflineAllSearchMatch } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
446
498
  export { STATE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
447
499
  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';
448
500
  export type { TSerializableJourneyOptions, TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
449
501
  import type { TEnableBlueDotOptions as TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptions as TLabelAllLocationCommonOptionsBase } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
450
- 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';
502
+ export type { TJourneyOptions, TGeolocationObject, TPathOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TAddFlatLabelOptions, TAddFloatingLabelOptions, TFlatLabelAppearance, TFloatingLabelAppearance, TFocusOnCameraOptions, TCameraTargets, TCameraAnimationOptions, TCameraTransform, TBlueDotPositionUpdate, TBlueDotStateChange, CAMERA_EVENT_PAYLOAD, E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
451
503
  export type { TEnableBlueDotOptionsBase, TLabelAllLocationCommonOptionsBase };
452
- export type TEnableBlueDotOptions = Omit<TEnableBlueDotOptionsBase, 'positionUpdater' | 'geolocationSource'>;
504
+ export type TEnableBlueDotOptions = Omit<TEnableBlueDotOptionsBase, 'positionUpdater'>;
453
505
  export type TLabelAllLocationCommonOptions = Omit<TLabelAllLocationCommonOptionsBase, 'sortFunction' | 'translationMap'>;
454
- export type { IDirectionsResult, MappedinDirections, TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
455
- export type { TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
506
+ export type { TMapViewRNOptions, TCameraChange } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
507
+ export type { TMiMapViewVenueOptions } from '@mappedin/react-native-sdk/wrappers/common';
508
+ export type { IDirectionsResult, MappedinDirections, TMappedinDirective, IFlatLabels, TFlatLabelAllLocationsOptions, IFloatingLabels, TFloatingLabelAllLocationsOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
509
+ export type { TShowVenueOptions, E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
456
510
  export { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
457
- 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';
511
+ export { BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet, E_CAMERA_DIRECTION, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
458
512
  }
459
513
 
460
514
  declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MappedinController' {
@@ -501,24 +555,22 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/Mappedi
501
555
  }
502
556
  }
503
557
 
504
- declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types' {
505
- import { MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
506
- import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
507
- export type TPolygonColorOptions = {
508
- color: string;
509
- opacity?: number;
510
- textColor?: string;
511
- };
512
- export type { TFocusOptionsLegacy };
513
- export type TFocusOptionsLegacySerializable = Omit<TFocusOptionsLegacy, 'nodes' | 'polygons'> & {
514
- nodes: (MappedinNode | MappedinNode['id'])[];
515
- polygons: (MappedinPolygon['id'] | MappedinPolygon)[];
516
- };
517
- }
518
-
519
558
  declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
520
559
  import type { TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
521
560
  import { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
561
+ /**
562
+ * This is how we can avoid bundling in node-fetch (via isomorphic fetch),
563
+ * which keeps popping up in security advisories
564
+ * This is a pattern that most isomorphic libraries appear to use,
565
+ * where when running in node, you can pass your own fetch function
566
+ * as one is not provided by Node.js.
567
+ *
568
+ */
569
+ export function isomorphicFetch(): Window['fetch'];
570
+ /**
571
+ * Overwrite the internal `fetch` function with your own. Typically for use in Node.js and Jest
572
+ */
573
+ export function setFetchFn(fetchFn: any): void;
522
574
  /** Classes */
523
575
  export { Mappedin, MappedinCollectionType } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
524
576
  export { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
@@ -539,7 +591,10 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
539
591
  export type { TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinDirections';
540
592
  export type { IDirectionsResult } from '@mappedin/react-native-sdk/core/packages/navigator';
541
593
  export type { TOperationHoursMap } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
594
+ export type { TMappedinCoordinateOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoordinate';
542
595
  export type { TDirectionToOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavigatable';
596
+ export { OfflineSearch } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.OfflineSearch';
597
+ export type { TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.OfflineSearch';
543
598
  /** API data types */
544
599
  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';
545
600
  export type { TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.types';
@@ -572,11 +627,18 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
572
627
  };
573
628
  };
574
629
  export { MAP_RENDER_MODE };
630
+ /**
631
+ * @internal
632
+ */
575
633
  export function getVenueMVF(userOptions: TGetVenueBundleOptions): Promise<Mappedin>;
576
634
  /**
577
635
  * Get Venue Data for a Mappedin Venue
578
636
  */
579
637
  export function getVenue(userOptions: TGetVenueOptions): Promise<Mappedin>;
638
+ /**
639
+ * @internal
640
+ */
641
+ export function __setGetVenueMock(fn: any): void;
580
642
  export type TGetVenueBundleOptions = TGetVenueOptions & {
581
643
  bundleBaseUri?: string;
582
644
  version?: string;
@@ -628,6 +690,14 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue' {
628
690
  useWorker?: boolean): Promise<unknown>;
629
691
  }
630
692
 
693
+ declare module '@mappedin/react-native-sdk/core/common/random-id' {
694
+ /**
695
+ * Returns a UUIDv4-like ID without relying on a CSPRNG as we don't need it for these purposes.
696
+ * @hidden
697
+ */
698
+ export const randomId: () => string;
699
+ }
700
+
631
701
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums' {
632
702
  export enum GEOLOCATION_STATUS {
633
703
  SUCCESS = 0
@@ -736,11 +806,13 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
736
806
  */
737
807
  STATE_CHANGE = "STATE_CHANGE",
738
808
  /**
739
- * Emitted when an interactive {@link MappedinPolygon | polygon} is clicked
809
+ * @deprecated
810
+ * Use E_SDK_EVENT.CLICK instead. Emitted when an interactive {@link MappedinPolygon | polygon} is clicked
740
811
  */
741
812
  POLYGON_CLICKED = "POLYGON_CLICKED",
742
813
  /**
743
- * Emitted when nothing (outside of interactive polygons) is clicked
814
+ * @deprecated
815
+ * Use E_SDK_EVENT.CLICK instead. Emitted when nothing (outside of interactive polygons) is clicked
744
816
  */
745
817
  NOTHING_CLICKED = "NOTHING_CLICKED",
746
818
  /**
@@ -755,17 +827,54 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums'
755
827
  export enum E_CAMERA_EVENT {
756
828
  USER_INTERACTION_START = "USER_INTERACTION_START",
757
829
  USER_INTERACTION_END = "USER_INTERACTION_END",
758
- /** @private */
759
- POSITION_CHANGED = "POSITION_CHANGED",
830
+ /**
831
+ * @deprecated Use E_CAMERA_EVENT.CHANGED instead
832
+ */
760
833
  ZOOM_CHANGED = "ZOOM_CHANGED",
834
+ /**
835
+ * @deprecated Use E_CAMERA_EVENT.CHANGED instead
836
+ */
761
837
  ROTATION_CHANGED = "ROTATION_CHANGED",
762
- TILT_CHANGED = "TILT_CHANGED"
838
+ /**
839
+ * @deprecated Use E_CAMERA_EVENT.CHANGED instead
840
+ */
841
+ TILT_CHANGED = "TILT_CHANGED",
842
+ /**
843
+ * @deprecated Use E_CAMERA_EVENT.CHANGED instead
844
+ */
845
+ POSITION_CHANGED = "POSITION_CHANGED",
846
+ /**
847
+ * Fires when camera state changes, including position, tilt, zoom and rotation
848
+ */
849
+ CHANGED = "CHANGED"
763
850
  }
764
851
  export { MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
852
+ export enum E_CAMERA_DIRECTION {
853
+ UP = "up",
854
+ DOWN = "down",
855
+ LEFT = "left",
856
+ RIGHT = "right"
857
+ }
858
+ export enum SAFE_AREA_INSET_TYPE {
859
+ PIXELS = "pixels",
860
+ PORTIONS = "portions"
861
+ }
862
+ export const ANIMATION_TWEENS: {
863
+ linear: any;
864
+ 'ease-in': any;
865
+ 'ease-out': any;
866
+ 'ease-in-out': any;
867
+ };
868
+ export enum CAMERA_EASING_MODE {
869
+ LINEAR = "linear",
870
+ EASE_IN = "ease-in",
871
+ EASE_OUT = "ease-out",
872
+ EASE_IN_OUT = "ease-in-out"
873
+ }
765
874
  }
766
875
 
767
876
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types' {
768
- import { Mappedin, MappedinLocation, MappedinMap, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
877
+ import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
769
878
  import { TFloatingLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel';
770
879
  import { TEnableBlueDotOptions } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
771
880
  import { TBlueDotPositionUpdate, TBlueDotStateChange } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
@@ -810,12 +919,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
810
919
  * @defaultValue 750
811
920
  */
812
921
  pulsePauseDuration?: number;
813
- /**
814
- * (Deprecated) alias for `nearRadius`ty
815
- * @defaultValue 1.8
816
- * @deprecated
817
- */
818
- radius?: number;
819
922
  /**
820
923
  * Radius of path at nearest zoom, in metres
821
924
  * @defaultValue 1.8
@@ -880,7 +983,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
880
983
  icon: string;
881
984
  location?: MappedinLocation;
882
985
  };
883
- export type TMarkerTemplateFn = ({ icon: string, location: MappedinLocation }: TMarkerTemplateProps) => string;
986
+ export type TMarkerTemplateFn = ({ icon, location }: TMarkerTemplateProps) => string;
884
987
  export type TJourneyOptions = {
885
988
  /**
886
989
  * What color to highlight departure and destination polygons
@@ -1040,6 +1143,13 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1040
1143
  */
1041
1144
  scale?: Vector3;
1042
1145
  };
1146
+ export type TGetPolygonsAtCoordinateOptions = {
1147
+ /**
1148
+ * Specifies whether polygons that cannot be interacted with should be
1149
+ * included in the results. Default is `false`.
1150
+ */
1151
+ includeNonInteractive?: boolean;
1152
+ };
1043
1153
  export type TMapViewOptions = {
1044
1154
  /**
1045
1155
  * Background color of the map in hex number or string e.g. `0x2e2e2e` or `#2e2e2e`.
@@ -1141,28 +1251,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1141
1251
  onWebGLContextLost?: () => void;
1142
1252
  onWebGLContextRestored?: () => void;
1143
1253
  onWebGLRendererError?: () => void;
1144
- /**
1145
- * @hidden
1146
- * @deprecated
1147
- */
1148
- outdoorContext?: boolean;
1149
1254
  };
1150
- export type TCommonLabelOptions = {
1151
- /**
1152
- * The full name text to use for the label.
1153
- */
1255
+ export type TFlatLabelOptions = {
1154
1256
  text: string;
1155
- /**
1156
- * The short name text to use for the label.
1157
- */
1158
- shortText?: string;
1159
- /**
1160
- * If Polygon is not set, this will let you add a TextLabel to another Map. Otherwise, it will use the {@link currentMap}
1161
- */
1162
- map?: MappedinMap | string;
1163
- };
1164
- export type TFlatLabelOptions = TCommonLabelOptions & {
1165
- flatLabels: true;
1166
1257
  /**
1167
1258
  * Set this if you want to label an arbitrary part of the Map. You will need to specify height as well.
1168
1259
  */
@@ -1224,9 +1315,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1224
1315
  */
1225
1316
  scaleStep?: number;
1226
1317
  };
1227
- export type TFloatingLabelPolygonOptions = TCommonLabelOptions & {
1318
+ export type TFloatingLabelPolygonOptions = {
1319
+ text: string;
1228
1320
  scale?: number;
1229
- flatLabels?: false | undefined;
1230
1321
  /**
1231
1322
  * Ranking tier to determine how likely a {@link FloatingLabel} will appear
1232
1323
  */
@@ -1236,13 +1327,14 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1236
1327
  */
1237
1328
  appearance?: TFloatingLabelAppearance;
1238
1329
  };
1239
- export type TFlatLabelPolygonOptions = TCommonLabelOptions & {
1240
- flatLabels?: true;
1241
- /**
1242
- * Customize the appearance of the Flat Labels
1243
- */
1330
+ export type TAddFlatLabelOptions = {
1244
1331
  appearance?: TFlatLabelAppearance;
1245
1332
  };
1333
+ export type TAddFloatingLabelOptions = {
1334
+ scale?: number;
1335
+ rank?: COLLISION_RANKING_TIERS | number;
1336
+ appearance?: TFloatingLabelAppearance;
1337
+ };
1246
1338
  export type TLabelAllLocationCommonOptions = {
1247
1339
  /**
1248
1340
  * Exclude specific location types from labeling
@@ -1268,6 +1360,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1268
1360
  */
1269
1361
  createDespiteImage?: boolean;
1270
1362
  };
1363
+ /**
1364
+ * @deprecated
1365
+ */
1271
1366
  export type TLabelAllLocationFloatingLabelOptions = TLabelAllLocationCommonOptions & {
1272
1367
  /**
1273
1368
  * Use Flat Labels
@@ -1279,6 +1374,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1279
1374
  */
1280
1375
  appearance?: TFloatingLabelAppearance;
1281
1376
  };
1377
+ /**
1378
+ * @deprecated
1379
+ */
1282
1380
  export type TLabelAllLocationFlatLabelOptions = TLabelAllLocationCommonOptions & {
1283
1381
  /**
1284
1382
  * Use Flat Labels
@@ -1287,6 +1385,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1287
1385
  flatLabels: true;
1288
1386
  appearance?: TFlatLabelAppearance;
1289
1387
  };
1388
+ export type TFloatingLabelAllLocationsOptions = TLabelAllLocationCommonOptions & {
1389
+ appearance?: TFloatingLabelAppearance;
1390
+ };
1391
+ export type TFlatLabelAllLocationsOptions = TLabelAllLocationCommonOptions & {
1392
+ appearance?: TFlatLabelAppearance;
1393
+ };
1290
1394
  export type changeListenerFn<PAYLOAD> = (update: PAYLOAD) => void;
1291
1395
  export type TMapClickEvent = {
1292
1396
  /**
@@ -1329,13 +1433,27 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1329
1433
  export type CAMERA_EVENT_PAYLOAD = {
1330
1434
  [E_CAMERA_EVENT.USER_INTERACTION_START]: void;
1331
1435
  [E_CAMERA_EVENT.USER_INTERACTION_END]: void;
1332
- /** @private */
1333
- [E_CAMERA_EVENT.POSITION_CHANGED]: {
1334
- x: number;
1335
- y: number;
1436
+ [E_CAMERA_EVENT.CHANGED]: {
1437
+ tilt: number;
1438
+ position: MappedinCoordinate;
1439
+ zoom: number;
1440
+ rotation: number;
1336
1441
  };
1442
+ /**
1443
+ * @deprecated Use E_CAMERA_EVENT.CHANGED instead
1444
+ */
1445
+ [E_CAMERA_EVENT.POSITION_CHANGED]: MappedinCoordinate;
1446
+ /**
1447
+ * @deprecated Use E_CAMERA_EVENT.CHANGED instead
1448
+ */
1337
1449
  [E_CAMERA_EVENT.ZOOM_CHANGED]: number;
1450
+ /**
1451
+ * @deprecated Use E_CAMERA_EVENT.CHANGED instead
1452
+ */
1338
1453
  [E_CAMERA_EVENT.ROTATION_CHANGED]: number;
1454
+ /**
1455
+ * @deprecated Use E_CAMERA_EVENT.CHANGED instead
1456
+ */
1339
1457
  [E_CAMERA_EVENT.TILT_CHANGED]: number;
1340
1458
  };
1341
1459
  export type { default as BlueDotLayer } from '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot';
@@ -1344,26 +1462,112 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.types'
1344
1462
  export type { default as TFloatingLabel } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel';
1345
1463
  }
1346
1464
 
1347
- declare module '@mappedin/react-native-sdk/core/packages/navigator' {
1348
- import NavigationGraph from '@mappedin/react-native-sdk/core/packages/navigator/NavigationGraph';
1349
- import Navigator from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1350
- export { ACTION_TYPE, BEARING_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator/Directive';
1351
- export { Navigator, NavigationGraph };
1352
- export type { IDirectionsResult } from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1353
- export { E_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1465
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.FlatLabels' {
1466
+ import { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
1467
+ import FlatLabelController from '@mappedin/react-native-sdk/core/packages/renderer/layers/Labels/FlatLabelsController';
1468
+ import { TFlatLabelAllLocationsOptions, TAddFlatLabelOptions, TFlatLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
1469
+ export interface IFlatLabels<T = void> {
1470
+ /**
1471
+ * Adds a flat label to the polygons associated with all locations on the venue.
1472
+ * The text is automatically determined based on location data.
1473
+ */
1474
+ labelAllLocations(options?: TFlatLabelAllLocationsOptions): T;
1475
+ /**
1476
+ * Adds a flat label to a single polygon.
1477
+ */
1478
+ add(polygon: MappedinPolygon, text: string, options?: TAddFlatLabelOptions): T;
1479
+ /**
1480
+ * Removes a flat label from a single polygon.
1481
+ */
1482
+ remove(polygon: MappedinPolygon): T;
1483
+ /**
1484
+ * Removes all flat labels from the venue.
1485
+ */
1486
+ removeAll(): T;
1487
+ /**
1488
+ * Updates the appearance attributes of an already-existing label. If the
1489
+ * provided polygon does not have a label already, this is a no-op.
1490
+ */
1491
+ setAppearance(polygon: MappedinPolygon, appearance: TFlatLabelAppearance): T;
1492
+ }
1493
+ export class FlatLabels implements IFlatLabels {
1494
+ #private;
1495
+ /**
1496
+ * @hidden
1497
+ */
1498
+ constructor(controller: FlatLabelController);
1499
+ labelAllLocations(options?: TFlatLabelAllLocationsOptions): void;
1500
+ add(polygon: MappedinPolygon, text: string, options?: TAddFlatLabelOptions): void;
1501
+ remove(polygon: MappedinPolygon): void;
1502
+ removeAll(): void;
1503
+ setAppearance(polygon: MappedinPolygon, appearance: TFlatLabelAppearance): void;
1504
+ }
1354
1505
  }
1355
1506
 
1356
- declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1357
- import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
1358
- import { MappedinNode, MappedinPolygon, MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue';
1359
- import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
1360
- import { Vector3 } from 'three';
1361
- import { CAMERA_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
1362
- import { E_CAMERA_EVENT } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
1363
- export enum SAFE_AREA_INSET_TYPE {
1364
- PIXELS = "pixels",
1365
- PORTIONS = "portions"
1366
- }
1507
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView.FloatingLabels' {
1508
+ import { MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
1509
+ import { TAddFloatingLabelOptions, TFloatingLabelAllLocationsOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
1510
+ import FloatingLabelController from '@mappedin/react-native-sdk/core/packages/renderer/layers/Labels/FloatingLabelController';
1511
+ export interface IFloatingLabels<T = void> {
1512
+ /**
1513
+ * Adds a floating label to the polygons associated with all locations on the venue.
1514
+ * The text is automatically determined based on location data.
1515
+ */
1516
+ labelAllLocations(options?: TFloatingLabelAllLocationsOptions): T;
1517
+ /**
1518
+ * Adds a floating label to a single polygon or node.
1519
+ */
1520
+ add(polygonOrNode: MappedinPolygon | MappedinNode, text: string, options?: TAddFloatingLabelOptions): T;
1521
+ /**
1522
+ * Removes a floating label from a single polygon or node.
1523
+ */
1524
+ remove(polygonOrNode: MappedinPolygon | MappedinNode): T;
1525
+ /**
1526
+ * Removes all floating labels from the venue.
1527
+ */
1528
+ removeAll(): T;
1529
+ /**
1530
+ * Updates the priority of an existing floating label (or labels, in the case
1531
+ * of a polygon). This controls whether it is preferred over other labels
1532
+ * during collisions.
1533
+ */
1534
+ setPriority(polygonOrNode: MappedinPolygon | MappedinNode, priority: number): T;
1535
+ /**
1536
+ * Resets the priority of an existing floating label (or labels, in the case
1537
+ * of a polygon)
1538
+ */
1539
+ resetPriority(polygonOrNode: MappedinPolygon | MappedinNode): T;
1540
+ }
1541
+ export class FloatingLabels implements IFloatingLabels {
1542
+ #private;
1543
+ /**
1544
+ * @hidden
1545
+ */
1546
+ constructor(controller: FloatingLabelController);
1547
+ labelAllLocations(options?: TFloatingLabelAllLocationsOptions | undefined): void;
1548
+ add(polygonOrNode: MappedinPolygon | MappedinNode, text: string, options?: TAddFloatingLabelOptions | undefined): void;
1549
+ remove(polygonOrNode: MappedinPolygon | MappedinNode): void;
1550
+ removeAll(): void;
1551
+ setPriority(polygonOrNode: MappedinPolygon | MappedinNode, priority: number): void;
1552
+ resetPriority(polygonOrNode: MappedinPolygon | MappedinNode): void;
1553
+ }
1554
+ }
1555
+
1556
+ declare module '@mappedin/react-native-sdk/core/packages/navigator' {
1557
+ import NavigationGraph from '@mappedin/react-native-sdk/core/packages/navigator/NavigationGraph';
1558
+ import Navigator from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1559
+ export { ACTION_TYPE, BEARING_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator/Directive';
1560
+ export { Navigator, NavigationGraph };
1561
+ export type { IDirectionsResult } from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1562
+ export { E_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator/Navigator';
1563
+ }
1564
+
1565
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1566
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
1567
+ import { MappedinNode, MappedinPolygon, MappedinCoordinate } from '@mappedin/react-native-sdk/core/packages/get-venue';
1568
+ import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
1569
+ import { CAMERA_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
1570
+ import { E_CAMERA_EVENT, E_CAMERA_DIRECTION, CAMERA_EASING_MODE, SAFE_AREA_INSET_TYPE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
1367
1571
  export type TSafeAreaInsets = {
1368
1572
  top: number;
1369
1573
  left: number;
@@ -1371,11 +1575,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1371
1575
  right: number;
1372
1576
  type?: SAFE_AREA_INSET_TYPE;
1373
1577
  };
1374
- export type TFocusOnTargets = {
1578
+ export type TCameraTargets = {
1375
1579
  nodes?: MappedinNode[];
1376
1580
  polygons?: MappedinPolygon[];
1377
1581
  coordinates?: MappedinCoordinate[];
1378
- points?: Vector3[];
1379
1582
  };
1380
1583
  export type TFocusOnCameraOptions = {
1381
1584
  changeZoom?: boolean;
@@ -1384,24 +1587,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1384
1587
  tilt?: number;
1385
1588
  safeAreaInsets?: TSafeAreaInsets;
1386
1589
  };
1387
- export type TAnimatePositionOptions = {
1590
+ export type TCameraTransform = {
1388
1591
  zoom?: number;
1389
1592
  tilt?: number;
1390
1593
  rotation?: number;
1391
1594
  position?: MappedinCoordinate | MappedinNode;
1392
1595
  };
1393
- export const ANIMATION_TWEENS: {
1394
- linear: any;
1395
- 'ease-in': any;
1396
- 'ease-out': any;
1397
- 'ease-in-out': any;
1398
- };
1399
- export enum CAMERA_EASING_MODE {
1400
- LINEAR = "linear",
1401
- EASE_IN = "ease-in",
1402
- EASE_OUT = "ease-out",
1403
- EASE_IN_OUT = "ease-in-out"
1404
- }
1405
1596
  export type TCameraAnimationOptions = {
1406
1597
  /**
1407
1598
  * Animation duration in milliseconds
@@ -1409,20 +1600,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1409
1600
  duration?: number;
1410
1601
  easing?: CAMERA_EASING_MODE;
1411
1602
  };
1412
- export type TFocusOnOptions = {
1413
- /**
1414
- * Targets to focus on
1415
- */
1416
- targets?: TFocusOnTargets;
1417
- /**
1418
- * Camera options to use while focusing
1419
- */
1420
- cameraOptions?: TFocusOnCameraOptions;
1421
- /**
1422
- * Animation options
1423
- */
1424
- animationOptions?: TCameraAnimationOptions;
1425
- };
1426
1603
  /**
1427
1604
  * The Camera object specifies a view of the map and allows manipulation of that view.
1428
1605
  */
@@ -1446,7 +1623,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1446
1623
  */
1447
1624
  get rotation(): number;
1448
1625
  /**
1449
- * Current Camera tilt between 0 (top-down) to 1 (from the side)
1626
+ * Current camera tilt angle (in radians), relative to a top-down view.
1627
+ *
1628
+ * ex: 0 means the camera is facing top-down, π/2 means the camera is
1629
+ * facing directly from the side.
1450
1630
  */
1451
1631
  get tilt(): number;
1452
1632
  /**
@@ -1465,6 +1645,20 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1465
1645
  * Set the maximum distance (in meters) the camera is allowed to get from the ground.
1466
1646
  */
1467
1647
  set maxZoom(meters: number);
1648
+ /**
1649
+ * Get the current maximum tilt angle (in radians) the camera is allowed to use.
1650
+ */
1651
+ get maxTilt(): number;
1652
+ /**
1653
+ * Sets the maximum tilt angle (in radians) the camera is allowed to use.
1654
+ *
1655
+ * Tilt angle must be between 0 and π/2 radians. It will be clamped within
1656
+ * this range if it exceeds it on either end.
1657
+ *
1658
+ * As tilt angle approaches π/2 radians, this will impact overall touch controls
1659
+ * and should be used sparingly.
1660
+ */
1661
+ set maxTilt(radians: number);
1468
1662
  /**
1469
1663
  * Get the current camera position, which is at the center of the map.
1470
1664
  * @returns the position as a coordinate
@@ -1496,20 +1690,22 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/Camera' {
1496
1690
  * Focus the Camera view on a collection of targets and animate to that state.
1497
1691
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1498
1692
  */
1499
- focusOn(options: TFocusOnOptions): Promise<any>;
1693
+ focusOn(targets: TCameraTargets, options?: TFocusOnCameraOptions & TCameraAnimationOptions): Promise<any>;
1500
1694
  /**
1501
1695
  * Set the Camera's view to a new state.
1502
1696
  */
1503
- set(positionOptions?: TAnimatePositionOptions): void;
1697
+ set(positionOptions: TCameraTransform): void;
1504
1698
  /**
1505
1699
  * Animate the Camera's view to smoothly transition to a new state over time.
1506
1700
  *
1507
1701
  * @returns a Promise that resolves when the animation finishes, or rejects when it is cancelled.
1508
1702
  */
1509
- animate(options: {
1510
- positionOptions?: TAnimatePositionOptions;
1511
- animationOptions?: TCameraAnimationOptions;
1512
- }): Promise<undefined>;
1703
+ animate(config: TCameraTransform, options?: TCameraAnimationOptions): Promise<undefined>;
1704
+ /**
1705
+ * Moves the Camera view in a relative direction by a given distance in meters.
1706
+ * @returns a Promise that resolves when the translation animation finishes, or rejects when it is cancelled.
1707
+ */
1708
+ translate(direction: E_CAMERA_DIRECTION, distance: number, options?: TCameraAnimationOptions): Promise<unknown>;
1513
1709
  /**
1514
1710
  * Cancel the currently active Camera animation.
1515
1711
  */
@@ -1522,26 +1718,24 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1522
1718
  export enum EVENT {
1523
1719
  LOAD_VENUE = "LOAD_VENUE",
1524
1720
  SHOW_VENUE = "SHOW_VENUE",
1721
+ /**
1722
+ * @deprecated
1723
+ * Use EVENT.CLICK instead
1724
+ */
1525
1725
  POLYGON_CLICKED = "POLYGON_CLICKED",
1526
1726
  SET_MAP = "SET_MAP",
1527
1727
  MAP_CHANGED = "MAP_CHANGED",
1528
1728
  ROTATION_CHANGED = "ROTATION_CHANGED",
1529
1729
  TILT_CHANGED = "TILT_CHANGED",
1730
+ ZOOM_CHANGED = "ZOOM_CHANGED",
1530
1731
  CAMERA_SET = "CAMERA_SET",
1531
- /**
1532
- * @deprecated
1533
- */
1534
- SET_ROTATION = "SET_ROTATION",
1535
- /**
1536
- * @deprecated
1537
- */
1538
- SET_TILT = "SET_TILT",
1539
- /**
1540
- * @deprecated
1541
- */
1542
- FOCUS_ON_LEGACY = "FOCUS_ON_LEGACY",
1732
+ CAMERA_ANIMATE = "CAMERA_ANIMATE",
1733
+ CAMERA_TRANSLATE = "CAMERA_TRANSLATE",
1734
+ POSITION_CHANGED = "POSITION_CHANGED",
1735
+ CAMERA_CHANGED = "CAMERA_CHANGED",
1543
1736
  SET_MIN_ZOOM = "SET_MIN_ZOOM",
1544
1737
  SET_MAX_ZOOM = "SET_MAX_ZOOM",
1738
+ SET_MAX_TILT = "SET_MAX_TILT",
1545
1739
  UPDATE_GEOLOCATION = "UPDATE_GEOLOCATION",
1546
1740
  FOCUS_ON = "FOCUS_ON",
1547
1741
  SET_POLYGON_COLOR = "SET_POLYGON_COLOR",
@@ -1550,28 +1744,25 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1550
1744
  CLEAR_ALL_POLYGON_COLORS = "CLEAR_ALL_POLYGON_COLORS",
1551
1745
  ADD_INTERACTIVE_POLYGON = "ADD_INTERACTIVE_POLYGON",
1552
1746
  REMOVE_INTERACTIVE_POLYGONS = "REMOVE_INTERACTIVE_POLYGONS",
1747
+ ENABLE_IMAGE_FLIPPING_FOR_POLYGON = "ENABLE_IMAGE_FLIPPING_FOR_POLYGON",
1553
1748
  CAMERA_SET_SAFE_AREA_INSETS = "CAMERA_SET_SAFE_AREA_INSETS",
1749
+ /**
1750
+ * @deprecated Use {@link FLAT_LABEL_ALL_LOCATIONS} or {@link FLOATING_LABEL_ALL_LOCATIONS} instead.
1751
+ */
1554
1752
  LABEL_ALL_LOCATIONS = "LABEL_ALL_LOCATIONS",
1555
- REMOVE_ALL_LABELS = "REMOVE_ALL_LABELS",
1556
- LABEL_POLYGON = "LABEL_POLYGON",
1753
+ FLAT_LABEL_ALL_LOCATIONS = "FLAT_LABEL_ALL_LOCATIONS",
1754
+ FLOATING_LABEL_ALL_LOCATIONS = "FLOATING_LABEL_ALL_LOCATIONS",
1755
+ REMOVE_ALL_FLAT_LABELS = "REMOVE_ALL_FLAT_LABELS",
1756
+ REMOVE_ALL_FLOATING_LABELS = "REMOVE_ALL_FLOATING_LABELS",
1757
+ ADD_FLAT_LABEL = "ADD_FLAT_LABEL",
1758
+ ADD_FLOATING_LABEL = "ADD_FLOATING_LABEL",
1759
+ REMOVE_FLAT_LABEL = "REMOVE_FLAT_LABEL",
1760
+ REMOVE_FLOATING_LABEL = "REMOVE_FLOATING_LABEL",
1761
+ SET_FLOATING_LABEL_PRIORITY = "SET_FLOATING_LABEL_PRIORITY",
1762
+ RESET_FLOATING_LABEL_PRIORITY = "RESET_FLOATING_LABEL_PRIORITY",
1763
+ SET_FLAT_LABEL_APPEARANCE = "SET_FLAT_LABEL_APPEARANCE",
1557
1764
  ENABLE_BLUE_DOT = "ENABLE_BLUE_DOT",
1558
1765
  DISABLE_BLUE_DOT = "DISABLE_BLUE_DOT",
1559
- /**
1560
- * @deprecated
1561
- */
1562
- ENABLE_BEARING = "ENABLE_BEARING",
1563
- /**
1564
- * @deprecated
1565
- */
1566
- GET_NEAREST_NODE = "GET_NEAREST_NODE",
1567
- /**
1568
- * @deprecated
1569
- */
1570
- GET_BLUE_DOT_IS_FOLLOWING = "GET_BLUE_DOT_IS_FOLLOWING",
1571
- /**
1572
- * @deprecated
1573
- */
1574
- SET_BLUE_DOT_IS_FOLLOWING = "SET_BLUE_DOT_IS_FOLLOWING",
1575
1766
  GET_DIRECTIONS = "GET_DIRECTIONS",
1576
1767
  DESTROY = "DESTROY",
1577
1768
  DATA_LOADED = "DATA_LOADED",
@@ -1584,6 +1775,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1584
1775
  BLUEDOT_POSITION_UPDATE = "BLUEDOT_POSITION_UPDATE",
1585
1776
  DRAW_PATH = "DRAW_PATH",
1586
1777
  REMOVE_ALL_PATHS = "REMOVE_ALL_PATHS",
1778
+ /**
1779
+ * @deprecated
1780
+ * Use EVENT.CLICK instead
1781
+ */
1587
1782
  NOTHING_CLICKED = "NOTHING_CLICKED",
1588
1783
  SET_STATE = "SET_STATE",
1589
1784
  STATE_CHANGED = "STATE_CHANGED",
@@ -1591,7 +1786,12 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1591
1786
  CLEAR_JOURNEY = "CLEAR_JOURNEY",
1592
1787
  SET_COOKIE = "SET_COOKIE",
1593
1788
  GET_NEAREST_NODE_BY_SCREEN_COORDINATES = "GET_NEAREST_NODE_BY_SCREEN_COORDINATES",
1594
- CLEAR_BUNDLE_CACHE = "CLEAR_BUNDLE_CACHE"
1789
+ CLEAR_BUNDLE_CACHE = "CLEAR_BUNDLE_CACHE",
1790
+ SEARCH = "SEARCH",
1791
+ SUGGEST = "SUGGEST",
1792
+ ADD_SEARCH_QUERY = "ADD_SEARCH_QUERY",
1793
+ CLICK = "CLICK",
1794
+ GET_POLYGONS_AT_COORDINATE = "GET_POLYGONS_AT_COORDINATE"
1595
1795
  }
1596
1796
  export enum WAYFINDING_EVENT {
1597
1797
  GET_MAPS_IN_NAVIGATION = "GET_MAPS_IN_NAVIGATION",
@@ -1621,10 +1821,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1621
1821
  }
1622
1822
 
1623
1823
  declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1624
- 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';
1625
- import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common/types';
1626
- import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, TFocusOnOptionsLegacySerializable, TReactNativeFlatLabelAllLocationsLegacy, TReactNativeFlatLabelAllLocations, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
1627
- import { TSerializableJourneyOptions, TFocusOnOptionsSerializable, TSerializedLocation, TSerializedNode, TSerializedPolygon } from '@mappedin/react-native-sdk/wrappers/common/types';
1824
+ import { IDirectionsResult, MappedinMap, MappedinNode, TBlueDotPositionUpdate, TBlueDotStateChange, TGetVenueOptions, TCameraTransform, TAddFlatLabelOptions, TAddFloatingLabelOptions, TPathOptions, TShowVenueOptions, STATE, TGeolocationObject, TEnableBlueDotOptions, MappedinLocation, TFlatLabelAllLocationsOptions, TFloatingLabelAllLocationsOptions, TMappedinOfflineSearchOptions, TFocusOnCameraOptions, TCameraAnimationOptions, TGetPolygonsAtCoordinateOptions, E_CAMERA_DIRECTION, TFlatLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1825
+ import { TFocusOnTargetsSerializable, TMiMapViewOptions, TSerializedCoordinate } from '@mappedin/react-native-sdk/wrappers/common/types';
1826
+ import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
1827
+ import { TSerializableJourneyOptions, TSerializedLocation, TSerializedNode, TSerializedPolygon } from '@mappedin/react-native-sdk/wrappers/common/types';
1628
1828
  export type BRIDGE_EVENT_PAYLOADS = {
1629
1829
  [BRIDGE_EVENT.REJECT]: any;
1630
1830
  [BRIDGE_EVENT.RESOLVE]: any;
@@ -1650,7 +1850,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1650
1850
  options: TGetVenueOptions;
1651
1851
  locationId: MappedinLocation['id'];
1652
1852
  polygonHighlightColor?: string;
1653
- focusOptions?: Omit<TFocusOnOptionsSerializable, 'targets'>;
1853
+ focusOptions?: TFocusOnCameraOptions & TCameraAnimationOptions;
1654
1854
  };
1655
1855
  [EVENT.CLEAR_BUNDLE_CACHE]: null;
1656
1856
  [EVENT.NOTHING_CLICKED]: null;
@@ -1675,6 +1875,24 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1675
1875
  [EVENT.TILT_CHANGED]: {
1676
1876
  tilt: number;
1677
1877
  };
1878
+ [EVENT.POSITION_CHANGED]: {
1879
+ position: {
1880
+ x: number;
1881
+ y: number;
1882
+ };
1883
+ };
1884
+ [EVENT.CAMERA_CHANGED]: {
1885
+ rotation: number;
1886
+ tilt: number;
1887
+ zoom: number;
1888
+ position: {
1889
+ x: number;
1890
+ y: number;
1891
+ };
1892
+ };
1893
+ [EVENT.ZOOM_CHANGED]: {
1894
+ zoom: number;
1895
+ };
1678
1896
  [EVENT.UPDATE_GEOLOCATION]: {
1679
1897
  msgID: undefined;
1680
1898
  data: unknown;
@@ -1695,24 +1913,47 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1695
1913
  options: TGetVenueOptions & {
1696
1914
  useBundle?: boolean;
1697
1915
  };
1698
- showVenueOptions: TShowVenueOptions;
1916
+ showVenueOptions: TShowVenueOptions & {
1917
+ /**
1918
+ * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs.
1919
+ * @default false
1920
+ */
1921
+ prepareSearch?: boolean;
1922
+ /**
1923
+ * Customize search weights
1924
+ */
1925
+ searchOptions?: TMappedinOfflineSearchOptions;
1926
+ };
1699
1927
  };
1700
1928
  [EVENT.SHOW_VENUE]: {
1701
1929
  venueData: string;
1702
1930
  format: 'jsonstring';
1703
- showVenueOptions: TShowVenueOptions;
1931
+ showVenueOptions: TShowVenueOptions & {
1932
+ /**
1933
+ * Generate a search index for venue when rendering map, instead of deferring to when the first search occurs.
1934
+ * @default false
1935
+ */
1936
+ prepareSearch?: boolean;
1937
+ /**
1938
+ * Customize search weights
1939
+ */
1940
+ searchOptions?: TMappedinOfflineSearchOptions;
1941
+ };
1704
1942
  };
1705
1943
  [EVENT.SET_MAP]: {
1706
1944
  mapId: string;
1707
1945
  };
1708
1946
  [EVENT.CAMERA_SET]: {
1709
- positionOptions?: TAnimatePositionOptions;
1947
+ positionOptions: TCameraTransform;
1710
1948
  };
1711
- [EVENT.SET_ROTATION]: {
1712
- rotation: number;
1949
+ [EVENT.CAMERA_ANIMATE]: {
1950
+ config: TCameraTransform;
1951
+ options?: TCameraAnimationOptions;
1713
1952
  };
1714
- [EVENT.SET_TILT]: {
1715
- tilt: number;
1953
+ [EVENT.CAMERA_TRANSLATE]: {
1954
+ direction: E_CAMERA_DIRECTION;
1955
+ distance: number;
1956
+ options?: TCameraAnimationOptions;
1716
1957
  };
1717
1958
  [EVENT.CAMERA_SET_SAFE_AREA_INSETS]: {
1718
1959
  safeAreaInsets: {
@@ -1726,16 +1967,12 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1726
1967
  polygonId: string;
1727
1968
  };
1728
1969
  [EVENT.FOCUS_ON]: {
1729
- focusOptions: TFocusOnOptionsSerializable;
1730
- };
1731
- [EVENT.FOCUS_ON_LEGACY]: {
1732
- focusOptions: TFocusOnOptionsLegacySerializable;
1970
+ targets: TFocusOnTargetsSerializable;
1971
+ options?: TFocusOnCameraOptions & TCameraAnimationOptions;
1733
1972
  };
1734
1973
  [EVENT.SET_POLYGON_COLOR]: {
1735
- polygonId: string;
1974
+ polygon: TSerializedPolygon;
1736
1975
  color: string;
1737
- textColor?: string;
1738
- opacity?: number;
1739
1976
  };
1740
1977
  [EVENT.SET_BACKGROUND_COLOR]: {
1741
1978
  backgroundColor: string;
@@ -1745,36 +1982,58 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1745
1982
  polygonId: string;
1746
1983
  };
1747
1984
  [EVENT.REMOVE_INTERACTIVE_POLYGONS]: null;
1985
+ [EVENT.ENABLE_IMAGE_FLIPPING_FOR_POLYGON]: {
1986
+ polygon: TSerializedPolygon;
1987
+ };
1748
1988
  [EVENT.LABEL_ALL_LOCATIONS]: {
1749
- options?: (Omit<TReactNativeFlatLabelAllLocations, 'locations'> | Omit<TLabelAllLocationFloatingLabelOptions, 'locations'> | Omit<TReactNativeFlatLabelAllLocationsLegacy, 'locations'>) & {
1989
+ options?: (Omit<TFloatingLabelAllLocationsOptions, 'locations'> | Omit<TFlatLabelAllLocationsOptions, 'locations'>) & {
1750
1990
  locations?: string[];
1751
- /**
1752
- * @deprecated
1753
- */
1754
- legacyLabels?: boolean;
1755
1991
  flatLabels?: boolean;
1756
1992
  };
1757
1993
  };
1758
- [EVENT.REMOVE_ALL_LABELS]: null;
1759
- [EVENT.LABEL_POLYGON]: {
1760
- polygonId: string;
1761
- options: (TFloatingLabelPolygonOptions | TFlatLabelPolygonOptions) & {
1762
- /**
1763
- * @deprecated
1764
- */
1765
- legacyLabels?: boolean;
1994
+ [EVENT.FLAT_LABEL_ALL_LOCATIONS]: {
1995
+ options?: Omit<TFlatLabelAllLocationsOptions, 'locations'> & {
1996
+ locations?: string[];
1997
+ };
1998
+ };
1999
+ [EVENT.FLOATING_LABEL_ALL_LOCATIONS]: {
2000
+ options?: Omit<TFloatingLabelAllLocationsOptions, 'locations'> & {
2001
+ locations?: string[];
1766
2002
  };
1767
2003
  };
2004
+ [EVENT.REMOVE_ALL_FLAT_LABELS]: null;
2005
+ [EVENT.REMOVE_ALL_FLOATING_LABELS]: null;
2006
+ [EVENT.ADD_FLAT_LABEL]: {
2007
+ polygon: TSerializedPolygon;
2008
+ text: string;
2009
+ options?: TAddFlatLabelOptions;
2010
+ };
2011
+ [EVENT.ADD_FLOATING_LABEL]: {
2012
+ polygonOrNode: TSerializedPolygon | TSerializedNode;
2013
+ text: string;
2014
+ options?: TAddFloatingLabelOptions;
2015
+ };
2016
+ [EVENT.REMOVE_FLAT_LABEL]: {
2017
+ polygon: TSerializedPolygon;
2018
+ };
2019
+ [EVENT.REMOVE_FLOATING_LABEL]: {
2020
+ polygonOrNode: TSerializedPolygon | TSerializedNode;
2021
+ };
2022
+ [EVENT.SET_FLOATING_LABEL_PRIORITY]: {
2023
+ polygonOrNode: TSerializedPolygon | TSerializedNode;
2024
+ priority: number;
2025
+ };
2026
+ [EVENT.RESET_FLOATING_LABEL_PRIORITY]: {
2027
+ polygonOrNode: TSerializedPolygon | TSerializedNode;
2028
+ };
2029
+ [EVENT.SET_FLAT_LABEL_APPEARANCE]: {
2030
+ polygon: TSerializedPolygon;
2031
+ appearance: TFlatLabelAppearance;
2032
+ };
1768
2033
  [EVENT.ENABLE_BLUE_DOT]: {
1769
2034
  options?: TEnableBlueDotOptions;
1770
2035
  };
1771
2036
  [EVENT.DISABLE_BLUE_DOT]: null;
1772
- [EVENT.ENABLE_BEARING]: any;
1773
- [EVENT.GET_NEAREST_NODE]: any;
1774
- [EVENT.GET_BLUE_DOT_IS_FOLLOWING]: any;
1775
- [EVENT.SET_BLUE_DOT_IS_FOLLOWING]: {
1776
- isFollowing: boolean;
1777
- };
1778
2037
  [EVENT.GET_DIRECTIONS]: {
1779
2038
  to: TSerializedNode | TSerializedLocation | TSerializedPolygon;
1780
2039
  from: TSerializedNode | TSerializedLocation | TSerializedPolygon;
@@ -1787,6 +2046,9 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1787
2046
  [EVENT.SET_MAX_ZOOM]: {
1788
2047
  zoomLevel: number;
1789
2048
  };
2049
+ [EVENT.SET_MAX_TILT]: {
2050
+ tiltAngle: number;
2051
+ };
1790
2052
  [EVENT.CREATE_MARKER]: {
1791
2053
  nodeOrCoordinate: {
1792
2054
  type: 'Node';
@@ -1827,17 +2089,41 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1827
2089
  y: number;
1828
2090
  map?: MappedinMap['id'];
1829
2091
  };
2092
+ [EVENT.SEARCH]: {
2093
+ query: string;
2094
+ };
2095
+ [EVENT.SUGGEST]: {
2096
+ query: string;
2097
+ };
2098
+ [EVENT.ADD_SEARCH_QUERY]: {
2099
+ query: string;
2100
+ object: {
2101
+ type: 'MappedinLocation' | 'MappedinCategory' | 'Custom';
2102
+ id: string;
2103
+ };
2104
+ weight?: number;
2105
+ };
2106
+ [EVENT.CLICK]: {
2107
+ position: {
2108
+ latitude: number;
2109
+ longitude: number;
2110
+ };
2111
+ polygons: TSerializedPolygon[];
2112
+ nearBlueDot: boolean;
2113
+ };
2114
+ [EVENT.GET_POLYGONS_AT_COORDINATE]: {
2115
+ coordinate: TSerializedCoordinate;
2116
+ options?: TGetPolygonsAtCoordinateOptions;
2117
+ };
1830
2118
  };
1831
2119
  }
1832
2120
 
1833
2121
  declare module '@mappedin/react-native-sdk/wrappers/common/types' {
1834
2122
  import { TFocusOptionsLegacy } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
1835
- import type { MappedinNode, MappedinPolygon, TFocusOnOptions, TJourneyOptions, TFloatingLabelPolygonOptions, TFlatLabelPolygonOptions, TShowVenueOptions, TLabelAllLocationFlatLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1836
- export type TFocusOnOptionsSerializable = Omit<TFocusOnOptions, 'targets'> & {
1837
- targets: {
1838
- nodes?: MappedinNode['id'][];
1839
- polygons?: MappedinPolygon['id'][];
1840
- };
2123
+ import type { MappedinNode, MappedinPolygon, TJourneyOptions, TShowVenueOptions, TLabelAllLocationFlatLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
2124
+ export type TFocusOnTargetsSerializable = {
2125
+ nodes?: MappedinNode['id'][];
2126
+ polygons?: MappedinPolygon['id'][];
1841
2127
  };
1842
2128
  export type TFocusOnOptionsLegacySerializable = Omit<TFocusOptionsLegacy, 'nodes' | 'polygons'> & {
1843
2129
  nodes?: MappedinNode['id'][];
@@ -1855,13 +2141,19 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
1855
2141
  id: string;
1856
2142
  type: 'Polygon';
1857
2143
  };
2144
+ export type TSerializedCoordinate = {
2145
+ type: 'Coordinate';
2146
+ mapId: string;
2147
+ lat: number;
2148
+ lon: number;
2149
+ };
1858
2150
  export type TSerializableJourneyOptions = TJourneyOptions & Omit<TJourneyOptions, 'connectionTemplate' | 'color' | 'destinationMarkerTemplate' | 'departureMarkerTemplate'> & {
1859
2151
  connectionTemplateString?: string;
1860
2152
  destinationMarkerTemplateString?: string;
1861
2153
  departureMarkerTemplateString?: string;
1862
2154
  color?: string;
1863
2155
  };
1864
- export type TMiMapViewOptions = TShowVenueOptions & {
2156
+ export type TMiMapViewVenueOptions = {
1865
2157
  /**
1866
2158
  * Client ID
1867
2159
  */
@@ -1881,28 +2173,16 @@ declare module '@mappedin/react-native-sdk/wrappers/common/types' {
1881
2173
  baseUrl?: string;
1882
2174
  noAuth?: boolean;
1883
2175
  language?: string;
2176
+ emitAnalyticsEvents?: boolean;
1884
2177
  };
1885
- export type TReactNativeFloatingLabelPolygonOptions = TFloatingLabelPolygonOptions & {
1886
- /**
1887
- * @deprecated
1888
- */
1889
- legacyLabels?: false | undefined;
1890
- flatLabels?: false | undefined;
1891
- };
1892
- export type TReactNativeFlatLabelPolygonOptions = TFlatLabelPolygonOptions & ({
1893
- /**
1894
- * @deprecated
1895
- */
1896
- legacyLabels: true;
1897
- } | {
1898
- flatLabels: true;
1899
- });
1900
- export type TReactNativeFlatLabelAllLocationsLegacy = Omit<TLabelAllLocationFlatLabelOptions, 'flatLabels'> & {
1901
- /**
1902
- * @deprecated
1903
- */
1904
- legacyLabels: true;
1905
- };
2178
+ export type TMiMapViewOptions = TShowVenueOptions & TMiMapViewVenueOptions;
2179
+ /**
2180
+ * @deprecated Only used for the deprecated {@link LABEL_ALL_LOCATIONS} event
2181
+ */
2182
+ export type TReactNativeFlatLabelAllLocationsLegacy = Omit<TLabelAllLocationFlatLabelOptions, 'flatLabels'>;
2183
+ /**
2184
+ * @deprecated Only used for the deprecated {@link LABEL_ALL_LOCATIONS} event
2185
+ */
1906
2186
  export type TReactNativeFlatLabelAllLocations = TLabelAllLocationFlatLabelOptions & {
1907
2187
  flatLabels: true;
1908
2188
  };
@@ -1918,87 +2198,315 @@ declare module '@mappedin/react-native-sdk/wrappers/common/pub-sub' {
1918
2198
  }
1919
2199
  }
1920
2200
 
1921
- declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
1922
- import { BRIDGE_EVENT, BRIDGE_EVENT_PAYLOADS } from '@mappedin/react-native-sdk/wrappers/common';
1923
- import { PubSub } from '@mappedin/react-native-sdk/wrappers/common';
1924
- export function uuid(): string;
1925
- export class MappedinController {
1926
- #private;
1927
- privateEventBus: PubSub<{
1928
- REJECT: {
1929
- msgID?: string | undefined;
1930
- data: any;
1931
- };
1932
- RESOLVE: {
1933
- msgID?: string | undefined;
1934
- data: any;
1935
- };
1936
- READY: {
1937
- msgID?: string | undefined;
1938
- data: null;
1939
- };
1940
- LOG: {
1941
- msgID?: string | undefined;
1942
- data: string;
1943
- };
1944
- GET_IMAGE: {
1945
- msgID?: string | undefined;
1946
- data: {
1947
- fileName: string;
1948
- };
1949
- };
1950
- GET_MAP_POLYGONS: {
1951
- msgID?: string | undefined;
1952
- data: {
1953
- mapId: string;
1954
- };
1955
- };
1956
- MINIMAP_READY: {
1957
- msgID?: string | undefined;
1958
- data: null;
1959
- };
1960
- SHOW_MINIMAP: {
1961
- msgID?: string | undefined;
1962
- data: {
1963
- format: "jsonstring";
1964
- venueData: string;
1965
- options: import("./types").TMiMapViewOptions;
1966
- };
1967
- };
1968
- LOAD_MINIMAP: {
1969
- msgID?: string | undefined;
1970
- data: {
1971
- options: import("../react-native-sdk/src").TGetVenueOptions;
1972
- };
1973
- };
1974
- CACHE_IMAGE: {
1975
- msgID?: string | undefined;
1976
- data: {
1977
- url?: string | undefined;
1978
- options: import("../react-native-sdk/src").TGetVenueOptions;
1979
- locationId: string;
1980
- polygonHighlightColor?: string | undefined;
1981
- focusOptions?: Omit<import("./types").TFocusOnOptionsSerializable, "targets"> | undefined;
1982
- };
1983
- };
1984
- CLEAR_BUNDLE_CACHE: {
1985
- msgID?: string | undefined;
1986
- data: null;
1987
- };
1988
- NOTHING_CLICKED: {
1989
- msgID?: string | undefined;
1990
- data: null;
1991
- };
1992
- STATE_CHANGED: {
1993
- msgID?: string | undefined;
1994
- data: {
1995
- state: import("../react-native-sdk/src").STATE;
1996
- };
1997
- };
1998
- DATA_LOADED: {
1999
- msgID?: string | undefined;
2000
- data: {
2001
- venueData: any;
2201
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface' {
2202
+ import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
2203
+ import { Vector2, Vector3 } from 'three';
2204
+ import { changeListenerFn, TMapViewOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
2205
+ import RENDER from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks';
2206
+ import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
2207
+ import { TPadding } from '@mappedin/react-native-sdk/core/packages/renderer';
2208
+ import Tween, { Easing } from '@tweenjs/tween.js';
2209
+ export type TFocusOptionsLegacy = {
2210
+ /**
2211
+ * An array of Nodes to focus in on
2212
+ */
2213
+ nodes?: (MappedinNode | MappedinNode['id'])[];
2214
+ /**
2215
+ * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.
2216
+ */
2217
+ polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
2218
+ /**
2219
+ * The duration (in ms) the focus animation should last for.
2220
+ * @defaultValue `100`
2221
+ */
2222
+ duration?: number;
2223
+ /**
2224
+ * Whether to zoom the camera in or out, or just pan it.
2225
+ * @defaultValue `true`
2226
+ */
2227
+ changeZoom?: boolean;
2228
+ /**
2229
+ * The animation curve to use for zooming in. Uses the animateCamera one by default.
2230
+ */
2231
+ curve?: typeof Easing;
2232
+ /**
2233
+ * Camera tilt between 0 (top-down) to 1 (from the side)
2234
+ */
2235
+ tilt?: number;
2236
+ /**
2237
+ * Rotation in degrees
2238
+ */
2239
+ rotation?: number;
2240
+ /**
2241
+ * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.
2242
+ */
2243
+ focusZoomFactor?: number;
2244
+ /**
2245
+ * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.
2246
+ * @defaultValue: 0
2247
+ */
2248
+ minZoom?: number;
2249
+ padding?: TPadding;
2250
+ points?: any[];
2251
+ };
2252
+ export interface ICore {
2253
+ new (container: HTMLElement, venue: Mappedin, options?: TMapViewOptions): ICore;
2254
+ /**
2255
+ * @internal
2256
+ */
2257
+ currentScale: number;
2258
+ loadOptions?: TMapViewOptions['loadOptions'];
2259
+ imageFlippingEnabled: boolean;
2260
+ imageFlippingCache: any;
2261
+ cachedPadding: any;
2262
+ polygonMeshesById: any;
2263
+ textLabelsByPolygonId: any;
2264
+ renderer: any;
2265
+ scene: any;
2266
+ cameraParameters: Vector2;
2267
+ resolution: Vector2;
2268
+ determineNewLabelSize: any;
2269
+ on<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
2270
+ off<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
2271
+ publish<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void;
2272
+ /**
2273
+ * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}},
2274
+ * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}.
2275
+ * Some of the functions don't do anything in 2D.
2276
+ *
2277
+ */
2278
+ controls: any;
2279
+ /**
2280
+ * The Venue data this MapView is using.
2281
+ *
2282
+ * @property venue {MappedinVenue}
2283
+ * @final
2284
+ */
2285
+ readonly venue: Mappedin;
2286
+ /**
2287
+ * The div MapView is using.
2288
+ *
2289
+ * @property container {Div}
2290
+ * @final
2291
+ */
2292
+ readonly container: HTMLElement;
2293
+ /**
2294
+ * The ID of the Map currently being displayed.
2295
+ *
2296
+ */
2297
+ readonly currentMap: string;
2298
+ /**
2299
+ * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call.
2300
+ *
2301
+ * @property focusZoomFactor {Integer}
2302
+ * @default 3
2303
+ */
2304
+ focusZoomFactor: number;
2305
+ /**
2306
+ * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly.
2307
+ *
2308
+ * @return The zoom level that will fit the Polygon
2309
+ */
2310
+ getZoomLevelForPolygon(props: {
2311
+ /**
2312
+ * The Polygon or Polygon ID to get the zoom level for
2313
+ */
2314
+ polygonOrPolygonId: MappedinPolygon | string;
2315
+ }): number;
2316
+ /**
2317
+ * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly.
2318
+ *
2319
+ * @return The zoom level that will fit the {@link IMapView3D.currentMap}.
2320
+ */
2321
+ getZoomLevelForCurrentMap(): number;
2322
+ /**
2323
+ * Returns the angle that points to north, in radians, from the default orientation.
2324
+ *
2325
+ * @return The angle to north from the default orientation, in radians.
2326
+ */
2327
+ getNorth(): number;
2328
+ /**
2329
+ * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked
2330
+ * 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
2331
+ * is how you would do a compass rose.
2332
+ *
2333
+ * This will modify your element's transform.
2334
+ *
2335
+ * @param element The element on the page to rotate.
2336
+ * @param offset The amount to offset the rotation by, in radians.
2337
+ *
2338
+ */
2339
+ lockNorth(element: HTMLElement, offset?: number): void;
2340
+ /**
2341
+ * 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.
2342
+ * @param element The node to stop rotating. It won't reset the transform, just leave it as is.
2343
+ */
2344
+ unlockNorth(element: HTMLElement): void;
2345
+ currentInteractionEvent: string;
2346
+ interactivePolygons: any;
2347
+ highlightedPolygons: any;
2348
+ cameraPlane: any;
2349
+ /**
2350
+ * Called any time a user touches or clicks the map. Only fires on "single" touches/clicks.
2351
+ *
2352
+ * @param position Object containing the latitude & longitude of the location touched on the map
2353
+ * @param polygons Array of polygon IDs that were touched, in order of front to back.
2354
+ * @param nearBlueDot Whether the touch was close enough to the Blue Dot to be considered a touch on the Blue Dot.
2355
+ */
2356
+ onMapClicked(position: {
2357
+ latitude: number;
2358
+ longitude: number;
2359
+ }, polygons: string[], nearBlueDot: boolean): void;
2360
+ /**
2361
+ * This is called when an interactive Polygon is clicked on.
2362
+ * You will almost certainly want to replace this with your own function in your client app.
2363
+ * Return "false" if you have consumed the event and it shouldn't bubble down to other Polygons beneath this one.
2364
+ *
2365
+ * @param polygonId polygonId passed in when tapping an interactive polygon
2366
+ */
2367
+ onPolygonClicked(polygonId: string): boolean | void;
2368
+ onMapChanged(map: string): void;
2369
+ getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string): Vector3;
2370
+ getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
2371
+ /**
2372
+ * Takes an x/y pair in Mappedin coordinate space and gives you a Vector3 in scene space
2373
+ * @param nodeOrCoordinate a node or coordinate
2374
+ */
2375
+ convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3;
2376
+ /**
2377
+ * Converts a Vector-like object into a MappedinCoordinate for a map.
2378
+ * @param position an object with x and y, like a Vector3
2379
+ * @param mapClass An optional map; otherwise, the current map will be used.
2380
+ */
2381
+ convert3DMapPositionToCoordinate(position: {
2382
+ x: number;
2383
+ y: number;
2384
+ }, mapClass?: MappedinMap): MappedinCoordinate;
2385
+ setPadding(padding: {
2386
+ top: number;
2387
+ left: number;
2388
+ bottom: number;
2389
+ right: number;
2390
+ }): void;
2391
+ /**
2392
+ * This is fired when the user taps/clicks on the MapView without hitting an interactive Polygon.
2393
+ * You will almost certainly want to replace this with your own function in your client app.
2394
+ * You would probably use this to clear any Polygon highlighting, in certain situations.
2395
+ */
2396
+ onNothingClicked(): void;
2397
+ smartCollisionEngine: any;
2398
+ mapObjects: any;
2399
+ /**
2400
+ * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
2401
+ * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
2402
+ * 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.
2403
+ * Ignored in 2D.
2404
+ */
2405
+ tryRendering(renderMode?: typeof RENDER): void;
2406
+ setMap(mapOrMapId: MappedinMap | string): Promise<null>;
2407
+ getPositionNode(node: MappedinNode): Vector3;
2408
+ cameraObject: any;
2409
+ setBackgroundColor(color: number | string, alpha?: number): void;
2410
+ mapManager: any;
2411
+ focusOn(focusOptions: TFocusOptionsLegacy): Tween;
2412
+ canvasWidth: number;
2413
+ canvasHeight: number;
2414
+ /**
2415
+ * Resets the MapView to the default state.
2416
+ */
2417
+ resetState(): void;
2418
+ destroy(): void;
2419
+ }
2420
+ }
2421
+
2422
+ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2423
+ import { BRIDGE_EVENT, BRIDGE_EVENT_PAYLOADS } from '@mappedin/react-native-sdk/wrappers/common';
2424
+ import { PubSub } from '@mappedin/react-native-sdk/wrappers/common';
2425
+ export function uuid(): string;
2426
+ export class MappedinController {
2427
+ #private;
2428
+ /**
2429
+ * private event bus for proxying messages to listeners in child classes
2430
+ * @hidden
2431
+ */
2432
+ privateEventBus: PubSub<{
2433
+ REJECT: {
2434
+ msgID?: string | undefined;
2435
+ data: any;
2436
+ };
2437
+ RESOLVE: {
2438
+ msgID?: string | undefined;
2439
+ data: any;
2440
+ };
2441
+ READY: {
2442
+ msgID?: string | undefined;
2443
+ data: null;
2444
+ };
2445
+ LOG: {
2446
+ msgID?: string | undefined;
2447
+ data: string;
2448
+ };
2449
+ GET_IMAGE: {
2450
+ msgID?: string | undefined;
2451
+ data: {
2452
+ fileName: string;
2453
+ };
2454
+ };
2455
+ GET_MAP_POLYGONS: {
2456
+ msgID?: string | undefined;
2457
+ data: {
2458
+ mapId: string;
2459
+ };
2460
+ };
2461
+ MINIMAP_READY: {
2462
+ msgID?: string | undefined;
2463
+ data: null;
2464
+ };
2465
+ SHOW_MINIMAP: {
2466
+ msgID?: string | undefined;
2467
+ data: {
2468
+ format: "jsonstring";
2469
+ venueData: string;
2470
+ options: import("./types").TMiMapViewOptions;
2471
+ };
2472
+ };
2473
+ LOAD_MINIMAP: {
2474
+ msgID?: string | undefined;
2475
+ data: {
2476
+ options: import("../react-native-sdk/src").TGetVenueOptions;
2477
+ };
2478
+ };
2479
+ CACHE_IMAGE: {
2480
+ msgID?: string | undefined;
2481
+ data: {
2482
+ url?: string | undefined;
2483
+ options: import("../react-native-sdk/src").TGetVenueOptions; /**
2484
+ * Send a message to the other side of the bridge
2485
+ *
2486
+ * @hidden
2487
+ locationId: string;
2488
+ polygonHighlightColor?: string | undefined;
2489
+ focusOptions?: (import("../react-native-sdk/src").TFocusOnCameraOptions & import("../react-native-sdk/src").TCameraAnimationOptions) | undefined;
2490
+ };
2491
+ };
2492
+ CLEAR_BUNDLE_CACHE: {
2493
+ msgID?: string | undefined;
2494
+ data: null;
2495
+ };
2496
+ NOTHING_CLICKED: {
2497
+ msgID?: string | undefined;
2498
+ data: null;
2499
+ };
2500
+ STATE_CHANGED: {
2501
+ msgID?: string | undefined;
2502
+ data: {
2503
+ state: import("../react-native-sdk/src").STATE;
2504
+ };
2505
+ };
2506
+ DATA_LOADED: {
2507
+ msgID?: string | undefined;
2508
+ data: {
2509
+ venueData: any;
2002
2510
  };
2003
2511
  };
2004
2512
  FIRST_MAP_LOADED: {
@@ -2031,6 +2539,33 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2031
2539
  tilt: number;
2032
2540
  };
2033
2541
  };
2542
+ POSITION_CHANGED: {
2543
+ msgID?: string | undefined;
2544
+ data: {
2545
+ position: {
2546
+ x: number;
2547
+ y: number;
2548
+ };
2549
+ };
2550
+ };
2551
+ CAMERA_CHANGED: {
2552
+ msgID?: string | undefined;
2553
+ data: {
2554
+ rotation: number;
2555
+ tilt: number;
2556
+ zoom: number;
2557
+ position: {
2558
+ x: number;
2559
+ y: number;
2560
+ };
2561
+ };
2562
+ };
2563
+ ZOOM_CHANGED: {
2564
+ msgID?: string | undefined;
2565
+ data: {
2566
+ zoom: number;
2567
+ };
2568
+ };
2034
2569
  UPDATE_GEOLOCATION: {
2035
2570
  msgID?: string | undefined;
2036
2571
  data: {
@@ -2041,13 +2576,13 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2041
2576
  BLUEDOT_STATE_CHANGE: {
2042
2577
  msgID?: string | undefined;
2043
2578
  data: {
2044
- stateChange: import("../../core/packages/renderer").TBlueDotStateChange;
2579
+ stateChange: import("../react-native-sdk/src").TBlueDotStateChange;
2045
2580
  };
2046
2581
  };
2047
2582
  BLUEDOT_POSITION_UPDATE: {
2048
2583
  msgID?: string | undefined;
2049
2584
  data: {
2050
- update: Omit<import("../../core/packages/renderer").TBlueDotPositionUpdate, "map" | "nearestNode"> & {
2585
+ update: Omit<import("../react-native-sdk/src").TBlueDotPositionUpdate, "map" | "nearestNode"> & {
2051
2586
  nearestNode?: string | undefined;
2052
2587
  map?: string | undefined;
2053
2588
  };
@@ -2065,7 +2600,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2065
2600
  options: import("../react-native-sdk/src").TGetVenueOptions & {
2066
2601
  useBundle?: boolean | undefined;
2067
2602
  };
2068
- showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions;
2603
+ showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions & {
2604
+ prepareSearch?: boolean | undefined;
2605
+ searchOptions?: Partial<import("../react-native-sdk/src").TMappedinOfflineSearchAllOptions> | undefined;
2606
+ };
2069
2607
  };
2070
2608
  };
2071
2609
  SHOW_VENUE: {
@@ -2073,7 +2611,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2073
2611
  data: {
2074
2612
  venueData: string;
2075
2613
  format: "jsonstring";
2076
- showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions;
2614
+ showVenueOptions: import("../react-native-sdk/src").TShowVenueOptions & {
2615
+ prepareSearch?: boolean | undefined;
2616
+ searchOptions?: Partial<import("../react-native-sdk/src").TMappedinOfflineSearchAllOptions> | undefined;
2617
+ };
2077
2618
  };
2078
2619
  };
2079
2620
  SET_MAP: {
@@ -2085,19 +2626,22 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2085
2626
  CAMERA_SET: {
2086
2627
  msgID?: string | undefined;
2087
2628
  data: {
2088
- positionOptions?: import("../react-native-sdk/src").TAnimatePositionOptions | undefined;
2629
+ positionOptions: import("../react-native-sdk/src").TCameraTransform;
2089
2630
  };
2090
2631
  };
2091
- SET_ROTATION: {
2632
+ CAMERA_ANIMATE: {
2092
2633
  msgID?: string | undefined;
2093
2634
  data: {
2094
- rotation: number;
2635
+ config: import("../react-native-sdk/src").TCameraTransform;
2636
+ options?: import("../react-native-sdk/src").TCameraAnimationOptions | undefined;
2095
2637
  };
2096
2638
  };
2097
- SET_TILT: {
2639
+ CAMERA_TRANSLATE: {
2098
2640
  msgID?: string | undefined;
2099
2641
  data: {
2100
- tilt: number;
2642
+ direction: import("../react-native-sdk/src").E_CAMERA_DIRECTION;
2643
+ distance: number;
2644
+ options?: import("../react-native-sdk/src").TCameraAnimationOptions | undefined;
2101
2645
  };
2102
2646
  };
2103
2647
  CAMERA_SET_SAFE_AREA_INSETS: {
@@ -2120,22 +2664,15 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2120
2664
  FOCUS_ON: {
2121
2665
  msgID?: string | undefined;
2122
2666
  data: {
2123
- focusOptions: import("./types").TFocusOnOptionsSerializable;
2124
- };
2125
- };
2126
- FOCUS_ON_LEGACY: {
2127
- msgID?: string | undefined;
2128
- data: {
2129
- focusOptions: import("./types").TFocusOnOptionsLegacySerializable;
2667
+ targets: import("./types").TFocusOnTargetsSerializable;
2668
+ options?: (import("../react-native-sdk/src").TFocusOnCameraOptions & import("../react-native-sdk/src").TCameraAnimationOptions) | undefined;
2130
2669
  };
2131
2670
  };
2132
2671
  SET_POLYGON_COLOR: {
2133
2672
  msgID?: string | undefined;
2134
2673
  data: {
2135
- polygonId: string;
2674
+ polygon: import("./types").TSerializedPolygon;
2136
2675
  color: string;
2137
- textColor?: string | undefined;
2138
- opacity?: number | undefined;
2139
2676
  };
2140
2677
  };
2141
2678
  SET_BACKGROUND_COLOR: {
@@ -2158,62 +2695,108 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2158
2695
  msgID?: string | undefined;
2159
2696
  data: null;
2160
2697
  };
2698
+ ENABLE_IMAGE_FLIPPING_FOR_POLYGON: {
2699
+ msgID?: string | undefined;
2700
+ data: {
2701
+ polygon: import("./types").TSerializedPolygon;
2702
+ };
2703
+ };
2161
2704
  LABEL_ALL_LOCATIONS: {
2162
2705
  msgID?: string | undefined;
2163
2706
  data: {
2164
- options?: ((Omit<import("./types").TReactNativeFlatLabelAllLocations, "locations"> | Omit<import("../react-native-sdk/src").TLabelAllLocationFloatingLabelOptions, "locations"> | Omit<import("./types").TReactNativeFlatLabelAllLocationsLegacy, "locations">) & {
2707
+ options?: ((Omit<import("../react-native-sdk/src").TFloatingLabelAllLocationsOptions, "locations"> | Omit<import("../react-native-sdk/src").TFlatLabelAllLocationsOptions, "locations">) & {
2165
2708
  locations?: string[] | undefined;
2166
- legacyLabels?: boolean | undefined;
2167
2709
  flatLabels?: boolean | undefined;
2168
2710
  }) | undefined;
2169
2711
  };
2170
2712
  };
2171
- REMOVE_ALL_LABELS: {
2713
+ FLAT_LABEL_ALL_LOCATIONS: {
2714
+ msgID?: string | undefined;
2715
+ data: {
2716
+ options?: (Omit<import("../react-native-sdk/src").TFlatLabelAllLocationsOptions, "locations"> & {
2717
+ locations?: string[] | undefined;
2718
+ }) | undefined;
2719
+ };
2720
+ };
2721
+ FLOATING_LABEL_ALL_LOCATIONS: {
2722
+ msgID?: string | undefined;
2723
+ data: {
2724
+ options?: (Omit<import("../react-native-sdk/src").TFloatingLabelAllLocationsOptions, "locations"> & {
2725
+ locations?: string[] | undefined;
2726
+ }) | undefined;
2727
+ };
2728
+ };
2729
+ REMOVE_ALL_FLAT_LABELS: {
2172
2730
  msgID?: string | undefined;
2173
2731
  data: null;
2174
2732
  };
2175
- LABEL_POLYGON: {
2733
+ REMOVE_ALL_FLOATING_LABELS: {
2734
+ msgID?: string | undefined;
2735
+ data: null;
2736
+ };
2737
+ ADD_FLAT_LABEL: {
2176
2738
  msgID?: string | undefined;
2177
2739
  data: {
2178
- polygonId: string;
2179
- options: (import("../react-native-sdk/src").TFlatLabelPolygonOptions | import("../react-native-sdk/src").TFloatingLabelPolygonOptions) & {
2180
- legacyLabels?: boolean | undefined;
2181
- };
2740
+ polygon: import("./types").TSerializedPolygon;
2741
+ text: string;
2742
+ options?: import("../react-native-sdk/src").TAddFlatLabelOptions | undefined;
2182
2743
  };
2183
2744
  };
2184
- ENABLE_BLUE_DOT: {
2745
+ ADD_FLOATING_LABEL: {
2185
2746
  msgID?: string | undefined;
2186
2747
  data: {
2187
- options?: import("../react-native-sdk/src").TEnableBlueDotOptionsBase | undefined;
2748
+ polygonOrNode: import("./types").TSerializedPolygon | import("./types").TSerializedNode;
2749
+ text: string;
2750
+ options?: import("../react-native-sdk/src").TAddFloatingLabelOptions | undefined;
2188
2751
  };
2189
2752
  };
2190
- DISABLE_BLUE_DOT: {
2753
+ REMOVE_FLAT_LABEL: {
2191
2754
  msgID?: string | undefined;
2192
- data: null;
2755
+ data: {
2756
+ polygon: import("./types").TSerializedPolygon;
2757
+ };
2193
2758
  };
2194
- ENABLE_BEARING: {
2759
+ REMOVE_FLOATING_LABEL: {
2195
2760
  msgID?: string | undefined;
2196
- data: any;
2761
+ data: {
2762
+ polygonOrNode: import("./types").TSerializedPolygon | import("./types").TSerializedNode;
2763
+ };
2197
2764
  };
2198
- GET_NEAREST_NODE: {
2765
+ SET_FLOATING_LABEL_PRIORITY: {
2199
2766
  msgID?: string | undefined;
2200
- data: any;
2767
+ data: {
2768
+ polygonOrNode: import("./types").TSerializedPolygon | import("./types").TSerializedNode;
2769
+ priority: number;
2770
+ };
2201
2771
  };
2202
- GET_BLUE_DOT_IS_FOLLOWING: {
2772
+ RESET_FLOATING_LABEL_PRIORITY: {
2203
2773
  msgID?: string | undefined;
2204
- data: any;
2774
+ data: {
2775
+ polygonOrNode: import("./types").TSerializedPolygon | import("./types").TSerializedNode;
2776
+ };
2777
+ };
2778
+ SET_FLAT_LABEL_APPEARANCE: {
2779
+ msgID?: string | undefined;
2780
+ data: {
2781
+ polygon: import("./types").TSerializedPolygon;
2782
+ appearance: import("../react-native-sdk/src").TFlatLabelAppearance;
2783
+ };
2205
2784
  };
2206
- SET_BLUE_DOT_IS_FOLLOWING: {
2785
+ ENABLE_BLUE_DOT: {
2207
2786
  msgID?: string | undefined;
2208
2787
  data: {
2209
- isFollowing: boolean;
2788
+ options?: import("../react-native-sdk/src").TEnableBlueDotOptionsBase | undefined;
2210
2789
  };
2211
2790
  };
2791
+ DISABLE_BLUE_DOT: {
2792
+ msgID?: string | undefined;
2793
+ data: null;
2794
+ };
2212
2795
  GET_DIRECTIONS: {
2213
2796
  msgID?: string | undefined;
2214
2797
  data: {
2215
- to: import("./types").TSerializedNode | import("./types").TSerializedLocation | import("./types").TSerializedPolygon;
2216
- from: import("./types").TSerializedNode | import("./types").TSerializedLocation | import("./types").TSerializedPolygon;
2798
+ to: import("./types").TSerializedPolygon | import("./types").TSerializedNode | import("./types").TSerializedLocation;
2799
+ from: import("./types").TSerializedPolygon | import("./types").TSerializedNode | import("./types").TSerializedLocation;
2217
2800
  accessible?: boolean | undefined;
2218
2801
  };
2219
2802
  };
@@ -2233,6 +2816,12 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2233
2816
  zoomLevel: number;
2234
2817
  };
2235
2818
  };
2819
+ SET_MAX_TILT: {
2820
+ msgID?: string | undefined;
2821
+ data: {
2822
+ tiltAngle: number;
2823
+ };
2824
+ };
2236
2825
  CREATE_MARKER: {
2237
2826
  msgID?: string | undefined;
2238
2827
  data: {
@@ -2303,275 +2892,95 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2303
2892
  map?: string | undefined;
2304
2893
  };
2305
2894
  };
2306
- }>;
2307
- /**
2308
- * Message received from the other side of the bridge
2309
- * @hidden
2310
- */
2311
- onMessageReceived<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload: {
2312
- data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
2313
- msgID?: string;
2314
- }): void;
2315
- /**
2316
- * Send a message to the other side of the bridge
2317
- *
2318
- * @hidden
2319
- */
2320
- sendMessage<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: {
2321
- msgID?: string;
2322
- data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME] | null;
2323
- }): void;
2324
- /**
2325
- * Handle resolution from the other side, with a value if one was expected
2326
- * @hidden
2327
- */
2328
- protected handleResolution: <EVENT_NAME extends BRIDGE_EVENT>(payload: {
2329
- msgID: string;
2330
- data: {
2331
- payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
2895
+ SEARCH: {
2896
+ msgID?: string | undefined;
2897
+ data: {
2898
+ query: string;
2899
+ };
2332
2900
  };
2333
- }) => void;
2334
- /**
2335
- * Handle rejection from the other side, typically when the request results in an error
2336
- * @hidden
2337
- */
2338
- protected handleRejection: <EVENT_NAME extends BRIDGE_EVENT>(payload: {
2339
- msgID: string;
2340
- data: {
2341
- payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
2901
+ SUGGEST: {
2902
+ msgID?: string | undefined;
2903
+ data: {
2904
+ query: string;
2905
+ };
2342
2906
  };
2343
- }) => void;
2344
- /**
2345
- * Emitting a message without expecting a response
2346
- * @hidden
2347
- */
2348
- emit<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): void;
2349
- /**
2350
- * Emitting a message and waiting for a reponse, via a promise
2351
- * @hidden
2352
- */
2353
- emitAsync<T, EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): Promise<T>;
2354
- }
2355
- }
2356
-
2357
- declare module '@mappedin/react-native-sdk/core/packages/renderer/Core.interface' {
2358
- import { MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
2359
- import { Vector2, Vector3 } from 'three';
2360
- import { changeListenerFn, TMapViewOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
2361
- import RENDER from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.RenderTasks';
2362
- import { INTERNAL_EVENT_PAYLOAD } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
2363
- import { TPadding } from '@mappedin/react-native-sdk/core/packages/renderer';
2364
- import Tween, { Easing } from '@tweenjs/tween.js';
2365
- export type TFocusOptionsLegacy = {
2366
- /**
2367
- * An array of Nodes to focus in on
2368
- */
2369
- nodes?: (MappedinNode | MappedinNode['id'])[];
2370
- /**
2371
- * An array of Polygons to focus on. It's the center of the bounds of all Polygons, designed to fit everything into view.
2372
- */
2373
- polygons?: (MappedinPolygon | MappedinPolygon['id'])[];
2374
- /**
2375
- * The duration (in ms) the focus animation should last for.
2376
- * @defaultValue `100`
2377
- */
2378
- duration?: number;
2379
- /**
2380
- * Whether to zoom the camera in or out, or just pan it.
2381
- * @defaultValue `true`
2382
- */
2383
- changeZoom?: boolean;
2384
- /**
2385
- * The animation curve to use for zooming in. Uses the animateCamera one by default.
2386
- */
2387
- curve?: typeof Easing;
2388
- /**
2389
- * Camera tilt between 0 (top-down) to 1 (from the side)
2390
- */
2391
- tilt?: number;
2392
- /**
2393
- * Rotation in degrees
2394
- */
2395
- rotation?: number;
2396
- /**
2397
- * You can overide the {{#crossLink "MapView/focusZoomFactor:property"}}{{/crossLink}} for a specific {{#crossLink "MapView/focusOn:method"}}{{/crossLink}} call, rather than globally, if you like.
2398
- */
2399
- focusZoomFactor?: number;
2400
- /**
2401
- * Sets a floor for how close you can zoom in on the scene. If it's lower than mapView.controls.minZoom, it's ignored.
2402
- * @defaultValue: 0
2403
- */
2404
- minZoom?: number;
2405
- padding?: TPadding;
2406
- points?: any[];
2407
- };
2408
- export interface ICore {
2409
- new (container: HTMLElement, venue: Mappedin, options?: TMapViewOptions): ICore;
2410
- /**
2411
- * @internal
2412
- */
2413
- currentScale: number;
2414
- loadOptions?: TMapViewOptions['loadOptions'];
2415
- imageFlippingEnabled: boolean;
2416
- imageFlippingCache: any;
2417
- cachedPadding: any;
2418
- polygonMeshesById: any;
2419
- textLabelsByPolygonId: any;
2420
- renderer: any;
2421
- scene: any;
2422
- cameraParameters: Vector2;
2423
- resolution: Vector2;
2424
- determineNewLabelSize: any;
2425
- on<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
2426
- off<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, fn: changeListenerFn<INTERNAL_EVENT_PAYLOAD[EVENT_NAME]>): void;
2427
- publish<EVENT_NAME extends keyof INTERNAL_EVENT_PAYLOAD>(eventName: EVENT_NAME, payload?: INTERNAL_EVENT_PAYLOAD[EVENT_NAME]): void;
2428
- /**
2429
- * Manual camera controls for MapView. Generally you should be using the functions on MapView like {{#crossLink "MapView/focusOn:method"}}{{/crossLink}},
2430
- * but if you have some cool animations in mind, you can do it with the {{#crossLink "CameraControls"}}{{/crossLink}}.
2431
- * Some of the functions don't do anything in 2D.
2432
- *
2433
- */
2434
- controls: any;
2435
- /**
2436
- * The Venue data this MapView is using.
2437
- *
2438
- * @property venue {MappedinVenue}
2439
- * @final
2440
- */
2441
- readonly venue: Mappedin;
2442
- /**
2443
- * The div MapView is using.
2444
- *
2445
- * @property container {Div}
2446
- * @final
2447
- */
2448
- readonly container: HTMLElement;
2449
- /**
2450
- * The ID of the Map currently being displayed.
2451
- *
2452
- */
2453
- readonly currentMap: string;
2454
- /**
2455
- * Change this factor to influence how much the camera zooms in on a {@link IMapView3D.focusOn} call.
2456
- *
2457
- * @property focusZoomFactor {Integer}
2458
- * @default 3
2459
- */
2460
- focusZoomFactor: number;
2461
- /**
2462
- * Returns the value you should call {@link CameraControls.setZoom} on to fit the Polygon exactly.
2463
- *
2464
- * @return The zoom level that will fit the Polygon
2465
- */
2466
- getZoomLevelForPolygon(props: {
2467
- /**
2468
- * The Polygon or Polygon ID to get the zoom level for
2469
- */
2470
- polygonOrPolygonId: MappedinPolygon | string;
2471
- }): number;
2472
- /**
2473
- * Returns the value you should call {@link CameraControls.setZoom} on to fit the {@link IMapView3D.currentMap} exactly.
2474
- *
2475
- * @return The zoom level that will fit the {@link IMapView3D.currentMap}.
2476
- */
2477
- getZoomLevelForCurrentMap(): number;
2478
- /**
2479
- * Returns the angle that points to north, in radians, from the default orientation.
2480
- *
2481
- * @return The angle to north from the default orientation, in radians.
2482
- */
2483
- getNorth(): number;
2484
- /**
2485
- * Takes an element on the DOM and rotates it such that the top is pointing north. It will rotate with the camera, staying locked
2486
- * 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
2487
- * is how you would do a compass rose.
2488
- *
2489
- * This will modify your element's transform.
2490
- *
2491
- * @param element The element on the page to rotate.
2492
- * @param offset The amount to offset the rotation by, in radians.
2493
- *
2494
- */
2495
- lockNorth(element: HTMLElement, offset?: number): void;
2496
- /**
2497
- * 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.
2498
- * @param element The node to stop rotating. It won't reset the transform, just leave it as is.
2499
- */
2500
- unlockNorth(element: HTMLElement): void;
2501
- currentInteractionEvent: string;
2502
- interactivePolygons: any;
2503
- highlightedPolygons: any;
2504
- cameraPlane: any;
2907
+ ADD_SEARCH_QUERY: {
2908
+ msgID?: string | undefined;
2909
+ data: {
2910
+ query: string;
2911
+ object: {
2912
+ type: "MappedinLocation" | "MappedinCategory" | "Custom";
2913
+ id: string;
2914
+ };
2915
+ weight?: number | undefined;
2916
+ };
2917
+ };
2918
+ CLICK: {
2919
+ msgID?: string | undefined;
2920
+ data: {
2921
+ position: {
2922
+ latitude: number;
2923
+ longitude: number;
2924
+ };
2925
+ polygons: import("./types").TSerializedPolygon[];
2926
+ nearBlueDot: boolean;
2927
+ };
2928
+ };
2929
+ GET_POLYGONS_AT_COORDINATE: {
2930
+ msgID?: string | undefined;
2931
+ data: {
2932
+ coordinate: import("./types").TSerializedCoordinate;
2933
+ options?: import("../../core/packages/renderer").TGetPolygonsAtCoordinateOptions | undefined;
2934
+ };
2935
+ };
2936
+ }>;
2505
2937
  /**
2506
- * Called any time a user touches or clicks the map. Only fires on "single" touches/clicks.
2507
- *
2508
- * @param position Object containing the latitude & longitude of the location touched on the map
2509
- * @param polygons Array of polygon IDs that were touched, in order of front to back.
2510
- * @param nearBlueDot Whether the touch was close enough to the Blue Dot to be considered a touch on the Blue Dot.
2938
+ * Message received from the other side of the bridge
2939
+ * @hidden
2511
2940
  */
2512
- onMapClicked(position: {
2513
- latitude: number;
2514
- longitude: number;
2515
- }, polygons: string[], nearBlueDot: boolean): void;
2941
+ onMessageReceived<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload: {
2942
+ data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
2943
+ msgID?: string;
2944
+ }): void;
2516
2945
  /**
2517
- * This is called when an interactive Polygon is clicked on.
2518
- * You will almost certainly want to replace this with your own function in your client app.
2519
- * Return "false" if you have consumed the event and it shouldn't bubble down to other Polygons beneath this one.
2946
+ * Send a message to the other side of the bridge
2520
2947
  *
2521
- * @param polygonId polygonId passed in when tapping an interactive polygon
2522
- */
2523
- onPolygonClicked(polygonId: string): boolean | void;
2524
- onMapChanged(map: string): void;
2525
- getPositionLatLon(lat: number, lon: number, map?: MappedinMap | string): Vector3;
2526
- getPositionPolygon(polygon: MappedinPolygon | string): Vector3;
2527
- /**
2528
- * Takes an x/y pair in Mappedin coordinate space and gives you a Vector3 in scene space
2529
- * @param nodeOrCoordinate a node or coordinate
2948
+ * @hidden
2530
2949
  */
2531
- convertTo3DMapPosition(nodeOrCoordinate: MappedinCoordinate | MappedinNode): Vector3;
2950
+ sendMessage<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: {
2951
+ msgID?: string;
2952
+ data: BRIDGE_EVENT_PAYLOADS[EVENT_NAME] | null;
2953
+ }): void;
2532
2954
  /**
2533
- * Converts a Vector-like object into a MappedinCoordinate for a map.
2534
- * @param position an object with x and y, like a Vector3
2535
- * @param mapClass An optional map; otherwise, the current map will be used.
2955
+ * Handle resolution from the other side, with a value if one was expected
2956
+ * @hidden
2536
2957
  */
2537
- convert3DMapPositionToCoordinate(position: {
2538
- x: number;
2539
- y: number;
2540
- }, mapClass?: MappedinMap): MappedinCoordinate;
2541
- setPadding(padding: {
2542
- top: number;
2543
- left: number;
2544
- bottom: number;
2545
- right: number;
2546
- }): void;
2958
+ protected handleResolution: <EVENT_NAME extends BRIDGE_EVENT>(payload: {
2959
+ msgID: string;
2960
+ data: {
2961
+ payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
2962
+ };
2963
+ }) => void;
2547
2964
  /**
2548
- * This is fired when the user taps/clicks on the MapView without hitting an interactive Polygon.
2549
- * You will almost certainly want to replace this with your own function in your client app.
2550
- * You would probably use this to clear any Polygon highlighting, in certain situations.
2965
+ * Handle rejection from the other side, typically when the request results in an error
2966
+ * @hidden
2551
2967
  */
2552
- onNothingClicked(): void;
2553
- smartCollisionEngine: any;
2554
- mapObjects: any;
2968
+ protected handleRejection: <EVENT_NAME extends BRIDGE_EVENT>(payload: {
2969
+ msgID: string;
2970
+ data: {
2971
+ payload: BRIDGE_EVENT_PAYLOADS[EVENT_NAME];
2972
+ };
2973
+ }) => void;
2555
2974
  /**
2556
- * The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about,
2557
- * but if you are doing something weird, or have your own special tween for something, you will want to call this function.
2558
- * 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.
2559
- * Ignored in 2D.
2975
+ * Emitting a message without expecting a response
2976
+ * @hidden
2560
2977
  */
2561
- tryRendering(renderMode?: typeof RENDER): void;
2562
- setMap(mapOrMapId: MappedinMap | string): Promise<null>;
2563
- getPositionNode(node: MappedinNode): Vector3;
2564
- cameraObject: any;
2565
- setBackgroundColor(color: number | string, alpha?: number): void;
2566
- mapManager: any;
2567
- focusOn(focusOptions: TFocusOptionsLegacy): Tween;
2568
- canvasWidth: number;
2569
- canvasHeight: number;
2978
+ emit<EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): void;
2570
2979
  /**
2571
- * Resets the MapView to the default state.
2980
+ * Emitting a message and waiting for a reponse, via a promise
2981
+ * @hidden
2572
2982
  */
2573
- resetState(): void;
2574
- destroy(): void;
2983
+ emitAsync<T, EVENT_NAME extends keyof BRIDGE_EVENT_PAYLOADS>(eventName: EVENT_NAME, payload?: BRIDGE_EVENT_PAYLOADS[EVENT_NAME], msgID?: string): Promise<T>;
2575
2984
  }
2576
2985
  }
2577
2986
 
@@ -2590,6 +2999,9 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.type
2590
2999
  };
2591
3000
  venue: string;
2592
3001
  things?: any;
3002
+ useDraftData?: boolean;
3003
+ platformString?: string;
3004
+ emitAnalyticsEvents?: boolean;
2593
3005
  };
2594
3006
  export type TGetVenueOptionsInternal = {
2595
3007
  baseUrl?: string;
@@ -2598,10 +3010,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.type
2598
3010
  includeHidden?: boolean;
2599
3011
  apiGateway?: string;
2600
3012
  authorization?: string;
2601
- /**
2602
- * @deprecated 2D support will be removed in the future
2603
- */
2604
- do2D?: boolean;
2605
3013
  things?: any;
2606
3014
  headers?: any;
2607
3015
  };
@@ -2634,7 +3042,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2634
3042
  import { MappedinTheme } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinTheme';
2635
3043
  import { MappedinVenue } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVenue';
2636
3044
  import { MappedinVortex } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinVortex';
2637
- import Analytics from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Analytics';
3045
+ import { IAnalytics } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Analytics';
2638
3046
  export const defaultOptions: TGetVenueOptionsInternal & TGetVenueOptions;
2639
3047
  export enum MappedinCollectionType {
2640
3048
  CATEGORY = "categories",
@@ -2668,7 +3076,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2668
3076
  mapGroups: typeof MappedinMapGroup;
2669
3077
  themes: typeof MappedinTheme;
2670
3078
  locationStates: typeof MappedinLocationState;
2671
- locationRankings: typeof MappedinLocationRankings;
2672
3079
  rankings: typeof MappedinRankings;
2673
3080
  };
2674
3081
  export type TTHINGS = keyof typeof THINGS;
@@ -2689,15 +3096,11 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2689
3096
  mapGroups: MappedinMapGroup[];
2690
3097
  themes: MappedinTheme[];
2691
3098
  locationStates: MappedinLocationState[];
2692
- /**
2693
- * @deprecated use polygonRankings instead
2694
- * TODO: remove when we know that nobody is using this
2695
- */
2696
- locationRankings: MappedinLocationRankings[];
2697
3099
  rankings?: MappedinRankings;
2698
3100
  /**
2699
3101
  * @hidden
2700
3102
  * @internal
3103
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2701
3104
  */
2702
3105
  _categoriesById?: {
2703
3106
  [id: string]: MappedinCategory;
@@ -2705,6 +3108,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2705
3108
  /**
2706
3109
  * @hidden
2707
3110
  * @internal
3111
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2708
3112
  */
2709
3113
  _locationsById?: {
2710
3114
  [id: string]: MappedinLocation;
@@ -2712,6 +3116,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2712
3116
  /**
2713
3117
  * @hidden
2714
3118
  * @internal
3119
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2715
3120
  */
2716
3121
  _vortexesById?: {
2717
3122
  [id: string]: MappedinVortex;
@@ -2719,6 +3124,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2719
3124
  /**
2720
3125
  * @hidden
2721
3126
  * @internal
3127
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2722
3128
  */
2723
3129
  _mapsById?: {
2724
3130
  [id: string]: MappedinMap;
@@ -2726,6 +3132,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2726
3132
  /**
2727
3133
  * @hidden
2728
3134
  * @internal
3135
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2729
3136
  */
2730
3137
  _nodesById?: {
2731
3138
  [id: string]: MappedinNode;
@@ -2733,6 +3140,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2733
3140
  /**
2734
3141
  * @hidden
2735
3142
  * @internal
3143
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2736
3144
  */
2737
3145
  _polygonsById?: {
2738
3146
  [id: string]: MappedinPolygon;
@@ -2740,6 +3148,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2740
3148
  /**
2741
3149
  * @hidden
2742
3150
  * @internal
3151
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2743
3152
  */
2744
3153
  _eventsById?: {
2745
3154
  [id: string]: MappedinEvent;
@@ -2747,6 +3156,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2747
3156
  /**
2748
3157
  * @hidden
2749
3158
  * @internal
3159
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2750
3160
  */
2751
3161
  _mapGroupsById?: {
2752
3162
  [id: string]: MappedinMapGroup;
@@ -2754,6 +3164,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2754
3164
  /**
2755
3165
  * @hidden
2756
3166
  * @internal
3167
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2757
3168
  */
2758
3169
  _locationStatesById?: {
2759
3170
  [id: string]: MappedinLocationState;
@@ -2761,6 +3172,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2761
3172
  /**
2762
3173
  * @hidden
2763
3174
  * @internal
3175
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2764
3176
  */
2765
3177
  _locationRankingsById?: {
2766
3178
  [id: string]: MappedinLocationRankings;
@@ -2768,6 +3180,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2768
3180
  /**
2769
3181
  * @hidden
2770
3182
  * @internal
3183
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2771
3184
  */
2772
3185
  _rankingsById?: {
2773
3186
  [id: string]: MappedinRankings;
@@ -2775,6 +3188,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2775
3188
  /**
2776
3189
  * @hidden
2777
3190
  * @internal
3191
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2778
3192
  */
2779
3193
  _categoriesByExternalId?: {
2780
3194
  [id: string]: MappedinCategory;
@@ -2782,6 +3196,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2782
3196
  /**
2783
3197
  * @hidden
2784
3198
  * @internal
3199
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2785
3200
  */
2786
3201
  _locationsByExternalId?: {
2787
3202
  [id: string]: MappedinLocation;
@@ -2789,6 +3204,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2789
3204
  /**
2790
3205
  * @hidden
2791
3206
  * @internal
3207
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2792
3208
  */
2793
3209
  _vortexesByExternalId?: {
2794
3210
  [id: string]: MappedinVortex;
@@ -2796,6 +3212,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2796
3212
  /**
2797
3213
  * @hidden
2798
3214
  * @internal
3215
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2799
3216
  */
2800
3217
  _mapsByExternalId?: {
2801
3218
  [id: string]: MappedinMap;
@@ -2803,6 +3220,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2803
3220
  /**
2804
3221
  * @hidden
2805
3222
  * @internal
3223
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2806
3224
  */
2807
3225
  _nodesByExternalId?: {
2808
3226
  [id: string]: MappedinNode;
@@ -2810,6 +3228,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2810
3228
  /**
2811
3229
  * @hidden
2812
3230
  * @internal
3231
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2813
3232
  */
2814
3233
  _polygonsByExternalId?: {
2815
3234
  [id: string]: MappedinPolygon;
@@ -2817,6 +3236,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2817
3236
  /**
2818
3237
  * @hidden
2819
3238
  * @internal
3239
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2820
3240
  */
2821
3241
  _eventsByExternalId?: {
2822
3242
  [id: string]: MappedinEvent;
@@ -2824,6 +3244,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2824
3244
  /**
2825
3245
  * @hidden
2826
3246
  * @internal
3247
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2827
3248
  */
2828
3249
  _mapGroupsByExternalId?: {
2829
3250
  [id: string]: MappedinMapGroup;
@@ -2831,6 +3252,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2831
3252
  /**
2832
3253
  * @hidden
2833
3254
  * @internal
3255
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2834
3256
  */
2835
3257
  _locationStatesByExternalId?: {
2836
3258
  [id: string]: MappedinLocationState;
@@ -2838,6 +3260,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2838
3260
  /**
2839
3261
  * @hidden
2840
3262
  * @internal
3263
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2841
3264
  */
2842
3265
  _locationRankingsByExternalId?: {
2843
3266
  [id: string]: MappedinLocationRankings;
@@ -2845,6 +3268,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2845
3268
  /**
2846
3269
  * @hidden
2847
3270
  * @internal
3271
+ * @deprecated Use {@link Mappedin.getCollectionItemById} instead
2848
3272
  */
2849
3273
  _rankingsByExternalId?: {
2850
3274
  [id: string]: MappedinRankings;
@@ -2867,7 +3291,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2867
3291
  scenes: any;
2868
3292
  fetch(): Promise<void>;
2869
3293
  constructor(options: TGetVenueOptionsInternal & TGetVenueOptions);
2870
- analytics: Analytics;
3294
+ analytics: IAnalytics;
2871
3295
  /**
2872
3296
  * @hidden
2873
3297
  */
@@ -2885,11 +3309,12 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin' {
2885
3309
  }
2886
3310
 
2887
3311
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation' {
2888
- import type { TCategory, TLocation, TColor, TGalleryImage, TLogo, TOpeningHours, TPhone, TPicture, TSiblingGroup, TSocial } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.types';
3312
+ import type { TLocation, TColor, TGalleryImage, TLogo, TOpeningHours, TPhone, TPicture, TSiblingGroup, TSocial } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.types';
2889
3313
  import type { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
2890
3314
  import type { MappedinLocationState } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocationState';
2891
3315
  import type { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode';
2892
3316
  import type { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolygon';
3317
+ import type { MappedinCategory } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCategory';
2893
3318
  import { MappedinNavigatable } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavigatable';
2894
3319
  export function getCurrentLocationState(location: MappedinLocation, states: MappedinLocationState[], date?: Date): MappedinLocationState | undefined;
2895
3320
  export type TOperationHoursMap = {
@@ -2938,7 +3363,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocat
2938
3363
  siblingGroups?: TSiblingGroup[] | undefined;
2939
3364
  gallery?: TGalleryImage[] | undefined;
2940
3365
  constructor(mappedin: Mappedin, data: any);
2941
- categories: TCategory['id'][];
2942
3366
  /**
2943
3367
  * Polygons this Location is attached to.
2944
3368
  *
@@ -2947,10 +3371,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocat
2947
3371
  */
2948
3372
  get polygons(): MappedinPolygon[];
2949
3373
  set polygons(polygons: MappedinPolygon[]);
2950
- /**
2951
- * Ranking for this location.
2952
- */
2953
- get rank(): number | null;
2954
3374
  /**
2955
3375
  * Nodes this Location is attached to.
2956
3376
  *
@@ -2967,6 +3387,13 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocat
2967
3387
  */
2968
3388
  get parent(): MappedinLocation | undefined;
2969
3389
  set parent(parent: MappedinLocation | undefined);
3390
+ /**
3391
+ * Categories related to this location.
3392
+ *
3393
+ * @property categories
3394
+ * @type [MappedinCategory]
3395
+ */
3396
+ get categories(): MappedinCategory[];
2970
3397
  get state(): MappedinLocationState | undefined;
2971
3398
  clone(): MappedinLocation;
2972
3399
  get nodeOperationHours(): TOperationHoursMap;
@@ -2981,6 +3408,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolyg
2981
3408
  import type { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
2982
3409
  import type { MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode';
2983
3410
  import { MappedinNavigatable } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavigatable';
3411
+ import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap';
2984
3412
  /**
2985
3413
  * The {@link MappedinPolygon} class represents the 3D shape of a {@link MappedinLocation} on a {{@link MappedinMap}. Polygons have access to Locations they belong to, and any entrances to the Polygon.
2986
3414
  *
@@ -2991,6 +3419,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolyg
2991
3419
  export class MappedinPolygon extends MappedinNavigatable {
2992
3420
  #private;
2993
3421
  geometry: any;
3422
+ perspectives?: any;
2994
3423
  image?: {
2995
3424
  visible: boolean;
2996
3425
  url: string | Blob;
@@ -3051,12 +3480,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolyg
3051
3480
  * @property id {string}
3052
3481
  */
3053
3482
  id: string;
3054
- /**
3055
- * ID of Map that Polygon is located on.
3056
- *
3057
- * @property map {string}
3058
- */
3059
- map: string;
3060
3483
  layer?: string;
3061
3484
  layerId?: string;
3062
3485
  name?: string;
@@ -3074,6 +3497,12 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolyg
3074
3497
  y: number;
3075
3498
  };
3076
3499
  constructor(mappedin: Mappedin, data: any);
3500
+ /**
3501
+ * Map Object that this Polygon is located on.
3502
+ *
3503
+ * @property map {MappedinMap}
3504
+ */
3505
+ get map(): MappedinMap;
3077
3506
  /**
3078
3507
  * Locations attached to the Polygon.
3079
3508
  *
@@ -3101,11 +3530,12 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolyg
3101
3530
  }
3102
3531
 
3103
3532
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode' {
3104
- import type { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolygon';
3105
3533
  import type { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
3534
+ import type { MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinPolygon';
3106
3535
  import type { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
3107
3536
  import type { TOpeningHours } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.API.types';
3108
3537
  import { MappedinNavigatable } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavigatable';
3538
+ import { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap';
3109
3539
  /**
3110
3540
  * A {@link MappedinNode} represents a position, anchored to a specific {@link MappedinMap}.
3111
3541
  *
@@ -3120,12 +3550,6 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode'
3120
3550
  * @property id {string}
3121
3551
  */
3122
3552
  id: string;
3123
- /**
3124
- * ID of Map that the Node is located on.
3125
- *
3126
- * @property map {string}
3127
- */
3128
- map: string;
3129
3553
  /**
3130
3554
  * X coordinate of Node's position.
3131
3555
  * @property x {number}
@@ -3142,6 +3566,12 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNode'
3142
3566
  operationHours?: TOpeningHours[];
3143
3567
  externalId?: string;
3144
3568
  constructor(mappedin: Mappedin, data: any);
3569
+ /**
3570
+ * Map Object that this Node is located on.
3571
+ *
3572
+ * @property map {MappedinMap}
3573
+ */
3574
+ get map(): MappedinMap;
3145
3575
  /**
3146
3576
  * Latitude of node. This is expensive, especially if doing it for many/all nodes
3147
3577
  */
@@ -3538,6 +3968,21 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinDirec
3538
3968
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoordinate' {
3539
3969
  import { Mappedin, MappedinNode } from '@mappedin/react-native-sdk/core/packages/get-venue';
3540
3970
  import type { MappedinMap } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinMap';
3971
+ export type TMappedinCoordinateOptions = {
3972
+ map: MappedinMap;
3973
+ mappedin: Mappedin;
3974
+ x: number;
3975
+ y: number;
3976
+ lat?: undefined;
3977
+ lon?: undefined;
3978
+ } | {
3979
+ map: MappedinMap;
3980
+ mappedin: Mappedin;
3981
+ x?: undefined;
3982
+ y?: undefined;
3983
+ lat: number;
3984
+ lon: number;
3985
+ };
3541
3986
  /**
3542
3987
  * A {@link MappedinCoordinate} represents a coordinate on a map, created using lat/lon.
3543
3988
  *
@@ -3546,30 +3991,33 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoord
3546
3991
  export class MappedinCoordinate {
3547
3992
  #private;
3548
3993
  /**
3549
- * ID of Map that the Node is located on.
3994
+ * The Map that the Node is located on.
3550
3995
  *
3551
- * @property map {string}
3996
+ * @property map {MappedinMap}
3552
3997
  */
3553
- map: string;
3998
+ map: MappedinMap;
3554
3999
  /**
3555
4000
  * X coordinate in Mappedin Units
3556
4001
  * @property x {number}
3557
4002
  */
3558
- x: number;
4003
+ get x(): number;
3559
4004
  /**
3560
4005
  * Y coordinate in Mappedin Units
3561
4006
  * @property y {number}
3562
4007
  */
3563
- y: number;
4008
+ get y(): number;
3564
4009
  /**
3565
4010
  * Latitude
3566
4011
  */
3567
- lat: number;
4012
+ get lat(): number;
3568
4013
  /**
3569
4014
  * Longitude
3570
4015
  */
3571
- lon: number;
3572
- constructor(lat: number, lon: number, x: number, y: number, map: MappedinMap | string, mappedin: Mappedin);
4016
+ get lon(): number;
4017
+ /**
4018
+ * @internal
4019
+ */
4020
+ constructor(options: TMappedinCoordinateOptions);
3573
4021
  /**
3574
4022
  *
3575
4023
  * Calculate distance between a coordinate and a {@link MappedinNode} or {@link MappedinCoordinate}
@@ -3582,6 +4030,13 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCoord
3582
4030
  * Get Nearest Node to Coordinate, which can then be used for navigation
3583
4031
  */
3584
4032
  get nearestNode(): MappedinNode;
4033
+ toJSON(): {
4034
+ x: number;
4035
+ y: number;
4036
+ map: MappedinMap;
4037
+ lat: number;
4038
+ lon: number;
4039
+ };
3585
4040
  }
3586
4041
  }
3587
4042
 
@@ -3649,15 +4104,233 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinNavig
3649
4104
  directionsTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options?: TDirectionToOptions): MappedinDirections;
3650
4105
  directionsTo(destination: MappedinDestinationSet, options?: TDirectionToOptions): MappedinDirections[];
3651
4106
  /**
3652
- *
3653
- * Calculate distance between 2 nodes, polygons or locations
4107
+ *
4108
+ * Calculate distance between 2 nodes, polygons or locations
4109
+ */
4110
+ distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options: TDirectionToOptions): number;
4111
+ }
4112
+ }
4113
+
4114
+ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.OfflineSearch' {
4115
+ import { Mappedin } from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin';
4116
+ import type { SearchOptions } from 'minisearch';
4117
+ import { MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinLocation';
4118
+ import { MappedinCategory } from '@mappedin/react-native-sdk/core/packages/get-venue/MappedinCategory';
4119
+ export const removeAccents: (it: string) => string;
4120
+ export type { SearchOptions };
4121
+ /**
4122
+ * A {@link Mappedin.OfflineSearch} is an offline search module
4123
+ *
4124
+ *
4125
+ * @class Mappedin.OfflineSearch
4126
+ */
4127
+ export type TMappedinOfflineSearchAllOptions = {
4128
+ /**
4129
+ * Array of stopwords to ignore when searching, default: english stopwords
4130
+ */
4131
+ stopWords?: string[];
4132
+ /**
4133
+ * Index location tags - typically better to use either tags or descriptions, depending on what's available
4134
+ * @default true
4135
+ */
4136
+ searchTags?: boolean;
4137
+ /**
4138
+ * Index location descriptions - typically better to use either tags or descriptions, depending on what's available
4139
+ * @default true
4140
+ */
4141
+ searchDescriptions?: boolean;
4142
+ /**
4143
+ * Also index all tags for every location in every category (caution: this may slow down indexing and search)
4144
+ * @default false
4145
+ */
4146
+ searchTagsInCategories?: boolean;
4147
+ /**
4148
+ * Also index all tags for every location in every category (caution: this may slow down indexing and search)
4149
+ * @default false
4150
+ */
4151
+ searchDescriptionsInCategories?: boolean;
4152
+ /**
4153
+ * Initialize Search with a previously indexed JSON string (outputted by OfflineSearch.toJSON())
4154
+ */
4155
+ jsonIndex?: string;
4156
+ /**
4157
+ * Use the location polygons' rank in weighing results
4158
+ */
4159
+ useLocationRank?: boolean;
4160
+ /**
4161
+ * Emit Analytics events when doing search
4162
+ * @default true when running in production
4163
+ */
4164
+ emitAnalyticsEvents?: boolean;
4165
+ /**
4166
+ * Fine tune search constants
4167
+ */
4168
+ constants: {
4169
+ /**
4170
+ * Fuzziness index for location names and tags
4171
+ * @default 0.09
4172
+ */
4173
+ PRIMARY_INDEX_FUZZYNESS: number;
4174
+ /**
4175
+ * Multiplier for location names (1 by default)
4176
+ * @default 1
4177
+ */
4178
+ PRIMARY_INDEX_WEIGHT: number;
4179
+ /**
4180
+ * Multiplier for descriptions
4181
+ * @default 0.025
4182
+ */
4183
+ SECONDARY_INDEX_WEIGHT: number;
4184
+ /**
4185
+ * Multiplier for location names
4186
+ * @default 1
4187
+ */
4188
+ LOCATION_NAME_WEIGHT: number;
4189
+ /**
4190
+ * Multiplier for category names
4191
+ * @default 0.5
4192
+ */
4193
+ CATEGORY_NAME_WEIGHT: number;
4194
+ /**
4195
+ * Multiplier for category locations' descriptions
4196
+ * @default 0.0005
4197
+ */
4198
+ CATEGORY_LOCATION_DESCRIPTION_WEIGHT: number;
4199
+ /**
4200
+ * Multiplier for category locations' tags
4201
+ * @default 0.0005
4202
+ */
4203
+ CATEGORY_LOCATION_TAGS_WEIGHT: number;
4204
+ /**
4205
+ * Multiplier for category locations' names
4206
+ * @default 0.01
4207
+ */
4208
+ CATEGORY_LOCATION_NAME_WEIGHT: number;
4209
+ /**
4210
+ * Multiplier for location tags
4211
+ * @default 0.05
4212
+ */
4213
+ PRIMARY_INDEX_TAGS_NAME_WEIGHT: number;
4214
+ /**
4215
+ * Default rank when one isn't available in the data, default = 1
4216
+ * @default 1
4217
+ */
4218
+ LOCATION_DEFAULT_RANK: number;
4219
+ /**
4220
+ * Ratio of Fuzzy Searches of Location names and tags relative to exact
4221
+ * @default 0.01
4222
+ */
4223
+ RATIO_OF_FUZZY_TO_EXACT: number;
4224
+ /**
4225
+ * Ratio of Prefix Searches of Location names and tags relative to exact
4226
+ * @default 0.2
4227
+ */
4228
+ RATIO_OF_PREFIX_TO_EXACT: number;
4229
+ };
4230
+ };
4231
+ export type TMappedinOfflineAllSearchMatch = {
4232
+ /**
4233
+ * The term that was found
4234
+ */
4235
+ term: string;
4236
+ /**
4237
+ * Term's weight
4238
+ */
4239
+ weight: number;
4240
+ /**
4241
+ * What field the search matched on
4242
+ */
4243
+ matchesOn: string;
4244
+ /**
4245
+ * The value of that field
4246
+ */
4247
+ value?: string;
4248
+ };
4249
+ export type TMappedinOfflineSearchOptions = Partial<TMappedinOfflineSearchAllOptions>;
4250
+ export type TMappedinOfflineSearchResult = {
4251
+ /**
4252
+ * Type describing the object
4253
+ */
4254
+ type: 'MappedinLocation' | 'MappedinCategory' | 'Custom';
4255
+ /**
4256
+ * Details on why the result was returned
4257
+ */
4258
+ matches: TMappedinOfflineAllSearchMatch[];
4259
+ /**
4260
+ * Found object
4261
+ */
4262
+ object: MappedinLocation | MappedinCategory | Record<string, unknown>;
4263
+ /**
4264
+ * Total score of the result
4265
+ */
4266
+ score: number;
4267
+ };
4268
+ export type TMappedinOfflineSearchSuggestions = {
4269
+ /**
4270
+ * Total number of suggestions generated
4271
+ */
4272
+ total: number;
4273
+ /**
4274
+ * List of suggestions
4275
+ */
4276
+ hits: {
4277
+ /**
4278
+ * Suggestion text
4279
+ */
4280
+ text: string;
4281
+ }[];
4282
+ };
4283
+ /**
4284
+ * A {@link OfflineSearch} is an offline search module. It can be initialized at any time by passing the {@link Mappedin} object and a set of {@link TMappedinOfflineSearchOptions} options.
4285
+ *
4286
+ *
4287
+ * @class Mappedin.OfflineSearch
4288
+ */
4289
+ export class OfflineSearch {
4290
+ #private;
4291
+ constructor(
4292
+ /**
4293
+ * Mappedin Venue Object, typically returned by `getVenue`/`showVenue`
4294
+ */
4295
+ mappedin: Mappedin, options?: TMappedinOfflineSearchOptions);
4296
+ /**
4297
+ * Get Suggestions for term
4298
+ */
4299
+ suggest(
4300
+ /**
4301
+ * Search term
4302
+ */
4303
+ term: string): Promise<TMappedinOfflineSearchSuggestions>;
4304
+ /**
4305
+ * Search for a term
4306
+ */
4307
+ search(
4308
+ /**
4309
+ * Search term
4310
+ */
4311
+ term: string): Promise<TMappedinOfflineSearchResult[]>;
4312
+ /**
4313
+ * Export search index to JSON for storage/caching - this would avoid having to re-index
4314
+ * on page reload
3654
4315
  */
3655
- distanceTo(destination: MappedinNode | MappedinLocation | MappedinPolygon, options: TDirectionToOptions): number;
4316
+ toJSON(): Promise<string>;
3656
4317
  /**
3657
- *
3658
- * @deprecated
4318
+ * Add a custom query to the search index
3659
4319
  */
3660
- directionsToCallback(destination: MappedinNode | MappedinLocation | MappedinPolygon, options: TDirectionToOptions): MappedinDirections | undefined;
4320
+ addQuery(params: {
4321
+ /**
4322
+ * Query string to match for this object
4323
+ */
4324
+ query: string;
4325
+ /**
4326
+ * Object that is returned when query matches
4327
+ */
4328
+ object: MappedinLocation | MappedinCategory | Record<string, unknown>;
4329
+ /**
4330
+ * Optional weight to multiply by the score
4331
+ */
4332
+ weight?: number;
4333
+ }): Promise<void>;
3661
4334
  }
3662
4335
  }
3663
4336
 
@@ -3981,6 +4654,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
3981
4654
  };
3982
4655
  };
3983
4656
  export type TFloatingLabelOptionsInternal = {
4657
+ id: string;
3984
4658
  position?: Vector3;
3985
4659
  polygon: MappedinPolygon;
3986
4660
  polygonHeight?: number;
@@ -4010,6 +4684,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4010
4684
  contextConfigured: boolean;
4011
4685
  fillText: TDrawFn | undefined;
4012
4686
  newStyle: {};
4687
+ static testId: number;
4013
4688
  style: TStyle;
4014
4689
  setColor: () => void;
4015
4690
  clearColor: () => void;
@@ -4111,7 +4786,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4111
4786
  map: MappedinMap | null;
4112
4787
  bearing: any;
4113
4788
  nearestNode: any;
4114
- error: string | null;
4115
4789
  };
4116
4790
  export interface IBlueDotCore extends IPubSub {
4117
4791
  positionUpdater: IPositionUpdater | null;
@@ -4146,11 +4820,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4146
4820
  The direction the user is moving.
4147
4821
  */
4148
4822
  bearing: any;
4149
- /**
4150
- The reason there's no blue dot available.
4151
- @deprecated Use state.reason && state.message instead
4152
- */
4153
- error: string | null;
4154
4823
  /**
4155
4824
  Everything in one object, for convenience.
4156
4825
  */
@@ -4192,6 +4861,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4192
4861
  */
4193
4862
  message?: GeolocationPositionError | string;
4194
4863
  };
4864
+ export const FALLBACK_TO_GPS_TIMEOUT = 10000;
4195
4865
  type TBlueDotProps = {
4196
4866
  data: any;
4197
4867
  mapView: MapView;
@@ -4421,6 +5091,63 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4421
5091
  export {};
4422
5092
  }
4423
5093
 
5094
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/Labels/FlatLabelsController' {
5095
+ import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
5096
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
5097
+ import { TAddFlatLabelOptions, MappedinPolygon, TFlatLabelAllLocationsOptions, TFlatLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer';
5098
+ import { FlatLabel } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.LabelAtlas';
5099
+ export type FlatLabelRenderObject = TAddFlatLabelOptions & {
5100
+ polygon: MappedinPolygon;
5101
+ text: string;
5102
+ shortText?: string;
5103
+ stateText?: string;
5104
+ distance?: number;
5105
+ showLabelWhenImagePresent?: boolean;
5106
+ };
5107
+ class FlatLabelController {
5108
+ #private;
5109
+ constructor(mapView: MapView, core: ICore);
5110
+ flatLabels: {
5111
+ [key in MappedinPolygon['id']]: FlatLabel;
5112
+ };
5113
+ labeledPolygons: {};
5114
+ labelAllLocations(options?: TFlatLabelAllLocationsOptions): FlatLabel[];
5115
+ labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], text: string, options?: TAddFlatLabelOptions): FlatLabel;
5116
+ removeLabel(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id']): void;
5117
+ setAppearance(polygon: MappedinPolygon, appearance: TFlatLabelAppearance): void;
5118
+ removeAllLabels(): void;
5119
+ }
5120
+ export default FlatLabelController;
5121
+ }
5122
+
5123
+ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/Labels/FloatingLabelController' {
5124
+ import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
5125
+ import FloatingLabel from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel';
5126
+ import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
5127
+ import { TFloatingLabelAllLocationsOptions, MappedinPolygon, MappedinNode, TAddFloatingLabelOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
5128
+ export type TLabelRenderOptions = {
5129
+ polygon: MappedinPolygon;
5130
+ rank: number;
5131
+ entranceNode: MappedinNode;
5132
+ text: string;
5133
+ createDespiteImage: boolean | undefined;
5134
+ };
5135
+ class FloatingLabelController {
5136
+ #private;
5137
+ constructor(mapView: MapView, core: ICore);
5138
+ addLabel(polygonOrNode: MappedinPolygon | MappedinNode, text: string, options?: TAddFloatingLabelOptions): FloatingLabel | FloatingLabel[] | null;
5139
+ removeLabel(polygonOrNode: MappedinPolygon | MappedinNode, bulk?: boolean): void;
5140
+ setPriority(polygonOrNode: MappedinPolygon | MappedinNode, rank: number): void;
5141
+ resetPriority(polygonOrNode: MappedinPolygon | MappedinNode): void;
5142
+ removeAllLabels(): void;
5143
+ labelAllLocations(options?: TFloatingLabelAllLocationsOptions): FloatingLabel[];
5144
+ floatingLabels: {
5145
+ [key in MappedinNode['id']]: FloatingLabel;
5146
+ };
5147
+ }
5148
+ export default FloatingLabelController;
5149
+ }
5150
+
4424
5151
  declare module '@mappedin/react-native-sdk/core/packages/navigator/NavigationGraph' {
4425
5152
  import Edge from '@mappedin/react-native-sdk/core/packages/navigator/Edge';
4426
5153
  import IMap from '@mappedin/react-native-sdk/core/packages/navigator/interfaces/IMap';
@@ -4608,17 +5335,17 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
4608
5335
  declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4609
5336
  import './internal/Mappedin.css';
4610
5337
  import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/react-native-sdk/core/packages/get-venue';
4611
- import { E_SDK_EVENT_PAYLOAD, TCreateCustomInnerHTMLTooltipOptions, TCreateCustomTooltipOptions, TCreateMarkerOptions, TCreateTextTooltipOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TFloatingLabelPolygonOptions, TMapViewOptions, TPathOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
5338
+ import { E_SDK_EVENT_PAYLOAD, TCreateCustomInnerHTMLTooltipOptions, TCreateCustomTooltipOptions, TCreateMarkerOptions, TCreateTextTooltipOptions, TLabelAllLocationFlatLabelOptions, TLabelAllLocationFloatingLabelOptions, TMapViewOptions, TPathOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4612
5339
  import { E_SDK_EVENT, STATE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
4613
- import FloatingLabel from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.FloatingLabel';
4614
5340
  import Marker from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker';
4615
5341
  import SmartTooltip from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.SmartTooltip';
4616
5342
  import Camera from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
4617
5343
  import { PubSub } from '@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub.typed';
4618
5344
  import BlueDotLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/BlueDot';
4619
5345
  import JourneyLayer from '@mappedin/react-native-sdk/core/packages/renderer/layers/Journey';
4620
- import { ThreeJSMarkerHandle } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject';
4621
- import { TCreateThreeDMarkerOptions, TFlatLabel, TFlatLabelPolygonOptions, TFloatingLabel } from '@mappedin/react-native-sdk/core/packages/renderer';
5346
+ import { TGetPolygonsAtCoordinateOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
5347
+ import { IFlatLabels } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.FlatLabels';
5348
+ import { IFloatingLabels } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.FloatingLabels';
4622
5349
  export enum INTERNAL_EVENT {
4623
5350
  CAMERA_MOVING = 0,
4624
5351
  SET_BLUE_DOT_SIZE_FROM_ZOOM = 1,
@@ -4648,33 +5375,20 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4648
5375
  BlueDot: BlueDotLayer;
4649
5376
  Journey: JourneyLayer;
4650
5377
  Camera: Camera;
5378
+ FlatLabels: IFlatLabels<void>;
5379
+ FloatingLabels: IFloatingLabels<void>;
4651
5380
  options: TMapViewOptions;
4652
5381
  constructor(container: HTMLElement, venue: Mappedin, options?: TMapViewOptions & {
4653
5382
  onFirstMapLoaded: () => void;
4654
5383
  });
4655
5384
  /**
4656
- * Label all Locations using 2D floating labels
4657
- */
4658
- labelAllLocations(options?: TLabelAllLocationFloatingLabelOptions): FloatingLabel[];
4659
- /**
4660
- * Labels all Locations, in order of distance from the center of the Map. See {@link MapView.labelPolygon} for available label options.
4661
- * The options are all optional, as the text and Polygon properties will be set for each Location.
4662
- */
4663
- labelAllLocations(options?: TLabelAllLocationFlatLabelOptions): TFlatLabel[];
4664
- /**
4665
- * Labels a specific Polygon using a floating 2D label that remains the same size regardless of zoom
4666
- */
4667
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TFloatingLabelPolygonOptions): TFloatingLabel;
4668
- /**
4669
- * Labels a specific Polygon (or area of 3D space) with a TextLabel that lives in 3D space. That means it will be smaller when the camera is further away, and the angle you see it at will change with the camera.
4670
- * The text will flip 180 degrees when the camera rotates so it's never totally upside-down.
4671
- *
4672
- * It also sets the hover label (in 2D and 3D).
4673
- * Many of these options do nothing in 2D, as TextLabels are not supported, but it won't break anything.
5385
+ * Label all locations using 2D floating labels (with options {@link TLabelAllLocationFloatingLabelOptions}),
5386
+ * or flat 3D labels on top of the polygons themselves (with options {@link TLabelAllLocationFlatLabelOptions})
4674
5387
  *
4675
- * You must provide text, and either a Polygon, or a canvasBounds and height
5388
+ * @deprecated Please use {@link FloatingLabels.labelAllLocations} or {@link FlatLabels.labelAllLocations} instead.
5389
+ * This may be removed in a future version of the SDK. The array this returns is now always empty.
4676
5390
  */
4677
- labelPolygon(polygonOrPolygonId: MappedinPolygon | MappedinPolygon['id'], options: TFlatLabelPolygonOptions): TFlatLabel;
5391
+ labelAllLocations(options?: TLabelAllLocationFloatingLabelOptions | TLabelAllLocationFlatLabelOptions): never[];
4678
5392
  /**
4679
5393
  * Get Nearest Node to a screen coordinate x, y, map. Useful for doing directions from any place on the map
4680
5394
  *
@@ -4683,26 +5397,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4683
5397
  * @param mapOrMapId Map of MapId
4684
5398
  */
4685
5399
  getNearestNodeByScreenCoordinates(x: number, y: number, mapOrMapId?: MappedinMap | MappedinMap['id']): MappedinNode;
4686
- /**
4687
- * Add a ThreeJS object to the screen to be rendered on the marker layer.
4688
- */
4689
- createThreeJSMarker(options: TCreateThreeDMarkerOptions): ThreeJSMarkerHandle;
4690
- /**
4691
- * Remove a ThreeJS marker from the scene. This will be a no-op if the
4692
- * map object associated with the marker has been destroyed.
4693
- *
4694
- * @param markerHandle marker to remove
4695
- * @return true if the marker was removed, false if the marker or its map had already been removed
4696
- */
4697
- removeThreeJSMarker(markerHandle: ThreeJSMarkerHandle): boolean;
4698
- /**
4699
- * Remove all ThreeJS marker from the scene.
4700
- */
4701
- removeAllThreeJSMarkers(): void;
4702
5400
  /**
4703
5401
  * Unsubscribe from SDK events
4704
5402
  */
4705
- setState(state: STATE): void;
5403
+ setState(state: STATE): Promise<void>;
4706
5404
  get state(): STATE;
4707
5405
  /**
4708
5406
  * The Venue data this MapView is using.
@@ -4734,14 +5432,12 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4734
5432
  */
4735
5433
  setMap(mapOrMapId: MappedinMap | string): Promise<null>;
4736
5434
  /**
4737
- * Given a polygon/polygon id, set it to a specific color, and set any text label associated with that polygon to another color.
5435
+ * Given a polygon, set it to a specific color.
4738
5436
  *
4739
- * @param polygonOrPolygonId The Polygon/Polygon ID to change the color of.
5437
+ * @param polygon The Polygon ({@link MappedinPolygon}) to change the color of.
4740
5438
  * @param color The color to use.
4741
- * @param textColor
4742
- * @param opacity
4743
5439
  */
4744
- setPolygonColor(polygonOrPolygonId: MappedinPolygon | string, color: string, textColor?: string, opacity?: number): void;
5440
+ setPolygonColor(polygon: MappedinPolygon, color: string): void;
4745
5441
  /**
4746
5442
  * Resets a Polygon back to it's original color.
4747
5443
  * If the user is hovering over a polygon, it will still have the hover effect.
@@ -4797,35 +5493,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4797
5493
  * Remove all tooltips
4798
5494
  */
4799
5495
  removeAllTooltips(): void;
4800
- /**
4801
- * A polygon can have state that renders the concept of being "closed", which is a generic blanket
4802
- * term that can be used in general to inform the user that they can expect this polygon to not be
4803
- * servicing customers.
4804
- */
4805
- updateClosedStateForPolygon(options: {
4806
- /**
4807
- * The polygon or polygon id whose state is being updated.
4808
- */
4809
- polygon: MappedinPolygon | string;
4810
- /**
4811
- * If true, the polygon will be marked as being closed. If false, the polygon will be marked as being open.
4812
- */
4813
- closed: boolean;
4814
- /**
4815
- * If true, a convenience parameter that is the converse of `options.closed`. Note that if both are present, `closed` will receive higher precedence.
4816
- */
4817
- open?: boolean;
4818
- }): void;
4819
- /**
4820
- * As the name suggests, all polygons will have their "closed" state set to "opened".
4821
- *
4822
- */
4823
- openAllPolygons(): void;
4824
- /**
4825
- * Removes all labels from all Maps.
4826
- *
4827
- */
4828
- removeAllLabels(): void;
4829
5496
  /**
4830
5497
  *
4831
5498
  * This creates a tooltip that allows you to pass dynamic content which will attempt
@@ -4872,16 +5539,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4872
5539
  * Mark a specific Polygon so, if it has an image, it rotates with the camera.
4873
5540
  *
4874
5541
  */
4875
- enableImageFlippingForPolygon(options: {
4876
- /**
4877
- * The ID of the Polygon who's image (if any) should rotate.
4878
- */
4879
- polygonId: string;
4880
- /**
4881
- * The how much the image has been rotated so that it's "up". Determined from the Polygon object itself typically, but can be set manually if needed.
4882
- */
4883
- rotation?: number;
4884
- }): void;
5542
+ enableImageFlippingForPolygon(polygon: MappedinPolygon): void;
4885
5543
  disableImageFlippingForAllPolygons(): void;
4886
5544
  /**
4887
5545
  * Draws an entire path. It takes a list of Nodes and will break them into separate pathSegments on every map change, putting the resultant segment on the right Map.
@@ -4936,21 +5594,20 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
4936
5594
  * By default, this only considers interactive polygons.
4937
5595
  *
4938
5596
  * @param coordinate The MappedinCoordinate to check
4939
- * @param includeNonInteractive Specifies if all polygons should be included rather
4940
- * than just interactive polygons.
5597
+ * @param options {@link TGetPolygonsAtCoordinateOptions}
4941
5598
  * @returns MappedinPolygon[]
4942
5599
  */
4943
- getPolygonsAtCoordinate(coordinate: MappedinCoordinate, includeNonInteractive?: boolean): MappedinPolygon[];
5600
+ getPolygonsAtCoordinate(coordinate: MappedinCoordinate, options?: TGetPolygonsAtCoordinateOptions): MappedinPolygon[];
4944
5601
  /**
4945
- * Destroy instance and clean up memory
5602
+ * Destroy instance and reclaim memory. Note: this does not destroy the instance of {@link Mappedin}
5603
+ * that was passed in. For applications that require destroying and re-creating the mapView, it is
5604
+ * recommended to keep the {@link Mappedin} object around.
4946
5605
  */
4947
5606
  destroy(): void;
4948
5607
  }
4949
5608
  }
4950
5609
 
4951
5610
  declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4952
- import Search from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search';
4953
- import Analytics from '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Analytics';
4954
5611
  import { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
4955
5612
  import { getVenue, getVenueBundle, Mappedin, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, MappedinDestinationSet, MappedinMap, TGetVenueBundleOptions, TGetVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
4956
5613
  import { PositionUpdater } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.BlueDot/Mappedin.BlueDot.core';
@@ -4959,6 +5616,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4959
5616
  import { MARKER_ANCHOR } from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker';
4960
5617
  export { BEARING_TYPE, ACTION_TYPE } from '@mappedin/react-native-sdk/core/packages/navigator';
4961
5618
  export type { IDirectionsResult, E_MESSAGES as E_GET_DIRECTIONS_MESSAGES } from '@mappedin/react-native-sdk/core/packages/navigator';
5619
+ export type { IFlatLabels, FlatLabels } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.FlatLabels';
5620
+ export type { IFloatingLabels, FloatingLabels } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.FloatingLabels';
4962
5621
  export type TMappedinInitializeOutput = {
4963
5622
  mapView: MapView;
4964
5623
  venue: Mappedin;
@@ -4982,8 +5641,8 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4982
5641
  * @returns
4983
5642
  */
4984
5643
  function showVenue<T extends Mappedin>(el: HTMLElement, venue: T, options?: TMapViewOptions): Promise<MapView>;
4985
- 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';
4986
- export { Search, getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, PositionUpdater, Analytics, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
5644
+ 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, E_CAMERA_DIRECTION, SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.enums';
5645
+ export { getVenue, getVenueBundle, showVenue, downloadBundle, getVenueBundleURL, downloadVenueBundleMVF, PositionUpdater, MappedinDestinationSet, MARKER_ANCHOR, labelThemes };
4987
5646
  import DefaultAssetManager from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager';
4988
5647
  const setAssetManager: <T extends DefaultAssetManager>(am: T) => void;
4989
5648
  /**
@@ -4997,10 +5656,9 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer' {
4997
5656
  export type { FloatingLabel };
4998
5657
  export * from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
4999
5658
  export type { MapView } from '@mappedin/react-native-sdk/core/packages/renderer/MapView';
5000
- export type { TSafeAreaInsets, TFocusOnTargets, TFocusOnCameraOptions, TAnimatePositionOptions, TCameraAnimationOptions, TFocusOnOptions, default as Camera } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
5001
- export { SAFE_AREA_INSET_TYPE, ANIMATION_TWEENS, CAMERA_EASING_MODE } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
5002
- export type { TGetVenueOptions, TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
5003
- export { Mappedin, MappedinDirections, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, MAP_RENDER_MODE } from '@mappedin/react-native-sdk/core/packages/get-venue';
5659
+ export type { TSafeAreaInsets, TCameraTargets, TFocusOnCameraOptions, TCameraTransform, TCameraAnimationOptions, default as Camera } from '@mappedin/react-native-sdk/core/packages/renderer/Camera';
5660
+ export type { TGetVenueOptions, TShowVenueOptions, TMappedinOfflineSearchOptions, TMappedinOfflineSearchResult, TMappedinOfflineSearchSuggestions, TMappedinOfflineAllSearchMatch, TMappedinOfflineSearchAllOptions } from '@mappedin/react-native-sdk/core/packages/get-venue';
5661
+ export { Mappedin, MappedinDirections, MappedinLocation, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinNavigatable, MappedinCoordinate, OfflineSearch, MAP_RENDER_MODE, setFetchFn } from '@mappedin/react-native-sdk/core/packages/get-venue';
5004
5662
  export { BundleAssetManager } from '@mappedin/react-native-sdk/core/packages/renderer/bundle-asset-manager';
5005
5663
  }
5006
5664
 
@@ -5279,6 +5937,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/MappedinTheme
5279
5937
  }
5280
5938
 
5281
5939
  declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Analytics' {
5940
+ import { MappedinCategory, MappedinLocation } from '@mappedin/react-native-sdk/core/packages/get-venue';
5282
5941
  type AnalyticsOptions = {
5283
5942
  clientId?: string;
5284
5943
  clientSecret?: string;
@@ -5287,7 +5946,23 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Anal
5287
5946
  venue: string;
5288
5947
  testMode?: boolean | string;
5289
5948
  context?: string;
5949
+ platformString?: string;
5290
5950
  };
5951
+ interface IAnalytics {
5952
+ locationSelected(location: MappedinLocation): void;
5953
+ categorySelected(category: MappedinCategory): void;
5954
+ getDirections(start: MappedinLocation, end: MappedinLocation): void;
5955
+ }
5956
+ interface IInternalAnalytics extends IAnalytics {
5957
+ track(target: string, query: any): void;
5958
+ mapViewLoaded(type: '2d' | '3d', forced: boolean, benchmark: number, reason: string): void;
5959
+ getSessionID(): string;
5960
+ getDeviceID(): string;
5961
+ setGeolocationMode(mode: boolean): void;
5962
+ trackBlueDotEvent(blueDotEvent: Record<string, unknown>): void;
5963
+ trackSearch(searchAnalyticsObject: Record<string, unknown>): void;
5964
+ trackSearchSuggest(searchAnalyticsObject: Record<string, unknown>): void;
5965
+ }
5291
5966
  /**
5292
5967
  * A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
5293
5968
  * 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`.
@@ -5303,7 +5978,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Anal
5303
5978
  * @param [options.noAuth] {Boolean} Whether authentication should not be sent with analytics requests.
5304
5979
  * @param [options.testMode] {Boolean} Whether analytics events should be dropped because this is running in a test environment.
5305
5980
  */
5306
- class Analytics {
5981
+ class Analytics implements IInternalAnalytics {
5307
5982
  #private;
5308
5983
  constructor(options: AnalyticsOptions);
5309
5984
  track(target: any, query: any): void;
@@ -5345,6 +6020,19 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Anal
5345
6020
  trackBlueDotEvent(blueDotEvent: any): void;
5346
6021
  trackSearch(searchAnalyticsObject: any): void;
5347
6022
  trackSearchSuggest(searchAnalyticsObject: any): void;
6023
+ /**
6024
+ * Sets the current global context of the Analytics class.
6025
+ * @method setContext
6026
+ * @param context {String} The Analytics context to be set.
6027
+ * @hidden
6028
+ */
6029
+ static setContext(context: any): void;
6030
+ /**
6031
+ * Sets the current global context of the Analytics class to undefined.
6032
+ * @method clearContext
6033
+ * @hidden
6034
+ */
6035
+ static clearContext(): void;
5348
6036
  /**
5349
6037
  * Enum of valid bluedot events.
5350
6038
  * Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method.
@@ -5359,6 +6047,7 @@ declare module '@mappedin/react-native-sdk/core/packages/get-venue/Mappedin.Anal
5359
6047
  FOUND_FLOOR: string;
5360
6048
  };
5361
6049
  }
6050
+ export type { IAnalytics };
5362
6051
  export default Analytics;
5363
6052
  }
5364
6053
 
@@ -5579,9 +6268,10 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/blue-
5579
6268
  * @param [options.minRadius] The ring around the blue dot will only be drawn if `options.radius` is greater than or equal to this value, in metres. Must be >= 0.
5580
6269
  * @param [options.radiusUpdateInterval] The width of radius update steps, in metres. For example, if interval is 3 and assume `minRadius` is 8, then the radius will be updated on 8, 11, 14, 17, etc. Must be >= 0.
5581
6270
  */
5582
- constructor({ mapManager, mapView, core, minRadius, maxRadius, radiusUpdateInterval, radiusTweenOptions }?: {
6271
+ constructor({ mapManager, mapView, threeDMarkerLayer, core, minRadius, maxRadius, radiusUpdateInterval, radiusTweenOptions }?: {
5583
6272
  mapManager: any;
5584
6273
  mapView: any;
6274
+ threeDMarkerLayer: any;
5585
6275
  core: any;
5586
6276
  minRadius?: number | undefined;
5587
6277
  maxRadius?: number | undefined;
@@ -5593,6 +6283,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/blue-
5593
6283
  });
5594
6284
  mapManager: any;
5595
6285
  mapView: any;
6286
+ threeDMarkerLayer: any;
5596
6287
  core: any;
5597
6288
  minRadius: number;
5598
6289
  maxRadius: number;
@@ -5712,7 +6403,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSy
5712
6403
  rendererDomElement: any;
5713
6404
  currentHover: null;
5714
6405
  hoverLabel: any;
5715
- hoverColor: string | number;
6406
+ hoverColor: any;
5716
6407
  options: {
5717
6408
  disableHover: boolean;
5718
6409
  };
@@ -5757,6 +6448,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/EventSy
5757
6448
  doHoverEffect: () => void;
5758
6449
  onPolygonHoverOut: (polygonId: any) => false | undefined;
5759
6450
  onPolygonHoverOver: (polygon: any) => false | undefined;
6451
+ setHoverColor: (color: string | number) => void;
5760
6452
  destroy(): void;
5761
6453
  }
5762
6454
  export default EventSystemLayer;
@@ -5934,204 +6626,6 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
5934
6626
  export default Marker;
5935
6627
  }
5936
6628
 
5937
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.MapObject' {
5938
- export const SCENE_FROM_LIVE_JSON: false;
5939
- /**
5940
- * A handle to a 3D marker added to a map.
5941
- *
5942
- * @class ThreeJSMarkerHandle
5943
- */
5944
- export class ThreeJSMarkerHandle {
5945
- constructor({ mapId, object }: {
5946
- mapId: any;
5947
- object: any;
5948
- });
5949
- _mapId: any;
5950
- _object: any;
5951
- /**
5952
- * Return the ThreeJS object associated with this marker, so that it
5953
- * can be moved around, scaled, etc.
5954
- *
5955
- * @property {Object3D} object
5956
- */
5957
- get object(): any;
5958
- _destroy(): void;
5959
- }
5960
- export default MapObject;
5961
- class MapObject extends PubSub {
5962
- constructor(mapClass: any, polygonMeshesById: any, showCount: any, mapView: any, loadOptions?: {});
5963
- _flippableImagedById: {};
5964
- _started: boolean;
5965
- _loaderPromise: null;
5966
- _promiseResolve: null;
5967
- hoverableMeshChildren: any[];
5968
- objectsDictionary: {};
5969
- north: null;
5970
- mapScale: null;
5971
- object: any;
5972
- labels: Set<any>;
5973
- tooltips: Set<any>;
5974
- markers: Set<any>;
5975
- textObjects: any[];
5976
- labelBatchCreator: null;
5977
- imagesToFlip: any[];
5978
- seenByCamera: boolean;
5979
- threeJSMarkers: Map<any, any>;
5980
- mapView: any;
5981
- mapClass: any;
5982
- polygonMeshesById: any;
5983
- _showCount: any;
5984
- loadMethod: string;
5985
- loadAsync: any;
5986
- _taskScheduler: any;
5987
- id: any;
5988
- mapRenderingStrategy: any;
5989
- _highPriorityTasks: FrameTaskGroup;
5990
- _lowPriorityTasks: FrameTaskGroup;
5991
- _markerTasks: FrameTaskGroup;
5992
- _mapLoadedTasks: FrameTaskGroup;
5993
- _visibilityLatch: boolean | null;
5994
- _objLoadedComplete: boolean;
5995
- _objLoaded(object: any): any;
5996
- _objLoadedMerged(object: any): void;
5997
- enableImageFlipping(polygonId: any, rotation: any): void;
5998
- elements: any;
5999
- boundingBox: {
6000
- min: any;
6001
- max: any;
6002
- } | undefined;
6003
- loadPolygonNow(polygonId: any): void;
6004
- _addElementToScene(element: any): void;
6005
- /** *
6006
- Load the map, if it's not already loaded. Returns the old promise if it's already done, so you can safely call it whenever needed.
6007
-
6008
- If needed, this could be modified to
6009
-
6010
- Returns a Promise that will be Done when the OBJ, MTL and textures have been downloaded, and the objectsDictionary has been generated.
6011
-
6012
- **/
6013
- load(): null;
6014
- loadMethodUsed: string | undefined;
6015
- _dispose(objectToDispose: any): void;
6016
- add(childObjectToAdd: any): void;
6017
- getPositionLatLon(lat: any, lon: any): any;
6018
- getMapScale(): null;
6019
- getNorth(): null;
6020
- disableAllImageFlipping(): void;
6021
- get visible(): boolean;
6022
- /**
6023
- * Return true if this map has been loaded to the point where it can be
6024
- * manipulated as a complete object. In synchronous mode, this requires all
6025
- * loading tasks to be completed, but in async mode, only high-priority
6026
- * tasks (adding polygons to the world) have to be completed.
6027
- */
6028
- isReady(): boolean;
6029
- /**
6030
- * Return true if this map has been loaded to the point where the only tasks
6031
- * remaining are marker tasks.
6032
- */
6033
- isFullyLoaded(): boolean;
6034
- /**
6035
- * A function that should be called when the map is made visible, in order
6036
- * to kick off its tasks.
6037
- */
6038
- onVisible(): void;
6039
- /**
6040
- * A function that should be called when the map is made invisible, in order
6041
- * to postpone its tasks.
6042
- */
6043
- onInvisible(): void;
6044
- /**
6045
- * Queue a task on this map that will be executed when the high and low
6046
- * priority tasks have been processed.
6047
- */
6048
- addPendingMarkerTask(marker: any, callback: any): void;
6049
- /**
6050
- * Queue a task on this map that must be completed before the map will be
6051
- * considered `isReady` in synchronous loading mode.
6052
- */
6053
- addPendingLowPriorityTask(name: any, callback: any): void;
6054
- /**
6055
- * Queue a task on this map that will be queued when the map is loaded, or
6056
- * immediately if the map has already been loaded.
6057
- */
6058
- addPendingMapLoadedTask(name: any, callback: any): void;
6059
- /**
6060
- * Queue a task on this map that must be completed before the map will be
6061
- * considered `isReady`, and will be evaluated before any low-priority
6062
- * tasks.
6063
- */
6064
- _addPendingHighPriorityTask(name: any, callback: any): void;
6065
- /**
6066
- * Add a ThreeJS marker to this map object. This should be called through
6067
- * the `MapView3D`.
6068
- *
6069
- * @method addThreeJSMarker
6070
- * @param {Object} options
6071
- * @param {Object3D} [options.object] the marker object to add to the scene
6072
- * @param {Vector3} [options.position=null] if provided, sets the object's position on the map
6073
- * @param {Euler} [options.rotation=null] if provided, sets the object's rotation relative to the map
6074
- * @param {Vector3} [options.scale=null] if provided, sets the object's scale relative to the map
6075
- * @return {ThreeJSMarkerHandle} a unique identifier for the marker
6076
- */
6077
- addThreeJSMarker(options: {
6078
- object?: any;
6079
- position?: any;
6080
- rotation?: any;
6081
- scale?: any;
6082
- }): ThreeJSMarkerHandle;
6083
- /**
6084
- * Remove the given `ThreeJSMarker` from this map.
6085
- *
6086
- * @method removeThreeJSMarker
6087
- * @param {ThreeJSMarkerHandle} markerHandle the marker to remove
6088
- * @return {boolean} true if the marker existed on the map and was removed;
6089
- * false if the marker does not exist on the map
6090
- */
6091
- removeThreeJSMarker(markerHandle: ThreeJSMarkerHandle): boolean;
6092
- /**
6093
- * Remove all `ThreeJSMarker` from this map.
6094
- *
6095
- * @method removeThreeJSMarker
6096
- */
6097
- _removeThreeJSMarkers(): void;
6098
- removeLabels(): void;
6099
- /**
6100
- * Called when a task group that may be required for map loading completes,
6101
- * to see if all the relevant task groups have been completed.
6102
- */
6103
- _checkIfLoaded(): void;
6104
- mapLoaded: any;
6105
- /**
6106
- * Called when the root ThreeJS object has been created, and child elements
6107
- * may be added.
6108
- */
6109
- _onRootObjectCreated(): void;
6110
- _popinChildObjects(): void;
6111
- }
6112
- import { PubSub } from "@mappedin/react-native-sdk/core/packages/renderer/internal/pub-sub";
6113
- import { FrameTaskGroup } from "@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.TaskScheduler";
6114
- }
6115
-
6116
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Search' {
6117
- export default Search;
6118
- /**
6119
- * A class to access the Mappedin Search API. This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initailize:method"}}{{/crossLink}}, but you can also create one manually.
6120
- *
6121
- * @class Search
6122
- * @type {any}
6123
- * @param options {Object} A list of configuration options for the search API.
6124
- @param [options.venue] {String} The venue slug to search for
6125
- @param [options.key] {String} Your search key
6126
- @param [options.secret] {String} Your search secret
6127
- @param [options.smart] {Boolean} Whether the new Smart Search should be used.
6128
- @param [options.endpoint] {String} The endpoint for search.
6129
- @param [options.locations] {Array} Array of MappedinLocations for this venue. This is optional, but will enable fallback search.
6130
- @param [options.categories] {Array} Array of MappedinCategorys for this venue. This is optional, but will enable fallback search.
6131
- */
6132
- let Search: any;
6133
- }
6134
-
6135
6629
  declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.AssetManager' {
6136
6630
  import { Texture } from 'three';
6137
6631
  import type { MappedinMap } from '@mappedin/react-native-sdk/core/packages/renderer';
@@ -6238,529 +6732,3 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/quad-
6238
6732
  export { QuadTree, Rectangle };
6239
6733
  }
6240
6734
 
6241
- declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.TaskScheduler' {
6242
- export namespace UPDATE_ORDERING {
6243
- const BEFORE_CAMERA: number;
6244
- const CAMERA: number;
6245
- const AFTER_CAMERA: number;
6246
- const RENDER: number;
6247
- const AFTER_RENDER: number;
6248
- const AFTER_ALL_UPDATES: number;
6249
- }
6250
- export namespace TASK_PRIORITY {
6251
- const VISIBLE_MAP_HIGH: number;
6252
- const VISIBLE_MAP_LOW: number;
6253
- const VISIBLE_MAP_MARKER: number;
6254
- const ASYNC_MAP_HIGH: number;
6255
- const ASYNC_MAP_LOW: number;
6256
- const ASYNC_MAP_MARKER: number;
6257
- const MAP_LOADED: number;
6258
- }
6259
- /**
6260
- * A function that can be submitted to the Task Scheduler to run each frame for
6261
- * some provided number of frames. A single update can be repeatedly submitted;
6262
- * if the number of frames left on the update is less than `frameCount`, it will
6263
- * be reset to `frameCount`.
6264
- *
6265
- * @class FrameUpdate
6266
- * @private
6267
- */
6268
- export class FrameUpdate {
6269
- /**
6270
- * Create a new frame update that can be submitted to a scheduler.
6271
- * @constructor
6272
- * @param [options] {Object} Options for the update
6273
- * @param [options.callback] {function}
6274
- * The actual function to run every time this update is scheduled for
6275
- * a frame.
6276
- * @param [options.frameCount=1] {number}
6277
- * How many frames this update should run for when it's submitted to
6278
- * a scheduler
6279
- * @param [options.ordering=0] {number}
6280
- * An ordering value that's used to determine the order in which
6281
- * frame updates will be run within a frame; larger numbers will
6282
- * be run first
6283
- * @param [options.supersededBy=[]] {[FrameUpdate]}
6284
- * If this update is scheduled to run in a frame, but another update in
6285
- * the provided list is also scheduled to run on that frame, then
6286
- * this update will not be run.
6287
- * @param [options.name=undefined] {string}
6288
- * If provided, an arbitrary name for logging purposes.
6289
- * @param [options.userdata] {Any}
6290
- * Arbitrary data that you can store along with this update.
6291
- */
6292
- constructor(options?: {
6293
- callback?: Function | undefined;
6294
- frameCount?: number | undefined;
6295
- ordering?: number | undefined;
6296
- supersededBy?: [FrameUpdate] | undefined;
6297
- name?: string | undefined;
6298
- userdata?: any;
6299
- } | undefined);
6300
- _callback: Function | undefined;
6301
- _frameCount: number;
6302
- _ordering: number;
6303
- _supersededBy: Set<any>;
6304
- name: string | undefined;
6305
- userdata: any;
6306
- _remainingFrameCount: number;
6307
- _lastFrameTime: number;
6308
- /**
6309
- * Return the amount of time that this frame update took to execute during
6310
- * its most recent execution, in milliseconds. If called during this frame
6311
- * update, the value returned will be for the previous invocation. If called
6312
- * before this frame update has been executed at least once, the returned
6313
- * value is unspecified.
6314
- *
6315
- * @method lastFrameTime
6316
- * @return {number} the previous frame time, in milliseconds
6317
- */
6318
- getLastFrameTime(): number;
6319
- }
6320
- /**
6321
- * A task that can be submitted to the Task Scheduler to be run every time
6322
- * there is a frame update with spare time in the frame.
6323
- *
6324
- * @class FrameTask
6325
- * @private
6326
- */
6327
- export class FrameTask {
6328
- /**
6329
- * Create a new frame task that can be submitted to a scheduler.
6330
- * @constructor
6331
- * @param [options] {Object} Options for the task
6332
- * @param [options.callback] {function}
6333
- * The actual function to run when this task is scheduled.
6334
- * @param [options.group=null] {FrameTaskGroup}
6335
- * If provided, a group to which this task will be added when scheduled
6336
- * @param [options.priority=0] {number}
6337
- * Tasks with higher priority will be taken from the queue before tasks
6338
- * with a lower priority.
6339
- * @param [options.postponeOnAdd=false] {number}
6340
- * If true, this task will not be run until `resumeTask` is called on the
6341
- * scheduler.
6342
- * @param [options.name=undefined] {string}
6343
- * If provided, an arbitrary name for logging purposes.
6344
- * @param [options.userdata] {Any}
6345
- * Arbitrary data that you can store along with this task.
6346
- */
6347
- constructor(options?: {
6348
- callback?: Function | undefined;
6349
- group?: FrameTaskGroup | undefined;
6350
- priority?: number | undefined;
6351
- postponeOnAdd?: number | undefined;
6352
- name?: string | undefined;
6353
- userdata?: any;
6354
- } | undefined);
6355
- _callback: Function | undefined;
6356
- _group: FrameTaskGroup | null;
6357
- _priority: number;
6358
- _postponed: number | boolean;
6359
- name: string | undefined;
6360
- userdata: any;
6361
- _complete: boolean;
6362
- _scheduled: boolean;
6363
- _cancelled: boolean;
6364
- _lastFrameTime: number;
6365
- /**
6366
- * Return true if this task has been run at least once.
6367
- *
6368
- * @method isComplete
6369
- * @return {boolean}
6370
- */
6371
- isComplete(): boolean;
6372
- /**
6373
- * Return the amount of time that this frame task took to execute,
6374
- * in milliseconds. If this task has not yet completed, the returned value
6375
- * is unspecified.
6376
- *
6377
- * @method lastFrameTime
6378
- * @return {number} the frame time, in milliseconds
6379
- */
6380
- getLastFrameTime(): number;
6381
- }
6382
- /**
6383
- * A group of tasks that must all be completed before the group is considered
6384
- * complete. The tasks will be automatically garbage collected so that references
6385
- * to the task don't linger.
6386
- *
6387
- * @class FrameTaskGroup
6388
- * @private
6389
- */
6390
- export class FrameTaskGroup {
6391
- /**
6392
- * Create a new frame task group.
6393
- *
6394
- * @constructor
6395
- * @param [options] {Object} Options for the task group
6396
- * @param [options.onComplete] {function}
6397
- * A callback that will be triggered once every task in this group
6398
- * has been completed. This callback may schedule a task, and the
6399
- * scheduler will run that task in the same frame, if there is still
6400
- * frame time for it.
6401
- * @param [options.priority=0] {number}
6402
- * The priority of all the tasks in this group.
6403
- * @param [options.postponeOnAdd=false] {number}
6404
- * If true, tasks from this task group will not be run until `resumeTask`
6405
- * is called on the scheduler with this group.
6406
- * @param [options.name=undefined] {string}
6407
- * If provided, an arbitrary name for logging purposes.
6408
- * @param [options.userdata] {Any}
6409
- * Arbitrary data that you can store along with this task group.
6410
- */
6411
- constructor(options?: {
6412
- onComplete?: Function | undefined;
6413
- priority?: number | undefined;
6414
- postponeOnAdd?: number | undefined;
6415
- name?: string | undefined;
6416
- userdata?: any;
6417
- } | undefined);
6418
- _onComplete: Function;
6419
- _priority: number;
6420
- _postponed: number | boolean;
6421
- name: string | undefined;
6422
- userdata: any;
6423
- _tasks: Set<any>;
6424
- _scheduledTasks: Set<any>;
6425
- _scheduled: boolean;
6426
- _cancelled: boolean;
6427
- /**
6428
- * Return true if every task in this group has been run at least once.
6429
- * @method isComplete
6430
- * @return {boolean}
6431
- */
6432
- isComplete(): boolean;
6433
- /**
6434
- * Return a list of tasks in this group. This will be a copy of the
6435
- * underlying task group, so it's safe to mutate the group while
6436
- * iterating over this array.
6437
- *
6438
- * @method tasks
6439
- * @return {[FrameTask]} list of tasks in this group
6440
- */
6441
- getTasks(): [FrameTask];
6442
- /**
6443
- * Empty this task group. This will trivially satisfy `isComplete`.
6444
- *
6445
- * @method clear
6446
- */
6447
- clear(): void;
6448
- }
6449
- /**
6450
- * A timer for the task scheduler that uses real wall-time to determine if there's
6451
- * enough remaining time in a frame to execute another task.
6452
- *
6453
- * @class RealTimeTimer
6454
- * @private
6455
- */
6456
- export class RealTimeTimer {
6457
- /**
6458
- * @constructor
6459
- * @param [options] {Object} Options for the timer
6460
- * @param [options.maxMillisecondsPerFrame]
6461
- * If the time since the beginning of the frame has been less than
6462
- * or equal to this value, then another task may be executed
6463
- */
6464
- constructor(options?: {
6465
- maxMillisecondsPerFrame?: any;
6466
- } | undefined);
6467
- _maxMillisecondsPerFrame: any;
6468
- _time: any;
6469
- /**
6470
- * Begin timing a frame.
6471
- *
6472
- * @method beginFrame
6473
- */
6474
- beginFrame(): void;
6475
- /**
6476
- * If true, there is enough time remaining to execute another task.
6477
- *
6478
- * @method hasTimeRemaining
6479
- * @return {boolean}
6480
- */
6481
- hasTimeRemaining(): boolean;
6482
- }
6483
- /**
6484
- * A timer that ticks every time `hasTimeRemaining` is called.
6485
- *
6486
- * @class FixedTimer
6487
- * @private
6488
- */
6489
- export class FixedTimer {
6490
- /**
6491
- * @constructor
6492
- * @param [options] {Object} Options for the timer
6493
- * @param [options.maxTasksPerFrame=5]
6494
- * The number of tasks that will be exceuted in a single update call.
6495
- * Can be modified as the `maxTasksPerFrame` property on this boject.
6496
- */
6497
- constructor(options?: {
6498
- maxTasksPerFrame?: any;
6499
- } | undefined);
6500
- maxTasksPerFrame: any;
6501
- _ticks: number;
6502
- /**
6503
- * Begin timing a frame.
6504
- *
6505
- * @method beginFrame
6506
- */
6507
- beginFrame(): void;
6508
- /**
6509
- * If true, there is enough time remaining to execute another task.
6510
- *
6511
- * @method hasTimeRemaining
6512
- * @return {boolean}
6513
- */
6514
- hasTimeRemaining(): boolean;
6515
- }
6516
- /**
6517
- * A class that handles scheduling tasks to be performed within the time
6518
- * constraints of frame updates, triggered using `requestAnimationFrame`.
6519
- *
6520
- * Tasks can either be scheduled once per frame (called "frame updates"), or
6521
- * to execute as many times per frame as there is room for after processing
6522
- * all frame updates (called "frame tasks").
6523
- *
6524
- * Posted tasks will always run during the same frame, assuming there's time to
6525
- * process them. However, an update or task that posts an update will not run
6526
- * that update until the next frame.
6527
- *
6528
- * @class TaskScheduler
6529
- * @private
6530
- */
6531
- export class TaskScheduler {
6532
- /**
6533
- * Construct a new `TaskScheduler` with no tasks scheduled.
6534
- *
6535
- * @constructor
6536
- * @param [options] {Object} Options for the scheduler
6537
- * @param [options.timer=new RealTimeTimer()]
6538
- * Timer that determines whether there is sufficient time left in a frame
6539
- * to continue executing tasks
6540
- * @param [options.performance=false]
6541
- * If true, this task scheduler will annotate tasks and frame updates with
6542
- * performance information.
6543
- */
6544
- constructor(options?: {
6545
- timer?: any;
6546
- performance?: any;
6547
- } | undefined);
6548
- _timer: any;
6549
- _performance: any;
6550
- _scheduledUpdatesByOrdering: Multimap;
6551
- _scheduledTasksByPriority: Multimap;
6552
- _postponedTasks: Set<any>;
6553
- _requestAnimationFrameHandle: number | null;
6554
- _updatesToRunThisFrame: any[];
6555
- _lastFrameTime: number;
6556
- _updatesRunLastFrame: Set<any>;
6557
- /**
6558
- * Run all scheduled updates, and re-schedule another animation frame if any
6559
- * scheduled updates still exist. If any scheduled update specifies
6560
- * `shouldRunTasksAfterCompletion`, this will also run queued tasks until the
6561
- * frame time runs out.
6562
- *
6563
- * @method update
6564
- * @param timestamp {number} the current animation time, as returned from
6565
- * `performance.now()`; will be automatically filled in by
6566
- * `requestAnimationFrame` when it triggers this as a callback
6567
- */
6568
- update(timestamp: number): void;
6569
- /**
6570
- * Empty the task scheduler's queue. All tasks in it will be cancelled.
6571
- *
6572
- * @method clear
6573
- */
6574
- clear(): void;
6575
- /**
6576
- * Destroy this task scheduler and remove all tasks from it.
6577
- *
6578
- * @method destroy
6579
- */
6580
- destroy(): void;
6581
- /**
6582
- * Schedule this task scheduler to execute updates and tasks on the next
6583
- * available animation frame.
6584
- *
6585
- * @method requestAnimationFrame
6586
- */
6587
- requestAnimationFrame(): void;
6588
- /**
6589
- * Execute all tasks that are currently pending, without regard for the
6590
- * available frame time.
6591
- *
6592
- * @method flushTasks
6593
- */
6594
- flushTasks(): void;
6595
- /**
6596
- * Return the amount of time elapsed during the last completed frame update,
6597
- * in milliseconds. This value is unspecified if the task scheduler's
6598
- * `update` method has not yet run or if the scheduler has been cleared.
6599
- * If called during a frame update, this will
6600
- * return the time elapsed during the previous frame update.
6601
- *
6602
- * @method lastFrameTime
6603
- * @return {number} time elapsed during last frame update, in milliseconds
6604
- */
6605
- getLastFrameTime(): number;
6606
- /**
6607
- * Return a set containing every update that was run during the previous
6608
- * frame update. This will be empty if the task scheduler's `update` method
6609
- * has not yet been run or if the scheduler has been cleared.
6610
- */
6611
- getUpdatesRunLastFrame(): Set<any>;
6612
- _executeOneTask(timestamp: any): void;
6613
- /**
6614
- * Schedule an update to be run for the next `update.frameCount` frames. If
6615
- * the update already exists in the scheduler, the update's frame count will
6616
- * be refreshed to `update.frameCount`. This will also schedule an animation
6617
- * frame to begin processing the update.
6618
- *
6619
- * @method scheduleUpdate
6620
- * @param task {FrameUpdate} the update to schedule
6621
- */
6622
- scheduleUpdate(update: any): void;
6623
- /**
6624
- * Schedule a task to be run during a frame update. This will also schedule
6625
- * an animation frame to begin processing the task queue.
6626
- *
6627
- * @method scheduleTask
6628
- * @param task {FrameTask} the task to schedule
6629
- */
6630
- scheduleTask(task: FrameTask): void;
6631
- /**
6632
- * If the given update is in the queue, remove it.
6633
- *
6634
- * @method cancelUpdate
6635
- * @param task {FrameUpdate} the update to cancel
6636
- */
6637
- cancelUpdate(update: any): void;
6638
- /**
6639
- * If the given task or group is in the queue, remove it. Cancelling a
6640
- * completed task is a no-op.
6641
- *
6642
- * Canceling an individual task will also remove it from its task group, if
6643
- * it isn't already complete.
6644
- *
6645
- * @method cancelTask
6646
- * @param task {FrameTask or FrameTaskGroup} the task to cancel
6647
- */
6648
- cancelTask(task: FrameTask): void;
6649
- /**
6650
- * Set the provided task or group not to run, until it's resumed using `resumeTask`.
6651
- *
6652
- * Tasks that are in a group can't be postponed individually; instead, call
6653
- * `postponeTask` with the entire group.
6654
- *
6655
- * @method postponeTask
6656
- * @param task {FrameTask or FrameTaskGroup} the task to postpone
6657
- */
6658
- postponeTask(task: FrameTask): void;
6659
- /**
6660
- * Allow a postponed task or task group to resume processing. This will also
6661
- * request an animation frame to allow the resumed task to be processed.
6662
- *
6663
- * Tasks that are in a group can't be resumed individually; instead, call
6664
- * `resumeTask` with the entire group.
6665
- *
6666
- * @method resumeTask
6667
- * @param task {FrameTask or FrameTaskGroup} the task to resume
6668
- */
6669
- resumeTask(task: FrameTask): void;
6670
- /**
6671
- * Change the priority of the given scheduled task or task group.
6672
- *
6673
- * @method setTaskPriority
6674
- * @param task {FrameTask or FrameTaskGroup} the task whose priority will be changed
6675
- * @param priority {number} the priority to assign the task
6676
- */
6677
- setTaskPriority(task: FrameTask, priority: number): void;
6678
- }
6679
- /**
6680
- * A map that maps a numeric key to a set of values.
6681
- *
6682
- * For use in the scheduler, we also maintain a sorted list of keys.
6683
- *
6684
- * @class Multimap
6685
- * @private
6686
- */
6687
- class Multimap {
6688
- _map: Map<any, any>;
6689
- _size: number;
6690
- _sortedKeys: any[];
6691
- /**
6692
- * Return true if the set for the given key contains the provided value.
6693
- *
6694
- * @method has
6695
- * @param key {number} the key whose set to check
6696
- * @param value {Any} the value to check
6697
- */
6698
- has(key: number, value: any): any;
6699
- /**
6700
- * Return the list of elements at the given key. Make sure not to modify
6701
- * it, as it will mess up the total element count.
6702
- *
6703
- * @method get
6704
- * @param key {number}
6705
- * @param value {Set(Any)}
6706
- */
6707
- get(key: number): any;
6708
- /**
6709
- * @method insert
6710
- * @param key {number} the key to which another value will be added
6711
- * @param value {Any} the value to add to the key's set
6712
- */
6713
- insert(key: number, value: any): void;
6714
- /**
6715
- * @method delete
6716
- * @param key {number} the key at which the value is stored
6717
- * @param value {Any} the value to delete
6718
- */
6719
- delete(key: number, value: any): void;
6720
- /**
6721
- * Remove and return an arbitrary value from the set at the given key.
6722
- *
6723
- * @method pop
6724
- * @param key {number} the key from which to remove a value
6725
- * @return {Any} arbitrary value from the given key's set, or undefined if
6726
- * the set at the given key is empty.
6727
- */
6728
- pop(key: number): any;
6729
- /**
6730
- * Remove and return an arbitrary value from the set corresponding to
6731
- * the key with the highest numeric value, using the javascript `<`
6732
- * operator.
6733
- *
6734
- * @method popFromMaxKey
6735
- * @return {Any} arbitrary value from the highest key's set, or undefined
6736
- * if the map is empty
6737
- */
6738
- popFromMaxKey(): any;
6739
- /**
6740
- * Return an iterator over every value in this multimap, at every key.
6741
- * Mutating the multimap during iteration will result in undefined
6742
- * behaviour.
6743
- *
6744
- * @method values
6745
- * @return {Iterator} iterator over the values in the map
6746
- */
6747
- values(): Iterator<any, any, undefined>;
6748
- /**
6749
- * A list of keys in this set, sorted by numeric value. Not cloned,
6750
- * for efficiency's sake, so please don't mutate it.
6751
- *
6752
- * @method keys
6753
- * @return {[number]} sorted list of numeric keys in the map
6754
- */
6755
- keys(): [number];
6756
- /**
6757
- * The number of elements in this multimap, equal to the sum of the sizes
6758
- * of each key's set of values.
6759
- *
6760
- * @property size {number} number of elements in this multimap
6761
- */
6762
- get size(): number;
6763
- }
6764
- export {};
6765
- }
6766
-