@mappedin/react-sdk 6.0.1-beta.41 → 6.0.1-beta.43

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.
@@ -10,6 +10,7 @@
10
10
  // ../react/@mappedin/mappedin-js
11
11
  // ../react/@packages/internal/common
12
12
  // ../react/@mappedin/core-sdk
13
+ // ../react/@packages/internal/mvf-utils/tokens/token-manager
13
14
  // ../react/@packages/internal/outdoor-context-v4
14
15
  // ../react/@packages/internal/geojson-navigator
15
16
  // ../react/@mappedin/mvf-core
@@ -406,13 +407,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
406
407
  export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
407
408
  export type { MapView, MapData, MapViewState, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, EnvMapOptions, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, UpdateModelState, InitializeModelState, };
408
409
  export type * from 'geojson';
409
- export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, TFocusTarget, IFocusable, IAnchorable, TMapDataObjectTypes, TFloorState, } from '@mappedin/react-sdk/mappedin-js/src/types';
410
+ export type { TUpdateState, TUpdateStates, TLabelState, TGeometryState, TModelState, TShapeState, TDoorsState, TImageState, TWallsState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TAddImageOptions, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, TBlueDotPositionUpdate, TFocusTarget, IFocusable, IAnchorable, TMapDataObjectTypes, TFloorState, TFacadeState, } from '@mappedin/react-sdk/mappedin-js/src/types';
410
411
  export { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
411
412
  export type { Label, Marker, Path, PathSegment, Shape, CameraTransform, Model, Image, Text3D, } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
412
413
  export type { Debug } from '@mappedin/react-sdk/mappedin-js/src/debug';
413
414
  export type { Navigation, TNavigationOptions } from '@mappedin/react-sdk/mappedin-js/src/navigation';
414
415
  export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
415
- export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, Image as ImageData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, LocationProfile, LocationCategory, Facade, Node, Area, type Places, } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
416
+ export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, ImageMetaData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, LocationProfile, LocationCategory, Facade, Node, Area, type Places, } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
416
417
  export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, DynamicFocus, } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
417
418
  export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/react-sdk/mappedin-js/src/search';
418
419
  export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/react-sdk/mappedin-js/src/query';
@@ -800,13 +801,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
800
801
  *
801
802
  * @returns {string} The current access token
802
803
  */
803
- getAccessToken(): Promise<string | undefined>;
804
- /**
805
- * Get a SAS token for fetching images on non-public maps.
806
- *
807
- * @returns {string} The SAS token
808
- */
809
- getSasToken(): Promise<string | undefined>;
804
+ getAccessToken(): string | undefined;
810
805
  /**
811
806
  * The name of the map.
812
807
  *
@@ -1231,7 +1226,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
1231
1226
  import PointOfInterest from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/poi';
1232
1227
  import Annotation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation';
1233
1228
  import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
1234
- import Image from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
1229
+ import ImageMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
1235
1230
  import FloorStack from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor-stack';
1236
1231
  import Facade from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/facade';
1237
1232
  import type { MapDataRecords, EnterpriseMapDataRecords } from '@mappedin/react-sdk/mappedin-js/src/utils/data-creation';
@@ -1250,6 +1245,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
1250
1245
  import { Query } from '@mappedin/react-sdk/mappedin-js/src/query';
1251
1246
  import LocationProfile from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-profile';
1252
1247
  import LocationCategory from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-category';
1248
+ import type { TokenManager } from '@packages/internal/mvf-utils/tokens/token-manager';
1253
1249
  /**
1254
1250
  * Internal class representing detailed map data.
1255
1251
  *
@@ -1285,7 +1281,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
1285
1281
  */
1286
1282
  readonly obstructionIdByEntranceId: Record<string, string>;
1287
1283
  readonly venue?: EnterpriseVenue;
1288
- readonly sasToken?: string;
1284
+ readonly tokenManager?: TokenManager;
1289
1285
  directions: DirectionsInternal;
1290
1286
  enterpriseMode: boolean;
1291
1287
  nodesById: MapDataRecords['nodesById'];
@@ -1432,8 +1428,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
1432
1428
  get locationCategories(): LocationCategory[];
1433
1429
  get mvfFloors(): MVFFloor[];
