@mappedin/react-sdk 6.0.1-beta.4 → 6.0.1-beta.6

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.
@@ -6,10 +6,11 @@
6
6
  // ../react/@packages/internal/common/pubsub
7
7
  // ../react/@packages/internal/common/Mappedin.Logger
8
8
  // ../react/geojson
9
- // ../react/@mappedin/core-sdk
10
9
  // ../react/@packages/internal/common
10
+ // ../react/@mappedin/core-sdk
11
11
  // ../react/@mappedin/core-sdk/src/camera
12
12
  // ../react/three
13
+ // ../react/zod
13
14
  // ../react/@packages/internal/shave-text/shave-text
14
15
  // ../react/@turf/turf
15
16
  // ../react/@packages/internal/quad-tree
@@ -247,7 +248,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
247
248
  import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/react-sdk/geojson/src';
248
249
  import { enableTestMode } from '@mappedin/react-sdk/geojson/src';
249
250
  export type { PubSub } from '@packages/internal/common/pubsub';
250
- import { analytics } from '@mappedin/react-sdk/mappedin-js/src/analytics';
251
251
  import { MappedinMapLibreOverlay } from '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay';
252
252
  export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
253
253
  /**
@@ -516,12 +516,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
516
516
  export type { MapView, MapData, MappedinMapLibreOverlay, TEvents, TEventPayload, TClickPayload, THoverPayload, TShow3DMapOptions, TGetMapDataOptions, TGetMapDataWithAccessTokenOptions, TGetMapDataWithCredentialsOptions, TGetMapDataSharedOptions, TAmbientOcclusionOptions, TAntialiasingOptions, TMVF, PaintStyle, LineStyle, Shading, TMVFStyleCollection, TMVFStyle, TMVFLineStringStyle, TMVFPolygonStyle, TMVFPointStyle, };
517
517
  export type * from 'geojson';
518
518
  export type { TUpdateState, TLabelState, TGeometryState, TCameraAnimationOptions, TAnimationOptions, TFocusOnOptions, TEasingFunction, TCameraTarget, TNavigationTarget, TDirectionZone, TCameraFocusOnTarget, TAddMarkerOptions, TAddPathOptions, TLabelAppearance, TAddLabelOptions, TAddModelOptions, TAddModel, TGetDirectionsOptions, TCollisionRankingTier, TMarkerAnchor, TDirectionInstruction, TDirectionInstructionAction, TGetState, TMarkerState, TBlueDotOptions, } from '@mappedin/react-sdk/mappedin-js/src/types';
519
+ export { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
519
520
  export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
520
521
  export type { Navigation, TNavigationOptions } from '@mappedin/react-sdk/mappedin-js/src/navigation';
521
522
  export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
522
- export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
523
+ export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, Location, Category, Venue, } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
523
524
  export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
524
- export { analytics };
525
525
  }
526
526
 
527
527
  declare module '@mappedin/react-sdk/react-sdk/src/type-utils' {
@@ -550,7 +550,12 @@ declare module '@mappedin/react-sdk/react-sdk/src' {
550
550
  }
551
551
 
552
552
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
553
+ import { PubSub } from '@packages/internal/common';
554
+ import { Analytics } from '@mappedin/react-sdk/mappedin-js/src/analytics';
553
555
  import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
556
+ import type Category from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
557
+ import type Location from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
558
+ import type Venue from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue';
554
559
  /**
555
560
  * A WeakMap to associate {@link MapData} instances with their internal representation.
556
561
  * We need a way to get the internal data object from the API
@@ -562,8 +567,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
562
567
  * Represents the data for a map, providing access to map elements
563
568
  * like spaces, floors, and points of interest.
564
569
  */
565
- class MapData {
570
+ class MapData extends PubSub<{
571
+ 'language-change': {
572
+ code: string;
573
+ name: string;
574
+ };
575
+ }> {
566
576
  #private;
577
+ Analytics: Analytics;
567
578
  /**
568
579
  * Constructs a new instance of {@link MapData}.
569
580
  *
@@ -588,6 +599,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
588
599
  * @returns {string} The organization ID of the map.
589
600
  */
590
601
  get organizationId(): string;
602
+ /**
603
+ * @internal
604
+ */
605
+ get venue(): Venue | undefined;
591
606
  /**
592
607
  * The token is used to fetch outdoor tiles.
593
608
  *
@@ -645,6 +660,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
645
660
  * const annotations = mapData.getByType('annotation');
646
661
  */
647
662
  getByType(type: 'annotation'): Annotation[];
663
+ /**
664
+ * @internal
665
+ */
666
+ getByType(type: 'location'): Location[];
667
+ /**
668
+ * @internal
669
+ */
670
+ getByType(type: 'category'): Category[];
648
671
  /**
649
672
  * Retrieves a specific map feature by its type and ID.
650
673
  *
@@ -661,9 +684,26 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
661
684
  getById(type: 'object', id: string): MapObject | undefined;
662
685
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
663
686
  getById(type: 'annotation', id: string): Annotation | undefined;
687
+ getById(type: 'location', id: string): Location | undefined;
688
+ getById(type: 'category', id: string): Category | undefined;
664
689
  getById(type: string, id: string): object | undefined;
690
+ /**
691
+ * @internal
692
+ */
693
+ changeLanguage(languageCode: string): Promise<void>;
694
+ /**
695
+ * @internal
696
+ */
697
+ get currentLanguage(): {
698
+ code: string;
699
+ name: string;
700
+ };
665
701
  }
666
702
  export default MapData;
703
+ /**
704
+ * @internal
705
+ */
706
+ export function getMapDataInternal(mapData: MapData): MapDataInternal;
667
707
  }
668
708
 
669
709
  declare module '@mappedin/react-sdk/mappedin-js/src/events' {
@@ -787,15 +827,26 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
787
827
  import Annotation from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/annotation';
788
828
  import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
789
829
  import Image from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
790
- import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap } from '@mappedin/mvf';
830
+ import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap, EnterpriseLocation, EnterpriseCategory } from '@mappedin/mvf';
791
831
  import type { MapDataObjects } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types';
832
+ import Location from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location';
833
+ import Category from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category';
834
+ import Venue from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue';
835
+ import { PubSub } from '@packages/internal/common';
836
+ import { AnalyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics';
792
837
  /**
793
838
  * Internal class representing detailed map data.
794
839
  *
795
840
  * @internal
796
841
  */
797
- class MapDataInternal {
842
+ class MapDataInternal extends PubSub<{
843
+ 'language-change': {
844
+ code: string;
845
+ name: string;
846
+ };
847
+ }> {
798
848
  #private;
849
+ Analytics: AnalyticsInternal;
799
850
  /**
800
851
  * Represents the parsed Mappedin Venue Format (MVF) data.
801
852
  */
@@ -816,7 +867,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
816
867
  * Represents a map of entrance IDs to obstruction IDs.
817
868
  */
818
869
  readonly obstructionIdByEntranceId: Record<string, string>;
870
+ readonly venue?: Venue;
819
871
  doorsByNodeId: Record<string, Door>;
872
+ locationsBySpaceId: Record<string, EnterpriseLocation[]>;
820
873
  /**
821
874
  * @internal
822
875
  */
@@ -879,6 +932,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
879
932
  * @returns {Annotation[]} An array of Annotation objects.
880
933
  */
881
934
  get nodes(): Node[];
935
+ get locations(): Location[];
936
+ get categories(): Category[];
882
937
  /**
883
938
  * Retrieves an object by its type and ID.
884
939
  *
@@ -894,6 +949,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
894
949
  getById(type: 'object', id: string): MapObject | undefined;
895
950
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
896
951
  getById(type: 'annotation', id: string): Annotation | undefined;
952
+ getById(type: 'location', id: string): Location | undefined;
953
+ getById(type: 'category', id: string): Category | undefined;
897
954
  getMapDataById(id: string): MapDataObjects | undefined;
898
955
  /**
899
956
  * Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
@@ -911,6 +968,25 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
911
968
  getMVFFeatureById(type: 'annotation', id: string): AnnotationCollection['features'][number] | undefined;
912
969
  getMVFFeatureById(type: string, id: string): object | undefined;
913
970
  getMVFFeatureByNodeId(type: 'connection', id: string): MVFConnection | undefined;
971
+ currentLanguage: {
972
+ code: string;
973
+ name: string;
974
+ };
975
+ /**
976
+ * These represent maps of diffed objects that are used to store the translated values
977
+ */
978
+ languagePacks: {
979
+ [key: string]: {
980
+ location: {
981
+ [key: string]: Partial<EnterpriseLocation>;
982
+ };
983
+ category: {
984
+ [key: string]: Partial<EnterpriseCategory>;
985
+ };
986
+ };
987
+ };
988
+ getPropTranslation(type: 'location' | 'category', prop: string, id: string, fallback: EnterpriseLocation[keyof EnterpriseLocation] | EnterpriseCategory[keyof EnterpriseCategory]): unknown;
989
+ changeLanguage(languageCode: string): Promise<void>;
914
990
  /**
915
991
  * Cleans up resources used by the instance.
916
992
  *
@@ -918,7 +994,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
918
994
  */
919
995
  destroy(): void;
920
996
  }
921
- export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, };
997
+ export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, Location, Category, Venue, };
922
998
  export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space';
923
999
  export type { MapDataObjects };
924
1000
  }
@@ -928,12 +1004,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
928
1004
  import { PubSub } from '@packages/internal/common';
