@mappedin/react-sdk 6.0.1-beta.31 → 6.0.1-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.txt +1 -1
- package/lib/esm/GLTFExporter-PEUUASSN.js +1 -0
- package/lib/esm/GLTFLoader-UA5TMSMR.js +1 -0
- package/lib/esm/{browser-6TMFG2TD.js → browser-U3652NS6.js} +1 -1
- package/lib/esm/{chunk-JBOWQKFZ.js → chunk-2UISP3K7.js} +1 -1
- package/lib/esm/{chunk-OEHAWF4S.js → chunk-4F56JD4R.js} +1 -1
- package/lib/esm/{chunk-XGFP4AXW.js → chunk-7VUIGM34.js} +1 -1
- package/lib/esm/chunk-IFBLXLIM.js +1 -0
- package/lib/esm/{chunk-UAHZ2VYJ.js → chunk-IXJQWNR3.js} +1 -1
- package/lib/esm/chunk-NSQIJRR4.js +1 -0
- package/lib/esm/index.d.ts +290 -21
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-BWFLN6VL.js → inspector-2SK3WH2F.js} +1 -1
- package/lib/esm/{internal-54RVYUOY.js → internal-UZLA3JGN.js} +1 -1
- package/lib/esm/{outdoor-context-v4-LZGBIU4G.js → outdoor-context-v4-HMS4RMHS.js} +1 -1
- package/lib/esm/{text3d-QVBDFM4E.js → text3d-WBCJXJV3.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/GLTFExporter-5VAJXTMW.js +0 -1
- package/lib/esm/GLTFLoader-MEKLCBHR.js +0 -1
- package/lib/esm/chunk-MK5Q3EC5.js +0 -1
- package/lib/esm/chunk-RKPQRYJD.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -253,6 +253,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
253
253
|
* @default false
|
|
254
254
|
*/
|
|
255
255
|
keepOutdoorGeometryVisible?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* @experimental
|
|
258
|
+
*
|
|
259
|
+
* Enable occlusion of labels, markers and floors.
|
|
260
|
+
*/
|
|
261
|
+
occlusion?: {
|
|
262
|
+
/**
|
|
263
|
+
* Enable occlusion.
|
|
264
|
+
* @default false
|
|
265
|
+
*/
|
|
266
|
+
enabled?: boolean;
|
|
267
|
+
};
|
|
256
268
|
};
|
|
257
269
|
/**
|
|
258
270
|
* @internal
|
|
@@ -1069,6 +1081,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
1069
1081
|
directions: Directions;
|
|
1070
1082
|
path: Path;
|
|
1071
1083
|
};
|
|
1084
|
+
/**
|
|
1085
|
+
* Emitted before the scene is drawn to the screen.
|
|
1086
|
+
*/
|
|
1087
|
+
'pre-render': undefined;
|
|
1088
|
+
/**
|
|
1089
|
+
* Emitted after the scene is drawn to the screen.
|
|
1090
|
+
*/
|
|
1091
|
+
'post-render': undefined;
|
|
1072
1092
|
} & TStackedMapsEvents;
|
|
1073
1093
|
export type TEventPayload<EventName extends keyof TEvents> = TEvents[EventName] extends {
|
|
1074
1094
|
data: null;
|
|
@@ -1101,7 +1121,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1101
1121
|
import FloorStack from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor-stack';
|
|
1102
1122
|
import Facade from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/facade';
|
|
1103
1123
|
import type { MapDataRecords, EnterpriseMapDataRecords } from '@mappedin/react-sdk/mappedin-js/src/utils/data-creation';
|
|
1104
|
-
import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseCategory as MVFEnterpriseCategory, Language, AreaCollection } from '@mappedin/mvf';
|
|
1124
|
+
import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, FloorProperties as MVFFloor, FloorStack as MVFFloorStack, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseCategory as MVFEnterpriseCategory, Language, AreaCollection, TilesetStyle } from '@mappedin/mvf';
|
|
1105
1125
|
import { AnalyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
1106
1126
|
import EnterpriseLocation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
|
|
1107
1127
|
import EnterpriseCategory from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
|
|
@@ -1114,6 +1134,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1114
1134
|
import { type Directions, DirectionsInternal } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions';
|
|
1115
1135
|
import { type THydrateMapDataBundle } from '@mappedin/react-sdk/mappedin-js/src';
|
|
1116
1136
|
import { Query } from '@mappedin/react-sdk/mappedin-js/src/query';
|
|
1137
|
+
import LocationProfile from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-profile';
|
|
1138
|
+
import LocationCategory from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-category';
|
|
1117
1139
|
/**
|
|
1118
1140
|
* Internal class representing detailed map data.
|
|
1119
1141
|
*
|
|
@@ -1164,7 +1186,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1164
1186
|
pointsOfInterestById: MapDataRecords['poisById'];
|
|
1165
1187
|
annotationsById: MapDataRecords['annotationsById'];
|
|
1166
1188
|
areasById: MapDataRecords['areasById'];
|
|
1189
|
+
locationProfilesById: MapDataRecords['locationProfilesById'];
|
|
1190
|
+
locationCategoriesById: MapDataRecords['locationCategoriesById'];
|
|
1191
|
+
locationProfilesByExternalId: MapDataRecords['locationProfilesByExternalId'];
|
|
1167
1192
|
locationsById: EnterpriseMapDataRecords['locationsById'];
|
|
1193
|
+
locationProfilesByCategoryId: MapDataRecords['locationProfilesByCategoryId'];
|
|
1194
|
+
locationCategoriesByParentId: MapDataRecords['locationCategoriesByParentId'];
|
|
1168
1195
|
categoriesById: EnterpriseMapDataRecords['categoriesById'];
|
|
1169
1196
|
doorsByNodeId: MapDataRecords['doorsByNodeId'];
|
|
1170
1197
|
mvfLocationsBySpaceId: EnterpriseMapDataRecords['mvfLocationsBySpaceId'];
|
|
@@ -1203,6 +1230,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1203
1230
|
languagePacks: {
|
|
1204
1231
|
[languageCode: string]: LanguagePack;
|
|
1205
1232
|
};
|
|
1233
|
+
tilesets: {
|
|
1234
|
+
[tilesetId: string]: TilesetStyle;
|
|
1235
|
+
};
|
|
1206
1236
|
binaryBundle?: Uint8Array;
|
|
1207
1237
|
envControl: EnvControl;
|
|
1208
1238
|
/**
|
|
@@ -1278,9 +1308,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1278
1308
|
get nodes(): Node[];
|
|
1279
1309
|
get locations(): EnterpriseLocation[];
|
|
1280
1310
|
get categories(): EnterpriseCategory[];
|
|
1311
|
+
get locationProfiles(): LocationProfile[];
|
|
1312
|
+
get locationCategories(): LocationCategory[];
|
|
1281
1313
|
get mvfFloors(): MVFFloor[];
|
|
1282
1314
|
get mvfFloorStacks(): MVFFloorStack[];
|
|
1283
1315
|
getByType(type: string): object[];
|
|
1316
|
+
getByType(type: 'location-profile'): LocationProfile[];
|
|
1317
|
+
getByType(type: 'location-category'): LocationCategory[];
|
|
1284
1318
|
getByType(type: 'space'): Space[];
|
|
1285
1319
|
getByType(type: 'area'): Area[];
|
|
1286
1320
|
getByType(type: 'door'): Door[];
|
|
@@ -1351,7 +1385,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1351
1385
|
*/
|
|
1352
1386
|
destroy(): void;
|
|
1353
1387
|
}
|
|
1354
|
-
export { Node, Area, MapDataInternal, Space, Floor, FloorStack, Facade, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, };
|
|
1388
|
+
export { Node, Area, MapDataInternal, Space, Floor, FloorStack, Facade, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, LocationCategory, LocationProfile, };
|
|
1355
1389
|
export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space';
|
|
1356
1390
|
export type { Places };
|
|
1357
1391
|
}
|
|
@@ -1860,7 +1894,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay' {
|
|
|
1860
1894
|
|
|
1861
1895
|
declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
1862
1896
|
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
1863
|
-
import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, EnterpriseLocation, Node, Area, Facade, FloorStack, Annotation, EnterpriseCategory, EnterpriseVenue } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1897
|
+
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';
|
|
1864
1898
|
import type { Label, Marker, Model, Image, Shape, Text3D } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1865
1899
|
import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
1866
1900
|
import type { InsetPaddingOption, UpdatableText3DState, Text3DState, AddText3DOptions, EnvMapOptions, InitializeModelState, ModelState, UpdateModelState } from '@mappedin/react-sdk/geojson/src';
|
|
@@ -2240,7 +2274,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2240
2274
|
/**
|
|
2241
2275
|
* Defines the target for navigation operations.
|
|
2242
2276
|
*/
|
|
2243
|
-
export type TNavigationTarget = Space | MapObject | Coordinate | Door | PointOfInterest | Connection | EnterpriseLocation | Node | Area | Facade;
|
|
2277
|
+
export type TNavigationTarget = LocationProfile | Annotation | Space | MapObject | Coordinate | Door | PointOfInterest | Connection | EnterpriseLocation | Node | Area | Facade;
|
|
2244
2278
|
/**
|
|
2245
2279
|
* Defines the special zone for navigation operations.
|
|
2246
2280
|
*/
|
|
@@ -2814,6 +2848,15 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2814
2848
|
localePack: ParsedMVFLocalePack;
|
|
2815
2849
|
};
|
|
2816
2850
|
export type GlobalState = {
|
|
2851
|
+
/**
|
|
2852
|
+
* The color of the background, in hex format(#000000).
|
|
2853
|
+
*/
|
|
2854
|
+
backgroundColor: string;
|
|
2855
|
+
/**
|
|
2856
|
+
* The alpha value of the background, between 0 and 1.
|
|
2857
|
+
* @default 1
|
|
2858
|
+
*/
|
|
2859
|
+
backgroundAlpha: number;
|
|
2817
2860
|
/**
|
|
2818
2861
|
* environment map for reflections.
|
|
2819
2862
|
* @default 'basic'
|
|
@@ -2843,6 +2886,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2843
2886
|
export interface IFocusable {
|
|
2844
2887
|
get focusTarget(): TFocusTarget | TFocusTarget[];
|
|
2845
2888
|
}
|
|
2889
|
+
export interface INavigatable {
|
|
2890
|
+
get navigationTarget(): TNavigationTarget | TNavigationTarget[];
|
|
2891
|
+
}
|
|
2846
2892
|
/**
|
|
2847
2893
|
* A class that implements IAnchorable can have 2D elements like {@link Label}s and {@link Marker}s anchored to it.
|
|
2848
2894
|
*/
|
|
@@ -2853,6 +2899,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2853
2899
|
* Associates MapData type strings with their corresponding classes.
|
|
2854
2900
|
*/
|
|
2855
2901
|
export type TMapDataObjectTypes = {
|
|
2902
|
+
'location-profile': LocationProfile;
|
|
2903
|
+
'location-category': LocationCategory;
|
|
2856
2904
|
node: Node;
|
|
2857
2905
|
space: Space;
|
|
2858
2906
|
door: Door;
|
|
@@ -2898,6 +2946,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/constants' {
|
|
|
2898
2946
|
export const LABELS_LAYER = "LabelsLayer";
|
|
2899
2947
|
export const MARKERS_LAYER = "MarkersLayer";
|
|
2900
2948
|
export const FOOTPRINT_LAYER = "FootprintLayer";
|
|
2949
|
+
export const OCCLUSION_LAYER = "OcclusionLayer";
|
|
2901
2950
|
export const IMAGES_LAYER = "ImagesLayer";
|
|
2902
2951
|
export const SELF_SERVE_API_AUDIENCE: string[];
|
|
2903
2952
|
export const ENTERPRISE_API_AUDIENCE: string[];
|
|
@@ -3520,11 +3569,19 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions' {
|
|
|
3520
3569
|
/**
|
|
3521
3570
|
* @internal
|
|
3522
3571
|
*/
|
|
3523
|
-
constructor(directions: DirectionsCollection, mapData: MapDataInternal);
|
|
3572
|
+
constructor(directions: DirectionsCollection, mapData: MapDataInternal, from: TNavigationTarget[], to: TNavigationTarget[]);
|
|
3524
3573
|
/**
|
|
3525
3574
|
* @internal
|
|
3526
3575
|
*/
|
|
3527
3576
|
get path(): Node[];
|
|
3577
|
+
/**
|
|
3578
|
+
* The selected departure.
|
|
3579
|
+
*/
|
|
3580
|
+
get departure(): TNavigationTarget;
|
|
3581
|
+
/**
|
|
3582
|
+
* The selected destination.
|
|
3583
|
+
*/
|
|
3584
|
+
get destination(): TNavigationTarget;
|
|
3528
3585
|
/**
|
|
3529
3586
|
* All the coordinates ({@link Coordinate}) of the directions.
|
|
3530
3587
|
*/
|
|
@@ -3574,6 +3631,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions' {
|
|
|
3574
3631
|
*/
|
|
3575
3632
|
getExcludedNodeIds: (accessible: boolean, excludedConnections: Connection[]) => string[];
|
|
3576
3633
|
}
|
|
3634
|
+
/**
|
|
3635
|
+
* Get the nodes from the navigation target.
|
|
3636
|
+
*
|
|
3637
|
+
* @hidden
|
|
3638
|
+
* @param target
|
|
3639
|
+
* @param mapData
|
|
3640
|
+
*/
|
|
3641
|
+
export function getNodesFromTarget(target: TNavigationTarget, mapData: MapDataInternal): string[];
|
|
3577
3642
|
}
|
|
3578
3643
|
|
|
3579
3644
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
|
|
@@ -4194,6 +4259,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor' {
|
|
|
4194
4259
|
* @returns {string} The name of the floor.
|
|
4195
4260
|
*/
|
|
4196
4261
|
get name(): string;
|
|
4262
|
+
/**
|
|
4263
|
+
* Gets the short name of the floor (i.e. "F1", "L, "2", etc.).
|
|
4264
|
+
* Used in space constrained lists and Often aligns with what is displayed on an elevator.
|
|
4265
|
+
*
|
|
4266
|
+
* @returns {string} The short name of the floor.
|
|
4267
|
+
*/
|
|
4268
|
+
get shortName(): string;
|
|
4197
4269
|
/**
|
|
4198
4270
|
* Gets the external ID of the floor.
|
|
4199
4271
|
*
|
|
@@ -5038,8 +5110,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/facade' {
|
|
|
5038
5110
|
|
|
5039
5111
|
declare module '@mappedin/react-sdk/mappedin-js/src/utils/data-creation' {
|
|
5040
5112
|
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 } from '@mappedin/mvf';
|
|
5041
|
-
import type
|
|
5042
|
-
import { Annotation, Area, Connection, Door, EnterpriseCategory, EnterpriseLocation, Facade, Floor, FloorStack, MapObject, Node, PointOfInterest, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5113
|
+
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';
|
|
5043
5114
|
export type MapDataRecords = {
|
|
5044
5115
|
spacesById: Record<string, Space>;
|
|
5045
5116
|
nodesById: Record<string, Node>;
|
|
@@ -5054,6 +5125,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/utils/data-creation' {
|
|
|
5054
5125
|
poisById: Record<string, PointOfInterest>;
|
|
5055
5126
|
annotationsById: Record<string, Annotation>;
|
|
5056
5127
|
areasById: Record<AreaId, Area>;
|
|
5128
|
+
locationProfilesById: Record<string, LocationProfile>;
|
|
5129
|
+
locationCategoriesById: Record<string, LocationCategory>;
|
|
5130
|
+
locationProfilesByCategoryId: Record<string, LocationProfile[]>;
|
|
5131
|
+
locationCategoriesByParentId: Record<string, LocationCategory[]>;
|
|
5057
5132
|
spacesByExternalId: Record<string, Space[]>;
|
|
5058
5133
|
nodesByExternalId: Record<string, Node[]>;
|
|
5059
5134
|
poisByExternalId: Record<string, PointOfInterest[]>;
|
|
@@ -5062,6 +5137,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/utils/data-creation' {
|
|
|
5062
5137
|
floorsByExternalId: Record<string, Floor[]>;
|
|
5063
5138
|
objectsByExternalId: Record<string, MapObject[]>;
|
|
5064
5139
|
areasByExternalId: Record<string, Area[]>;
|
|
5140
|
+
locationProfilesByExternalId: Record<string, LocationProfile[]>;
|
|
5065
5141
|
spaceIdsByDestinationNodeId: Record<string, string[]>;
|
|
5066
5142
|
objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
|
|
5067
5143
|
obstructionIdByEntranceId: Record<string, string>;
|
|
@@ -5105,6 +5181,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/utils/data-creation' {
|
|
|
5105
5181
|
mvfLocationsById: Record<string, MVFEnterpriseLocation>;
|
|
5106
5182
|
mvfLocationsBySpaceId: Record<string, MVFEnterpriseLocation[]>;
|
|
5107
5183
|
};
|
|
5184
|
+
export const processMVFLocationProfilesAndCategories: (mvf: ParsedMVF, data: MapDataInternal) => {
|
|
5185
|
+
locationCategoriesByParentId: Record<string, LocationCategory[]>;
|
|
5186
|
+
locationProfilesById: Record<string, LocationProfile>;
|
|
5187
|
+
locationCategoriesById: Record<string, LocationCategory>;
|
|
5188
|
+
locationProfilesByExternalId: Record<string, LocationProfile[]>;
|
|
5189
|
+
locationProfilesByCategoryId: Record<string, LocationProfile[]>;
|
|
5190
|
+
};
|
|
5108
5191
|
export const processMVFSpaces: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "spacesById" | "spacesByExternalId" | "spaceIdsByDestinationNodeId" | "poisById" | "poisByExternalId" | "mvfSpacesById" | "objectEntranceNodeIdsByObstructionId" | "connectionsById" | "connectionIdsByLatLon" | "mvfSpacesByFloorId" | "mvfPoisByFloorId">;
|
|
5109
5192
|
export const processMVFNodes: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "nodesById" | "nodesByExternalId" | "mvfNodesById" | "mvfNodesByFloorId">;
|
|
5110
5193
|
export const processMVFObstructions: (mvf: ParsedMVF, data: MapDataInternal) => Pick<MapDataRecords, "objectsById" | "objectsByExternalId" | "mvfObstructionById" | "obstructionIdByEntranceId">;
|
|
@@ -5531,6 +5614,158 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
|
|
|
5531
5614
|
export default EnterpriseVenue;
|
|
5532
5615
|
}
|
|
5533
5616
|
|
|
5617
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-profile' {
|
|
5618
|
+
import type { LocationId, LocationLink, LocationPicture, LocationSocial, Location as MVFLocation } from '@mappedin/mvf';
|
|
5619
|
+
import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
5620
|
+
import type { Annotation, Connection, Door, LocationCategory, MapDataInternal, Space, MapObject } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5621
|
+
import type { TFocusTarget, TNavigationTarget, IFocusable, INavigatable } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
5622
|
+
class LocationProfile extends BaseMetaData implements Omit<MVFLocation, 'categories' | 'spaces' | 'obstructions' | 'entrances' | 'shapes' | 'connections' | 'annotations'>, IFocusable, INavigatable {
|
|
5623
|
+
#private;
|
|
5624
|
+
/**
|
|
5625
|
+
* Checks if the provided instance is of type EnterpriseLocation.
|
|
5626
|
+
*
|
|
5627
|
+
* @param instance The instance to check.
|
|
5628
|
+
* @returns {boolean} True if the instance is a EnterpriseLocation, false otherwise.
|
|
5629
|
+
*/
|
|
5630
|
+
static is(instance: object): instance is LocationProfile;
|
|
5631
|
+
/**
|
|
5632
|
+
* @internal
|
|
5633
|
+
*/
|
|
5634
|
+
static readonly __type = "location-profile";
|
|
5635
|
+
/**
|
|
5636
|
+
* @internal
|
|
5637
|
+
*/
|
|
5638
|
+
readonly __type = "location-profile";
|
|
5639
|
+
id: LocationId;
|
|
5640
|
+
name: string;
|
|
5641
|
+
externalId?: string;
|
|
5642
|
+
description?: string;
|
|
5643
|
+
/**
|
|
5644
|
+
* The location's logo
|
|
5645
|
+
*
|
|
5646
|
+
* @format uri
|
|
5647
|
+
*/
|
|
5648
|
+
logo?: string;
|
|
5649
|
+
phone?: string;
|
|
5650
|
+
/**
|
|
5651
|
+
* The location's social media links.
|
|
5652
|
+
*/
|
|
5653
|
+
social: LocationSocial[];
|
|
5654
|
+
/**
|
|
5655
|
+
* The location's pictures
|
|
5656
|
+
*/
|
|
5657
|
+
pictures: LocationPicture[];
|
|
5658
|
+
/**
|
|
5659
|
+
* Web links for the location
|
|
5660
|
+
*/
|
|
5661
|
+
links: LocationLink[];
|
|
5662
|
+
constructor(data: MapDataInternal, options: {
|
|
5663
|
+
mvfData: MVFLocation;
|
|
5664
|
+
});
|
|
5665
|
+
/**
|
|
5666
|
+
* Gets the {@link Space}s associated with the location.
|
|
5667
|
+
*
|
|
5668
|
+
* @returns {Space[]} The spaces array.
|
|
5669
|
+
*/
|
|
5670
|
+
get spaces(): Space[];
|
|
5671
|
+
/**
|
|
5672
|
+
* Gets the {@link Door}s associated with the location.
|
|
5673
|
+
*
|
|
5674
|
+
* @returns {Door[]} The doors array.
|
|
5675
|
+
*/
|
|
5676
|
+
get doors(): Door[];
|
|
5677
|
+
/**
|
|
5678
|
+
* Gets the {@link Connection}s associated with the location.
|
|
5679
|
+
*
|
|
5680
|
+
* @returns {Connection[]} The connections array.
|
|
5681
|
+
*/
|
|
5682
|
+
get connections(): Connection[];
|
|
5683
|
+
/**
|
|
5684
|
+
* Gets the {@link Annotation}s associated with the location.
|
|
5685
|
+
*
|
|
5686
|
+
* @returns {Annotation[]} The annotations array.
|
|
5687
|
+
*/
|
|
5688
|
+
get annotations(): Annotation[];
|
|
5689
|
+
/**
|
|
5690
|
+
* Gets the {@link LocationCategory}s associated with the location.
|
|
5691
|
+
*
|
|
5692
|
+
* @returns {LocationCategory[]} The location categories array.
|
|
5693
|
+
*/
|
|
5694
|
+
get categories(): LocationCategory[];
|
|
5695
|
+
/**
|
|
5696
|
+
* Gets the {@link MapObject}s associated with the location.
|
|
5697
|
+
*
|
|
5698
|
+
* @returns {MapObject[]} The map objects array.
|
|
5699
|
+
*/
|
|
5700
|
+
get mapObjects(): MapObject[];
|
|
5701
|
+
/** @internal */
|
|
5702
|
+
get focusTarget(): TFocusTarget[];
|
|
5703
|
+
/**
|
|
5704
|
+
* @internal
|
|
5705
|
+
*/
|
|
5706
|
+
get navigationTarget(): TNavigationTarget[];
|
|
5707
|
+
toJSON(): {
|
|
5708
|
+
id: string;
|
|
5709
|
+
name: string;
|
|
5710
|
+
};
|
|
5711
|
+
}
|
|
5712
|
+
export default LocationProfile;
|
|
5713
|
+
}
|
|
5714
|
+
|
|
5715
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-category' {
|
|
5716
|
+
import type { CategoryId, Category as MVFCategory } from '@mappedin/mvf';
|
|
5717
|
+
import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
5718
|
+
import type { LocationProfile, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5719
|
+
class LocationCategory extends BaseMetaData implements Omit<MVFCategory, 'parent'> {
|
|
5720
|
+
#private;
|
|
5721
|
+
/**
|
|
5722
|
+
* Checks if the provided instance is of type EnterpriseLocation.
|
|
5723
|
+
*
|
|
5724
|
+
* @param instance The instance to check.
|
|
5725
|
+
* @returns {boolean} True if the instance is a EnterpriseLocation, false otherwise.
|
|
5726
|
+
*/
|
|
5727
|
+
static is(instance: object): instance is LocationCategory;
|
|
5728
|
+
/**
|
|
5729
|
+
* @internal
|
|
5730
|
+
*/
|
|
5731
|
+
static readonly __type = "location-category";
|
|
5732
|
+
/**
|
|
5733
|
+
* @internal
|
|
5734
|
+
*/
|
|
5735
|
+
readonly __type = "location-category";
|
|
5736
|
+
id: CategoryId;
|
|
5737
|
+
name: string;
|
|
5738
|
+
/**
|
|
5739
|
+
* The category's icon
|
|
5740
|
+
*
|
|
5741
|
+
* @format uri
|
|
5742
|
+
*/
|
|
5743
|
+
icon: string;
|
|
5744
|
+
constructor(data: MapDataInternal, options: {
|
|
5745
|
+
mvfData: MVFCategory;
|
|
5746
|
+
});
|
|
5747
|
+
/**
|
|
5748
|
+
* Gets the parent {@link LocationCategory}.
|
|
5749
|
+
*
|
|
5750
|
+
* @returns {LocationCategory | undefined} The parent location category.
|
|
5751
|
+
*/
|
|
5752
|
+
get parent(): LocationCategory | undefined;
|
|
5753
|
+
/**
|
|
5754
|
+
* Gets the children {@link LocationCategory}s.
|
|
5755
|
+
*/
|
|
5756
|
+
get children(): LocationCategory[];
|
|
5757
|
+
/**
|
|
5758
|
+
* Gets the {@link LocationProfile}s that are associated with this category.
|
|
5759
|
+
*/
|
|
5760
|
+
get locationProfiles(): LocationProfile[];
|
|
5761
|
+
toJSON(): {
|
|
5762
|
+
id: string;
|
|
5763
|
+
name: string;
|
|
5764
|
+
};
|
|
5765
|
+
}
|
|
5766
|
+
export default LocationCategory;
|
|
5767
|
+
}
|
|
5768
|
+
|
|
5534
5769
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes' {
|
|
5535
5770
|
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
5536
5771
|
import { Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
@@ -5742,6 +5977,10 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
5742
5977
|
* Dynamic resize of the marker. If set to true, the marker will resize based on the content.
|
|
5743
5978
|
*/
|
|
5744
5979
|
dynamicResize?: boolean;
|
|
5980
|
+
/**
|
|
5981
|
+
* @internal
|
|
5982
|
+
*/
|
|
5983
|
+
occluderId?: number;
|
|
5745
5984
|
/**
|
|
5746
5985
|
* The z-index of the marker. Can be used used in conjunction with rank: 'always-visible' to make certain markers appear over others
|
|
5747
5986
|
*/
|
|
@@ -5765,6 +6004,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
5765
6004
|
*/
|
|
5766
6005
|
canShow: boolean;
|
|
5767
6006
|
visible: boolean;
|
|
6007
|
+
isOccluded: boolean;
|
|
5768
6008
|
offscreen: boolean;
|
|
5769
6009
|
strategyIndex: number;
|
|
5770
6010
|
activeBoundingBox: {
|
|
@@ -6371,6 +6611,10 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
6371
6611
|
* @internal
|
|
6372
6612
|
*/
|
|
6373
6613
|
id?: string;
|
|
6614
|
+
/**
|
|
6615
|
+
* @internal
|
|
6616
|
+
*/
|
|
6617
|
+
occluderId?: number;
|
|
6374
6618
|
};
|
|
6375
6619
|
type TStyle = {
|
|
6376
6620
|
top?: number;
|
|
@@ -6484,6 +6728,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
6484
6728
|
options: LabelOptions;
|
|
6485
6729
|
visible: boolean;
|
|
6486
6730
|
enabled: boolean;
|
|
6731
|
+
isOccluded: boolean;
|
|
6487
6732
|
offscreen: boolean;
|
|
6488
6733
|
/**
|
|
6489
6734
|
* Whether the label can be shown, which is decided by the collision engine
|
|
@@ -6546,6 +6791,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/group-container' {
|
|
|
6546
6791
|
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
6547
6792
|
import type { BatchedText } from '@mappedin/react-sdk/geojson/src/services/text3d/text3d';
|
|
6548
6793
|
import type { EntityTypes } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
6794
|
+
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
6549
6795
|
export enum GroupContainerComponents {
|
|
6550
6796
|
Stack = 0,
|
|
6551
6797
|
Interaction = 1
|
|
@@ -6578,9 +6824,13 @@ declare module '@mappedin/react-sdk/geojson/src/entities/group-container' {
|
|
|
6578
6824
|
entityId: string | number;
|
|
6579
6825
|
entities2D: Set<string | number>;
|
|
6580
6826
|
dirty: boolean;
|
|
6827
|
+
occluderDirty: boolean;
|
|
6828
|
+
occluderId?: number;
|
|
6829
|
+
occluderFeature?: Feature<Polygon | MultiPolygon, any>;
|
|
6581
6830
|
};
|
|
6582
6831
|
components: [StackComponent?, InteractionComponent?];
|
|
6583
6832
|
constructor(id: string);
|
|
6833
|
+
addOccluderFeature(feature: Feature<Polygon | MultiPolygon, any>, occluderId: number): void;
|
|
6584
6834
|
addEntity(entityGroupOrContainer: GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | Geometry3DTypes): void;
|
|
6585
6835
|
removeEntity(entityGroupOrContainer: EntityTypes): void;
|
|
6586
6836
|
setVisible(visible: boolean): void;
|
|
@@ -6989,6 +7239,10 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
6989
7239
|
* Fired before the scene is rendered. Use this to modify the scene before it is rendered.
|
|
6990
7240
|
*/
|
|
6991
7241
|
'pre-render': undefined;
|
|
7242
|
+
/**
|
|
7243
|
+
* Fired when the synchronous tasks of the scene render are complete.
|
|
7244
|
+
*/
|
|
7245
|
+
'post-render': undefined;
|
|
6992
7246
|
};
|
|
6993
7247
|
/**
|
|
6994
7248
|
* The payload of an event. See also {@link MapEvent}.
|
|
@@ -7595,10 +7849,10 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
7595
7849
|
import type { AddText3DOptions, Text3DState, UpdatableText3DState } from '@mappedin/react-sdk/geojson/src/components/text3d';
|
|
7596
7850
|
import { MeshDetachmentSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-detachment/system';
|
|
7597
7851
|
import { MeshModificationSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-modification/system';
|
|
7598
|
-
import { PreRenderSystem } from '@mappedin/react-sdk/geojson/src/systems/pre-render/system';
|
|
7599
7852
|
import { Text3DSystem } from '@mappedin/react-sdk/geojson/src/systems/text3d/system';
|
|
7600
7853
|
import { Group as TweenGroup } from '@tweenjs/tween.js';
|
|
7601
7854
|
import { Debug } from '@mappedin/react-sdk/geojson/src/utils/debug';
|
|
7855
|
+
import { Occlusion2DSystem } from '@mappedin/react-sdk/geojson/src/systems/2d-occlusion/system';
|
|
7602
7856
|
export type * from '@mappedin/react-sdk/geojson/src/types';
|
|
7603
7857
|
export const raycaster: Raycaster;
|
|
7604
7858
|
/**
|
|
@@ -7639,8 +7893,8 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
7639
7893
|
geometryInFocusSystem: GeometryInFocusSystem;
|
|
7640
7894
|
meshDetachmentSystem: MeshDetachmentSystem;
|
|
7641
7895
|
meshModificationSystem: MeshModificationSystem;
|
|
7642
|
-
preRenderSystem: PreRenderSystem;
|
|
7643
7896
|
text3DSystem: Text3DSystem;
|
|
7897
|
+
occlusion2DSystem: Occlusion2DSystem;
|
|
7644
7898
|
};
|
|
7645
7899
|
export type MapViewState = {
|
|
7646
7900
|
readonly type: 'map-view';
|
|
@@ -7701,6 +7955,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
7701
7955
|
* Add a geometry group from GeoJSON data
|
|
7702
7956
|
*/
|
|
7703
7957
|
addGeometryGroup<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(id: string, geometry: T, style?: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
|
|
7958
|
+
addOccluder<T extends Feature<Polygon | MultiPolygon, any>>(feature: T, parent?: EntityId<GroupContainerState> | string | number | null): number;
|
|
7704
7959
|
addImage(id: string, geometry: Feature<Point, ImageProperties>, style: ImageStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<ImageState> | undefined;
|
|
7705
7960
|
/**
|
|
7706
7961
|
* Add a group of models from GeoJSON data. These will be instanced automatically for better performance.
|
|
@@ -7838,11 +8093,15 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
7838
8093
|
/**
|
|
7839
8094
|
* Sets the background color of the renderer. Only applies to "standalone mode"
|
|
7840
8095
|
*/
|
|
7841
|
-
setBackgroundColor: (color:
|
|
8096
|
+
setBackgroundColor: (color: string, alpha: number) => void;
|
|
7842
8097
|
/**
|
|
7843
8098
|
* Returns the background color of the renderer. Only applies to "standalone mode"
|
|
7844
8099
|
*/
|
|
7845
|
-
get backgroundColor():
|
|
8100
|
+
get backgroundColor(): string;
|
|
8101
|
+
/**
|
|
8102
|
+
* Returns the background alpha of the renderer. Only applies to "standalone mode"
|
|
8103
|
+
*/
|
|
8104
|
+
get backgroundAlpha(): number;
|
|
7846
8105
|
/**
|
|
7847
8106
|
* internal
|
|
7848
8107
|
*/
|
|
@@ -11141,6 +11400,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry2d' {
|
|
|
11141
11400
|
* When the position of the entity changes, this should be set to true, so that systems like pan bounds can update
|
|
11142
11401
|
*/
|
|
11143
11402
|
positionDirty: boolean;
|
|
11403
|
+
occluderId?: number;
|
|
11144
11404
|
object3d: Geometry2DObject3D;
|
|
11145
11405
|
components: [MarkerComponent | LabelComponent, InteractionComponent?];
|
|
11146
11406
|
disposed: boolean;
|
|
@@ -11393,6 +11653,7 @@ declare module '@mappedin/react-sdk/geojson/src/types/options' {
|
|
|
11393
11653
|
* @default 'basic'
|
|
11394
11654
|
*/
|
|
11395
11655
|
environment?: EnvMapOptions;
|
|
11656
|
+
occlusionEnabled?: boolean;
|
|
11396
11657
|
}>;
|
|
11397
11658
|
}
|
|
11398
11659
|
|
|
@@ -11699,6 +11960,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/render/system' {
|
|
|
11699
11960
|
import { PubSub } from '@packages/internal/common';
|
|
11700
11961
|
export class RenderSystem extends PubSub<{
|
|
11701
11962
|
'measure-canvas': undefined;
|
|
11963
|
+
'pre-render': undefined;
|
|
11964
|
+
'post-render': undefined;
|
|
11702
11965
|
}> {
|
|
11703
11966
|
constructor(renderer: Renderer, state: RendererState, mode: RendererCore['mode'], scene: Scene, cameraObject: PerspectiveCamera, viewCamera: Camera, systems: Systems);
|
|
11704
11967
|
twoDdirty: boolean;
|
|
@@ -12058,16 +12321,21 @@ declare module '@mappedin/react-sdk/geojson/src/systems/mesh-modification/system
|
|
|
12058
12321
|
}
|
|
12059
12322
|
}
|
|
12060
12323
|
|
|
12061
|
-
declare module '@mappedin/react-sdk/geojson/src/systems/
|
|
12062
|
-
import type {
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
export class
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
|
|
12324
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/2d-occlusion/system' {
|
|
12325
|
+
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
12326
|
+
import { type Vector3 } from 'three';
|
|
12327
|
+
import type { Renderer } from '@mappedin/react-sdk/geojson/src/services/renderer';
|
|
12328
|
+
import type { Position as GeoJsonPosition } from 'geojson';
|
|
12329
|
+
export function fillArrayWithColor(array: Float32Array | Uint8Array, count: number, color: number): void;
|
|
12330
|
+
export class Occlusion2DSystem {
|
|
12331
|
+
constructor(state: RendererState, convertTo3DMapPosition: (position: GeoJsonPosition) => Vector3, renderer?: Renderer);
|
|
12332
|
+
reserveOccluderId(): number;
|
|
12333
|
+
enable(): void;
|
|
12334
|
+
disable(): void;
|
|
12335
|
+
resize: () => void;
|
|
12336
|
+
activeOccluders: Set<unknown>;
|
|
12337
|
+
update: () => void;
|
|
12338
|
+
destroy(): void;
|
|
12071
12339
|
}
|
|
12072
12340
|
}
|
|
12073
12341
|
|
|
@@ -12484,6 +12752,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
|
|
|
12484
12752
|
metadata?: Partial<Record<string, unknown>> | undefined;
|
|
12485
12753
|
shortName?: string | undefined;
|
|
12486
12754
|
subtitle?: string | undefined;
|
|
12755
|
+
occluderId?: number;
|
|
12487
12756
|
layers: Map<string, Layer>;
|
|
12488
12757
|
footprint?: Feature<Polygon | MultiPolygon | null, MVFFloor>;
|
|
12489
12758
|
floorStackId: string;
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as V,j as E,k}from"./chunk-
|
|
1
|
+
import{i as V,j as E,k}from"./chunk-NSQIJRR4.js";import{c as x,k as A}from"./chunk-IFBLXLIM.js";import"./chunk-4F56JD4R.js";import"./chunk-IXJQWNR3.js";import"./chunk-2UISP3K7.js";import{a}from"./chunk-7VUIGM34.js";import{a as n}from"./chunk-J5IUISYU.js";a();a();import U,{useCallback as Y,useMemo as $}from"react";import{useContext as C,useEffect as T,useRef as S,useState as D}from"react";import{createPortal as q}from"react-dom";a();import{createContext as I,useContext as z}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=I({mapData:void 0,mapView:void 0});function F(){let{mapData:e,mapView:t}=z(p);if(!e||!t)throw new m("useMap");return{mapData:e,mapView:t}}n(F,"useMap");a();import{useEffect as G}from"react";function s(e,t){G(()=>{t!=null&&typeof e=="function"&&e(t)},[e,t])}n(s,"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]),s(e.onLoad,o),t==null||o==null?null:q(e.children,o.contentEl,o.id)}n(O,"Marker");function B(e){let{mapView:t}=C(p),[r,o]=D(null),i=S(A()),l=S(e.target),f=Y(u=>{var M;o(u),(M=e.onLoad)==null||M.call(e,u)},[e.onLoad]);T(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:u=300,easing:M="linear"}=e;t.Markers.animateTo(r,e.target,{duration:u,easing:M})}},[t,e.target,r]);let c=$(()=>({...e,duration:void 0,easing:void 0}),[e.duration,e.easing]);return U.createElement(O,{...c,key:i.current,target:l.current,onLoad:f})}n(B,"AnimatedMarker");a();import{useContext as J,useEffect as R,useRef as K,useState as Q}from"react";function X(e){let{mapView:t}=J(p),r=K(),[o,i]=Q(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]),s(e.onLoad,o),null}n(X,"Label");a();import{useCallback as Z,useContext as _,useEffect as ee}from"react";function te(e,t){let{mapView:r}=_(p),o=Z(i=>t(i),[t]);ee(()=>{if(r==null)throw new m("useEvent");return r.on(e,o),()=>{r!=null&&r.off(e,o)}},[r,e,t])}n(te,"useEvent");a();import{useContext as re,useEffect as ae,useRef as oe,useState as ne}from"react";function ie(e){let{mapView:t}=re(p),r=oe(),[o,i]=ne(void 0);return ae(()=>{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]),s(e.onLoad,o),null}n(ie,"Path");a();import w,{useCallback as pe,useEffect as me,useMemo as se,useRef as j,useState as W}from"react";var de={width:"100%",height:"100%",position:"relative"};function ue(e){let{mapData:t,options:r,style:o,fallback:i,children:l,...f}=e,c=j(!1),[u,M]=W(void 0),[h,P]=W(!0),y=j(null),b=se(()=>r,[]),v=pe(()=>{if(t&&(y!=null&&y.current)){if(u)return;E(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 me(()=>{c.current||(c.current=!0,v())},[v]),s(e.onLoad,u),w.createElement(p.Provider,{value:{mapData:t,mapView:u}},w.createElement("div",{"data-testid":"mappedin-map",ref:y,style:{...de,...o},...f}),h?w.createElement(w.Fragment,null,i):l)}n(ue,"MapView");a();import{useContext as le,useEffect as H,useState as fe}from"react";function ce(e){let{mapView:t}=le(p),[r,o]=fe(!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(ce,"Navigation");a();import{useContext as Me,useEffect as Pe,useRef as ye,useState as he}from"react";function xe(e){let{mapView:t}=Me(p),r=ye(),[o,i]=he(void 0);return Pe(()=>{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]),s(e.onLoad,o),null}n(xe,"Shape");a();import{useContext as we,useEffect as ge,useRef as Le,useState as Te}from"react";function Se(e){let{mapView:t}=we(p),r=Le(),[o,i]=Te(void 0);return ge(()=>{if(t==null)throw new m("Model");return r.current=t.Models.add(e.models,e.options),i(r.current),()=>{t==null||r.current==null||t.Models.remove(r.current)}},[t,e.models,e.options]),s(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 Ve(e){let[t,r]=N(void 0),[o,i]=N(!0),[l,f]=N(void 0),c=Ae(0),u=ve(()=>e,[]),M=Ne(()=>{let h=++c.current;i(!0),f(void 0),V(u).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)})},[u]);return be(()=>{M()},[M]),{mapData:t,isLoading:o,error:l}}n(Ve,"useMapData");var Xt=k;export{B as AnimatedMarker,X as Label,ue as MapView,O as Marker,Se as Model,ce as Navigation,ie as Path,xe as Shape,Xt as default,te as useEvent,F as useMap,Ve as useMapData};
|