1434
1430
  get mvfFloorStacks(): MVFFloorStack[];
1435
- getAccessToken(): Promise<string | undefined>;
1436
- getSasToken(): Promise<string | undefined>;
1437
1431
  getByType(type: string): object[];
1438
1432
  getByType(type: 'location-profile'): LocationProfile[];
1439
1433
  getByType(type: 'location-category'): LocationCategory[];
@@ -1510,7 +1504,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
1510
1504
  */
1511
1505
  destroy(): void;
1512
1506
  }
1513
- export { Node, Area, MapDataInternal, Space, Floor, FloorStack, Facade, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, LocationCategory, LocationProfile, };
1507
+ export { Node, Area, MapDataInternal, Space, Floor, FloorStack, Facade, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, ImageMetaData, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, LocationCategory, LocationProfile, };
1514
1508
  export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space';
1515
1509
  export type { Places };
1516
1510
  }
@@ -2309,6 +2303,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
2309
2303
  */
2310
2304
  opacity: number;
2311
2305
  };
2306
+ export type TFacadeState = {
2307
+ type: 'facade';
2308
+ /**
2309
+ * The opacity of the facade.
2310
+ */
2311
+ opacity: number;
2312
+ };
2312
2313
  /**
2313
2314
  * Defines the state for geometry elements like {@link Space} when updated.
2314
2315
  */
@@ -2379,9 +2380,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
2379
2380
  /**
2380
2381
  * The type for updating the state of map elements (colors, texts, etc.).
2381
2382
  */
2382
- export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS | Door ? Partial<TDoorsState> : T extends Model ? Partial<UpdateModelState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject | Facade ? Partial<TGeometryState> : T extends Floor ? Partial<TFloorState> : T extends Shape ? Partial<Omit<TShapeState, 'height' | 'type'>> : T extends Text3D ? UpdatableText3DState : T extends Path ? Partial<TPathState> : T extends PathSegment ? Partial<TPathState> : T extends string ? Record<string, any> : never;
2383
+ export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS | Door ? Partial<TDoorsState> : T extends Model ? Partial<UpdateModelState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Floor ? Partial<TFloorState> : T extends Facade ? Partial<TFacadeState> : T extends Shape ? Partial<Omit<TShapeState, 'height' | 'type'>> : T extends Text3D ? UpdatableText3DState : T extends Path ? Partial<TPathState> : T extends PathSegment ? Partial<TPathState> : T extends string ? Record<string, any> : never;
2383
2384
  export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState> | Partial<TPathState>;
2384
- export type TGetState<T> = T extends WALLS ? TWallsState | undefined : T extends DOORS ? TDoorsState | undefined : T extends Marker ? TMarkerState | undefined : T extends Shape ? TShapeState | undefined : T extends Model ? TModelState | undefined : T extends Label ? TLabelState | undefined : T extends Image ? TImageState | undefined : T extends Text3D ? Text3DState | undefined : T extends Space | MapObject ? TGeometryState | undefined : T extends Floor ? TFloorState | undefined : T extends Path ? TPathState | undefined : T extends PathSegment ? TPathState | undefined : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | TPathState | undefined : never;
2385
+ export type TGetState<T> = T extends WALLS ? TWallsState | undefined : T extends DOORS ? TDoorsState | undefined : T extends Marker ? TMarkerState | undefined : T extends Shape ? TShapeState | undefined : T extends Model ? TModelState | undefined : T extends Label ? TLabelState | undefined : T extends Image ? TImageState | undefined : T extends Text3D ? Text3DState | undefined : T extends Space | MapObject ? TGeometryState | undefined : T extends Floor ? TFloorState | undefined : T extends Facade ? TFacadeState | undefined : T extends Path ? TPathState | undefined : T extends PathSegment ? TPathState | undefined : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | TPathState | undefined : never;
2385
2386
  /**
2386
2387
  * Options for {@link Camera} animations on the map.
2387
2388
  */
@@ -3104,6 +3105,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/constants' {
3104
3105
  export const FOOTPRINT_LAYER = "FootprintLayer";
3105
3106
  export const OCCLUSION_LAYER = "OcclusionLayer";
3106
3107
  export const IMAGES_LAYER = "ImagesLayer";
