@mappedin/react-sdk 6.0.1-beta.45 → 6.0.1-beta.46

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.
@@ -2,7 +2,7 @@
2
2
  // Dependencies for this module:
3
3
  // ../react/react
4
4
  // ../react/@packages/internal/mvf-utils
5
- // ../react/@mappedin/mvf
5
+ // ../react/@mappedin/mvf-v2
6
6
  // ../react/@packages/internal/common/pubsub
7
7
  // ../react/@packages/internal/common/Mappedin.Logger
8
8
  // ../react/geojson
@@ -62,7 +62,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
62
62
  import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, Environment } from '@mappedin/react-sdk/packages/mvf-utils';
63
63
  import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
64
64
  import type { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
65
- import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack, OperationHours, SiblingGroup, LocationState } from '@mappedin/mvf';
65
+ import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, ParsedMVFLocalePack, OperationHours, SiblingGroup, LocationState } from '@mappedin/mvf-v2';
66
66
  import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
67
67
  export type { Text3D as Text3DApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
68
68
  export { disableText3DWorker } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
@@ -337,6 +337,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
337
337
  export type THydrateMapDataBundle = {
338
338
  type: 'binary';
339
339
  options?: {
340
+ version?: '2.0.0' | '3.0.0';
340
341
  enterprise?: boolean;
341
342
  };
342
343
  languagePacks?: {
@@ -350,6 +351,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
350
351
  } | {
351
352
  type: 'json';
352
353
  options?: {
354
+ version?: '2.0.0' | '3.0.0';
353
355
  enterprise?: boolean;
354
356
  };
355
357
  languagePacks?: {
@@ -968,7 +970,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
968
970
  /**
969
971
  * @internal
970
972
  */
971
- get currentLanguage(): import("@mappedin/mvf").Language | undefined;
973
+ get currentLanguage(): import("@mappedin/mvf-v2").Language | undefined;
972
974
  /**
973
975
  * Retrieves the natural bearing of the map, which is the angle, in degrees, the map is considered to be "naturally oriented" towards.
974
976
  * Typically the angle perpendicular to the street the map is facing, or the main entrance. Other print maps inside the map may have this direction be up.
@@ -1233,7 +1235,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
1233
1235
  import FloorStack from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor-stack';
1234
1236
  import Facade from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/facade';
1235
1237
  import type { MapDataRecords, EnterpriseMapDataRecords } from '@mappedin/react-sdk/mappedin-js/src/utils/data-creation';
1236
- import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, Language, AreaCollection, TilesetStyle } from '@mappedin/mvf';
1238
+ import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, Language, AreaCollection, TilesetStyle } from '@mappedin/mvf-v2';
1237
1239
  import { AnalyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics';
1238
1240
  import EnterpriseLocation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
1239
1241
  import EnterpriseCategory from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
@@ -2141,7 +2143,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
2141
2143
  import type { Feature, MultiPolygon, Polygon } from 'geojson';
2142
2144
  import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, EnterpriseLocation, Node, Area, Facade, FloorStack, Annotation, EnterpriseCategory, EnterpriseVenue, LocationCategory, LocationProfile } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2143
2145
  import type { Label, Marker, Model, Image, Shape, Text3D, Path } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
2144
- import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
2146
+ import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf-v2';
2145
2147
  import type { InsetPaddingOption, UpdatableText3DState, Text3DState, AddText3DOptions, EnvMapOptions, InitializeModelState, ModelState, UpdateModelState as GeoJsonUpdateModelState, ImagePlacementOptions, LabelAppearance } from '@mappedin/react-sdk/geojson/src';
2146
2148
  import type { PathSegment } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
2147
2149
  import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
@@ -4095,7 +4097,7 @@ declare module '@mappedin/react-sdk/react-sdk/src' {
4095
4097
  }
4096
4098
 
4097
4099
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions' {
4098
- import type { ParsedMVF } from '@mappedin/mvf';
4100
+ import type { ParsedMVF } from '@mappedin/mvf-v2';
4099
4101
  import type { DirectionsCollection } from '@packages/internal/geojson-navigator';
4100
4102
  import { Navigator } from '@packages/internal/geojson-navigator';
4101
4103
  import { Connection, Coordinate, Node, type MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
@@ -4203,7 +4205,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
4203
4205
  import type Annotation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation';
4204
4206
  import type Connection from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/connection';
4205
4207
  import type MapObject from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/object';
4206
- import type { EnterpriseLocation as MvfEnterpriseLocation, EnterpriseCategory as MvfEnterpriseCategory, ParsedMVFLocalePack, Feature, FloorStack as MvfFloorStack, FloorProperties as MvfFloor } from '@mappedin/mvf';
4208
+ import type { EnterpriseLocation as MvfEnterpriseLocation, EnterpriseCategory as MvfEnterpriseCategory, ParsedMVFLocalePack, Feature, FloorStack as MvfFloorStack, FloorProperties as MvfFloor } from '@mappedin/mvf-v2';
4207
4209
  import type { PartialExcept } from '@mappedin/mvf-core';
4208
4210
  import type { LocalePackUrls } from '@packages/internal/mvf-utils';
4209
4211
  import type { LanguagePackHydrationItem } from '@mappedin/react-sdk/mappedin-js/src/types';
@@ -4508,7 +4510,7 @@ declare module '@mappedin/react-sdk/packages/mvf-utils/api-types' {
4508
4510
  }
4509
4511
 
4510
4512
  declare module '@mappedin/react-sdk/packages/mvf-utils/mvf-types' {
4511
- import type { MapId, Style, Feature, LineString, ObstructionProperties, EntranceProperties, SpaceProperties, ObstructionCollection, EntranceCollection, SpaceCollection, FloorImageProperties, BaseTextAreaProperties, EnterpriseTexture } from '@mappedin/mvf';
4513
+ import type { MapId, Style, Feature, LineString, ObstructionProperties, EntranceProperties, SpaceProperties, ObstructionCollection, EntranceCollection, SpaceCollection, FloorImageProperties, BaseTextAreaProperties, EnterpriseTexture } from '@mappedin/mvf-v2';
4512
4514
  import type { FeatureCollection, MultiPolygon, Point, Polygon } from 'geojson';
4513
4515
  import type { TImage, TMap, TNode, TOpeningHours, TPhone, TSiblingGroup, TSocial } from '@mappedin/react-sdk/packages/mvf-utils/api-types';
4514
4516
  export type WithIDs<T> = Map<string, T>;
@@ -4751,7 +4753,7 @@ declare module '@mappedin/react-sdk/packages/mvf-utils/mvf-types' {
4751
4753
  }
4752
4754
 
4753
4755
  declare module '@mappedin/react-sdk/packages/mvf-utils/mvf-utils' {
4754
- import { type ParsedMVF, type ParsedMVFLocalePack, type RawMVF } from '@mappedin/mvf';
4756
+ import { type ParsedMVF, type ParsedMVFLocalePack, type RawMVF } from '@mappedin/mvf-v2';
4755
4757
  import type { ParsedMVFv1, RawMVFv1 } from '@mappedin/react-sdk/packages/mvf-utils/mvf-types';
4756
4758
  export * from '@mappedin/react-sdk/packages/mvf-utils/tokens/access-token';
4757
4759
  export * from '@mappedin/react-sdk/packages/mvf-utils/tokens/sas-token';
@@ -4898,6 +4900,11 @@ declare module '@mappedin/react-sdk/packages/mvf-utils/mvf-utils' {
4898
4900
  * @internal
4899
4901
  */
4900
4902
  layoutId?: 'draft';
4903
+ /**
4904
+ * @hidden
4905
+ * @internal
4906
+ */
4907
+ mvfVersion?: '2.0.0' | '3.0.0';
4901
4908
  };
4902
4909
  /**
4903
4910
  * @interface
@@ -5071,6 +5078,7 @@ declare module '@mappedin/react-sdk/packages/mvf-utils/mvf-utils' {
5071
5078
  * outdoor map. If a map is not a multi-building map, an empty array is returned.
5072
5079
  */
5073
5080
  export const getBuildingIds: (mvf: ParsedMVF) => string[];
5081
+ export function unzipAndParseMVFv2(data: Uint8Array, inputVersion?: '2.0.0' | '3.0.0'): Promise<ParsedMVF>;
5074
5082
  }
5075
5083
 
5076
5084
  declare module '@mappedin/react-sdk/packages/mvf-utils/geometry' {
@@ -5082,7 +5090,7 @@ declare module '@mappedin/react-sdk/packages/mvf-utils/geometry' {
5082
5090
  }
5083
5091
 
5084
5092
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node' {
5085
- import type { NodeCollection } from '@mappedin/mvf';
5093
+ import type { NodeCollection } from '@mappedin/mvf-v2';
5086
5094
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
5087
5095
  import type { EnterpriseLocation, MapDataInternal, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
5088
5096
  import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
@@ -5155,8 +5163,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node' {
5155
5163
  */
5156
5164
  get geoJSON(): {
5157
5165
  properties: null;
5158
- type: import("@mappedin/mvf").FeatureType;
5159
- geometry: import("@mappedin/mvf").Point;
5166
+ type: import("@mappedin/mvf-v2").FeatureType;
5167
+ geometry: import("@mappedin/mvf-v2").Point;
5160
5168
  };
5161
5169
  /** @internal */
5162
5170
  get focusTarget(): Coordinate;
@@ -5189,7 +5197,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node' {
5189
5197
  }
5190
5198
 
5191
5199
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/area' {
5192
- import type { AreaCollection } from '@mappedin/mvf';
5200
+ import type { AreaCollection } from '@mappedin/mvf-v2';
5193
5201
  import { Coordinate, type MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
5194
5202
  import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
5195
5203
  import type { IGeoJSONData } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
@@ -5244,8 +5252,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/area' {
5244
5252
  */
5245
5253
  get geoJSON(): {
5246
5254
  properties: null;
5247
- type: import("@mappedin/mvf").FeatureType;
5248
- geometry: import("@mappedin/mvf").Polygon;
5255
+ type: import("@mappedin/mvf-v2").FeatureType;
5256
+ geometry: import("@mappedin/mvf-v2").Polygon;
5249
5257
  };
5250
5258
  /** @internal */
5251
5259
  get focusTarget(): this;
@@ -5272,7 +5280,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/area' {
5272
5280
  }
5273
5281
 
5274
5282
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
5275
- import type { EntranceCollection } from '@mappedin/mvf';
5283
+ import type { EntranceCollection } from '@mappedin/mvf-v2';
5276
5284
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
5277
5285
  import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
5278
5286
  import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
@@ -5353,8 +5361,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
5353
5361
  */
5354
5362
  get geoJSON(): {
5355
5363
  properties: null;
5356
- type: import("@mappedin/mvf").FeatureType;
5357
- geometry: import("@mappedin/mvf").LineString;
5364
+ type: import("@mappedin/mvf-v2").FeatureType;
5365
+ geometry: import("@mappedin/mvf-v2").LineString;
5358
5366
  };
5359
5367
  /** @internal */
5360
5368
  get focusTarget(): Coordinate;
@@ -5387,7 +5395,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
5387
5395
  }
5388
5396
 
5389
5397
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
5390
- import type { SpaceCollection } from '@mappedin/mvf';
5398
+ import type { SpaceCollection } from '@mappedin/mvf-v2';
5391
5399
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
5392
5400
  import type { EnterpriseLocation, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
5393
5401
  import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
@@ -5426,7 +5434,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
5426
5434
  * @internal
5427
5435
  * @hidden
5428
5436
  */
5429
- getMvfData(): import("@mappedin/mvf").Feature<import("@mappedin/mvf").Polygon | import("@mappedin/mvf").LineString | import("@mappedin/mvf").Point, import("@mappedin/mvf").SpaceProperties>;
5437
+ getMvfData(): import("@mappedin/mvf-v2").Feature<import("@mappedin/mvf-v2").Polygon | import("@mappedin/mvf-v2").LineString | import("@mappedin/mvf-v2").Point, import("@mappedin/mvf-v2").SpaceProperties>;
5430
5438
  /**
5431
5439
  * Checks if the provided instance is of type Space.
5432
5440
  *
@@ -5475,8 +5483,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
5475
5483
  */
5476
5484
  get geoJSON(): {
5477
5485
  properties: null;
5478
- type: import("@mappedin/mvf").FeatureType;
5479
- geometry: import("@mappedin/mvf").Polygon | import("@mappedin/mvf").LineString | import("@mappedin/mvf").Point;
5486
+ type: import("@mappedin/mvf-v2").FeatureType;
5487
+ geometry: import("@mappedin/mvf-v2").Polygon | import("@mappedin/mvf-v2").LineString | import("@mappedin/mvf-v2").Point;
5480
5488
  };
5481
5489
  /** @internal */
5482
5490
  get focusTarget(): Coordinate | this;
@@ -5515,7 +5523,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
5515
5523
  }
5516
5524
 
5517
5525
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor' {
5518
- import type { Feature, FloorCollection, MultiPolygon, Polygon } from '@mappedin/mvf';
5526
+ import type { Feature, FloorCollection, MultiPolygon, Polygon } from '@mappedin/mvf-v2';
5519
5527
  import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject, FloorStack } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
5520
5528
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
5521
5529
  import type { IFocusable } from '@mappedin/react-sdk/mappedin-js/src/types';
@@ -5648,7 +5656,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor' {
5648
5656
  }
