@mappedin/react-native-sdk 5.8.0 → 5.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +56 -26
  2. package/dist/index.js +202 -202
  3. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -179,7 +179,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
179
179
  import { TReactNativeFlatLabelAllLocations, TReactNativeFlatLabelAllLocationsLegacy, TSerializableJourneyOptions } from '@mappedin/react-native-sdk/wrappers/common';
180
180
  import type { TGeolocationObject, TEnableBlueDotOptions, TPathOptions, TLabelAllLocationFloatingLabelOptions, TMappedinOfflineSearchOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
181
181
  import { TCameraManager } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store.types';
182
- import { TCreateTooltipCommonOptions, TCreateTooltipOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
182
+ import { TAnimationOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions } from '@mappedin/react-native-sdk/core/packages/renderer/MapView.types';
183
183
  export class MapViewStore extends RNMappedinController {
184
184
  #private;
185
185
  state: STATE;
@@ -241,6 +241,12 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
241
241
  * Remove marker by id
242
242
  */
243
243
  removeMarker(markerId: string): Promise<void>;
244
+ Markers: {
245
+ add: (nodeOrCoordinate: MappedinNode | MappedinCoordinate, contentHtml: string, options: TCreateMarkerOptions) => string;
246
+ remove: (markerId: string) => Promise<void>;
247
+ setPosition: (markerId: string, nodeOrCoordinate: MappedinNode | MappedinCoordinate) => Promise<void>;
248
+ animate: (markerId: string, nodeOrCoordinate: MappedinNode | MappedinCoordinate, animationOptions: TAnimationOptions) => Promise<void>;
249
+ };
244
250
  /**
245
251
  * Set SDK state, which controls camera and other features geared towards a particular experience
246
252
  *
@@ -1857,8 +1863,6 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1857
1863
  DESTROY = "DESTROY",
1858
1864
  DATA_LOADED = "DATA_LOADED",
1859
1865
  FIRST_MAP_LOADED = "FIRST_MAP_LOADED",
1860
- CREATE_MARKER = "CREATE_MARKER",
1861
- REMOVE_MARKER = "REMOVE_MARKER",
1862
1866
  SET_STATE = "SET_STATE",
1863
1867
  STATE_CHANGED = "STATE_CHANGED",
1864
1868
  GET_NEAREST_NODE_BY_SCREEN_COORDINATES = "GET_NEAREST_NODE_BY_SCREEN_COORDINATES",
@@ -1918,6 +1922,13 @@ declare module '@mappedin/react-native-sdk/wrappers/common/events' {
1918
1922
  DRAW_JOURNEY = "DRAW_JOURNEY",
1919
1923
  CLEAR_JOURNEY = "CLEAR_JOURNEY",
1920
1924
  SET_JOURNEY_STEP_BY_PATH = "SET_JOURNEY_STEP_BY_PATH",
1925
+ /**
1926
+ * Markers
1927
+ */
1928
+ CREATE_MARKER = "CREATE_MARKER",
1929
+ REMOVE_MARKER = "REMOVE_MARKER",
1930
+ SET_MARKER_POSITION = "SET_MARKER_POSITION",
1931
+ ANIMATE_MARKER = "ANIMATE_MARKER",
1921
1932
  /**
1922
1933
  * Paths
1923
1934
  */
@@ -1981,7 +1992,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
1981
1992
  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, TFloatingLabelAppearance } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
1982
1993
  import { TFocusOnTargetsSerializable, TMiMapViewOptions, TSerializedCoordinate, TSerializedMap, TSerializableJourneyOptions, TSerializedLocation, TSerializedNode, TSerializedPolygon } from '@mappedin/react-native-sdk/wrappers/common/types';
1983
1994
  import { BRIDGE_EVENT, EVENT, MINIMAP_EVENT, NATIVE_EVENT } from '@mappedin/react-native-sdk/wrappers/common';
1984
- import { TCreateTooltipCommonOptions, TCreateTooltipOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
1995
+ import { TAnimationOptions, TCreateTooltipCommonOptions, TCreateTooltipOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
1985
1996
  export type BRIDGE_EVENT_PAYLOADS = {
1986
1997
  [BRIDGE_EVENT.REJECT]: any;
1987
1998
  [BRIDGE_EVENT.RESOLVE]: any;
@@ -2222,21 +2233,22 @@ declare module '@mappedin/react-native-sdk/wrappers/common/payloads' {
2222
2233
  tiltAngle: number;
2223
2234
  };
2224
2235
  [EVENT.CREATE_MARKER]: {
2225
- nodeOrCoordinate: {
2226
- type: 'Node';
2227
- id: string;
2228
- } | {
2229
- type: 'Coordinate';
2230
- mapId: string;
2231
- lat: number;
2232
- lon: number;
2233
- };
2236
+ nodeOrCoordinate: TSerializedNode | TSerializedCoordinate;
2234
2237
  contentHtml: string;
2235
2238
  options: any;
2236
2239
  };
2237
2240
  [EVENT.REMOVE_MARKER]: {
2238
2241
  markerId: string;
2239
2242
  };
2243
+ [EVENT.SET_MARKER_POSITION]: {
2244
+ markerId: string;
2245
+ nodeOrCoordinate: TSerializedNode | TSerializedCoordinate;
2246
+ };
2247
+ [EVENT.ANIMATE_MARKER]: {
2248
+ markerId: string;
2249
+ nodeOrCoordinate: TSerializedNode | TSerializedCoordinate;
2250
+ animationOptions: TAnimationOptions;
2251
+ };
2240
2252
  [EVENT.OVERRIDE_LOCATION]: {
2241
2253
  location: TGeolocationObject;
2242
2254
  };
@@ -2686,10 +2698,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2686
2698
  data: {
2687
2699
  format: "jsonstring";
2688
2700
  venueData: string;
2689
- options: import("./types").TMiMapViewOptions; /**
2690
- * Send a message to the other side of the bridge
2691
- *
2692
- * @hidden
2701
+ options: import("./types").TMiMapViewOptions;
2693
2702
  };
2694
2703
  };
2695
2704
  LOAD_MINIMAP: {
@@ -2766,6 +2775,10 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
2766
2775
  msgID?: string | undefined;
2767
2776
  data: {
2768
2777
  position: {
2778
+ /**
2779
+ * Handle rejection from the other side, typically when the request results in an error
2780
+ * @hidden
2781
+ */
2769
2782
  x: number;
2770
2783
  y: number;
2771
2784
  };
@@ -3071,15 +3084,7 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
3071
3084
  CREATE_MARKER: {
3072
3085
  msgID?: string | undefined;
3073
3086
  data: {
3074
- nodeOrCoordinate: {
3075
- type: "Node";
3076
- id: string;
3077
- } | {
3078
- type: "Coordinate";
3079
- mapId: string;
3080
- lat: number;
3081
- lon: number;
3082
- };
3087
+ nodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode;
3083
3088
  contentHtml: string;
3084
3089
  options: any;
3085
3090
  };
@@ -3090,6 +3095,21 @@ declare module '@mappedin/react-native-sdk/wrappers/common/controller' {
3090
3095
  markerId: string;
3091
3096
  };
3092
3097
  };
3098
+ SET_MARKER_POSITION: {
3099
+ msgID?: string | undefined;
3100
+ data: {
3101
+ markerId: string;
3102
+ nodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode;
3103
+ };
3104
+ };
3105
+ ANIMATE_MARKER: {
3106
+ msgID?: string | undefined;
3107
+ data: {
3108
+ markerId: string;
3109
+ nodeOrCoordinate: import("./types").TSerializedCoordinate | import("./types").TSerializedNode;
3110
+ animationOptions: import("../../core/packages/renderer").TAnimationOptions;
3111
+ };
3112
+ };
3093
3113
  OVERRIDE_LOCATION: {
3094
3114
  msgID?: string | undefined;
3095
3115
  data: {
@@ -8046,6 +8066,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
8046
8066
  import { TCreateMarkerOptions, TAnimationOptions } from '@mappedin/react-native-sdk/core/packages/renderer';
8047
8067
  import InternalMarker from '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappedin.Marker';
8048
8068
  import { ICore } from '@mappedin/react-native-sdk/core/packages/renderer/Core.interface';
8069
+ import TWEEN from '@tweenjs/tween.js';
8049
8070
  /**
8050
8071
  * A marker containing some HTML content.
8051
8072
  */
@@ -8067,6 +8088,14 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/internal/Mappe
8067
8088
  }
8068
8089
  class MarkersController {
8069
8090
  #private;
8091
+ markersMap: Map<string, {
8092
+ marker: Marker;
8093
+ internalMarker: InternalMarker;
8094
+ }>;
8095
+ animations: Map<string, {
8096
+ tween: TWEEN.Tween;
8097
+ resolver: () => void;
8098
+ }>;
8070
8099
  constructor(core: ICore);
8071
8100
  /**
8072
8101
  * Create a new Marker, containing some HTML, at the specified position
@@ -8191,6 +8220,7 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/layers/Markers
8191
8220
  export class MarkersLayer {
8192
8221
  #private;
8193
8222
  constructor(markersController: MarkersController);
8223
+ get markers(): Marker[];
8194
8224
  /**
8195
8225
  * Create a new Marker, containing some HTML, at the specified position
8196
8226
  * @param nodeOrCoordinate the position for the Marker