929
1005
  import { type TEvents, type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
930
1006
  import type { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
931
- import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
1007
+ import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
932
1008
  import type { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
933
1009
  import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
934
- import type { Floor, MapObject, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
935
- import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/react-sdk/mappedin-js/src/types';
936
- import type { Label, Marker } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
1010
+ import type { Door, Floor, MapObject, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
1011
+ import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/react-sdk/mappedin-js/src/types';
1012
+ import type { Label, Marker, Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
937
1013
  import type { TEventPayload } from '@mappedin/react-sdk/mappedin-js/src/events';
938
1014
  import type { Shapes } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes';
939
1015
  export class MapView extends PubSub<TEvents> {
@@ -950,6 +1026,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
950
1026
  * Controls for the map's markers.
951
1027
  */
952
1028
  Markers: Markers;
1029
+ /**
1030
+ * Controls for the map's markers.
1031
+ */
1032
+ Images: Images;
953
1033
  /**
954
1034
  * Controls for the map's models.
955
1035
  */
@@ -1005,8 +1085,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
1005
1085
  * // Update the color of a space to red.
1006
1086
  * map.updateState(space, { color: 'red' });
1007
1087
  */
1008
- updateState<T extends Space | MapObject | Label | Marker>(target: T | string, state: TUpdateState<T>): any;
1009
- updateState<T extends 'walls' | (string & NonNullable<unknown>)>(target: T, state: TUpdateStates): any;
1088
+ updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
1089
+ updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
1010
1090
  update: () => void;
1011
1091
  getMapData(): {
1012
1092
  [x: string]: MapData;
@@ -1054,7 +1134,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
1054
1134
  * @hidden
1055
1135
  */
1056
1136
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
1057
- getState<T extends Space | MapObject | Label | Marker | string>(target: T): TGetState<T> | undefined;
1137
+ getState<T extends Space | MapObject | Label | Marker | Image | string>(target: T): TGetState<T> | undefined;
1058
1138
  setHoverColor(c: string): void;
1059
1139
  getHoverColor(): string | undefined;
1060
1140
  /**
@@ -1144,9 +1224,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view' {
1144
1224
  */
1145
1225
  destroy(): void;
1146
1226
  /**
1147
- * @internal
1148
1227
  * @experimental
1149
- * SDK debug mode wip
1228
+ * Enable debug interface
1150
1229
  */
1151
1230
  enableDebug(): Promise<void>;
1152
1231
  }
@@ -1189,11 +1268,6 @@ declare module '@mappedin/react-sdk/geojson/src' {
1189
1268
  }): Promise<RendererCore>;
1190
1269
  }
1191
1270
 
1192
- declare module '@mappedin/react-sdk/mappedin-js/src/analytics' {
1193
- export { analytics, analyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
1194
- export type { CustomerAnalytics, AnalyticsOptions } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
1195
- }
1196
-
1197
1271
  declare module '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay' {
1198
1272
  import { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
1199
1273
  import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
@@ -1226,12 +1300,15 @@ declare module '@mappedin/react-sdk/mappedin-js/src/maplibre-overlay' {
1226
1300
  declare module '@mappedin/react-sdk/mappedin-js/src/types' {
1227
1301
  import type { Feature, MultiPolygon, Polygon } from 'geojson';
1228
1302
  import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
1229
- import type { Label, Marker, Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
1303
+ import type { Label, Marker, Model, Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
1230
1304
  import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
1231
- import { GeometryGroupState } from '@mappedin/core-sdk';
1232
1305
  export type DeepRequired<T> = Required<{
1233
1306
  [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
1234
1307
  }>;
1308
+ export type CancellablePromise<T> = {
1309
+ promise: Promise<T>;
1310
+ cancel: () => void;
1311
+ };
1235
1312
  /**
1236
1313
  * @hidden
1237
1314
  */
@@ -1293,6 +1370,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
1293
1370
  * Defines the state for a label when its appearance is updated.
1294
1371
  */
1295
1372
  export type TLabelState = {
1373
+ text: string;
1296
1374
  type: 'label';
1297
1375
  /**
1298
1376
  * Appearance settings for the label.
@@ -1317,6 +1395,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
1317
1395
  export type TModelState = {
1318
1396
  type: 'model';
1319
1397
  };
1398
+ /**
1399
+ * Defines the state for an image when its appearance is updated.
1400
+ */
1401
+ export type TImageState = {
1402
+ type: 'image';
1403
+ };
1320
1404
  export type TWallsState = {
1321
1405
  /**
1322
1406
  * Color of the walls.
@@ -1326,6 +1410,31 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
1326
1410
  * Color of the top of walls, if not set, defaults to the color.
1327
1411
  */
1328
1412
  topColor?: string | 'initial';
1413
+ /**
1414
+ * Texture to apply to the geometry element.
1415
+ */
1416
+ texture?: {
1417
+ url?: string;
1418
+ };
1419
+ /**
1420
+ * Top texture to apply to the geometry element.
1421
+ */
1422
+ topTexture?: {
1423
+ url?: string;
1424
+ };
1425
+ /**
1426
+ * Visibility of the walls.
1427
+ */
1428
+ visible: boolean;
1429
+ };
1430
+ /**
1431
+ * @interface
1432
+ */
1433
+ export type TDoorsState = TWallsState & {
1434
+ /**
1435
+ * Opacity of the doors.
1436
+ */
1437
+ opacity: number;
1329
1438
  };
1330
1439
  export type TMarkerState = {
1331
1440
  type: 'marker';
@@ -1383,13 +1492,33 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
1383
1492
  * Height of the geometry element in meters.
1384
1493
  */
1385
1494
  height: number;
1495
+ /**
1496
+ * Texture to apply to the geometry element.
1497
+ */
1498
+ texture?: {
1499
+ url: string;
1500
+ };
1501
+ /**
1502
+ * Top texture to apply to the geometry element.
1503
+ */
1504
+ topTexture?: {
1505
+ url: string;
1506
+ };
1386
1507
  };
1508
+ export enum WALLS {
1509
+ Exterior = "exterior-walls",
1510
+ Interior = "interior-walls"
1511
+ }
1512
+ export enum DOORS {
1513
+ Interior = "interior-doors",
1514
+ Exterior = "exterior-doors"
1515
+ }
1387
1516
  /**
1388
1517
  * The type for updating the state of map elements (colors, texts, etc.).
1389
1518
  */
1390
- export type TUpdateState<T> = T extends 'walls' ? Partial<Omit<GeometryGroupState, 'interactive' | 'hoverColor' | 'type'>> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
1519
+ export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS ? Partial<TDoorsState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Door ? Partial<TGeometryState> : T extends string ? Record<string, any> : never;
1391
1520
  export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
1392
- export type TGetEntityState<T> = T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
1521
+ export type TGetEntityState<T> = T extends Marker ? TMarkerState : T extends Model ? TModelState : T extends Label ? TLabelState : T extends Image ? TImageState : T extends Space | MapObject ? TGeometryState : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | undefined : never;
1393
1522
  export type TGetState<T> = TGetEntityState<T> | undefined;
1394
1523
  /**
1395
1524
  * Options for {@link Camera} animations on the map.
@@ -1851,6 +1980,42 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
1851
1980
  */
1852
1981
  url: string;
1853
1982
  };
1983
+ /**
1984
+ * Options for controlling the behavior of a {@link Marker}.
1985
+ * @interface
1986
+ */
1987
+ export type TAddImageOptions = {
1988
+ /**
1989
+ * @internal
1990
+ */
1991
+ id?: string;
1992
+ /**
1993
+ * Width of the image in meters.
1994
+ */
1995
+ width: number;
1996
+ /**
1997
+ * Height of the image in meters.
1998
+ */
1999
+ height: number;
2000
+ /**
2001
+ * Rotation of the image in degrees.
2002
+ *
2003
+ * @default 0
2004
+ */
2005
+ rotation?: number;
2006
+ /**
2007
+ * Vertical offset of the image in meters.
2008
+ *
2009
+ * @default 0
2010
+ */
2011
+ verticalOffset?: number;
2012
+ /**
2013
+ * Attempt to keep the image facing the camera as much as possible
2014
+ *
2015
+ * @default false
2016
+ */
2017
+ flipImageToFaceCamera?: boolean;
2018
+ };
1854
2019
  /**
1855
2020
  * Options for controlling the behavior of a {@link Marker}.
1856
2021
  * @interface
@@ -1945,6 +2110,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
1945
2110
  declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects' {
1946
2111
  export { Label } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/label';
1947
2112
  export { Marker } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/marker';
2113
+ export { Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/image';
1948
2114
  export { Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/model';
1949
2115
  export { Path } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path';
1950
2116
  export { CameraTransform } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects/camera-transform';
@@ -1952,8 +2118,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects' {
1952
2118
  }
1953
2119
 
1954
2120
  declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
1955
- import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
1956
2121
  import type { Directions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
2122
+ import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
2123
+ import type { RendererCore } from '@mappedin/core-sdk';
1957
2124
  /**
1958
2125
  * Options for navigation.
1959
2126
  */
@@ -2029,18 +2196,24 @@ declare module '@mappedin/react-sdk/mappedin-js/src/navigation' {
2029
2196
  /**
2030
2197
  * @internal
2031
2198
  */
2032
- constructor(mapView: MapView);
2199
+ get currentMap(): GeojsonApiMapObject;
2200
+ /**
2201
+ * @internal
2202
+ */
2203
+ constructor(core: RendererCore, currentMapGetter: CurrentMapGetter);
2033
2204
  /**
2034
2205
  * Draws the specified directions on the map.
2035
2206
  * @param directions The directions to be drawn.
2036
2207
  * @param options Optional additional options for the navigation.
2037
2208
  */
2038
- draw: (directions: Directions, options?: TNavigationOptions) => Promise<void>;
2209
+ draw: (directions: Directions, options?: TNavigationOptions) => Promise<unknown>;
2039
2210
  /**
2040
2211
  * Clears any drawn navigation paths or directions from the map.
2041
2212
  */
2042
2213
  clear: () => void;
2043
2214
  }
2215
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
2216
+ export {};
2044
2217
  }
2045
2218
 
2046
2219
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson' {
@@ -2055,6 +2228,225 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson' {
2055
2228
  export { Directions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions';
2056
2229
  export { Style } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/style';
2057
2230
  export { default as Outdoor } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor';
2231
+ export { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
2232
+ }
2233
+
2234
+ declare module '@mappedin/react-sdk/mappedin-js/src/analytics' {
2235
+ export { Analytics, AnalyticsInternal } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
2236
+ export type { AnalyticsUpdateOptions } from '@mappedin/react-sdk/mappedin-js/src/analytics/customer';
2237
+ }
2238
+
2239
+ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
2240
+ import type { EnterpriseCategory } from '@mappedin/mvf';
2241
+ import type { MapDataInternal, Location } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2242
+ import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
2243
+ /**
2244
+ * A Category is a collection of similar Locations.
2245
+ *
2246
+ */
2247
+ class Category extends BaseMapData implements Omit<EnterpriseCategory, 'children' | 'locations'> {
2248
+ #private;
2249
+ /**
2250
+ * @internal
2251
+ */
2252
+ static readonly __type = "category";
2253
+ /**
2254
+ * @internal
2255
+ */
2256
+ readonly __type = "category";
2257
+ name: string;
2258
+ color?: string | undefined;
2259
+ externalId: string;
2260
+ extra?: Record<string, unknown> | undefined;
2261
+ icon?: string | undefined;
2262
+ iconFromDefaultList?: string | null | undefined;
2263
+ sortOrder: number;
2264
+ /**
2265
+ * Checks if the provided instance is of type Category.
2266
+ *
2267
+ * @param instance The instance to check.
2268
+ * @returns {boolean} True if the instance is a Category, false otherwise.
2269
+ */
2270
+ static is(instance: object): instance is Category;
2271
+ /**
2272
+ * @internal
2273
+ */
2274
+ constructor(data: MapDataInternal, options: {
2275
+ mvfData: EnterpriseCategory;
2276
+ });
2277
+ get children(): Category[];
2278
+ get locations(): Location[];
2279
+ /**
2280
+ * Serializes the category data to JSON.
2281
+ *
2282
+ * @returns An object representing the category.
2283
+ */
2284
+ toJSON(): {
2285
+ id: string;
2286
+ name: string;
2287
+ };
2288
+ /**
2289
+ * Cleans up resources used by the instance.
2290
+ *
2291
+ * @internal
2292
+ */
2293
+ destroy(): void;
2294
+ }
2295
+ export default Category;
2296
+ }
2297
+
2298
+ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
2299
+ import type { EnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
2300
+ import type { Coordinate, MapDataInternal, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2301
+ import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
2302
+ import type Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
2303
+ /**
2304
+ * A class representing location data within the map.
2305
+ *
2306
+ * A Location is something like a store, or a washroom on a map.
2307
+ */
2308
+ class Location extends BaseMapData implements Omit<EnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
2309
+ #private;
2310
+ /**
2311
+ * @internal
2312
+ */
2313
+ static readonly __type = "location";
2314
+ /**
2315
+ * @internal
2316
+ */
2317
+ readonly __type = "location";
2318
+ description?: string | undefined;
2319
+ name: string;
2320
+ amenity?: string | undefined;
2321
+ externalId: string;
2322
+ extra?: Record<string, unknown> | undefined;
2323
+ gallery?: {
2324
+ caption?: string | null;
2325
+ image: string;
2326
+ embeddedUrl?: string | null;
2327
+ }[] | undefined;
2328
+ logo?: string | undefined;
2329
+ operationHours?: OperationHours[] | undefined;
2330
+ phone?: {
2331
+ number: string;
2332
+ extension?: string;
2333
+ } | undefined;
2334
+ picture?: string | undefined;
2335
+ shortName?: string | undefined;
2336
+ showFloatingLabelWhenImagePresent?: boolean | undefined;
2337
+ showLogo?: boolean | undefined;
2338
+ siblingGroups?: SiblingGroup[] | undefined;
2339
+ social?: {
2340
+ facebook?: string;
2341
+ instagram?: string;
2342
+ twitter?: string;
2343
+ website?: string;
2344
+ } | undefined;
2345
+ sortOrder: number;
2346
+ states?: LocationState[] | undefined;
2347
+ tags?: string[] | undefined;
2348
+ type: string;
2349
+ /**
2350
+ * Checks if the provided instance is of type Location.
2351
+ *
2352
+ * @param instance The instance to check.
2353
+ * @returns {boolean} True if the instance is a Location, false otherwise.
2354
+ */
2355
+ static is(instance: object): instance is Location;
2356
+ /**
2357
+ * @internal
2358
+ */
2359
+ constructor(data: MapDataInternal, options: {
2360
+ mvfData: EnterpriseLocation;
2361
+ });
2362
+ get coordinates(): Coordinate[];
2363
+ get nodes(): Node[];
2364
+ get spaces(): Space[];
2365
+ /**
2366
+ * Serializes the location data to JSON.
2367
+ *
2368
+ * @returns An object representing the location.
2369
+ */
2370
+ toJSON(): {
2371
+ id: string;
2372
+ name: string;
2373
+ };
2374
+ /**
2375
+ * Cleans up resources used by the instance.
2376
+ *
2377
+ * @internal
2378
+ */
2379
+ destroy(): void;
2380
+ }
2381
+ export default Location;
2382
+ }
2383
+
2384
+ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
2385
+ import type { EnterpriseVenue, Language } from '@mappedin/mvf';
2386
+ import type { Hyperlink, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2387
+ import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
2388
+ /**
2389
+ * A Venue is a specific place (like a mall, office building, or stadium) with one or more Floors
2390
+ */
2391
+ class Venue extends BaseMapData implements EnterpriseVenue {
2392
+ #private;
2393
+ /**
2394
+ * @internal
2395
+ */
2396
+ static readonly __type = "venue";
2397
+ /**
2398
+ * @internal
2399
+ */
2400
+ readonly __type = "venue";
2401
+ countrycode?: string | undefined;
2402
+ externalId: string;
2403
+ defaultLanguage: Language;
2404
+ defaultMap?: string | undefined;
2405
+ extra?: Record<string, unknown> | undefined;
2406
+ icon?: string | undefined;
2407
+ languages: Language[];
2408
+ links: Hyperlink[];
2409
+ logo?: string | undefined;
2410
+ mappedinWebUrl?: string | undefined;
2411
+ slug: string;
2412
+ topLocations?: string[] | undefined;
2413
+ tzid?: string | undefined;
2414
+ /**
2415
+ * Checks if the provided instance is of type Venue.
2416
+ *
2417
+ * @param instance The instance to check.
2418
+ * @returns {boolean} True if the instance is a Venue, false otherwise.
2419
+ */
2420
+ static is(instance: object): instance is Venue;
2421
+ /**
2422
+ * @internal
2423
+ */
2424
+ constructor(_data: MapDataInternal, options: {
2425
+ mvfData: EnterpriseVenue;
2426
+ });
2427
+ /**
2428
+ * Gets the name of the venue.
2429
+ *
2430
+ * @returns {string} The name of the venue.
2431
+ */
2432
+ get name(): string;
2433
+ /**
2434
+ * Serializes the venue data to JSON.
2435
+ *
2436
+ * @returns An object representing the venue.
2437
+ */
2438
+ toJSON(): {
2439
+ id: string;
2440
+ name: string;
2441
+ };
2442
+ /**
2443
+ * Cleans up resources used by the instance.
2444
+ *
2445
+ * @internal
2446
+ */
2447
+ destroy(): void;
2448
+ }
2449
+ export default Venue;
2058
2450
  }
2059
2451
 
2060
2452
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
@@ -2293,7 +2685,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
2293
2685
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
2294
2686
  import type { Image, SpaceCollection } from '@mappedin/mvf';
2295
2687
  import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
2296
- import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2688
+ import type { Location, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
2297
2689
  import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
2298
2690
  import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
2299
2691
  import Door from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door';
@@ -2351,6 +2743,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
2351
2743
  get type(): TSpaceType;
2352
2744
  get description(): string;
2353
2745
  get images(): Image[];
2746
+ /**
2747
+ * @internal
2748
+ */
2749
+ get locations(): Location[];
2354
2750
  /**
2355
2751
  * Gets the {@link Floor} object associated with the space.
2356
2752
  *
@@ -3108,12 +3504,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/shapes' {
3108
3504
  */
3109
3505
  add<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, floor?: Floor): Shape;
3110
3506
  /**
3111
- * Removes a specific shapes ({@link Shape}) from the map.
3112
- * @param shapes The shapes to be removed.
3507
+ * Removes a specific shape ({@link Shape}) from the map.
3508
+ * @param shape The shape to be removed.
3113
3509
  * @example
3114
3510
  * map.Shapes.remove(geo);
3115
3511
  */
3116
- remove(shapes: Shape): void;
3512
+ remove(shape: Shape): void;
3117
3513
  /**
3118
3514
  * Removes all Shapes ({@link Shape}) from the map.
3119
3515
  *
@@ -3132,6 +3528,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
3132
3528
  import type { Entity2DHTMLDivElement, EntityId, Position } from '@mappedin/react-sdk/geojson/src/types';
3133
3529
  import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
3134
3530
  import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src/utils/collision-ranking-tier';
3531
+ import { z } from 'zod';
3135
3532
  /**
3136
3533
  * State reprsenting a Marker
3137
3534
  */
@@ -3178,6 +3575,26 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
3178
3575
  interactive?: boolean;
3179
3576
  };
3180
3577
  };
3578
+ export const addMarkerOptionsSchema: z.ZodObject<{
3579
+ rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
3580
+ interactive: z.ZodOptional<z.ZodBoolean>;
3581
+ id: z.ZodOptional<z.ZodString>;
3582
+ anchor: z.ZodOptional<z.ZodEnum<["top", "bottom", "left", "right", "center"]>>;
3583
+ dynamicResize: z.ZodOptional<z.ZodBoolean>;
3584
+ }, "strip", z.ZodTypeAny, {
3585
+ interactive?: boolean | undefined;
3586
+ id?: string | undefined;
3587
+ anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
3588
+ rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
3589
+ dynamicResize?: boolean | undefined;
3590
+ }, {
3591
+ interactive?: boolean | undefined;
3592
+ id?: string | undefined;
3593
+ anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
3594
+ rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
3595
+ dynamicResize?: boolean | undefined;
3596
+ }>;
3597
+ export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
3181
3598
  /**
3182
3599
  * Options for creating a new Marker
3183
3600
  */
@@ -3367,6 +3784,172 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
3367
3784
  import type { GroupContainerState } from '@mappedin/react-sdk/geojson/src/entities/group-container';
3368
3785
  import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
3369
3786
  import type { CollisionRankingTier } from '@mappedin/react-sdk/geojson/src';
3787
+ import { z } from 'zod';
3788
+ export const addLabelOptionsSchema: z.ZodObject<{
3789
+ rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
3790
+ interactive: z.ZodOptional<z.ZodBoolean>;
3791
+ appearance: z.ZodOptional<z.ZodObject<{
3792
+ margin: z.ZodOptional<z.ZodNumber>;
3793
+ text: z.ZodOptional<z.ZodObject<{
3794
+ numLines: z.ZodOptional<z.ZodNumber>;
3795
+ lineHeight: z.ZodOptional<z.ZodNumber>;
3796
+ size: z.ZodOptional<z.ZodNumber>;
3797
+ maxWidth: z.ZodOptional<z.ZodNumber>;
3798
+ foregroundColor: z.ZodOptional<z.ZodString>;
3799
+ backgroundColor: z.ZodOptional<z.ZodString>;
3800
+ }, "strip", z.ZodTypeAny, {
3801
+ size?: number | undefined;
3802
+ maxWidth?: number | undefined;
3803
+ lineHeight?: number | undefined;
3804
+ numLines?: number | undefined;
3805
+ foregroundColor?: string | undefined;
3806
+ backgroundColor?: string | undefined;
3807
+ }, {
3808
+ size?: number | undefined;
3809
+ maxWidth?: number | undefined;
3810
+ lineHeight?: number | undefined;
3811
+ numLines?: number | undefined;
3812
+ foregroundColor?: string | undefined;
3813
+ backgroundColor?: string | undefined;
3814
+ }>>;
3815
+ marker: z.ZodOptional<z.ZodObject<{
3816
+ size: z.ZodOptional<z.ZodNumber>;
3817
+ foregroundColor: z.ZodOptional<z.ZodObject<{
3818
+ active: z.ZodOptional<z.ZodString>;
3819
+ inactive: z.ZodOptional<z.ZodString>;
3820
+ }, "strip", z.ZodTypeAny, {
3821
+ active?: string | undefined;
3822
+ inactive?: string | undefined;
3823
+ }, {
3824
+ active?: string | undefined;
3825
+ inactive?: string | undefined;
3826
+ }>>;
3827
+ backgroundColor: z.ZodOptional<z.ZodObject<{
3828
+ active: z.ZodOptional<z.ZodString>;
3829
+ inactive: z.ZodOptional<z.ZodString>;
3830
+ }, "strip", z.ZodTypeAny, {
3831
+ active?: string | undefined;
3832
+ inactive?: string | undefined;
3833
+ }, {
3834
+ active?: string | undefined;
3835
+ inactive?: string | undefined;
3836
+ }>>;
3837
+ }, "strip", z.ZodTypeAny, {
3838
+ size?: number | undefined;
3839
+ foregroundColor?: {
3840
+ active?: string | undefined;
3841
+ inactive?: string | undefined;
3842
+ } | undefined;
3843
+ backgroundColor?: {
3844
+ active?: string | undefined;
3845
+ inactive?: string | undefined;
3846
+ } | undefined;
3847
+ }, {
3848
+ size?: number | undefined;
3849
+ foregroundColor?: {
3850
+ active?: string | undefined;
3851
+ inactive?: string | undefined;
3852
+ } | undefined;
3853
+ backgroundColor?: {
3854
+ active?: string | undefined;
3855
+ inactive?: string | undefined;
3856
+ } | undefined;
3857
+ }>>;
3858
+ }, "strip", z.ZodTypeAny, {
3859
+ text?: {
3860
+ size?: number | undefined;
3861
+ maxWidth?: number | undefined;
3862
+ lineHeight?: number | undefined;
3863
+ numLines?: number | undefined;
3864
+ foregroundColor?: string | undefined;
3865
+ backgroundColor?: string | undefined;
3866
+ } | undefined;
3867
+ marker?: {
3868
+ size?: number | undefined;
3869
+ foregroundColor?: {
3870
+ active?: string | undefined;
3871
+ inactive?: string | undefined;
3872
+ } | undefined;
3873
+ backgroundColor?: {
3874
+ active?: string | undefined;
3875
+ inactive?: string | undefined;
3876
+ } | undefined;
3877
+ } | undefined;
3878
+ margin?: number | undefined;
3879
+ }, {
3880
+ text?: {
3881
+ size?: number | undefined;
3882
+ maxWidth?: number | undefined;
3883
+ lineHeight?: number | undefined;
3884
+ numLines?: number | undefined;
3885
+ foregroundColor?: string | undefined;
3886
+ backgroundColor?: string | undefined;
3887
+ } | undefined;
3888
+ marker?: {
3889
+ size?: number | undefined;
3890
+ foregroundColor?: {
3891
+ active?: string | undefined;
3892
+ inactive?: string | undefined;
3893
+ } | undefined;
3894
+ backgroundColor?: {
3895
+ active?: string | undefined;
3896
+ inactive?: string | undefined;
3897
+ } | undefined;
3898
+ } | undefined;
3899
+ margin?: number | undefined;
3900
+ }>>;
3901
+ }, "strip", z.ZodTypeAny, {
3902
+ interactive?: boolean | undefined;
3903
+ rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
3904
+ appearance?: {
3905
+ text?: {
3906
+ size?: number | undefined;
3907
+ maxWidth?: number | undefined;
3908
+ lineHeight?: number | undefined;
3909
+ numLines?: number | undefined;
3910
+ foregroundColor?: string | undefined;
3911
+ backgroundColor?: string | undefined;
3912
+ } | undefined;
3913
+ marker?: {
3914
+ size?: number | undefined;
3915
+ foregroundColor?: {
3916
+ active?: string | undefined;
3917
+ inactive?: string | undefined;
3918
+ } | undefined;
3919
+ backgroundColor?: {
3920
+ active?: string | undefined;
3921
+ inactive?: string | undefined;
3922
+ } | undefined;
3923
+ } | undefined;
3924
+ margin?: number | undefined;
3925
+ } | undefined;
3926
+ }, {
3927
+ interactive?: boolean | undefined;
3928
+ rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
3929
+ appearance?: {
3930
+ text?: {
3931
+ size?: number | undefined;
3932
+ maxWidth?: number | undefined;
3933
+ lineHeight?: number | undefined;
3934
+ numLines?: number | undefined;
3935
+ foregroundColor?: string | undefined;
3936
+ backgroundColor?: string | undefined;
3937
+ } | undefined;
3938
+ marker?: {
3939
+ size?: number | undefined;
3940
+ foregroundColor?: {
3941
+ active?: string | undefined;
3942
+ inactive?: string | undefined;
3943
+ } | undefined;
3944
+ backgroundColor?: {
3945
+ active?: string | undefined;
3946
+ inactive?: string | undefined;
3947
+ } | undefined;
3948
+ } | undefined;
3949
+ margin?: number | undefined;
3950
+ } | undefined;
3951
+ }>;
3952
+ export function validateLabel(coordinate: Position, text: string, options: AddLabelOptions): void;
3370
3953
  export const labelThemes: {
3371
3954
  lightOnDark: {
3372
3955
  text: {
@@ -3808,6 +4391,14 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry-group' {
3808
4391
  * Whether the geometry and its children are outlined. This will affect all children of the geometry group and override their outline state.
3809
4392
  */
3810
4393
  outline?: boolean;
4394
+ /**
4395
+ * The texture URL of the geometry
4396
+ */
4397
+ texture?: string;
4398
+ /**
4399
+ * The top texture URL of the geometry
4400
+ */
4401
+ topTexture?: string;
3811
4402
  };
3812
4403
  export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
3813
4404
  export class GeometryGroupObject3D extends Object3D {
@@ -3909,8 +4500,6 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
3909
4500
  showImage?: boolean;
3910
4501
  flipImageToFaceCamera?: boolean;
3911
4502
  };
3912
- export type Cap = 'round' | 'square' | 'butt';
3913
- export type Join = 'round' | 'bevel' | 'miter';
3914
4503
  export type Shading = {
3915
4504
  start?: number;
3916
4505
  end?: number;
@@ -3924,8 +4513,8 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
3924
4513
  height?: number;
3925
4514
  altitude?: number;
3926
4515
  visible?: boolean;
3927
- cap?: Cap;
3928
- join?: Join;
4516
+ cap?: 'round' | 'square' | 'butt';
4517
+ join?: 'round' | 'bevel' | 'miter';
3929
4518
  shading?: Shading;
3930
4519
  outline?: boolean;
3931
4520
  };
@@ -4129,6 +4718,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
4129
4718
  entities: {
4130
4719
  [key: number]: string | number;
4131
4720
  };
4721
+ detached?: boolean;
4132
4722
  };
4133
4723
  }
4134
4724
  /**
@@ -4194,9 +4784,17 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
4194
4784
  * The height of the geometry
4195
4785
  */
4196
4786
  height: number;
4197
- };
4198
- export class MeshComponent {
4199
- #private;
4787
+ /**
4788
+ * The texture URL of the geometry
4789
+ */
4790
+ texture?: string;
4791
+ /**
4792
+ * The top texture URL of the geometry
4793
+ */
4794
+ topTexture?: string;
4795
+ };
4796
+ export class MeshComponent {
4797
+ #private;
4200
4798
  mesh?: EntityBatchedMesh;
4201
4799
  focusMesh?: Mesh;
4202
4800
  outline?: LineSegments;
@@ -4228,12 +4826,16 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
4228
4826
  set opacity(value: number);
4229
4827
  get texture(): string;
4230
4828
  set texture(texture: Texture);
4829
+ get textureInstance(): Texture | undefined;
4231
4830
  set topTexture(texture: Texture);
4232
4831
  get topTexture(): string;
4832
+ get topTextureInstance(): Texture | undefined;
4233
4833
  get featureBbox(): BBox;
4234
4834
  texturesVisible: boolean;
4235
4835
  showTextures(): void;
4236
4836
  hideTextures(): void;
4837
+ removeSideTexture(): void;
4838
+ removeTopTexture(): void;
4237
4839
  }
4238
4840
  }
4239
4841
 
@@ -4297,10 +4899,11 @@ declare module '@mappedin/react-sdk/geojson/src/components/model' {
4297
4899
  import type { LineSegments, Object3D } from 'three';
4298
4900
  import { Color, Vector3 } from 'three';
4299
4901
  import type { BatchedStandardMaterial } from '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/batched-material';
4300
- import type { Position, EntityId } from '@mappedin/react-sdk/geojson/src/types';
4301
- import type { Feature, Point } from 'geojson';
4902
+ import type { Position, EntityId, ModelProperties, ModelStyle } from '@mappedin/react-sdk/geojson/src/types';
4903
+ import type { Feature, FeatureCollection, Point } from 'geojson';
4302
4904
  import type { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
4303
4905
  import type { GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
4906
+ import { z } from 'zod';
4304
4907
  /**
4305
4908
  * State representing a Model, typically loaded via a URL
4306
4909
  */
@@ -4325,6 +4928,190 @@ declare module '@mappedin/react-sdk/geojson/src/components/model' {
4325
4928
  */
4326
4929
  interactive: boolean;
4327
4930
  };
4931
+ export const modelPropertiesSchema: z.ZodObject<{
4932
+ rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
4933
+ altitude: z.ZodOptional<z.ZodNumber>;
4934
+ scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
4935
+ interactive: z.ZodOptional<z.ZodBoolean>;
4936
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
4937
+ }, "strip", z.ZodTypeAny, {
4938
+ rotation?: number[] | undefined;
4939
+ altitude?: number | undefined;
4940
+ scale?: number[] | undefined;
4941
+ interactive?: boolean | undefined;
4942
+ id?: string | number | undefined;
4943
+ }, {
4944
+ rotation?: number[] | undefined;
4945
+ altitude?: number | undefined;
4946
+ scale?: number[] | undefined;
4947
+ interactive?: boolean | undefined;
4948
+ id?: string | number | undefined;
4949
+ }>;
4950
+ export const featureSchema: z.ZodObject<{
4951
+ type: z.ZodEnum<["Feature"]>;
4952
+ geometry: z.ZodObject<{
4953
+ type: z.ZodEnum<["Point"]>;
4954
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
4955
+ }, "strip", z.ZodTypeAny, {
4956
+ type: "Point";
4957
+ coordinates: number[];
4958
+ }, {
4959
+ type: "Point";
4960
+ coordinates: number[];
4961
+ }>;
4962
+ properties: z.ZodObject<{
4963
+ rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
4964
+ altitude: z.ZodOptional<z.ZodNumber>;
4965
+ scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
4966
+ interactive: z.ZodOptional<z.ZodBoolean>;
4967
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
4968
+ }, "strip", z.ZodTypeAny, {
4969
+ rotation?: number[] | undefined;
4970
+ altitude?: number | undefined;
4971
+ scale?: number[] | undefined;
4972
+ interactive?: boolean | undefined;
4973
+ id?: string | number | undefined;
4974
+ }, {
4975
+ rotation?: number[] | undefined;
4976
+ altitude?: number | undefined;
4977
+ scale?: number[] | undefined;
4978
+ interactive?: boolean | undefined;
4979
+ id?: string | number | undefined;
4980
+ }>;
4981
+ }, "strip", z.ZodTypeAny, {
4982
+ type: "Feature";
4983
+ geometry: {
4984
+ type: "Point";
4985
+ coordinates: number[];
4986
+ };
4987
+ properties: {
4988
+ rotation?: number[] | undefined;
4989
+ altitude?: number | undefined;
4990
+ scale?: number[] | undefined;
4991
+ interactive?: boolean | undefined;
4992
+ id?: string | number | undefined;
4993
+ };
4994
+ }, {
4995
+ type: "Feature";
4996
+ geometry: {
4997
+ type: "Point";
4998
+ coordinates: number[];
4999
+ };
5000
+ properties: {
5001
+ rotation?: number[] | undefined;
5002
+ altitude?: number | undefined;
5003
+ scale?: number[] | undefined;
5004
+ interactive?: boolean | undefined;
5005
+ id?: string | number | undefined;
5006
+ };
5007
+ }>;
5008
+ export const addModelFeatureSchema: z.ZodObject<{
5009
+ type: z.ZodEnum<["FeatureCollection"]>;
5010
+ features: z.ZodArray<z.ZodObject<{
5011
+ type: z.ZodEnum<["Feature"]>;
5012
+ geometry: z.ZodObject<{
5013
+ type: z.ZodEnum<["Point"]>;
5014
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
5015
+ }, "strip", z.ZodTypeAny, {
5016
+ type: "Point";
5017
+ coordinates: number[];
5018
+ }, {
5019
+ type: "Point";
5020
+ coordinates: number[];
5021
+ }>;
5022
+ properties: z.ZodObject<{
5023
+ rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
5024
+ altitude: z.ZodOptional<z.ZodNumber>;
5025
+ scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
5026
+ interactive: z.ZodOptional<z.ZodBoolean>;
5027
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
5028
+ }, "strip", z.ZodTypeAny, {
5029
+ rotation?: number[] | undefined;
5030
+ altitude?: number | undefined;
5031
+ scale?: number[] | undefined;
5032
+ interactive?: boolean | undefined;
5033
+ id?: string | number | undefined;
5034
+ }, {
5035
+ rotation?: number[] | undefined;
5036
+ altitude?: number | undefined;
5037
+ scale?: number[] | undefined;
5038
+ interactive?: boolean | undefined;
5039
+ id?: string | number | undefined;
5040
+ }>;
5041
+ }, "strip", z.ZodTypeAny, {
5042
+ type: "Feature";
5043
+ geometry: {
5044
+ type: "Point";
5045
+ coordinates: number[];
5046
+ };
5047
+ properties: {
5048
+ rotation?: number[] | undefined;
5049
+ altitude?: number | undefined;
5050
+ scale?: number[] | undefined;
5051
+ interactive?: boolean | undefined;
5052
+ id?: string | number | undefined;
5053
+ };
5054
+ }, {
5055
+ type: "Feature";
5056
+ geometry: {
5057
+ type: "Point";
5058
+ coordinates: number[];
5059
+ };
5060
+ properties: {
5061
+ rotation?: number[] | undefined;
5062
+ altitude?: number | undefined;
5063
+ scale?: number[] | undefined;
5064
+ interactive?: boolean | undefined;
5065
+ id?: string | number | undefined;
5066
+ };
5067
+ }>, "many">;
5068
+ }, "strip", z.ZodTypeAny, {
5069
+ type: "FeatureCollection";
5070
+ features: {
5071
+ type: "Feature";
5072
+ geometry: {
5073
+ type: "Point";
5074
+ coordinates: number[];
5075
+ };
5076
+ properties: {
5077
+ rotation?: number[] | undefined;
5078
+ altitude?: number | undefined;
5079
+ scale?: number[] | undefined;
5080
+ interactive?: boolean | undefined;
5081
+ id?: string | number | undefined;
5082
+ };
5083
+ }[];
5084
+ }, {
5085
+ type: "FeatureCollection";
5086
+ features: {
5087
+ type: "Feature";
5088
+ geometry: {
5089
+ type: "Point";
5090
+ coordinates: number[];
5091
+ };
5092
+ properties: {
5093
+ rotation?: number[] | undefined;
5094
+ altitude?: number | undefined;
5095
+ scale?: number[] | undefined;
5096
+ interactive?: boolean | undefined;
5097
+ id?: string | number | undefined;
5098
+ };
5099
+ }[];
5100
+ }>;
5101
+ export const modelStyleSchema: z.ZodObject<{
5102
+ url: z.ZodString;
5103
+ color: z.ZodOptional<z.ZodString>;
5104
+ opacity: z.ZodOptional<z.ZodNumber>;
5105
+ }, "strip", z.ZodTypeAny, {
5106
+ url: string;
5107
+ color?: string | undefined;
5108
+ opacity?: number | undefined;
5109
+ }, {
5110
+ url: string;
5111
+ color?: string | undefined;
5112
+ opacity?: number | undefined;
5113
+ }>;
5114
+ export function validateModelGroup(id: string | number, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle): void;
4328
5115
  export class ModelComponent {
4329
5116
  #private;
4330
5117
  mesh?: Geometry3DObject3D;
@@ -4389,7 +5176,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
4389
5176
  import { OutdoorLayers } from '@mappedin/react-sdk/geojson/src/systems/outdoor-layers/system';
4390
5177
  import { PathSystem } from '@mappedin/react-sdk/geojson/src/systems/path';
4391
5178
  import { type ImageProperties, type ImageState, type ImageStyle } from '@mappedin/react-sdk/geojson/src/components/image';
4392
- import { MeshOpacitySystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-opacity/system';
5179
+ import { MeshDetachmentSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-detachment/system';
4393
5180
  import { MeshModificationSystem } from '@mappedin/react-sdk/geojson/src/systems/mesh-modification/system';
4394
5181
  export type * from '@mappedin/react-sdk/geojson/src/types';
4395
5182
  export const raycaster: Raycaster;
@@ -4434,7 +5221,7 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
4434
5221
  pathSystem: PathSystem;
4435
5222
  imageSystem: ImageSystem;
4436
5223
  geometryInFocusSystem: GeometryInFocusSystem;
4437
- meshOpacitySystem: MeshOpacitySystem;
5224
+ meshDetachmentSystem: MeshDetachmentSystem;
4438
5225
  meshModificationSystem: MeshModificationSystem;
4439
5226
  };
4440
5227
  export type MapViewState = {
@@ -4497,15 +5284,15 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
4497
5284
  /**
4498
5285
  * Add a group of models from GeoJSON data. These will be instanced automatically for better performance.
4499
5286
  */
4500
- addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState>;
5287
+ addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState> | undefined;
4501
5288
  /**
4502
5289
  * Add an HTML Marker at a GeoJSON coordinate.
4503
5290
  */
4504
- addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState>;
5291
+ addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState> | undefined;
4505
5292
  /**
4506
5293
  * Add a 2D label at a GeoJSON coordinate.
4507
5294
  */
4508
- addLabel2D(coordinate: Position, text: string, options?: AddLabelOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<LabelState>;
5295
+ addLabel2D(coordinate: Position, text: string, options?: AddLabelOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<LabelState> | undefined;
4509
5296
  /**
4510
5297
  * Add a Path along a set of GeoJSON coordinates that can be animated.
4511
5298
  */
@@ -5146,126 +5933,6 @@ declare module '@mappedin/react-sdk/geojson/src/systems/html-controls/system' {
5146
5933
  }
5147
5934
  }
5148
5935
 
5149
- declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
5150
- /**
5151
- * Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
5152
- * If a set context is not in this list, it will default to the first VALID_CONTEXTS value.
5153
- */
5154
- export const VALID_CONTEXTS: readonly ["websdk", "web", "webv2", "kiosk-v2", "mobile", "iossdk", "androidsdk", "reactnativesdk"];
5155
- type ValidContext = (typeof VALID_CONTEXTS)[number];
5156
- export const DEFAULT_CONTEXT: "websdk";
5157
- export const ANALYTICS_URL = "https://api-gateway.mappedin.com/track-analytics/a/";
5158
- export class CustomerAnalytics {
5159
- #private;
5160
- constructor();
5161
- init(options?: AnalyticsOptions): void;
5162
- /**
5163
- * Reset state and options
5164
- */
5165
- reset(): void;
5166
- updateState(update: UpdateStateParam): void;
5167
- get authReady(): boolean;
5168
- getState(): AnalyticState;
5169
- capture<T extends keyof CaptureEventsPayloadMap>(eventName: T, query: CaptureEventsPayloadMap[T]): Promise<Response> | Promise<void>;
5170
- capture<T extends keyof CaptureEventsPayloadMap | (string & NonNullable<unknown>)>(target: T, query: T extends keyof CaptureEventsPayloadMap ? CaptureEventsPayloadMap[T] : Record<string, any>): Promise<Response> | Promise<void>;
5171
- /**
5172
- * @internal
5173
- */
5174
- sendGetMapDataEvent(payload: {
5175
- parseDuration: string;
5176
- downloadDuration: string;
5177
- viewId?: string;
5178
- }): Promise<void> | Promise<Response>;
5179
- sendWatchPositionDenied(): Promise<void> | Promise<Response>;
5180
- /**
5181
- * @internal
5182
- */
5183
- sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
5184
- firstRenderDuration: string;
5185
- dimension: {
5186
- height: number;
5187
- width: number;
5188
- };
5189
- }): Promise<void> | Promise<Response>;
5190
- /**
5191
- * @internal
5192
- */
5193
- sendGetDirectionsEvent: (start: string, end: string) => void;
5194
- }
5195
- type AnalyticsUserPosition = {
5196
- bluedotTimestamp: number;
5197
- latitude: number;
5198
- longitude: number;
5199
- floorLevel?: number;
5200
- accuracy: number;
5201
- };
5202
- export type AnalyticsOptions = {
5203
- key?: string;
5204
- secret?: string;
5205
- accessToken?: string;
5206
- noAuth?: boolean;
5207
- mapId?: string;
5208
- logEvents?: boolean;
5209
- sendEvents?: boolean;
5210
- context?: string;
5211
- platformString?: string;
5212
- };
5213
- export type AnalyticState = {
5214
- accessToken?: string | undefined;
5215
- version: string;
5216
- platformString: string;
5217
- baseUrl: string;
5218
- noAuth: boolean;
5219
- geolocationMode: boolean;
5220
- mi_uuid: string;
5221
- mi_session: string;
5222
- context: ValidContext;
5223
- userPosition?: AnalyticsUserPosition;
5224
- mapId?: string;
5225
- key?: string;
5226
- secret?: string;
5227
- logEvents: boolean;
5228
- sendEvents: boolean;
5229
- };
5230
- type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken'>>;
5231
- type CaptureEventsPayloadMap = {
5232
- '$select-location': {
5233
- id: string;
5234
- };
5235
- '$select-category': {
5236
- id: string;
5237
- };
5238
- '$query-suggest': Record<string, any>;
5239
- '$query-search': Record<string, any>;
5240
- };
5241
- export const analyticsInternal: CustomerAnalytics;
5242
- export const analytics: {
5243
- /**
5244
- * Initializes the analytics with the provided options.
5245
- * @param args - The options to initialize the analytics.
5246
- */
5247
- init(options?: AnalyticsOptions | undefined): void;
5248
- /**
5249
- * Captures an analytic event with a custom target and query payload.
5250
- *
5251
- * @param target - The event name or target can be .
5252
- * @param query - The payload associated with the event.
5253
- * @returns A promise that resolves to the server response or void.
5254
- */
5255
- capture(target: keyof CaptureEventsPayloadMap | (string & {}), query: Record<string, any> | {
5256
- id: string;
5257
- } | {
5258
- id: string;
5259
- }): Promise<void> | Promise<Response>;
5260
- /**
5261
- * Updates the analytics state with the provided parameters.
5262
- * @param update - The state parameters to update.
5263
- */
5264
- updateState(update: Partial<Pick<AnalyticState, "logEvents" | "sendEvents" | "logEvents" | "accessToken">>): void;
5265
- };
5266
- export {};
5267
- }
5268
-
5269
5936
  declare module '@mappedin/react-sdk/geojson/src/maplibre-overlay' {
5270
5937
  import type { IControl, Map as MapLibreMap, CustomLayerInterface } from '@packages/internal/outdoor-context-v4';
5271
5938
  import type { Position } from '@mappedin/react-sdk/geojson/src/types';
@@ -5354,6 +6021,42 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/marker' {
5354
6021
  }
5355
6022
  }
5356
6023
 
6024
+ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/image' {
6025
+ /**
6026
+ * Class representing an Image on the {@link MapView}.
6027
+ */
6028
+ export class Image {
6029
+ #private;
6030
+ /**
6031
+ * @internal
6032
+ */
6033
+ static readonly __type = "Image";
6034
+ /**
6035
+ * @internal
6036
+ */
6037
+ readonly __type = "Image";
6038
+ /**
6039
+ * Checks if the provided instance is of type Marker"
6040
+ *
6041
+ * @param instance The instance to check.
6042
+ * @returns {boolean} True if the instance is a Marker, false otherwise.
6043
+ */
6044
+ static is(instance: object): instance is Image;
6045
+ /**
6046
+ * @internal
6047
+ */
6048
+ constructor(id: string, url: string);
6049
+ /**
6050
+ * The image's id
6051
+ */
6052
+ get id(): string;
6053
+ /**
6054
+ * The image's url
6055
+ */
6056
+ get url(): string;
6057
+ }
6058
+ }
6059
+
5357
6060
  declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/model' {
5358
6061
  /**
5359
6062
  * Class representing a 3D model on the {@link MapView}.
@@ -5443,13 +6146,94 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/shape' {
5443
6146
  }
5444
6147
  }
5445
6148
 
6149
+ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
6150
+ import type { ParsedMVF } from '@mappedin/mvf';
6151
+ import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
6152
+ import { PubSub } from '@packages/internal/common';
6153
+ import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
6154
+ import { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
6155
+ import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
6156
+ import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, CancellablePromise } from '@mappedin/react-sdk/mappedin-js/src/types';
6157
+ import { type AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
6158
+ import { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
6159
+ import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
6160
+ import type { Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
6161
+ export class GeojsonApiMapObject extends PubSub<{
6162
+ 'floor-change': {
6163
+ reason?: TFloorChangeReason;
6164
+ floorId: string;
6165
+ };
6166
+ 'floor-change-start': {
6167
+ floorId: string;
6168
+ };
6169
+ }> {
6170
+ floors: FloorObject[];
6171
+ currentFloorId: string;
6172
+ id: string;
6173
+ renderer: RendererCore;
6174
+ mvf: ParsedMVF;
6175
+ styleMap: AggregatedStyleMap;
6176
+ StackedMaps: StackedMaps;
6177
+ get currentFloor(): FloorObject;
6178
+ setFloor(floorId: string, reason?: TFloorChangeReason): void;
6179
+ Models: {
6180
+ add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
6181
+ floorId?: string;
6182
+ }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
6183
+ remove: (_id: string, _groupId: string) => void;
6184
+ };
6185
+ Images: {
6186
+ add: (target: Position, url: string, opts: TAddImageOptions & {
6187
+ floorId?: string;
6188
+ }) => EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
6189
+ remove: (id: string) => void;
6190
+ removeAll: () => void;
6191
+ };
6192
+ Markers: {
6193
+ add: (coordinate: Coordinate, html: string, opts: TAddMarkerOptions) => EntityId<MarkerState> | undefined;
6194
+ remove: (id: string) => void;
6195
+ getContentEl: (id: string) => HTMLElement | undefined;
6196
+ removeAll: () => void;
6197
+ setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
6198
+ animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
6199
+ };
6200
+ Exporter: {
6201
+ getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
6202
+ };
6203
+ Shapes: {
6204
+ add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
6205
+ floorId?: string;
6206
+ }) => string;
6207
+ remove: (customGeometry: Shape) => string;
6208
+ };
6209
+ Labels: {
6210
+ all: ({ onCreate }: {
6211
+ onCreate: (labelId: string | number, text: string) => void;
6212
+ }) => void;
6213
+ add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
6214
+ floorId?: string;
6215
+ }) => {
6216
+ id: string | number;
6217
+ };
6218
+ remove: (targetId: string) => void;
6219
+ removeAll: () => void;
6220
+ };
6221
+ Paths: {
6222
+ add: (coordinates: Coordinate[], options?: TAddPathOptions) => CancellablePromise<EntityId<PathState>[]>;
6223
+ remove: (entityIds: string[]) => void;
6224
+ };
6225
+ constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
6226
+ }
6227
+ }
6228
+
5446
6229
  declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
5447
6230
  import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
5448
6231
  import { type TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
6232
+ import { WALLS, DOORS } from '@mappedin/react-sdk/mappedin-js/src/types';
5449
6233
  import type MapData from '@mappedin/react-sdk/mappedin-js/src/map-data';
5450
- import { Coordinate, MapObject, Space, Floor } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6234
+ import { Coordinate, MapObject, Space, Floor, type MapDataInternal, Door } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
5451
6235
  import type { MapView } from '@mappedin/react-sdk/mappedin-js/src/map-view';
5452
- import { Label, Marker, type Model } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
6236
+ import { Label, Marker, type Model, type Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
5453
6237
  import { Navigation } from '@mappedin/react-sdk/mappedin-js/src/navigation';
5454
6238
  import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState } from '@mappedin/react-sdk/mappedin-js/src/types';
5455
6239
  import { Camera } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera';
@@ -5458,6 +6242,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
5458
6242
  import { Labels } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels';
5459
6243
  import { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
5460
6244
  import { Markers } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/markers';
6245
+ import { Images } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/images';
5461
6246
  import { Models } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/models';
5462
6247
  import { Paths } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/paths';
5463
6248
  import { BlueDot } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/blue-dot/blue-dot';
@@ -5487,10 +6272,11 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
5487
6272
  BlueDot: BlueDot;
5488
6273
  Shapes: Shapes;
5489
6274
  Style: Style;
6275
+ Images: Images;
5490
6276
  constructor(rendererCore: RendererCore, mapView: MapView);
5491
- updateState<T extends Space | MapObject | Label | Marker | 'walls' | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
6277
+ updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
5492
6278
  update: () => void;
5493
- getMapDataInternal(): import("../map-data-objects").MapDataInternal | undefined;
6279
+ getMapDataInternal(): MapDataInternal | undefined;
5494
6280
  getMapData(): MapData | undefined;
5495
6281
  expand(opts?: {
5496
6282
  excludeFloors: Floor[];
@@ -5500,7 +6286,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/api' {
5500
6286
  setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
5501
6287
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
5502
6288
  get currentFloor(): Floor;
5503
- getState<T extends Space | MapObject | Label | Marker | Model | string>(target: T): TGetState<T> | undefined;
6289
+ getState<T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T): TGetState<T> | undefined;
5504
6290
  setHoverColor(c: string): void;
5505
6291
  getHoverColor(): string | undefined;
5506
6292
  getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], opt?: TGetDirectionsOptions) => Directions | undefined;
@@ -6014,97 +6800,218 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/outdoor' {
6014
6800
  }
6015
6801
  }
6016
6802
 
6017
- declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
6018
- import type { ParsedMVF } from '@mappedin/mvf';
6019
- import { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
6020
- import type { Position, AddLabelOptions, RendererCore, MarkerState, LineStyle, PaintStyle } from '@mappedin/core-sdk';
6021
- import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
6022
- import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel } from '@mappedin/react-sdk/mappedin-js/src/types';
6023
- import { type AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
6024
- import { PubSub } from '@packages/internal/common';
6025
- import { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
6026
- import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
6027
- import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
6028
- import type { Shape } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
6029
- export class GeojsonApiMapObject extends PubSub<{
6030
- 'floor-change': {
6031
- reason?: TFloorChangeReason;
6032
- floorId: string;
6033
- };
6034
- 'floor-change-start': {
6035
- floorId: string;
6036
- };
6037
- }> {
6038
- floors: FloorObject[];
6039
- currentFloorId: string;
6040
- id: string;
6041
- renderer: RendererCore;
6042
- mvf: ParsedMVF;
6043
- styleMap: AggregatedStyleMap;
6044
- StackedMaps: StackedMaps;
6045
- get currentFloor(): FloorObject;
6046
- setFloor(floorId: string, reason?: TFloorChangeReason): void;
6047
- Models: {
6048
- add: (id: string, targets: TAddModel[], opts: TAddModelOptions & {
6049
- floorId?: string;
6050
- }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
6051
- remove: (_id: string, _groupId: string) => void;
6052
- };
6053
- Markers: {
6054
- add: (coordinate: Position, html: string, opts?: TAddMarkerOptions & {
6055
- floorId?: string;
6056
- }) => import("@mappedin/core-sdk").EntityId<MarkerState>;
6057
- remove: (_id: string) => void;
6058
- getContentEl: (id: string) => HTMLElement | undefined;
6059
- removeAll: () => void;
6060
- setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
6061
- animateTo: (id: string, coordinate: Position, targetFloorId: string, options?: TAnimationOptions) => Promise<void>;
6062
- };
6063
- Exporter: {
6064
- getCurrentSceneGLTF: (options: GLTFExportOptions) => Promise<Blob>;
6065
- };
6066
- Shapes: {
6067
- add: <T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, opts: {
6068
- floorId?: string;
6069
- }) => string;
6070
- remove: (customGeometry: Shape) => string;
6071
- };
6072
- Labels: {
6073
- all: ({ onCreate }: {
6074
- onCreate: (labelId: string | number, text: string) => void;
6075
- }) => void;
6076
- add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
6077
- floorId?: string;
6078
- }) => {
6079
- id: string | number;
6080
- };
6081
- remove: (targetId: string) => void;
6082
- removeAll: () => void;
6083
- };
6084
- Paths: {
6085
- add: (coordinates: Coordinate[], options?: TAddPathOptions) => Promise<{
6086
- id: string | number;
6087
- }[]>;
6088
- remove: (entityIds: string[]) => void;
6089
- };
6090
- constructor(id: string, mvf: any, styleMap: AggregatedStyleMap, options: TShow3DMapOptions | undefined, renderer: RendererCore);
6803
+ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/images' {
6804
+ import type { TAddImageOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
6805
+ import { Image } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
6806
+ import type { GeojsonApiMapObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object';
6807
+ import type { Space, Door, Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
6808
+ export class Images {
6809
+ #private;
6810
+ /**
6811
+ * @internal
6812
+ */
6813
+ get currentMap(): GeojsonApiMapObject | undefined;
6814
+ /**
6815
+ * @internal
6816
+ */
6817
+ constructor({ currentMapGetter }: {
6818
+ currentMapGetter: CurrentMapGetter;
6819
+ });
6820
+ /**
6821
+ * @internal
6822
+ */
6823
+ getById(id: string): {
6824
+ image: Image;
6825
+ entityId: string;
6826
+ } | undefined;
6827
+ /**
6828
+ * Adds an image to the map.
6829
+ *
6830
+ * @param target The target object ({@link Space}, {@link Door}, or {@link Coordinate}) for the image.
6831
+ * @param url The URL of the image.
6832
+ * @param options Optional additional options for the {@link Image}.
6833
+ * @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
6834
+ * @example
6835
+ * // Add an interactive {@link Image} to the map with custom HTML content.
6836
+ * map.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
6837
+ */
6838
+ add(target: Space | Door | Coordinate, url: string, options: TAddImageOptions): Image;
6839
+ /**
6840
+ * Removes a image from the map.
6841
+ *
6842
+ * @param image {Image} The {@link Image} which should be removed.
6843
+ * @example
6844
+ * mapView.Images.remove(image);
6845
+ */
6846
+ remove(image: Image): void;
6847
+ /**
6848
+ * Remove all the images from the map.
6849
+ *
6850
+ * @example
6851
+ * map.Images.removeAll();
6852
+ */
6853
+ removeAll(): Image[];
6091
6854
  }
6855
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
6856
+ export {};
6092
6857
  }
6093
6858
 
6094
- declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
6095
- import type { ParsedMVF } from '@mappedin/mvf';
6096
- import type { RendererCore } from '@mappedin/core-sdk';
6097
- import type { AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
6098
- import type { TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
6099
- export class FloorObject {
6100
- id: string;
6101
- name: string;
6102
- elevation: number;
6103
- containerId: string;
6104
- layers: Map<string, string>;
6105
- constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf: ParsedMVF, styleMap?: AggregatedStyleMap);
6106
- load: () => this;
6859
+ declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
6860
+ /**
6861
+ * Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
6862
+ * If a set context is not in this list, it will default to the first VALID_CONTEXTS value.
6863
+ */
6864
+ export const VALID_CONTEXTS: readonly ["websdk", "web", "webv2", "kiosk-v2", "mobile", "iossdk", "androidsdk", "reactnativesdk"];
6865
+ type ValidContext = (typeof VALID_CONTEXTS)[number];
6866
+ export const DEFAULT_CONTEXT: "websdk";
6867
+ export const ANALYTICS_URL = "https://api-gateway.mappedin.com/track-analytics/a/";
6868
+ export const FOUND_POSITION = "found-position";
6869
+ export const FOUND_FLOOR = "found-floor";
6870
+ type BlueDotEvents = typeof FOUND_FLOOR | typeof FOUND_POSITION;
6871
+ export class AnalyticsInternal {
6872
+ #private;
6873
+ constructor();
6874
+ init(options: AnalyticsUpdateOptions): void;
6875
+ /**
6876
+ * Reset state and options
6877
+ */
6878
+ reset(): void;
6879
+ updateState(update: UpdateStateParam): void;
6880
+ get authReady(): boolean;
6881
+ getState(): AnalyticState;
6882
+ capture<T extends keyof CaptureEventsPayloadMap>(eventName: T, query: CaptureEventsPayloadMap[T]): Promise<Response> | Promise<void>;
6883
+ capture<T extends keyof CaptureEventsPayloadMap | (string & NonNullable<unknown>)>(target: T, query: T extends keyof CaptureEventsPayloadMap ? CaptureEventsPayloadMap[T] : Record<string, any>): Promise<Response> | Promise<void>;
6884
+ /**
6885
+ * @internal
6886
+ */
6887
+ sendGetMapDataEvent(payload: {
6888
+ parseDuration: number;
6889
+ downloadDuration: number;
6890
+ viewId?: string;
6891
+ }): void | Promise<Response> | Promise<void>;
6892
+ sendWatchPositionDenied(): void | Promise<Response> | Promise<void>;
6893
+ /**
6894
+ * @internal
6895
+ */
6896
+ sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
6897
+ firstRenderDuration: number;
6898
+ dimension: {
6899
+ height: number;
6900
+ width: number;
6901
+ };
6902
+ }): void | Promise<Response> | Promise<void>;
6903
+ /**
6904
+ * @internal
6905
+ */
6906
+ sendGetDirectionsEvent: (start: string, end: string) => void;
6907
+ sendBlueDotEvents(event: BlueDotEvents): void | Promise<Response> | Promise<void>;
6107
6908
  }
6909
+ type AnalyticsUserPosition = {
6910
+ bluedotTimestamp: number;
6911
+ latitude: number;
6912
+ longitude: number;
6913
+ floorLevel?: number;
6914
+ accuracy: number;
6915
+ };
6916
+ type AnalyticsOptions = {
6917
+ /** The ID of the map to be used for analytics. */
6918
+ mapId?: string;
6919
+ /** The API key for authentication. */
6920
+ key?: string;
6921
+ /** The API secret for authentication. */
6922
+ secret?: string;
6923
+ /** The access token for authentication. */
6924
+ accessToken?: string;
6925
+ /** Flag to disable authentication. */
6926
+ noAuth?: boolean;
6927
+ /** Flag to enable logging of events. */
6928
+ logEvents?: boolean;
6929
+ /** Flag to enable sending of events. */
6930
+ sendEvents?: boolean;
6931
+ /** The context in which the analytics are being used. */
6932
+ context?: string;
6933
+ /** The platform string to be included in analytics. */
6934
+ platformString?: string;
6935
+ /** The base URI for the analytics endpoint. */
6936
+ baseUri?: string;
6937
+ };
6938
+ export type AnalyticsUpdateOptions = Omit<AnalyticsOptions, 'mapId' | 'key' | 'secret' | 'accessToken'> & {
6939
+ /** The ID of the map to be used for analytics. */
6940
+ mapId: string;
6941
+ } & ({
6942
+ /** The API key for authentication. */
6943
+ key: string;
6944
+ /** The API secret for authentication. */
6945
+ secret: string;
6946
+ } | {
6947
+ /** The access token for authentication. */
6948
+ accessToken: string;
6949
+ });
6950
+ export type AnalyticState = {
6951
+ accessToken?: string | undefined;
6952
+ version: string;
6953
+ platformString: string;
6954
+ baseUri: string;
6955
+ analyticsBaseUrl: string;
6956
+ noAuth: boolean;
6957
+ geolocationMode: boolean;
6958
+ mi_uuid: string;
6959
+ mi_session: string;
6960
+ context: ValidContext;
6961
+ userPosition?: AnalyticsUserPosition;
6962
+ mapId?: string;
6963
+ key?: string;
6964
+ secret?: string;
6965
+ logEvents: boolean;
6966
+ sendEvents: boolean;
6967
+ };
6968
+ type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken'>>;
6969
+ type CaptureEventsPayloadMap = {
6970
+ '$select-location': {
6971
+ id: string;
6972
+ };
6973
+ '$select-category': {
6974
+ id: string;
6975
+ };
6976
+ '$query-suggest': {
6977
+ query: string;
6978
+ suggestions?: string[];
6979
+ };
6980
+ '$query-search': {
6981
+ query: string;
6982
+ hits?: string[];
6983
+ };
6984
+ };
6985
+ export const analyticsInternal: AnalyticsInternal;
6986
+ export class Analytics {
6987
+ #private;
6988
+ constructor(internalAnalytics: AnalyticsInternal);
6989
+ /**
6990
+ * Initializes the analytics with the provided options.
6991
+ * @param args - The options to initialize the analytics.
6992
+ */
6993
+ init(options: AnalyticsUpdateOptions): void;
6994
+ /**
6995
+ * Captures an analytic event with a custom target and query payload.
6996
+ *
6997
+ * @param target - The event name or target can be .
6998
+ * @param query - The payload associated with the event.
6999
+ * @returns A promise that resolves to the server response or void.
7000
+ */
7001
+ capture: typeof AnalyticsInternal.prototype.capture;
7002
+ /**
7003
+ * Updates the analytics state with the provided parameters.
7004
+ * @param update - The state parameters to update.
7005
+ */
7006
+ updateState: (update: Partial<Pick<AnalyticState, 'logEvents' | 'sendEvents' | 'logEvents' | 'baseUri' | 'accessToken'>>) => void;
7007
+ /**
7008
+ * Returns the current analytics state.
7009
+ * @internal
7010
+ * @returns the current analytics state
7011
+ */
7012
+ getState(): AnalyticState;
7013
+ }
7014
+ export {};
6108
7015
  }
6109
7016
 
6110
7017
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object' {
@@ -6125,6 +7032,22 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object
6125
7032
  }
6126
7033
  }
6127
7034
 
7035
+ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object' {
7036
+ import type { ParsedMVF } from '@mappedin/mvf';
7037
+ import type { RendererCore } from '@mappedin/core-sdk';
7038
+ import type { AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
7039
+ import type { TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
7040
+ export class FloorObject {
7041
+ id: string;
7042
+ name: string;
7043
+ elevation: number;
7044
+ containerId: string;
7045
+ layers: Map<string, string>;
7046
+ constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf: ParsedMVF, styleMap?: AggregatedStyleMap);
7047
+ load: () => this;
7048
+ }
7049
+ }
7050
+
6128
7051
  declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object' {
6129
7052
  export default abstract class BaseMetaData {
6130
7053
  /**
@@ -6161,7 +7084,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/geometry3d' {
6161
7084
  export class Geometry3D {
6162
7085
  id: string | number;
6163
7086
  components: [MeshComponentTypes, StyleComponent, InteractionComponent?];
6164
- get object3d(): import("../components/mesh").EntityBatchedMesh | Geometry3DObject3D | undefined;
7087
+ get object3d(): Geometry3DObject3D | import("../components/mesh").EntityBatchedMesh | undefined;
6165
7088
  get parent(): GroupContainerObject3D | GeometryGroupObject3D | null;
6166
7089
  get type(): 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
6167
7090
  constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent, styleComponent: StyleComponent);
@@ -6220,6 +7143,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
6220
7143
  opacity: number;
6221
7144
  shading?: Shading;
6222
7145
  outline: boolean;
7146
+ texture?: string;
7147
+ topTexture?: string;
6223
7148
  };
6224
7149
  export class GeometryGroupStyleComponent implements GeometryGroupStyle {
6225
7150
  #private;
@@ -6227,6 +7152,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/geometry-group-style'
6227
7152
  topColor?: string;
6228
7153
  opacity: number;
6229
7154
  outline: boolean;
7155
+ texture?: string;
7156
+ topTexture?: string;
6230
7157
  /**
6231
7158
  * Ideally for handling all style component changes. However, it's only used for handling outline for now.
6232
7159
  * Color update is handled separately in each child. See: https://github.com/MappedIn/sdk/blob/v6.0.1-beta.1/sdks/geojson/src/entities/utils.ts#L70
@@ -6245,6 +7172,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/image' {
6245
7172
  import type { Position } from '@mappedin/react-sdk/geojson/src/types';
6246
7173
  import type { Feature, Point } from 'geojson';
6247
7174
  import { Geometry3DObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
7175
+ import { z } from 'zod';
6248
7176
  export class EntityMesh extends Mesh {
6249
7177
  userData: {
6250
7178
  entityId: string | number;
@@ -6266,7 +7194,70 @@ declare module '@mappedin/react-sdk/geojson/src/components/image' {
6266
7194
  rotation?: number;
6267
7195
  verticalOffset?: number;
6268
7196
  };
6269
- export function validImageFeature(feature: Feature<Point, ImageProperties>): feature is Feature<Point, ImageProperties>;
7197
+ export const addImageFeatureStyleSchema: z.ZodObject<{
7198
+ flipImageToFaceCamera: z.ZodOptional<z.ZodBoolean>;
7199
+ url: z.ZodString;
7200
+ }, "strip", z.ZodTypeAny, {
7201
+ url: string;
7202
+ flipImageToFaceCamera?: boolean | undefined;
7203
+ }, {
7204
+ url: string;
7205
+ flipImageToFaceCamera?: boolean | undefined;
7206
+ }>;
7207
+ export const addImageFeatureSchema: z.ZodObject<{
7208
+ type: z.ZodEnum<["Feature"]>;
7209
+ properties: z.ZodObject<{
7210
+ width: z.ZodNumber;
7211
+ height: z.ZodNumber;
7212
+ rotation: z.ZodOptional<z.ZodNumber>;
7213
+ verticalOffset: z.ZodOptional<z.ZodNumber>;
7214
+ }, "strip", z.ZodTypeAny, {
7215
+ height: number;
7216
+ width: number;
7217
+ rotation?: number | undefined;
7218
+ verticalOffset?: number | undefined;
7219
+ }, {
7220
+ height: number;
7221
+ width: number;
7222
+ rotation?: number | undefined;
7223
+ verticalOffset?: number | undefined;
7224
+ }>;
7225
+ geometry: z.ZodObject<{
7226
+ type: z.ZodEnum<["Point"]>;
7227
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
7228
+ }, "strip", z.ZodTypeAny, {
7229
+ type: "Point";
7230
+ coordinates: number[];
7231
+ }, {
7232
+ type: "Point";
7233
+ coordinates: number[];
7234
+ }>;
7235
+ }, "strip", z.ZodTypeAny, {
7236
+ type: "Feature";
7237
+ geometry: {
7238
+ type: "Point";
7239
+ coordinates: number[];
7240
+ };
7241
+ properties: {
7242
+ height: number;
7243
+ width: number;
7244
+ rotation?: number | undefined;
7245
+ verticalOffset?: number | undefined;
7246
+ };
7247
+ }, {
7248
+ type: "Feature";
7249
+ geometry: {
7250
+ type: "Point";
7251
+ coordinates: number[];
7252
+ };
7253
+ properties: {
7254
+ height: number;
7255
+ width: number;
7256
+ rotation?: number | undefined;
7257
+ verticalOffset?: number | undefined;
7258
+ };
7259
+ }>;
7260
+ export function validateImage(id: string | number, feature: Feature<Point, ImageProperties>, style: ImageStyle): void;
6270
7261
  /**
6271
7262
  * State representing an Image
6272
7263
  */
@@ -6352,7 +7343,14 @@ declare module '@mappedin/react-sdk/geojson/src/types/constants' {
6352
7343
  declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimization/batched-material' {
6353
7344
  import { MeshLambertMaterial, type Color, type Texture, type MeshLambertMaterialParameters } from 'three';
6354
7345
  export class BatchedStandardMaterial extends MeshLambertMaterial {
6355
- constructor(params: MeshLambertMaterialParameters, geometryCount: number);
7346
+ constructor(params: MeshLambertMaterialParameters, geometryCount: number, scaleFactor?: number);
7347
+ /**
7348
+ * These control the repeat factor of the texture in the Y direction.
7349
+ * So when we scale a geometry, it needs to scale the texture as well.
7350
+ * For now this only applies to detached geometries.
7351
+ */
7352
+ get repeatYFactor(): number;
7353
+ set repeatYFactor(value: number);
6356
7354
  get texture(): Texture;
6357
7355
  set texture(texture: Texture);
6358
7356
  get topTexture(): Texture;
@@ -6365,6 +7363,8 @@ declare module '@mappedin/react-sdk/geojson/src/systems/mesh-creation-and-optimi
6365
7363
  };
6366
7364
  showTextures: (batchId: number) => void;
6367
7365
  hideTextures(batchId: number): void;
7366
+ removeSideTexture(batchId: number): void;
7367
+ removeTopTexture(batchId: number): void;
6368
7368
  dispose(): void;
6369
7369
  }
6370
7370
  }
@@ -6630,13 +7630,18 @@ declare module '@mappedin/react-sdk/geojson/src/systems/2d-draw/system' {
6630
7630
 
6631
7631
  declare module '@mappedin/react-sdk/geojson/src/systems/draw/system' {
6632
7632
  import { PubSub } from '@packages/internal/common';
7633
+ import { MeshComponent } from '@mappedin/react-sdk/geojson/src/components/mesh';
7634
+ import { StyleComponent } from '@mappedin/react-sdk/geojson/src/components/style';
6633
7635
  import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
7636
+ import { InteractionComponent } from '@mappedin/react-sdk/geojson/src/components/interaction';
7637
+ import type { GeometryGroupStyleComponent } from '@mappedin/react-sdk/geojson/src/components/geometry-group-style';
6634
7638
  export class DrawSystem extends PubSub<{
6635
7639
  'texture-loaded': void;
6636
7640
  }> {
6637
7641
  #private;
6638
7642
  state: RendererState;
6639
7643
  constructor(state: RendererState);
7644
+ processTextures(component: MeshComponent, styleComponent: StyleComponent | GeometryGroupStyleComponent, interactionComponent?: InteractionComponent): void;
6640
7645
  update(): void;
6641
7646
  destroy(): void;
6642
7647
  }
@@ -6934,6 +7939,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/outline-interpolation/sy
6934
7939
 
6935
7940
  declare module '@mappedin/react-sdk/geojson/src/systems/image/system' {
6936
7941
  import type { RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
7942
+ import { type Texture } from 'three';
6937
7943
  import type { RendererCore } from '@mappedin/react-sdk/geojson/src';
6938
7944
  import { PubSub } from '@packages/internal/common';
6939
7945
  export const DEFAULT_VERTICAL_OFFSET = 0.01;
@@ -6941,6 +7947,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/image/system' {
6941
7947
  'image-loaded': void;
6942
7948
  }> {
6943
7949
  constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
7950
+ imageLoadingCache: Map<string, Promise<Texture>>;
6944
7951
  update(cameraRotationRadians: number): void;
6945
7952
  }
6946
7953
  }
@@ -6978,13 +7985,13 @@ declare module '@mappedin/react-sdk/geojson/src/systems/path' {
6978
7985
  export { PathSystem } from '@mappedin/react-sdk/geojson/src/systems/path/system';
6979
7986
  }
6980
7987
 
6981
- declare module '@mappedin/react-sdk/geojson/src/systems/mesh-opacity/system' {
7988
+ declare module '@mappedin/react-sdk/geojson/src/systems/mesh-detachment/system' {
6982
7989
  import { type Geometry3DTypes, type RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
6983
7990
  /**
6984
7991
  * This system is responsible for updating the opacity of the mesh, which results in the mesh
6985
7992
  * being detached from the parent's optimized geometry group and rendered as a separate mesh.
6986
7993
  */
6987
- export class MeshOpacitySystem {
7994
+ export class MeshDetachmentSystem {
6988
7995
  #private;
6989
7996
  rendererState: RendererState;
6990
7997
  dirty: boolean;
@@ -7126,15 +8133,20 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
7126
8133
  import { Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
7127
8134
  import type { Position, EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
7128
8135
  import type { WithPolygonImage } from '@packages/internal/mvf-utils';
7129
- import type { MultiLineString } from 'geojson';
8136
+ import type { FeatureCollection, MultiLineString } from 'geojson';
7130
8137
  import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle } from '@mappedin/core-sdk';
7131
8138
  import type { TGeometryState, TLabelState, TDirectionInstructionAction, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
7132
- import type { TMarkerState } from '@mappedin/react-sdk/mappedin-js/src/types';
8139
+ import type { TDoorsState, TMarkerState, TWallsState } from '@mappedin/react-sdk/mappedin-js/src/types';
7133
8140
  export function convertCoordinateToPosition(coord: Coordinate): Position;
7134
8141
  export function convertPositionToCoordinate(coord: Position): Coordinate;
7135
- export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => Feature<MultiLineString, any>;
8142
+ export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
8143
+ entrances: FeatureCollection<LineString, any>;
8144
+ walls: Feature<MultiLineString, any>;
8145
+ };
7136
8146
  export function translateLabelStateToGeojsonCore(state: Partial<TLabelState>, currentState: Partial<LabelState>): Partial<LabelState>;
7137
8147
  export function translateMarkerStateToGeojsonCore(state: Partial<TMarkerState>, currentState: Partial<MarkerState>): Partial<MarkerState>;
8148
+ export function translateDoorsStateToGeojsonCore(state: Partial<TDoorsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
8149
+ export function translateWallsStateToGeojsonCore(state: Partial<TWallsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
7138
8150
  export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
7139
8151
  export function differenceBetweenAngles(a: number, b: number): number;
7140
8152
  export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
@@ -7154,7 +8166,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
7154
8166
  }
7155
8167
 
7156
8168
  declare module '@mappedin/react-sdk/geojson/src/components/style' {
7157
- import type { Cap, Join } from '@mappedin/react-sdk/geojson/src/types';
8169
+ import type { LineStyle } from '@mappedin/react-sdk/geojson/src/renderer';
8170
+ export const DEFAULT_COLOR = "#ffffff";
7158
8171
  export const DEFAULT_HEIGHT = 0.1;
7159
8172
  type Style = {
7160
8173
  color: string;
@@ -7163,8 +8176,8 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
7163
8176
  visible: boolean;
7164
8177
  height: number;
7165
8178
  altitude: number;
7166
- join: Join;
7167
- cap: Cap;
8179
+ join: LineStyle['join'];
8180
+ cap: LineStyle['cap'];
7168
8181
  topColor?: string;
7169
8182
  texture?: string;
7170
8183
  topTexture?: string;
@@ -7185,9 +8198,10 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
7185
8198
  opacity: number;
7186
8199
  width: number;
7187
8200
  height: number;
8201
+ initialHeight: number;
7188
8202
  altitude: number;
7189
- join: Join;
7190
- cap: Cap;
8203
+ join: LineStyle['join'];
8204
+ cap: LineStyle['cap'];
7191
8205
  outline: boolean;
7192
8206
  showImage: boolean;
7193
8207
  flipImageToFaceCamera: boolean;
@@ -7199,12 +8213,14 @@ declare module '@mappedin/react-sdk/geojson/src/components/style' {
7199
8213
 
7200
8214
  declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
7201
8215
  import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/react-sdk/geojson/src';
7202
- import type { MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
8216
+ import { type MarkerState } from '@mappedin/react-sdk/geojson/src/components/marker';
7203
8217
  import type { Geometry3DTypes, Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
7204
8218
  import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
7205
8219
  import { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
7206
8220
  import { Geometry3D } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
7207
8221
  import { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
8222
+ import type { StyleComponent } from '@mappedin/react-sdk/geojson/src/components/style';
8223
+ import type { GeometryGroupStyleComponent } from '@mappedin/react-sdk/geojson/src/components/geometry-group-style';
7208
8224
  export function updateInteractivity(entity: Geometry3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
7209
8225
  export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update: Partial<Pick<GeometryGroupState, 'color' | 'topColor'>>): boolean | undefined;
7210
8226
  export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
@@ -7215,13 +8231,15 @@ declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
7215
8231
  export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
7216
8232
  export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
7217
8233
  export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
7218
- export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined): boolean;
8234
+ export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined, state: RendererState): boolean;
7219
8235
  export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
7220
- export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined): void;
8236
+ export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined, state: RendererState): void;
7221
8237
  export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
7222
8238
  export function updateFlipImageToFaceCamera(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): void;
7223
8239
  export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
7224
8240
  export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
8241
+ export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
8242
+ export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
7225
8243
  export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
7226
8244
  export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
7227
8245
  export function updateOutline(entity: Geometry3DTypes, update?: boolean): boolean;