5649
5657
 
5650
5658
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/connection' {
5651
- import type { Feature, FeatureCollection, Point, SpaceProperties, Connection as MVFConnection } from '@mappedin/mvf';
5659
+ import type { Feature, FeatureCollection, Point, SpaceProperties, Connection as MVFConnection } from '@mappedin/mvf-v2';
5652
5660
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
5653
5661
  import type Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
5654
5662
  import type { Floor, LocationProfile, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
@@ -5753,7 +5761,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/connection'
5753
5761
  }
5754
5762
 
5755
5763
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/object' {
5756
- import type { ObstructionCollection } from '@mappedin/mvf';
5764
+ import type { ObstructionCollection } from '@mappedin/mvf-v2';
5757
5765
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
5758
5766
  import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
5759
5767
  import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
@@ -5816,8 +5824,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/object' {
5816
5824
  */
5817
5825
  get geoJSON(): {
5818
5826
  properties: null;
5819
- type: import("@mappedin/mvf").FeatureType;
5820
- geometry: import("@mappedin/mvf").Polygon | import("@mappedin/mvf").LineString;
5827
+ type: import("@mappedin/mvf-v2").FeatureType;
5828
+ geometry: import("@mappedin/mvf-v2").Polygon | import("@mappedin/mvf-v2").LineString;
5821
5829
  };