3108
+ export const FACADES_LAYER = "FacadesLayer";
3107
3109
  export const SELF_SERVE_API_AUDIENCE: string[];
3108
3110
  export const ENTERPRISE_API_AUDIENCE: string[];
3109
3111
  export const MAPPEDIN_COLORS: {
@@ -3896,6 +3898,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
3896
3898
  import type { LocalePackUrls } from '@packages/internal/mvf-utils';
3897
3899
  import type { LanguagePackHydrationItem } from '@mappedin/react-sdk/mappedin-js/src/types';
3898
3900
  import type { EnvControl, TGetMapDataOptions } from '@packages/internal/mvf-utils/mvf-utils';
3901
+ import { TokenManager } from '@packages/internal/mvf-utils/tokens/token-manager';
3899
3902
  /**
3900
3903
  * Places are the main objects that can be searched for.
3901
3904
  */
@@ -3925,7 +3928,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
3925
3928
  localePacksUrls?: LocalePackUrls;
3926
3929
  languagePacks?: LanguagePackHydrationItem[];
3927
3930
  binaryBundle?: Uint8Array;
3928
- sasToken?: string;
3931
+ tokenManager?: TokenManager;
3929
3932
  getMapDataOptions?: TGetMapDataOptions;
3930
3933
  };
3931
3934
  /**
@@ -5113,10 +5116,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink'
5113
5116
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image' {
5114
5117
  import type { Image as MVFImage } from '@mappedin/mvf';
5115
5118
  import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
5119
+ import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
5116
5120
  /**
5117
5121
  * A class representing image link data within the map.
5118
5122
  */
5119
- class Image extends BaseMetaData {
5123
+ class ImageMetaData extends BaseMetaData {
5120
5124
  #private;
5121
5125
  /**
5122
5126
  * @internal
@@ -5128,12 +5132,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image' {
5128
5132
  * @param instance The instance to check.
5129
5133
  * @returns {boolean} True if the instance is a Image, false otherwise.
5130
5134
  */
5131
- static is(instance: object): instance is Image;
5135
+ static is(instance: object): instance is ImageMetaData;
5132
5136
  /**
5133
5137
  * @internal
5134
5138
  */
5135
5139
  constructor(options: {
5136
5140
  mvfData: MVFImage;
5141
+ mapData: MapDataInternal;
5137
5142
  });
5138
5143
  /**
5139
5144
  * Gets the url of the image.
@@ -5172,7 +5177,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image' {
5172
5177
  */
5173
5178
  destroy(): void;
5174
5179
  }
5175
- export default Image;
5180
+ export default ImageMetaData;
5176
5181
  }
5177
5182
 
5178
5183
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor-stack' {
@@ -5831,10 +5836,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-pr
5831
5836
  import type { TFocusTarget, TNavigationTarget, IFocusable, INavigatable } from '@mappedin/react-sdk/mappedin-js/src/types';
5832
5837
  import { OpeningHours } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/opening-hours';
5833
5838
  import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
