@mappedin/react-sdk 6.0.1-beta.52 → 6.0.1-beta.53
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/lib/esm/GLTFExporter-W4OR66GG.js +1 -0
- package/lib/esm/GLTFLoader-CWW4SC4X.js +1 -0
- package/lib/esm/browser-6HMQAV4T.js +1 -0
- package/lib/esm/chunk-2LTL6ZVN.js +1 -0
- package/lib/esm/chunk-5SHMBNLX.js +1 -0
- package/lib/esm/chunk-6X6EHSZ7.js +1 -0
- package/lib/esm/chunk-B7NHRA7S.js +1 -0
- package/lib/esm/chunk-L6SCRGG4.js +1 -0
- package/lib/esm/chunk-PEDEW3M6.js +1 -0
- package/lib/esm/chunk-WVB6PZOJ.js +1 -0
- package/lib/esm/chunk-YGXQDTMT.js +1 -0
- package/lib/esm/dist-NFOUUHU5.js +1 -0
- package/lib/esm/index.d.ts +580 -468
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-DPNZIY36.js +1 -0
- package/lib/esm/internal-A2RG32A3.js +1 -0
- package/lib/esm/outdoor-context-v4-FKKIRNTV.js +1 -0
- package/lib/esm/roboto-regular-3HSVPIGX.js +1 -0
- package/lib/esm/text3d-ZRYODT3I.js +1 -0
- package/package.json +2 -2
- package/lib/esm/GLTFExporter-JCFGXXW5.js +0 -1
- package/lib/esm/GLTFLoader-GIMAVLLC.js +0 -1
- package/lib/esm/browser-FQUMJJAZ.js +0 -1
- package/lib/esm/chunk-6FBLH5OZ.js +0 -1
- package/lib/esm/chunk-C7Z2BO6A.js +0 -1
- package/lib/esm/chunk-ESMYGLKP.js +0 -1
- package/lib/esm/chunk-G6JMXRIH.js +0 -1
- package/lib/esm/chunk-I5JALQAT.js +0 -1
- package/lib/esm/chunk-TOAWRDBC.js +0 -1
- package/lib/esm/chunk-WHD5UHOT.js +0 -1
- package/lib/esm/dist-CQQ2UWYH.js +0 -1
- package/lib/esm/inspector-QLDKCE66.js +0 -1
- package/lib/esm/internal-CBTUOG7Q.js +0 -1
- package/lib/esm/outdoor-context-v4-EIE6B6TE.js +0 -1
- package/lib/esm/text3d-NII2JXSR.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -56,14 +56,13 @@ declare module '@mappedin/react-sdk' {
|
|
|
56
56
|
|
|
57
57
|
declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
58
58
|
import MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
59
|
-
import type { TEvents, TStateChangedInternalPayload, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
59
|
+
import type { TEvents, TMapDataEvents, TStateChangedInternalPayload, TEventPayload, TClickPayload, THoverPayload, TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
60
60
|
import type { TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, Environment, TSearchOptions } from '@mappedin/react-sdk/packages/mvf-utils';
|
|
61
61
|
import { parseMVF, unzipMVF } from '@packages/internal/mvf-utils';
|
|
62
62
|
import type { Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
63
63
|
import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle, OperationHours, SiblingGroup, LocationState } from '@mappedin/mvf-v2';
|
|
64
64
|
import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
65
65
|
export type { Text3D as Text3DApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
66
|
-
export { disableText3DWorker } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
67
66
|
import type { InsetPadding, InsetPaddingOption, Shading, PaintStyle, LineStyle, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, EnvMapOptions, MapViewState, UpdateModelState, InitializeModelState, WatermarkUpdateOptions, Interpolation } from '@mappedin/react-sdk/geojson/src';
|
|
68
67
|
import { enableTestMode, preloadFont } from '@mappedin/react-sdk/geojson/src';
|
|
69
68
|
export type { PubSub } from '@packages/internal/common/pubsub';
|
|
@@ -76,6 +75,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
76
75
|
import type { TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TFollowMode, TFollowCameraOptions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
|
|
77
76
|
import type { TExpandOptions, TStackedMapsEvents, TStackedMapsState } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
78
77
|
import { hydrateMapData, type THydrateMapDataBundle } from '@mappedin/react-sdk/mappedin-js/src/hydrate-map-data';
|
|
78
|
+
export { disableText3DWorker } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
79
79
|
export { hydrateMapData, type THydrateMapDataBundle };
|
|
80
80
|
export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
|
|
81
81
|
/**
|
|
@@ -346,6 +346,15 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
346
346
|
* @default false
|
|
347
347
|
*/
|
|
348
348
|
hideImagesNotOnCurrentFloor?: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* If true, the map will not use web workers. This will turn off outdoor context, and may negatively impact performance of labels and markers.
|
|
351
|
+
* @internal
|
|
352
|
+
*
|
|
353
|
+
* ⚠️ **WARNING**: Setting this to true is not recommended and should only be used for environments where the CSP does not allow web workers.
|
|
354
|
+
* Disabling web workers may significantly degrade performance and disable outdoor map functionality.
|
|
355
|
+
* @default false
|
|
356
|
+
*/
|
|
357
|
+
disableWorkers?: boolean;
|
|
349
358
|
};
|
|
350
359
|
/**
|
|
351
360
|
* @internal
|
|
@@ -387,6 +396,19 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
387
396
|
* @experimental
|
|
388
397
|
*/
|
|
389
398
|
export const createMapLibreOverlay: (mapData: MapData, showMapOptions?: TShow3DMapOptions) => MappedinMapLibreOverlay;
|
|
399
|
+
/**
|
|
400
|
+
* @internal
|
|
401
|
+
*
|
|
402
|
+
* Note: had to add this here to avoid a circular reference when I put it in options
|
|
403
|
+
* TODO: investigate
|
|
404
|
+
*
|
|
405
|
+
* Check if the worker urls are valid
|
|
406
|
+
* @returns false if workers have not been set, and an object with the worker urls if they are set
|
|
407
|
+
*/
|
|
408
|
+
export const checkWorkerUrls: () => Promise<false | {
|
|
409
|
+
collision: boolean;
|
|
410
|
+
maplibre: boolean;
|
|
411
|
+
}>;
|
|
390
412
|
export const show3dMap: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
391
413
|
/**
|
|
392
414
|
* @internal
|
|
@@ -394,7 +416,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
394
416
|
*/
|
|
395
417
|
export const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
396
418
|
export { parseMVF, unzipMVF, enableTestMode, preloadFont, MAPPEDIN_COLORS };
|
|
397
|
-
export type { MapView, MapData, MapViewState, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TStateChangedInternalPayload, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TSearchOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, EnvMapOptions, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, UpdateModelState, InitializeModelState, Interpolation, };
|
|
419
|
+
export type { MapView, MapData, MapViewState, MappedinMapLibreOverlay, TMappedinMapLibreOverlayEvents, TBlueDotEvents, TBlueDotAction, TBlueDotState, GeolocationPositionExtended, TStackedMapsEvents, TExpandOptions, TStackedMapsState, TFollowMode, TFollowCameraOptions, TEvents, TMapDataEvents, TStateChangedInternalPayload, TEventPayload, TFloorChangeReason, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TSearchOptions, TGetMapDataSharedOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, EnvMapOptions, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, Environment, InsetPadding, InsetPaddingOption, OperationHours, SiblingGroup, LocationState, Text3DState, AddText3DOptions, UpdatableText3DState, InitializeText3DState, UpdateModelState, InitializeModelState, Interpolation, };
|
|
398
420
|
export type * from 'geojson';
|
|
399
421
|
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, TCancellablePromise, TAnimateStateResult, GlobalState, TActionType, TBearingType, TConnectionType, } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
400
422
|
export { WALLS, DOORS, ACTION_TYPE, BEARING_TYPE, CONNECTION_TYPE } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
@@ -724,7 +746,6 @@ declare module '@mappedin/react-sdk/react-sdk/src/useMap' {
|
|
|
724
746
|
|
|
725
747
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
726
748
|
import { Analytics } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
727
|
-
import { PubSub } from '@packages/internal/common/pubsub';
|
|
728
749
|
import type { TSearchOptions } from '@packages/internal/mvf-utils';
|
|
729
750
|
import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate, FloorStack, Node, Facade, Area, EnterpriseCategory, EnterpriseLocation, EnterpriseVenue, LocationProfile, LocationCategory } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
730
751
|
import { Search } from '@mappedin/react-sdk/mappedin-js/src/search';
|
|
@@ -732,6 +753,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
732
753
|
import type { Directions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions';
|
|
733
754
|
import type { Query } from '@mappedin/react-sdk/mappedin-js/src/query';
|
|
734
755
|
import type { IGeoJSONData } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
|
|
756
|
+
import type { TMapDataEvents } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
735
757
|
/**
|
|
736
758
|
* A WeakMap to associate {@link MapData} instances with their internal representation.
|
|
737
759
|
* We need a way to get the internal data object from the API
|
|
@@ -792,12 +814,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
792
814
|
* Represents the data for a map, providing access to map elements
|
|
793
815
|
* like spaces, floors, and points of interest.
|
|
794
816
|
*/
|
|
795
|
-
class MapData
|
|
796
|
-
'language-change': {
|
|
797
|
-
code: string;
|
|
798
|
-
name: string;
|
|
799
|
-
};
|
|
800
|
-
}> {
|
|
817
|
+
class MapData {
|
|
801
818
|
#private;
|
|
802
819
|
Analytics: Analytics;
|
|
803
820
|
/**
|
|
@@ -862,6 +879,49 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
862
879
|
constructor(internal: MapDataInternal, { search }?: {
|
|
863
880
|
search?: TSearchOptions;
|
|
864
881
|
});
|
|
882
|
+
/**
|
|
883
|
+
* Subscribe to MapData events.
|
|
884
|
+
*
|
|
885
|
+
* Listen for events emitted by the MapData instance such as language changes.
|
|
886
|
+
*
|
|
887
|
+
* @param eventName The name of the event to listen for.
|
|
888
|
+
* @param fn The callback function to execute when the event is emitted.
|
|
889
|
+
*
|
|
890
|
+
* @example Listen for language changes
|
|
891
|
+
* ```ts
|
|
892
|
+
* mapData.on('language-change', ({ code, name }) => {
|
|
893
|
+
* console.log(`Language changed to ${name} (${code})`);
|
|
894
|
+
*
|
|
895
|
+
* // Update UI to reflect new language
|
|
896
|
+
* updateInterfaceLanguage(code);
|
|
897
|
+
* });
|
|
898
|
+
* ```
|
|
899
|
+
*/
|
|
900
|
+
on: <EventName extends keyof TMapDataEvents>(eventName: EventName, fn: (payload: TMapDataEvents[EventName] extends {
|
|
901
|
+
data: null;
|
|
902
|
+
} ? TMapDataEvents[EventName]["data"] : TMapDataEvents[EventName]) => void) => void;
|
|
903
|
+
/**
|
|
904
|
+
* Unsubscribe from MapData events.
|
|
905
|
+
*
|
|
906
|
+
* @param eventName The name of the event to unsubscribe from.
|
|
907
|
+
* @param fn The callback function that was previously registered with `on()`.
|
|
908
|
+
*
|
|
909
|
+
* @example Remove language change listener
|
|
910
|
+
* ```ts
|
|
911
|
+
* const handleLanguageChange = ({ code, name }) => {
|
|
912
|
+
* console.log(`Language changed to ${name}`);
|
|
913
|
+
* };
|
|
914
|
+
*
|
|
915
|
+
* // Add listener
|
|
916
|
+
* mapData.on('language-change', handleLanguageChange);
|
|
917
|
+
*
|
|
918
|
+
* // Later, remove the listener
|
|
919
|
+
* mapData.off('language-change', handleLanguageChange);
|
|
920
|
+
* ```
|
|
921
|
+
*/
|
|
922
|
+
off: <EventName extends keyof TMapDataEvents>(eventName: EventName, fn: (payload: TMapDataEvents[EventName] extends {
|
|
923
|
+
data: null;
|
|
924
|
+
} ? TMapDataEvents[EventName]["data"] : TMapDataEvents[EventName]) => void) => void;
|
|
865
925
|
/**
|
|
866
926
|
* Get the current environment configuration.
|
|
867
927
|
*
|
|
@@ -1566,19 +1626,19 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
1566
1626
|
/**
|
|
1567
1627
|
* Emitted when the Blue Dot's position is updated.
|
|
1568
1628
|
*/
|
|
1569
|
-
'blue-dot-position-update': TBlueDotEvents['position-update'];
|
|
1629
|
+
'blue-dot-position-update': TBlueDotEvents['blue-dot-position-update'];
|
|
1570
1630
|
/**
|
|
1571
1631
|
* Emitted when the Blue Dot's state changes.
|
|
1572
1632
|
*/
|
|
1573
|
-
'blue-dot-state-change': TBlueDotEvents['state-change'];
|
|
1633
|
+
'blue-dot-state-change': TBlueDotEvents['blue-dot-state-change'];
|
|
1574
1634
|
/**
|
|
1575
1635
|
* Emitted when the Blue Dot encounters an error.
|
|
1576
1636
|
*/
|
|
1577
|
-
'blue-dot-error': TBlueDotEvents['error'];
|
|
1637
|
+
'blue-dot-position-error': TBlueDotEvents['blue-dot-position-error'];
|
|
1578
1638
|
/**
|
|
1579
1639
|
* Emitted when the Blue Dot's follow mode changes.
|
|
1580
1640
|
*/
|
|
1581
|
-
'blue-dot-follow-change': TBlueDotEvents['follow-change'];
|
|
1641
|
+
'blue-dot-follow-change': TBlueDotEvents['blue-dot-follow-change'];
|
|
1582
1642
|
/**
|
|
1583
1643
|
* Emitted when a navigation connection is clicked.
|
|
1584
1644
|
*/
|
|
@@ -1636,6 +1696,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
1636
1696
|
blueDot: boolean;
|
|
1637
1697
|
};
|
|
1638
1698
|
};
|
|
1699
|
+
export type TMapDataEvents = {
|
|
1700
|
+
'language-change': {
|
|
1701
|
+
code: string;
|
|
1702
|
+
name: string;
|
|
1703
|
+
};
|
|
1704
|
+
};
|
|
1639
1705
|
}
|
|
1640
1706
|
|
|
1641
1707
|
declare module '@mappedin/react-sdk/packages/mvf-utils' {
|
|
@@ -1948,7 +2014,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1948
2014
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
1949
2015
|
import { type RendererCore, type WatermarkUpdateOptions } from '@mappedin/react-sdk/geojson/src';
|
|
1950
2016
|
import type { EasingCurve } from '@packages/internal/common';
|
|
1951
|
-
import { PubSub } from '@packages/internal/common';
|
|
1952
2017
|
import { type TEvents, type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
1953
2018
|
import type { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
1954
2019
|
import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
@@ -2048,7 +2113,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
|
|
|
2048
2113
|
*
|
|
2049
2114
|
* For help getting started, refer to the [Getting Started Guide](https://developer.mappedin.com/web-sdk/getting-started).
|
|
2050
2115
|
*/
|
|
2051
|
-
export class MapView
|
|
2116
|
+
export class MapView {
|
|
2052
2117
|
#private;
|
|
2053
2118
|
/**
|
|
2054
2119
|
* Controls for the map's camera.
|
|
@@ -3042,22 +3107,53 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
3042
3107
|
export type { Text3DState } from '@mappedin/react-sdk/geojson/src/components/text3d';
|
|
3043
3108
|
export { TEXT3D_STYLE_UPDATE_PROPS } from '@mappedin/react-sdk/geojson/src/entities/utils';
|
|
3044
3109
|
export { Navigator } from '@mappedin/react-sdk/packages/geojson-navigator';
|
|
3045
|
-
export { debounce } from '@
|
|
3046
|
-
export { MAPPEDIN_LAYER_ID } from '@mappedin/react-sdk/geojson/src/utils/constants';
|
|
3110
|
+
export { interpolate, debounce } from '@packages/internal/common';
|
|
3111
|
+
export { MAPPEDIN_LAYER_ID, MAPLIBRE_WORKER_PATH, COLLISION_WORKER_PATH } from '@mappedin/react-sdk/geojson/src/utils/constants';
|
|
3047
3112
|
export type { DebugState, Debug } from '@mappedin/react-sdk/geojson/src/utils/debug';
|
|
3048
3113
|
/**
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3114
|
+
* Enable test mode for the renderer. This will disable the WebGLRenderer and WebGL1Renderer and replace them with a dummy object
|
|
3115
|
+
* so you can run tests against it
|
|
3116
|
+
*/
|
|
3052
3117
|
export { enableTestMode } from '@mappedin/react-sdk/geojson/src/services/test-mode';
|
|
3053
3118
|
export { mountSceneGraphVisualizer };
|
|
3054
3119
|
export type { EntityId, EntityState, LineStyle, PaintStyle, ModelProperties, Shading, ImagePlacementOptions, } from '@mappedin/react-sdk/geojson/src/types';
|
|
3055
3120
|
export type * from 'geojson';
|
|
3121
|
+
export let maplibreWorkerUrl: string;
|
|
3122
|
+
export function setMaplibreWorkerUrl(url: string): void;
|
|
3123
|
+
export let collisionWorkerUrl: string;
|
|
3124
|
+
/**
|
|
3125
|
+
* Sets the URL for the collision system worker script.
|
|
3126
|
+
*
|
|
3127
|
+
* This function allows specifying a custom URL for the collision system's web worker,
|
|
3128
|
+
* which is particularly useful in environments with strict Content Security Policy (CSP)
|
|
3129
|
+
* that don't allow blob: URLs or inline scripts.
|
|
3130
|
+
*
|
|
3131
|
+
* When provided, the collision system will load its worker from the specified URL
|
|
3132
|
+
* instead of creating an inline worker from a blob. This enables compatibility with
|
|
3133
|
+
* environments that have restrictive CSP settings.
|
|
3134
|
+
*
|
|
3135
|
+
* @param url - The absolute URL pointing to the collision worker script.
|
|
3136
|
+
* This should be a URL where the compiled version of the worker.ts file is hosted.
|
|
3137
|
+
*
|
|
3138
|
+
* @example
|
|
3139
|
+
* ```typescript
|
|
3140
|
+
* // Set a custom URL for the collision worker
|
|
3141
|
+
* import { setWorkerUrl } from '@mappedin/core-sdk';
|
|
3142
|
+
*
|
|
3143
|
+
* // Must be called before initializing any maps
|
|
3144
|
+
* setWorkerUrl('https://cdn.example.com/workers/collision-worker.js');
|
|
3145
|
+
* ```
|
|
3146
|
+
*
|
|
3147
|
+
* @remarks
|
|
3148
|
+
* - This function must be called before any map instances are created
|
|
3149
|
+
* - The worker file must be built and hosted separately as part of your deployment process
|
|
3150
|
+
* - Ideal for applications that need to comply with strict CSP requirements
|
|
3151
|
+
*/
|
|
3152
|
+
export function setCollisionWorkerUrl(url: string): void;
|
|
3056
3153
|
export type { WatermarkUpdateOptions, WatermarkOptions, WatermarkPosition } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
3057
3154
|
export type { CameraSystemState } from '@mappedin/react-sdk/geojson/src/systems/camera/system';
|
|
3058
3155
|
export type { PanBounds } from '@mappedin/react-sdk/geojson/src/systems/camera/types';
|
|
3059
3156
|
export { preloadFont, configureWorker } from '@mappedin/react-sdk/geojson/src/systems/text3d/system';
|
|
3060
|
-
export { setWorkerUrl as setCollisionWorkerUrl } from '@mappedin/react-sdk/geojson/src/systems/collisions/system';
|
|
3061
3157
|
export type { GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter';
|
|
3062
3158
|
export type { AttributionControlOptions, AttributionPosition } from '@mappedin/react-sdk/geojson/src/systems/html-controls/system';
|
|
3063
3159
|
export type { Text3DStyle, ModelStyle } from '@mappedin/react-sdk/geojson/src/components/styles';
|
|
@@ -3066,7 +3162,7 @@ declare module '@mappedin/react-sdk/geojson/src' {
|
|
|
3066
3162
|
export { ANIMATION_TWEENS } from '@mappedin/react-sdk/geojson/src/camera';
|
|
3067
3163
|
export type { AddPathOptions, AddMarkerOptions, AddLabelOptions, AnimateToOptions, FocusOnOptions, MapViewState, MarkerState, PathState, GroupContainerState, GeometryGroupState, ShapeState, CustomGeometryBuilder, LabelState, GeometryState, ModelState, UpdateModelState, InitializeModelState, Camera, InsetPadding, InsetPaddingOption, Position, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload, CollisionRankingTier, LabelAppearance, RendererCore, EnvMapOptions, RendererCoreOptions, Interpolation, };
|
|
3068
3164
|
export function createRenderer(container: HTMLElement, options?: RendererCoreOptions & {
|
|
3069
|
-
|
|
3165
|
+
[key: string]: any;
|
|
3070
3166
|
}): Promise<RendererCore>;
|
|
3071
3167
|
}
|
|
3072
3168
|
|
|
@@ -3076,7 +3172,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay' {
|
|
|
3076
3172
|
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
3077
3173
|
import type { Position } from '@mappedin/core-sdk';
|
|
3078
3174
|
import type { IControl } from '@packages/internal/outdoor-context-v4';
|
|
3079
|
-
import { PubSub } from '@packages/internal/common';
|
|
3080
3175
|
export type TMappedinMapLibreOverlayEvents = {
|
|
3081
3176
|
/**
|
|
3082
3177
|
* Event emitted when the MappedinMap is loaded
|
|
@@ -3145,7 +3240,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay' {
|
|
|
3145
3240
|
*
|
|
3146
3241
|
* Refer to the [Mappedin MapLibre Overlay](https://developer.mappedin.com/web-sdk/mappedin-maplibre-overlay) for more information and interactive examples.
|
|
3147
3242
|
*/
|
|
3148
|
-
export class MappedinMapLibreOverlay
|
|
3243
|
+
export class MappedinMapLibreOverlay implements IControl {
|
|
3149
3244
|
#private;
|
|
3150
3245
|
static instance: MappedinMapLibreOverlay;
|
|
3151
3246
|
/** @internal */
|
|
@@ -4461,7 +4556,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/constants' {
|
|
|
4461
4556
|
|
|
4462
4557
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
|
|
4463
4558
|
import type { RendererCore } from '@mappedin/core-sdk';
|
|
4464
|
-
import {
|
|
4559
|
+
import { EasingCurve } from '@packages/internal/common';
|
|
4465
4560
|
import { Coordinate, type Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4466
4561
|
import type { TBlueDotOptions, TBlueDotPositionUpdate } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
4467
4562
|
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
@@ -4469,7 +4564,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
4469
4564
|
/**
|
|
4470
4565
|
* Emitted when the Blue Dot's position is updated.
|
|
4471
4566
|
*/
|
|
4472
|
-
'position-update': {
|
|
4567
|
+
'blue-dot-position-update': {
|
|
4473
4568
|
floor: Floor | undefined;
|
|
4474
4569
|
heading: GeolocationPosition['coords']['heading'] | undefined;
|
|
4475
4570
|
accuracy: GeolocationPosition['coords']['accuracy'] | undefined;
|
|
@@ -4478,7 +4573,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
4478
4573
|
/**
|
|
4479
4574
|
* Emitted when the Blue Dot's state changes.
|
|
4480
4575
|
*/
|
|
4481
|
-
'state-change': {
|
|
4576
|
+
'blue-dot-state-change': {
|
|
4482
4577
|
/**
|
|
4483
4578
|
* The new state of the Blue Dot.
|
|
4484
4579
|
*/
|
|
@@ -4489,13 +4584,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
4489
4584
|
action: TBlueDotAction;
|
|
4490
4585
|
};
|
|
4491
4586
|
/**
|
|
4492
|
-
* Emitted when the Blue Dot encounters
|
|
4587
|
+
* Emitted when the Blue Dot encounters a GeolocationPositionError.
|
|
4493
4588
|
*/
|
|
4494
|
-
error: GeolocationPositionError;
|
|
4589
|
+
'blue-dot-position-error': GeolocationPositionError;
|
|
4495
4590
|
/**
|
|
4496
4591
|
* Emitted when the Blue Dot's following state changes.
|
|
4497
4592
|
*/
|
|
4498
|
-
'follow-change': {
|
|
4593
|
+
'blue-dot-follow-change': {
|
|
4499
4594
|
/**
|
|
4500
4595
|
* Whether the Blue Dot is following the user.
|
|
4501
4596
|
*/
|
|
@@ -4539,7 +4634,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
4539
4634
|
* mapView.BlueDot.follow('position-and-heading', { zoomLevel: 21, pitch: 45 });
|
|
4540
4635
|
*
|
|
4541
4636
|
* // Listen for state changes
|
|
4542
|
-
* mapView.
|
|
4637
|
+
* mapView.on('blue-dot-state-change', ({ state, action }) => {
|
|
4543
4638
|
* console.log('BlueDot state:', state, 'Action:', action);
|
|
4544
4639
|
* });
|
|
4545
4640
|
* ```
|
|
@@ -4554,7 +4649,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
4554
4649
|
*
|
|
4555
4650
|
* This class is accessed using {@link MapView.BlueDot}.
|
|
4556
4651
|
*/
|
|
4557
|
-
export class BlueDot
|
|
4652
|
+
export class BlueDot {
|
|
4558
4653
|
#private;
|
|
4559
4654
|
/**
|
|
4560
4655
|
* The current state of the BlueDot. Can be 'hidden', 'active', 'inactive', or 'disabled'.
|
|
@@ -4592,7 +4687,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-do
|
|
|
4592
4687
|
/**
|
|
4593
4688
|
* @internal
|
|
4594
4689
|
*/
|
|
4595
|
-
constructor(core: RendererCore,
|
|
4690
|
+
constructor(core: RendererCore, api: GeoJsonApi);
|
|
4596
4691
|
/**
|
|
4597
4692
|
* Enable the Blue Dot. It will be hidden until a position is received either from the browser or by calling {@link BlueDot.update}.
|
|
4598
4693
|
* @param options - The options to setup the Blue Dot (see {@link TBlueDotOptions}).
|
|
@@ -4915,7 +5010,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/debug' {
|
|
|
4915
5010
|
|
|
4916
5011
|
declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
|
|
4917
5012
|
import { type TDirectionInstruction } from '@mappedin/react-sdk/mappedin-js/src';
|
|
4918
|
-
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
4919
5013
|
import type { Directions, GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
4920
5014
|
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
4921
5015
|
import type { Floor, FloorStack } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
@@ -5101,6 +5195,21 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
|
|
|
5101
5195
|
* Emitted when the navigation state changes.
|
|
5102
5196
|
*/
|
|
5103
5197
|
'navigation-state-change': NavigationState;
|
|
5198
|
+
/**
|
|
5199
|
+
* Emitted when a connection point is clicked.
|
|
5200
|
+
*/
|
|
5201
|
+
'navigation-connection-click': {
|
|
5202
|
+
fromFloor?: Floor;
|
|
5203
|
+
toFloor: Floor;
|
|
5204
|
+
instruction: TDirectionInstruction;
|
|
5205
|
+
};
|
|
5206
|
+
/**
|
|
5207
|
+
* Emitted when the active path changes.
|
|
5208
|
+
*/
|
|
5209
|
+
'navigation-active-path-change': {
|
|
5210
|
+
directions: Directions;
|
|
5211
|
+
path: Path;
|
|
5212
|
+
};
|
|
5104
5213
|
};
|
|
5105
5214
|
/**
|
|
5106
5215
|
* When a user needs to get from point A to point B, drawing a path on the map helps them to navigate to their destination. It can help them to visualize the route they'll need to take, like a good treasure map.
|
|
@@ -5113,7 +5222,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
|
|
|
5113
5222
|
*
|
|
5114
5223
|
* Refer to the [Drawing Navigation](https://developer.mappedin.com/web-sdk/wayfinding#drawing-navigation) in the Wayfinding Guide for more information and interactive examples.
|
|
5115
5224
|
*/
|
|
5116
|
-
export class Navigation
|
|
5225
|
+
export class Navigation {
|
|
5117
5226
|
#private;
|
|
5118
5227
|
/**
|
|
5119
5228
|
* @internal
|
|
@@ -5194,6 +5303,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
|
|
|
5194
5303
|
|
|
5195
5304
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
5196
5305
|
import type { RendererCore, WatermarkUpdateOptions } from '@mappedin/core-sdk';
|
|
5306
|
+
import { PubSub } from '@packages/internal/common';
|
|
5197
5307
|
import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
5198
5308
|
import { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
5199
5309
|
import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
|
|
@@ -5202,7 +5312,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5202
5312
|
import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
|
|
5203
5313
|
import { Label, Marker, Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
5204
5314
|
import { Text3D as Text3DView, Model, Path, type Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
5205
|
-
import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
5315
|
+
import { Navigation, type TNavigationEvents } from '@mappedin/react-sdk/mappedin-js/src/navigation';
|
|
5206
5316
|
import type { TGetState, TUpdateState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
5207
5317
|
import { Camera } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera';
|
|
5208
5318
|
import { Exporter } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/exporter';
|
|
@@ -5212,9 +5322,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5212
5322
|
import { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
|
|
5213
5323
|
import { Models } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/models';
|
|
5214
5324
|
import { Paths } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths';
|
|
5215
|
-
import type { BlueDotState } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot';
|
|
5325
|
+
import type { BlueDotState, TBlueDotEvents } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot';
|
|
5216
5326
|
import { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot';
|
|
5217
|
-
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
5327
|
+
import type { TEvents, TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
5218
5328
|
import { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
|
|
5219
5329
|
import { Style } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/style';
|
|
5220
5330
|
import Outdoor from '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor';
|
|
@@ -5222,7 +5332,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5222
5332
|
import { Text3D } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/text3d';
|
|
5223
5333
|
import { PathSegment } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
|
|
5224
5334
|
import { Tween } from '@tweenjs/tween.js';
|
|
5225
|
-
export class GeoJsonApi {
|
|
5335
|
+
export class GeoJsonApi extends PubSub<TBlueDotEvents & TNavigationEvents> {
|
|
5226
5336
|
#private;
|
|
5227
5337
|
core: RendererCore;
|
|
5228
5338
|
mapObjects: GeojsonApiMapObject[];
|
|
@@ -5238,6 +5348,13 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5238
5348
|
layers: string[]
|
|
5239
5349
|
][];
|
|
5240
5350
|
mapView: MapView;
|
|
5351
|
+
/**
|
|
5352
|
+
* External event bus for MapView - bridges internal API events to public API.
|
|
5353
|
+
*
|
|
5354
|
+
* Internal systems publish events here which are then exposed to developers via
|
|
5355
|
+
* MapView.on() and MapView.off().
|
|
5356
|
+
*/
|
|
5357
|
+
externalPubSub: PubSub<TEvents>;
|
|
5241
5358
|
get manualFloorVisibility(): boolean;
|
|
5242
5359
|
set manualFloorVisibility(value: boolean);
|
|
5243
5360
|
Camera: Camera;
|
|
@@ -5254,7 +5371,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
|
|
|
5254
5371
|
Style: Style;
|
|
5255
5372
|
Images: Images;
|
|
5256
5373
|
get StackedMaps(): import("..").StackedMaps;
|
|
5257
|
-
constructor(rendererCore: RendererCore, mapView: MapView);
|
|
5374
|
+
constructor(rendererCore: RendererCore, mapView: MapView, externalPubSub: PubSub<TEvents>);
|
|
5258
5375
|
preloadFloors(floors: Floor[]): void;
|
|
5259
5376
|
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;
|
|
5260
5377
|
update: () => void;
|
|
@@ -12223,107 +12340,6 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator' {
|
|
|
12223
12340
|
export * from '@mappedin/react-sdk/packages/geojson-navigator/src';
|
|
12224
12341
|
}
|
|
12225
12342
|
|
|
12226
|
-
declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
12227
|
-
import type { Object3D, PerspectiveCamera, Camera as THREECamera } from 'three';
|
|
12228
|
-
import { BoxGeometry, Mesh, MeshBasicMaterial, Box2 } from 'three';
|
|
12229
|
-
import { MercatorCoordinate } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
12230
|
-
import type { CustomLayerInterface } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
12231
|
-
import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
12232
|
-
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
12233
|
-
import type { Geometry3DTypes } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
12234
|
-
import type { Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
12235
|
-
import type { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
12236
|
-
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
12237
|
-
export { isFiniteBox } from '@packages/internal/common';
|
|
12238
|
-
import type { Position as GeoJSONPosition } from 'geojson';
|
|
12239
|
-
export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
|
|
12240
|
-
lat: number;
|
|
12241
|
-
lon: number;
|
|
12242
|
-
};
|
|
12243
|
-
export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
|
|
12244
|
-
x: number;
|
|
12245
|
-
y: number;
|
|
12246
|
-
};
|
|
12247
|
-
export const populateGeometry3DIdsInScene: (tree: GroupContainerObject3D["children"][0] | Object3D, entities: RendererState["geometry3DIdsInScene"], loadGeometryGroupIds: RendererState["geometryGroupIdsToLoad"]) => Set<string | number>;
|
|
12248
|
-
export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
|
|
12249
|
-
export function convertMapLibreStylePaintProps(paint: any): {
|
|
12250
|
-
color: any;
|
|
12251
|
-
height: any;
|
|
12252
|
-
altitude: any;
|
|
12253
|
-
opacity: any;
|
|
12254
|
-
outline: any;
|
|
12255
|
-
};
|
|
12256
|
-
export function convertMapLibreLineStylePaintProps(paint: any): {
|
|
12257
|
-
color: any;
|
|
12258
|
-
join: any;
|
|
12259
|
-
opacity: any;
|
|
12260
|
-
width: any;
|
|
12261
|
-
cap: any;
|
|
12262
|
-
};
|
|
12263
|
-
export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
|
|
12264
|
-
export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
|
|
12265
|
-
export function getRequestHeaders(authURL: string): Promise<{
|
|
12266
|
-
'x-mappedin-tiles-key': string;
|
|
12267
|
-
}>;
|
|
12268
|
-
export function cyrb53(str: string, seed?: number): number;
|
|
12269
|
-
/**
|
|
12270
|
-
/* getProjectionScaleFactor()
|
|
12271
|
-
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
12272
|
-
/*
|
|
12273
|
-
* R
|
|
12274
|
-
* /|
|
|
12275
|
-
* C : Camera / |
|
|
12276
|
-
* PQ : Projection Plane / |
|
|
12277
|
-
* OR : Origin / |
|
|
12278
|
-
* F : FOV / |
|
|
12279
|
-
* Q / |
|
|
12280
|
-
* /| |
|
|
12281
|
-
* / | |
|
|
12282
|
-
* / | |
|
|
12283
|
-
* / | |
|
|
12284
|
-
* / | |
|
|
12285
|
-
* / F/2 | |
|
|
12286
|
-
* C ------------P------------ O
|
|
12287
|
-
*
|
|
12288
|
-
*
|
|
12289
|
-
* ProjectionScaleFactor = ( OR / PQ )
|
|
12290
|
-
* PQ = canvasHeight / 2
|
|
12291
|
-
* CQ = zoom
|
|
12292
|
-
*
|
|
12293
|
-
* OR / C0 = tan(F/2)
|
|
12294
|
-
* so OR = CO * tan(F/2)
|
|
12295
|
-
*/
|
|
12296
|
-
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
12297
|
-
export function getBoundingBoxCenter(bbox: Position[]): [number, number];
|
|
12298
|
-
export { getCornersOfBoundingBox } from '@mappedin/react-sdk/geojson/src/utils/bounding-box';
|
|
12299
|
-
export { getGeometryByGeometryId } from '@mappedin/react-sdk/geojson/src/utils/ecs';
|
|
12300
|
-
export { getPixelRatio } from '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio';
|
|
12301
|
-
export { debounce } from '@mappedin/react-sdk/geojson/src/utils/async';
|
|
12302
|
-
export { shouldDisableOffscreenCanvas } from '@mappedin/react-sdk/geojson/src/utils/browser';
|
|
12303
|
-
export { noop, pick, isEmpty, type KeysOfUnion } from '@mappedin/react-sdk/geojson/src/utils/fp';
|
|
12304
|
-
export { transformRequest } from '@mappedin/react-sdk/geojson/src/utils/tranform-request';
|
|
12305
|
-
export { normalizeAngle } from '@mappedin/react-sdk/geojson/src/utils/math';
|
|
12306
|
-
export function shouldExpandZoomLevel(minZoomFromCurrentPanBounds: number, cameraZoomLevel: number): boolean;
|
|
12307
|
-
export function getGroupContainerOpacity(entity: Geometry3DTypes | GeometryGroupObject3D): number;
|
|
12308
|
-
/**
|
|
12309
|
-
* Checks if two coordinate arrays are equal within a small tolerance to handle floating point precision issues.
|
|
12310
|
-
*
|
|
12311
|
-
* @param coord1 - First coordinate [longitude, latitude] or [longitude, latitude, altitude]
|
|
12312
|
-
* @param coord2 - Second coordinate [longitude, latitude] or [longitude, latitude, altitude]
|
|
12313
|
-
* @param tolerance - Tolerance for floating point comparison (default: 1e-10)
|
|
12314
|
-
* @returns True if coordinates are equal within tolerance
|
|
12315
|
-
*/
|
|
12316
|
-
export function coordinatesEqual(coord1: GeoJSONPosition, coord2: GeoJSONPosition, tolerance?: number): boolean;
|
|
12317
|
-
export const MAPLIBRE_FRUSTRUM_CULL_HACK_NAME = "maplibre-frustum-culling-hack";
|
|
12318
|
-
/**
|
|
12319
|
-
* TODO: Find the actual root of the problem and fix it.
|
|
12320
|
-
* This is a hack to get around some geometry disappearing when we're added as a layer in maplibre.
|
|
12321
|
-
*/
|
|
12322
|
-
export function maplibreFrustrumCullHack(): Mesh<BoxGeometry, MeshBasicMaterial, import("three").Object3DEventMap>;
|
|
12323
|
-
export function projectToBox2D(object: Object3D, camera: PerspectiveCamera, result?: Box2): Box2;
|
|
12324
|
-
export function drawProjectedBox(box: Box2, color: string, container: HTMLElement): HTMLDivElement;
|
|
12325
|
-
}
|
|
12326
|
-
|
|
12327
12343
|
declare module '@mappedin/react-sdk/geojson/src/utils/constants' {
|
|
12328
12344
|
import type { InsetPadding } from '@mappedin/react-sdk/geojson/src/types';
|
|
12329
12345
|
export const DEFAULT_INSET_PADDING: InsetPadding;
|
|
@@ -12339,6 +12355,8 @@ declare module '@mappedin/react-sdk/geojson/src/utils/constants' {
|
|
|
12339
12355
|
* Duration of zoom in/out animation when double tapping with one finger or single tapping with two fingers.
|
|
12340
12356
|
*/
|
|
12341
12357
|
export const TAP_ZOOM_DURATION = 250;
|
|
12358
|
+
export const COLLISION_WORKER_PATH = "collision-worker.csp.js";
|
|
12359
|
+
export const MAPLIBRE_WORKER_PATH = "maplibre-worker.csp.js";
|
|
12342
12360
|
}
|
|
12343
12361
|
|
|
12344
12362
|
declare module '@mappedin/react-sdk/geojson/src/utils/debug' {
|
|
@@ -13174,8 +13192,9 @@ declare module '@mappedin/react-sdk/geojson/src/systems/text3d/system' {
|
|
|
13174
13192
|
}> {
|
|
13175
13193
|
textSet: Set<string>;
|
|
13176
13194
|
batchedTextMap: Map<GroupContainerObject3D, Promise<BatchedText>>;
|
|
13195
|
+
useWorker: boolean;
|
|
13177
13196
|
remove(id: string): void;
|
|
13178
|
-
constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
|
|
13197
|
+
constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition'], useWorker?: boolean);
|
|
13179
13198
|
update(cameraRotationRadians: number): Promise<void[]>;
|
|
13180
13199
|
showTextAreaMesh(): void;
|
|
13181
13200
|
hideTextAreaMesh(): void;
|
|
@@ -13196,126 +13215,13 @@ declare module '@mappedin/react-sdk/geojson/src/systems/text3d/system' {
|
|
|
13196
13215
|
export const DEFAULT_VERTICAL_OFFSET = 0.5;
|
|
13197
13216
|
}
|
|
13198
13217
|
|
|
13199
|
-
declare module '@mappedin/react-sdk/geojson/src/systems/
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
import {
|
|
13205
|
-
import
|
|
13206
|
-
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor';
|
|
13207
|
-
import type { WatermarkPosition } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
13208
|
-
export type TMessageEvent = MessageEvent<{
|
|
13209
|
-
msgId: string;
|
|
13210
|
-
colliders: TSerializedColliderResponse[];
|
|
13211
|
-
debug: {
|
|
13212
|
-
x: number;
|
|
13213
|
-
y: number;
|
|
13214
|
-
w: number;
|
|
13215
|
-
h: number;
|
|
13216
|
-
}[];
|
|
13217
|
-
}>;
|
|
13218
|
-
export type TMessage = {
|
|
13219
|
-
msgId: string;
|
|
13220
|
-
totalWidth: number;
|
|
13221
|
-
totalHeight: number;
|
|
13222
|
-
watermarkWidth: number;
|
|
13223
|
-
watermarkHeight: number;
|
|
13224
|
-
watermarkPosition: WatermarkPosition;
|
|
13225
|
-
colliders: TSerializedCollider[];
|
|
13226
|
-
devicePixelRatio: number;
|
|
13227
|
-
};
|
|
13228
|
-
type TCollisionSystemEvent = {
|
|
13229
|
-
'visibility-changed': undefined;
|
|
13230
|
-
};
|
|
13231
|
-
export type PackedBBox = [x: number, y: number, w: number, h: number, index: number];
|
|
13232
|
-
export type PackedBBoxes = PackedBBox[];
|
|
13233
|
-
export type PackedCollider = [
|
|
13234
|
-
bboxes: PackedBBoxes,
|
|
13235
|
-
enabled: 0 | 1,
|
|
13236
|
-
alwaysVisible: 0 | 1,
|
|
13237
|
-
x: number,
|
|
13238
|
-
y: number,
|
|
13239
|
-
shouldCollideWithScreenEdges?: 0 | 1,
|
|
13240
|
-
onlyExposeStrategyIndex?: number
|
|
13241
|
-
];
|
|
13242
|
-
export type PackedMessage = [
|
|
13243
|
-
colliders: PackedCollider[],
|
|
13244
|
-
devicePixelRatio: number,
|
|
13245
|
-
totalHeight: number,
|
|
13246
|
-
totalWidth: number,
|
|
13247
|
-
watermarkWidth: number,
|
|
13248
|
-
watermarkHeight: number,
|
|
13249
|
-
watermarkPosition: WatermarkPosition
|
|
13250
|
-
];
|
|
13251
|
-
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
13252
|
-
collidersDirty: boolean;
|
|
13253
|
-
packedMessage: PackedMessage;
|
|
13254
|
-
visibleCollidersQTree: QuadTree<{
|
|
13255
|
-
entityId: string | number;
|
|
13256
|
-
}>;
|
|
13257
|
-
interactiveCollidersQTree: QuadTree<{
|
|
13258
|
-
entityId: string | number;
|
|
13259
|
-
}>;
|
|
13260
|
-
coreState: RendererState;
|
|
13261
|
-
constructor(debugCanvas: HTMLCanvasElement, coreState: RendererState, worker?: Worker);
|
|
13262
|
-
postMessage: () => void;
|
|
13263
|
-
showCollisionBoxes: () => void;
|
|
13264
|
-
hideCollisionBoxes: () => void;
|
|
13265
|
-
currentMsgId: string;
|
|
13266
|
-
working: boolean;
|
|
13267
|
-
componentArray: (MarkerComponent | LabelComponent)[];
|
|
13268
|
-
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean) => void;
|
|
13269
|
-
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
13270
|
-
/**
|
|
13271
|
-
* Resolve collisions
|
|
13272
|
-
*/
|
|
13273
|
-
resolve: (e: MessageEvent<{
|
|
13274
|
-
msgId: string;
|
|
13275
|
-
colliders: TSerializedColliderResponse[];
|
|
13276
|
-
}>) => void;
|
|
13277
|
-
drawDebug: () => void;
|
|
13278
|
-
destroy: () => void;
|
|
13279
|
-
}
|
|
13280
|
-
/**
|
|
13281
|
-
* Sets the URL for the collision system worker script.
|
|
13282
|
-
*
|
|
13283
|
-
* This function allows specifying a custom URL for the collision system's web worker,
|
|
13284
|
-
* which is particularly useful in environments with strict Content Security Policy (CSP)
|
|
13285
|
-
* that don't allow blob: URLs or inline scripts.
|
|
13286
|
-
*
|
|
13287
|
-
* When provided, the collision system will load its worker from the specified URL
|
|
13288
|
-
* instead of creating an inline worker from a blob. This enables compatibility with
|
|
13289
|
-
* environments that have restrictive CSP settings.
|
|
13290
|
-
*
|
|
13291
|
-
* @param url - The absolute URL pointing to the collision worker script.
|
|
13292
|
-
* This should be a URL where the compiled version of the worker.ts file is hosted.
|
|
13293
|
-
*
|
|
13294
|
-
* @example
|
|
13295
|
-
* ```typescript
|
|
13296
|
-
* // Set a custom URL for the collision worker
|
|
13297
|
-
* import { setWorkerUrl } from '@mappedin/core-sdk';
|
|
13298
|
-
*
|
|
13299
|
-
* // Must be called before initializing any maps
|
|
13300
|
-
* setWorkerUrl('https://cdn.example.com/workers/collision-worker.js');
|
|
13301
|
-
* ```
|
|
13302
|
-
*
|
|
13303
|
-
* @remarks
|
|
13304
|
-
* - This function must be called before any map instances are created
|
|
13305
|
-
* - The worker file must be built and hosted separately as part of your deployment process
|
|
13306
|
-
* - Ideal for applications that need to comply with strict CSP requirements
|
|
13307
|
-
*/
|
|
13308
|
-
export function setWorkerUrl(url: string): void;
|
|
13309
|
-
export {};
|
|
13310
|
-
}
|
|
13311
|
-
|
|
13312
|
-
declare module '@mappedin/react-sdk/geojson/src/systems/exporter' {
|
|
13313
|
-
export { ExporterSystem, type GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter/exporter';
|
|
13314
|
-
}
|
|
13315
|
-
|
|
13316
|
-
declare module '@mappedin/react-sdk/geojson/src/systems/html-controls/system' {
|
|
13317
|
-
import type { Map } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
13318
|
-
import '../../styles/html-controls.scss';
|
|
13218
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/exporter' {
|
|
13219
|
+
export { ExporterSystem, type GLTFExportOptions } from '@mappedin/react-sdk/geojson/src/systems/exporter/exporter';
|
|
13220
|
+
}
|
|
13221
|
+
|
|
13222
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/html-controls/system' {
|
|
13223
|
+
import type { Map } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
13224
|
+
import '../../styles/html-controls.scss';
|
|
13319
13225
|
/**
|
|
13320
13226
|
* All possible control anchor positions.
|
|
13321
13227
|
*/
|
|
@@ -13362,12 +13268,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
13362
13268
|
import { PubSub } from '@packages/internal/common';
|
|
13363
13269
|
import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId, Text3DState } from '@mappedin/core-sdk';
|
|
13364
13270
|
import { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
|
|
13365
|
-
import type {
|
|
13366
|
-
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddImageOptions,
|
|
13271
|
+
import type { TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
13272
|
+
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddImageOptions, TAddText3DOptions, IAnchorable, TAddLabelOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
13367
13273
|
import { type AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
|
|
13368
13274
|
import { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
13369
13275
|
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
13370
|
-
import type {
|
|
13276
|
+
import type { Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
13371
13277
|
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
13372
13278
|
import { Space, Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
13373
13279
|
import { type GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
@@ -13383,15 +13289,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
13383
13289
|
floorId: string;
|
|
13384
13290
|
previousFloorId: string;
|
|
13385
13291
|
};
|
|
13386
|
-
'navigation-connection-click': {
|
|
13387
|
-
fromFloor?: Floor;
|
|
13388
|
-
toFloor: Floor;
|
|
13389
|
-
instruction: TDirectionInstruction;
|
|
13390
|
-
};
|
|
13391
|
-
'navigation-active-path-change': {
|
|
13392
|
-
directions: Directions;
|
|
13393
|
-
path: Path;
|
|
13394
|
-
};
|
|
13395
13292
|
}> {
|
|
13396
13293
|
#private;
|
|
13397
13294
|
floorStacksById: Map<string, FloorStackObject>;
|
|
@@ -13762,68 +13659,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/text3d' {
|
|
|
13762
13659
|
}
|
|
13763
13660
|
}
|
|
13764
13661
|
|
|
13765
|
-
declare module '@mappedin/react-sdk/packages/common/pubsub' {
|
|
13766
|
-
/**
|
|
13767
|
-
* Generic PubSub class implementing the Publish-Subscribe pattern for event handling.
|
|
13768
|
-
*
|
|
13769
|
-
* @template EVENT_PAYLOAD - The type of the event payload.
|
|
13770
|
-
* @template EVENT - The type of the event.
|
|
13771
|
-
*/
|
|
13772
|
-
export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
|
|
13773
|
-
/**
|
|
13774
|
-
* @private
|
|
13775
|
-
* @internal
|
|
13776
|
-
*/
|
|
13777
|
-
_subscribers: any;
|
|
13778
|
-
/**
|
|
13779
|
-
* @private
|
|
13780
|
-
* @internal
|
|
13781
|
-
*/
|
|
13782
|
-
publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
|
|
13783
|
-
/**
|
|
13784
|
-
* Subscribe a function to an event.
|
|
13785
|
-
*
|
|
13786
|
-
* @param eventName An event name which, when fired, will call the provided
|
|
13787
|
-
* function.
|
|
13788
|
-
* @param fn A callback that gets called when the corresponding event is fired. The
|
|
13789
|
-
* callback will get passed an argument with a type that's one of event payloads.
|
|
13790
|
-
* @example
|
|
13791
|
-
* // Subscribe to the 'click' event
|
|
13792
|
-
* const handler = (event) => {
|
|
13793
|
-
* const { coordinate } = event;
|
|
13794
|
-
* const { latitude, longitude } = coordinate;
|
|
13795
|
-
* console.log(`Map was clicked at ${latitude}, ${longitude}`);
|
|
13796
|
-
* };
|
|
13797
|
-
* map.on('click', handler);
|
|
13798
|
-
*/
|
|
13799
|
-
on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
|
|
13800
|
-
data: null;
|
|
13801
|
-
} ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
13802
|
-
/**
|
|
13803
|
-
* Unsubscribe a function previously subscribed with {@link on}
|
|
13804
|
-
*
|
|
13805
|
-
* @param eventName An event name to which the provided function was previously
|
|
13806
|
-
* subscribed.
|
|
13807
|
-
* @param fn A function that was previously passed to {@link on}. The function must
|
|
13808
|
-
* have the same reference as the function that was subscribed.
|
|
13809
|
-
* @example
|
|
13810
|
-
* // Unsubscribe from the 'click' event
|
|
13811
|
-
* const handler = (event) => {
|
|
13812
|
-
* console.log('Map was clicked', event);
|
|
13813
|
-
* };
|
|
13814
|
-
* map.off('click', handler);
|
|
13815
|
-
*/
|
|
13816
|
-
off<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
|
|
13817
|
-
data: null;
|
|
13818
|
-
} ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
13819
|
-
/**
|
|
13820
|
-
* @private
|
|
13821
|
-
* @internal
|
|
13822
|
-
*/
|
|
13823
|
-
destroy(): void;
|
|
13824
|
-
}
|
|
13825
|
-
}
|
|
13826
|
-
|
|
13827
13662
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera' {
|
|
13828
13663
|
import type { IFocusable, TCameraAnimationOptions, TCameraTarget, TFocusOnOptions, TCameraInteractionsSetOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
13829
13664
|
import type { InsetPadding } from '@mappedin/react-sdk/geojson/src';
|
|
@@ -14855,7 +14690,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor' {
|
|
|
14855
14690
|
|
|
14856
14691
|
declare module '@mappedin/react-sdk/mappedin-js/src/navigation/index' {
|
|
14857
14692
|
import { type TDirectionInstruction } from '@mappedin/react-sdk/mappedin-js/src';
|
|
14858
|
-
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
14859
14693
|
import type { Directions, GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
14860
14694
|
import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
|
|
14861
14695
|
import type { Floor, FloorStack } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
@@ -15041,6 +14875,21 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation/index' {
|
|
|
15041
14875
|
* Emitted when the navigation state changes.
|
|
15042
14876
|
*/
|
|
15043
14877
|
'navigation-state-change': NavigationState;
|
|
14878
|
+
/**
|
|
14879
|
+
* Emitted when a connection point is clicked.
|
|
14880
|
+
*/
|
|
14881
|
+
'navigation-connection-click': {
|
|
14882
|
+
fromFloor?: Floor;
|
|
14883
|
+
toFloor: Floor;
|
|
14884
|
+
instruction: TDirectionInstruction;
|
|
14885
|
+
};
|
|
14886
|
+
/**
|
|
14887
|
+
* Emitted when the active path changes.
|
|
14888
|
+
*/
|
|
14889
|
+
'navigation-active-path-change': {
|
|
14890
|
+
directions: Directions;
|
|
14891
|
+
path: Path;
|
|
14892
|
+
};
|
|
15044
14893
|
};
|
|
15045
14894
|
/**
|
|
15046
14895
|
* When a user needs to get from point A to point B, drawing a path on the map helps them to navigate to their destination. It can help them to visualize the route they'll need to take, like a good treasure map.
|
|
@@ -15053,7 +14902,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation/index' {
|
|
|
15053
14902
|
*
|
|
15054
14903
|
* Refer to the [Drawing Navigation](https://developer.mappedin.com/web-sdk/wayfinding#drawing-navigation) in the Wayfinding Guide for more information and interactive examples.
|
|
15055
14904
|
*/
|
|
15056
|
-
export class Navigation
|
|
14905
|
+
export class Navigation {
|
|
15057
14906
|
#private;
|
|
15058
14907
|
/**
|
|
15059
14908
|
* @internal
|
|
@@ -15530,9 +15379,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/query/external' {
|
|
|
15530
15379
|
*/
|
|
15531
15380
|
| 'same-elevation';
|
|
15532
15381
|
/**
|
|
15533
|
-
* The radius to search for features within
|
|
15382
|
+
* The radius to search for features within, only used if useLineOfSight is true
|
|
15534
15383
|
*/
|
|
15535
15384
|
radius?: number;
|
|
15385
|
+
/**
|
|
15386
|
+
* Whether to use line of sight checks to filter results. This ensures that results aren't obstructed by walls, etc.
|
|
15387
|
+
* @default true
|
|
15388
|
+
*/
|
|
15389
|
+
lineOfSight?: boolean;
|
|
15536
15390
|
/**
|
|
15537
15391
|
* The types to query for
|
|
15538
15392
|
*/
|
|
@@ -15585,12 +15439,20 @@ declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
|
|
|
15585
15439
|
/**
|
|
15586
15440
|
* @internal
|
|
15587
15441
|
*/
|
|
15588
|
-
sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
|
|
15442
|
+
sendMapViewLoadedEvent({ firstRenderDuration, dimension, collisionWorkerDisabled, outdoorsWorkerDisabled, }: {
|
|
15589
15443
|
firstRenderDuration: number;
|
|
15590
15444
|
dimension: {
|
|
15591
15445
|
height: number;
|
|
15592
15446
|
width: number;
|
|
15593
15447
|
};
|
|
15448
|
+
/**
|
|
15449
|
+
* True when setWorkerURL is set, but the worker file cannot be found, so we disable the collision worker and use sync collision detection instead
|
|
15450
|
+
*/
|
|
15451
|
+
collisionWorkerDisabled: boolean;
|
|
15452
|
+
/**
|
|
15453
|
+
* True when setWorkerURL is set, but the worker file cannot be found, so we disable the outdoor context
|
|
15454
|
+
*/
|
|
15455
|
+
outdoorsWorkerDisabled: boolean;
|
|
15594
15456
|
}): void | Promise<Response> | Promise<void>;
|
|
15595
15457
|
/**
|
|
15596
15458
|
* @internal
|
|
@@ -15916,6 +15778,90 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/opening-hou
|
|
|
15916
15778
|
}
|
|
15917
15779
|
}
|
|
15918
15780
|
|
|
15781
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/system' {
|
|
15782
|
+
import { QuadTree } from '@packages/internal/quad-tree';
|
|
15783
|
+
import '../../styles/collisions.scss';
|
|
15784
|
+
import type { MarkerComponent } from '@mappedin/react-sdk/geojson/src/components/marker';
|
|
15785
|
+
import type LabelComponent from '@mappedin/react-sdk/geojson/src/components/label';
|
|
15786
|
+
import { PubSub } from '@mappedin/react-sdk/packages/common/pubsub';
|
|
15787
|
+
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
15788
|
+
import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor';
|
|
15789
|
+
import type { WatermarkPosition } from '@mappedin/react-sdk/geojson/src/systems/watermark/system';
|
|
15790
|
+
export type TMessageEvent = MessageEvent<{
|
|
15791
|
+
msgId: string;
|
|
15792
|
+
colliders: TSerializedColliderResponse[];
|
|
15793
|
+
debug: {
|
|
15794
|
+
x: number;
|
|
15795
|
+
y: number;
|
|
15796
|
+
w: number;
|
|
15797
|
+
h: number;
|
|
15798
|
+
}[];
|
|
15799
|
+
}>;
|
|
15800
|
+
export type TMessage = {
|
|
15801
|
+
msgId: string;
|
|
15802
|
+
totalWidth: number;
|
|
15803
|
+
totalHeight: number;
|
|
15804
|
+
watermarkWidth: number;
|
|
15805
|
+
watermarkHeight: number;
|
|
15806
|
+
watermarkPosition: WatermarkPosition;
|
|
15807
|
+
colliders: TSerializedCollider[];
|
|
15808
|
+
devicePixelRatio: number;
|
|
15809
|
+
};
|
|
15810
|
+
type TCollisionSystemEvent = {
|
|
15811
|
+
'visibility-changed': undefined;
|
|
15812
|
+
};
|
|
15813
|
+
export type PackedBBox = [x: number, y: number, w: number, h: number, index: number];
|
|
15814
|
+
export type PackedBBoxes = PackedBBox[];
|
|
15815
|
+
export type PackedCollider = [
|
|
15816
|
+
bboxes: PackedBBoxes,
|
|
15817
|
+
enabled: 0 | 1,
|
|
15818
|
+
alwaysVisible: 0 | 1,
|
|
15819
|
+
x: number,
|
|
15820
|
+
y: number,
|
|
15821
|
+
shouldCollideWithScreenEdges?: 0 | 1,
|
|
15822
|
+
onlyExposeStrategyIndex?: number
|
|
15823
|
+
];
|
|
15824
|
+
export type PackedMessage = [
|
|
15825
|
+
colliders: PackedCollider[],
|
|
15826
|
+
devicePixelRatio: number,
|
|
15827
|
+
totalHeight: number,
|
|
15828
|
+
totalWidth: number,
|
|
15829
|
+
watermarkWidth: number,
|
|
15830
|
+
watermarkHeight: number,
|
|
15831
|
+
watermarkPosition: WatermarkPosition
|
|
15832
|
+
];
|
|
15833
|
+
export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
15834
|
+
collidersDirty: boolean;
|
|
15835
|
+
packedMessage: PackedMessage;
|
|
15836
|
+
visibleCollidersQTree: QuadTree<{
|
|
15837
|
+
entityId: string | number;
|
|
15838
|
+
}>;
|
|
15839
|
+
interactiveCollidersQTree: QuadTree<{
|
|
15840
|
+
entityId: string | number;
|
|
15841
|
+
}>;
|
|
15842
|
+
coreState: RendererState;
|
|
15843
|
+
constructor(debugCanvas: HTMLCanvasElement, coreState: RendererState, useWorker?: boolean);
|
|
15844
|
+
postMessage: () => void;
|
|
15845
|
+
showCollisionBoxes: () => void;
|
|
15846
|
+
hideCollisionBoxes: () => void;
|
|
15847
|
+
currentMsgId: string;
|
|
15848
|
+
working: boolean;
|
|
15849
|
+
componentArray: (MarkerComponent | LabelComponent)[];
|
|
15850
|
+
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean) => void;
|
|
15851
|
+
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
|
|
15852
|
+
/**
|
|
15853
|
+
* Resolve collisions
|
|
15854
|
+
*/
|
|
15855
|
+
resolve: (e: MessageEvent<{
|
|
15856
|
+
msgId: string;
|
|
15857
|
+
colliders: TSerializedColliderResponse[];
|
|
15858
|
+
}>) => void;
|
|
15859
|
+
drawDebug: () => void;
|
|
15860
|
+
destroy: () => void;
|
|
15861
|
+
}
|
|
15862
|
+
export {};
|
|
15863
|
+
}
|
|
15864
|
+
|
|
15919
15865
|
declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
|
|
15920
15866
|
import { Object3D } from 'three';
|
|
15921
15867
|
import type { Mesh, Object3DEventMap, ShaderMaterial, Texture, TubeGeometry, Color, Vector2, Raycaster } from 'three';
|
|
@@ -16398,6 +16344,8 @@ declare module '@mappedin/react-sdk/geojson/src/types/options' {
|
|
|
16398
16344
|
occlusionEnabled?: boolean;
|
|
16399
16345
|
/** Callback to intercept and modify requests for images. */
|
|
16400
16346
|
transformImageRequest?: TransformImageRequest;
|
|
16347
|
+
useWorkers?: boolean;
|
|
16348
|
+
useCollisionWorker?: boolean;
|
|
16401
16349
|
}>;
|
|
16402
16350
|
}
|
|
16403
16351
|
|
|
@@ -16432,6 +16380,68 @@ declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimi
|
|
|
16432
16380
|
}
|
|
16433
16381
|
}
|
|
16434
16382
|
|
|
16383
|
+
declare module '@mappedin/react-sdk/packages/common/pubsub' {
|
|
16384
|
+
/**
|
|
16385
|
+
* Generic PubSub class implementing the Publish-Subscribe pattern for event handling.
|
|
16386
|
+
*
|
|
16387
|
+
* @template EVENT_PAYLOAD - The type of the event payload.
|
|
16388
|
+
* @template EVENT - The type of the event.
|
|
16389
|
+
*/
|
|
16390
|
+
export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
|
|
16391
|
+
/**
|
|
16392
|
+
* @private
|
|
16393
|
+
* @internal
|
|
16394
|
+
*/
|
|
16395
|
+
_subscribers: any;
|
|
16396
|
+
/**
|
|
16397
|
+
* @private
|
|
16398
|
+
* @internal
|
|
16399
|
+
*/
|
|
16400
|
+
publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
|
|
16401
|
+
/**
|
|
16402
|
+
* Subscribe a function to an event.
|
|
16403
|
+
*
|
|
16404
|
+
* @param eventName An event name which, when fired, will call the provided
|
|
16405
|
+
* function.
|
|
16406
|
+
* @param fn A callback that gets called when the corresponding event is fired. The
|
|
16407
|
+
* callback will get passed an argument with a type that's one of event payloads.
|
|
16408
|
+
* @example
|
|
16409
|
+
* // Subscribe to the 'click' event
|
|
16410
|
+
* const handler = (event) => {
|
|
16411
|
+
* const { coordinate } = event;
|
|
16412
|
+
* const { latitude, longitude } = coordinate;
|
|
16413
|
+
* console.log(`Map was clicked at ${latitude}, ${longitude}`);
|
|
16414
|
+
* };
|
|
16415
|
+
* map.on('click', handler);
|
|
16416
|
+
*/
|
|
16417
|
+
on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
|
|
16418
|
+
data: null;
|
|
16419
|
+
} ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
16420
|
+
/**
|
|
16421
|
+
* Unsubscribe a function previously subscribed with {@link on}
|
|
16422
|
+
*
|
|
16423
|
+
* @param eventName An event name to which the provided function was previously
|
|
16424
|
+
* subscribed.
|
|
16425
|
+
* @param fn A function that was previously passed to {@link on}. The function must
|
|
16426
|
+
* have the same reference as the function that was subscribed.
|
|
16427
|
+
* @example
|
|
16428
|
+
* // Unsubscribe from the 'click' event
|
|
16429
|
+
* const handler = (event) => {
|
|
16430
|
+
* console.log('Map was clicked', event);
|
|
16431
|
+
* };
|
|
16432
|
+
* map.off('click', handler);
|
|
16433
|
+
*/
|
|
16434
|
+
off<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
|
|
16435
|
+
data: null;
|
|
16436
|
+
} ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
|
|
16437
|
+
/**
|
|
16438
|
+
* @private
|
|
16439
|
+
* @internal
|
|
16440
|
+
*/
|
|
16441
|
+
destroy(): void;
|
|
16442
|
+
}
|
|
16443
|
+
}
|
|
16444
|
+
|
|
16435
16445
|
declare module '@mappedin/react-sdk/geojson/src/services/renderer' {
|
|
16436
16446
|
import type { Scene, Camera } from 'three';
|
|
16437
16447
|
import { Color, WebGLRenderer } from 'three';
|
|
@@ -17069,6 +17079,107 @@ declare module '@mappedin/react-sdk/geojson/src/systems/geometry-disposal/system
|
|
|
17069
17079
|
}
|
|
17070
17080
|
}
|
|
17071
17081
|
|
|
17082
|
+
declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
17083
|
+
import type { Object3D, PerspectiveCamera, Camera as THREECamera } from 'three';
|
|
17084
|
+
import { BoxGeometry, Mesh, MeshBasicMaterial, Box2 } from 'three';
|
|
17085
|
+
import { MercatorCoordinate } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
17086
|
+
import type { CustomLayerInterface } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
17087
|
+
import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
17088
|
+
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
17089
|
+
import type { Geometry3DTypes } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
17090
|
+
import type { Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
17091
|
+
import type { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
17092
|
+
import { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
17093
|
+
export { isFiniteBox } from '@packages/internal/common';
|
|
17094
|
+
import type { Position as GeoJSONPosition } from 'geojson';
|
|
17095
|
+
export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
|
|
17096
|
+
lat: number;
|
|
17097
|
+
lon: number;
|
|
17098
|
+
};
|
|
17099
|
+
export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
|
|
17100
|
+
x: number;
|
|
17101
|
+
y: number;
|
|
17102
|
+
};
|
|
17103
|
+
export const populateGeometry3DIdsInScene: (tree: GroupContainerObject3D["children"][0] | Object3D, entities: RendererState["geometry3DIdsInScene"], loadGeometryGroupIds: RendererState["geometryGroupIdsToLoad"]) => Set<string | number>;
|
|
17104
|
+
export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
|
|
17105
|
+
export function convertMapLibreStylePaintProps(paint: any): {
|
|
17106
|
+
color: any;
|
|
17107
|
+
height: any;
|
|
17108
|
+
altitude: any;
|
|
17109
|
+
opacity: any;
|
|
17110
|
+
outline: any;
|
|
17111
|
+
};
|
|
17112
|
+
export function convertMapLibreLineStylePaintProps(paint: any): {
|
|
17113
|
+
color: any;
|
|
17114
|
+
join: any;
|
|
17115
|
+
opacity: any;
|
|
17116
|
+
width: any;
|
|
17117
|
+
cap: any;
|
|
17118
|
+
};
|
|
17119
|
+
export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
|
|
17120
|
+
export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
|
|
17121
|
+
export function getRequestHeaders(authURL: string): Promise<{
|
|
17122
|
+
'x-mappedin-tiles-key': string;
|
|
17123
|
+
}>;
|
|
17124
|
+
export function cyrb53(str: string, seed?: number): number;
|
|
17125
|
+
/**
|
|
17126
|
+
/* getProjectionScaleFactor()
|
|
17127
|
+
/* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
|
|
17128
|
+
/*
|
|
17129
|
+
* R
|
|
17130
|
+
* /|
|
|
17131
|
+
* C : Camera / |
|
|
17132
|
+
* PQ : Projection Plane / |
|
|
17133
|
+
* OR : Origin / |
|
|
17134
|
+
* F : FOV / |
|
|
17135
|
+
* Q / |
|
|
17136
|
+
* /| |
|
|
17137
|
+
* / | |
|
|
17138
|
+
* / | |
|
|
17139
|
+
* / | |
|
|
17140
|
+
* / | |
|
|
17141
|
+
* / F/2 | |
|
|
17142
|
+
* C ------------P------------ O
|
|
17143
|
+
*
|
|
17144
|
+
*
|
|
17145
|
+
* ProjectionScaleFactor = ( OR / PQ )
|
|
17146
|
+
* PQ = canvasHeight / 2
|
|
17147
|
+
* CQ = zoom
|
|
17148
|
+
*
|
|
17149
|
+
* OR / C0 = tan(F/2)
|
|
17150
|
+
* so OR = CO * tan(F/2)
|
|
17151
|
+
*/
|
|
17152
|
+
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
17153
|
+
export function getBoundingBoxCenter(bbox: Position[]): [number, number];
|
|
17154
|
+
export { getCornersOfBoundingBox } from '@mappedin/react-sdk/geojson/src/utils/bounding-box';
|
|
17155
|
+
export { getGeometryByGeometryId } from '@mappedin/react-sdk/geojson/src/utils/ecs';
|
|
17156
|
+
export { getPixelRatio } from '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio';
|
|
17157
|
+
export { debounce } from '@mappedin/react-sdk/geojson/src/utils/async';
|
|
17158
|
+
export { shouldDisableOffscreenCanvas } from '@mappedin/react-sdk/geojson/src/utils/browser';
|
|
17159
|
+
export { noop, pick, isEmpty, type KeysOfUnion } from '@mappedin/react-sdk/geojson/src/utils/fp';
|
|
17160
|
+
export { transformRequest } from '@mappedin/react-sdk/geojson/src/utils/tranform-request';
|
|
17161
|
+
export { normalizeAngle } from '@mappedin/react-sdk/geojson/src/utils/math';
|
|
17162
|
+
export function shouldExpandZoomLevel(minZoomFromCurrentPanBounds: number, cameraZoomLevel: number): boolean;
|
|
17163
|
+
export function getGroupContainerOpacity(entity: Geometry3DTypes | GeometryGroupObject3D): number;
|
|
17164
|
+
/**
|
|
17165
|
+
* Checks if two coordinate arrays are equal within a small tolerance to handle floating point precision issues.
|
|
17166
|
+
*
|
|
17167
|
+
* @param coord1 - First coordinate [longitude, latitude] or [longitude, latitude, altitude]
|
|
17168
|
+
* @param coord2 - Second coordinate [longitude, latitude] or [longitude, latitude, altitude]
|
|
17169
|
+
* @param tolerance - Tolerance for floating point comparison (default: 1e-10)
|
|
17170
|
+
* @returns True if coordinates are equal within tolerance
|
|
17171
|
+
*/
|
|
17172
|
+
export function coordinatesEqual(coord1: GeoJSONPosition, coord2: GeoJSONPosition, tolerance?: number): boolean;
|
|
17173
|
+
export const MAPLIBRE_FRUSTRUM_CULL_HACK_NAME = "maplibre-frustum-culling-hack";
|
|
17174
|
+
/**
|
|
17175
|
+
* TODO: Find the actual root of the problem and fix it.
|
|
17176
|
+
* This is a hack to get around some geometry disappearing when we're added as a layer in maplibre.
|
|
17177
|
+
*/
|
|
17178
|
+
export function maplibreFrustrumCullHack(): Mesh<BoxGeometry, MeshBasicMaterial, import("three").Object3DEventMap>;
|
|
17179
|
+
export function projectToBox2D(object: Object3D, camera: PerspectiveCamera, result?: Box2): Box2;
|
|
17180
|
+
export function drawProjectedBox(box: Box2, color: string, container: HTMLElement): HTMLDivElement;
|
|
17181
|
+
}
|
|
17182
|
+
|
|
17072
17183
|
declare module '@mappedin/react-sdk/geojson/src/components/styles/style' {
|
|
17073
17184
|
import type { LineStyle } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
17074
17185
|
export const DEFAULT_COLOR = "#ffffff";
|
|
@@ -17135,104 +17246,6 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src' {
|
|
|
17135
17246
|
export type { CoordinateFeature, CoordinateProperties } from '@mappedin/react-sdk/packages/geojson-navigator/src/types/coordinate';
|
|
17136
17247
|
}
|
|
17137
17248
|
|
|
17138
|
-
declare module '@mappedin/react-sdk/geojson/src/utils/bounding-box' {
|
|
17139
|
-
import { type Box3, Vector3 } from 'three';
|
|
17140
|
-
export function getCornersOfBoundingBox(boundingBox: Box3): Vector3[];
|
|
17141
|
-
}
|
|
17142
|
-
|
|
17143
|
-
declare module '@mappedin/react-sdk/geojson/src/utils/ecs' {
|
|
17144
|
-
import type { Geometry2D, Geometry3DTypes } from '@mappedin/react-sdk/geojson/src/entities';
|
|
17145
|
-
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
17146
|
-
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
17147
|
-
import type { EntityId, EntityState, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
17148
|
-
import { Box3, Vector3 } from 'three';
|
|
17149
|
-
import type RendererCore from '@mappedin/react-sdk/geojson/src/renderer';
|
|
17150
|
-
export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D | Geometry2D | undefined;
|
|
17151
|
-
export function getVerticesOfEntity(core: RendererCore, geometryOrGeometryId?: string | number | EntityId<EntityState>, vertices?: Vector3[], bounds?: Box3, zOffset?: number): Vector3[];
|
|
17152
|
-
}
|
|
17153
|
-
|
|
17154
|
-
declare module '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio' {
|
|
17155
|
-
export function getPixelRatio(): number;
|
|
17156
|
-
}
|
|
17157
|
-
|
|
17158
|
-
declare module '@mappedin/react-sdk/geojson/src/utils/async' {
|
|
17159
|
-
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
17160
|
-
export function debounce<T extends (...args: any[]) => void>(func: T, wait: number, immediate?: boolean): (...args: Parameters<T>) => void;
|
|
17161
|
-
}
|
|
17162
|
-
|
|
17163
|
-
declare module '@mappedin/react-sdk/geojson/src/utils/browser' {
|
|
17164
|
-
type DeviceType = {
|
|
17165
|
-
isIpad: boolean;
|
|
17166
|
-
isMobile: boolean;
|
|
17167
|
-
isSafari12: boolean;
|
|
17168
|
-
isFirefox: boolean;
|
|
17169
|
-
isWindows: boolean;
|
|
17170
|
-
};
|
|
17171
|
-
/**
|
|
17172
|
-
* Get device OS info
|
|
17173
|
-
* export for testing purpose
|
|
17174
|
-
* @returns DeviceType
|
|
17175
|
-
*/
|
|
17176
|
-
export const _deviceTypeControl: {
|
|
17177
|
-
getDeviceType(): DeviceType;
|
|
17178
|
-
_reset(): void;
|
|
17179
|
-
};
|
|
17180
|
-
export const getDeviceType: () => DeviceType;
|
|
17181
|
-
/**
|
|
17182
|
-
* Creates a closure encapsulating the logic of getting device GPU info.
|
|
17183
|
-
* inspired by https://github.com/pmndrs/detect-gpu
|
|
17184
|
-
* export for testing
|
|
17185
|
-
*/
|
|
17186
|
-
export const _gpuInfoControl: {
|
|
17187
|
-
getInfo: () => string | undefined;
|
|
17188
|
-
shouldDisableOffscreenCanvas: () => boolean;
|
|
17189
|
-
_setCanvas(c: HTMLCanvasElement): void;
|
|
17190
|
-
};
|
|
17191
|
-
export const getGPUInfo: () => string | undefined;
|
|
17192
|
-
/**
|
|
17193
|
-
* Check if device is certain intel integrated GPU.
|
|
17194
|
-
* This is for implementing workaround - https://issues.chromium.org/issues/40251953
|
|
17195
|
-
* The reason we want to disable OffscreenCanvas at all is due to `willReadFrequently` flag only works in FF.
|
|
17196
|
-
* In order to ensure the integrated intel GPU render text correctly
|
|
17197
|
-
*/
|
|
17198
|
-
export const shouldDisableOffscreenCanvas: () => boolean;
|
|
17199
|
-
export {};
|
|
17200
|
-
}
|
|
17201
|
-
|
|
17202
|
-
declare module '@mappedin/react-sdk/geojson/src/utils/fp' {
|
|
17203
|
-
export function noop(): void;
|
|
17204
|
-
export type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
17205
|
-
/**
|
|
17206
|
-
* Given an object and a number of properties as strings, return version
|
|
17207
|
-
* of that object with only those properties.
|
|
17208
|
-
*
|
|
17209
|
-
* @param src - the object
|
|
17210
|
-
* @param properties - an array of property names chosen
|
|
17211
|
-
* to appear on the resulting object.
|
|
17212
|
-
* @returns object with limited properties.
|
|
17213
|
-
* @example
|
|
17214
|
-
* ```ts
|
|
17215
|
-
* let foo = { name: 'Charlie', age: 10 };
|
|
17216
|
-
* let justName = pick(foo, ['name']); // justName = { name: 'Charlie' }
|
|
17217
|
-
* ```
|
|
17218
|
-
*/
|
|
17219
|
-
export function pick<T extends object>(src: T, properties: KeysOfUnion<T>[]): Partial<T>;
|
|
17220
|
-
export function isEmpty(obj: Record<string, any>): boolean;
|
|
17221
|
-
}
|
|
17222
|
-
|
|
17223
|
-
declare module '@mappedin/react-sdk/geojson/src/utils/tranform-request' {
|
|
17224
|
-
export const transformRequest: (headers: {
|
|
17225
|
-
"x-mappedin-tiles-key": string;
|
|
17226
|
-
}) => (url: string) => {
|
|
17227
|
-
url: string;
|
|
17228
|
-
headers: {};
|
|
17229
|
-
};
|
|
17230
|
-
}
|
|
17231
|
-
|
|
17232
|
-
declare module '@mappedin/react-sdk/geojson/src/utils/math' {
|
|
17233
|
-
export function normalizeAngle(angle: number): number;
|
|
17234
|
-
}
|
|
17235
|
-
|
|
17236
17249
|
declare module '@mappedin/react-sdk/geojson/src/entities' {
|
|
17237
17250
|
export { updateInteractivity } from '@mappedin/react-sdk/geojson/src/entities/utils';
|
|
17238
17251
|
export { Geometry2D, Geometry2DComponents } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
@@ -17271,35 +17284,6 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/helpers' {
|
|
|
17271
17284
|
export * from '@mappedin/react-sdk/geojson/src/systems/camera/helpers/utils';
|
|
17272
17285
|
}
|
|
17273
17286
|
|
|
17274
|
-
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor' {
|
|
17275
|
-
import { Rectangle } from '@packages/internal/quad-tree';
|
|
17276
|
-
export type TSerializedCollider = {
|
|
17277
|
-
rank: number;
|
|
17278
|
-
enabledAndVisible: boolean;
|
|
17279
|
-
x: number;
|
|
17280
|
-
y: number;
|
|
17281
|
-
bboxes: {
|
|
17282
|
-
index: number;
|
|
17283
|
-
boundingBox: [number, number, number, number];
|
|
17284
|
-
boundingRect?: Rectangle;
|
|
17285
|
-
}[];
|
|
17286
|
-
shouldCollideWithScreenEdges?: boolean;
|
|
17287
|
-
lockedToStrategyIndex?: number;
|
|
17288
|
-
visible?: boolean;
|
|
17289
|
-
};
|
|
17290
|
-
export type TSerializedColliderResponse = [number, 1 | 0, Rectangle?];
|
|
17291
|
-
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
17292
|
-
msgId: string;
|
|
17293
|
-
colliders: TSerializedColliderResponse[];
|
|
17294
|
-
debug: {
|
|
17295
|
-
x: number;
|
|
17296
|
-
y: number;
|
|
17297
|
-
w: number;
|
|
17298
|
-
h: number;
|
|
17299
|
-
}[];
|
|
17300
|
-
};
|
|
17301
|
-
}
|
|
17302
|
-
|
|
17303
17287
|
declare module '@mappedin/react-sdk/geojson/src/systems/exporter/exporter' {
|
|
17304
17288
|
import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
17305
17289
|
export type GLTFExportOptions = {
|
|
@@ -17766,6 +17750,35 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/utils
|
|
|
17766
17750
|
export function getNodesFromTarget(target: TNavigationTarget, mapData: MapDataInternal): string[];
|
|
17767
17751
|
}
|
|
17768
17752
|
|
|
17753
|
+
declare module '@mappedin/react-sdk/geojson/src/systems/collisions/collider-processor' {
|
|
17754
|
+
import { Rectangle } from '@packages/internal/quad-tree';
|
|
17755
|
+
export type TSerializedCollider = {
|
|
17756
|
+
rank: number;
|
|
17757
|
+
enabledAndVisible: boolean;
|
|
17758
|
+
x: number;
|
|
17759
|
+
y: number;
|
|
17760
|
+
bboxes: {
|
|
17761
|
+
index: number;
|
|
17762
|
+
boundingBox: [number, number, number, number];
|
|
17763
|
+
boundingRect?: Rectangle;
|
|
17764
|
+
}[];
|
|
17765
|
+
shouldCollideWithScreenEdges?: boolean;
|
|
17766
|
+
lockedToStrategyIndex?: number;
|
|
17767
|
+
visible?: boolean;
|
|
17768
|
+
};
|
|
17769
|
+
export type TSerializedColliderResponse = [number, 1 | 0, Rectangle?];
|
|
17770
|
+
export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
|
|
17771
|
+
msgId: string;
|
|
17772
|
+
colliders: TSerializedColliderResponse[];
|
|
17773
|
+
debug: {
|
|
17774
|
+
x: number;
|
|
17775
|
+
y: number;
|
|
17776
|
+
w: number;
|
|
17777
|
+
h: number;
|
|
17778
|
+
}[];
|
|
17779
|
+
};
|
|
17780
|
+
}
|
|
17781
|
+
|
|
17769
17782
|
declare module '@mappedin/react-sdk/geojson/src/components/outline' {
|
|
17770
17783
|
import type { BufferAttribute, BufferGeometry } from 'three';
|
|
17771
17784
|
type Outline = {
|
|
@@ -25778,6 +25791,104 @@ declare module '@mappedin/react-sdk/geojson/src/systems/path/system' {
|
|
|
25778
25791
|
}
|
|
25779
25792
|
}
|
|
25780
25793
|
|
|
25794
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/bounding-box' {
|
|
25795
|
+
import { type Box3, Vector3 } from 'three';
|
|
25796
|
+
export function getCornersOfBoundingBox(boundingBox: Box3): Vector3[];
|
|
25797
|
+
}
|
|
25798
|
+
|
|
25799
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/ecs' {
|
|
25800
|
+
import type { Geometry2D, Geometry3DTypes } from '@mappedin/react-sdk/geojson/src/entities';
|
|
25801
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
25802
|
+
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
25803
|
+
import type { EntityId, EntityState, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
25804
|
+
import { Box3, Vector3 } from 'three';
|
|
25805
|
+
import type RendererCore from '@mappedin/react-sdk/geojson/src/renderer';
|
|
25806
|
+
export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D | Geometry2D | undefined;
|
|
25807
|
+
export function getVerticesOfEntity(core: RendererCore, geometryOrGeometryId?: string | number | EntityId<EntityState>, vertices?: Vector3[], bounds?: Box3, zOffset?: number): Vector3[];
|
|
25808
|
+
}
|
|
25809
|
+
|
|
25810
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio' {
|
|
25811
|
+
export function getPixelRatio(): number;
|
|
25812
|
+
}
|
|
25813
|
+
|
|
25814
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/async' {
|
|
25815
|
+
export function throttle<T>(func: () => void, wait: number, options?: any): () => void;
|
|
25816
|
+
export function debounce<T extends (...args: any[]) => void>(func: T, wait: number, immediate?: boolean): (...args: Parameters<T>) => void;
|
|
25817
|
+
}
|
|
25818
|
+
|
|
25819
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/browser' {
|
|
25820
|
+
type DeviceType = {
|
|
25821
|
+
isIpad: boolean;
|
|
25822
|
+
isMobile: boolean;
|
|
25823
|
+
isSafari12: boolean;
|
|
25824
|
+
isFirefox: boolean;
|
|
25825
|
+
isWindows: boolean;
|
|
25826
|
+
};
|
|
25827
|
+
/**
|
|
25828
|
+
* Get device OS info
|
|
25829
|
+
* export for testing purpose
|
|
25830
|
+
* @returns DeviceType
|
|
25831
|
+
*/
|
|
25832
|
+
export const _deviceTypeControl: {
|
|
25833
|
+
getDeviceType(): DeviceType;
|
|
25834
|
+
_reset(): void;
|
|
25835
|
+
};
|
|
25836
|
+
export const getDeviceType: () => DeviceType;
|
|
25837
|
+
/**
|
|
25838
|
+
* Creates a closure encapsulating the logic of getting device GPU info.
|
|
25839
|
+
* inspired by https://github.com/pmndrs/detect-gpu
|
|
25840
|
+
* export for testing
|
|
25841
|
+
*/
|
|
25842
|
+
export const _gpuInfoControl: {
|
|
25843
|
+
getInfo: () => string | undefined;
|
|
25844
|
+
shouldDisableOffscreenCanvas: () => boolean;
|
|
25845
|
+
_setCanvas(c: HTMLCanvasElement): void;
|
|
25846
|
+
};
|
|
25847
|
+
export const getGPUInfo: () => string | undefined;
|
|
25848
|
+
/**
|
|
25849
|
+
* Check if device is certain intel integrated GPU.
|
|
25850
|
+
* This is for implementing workaround - https://issues.chromium.org/issues/40251953
|
|
25851
|
+
* The reason we want to disable OffscreenCanvas at all is due to `willReadFrequently` flag only works in FF.
|
|
25852
|
+
* In order to ensure the integrated intel GPU render text correctly
|
|
25853
|
+
*/
|
|
25854
|
+
export const shouldDisableOffscreenCanvas: () => boolean;
|
|
25855
|
+
export {};
|
|
25856
|
+
}
|
|
25857
|
+
|
|
25858
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/fp' {
|
|
25859
|
+
export function noop(): void;
|
|
25860
|
+
export type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
25861
|
+
/**
|
|
25862
|
+
* Given an object and a number of properties as strings, return version
|
|
25863
|
+
* of that object with only those properties.
|
|
25864
|
+
*
|
|
25865
|
+
* @param src - the object
|
|
25866
|
+
* @param properties - an array of property names chosen
|
|
25867
|
+
* to appear on the resulting object.
|
|
25868
|
+
* @returns object with limited properties.
|
|
25869
|
+
* @example
|
|
25870
|
+
* ```ts
|
|
25871
|
+
* let foo = { name: 'Charlie', age: 10 };
|
|
25872
|
+
* let justName = pick(foo, ['name']); // justName = { name: 'Charlie' }
|
|
25873
|
+
* ```
|
|
25874
|
+
*/
|
|
25875
|
+
export function pick<T extends object>(src: T, properties: KeysOfUnion<T>[]): Partial<T>;
|
|
25876
|
+
export function isEmpty(obj: Record<string, any>): boolean;
|
|
25877
|
+
}
|
|
25878
|
+
|
|
25879
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/tranform-request' {
|
|
25880
|
+
export const transformRequest: (headers: {
|
|
25881
|
+
"x-mappedin-tiles-key": string;
|
|
25882
|
+
}) => (url: string) => {
|
|
25883
|
+
url: string;
|
|
25884
|
+
headers: {};
|
|
25885
|
+
};
|
|
25886
|
+
}
|
|
25887
|
+
|
|
25888
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/math' {
|
|
25889
|
+
export function normalizeAngle(angle: number): number;
|
|
25890
|
+
}
|
|
25891
|
+
|
|
25781
25892
|
declare module '@mappedin/react-sdk/packages/geojson-navigator/src/navigator' {
|
|
25782
25893
|
export * from '@mappedin/react-sdk/packages/geojson-navigator/src/navigator/navigator';
|
|
25783
25894
|
}
|
|
@@ -25856,6 +25967,7 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/navigator/nav
|
|
|
25856
25967
|
multiplicativeDistanceWeightScaling?: boolean;
|
|
25857
25968
|
overrideEdgeWeights?: Map<Edge, number>;
|
|
25858
25969
|
}): DirectionsCollection;
|
|
25970
|
+
hasLineOfSight: (origin: [number, number], destination: [number, number], floorId: string, bufferRadius?: number) => boolean;
|
|
25859
25971
|
/**
|
|
25860
25972
|
* Calculates the approximate distance between two geographic coordinates on Earth's surface.
|
|
25861
25973
|
*
|