5822
5830
  /** @internal */
5823
5831
  get anchorTarget(): Coordinate;
@@ -5964,7 +5972,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate'
5964
5972
  }
5965
5973
 
5966
5974
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/poi' {
5967
- import type { FeatureCollection, Point, SpaceProperties } from '@mappedin/mvf';
5975
+ import type { FeatureCollection, Point, SpaceProperties } from '@mappedin/mvf-v2';
5968
5976
  import type { Floor, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
5969
5977
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
5970
5978
  import type { IGeoJSONData } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
@@ -6018,7 +6026,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/poi' {
6018
6026
  */
6019
6027
  get geoJSON(): {
6020
6028
  properties: null;
6021
- type: import("@mappedin/mvf").FeatureType;
6029
+ type: import("@mappedin/mvf-v2").FeatureType;
6022
6030
  geometry: Point;
6023
6031
  };
6024
6032
  /** @internal */
@@ -6052,7 +6060,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/poi' {
6052
6060
  }
6053
6061
 
6054
6062
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation' {
6055
- import type { AnnotationCollection } from '@mappedin/mvf';
6063
+ import type { AnnotationCollection } from '@mappedin/mvf-v2';
6056
6064
  import type { Floor, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6057
6065
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
6058
6066
  import type { IGeoJSONData } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
@@ -6119,8 +6127,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation'
6119
6127
  */
6120
6128
  get geoJSON(): {
6121
6129
  properties: null;
6122
- type: import("@mappedin/mvf").FeatureType;
6123
- geometry: import("@mappedin/mvf").Point;
6130
+ type: import("@mappedin/mvf-v2").FeatureType;
6131
+ geometry: import("@mappedin/mvf-v2").Point;
6124
6132
  };
6125
6133
  /** @internal */
6126
6134
  get focusTarget(): Coordinate;
@@ -6153,7 +6161,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation'
6153
6161
  }