5834
- import Image from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
5835
- type LocationData = Omit<MVFLocation, 'categories' | 'spaces' | 'obstructions' | 'entrances' | 'shapes' | 'connections' | 'annotations' | 'areas' | 'openingHoursSpecification' | 'links' | 'pictures' | 'website'> & {
5839
+ import ImageMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
5840
+ type LocationData = Omit<MVFLocation, 'categories' | 'spaces' | 'obstructions' | 'entrances' | 'shapes' | 'connections' | 'annotations' | 'areas' | 'openingHoursSpecification' | 'links' | 'pictures' | 'website' | 'icon'> & {
5836
5841
  links: Hyperlink[];
5837
- images: Image[];
5842
+ images: ImageMetaData[];
5843
+ icon?: ImageMetaData;
5838
5844
  };
5839
5845
  class LocationProfile extends BaseMetaData implements LocationData, IFocusable, INavigatable {
5840
5846
  #private;
@@ -5871,7 +5877,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-pr
5871
5877
  /**
5872
5878
  * The location's pictures
5873
5879
  */
5874
- images: Image[];
5880
+ images: ImageMetaData[];
5875
5881
  /**
5876
5882
  * Web links for the location
5877
5883
  */
@@ -5885,7 +5891,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-pr
5885
5891
  *
5886
5892
  * @format uri
5887
5893
  */
5888
- icon?: string;
5894
+ icon?: ImageMetaData;
5889
5895
  constructor(data: MapDataInternal, options: {
5890
5896
  mvfData: MVFLocation;
5891
5897
  });
@@ -9708,7 +9714,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
9708
9714
  updateWatermark(options: WatermarkUpdateOptions): void;
9709
9715
  get currentFloorStack(): FloorStack;
9710
9716
  get currentFloor(): Floor;
9711
- getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | Model | Path | PathSegment | Floor | string>(target: T): TGetState<T>;
9717
+ getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | Model | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
9712
9718
  setHoverColor(c: string): void;
9713
9719
  getHoverColor(): string | undefined;
9714
9720
  /**
@@ -11655,7 +11661,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/detailed-ma
11655
11661
  import type LocationProfile from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-profile';
11656
11662
  import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
11657
11663
  import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
11658
- import Image from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
11664
+ import ImageMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
11659
11665
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
11660
11666
  type PropertiesWithDetails = {
11661
11667
  id: string;
@@ -11684,11 +11690,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/detailed-ma
11684
11690
  */
11685
11691
  get description(): string;
11686
11692
  /**
11687
- * Gets the array of {@link Image}s associated with this map feature.
11693
+ * Gets the array of {@link ImageMetaData}s associated with this map feature.
11688
11694
  *
11689
- * @returns {Image[]} An array of Image objects, or an empty array if no images exist.
11695
+ * @returns {ImageMetaData[]} An array of Image objects, or an empty array if no images exist.
11690
11696
  */
11691
- get images(): Image[];
11697
+ get images(): ImageMetaData[];
11692
11698
  /**
11693
11699
  * Gets the array of {@link Hyperlink}s associated with this map feature.
11694
11700
  *
@@ -11826,7 +11832,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
11826
11832
 
11827
11833
  declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
11828
11834
  import { Object3D } from 'three';
11829
- import type { Mesh, Object3DEventMap, ShaderMaterial, Texture, TubeGeometry, Color, Vector2 } from 'three';
11835
+ import type { Mesh, Object3DEventMap, ShaderMaterial, Texture, TubeGeometry, Color, Vector2, Raycaster } from 'three';
11830
11836
  import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
11831
11837
  import type { MeshComponent } from '@mappedin/react-sdk/geojson/src/components/mesh';
11832
11838
  import type { ModelComponent } from '@mappedin/react-sdk/geojson/src/components/model';
@@ -11840,42 +11846,48 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
11840
11846
  import type { Text3DComponent } from '@mappedin/react-sdk/geojson/src/components/text3d';
11841
11847
  import type { ModelStyleComponnet, Text3DStyleComponent } from '@mappedin/react-sdk/geojson/src/components/styles';
11842
11848
  export enum Geometry3DComponents {
11843
- Mesh = 0,
11844
- Style = 1,
11845
- Interaction = 2
11849
+ Mesh = 0,
11850
+ Style = 1,
11851
+ Interaction = 2
11846
11852
  }
11847
11853
  type Geometry3DObjectTypes = 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image' | 'text3d';
11848
11854
  export class Geometry3DObject3D extends Object3D {
11849
- type: Geometry3DObjectTypes;
11850
- userData: {
11851
- entityId: string;
11852
- /**
11853
- * TODO: remove this when proper instancing is handled
11854
- */
11855
- isSingleModel?: boolean;
11856
11855
  type: Geometry3DObjectTypes;
11857
- };
11856
+ userData: {
11857
+ entityId: string;
11858
+ /**
11859
+ * TODO: remove this when proper instancing is handled
11860
+ */
11861
+ isSingleModel?: boolean;
11862
+ type: Geometry3DObjectTypes;
11863
+ };
11864
+ /**
11865
+ * Custom raycast implementation for model objects only.
11866
+ * This selectively enables recursive raycasting just for models, which have complex hierarchies,
11867
+ * while avoiding the performance cost of recursive raycasting for other object types.
11868
+ */
11869
+ raycast(raycaster: Raycaster, intersects: any[]): void;
11858
11870
  }
