@mappedin/react-sdk 6.0.1-beta.43 → 6.0.1-beta.44
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 +5675 -2451
- package/lib/esm/{GLTFExporter-BQXFQJSX.js → GLTFExporter-XQVCTG6M.js} +1 -1
- package/lib/esm/{GLTFLoader-ZRVC7DGN.js → GLTFLoader-TYL77RHE.js} +1 -1
- package/lib/esm/{browser-OJO26JZN.js → browser-STB2T6NP.js} +1 -1
- package/lib/esm/{chunk-DOOA5SBB.js → chunk-2DFVQLLS.js} +1 -1
- package/lib/esm/chunk-2OY65JNC.js +1 -0
- package/lib/esm/chunk-MOOEGGRP.js +1 -0
- package/lib/esm/chunk-MZY3INHN.js +1 -0
- package/lib/esm/chunk-VMPZPJW5.js +1 -0
- package/lib/esm/{chunk-VTOSGJTF.js → chunk-VPFGFRS7.js} +1 -1
- package/lib/esm/chunk-WULPIMBT.js +1 -0
- package/lib/esm/index.css +1 -1
- package/lib/esm/index.d.ts +1977 -730
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-GOK26VAV.css +1 -0
- package/lib/esm/{inspector-6H6BRSQJ.js → inspector-KUSKAK43.js} +1 -1
- package/lib/esm/internal-7A3UJNAV.css +1 -0
- package/lib/esm/{internal-G2KM3BR4.js → internal-BKHYFNI6.js} +1 -1
- package/lib/esm/outdoor-context-v4-YNWNY6XZ.js +1 -0
- package/lib/esm/{roboto-regular-E5TUWU5Q.js → roboto-regular-B567NWMQ.js} +1 -1
- package/lib/esm/text3d-2NDOCPEF.js +1 -0
- package/package.json +2 -2
- package/lib/esm/chunk-BVQ2DBMP.js +0 -1
- package/lib/esm/chunk-BYMKRV3A.js +0 -1
- package/lib/esm/chunk-OPU32TFR.js +0 -1
- package/lib/esm/chunk-RV2X5GSW.js +0 -1
- package/lib/esm/chunk-WMO54VQZ.js +0 -1
- package/lib/esm/inspector-D2RCHDOY.css +0 -1
- package/lib/esm/internal-55777EMI.css +0 -1
- package/lib/esm/outdoor-context-v4-7M4OICNB.js +0 -1
- package/lib/esm/text3d-CTCEJGTL.js +0 -1
- package/lib/esm/text3d-Q7FFP3YS.css +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -4,20 +4,19 @@
|
|
|
4
4
|
// ../react/@packages/internal/mvf-utils
|
|
5
5
|
// ../react/@mappedin/mvf
|
|
6
6
|
// ../react/@packages/internal/common/pubsub
|
|
7
|
-
// ../react/@packages/internal/mvf-utils/mvf-utils
|
|
8
7
|
// ../react/@packages/internal/common/Mappedin.Logger
|
|
9
8
|
// ../react/geojson
|
|
10
|
-
// ../react/@mappedin/mappedin-js
|
|
11
9
|
// ../react/@packages/internal/common
|
|
12
10
|
// ../react/@mappedin/core-sdk
|
|
11
|
+
// ../react/@packages/internal/mvf-utils/mvf-utils
|
|
13
12
|
// ../react/@packages/internal/mvf-utils/tokens/token-manager
|
|
13
|
+
// ../react/@tweenjs/tween.js
|
|
14
14
|
// ../react/@packages/internal/outdoor-context-v4
|
|
15
15
|
// ../react/@packages/internal/geojson-navigator
|
|
16
16
|
// ../react/@mappedin/mvf-core
|
|
17
17
|
// ../react/three
|
|
18
18
|
// ../react/zod
|
|
19
19
|
// ../react/@packages/internal/shave-text/shave-text
|
|
20
|
-
// ../react/@tweenjs/tween.js
|
|
21
20
|
// ../react/@turf/turf
|
|
22
21
|
// ../react/troika-three-text
|
|
23
22
|
// ../react/@packages/internal/quad-tree
|
|
@@ -60,12 +59,13 @@ declare module '@mappedin/react-sdk' {
|
|
|
60
59
|
declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
61
60
|
import MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
62
61
|
import type { TEvents, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
63
|
-
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions } from '@packages/
|
|
62
|
+
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, Environment } from '@mappedin/react-sdk/packages/mvf-utils';
|
|
64
63
|
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
65
64
|
import type { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
66
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';
|
|
67
66
|
import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
68
67
|
export type { Text3D as Text3DApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
68
|
+
export { disableText3DWorker } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
69
69
|
import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, EnvMapOptions, MapViewState, UpdateModelState, InitializeModelState, WatermarkUpdateOptions } from '@mappedin/react-sdk/geojson/src';
|
|
70
70
|
import { enableTestMode, preloadFont } from '@mappedin/react-sdk/geojson/src';
|
|
71
71
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
@@ -73,7 +73,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
73
73
|
import { MappedinMapLibreOverlay } from '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay';
|
|
74
74
|
import type { LanguagePackHydrationItem, TImagePlacementOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
75
75
|
import { MAPPEDIN_COLORS } from '@mappedin/react-sdk/mappedin-js/src/constants';
|
|
76
|
-
import { type Environment } from '@packages/internal/mvf-utils/mvf-utils';
|
|
77
76
|
import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
78
77
|
import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
79
78
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
@@ -266,12 +265,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
266
265
|
floorHeight?: number;
|
|
267
266
|
updateCameraElevationOnFloorChange?: boolean;
|
|
268
267
|
};
|
|
269
|
-
/**
|
|
270
|
-
* @experimental
|
|
271
|
-
* @internal
|
|
272
|
-
* @default false
|
|
273
|
-
*/
|
|
274
|
-
keepOutdoorGeometryVisible?: boolean;
|
|
275
268
|
/**
|
|
276
269
|
* @experimental
|
|
277
270
|
*
|
|
@@ -344,6 +337,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
344
337
|
export type THydrateMapDataBundle = {
|
|
345
338
|
type: 'binary';
|
|
346
339
|
options?: {
|
|
340
|
+
version?: '2.0.0' | '3.0.0';
|
|
347
341
|
enterprise?: boolean;
|
|
348
342
|
};
|
|
349
343
|
languagePacks?: {
|
|
@@ -357,6 +351,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
357
351
|
} | {
|
|
358
352
|
type: 'json';
|
|
359
353
|
options?: {
|
|
354
|
+
version?: '2.0.0' | '3.0.0';
|
|
360
355
|
enterprise?: boolean;
|
|
361
356
|
};
|
|
362
357
|
languagePacks?: {
|
|
@@ -407,14 +402,15 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
407
402
|
export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
|
|
408
403
|
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, };
|
|
409
404
|
export type * from 'geojson';
|
|
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';
|
|
405
|
+
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, TSetFloorOptions, } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
411
406
|
export { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
412
407
|
export type { Label, Marker, Path, PathSegment, Shape, CameraTransform, Model, Image, Text3D, } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
413
408
|
export type { Debug } from '@mappedin/react-sdk/mappedin-js/src/debug';
|
|
414
409
|
export type { Navigation, TNavigationOptions } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
415
410
|
export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
416
411
|
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';
|
|
417
|
-
export
|
|
412
|
+
export { setWorkersUrl } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
413
|
+
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, Images, StackedMaps, } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
418
414
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/react-sdk/mappedin-js/src/search';
|
|
419
415
|
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/react-sdk/mappedin-js/src/query';
|
|
420
416
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
@@ -424,7 +420,7 @@ declare module '@mappedin/react-sdk/react-sdk/src/Marker' {
|
|
|
424
420
|
import React, { type ReactElement, type ReactNode } from 'react';
|
|
425
421
|
import type { TupleToObjectWithPropNames } from '@mappedin/react-sdk/react-sdk/src/type-utils';
|
|
426
422
|
import type Mappedin from '@mappedin/react-sdk/react-sdk/src';
|
|
427
|
-
import type { TAnimationOptions } from '@mappedin/mappedin-js';
|
|
423
|
+
import type { TAnimationOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
428
424
|
type ParamsArray = Parameters<Mappedin.MapView['Markers']['add']>;
|
|
429
425
|
type StreamAgentParameterNames = ['target', 'contentHtml', 'options'];
|
|
430
426
|
/**
|
|
@@ -497,7 +493,7 @@ declare module '@mappedin/react-sdk/react-sdk/src/Label' {
|
|
|
497
493
|
}
|
|
498
494
|
|
|
499
495
|
declare module '@mappedin/react-sdk/react-sdk/src/useEvent' {
|
|
500
|
-
import type { TEvents } from '@mappedin/mappedin-js';
|
|
496
|
+
import type { TEvents } from '@mappedin/react-sdk/mappedin-js/src';
|
|
501
497
|
/**
|
|
502
498
|
* Hook to subscribe to an event on the {@link default.MapView | MapView}.
|
|
503
499
|
*
|
|
@@ -1040,7 +1036,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
1040
1036
|
import type { TBlueDotEvents } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot';
|
|
1041
1037
|
import type { TDirectionInstruction } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
1042
1038
|
import type { Directions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
1043
|
-
export type TFloorChangeReason = '
|
|
1039
|
+
export type TFloorChangeReason = 'blue-dot-floor-change' | 'stacked-maps-elevation-change' | 'navigation-connection-click' | string;
|
|
1044
1040
|
export type TClickPayload = {
|
|
1045
1041
|
/**
|
|
1046
1042
|
* The coordinate of the interaction.
|
|
@@ -1128,14 +1124,15 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
1128
1124
|
*/
|
|
1129
1125
|
'floor-change': TFloorChangePayload;
|
|
1130
1126
|
/**
|
|
1131
|
-
*
|
|
1132
|
-
* focus due to the camera moving.
|
|
1133
|
-
*
|
|
1134
|
-
* floor changing.
|
|
1127
|
+
*
|
|
1128
|
+
* Emitted when a different facade recieves focus due to the camera moving.
|
|
1129
|
+
* This always occurs when the active floor changes to a different floor stack,
|
|
1130
|
+
* but may also occur when the camera moves without the active floor changing.
|
|
1135
1131
|
*
|
|
1136
1132
|
* @property {Facade[]} facades - The facades that are in focus.
|
|
1133
|
+
*
|
|
1137
1134
|
*/
|
|
1138
|
-
'
|
|
1135
|
+
'facades-in-view-change': {
|
|
1139
1136
|
facades: Facade[];
|
|
1140
1137
|
};
|
|
1141
1138
|
/**
|
|
@@ -1214,6 +1211,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
1214
1211
|
};
|
|
1215
1212
|
}
|
|
1216
1213
|
|
|
1214
|
+
declare module '@mappedin/react-sdk/packages/mvf-utils' {
|
|
1215
|
+
export * from '@mappedin/react-sdk/packages/mvf-utils/api-types';
|
|
1216
|
+
export * from '@mappedin/react-sdk/packages/mvf-utils/mvf-types';
|
|
1217
|
+
export type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TGetVenueOptions, TSearchOptions, TGetVenueBundleOptions, LocalePackUrls, Environment, } from '@mappedin/react-sdk/packages/mvf-utils/mvf-utils';
|
|
1218
|
+
export { downloadVenueBundleMVF, downloadVenueBundleMVFAPIGateway, downloadMVF, parseOptions, getAccessToken, parseMVF, unzipMVF, parseMVFv1, unzipMVFv1, createEnvControl, getSasToken, parseLanguagePack, } from '@mappedin/react-sdk/packages/mvf-utils/mvf-utils';
|
|
1219
|
+
export { findAndSplitObstructionByAllEntrances as splitObstructionByAllEntrances } from '@mappedin/react-sdk/packages/mvf-utils/geometry';
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1217
1222
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
1218
1223
|
import Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
|
|
1219
1224
|
import Area from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/area';
|
|
@@ -1510,17 +1515,17 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1510
1515
|
}
|
|
1511
1516
|
|
|
1512
1517
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
1513
|
-
import type
|
|
1518
|
+
import { type EasingCurve, type RendererCore, type WatermarkUpdateOptions } from '@mappedin/react-sdk/geojson/src';
|
|
1514
1519
|
import { PubSub } from '@packages/internal/common';
|
|
1515
1520
|
import { type TEvents, type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
1516
1521
|
import type { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
1517
|
-
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images
|
|
1522
|
+
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
1518
1523
|
import type { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
1519
1524
|
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
1520
1525
|
import { Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1521
1526
|
import type { Annotation, Door, Floor, MapObject, PointOfInterest, Space, Node, EnterpriseLocation, FloorStack, Facade } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
1522
1527
|
import type { TCoordinateParams } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
1523
|
-
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates, GlobalState, UpdateGlobalState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
1528
|
+
import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates, GlobalState, UpdateGlobalState, TSetFloorOptions, DeepPartial } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
1524
1529
|
import type { Label, Marker, Image, Shape, Text3D as Text3DView, Model, Path } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1525
1530
|
import type { TEventPayload } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
1526
1531
|
import type { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
|
|
@@ -1529,6 +1534,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1529
1534
|
import { Debug } from '@mappedin/react-sdk/mappedin-js/src/debug';
|
|
1530
1535
|
import type { Text3D } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
1531
1536
|
import type { PathSegment } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
|
|
1537
|
+
import type { ExtractDeep } from '@mappedin/react-sdk/mappedin-js/src/utils/types';
|
|
1538
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
1532
1539
|
/**
|
|
1533
1540
|
* The MapView class is the main class for rendering and interacting with the map.
|
|
1534
1541
|
*
|
|
@@ -1597,11 +1604,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1597
1604
|
* Controls for Stacked Maps.
|
|
1598
1605
|
*/
|
|
1599
1606
|
get StackedMaps(): StackedMaps;
|
|
1600
|
-
/**
|
|
1601
|
-
* @internal
|
|
1602
|
-
* @experimental
|
|
1603
|
-
*/
|
|
1604
|
-
get DynamicFocus(): DynamicFocus;
|
|
1605
1607
|
/**
|
|
1606
1608
|
* @internal
|
|
1607
1609
|
*/
|
|
@@ -1635,6 +1637,16 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1635
1637
|
*/
|
|
1636
1638
|
updateState<T extends Space | Text3DView | MapObject | Label | Marker | Shape | Door | Facade | Floor | WALLS | DOORS | Model | Path | PathSegment>(target: T, state: TUpdateState<T>): any;
|
|
1637
1639
|
updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
|
|
1640
|
+
/**
|
|
1641
|
+
* Animate the state of a given target on the map from the current state to a new state. Only numeric properties and
|
|
1642
|
+
* colors can be animated.
|
|
1643
|
+
*/
|
|
1644
|
+
animateState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Shape | Path | PathSegment | Floor>(target: T, state: DeepPartial<ExtractDeep<TGetState<T>, number | string | undefined>>, options?: {
|
|
1645
|
+
duration?: number;
|
|
1646
|
+
easing?: EasingCurve;
|
|
1647
|
+
}): Promise<void> & {
|
|
1648
|
+
cancel: () => void;
|
|
1649
|
+
};
|
|
1638
1650
|
/**
|
|
1639
1651
|
* Update global state of the MapView
|
|
1640
1652
|
*/
|
|
@@ -1680,12 +1692,27 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1680
1692
|
* Sets the current floor ({@link Floor}) of the map.
|
|
1681
1693
|
* @param floor The floor or floor ID to set.
|
|
1682
1694
|
*/
|
|
1683
|
-
setFloor(floor: Floor | string): void;
|
|
1695
|
+
setFloor(floor: Floor | string, options?: TSetFloorOptions): void;
|
|
1684
1696
|
/**
|
|
1685
1697
|
* Sets the current floor stack ({@link FloorStack}) of the map. The default floor of the stack will be set as the current floor.
|
|
1686
1698
|
* @param floorStack The floor stack or floor stack ID to set.
|
|
1687
1699
|
*/
|
|
1688
|
-
setFloorStack(floorStack: FloorStack | string): void;
|
|
1700
|
+
setFloorStack(floorStack: FloorStack | string, options?: TSetFloorOptions): void;
|
|
1701
|
+
/**
|
|
1702
|
+
* Create a tween object that will be updated on every render frame.
|
|
1703
|
+
* See https://tweenjs.github.io/tween.js/docs/user_guide.html for more information.
|
|
1704
|
+
*
|
|
1705
|
+
* When creating a large number of tween objects, it may be important to call {@link removeTween} to prevent memory leaks.
|
|
1706
|
+
*
|
|
1707
|
+
* @param object The data to be tweened.
|
|
1708
|
+
* @returns The tween object.
|
|
1709
|
+
*/
|
|
1710
|
+
tween<T extends Record<string, unknown>>(object: T): Tween<T>;
|
|
1711
|
+
/**
|
|
1712
|
+
* Remove a tween created with {@link tween}.
|
|
1713
|
+
* @param tween The tween to remove.
|
|
1714
|
+
*/
|
|
1715
|
+
removeTween(tween: Tween<any>): void;
|
|
1689
1716
|
/**
|
|
1690
1717
|
* The current floor stack ({@link FloorStack}) of the map.
|
|
1691
1718
|
*/
|
|
@@ -1701,7 +1728,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1701
1728
|
* @hidden
|
|
1702
1729
|
*/
|
|
1703
1730
|
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
1704
|
-
getState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Image | Shape | Path | PathSegment | Floor | string>(target: T): TGetState<T>;
|
|
1731
|
+
getState<T extends Space | Model | Text3DView | MapObject | Label | Marker | Image | Shape | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
|
|
1705
1732
|
setHoverColor(c: string): void;
|
|
1706
1733
|
getHoverColor(): string | undefined;
|
|
1707
1734
|
/**
|
|
@@ -1882,6 +1909,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
1882
1909
|
* @experimental
|
|
1883
1910
|
*/
|
|
1884
1911
|
takeScreenshot(): Promise<string>;
|
|
1912
|
+
/**
|
|
1913
|
+
* @internal
|
|
1914
|
+
* @hidden
|
|
1915
|
+
* Whether the floor visibility is being self managed or automatically handled by the SDK.
|
|
1916
|
+
*/
|
|
1917
|
+
get manualFloorVisibility(): boolean;
|
|
1918
|
+
/**
|
|
1919
|
+
* @internal
|
|
1920
|
+
* @hidden
|
|
1921
|
+
* Disables the default behavior of the SDK to automatically hide floors on setFloor.
|
|
1922
|
+
*/
|
|
1923
|
+
set manualFloorVisibility(value: boolean);
|
|
1885
1924
|
}
|
|
1886
1925
|
}
|
|
1887
1926
|
|
|
@@ -1890,6 +1929,29 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d' {
|
|
|
1890
1929
|
import type { TAddText3DOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
1891
1930
|
import type { CurrentMapGetter } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/types';
|
|
1892
1931
|
import { Text3D as Text3DView } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
1932
|
+
/**
|
|
1933
|
+
* Disables the Text3D web worker and falls back to processing on the main thread.
|
|
1934
|
+
*
|
|
1935
|
+
* This function should be called when using Text3D features in environments
|
|
1936
|
+
* with strict Content Security Policy (CSP) that blocks web workers from
|
|
1937
|
+
* being created using blob: URLs or unsafe-eval directives.
|
|
1938
|
+
*
|
|
1939
|
+
* While disabling the worker may slightly impact performance for complex text
|
|
1940
|
+
* rendering, it enables Text3D functionality in CSP-restricted environments.
|
|
1941
|
+
*
|
|
1942
|
+
* Ensure calling this before calling preloadFont
|
|
1943
|
+
*
|
|
1944
|
+
* @example
|
|
1945
|
+
* ```typescript
|
|
1946
|
+
* import {disableText3DWorker} from '@mappedin/mappedin-js';
|
|
1947
|
+
* // Disable Text3D worker for CSP compatibility
|
|
1948
|
+
* disableText3DWorker();
|
|
1949
|
+
*
|
|
1950
|
+
* // Then use Text3D features as normal
|
|
1951
|
+
* mapView.Text3D.labelAll();
|
|
1952
|
+
* ```
|
|
1953
|
+
*/
|
|
1954
|
+
export function disableText3DWorker(): void;
|
|
1893
1955
|
export class Text3D {
|
|
1894
1956
|
#private;
|
|
1895
1957
|
/**
|
|
@@ -1993,7 +2055,8 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
1993
2055
|
export type { EntityId, EntityState, LineStyle, PaintStyle, ModelProperties, Shading, ImagePlacementOptions, } from '@mappedin/react-sdk/geojson/src/types';
|
|
1994
2056
|
export type * from 'geojson';
|
|
1995
2057
|
export type { WatermarkUpdateOptions, WatermarkOptions, WatermarkPosition } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
1996
|
-
export { preloadFont } from '@mappedin/react-sdk/geojson/src/systems/text3d/system';
|
|
2058
|
+
export { preloadFont, configureWorker } from '@mappedin/react-sdk/geojson/src/systems/text3d/system';
|
|
2059
|
+
export { setWorkerUrl as setCollisionWorkerUrl } from '@mappedin/react-sdk/geojson/src/systems/collisions/system';
|
|
1997
2060
|
export type { GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
1998
2061
|
export type { AttributionControlOptions, AttributionPosition } from '@mappedin/react-sdk/geojson/src/systems/html-controls/system';
|
|
1999
2062
|
export type { Text3DStyle, ModelStyle } from '@mappedin/react-sdk/geojson/src/components/styles';
|
|
@@ -2083,6 +2146,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2083
2146
|
import type { Language, ParsedMVFLocalePack } from '@mappedin/mvf';
|
|
2084
2147
|
import type { InsetPaddingOption, UpdatableText3DState, Text3DState, AddText3DOptions, EnvMapOptions, InitializeModelState, ModelState, UpdateModelState as GeoJsonUpdateModelState, ImagePlacementOptions, LabelAppearance } from '@mappedin/react-sdk/geojson/src';
|
|
2085
2148
|
import type { PathSegment } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
|
|
2149
|
+
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
2086
2150
|
export type UpdateModelState = Omit<GeoJsonUpdateModelState, 'position' | 'scale'> & {
|
|
2087
2151
|
position?: Coordinate;
|
|
2088
2152
|
scale?: number | [number, number, number];
|
|
@@ -2272,6 +2336,22 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2272
2336
|
* The color of the path.
|
|
2273
2337
|
*/
|
|
2274
2338
|
color: string;
|
|
2339
|
+
/**
|
|
2340
|
+
* The complete fraction of the path.
|
|
2341
|
+
*/
|
|
2342
|
+
completeFraction: number;
|
|
2343
|
+
/**
|
|
2344
|
+
* The near radius of the path.
|
|
2345
|
+
*/
|
|
2346
|
+
nearRadius: number;
|
|
2347
|
+
/**
|
|
2348
|
+
* The far radius of the path.
|
|
2349
|
+
*/
|
|
2350
|
+
farRadius: number;
|
|
2351
|
+
/**
|
|
2352
|
+
* Whether the path is visible.
|
|
2353
|
+
*/
|
|
2354
|
+
visible: boolean;
|
|
2275
2355
|
};
|
|
2276
2356
|
/**
|
|
2277
2357
|
* Represents the state of a shape.
|
|
@@ -2309,6 +2389,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2309
2389
|
* The opacity of the facade.
|
|
2310
2390
|
*/
|
|
2311
2391
|
opacity: number;
|
|
2392
|
+
/**
|
|
2393
|
+
* Whether the facade is visible.
|
|
2394
|
+
*/
|
|
2395
|
+
visible: boolean;
|
|
2312
2396
|
};
|
|
2313
2397
|
/**
|
|
2314
2398
|
* Defines the state for geometry elements like {@link Space} when updated.
|
|
@@ -2367,7 +2451,68 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2367
2451
|
* Opacity of the floor geometry.
|
|
2368
2452
|
*/
|
|
2369
2453
|
opacity: number;
|
|
2454
|
+
/**
|
|
2455
|
+
* Visibility of floor geometry.
|
|
2456
|
+
*/
|
|
2457
|
+
visible: boolean;
|
|
2458
|
+
};
|
|
2459
|
+
labels: {
|
|
2460
|
+
/**
|
|
2461
|
+
* Whether the labels are enabled to be shown when the floor is visible.
|
|
2462
|
+
*/
|
|
2463
|
+
enabled: boolean;
|
|
2464
|
+
};
|
|
2465
|
+
markers: {
|
|
2466
|
+
/**
|
|
2467
|
+
* Whether the markers are enabled to be shown when the floor is visible.
|
|
2468
|
+
*/
|
|
2469
|
+
enabled: boolean;
|
|
2470
|
+
};
|
|
2471
|
+
footprint: {
|
|
2472
|
+
/**
|
|
2473
|
+
* Altitude of the footprint relative to the floor.
|
|
2474
|
+
*/
|
|
2475
|
+
altitude: number;
|
|
2476
|
+
/**
|
|
2477
|
+
* Whether the footprint is visible.
|
|
2478
|
+
*/
|
|
2479
|
+
visible: boolean;
|
|
2480
|
+
/**
|
|
2481
|
+
* Height of the footprint relative to altitude.
|
|
2482
|
+
*/
|
|
2483
|
+
height: number;
|
|
2484
|
+
/**
|
|
2485
|
+
* Opacity of the footprint.
|
|
2486
|
+
*/
|
|
2487
|
+
opacity: number;
|
|
2488
|
+
/**
|
|
2489
|
+
* Material side of the footprint.
|
|
2490
|
+
* @internal
|
|
2491
|
+
*/
|
|
2492
|
+
side: 'double' | 'front' | 'back';
|
|
2493
|
+
/**
|
|
2494
|
+
* Color of the footprint.
|
|
2495
|
+
*/
|
|
2496
|
+
color: string;
|
|
2497
|
+
};
|
|
2498
|
+
/**
|
|
2499
|
+
* @internal
|
|
2500
|
+
*/
|
|
2501
|
+
occlusion: {
|
|
2502
|
+
/**
|
|
2503
|
+
* @internal
|
|
2504
|
+
* Whether this floor should occlude labels and markers on other floors
|
|
2505
|
+
*/
|
|
2506
|
+
enabled: boolean;
|
|
2370
2507
|
};
|
|
2508
|
+
/**
|
|
2509
|
+
* The visibility of the floor, including the geometry, labels, and markers.
|
|
2510
|
+
*/
|
|
2511
|
+
visible: boolean;
|
|
2512
|
+
/**
|
|
2513
|
+
* The altitude of the floor.
|
|
2514
|
+
*/
|
|
2515
|
+
altitude: number;
|
|
2371
2516
|
};
|
|
2372
2517
|
export enum WALLS {
|
|
2373
2518
|
Exterior = "exterior-walls",
|
|
@@ -2380,7 +2525,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2380
2525
|
/**
|
|
2381
2526
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
2382
2527
|
*/
|
|
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 ?
|
|
2528
|
+
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 ? DeepPartial<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;
|
|
2384
2529
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState> | Partial<TPathState>;
|
|
2385
2530
|
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;
|
|
2386
2531
|
/**
|
|
@@ -2848,6 +2993,28 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2848
2993
|
* sorting of markers and show certain markers always in front
|
|
2849
2994
|
*/
|
|
2850
2995
|
zIndex?: number;
|
|
2996
|
+
/**
|
|
2997
|
+
* Configuration for the low priority pin fallback strategy.
|
|
2998
|
+
* When enabled, shows a smaller pin version of the marker when all anchor positions have collisions.
|
|
2999
|
+
* @default { enabled: true, size: 2, color: '#666' }
|
|
3000
|
+
*/
|
|
3001
|
+
lowPriorityPin?: {
|
|
3002
|
+
/**
|
|
3003
|
+
* Whether to enable low priority pin strategy when all anchor positions have collisions.
|
|
3004
|
+
* @default true
|
|
3005
|
+
*/
|
|
3006
|
+
enabled?: boolean;
|
|
3007
|
+
/**
|
|
3008
|
+
* Size of the low priority pin in pixels.
|
|
3009
|
+
* @default 2
|
|
3010
|
+
*/
|
|
3011
|
+
size?: number;
|
|
3012
|
+
/**
|
|
3013
|
+
* Color of the low priority pin.
|
|
3014
|
+
* @default '#666'
|
|
3015
|
+
*/
|
|
3016
|
+
color?: string;
|
|
3017
|
+
};
|
|
2851
3018
|
};
|
|
2852
3019
|
/**
|
|
2853
3020
|
* Options for creating a new {@link Label} with {@link Labels.add}.
|
|
@@ -3064,6 +3231,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
3064
3231
|
*/
|
|
3065
3232
|
bearingAndPitch?: boolean;
|
|
3066
3233
|
};
|
|
3234
|
+
export type TSetFloorOptions = {
|
|
3235
|
+
/**
|
|
3236
|
+
* Optionally provide the context for the floor change which will be published as the `reason` for the `floor-change` event.
|
|
3237
|
+
*/
|
|
3238
|
+
context?: TFloorChangeReason;
|
|
3239
|
+
};
|
|
3067
3240
|
}
|
|
3068
3241
|
|
|
3069
3242
|
declare module '@mappedin/react-sdk/mappedin-js/src/constants' {
|
|
@@ -3454,7 +3627,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects' {
|
|
|
3454
3627
|
}
|
|
3455
3628
|
|
|
3456
3629
|
declare module '@mappedin/react-sdk/mappedin-js/src/debug' {
|
|
3457
|
-
import type { RendererCore } from '@mappedin/
|
|
3630
|
+
import type { RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
3458
3631
|
export class Debug {
|
|
3459
3632
|
state: RendererCore['Debug']['state'];
|
|
3460
3633
|
constructor(core: RendererCore);
|
|
@@ -3557,6 +3730,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
|
|
|
3557
3730
|
*/
|
|
3558
3731
|
animateArrowsOnPath?: boolean;
|
|
3559
3732
|
};
|
|
3733
|
+
/**
|
|
3734
|
+
* Controls whether the path drawing is animated across floors.
|
|
3735
|
+
* @default true
|
|
3736
|
+
*/
|
|
3737
|
+
animatePathDrawing?: boolean;
|
|
3560
3738
|
/**
|
|
3561
3739
|
* Options for the path.
|
|
3562
3740
|
*/
|
|
@@ -3717,6 +3895,141 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
|
|
|
3717
3895
|
export {};
|
|
3718
3896
|
}
|
|
3719
3897
|
|
|
3898
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
3899
|
+
import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/core-sdk';
|
|
3900
|
+
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
3901
|
+
import { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
3902
|
+
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
3903
|
+
import type { FloorStack, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
3904
|
+
import { Facade, Coordinate, MapObject, Space, Floor, Door } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
3905
|
+
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
3906
|
+
import { Label, Marker, Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
3907
|
+
import { Text3D as Text3DView, Model, Path, type Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
3908
|
+
import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
3909
|
+
import type { TGetState, TUpdateState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
3910
|
+
import { Camera } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera';
|
|
3911
|
+
import { Exporter } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/exporter';
|
|
3912
|
+
import { Labels } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels';
|
|
3913
|
+
import { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
3914
|
+
import { Markers } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/markers';
|
|
3915
|
+
import { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
|
|
3916
|
+
import { Models } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/models';
|
|
3917
|
+
import { Paths } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths';
|
|
3918
|
+
import { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3919
|
+
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
3920
|
+
import { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
|
|
3921
|
+
import { Style } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/style';
|
|
3922
|
+
import Outdoor from '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor';
|
|
3923
|
+
import { type BBox } from 'geojson';
|
|
3924
|
+
import { Text3D } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
3925
|
+
import { PathSegment } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
|
|
3926
|
+
import { Tween } from '@tweenjs/tween.js';
|
|
3927
|
+
export class GeoJsonApi {
|
|
3928
|
+
core: RendererCore;
|
|
3929
|
+
mapObjects: GeojsonApiMapObject[];
|
|
3930
|
+
id: string;
|
|
3931
|
+
mapDataExternal: {
|
|
3932
|
+
[key in string]: MapData;
|
|
3933
|
+
};
|
|
3934
|
+
mapData?: MapData;
|
|
3935
|
+
currentMap: GeojsonApiMapObject;
|
|
3936
|
+
hiddenOutdoorGeometries: [
|
|
3937
|
+
BBox,
|
|
3938
|
+
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
3939
|
+
layers: string[]
|
|
3940
|
+
][];
|
|
3941
|
+
manualFloorVisibility: boolean;
|
|
3942
|
+
mapView: MapView;
|
|
3943
|
+
Camera: Camera;
|
|
3944
|
+
Labels: Labels;
|
|
3945
|
+
Text3D: Text3D;
|
|
3946
|
+
Markers: Markers;
|
|
3947
|
+
Models: Models;
|
|
3948
|
+
Paths: Paths;
|
|
3949
|
+
Exporter: Exporter;
|
|
3950
|
+
Navigation: Navigation;
|
|
3951
|
+
Outdoor: Outdoor;
|
|
3952
|
+
BlueDot: BlueDot;
|
|
3953
|
+
Shapes: Shapes;
|
|
3954
|
+
Style: Style;
|
|
3955
|
+
Images: Images;
|
|
3956
|
+
get StackedMaps(): import("..").StackedMaps;
|
|
3957
|
+
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
3958
|
+
updateState<T extends Space | Text3DView | MapObject | Label | Shape | Marker | Model | Door | Facade | Floor | WALLS | DOORS | Path | PathSegment | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
3959
|
+
update: () => void;
|
|
3960
|
+
getMapDataInternal(): MapDataInternal | undefined;
|
|
3961
|
+
getMapData(): MapData | undefined;
|
|
3962
|
+
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
3963
|
+
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
3964
|
+
setFloorStack(floorStack: FloorStack | string, reason?: TFloorChangeReason): void;
|
|
3965
|
+
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
3966
|
+
get currentFloorStack(): FloorStack;
|
|
3967
|
+
get currentFloor(): Floor;
|
|
3968
|
+
getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | Model | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
|
|
3969
|
+
setHoverColor(c: string): void;
|
|
3970
|
+
getHoverColor(): string | undefined;
|
|
3971
|
+
/**
|
|
3972
|
+
* Create a coordinate from a screen coordinate
|
|
3973
|
+
* @param x - The x coordinate of the screen
|
|
3974
|
+
* @param y - The y coordinate of the screen
|
|
3975
|
+
* @param floor - The floor to use for the coordinate
|
|
3976
|
+
* @returns The coordinate
|
|
3977
|
+
*/
|
|
3978
|
+
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
3979
|
+
getScreenCoordinateFromCoordinate(coordinate: Coordinate): {
|
|
3980
|
+
x: number;
|
|
3981
|
+
y: number;
|
|
3982
|
+
};
|
|
3983
|
+
isInView(target: Space | MapObject | Label | Marker | string): boolean;
|
|
3984
|
+
auto(): {
|
|
3985
|
+
labels: Label[];
|
|
3986
|
+
};
|
|
3987
|
+
tween<T extends Record<string, unknown>>(object: T): Tween<T>;
|
|
3988
|
+
removeTween(tween: Tween<any>): void;
|
|
3989
|
+
/**
|
|
3990
|
+
* @internal
|
|
3991
|
+
*/
|
|
3992
|
+
get __core(): RendererCore;
|
|
3993
|
+
clear(): void;
|
|
3994
|
+
destroy(): void;
|
|
3995
|
+
}
|
|
3996
|
+
/**
|
|
3997
|
+
* Sets the base URL directory where worker scripts are hosted for CSP compatibility.
|
|
3998
|
+
*
|
|
3999
|
+
* This function configures both the MapLibre and collision system workers to load from
|
|
4000
|
+
* external URLs instead of using inline blob URLs. The SDK expects two specific worker
|
|
4001
|
+
* files to be available in the provided directory:
|
|
4002
|
+
* - `maplibre-worker.csp.js` - For MapLibre map rendering
|
|
4003
|
+
* - `collision-worker.csp.js` - For the collision detection system
|
|
4004
|
+
*
|
|
4005
|
+
* Using this approach enables compatibility with strict Content Security Policies
|
|
4006
|
+
* that block unsafe-eval and blob: URLs.
|
|
4007
|
+
*
|
|
4008
|
+
* @param baseUrl - Base URL directory where worker scripts are hosted (without trailing slash)
|
|
4009
|
+
* Example: "https://cdn.example.com/workers"
|
|
4010
|
+
*
|
|
4011
|
+
* @example
|
|
4012
|
+
* ```typescript
|
|
4013
|
+
* import { setWorkersUrl } from '@mappedin/mappedin-js';
|
|
4014
|
+
*
|
|
4015
|
+
* // Call before initializing any maps
|
|
4016
|
+
* setWorkersUrl('https://cdn.example.com/workers');
|
|
4017
|
+
* // This will load:
|
|
4018
|
+
* // - https://cdn.example.com/workers/maplibre-worker.csp.js
|
|
4019
|
+
* // - https://cdn.example.com/workers/collision-worker.csp.js
|
|
4020
|
+
* ```
|
|
4021
|
+
*
|
|
4022
|
+
* @remarks
|
|
4023
|
+
* - The worker files can be found in the published package at:
|
|
4024
|
+
* `node_modules/@mappedin/mappedin-js/lib/esm/workers/`
|
|
4025
|
+
* - For deployment, copy these files to your web server or CDN
|
|
4026
|
+
* - A better approach is to add these files to your build process to ensure
|
|
4027
|
+
* they're always in sync with your application
|
|
4028
|
+
* - Call this function before creating any map instances
|
|
4029
|
+
*/
|
|
4030
|
+
export function setWorkersUrl(baseUrl: string): void;
|
|
4031
|
+
}
|
|
4032
|
+
|
|
3720
4033
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson' {
|
|
3721
4034
|
export { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
3722
4035
|
export { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot';
|
|
@@ -3733,7 +4046,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson' {
|
|
|
3733
4046
|
export { default as Outdoor } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor';
|
|
3734
4047
|
export { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
|
|
3735
4048
|
export { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
3736
|
-
export { DynamicFocus } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/dynamic-focus';
|
|
3737
4049
|
}
|
|
3738
4050
|
|
|
3739
4051
|
declare module '@mappedin/react-sdk/mappedin-js/src/search' {
|
|
@@ -3985,33 +4297,825 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot' {
|
|
|
3985
4297
|
export type { TBlueDotEvents, GeolocationPositionExtended, TFollowCameraOptions, TFollowMode } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
3986
4298
|
}
|
|
3987
4299
|
|
|
3988
|
-
declare module '@mappedin/react-sdk/
|
|
3989
|
-
import type { NodeCollection } from '@mappedin/mvf';
|
|
3990
|
-
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
3991
|
-
import type { EnterpriseLocation, MapDataInternal, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
3992
|
-
import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
|
|
3993
|
-
import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3994
|
-
import type { IGeoJSONData } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
|
|
3995
|
-
import type { IAnchorable, IFocusable } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
4300
|
+
declare module '@mappedin/react-sdk/packages/mvf-utils/api-types' {
|
|
3996
4301
|
/**
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4302
|
+
* This file contains the API types for MappedinSDK - before they get turned into Classes
|
|
4303
|
+
*/
|
|
4304
|
+
export type TLocationType = 'amenities' | 'tenant';
|
|
4305
|
+
export type TNode = {
|
|
4306
|
+
id: string;
|
|
4307
|
+
x: number;
|
|
4308
|
+
y: number;
|
|
4309
|
+
map: string;
|
|
4310
|
+
externalId?: string;
|
|
4311
|
+
paths: {
|
|
4312
|
+
node: string;
|
|
4313
|
+
map: string;
|
|
4314
|
+
weight?: number;
|
|
4315
|
+
}[];
|
|
4316
|
+
[propName: string]: any;
|
|
4317
|
+
};
|
|
4318
|
+
export type TImage = {
|
|
4319
|
+
original?: string;
|
|
4320
|
+
large?: string;
|
|
4321
|
+
'140x140'?: string;
|
|
4322
|
+
xxlarge?: string;
|
|
4323
|
+
xsmall?: string;
|
|
4324
|
+
'66x66'?: string;
|
|
4325
|
+
xlarge?: string;
|
|
4326
|
+
medium?: string;
|
|
4327
|
+
xxsmall?: string;
|
|
4328
|
+
small?: string;
|
|
4329
|
+
};
|
|
4330
|
+
export type TLogo = TImage;
|
|
4331
|
+
export type TGalleryImage = {
|
|
4332
|
+
image: TImage;
|
|
4333
|
+
caption?: string;
|
|
4334
|
+
};
|
|
4335
|
+
export type TPhone = {
|
|
4336
|
+
number?: string;
|
|
4337
|
+
};
|
|
4338
|
+
export type TSocial = {
|
|
4339
|
+
website?: string;
|
|
4340
|
+
twitter?: string;
|
|
4341
|
+
facebook?: string;
|
|
4342
|
+
instagram?: string;
|
|
4343
|
+
};
|
|
4344
|
+
export type TColor = {
|
|
4345
|
+
hex: string;
|
|
4346
|
+
opacity: number;
|
|
4347
|
+
rgba: string;
|
|
4348
|
+
};
|
|
4349
|
+
export type TVortex = {
|
|
4350
|
+
id: string;
|
|
4351
|
+
name: string;
|
|
4352
|
+
type: string;
|
|
4353
|
+
weight: number;
|
|
4354
|
+
multiplier: number;
|
|
4355
|
+
[propName: string]: any;
|
|
4356
|
+
};
|
|
4357
|
+
export type TPicture = {
|
|
4358
|
+
original?: string;
|
|
4359
|
+
};
|
|
4360
|
+
export type TOpeningHours = {
|
|
4361
|
+
'@type': string;
|
|
4362
|
+
opens: string;
|
|
4363
|
+
closes: string;
|
|
4364
|
+
dayOfWeek: string[];
|
|
4365
|
+
validFrom?: string;
|
|
4366
|
+
validThrough?: string;
|
|
4367
|
+
};
|
|
4368
|
+
export type TSiblingGroup = {
|
|
4369
|
+
label: string;
|
|
4370
|
+
siblings: string[];
|
|
4371
|
+
};
|
|
4372
|
+
export type TState = {
|
|
4373
|
+
type: string;
|
|
4374
|
+
start?: string;
|
|
4375
|
+
end?: string;
|
|
4376
|
+
};
|
|
4377
|
+
export type TCategory = {
|
|
4378
|
+
name?: string;
|
|
4379
|
+
externalId?: string;
|
|
4380
|
+
parents?: string[];
|
|
4381
|
+
id?: string;
|
|
4382
|
+
icon?: TPicture;
|
|
4383
|
+
};
|
|
4384
|
+
export type TEvent = {
|
|
4385
|
+
id: string;
|
|
4386
|
+
type: string;
|
|
4387
|
+
name: string;
|
|
4388
|
+
location?: string;
|
|
4389
|
+
description?: string;
|
|
4390
|
+
image?: TImage;
|
|
4391
|
+
startDate?: number;
|
|
4392
|
+
endDate?: number;
|
|
4393
|
+
showDate?: number;
|
|
4394
|
+
};
|
|
4395
|
+
export interface TGeoReference {
|
|
4396
|
+
target: {
|
|
4397
|
+
x: number;
|
|
4398
|
+
y: number;
|
|
4399
|
+
};
|
|
4400
|
+
control: {
|
|
4401
|
+
x: number;
|
|
4402
|
+
y: number;
|
|
4403
|
+
};
|
|
4404
|
+
}
|
|
4405
|
+
export interface TMap {
|
|
4406
|
+
id: string;
|
|
4407
|
+
name: string;
|
|
4408
|
+
shortName: string;
|
|
4409
|
+
elevation?: number;
|
|
4410
|
+
scale?: number;
|
|
4411
|
+
x_scale?: number;
|
|
4412
|
+
georeference?: TGeoReference[];
|
|
4413
|
+
[propName: string]: any;
|
|
4414
|
+
}
|
|
4415
|
+
export type TMapGroup = {
|
|
4416
|
+
name: string;
|
|
4417
|
+
id: string;
|
|
4418
|
+
};
|
|
4419
|
+
export type TBuilding = TLocation & {
|
|
4420
|
+
groupId: string;
|
|
4421
|
+
};
|
|
4422
|
+
export type TLocation = {
|
|
4423
|
+
id: string;
|
|
4424
|
+
name: string;
|
|
4425
|
+
type: string;
|
|
4426
|
+
nodes: {
|
|
4427
|
+
map: TMap['id'];
|
|
4428
|
+
node: TNode['id'];
|
|
4429
|
+
}[];
|
|
4430
|
+
polygons: {
|
|
4431
|
+
map: TMap['id'];
|
|
4432
|
+
id: TPolygon['id'];
|
|
4433
|
+
}[];
|
|
4434
|
+
categories: string[];
|
|
4435
|
+
description?: string;
|
|
4436
|
+
sortOrder?: number;
|
|
4437
|
+
logo?: TLogo;
|
|
4438
|
+
phone?: TPhone;
|
|
4439
|
+
social?: TSocial;
|
|
4440
|
+
color?: TColor;
|
|
4441
|
+
shortName?: string;
|
|
4442
|
+
detailsUrl?: string;
|
|
4443
|
+
parent?: string | null;
|
|
4444
|
+
tags?: string[];
|
|
4445
|
+
externalId?: string;
|
|
4446
|
+
picture?: TPicture;
|
|
4447
|
+
states?: TState[];
|
|
4448
|
+
operationHours?: TOpeningHours[] | undefined;
|
|
4449
|
+
siblingGroups?: TSiblingGroup[] | undefined;
|
|
4450
|
+
gallery?: TGalleryImage[] | undefined;
|
|
4451
|
+
[propName: string]: any;
|
|
4452
|
+
};
|
|
4453
|
+
export type TPolygon = {
|
|
4454
|
+
id: string;
|
|
4455
|
+
map: string;
|
|
4456
|
+
layer?: string;
|
|
4457
|
+
layerId?: string;
|
|
4458
|
+
externalId?: string;
|
|
4459
|
+
name?: string;
|
|
4460
|
+
entrances: {
|
|
4461
|
+
map: TMap['id'];
|
|
4462
|
+
id: TNode['id'];
|
|
4463
|
+
}[];
|
|
4464
|
+
};
|
|
4465
|
+
export type TPolygonRanking = {
|
|
4466
|
+
polygonId: string;
|
|
4467
|
+
entranceNodeId: string;
|
|
4468
|
+
score: number;
|
|
4469
|
+
};
|
|
4470
|
+
export type TLocationState = {
|
|
4471
|
+
id: string;
|
|
4472
|
+
name: string;
|
|
4473
|
+
value: string;
|
|
4474
|
+
};
|
|
4475
|
+
export type TVenue = {
|
|
4476
|
+
address?: string;
|
|
4477
|
+
city?: string;
|
|
4478
|
+
countrycode?: string;
|
|
4479
|
+
defaultMap?: string;
|
|
4480
|
+
externalId?: string;
|
|
4481
|
+
id?: string;
|
|
4482
|
+
latitude?: number;
|
|
4483
|
+
logo?: TLogo;
|
|
4484
|
+
longitude?: number;
|
|
4485
|
+
metadata?: any;
|
|
4486
|
+
name?: string;
|
|
4487
|
+
operationHours?: TOpeningHours[];
|
|
4488
|
+
postal?: string;
|
|
4489
|
+
slug?: string;
|
|
4490
|
+
state?: string;
|
|
4491
|
+
telephone?: string;
|
|
4492
|
+
tzid?: string;
|
|
4493
|
+
tzidOverride?: string;
|
|
4494
|
+
utcOffset?: string;
|
|
4495
|
+
website?: string;
|
|
4496
|
+
};
|
|
4497
|
+
export type TMappedinAPI = {
|
|
4498
|
+
nodes: TNode[];
|
|
4499
|
+
locations: TLocation[];
|
|
4500
|
+
categories: TCategory[];
|
|
4501
|
+
mapGroups: TMapGroup[];
|
|
4502
|
+
polygons: TPolygon[];
|
|
4503
|
+
maps: TMap[];
|
|
4504
|
+
themes: any;
|
|
4505
|
+
venue: TVenue;
|
|
4506
|
+
vortexes: TVortex[];
|
|
4507
|
+
locationStates?: TLocationState[];
|
|
4508
|
+
imageBinaries?: Map<string, Uint8Array>;
|
|
4509
|
+
};
|
|
4510
|
+
}
|
|
4511
|
+
|
|
4512
|
+
declare module '@mappedin/react-sdk/packages/mvf-utils/mvf-types' {
|
|
4513
|
+
import type { MapId, Style, Feature, LineString, ObstructionProperties, EntranceProperties, SpaceProperties, ObstructionCollection, EntranceCollection, SpaceCollection, FloorImageProperties, BaseTextAreaProperties, EnterpriseTexture } from '@mappedin/mvf';
|
|
4514
|
+
import type { FeatureCollection, MultiPolygon, Point, Polygon } from 'geojson';
|
|
4515
|
+
import type { TImage, TMap, TNode, TOpeningHours, TPhone, TSiblingGroup, TSocial } from '@mappedin/react-sdk/packages/mvf-utils/api-types';
|
|
4516
|
+
export type WithIDs<T> = Map<string, T>;
|
|
4517
|
+
type ManifestFile = {
|
|
4518
|
+
type: 'file';
|
|
4519
|
+
name: string;
|
|
4520
|
+
};
|
|
4521
|
+
type ManifestFolder = {
|
|
4522
|
+
type: 'folder';
|
|
4523
|
+
name: string;
|
|
4524
|
+
children: ManifestFile[];
|
|
4525
|
+
};
|
|
4526
|
+
export type MVFStyle = Style & {
|
|
4527
|
+
type: string;
|
|
4528
|
+
width?: number;
|
|
4529
|
+
};
|
|
4530
|
+
export type MVFObstructionFeature = ObstructionCollection['features'][number];
|
|
4531
|
+
export type MVFEntranceFeature = EntranceCollection['features'][number];
|
|
4532
|
+
export type MVFSpaceFeature = SpaceCollection['features'][number];
|
|
4533
|
+
export type WithPolygonImage<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4534
|
+
image?: FloorImageProperties;
|
|
4535
|
+
};
|
|
4536
|
+
export type WithTextArea<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4537
|
+
textArea?: BaseTextAreaProperties;
|
|
4538
|
+
};
|
|
4539
|
+
export type WithEntepriseStyle<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4540
|
+
style?: {
|
|
4541
|
+
styleId: string;
|
|
4542
|
+
edgeOffset?: number;
|
|
4543
|
+
};
|
|
4544
|
+
};
|
|
4545
|
+
export type WithTextures<T extends SpaceProperties | ObstructionProperties> = T & {
|
|
4546
|
+
textures?: EnterpriseTexture[];
|
|
4547
|
+
};
|
|
4548
|
+
export type PolygonFeatureProperties<T extends SpaceProperties | ObstructionProperties> = WithEntepriseStyle<T> | WithPolygonImage<T> | WithTextures<T>;
|
|
4549
|
+
export type MVFv1PolygonLikeProperties = {
|
|
4550
|
+
id: string;
|
|
4551
|
+
altitude?: number;
|
|
4552
|
+
color?: string;
|
|
4553
|
+
externalId?: string | null;
|
|
4554
|
+
height?: number;
|
|
4555
|
+
opacity?: number;
|
|
4556
|
+
layer?: string;
|
|
4557
|
+
level: string;
|
|
4558
|
+
parent?: string | null;
|
|
4559
|
+
};
|
|
4560
|
+
export type MVFv1SpaceProperties = MVFv1PolygonLikeProperties & {
|
|
4561
|
+
entrances: {
|
|
4562
|
+
level: TMap['id'];
|
|
4563
|
+
id: TNode['id'];
|
|
4564
|
+
}[];
|
|
4565
|
+
};
|
|
4566
|
+
export type MVFv1ObstructionProperties = MVFv1PolygonLikeProperties;
|
|
4567
|
+
export type MVFv1ConnectionProperties = {
|
|
4568
|
+
id: string;
|
|
4569
|
+
/**
|
|
4570
|
+
* Indicates that a connection is accessible
|
|
4571
|
+
*/
|
|
4572
|
+
accessible: boolean;
|
|
4573
|
+
/**
|
|
4574
|
+
* Array of node ids that this Connection connects with.
|
|
4575
|
+
*/
|
|
4576
|
+
destinations: string[];
|
|
4577
|
+
level: string;
|
|
4578
|
+
multiplier: number;
|
|
4579
|
+
name: string;
|
|
4580
|
+
/**
|
|
4581
|
+
* Type of the connection such as `escalator` or `elevator`
|
|
4582
|
+
*/
|
|
4583
|
+
type: string;
|
|
4584
|
+
weight: number;
|
|
4585
|
+
};
|
|
4586
|
+
export type MVFv1NodeProperties = {
|
|
4587
|
+
id: string;
|
|
4588
|
+
/**
|
|
4589
|
+
* Indicates that a node is accessible
|
|
4590
|
+
*/
|
|
4591
|
+
accessible: boolean;
|
|
4592
|
+
/**
|
|
4593
|
+
* External id of a node is used to sync and connect to external systems to Mappedin data
|
|
4594
|
+
*/
|
|
4595
|
+
externalId: string | null;
|
|
4596
|
+
level: string;
|
|
4597
|
+
multiplier: number;
|
|
4598
|
+
neighbors: string[];
|
|
4599
|
+
weight: number;
|
|
4600
|
+
};
|
|
4601
|
+
export type MVFv1LevelProperties = {
|
|
4602
|
+
id: string;
|
|
4603
|
+
abbreviation?: string;
|
|
4604
|
+
building?: string;
|
|
4605
|
+
elevation?: number;
|
|
4606
|
+
name: string;
|
|
4607
|
+
};
|
|
4608
|
+
export type MVFv1ManifestProperties = {
|
|
4609
|
+
/**
|
|
4610
|
+
* Name of the venue
|
|
4611
|
+
*/
|
|
4612
|
+
name: string;
|
|
4613
|
+
folder_struct: (ManifestFolder | ManifestFile)[];
|
|
4614
|
+
/**
|
|
4615
|
+
* Mappedin Venue Format version number of the MVF bundle
|
|
4616
|
+
*/
|
|
4617
|
+
version: string;
|
|
4618
|
+
/**
|
|
4619
|
+
* Timestamp when the MVF bundle was generated. E.g. `2022-02-25T16:26:09.908Z`
|
|
4620
|
+
*/
|
|
4621
|
+
time: string;
|
|
4622
|
+
};
|
|
4623
|
+
export type MVFv1BuildingProperties = {
|
|
4624
|
+
id: string;
|
|
4625
|
+
name: string;
|
|
4626
|
+
venue: string;
|
|
4627
|
+
};
|
|
4628
|
+
export type MVFv1CategoryProperties = {
|
|
4629
|
+
id: string;
|
|
4630
|
+
name: string;
|
|
4631
|
+
picture?: TImage;
|
|
4632
|
+
};
|
|
4633
|
+
export type MVFv1LocationProperties = {
|
|
4634
|
+
id: string;
|
|
4635
|
+
address?: string | null;
|
|
4636
|
+
/**
|
|
4637
|
+
* Array of {@link MICategoryProperties | category} ids
|
|
4638
|
+
*/
|
|
4639
|
+
categories: string[];
|
|
4640
|
+
/**
|
|
4641
|
+
* A text description of the location usually indicating what the location is used for
|
|
4642
|
+
*/
|
|
4643
|
+
description?: string | null;
|
|
4644
|
+
/**
|
|
4645
|
+
* Email address to for contacting this location
|
|
4646
|
+
*/
|
|
4647
|
+
email?: string | null;
|
|
4648
|
+
/**
|
|
4649
|
+
* External id used to connect Mappedin Location to an external system
|
|
4650
|
+
*/
|
|
4651
|
+
externalId?: string | null;
|
|
4652
|
+
/**
|
|
4653
|
+
* Opening hours of the location
|
|
4654
|
+
*/
|
|
4655
|
+
hours?: TOpeningHours[] | null;
|
|
4656
|
+
/**
|
|
4657
|
+
* Collection of links related to this location
|
|
4658
|
+
*/
|
|
4659
|
+
links?: {
|
|
4660
|
+
label: string;
|
|
4661
|
+
url: string;
|
|
4662
|
+
}[] | null;
|
|
4663
|
+
logo?: TImage | null;
|
|
4664
|
+
/**
|
|
4665
|
+
* Name of the location. By default this is the string displayed in the location label
|
|
4666
|
+
*/
|
|
4667
|
+
name: string;
|
|
4668
|
+
/**
|
|
4669
|
+
* Phone number for contacting this location
|
|
4670
|
+
*/
|
|
4671
|
+
phone?: TPhone | null;
|
|
4672
|
+
picture?: TImage | null;
|
|
4673
|
+
services?: string | null;
|
|
4674
|
+
siblingGroups?: TSiblingGroup[] | null;
|
|
4675
|
+
/**
|
|
4676
|
+
* Social media links of the location
|
|
4677
|
+
*/
|
|
4678
|
+
social?: TSocial | null;
|
|
4679
|
+
/**
|
|
4680
|
+
* Array of {@link MISpaceProperties | MVF Space} ids for this location
|
|
4681
|
+
*/
|
|
4682
|
+
spaces?: {
|
|
4683
|
+
id: string;
|
|
4684
|
+
map: string;
|
|
4685
|
+
}[] | null;
|
|
4686
|
+
states?: {
|
|
4687
|
+
type: string;
|
|
4688
|
+
start?: string;
|
|
4689
|
+
end?: string;
|
|
4690
|
+
}[] | null;
|
|
4691
|
+
type: string;
|
|
4692
|
+
};
|
|
4693
|
+
export type MVFv1ObstructionCollection = FeatureCollection<Polygon, MVFv1ObstructionProperties>;
|
|
4694
|
+
export type MVFv1SpaceCollection = FeatureCollection<Polygon, MVFv1SpaceProperties>;
|
|
4695
|
+
export type MVFv1ConnectionCollection = FeatureCollection<Point, MVFv1ConnectionProperties>;
|
|
4696
|
+
export type MVFv1NodeCollection = FeatureCollection<Point, MVFv1NodeProperties>;
|
|
4697
|
+
export type MVFv1LevelCollection = FeatureCollection<Polygon | MultiPolygon, MVFv1LevelProperties>;
|
|
4698
|
+
export type MVFv1ManifestCollection = FeatureCollection<Point, MVFv1ManifestProperties>;
|
|
4699
|
+
export type MVFv1BuildingCollection = FeatureCollection<Polygon, MVFv1BuildingProperties>;
|
|
4700
|
+
export type MVFv1CategoryCollection = FeatureCollection<null, MVFv1CategoryProperties>;
|
|
4701
|
+
export type MVFv1LocationCollection = FeatureCollection<null, MVFv1LocationProperties>;
|
|
4702
|
+
export type ParsedMVFv1 = {
|
|
4703
|
+
/**
|
|
4704
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4705
|
+
*/
|
|
4706
|
+
space: {
|
|
4707
|
+
[mapId: MapId]: MVFv1SpaceCollection | undefined;
|
|
4708
|
+
};
|
|
4709
|
+
/**
|
|
4710
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4711
|
+
*/
|
|
4712
|
+
obstruction: {
|
|
4713
|
+
[mapId: MapId]: MVFv1ObstructionCollection | undefined;
|
|
4714
|
+
};
|
|
4715
|
+
/**
|
|
4716
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4717
|
+
*/
|
|
4718
|
+
level: {
|
|
4719
|
+
[mapId: MapId]: MVFv1LevelCollection | undefined;
|
|
4720
|
+
};
|
|
4721
|
+
/**
|
|
4722
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4723
|
+
*/
|
|
4724
|
+
node: {
|
|
4725
|
+
[mapId: MapId]: MVFv1NodeCollection | undefined;
|
|
4726
|
+
};
|
|
4727
|
+
/**
|
|
4728
|
+
* @propertyNames { "pattern": "^m_[0-9a-z]{16}$" }
|
|
4729
|
+
*/
|
|
4730
|
+
connection: {
|
|
4731
|
+
[mapId: MapId]: MVFv1ConnectionCollection | undefined;
|
|
4732
|
+
};
|
|
4733
|
+
'manifest.geojson': MVFv1ManifestCollection;
|
|
4734
|
+
'building.geojson': MVFv1BuildingCollection;
|
|
4735
|
+
'category.geojson': MVFv1CategoryCollection;
|
|
4736
|
+
'location.geojson': MVFv1LocationCollection;
|
|
4737
|
+
};
|
|
4738
|
+
export type RawMVFv1 = {
|
|
4739
|
+
'manifest.geojson': Uint8Array;
|
|
4740
|
+
'building.geojson': Uint8Array;
|
|
4741
|
+
'category.geojson': Uint8Array;
|
|
4742
|
+
'location.geojson': Uint8Array;
|
|
4743
|
+
level: Partial<Record<MapId, Uint8Array>>;
|
|
4744
|
+
node: Partial<Record<MapId, Uint8Array>>;
|
|
4745
|
+
space: Partial<Record<MapId, Uint8Array>>;
|
|
4746
|
+
obstruction: Partial<Record<MapId, Uint8Array>>;
|
|
4747
|
+
connection: Partial<Record<MapId, Uint8Array>>;
|
|
4748
|
+
};
|
|
4749
|
+
export type ObstructionFeature = Feature<LineString | Polygon, ObstructionProperties>;
|
|
4750
|
+
export type ObstructionWallFeature = Feature<LineString, ObstructionProperties>;
|
|
4751
|
+
export type EntranceFeature = Feature<LineString, EntranceProperties>;
|
|
4752
|
+
export {};
|
|
4753
|
+
}
|
|
4754
|
+
|
|
4755
|
+
declare module '@mappedin/react-sdk/packages/mvf-utils/mvf-utils' {
|
|
4756
|
+
import { type ParsedMVF, type ParsedMVFLocalePack, type RawMVF } from '@mappedin/mvf';
|
|
4757
|
+
import type { ParsedMVFv1, RawMVFv1 } from '@mappedin/react-sdk/packages/mvf-utils/mvf-types';
|
|
4758
|
+
export * from '@mappedin/react-sdk/packages/mvf-utils/tokens/access-token';
|
|
4759
|
+
export * from '@mappedin/react-sdk/packages/mvf-utils/tokens/sas-token';
|
|
4760
|
+
/**
|
|
4761
|
+
* This is how we can avoid bundling in node-fetch (via isomorphic fetch),
|
|
4762
|
+
* which keeps popping up in security advisories
|
|
4763
|
+
* This is a pattern that most isomorphic libraries appear to use,
|
|
4764
|
+
* where when running in node, you can pass your own fetch function
|
|
4765
|
+
* as one is not provided by Node.js.
|
|
4766
|
+
*
|
|
4767
|
+
*/
|
|
4768
|
+
export function isomorphicFetch(): Window['fetch'];
|
|
4769
|
+
/**
|
|
4770
|
+
* @internal
|
|
4771
|
+
* export for test mocking
|
|
4772
|
+
*/
|
|
4773
|
+
export function __setFetchFn(fn: any): void;
|
|
4774
|
+
export type TGetVenueOptions = {
|
|
4775
|
+
accessToken?: string;
|
|
4776
|
+
clientId?: string;
|
|
4777
|
+
clientSecret?: string;
|
|
4778
|
+
baseUrl?: string;
|
|
4779
|
+
includeHidden?: boolean;
|
|
4780
|
+
noAuth?: boolean;
|
|
4781
|
+
perspective?: string;
|
|
4782
|
+
language?: string;
|
|
4783
|
+
headers?: {
|
|
4784
|
+
[key in string]: string;
|
|
4785
|
+
};
|
|
4786
|
+
venue: string;
|
|
4787
|
+
/**
|
|
4788
|
+
* An object specifying additional properties to fetch for each data item.
|
|
4789
|
+
* Each key represents a data item (e.g., 'locations', 'nodes'), and the value is an array of strings indicating extra properties to be included.
|
|
4790
|
+
* @example
|
|
4791
|
+
* For example:
|
|
4792
|
+
* ```
|
|
4793
|
+
* getVenue({
|
|
4794
|
+
* venue: 'some-venue',
|
|
4795
|
+
* things: { vortexes: [ 'material' ]
|
|
4796
|
+
* }})
|
|
4797
|
+
* ```
|
|
4798
|
+
*/
|
|
4799
|
+
things?: any;
|
|
4800
|
+
useDraftData?: boolean;
|
|
4801
|
+
platformString?: string;
|
|
4802
|
+
secure?: boolean;
|
|
4803
|
+
preloadMapGeometry?: boolean;
|
|
4804
|
+
};
|
|
4805
|
+
export type TGetVenueBundleOptions = TGetVenueOptions & {
|
|
4806
|
+
baseUri?: string;
|
|
4807
|
+
version?: string;
|
|
4808
|
+
/**
|
|
4809
|
+
* Parse bundle and convert images to blobs. Disabled in React Native
|
|
4810
|
+
* @private
|
|
4811
|
+
*/
|
|
4812
|
+
shouldPopulateBundledImagesAsBlobs?: boolean;
|
|
4813
|
+
};
|
|
4814
|
+
/** @internal */
|
|
4815
|
+
export type TGetVenueMVFOptions = TGetVenueBundleOptions & {
|
|
4816
|
+
onMVFParsed?: (mvf: ParsedMVF) => void;
|
|
4817
|
+
/**
|
|
4818
|
+
* Override initial MVF data
|
|
4819
|
+
*/
|
|
4820
|
+
override?: Partial<Pick<ParsedMVF, 'styles.json'>>;
|
|
4821
|
+
};
|
|
4822
|
+
/**
|
|
4823
|
+
* Options for configuring search functionality.
|
|
4824
|
+
*/
|
|
4825
|
+
export type TSearchOptions = {
|
|
4826
|
+
/**
|
|
4827
|
+
* Indicates whether search functionality is enabled.
|
|
4828
|
+
*/
|
|
4829
|
+
enabled: boolean;
|
|
4830
|
+
};
|
|
4831
|
+
export type TGetMapDataSharedOptions = {
|
|
4832
|
+
/**
|
|
4833
|
+
* Mappedin map ID.
|
|
4834
|
+
*/
|
|
4835
|
+
mapId: string;
|
|
4836
|
+
/**
|
|
4837
|
+
* Optionally provide a custom base URL for the Mappedin API request.
|
|
4838
|
+
* Use the {@link Environment | `environment`} setting to switch environments
|
|
4839
|
+
*/
|
|
4840
|
+
baseUri?: string;
|
|
4841
|
+
/**
|
|
4842
|
+
* Optionally provide a custom URI for authentication when obtaining an access token.
|
|
4843
|
+
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
4844
|
+
*/
|
|
4845
|
+
baseAuthUri?: string;
|
|
4846
|
+
/**
|
|
4847
|
+
* Callback for when the Mappedin map data has been fetched and parsed as Mappedin Venue Format (MVF) data.
|
|
4848
|
+
* @param mvf Parsed MVF data.
|
|
4849
|
+
*/
|
|
4850
|
+
onMVFParsed?: (mvf: ParsedMVF) => void;
|
|
4851
|
+
/**
|
|
4852
|
+
* Load different view of mvf data based on configId
|
|
4853
|
+
*/
|
|
4854
|
+
viewId?: string;
|
|
4855
|
+
/**
|
|
4856
|
+
* set the target SDK environment
|
|
4857
|
+
* @default 'us'
|
|
4858
|
+
* @example
|
|
4859
|
+
* const mapData = getMapData({
|
|
4860
|
+
* key: '',
|
|
4861
|
+
* secret: '',
|
|
4862
|
+
* environment: 'eu'
|
|
4863
|
+
* })
|
|
4864
|
+
*/
|
|
4865
|
+
environment?: ServiceEnvironment;
|
|
4866
|
+
/**
|
|
4867
|
+
* The language of the map data.
|
|
4868
|
+
* The ISO 639-1 language code to change to (e.g., 'en' for English, 'fr' for French). Check ({@link EnterpriseVenue.languages}) for available languages
|
|
4869
|
+
*/
|
|
4870
|
+
language?: string;
|
|
4871
|
+
/**
|
|
4872
|
+
* Analytics configuration.
|
|
4873
|
+
*/
|
|
4874
|
+
analytics?: {
|
|
4875
|
+
/**
|
|
4876
|
+
* Whether to log analytics events.
|
|
4877
|
+
* @default false
|
|
4878
|
+
*/
|
|
4879
|
+
logEvents?: boolean;
|
|
4880
|
+
/**
|
|
4881
|
+
* Whether to send analytics events to the server.
|
|
4882
|
+
* @default false
|
|
4883
|
+
*/
|
|
4884
|
+
sendEvents?: boolean;
|
|
4885
|
+
/**
|
|
4886
|
+
* Custom base URI for analytics requests. If not provided, the default analytics endpoint will be used.
|
|
4887
|
+
* Use the {@link Environment | `environment`} setting to switch environments.
|
|
4888
|
+
*/
|
|
4889
|
+
baseUri?: string;
|
|
4890
|
+
/**
|
|
4891
|
+
* Context for analytics events.
|
|
4892
|
+
* @default 'websdk'
|
|
4893
|
+
* @internal
|
|
4894
|
+
*/
|
|
4895
|
+
context?: string;
|
|
4896
|
+
};
|
|
4897
|
+
search?: TSearchOptions;
|
|
4898
|
+
/**
|
|
4899
|
+
* @hidden
|
|
4900
|
+
* @internal
|
|
4901
|
+
*/
|
|
4902
|
+
layoutId?: 'draft';
|
|
4903
|
+
/**
|
|
4904
|
+
* @hidden
|
|
4905
|
+
* @internal
|
|
4906
|
+
*/
|
|
4907
|
+
mvfVersion?: '2.0.0' | '3.0.0';
|
|
4908
|
+
};
|
|
4909
|
+
/**
|
|
4910
|
+
* @interface
|
|
4911
|
+
*/
|
|
4912
|
+
export type TGetMapDataWithCredentialsOptions = {
|
|
4913
|
+
/**
|
|
4914
|
+
* Mappedin auth key.
|
|
4915
|
+
*/
|
|
4916
|
+
key: string;
|
|
4917
|
+
/**
|
|
4918
|
+
* Mappedin auth secret.
|
|
4919
|
+
*/
|
|
4920
|
+
secret: string;
|
|
4921
|
+
} & TGetMapDataSharedOptions;
|
|
4922
|
+
/**
|
|
4923
|
+
* @interface
|
|
4924
|
+
*/
|
|
4925
|
+
export type TGetMapDataWithAccessTokenOptions = {
|
|
4926
|
+
/**
|
|
4927
|
+
* Mappedin access token.
|
|
4928
|
+
*/
|
|
4929
|
+
accessToken: string;
|
|
4930
|
+
} & TGetMapDataSharedOptions;
|
|
4931
|
+
export type TGetMapDataOptions = TGetMapDataWithCredentialsOptions | TGetMapDataWithAccessTokenOptions;
|
|
4932
|
+
export type TProcessedMVFOptions = TGetMapDataOptions & {
|
|
4933
|
+
clientId: string;
|
|
4934
|
+
clientSecret: string;
|
|
4935
|
+
venue: string;
|
|
4936
|
+
accessToken: string;
|
|
4937
|
+
};
|
|
4938
|
+
export type TAllGetVenueOptions = TGetVenueOptions | TGetVenueMVFOptions | (TProcessedMVFOptions & {
|
|
4939
|
+
perspective?: string;
|
|
4940
|
+
});
|
|
4941
|
+
export type TGetVenueOptionsInternal<T extends TAllGetVenueOptions> = Omit<T & {
|
|
4942
|
+
baseUrl?: string;
|
|
4943
|
+
supplementaryUrl?: string;
|
|
4944
|
+
noAuth?: boolean;
|
|
4945
|
+
includeHidden?: boolean;
|
|
4946
|
+
apiGateway?: string;
|
|
4947
|
+
authorization?: string;
|
|
4948
|
+
headers?: any;
|
|
4949
|
+
}, 'things'> & {
|
|
4950
|
+
things?: any;
|
|
4951
|
+
};
|
|
4952
|
+
export const defaultOptions: TGetVenueOptionsInternal<TGetVenueOptions>;
|
|
4953
|
+
/**
|
|
4954
|
+
* @internal
|
|
4955
|
+
*/
|
|
4956
|
+
export function parseOptions<T extends TAllGetVenueOptions>(options: T): TGetVenueOptionsInternal<T>;
|
|
4957
|
+
/**
|
|
4958
|
+
* Prepares the request and URL fields to pass into generateAPIRequest
|
|
4959
|
+
* @param options options from getVenue- baseUrl and supplementaryUrl are used
|
|
4960
|
+
* @param url string describing the url corresponding to the client's request
|
|
4961
|
+
* @param supplementary whether to use the supplementaryUrl when sending the request
|
|
4962
|
+
*/
|
|
4963
|
+
export function constructParamsForRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): {
|
|
4964
|
+
req: {
|
|
4965
|
+
method: string;
|
|
4966
|
+
headers: any;
|
|
4967
|
+
};
|
|
4968
|
+
url: string;
|
|
4969
|
+
};
|
|
4970
|
+
export function generateAPIRequest(options: TGetVenueOptionsInternal<TGetVenueOptions>, url: string, supplementary?: boolean): Promise<any>;
|
|
4971
|
+
export const getPerspectivesFromResponse: (res: unknown) => Record<string, {
|
|
4972
|
+
url: string;
|
|
4973
|
+
locale_packs: LocalePackUrls;
|
|
4974
|
+
}> | null;
|
|
4975
|
+
/**
|
|
4976
|
+
* Get the bundle URL and updated_at time.
|
|
4977
|
+
* @internal
|
|
4978
|
+
*/
|
|
4979
|
+
export function getVenueMVFURL(userOptions: TGetVenueBundleOptions, path?: string): Promise<{
|
|
4980
|
+
url: any;
|
|
4981
|
+
localePacks: any;
|
|
4982
|
+
updated_at: any;
|
|
4983
|
+
}>;
|
|
4984
|
+
export function getLanguagePackUnitArray(url: string, { signal }: {
|
|
4985
|
+
signal: AbortSignal;
|
|
4986
|
+
}): Promise<Uint8Array>;
|
|
4987
|
+
export function parseLanguagePack(data: Uint8Array): Promise<ParsedMVFLocalePack>;
|
|
4988
|
+
export function downloadLanguagePack(url: string, { signal }: {
|
|
4989
|
+
signal: AbortSignal;
|
|
4990
|
+
}): Promise<ParsedMVFLocalePack | undefined>;
|
|
4991
|
+
export function downloadVenueBundleMVFAPIGateway(options: TGetVenueBundleOptions): Promise<{
|
|
4992
|
+
compressed: Uint8Array;
|
|
4993
|
+
localePacks: LocalePackUrls;
|
|
4994
|
+
}>;
|
|
4995
|
+
export function downloadVenueBundleMVF(options: TGetVenueBundleOptions): Promise<Uint8Array>;
|
|
4996
|
+
export function parseMVFv1(raw: RawMVFv1): ParsedMVFv1;
|
|
4997
|
+
export function validateStaticMVFv1Files(data: unknown): boolean;
|
|
4998
|
+
export function unzipMVFv1(data: any): Promise<RawMVFv1>;
|
|
4999
|
+
export function downloadMVF(userOptions: TGetMapDataOptions, accessToken: string): Promise<Uint8Array>;
|
|
5000
|
+
export function getMakerBundleURL(userOptions: TGetMapDataOptions, token: string): Promise<{
|
|
5001
|
+
url: string;
|
|
5002
|
+
updated_at: string;
|
|
5003
|
+
}>;
|
|
5004
|
+
/**
|
|
5005
|
+
* @internal
|
|
5006
|
+
*/
|
|
5007
|
+
export function parseMVF(raw: RawMVF & {
|
|
5008
|
+
options?: {
|
|
5009
|
+
outdoorViewToken?: string;
|
|
5010
|
+
};
|
|
5011
|
+
}): ParsedMVF;
|
|
5012
|
+
/**
|
|
5013
|
+
* Figure out if the MVF data at least has the static files we expect.
|
|
5014
|
+
*/
|
|
5015
|
+
export function validateStaticMVFFiles(data: unknown): boolean;
|
|
5016
|
+
/**
|
|
5017
|
+
* @internal
|
|
5018
|
+
*/
|
|
5019
|
+
export function unzipMVF(data: Uint8Array): Promise<RawMVF>;
|
|
5020
|
+
export type LocalePackUrls = {
|
|
5021
|
+
[key: string]: string;
|
|
5022
|
+
};
|
|
5023
|
+
/**
|
|
5024
|
+
* Represents the environment state configuration.
|
|
5025
|
+
* @example
|
|
5026
|
+
* const mapData = getMapData({
|
|
5027
|
+
* key: '',
|
|
5028
|
+
* secret: '',
|
|
5029
|
+
* environment: 'eu'
|
|
5030
|
+
* })
|
|
5031
|
+
*/
|
|
5032
|
+
export type Environment = {
|
|
5033
|
+
/**
|
|
5034
|
+
* The base URI for the API.
|
|
5035
|
+
*/
|
|
5036
|
+
baseUri: string;
|
|
5037
|
+
/**
|
|
5038
|
+
* The base URI for authentication.
|
|
5039
|
+
*/
|
|
5040
|
+
baseAuthUri: string;
|
|
5041
|
+
/**
|
|
5042
|
+
* The base URI for analytics.
|
|
5043
|
+
*/
|
|
5044
|
+
analyticsBaseUri: string;
|
|
5045
|
+
/**
|
|
5046
|
+
* The URI for the tile server.
|
|
5047
|
+
*/
|
|
5048
|
+
tileServerUri: string;
|
|
5049
|
+
};
|
|
5050
|
+
type InternalServiceEnvironment = 'us' | 'eu' | 'us-staging-enterprise' | 'us-staging-self-serve';
|
|
5051
|
+
export type ServiceEnvironment = 'us' | 'eu';
|
|
5052
|
+
export function createEnvControl(): {
|
|
5053
|
+
/**
|
|
5054
|
+
* @internal
|
|
5055
|
+
*/
|
|
5056
|
+
updateByUserOption(userOption: TGetMapDataOptions): void;
|
|
5057
|
+
/**
|
|
5058
|
+
* @internal
|
|
5059
|
+
*/
|
|
5060
|
+
updateTileServerBaseUrl(url: string): void;
|
|
5061
|
+
/**
|
|
5062
|
+
* @internal
|
|
5063
|
+
*/
|
|
5064
|
+
updateEnvironment(env: InternalServiceEnvironment): void;
|
|
5065
|
+
getBaseUri(enterprise: boolean): string;
|
|
5066
|
+
getBaseAuthUri(enterprise?: boolean): string;
|
|
5067
|
+
getAnalyticsBaseUri(): string;
|
|
5068
|
+
getTileServerUri(): string;
|
|
5069
|
+
reset(): void;
|
|
5070
|
+
/**
|
|
5071
|
+
* @internal
|
|
5072
|
+
*/
|
|
5073
|
+
__getState: () => Environment;
|
|
5074
|
+
};
|
|
5075
|
+
export type EnvControl = ReturnType<typeof createEnvControl>;
|
|
5076
|
+
/**
|
|
5077
|
+
* Return IDs for all individual maps that are part of a multi-building MVF, not including the
|
|
5078
|
+
* outdoor map. If a map is not a multi-building map, an empty array is returned.
|
|
5079
|
+
*/
|
|
5080
|
+
export const getBuildingIds: (mvf: ParsedMVF) => string[];
|
|
5081
|
+
export function unzipAndParseMVFv2(data: Uint8Array, inputVersion?: '2.0.0' | '3.0.0'): Promise<ParsedMVF>;
|
|
5082
|
+
}
|
|
5083
|
+
|
|
5084
|
+
declare module '@mappedin/react-sdk/packages/mvf-utils/geometry' {
|
|
5085
|
+
import type { EntranceFeature, ObstructionWallFeature } from '@mappedin/react-sdk/packages/mvf-utils/mvf-types';
|
|
5086
|
+
export function findAndSplitObstructionByAllEntrances(wall: ObstructionWallFeature, entrances: EntranceFeature[]): {
|
|
5087
|
+
entrances: EntranceFeature[];
|
|
5088
|
+
obstructions: ObstructionWallFeature[];
|
|
5089
|
+
};
|
|
5090
|
+
}
|
|
5091
|
+
|
|
5092
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node' {
|
|
5093
|
+
import type { NodeCollection } from '@mappedin/mvf';
|
|
5094
|
+
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
5095
|
+
import type { EnterpriseLocation, MapDataInternal, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
5096
|
+
import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
|
|
5097
|
+
import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
5098
|
+
import type { IGeoJSONData } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
|
|
5099
|
+
import type { IAnchorable, IFocusable } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
5100
|
+
/**
|
|
5101
|
+
* A class representing {@link Path} node data within the map.
|
|
5102
|
+
*
|
|
5103
|
+
* Nodes are used to define points in the map's pathfinding graph.
|
|
5104
|
+
*
|
|
5105
|
+
*/
|
|
5106
|
+
class Node extends BaseMetaData implements IGeoJSONData, IFocusable, IAnchorable {
|
|
5107
|
+
#private;
|
|
5108
|
+
/**
|
|
5109
|
+
* @internal
|
|
5110
|
+
*/
|
|
5111
|
+
static readonly __type = "node";
|
|
5112
|
+
/**
|
|
5113
|
+
* @internal
|
|
5114
|
+
*/
|
|
5115
|
+
readonly __type = "node";
|
|
5116
|
+
/**
|
|
5117
|
+
* Checks if the provided instance is of type Node.
|
|
5118
|
+
*
|
|
4015
5119
|
* @param instance The instance to check.
|
|
4016
5120
|
* @returns {boolean} True if the instance is a Node, false otherwise.
|
|
4017
5121
|
*/
|
|
@@ -6176,6 +7280,27 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path' {
|
|
|
6176
7280
|
}
|
|
6177
7281
|
}
|
|
6178
7282
|
|
|
7283
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/utils/types' {
|
|
7284
|
+
/**
|
|
7285
|
+
* Utility type that extracts nested values matching a specific type
|
|
7286
|
+
* @example
|
|
7287
|
+
* type A = ExtractDeep<{ a: { b: string; c: number; }; d: string; e: number; }, number>;
|
|
7288
|
+
* // { a: { c: number; } e: number; }
|
|
7289
|
+
*/
|
|
7290
|
+
export type ExtractDeep<T, U> = {
|
|
7291
|
+
[K in keyof T as T[K] extends U ? K : T[K] extends object | undefined ? ExtractDeep<NonNullable<T[K]>, U> extends never ? never : K : never]: T[K] extends object | undefined ? undefined extends T[K] ? ExtractDeep<NonNullable<T[K]>, U> | undefined : ExtractDeep<NonNullable<T[K]>, U> : T[K] extends U ? T[K] : never;
|
|
7292
|
+
};
|
|
7293
|
+
/**
|
|
7294
|
+
* Makes all properties in an object (including nested ones) optional
|
|
7295
|
+
* @example
|
|
7296
|
+
* type A = DeepPartial<{ a: { b: string; c: number; }; d: string; }>;
|
|
7297
|
+
* // { a?: { b?: string; c?: number; }; d?: string; }
|
|
7298
|
+
*/
|
|
7299
|
+
export type DeepPartial<T> = T extends object ? {
|
|
7300
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
7301
|
+
} : T;
|
|
7302
|
+
}
|
|
7303
|
+
|
|
6179
7304
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/types' {
|
|
6180
7305
|
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
6181
7306
|
export type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
@@ -6189,6 +7314,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6189
7314
|
import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src/utils/collision-ranking-tier';
|
|
6190
7315
|
import { z } from 'zod';
|
|
6191
7316
|
import { type PackedBBoxes } from '@mappedin/react-sdk/geojson/src/systems/collisions/system';
|
|
7317
|
+
import type { GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
6192
7318
|
/**
|
|
6193
7319
|
* State reprsenting a Marker
|
|
6194
7320
|
*/
|
|
@@ -6221,32 +7347,12 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6221
7347
|
* Pointer to the HTML element of the marker in the DOM tree
|
|
6222
7348
|
*/
|
|
6223
7349
|
element: HTMLElement;
|
|
6224
|
-
/**
|
|
6225
|
-
* The initial rank of the marker, which can be used to reset the rank of the marker to its initial value.
|
|
6226
|
-
*/
|
|
6227
|
-
initialRank: CollisionRankingTier | number;
|
|
6228
|
-
options
|
|
6229
|
-
|
|
6230
|
-
* The rank of the marker, which determines its visibility in relation to other colliders.
|
|
6231
|
-
*/
|
|
6232
|
-
rank?: CollisionRankingTier | number;
|
|
6233
|
-
/**
|
|
6234
|
-
* Whether the Marker should be clickable via the SDK's internal click event system.
|
|
6235
|
-
*
|
|
6236
|
-
* @example
|
|
6237
|
-
* ```javascript
|
|
6238
|
-
* renderer.on('click', ({ markers }) => {});
|
|
6239
|
-
* ```
|
|
6240
|
-
*/
|
|
6241
|
-
interactive?: boolean | 'pointer-events-auto';
|
|
6242
|
-
/**
|
|
6243
|
-
* The z-index of the marker. Can be used used in conjunction with rank: 'always-visible' to make certain markers appear over others
|
|
6244
|
-
*/
|
|
6245
|
-
zIndex?: number;
|
|
6246
|
-
/**
|
|
6247
|
-
* The vertical position of the marker relative to the floor.
|
|
6248
|
-
*/
|
|
6249
|
-
verticalOffset?: number;
|
|
7350
|
+
/**
|
|
7351
|
+
* The initial rank of the marker, which can be used to reset the rank of the marker to its initial value.
|
|
7352
|
+
*/
|
|
7353
|
+
initialRank: CollisionRankingTier | number;
|
|
7354
|
+
options: Omit<AddMarkerOptions, 'id'> & {
|
|
7355
|
+
lowPriorityPin: LowPriorityPinConfig;
|
|
6250
7356
|
};
|
|
6251
7357
|
/**
|
|
6252
7358
|
* Anchor point for the marker. This will determine the position of the marker relative to the position. A list will place the marker in the first empty placement.
|
|
@@ -6257,6 +7363,29 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6257
7363
|
*/
|
|
6258
7364
|
dynamicResize: boolean;
|
|
6259
7365
|
};
|
|
7366
|
+
export type MarkerStateUpdate = Omit<MarkerState, 'type' | 'parent' | 'id' | 'options'> & {
|
|
7367
|
+
options?: Partial<Omit<AddMarkerOptions, 'id' | 'lowPriorityPin'>>;
|
|
7368
|
+
};
|
|
7369
|
+
/**
|
|
7370
|
+
* Configuration for the low priority pin fallback strategy
|
|
7371
|
+
*/
|
|
7372
|
+
export type LowPriorityPinConfig = {
|
|
7373
|
+
/**
|
|
7374
|
+
* Whether to enable low priority pin strategy when all anchor positions have collisions.
|
|
7375
|
+
* @default true
|
|
7376
|
+
*/
|
|
7377
|
+
enabled: boolean;
|
|
7378
|
+
/**
|
|
7379
|
+
* Size of the low priority pin in pixels.
|
|
7380
|
+
* @default 2
|
|
7381
|
+
*/
|
|
7382
|
+
size: number;
|
|
7383
|
+
/**
|
|
7384
|
+
* Color of the low priority pin.
|
|
7385
|
+
* @default '#666'
|
|
7386
|
+
*/
|
|
7387
|
+
color: string;
|
|
7388
|
+
};
|
|
6260
7389
|
export const addMarkerOptionsSchema: z.ZodObject<{
|
|
6261
7390
|
rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
|
|
6262
7391
|
interactive: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"pointer-events-auto">]>>;
|
|
@@ -6264,6 +7393,19 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6264
7393
|
anchor: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["top", "bottom", "left", "right", "center", "top-left", "top-right", "bottom-left", "bottom-right"]>, z.ZodArray<z.ZodEnum<["top", "bottom", "left", "right", "center", "top-left", "top-right", "bottom-left", "bottom-right"]>, "many">]>>;
|
|
6265
7394
|
dynamicResize: z.ZodOptional<z.ZodBoolean>;
|
|
6266
7395
|
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
7396
|
+
lowPriorityPin: z.ZodOptional<z.ZodObject<{
|
|
7397
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
7398
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
7399
|
+
color: z.ZodOptional<z.ZodString>;
|
|
7400
|
+
}, "strip", z.ZodTypeAny, {
|
|
7401
|
+
size?: number | undefined;
|
|
7402
|
+
color?: string | undefined;
|
|
7403
|
+
enabled?: boolean | undefined;
|
|
7404
|
+
}, {
|
|
7405
|
+
size?: number | undefined;
|
|
7406
|
+
color?: string | undefined;
|
|
7407
|
+
enabled?: boolean | undefined;
|
|
7408
|
+
}>>;
|
|
6267
7409
|
}, "strip", z.ZodTypeAny, {
|
|
6268
7410
|
anchor?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
|
|
6269
7411
|
id?: string | undefined;
|
|
@@ -6271,6 +7413,11 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6271
7413
|
dynamicResize?: boolean | undefined;
|
|
6272
7414
|
zIndex?: number | undefined;
|
|
6273
7415
|
rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
|
|
7416
|
+
lowPriorityPin?: {
|
|
7417
|
+
size?: number | undefined;
|
|
7418
|
+
color?: string | undefined;
|
|
7419
|
+
enabled?: boolean | undefined;
|
|
7420
|
+
} | undefined;
|
|
6274
7421
|
}, {
|
|
6275
7422
|
anchor?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | ("center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[] | undefined;
|
|
6276
7423
|
id?: string | undefined;
|
|
@@ -6278,9 +7425,15 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6278
7425
|
dynamicResize?: boolean | undefined;
|
|
6279
7426
|
zIndex?: number | undefined;
|
|
6280
7427
|
rank?: number | "low" | "medium" | "high" | "always-visible" | undefined;
|
|
7428
|
+
lowPriorityPin?: {
|
|
7429
|
+
size?: number | undefined;
|
|
7430
|
+
color?: string | undefined;
|
|
7431
|
+
enabled?: boolean | undefined;
|
|
7432
|
+
} | undefined;
|
|
6281
7433
|
}>;
|
|
6282
7434
|
export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
|
|
6283
7435
|
export type MarkerAnchor = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
7436
|
+
type InternalMarkerAnchor = MarkerAnchor | 'low-priority-pin';
|
|
6284
7437
|
/**
|
|
6285
7438
|
* Options for creating a new Marker
|
|
6286
7439
|
*/
|
|
@@ -6323,6 +7476,16 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6323
7476
|
* The vertical position of the marker relative to the floor.
|
|
6324
7477
|
*/
|
|
6325
7478
|
verticalOffset?: number;
|
|
7479
|
+
/**
|
|
7480
|
+
* The entity to attach the marker to.
|
|
7481
|
+
*/
|
|
7482
|
+
attachTo?: EntityId<GeometryState> | string | number | null;
|
|
7483
|
+
/**
|
|
7484
|
+
* Configuration for the low priority pin fallback strategy.
|
|
7485
|
+
* When enabled, shows a smaller pin version of the marker when all anchor positions have collisions.
|
|
7486
|
+
* @default { enabled: true, size: 2, color: '#666' }
|
|
7487
|
+
*/
|
|
7488
|
+
lowPriorityPin?: Partial<LowPriorityPinConfig>;
|
|
6326
7489
|
};
|
|
6327
7490
|
export class MarkerComponent {
|
|
6328
7491
|
id: string | number;
|
|
@@ -6330,9 +7493,11 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6330
7493
|
static testId: number;
|
|
6331
7494
|
rank: number;
|
|
6332
7495
|
initialRank: number;
|
|
6333
|
-
activeAnchor:
|
|
7496
|
+
activeAnchor: InternalMarkerAnchor;
|
|
6334
7497
|
pointerEvents: 'auto' | 'none';
|
|
6335
|
-
options: Required<Omit<AddMarkerOptions, 'zIndex'
|
|
7498
|
+
options: Required<Omit<AddMarkerOptions, 'zIndex' | 'attachTo'> & {
|
|
7499
|
+
lowPriorityPin: Required<LowPriorityPinConfig>;
|
|
7500
|
+
}> & {
|
|
6336
7501
|
zIndex?: number;
|
|
6337
7502
|
};
|
|
6338
7503
|
projection: Vector2;
|
|
@@ -6351,8 +7516,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6351
7516
|
w: number;
|
|
6352
7517
|
h: number;
|
|
6353
7518
|
};
|
|
6354
|
-
|
|
6355
|
-
|
|
7519
|
+
markerContainer: Entity2DHTMLDivElement;
|
|
7520
|
+
containerEl: HTMLElement;
|
|
7521
|
+
contentEl: HTMLElement | null;
|
|
6356
7522
|
contentHtml: string;
|
|
6357
7523
|
style: {
|
|
6358
7524
|
top: string;
|
|
@@ -6360,7 +7526,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6360
7526
|
};
|
|
6361
7527
|
dirty: boolean;
|
|
6362
7528
|
/** Flag used in 2d-projection system to determine if the parent has changed */
|
|
6363
|
-
|
|
7529
|
+
attachedDirty: boolean;
|
|
6364
7530
|
collisionDirty: boolean;
|
|
6365
7531
|
visibilityNeedsUpdate: 'show' | 'hide' | false;
|
|
6366
7532
|
constructor(contentHtml: string, options?: AddMarkerOptions);
|
|
@@ -6369,7 +7535,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6369
7535
|
currentStrategyIndex: number;
|
|
6370
7536
|
onStrategySelected: (strategyIndex: number, force?: boolean) => void;
|
|
6371
7537
|
get strategies(): {
|
|
6372
|
-
name:
|
|
7538
|
+
name: InternalMarkerAnchor;
|
|
6373
7539
|
getBoundingBox: () => number[];
|
|
6374
7540
|
}[];
|
|
6375
7541
|
toPackedMessage(isPanning?: boolean): {
|
|
@@ -6381,8 +7547,13 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6381
7547
|
lockedToStrategyIndex: number;
|
|
6382
7548
|
shouldCollideWithScreenEdges: boolean;
|
|
6383
7549
|
};
|
|
7550
|
+
/**
|
|
7551
|
+
* Get the index of the low priority pin strategy
|
|
7552
|
+
*/
|
|
7553
|
+
get lowPriorityPinStrategyIndex(): number;
|
|
6384
7554
|
destroy(): void;
|
|
6385
7555
|
}
|
|
7556
|
+
export {};
|
|
6386
7557
|
}
|
|
6387
7558
|
|
|
6388
7559
|
declare module '@mappedin/react-sdk/geojson/src/components/path' {
|
|
@@ -6990,6 +8161,10 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
6990
8161
|
* The vertical position of the label relative to the floor.
|
|
6991
8162
|
*/
|
|
6992
8163
|
verticalOffset?: number;
|
|
8164
|
+
/**
|
|
8165
|
+
* The entity to attach the label to.
|
|
8166
|
+
*/
|
|
8167
|
+
attachTo?: EntityId<GeometryState> | string | null;
|
|
6993
8168
|
};
|
|
6994
8169
|
type TStyle = {
|
|
6995
8170
|
top?: number;
|
|
@@ -7132,7 +8307,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
7132
8307
|
totalMarkerSize: number;
|
|
7133
8308
|
dirty: boolean;
|
|
7134
8309
|
/** Flag used in 2d-projection system to determine if the parent has changed */
|
|
7135
|
-
|
|
8310
|
+
attachedDirty: boolean;
|
|
7136
8311
|
collisionDirty: boolean;
|
|
7137
8312
|
lastTextAlign: any;
|
|
7138
8313
|
imageHash?: number;
|
|
@@ -7177,9 +8352,11 @@ declare module '@mappedin/react-sdk/geojson/src/entities/group-container' {
|
|
|
7177
8352
|
import type { BatchedText } from '@mappedin/react-sdk/geojson/src/services/text3d/text3d';
|
|
7178
8353
|
import type { EntityTypes } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
7179
8354
|
import type { Feature, MultiPolygon, Polygon } from 'geojson';
|
|
8355
|
+
import type { FocusableComponent } from '@mappedin/react-sdk/geojson/src/components/focusable';
|
|
7180
8356
|
export enum GroupContainerComponents {
|
|
7181
8357
|
Stack = 0,
|
|
7182
|
-
Interaction = 1
|
|
8358
|
+
Interaction = 1,
|
|
8359
|
+
Focusable = 2
|
|
7183
8360
|
}
|
|
7184
8361
|
/**
|
|
7185
8362
|
* State representing a Group Container, which is a container for other Group Containers, Geometry Groups, Labels, Markers and Paths.
|
|
@@ -7220,7 +8397,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/group-container' {
|
|
|
7220
8397
|
/** The effective opacity of the entity after all parent containers have been considered. */
|
|
7221
8398
|
computedOpacity: number;
|
|
7222
8399
|
};
|
|
7223
|
-
components: [StackComponent?, InteractionComponent?];
|
|
8400
|
+
components: [StackComponent?, InteractionComponent?, FocusableComponent?];
|
|
7224
8401
|
constructor(id: string);
|
|
7225
8402
|
addOccluderFeature(feature: Feature<Polygon | MultiPolygon, any>, occluderId: number): void;
|
|
7226
8403
|
addEntity(entityGroupOrContainer: GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | Geometry3DTypes): void;
|
|
@@ -7239,6 +8416,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
|
|
|
7239
8416
|
import { type GeometryState } from '@mappedin/react-sdk/geojson/src/components/mesh';
|
|
7240
8417
|
import type { ModelState } from '@mappedin/react-sdk/geojson/src/components/model';
|
|
7241
8418
|
import { GeometryGroupStyleComponent } from '@mappedin/react-sdk/geojson/src/components/geometry-group-style';
|
|
8419
|
+
import type { MaterialSide } from '@mappedin/react-sdk/geojson/src/components/styles';
|
|
7242
8420
|
export enum GeometryGroupComponents {
|
|
7243
8421
|
GeometryGroupStyle = 0
|
|
7244
8422
|
}
|
|
@@ -7310,6 +8488,10 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
|
|
|
7310
8488
|
* height of the geometry group
|
|
7311
8489
|
*/
|
|
7312
8490
|
height?: number;
|
|
8491
|
+
/**
|
|
8492
|
+
* Material side of the geometry group
|
|
8493
|
+
*/
|
|
8494
|
+
side?: MaterialSide;
|
|
7313
8495
|
};
|
|
7314
8496
|
export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
|
|
7315
8497
|
export class GeometryGroupObject3D extends Object3D {
|
|
@@ -7322,7 +8504,6 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
|
|
|
7322
8504
|
modelURL?: string;
|
|
7323
8505
|
opacity: number;
|
|
7324
8506
|
dirty: boolean;
|
|
7325
|
-
outlineDirty: boolean;
|
|
7326
8507
|
shadingDirty: boolean;
|
|
7327
8508
|
};
|
|
7328
8509
|
setVisible(visible: boolean): void;
|
|
@@ -7417,6 +8598,7 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
7417
8598
|
showImage?: boolean;
|
|
7418
8599
|
flipImageToFaceCamera?: boolean;
|
|
7419
8600
|
side?: MaterialSide;
|
|
8601
|
+
renderOrder?: number;
|
|
7420
8602
|
};
|
|
7421
8603
|
export type Shading = {
|
|
7422
8604
|
start?: number;
|
|
@@ -7436,6 +8618,7 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
7436
8618
|
shading?: Shading;
|
|
7437
8619
|
outline?: boolean;
|
|
7438
8620
|
side?: MaterialSide;
|
|
8621
|
+
renderOrder?: number;
|
|
7439
8622
|
};
|
|
7440
8623
|
export type Layer = {
|
|
7441
8624
|
id: string;
|
|
@@ -7729,7 +8912,7 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
7729
8912
|
}
|
|
7730
8913
|
|
|
7731
8914
|
declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
7732
|
-
import type { Texture, BufferGeometry,
|
|
8915
|
+
import type { Texture, BufferGeometry, Mesh } from 'three';
|
|
7733
8916
|
import { BatchedMesh, Color, Vector3 } from 'three';
|
|
7734
8917
|
import type { BatchedStandardMaterial } from '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/batched-material';
|
|
7735
8918
|
import type { EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
|
|
@@ -7851,7 +9034,6 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
7851
9034
|
#private;
|
|
7852
9035
|
mesh?: EntityBatchedMesh;
|
|
7853
9036
|
focusMesh?: Mesh;
|
|
7854
|
-
outline?: LineSegments;
|
|
7855
9037
|
imageMesh?: Mesh;
|
|
7856
9038
|
/**
|
|
7857
9039
|
* holds a pointer to space label text if the polygon has label active.
|
|
@@ -8273,7 +9455,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
8273
9455
|
import { Renderer } from '@mappedin/react-sdk/geojson/src/services/renderer';
|
|
8274
9456
|
import { CollisionSystem } from '@mappedin/react-sdk/geojson/src/systems/collisions/system';
|
|
8275
9457
|
import { InteractionSystem } from '@mappedin/react-sdk/geojson/src/systems/interactions';
|
|
8276
|
-
import type { AddMarkerOptions, MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
9458
|
+
import type { AddMarkerOptions, MarkerState, MarkerStateUpdate } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
8277
9459
|
import type { GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
8278
9460
|
import { ExporterSystem } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
8279
9461
|
import type { AddLabelOptions, LabelState } from '@mappedin/react-sdk/geojson/src/components/label';
|
|
@@ -8397,6 +9579,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
8397
9579
|
visible?: boolean;
|
|
8398
9580
|
altitude?: number;
|
|
8399
9581
|
interactive?: boolean;
|
|
9582
|
+
focusable?: boolean;
|
|
8400
9583
|
}, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GroupContainerState>;
|
|
8401
9584
|
addStackContainer(id: string, style?: {
|
|
8402
9585
|
visible?: true;
|
|
@@ -8509,7 +9692,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
8509
9692
|
*/
|
|
8510
9693
|
setState(object: Partial<Omit<MapViewState, 'type'>>): void;
|
|
8511
9694
|
setState<T extends EntityId<LabelState>>(object: T | T['id'], state: Partial<LabelState>): void;
|
|
8512
|
-
setState<T extends EntityId<MarkerState>>(object: T | T['id'], state: Partial<
|
|
9695
|
+
setState<T extends EntityId<MarkerState>>(object: T | T['id'], state: Partial<MarkerStateUpdate>): void;
|
|
8513
9696
|
setState<T extends EntityId<GeometryGroupState>>(object: T | T['id'], state: Partial<GeometryGroupState>): void;
|
|
8514
9697
|
setState<T extends EntityId<GroupContainerState>>(object: T | T['id'], state: Partial<GroupContainerState>): void;
|
|
8515
9698
|
setState<T extends EntityId<GeometryState>>(object: T | T['id'], state: Partial<GeometryState>): void;
|
|
@@ -9324,8 +10507,8 @@ declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
|
9324
10507
|
export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
|
|
9325
10508
|
export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
|
|
9326
10509
|
export function updateAltitude(entity: EntityTypes, update?: number): boolean;
|
|
9327
|
-
export function updateOutline(entity: All3DTypes, update?: boolean): boolean;
|
|
9328
|
-
export function updateFocusable(entity: Geometry3D, update?: boolean): boolean;
|
|
10510
|
+
export function updateOutline(entity: All3DTypes, state: RendererState, update?: boolean): boolean;
|
|
10511
|
+
export function updateFocusable(entity: Geometry3D | GroupContainerObject3D, update?: boolean): boolean;
|
|
9329
10512
|
export function updateIndividualGeometryRenderOrder(entity: Geometry3D, update?: number): boolean;
|
|
9330
10513
|
export function handlePathUpdate(geometry: Geometry3DTypes, state: RendererState, update: PathUpdateState): void;
|
|
9331
10514
|
export function pickPathOptions(update: PathUpdateState): Partial<PathUpdateState>;
|
|
@@ -9454,19 +10637,85 @@ declare module '@mappedin/react-sdk/geojson/src/utils/constants' {
|
|
|
9454
10637
|
|
|
9455
10638
|
declare module '@mappedin/react-sdk/geojson/src/utils/debug' {
|
|
9456
10639
|
import type Core from '@mappedin/react-sdk/geojson/src/renderer';
|
|
10640
|
+
/**
|
|
10641
|
+
* Default debug state configuration with all debug features disabled by default.
|
|
10642
|
+
*/
|
|
9457
10643
|
const DEFAULT_DEBUG_STATE: {
|
|
9458
|
-
|
|
9459
|
-
|
|
10644
|
+
/** Shows the text area mesh used for polygon label rendering */
|
|
10645
|
+
showPolygonLabelTextAreaMesh: boolean;
|
|
10646
|
+
/** Enables the basic environment map for lighting and reflections */
|
|
10647
|
+
showEnvMap: boolean;
|
|
10648
|
+
/** Shows collision detection boxes for debugging spatial interactions */
|
|
10649
|
+
showCollisionBoxes: boolean;
|
|
9460
10650
|
};
|
|
10651
|
+
/**
|
|
10652
|
+
* Type definition for the debug state configuration.
|
|
10653
|
+
* Represents all available debug options that can be toggled.
|
|
10654
|
+
*/
|
|
9461
10655
|
export type DebugState = typeof DEFAULT_DEBUG_STATE;
|
|
10656
|
+
/**
|
|
10657
|
+
* Debug utility class for toggling various debug visualization features.
|
|
10658
|
+
*
|
|
10659
|
+
* This class provides a centralized way to control debug features like:
|
|
10660
|
+
* - Text area mesh visualization for polygon labels
|
|
10661
|
+
* - Environment map rendering
|
|
10662
|
+
* - Collision box visualization
|
|
10663
|
+
*
|
|
10664
|
+
* @example
|
|
10665
|
+
* ```typescript
|
|
10666
|
+
* const debug = new Debug(core);
|
|
10667
|
+
*
|
|
10668
|
+
* // Enable collision boxes and environment map
|
|
10669
|
+
* debug.update({
|
|
10670
|
+
* showCollisionBoxes: true,
|
|
10671
|
+
* showEnvMap: true
|
|
10672
|
+
* });
|
|
10673
|
+
*
|
|
10674
|
+
* // Disable all debug features
|
|
10675
|
+
* debug.update({
|
|
10676
|
+
* showCollisionBoxes: false,
|
|
10677
|
+
* showEnvMap: false,
|
|
10678
|
+
* showPolygonLabelTextAreaMesh: false
|
|
10679
|
+
* });
|
|
10680
|
+
* ```
|
|
10681
|
+
*/
|
|
9462
10682
|
export class Debug {
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
10683
|
+
/** Current debug state configuration */
|
|
10684
|
+
state: {
|
|
10685
|
+
/** Shows the text area mesh used for polygon label rendering */
|
|
10686
|
+
showPolygonLabelTextAreaMesh: boolean;
|
|
10687
|
+
/** Enables the basic environment map for lighting and reflections */
|
|
10688
|
+
showEnvMap: boolean;
|
|
10689
|
+
/** Shows collision detection boxes for debugging spatial interactions */
|
|
10690
|
+
showCollisionBoxes: boolean;
|
|
10691
|
+
};
|
|
10692
|
+
/** Reference to the core renderer instance */
|
|
10693
|
+
core: Core;
|
|
10694
|
+
/**
|
|
10695
|
+
* Creates a new Debug instance.
|
|
10696
|
+
*
|
|
10697
|
+
* @param core - The core renderer instance to control debug features for
|
|
10698
|
+
*/
|
|
10699
|
+
constructor(core: Core);
|
|
10700
|
+
/**
|
|
10701
|
+
* Updates the debug state with new configuration options.
|
|
10702
|
+
* Only changed values will trigger updates to the corresponding systems.
|
|
10703
|
+
*
|
|
10704
|
+
* @param updateState - Partial debug state with the options to update
|
|
10705
|
+
*
|
|
10706
|
+
* @example
|
|
10707
|
+
* ```typescript
|
|
10708
|
+
* // Enable only collision boxes
|
|
10709
|
+
* debug.update({ showCollisionBoxes: true });
|
|
10710
|
+
*
|
|
10711
|
+
* // Enable multiple features at once
|
|
10712
|
+
* debug.update({
|
|
10713
|
+
* showEnvMap: true,
|
|
10714
|
+
* showPolygonLabelTextAreaMesh: true
|
|
10715
|
+
* });
|
|
10716
|
+
* ```
|
|
10717
|
+
*/
|
|
10718
|
+
update(updateState: Partial<DebugState>): void;
|
|
9470
10719
|
}
|
|
9471
10720
|
export {};
|
|
9472
10721
|
}
|
|
@@ -9586,9 +10835,13 @@ declare module '@mappedin/react-sdk/geojson/src/systems/text3d/system' {
|
|
|
9586
10835
|
showTextAreaMesh(): void;
|
|
9587
10836
|
hideTextAreaMesh(): void;
|
|
9588
10837
|
}
|
|
10838
|
+
export function configureWorker(useWorker: boolean): void;
|
|
9589
10839
|
/**
|
|
9590
10840
|
* Preload fonts and optionally pre-generate the SDF textures for particular glyphs up front.
|
|
9591
10841
|
* This is to avoid ondemand font generation can take long.
|
|
10842
|
+
*
|
|
10843
|
+
* If working in CSP-restricted environment, call `disableText3DWorker` before to avoid errors
|
|
10844
|
+
*
|
|
9592
10845
|
* @param fontUrl - url of the font file served.
|
|
9593
10846
|
* @returns A promise that resolves when the font is loaded
|
|
9594
10847
|
*
|
|
@@ -9598,150 +10851,166 @@ declare module '@mappedin/react-sdk/geojson/src/systems/text3d/system' {
|
|
|
9598
10851
|
export const DEFAULT_VERTICAL_OFFSET = 0.5;
|
|
9599
10852
|
}
|
|
9600
10853
|
|
|
9601
|
-
declare module '@mappedin/react-sdk/geojson/src/systems/
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
import
|
|
9607
|
-
import '
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
custom?: string[];
|
|
9615
|
-
position?: AttributionPosition;
|
|
9616
|
-
feedback?: boolean;
|
|
9617
|
-
};
|
|
9618
|
-
export class HTMLControlsSystem {
|
|
9619
|
-
controlContainerEl: HTMLDivElement;
|
|
9620
|
-
controlPositions: Record<AttributionPosition, HTMLDivElement>;
|
|
9621
|
-
compact: boolean | undefined;
|
|
9622
|
-
attribContainerEl?: HTMLDetailsElement;
|
|
9623
|
-
attribInnerEl?: HTMLDivElement;
|
|
9624
|
-
attribButtonEl?: HTMLElement;
|
|
9625
|
-
feedbackLinkEl?: HTMLAnchorElement;
|
|
9626
|
-
attribHTML: string;
|
|
9627
|
-
customAttributions: string[];
|
|
9628
|
-
constructor(container: HTMLElement);
|
|
9629
|
-
addAttributionControl(options?: AttributionControlOptions): void;
|
|
9630
|
-
toggleAttribution: (e: MouseEvent) => void;
|
|
9631
|
-
destroyAttributionControl(): void;
|
|
9632
|
-
resize(canvasWidth: number): void;
|
|
9633
|
-
/**
|
|
9634
|
-
* This should fire when Maplibre data changes.
|
|
9635
|
-
*/
|
|
9636
|
-
updateData(map: Map): void;
|
|
9637
|
-
destroy(): void;
|
|
9638
|
-
}
|
|
9639
|
-
}
|
|
9640
|
-
|
|
9641
|
-
declare module '@mappedin/react-sdk/geojson/src/components/styles' {
|
|
9642
|
-
export { StyleComponent, DEFAULT_COLOR, type MaterialSide } from '@mappedin/react-sdk/geojson/src/components/styles/style';
|
|
9643
|
-
export { Text3DStyleComponent, type Text3DStyle, DEFAULT_TEXT_STYLE } from '@mappedin/react-sdk/geojson/src/components/styles/text-style';
|
|
9644
|
-
export { ModelStyleComponnet, type ModelStyle } from '@mappedin/react-sdk/geojson/src/components/styles/model-style';
|
|
9645
|
-
export { DEFAULT_ROTATION, DEFAULT_SCALE } from '@mappedin/react-sdk/geojson/src/components/styles/constants';
|
|
9646
|
-
}
|
|
9647
|
-
|
|
9648
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
9649
|
-
import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/core-sdk';
|
|
9650
|
-
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
9651
|
-
import { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
9652
|
-
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
9653
|
-
import type { FloorStack, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
9654
|
-
import { Facade, Coordinate, MapObject, Space, Floor, Door } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
9655
|
-
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
9656
|
-
import { Label, Marker, Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
9657
|
-
import { Text3D as Text3DView, Model, Path, type Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
9658
|
-
import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
9659
|
-
import type { TGetState, TUpdateState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
9660
|
-
import { Camera } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera';
|
|
9661
|
-
import { Exporter } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/exporter';
|
|
9662
|
-
import { Labels } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels';
|
|
9663
|
-
import { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
9664
|
-
import { Markers } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/markers';
|
|
9665
|
-
import { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
|
|
9666
|
-
import { Models } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/models';
|
|
9667
|
-
import { Paths } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths';
|
|
9668
|
-
import { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
9669
|
-
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
9670
|
-
import { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
|
|
9671
|
-
import { Style } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/style';
|
|
9672
|
-
import Outdoor from '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor';
|
|
9673
|
-
import { type BBox } from 'geojson';
|
|
9674
|
-
import { Text3D } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
9675
|
-
import { PathSegment } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
|
|
9676
|
-
export class GeoJsonApi {
|
|
9677
|
-
core: RendererCore;
|
|
9678
|
-
mapObjects: GeojsonApiMapObject[];
|
|
9679
|
-
id: string;
|
|
9680
|
-
mapDataExternal: {
|
|
9681
|
-
[key in string]: MapData;
|
|
9682
|
-
};
|
|
9683
|
-
mapData?: MapData;
|
|
9684
|
-
currentMap: GeojsonApiMapObject;
|
|
9685
|
-
hiddenOutdoorGeometries: [
|
|
9686
|
-
BBox,
|
|
9687
|
-
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
9688
|
-
layers: string[]
|
|
9689
|
-
][];
|
|
9690
|
-
mapView: MapView;
|
|
9691
|
-
Camera: Camera;
|
|
9692
|
-
Labels: Labels;
|
|
9693
|
-
Text3D: Text3D;
|
|
9694
|
-
Markers: Markers;
|
|
9695
|
-
Models: Models;
|
|
9696
|
-
Paths: Paths;
|
|
9697
|
-
Exporter: Exporter;
|
|
9698
|
-
Navigation: Navigation;
|
|
9699
|
-
Outdoor: Outdoor;
|
|
9700
|
-
BlueDot: BlueDot;
|
|
9701
|
-
Shapes: Shapes;
|
|
9702
|
-
Style: Style;
|
|
9703
|
-
Images: Images;
|
|
9704
|
-
get DynamicFocus(): import("..").DynamicFocus;
|
|
9705
|
-
get StackedMaps(): import("..").StackedMaps;
|
|
9706
|
-
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
9707
|
-
updateState<T extends Space | Text3DView | MapObject | Label | Shape | Marker | Model | Door | Facade | Floor | WALLS | DOORS | Path | PathSegment | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
|
|
9708
|
-
update: () => void;
|
|
9709
|
-
getMapDataInternal(): MapDataInternal | undefined;
|
|
9710
|
-
getMapData(): MapData | undefined;
|
|
9711
|
-
addMap(mapData: MapData, options?: TShow3DMapOptions): Promise<MapData>;
|
|
9712
|
-
setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
|
|
9713
|
-
setFloorStack(floorStack: FloorStack | string): void;
|
|
9714
|
-
updateWatermark(options: WatermarkUpdateOptions): void;
|
|
9715
|
-
get currentFloorStack(): FloorStack;
|
|
9716
|
-
get currentFloor(): Floor;
|
|
9717
|
-
getState<T extends Space | Text3DView | MapObject | Label | Marker | Image | Shape | Model | Path | PathSegment | Floor | Facade | string>(target: T): TGetState<T>;
|
|
9718
|
-
setHoverColor(c: string): void;
|
|
9719
|
-
getHoverColor(): string | undefined;
|
|
9720
|
-
/**
|
|
9721
|
-
* Create a coordinate from a screen coordinate
|
|
9722
|
-
* @param x - The x coordinate of the screen
|
|
9723
|
-
* @param y - The y coordinate of the screen
|
|
9724
|
-
* @param floor - The floor to use for the coordinate
|
|
9725
|
-
* @returns The coordinate
|
|
9726
|
-
*/
|
|
9727
|
-
createCoordinateFromScreenCoordinate(x: number, y: number, floor?: Floor): Coordinate | undefined;
|
|
9728
|
-
getScreenCoordinateFromCoordinate(coordinate: Coordinate): {
|
|
10854
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
10855
|
+
import { QuadTree } from '@packages/internal/quad-tree';
|
|
10856
|
+
import '../../styles/collisions.scss';
|
|
10857
|
+
import type { MarkerComponent } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
10858
|
+
import type LabelComponent from '@mappedin/react-sdk/geojson/src/components/label';
|
|
10859
|
+
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
10860
|
+
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
10861
|
+
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor';
|
|
10862
|
+
import type { WatermarkPosition } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
10863
|
+
export type TMessageEvent = MessageEvent<{
|
|
10864
|
+
msgId: string;
|
|
10865
|
+
colliders: TSerializedColliderResponse[];
|
|
10866
|
+
debug: {
|
|
9729
10867
|
x: number;
|
|
9730
10868
|
y: number;
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
10869
|
+
w: number;
|
|
10870
|
+
h: number;
|
|
10871
|
+
}[];
|
|
10872
|
+
}>;
|
|
10873
|
+
export type TMessage = {
|
|
10874
|
+
msgId: string;
|
|
10875
|
+
totalWidth: number;
|
|
10876
|
+
totalHeight: number;
|
|
10877
|
+
watermarkWidth: number;
|
|
10878
|
+
watermarkHeight: number;
|
|
10879
|
+
watermarkPosition: WatermarkPosition;
|
|
10880
|
+
colliders: TSerializedCollider[];
|
|
10881
|
+
devicePixelRatio: number;
|
|
10882
|
+
};
|
|
10883
|
+
type TCollisionSystemEvent = {
|
|
10884
|
+
'visibility-changed': undefined;
|
|
10885
|
+
};
|
|
10886
|
+
export type PackedBBox = [x: number, y: number, w: number, h: number, index: number];
|
|
10887
|
+
export type PackedBBoxes = PackedBBox[];
|
|
10888
|
+
export type PackedCollider = [
|
|
10889
|
+
bboxes: PackedBBoxes,
|
|
10890
|
+
enabled: 0 | 1,
|
|
10891
|
+
alwaysVisible: 0 | 1,
|
|
10892
|
+
x: number,
|
|
10893
|
+
y: number,
|
|
10894
|
+
shouldCollideWithScreenEdges?: 0 | 1,
|
|
10895
|
+
onlyExposeStrategyIndex?: number
|
|
10896
|
+
];
|
|
10897
|
+
export type PackedMessage = [
|
|
10898
|
+
colliders: PackedCollider[],
|
|
10899
|
+
devicePixelRatio: number,
|
|
10900
|
+
totalHeight: number,
|
|
10901
|
+
totalWidth: number,
|
|
10902
|
+
watermarkWidth: number,
|
|
10903
|
+
watermarkHeight: number,
|
|
10904
|
+
watermarkPosition: WatermarkPosition
|
|
10905
|
+
];
|
|
10906
|
+
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
10907
|
+
collidersDirty: boolean;
|
|
10908
|
+
packedMessage: PackedMessage;
|
|
10909
|
+
visibleCollidersQTree: QuadTree<{
|
|
10910
|
+
entityId: string | number;
|
|
10911
|
+
}>;
|
|
10912
|
+
interactiveCollidersQTree: QuadTree<{
|
|
10913
|
+
entityId: string | number;
|
|
10914
|
+
}>;
|
|
10915
|
+
coreState: RendererState;
|
|
10916
|
+
constructor(debugCanvas: HTMLCanvasElement, coreState: RendererState, worker?: Worker);
|
|
10917
|
+
postMessage: () => void;
|
|
10918
|
+
showCollisionBoxes: () => void;
|
|
10919
|
+
hideCollisionBoxes: () => void;
|
|
10920
|
+
currentMsgId: string;
|
|
10921
|
+
working: boolean;
|
|
10922
|
+
componentArray: (MarkerComponent | LabelComponent)[];
|
|
10923
|
+
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean) => void;
|
|
10924
|
+
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
10925
|
+
/**
|
|
10926
|
+
* Resolve collisions
|
|
10927
|
+
*/
|
|
10928
|
+
resolve: (e: MessageEvent<{
|
|
10929
|
+
msgId: string;
|
|
10930
|
+
colliders: TSerializedColliderResponse[];
|
|
10931
|
+
}>) => void;
|
|
10932
|
+
drawDebug: () => void;
|
|
10933
|
+
destroy: () => void;
|
|
10934
|
+
}
|
|
10935
|
+
/**
|
|
10936
|
+
* Sets the URL for the collision system worker script.
|
|
10937
|
+
*
|
|
10938
|
+
* This function allows specifying a custom URL for the collision system's web worker,
|
|
10939
|
+
* which is particularly useful in environments with strict Content Security Policy (CSP)
|
|
10940
|
+
* that don't allow blob: URLs or inline scripts.
|
|
10941
|
+
*
|
|
10942
|
+
* When provided, the collision system will load its worker from the specified URL
|
|
10943
|
+
* instead of creating an inline worker from a blob. This enables compatibility with
|
|
10944
|
+
* environments that have restrictive CSP settings.
|
|
10945
|
+
*
|
|
10946
|
+
* @param url - The absolute URL pointing to the collision worker script.
|
|
10947
|
+
* This should be a URL where the compiled version of the worker.ts file is hosted.
|
|
10948
|
+
*
|
|
10949
|
+
* @example
|
|
10950
|
+
* ```typescript
|
|
10951
|
+
* // Set a custom URL for the collision worker
|
|
10952
|
+
* import { setWorkerUrl } from '@mappedin/core-sdk';
|
|
10953
|
+
*
|
|
10954
|
+
* // Must be called before initializing any maps
|
|
10955
|
+
* setWorkerUrl('https://cdn.example.com/workers/collision-worker.js');
|
|
10956
|
+
* ```
|
|
10957
|
+
*
|
|
10958
|
+
* @remarks
|
|
10959
|
+
* - This function must be called before any map instances are created
|
|
10960
|
+
* - The worker file must be built and hosted separately as part of your deployment process
|
|
10961
|
+
* - Ideal for applications that need to comply with strict CSP requirements
|
|
10962
|
+
*/
|
|
10963
|
+
export function setWorkerUrl(url: string): void;
|
|
10964
|
+
export {};
|
|
10965
|
+
}
|
|
10966
|
+
|
|
10967
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/exporter' {
|
|
10968
|
+
export { ExporterSystem, type GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter/exporter';
|
|
10969
|
+
}
|
|
10970
|
+
|
|
10971
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/html-controls/system' {
|
|
10972
|
+
import type { Map } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
10973
|
+
import '../../styles/html-controls.scss';
|
|
10974
|
+
/**
|
|
10975
|
+
* All possible control anchor positions.
|
|
10976
|
+
*/
|
|
10977
|
+
export const ATTRIBUTION_POSITIONS: readonly ["top-left", "top-right", "bottom-left", "bottom-right"];
|
|
10978
|
+
export type AttributionPosition = (typeof ATTRIBUTION_POSITIONS)[number];
|
|
10979
|
+
export type AttributionControlOptions = {
|
|
10980
|
+
custom?: string[];
|
|
10981
|
+
position?: AttributionPosition;
|
|
10982
|
+
feedback?: boolean;
|
|
10983
|
+
};
|
|
10984
|
+
export class HTMLControlsSystem {
|
|
10985
|
+
controlContainerEl: HTMLDivElement;
|
|
10986
|
+
controlPositions: Record<AttributionPosition, HTMLDivElement>;
|
|
10987
|
+
compact: boolean | undefined;
|
|
10988
|
+
attribContainerEl?: HTMLDetailsElement;
|
|
10989
|
+
attribInnerEl?: HTMLDivElement;
|
|
10990
|
+
attribButtonEl?: HTMLElement;
|
|
10991
|
+
feedbackLinkEl?: HTMLAnchorElement;
|
|
10992
|
+
attribHTML: string;
|
|
10993
|
+
customAttributions: string[];
|
|
10994
|
+
constructor(container: HTMLElement);
|
|
10995
|
+
addAttributionControl(options?: AttributionControlOptions): void;
|
|
10996
|
+
toggleAttribution: (e: MouseEvent) => void;
|
|
10997
|
+
destroyAttributionControl(): void;
|
|
10998
|
+
resize(canvasWidth: number): void;
|
|
9736
10999
|
/**
|
|
9737
|
-
*
|
|
11000
|
+
* This should fire when Maplibre data changes.
|
|
9738
11001
|
*/
|
|
9739
|
-
|
|
9740
|
-
clear(): void;
|
|
11002
|
+
updateData(map: Map): void;
|
|
9741
11003
|
destroy(): void;
|
|
9742
11004
|
}
|
|
9743
11005
|
}
|
|
9744
11006
|
|
|
11007
|
+
declare module '@mappedin/react-sdk/geojson/src/components/styles' {
|
|
11008
|
+
export { StyleComponent, DEFAULT_COLOR, type MaterialSide } from '@mappedin/react-sdk/geojson/src/components/styles/style';
|
|
11009
|
+
export { Text3DStyleComponent, type Text3DStyle, DEFAULT_TEXT_STYLE } from '@mappedin/react-sdk/geojson/src/components/styles/text-style';
|
|
11010
|
+
export { ModelStyleComponnet, type ModelStyle } from '@mappedin/react-sdk/geojson/src/components/styles/model-style';
|
|
11011
|
+
export { DEFAULT_ROTATION, DEFAULT_SCALE } from '@mappedin/react-sdk/geojson/src/components/styles/constants';
|
|
11012
|
+
}
|
|
11013
|
+
|
|
9745
11014
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
9746
11015
|
import type { ParsedMVF } from '@mappedin/mvf';
|
|
9747
11016
|
import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
|
|
@@ -9753,12 +11022,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
9753
11022
|
import { type AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
|
|
9754
11023
|
import { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
9755
11024
|
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
9756
|
-
import type { Path, Shape
|
|
11025
|
+
import type { Path, Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
9757
11026
|
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
9758
11027
|
import { Space, Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
9759
11028
|
import { type GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
9760
11029
|
import { FloorStackObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-stack-object';
|
|
9761
|
-
import { DynamicFocus } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/dynamic-focus';
|
|
9762
11030
|
import type { Text3DState } from '@mappedin/core-sdk/src/components/text3d';
|
|
9763
11031
|
export class GeojsonApiMapObject extends PubSub<{
|
|
9764
11032
|
'floor-change': {
|
|
@@ -9794,7 +11062,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
9794
11062
|
options: TShow3DMapOptions;
|
|
9795
11063
|
styleMap: AggregatedStyleMap;
|
|
9796
11064
|
StackedMaps: StackedMaps;
|
|
9797
|
-
DynamicFocus: DynamicFocus;
|
|
9798
11065
|
get currentFloorStack(): FloorStackObject;
|
|
9799
11066
|
setFloorStack(floorStackId: string, reason?: TFloorChangeReason): void;
|
|
9800
11067
|
get currentFloor(): FloorObject;
|
|
@@ -9817,7 +11084,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
9817
11084
|
removeAll: () => void;
|
|
9818
11085
|
};
|
|
9819
11086
|
Markers: {
|
|
9820
|
-
add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions
|
|
11087
|
+
add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions & {
|
|
11088
|
+
attachTo?: string;
|
|
11089
|
+
}) => EntityId<MarkerState>;
|
|
9821
11090
|
remove: (id: string) => void;
|
|
9822
11091
|
getContentEl: (id: string) => HTMLElement | undefined;
|
|
9823
11092
|
removeAll: () => void;
|
|
@@ -9844,14 +11113,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
9844
11113
|
labelOptions?: TAddLabelOptions;
|
|
9845
11114
|
}) => void;
|
|
9846
11115
|
add: (coordinate: Coordinate, text: string, opts?: AddLabelOptions & {
|
|
9847
|
-
|
|
9848
|
-
parentId?: string;
|
|
11116
|
+
attachTo?: string;
|
|
9849
11117
|
verticalOffset?: number;
|
|
9850
11118
|
}) => {
|
|
9851
11119
|
id: string | number;
|
|
9852
11120
|
};
|
|
9853
|
-
remove: ({
|
|
9854
|
-
label: Label;
|
|
11121
|
+
remove: ({ entityId }: {
|
|
9855
11122
|
entityId: string;
|
|
9856
11123
|
}) => void;
|
|
9857
11124
|
removeAll: () => void;
|
|
@@ -10308,7 +11575,44 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera' {
|
|
|
10308
11575
|
* @param options Optional settings for the camera animation.
|
|
10309
11576
|
*/
|
|
10310
11577
|
animateElevation(elevation: number, options?: TCameraAnimationOptions): Promise<void>;
|
|
11578
|
+
/**
|
|
11579
|
+
* @internal
|
|
11580
|
+
* @experimental
|
|
11581
|
+
* Force an update of the facades in view.
|
|
11582
|
+
*/
|
|
11583
|
+
updateFacadesInView(): void;
|
|
11584
|
+
}
|
|
11585
|
+
}
|
|
11586
|
+
|
|
11587
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/exporter' {
|
|
11588
|
+
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
11589
|
+
import type { GLTFExportOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
11590
|
+
/**
|
|
11591
|
+
* API to export the scene.
|
|
11592
|
+
*
|
|
11593
|
+
* @hidden
|
|
11594
|
+
*/
|
|
11595
|
+
export class Exporter {
|
|
11596
|
+
#private;
|
|
11597
|
+
/**
|
|
11598
|
+
* @internal
|
|
11599
|
+
*/
|
|
11600
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11601
|
+
/**
|
|
11602
|
+
* @internal
|
|
11603
|
+
*/
|
|
11604
|
+
constructor({ currentMapGetter }: {
|
|
11605
|
+
currentMapGetter: CurrentMapGetter;
|
|
11606
|
+
});
|
|
11607
|
+
/**
|
|
11608
|
+
* Exports the current scene as a GLTF file.
|
|
11609
|
+
*
|
|
11610
|
+
* @hidden
|
|
11611
|
+
*/
|
|
11612
|
+
getCurrentSceneGLTF(userOptions: GLTFExportOptions): Promise<Blob>;
|
|
10311
11613
|
}
|
|
11614
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11615
|
+
export {};
|
|
10312
11616
|
}
|
|
10313
11617
|
|
|
10314
11618
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels' {
|
|
@@ -10473,6 +11777,80 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/markers' {
|
|
|
10473
11777
|
export {};
|
|
10474
11778
|
}
|
|
10475
11779
|
|
|
11780
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/images' {
|
|
11781
|
+
import type { IAnchorable, TAddImageOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
11782
|
+
import { Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
11783
|
+
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
11784
|
+
/**
|
|
11785
|
+
* Images can enhance the fidelity of an indoor map. They can be used to add custom branding, highlight important features, or provide additional information to users.
|
|
11786
|
+
* Images can be placed on any {@link Door}, {@link Space}, or {@link Coordinate} on the map and given a verticalOffset to control the height at which the image is displayed.
|
|
11787
|
+
*
|
|
11788
|
+
* This class is accessed using {@link MapView.Images}.
|
|
11789
|
+
*
|
|
11790
|
+
* JPEG and PNG images are supported. It's important to consider the size of all unique image files displayed on a map at one time.
|
|
11791
|
+
* Using many unique images may cause instability on mobile devices with limited GPU memory. The Mappedin SDK will cache and reuse images that have the same URL, resulting in reduced memory usage.
|
|
11792
|
+
*
|
|
11793
|
+
* The following calculations illustrates how much memory is used for a given image:
|
|
11794
|
+
*
|
|
11795
|
+
* Formula: `width * height * 4 bytes/pixel = memory used`
|
|
11796
|
+
*
|
|
11797
|
+
* 512 x 512 Pixel Image: `512px * 512px * 4 bytes/pixel = 1MB`
|
|
11798
|
+
*
|
|
11799
|
+
* 4096 x 4096 Pixel Image: `4096px * 4096px * 4 bytes/pixel = 64MB`
|
|
11800
|
+
*
|
|
11801
|
+
* Refer to the [Images Guide](https://developer.mappedin.com/web-sdk/images-textures) for more information and interactive examples.
|
|
11802
|
+
*/
|
|
11803
|
+
export class Images {
|
|
11804
|
+
#private;
|
|
11805
|
+
/**
|
|
11806
|
+
* @internal
|
|
11807
|
+
*/
|
|
11808
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11809
|
+
/**
|
|
11810
|
+
* @internal
|
|
11811
|
+
*/
|
|
11812
|
+
constructor({ currentMapGetter }: {
|
|
11813
|
+
currentMapGetter: CurrentMapGetter;
|
|
11814
|
+
});
|
|
11815
|
+
/**
|
|
11816
|
+
* @internal
|
|
11817
|
+
*/
|
|
11818
|
+
getById(id: string): {
|
|
11819
|
+
image: Image;
|
|
11820
|
+
entityId: string;
|
|
11821
|
+
} | undefined;
|
|
11822
|
+
/**
|
|
11823
|
+
* Adds an image to the map.
|
|
11824
|
+
*
|
|
11825
|
+
* @param target The target object ({@link IAnchorable}) for the image.
|
|
11826
|
+
* @param url The URL of the image.
|
|
11827
|
+
* @param options Optional additional options for the {@link Image}.
|
|
11828
|
+
* @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
|
|
11829
|
+
* @example
|
|
11830
|
+
* // Add an interactive {@link Image} to the map with custom HTML content.
|
|
11831
|
+
* mapView.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
|
|
11832
|
+
*/
|
|
11833
|
+
add(target: IAnchorable, url: string, options: TAddImageOptions): Image;
|
|
11834
|
+
/**
|
|
11835
|
+
* Removes a image from the map.
|
|
11836
|
+
*
|
|
11837
|
+
* @param image {Image} The {@link Image} which should be removed.
|
|
11838
|
+
* @example
|
|
11839
|
+
* mapView.Images.remove(image);
|
|
11840
|
+
*/
|
|
11841
|
+
remove(image: Image): void;
|
|
11842
|
+
/**
|
|
11843
|
+
* Remove all the images from the map.
|
|
11844
|
+
*
|
|
11845
|
+
* @example
|
|
11846
|
+
* mapView.Images.removeAll();
|
|
11847
|
+
*/
|
|
11848
|
+
removeAll(): Image[];
|
|
11849
|
+
}
|
|
11850
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11851
|
+
export {};
|
|
11852
|
+
}
|
|
11853
|
+
|
|
10476
11854
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/models' {
|
|
10477
11855
|
import type { TAddModelOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
10478
11856
|
import { Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
@@ -10559,59 +11937,148 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths' {
|
|
|
10559
11937
|
*
|
|
10560
11938
|
* Paths is accessed using {@link MapView.Paths}.
|
|
10561
11939
|
*
|
|
10562
|
-
* Paths can be drawn from one coordinate to another using {@link Paths.add}. If using just two coordinates, the path will be drawn straight between the two points.
|
|
10563
|
-
* This may work for some scenarios, but in most cases an app will need to show the user their walking path, going through doors and avoiding walls and other objects.
|
|
10564
|
-
* Such a path of coordinates can be created by calling the {@link MapData.getDirections} method, passing in a start and end {@link TNavigationTarget}. Note that a Space requires an entrance to be used as a target.
|
|
11940
|
+
* Paths can be drawn from one coordinate to another using {@link Paths.add}. If using just two coordinates, the path will be drawn straight between the two points.
|
|
11941
|
+
* This may work for some scenarios, but in most cases an app will need to show the user their walking path, going through doors and avoiding walls and other objects.
|
|
11942
|
+
* Such a path of coordinates can be created by calling the {@link MapData.getDirections} method, passing in a start and end {@link TNavigationTarget}. Note that a Space requires an entrance to be used as a target.
|
|
11943
|
+
*
|
|
11944
|
+
* The width of the path is set using the {@link TAddPathOptions.nearRadius} and {@link TAddPathOptions.farRadius} parameters. These values are in meters. `nearRadius` is the path width used at the lowest zoom level closest to the ground and `farRadius` is used at the highest zoom level. Additional path styles are outlined later in this guide in the Path Styles section.
|
|
11945
|
+
*
|
|
11946
|
+
* Refer to the [Drawing a Path](https://developer.mappedin.com/web-sdk/wayfinding#drawing-a-path) in the Wayfinding Guide for more information and interactive examples.
|
|
11947
|
+
*/
|
|
11948
|
+
export class Paths {
|
|
11949
|
+
#private;
|
|
11950
|
+
/**
|
|
11951
|
+
* @internal
|
|
11952
|
+
*/
|
|
11953
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
11954
|
+
/**
|
|
11955
|
+
* @internal
|
|
11956
|
+
*/
|
|
11957
|
+
constructor({ currentMapGetter }: {
|
|
11958
|
+
currentMapGetter: CurrentMapGetter;
|
|
11959
|
+
});
|
|
11960
|
+
/**
|
|
11961
|
+
* @internal
|
|
11962
|
+
*/
|
|
11963
|
+
getById(id: string): {
|
|
11964
|
+
path: Path;
|
|
11965
|
+
entityIds: string[];
|
|
11966
|
+
} | undefined;
|
|
11967
|
+
/**
|
|
11968
|
+
* Adds a path ({@link Path}) to the map.
|
|
11969
|
+
* @param coordinate Array of coordinates ({@link Coordinate}) to form the path.
|
|
11970
|
+
* @param options Optional additional option
|
|
11971
|
+
* @example
|
|
11972
|
+
* // Add a red path to the map
|
|
11973
|
+
* mapView.Paths.add(coordinate, { color: '#ff0000' });
|
|
11974
|
+
*/
|
|
11975
|
+
add(coordinate: Coordinate[], options?: TAddPathOptions): Path;
|
|
11976
|
+
/**
|
|
11977
|
+
* Removes a specific path ({@link Path}) from the map.
|
|
11978
|
+
* @param path The path to be removed.
|
|
11979
|
+
* @example
|
|
11980
|
+
* mapView.Paths.remove(path);
|
|
11981
|
+
*/
|
|
11982
|
+
remove(path: Path): void;
|
|
11983
|
+
/**
|
|
11984
|
+
* Removes all paths ({@link Path}) from the map.
|
|
11985
|
+
*
|
|
11986
|
+
* @example
|
|
11987
|
+
* mapView.Paths.removeAll();
|
|
11988
|
+
*/
|
|
11989
|
+
removeAll(): Path[];
|
|
11990
|
+
}
|
|
11991
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11992
|
+
export {};
|
|
11993
|
+
}
|
|
11994
|
+
|
|
11995
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/style' {
|
|
11996
|
+
import type { StyleCollection } from '@mappedin/mvf';
|
|
11997
|
+
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
11998
|
+
export class Style {
|
|
11999
|
+
#private;
|
|
12000
|
+
/**
|
|
12001
|
+
* @internal
|
|
12002
|
+
*/
|
|
12003
|
+
get currentMap(): GeojsonApiMapObject | undefined;
|
|
12004
|
+
/**
|
|
12005
|
+
* @internal
|
|
12006
|
+
*/
|
|
12007
|
+
constructor({ currentMapGetter }: {
|
|
12008
|
+
currentMapGetter: CurrentMapGetter;
|
|
12009
|
+
});
|
|
12010
|
+
setFromStyleCollection(styleCollection: StyleCollection): void;
|
|
12011
|
+
}
|
|
12012
|
+
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
12013
|
+
export {};
|
|
12014
|
+
}
|
|
12015
|
+
|
|
12016
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor' {
|
|
12017
|
+
import { type RendererCore } from '@mappedin/core-sdk';
|
|
12018
|
+
import type { BBox } from 'geojson';
|
|
12019
|
+
export type HiddenOutdoorGeometry = [
|
|
12020
|
+
BBox,
|
|
12021
|
+
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
12022
|
+
layers: string[]
|
|
12023
|
+
];
|
|
12024
|
+
/**
|
|
12025
|
+
* The outdoor map shown around the Mappedin indoor map can be manipulated to show or hide additional information. It can be used to add GeoJSON based geometry, images, deck.gl layers and more.
|
|
12026
|
+
*
|
|
12027
|
+
* The outdoor map is accessed using {@link MapView.Outdoor.map}, which returns a maplibregl.Map object.
|
|
12028
|
+
* [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The Mappedin SDK makes use of it to display the outdoor map.
|
|
12029
|
+
*
|
|
12030
|
+
* By providing access to the MapLibre map used to draw the outdoor map, the Mappedin SDK enables developers to draw on and manipulate the outdoor map.
|
|
12031
|
+
* Developers can use most capabilities of MapLibre GL JS with key exceptions being Interactivity and Camera, which are not available.
|
|
10565
12032
|
*
|
|
10566
|
-
*
|
|
12033
|
+
* User touch and click events are handled by Mappedin JS and are not propagated to the outdoor map layer. Camera movement is also handled by Mappedin JS and cannot be manipulated using MapLibre controls.
|
|
10567
12034
|
*
|
|
10568
|
-
* Refer to the [
|
|
12035
|
+
* Refer to the [Outdoor Map Guide](https://developer.mappedin.com/web-sdk/outdoor-map) for more information and interactive examples.
|
|
10569
12036
|
*/
|
|
10570
|
-
export class
|
|
12037
|
+
export default class Outdoor {
|
|
10571
12038
|
#private;
|
|
10572
12039
|
/**
|
|
10573
12040
|
* @internal
|
|
10574
12041
|
*/
|
|
10575
|
-
|
|
12042
|
+
constructor(core: RendererCore, hiddenOutdoorGeometry?: HiddenOutdoorGeometry[]);
|
|
10576
12043
|
/**
|
|
10577
|
-
*
|
|
12044
|
+
* Set the style of the outdoor map. Use one of [Mappedin's predefined styles](https://developer.mappedin.com/web-sdk/outdoor-map#styles) or link to a custom style.
|
|
12045
|
+
* @param style {any}
|
|
10578
12046
|
*/
|
|
10579
|
-
|
|
10580
|
-
currentMapGetter: CurrentMapGetter;
|
|
10581
|
-
});
|
|
12047
|
+
setStyle(style: any): void;
|
|
10582
12048
|
/**
|
|
10583
|
-
*
|
|
12049
|
+
* Returns a Maplibre map for advanced usage.
|
|
12050
|
+
*
|
|
12051
|
+
* @returns {object} Maplibre map instance
|
|
12052
|
+
*
|
|
12053
|
+
* Limitations:
|
|
12054
|
+
* - Maplibre interaction events are not supported, use Mappedin JS interaction events.
|
|
12055
|
+
* - Maplibre markers and labels may overlap as they are not integrated with the Mappedin JS collision engine.
|
|
10584
12056
|
*/
|
|
10585
|
-
|
|
10586
|
-
path: Path;
|
|
10587
|
-
entityIds: string[];
|
|
10588
|
-
} | undefined;
|
|
12057
|
+
get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
|
|
10589
12058
|
/**
|
|
10590
|
-
*
|
|
10591
|
-
* @param coordinate Array of coordinates ({@link Coordinate}) to form the path.
|
|
10592
|
-
* @param options Optional additional option
|
|
10593
|
-
* @example
|
|
10594
|
-
* // Add a red path to the map
|
|
10595
|
-
* mapView.Paths.add(coordinate, { color: '#ff0000' });
|
|
12059
|
+
* Whether the outdoorView is enabled.
|
|
10596
12060
|
*/
|
|
10597
|
-
|
|
12061
|
+
get enabled(): boolean;
|
|
10598
12062
|
/**
|
|
10599
|
-
*
|
|
10600
|
-
* @param path The path to be removed.
|
|
10601
|
-
* @example
|
|
10602
|
-
* mapView.Paths.remove(path);
|
|
12063
|
+
* Whether the outdoorView is visible.
|
|
10603
12064
|
*/
|
|
10604
|
-
|
|
12065
|
+
get visible(): boolean;
|
|
10605
12066
|
/**
|
|
10606
|
-
*
|
|
10607
|
-
*
|
|
10608
|
-
* @example
|
|
10609
|
-
* mapView.Paths.removeAll();
|
|
12067
|
+
* Show the outdoor map.
|
|
10610
12068
|
*/
|
|
10611
|
-
|
|
12069
|
+
show(): void;
|
|
12070
|
+
/**
|
|
12071
|
+
* Hide the outdoor map.
|
|
12072
|
+
* @param excludedStyleLayerIds {string[]}
|
|
12073
|
+
*/
|
|
12074
|
+
hide(excludedStyleLayerIds?: string[]): void;
|
|
12075
|
+
/**
|
|
12076
|
+
* Set outdoor view opacity.
|
|
12077
|
+
* @param targetOpacity {number | 'initial'}
|
|
12078
|
+
* @param excludedStyleLayerIds {string[]}
|
|
12079
|
+
*/
|
|
12080
|
+
setOpacity(targetOpacity: number | 'initial', excludedStyleLayerIds?: string[]): void;
|
|
10612
12081
|
}
|
|
10613
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10614
|
-
export {};
|
|
10615
12082
|
}
|
|
10616
12083
|
|
|
10617
12084
|
declare module '@mappedin/react-sdk/mappedin-js/src/navigation/index' {
|
|
@@ -10709,6 +12176,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation/index' {
|
|
|
10709
12176
|
*/
|
|
10710
12177
|
animateArrowsOnPath?: boolean;
|
|
10711
12178
|
};
|
|
12179
|
+
/**
|
|
12180
|
+
* Controls whether the path drawing is animated across floors.
|
|
12181
|
+
* @default true
|
|
12182
|
+
*/
|
|
12183
|
+
animatePathDrawing?: boolean;
|
|
10712
12184
|
/**
|
|
10713
12185
|
* Options for the path.
|
|
10714
12186
|
*/
|
|
@@ -10831,242 +12303,44 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation/index' {
|
|
|
10831
12303
|
*/
|
|
10832
12304
|
get activePath(): Path | undefined;
|
|
10833
12305
|
/**
|
|
10834
|
-
* The current list of floor stacks along the navigation paths.
|
|
10835
|
-
*/
|
|
10836
|
-
get floorStacks(): FloorStack[];
|
|
10837
|
-
/**
|
|
10838
|
-
* The current list of floors along the navigation paths.
|
|
10839
|
-
*/
|
|
10840
|
-
get floors(): Floor[];
|
|
10841
|
-
/**
|
|
10842
|
-
* Sets the active path by index.
|
|
10843
|
-
*/
|
|
10844
|
-
setActivePathByIndex(target: number): void;
|
|
10845
|
-
/**
|
|
10846
|
-
* Sets the active path.
|
|
10847
|
-
*/
|
|
10848
|
-
setActivePath(target: Path): void;
|
|
10849
|
-
/**
|
|
10850
|
-
* Sets the active path by directions.
|
|
10851
|
-
*/
|
|
10852
|
-
setActivePathByDirections(target: Directions): void;
|
|
10853
|
-
/**
|
|
10854
|
-
* @internal
|
|
10855
|
-
*/
|
|
10856
|
-
drawSync(directions: Directions | Directions[], options?: TNavigationOptions): void;
|
|
10857
|
-
/**
|
|
10858
|
-
* Draws the specified directions on the map.
|
|
10859
|
-
* @param directions The directions to be drawn.
|
|
10860
|
-
* @param options Optional additional options for the navigation.
|
|
10861
|
-
*/
|
|
10862
|
-
draw(directions: Directions | Directions[], options?: TNavigationOptions): Promise<unknown>;
|
|
10863
|
-
/**
|
|
10864
|
-
* Clears any drawn navigation paths or directions from the map.
|
|
10865
|
-
*/
|
|
10866
|
-
clear(): void;
|
|
10867
|
-
}
|
|
10868
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10869
|
-
export {};
|
|
10870
|
-
}
|
|
10871
|
-
|
|
10872
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/exporter' {
|
|
10873
|
-
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
10874
|
-
import type { GLTFExportOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
10875
|
-
/**
|
|
10876
|
-
* API to export the scene.
|
|
10877
|
-
*
|
|
10878
|
-
* @hidden
|
|
10879
|
-
*/
|
|
10880
|
-
export class Exporter {
|
|
10881
|
-
#private;
|
|
10882
|
-
/**
|
|
10883
|
-
* @internal
|
|
10884
|
-
*/
|
|
10885
|
-
get currentMap(): GeojsonApiMapObject | undefined;
|
|
10886
|
-
/**
|
|
10887
|
-
* @internal
|
|
10888
|
-
*/
|
|
10889
|
-
constructor({ currentMapGetter }: {
|
|
10890
|
-
currentMapGetter: CurrentMapGetter;
|
|
10891
|
-
});
|
|
10892
|
-
/**
|
|
10893
|
-
* Exports the current scene as a GLTF file.
|
|
10894
|
-
*
|
|
10895
|
-
* @hidden
|
|
10896
|
-
*/
|
|
10897
|
-
getCurrentSceneGLTF(userOptions: GLTFExportOptions): Promise<Blob>;
|
|
10898
|
-
}
|
|
10899
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10900
|
-
export {};
|
|
10901
|
-
}
|
|
10902
|
-
|
|
10903
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/style' {
|
|
10904
|
-
import type { StyleCollection } from '@mappedin/mvf';
|
|
10905
|
-
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
10906
|
-
export class Style {
|
|
10907
|
-
#private;
|
|
10908
|
-
/**
|
|
10909
|
-
* @internal
|
|
10910
|
-
*/
|
|
10911
|
-
get currentMap(): GeojsonApiMapObject | undefined;
|
|
10912
|
-
/**
|
|
10913
|
-
* @internal
|
|
10914
|
-
*/
|
|
10915
|
-
constructor({ currentMapGetter }: {
|
|
10916
|
-
currentMapGetter: CurrentMapGetter;
|
|
10917
|
-
});
|
|
10918
|
-
setFromStyleCollection(styleCollection: StyleCollection): void;
|
|
10919
|
-
}
|
|
10920
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
10921
|
-
export {};
|
|
10922
|
-
}
|
|
10923
|
-
|
|
10924
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor' {
|
|
10925
|
-
import { type RendererCore } from '@mappedin/core-sdk';
|
|
10926
|
-
import type { BBox } from 'geojson';
|
|
10927
|
-
export type HiddenOutdoorGeometry = [
|
|
10928
|
-
BBox,
|
|
10929
|
-
polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[],
|
|
10930
|
-
layers: string[]
|
|
10931
|
-
];
|
|
10932
|
-
/**
|
|
10933
|
-
* The outdoor map shown around the Mappedin indoor map can be manipulated to show or hide additional information. It can be used to add GeoJSON based geometry, images, deck.gl layers and more.
|
|
10934
|
-
*
|
|
10935
|
-
* The outdoor map is accessed using {@link MapView.Outdoor.map}, which returns a maplibregl.Map object.
|
|
10936
|
-
* [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The Mappedin SDK makes use of it to display the outdoor map.
|
|
10937
|
-
*
|
|
10938
|
-
* By providing access to the MapLibre map used to draw the outdoor map, the Mappedin SDK enables developers to draw on and manipulate the outdoor map.
|
|
10939
|
-
* Developers can use most capabilities of MapLibre GL JS with key exceptions being Interactivity and Camera, which are not available.
|
|
10940
|
-
*
|
|
10941
|
-
* User touch and click events are handled by Mappedin JS and are not propagated to the outdoor map layer. Camera movement is also handled by Mappedin JS and cannot be manipulated using MapLibre controls.
|
|
10942
|
-
*
|
|
10943
|
-
* Refer to the [Outdoor Map Guide](https://developer.mappedin.com/web-sdk/outdoor-map) for more information and interactive examples.
|
|
10944
|
-
*/
|
|
10945
|
-
export default class Outdoor {
|
|
10946
|
-
#private;
|
|
10947
|
-
/**
|
|
10948
|
-
* @internal
|
|
10949
|
-
*/
|
|
10950
|
-
constructor(core: RendererCore, hiddenOutdoorGeometry?: HiddenOutdoorGeometry[]);
|
|
10951
|
-
/**
|
|
10952
|
-
* Set the style of the outdoor map. Use one of [Mappedin's predefined styles](https://developer.mappedin.com/web-sdk/outdoor-map#styles) or link to a custom style.
|
|
10953
|
-
* @param style {any}
|
|
10954
|
-
*/
|
|
10955
|
-
setStyle(style: any): void;
|
|
10956
|
-
/**
|
|
10957
|
-
* Returns a Maplibre map for advanced usage.
|
|
10958
|
-
*
|
|
10959
|
-
* @returns {object} Maplibre map instance
|
|
10960
|
-
*
|
|
10961
|
-
* Limitations:
|
|
10962
|
-
* - Maplibre interaction events are not supported, use Mappedin JS interaction events.
|
|
10963
|
-
* - Maplibre markers and labels may overlap as they are not integrated with the Mappedin JS collision engine.
|
|
10964
|
-
*/
|
|
10965
|
-
get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
|
|
10966
|
-
/**
|
|
10967
|
-
* Whether the outdoorView is enabled.
|
|
10968
|
-
*/
|
|
10969
|
-
get enabled(): boolean;
|
|
10970
|
-
/**
|
|
10971
|
-
* Whether the outdoorView is visible.
|
|
10972
|
-
*/
|
|
10973
|
-
get visible(): boolean;
|
|
10974
|
-
/**
|
|
10975
|
-
* Show the outdoor map.
|
|
10976
|
-
*/
|
|
10977
|
-
show(): void;
|
|
10978
|
-
/**
|
|
10979
|
-
* Hide the outdoor map.
|
|
10980
|
-
* @param excludedStyleLayerIds {string[]}
|
|
10981
|
-
*/
|
|
10982
|
-
hide(excludedStyleLayerIds?: string[]): void;
|
|
10983
|
-
/**
|
|
10984
|
-
* Set outdoor view opacity.
|
|
10985
|
-
* @param targetOpacity {number | 'initial'}
|
|
10986
|
-
* @param excludedStyleLayerIds {string[]}
|
|
10987
|
-
*/
|
|
10988
|
-
setOpacity(targetOpacity: number | 'initial', excludedStyleLayerIds?: string[]): void;
|
|
10989
|
-
}
|
|
10990
|
-
}
|
|
10991
|
-
|
|
10992
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/images' {
|
|
10993
|
-
import type { IAnchorable, TAddImageOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
10994
|
-
import { Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
10995
|
-
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
10996
|
-
/**
|
|
10997
|
-
* Images can enhance the fidelity of an indoor map. They can be used to add custom branding, highlight important features, or provide additional information to users.
|
|
10998
|
-
* Images can be placed on any {@link Door}, {@link Space}, or {@link Coordinate} on the map and given a verticalOffset to control the height at which the image is displayed.
|
|
10999
|
-
*
|
|
11000
|
-
* This class is accessed using {@link MapView.Images}.
|
|
11001
|
-
*
|
|
11002
|
-
* JPEG and PNG images are supported. It's important to consider the size of all unique image files displayed on a map at one time.
|
|
11003
|
-
* Using many unique images may cause instability on mobile devices with limited GPU memory. The Mappedin SDK will cache and reuse images that have the same URL, resulting in reduced memory usage.
|
|
11004
|
-
*
|
|
11005
|
-
* The following calculations illustrates how much memory is used for a given image:
|
|
11006
|
-
*
|
|
11007
|
-
* Formula: `width * height * 4 bytes/pixel = memory used`
|
|
11008
|
-
*
|
|
11009
|
-
* 512 x 512 Pixel Image: `512px * 512px * 4 bytes/pixel = 1MB`
|
|
11010
|
-
*
|
|
11011
|
-
* 4096 x 4096 Pixel Image: `4096px * 4096px * 4 bytes/pixel = 64MB`
|
|
11012
|
-
*
|
|
11013
|
-
* Refer to the [Images Guide](https://developer.mappedin.com/web-sdk/images-textures) for more information and interactive examples.
|
|
11014
|
-
*/
|
|
11015
|
-
export class Images {
|
|
11016
|
-
#private;
|
|
11017
|
-
/**
|
|
11018
|
-
* @internal
|
|
12306
|
+
* The current list of floor stacks along the navigation paths.
|
|
11019
12307
|
*/
|
|
11020
|
-
get
|
|
12308
|
+
get floorStacks(): FloorStack[];
|
|
11021
12309
|
/**
|
|
11022
|
-
*
|
|
12310
|
+
* The current list of floors along the navigation paths.
|
|
11023
12311
|
*/
|
|
11024
|
-
|
|
11025
|
-
currentMapGetter: CurrentMapGetter;
|
|
11026
|
-
});
|
|
12312
|
+
get floors(): Floor[];
|
|
11027
12313
|
/**
|
|
11028
|
-
*
|
|
12314
|
+
* Sets the active path by index.
|
|
11029
12315
|
*/
|
|
11030
|
-
|
|
11031
|
-
image: Image;
|
|
11032
|
-
entityId: string;
|
|
11033
|
-
} | undefined;
|
|
12316
|
+
setActivePathByIndex(target: number): void;
|
|
11034
12317
|
/**
|
|
11035
|
-
*
|
|
11036
|
-
*
|
|
11037
|
-
* @param target The target object ({@link IAnchorable}) for the image.
|
|
11038
|
-
* @param url The URL of the image.
|
|
11039
|
-
* @param options Optional additional options for the {@link Image}.
|
|
11040
|
-
* @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
|
|
11041
|
-
* @example
|
|
11042
|
-
* // Add an interactive {@link Image} to the map with custom HTML content.
|
|
11043
|
-
* mapView.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
|
|
12318
|
+
* Sets the active path.
|
|
11044
12319
|
*/
|
|
11045
|
-
|
|
12320
|
+
setActivePath(target: Path): void;
|
|
11046
12321
|
/**
|
|
11047
|
-
*
|
|
11048
|
-
*
|
|
11049
|
-
* @param image {Image} The {@link Image} which should be removed.
|
|
11050
|
-
* @example
|
|
11051
|
-
* mapView.Images.remove(image);
|
|
12322
|
+
* Sets the active path by directions.
|
|
11052
12323
|
*/
|
|
11053
|
-
|
|
12324
|
+
setActivePathByDirections(target: Directions): void;
|
|
11054
12325
|
/**
|
|
11055
|
-
*
|
|
11056
|
-
*
|
|
11057
|
-
* @example
|
|
11058
|
-
* mapView.Images.removeAll();
|
|
12326
|
+
* @internal
|
|
11059
12327
|
*/
|
|
11060
|
-
|
|
12328
|
+
drawSync(directions: Directions | Directions[], options?: TNavigationOptions): void;
|
|
12329
|
+
/**
|
|
12330
|
+
* Draws the specified directions on the map.
|
|
12331
|
+
* @param directions The directions to be drawn.
|
|
12332
|
+
* @param options Optional additional options for the navigation.
|
|
12333
|
+
*/
|
|
12334
|
+
draw(directions: Directions | Directions[], options?: TNavigationOptions): Promise<unknown>;
|
|
12335
|
+
/**
|
|
12336
|
+
* Clears any drawn navigation paths or directions from the map.
|
|
12337
|
+
*/
|
|
12338
|
+
clear(): void;
|
|
11061
12339
|
}
|
|
11062
12340
|
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
11063
12341
|
export {};
|
|
11064
12342
|
}
|
|
11065
12343
|
|
|
11066
|
-
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/dynamic-focus' {
|
|
11067
|
-
export { DynamicFocus } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/dynamic-focus/dynamic-focus';
|
|
11068
|
-
}
|
|
11069
|
-
|
|
11070
12344
|
declare module '@mappedin/react-sdk/mappedin-js/src/search/internal' {
|
|
11071
12345
|
import type { SearchResult as MiniSearchResult, Suggestion, MatchInfo } from 'minisearch';
|
|
11072
12346
|
import type { Places } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
@@ -11646,6 +12920,60 @@ declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
|
|
|
11646
12920
|
export {};
|
|
11647
12921
|
}
|
|
11648
12922
|
|
|
12923
|
+
declare module '@mappedin/react-sdk/packages/mvf-utils/tokens/access-token' {
|
|
12924
|
+
import { type TGetMapDataWithCredentialsOptions } from '@mappedin/react-sdk/packages/mvf-utils/mvf-utils';
|
|
12925
|
+
export const ACCESS_TOKEN_REFRESH_BUFFER_MINUTES = 60;
|
|
12926
|
+
export const ACCESS_TOKEN_REFRESH_BUFFER_MS: number;
|
|
12927
|
+
export const ACCESS_TOKEN_STORAGE_KEY = "accessTokens";
|
|
12928
|
+
type AccessToken = {
|
|
12929
|
+
accessToken: string;
|
|
12930
|
+
expiresTimestamp: number;
|
|
12931
|
+
};
|
|
12932
|
+
type TGetAccessTokenOptions = Pick<TGetMapDataWithCredentialsOptions, 'baseUri' | 'baseAuthUri' | 'key' | 'secret'>;
|
|
12933
|
+
/**
|
|
12934
|
+
* Get an access token from storage or fetch it from the API using API keys.
|
|
12935
|
+
*/
|
|
12936
|
+
export function getAccessToken(userOptions: TGetAccessTokenOptions, enterprise?: boolean): Promise<AccessToken>;
|
|
12937
|
+
/**
|
|
12938
|
+
* Fetch an access token for enterprise.
|
|
12939
|
+
*/
|
|
12940
|
+
export function fetchAccessTokenEnterprise(userOptions: TGetAccessTokenOptions, currentTimestamp: number): Promise<AccessToken>;
|
|
12941
|
+
export {};
|
|
12942
|
+
}
|
|
12943
|
+
|
|
12944
|
+
declare module '@mappedin/react-sdk/packages/mvf-utils/tokens/sas-token' {
|
|
12945
|
+
export const SAS_TOKEN_REFRESH_BUFFER_MINUTES = 60;
|
|
12946
|
+
export const SAS_TOKEN_REFRESH_BUFFER_MS: number;
|
|
12947
|
+
export const SAS_TOKEN_STORAGE_KEY = "miSasTokens";
|
|
12948
|
+
type SasToken = {
|
|
12949
|
+
token: string;
|
|
12950
|
+
expires: number;
|
|
12951
|
+
};
|
|
12952
|
+
/**
|
|
12953
|
+
* Fetch the SAS Token either from sesion storage or from the API using the access token.
|
|
12954
|
+
* @param userOptions - The user options.
|
|
12955
|
+
* @returns The SAS Token.
|
|
12956
|
+
*/
|
|
12957
|
+
export function getSasToken(userOptions: {
|
|
12958
|
+
mapId: string;
|
|
12959
|
+
baseUri?: string;
|
|
12960
|
+
}, accessToken: string): Promise<SasToken>;
|
|
12961
|
+
/**
|
|
12962
|
+
* Fetch the SAS Token for private images using the access token.
|
|
12963
|
+
* @param userOptions - The user options.
|
|
12964
|
+
* @param accessToken - The access token.
|
|
12965
|
+
* @returns The SAS Token.
|
|
12966
|
+
*/
|
|
12967
|
+
export function fetchSasToken(userOptions: {
|
|
12968
|
+
mapId: string;
|
|
12969
|
+
baseUri?: string;
|
|
12970
|
+
}, accessToken: string): Promise<{
|
|
12971
|
+
token: string;
|
|
12972
|
+
expires: number;
|
|
12973
|
+
}>;
|
|
12974
|
+
export {};
|
|
12975
|
+
}
|
|
12976
|
+
|
|
11649
12977
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object' {
|
|
11650
12978
|
export default abstract class BaseMetaData {
|
|
11651
12979
|
/**
|
|
@@ -11746,90 +13074,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/opening-hou
|
|
|
11746
13074
|
}
|
|
11747
13075
|
}
|
|
11748
13076
|
|
|
11749
|
-
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
11750
|
-
import { QuadTree } from '@packages/internal/quad-tree';
|
|
11751
|
-
import '../../styles/collisions.scss';
|
|
11752
|
-
import type { MarkerComponent } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
11753
|
-
import type LabelComponent from '@mappedin/react-sdk/geojson/src/components/label';
|
|
11754
|
-
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
11755
|
-
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
11756
|
-
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor';
|
|
11757
|
-
import type { WatermarkPosition } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
11758
|
-
export type TMessageEvent = MessageEvent<{
|
|
11759
|
-
msgId: string;
|
|
11760
|
-
colliders: TSerializedColliderResponse[];
|
|
11761
|
-
debug: {
|
|
11762
|
-
x: number;
|
|
11763
|
-
y: number;
|
|
11764
|
-
w: number;
|
|
11765
|
-
h: number;
|
|
11766
|
-
}[];
|
|
11767
|
-
}>;
|
|
11768
|
-
export type TMessage = {
|
|
11769
|
-
msgId: string;
|
|
11770
|
-
totalWidth: number;
|
|
11771
|
-
totalHeight: number;
|
|
11772
|
-
watermarkWidth: number;
|
|
11773
|
-
watermarkHeight: number;
|
|
11774
|
-
watermarkPosition: WatermarkPosition;
|
|
11775
|
-
colliders: TSerializedCollider[];
|
|
11776
|
-
devicePixelRatio: number;
|
|
11777
|
-
};
|
|
11778
|
-
type TCollisionSystemEvent = {
|
|
11779
|
-
'visibility-changed': undefined;
|
|
11780
|
-
};
|
|
11781
|
-
export type PackedBBox = [x: number, y: number, w: number, h: number, index: number];
|
|
11782
|
-
export type PackedBBoxes = PackedBBox[];
|
|
11783
|
-
export type PackedCollider = [
|
|
11784
|
-
bboxes: PackedBBoxes,
|
|
11785
|
-
enabled: 0 | 1,
|
|
11786
|
-
alwaysVisible: 0 | 1,
|
|
11787
|
-
x: number,
|
|
11788
|
-
y: number,
|
|
11789
|
-
shouldCollideWithScreenEdges?: 0 | 1,
|
|
11790
|
-
onlyExposeStrategyIndex?: number
|
|
11791
|
-
];
|
|
11792
|
-
export type PackedMessage = [
|
|
11793
|
-
colliders: PackedCollider[],
|
|
11794
|
-
devicePixelRatio: number,
|
|
11795
|
-
totalHeight: number,
|
|
11796
|
-
totalWidth: number,
|
|
11797
|
-
watermarkWidth: number,
|
|
11798
|
-
watermarkHeight: number,
|
|
11799
|
-
watermarkPosition: WatermarkPosition
|
|
11800
|
-
];
|
|
11801
|
-
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
11802
|
-
collidersDirty: boolean;
|
|
11803
|
-
packedMessage: PackedMessage;
|
|
11804
|
-
visibleCollidersQTree: QuadTree<{
|
|
11805
|
-
entityId: string | number;
|
|
11806
|
-
}>;
|
|
11807
|
-
interactiveCollidersQTree: QuadTree<{
|
|
11808
|
-
entityId: string | number;
|
|
11809
|
-
}>;
|
|
11810
|
-
coreState: RendererState;
|
|
11811
|
-
constructor(debugCanvas: HTMLCanvasElement, coreState: RendererState, worker?: Worker);
|
|
11812
|
-
postMessage: () => void;
|
|
11813
|
-
showCollisionBoxes: () => void;
|
|
11814
|
-
hideCollisionBoxes: () => void;
|
|
11815
|
-
currentMsgId: string;
|
|
11816
|
-
working: boolean;
|
|
11817
|
-
componentArray: (MarkerComponent | LabelComponent)[];
|
|
11818
|
-
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean) => void;
|
|
11819
|
-
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
11820
|
-
/**
|
|
11821
|
-
* Resolve collisions
|
|
11822
|
-
*/
|
|
11823
|
-
resolve: (e: MessageEvent<{
|
|
11824
|
-
msgId: string;
|
|
11825
|
-
colliders: TSerializedColliderResponse[];
|
|
11826
|
-
}>) => void;
|
|
11827
|
-
drawDebug: () => void;
|
|
11828
|
-
destroy: () => void;
|
|
11829
|
-
}
|
|
11830
|
-
export {};
|
|
11831
|
-
}
|
|
11832
|
-
|
|
11833
13077
|
declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
|
|
11834
13078
|
import { Object3D } from 'three';
|
|
11835
13079
|
import type { Mesh, Object3DEventMap, ShaderMaterial, Texture, TubeGeometry, Color, Vector2, Raycaster } from 'three';
|
|
@@ -11845,10 +13089,12 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
|
|
|
11845
13089
|
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
11846
13090
|
import type { Text3DComponent } from '@mappedin/react-sdk/geojson/src/components/text3d';
|
|
11847
13091
|
import type { ModelStyleComponnet, Text3DStyleComponent } from '@mappedin/react-sdk/geojson/src/components/styles';
|
|
13092
|
+
import type { OutlineComponent } from '@mappedin/react-sdk/geojson/src/components/outline';
|
|
11848
13093
|
export enum Geometry3DComponents {
|
|
11849
13094
|
Mesh = 0,
|
|
11850
13095
|
Style = 1,
|
|
11851
|
-
Interaction = 2
|
|
13096
|
+
Interaction = 2,
|
|
13097
|
+
Outline = 3
|
|
11852
13098
|
}
|
|
11853
13099
|
type Geometry3DObjectTypes = 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image' | 'text3d';
|
|
11854
13100
|
export class Geometry3DObject3D extends Object3D {
|
|
@@ -11877,16 +13123,17 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
|
|
|
11877
13123
|
}
|
|
11878
13124
|
export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | Text3DComponent | ImageComponent;
|
|
11879
13125
|
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;
|
|
11880
|
-
export class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M
|
|
13126
|
+
export class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M>, O extends OutlineComponent | undefined = OutlineComponent | undefined> {
|
|
11881
13127
|
id: string | number;
|
|
11882
|
-
components: [M, S, I?];
|
|
13128
|
+
components: [M, S, I?, O?];
|
|
11883
13129
|
get object3d(): M["mesh"];
|
|
11884
13130
|
get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
11885
13131
|
get type(): T;
|
|
11886
13132
|
entities2D: Map<string | number, Geometry2D>;
|
|
11887
13133
|
constructor(meshComponent: M, styleComponent: S);
|
|
11888
|
-
|
|
11889
|
-
|
|
13134
|
+
/** Attaching a 2D entity to the 3D entity so it will follow the style changes */
|
|
13135
|
+
attach(entity: Geometry2D): void;
|
|
13136
|
+
detach(entity: Geometry2D): void;
|
|
11890
13137
|
removeAllEntities(): void;
|
|
11891
13138
|
}
|
|
11892
13139
|
export type TextGeometry3D = Geometry3D<Text3DComponent, Text3DStyleComponent, InteractionComponent, 'text3d'>;
|
|
@@ -11989,27 +13236,29 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry2d' {
|
|
|
11989
13236
|
import type { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
|
|
11990
13237
|
import { type GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
11991
13238
|
export enum Geometry2DComponents {
|
|
11992
|
-
|
|
11993
|
-
|
|
13239
|
+
UI = 0,
|
|
13240
|
+
Interaction = 1
|
|
11994
13241
|
}
|
|
11995
13242
|
export class Geometry2DObject3D extends Object3D {
|
|
11996
13243
|
}
|
|
11997
13244
|
export class Geometry2D {
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
13245
|
+
id: string | number;
|
|
13246
|
+
get type(): 'label' | 'marker';
|
|
13247
|
+
get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
|
|
13248
|
+
/** The geometry3D that this 2D entity is attached to */
|
|
13249
|
+
get attachedTo(): string | number | undefined;
|
|
13250
|
+
verticalOffset: number;
|
|
13251
|
+
/**
|
|
13252
|
+
* When the position of the entity changes, this should be set to true, so that systems like pan bounds can update
|
|
13253
|
+
*/
|
|
13254
|
+
positionDirty: boolean;
|
|
13255
|
+
occluderId?: number;
|
|
13256
|
+
object3d: Geometry2DObject3D;
|
|
13257
|
+
components: [MarkerComponent | LabelComponent, InteractionComponent?];
|
|
13258
|
+
disposed: boolean;
|
|
13259
|
+
constructor(ui: MarkerComponent | LabelComponent, position: Vector3, verticalOffset?: number);
|
|
13260
|
+
get position(): Vector3;
|
|
13261
|
+
setAltitude(z: number): void;
|
|
12013
13262
|
}
|
|
12014
13263
|
}
|
|
12015
13264
|
|
|
@@ -12034,13 +13283,17 @@ declare module '@mappedin/react-sdk/geojson/src/services/text3d/text3d' {
|
|
|
12034
13283
|
import { BatchedText, Text } from 'troika-three-text';
|
|
12035
13284
|
import type { RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
12036
13285
|
import type { Text3DComponent } from '@mappedin/react-sdk/geojson/src/components/text3d';
|
|
13286
|
+
import { syncText } from '@mappedin/react-sdk/geojson/src/services/text3d/utils';
|
|
13287
|
+
export function configureTroikaTextBuilder({ useWorker }: {
|
|
13288
|
+
useWorker: boolean;
|
|
13289
|
+
}): void;
|
|
12037
13290
|
export function createTroikaTextPoint(entityId: string | number, text3DComponent: Text3DComponent, styleComponent: Text3DStyleComponent, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): Promise<{
|
|
12038
13291
|
text: Text;
|
|
12039
13292
|
}>;
|
|
12040
13293
|
export function createTroikaTextArea(entityId: string | number, text3DComponent: Text3DComponent, styleComponent: Text3DStyleComponent, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): Promise<{
|
|
12041
13294
|
text: Text;
|
|
12042
13295
|
} | undefined>;
|
|
12043
|
-
export { BatchedText, Text };
|
|
13296
|
+
export { BatchedText, Text, syncText };
|
|
12044
13297
|
/**
|
|
12045
13298
|
* Promise caches the base64 font string. Then shared across all needed
|
|
12046
13299
|
*/
|
|
@@ -12058,11 +13311,21 @@ declare module '@mappedin/react-sdk/geojson/src/services/text3d/text3d' {
|
|
|
12058
13311
|
export type ModuleType = {
|
|
12059
13312
|
createTroikaTextPoint: typeof createTroikaTextPoint;
|
|
12060
13313
|
createTroikaTextArea: typeof createTroikaTextArea;
|
|
13314
|
+
configureTroikaTextBuilder: typeof configureTroikaTextBuilder;
|
|
12061
13315
|
preloadFont: typeof preloadFont;
|
|
13316
|
+
syncText: typeof syncText;
|
|
12062
13317
|
BatchedText: typeof BatchedText;
|
|
12063
13318
|
};
|
|
12064
13319
|
}
|
|
12065
13320
|
|
|
13321
|
+
declare module '@mappedin/react-sdk/geojson/src/components/focusable' {
|
|
13322
|
+
import type { Mesh } from 'three';
|
|
13323
|
+
export class FocusableComponent {
|
|
13324
|
+
focusMesh?: Mesh;
|
|
13325
|
+
dirty: boolean;
|
|
13326
|
+
}
|
|
13327
|
+
}
|
|
13328
|
+
|
|
12066
13329
|
declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style' {
|
|
12067
13330
|
import { type Shading } from '@mappedin/react-sdk/geojson/src/types';
|
|
12068
13331
|
type GeometryGroupStyle = {
|
|
@@ -12446,6 +13709,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimi
|
|
|
12446
13709
|
import { PubSub } from '@packages/internal/common';
|
|
12447
13710
|
import type { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
12448
13711
|
import type { ModelStyle } from '@mappedin/react-sdk/geojson/src/components/styles';
|
|
13712
|
+
import { OutlineComponent } from '@mappedin/react-sdk/geojson/src/components/outline';
|
|
12449
13713
|
export class MeshCreationAndOptimizationSystem extends PubSub<{
|
|
12450
13714
|
'model-loaded': void;
|
|
12451
13715
|
'geometry-2d-added': void;
|
|
@@ -12455,7 +13719,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimi
|
|
|
12455
13719
|
loader?: GLTFLoader;
|
|
12456
13720
|
constructor(state: RendererState, convertTo3DMapPosition: any);
|
|
12457
13721
|
getGLTFLoader(): Promise<GLTFLoader>;
|
|
12458
|
-
createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D<MeshComponent, StyleComponent, import("../../components/interaction").InteractionComponent, "geometry">;
|
|
13722
|
+
createEntityFromFeature(id: string | number, feature: Feature<Polygon | LineString | MultiPolygon, MeshComponentProperties>, style?: LineStyle | PaintStyle): Geometry3D<MeshComponent, StyleComponent, import("../../components/interaction").InteractionComponent, "geometry", OutlineComponent | undefined>;
|
|
12459
13723
|
createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: Partial<ModelStyle>): ModelGeometry3D;
|
|
12460
13724
|
populateEntityMesh(entity: Geometry3D, geometry: BufferGeometry): void;
|
|
12461
13725
|
populateModelGroup(entities: Set<string | number>, url: string, tree: GeometryGroupObject3D): Promise<Geometry3DObject3D>;
|
|
@@ -12813,7 +14077,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/dom-resize/system' {
|
|
|
12813
14077
|
observers: Map<string | number, ResizeObserver>;
|
|
12814
14078
|
constructor(state: RendererState, domTree: Entity2DHTMLDivElementContainer);
|
|
12815
14079
|
setupObserver(): void;
|
|
12816
|
-
updateDimensions: (mutations:
|
|
14080
|
+
updateDimensions: (mutations: ResizeObserverEntry[]) => void;
|
|
12817
14081
|
update(): void;
|
|
12818
14082
|
destroy(): void;
|
|
12819
14083
|
}
|
|
@@ -12855,9 +14119,9 @@ declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/sy
|
|
|
12855
14119
|
export class OutlineInterpolationSystem {
|
|
12856
14120
|
#private;
|
|
12857
14121
|
/**
|
|
12858
|
-
* Set to true when we need to update the outline
|
|
14122
|
+
* Set to true when we need to update the outline opacity of all entities, regardless of zoom level.
|
|
12859
14123
|
*/
|
|
12860
|
-
|
|
14124
|
+
outlineOpacitiesDirty: boolean;
|
|
12861
14125
|
get geometries3DDirty(): boolean;
|
|
12862
14126
|
set geometries3DDirty(value: boolean);
|
|
12863
14127
|
constructor(rendererState: RendererState);
|
|
@@ -12866,7 +14130,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/sy
|
|
|
12866
14130
|
* @param zoomLevel - The current zoom level.
|
|
12867
14131
|
* @param isCameraZoomDirty - Whether the zoom level has changed since the last update. If this is true, the system will update if zoomLevel falls between range.
|
|
12868
14132
|
*/
|
|
12869
|
-
update(zoomLevel: number, isCameraZoomDirty?: boolean):
|
|
14133
|
+
update(zoomLevel: number, isCameraZoomDirty?: boolean): null | undefined;
|
|
14134
|
+
destroy(): void;
|
|
12870
14135
|
}
|
|
12871
14136
|
}
|
|
12872
14137
|
|
|
@@ -12910,6 +14175,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system
|
|
|
12910
14175
|
resize(): void;
|
|
12911
14176
|
update: (cameraIsMoving?: boolean, cameraStoppedMovingTime?: number) => void;
|
|
12912
14177
|
updateRaf(): void;
|
|
14178
|
+
raycast(): void;
|
|
12913
14179
|
showRaycasters(): void;
|
|
12914
14180
|
hideRaycasters(): void;
|
|
12915
14181
|
destroy(): void;
|
|
@@ -12917,14 +14183,16 @@ declare module '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system
|
|
|
12917
14183
|
}
|
|
12918
14184
|
|
|
12919
14185
|
declare module '@mappedin/react-sdk/geojson/src/systems/outdoor-layers/system' {
|
|
12920
|
-
import type { Map } from '@packages/internal/outdoor-context-v4';
|
|
14186
|
+
import type { LegacyFilterSpecification, Map } from '@packages/internal/outdoor-context-v4';
|
|
12921
14187
|
import type { Position } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
12922
14188
|
import { type BBox } from 'geojson';
|
|
12923
14189
|
export class OutdoorLayers {
|
|
14190
|
+
#private;
|
|
12924
14191
|
dirty: boolean;
|
|
12925
14192
|
hideLayersUnderPoint(point: Position, layers: string[]): void;
|
|
12926
14193
|
hideLayersIntersectingPolygons(bbox: BBox, polygons: GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon, any>[], layers: string[]): void;
|
|
12927
14194
|
constructor(map?: Map);
|
|
14195
|
+
expr: LegacyFilterSpecification[];
|
|
12928
14196
|
destroy(): void;
|
|
12929
14197
|
}
|
|
12930
14198
|
}
|
|
@@ -13008,7 +14276,6 @@ declare module '@mappedin/react-sdk/geojson/src/components/styles/style' {
|
|
|
13008
14276
|
topColor?: string;
|
|
13009
14277
|
texture?: string;
|
|
13010
14278
|
topTexture?: string;
|
|
13011
|
-
outline: boolean;
|
|
13012
14279
|
showImage: boolean;
|
|
13013
14280
|
flipImageToFaceCamera: boolean;
|
|
13014
14281
|
url?: string;
|
|
@@ -13032,7 +14299,6 @@ declare module '@mappedin/react-sdk/geojson/src/components/styles/style' {
|
|
|
13032
14299
|
altitude: number;
|
|
13033
14300
|
join: LineStyle['join'];
|
|
13034
14301
|
cap: LineStyle['cap'];
|
|
13035
|
-
outline: boolean;
|
|
13036
14302
|
showImage: boolean;
|
|
13037
14303
|
flipImageToFaceCamera: boolean;
|
|
13038
14304
|
url?: string;
|
|
@@ -13157,6 +14423,35 @@ declare module '@mappedin/react-sdk/geojson/src/entities' {
|
|
|
13157
14423
|
export type { PathMesh, PatMeshContainer, PathMaterial, Geometry3DTypes, ImageGeometry3D, TextGeometry3D, ModelGeometry3D, CustomGeometry3D, MeshGeometry3D, } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
13158
14424
|
}
|
|
13159
14425
|
|
|
14426
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor' {
|
|
14427
|
+
import { Rectangle } from '@packages/internal/quad-tree';
|
|
14428
|
+
export type TSerializedCollider = {
|
|
14429
|
+
rank: number;
|
|
14430
|
+
enabledAndVisible: boolean;
|
|
14431
|
+
x: number;
|
|
14432
|
+
y: number;
|
|
14433
|
+
bboxes: {
|
|
14434
|
+
index: number;
|
|
14435
|
+
boundingBox: [number, number, number, number];
|
|
14436
|
+
boundingRect?: Rectangle;
|
|
14437
|
+
}[];
|
|
14438
|
+
shouldCollideWithScreenEdges?: boolean;
|
|
14439
|
+
lockedToStrategyIndex?: number;
|
|
14440
|
+
visible?: boolean;
|
|
14441
|
+
};
|
|
14442
|
+
export type TSerializedColliderResponse = [number, 1 | 0, Rectangle?];
|
|
14443
|
+
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
14444
|
+
msgId: string;
|
|
14445
|
+
colliders: TSerializedColliderResponse[];
|
|
14446
|
+
debug: {
|
|
14447
|
+
x: number;
|
|
14448
|
+
y: number;
|
|
14449
|
+
w: number;
|
|
14450
|
+
h: number;
|
|
14451
|
+
}[];
|
|
14452
|
+
};
|
|
14453
|
+
}
|
|
14454
|
+
|
|
13160
14455
|
declare module '@mappedin/react-sdk/geojson/src/systems/exporter/exporter' {
|
|
13161
14456
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
13162
14457
|
export type GLTFExportOptions = {
|
|
@@ -13429,12 +14724,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
|
|
|
13429
14724
|
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
13430
14725
|
class Layer {
|
|
13431
14726
|
containerId: string;
|
|
13432
|
-
labelIds: Set<string>;
|
|
13433
14727
|
layers: Map<string, string>;
|
|
13434
14728
|
renderer: RendererCore;
|
|
13435
14729
|
constructor(renderer: RendererCore, containerId: string, layers?: Map<any, any>);
|
|
13436
|
-
|
|
13437
|
-
|
|
14730
|
+
get visible(): boolean;
|
|
14731
|
+
setVisible(visible: boolean): void;
|
|
13438
14732
|
}
|
|
13439
14733
|
export class FloorObject implements MVFFloor {
|
|
13440
14734
|
#private;
|
|
@@ -13462,18 +14756,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
|
|
|
13462
14756
|
}
|
|
13463
14757
|
|
|
13464
14758
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
13465
|
-
import { Coordinate,
|
|
14759
|
+
import { Coordinate, MapObject, Space, type Floor, type Facade } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
13466
14760
|
import type { EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
|
|
13467
14761
|
import type { PolygonFeatureProperties } from '@packages/internal/mvf-utils';
|
|
13468
14762
|
import type { BBox, FeatureCollection, MultiLineString } from 'geojson';
|
|
13469
|
-
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle, Position,
|
|
13470
|
-
import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model } from '@mappedin/react-sdk/mappedin-js/src';
|
|
13471
|
-
import type {
|
|
14763
|
+
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle, Position, EntityId, PathState } from '@mappedin/core-sdk';
|
|
14764
|
+
import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model, MapData } from '@mappedin/react-sdk/mappedin-js/src';
|
|
14765
|
+
import type { IAnchorable, TDoorsState, TMarkerState, TWallsState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
13472
14766
|
import type { Image, Path, Shape, Text3D } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
13473
14767
|
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
13474
14768
|
import type { Tween } from '@tweenjs/tween.js';
|
|
13475
14769
|
import type { PathSegment } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
|
|
13476
|
-
import { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
|
|
14770
|
+
import type { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
|
|
13477
14771
|
export function convertCoordinateToPosition(coord: Coordinate): Position;
|
|
13478
14772
|
export function convertPositionToCoordinate(coord: Position): Coordinate;
|
|
13479
14773
|
export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
|
|
@@ -13485,7 +14779,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
13485
14779
|
export function translateDoorsStateToGeojsonCore(state: Partial<TDoorsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13486
14780
|
export function translateWallsStateToGeojsonCore(state: Partial<TWallsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13487
14781
|
export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
13488
|
-
export function translateFloorGeometryStateToGeojsonCore(state: TFloorState['geometry']): Partial<GroupContainerState>;
|
|
13489
14782
|
export function differenceBetweenAngles(a: number, b: number): number;
|
|
13490
14783
|
export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
|
|
13491
14784
|
export function convertCollisionRankingTeirToNumber(tier: CollisionRankingTier): number;
|
|
@@ -13507,6 +14800,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
13507
14800
|
export function expandBbox(bbox: BBox, bboxToExpand: BBox): number[];
|
|
13508
14801
|
export function unique<T>(array: T[]): T[];
|
|
13509
14802
|
export function getTargetFloorObject(coordinate: Coordinate, floorsById: Map<string, FloorObject>, defaultFloor: FloorObject): FloorObject;
|
|
14803
|
+
/** Gets the ID of a geometry that 2D entities can attach to */
|
|
14804
|
+
export function getAttachableGeometryId(target: IAnchorable): string | undefined;
|
|
14805
|
+
export function determineFloorVisibleBasedOnPath(path: EntityId<PathState> & {
|
|
14806
|
+
coordinates: Coordinate[];
|
|
14807
|
+
}, mapData: MapData, api: GeoJsonApi): boolean;
|
|
13510
14808
|
}
|
|
13511
14809
|
|
|
13512
14810
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-stack-object' {
|
|
@@ -13534,105 +14832,54 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-stack-obje
|
|
|
13534
14832
|
}
|
|
13535
14833
|
}
|
|
13536
14834
|
|
|
13537
|
-
declare module '@mappedin/react-sdk/
|
|
13538
|
-
import {
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
13548
|
-
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
};
|
|
13553
|
-
/**
|
|
13554
|
-
* @experimental
|
|
13555
|
-
* @internal
|
|
13556
|
-
*/
|
|
13557
|
-
export type TDynamicFocusOptions = {
|
|
13558
|
-
/**
|
|
13559
|
-
* The minimum zoom level at which Dynamic Focus will detect a Facade and reveal the interior spaces.
|
|
13560
|
-
* @default 17
|
|
13561
|
-
*/
|
|
13562
|
-
minZoomLevel?: number;
|
|
14835
|
+
declare module '@mappedin/react-sdk/geojson/src/components/outline' {
|
|
14836
|
+
import type { BufferAttribute, BufferGeometry } from 'three';
|
|
14837
|
+
type Outline = {
|
|
14838
|
+
color: string;
|
|
14839
|
+
dirty: boolean;
|
|
14840
|
+
visible: boolean;
|
|
14841
|
+
edgeColors?: BufferAttribute;
|
|
14842
|
+
ranges?: {
|
|
14843
|
+
start: number;
|
|
14844
|
+
count: number;
|
|
14845
|
+
};
|
|
14846
|
+
geometry?: BufferGeometry;
|
|
14847
|
+
currentOpacity: number;
|
|
14848
|
+
currentColor: [number, number, number];
|
|
14849
|
+
topFaceVerticesIndices?: number[];
|
|
13563
14850
|
};
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
*/
|
|
13579
|
-
enable(options?: TDynamicFocusOptions): void;
|
|
13580
|
-
/**
|
|
13581
|
-
* @experimental
|
|
13582
|
-
* Disables Dynamic Focus and prevents the camera from automatically setting the floor stack when a facade is hovered.
|
|
13583
|
-
*/
|
|
13584
|
-
disable(): void;
|
|
13585
|
-
/**
|
|
13586
|
-
* @experimental
|
|
13587
|
-
* Returns the enabled state of Dynamic Focus.
|
|
13588
|
-
*/
|
|
13589
|
-
get enabled(): boolean;
|
|
13590
|
-
/**
|
|
13591
|
-
* @experimental
|
|
13592
|
-
* Sets the default floor for a floor stack. This is the floor that will be shown when the floor stack is in focus.
|
|
13593
|
-
* See {@link resetDefaultFloorForStack} to reset the default floor.
|
|
13594
|
-
* @param floorStack - The floor stack to set the default floor for.
|
|
13595
|
-
* @param floor - The floor to set as the default floor.
|
|
13596
|
-
*/
|
|
13597
|
-
setDefaultFloorForStack(floorStack: FloorStack, floor: Floor): void;
|
|
13598
|
-
/**
|
|
13599
|
-
* @experimental
|
|
13600
|
-
* Resets the default floor for a floor stack to it's initial value.
|
|
13601
|
-
* @param floorStack - The floor stack to reset the default floor for.
|
|
13602
|
-
*/
|
|
13603
|
-
resetDefaultFloorForStack(floorStack: FloorStack): void;
|
|
14851
|
+
export class OutlineComponent implements Outline {
|
|
14852
|
+
color: string;
|
|
14853
|
+
dirty: boolean;
|
|
14854
|
+
visible: boolean;
|
|
14855
|
+
edgeColors?: BufferAttribute;
|
|
14856
|
+
geometry?: BufferGeometry;
|
|
14857
|
+
ranges?: {
|
|
14858
|
+
start: number;
|
|
14859
|
+
count: number;
|
|
14860
|
+
};
|
|
14861
|
+
topFaceVerticesIndices?: number[];
|
|
14862
|
+
get currentOpacity(): number;
|
|
14863
|
+
get currentColor(): [number, number, number];
|
|
14864
|
+
constructor(color: string);
|
|
13604
14865
|
}
|
|
13605
|
-
type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
13606
14866
|
export {};
|
|
13607
14867
|
}
|
|
13608
14868
|
|
|
13609
|
-
declare module '@mappedin/react-sdk/geojson/src/
|
|
13610
|
-
import {
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
|
|
13617
|
-
|
|
13618
|
-
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
|
|
13622
|
-
|
|
13623
|
-
visible?: boolean;
|
|
13624
|
-
};
|
|
13625
|
-
export type TSerializedColliderResponse = [number, 1 | 0, Rectangle?];
|
|
13626
|
-
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
13627
|
-
msgId: string;
|
|
13628
|
-
colliders: TSerializedColliderResponse[];
|
|
13629
|
-
debug: {
|
|
13630
|
-
x: number;
|
|
13631
|
-
y: number;
|
|
13632
|
-
w: number;
|
|
13633
|
-
h: number;
|
|
13634
|
-
}[];
|
|
13635
|
-
};
|
|
14869
|
+
declare module '@mappedin/react-sdk/geojson/src/services/text3d/utils' {
|
|
14870
|
+
import type { Text } from 'troika-three-text';
|
|
14871
|
+
/**
|
|
14872
|
+
* Load font file and kick off the font processing.
|
|
14873
|
+
* Promise gets resolved when preloadFont finishes.
|
|
14874
|
+
*/
|
|
14875
|
+
export function preloadFont(fontUrl?: string): Promise<string>;
|
|
14876
|
+
/**
|
|
14877
|
+
* Fit text to area with a given max width and height, scaling the font size down if necessary.
|
|
14878
|
+
*/
|
|
14879
|
+
export function fitTextToArea(text: Text, maxWidth: number, maxHeight: number, scaleStep: number): Promise<{
|
|
14880
|
+
size: [width: number, height: number];
|
|
14881
|
+
}>;
|
|
14882
|
+
export function syncText(text: Text): Promise<void>;
|
|
13636
14883
|
}
|
|
13637
14884
|
|
|
13638
14885
|
declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|