6154
6162
 
6155
6163
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink' {
6156
- import type { LocationLink, Hyperlink as MVFHyperlink } from '@mappedin/mvf';
6164
+ import type { LocationLink, Hyperlink as MVFHyperlink } from '@mappedin/mvf-v2';
6157
6165
  import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
6158
6166
  /**
6159
6167
  * A class representing hyperlink link data within the map.
@@ -6210,7 +6218,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink'
6210
6218
  }
6211
6219
 
6212
6220
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image' {
6213
- import type { Image as MVFImage } from '@mappedin/mvf';
6221
+ import type { Image as MVFImage } from '@mappedin/mvf-v2';
6214
6222
  import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
6215
6223
  import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6216
6224
  /**
@@ -6277,7 +6285,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image' {
6277
6285
  }
6278
6286
 
6279
6287
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor-stack' {
6280
- import type { FloorStack as MVFFloorStack } from '@mappedin/mvf';
6288
+ import type { FloorStack as MVFFloorStack } from '@mappedin/mvf-v2';
6281
6289
  import type { MapDataInternal, Floor, Facade } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6282
6290
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
6283
6291
  /**
@@ -6369,7 +6377,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/facade' {
6369
6377
  import type { Space, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6370
6378
  import { Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6371
6379
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
6372
- import type { Facade as MVFFacade } from '@mappedin/mvf';
6380
+ import type { Facade as MVFFacade } from '@mappedin/mvf-v2';
6373
6381
  import type { IAnchorable, IFocusable } from '@mappedin/react-sdk/mappedin-js/src/types';
6374
6382
  /**
6375
6383
  * A Facade is a collection of spaces that make up the exterior representation of a Floor Stack ({@link FloorStack}).
@@ -6411,7 +6419,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/facade' {
6411
6419
  }
6412
6420
 
6413
6421
  declare module '@mappedin/react-sdk/mappedin-js/src/utils/data-creation' {
6414
- import type { AnnotationCollection, EntranceCollection, FeatureCollection, Connection as MVFConnection, EnterpriseCategory as MVFEnterpriseCategory, EnterpriseCategoryId as MVFEnterpriseCategoryId, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseLocationId as MVFEnterpriseLocationId, EnterpriseVenue as MVFEnterpriseVenue, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, NodeCollection, ObstructionCollection, ParsedMVF, Point, SpaceCollection, SpaceProperties, AreaCollection, AreaId, EnterpriseLocationInstance, SpaceId } from '@mappedin/mvf';
6422
+ import type { AnnotationCollection, EntranceCollection, FeatureCollection, Connection as MVFConnection, EnterpriseCategory as MVFEnterpriseCategory, EnterpriseCategoryId as MVFEnterpriseCategoryId, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseLocationId as MVFEnterpriseLocationId, EnterpriseVenue as MVFEnterpriseVenue, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, NodeCollection, ObstructionCollection, ParsedMVF, Point, SpaceCollection, SpaceProperties, AreaCollection, AreaId, EnterpriseLocationInstance, SpaceId } from '@mappedin/mvf-v2';
6415
6423
  import { Annotation, Area, Connection, Door, EnterpriseCategory, EnterpriseLocation, Facade, Floor, FloorStack, MapObject, Node, PointOfInterest, Space, LocationCategory, LocationProfile, type MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6416
6424
  export type MapDataRecords = {
6417
6425
  spacesById: Record<string, Space>;
@@ -6515,7 +6523,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/utils/data-creation' {
6515
6523
  }
6516
6524
 
6517
6525
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
6518
- import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
6526
+ import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf-v2';
6519
6527
  import type { Coordinate, EnterpriseCategory, MapDataInternal, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6520
6528
  import type Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
6521
6529
  import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
@@ -6716,7 +6724,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
6716
6724
  }
6717
6725
 
6718
6726
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
6719
- import type { EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
6727
+ import type { EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf-v2';
6720
6728
  import type { MapDataInternal, EnterpriseLocation } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6721
6729
  import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
6722
6730
  /**
@@ -6812,7 +6820,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
6812
6820
  }
6813
6821
 
6814
6822
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
6815
- import type { EnterpriseVenue as MVFEnterpriseVenue, Language } from '@mappedin/mvf';
6823
+ import type { EnterpriseVenue as MVFEnterpriseVenue, Language } from '@mappedin/mvf-v2';
6816
6824
  import type { Hyperlink, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6817
6825
  import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
6818
6826
  /**
@@ -6926,7 +6934,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
6926
6934
  }
6927
6935
 
6928
6936
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-profile' {
6929
- import type { LocationId, LocationSocial, Location as MVFLocation } from '@mappedin/mvf';
6937
+ import type { LocationId, LocationSocial, Location as MVFLocation } from '@mappedin/mvf-v2';
6930
6938
  import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
6931
6939
  import type { Annotation, Connection, Door, LocationCategory, MapDataInternal, Space, MapObject, PointOfInterest, Area } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6932
6940
  import type { TFocusTarget, TNavigationTarget, IFocusable, INavigatable } from '@mappedin/react-sdk/mappedin-js/src/types';
@@ -7060,7 +7068,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-pr
7060
7068
  }
7061
7069
 
7062
7070
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-category' {
7063
- import type { CategoryId, Category as MVFCategory } from '@mappedin/mvf';
7071
+ import type { CategoryId, Category as MVFCategory } from '@mappedin/mvf-v2';
7064
7072
  import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
7065
7073
  import type { LocationProfile, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
7066
7074
  class LocationCategory extends BaseMetaData implements Omit<MVFCategory, 'parent'> {
@@ -8911,7 +8919,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
8911
8919
  import type { Feature, LineString, MultiLineString, MultiPolygon, Polygon, Position as GeoJsonPosition } from 'geojson';
8912
8920
  import type { BBox } from '@turf/turf';
8913
8921
  import { type ImageProperties } from '@mappedin/react-sdk/geojson/src/components/image';
8914
- import { type BaseTextAreaProperties, type EnterpriseTexture } from '@mappedin/mvf';
8922
+ import { type BaseTextAreaProperties, type EnterpriseTexture } from '@mappedin/mvf-v2';
8915
8923
  import type { Text } from 'troika-three-text';
8916
8924
  import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
8917
8925
  export class EntityBatchedMesh extends BatchedMesh {
@@ -9488,7 +9496,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
9488
9496
  import { Group as TweenGroup } from '@tweenjs/tween.js';
9489
9497
  import { Debug } from '@mappedin/react-sdk/geojson/src/utils/debug';
9490
9498
  import { Occlusion2DSystem } from '@mappedin/react-sdk/geojson/src/systems/2d-occlusion/system';
9491
- import type { FloatingFloorTextProperties } from '@mappedin/mvf';
9499
+ import type { FloatingFloorTextProperties } from '@mappedin/mvf-v2';
9492
9500
  export type * from '@mappedin/react-sdk/geojson/src/types';
9493
9501
  export const raycaster: Raycaster;
9494
9502
  /**
@@ -10076,7 +10084,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/text3d' {
10076
10084
  import type { Text3DStyle } from '@mappedin/react-sdk/geojson/src/components/styles';
10077
10085
  import type { MeshComponentProperties } from '@mappedin/react-sdk/geojson/src/components/mesh';
10078
10086
  import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
10079
- import { type FloorTextCommonProperties } from '@mappedin/mvf';
10087
+ import { type FloorTextCommonProperties } from '@mappedin/mvf-v2';
10080
10088
  /**
10081
10089
  * State representing an Text3D
10082
10090
  */