11859
11871
  export type PathMaterial = ShaderMaterial & {
11860
- uniforms: PathUniforms;
11872
+ uniforms: PathUniforms;
11861
11873
  };
11862
11874
  export type PathMesh = Mesh<TubeGeometry, PathMaterial, Object3DEventMap>;
11863
11875
  export class PatMeshContainer extends Geometry3DObject3D {
11864
- children: [PathMesh, PathMesh];
11876
+ children: [PathMesh, PathMesh];
11865
11877
  }
11866
11878
  export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | Text3DComponent | ImageComponent;
11867
11879
  type MappedComponentType<M> = M extends MeshComponent ? 'geometry' : M extends PathComponent ? 'path' : M extends ModelComponent ? 'model' : M extends CustomGeometryComponent ? 'custom-geometry' : M extends ImageComponent ? 'image' : M extends Text3DComponent ? 'text3d' : never;
11868
11880
  export class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M>> {
11869
- id: string | number;
11870
- components: [M, S, I?];
11871
- get object3d(): M["mesh"];
11872
- get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
11873
- get type(): T;
11874
- entities2D: Map<string | number, Geometry2D>;
11875
- constructor(meshComponent: M, styleComponent: S);
11876
- addEntity(entity: Geometry2D): void;
11877
- removeEntity(entity: Geometry2D): void;
11878
- removeAllEntities(): void;
11881
+ id: string | number;
11882
+ components: [M, S, I?];
11883
+ get object3d(): M["mesh"];
11884
+ get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
11885
+ get type(): T;
11886
+ entities2D: Map<string | number, Geometry2D>;
11887
+ constructor(meshComponent: M, styleComponent: S);
11888
+ addEntity(entity: Geometry2D): void;
11889
+ removeEntity(entity: Geometry2D): void;
11890
+ removeAllEntities(): void;
11879
11891
  }
11880
11892
  export type TextGeometry3D = Geometry3D<Text3DComponent, Text3DStyleComponent, InteractionComponent, 'text3d'>;
11881
11893
  export type CustomGeometry3D = Geometry3D<CustomGeometryComponent, StyleComponent, InteractionComponent, 'custom-geometry'>;
@@ -11885,86 +11897,86 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
11885
11897
  export type MeshGeometry3D = Geometry3D<MeshComponent, StyleComponent, InteractionComponent, 'geometry'>;
11886
11898
  export type Geometry3DTypes = TextGeometry3D | CustomGeometry3D | PathGeometry3D | ImageGeometry3D | MeshGeometry3D | ModelGeometry3D;