@@ -11004,7 +11012,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/styles' {
11004
11012
  }
11005
11013
 
11006
11014
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
11007
- import type { ParsedMVF } from '@mappedin/mvf';
11015
+ import type { ParsedMVF } from '@mappedin/mvf-v2';
11008
11016
  import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
11009
11017
  import { PubSub } from '@packages/internal/common';
11010
11018
  import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
@@ -11985,7 +11993,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths' {
11985
11993
  }
11986
11994
 
11987
11995
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/style' {
11988
- import type { StyleCollection } from '@mappedin/mvf';
11996
+ import type { StyleCollection } from '@mappedin/mvf-v2';
11989
11997
  import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
11990
11998
  export class Style {
11991
11999
  #private;
@@ -12977,7 +12985,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metada
12977
12985
  }
12978
12986
 
12979
12987
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/detailed-map-data' {
12980
- import type { Details, Feature as MVFFeature, Geometry } from '@mappedin/mvf';
12988
+ import type { Details, Feature as MVFFeature, Geometry } from '@mappedin/mvf-v2';
12981
12989
  import type LocationProfile from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-profile';
12982
12990
  import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
12983
12991
  import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
@@ -13052,7 +13060,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object
13052
13060
  }
13053
13061
 
13054
13062
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/opening-hours' {
13055
- import type { OpeningHoursSpecification } from '@mappedin/mvf';
13063
+ import type { OpeningHoursSpecification } from '@mappedin/mvf-v2';
13056
13064
  /**
13057
13065
  * Represents the opening hours of a location.
13058
13066
  */
@@ -14709,7 +14717,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/styles/constants' {
14709
14717
  }
14710
14718
 
14711
14719
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
14712
- import type { Polygon, MultiPolygon, FloorProperties as MVFFloor, ParsedMVF, Feature } from '@mappedin/mvf';
14720
+ import type { Polygon, MultiPolygon, FloorProperties as MVFFloor, ParsedMVF, Feature } from '@mappedin/mvf-v2';
14713
14721
  import type { RendererCore, BBox } from '@mappedin/core-sdk';
14714
14722
  import type { AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
14715
14723
  import type { TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
@@ -14749,7 +14757,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
14749
14757
 
14750
14758
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
14751
14759
  import { Coordinate, MapObject, Space, type Floor, type Facade } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
14752
- import type { EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
14760
+ import type { EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf-v2';
14753
14761
  import type { PolygonFeatureProperties } from '@packages/internal/mvf-utils';
14754
14762
  import type { BBox, FeatureCollection, MultiLineString } from 'geojson';
14755
14763
  import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle, Position, EntityId, PathState } from '@mappedin/core-sdk';
@@ -14801,7 +14809,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
14801
14809
 
14802
14810
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-stack-object' {
14803
14811
  import type { RendererCore } from '@mappedin/core-sdk';
14804
- import type { FloorId, FloorStack as MVFFloorStack, Facade as MVFFacade } from '@mappedin/mvf';
14812
+ import type { FloorId, FloorStack as MVFFloorStack, Facade as MVFFacade } from '@mappedin/mvf-v2';
14805
14813
  import type { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
14806
14814
  export class FloorStackObject implements Omit<MVFFloorStack, 'maps' | 'floors' | 'defaultFloor' | 'footprint'> {
14807
14815
  #private;
@@ -23628,7 +23636,7 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/node' {
23628
23636
 
23629
23637
  declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/obstruction' {
23630
23638
  import type { LineString, Polygon, Feature } from 'geojson';
23631
- import type { ObstructionProperties, ObstructionCollection } from '@mappedin/mvf';
23639
+ import type { ObstructionProperties, ObstructionCollection } from '@mappedin/mvf-v2';
23632
23640
  /**
23633
23641
  * A GeoJSON feature representing an obstruction, which can be either a line string or a polygon.
23634
23642
  * This type is crucial for mapping and managing areas that impede or restrict movement, such as barriers or restricted zones.
@@ -27279,7 +27287,7 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/navigation-gr
27279
27287
 
27280
27288
  declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/space' {
27281
27289
  import type { LineString, Polygon, Point, Feature } from 'geojson';
27282
- import type { SpaceProperties, SpaceCollection } from '@mappedin/mvf';
27290
+ import type { SpaceProperties, SpaceCollection } from '@mappedin/mvf-v2';
27283
27291
  /**
27284
27292
  * A GeoJSON feature representing a space, which can be either a line string or a polygon.
27285
27293
  * This type is crucial for mapping and managing areas that impede or restrict movement, such as barriers or restricted zones.
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{k as E,l as V,m as k}from"./chunk-LQS3FVBN.js";import{d as x,q as A}from"./chunk-VVO7QO3Y.js";import"./chunk-FSBH4P52.js";import"./chunk-OFX4UKYI.js";import"./chunk-FAMEMKII.js";import{a}from"./chunk-GVHB2OJC.js";import{a as n}from"./chunk-BYMKRV3A.js";a();a();import Y,{useCallback as $,useMemo as q}from"react";import{useContext as C,useEffect as T,useRef as S,useState as D}from"react";import{createPortal as B}from"react-dom";a();import{createContext as z,useContext as F}from"react";a();var L=class L extends Error{constructor(t){super("".concat(t," must be used within a MapView component."))}};n(L,"MapViewNullError");var m=L;var p=z({mapData:void 0,mapView:void 0});function G(){let{mapData:e,mapView:t}=F(p);if(!e||!t)throw new m("useMap");return{mapData:e,mapView:t}}n(G,"useMap");a();import{useEffect as U}from"react";function u(e,t){U(()=>{t!=null&&typeof e=="function"&&e(t)},[e,t])}n(u,"useOnLoad");function O(e){let{mapView:t}=C(p),r=S(),[o,i]=D(null);return T(()=>{if(t==null)throw new m("Marker");return r.current=t.Markers.add(e.target,"",{...e.options,dynamicResize:!0}),i(r.current),()=>{t==null||r.current==null||t.Markers.remove(r.current)}},[t,e.target]),T(()=>{o&&(t==null||t.updateState(o,{...e.options}))},[e.options]),u(e.onLoad,o),t==null||o==null?null:B(e.children,o.contentEl,o.id)}n(O,"Marker");function J(e){let{mapView:t}=C(p),[r,o]=D(null),i=S(A()),l=S(e.target),f=$(d=>{var M;o(d),(M=e.onLoad)==null||M.call(e,d)},[e.onLoad]);T(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:d=300,easing:M="linear"}=e;t.Markers.animateTo(r,e.target,{duration:d,easing:M})}},[t,e.target,r]);let c=q(()=>({...e,duration:void 0,easing:void 0}),[e.duration,e.easing]);return Y.createElement(O,{...c,key:i.current,target:l.current,onLoad:f})}n(J,"AnimatedMarker");a();import{useContext as K,useEffect as R,useRef as Q,useState as X}from"react";function Z(e){let{mapView:t}=K(p),r=Q(),[o,i]=X(void 0);return R(()=>{if(t==null)throw new m("Label");return r.current=t.Labels.add(e.target,e.text,e.options),i(r.current),()=>{t==null||r.current==null||t.Labels.remove(r.current)}},[t,e.target]),R(()=>{r.current&&(t==null||t.updateState(r.current,{text:e.text,...e.options}))},[e.text,e.options]),u(e.onLoad,o),null}n(Z,"Label");a();import{useCallback as _,useContext as ee,useEffect as te}from"react";function re(e,t){let{mapView:r}=ee(p),o=_(i=>t(i),[t]);te(()=>{if(r==null)throw new m("useEvent");return r.on(e,o),()=>{r!=null&&r.off(e,o)}},[r,e,t])}n(re,"useEvent");a();import{useContext as ae,useEffect as oe,useRef as ne,useState as ie}from"react";function pe(e){let{mapView:t}=ae(p),r=ne(),[o,i]=ie(void 0);return oe(()=>{if(t==null)throw new m("Path");let l=t.Paths.add(e.coordinate,e.options);return l.animation.then(()=>{var f;(f=e.onDrawComplete)==null||f.call(e)}),i(l),r.current=l,()=>{r.current&&t.Paths.remove(r.current)}},[t,e.coordinate,e.options]),u(e.onLoad,o),null}n(pe,"Path");a();import w,{useCallback as me,useEffect as ue,useMemo as se,useRef as j,useState as W}from"react";var de={width:"100%",height:"100%",position:"relative"};function le(e){let{mapData:t,options:r,style:o,fallback:i,children:l,...f}=e,c=j(!1),[d,M]=W(void 0),[h,P]=W(!0),y=j(null),b=se(()=>r,[]),v=me(()=>{if(t&&(y!=null&&y.current)){if(d)return;V(y.current,t,b).then(g=>{M(g)}).catch(g=>{x.error("Failed to render MapView",g)}).finally(()=>{P(!1)})}},[t,y.current,b]);return ue(()=>{c.current||(c.current=!0,v())},[v]),u(e.onLoad,d),w.createElement(p.Provider,{value:{mapData:t,mapView:d}},w.createElement("div",{"data-testid":"mappedin-map",ref:y,style:{...de,...o},...f}),h?w.createElement(w.Fragment,null,i):l)}n(le,"MapView");a();import{useContext as fe,useEffect as H,useState as ce}from"react";function Me(e){let{mapView:t}=fe(p),[r,o]=ce(!1);return H(()=>{if(t==null)throw new m("Navigation");return t.Navigation.draw(e.directions,e.options).then(()=>{var i;o(!0),(i=e.onDrawComplete)==null||i.call(e)}),()=>{t.Navigation.clear()}},[t,e.directions,e.options]),H(()=>{r!==!1&&typeof e.onLoad=="function"&&e.onLoad()},[e.onLoad,r]),null}n(Me,"Navigation");a();import{useContext as Pe,useEffect as ye,useRef as he,useState as xe}from"react";function we(e){let{mapView:t}=Pe(p),r=he(),[o,i]=xe(void 0);return ye(()=>{if(t==null)throw new Error("MapView not initialized");return r.current=t.Shapes.add(e.geometry,e.style,e.floor),i(r.current),()=>{t==null||r.current==null||t.Shapes.remove(r.current)}},[t,e.geometry,e.style,e.floor]),u(e.onLoad,o),null}n(we,"Shape");a();import{useContext as ge,useEffect as I,useRef as Le,useState as Te}from"react";function Se(e){let{mapView:t}=ge(p),r=Le(),[o,i]=Te(void 0);return I(()=>{if(t==null)throw new m("Model");return r.current=t.Models.add(e.target,e.url,e.options),i(r.current),()=>{t==null||r.current==null||t.Models.remove(r.current)}},[t,e.url]),I(()=>{r.current&&(t==null||t.updateState(r.current,{position:e.target,...e.options}))},[e.options,e.target]),u(e.onLoad,o),null}n(Se,"Model");a();import{useCallback as Ne,useEffect as be,useMemo as ve,useRef as Ae,useState as N}from"react";function Ee(e){let[t,r]=N(void 0),[o,i]=N(!0),[l,f]=N(void 0),c=Ae(0),d=ve(()=>e,[]),M=Ne(()=>{let h=++c.current;i(!0),f(void 0),E(d).then(P=>{c.current===h&&r(P)}).catch(P=>{c.current===h&&(x.error("Failed to fetch MapData",P),f(P))}).finally(()=>{c.current===h&&i(!1)})},[d]);return be(()=>{M()},[M]),{mapData:t,isLoading:o,error:l}}n(Ee,"useMapData");var Xt=k;export{J as AnimatedMarker,Z as Label,le as MapView,O as Marker,Se as Model,Me as Navigation,pe as Path,we as Shape,Xt as default,re as useEvent,G as useMap,Ee as useMapData};
1
+ import{k as E,l as V,m as k}from"./chunk-QZW6TJU7.js";import{d as x,q as A}from"./chunk-K5IZJL77.js";import"./chunk-QARZ2ADL.js";import"./chunk-A4BAKOBA.js";import"./chunk-HQPJR25Y.js";import{a}from"./chunk-GQRZXW47.js";import{a as n}from"./chunk-2OY65JNC.js";a();a();import Y,{useCallback as $,useMemo as q}from"react";import{useContext as C,useEffect as T,useRef as S,useState as D}from"react";import{createPortal as B}from"react-dom";a();import{createContext as z,useContext as F}from"react";a();var L=class L extends Error{constructor(t){super("".concat(t," must be used within a MapView component."))}};n(L,"MapViewNullError");var m=L;var p=z({mapData:void 0,mapView:void 0});function G(){let{mapData:e,mapView:t}=F(p);if(!e||!t)throw new m("useMap");return{mapData:e,mapView:t}}n(G,"useMap");a();import{useEffect as U}from"react";function u(e,t){U(()=>{t!=null&&typeof e=="function"&&e(t)},[e,t])}n(u,"useOnLoad");function O(e){let{mapView:t}=C(p),r=S(),[o,i]=D(null);return T(()=>{if(t==null)throw new m("Marker");return r.current=t.Markers.add(e.target,"",{...e.options,dynamicResize:!0}),i(r.current),()=>{t==null||r.current==null||t.Markers.remove(r.current)}},[t,e.target]),T(()=>{o&&(t==null||t.updateState(o,{...e.options}))},[e.options]),u(e.onLoad,o),t==null||o==null?null:B(e.children,o.contentEl,o.id)}n(O,"Marker");function J(e){let{mapView:t}=C(p),[r,o]=D(null),i=S(A()),l=S(e.target),f=$(d=>{var M;o(d),(M=e.onLoad)==null||M.call(e,d)},[e.onLoad]);T(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:d=300,easing:M="linear"}=e;t.Markers.animateTo(r,e.target,{duration:d,easing:M})}},[t,e.target,r]);let c=q(()=>({...e,duration:void 0,easing:void 0}),[e.duration,e.easing]);return Y.createElement(O,{...c,key:i.current,target:l.current,onLoad:f})}n(J,"AnimatedMarker");a();import{useContext as K,useEffect as R,useRef as Q,useState as X}from"react";function Z(e){let{mapView:t}=K(p),r=Q(),[o,i]=X(void 0);return R(()=>{if(t==null)throw new m("Label");return r.current=t.Labels.add(e.target,e.text,e.options),i(r.current),()=>{t==null||r.current==null||t.Labels.remove(r.current)}},[t,e.target]),R(()=>{r.current&&(t==null||t.updateState(r.current,{text:e.text,...e.options}))},[e.text,e.options]),u(e.onLoad,o),null}n(Z,"Label");a();import{useCallback as _,useContext as ee,useEffect as te}from"react";function re(e,t){let{mapView:r}=ee(p),o=_(i=>t(i),[t]);te(()=>{if(r==null)throw new m("useEvent");return r.on(e,o),()=>{r!=null&&r.off(e,o)}},[r,e,t])}n(re,"useEvent");a();import{useContext as ae,useEffect as oe,useRef as ne,useState as ie}from"react";function pe(e){let{mapView:t}=ae(p),r=ne(),[o,i]=ie(void 0);return oe(()=>{if(t==null)throw new m("Path");let l=t.Paths.add(e.coordinate,e.options);return l.animation.then(()=>{var f;(f=e.onDrawComplete)==null||f.call(e)}),i(l),r.current=l,()=>{r.current&&t.Paths.remove(r.current)}},[t,e.coordinate,e.options]),u(e.onLoad,o),null}n(pe,"Path");a();import w,{useCallback as me,useEffect as ue,useMemo as se,useRef as j,useState as W}from"react";var de={width:"100%",height:"100%",position:"relative"};function le(e){let{mapData:t,options:r,style:o,fallback:i,children:l,...f}=e,c=j(!1),[d,M]=W(void 0),[h,P]=W(!0),y=j(null),b=se(()=>r,[]),v=me(()=>{if(t&&(y!=null&&y.current)){if(d)return;V(y.current,t,b).then(g=>{M(g)}).catch(g=>{x.error("Failed to render MapView",g)}).finally(()=>{P(!1)})}},[t,y.current,b]);return ue(()=>{c.current||(c.current=!0,v())},[v]),u(e.onLoad,d),w.createElement(p.Provider,{value:{mapData:t,mapView:d}},w.createElement("div",{"data-testid":"mappedin-map",ref:y,style:{...de,...o},...f}),h?w.createElement(w.Fragment,null,i):l)}n(le,"MapView");a();import{useContext as fe,useEffect as H,useState as ce}from"react";function Me(e){let{mapView:t}=fe(p),[r,o]=ce(!1);return H(()=>{if(t==null)throw new m("Navigation");return t.Navigation.draw(e.directions,e.options).then(()=>{var i;o(!0),(i=e.onDrawComplete)==null||i.call(e)}),()=>{t.Navigation.clear()}},[t,e.directions,e.options]),H(()=>{r!==!1&&typeof e.onLoad=="function"&&e.onLoad()},[e.onLoad,r]),null}n(Me,"Navigation");a();import{useContext as Pe,useEffect as ye,useRef as he,useState as xe}from"react";function we(e){let{mapView:t}=Pe(p),r=he(),[o,i]=xe(void 0);return ye(()=>{if(t==null)throw new Error("MapView not initialized");return r.current=t.Shapes.add(e.geometry,e.style,e.floor),i(r.current),()=>{t==null||r.current==null||t.Shapes.remove(r.current)}},[t,e.geometry,e.style,e.floor]),u(e.onLoad,o),null}n(we,"Shape");a();import{useContext as ge,useEffect as I,useRef as Le,useState as Te}from"react";function Se(e){let{mapView:t}=ge(p),r=Le(),[o,i]=Te(void 0);return I(()=>{if(t==null)throw new m("Model");return r.current=t.Models.add(e.target,e.url,e.options),i(r.current),()=>{t==null||r.current==null||t.Models.remove(r.current)}},[t,e.url]),I(()=>{r.current&&(t==null||t.updateState(r.current,{position:e.target,...e.options}))},[e.options,e.target]),u(e.onLoad,o),null}n(Se,"Model");a();import{useCallback as Ne,useEffect as be,useMemo as ve,useRef as Ae,useState as N}from"react";function Ee(e){let[t,r]=N(void 0),[o,i]=N(!0),[l,f]=N(void 0),c=Ae(0),d=ve(()=>e,[]),M=Ne(()=>{let h=++c.current;i(!0),f(void 0),E(d).then(P=>{c.current===h&&r(P)}).catch(P=>{c.current===h&&(x.error("Failed to fetch MapData",P),f(P))}).finally(()=>{c.current===h&&i(!1)})},[d]);return be(()=>{M()},[M]),{mapData:t,isLoading:o,error:l}}n(Ee,"useMapData");var Xt=k;export{J as AnimatedMarker,Z as Label,le as MapView,O as Marker,Se as Model,Me as Navigation,pe as Path,we as Shape,Xt as default,re as useEvent,G as useMap,Ee as useMapData};