11887
11899
  export interface PathUniforms {
11888
- vertexes: {
11889
- type: 'f';
11890
- value: number;
11891
- };
11892
- resolution: {
11893
- type: 'v2';
11894
- value: Vector2;
11895
- };
11896
- cameraParameters: {
11897
- type: 'v2';
11898
- value: Vector2;
11899
- };
11900
- complete: {
11901
- type: 'f';
11902
- value: number;
11903
- };
11904
- color: {
11905
- type: 'c';
11906
- value: Color;
11907
- };
11908
- pathLength: {
11909
- type: 'f';
11910
- value: number;
11911
- };
11912
- nearRadius: {
11913
- type: 'f';
11914
- value: number;
11915
- };
11916
- farRadius: {
11917
- type: 'f';
11918
- value: number;
11919
- };
11920
- nearZoom: {
11921
- type: 'f';
11922
- value: number;
11923
- };
11924
- farZoom: {
11925
- type: 'f';
11926
- value: number;
11927
- };
11928
- pulseColor: {
11929
- type: 'c';
11930
- value: Color;
11931
- };
11932
- pulse: {
11933
- type: 'f';
11934
- value: number;
11935
- };
11936
- pulseLength: {
11937
- type: 'f';
11938
- value: number;
11939
- };
11940
- pathIsVertical: {
11941
- type: 'b';
11942
- value: boolean;
11943
- };
11944
- arrowAnimationTimer: {
11945
- type: 'f';
11946
- value: number;
11947
- };
11948
- arrowTexture: {
11949
- type: 't';
11950
- value: Texture;
11951
- };
11952
- displayArrowsOnPath: {
11953
- type: 'b';
11954
- value: boolean;
11955
- };
11956
- flattenFactor: {
11957
- type: 'f';
11958
- value: number;
11959
- };
11960
- showPulse: {
11961
- type: 'b';
11962
- value: boolean;
11963
- };
11964
- opacityMultiplier: {
11965
- type: 'f';
11966
- value: number;
11967
- };
11900
+ vertexes: {
11901
+ type: 'f';
11902
+ value: number;
11903
+ };
11904
+ resolution: {
11905
+ type: 'v2';
11906
+ value: Vector2;
11907
+ };
11908
+ cameraParameters: {
11909
+ type: 'v2';
11910
+ value: Vector2;
11911
+ };
11912
+ complete: {
11913
+ type: 'f';
11914
+ value: number;
11915
+ };
11916
+ color: {
11917
+ type: 'c';
11918
+ value: Color;
11919
+ };
11920
+ pathLength: {
11921
+ type: 'f';
11922
+ value: number;
11923
+ };
11924
+ nearRadius: {
11925
+ type: 'f';
11926
+ value: number;
11927
+ };
11928
+ farRadius: {
11929
+ type: 'f';
11930
+ value: number;
11931
+ };
11932
+ nearZoom: {
11933
+ type: 'f';
11934
+ value: number;
11935
+ };
11936
+ farZoom: {
11937
+ type: 'f';
11938
+ value: number;
11939
+ };
11940
+ pulseColor: {
11941
+ type: 'c';
11942
+ value: Color;
11943
+ };
11944
+ pulse: {
11945
+ type: 'f';
11946
+ value: number;
11947
+ };
11948
+ pulseLength: {
11949
+ type: 'f';
11950
+ value: number;
11951
+ };
11952
+ pathIsVertical: {
11953
+ type: 'b';
11954
+ value: boolean;
11955
+ };
11956
+ arrowAnimationTimer: {
11957
+ type: 'f';
11958
+ value: number;
11959
+ };
11960
+ arrowTexture: {
11961
+ type: 't';
11962
+ value: Texture;
11963
+ };
11964
+ displayArrowsOnPath: {
11965
+ type: 'b';
11966
+ value: boolean;
11967
+ };
11968
+ flattenFactor: {
11969
+ type: 'f';
11970
+ value: number;
11971
+ };
11972
+ showPulse: {
11973
+ type: 'b';
11974
+ value: boolean;
11975
+ };
11976
+ opacityMultiplier: {
11977
+ type: 'f';
11978
+ value: number;
11979
+ };
11968
11980
  }
11969
11981
  export {};
11970
11982
  }
@@ -13414,6 +13426,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
13414
13426
  import type { RendererCore, BBox } from '@mappedin/core-sdk';
13415
13427
  import type { AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
13416
13428
  import type { TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
13429
+ import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
13417
13430
  class Layer {
13418
13431
  containerId: string;
13419
13432
  labelIds: Set<string>;
@@ -13437,8 +13450,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
13437
13450
  layers: Map<string, Layer>;
13438
13451
  footprint?: Feature<Polygon | MultiPolygon | null, MVFFloor>;
13439
13452
  floorStackId: string;
13453
+ /** Map of styleId to array of facadeIds for styling */
13454
+ facadesByStyleId: Map<string, string[]>;
13440
13455
  get geoJSONBoundingBox(): BBox | undefined;
13441
- constructor(parentId: string, floor: MVFFloor, renderer: RendererCore, multiFloorView: Required<TShow3DMapOptions['multiFloorView']>, options: TShow3DMapOptions, mvf?: ParsedMVF, styleMap?: AggregatedStyleMap);
13456
+ constructor(parentId: string, floor: MVFFloor, renderer: RendererCore, multiFloorView: Required<TShow3DMapOptions['multiFloorView']>, options: TShow3DMapOptions, mvf?: ParsedMVF, styleMap?: AggregatedStyleMap, mapDataInternal?: MapDataInternal);
13442
13457
  load: () => this;
13443
13458
  get visible(): boolean;
13444
13459
  setVisible(visible: boolean): void;
@@ -13447,7 +13462,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
13447
13462
  }
13448
13463
 
13449
13464
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
13450
- import { Coordinate, type Floor, type MapObject, type Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
13465
+ import { Coordinate, type Floor, type MapObject, type Space, type Facade } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
13451
13466
  import type { EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
13452
13467
  import type { PolygonFeatureProperties } from '@packages/internal/mvf-utils';
13453
13468
  import type { BBox, FeatureCollection, MultiLineString } from 'geojson';
@@ -13486,7 +13501,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
13486
13501
  };
13487
13502
  export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, PolygonFeatureProperties<SpaceProperties | ObstructionProperties>>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Polygon | LineString | Point, PolygonFeatureProperties<SpaceProperties | ObstructionProperties>>[]>;
13488
13503
  export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
13489
- export const getTargetID: <T extends Space | Shape | MapObject | Label | Text3D | Marker | Model | Path | PathSegment | Image | Floor | string>(target: T, api: GeoJsonApi) => string | undefined;
13504
+ export const getTargetID: <T extends Space | Shape | MapObject | Label | Text3D | Marker | Model | Path | PathSegment | Image | Floor | Facade | string>(target: T, api: GeoJsonApi) => string | undefined;
13490
13505
  export function tweenToPromise(tween: Tween): Promise<void>;
13491
13506
  export function getBoundingBox(geometry: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>): BBox;
13492
13507
  export function expandBbox(bbox: BBox, bboxToExpand: BBox): number[];
@@ -13621,8 +13636,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-proc
13621
13636
  }
13622
13637
 
13623
13638
  declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
13624
- import { PerspectiveCamera, Vector3, Object3D, Mesh, Intersection, Object3DEventMap } from 'three';
13625
- import { Raycaster, Vector2 } from 'three';
13639
+ import type { PerspectiveCamera, Vector3, Object3D, Intersection, Object3DEventMap } from 'three';
13640
+ import { Mesh, Raycaster, Vector2 } from 'three';
13626
13641
  import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
13627
13642
  import { QuadTree } from '@packages/internal/quad-tree';
13628
13643
  import type { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{i as E,j as V,k}from"./chunk-FQV3UGRQ.js";import{c as x,n as A}from"./chunk-UCZ4R6AM.js";import"./chunk-33GECCQ3.js";import"./chunk-WMOC43MI.js";import"./chunk-RNI5HW3A.js";import{a}from"./chunk-JU7JJ6GL.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=$(s=>{var M;o(s),(M=e.onLoad)==null||M.call(e,s)},[e.onLoad]);T(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:s=300,easing:M="linear"}=e;t.Markers.animateTo(r,e.target,{duration:s,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 de,useRef as j,useState as W}from"react";var se={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),[s,M]=W(void 0),[h,P]=W(!0),y=j(null),b=de(()=>r,[]),v=me(()=>{if(t&&(y!=null&&y.current)){if(s)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,s),w.createElement(p.Provider,{value:{mapData:t,mapView:s}},w.createElement("div",{"data-testid":"mappedin-map",ref:y,style:{...se,...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),s=ve(()=>e,[]),M=Ne(()=>{let h=++c.current;i(!0),f(void 0),E(s).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)})},[s]);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{i as E,j as V,k}from"./chunk-WMO54VQZ.js";import{c as x,n as A}from"./chunk-OPU32TFR.js";import"./chunk-RV2X5GSW.js";import"./chunk-VTOSGJTF.js";import"./chunk-DOOA5SBB.js";import{a}from"./chunk-BVQ2DBMP.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=$(s=>{var M;o(s),(M=e.onLoad)==null||M.call(e,s)},[e.onLoad]);T(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:s=300,easing:M="linear"}=e;t.Markers.animateTo(r,e.target,{duration:s,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 de,useRef as j,useState as W}from"react";var se={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),[s,M]=W(void 0),[h,P]=W(!0),y=j(null),b=de(()=>r,[]),v=me(()=>{if(t&&(y!=null&&y.current)){if(s)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,s),w.createElement(p.Provider,{value:{mapData:t,mapView:s}},w.createElement("div",{"data-testid":"mappedin-map",ref:y,style:{...se,...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),s=ve(()=>e,[]),M=Ne(()=>{let h=++c.current;i(!0),f(void 0),E(s).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)})},[s]);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};