@mappedin/mappedin-js 6.0.1-beta.3 → 6.0.1-beta.5

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.
@@ -5,14 +5,15 @@
5
5
  // ../mappedin-js/@packages/internal/common/pubsub
6
6
  // ../mappedin-js/@packages/internal/common/Mappedin.Logger
7
7
  // ../mappedin-js/geojson
8
- // ../mappedin-js/@mappedin/core-sdk
9
8
  // ../mappedin-js/@packages/internal/common
10
- // ../mappedin-js/@packages/internal/outdoor-context-v4
9
+ // ../mappedin-js/@mappedin/core-sdk
11
10
  // ../mappedin-js/@mappedin/core-sdk/src/camera
12
11
  // ../mappedin-js/three
12
+ // ../mappedin-js/zod
13
13
  // ../mappedin-js/@packages/internal/shave-text/shave-text
14
14
  // ../mappedin-js/@turf/turf
15
15
  // ../mappedin-js/@packages/internal/quad-tree
16
+ // ../mappedin-js/@packages/internal/outdoor-context-v4
16
17
  // ../mappedin-js/@packages/internal/geojson-navigator
17
18
  // ../mappedin-js/three/addons/loaders/GLTFLoader.js
18
19
  // ../mappedin-js/@mapbox/point-geometry
@@ -34,11 +35,10 @@ declare module '@mappedin/mappedin-js' {
34
35
  import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
35
36
  import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } from '@mappedin/mvf';
36
37
  import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
37
- import type { Shading, PaintStyle, LineStyle, WatermarkOptions, Position } from '@mappedin/mappedin-js/geojson/src';
38
+ import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
38
39
  import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
39
40
  export type { PubSub } from '@packages/internal/common/pubsub';
40
- import { MapLibreOverlay } from '@mappedin/mappedin-js/geojson/src/maplibre-overlay';
41
- import { analytics } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
41
+ import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
42
42
  export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
43
43
  /**
44
44
  * Represents all the available antialiasing options.
@@ -250,6 +250,14 @@ declare module '@mappedin/mappedin-js' {
250
250
  * @experimental
251
251
  */
252
252
  style?: {
253
+ /**
254
+ * Background color. Only relevant if outdoor map is disabled.
255
+ */
256
+ backgroundColor?: string;
257
+ /**
258
+ * Background alpha value. Only relevant if outdoor map is disabled.
259
+ */
260
+ backgroundAlpha?: number;
253
261
  /**
254
262
  * Set the global shading for all elements. True will use default values, false will disable shading.
255
263
  * @default true
@@ -287,26 +295,6 @@ declare module '@mappedin/mappedin-js' {
287
295
  * const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
288
296
  */
289
297
  export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
290
- class MappedinMapLibreOverlay extends MapLibreOverlay<{
291
- /**
292
- * Event emitted when the MappedinMap is loaded
293
- */
294
- loaded: {
295
- /**
296
- * MapView instance
297
- */
298
- mapView: MapView;
299
- /**
300
- * MapData instance
301
- */
302
- mapData: MapData;
303
- };
304
- }> {
305
- #private;
306
- static instance: MappedinMapLibreOverlay;
307
- constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
308
- onAdd(map: any): HTMLDivElement;
309
- }
310
298
  /**
311
299
  * Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
312
300
  * @experimental
@@ -317,17 +305,22 @@ declare module '@mappedin/mappedin-js' {
317
305
  export { parseMVF, unzipMVF, enableTestMode };
318
306
  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, };
319
307
  export type * from 'geojson';
320
- 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, } from '@mappedin/mappedin-js/mappedin-js/src/types';
308
+ 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/mappedin-js/mappedin-js/src/types';
309
+ export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
321
310
  export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
322
311
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
323
312
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
324
313
  export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
325
314
  export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
326
- export { analytics };
327
315
  }
328
316
 
329
317
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
318
+ import { PubSub } from '@packages/internal/common';
319
+ import { Analytics } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
330
320
  import type { Connection, Door, Floor, MapDataInternal, Space, MapObject, PointOfInterest, Annotation, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
321
+ import type Category from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
322
+ import type Location from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
323
+ import type Venue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
331
324
  /**
332
325
  * A WeakMap to associate {@link MapData} instances with their internal representation.
333
326
  * We need a way to get the internal data object from the API
@@ -339,8 +332,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
339
332
  * Represents the data for a map, providing access to map elements
340
333
  * like spaces, floors, and points of interest.
341
334
  */
342
- class MapData {
335
+ class MapData extends PubSub<{
336
+ 'language-change': {
337
+ code: string;
338
+ name: string;
339
+ };
340
+ }> {
343
341
  #private;
342
+ Analytics: Analytics;
344
343
  /**
345
344
  * Constructs a new instance of {@link MapData}.
346
345
  *
@@ -365,6 +364,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
365
364
  * @returns {string} The organization ID of the map.
366
365
  */
367
366
  get organizationId(): string;
367
+ /**
368
+ * @internal
369
+ */
370
+ get venue(): Venue | undefined;
368
371
  /**
369
372
  * The token is used to fetch outdoor tiles.
370
373
  *
@@ -422,6 +425,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
422
425
  * const annotations = mapData.getByType('annotation');
423
426
  */
424
427
  getByType(type: 'annotation'): Annotation[];
428
+ /**
429
+ * @internal
430
+ */
431
+ getByType(type: 'location'): Location[];
432
+ /**
433
+ * @internal
434
+ */
435
+ getByType(type: 'category'): Category[];
425
436
  /**
426
437
  * Retrieves a specific map feature by its type and ID.
427
438
  *
@@ -438,9 +449,26 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data' {
438
449
  getById(type: 'object', id: string): MapObject | undefined;
439
450
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
440
451
  getById(type: 'annotation', id: string): Annotation | undefined;
452
+ getById(type: 'location', id: string): Location | undefined;
453
+ getById(type: 'category', id: string): Category | undefined;
441
454
  getById(type: string, id: string): object | undefined;
455
+ /**
456
+ * @internal
457
+ */
458
+ changeLanguage(languageCode: string): Promise<void>;
459
+ /**
460
+ * @internal
461
+ */
462
+ get currentLanguage(): {
463
+ code: string;
464
+ name: string;
465
+ };
442
466
  }
443
467
  export default MapData;
468
+ /**
469
+ * @internal
470
+ */
471
+ export function getMapDataInternal(mapData: MapData): MapDataInternal;
444
472
  }
445
473
 
446
474
  declare module '@mappedin/mappedin-js/mappedin-js/src/events' {
@@ -564,15 +592,26 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
564
592
  import Annotation from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/annotation';
565
593
  import Hyperlink from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink';
566
594
  import Image from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image';
567
- import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap } from '@mappedin/mvf';
595
+ import type { AnnotationCollection, ParsedMVF, Connection as MVFConnection, EntranceCollection, NodeCollection, ObstructionCollection, SpaceCollection, Map as MVFMap, EnterpriseLocation, EnterpriseCategory } from '@mappedin/mvf';
568
596
  import type { MapDataObjects } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types';
597
+ import type Location from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location';
598
+ import type Category from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category';
599
+ import Venue from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue';
600
+ import { PubSub } from '@packages/internal/common';
601
+ import { AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
569
602
  /**
570
603
  * Internal class representing detailed map data.
571
604
  *
572
605
  * @internal
573
606
  */
574
- class MapDataInternal {
607
+ class MapDataInternal extends PubSub<{
608
+ 'language-change': {
609
+ code: string;
610
+ name: string;
611
+ };
612
+ }> {
575
613
  #private;
614
+ Analytics: AnalyticsInternal;
576
615
  /**
577
616
  * Represents the parsed Mappedin Venue Format (MVF) data.
578
617
  */
@@ -593,7 +632,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
593
632
  * Represents a map of entrance IDs to obstruction IDs.
594
633
  */
595
634
  readonly obstructionIdByEntranceId: Record<string, string>;
635
+ readonly venue?: Venue;
596
636
  doorsByNodeId: Record<string, Door>;
637
+ locationsBySpaceId: Record<string, EnterpriseLocation[]>;
597
638
  /**
598
639
  * @internal
599
640
  */
@@ -656,6 +697,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
656
697
  * @returns {Annotation[]} An array of Annotation objects.
657
698
  */
658
699
  get nodes(): Node[];
700
+ get locations(): Location[];
701
+ get categories(): Category[];
659
702
  /**
660
703
  * Retrieves an object by its type and ID.
661
704
  *
@@ -671,6 +714,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
671
714
  getById(type: 'object', id: string): MapObject | undefined;
672
715
  getById(type: 'point-of-interest', id: string): PointOfInterest | undefined;
673
716
  getById(type: 'annotation', id: string): Annotation | undefined;
717
+ getById(type: 'location', id: string): Location | undefined;
718
+ getById(type: 'category', id: string): Category | undefined;
674
719
  getMapDataById(id: string): MapDataObjects | undefined;
675
720
  /**
676
721
  * Retrieves a feature by its type and ID from the Mappedin Venue Format (MVF) data.
@@ -688,6 +733,25 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
688
733
  getMVFFeatureById(type: 'annotation', id: string): AnnotationCollection['features'][number] | undefined;
689
734
  getMVFFeatureById(type: string, id: string): object | undefined;
690
735
  getMVFFeatureByNodeId(type: 'connection', id: string): MVFConnection | undefined;
736
+ currentLanguage: {
737
+ code: string;
738
+ name: string;
739
+ };
740
+ /**
741
+ * These represent maps of diffed objects that are used to store the translated values
742
+ */
743
+ languagePacks: {
744
+ [key: string]: {
745
+ location: {
746
+ [key: string]: Partial<EnterpriseLocation>;
747
+ };
748
+ category: {
749
+ [key: string]: Partial<EnterpriseCategory>;
750
+ };
751
+ };
752
+ };
753
+ getPropTranslation(type: 'location' | 'category', prop: string, id: string, fallback: EnterpriseLocation[keyof EnterpriseLocation] | EnterpriseCategory[keyof EnterpriseCategory]): unknown;
754
+ changeLanguage(languageCode: string): Promise<void>;
691
755
  /**
692
756
  * Cleans up resources used by the instance.
693
757
  *
@@ -695,7 +759,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
695
759
  */
696
760
  destroy(): void;
697
761
  }
698
- export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, };
762
+ export { MapDataInternal, Space, Floor, Connection, MapObject, Door, Coordinate, PointOfInterest, Annotation, Hyperlink, Image, Location, };
699
763
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space';
700
764
  export type { MapDataObjects };
701
765
  }
@@ -705,12 +769,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
705
769
  import { PubSub } from '@packages/internal/common';
706
770
  import { type TEvents, type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
707
771
  import type { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
708
- import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
772
+ import type { Camera, Labels, Markers, Models, Paths, Exporter, Directions, Style, Outdoor, Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
709
773
  import type { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
710
774
  import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
711
- import type { Floor, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
712
- import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/mappedin-js/mappedin-js/src/types';
713
- import type { Label, Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
775
+ import type { Door, Floor, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
776
+ import type { DOORS, WALLS, TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState, TUpdateStates } from '@mappedin/mappedin-js/mappedin-js/src/types';
777
+ import type { Label, Marker, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
714
778
  import type { TEventPayload } from '@mappedin/mappedin-js/mappedin-js/src/events';
715
779
  import type { Shapes } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes';
716
780
  export class MapView extends PubSub<TEvents> {
@@ -727,6 +791,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
727
791
  * Controls for the map's markers.
728
792
  */
729
793
  Markers: Markers;
794
+ /**
795
+ * Controls for the map's markers.
796
+ */
797
+ Images: Images;
730
798
  /**
731
799
  * Controls for the map's models.
732
800
  */
@@ -782,8 +850,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
782
850
  * // Update the color of a space to red.
783
851
  * map.updateState(space, { color: 'red' });
784
852
  */
785
- updateState<T extends Space | MapObject | Label | Marker>(target: T | string, state: TUpdateState<T>): any;
786
- updateState<T extends 'walls' | (string & NonNullable<unknown>)>(target: T, state: TUpdateStates): any;
853
+ updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS>(target: T, state: TUpdateState<T>): any;
854
+ updateState<T extends string & NonNullable<unknown>>(target: T, state: TUpdateStates): any;
787
855
  update: () => void;
788
856
  getMapData(): {
789
857
  [x: string]: MapData;
@@ -831,7 +899,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
831
899
  * @hidden
832
900
  */
833
901
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
834
- getState<T extends Space | MapObject | Label | Marker | string>(target: T): TGetState<T> | undefined;
902
+ getState<T extends Space | MapObject | Label | Marker | Image | string>(target: T): TGetState<T> | undefined;
835
903
  setHoverColor(c: string): void;
836
904
  getHoverColor(): string | undefined;
837
905
  /**
@@ -912,14 +980,17 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view' {
912
980
  * @internal
913
981
  */
914
982
  get __core(): RendererCore;
983
+ /**
984
+ * Clears all added elements from the map.
985
+ */
986
+ clear(): void;
915
987
  /**
916
988
  * Destroys the MapView.
917
989
  */
918
990
  destroy(): void;
919
991
  /**
920
- * @internal
921
992
  * @experimental
922
- * SDK debug mode wip
993
+ * Enable debug interface
923
994
  */
924
995
  enableDebug(): Promise<void>;
925
996
  }
@@ -929,8 +1000,8 @@ declare module '@mappedin/mappedin-js/geojson/src' {
929
1000
  import type { MarkerState, AddMarkerOptions } from '@mappedin/mappedin-js/geojson/src/components/marker';
930
1001
  import type { PathState, AddPathOptions } from '@mappedin/mappedin-js/geojson/src/components/path';
931
1002
  import type { AddLabelOptions, LabelAppearance, LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
932
- import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
933
- import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
1003
+ import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
1004
+ import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
934
1005
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
935
1006
  import type { InsetPadding, RendererCoreOptions, ClickPayload, HoverPayload, CameraPayload, MapEvent, MapEventPayload } from '@mappedin/mappedin-js/geojson/src/types';
936
1007
  import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
@@ -962,31 +1033,43 @@ declare module '@mappedin/mappedin-js/geojson/src' {
962
1033
  }): Promise<RendererCore>;
963
1034
  }
964
1035
 
965
- declare module '@mappedin/mappedin-js/geojson/src/maplibre-overlay' {
966
- import type { IControl, Map as MapLibreMap } from '@packages/internal/outdoor-context-v4';
967
- import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
968
- import RendererCore from '@mappedin/mappedin-js/geojson/src/renderer';
969
- import { PubSub } from '@packages/internal/common';
970
- export class MapLibreOverlay<T> extends PubSub<T> implements IControl {
971
- el: HTMLDivElement;
972
- core: RendererCore;
973
- origin?: Position;
974
- constructor(origin: Position | undefined);
975
- onAdd(map: MapLibreMap): HTMLDivElement;
976
- onRemove(): void;
1036
+ declare module '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay' {
1037
+ import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
1038
+ import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
1039
+ import type { TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
1040
+ import { MapLibreOverlay } from '@mappedin/mappedin-js/geojson/src/maplibre-overlay';
1041
+ import type { Position } from '@mappedin/core-sdk';
1042
+ export class MappedinMapLibreOverlay extends MapLibreOverlay<{
1043
+ /**
1044
+ * Event emitted when the MappedinMap is loaded
1045
+ */
1046
+ loaded: {
1047
+ /**
1048
+ * MapView instance
1049
+ */
1050
+ mapView: MapView;
1051
+ /**
1052
+ * MapData instance
1053
+ */
1054
+ mapData: MapData;
1055
+ };
1056
+ }> {
1057
+ #private;
1058
+ static instance: MappedinMapLibreOverlay;
1059
+ constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
1060
+ onAdd(map: any): HTMLDivElement;
1061
+ onRemove(): void;
977
1062
  }
978
1063
  }
979
1064
 
980
- declare module '@mappedin/mappedin-js/mappedin-js/src/analytics' {
981
- export { analytics, analyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
982
- export type { CustomerAnalytics, AnalyticsOptions } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
983
- }
984
-
985
1065
  declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
986
- import { Feature, MultiPolygon, Polygon } from 'geojson';
1066
+ import type { Feature, MultiPolygon, Polygon } from 'geojson';
987
1067
  import type { Coordinate, Floor, Door, Space, MapObject, PointOfInterest, Connection, Annotation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
988
- import type { Label, Marker, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
1068
+ import type { Label, Marker, Model, Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
989
1069
  import type { EasingCurve } from '@mappedin/core-sdk/src/camera';
1070
+ export type DeepRequired<T> = Required<{
1071
+ [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
1072
+ }>;
990
1073
  /**
991
1074
  * @hidden
992
1075
  */
@@ -1048,6 +1131,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1048
1131
  * Defines the state for a label when its appearance is updated.
1049
1132
  */
1050
1133
  export type TLabelState = {
1134
+ text: string;
1051
1135
  type: 'label';
1052
1136
  /**
1053
1137
  * Appearance settings for the label.
@@ -1072,6 +1156,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1072
1156
  export type TModelState = {
1073
1157
  type: 'model';
1074
1158
  };
1159
+ /**
1160
+ * Defines the state for an image when its appearance is updated.
1161
+ */
1162
+ export type TImageState = {
1163
+ type: 'image';
1164
+ };
1075
1165
  export type TWallsState = {
1076
1166
  /**
1077
1167
  * Color of the walls.
@@ -1081,6 +1171,31 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1081
1171
  * Color of the top of walls, if not set, defaults to the color.
1082
1172
  */
1083
1173
  topColor?: string | 'initial';
1174
+ /**
1175
+ * Texture to apply to the geometry element.
1176
+ */
1177
+ texture?: {
1178
+ url?: string;
1179
+ };
1180
+ /**
1181
+ * Top texture to apply to the geometry element.
1182
+ */
1183
+ topTexture?: {
1184
+ url?: string;
1185
+ };
1186
+ /**
1187
+ * Visibility of the walls.
1188
+ */
1189
+ visible: boolean;
1190
+ };
1191
+ /**
1192
+ * @interface
1193
+ */
1194
+ export type TDoorsState = TWallsState & {
1195
+ /**
1196
+ * Opacity of the doors.
1197
+ */
1198
+ opacity: number;
1084
1199
  };
1085
1200
  export type TMarkerState = {
1086
1201
  type: 'marker';
@@ -1130,13 +1245,41 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1130
1245
  * Indicates if the geometry element is interactive. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
1131
1246
  */
1132
1247
  interactive: boolean;
1248
+ /**
1249
+ * Opacity of the geometry element.
1250
+ */
1251
+ opacity: number;
1252
+ /**
1253
+ * Height of the geometry element in meters.
1254
+ */
1255
+ height: number;
1256
+ /**
1257
+ * Texture to apply to the geometry element.
1258
+ */
1259
+ texture?: {
1260
+ url: string;
1261
+ };
1262
+ /**
1263
+ * Top texture to apply to the geometry element.
1264
+ */
1265
+ topTexture?: {
1266
+ url: string;
1267
+ };
1133
1268
  };
1269
+ export enum WALLS {
1270
+ Exterior = "exterior-walls",
1271
+ Interior = "interior-walls"
1272
+ }
1273
+ export enum DOORS {
1274
+ Interior = "interior-doors",
1275
+ Exterior = "exterior-doors"
1276
+ }
1134
1277
  /**
1135
1278
  * The type for updating the state of map elements (colors, texts, etc.).
1136
1279
  */
1137
- export type TUpdateState<T> = T extends 'walls' ? Partial<Omit<TGeometryState, '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;
1280
+ 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;
1138
1281
  export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState>;
1139
- 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;
1282
+ 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;
1140
1283
  export type TGetState<T> = TGetEntityState<T> | undefined;
1141
1284
  /**
1142
1285
  * Options for {@link Camera} animations on the map.
@@ -1598,6 +1741,42 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1598
1741
  */
1599
1742
  url: string;
1600
1743
  };
1744
+ /**
1745
+ * Options for controlling the behavior of a {@link Marker}.
1746
+ * @interface
1747
+ */
1748
+ export type TAddImageOptions = {
1749
+ /**
1750
+ * @internal
1751
+ */
1752
+ id?: string;
1753
+ /**
1754
+ * Width of the image in meters.
1755
+ */
1756
+ width: number;
1757
+ /**
1758
+ * Height of the image in meters.
1759
+ */
1760
+ height: number;
1761
+ /**
1762
+ * Rotation of the image in degrees.
1763
+ *
1764
+ * @default 0
1765
+ */
1766
+ rotation?: number;
1767
+ /**
1768
+ * Vertical offset of the image in meters.
1769
+ *
1770
+ * @default 0
1771
+ */
1772
+ verticalOffset?: number;
1773
+ /**
1774
+ * Attempt to keep the image facing the camera as much as possible
1775
+ *
1776
+ * @default false
1777
+ */
1778
+ flipImageToFaceCamera?: boolean;
1779
+ };
1601
1780
  /**
1602
1781
  * Options for controlling the behavior of a {@link Marker}.
1603
1782
  * @interface
@@ -1665,11 +1844,34 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/types' {
1665
1844
  */
1666
1845
  id?: string;
1667
1846
  };
1847
+ export type TBlueDotOptions = {
1848
+ /** The radius of the BlueDot in pixels. The BlueDot will maintain this size clamped to a minimum of 0.35 metres. */
1849
+ radius?: number;
1850
+ /** The color of the BlueDot core element. */
1851
+ color?: string;
1852
+ /** Options for the accuracy ring around the BlueDot. */
1853
+ accuracyRing?: {
1854
+ /** The color of the accuracy ring. */
1855
+ color?: string;
1856
+ /** The opacity of the accuracy ring. */
1857
+ opacity?: number;
1858
+ };
1859
+ /**
1860
+ * Options for the bearing directional indicator.
1861
+ */
1862
+ bearing?: {
1863
+ /** The color of the bearing cone. */
1864
+ color?: string;
1865
+ /** The opacity of the bearing cone. */
1866
+ opacity?: number;
1867
+ };
1868
+ };
1668
1869
  }
1669
1870
 
1670
1871
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
1671
1872
  export { Label } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label';
1672
1873
  export { Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker';
1874
+ export { Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/image';
1673
1875
  export { Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/model';
1674
1876
  export { Path } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/path';
1675
1877
  export { CameraTransform } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform';
@@ -1780,80 +1982,302 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson' {
1780
1982
  export { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions';
1781
1983
  export { Style } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style';
1782
1984
  export { default as Outdoor } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor';
1985
+ export { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
1783
1986
  }
1784
1987
 
1785
- declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
1786
- import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
1787
- import type { RendererCore } from '@mappedin/core-sdk';
1788
- import type { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
1789
- import { PubSub } from '@packages/internal/common';
1790
- export const GAP_BELOW_FLOORS = 30;
1791
- export const DURATION = 1000;
1792
- export type TStackedMapsEvents = {
1793
- expanded: void;
1794
- collapsed: void;
1795
- };
1796
- export class StackedMaps extends PubSub<TStackedMapsEvents> {
1797
- #private;
1798
- constructor(api: GeojsonApiMapObject, core: RendererCore);
1799
- includedFloors: FloorObject[];
1800
- get percentExpanded(): number;
1801
- set percentExpanded(value: number);
1802
- animateToCurrentFloor(): void;
1803
- expanded: boolean;
1804
- expand(opts?: {
1805
- excludeFloorIds: string[];
1806
- }): Promise<void>;
1807
- collapse(): Promise<void>;
1808
- animate(direction: 'expand' | 'collapse'): Promise<void>;
1809
- }
1988
+ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics' {
1989
+ export { Analytics, AnalyticsInternal } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
1990
+ export type { AnalyticsUpdateOptions } from '@mappedin/mappedin-js/mappedin-js/src/analytics/customer';
1810
1991
  }
1811
1992
 
1812
- declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform' {
1813
- import type { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
1993
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category' {
1994
+ import type { EnterpriseCategory } from '@mappedin/mvf';
1995
+ import type { MapDataInternal, Location } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
1996
+ import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
1814
1997
  /**
1815
- * Class representing camera transformation data.
1998
+ * A class representing space data within the map.
1999
+ *
2000
+ * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
1816
2001
  */
1817
- export class CameraTransform {
2002
+ class Category extends BaseMapData implements Omit<EnterpriseCategory, 'children' | 'locations'> {
1818
2003
  #private;
1819
2004
  /**
1820
2005
  * @internal
1821
2006
  */
1822
- constructor(camera: Camera);
2007
+ static readonly __type = "category";
1823
2008
  /**
1824
- * Getter for the center coordinate of the camera.
1825
- *
1826
- * @returns Center Coordinate.
2009
+ * @internal
1827
2010
  */
1828
- get center(): import("..").Coordinate;
2011
+ readonly __type = "category";
2012
+ name: string;
2013
+ color?: string | undefined;
2014
+ externalId: string;
2015
+ extra?: Record<string, unknown> | undefined;
2016
+ icon?: string | undefined;
2017
+ iconFromDefaultList?: string | null | undefined;
2018
+ sortOrder: number;
1829
2019
  /**
1830
- * Getter for the camera's bearing in degrees.
2020
+ * Checks if the provided instance is of type Category.
1831
2021
  *
1832
- * @returns Camera bearing in degrees.
2022
+ * @param instance The instance to check.
2023
+ * @returns {boolean} True if the instance is a Category, false otherwise.
1833
2024
  */
1834
- get bearing(): number;
2025
+ static is(instance: object): instance is Category;
1835
2026
  /**
1836
- * Getter for the camera's pitch in degrees.
1837
- *
1838
- * @returns Camera pitch in degrees.
2027
+ * @internal
1839
2028
  */
1840
- get pitch(): number;
2029
+ constructor(data: MapDataInternal, options: {
2030
+ mvfData: EnterpriseCategory;
2031
+ });
2032
+ get children(): Category[];
2033
+ get locations(): Location[];
1841
2034
  /**
1842
- * Getter for the camera's zoom level in mercator zoom levels.
2035
+ * Serializes the space data to JSON.
1843
2036
  *
1844
- * @see https://wiki.openstreetmap.org/wiki/Zoom_levels
2037
+ * @returns An object representing the space.
2038
+ */
2039
+ toJSON(): {
2040
+ id: string;
2041
+ name: string;
2042
+ };
2043
+ /**
2044
+ * Cleans up resources used by the instance.
1845
2045
  *
1846
- * @returns Zoom level in mercator zoom levels.
2046
+ * @internal
1847
2047
  */
1848
- get zoomLevel(): number;
2048
+ destroy(): void;
1849
2049
  }
2050
+ export default Category;
1850
2051
  }
1851
2052
 
1852
- declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
1853
- import type { NodeCollection } from '@mappedin/mvf';
1854
- import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
1855
- import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
1856
- import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
2053
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location' {
2054
+ import type { EnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
2055
+ import type { Coordinate, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2056
+ import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
2057
+ import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
2058
+ /**
2059
+ * A class representing space data within the map.
2060
+ *
2061
+ * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
2062
+ */
2063
+ class Location extends BaseMapData implements Omit<EnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
2064
+ #private;
2065
+ /**
2066
+ * @internal
2067
+ */
2068
+ static readonly __type = "location";
2069
+ /**
2070
+ * @internal
2071
+ */
2072
+ readonly __type = "location";
2073
+ description?: string | undefined;
2074
+ name: string;
2075
+ amenity?: string | undefined;
2076
+ externalId: string;
2077
+ extra?: Record<string, unknown> | undefined;
2078
+ gallery?: {
2079
+ caption?: string | null;
2080
+ image: string;
2081
+ embeddedUrl?: string | null;
2082
+ }[] | undefined;
2083
+ logo?: string | undefined;
2084
+ operationHours?: OperationHours[] | undefined;
2085
+ phone?: {
2086
+ number: string;
2087
+ extension?: string;
2088
+ } | undefined;
2089
+ picture?: string | undefined;
2090
+ shortName?: string | undefined;
2091
+ showFloatingLabelWhenImagePresent?: boolean | undefined;
2092
+ showLogo?: boolean | undefined;
2093
+ siblingGroups?: SiblingGroup[] | undefined;
2094
+ social?: {
2095
+ facebook?: string;
2096
+ instagram?: string;
2097
+ twitter?: string;
2098
+ website?: string;
2099
+ } | undefined;
2100
+ sortOrder: number;
2101
+ states?: LocationState[] | undefined;
2102
+ tags?: string[] | undefined;
2103
+ type: string;
2104
+ /**
2105
+ * Checks if the provided instance is of type Location.
2106
+ *
2107
+ * @param instance The instance to check.
2108
+ * @returns {boolean} True if the instance is a Location, false otherwise.
2109
+ */
2110
+ static is(instance: object): instance is Location;
2111
+ /**
2112
+ * @internal
2113
+ */
2114
+ constructor(data: MapDataInternal, options: {
2115
+ mvfData: EnterpriseLocation;
2116
+ });
2117
+ get coordinates(): Coordinate[];
2118
+ get nodes(): Node[];
2119
+ get spaces(): Space[];
2120
+ /**
2121
+ * Serializes the space data to JSON.
2122
+ *
2123
+ * @returns An object representing the space.
2124
+ */
2125
+ toJSON(): {
2126
+ id: string;
2127
+ name: string;
2128
+ };
2129
+ /**
2130
+ * Cleans up resources used by the instance.
2131
+ *
2132
+ * @internal
2133
+ */
2134
+ destroy(): void;
2135
+ }
2136
+ export default Location;
2137
+ }
2138
+
2139
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
2140
+ import type { EnterpriseVenue, Language } from '@mappedin/mvf';
2141
+ import type { Hyperlink, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2142
+ import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
2143
+ /**
2144
+ * A class representing space data within the map.
2145
+ *
2146
+ * Spaces are used to represent different areas within a map, such as rooms, hallways, etc.
2147
+ */
2148
+ class Venue extends BaseMapData implements EnterpriseVenue {
2149
+ #private;
2150
+ /**
2151
+ * @internal
2152
+ */
2153
+ static readonly __type = "venue";
2154
+ /**
2155
+ * @internal
2156
+ */
2157
+ readonly __type = "venue";
2158
+ countrycode?: string | undefined;
2159
+ externalId: string;
2160
+ defaultLanguage: Language;
2161
+ defaultMap?: string | undefined;
2162
+ extra?: Record<string, unknown> | undefined;
2163
+ icon?: string | undefined;
2164
+ languages: Language[];
2165
+ links: Hyperlink[];
2166
+ logo?: string | undefined;
2167
+ mappedinWebUrl?: string | undefined;
2168
+ slug: string;
2169
+ topLocations?: string[] | undefined;
2170
+ tzid?: string | undefined;
2171
+ /**
2172
+ * Checks if the provided instance is of type Category.
2173
+ *
2174
+ * @param instance The instance to check.
2175
+ * @returns {boolean} True if the instance is a Category, false otherwise.
2176
+ */
2177
+ static is(instance: object): instance is Venue;
2178
+ /**
2179
+ * @internal
2180
+ */
2181
+ constructor(_data: MapDataInternal, options: {
2182
+ mvfData: EnterpriseVenue;
2183
+ });
2184
+ /**
2185
+ * Gets the name of the space.
2186
+ *
2187
+ * @returns {string} The name of the space.
2188
+ */
2189
+ get name(): string;
2190
+ /**
2191
+ * Serializes the space data to JSON.
2192
+ *
2193
+ * @returns An object representing the space.
2194
+ */
2195
+ toJSON(): {
2196
+ id: string;
2197
+ name: string;
2198
+ };
2199
+ /**
2200
+ * Cleans up resources used by the instance.
2201
+ *
2202
+ * @internal
2203
+ */
2204
+ destroy(): void;
2205
+ }
2206
+ export default Venue;
2207
+ }
2208
+
2209
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps' {
2210
+ import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
2211
+ import type { RendererCore } from '@mappedin/core-sdk';
2212
+ import type { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
2213
+ import { PubSub } from '@packages/internal/common';
2214
+ export const GAP_BELOW_FLOORS = 30;
2215
+ export const DURATION = 1000;
2216
+ export type TStackedMapsEvents = {
2217
+ expanded: void;
2218
+ collapsed: void;
2219
+ };
2220
+ export class StackedMaps extends PubSub<TStackedMapsEvents> {
2221
+ #private;
2222
+ constructor(api: GeojsonApiMapObject, core: RendererCore);
2223
+ includedFloors: FloorObject[];
2224
+ get percentExpanded(): number;
2225
+ set percentExpanded(value: number);
2226
+ animateToCurrentFloor(): void;
2227
+ expanded: boolean;
2228
+ expand(opts?: {
2229
+ excludeFloorIds: string[];
2230
+ }): Promise<void>;
2231
+ collapse(): Promise<void>;
2232
+ animate(direction: 'expand' | 'collapse'): Promise<void>;
2233
+ }
2234
+ }
2235
+
2236
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/camera-transform' {
2237
+ import type { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
2238
+ /**
2239
+ * Class representing camera transformation data.
2240
+ */
2241
+ export class CameraTransform {
2242
+ #private;
2243
+ /**
2244
+ * @internal
2245
+ */
2246
+ constructor(camera: Camera);
2247
+ /**
2248
+ * Getter for the center coordinate of the camera.
2249
+ *
2250
+ * @returns Center Coordinate.
2251
+ */
2252
+ get center(): import("..").Coordinate;
2253
+ /**
2254
+ * Getter for the camera's bearing in degrees.
2255
+ *
2256
+ * @returns Camera bearing in degrees.
2257
+ */
2258
+ get bearing(): number;
2259
+ /**
2260
+ * Getter for the camera's pitch in degrees.
2261
+ *
2262
+ * @returns Camera pitch in degrees.
2263
+ */
2264
+ get pitch(): number;
2265
+ /**
2266
+ * Getter for the camera's zoom level in mercator zoom levels.
2267
+ *
2268
+ * @see https://wiki.openstreetmap.org/wiki/Zoom_levels
2269
+ *
2270
+ * @returns Zoom level in mercator zoom levels.
2271
+ */
2272
+ get zoomLevel(): number;
2273
+ }
2274
+ }
2275
+
2276
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
2277
+ import type { NodeCollection } from '@mappedin/mvf';
2278
+ import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
2279
+ import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2280
+ import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
1857
2281
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
1858
2282
  /**
1859
2283
  * A class representing {@link Path} node data within the map.
@@ -2018,7 +2442,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
2018
2442
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
2019
2443
  import type { Image, SpaceCollection } from '@mappedin/mvf';
2020
2444
  import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
2021
- import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2445
+ import type { Location, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2022
2446
  import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
2023
2447
  import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
2024
2448
  import Door from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door';
@@ -2076,6 +2500,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
2076
2500
  get type(): TSpaceType;
2077
2501
  get description(): string;
2078
2502
  get images(): Image[];
2503
+ /**
2504
+ * @internal
2505
+ */
2506
+ get locations(): Location[];
2079
2507
  /**
2080
2508
  * Gets the {@link Floor} object associated with the space.
2081
2509
  *
@@ -2787,11 +3215,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
2787
3215
  import type { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2788
3216
  import type { ParsedMVF as TMVF, StyleCollection as TMVFStyleCollection, Style as TMVFStyle, LineStringStyle as TMVFLineStringStyle, PolygonStyle as TMVFPolygonStyle, PointStyle as TMVFPointStyle } from '@mappedin/mvf';
2789
3217
  import { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
2790
- import type { Shading, PaintStyle, LineStyle, WatermarkOptions, Position } from '@mappedin/mappedin-js/geojson/src';
3218
+ import type { Shading, PaintStyle, LineStyle, WatermarkOptions } from '@mappedin/mappedin-js/geojson/src';
2791
3219
  import { enableTestMode } from '@mappedin/mappedin-js/geojson/src';
2792
3220
  export type { PubSub } from '@packages/internal/common/pubsub';
2793
- import { MapLibreOverlay } from '@mappedin/mappedin-js/geojson/src/maplibre-overlay';
2794
- import { analytics } from '@mappedin/mappedin-js/mappedin-js/src/analytics';
3221
+ import { MappedinMapLibreOverlay } from '@mappedin/mappedin-js/mappedin-js/src/maplibre-overlay';
2795
3222
  export { setLoggerLevel, E_SDK_LOG_LEVEL } from '@packages/internal/common/Mappedin.Logger';
2796
3223
  /**
2797
3224
  * Represents all the available antialiasing options.
@@ -3003,6 +3430,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3003
3430
  * @experimental
3004
3431
  */
3005
3432
  style?: {
3433
+ /**
3434
+ * Background color. Only relevant if outdoor map is disabled.
3435
+ */
3436
+ backgroundColor?: string;
3437
+ /**
3438
+ * Background alpha value. Only relevant if outdoor map is disabled.
3439
+ */
3440
+ backgroundAlpha?: number;
3006
3441
  /**
3007
3442
  * Set the global shading for all elements. True will use default values, false will disable shading.
3008
3443
  * @default true
@@ -3040,26 +3475,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3040
3475
  * const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
3041
3476
  */
3042
3477
  export const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
3043
- class MappedinMapLibreOverlay extends MapLibreOverlay<{
3044
- /**
3045
- * Event emitted when the MappedinMap is loaded
3046
- */
3047
- loaded: {
3048
- /**
3049
- * MapView instance
3050
- */
3051
- mapView: MapView;
3052
- /**
3053
- * MapData instance
3054
- */
3055
- mapData: MapData;
3056
- };
3057
- }> {
3058
- #private;
3059
- static instance: MappedinMapLibreOverlay;
3060
- constructor(origin: Position | undefined, mapData: MapData, options?: TShow3DMapOptions);
3061
- onAdd(map: any): HTMLDivElement;
3062
- }
3063
3478
  /**
3064
3479
  * Create a MapLibre overlay with a Map to render it within existing MapLibre projects.
3065
3480
  * @experimental
@@ -3070,38 +3485,30 @@ declare module '@mappedin/mappedin-js/mappedin-js/src' {
3070
3485
  export { parseMVF, unzipMVF, enableTestMode };
3071
3486
  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, };
3072
3487
  export type * from 'geojson';
3073
- 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, } from '@mappedin/mappedin-js/mappedin-js/src/types';
3488
+ 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/mappedin-js/mappedin-js/src/types';
3489
+ export { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
3074
3490
  export type { Label, Marker, Path, Shape, CameraTransform, Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
3075
3491
  export type { Navigation, TNavigationOptions } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
3076
3492
  export type { TSpaceType } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3077
3493
  export { Coordinate, Annotation, Connection, Door, Floor, MapObject, PointOfInterest, Space, Image, Hyperlink, } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
3078
3494
  export type { Camera, Models, Labels, Markers, Paths, Exporter, Directions, Style, Shapes, Outdoor, } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
3079
- export { analytics };
3080
3495
  }
3081
3496
 
3082
3497
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot' {
3083
3498
  import type { RendererCore } from '@mappedin/core-sdk';
3084
3499
  import { PubSub } from '@packages/internal/common';
3085
3500
  import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
3501
+ import type { TBlueDotOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
3086
3502
  export type TBlueDotEvents = {
3087
3503
  'floor-change': {
3088
3504
  reason: 'blue-dot-floor-change';
3089
3505
  floorId: string;
3090
3506
  };
3091
3507
  };
3092
- export const POSITION_ANIMATION_DURATION = 500;
3093
- export const SCALE_ANIMATION_DURATION = 150;
3094
- export const ROTATION_ANIMATION_DURATION = 150;
3095
- export const MIN_AURA_RADIUS = 0;
3096
- export const MAX_AURA_RADIUS = 5;
3097
- export const MIN_ACCURACY = 5;
3098
- export const MAX_ACCURACY = 30;
3099
- export const CONE_START_RADIUS = 0.4;
3100
- export const CONE_DISTANCE = 1.25;
3101
- export const BLUE_DOT_RADIUS = 0.35;
3102
3508
  export class BlueDot extends PubSub<TBlueDotEvents> {
3509
+ #private;
3103
3510
  constructor(core: RendererCore, geoJSONApi: GeoJsonApi);
3104
- enable(): void;
3511
+ enable(options?: TBlueDotOptions): void;
3105
3512
  disable(): void;
3106
3513
  }
3107
3514
  }
@@ -3141,12 +3548,12 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/shapes' {
3141
3548
  */
3142
3549
  add<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T, style: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, floor?: Floor): Shape;
3143
3550
  /**
3144
- * Removes a specific shapes ({@link Shape}) from the map.
3145
- * @param shapes The shapes to be removed.
3551
+ * Removes a specific shape ({@link Shape}) from the map.
3552
+ * @param shape The shape to be removed.
3146
3553
  * @example
3147
3554
  * map.Shapes.remove(geo);
3148
3555
  */
3149
- remove(shapes: Shape): void;
3556
+ remove(shape: Shape): void;
3150
3557
  /**
3151
3558
  * Removes all Shapes ({@link Shape}) from the map.
3152
3559
  *
@@ -3163,8 +3570,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
3163
3570
  import './marker.scss';
3164
3571
  import { Vector2 } from 'three';
3165
3572
  import type { Entity2DHTMLDivElement, EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
3166
- import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
3573
+ import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
3167
3574
  import type { CollisionRankingTier } from '@mappedin/mappedin-js/geojson/src/utils/collision-ranking-tier';
3575
+ import { z } from 'zod';
3168
3576
  /**
3169
3577
  * State reprsenting a Marker
3170
3578
  */
@@ -3211,6 +3619,26 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
3211
3619
  interactive?: boolean;
3212
3620
  };
3213
3621
  };
3622
+ export const addMarkerOptionsSchema: z.ZodObject<{
3623
+ rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
3624
+ interactive: z.ZodOptional<z.ZodBoolean>;
3625
+ id: z.ZodOptional<z.ZodString>;
3626
+ anchor: z.ZodOptional<z.ZodEnum<["top", "bottom", "left", "right", "center"]>>;
3627
+ dynamicResize: z.ZodOptional<z.ZodBoolean>;
3628
+ }, "strip", z.ZodTypeAny, {
3629
+ interactive?: boolean | undefined;
3630
+ id?: string | undefined;
3631
+ anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
3632
+ rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
3633
+ dynamicResize?: boolean | undefined;
3634
+ }, {
3635
+ interactive?: boolean | undefined;
3636
+ id?: string | undefined;
3637
+ anchor?: "center" | "left" | "right" | "bottom" | "top" | undefined;
3638
+ rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
3639
+ dynamicResize?: boolean | undefined;
3640
+ }>;
3641
+ export function validateMarker(coordinate: Position, contentHTML: string, options: AddMarkerOptions): void;
3214
3642
  /**
3215
3643
  * Options for creating a new Marker
3216
3644
  */
@@ -3296,7 +3724,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/marker' {
3296
3724
  declare module '@mappedin/mappedin-js/geojson/src/components/path' {
3297
3725
  import { type Mesh, type ShaderMaterial, type BufferGeometry, Vector3 } from 'three';
3298
3726
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
3299
- import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
3727
+ import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
3300
3728
  import type { FeatureCollection, Point } from 'geojson';
3301
3729
  /**
3302
3730
  * State representing a Path
@@ -3397,9 +3825,175 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
3397
3825
  import { Vector2 } from 'three';
3398
3826
  import type { TDrawFn } from '@packages/internal/shave-text/shave-text';
3399
3827
  import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
3400
- import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
3828
+ import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
3401
3829
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
3402
3830
  import type { CollisionRankingTier } from '@mappedin/mappedin-js/geojson/src';
3831
+ import { z } from 'zod';
3832
+ export const addLabelOptionsSchema: z.ZodObject<{
3833
+ rank: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["low", "medium", "high", "always-visible"]>, z.ZodNumber]>>;
3834
+ interactive: z.ZodOptional<z.ZodBoolean>;
3835
+ appearance: z.ZodOptional<z.ZodObject<{
3836
+ margin: z.ZodOptional<z.ZodNumber>;
3837
+ text: z.ZodOptional<z.ZodObject<{
3838
+ numLines: z.ZodOptional<z.ZodNumber>;
3839
+ lineHeight: z.ZodOptional<z.ZodNumber>;
3840
+ size: z.ZodOptional<z.ZodNumber>;
3841
+ maxWidth: z.ZodOptional<z.ZodNumber>;
3842
+ foregroundColor: z.ZodOptional<z.ZodString>;
3843
+ backgroundColor: z.ZodOptional<z.ZodString>;
3844
+ }, "strip", z.ZodTypeAny, {
3845
+ size?: number | undefined;
3846
+ maxWidth?: number | undefined;
3847
+ lineHeight?: number | undefined;
3848
+ numLines?: number | undefined;
3849
+ foregroundColor?: string | undefined;
3850
+ backgroundColor?: string | undefined;
3851
+ }, {
3852
+ size?: number | undefined;
3853
+ maxWidth?: number | undefined;
3854
+ lineHeight?: number | undefined;
3855
+ numLines?: number | undefined;
3856
+ foregroundColor?: string | undefined;
3857
+ backgroundColor?: string | undefined;
3858
+ }>>;
3859
+ marker: z.ZodOptional<z.ZodObject<{
3860
+ size: z.ZodOptional<z.ZodNumber>;
3861
+ foregroundColor: z.ZodOptional<z.ZodObject<{
3862
+ active: z.ZodOptional<z.ZodString>;
3863
+ inactive: z.ZodOptional<z.ZodString>;
3864
+ }, "strip", z.ZodTypeAny, {
3865
+ active?: string | undefined;
3866
+ inactive?: string | undefined;
3867
+ }, {
3868
+ active?: string | undefined;
3869
+ inactive?: string | undefined;
3870
+ }>>;
3871
+ backgroundColor: z.ZodOptional<z.ZodObject<{
3872
+ active: z.ZodOptional<z.ZodString>;
3873
+ inactive: z.ZodOptional<z.ZodString>;
3874
+ }, "strip", z.ZodTypeAny, {
3875
+ active?: string | undefined;
3876
+ inactive?: string | undefined;
3877
+ }, {
3878
+ active?: string | undefined;
3879
+ inactive?: string | undefined;
3880
+ }>>;
3881
+ }, "strip", z.ZodTypeAny, {
3882
+ size?: number | undefined;
3883
+ foregroundColor?: {
3884
+ active?: string | undefined;
3885
+ inactive?: string | undefined;
3886
+ } | undefined;
3887
+ backgroundColor?: {
3888
+ active?: string | undefined;
3889
+ inactive?: string | undefined;
3890
+ } | undefined;
3891
+ }, {
3892
+ size?: number | undefined;
3893
+ foregroundColor?: {
3894
+ active?: string | undefined;
3895
+ inactive?: string | undefined;
3896
+ } | undefined;
3897
+ backgroundColor?: {
3898
+ active?: string | undefined;
3899
+ inactive?: string | undefined;
3900
+ } | undefined;
3901
+ }>>;
3902
+ }, "strip", z.ZodTypeAny, {
3903
+ text?: {
3904
+ size?: number | undefined;
3905
+ maxWidth?: number | undefined;
3906
+ lineHeight?: number | undefined;
3907
+ numLines?: number | undefined;
3908
+ foregroundColor?: string | undefined;
3909
+ backgroundColor?: string | undefined;
3910
+ } | undefined;
3911
+ marker?: {
3912
+ size?: number | undefined;
3913
+ foregroundColor?: {
3914
+ active?: string | undefined;
3915
+ inactive?: string | undefined;
3916
+ } | undefined;
3917
+ backgroundColor?: {
3918
+ active?: string | undefined;
3919
+ inactive?: string | undefined;
3920
+ } | undefined;
3921
+ } | undefined;
3922
+ margin?: number | undefined;
3923
+ }, {
3924
+ text?: {
3925
+ size?: number | undefined;
3926
+ maxWidth?: number | undefined;
3927
+ lineHeight?: number | undefined;
3928
+ numLines?: number | undefined;
3929
+ foregroundColor?: string | undefined;
3930
+ backgroundColor?: string | undefined;
3931
+ } | undefined;
3932
+ marker?: {
3933
+ size?: number | undefined;
3934
+ foregroundColor?: {
3935
+ active?: string | undefined;
3936
+ inactive?: string | undefined;
3937
+ } | undefined;
3938
+ backgroundColor?: {
3939
+ active?: string | undefined;
3940
+ inactive?: string | undefined;
3941
+ } | undefined;
3942
+ } | undefined;
3943
+ margin?: number | undefined;
3944
+ }>>;
3945
+ }, "strip", z.ZodTypeAny, {
3946
+ interactive?: boolean | undefined;
3947
+ rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
3948
+ appearance?: {
3949
+ text?: {
3950
+ size?: number | undefined;
3951
+ maxWidth?: number | undefined;
3952
+ lineHeight?: number | undefined;
3953
+ numLines?: number | undefined;
3954
+ foregroundColor?: string | undefined;
3955
+ backgroundColor?: string | undefined;
3956
+ } | undefined;
3957
+ marker?: {
3958
+ size?: number | undefined;
3959
+ foregroundColor?: {
3960
+ active?: string | undefined;
3961
+ inactive?: string | undefined;
3962
+ } | undefined;
3963
+ backgroundColor?: {
3964
+ active?: string | undefined;
3965
+ inactive?: string | undefined;
3966
+ } | undefined;
3967
+ } | undefined;
3968
+ margin?: number | undefined;
3969
+ } | undefined;
3970
+ }, {
3971
+ interactive?: boolean | undefined;
3972
+ rank?: number | "high" | "low" | "medium" | "always-visible" | undefined;
3973
+ appearance?: {
3974
+ text?: {
3975
+ size?: number | undefined;
3976
+ maxWidth?: number | undefined;
3977
+ lineHeight?: number | undefined;
3978
+ numLines?: number | undefined;
3979
+ foregroundColor?: string | undefined;
3980
+ backgroundColor?: string | undefined;
3981
+ } | undefined;
3982
+ marker?: {
3983
+ size?: number | undefined;
3984
+ foregroundColor?: {
3985
+ active?: string | undefined;
3986
+ inactive?: string | undefined;
3987
+ } | undefined;
3988
+ backgroundColor?: {
3989
+ active?: string | undefined;
3990
+ inactive?: string | undefined;
3991
+ } | undefined;
3992
+ } | undefined;
3993
+ margin?: number | undefined;
3994
+ } | undefined;
3995
+ }>;
3996
+ export function validateLabel(coordinate: Position, text: string, options: AddLabelOptions): void;
3403
3997
  export const labelThemes: {
3404
3998
  lightOnDark: {
3405
3999
  text: {
@@ -3735,18 +4329,18 @@ declare module '@mappedin/mappedin-js/geojson/src/components/label' {
3735
4329
  export default LabelComponent;
3736
4330
  }
3737
4331
 
3738
- declare module '@mappedin/mappedin-js/geojson/src/entities/entity-group-container' {
4332
+ declare module '@mappedin/mappedin-js/geojson/src/entities/group-container' {
3739
4333
  import { Object3D } from 'three';
3740
- import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
3741
- import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
3742
- import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
4334
+ import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
4335
+ import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
4336
+ import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
3743
4337
  import type { StackComponent } from '@mappedin/mappedin-js/geojson/src/components/stack';
3744
4338
  import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
3745
4339
  import type { LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
3746
- import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
4340
+ import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
3747
4341
  import type { PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
3748
- import { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
3749
- export enum EntityContainerComponents {
4342
+ import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
4343
+ export enum GroupContainerComponents {
3750
4344
  Stack = 0,
3751
4345
  Interaction = 1
3752
4346
  }
@@ -3788,13 +4382,13 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/entity-group-containe
3788
4382
  }
3789
4383
  }
3790
4384
 
3791
- declare module '@mappedin/mappedin-js/geojson/src/entities/entity-group' {
4385
+ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry-group' {
3792
4386
  import type { LineStyle, PaintStyle, Shading } from '@mappedin/mappedin-js/geojson/src/types';
3793
4387
  import { Object3D } from 'three';
3794
- import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
4388
+ import { type GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
3795
4389
  import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
3796
4390
  import { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
3797
- export enum GEOMETRY_GROUP_COMPONENTS {
4391
+ export enum GeometryGroupComponents {
3798
4392
  GeometryGroupStyle = 0
3799
4393
  }
3800
4394
  /**
@@ -3841,6 +4435,14 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/entity-group' {
3841
4435
  * Whether the geometry and its children are outlined. This will affect all children of the geometry group and override their outline state.
3842
4436
  */
3843
4437
  outline?: boolean;
4438
+ /**
4439
+ * The texture URL of the geometry
4440
+ */
4441
+ texture?: string;
4442
+ /**
4443
+ * The top texture URL of the geometry
4444
+ */
4445
+ topTexture?: string;
3844
4446
  };
3845
4447
  export type ChildUpdatable<T> = T extends LineStyle ? Partial<Pick<LineStyle, 'color' | 'opacity' | 'visible'>> : Partial<Pick<PaintStyle, 'color' | 'opacity' | 'visible'>>;
3846
4448
  export class GeometryGroupObject3D extends Object3D {
@@ -3861,6 +4463,11 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/entity-group' {
3861
4463
  setOpacity(opacity: number): void;
3862
4464
  removeEntity(): void;
3863
4465
  constructor(id: string, style?: GeometryGroupStyleComponent);
4466
+ /**
4467
+ * Get first child entity of a group if it's a batched mesh
4468
+ * We use this logic a lot for getting the material of the group. since group does not have material and batched mesh does
4469
+ */
4470
+ getfirstChildEntityId(): string | number | undefined;
3864
4471
  }
3865
4472
  }
3866
4473
 
@@ -3870,20 +4477,22 @@ declare module '@mappedin/mappedin-js/geojson/src/types/geometry' {
3870
4477
 
3871
4478
  declare module '@mappedin/mappedin-js/geojson/src/types' {
3872
4479
  import { Mesh, Object3D, InstancedMesh } from 'three';
3873
- import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
4480
+ import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
3874
4481
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
3875
4482
  import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
3876
- import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
3877
- import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
4483
+ import type { GeometryGroupObject3D, GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
4484
+ import type { GroupContainerObject3D, GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
3878
4485
  import type { PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
3879
4486
  import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
3880
4487
  import type { LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
3881
4488
  import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
4489
+ import type { ImageState } from '@mappedin/mappedin-js/geojson/src/components/image';
3882
4490
  import type { ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
4491
+ import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
3883
4492
  /**
3884
4493
  * The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
3885
4494
  */
3886
- export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ShapeState;
4495
+ export type EntityState = GeometryState | GeometryGroupState | GroupContainerState | PathState | ModelState | LabelState | MarkerState | ImageState | ShapeState;
3887
4496
  /**
3888
4497
  * A wrapper object that contains the ID and type of an entity. This is returned when adding entities to the scene, and can be used
3889
4498
  * to `getState` and `setState` of the entity.
@@ -3932,9 +4541,9 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
3932
4541
  texture?: string;
3933
4542
  shading?: Shading;
3934
4543
  outline?: boolean;
4544
+ showImage?: boolean;
4545
+ flipImageToFaceCamera?: boolean;
3935
4546
  };
3936
- export type Cap = 'round' | 'square' | 'butt';
3937
- export type Join = 'round' | 'bevel' | 'miter';
3938
4547
  export type Shading = {
3939
4548
  start?: number;
3940
4549
  end?: number;
@@ -3948,8 +4557,8 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
3948
4557
  height?: number;
3949
4558
  altitude?: number;
3950
4559
  visible?: boolean;
3951
- cap?: Cap;
3952
- join?: Join;
4560
+ cap?: 'round' | 'square' | 'butt';
4561
+ join?: 'round' | 'bevel' | 'miter';
3953
4562
  shading?: Shading;
3954
4563
  outline?: boolean;
3955
4564
  };
@@ -3965,6 +4574,12 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
3965
4574
  };
3966
4575
  source: string;
3967
4576
  };
4577
+ export type PolygonImage = {
4578
+ width: number;
4579
+ height: number;
4580
+ verticalOffset?: number;
4581
+ rotation?: number;
4582
+ };
3968
4583
  export type PolygonSource = {
3969
4584
  features: {
3970
4585
  type: 'Feature';
@@ -4118,6 +4733,21 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
4118
4733
  export type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] extends {
4119
4734
  data: null;
4120
4735
  } ? MapEvent[EventName]['data'] : MapEvent[EventName];
4736
+ export type Geometry3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
4737
+ export type RendererState = {
4738
+ geometry3DMap: Map<string | number, Geometry3DTypes>;
4739
+ geometry2DMap: Map<string | number, Geometry2D>;
4740
+ geometry2DIdsInScene: Set<Geometry2D['id']>;
4741
+ geometry3DIdsInScene: Set<Geometry3DTypes['id']>;
4742
+ entityScene: GroupContainerObject3D;
4743
+ hoverColor: string;
4744
+ center?: Position;
4745
+ insetsPadding: InsetPadding;
4746
+ shouldMeasureCanvas: boolean;
4747
+ pixelRatio: number;
4748
+ canvasWidth: number;
4749
+ canvasHeight: number;
4750
+ };
4121
4751
  }
4122
4752
 
4123
4753
  declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
@@ -4132,6 +4762,7 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
4132
4762
  entities: {
4133
4763
  [key: number]: string | number;
4134
4764
  };
4765
+ detached?: boolean;
4135
4766
  };
4136
4767
  }
4137
4768
  /**
@@ -4177,21 +4808,49 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
4177
4808
  * Whether the geometry is outlined with a 30% darkened color. This effect adds lines around the geometry to make it stand out.
4178
4809
  */
4179
4810
  outline: boolean;
4811
+ /**
4812
+ * Show geometry image if present
4813
+ */
4814
+ showImage: boolean;
4815
+ /**
4816
+ * Attempt to keep the image facing the camera as much as possible
4817
+ */
4818
+ flipImageToFaceCamera: boolean;
4180
4819
  /**
4181
4820
  * Whether the geometry should emit an event when focused on by the center of the camera
4182
4821
  */
4183
4822
  focusable: boolean;
4823
+ /**
4824
+ * The opacity of the geometry
4825
+ */
4826
+ opacity: number;
4827
+ /**
4828
+ * The height of the geometry
4829
+ */
4830
+ height: number;
4831
+ /**
4832
+ * The texture URL of the geometry
4833
+ */
4834
+ texture?: string;
4835
+ /**
4836
+ * The top texture URL of the geometry
4837
+ */
4838
+ topTexture?: string;
4184
4839
  };
4185
4840
  export class MeshComponent {
4186
4841
  #private;
4187
4842
  mesh?: EntityBatchedMesh;
4188
4843
  focusMesh?: Mesh;
4189
4844
  outline?: LineSegments;
4845
+ imageMesh?: Mesh;
4190
4846
  readonly type = "geometry";
4847
+ dirty: boolean;
4848
+ detached: boolean;
4191
4849
  instanceIndex: number;
4192
4850
  geometry?: BufferGeometry;
4193
4851
  material?: BatchedStandardMaterial;
4194
4852
  feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>;
4853
+ currentHeight: number;
4195
4854
  constructor(feature: Feature<Polygon | LineString | MultiPolygon | MultiLineString>);
4196
4855
  get visible(): boolean;
4197
4856
  set visible(visible: boolean);
@@ -4200,6 +4859,10 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
4200
4859
  color: Color;
4201
4860
  topColor: Color;
4202
4861
  setColor(color: string, topColor: string): void;
4862
+ getColor(): {
4863
+ color: Color;
4864
+ topColor: Color;
4865
+ } | undefined;
4203
4866
  position: Vector3;
4204
4867
  get altitude(): number;
4205
4868
  set altitude(value: number);
@@ -4207,12 +4870,16 @@ declare module '@mappedin/mappedin-js/geojson/src/components/mesh' {
4207
4870
  set opacity(value: number);
4208
4871
  get texture(): string;
4209
4872
  set texture(texture: Texture);
4873
+ get textureInstance(): Texture | undefined;
4210
4874
  set topTexture(texture: Texture);
4211
4875
  get topTexture(): string;
4876
+ get topTextureInstance(): Texture | undefined;
4212
4877
  get featureBbox(): BBox;
4213
4878
  texturesVisible: boolean;
4214
4879
  showTextures(): void;
4215
4880
  hideTextures(): void;
4881
+ removeSideTexture(): void;
4882
+ removeTopTexture(): void;
4216
4883
  }
4217
4884
  }
4218
4885
 
@@ -4220,8 +4887,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/custom' {
4220
4887
  import { Color, type Object3D, type LineSegments } from 'three';
4221
4888
  import type { EntityId, Position } from '@mappedin/mappedin-js/geojson/src/types';
4222
4889
  import type { Feature, Point } from 'geojson';
4223
- import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
4224
- import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
4890
+ import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
4891
+ import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
4225
4892
  /**
4226
4893
  * State representing a Custom Geometry
4227
4894
  */
@@ -4276,10 +4943,11 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
4276
4943
  import type { LineSegments, Object3D } from 'three';
4277
4944
  import { Color, Vector3 } from 'three';
4278
4945
  import type { BatchedStandardMaterial } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material';
4279
- import type { Position, EntityId } from '@mappedin/mappedin-js/geojson/src/types';
4280
- import type { Feature, Point } from 'geojson';
4281
- import type { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
4282
- import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
4946
+ import type { Position, EntityId, ModelProperties, ModelStyle } from '@mappedin/mappedin-js/geojson/src/types';
4947
+ import type { Feature, FeatureCollection, Point } from 'geojson';
4948
+ import type { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
4949
+ import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
4950
+ import { z } from 'zod';
4283
4951
  /**
4284
4952
  * State representing a Model, typically loaded via a URL
4285
4953
  */
@@ -4304,16 +4972,200 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
4304
4972
  */
4305
4973
  interactive: boolean;
4306
4974
  };
4307
- export class ModelComponent {
4308
- #private;
4309
- mesh?: Geometry3DObject3D;
4310
- readonly type = "model";
4311
- outline?: LineSegments;
4312
- geometry?: Object3D;
4313
- material?: BatchedStandardMaterial;
4314
- feature: Feature<Point>;
4315
- instanceIndex?: number;
4316
- constructor(feature: Feature<Point>);
4975
+ export const modelPropertiesSchema: z.ZodObject<{
4976
+ rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
4977
+ altitude: z.ZodOptional<z.ZodNumber>;
4978
+ scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
4979
+ interactive: z.ZodOptional<z.ZodBoolean>;
4980
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
4981
+ }, "strip", z.ZodTypeAny, {
4982
+ rotation?: number[] | undefined;
4983
+ altitude?: number | undefined;
4984
+ scale?: number[] | undefined;
4985
+ interactive?: boolean | undefined;
4986
+ id?: string | number | undefined;
4987
+ }, {
4988
+ rotation?: number[] | undefined;
4989
+ altitude?: number | undefined;
4990
+ scale?: number[] | undefined;
4991
+ interactive?: boolean | undefined;
4992
+ id?: string | number | undefined;
4993
+ }>;
4994
+ export const featureSchema: z.ZodObject<{
4995
+ type: z.ZodEnum<["Feature"]>;
4996
+ geometry: z.ZodObject<{
4997
+ type: z.ZodEnum<["Point"]>;
4998
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
4999
+ }, "strip", z.ZodTypeAny, {
5000
+ type: "Point";
5001
+ coordinates: number[];
5002
+ }, {
5003
+ type: "Point";
5004
+ coordinates: number[];
5005
+ }>;
5006
+ properties: z.ZodObject<{
5007
+ rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
5008
+ altitude: z.ZodOptional<z.ZodNumber>;
5009
+ scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
5010
+ interactive: z.ZodOptional<z.ZodBoolean>;
5011
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
5012
+ }, "strip", z.ZodTypeAny, {
5013
+ rotation?: number[] | undefined;
5014
+ altitude?: number | undefined;
5015
+ scale?: number[] | undefined;
5016
+ interactive?: boolean | undefined;
5017
+ id?: string | number | undefined;
5018
+ }, {
5019
+ rotation?: number[] | undefined;
5020
+ altitude?: number | undefined;
5021
+ scale?: number[] | undefined;
5022
+ interactive?: boolean | undefined;
5023
+ id?: string | number | undefined;
5024
+ }>;
5025
+ }, "strip", z.ZodTypeAny, {
5026
+ type: "Feature";
5027
+ geometry: {
5028
+ type: "Point";
5029
+ coordinates: number[];
5030
+ };
5031
+ properties: {
5032
+ rotation?: number[] | undefined;
5033
+ altitude?: number | undefined;
5034
+ scale?: number[] | undefined;
5035
+ interactive?: boolean | undefined;
5036
+ id?: string | number | undefined;
5037
+ };
5038
+ }, {
5039
+ type: "Feature";
5040
+ geometry: {
5041
+ type: "Point";
5042
+ coordinates: number[];
5043
+ };
5044
+ properties: {
5045
+ rotation?: number[] | undefined;
5046
+ altitude?: number | undefined;
5047
+ scale?: number[] | undefined;
5048
+ interactive?: boolean | undefined;
5049
+ id?: string | number | undefined;
5050
+ };
5051
+ }>;
5052
+ export const addModelFeatureSchema: z.ZodObject<{
5053
+ type: z.ZodEnum<["FeatureCollection"]>;
5054
+ features: z.ZodArray<z.ZodObject<{
5055
+ type: z.ZodEnum<["Feature"]>;
5056
+ geometry: z.ZodObject<{
5057
+ type: z.ZodEnum<["Point"]>;
5058
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
5059
+ }, "strip", z.ZodTypeAny, {
5060
+ type: "Point";
5061
+ coordinates: number[];
5062
+ }, {
5063
+ type: "Point";
5064
+ coordinates: number[];
5065
+ }>;
5066
+ properties: z.ZodObject<{
5067
+ rotation: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
5068
+ altitude: z.ZodOptional<z.ZodNumber>;
5069
+ scale: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
5070
+ interactive: z.ZodOptional<z.ZodBoolean>;
5071
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
5072
+ }, "strip", z.ZodTypeAny, {
5073
+ rotation?: number[] | undefined;
5074
+ altitude?: number | undefined;
5075
+ scale?: number[] | undefined;
5076
+ interactive?: boolean | undefined;
5077
+ id?: string | number | undefined;
5078
+ }, {
5079
+ rotation?: number[] | undefined;
5080
+ altitude?: number | undefined;
5081
+ scale?: number[] | undefined;
5082
+ interactive?: boolean | undefined;
5083
+ id?: string | number | undefined;
5084
+ }>;
5085
+ }, "strip", z.ZodTypeAny, {
5086
+ type: "Feature";
5087
+ geometry: {
5088
+ type: "Point";
5089
+ coordinates: number[];
5090
+ };
5091
+ properties: {
5092
+ rotation?: number[] | undefined;
5093
+ altitude?: number | undefined;
5094
+ scale?: number[] | undefined;
5095
+ interactive?: boolean | undefined;
5096
+ id?: string | number | undefined;
5097
+ };
5098
+ }, {
5099
+ type: "Feature";
5100
+ geometry: {
5101
+ type: "Point";
5102
+ coordinates: number[];
5103
+ };
5104
+ properties: {
5105
+ rotation?: number[] | undefined;
5106
+ altitude?: number | undefined;
5107
+ scale?: number[] | undefined;
5108
+ interactive?: boolean | undefined;
5109
+ id?: string | number | undefined;
5110
+ };
5111
+ }>, "many">;
5112
+ }, "strip", z.ZodTypeAny, {
5113
+ type: "FeatureCollection";
5114
+ features: {
5115
+ type: "Feature";
5116
+ geometry: {
5117
+ type: "Point";
5118
+ coordinates: number[];
5119
+ };
5120
+ properties: {
5121
+ rotation?: number[] | undefined;
5122
+ altitude?: number | undefined;
5123
+ scale?: number[] | undefined;
5124
+ interactive?: boolean | undefined;
5125
+ id?: string | number | undefined;
5126
+ };
5127
+ }[];
5128
+ }, {
5129
+ type: "FeatureCollection";
5130
+ features: {
5131
+ type: "Feature";
5132
+ geometry: {
5133
+ type: "Point";
5134
+ coordinates: number[];
5135
+ };
5136
+ properties: {
5137
+ rotation?: number[] | undefined;
5138
+ altitude?: number | undefined;
5139
+ scale?: number[] | undefined;
5140
+ interactive?: boolean | undefined;
5141
+ id?: string | number | undefined;
5142
+ };
5143
+ }[];
5144
+ }>;
5145
+ export const modelStyleSchema: z.ZodObject<{
5146
+ url: z.ZodString;
5147
+ color: z.ZodOptional<z.ZodString>;
5148
+ opacity: z.ZodOptional<z.ZodNumber>;
5149
+ }, "strip", z.ZodTypeAny, {
5150
+ url: string;
5151
+ color?: string | undefined;
5152
+ opacity?: number | undefined;
5153
+ }, {
5154
+ url: string;
5155
+ color?: string | undefined;
5156
+ opacity?: number | undefined;
5157
+ }>;
5158
+ export function validateModelGroup(id: string | number, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle): void;
5159
+ export class ModelComponent {
5160
+ #private;
5161
+ mesh?: Geometry3DObject3D;
5162
+ readonly type = "model";
5163
+ outline?: LineSegments;
5164
+ geometry?: Object3D;
5165
+ material?: BatchedStandardMaterial;
5166
+ feature: Feature<Point>;
5167
+ instanceIndex?: number;
5168
+ constructor(feature: Feature<Point>);
4317
5169
  visible: boolean;
4318
5170
  setOpacity(): void;
4319
5171
  color: Color;
@@ -4328,13 +5180,9 @@ declare module '@mappedin/mappedin-js/geojson/src/components/model' {
4328
5180
 
4329
5181
  declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4330
5182
  import './utils/object-this-polyfill';
4331
- import type { Position as GeoJsonPosition } from 'geojson';
4332
5183
  import { Vector3, Raycaster, Camera as ThreeCamera } from 'three';
4333
- import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
4334
- import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
5184
+ import type { GroupContainerState } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
4335
5185
  import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
4336
- import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
4337
- import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
4338
5186
  import { CollisionSystem } from '@mappedin/mappedin-js/geojson/src/systems/collisions/system';
4339
5187
  import { InteractionSystem } from '@mappedin/mappedin-js/geojson/src/systems/interactions';
4340
5188
  import { ZoomInterpolationSystem } from '@mappedin/mappedin-js/geojson/src/systems/zoom-interpolation/zoom-interpolation';
@@ -4342,7 +5190,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4342
5190
  import type { GLTFExportOptions } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
4343
5191
  import { ExporterSystem } from '@mappedin/mappedin-js/geojson/src/systems/exporter';
4344
5192
  import type { AddLabelOptions, LabelState } from '@mappedin/mappedin-js/geojson/src/components/label';
4345
- import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle, InsetPadding, EntityState, EntityId, MapEvent, MapEventPayload } from '@mappedin/mappedin-js/geojson/src/types';
5193
+ import type { LineStyle, PaintStyle, RendererCoreOptions, Position, ModelProperties, ModelStyle, EntityState, EntityId, MapEvent, MapEventPayload, RendererState } from '@mappedin/mappedin-js/geojson/src/types';
4346
5194
  import { MeshCreationAndOptimizationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/system';
4347
5195
  import { DOMVisibilitySystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-visiblity/system';
4348
5196
  import { TwoDProjectionSystem } from '@mappedin/mappedin-js/geojson/src/systems/2d-projection/system';
@@ -4350,7 +5198,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4350
5198
  import { DrawSystem } from '@mappedin/mappedin-js/geojson/src/systems/draw/system';
4351
5199
  import { TwoDVisibilitySystem } from '@mappedin/mappedin-js/geojson/src/systems/2d-visibility/system';
4352
5200
  import { RenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/render/system';
4353
- import type { FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
5201
+ import type { Position as GeoJsonPosition, FeatureCollection, LineString, MultiPolygon, Polygon, Point, Feature } from 'geojson';
4354
5202
  import type { AddPathOptions, PathState } from '@mappedin/mappedin-js/geojson/src/components/path';
4355
5203
  import { StackSystem } from '@mappedin/mappedin-js/geojson/src/systems/stack/system';
4356
5204
  import { CameraSystem } from '@mappedin/mappedin-js/geojson/src/systems/camera';
@@ -4358,8 +5206,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4358
5206
  import { type Map as MapLibreMap } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
4359
5207
  import type { GeometryState } from '@mappedin/mappedin-js/geojson/src/components/mesh';
4360
5208
  import type { ModelState } from '@mappedin/mappedin-js/geojson/src/components/model';
4361
- import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
4362
- import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
5209
+ import type { GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
4363
5210
  import { DOMResizeSystem } from '@mappedin/mappedin-js/geojson/src/systems/dom-resize/system';
4364
5211
  import { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
4365
5212
  import { type WatermarkOptions, WatermarkSystem } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
@@ -4368,9 +5215,13 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4368
5215
  import { type CustomGeometryBuilder, type ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
4369
5216
  import { CustomGeometrySystem } from '@mappedin/mappedin-js/geojson/src/systems/custom-geometry/system';
4370
5217
  import { OutlineInterpolationSystem } from '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/system';
5218
+ import { ImageSystem } from '@mappedin/mappedin-js/geojson/src/systems/image/system';
4371
5219
  import { GeometryInFocusSystem } from '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/system';
4372
5220
  import { OutdoorLayers } from '@mappedin/mappedin-js/geojson/src/systems/outdoor-layers/system';
4373
5221
  import { PathSystem } from '@mappedin/mappedin-js/geojson/src/systems/path';
5222
+ import { type ImageProperties, type ImageState, type ImageStyle } from '@mappedin/mappedin-js/geojson/src/components/image';
5223
+ import { MeshDetachmentSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system';
5224
+ import { MeshModificationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system';
4374
5225
  export type * from '@mappedin/mappedin-js/geojson/src/types';
4375
5226
  export const raycaster: Raycaster;
4376
5227
  export const DEFAULT_ZOOM_LEVEL = 18;
@@ -4389,21 +5240,6 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4389
5240
  AFTER_RENDER: number;
4390
5241
  AFTER_ALL_UPDATES: number;
4391
5242
  };
4392
- export type Entity3DTypes = Geometry3D | GeometryGroupObject3D | GroupContainerObject3D;
4393
- export type RendererState = {
4394
- entity3DMap: Map<string | number, Entity3DTypes>;
4395
- entity2DMap: Map<string | number, Geometry2D>;
4396
- entity2DIds: Set<Geometry2D['id']>;
4397
- threeDEntities: (string | number)[];
4398
- entityScene: GroupContainerObject3D;
4399
- hoverColor: string;
4400
- center?: Position;
4401
- insetsPadding: InsetPadding;
4402
- shouldMeasureCanvas: boolean;
4403
- pixelRatio: number;
4404
- canvasWidth: number;
4405
- canvasHeight: number;
4406
- };
4407
5243
  export type Systems = {
4408
5244
  cameraSystem: CameraSystem;
4409
5245
  panBoundsSystem: PanBoundsSystem;
@@ -4427,7 +5263,10 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4427
5263
  outlineInterpolationSystem: OutlineInterpolationSystem;
4428
5264
  outdoorLayersSystem: OutdoorLayers;
4429
5265
  pathSystem: PathSystem;
5266
+ imageSystem: ImageSystem;
4430
5267
  geometryInFocusSystem: GeometryInFocusSystem;
5268
+ meshDetachmentSystem: MeshDetachmentSystem;
5269
+ meshModificationSystem: MeshModificationSystem;
4431
5270
  };
4432
5271
  export type MapViewState = {
4433
5272
  readonly type: 'map-view';
@@ -4485,18 +5324,19 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4485
5324
  * Add a geometry group from GeoJSON data
4486
5325
  */
4487
5326
  addGeometryGroup<T extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(id: string, geometry: T, style?: T extends FeatureCollection<LineString, any> ? LineStyle : PaintStyle, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
5327
+ addImage(id: string, geometry: Feature<Point, ImageProperties>, style: ImageStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<ImageState> | undefined;
4488
5328
  /**
4489
5329
  * Add a group of models from GeoJSON data. These will be instanced automatically for better performance.
4490
5330
  */
4491
- addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState>;
5331
+ addModelGroup(id: string, geometry: FeatureCollection<Point, ModelProperties>, style: ModelStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<GeometryGroupState> | undefined;
4492
5332
  /**
4493
5333
  * Add an HTML Marker at a GeoJSON coordinate.
4494
5334
  */
4495
- addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState>;
5335
+ addMarker2D(coordinate: Position, contentHTML: string, options?: AddMarkerOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<MarkerState> | undefined;
4496
5336
  /**
4497
5337
  * Add a 2D label at a GeoJSON coordinate.
4498
5338
  */
4499
- addLabel2D(coordinate: Position, text: string, options?: AddLabelOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<LabelState>;
5339
+ addLabel2D(coordinate: Position, text: string, options?: AddLabelOptions, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<LabelState> | undefined;
4500
5340
  /**
4501
5341
  * Add a Path along a set of GeoJSON coordinates that can be animated.
4502
5342
  */
@@ -4543,9 +5383,9 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4543
5383
  * Get the current state of the map view, or any entity that was added, regardless of whether it is visible in the scene
4544
5384
  */
4545
5385
  getState(): MapViewState;
4546
- getState<T extends EntityId<EntityState>>(geometryOrGeometryId: T): T extends EntityId<LabelState> ? LabelState : T extends EntityId<GeometryState> ? GeometryState : T extends EntityId<MarkerState> ? MarkerState : T extends EntityId<GeometryGroupState> ? GeometryGroupState : T extends EntityId<GroupContainerState> ? GroupContainerState : T extends EntityId<ModelState> ? ModelState : T extends EntityId<PathState> ? ShapeState : T extends EntityId<ShapeState> ? ShapeState : EntityState;
5386
+ getState<T extends EntityId<EntityState>>(geometryOrGeometryId: T): T extends EntityId<LabelState> ? LabelState : T extends EntityId<GeometryState> ? GeometryState : T extends EntityId<MarkerState> ? MarkerState : T extends EntityId<GeometryGroupState> ? GeometryGroupState : T extends EntityId<GroupContainerState> ? GroupContainerState : T extends EntityId<ModelState> ? ModelState : T extends EntityId<PathState> ? ShapeState : T extends EntityId<ShapeState> ? ShapeState : T extends EntityId<ImageState> ? ImageState : EntityState;
4547
5387
  getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
4548
- getState<T extends EntityState>(geometryOrGeometryId: T['id']): T extends LabelState ? LabelState : T extends GeometryState ? GeometryState : T extends MarkerState ? MarkerState : T extends GeometryGroupState ? GeometryGroupState : T extends GroupContainerState ? GroupContainerState : T extends ModelState ? ModelState : T extends PathState ? ShapeState : T extends ShapeState ? PathState : EntityState;
5388
+ getState<T extends EntityState>(geometryOrGeometryId: T['id']): T extends LabelState ? LabelState : T extends GeometryState ? GeometryState : T extends MarkerState ? MarkerState : T extends GeometryGroupState ? GeometryGroupState : T extends GroupContainerState ? GroupContainerState : T extends ModelState ? ModelState : T extends PathState ? ShapeState : T extends ShapeState ? PathState : T extends ImageState ? ImageState : EntityState;
4549
5389
  /**
4550
5390
  * Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
4551
5391
  */
@@ -4558,6 +5398,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4558
5398
  setState<T extends EntityId<ShapeState>>(object: T | T['id'], state: Partial<ShapeState>): void;
4559
5399
  setState<T extends EntityId<PathState>>(object: T | T['id'], state: Partial<PathState>): void;
4560
5400
  setState<T extends EntityId<ModelState>>(object: T | T['id'], state: Partial<ModelState>): void;
5401
+ setState<T extends EntityId<ImageState>>(object: T | T['id'], state: Partial<ImageState>): void;
4561
5402
  setState<T extends EntityState>(object: T | T['id'], state: Partial<T>): void;
4562
5403
  /**
4563
5404
  * Project a screen coordinate to a geographic coordinate
@@ -4596,6 +5437,10 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
4596
5437
  * Sets the background color of the renderer. Only applies to "standalone mode"
4597
5438
  */
4598
5439
  setBackgroundColor: (color: any, alpha: any) => void;
5440
+ /**
5441
+ * Returns the current scale of the map in metres per pixel.
5442
+ */
5443
+ getMetresPerPixel: () => number | undefined;
4599
5444
  /**
4600
5445
  * @internal
4601
5446
  * Filters out layers at a certain point on the outdoor map. This can be used to hide the outdoor building footprint underneath the 3D geometry.
@@ -4865,40 +5710,40 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
4865
5710
  import { Box2 } from 'three';
4866
5711
  import { MercatorCoordinate } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
4867
5712
  import type { CustomLayerInterface } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
4868
- import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
4869
- import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
4870
- import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
4871
- import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
5713
+ import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
5714
+ import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
5715
+ import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
5716
+ import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
4872
5717
  import type { Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
4873
5718
  import type { Camera } from '@mappedin/mappedin-js/geojson/src/camera';
4874
5719
  export function cartesianToGeographic(centerLat: number, centerLon: number, x: number, y: number): {
4875
- lat: number;
4876
- lon: number;
5720
+ lat: number;
5721
+ lon: number;
4877
5722
  };
4878
5723
  export function geographicToCartesian(centerLat: number, centerLon: number, targetLat: number, targetLon: number): {
4879
- x: number;
4880
- y: number;
5724
+ x: number;
5725
+ y: number;
4881
5726
  };
4882
- export const extract3DEntitiesFromTree: (tree: any, entities?: (string | number)[]) => (string | number)[];
4883
- export const extractEntitiesFromTree: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
5727
+ export const populateGeometry3DIdsInScene: (tree: any, entities: RendererState["geometry3DIdsInScene"]) => Set<string | number>;
5728
+ export const populateGeometry2DIdsInScene: (tree: any, entities: Set<Geometry2D["id"]>) => Set<string | number>;
4884
5729
  export function convertMapLibreStylePaintProps(paint: any): {
4885
- color: any;
4886
- height: any;
4887
- altitude: any;
4888
- opacity: any;
4889
- outline: any;
5730
+ color: any;
5731
+ height: any;
5732
+ altitude: any;
5733
+ opacity: any;
5734
+ outline: any;
4890
5735
  };
4891
5736
  export function convertMapLibreLineStylePaintProps(paint: any): {
4892
- color: any;
4893
- join: any;
4894
- opacity: any;
4895
- width: any;
4896
- cap: any;
5737
+ color: any;
5738
+ join: any;
5739
+ opacity: any;
5740
+ width: any;
5741
+ cap: any;
4897
5742
  };
4898
5743
  export function mergeObjects<T extends Record<string, any>>(obj1: T, obj2: T): T;
4899
5744
  export function createCustomLayer(modelAsMercatorCoordinate: MercatorCoordinate, viewCamera: THREECamera, camera: Camera, onRender: () => void): CustomLayerInterface;
4900
5745
  export function getRequestHeaders(authURL: string): Promise<{
4901
- 'x-mappedin-tiles-key': string;
5746
+ 'x-mappedin-tiles-key': string;
4902
5747
  }>;
4903
5748
  export function cyrb53(str: string, seed?: number): number;
4904
5749
  export const linearEase: (t: number) => number;
@@ -4910,38 +5755,53 @@ declare module '@mappedin/mappedin-js/geojson/src/utils' {
4910
5755
  /* getProjectionScaleFactor()
4911
5756
  /* finds the scale ratio between screen coordinates and 3D coordinates (in X-Z plane)
4912
5757
  /*
4913
- * R
4914
- * /|
4915
- * C : Camera / |
4916
- * PQ : Projection Plane / |
4917
- * OR : Origin / |
4918
- * F : FOV / |
4919
- * Q / |
4920
- * /| |
4921
- * / | |
4922
- * / | |
4923
- * / | |
4924
- * / | |
4925
- * / F/2 | |
4926
- * C ------------P------------ O
4927
- *
4928
- *
4929
- * ProjectionScaleFactor = ( OR / PQ )
4930
- * PQ = canvasHeight / 2
4931
- * CQ = zoom
4932
- *
4933
- * OR / C0 = tan(F/2)
4934
- * so OR = CO * tan(F/2)
4935
- */
5758
+ * R
5759
+ * /|
5760
+ * C : Camera / |
5761
+ * PQ : Projection Plane / |
5762
+ * OR : Origin / |
5763
+ * F : FOV / |
5764
+ * Q / |
5765
+ * /| |
5766
+ * / | |
5767
+ * / | |
5768
+ * / | |
5769
+ * / | |
5770
+ * / F/2 | |
5771
+ * C ------------P------------ O
5772
+ *
5773
+ *
5774
+ * ProjectionScaleFactor = ( OR / PQ )
5775
+ * PQ = canvasHeight / 2
5776
+ * CQ = zoom
5777
+ *
5778
+ * OR / C0 = tan(F/2)
5779
+ * so OR = CO * tan(F/2)
5780
+ */
4936
5781
  export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
4937
5782
  export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3D | GroupContainerObject3D | GeometryGroupObject3D | Geometry2D | undefined;
4938
5783
  export function getBoundingBoxCenter(bbox: Position[]): [number, number];
5784
+ export function toRadians(degrees: number): number;
5785
+ /**
5786
+ * Calculates the approximate distance between two geographic coordinates on Earth's surface.
5787
+ *
5788
+ * This function uses the equirectangular approximation method to compute the distance, which simplifies
5789
+ * the math and speeds up calculations, but is less accurate over long distances compared to other methods
5790
+ * like the haversine formula.
5791
+ *
5792
+ * @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
5793
+ * @param {Position} point1 - The second point's longitude and latitude as [longitude, latitude].
5794
+ * @return
5795
+ * @return {number} The approximate distance between the two points in meters.
5796
+ */
5797
+ export function haversineDistance(point1: Position, point2: Position): number;
4939
5798
  export { getCornersOfBoundingBox } from '@mappedin/mappedin-js/geojson/src/utils/bounding-box';
4940
5799
  export function isFiniteBox(box: Box2 | Box3): boolean;
4941
5800
  export { getPixelRatio } from '@mappedin/mappedin-js/geojson/src/utils/get-pixel-ratio';
4942
5801
  export { debounce } from '@mappedin/mappedin-js/geojson/src/utils/async';
4943
5802
  export { shouldDisableOffscreenCanvas } from '@mappedin/mappedin-js/geojson/src/utils/browser';
4944
5803
  export { noop } from '@mappedin/mappedin-js/geojson/src/utils/fp';
5804
+ export { transformRequest } from '@mappedin/mappedin-js/geojson/src/utils/tranform-request';
4945
5805
  }
4946
5806
 
4947
5807
  declare module '@mappedin/mappedin-js/geojson/src/utils/constants' {
@@ -5117,124 +5977,21 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/html-controls/system'
5117
5977
  }
5118
5978
  }
5119
5979
 
5120
- declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
5121
- /**
5122
- * Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
5123
- * If a set context is not in this list, it will default to the first VALID_CONTEXTS value.
5124
- */
5125
- export const VALID_CONTEXTS: readonly ["websdk", "web", "webv2", "kiosk-v2", "mobile", "iossdk", "androidsdk", "reactnativesdk"];
5126
- type ValidContext = (typeof VALID_CONTEXTS)[number];
5127
- export const DEFAULT_CONTEXT: "websdk";
5128
- export const ANALYTICS_URL = "https://api-gateway.mappedin.com/track-analytics/a/";
5129
- export class CustomerAnalytics {
5130
- #private;
5131
- constructor();
5132
- init(options?: AnalyticsOptions): void;
5133
- /**
5134
- * Reset state and options
5135
- */
5136
- reset(): void;
5137
- updateState(update: UpdateStateParam): void;
5138
- get authReady(): boolean;
5139
- getState(): AnalyticState;
5140
- capture<T extends keyof CaptureEventsPayloadMap>(eventName: T, query: CaptureEventsPayloadMap[T]): Promise<Response> | Promise<void>;
5141
- capture<T extends keyof CaptureEventsPayloadMap | (string & NonNullable<unknown>)>(target: T, query: T extends keyof CaptureEventsPayloadMap ? CaptureEventsPayloadMap[T] : Record<string, any>): Promise<Response> | Promise<void>;
5142
- /**
5143
- * @internal
5144
- */
5145
- sendGetMapDataEvent(payload: {
5146
- parseDuration: string;
5147
- downloadDuration: string;
5148
- viewId?: string;
5149
- }): Promise<void> | Promise<Response>;
5150
- sendWatchPositionDenied(): Promise<void> | Promise<Response>;
5151
- /**
5152
- * @internal
5153
- */
5154
- sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
5155
- firstRenderDuration: string;
5156
- dimension: {
5157
- height: number;
5158
- width: number;
5159
- };
5160
- }): Promise<void> | Promise<Response>;
5161
- /**
5162
- * @internal
5163
- */
5164
- sendGetDirectionsEvent: (start: string, end: string) => void;
5980
+ declare module '@mappedin/mappedin-js/geojson/src/maplibre-overlay' {
5981
+ import type { IControl, Map as MapLibreMap, CustomLayerInterface } from '@packages/internal/outdoor-context-v4';
5982
+ import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
5983
+ import RendererCore from '@mappedin/mappedin-js/geojson/src/renderer';
5984
+ import { PubSub } from '@packages/internal/common';
5985
+ export class MapLibreOverlay<T> extends PubSub<T> implements IControl {
5986
+ el: HTMLDivElement;
5987
+ core: RendererCore;
5988
+ origin?: Position;
5989
+ map?: MapLibreMap;
5990
+ layer?: CustomLayerInterface;
5991
+ constructor(origin: Position | undefined);
5992
+ onAdd(map: MapLibreMap): HTMLDivElement;
5993
+ onRemove(): void;
5165
5994
  }
5166
- type AnalyticsUserPosition = {
5167
- bluedotTimestamp: number;
5168
- latitude: number;
5169
- longitude: number;
5170
- floorLevel?: number;
5171
- accuracy: number;
5172
- };
5173
- export type AnalyticsOptions = {
5174
- key?: string;
5175
- secret?: string;
5176
- accessToken?: string;
5177
- noAuth?: boolean;
5178
- mapId?: string;
5179
- logEvents?: boolean;
5180
- sendEvents?: boolean;
5181
- context?: string;
5182
- platformString?: string;
5183
- };
5184
- export type AnalyticState = {
5185
- accessToken?: string | undefined;
5186
- version: string;
5187
- platformString: string;
5188
- baseUrl: string;
5189
- noAuth: boolean;
5190
- geolocationMode: boolean;
5191
- mi_uuid: string;
5192
- mi_session: string;
5193
- context: ValidContext;
5194
- userPosition?: AnalyticsUserPosition;
5195
- mapId?: string;
5196
- key?: string;
5197
- secret?: string;
5198
- logEvents: boolean;
5199
- sendEvents: boolean;
5200
- };
5201
- type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken'>>;
5202
- type CaptureEventsPayloadMap = {
5203
- '$select-location': {
5204
- id: string;
5205
- };
5206
- '$select-category': {
5207
- id: string;
5208
- };
5209
- '$query-suggest': Record<string, any>;
5210
- '$query-search': Record<string, any>;
5211
- };
5212
- export const analyticsInternal: CustomerAnalytics;
5213
- export const analytics: {
5214
- /**
5215
- * Initializes the analytics with the provided options.
5216
- * @param args - The options to initialize the analytics.
5217
- */
5218
- init(options?: AnalyticsOptions | undefined): void;
5219
- /**
5220
- * Captures an analytic event with a custom target and query payload.
5221
- *
5222
- * @param target - The event name or target can be .
5223
- * @param query - The payload associated with the event.
5224
- * @returns A promise that resolves to the server response or void.
5225
- */
5226
- capture(target: keyof CaptureEventsPayloadMap | (string & {}), query: Record<string, any> | {
5227
- id: string;
5228
- } | {
5229
- id: string;
5230
- }): Promise<void> | Promise<Response>;
5231
- /**
5232
- * Updates the analytics state with the provided parameters.
5233
- * @param update - The state parameters to update.
5234
- */
5235
- updateState(update: Partial<Pick<AnalyticState, "logEvents" | "sendEvents" | "logEvents" | "accessToken">>): void;
5236
- };
5237
- export {};
5238
5995
  }
5239
5996
 
5240
5997
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/label' {
@@ -5308,6 +6065,42 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/marker' {
5308
6065
  }
5309
6066
  }
5310
6067
 
6068
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/image' {
6069
+ /**
6070
+ * Class representing an Image on the {@link MapView}.
6071
+ */
6072
+ export class Image {
6073
+ #private;
6074
+ /**
6075
+ * @internal
6076
+ */
6077
+ static readonly __type = "Image";
6078
+ /**
6079
+ * @internal
6080
+ */
6081
+ readonly __type = "Image";
6082
+ /**
6083
+ * Checks if the provided instance is of type Marker"
6084
+ *
6085
+ * @param instance The instance to check.
6086
+ * @returns {boolean} True if the instance is a Marker, false otherwise.
6087
+ */
6088
+ static is(instance: object): instance is Image;
6089
+ /**
6090
+ * @internal
6091
+ */
6092
+ constructor(id: string, url: string);
6093
+ /**
6094
+ * The image's id
6095
+ */
6096
+ get id(): string;
6097
+ /**
6098
+ * The image's url
6099
+ */
6100
+ get url(): string;
6101
+ }
6102
+ }
6103
+
5311
6104
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/model' {
5312
6105
  /**
5313
6106
  * Class representing a 3D model on the {@link MapView}.
@@ -5400,11 +6193,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects/shape' {
5400
6193
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
5401
6194
  import type { Position, RendererCore, WatermarkOptions } from '@mappedin/core-sdk';
5402
6195
  import { type TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
6196
+ import { WALLS, DOORS } from '@mappedin/mappedin-js/mappedin-js/src/types';
5403
6197
  import type MapData from '@mappedin/mappedin-js/mappedin-js/src/map-data';
5404
- import { Floor } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
5405
- import { Coordinate, MapObject, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
6198
+ import { Coordinate, MapObject, Space, Floor, type MapDataInternal, Door } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
5406
6199
  import type { MapView } from '@mappedin/mappedin-js/mappedin-js/src/map-view';
5407
- import { Label, Marker, type Model } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
6200
+ import { Label, Marker, type Model, type Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
5408
6201
  import { Navigation } from '@mappedin/mappedin-js/mappedin-js/src/navigation';
5409
6202
  import type { TGetDirectionsOptions, TGetState, TNavigationTarget, TUpdateState } from '@mappedin/mappedin-js/mappedin-js/src/types';
5410
6203
  import { Camera } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/camera';
@@ -5413,6 +6206,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
5413
6206
  import { Labels } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/labels';
5414
6207
  import { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
5415
6208
  import { Markers } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/markers';
6209
+ import { Images } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images';
5416
6210
  import { Models } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/models';
5417
6211
  import { Paths } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths';
5418
6212
  import { BlueDot } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-dot';
@@ -5442,10 +6236,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
5442
6236
  BlueDot: BlueDot;
5443
6237
  Shapes: Shapes;
5444
6238
  Style: Style;
6239
+ Images: Images;
5445
6240
  constructor(rendererCore: RendererCore, mapView: MapView);
5446
- updateState<T extends Space | MapObject | Label | Marker | 'walls' | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
6241
+ updateState<T extends Space | MapObject | Label | Marker | Door | WALLS | DOORS | (string & NonNullable<unknown>)>(target: T, state: TUpdateState<T>): void;
5447
6242
  update: () => void;
5448
- getMapDataInternal(): import("../map-data-objects").MapDataInternal | undefined;
6243
+ getMapDataInternal(): MapDataInternal | undefined;
5449
6244
  getMapData(): MapData | undefined;
5450
6245
  expand(opts?: {
5451
6246
  excludeFloors: Floor[];
@@ -5455,7 +6250,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
5455
6250
  setFloor(floor: Floor | string, reason?: TFloorChangeReason): void;
5456
6251
  updateWatermark(options: Omit<WatermarkOptions, 'onClick'>): void;
5457
6252
  get currentFloor(): Floor;
5458
- getState<T extends Space | MapObject | Label | Marker | Model | string>(target: T): TGetState<T> | undefined;
6253
+ getState<T extends Space | MapObject | Label | Marker | Model | Image | string>(target: T): TGetState<T> | undefined;
5459
6254
  setHoverColor(c: string): void;
5460
6255
  getHoverColor(): string | undefined;
5461
6256
  getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], opt?: TGetDirectionsOptions) => Directions | undefined;
@@ -5467,6 +6262,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api' {
5467
6262
  * @internal
5468
6263
  */
5469
6264
  get __core(): RendererCore;
6265
+ clear(): void;
5470
6266
  destroy(): void;
5471
6267
  }
5472
6268
  }
@@ -5895,90 +6691,322 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/directions' {
5895
6691
  groupBy?: string;
5896
6692
  });
5897
6693
  /**
5898
- * Get directions between two navigation targets.
5899
- *
5900
- * @hidden
5901
- * @param from
5902
- * @param to
5903
- * @param options
5904
- * @param mapData
6694
+ * Get directions between two navigation targets.
6695
+ *
6696
+ * @hidden
6697
+ * @param from
6698
+ * @param to
6699
+ * @param options
6700
+ * @param mapData
6701
+ */
6702
+ getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
6703
+ accessible: boolean;
6704
+ smoothing: {
6705
+ enabled: boolean;
6706
+ radius: number;
6707
+ };
6708
+ zones: TDirectionZone[];
6709
+ }, mapData: MapDataInternal) => Directions | undefined;
6710
+ /**
6711
+ * Get the node IDs that should be excluded from the navigation graph.
6712
+ *
6713
+ * @hidden
6714
+ * @param accessible {boolean}
6715
+ */
6716
+ getExcludedNodeIds: (accessible: boolean) => string[];
6717
+ }
6718
+ }
6719
+
6720
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style' {
6721
+ import type { StyleCollection } from '@mappedin/mvf';
6722
+ import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
6723
+ export class Style {
6724
+ #private;
6725
+ /**
6726
+ * @internal
6727
+ */
6728
+ get currentMap(): GeojsonApiMapObject | undefined;
6729
+ /**
6730
+ * @internal
6731
+ */
6732
+ constructor({ currentMapGetter }: {
6733
+ currentMapGetter: CurrentMapGetter;
6734
+ });
6735
+ setFromStyleCollection(styleCollection: StyleCollection): void;
6736
+ }
6737
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
6738
+ export {};
6739
+ }
6740
+
6741
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor' {
6742
+ import { type RendererCore, type Position } from '@mappedin/core-sdk';
6743
+ export default class Outdoor {
6744
+ #private;
6745
+ /**
6746
+ * @internal
6747
+ */
6748
+ constructor(core: RendererCore, hiddenOutdoorGeometry?: [Position, string[]][]);
6749
+ setStyle(style: any): void;
6750
+ /**
6751
+ * Returns a Maplibre map for advanced usage.
6752
+ *
6753
+ * @returns {object} Maplibre map instance
6754
+ *
6755
+ * Limitations:
6756
+ * - Maplibre interaction events are not supported; use SDK interaction events.
6757
+ * - Maplibre markers and labels may overlap as they are not integrated with the SDK collision engine.
6758
+ */
6759
+ get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
6760
+ /**
6761
+ * Whether the outdoorView is enabled.
6762
+ */
6763
+ get enabled(): boolean;
6764
+ }
6765
+ }
6766
+
6767
+ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/images' {
6768
+ import type { TAddImageOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
6769
+ import { Image } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
6770
+ import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
6771
+ import type { Space, Door, Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
6772
+ export class Images {
6773
+ #private;
6774
+ /**
6775
+ * @internal
6776
+ */
6777
+ get currentMap(): GeojsonApiMapObject | undefined;
6778
+ /**
6779
+ * @internal
6780
+ */
6781
+ constructor({ currentMapGetter }: {
6782
+ currentMapGetter: CurrentMapGetter;
6783
+ });
6784
+ /**
6785
+ * @internal
6786
+ */
6787
+ getById(id: string): {
6788
+ image: Image;
6789
+ entityId: string;
6790
+ } | undefined;
6791
+ /**
6792
+ * Adds an image to the map.
6793
+ *
6794
+ * @param target The target object ({@link Space}, {@link Door}, or {@link Coordinate}) for the image.
6795
+ * @param url The URL of the image.
6796
+ * @param options Optional additional options for the {@link Image}.
6797
+ * @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
6798
+ * @example
6799
+ * // Add an interactive {@link Image} to the map with custom HTML content.
6800
+ * map.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
6801
+ */
6802
+ add(target: Space | Door | Coordinate, url: string, options: TAddImageOptions): Image;
6803
+ /**
6804
+ * Removes a image from the map.
6805
+ *
6806
+ * @param image {Image} The {@link Image} which should be removed.
6807
+ * @example
6808
+ * mapView.Images.remove(image);
6809
+ */
6810
+ remove(image: Image): void;
6811
+ /**
6812
+ * Remove all the images from the map.
6813
+ *
6814
+ * @example
6815
+ * map.Images.removeAll();
6816
+ */
6817
+ removeAll(): Image[];
6818
+ }
6819
+ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
6820
+ export {};
6821
+ }
6822
+
6823
+ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
6824
+ /**
6825
+ * Valid track-analytics API contexts. These should match the expected values of that endpoint or the requests will fail.
6826
+ * If a set context is not in this list, it will default to the first VALID_CONTEXTS value.
6827
+ */
6828
+ export const VALID_CONTEXTS: readonly ["websdk", "web", "webv2", "kiosk-v2", "mobile", "iossdk", "androidsdk", "reactnativesdk"];
6829
+ type ValidContext = (typeof VALID_CONTEXTS)[number];
6830
+ export const DEFAULT_CONTEXT: "websdk";
6831
+ export const ANALYTICS_URL = "https://api-gateway.mappedin.com/track-analytics/a/";
6832
+ export const FOUND_POSITION = "found-position";
6833
+ export const FOUND_FLOOR = "found-floor";
6834
+ type BlueDotEvents = typeof FOUND_FLOOR | typeof FOUND_POSITION;
6835
+ export class AnalyticsInternal {
6836
+ #private;
6837
+ constructor();
6838
+ init(options: AnalyticsUpdateOptions): void;
6839
+ /**
6840
+ * Reset state and options
6841
+ */
6842
+ reset(): void;
6843
+ updateState(update: UpdateStateParam): void;
6844
+ get authReady(): boolean;
6845
+ getState(): AnalyticState;
6846
+ capture<T extends keyof CaptureEventsPayloadMap>(eventName: T, query: CaptureEventsPayloadMap[T]): Promise<Response> | Promise<void>;
6847
+ capture<T extends keyof CaptureEventsPayloadMap | (string & NonNullable<unknown>)>(target: T, query: T extends keyof CaptureEventsPayloadMap ? CaptureEventsPayloadMap[T] : Record<string, any>): Promise<Response> | Promise<void>;
6848
+ /**
6849
+ * @internal
6850
+ */
6851
+ sendGetMapDataEvent(payload: {
6852
+ parseDuration: number;
6853
+ downloadDuration: number;
6854
+ viewId?: string;
6855
+ }): void | Promise<Response> | Promise<void>;
6856
+ sendWatchPositionDenied(): void | Promise<Response> | Promise<void>;
6857
+ /**
6858
+ * @internal
6859
+ */
6860
+ sendMapViewLoadedEvent({ firstRenderDuration, dimension, }: {
6861
+ firstRenderDuration: number;
6862
+ dimension: {
6863
+ height: number;
6864
+ width: number;
6865
+ };
6866
+ }): void | Promise<Response> | Promise<void>;
6867
+ /**
6868
+ * @internal
6869
+ */
6870
+ sendGetDirectionsEvent: (start: string, end: string) => void;
6871
+ sendBlueDotEvents(event: BlueDotEvents): void | Promise<Response> | Promise<void>;
6872
+ }
6873
+ type AnalyticsUserPosition = {
6874
+ bluedotTimestamp: number;
6875
+ latitude: number;
6876
+ longitude: number;
6877
+ floorLevel?: number;
6878
+ accuracy: number;
6879
+ };
6880
+ type AnalyticsOptions = {
6881
+ /** The ID of the map to be used for analytics. */
6882
+ mapId?: string;
6883
+ /** The API key for authentication. */
6884
+ key?: string;
6885
+ /** The API secret for authentication. */
6886
+ secret?: string;
6887
+ /** The access token for authentication. */
6888
+ accessToken?: string;
6889
+ /** Flag to disable authentication. */
6890
+ noAuth?: boolean;
6891
+ /** Flag to enable logging of events. */
6892
+ logEvents?: boolean;
6893
+ /** Flag to enable sending of events. */
6894
+ sendEvents?: boolean;
6895
+ /** The context in which the analytics are being used. */
6896
+ context?: string;
6897
+ /** The platform string to be included in analytics. */
6898
+ platformString?: string;
6899
+ /** The base URI for the analytics endpoint. */
6900
+ baseUri?: string;
6901
+ };
6902
+ export type AnalyticsUpdateOptions = Omit<AnalyticsOptions, 'mapId' | 'key' | 'secret' | 'accessToken'> & {
6903
+ /** The ID of the map to be used for analytics. */
6904
+ mapId: string;
6905
+ } & ({
6906
+ /** The API key for authentication. */
6907
+ key: string;
6908
+ /** The API secret for authentication. */
6909
+ secret: string;
6910
+ } | {
6911
+ /** The access token for authentication. */
6912
+ accessToken: string;
6913
+ });
6914
+ export type AnalyticState = {
6915
+ accessToken?: string | undefined;
6916
+ version: string;
6917
+ platformString: string;
6918
+ baseUri: string;
6919
+ analyticsBaseUrl: string;
6920
+ noAuth: boolean;
6921
+ geolocationMode: boolean;
6922
+ mi_uuid: string;
6923
+ mi_session: string;
6924
+ context: ValidContext;
6925
+ userPosition?: AnalyticsUserPosition;
6926
+ mapId?: string;
6927
+ key?: string;
6928
+ secret?: string;
6929
+ logEvents: boolean;
6930
+ sendEvents: boolean;
6931
+ };
6932
+ type UpdateStateParam = Partial<Pick<AnalyticState, 'geolocationMode' | 'context' | 'logEvents' | 'userPosition' | 'mapId' | 'sendEvents' | 'logEvents' | 'accessToken'>>;
6933
+ type CaptureEventsPayloadMap = {
6934
+ '$select-location': {
6935
+ id: string;
6936
+ };
6937
+ '$select-category': {
6938
+ id: string;
6939
+ };
6940
+ '$query-suggest': {
6941
+ query: string;
6942
+ suggestions?: string[];
6943
+ };
6944
+ '$query-search': {
6945
+ query: string;
6946
+ hits?: string[];
6947
+ };
6948
+ };
6949
+ export const analyticsInternal: AnalyticsInternal;
6950
+ export class Analytics {
6951
+ #private;
6952
+ constructor(internalAnalytics: AnalyticsInternal);
6953
+ /**
6954
+ * Initializes the analytics with the provided options.
6955
+ * @param args - The options to initialize the analytics.
5905
6956
  */
5906
- getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
5907
- accessible: boolean;
5908
- smoothing: {
5909
- enabled: boolean;
5910
- radius: number;
5911
- };
5912
- zones: TDirectionZone[];
5913
- }, mapData: MapDataInternal) => Directions | undefined;
6957
+ init(options: AnalyticsUpdateOptions): void;
5914
6958
  /**
5915
- * Get the node IDs that should be excluded from the navigation graph.
6959
+ * Captures an analytic event with a custom target and query payload.
5916
6960
  *
5917
- * @hidden
5918
- * @param accessible {boolean}
6961
+ * @param target - The event name or target can be .
6962
+ * @param query - The payload associated with the event.
6963
+ * @returns A promise that resolves to the server response or void.
5919
6964
  */
5920
- getExcludedNodeIds: (accessible: boolean) => string[];
5921
- }
5922
- }
5923
-
5924
- declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/style' {
5925
- import type { StyleCollection } from '@mappedin/mvf';
5926
- import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
5927
- export class Style {
5928
- #private;
6965
+ capture: typeof AnalyticsInternal.prototype.capture;
5929
6966
  /**
5930
- * @internal
6967
+ * Updates the analytics state with the provided parameters.
6968
+ * @param update - The state parameters to update.
5931
6969
  */
5932
- get currentMap(): GeojsonApiMapObject | undefined;
6970
+ updateState: (update: Partial<Pick<AnalyticState, 'logEvents' | 'sendEvents' | 'logEvents' | 'baseUri' | 'accessToken'>>) => void;
5933
6971
  /**
6972
+ * Returns the current analytics state.
5934
6973
  * @internal
6974
+ * @returns the current analytics state
5935
6975
  */
5936
- constructor({ currentMapGetter }: {
5937
- currentMapGetter: CurrentMapGetter;
5938
- });
5939
- setFromStyleCollection(styleCollection: StyleCollection): void;
6976
+ getState(): AnalyticState;
5940
6977
  }
5941
- type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
5942
6978
  export {};
5943
6979
  }
5944
6980
 
5945
- declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/outdoor' {
5946
- import { type RendererCore, type Position } from '@mappedin/core-sdk';
5947
- export default class Outdoor {
5948
- #private;
6981
+ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object' {
6982
+ import Hyperlink from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink';
6983
+ import type { Details } from '@mappedin/mvf';
6984
+ export default abstract class BaseMapData {
5949
6985
  /**
5950
- * @internal
6986
+ * identity of the map object
5951
6987
  */
5952
- constructor(core: RendererCore, hiddenOutdoorGeometry?: [Position, string[]][]);
5953
- setStyle(style: any): void;
6988
+ readonly id: string;
6989
+ constructor(id: string, details?: Details);
5954
6990
  /**
5955
- * Returns a Maplibre map for advanced usage.
5956
- *
5957
- * @returns {object} Maplibre map instance
6991
+ * Gets the links associated with this data type.
5958
6992
  *
5959
- * Limitations:
5960
- * - Maplibre interaction events are not supported; use SDK interaction events.
5961
- * - Maplibre markers and labels may overlap as they are not integrated with the SDK collision engine.
5962
- */
5963
- get map(): import("@packages/internal/outdoor-context-v4").Map | undefined;
5964
- /**
5965
- * Whether the outdoorView is enabled.
6993
+ * @returns {Hyperlink[]} The links associated with this data type
5966
6994
  */
5967
- get enabled(): boolean;
6995
+ links: Hyperlink[];
5968
6996
  }
5969
6997
  }
5970
6998
 
5971
6999
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
5972
7000
  import type { ParsedMVF } from '@mappedin/mvf';
5973
- import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
7001
+ import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
7002
+ import { PubSub } from '@packages/internal/common';
5974
7003
  import type { Position, AddLabelOptions, RendererCore, MarkerState, LineStyle, PaintStyle } from '@mappedin/core-sdk';
7004
+ import { FloorObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object';
5975
7005
  import type { Coordinate, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
5976
- import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel } from '@mappedin/mappedin-js/mappedin-js/src/types';
7006
+ import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions } from '@mappedin/mappedin-js/mappedin-js/src/types';
5977
7007
  import { type AggregatedStyleMap } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils';
5978
- import { PubSub } from '@packages/internal/common';
5979
7008
  import { StackedMaps } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
5980
7009
  import type { TFloorChangeReason } from '@mappedin/mappedin-js/mappedin-js/src/events';
5981
- import type { FeatureCollection, LineString, MultiPolygon, Polygon } from 'geojson';
5982
7010
  import type { Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
5983
7011
  export class GeojsonApiMapObject extends PubSub<{
5984
7012
  'floor-change': {
@@ -6004,11 +7032,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object' {
6004
7032
  }) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
6005
7033
  remove: (_id: string, _groupId: string) => void;
6006
7034
  };
7035
+ Images: {
7036
+ add: (target: Position, url: string, opts: TAddImageOptions & {
7037
+ floorId?: string;
7038
+ }) => import("@mappedin/core-sdk").EntityId<import("@mappedin/core-sdk/src/components/image").ImageState> | undefined;
7039
+ remove: (id: string) => void;
7040
+ removeAll: () => void;
7041
+ };
6007
7042
  Markers: {
6008
7043
  add: (coordinate: Position, html: string, opts?: TAddMarkerOptions & {
6009
7044
  floorId?: string;
6010
- }) => import("@mappedin/core-sdk").EntityId<MarkerState>;
6011
- remove: (_id: string) => void;
7045
+ }) => import("@mappedin/core-sdk").EntityId<MarkerState> | undefined;
7046
+ remove: (id: string) => void;
6012
7047
  getContentEl: (id: string) => HTMLElement | undefined;
6013
7048
  removeAll: () => void;
6014
7049
  setPosition: (id: string, coordinate: Position, targetFloorId: string) => void;
@@ -6056,29 +7091,11 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/floor-object'
6056
7091
  elevation: number;
6057
7092
  containerId: string;
6058
7093
  layers: Map<string, string>;
6059
- constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf?: ParsedMVF, styleMap?: AggregatedStyleMap);
7094
+ constructor(parentId: string, floor: ParsedMVF['map.geojson'][0], renderer: RendererCore, options: TShow3DMapOptions, mvf: ParsedMVF, styleMap?: AggregatedStyleMap);
6060
7095
  load: () => this;
6061
7096
  }
6062
7097
  }
6063
7098
 
6064
- declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object' {
6065
- import Hyperlink from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink';
6066
- import type { Details } from '@mappedin/mvf';
6067
- export default abstract class BaseMapData {
6068
- /**
6069
- * identity of the map object
6070
- */
6071
- readonly id: string;
6072
- constructor(id: string, details?: Details);
6073
- /**
6074
- * Gets the links associated with this data type.
6075
- *
6076
- * @returns {Hyperlink[]} The links associated with this data type
6077
- */
6078
- links: Hyperlink[];
6079
- }
6080
- }
6081
-
6082
7099
  declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object' {
6083
7100
  export default abstract class BaseMetaData {
6084
7101
  /**
@@ -6089,17 +7106,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-meta
6089
7106
  }
6090
7107
  }
6091
7108
 
6092
- declare module '@mappedin/mappedin-js/geojson/src/entities/three-d' {
7109
+ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry3d' {
6093
7110
  import { Object3D } from 'three';
6094
7111
  import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
6095
7112
  import type { MeshComponent } from '@mappedin/mappedin-js/geojson/src/components/mesh';
6096
7113
  import type { ModelComponent } from '@mappedin/mappedin-js/geojson/src/components/model';
6097
7114
  import type { PathComponent } from '@mappedin/mappedin-js/geojson/src/components/path';
6098
7115
  import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
7116
+ import type { ImageComponent } from '@mappedin/mappedin-js/geojson/src/components/image';
6099
7117
  import type { CustomGeometryComponent } from '@mappedin/mappedin-js/geojson/src/components/custom';
6100
- import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
6101
- import { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
6102
- export enum ThreeDComponents {
7118
+ import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
7119
+ import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
7120
+ export enum Geometry3DComponents {
6103
7121
  Mesh = 0,
6104
7122
  Style = 1,
6105
7123
  Interaction = 2
@@ -6107,27 +7125,27 @@ declare module '@mappedin/mappedin-js/geojson/src/entities/three-d' {
6107
7125
  export class Geometry3DObject3D extends Object3D {
6108
7126
  userData: {
6109
7127
  entityId: string;
6110
- type: 'geometry' | 'path' | 'model' | 'custom-geometry';
7128
+ type: 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
6111
7129
  };
6112
7130
  }
6113
- export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent;
7131
+ export type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent;
6114
7132
  export class Geometry3D {
6115
7133
  id: string | number;
6116
7134
  components: [MeshComponentTypes, StyleComponent, InteractionComponent?];
6117
- get object3d(): import("../components/mesh").EntityBatchedMesh | Geometry3DObject3D | undefined;
7135
+ get object3d(): Geometry3DObject3D | import("../components/mesh").EntityBatchedMesh | undefined;
6118
7136
  get parent(): GroupContainerObject3D | GeometryGroupObject3D | null;
6119
- get type(): 'geometry' | 'path' | 'model' | 'custom-geometry';
6120
- constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent, styleComponent: StyleComponent);
7137
+ get type(): 'geometry' | 'path' | 'model' | 'custom-geometry' | 'image';
7138
+ constructor(meshComponent: MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | ImageComponent, styleComponent: StyleComponent);
6121
7139
  }
6122
7140
  }
6123
7141
 
6124
- declare module '@mappedin/mappedin-js/geojson/src/entities/two-d' {
7142
+ declare module '@mappedin/mappedin-js/geojson/src/entities/geometry2d' {
6125
7143
  import { Object3D, Vector3 } from 'three';
6126
7144
  import type { MarkerComponent } from '@mappedin/mappedin-js/geojson/src/components/marker';
6127
7145
  import type LabelComponent from '@mappedin/mappedin-js/geojson/src/components/label';
6128
- import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
7146
+ import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
6129
7147
  import type { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
6130
- export enum TWOD_COMPONENTS {
7148
+ export enum Geometry2DComponents {
6131
7149
  UI = 0,
6132
7150
  Interaction = 1
6133
7151
  }
@@ -6173,6 +7191,8 @@ declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-styl
6173
7191
  opacity: number;
6174
7192
  shading?: Shading;
6175
7193
  outline: boolean;
7194
+ texture?: string;
7195
+ topTexture?: string;
6176
7196
  };
6177
7197
  export class GeometryGroupStyleComponent implements GeometryGroupStyle {
6178
7198
  #private;
@@ -6180,6 +7200,13 @@ declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-styl
6180
7200
  topColor?: string;
6181
7201
  opacity: number;
6182
7202
  outline: boolean;
7203
+ texture?: string;
7204
+ topTexture?: string;
7205
+ /**
7206
+ * Ideally for handling all style component changes. However, it's only used for handling outline for now.
7207
+ * 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
7208
+ */
7209
+ dirty: boolean;
6183
7210
  get shading(): Required<Shading> | undefined;
6184
7211
  set shading(value: Shading | undefined);
6185
7212
  constructor(style?: Partial<GeometryGroupStyle>);
@@ -6187,6 +7214,143 @@ declare module '@mappedin/mappedin-js/geojson/src/components/geometry-group-styl
6187
7214
  export {};
6188
7215
  }
6189
7216
 
7217
+ declare module '@mappedin/mappedin-js/geojson/src/components/image' {
7218
+ import type { LineSegments, PlaneGeometry, MeshLambertMaterial } from 'three';
7219
+ import { Vector3, Mesh } from 'three';
7220
+ import type { Position } from '@mappedin/mappedin-js/geojson/src/types';
7221
+ import type { Feature, Point } from 'geojson';
7222
+ import { Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
7223
+ import { z } from 'zod';
7224
+ export class EntityMesh extends Mesh {
7225
+ userData: {
7226
+ entityId: string | number;
7227
+ };
7228
+ }
7229
+ export type ImageStyle = {
7230
+ /**
7231
+ * Attempt to keep the image facing the camera as much as possible
7232
+ */
7233
+ flipImageToFaceCamera?: boolean;
7234
+ /**
7235
+ * url of the image
7236
+ */
7237
+ url: string;
7238
+ };
7239
+ export type ImageProperties = {
7240
+ width: number;
7241
+ height: number;
7242
+ rotation?: number;
7243
+ verticalOffset?: number;
7244
+ };
7245
+ export const addImageFeatureStyleSchema: z.ZodObject<{
7246
+ flipImageToFaceCamera: z.ZodOptional<z.ZodBoolean>;
7247
+ url: z.ZodString;
7248
+ }, "strip", z.ZodTypeAny, {
7249
+ url: string;
7250
+ flipImageToFaceCamera?: boolean | undefined;
7251
+ }, {
7252
+ url: string;
7253
+ flipImageToFaceCamera?: boolean | undefined;
7254
+ }>;
7255
+ export const addImageFeatureSchema: z.ZodObject<{
7256
+ type: z.ZodEnum<["Feature"]>;
7257
+ properties: z.ZodObject<{
7258
+ width: z.ZodNumber;
7259
+ height: z.ZodNumber;
7260
+ rotation: z.ZodOptional<z.ZodNumber>;
7261
+ verticalOffset: z.ZodOptional<z.ZodNumber>;
7262
+ }, "strip", z.ZodTypeAny, {
7263
+ height: number;
7264
+ width: number;
7265
+ rotation?: number | undefined;
7266
+ verticalOffset?: number | undefined;
7267
+ }, {
7268
+ height: number;
7269
+ width: number;
7270
+ rotation?: number | undefined;
7271
+ verticalOffset?: number | undefined;
7272
+ }>;
7273
+ geometry: z.ZodObject<{
7274
+ type: z.ZodEnum<["Point"]>;
7275
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
7276
+ }, "strip", z.ZodTypeAny, {
7277
+ type: "Point";
7278
+ coordinates: number[];
7279
+ }, {
7280
+ type: "Point";
7281
+ coordinates: number[];
7282
+ }>;
7283
+ }, "strip", z.ZodTypeAny, {
7284
+ type: "Feature";
7285
+ geometry: {
7286
+ type: "Point";
7287
+ coordinates: number[];
7288
+ };
7289
+ properties: {
7290
+ height: number;
7291
+ width: number;
7292
+ rotation?: number | undefined;
7293
+ verticalOffset?: number | undefined;
7294
+ };
7295
+ }, {
7296
+ type: "Feature";
7297
+ geometry: {
7298
+ type: "Point";
7299
+ coordinates: number[];
7300
+ };
7301
+ properties: {
7302
+ height: number;
7303
+ width: number;
7304
+ rotation?: number | undefined;
7305
+ verticalOffset?: number | undefined;
7306
+ };
7307
+ }>;
7308
+ export function validateImage(id: string | number, feature: Feature<Point, ImageProperties>, style: ImageStyle): void;
7309
+ /**
7310
+ * State representing an Image
7311
+ */
7312
+ export type ImageState = {
7313
+ readonly id: string | number;
7314
+ readonly type: 'image';
7315
+ /**
7316
+ * The position of the image in [lon, lat]
7317
+ */
7318
+ readonly position: Position;
7319
+ /**
7320
+ * The offset of the image in the z direction
7321
+ */
7322
+ readonly verticalOffset: number;
7323
+ /**
7324
+ * Whether the image is visible
7325
+ */
7326
+ visible: boolean;
7327
+ /**
7328
+ * Attempt to keep the image facing the camera as much as possible
7329
+ */
7330
+ flipImageToFaceCamera: boolean;
7331
+ };
7332
+ export class ImageComponent {
7333
+ mesh: Geometry3DObject3D;
7334
+ imageMesh?: EntityMesh;
7335
+ outline?: LineSegments;
7336
+ readonly type = "image";
7337
+ instanceIndex: number;
7338
+ geometry?: PlaneGeometry;
7339
+ material?: MeshLambertMaterial;
7340
+ feature: Feature<Point, ImageProperties>;
7341
+ constructor(feature: Feature<Point, ImageProperties>);
7342
+ get visible(): boolean;
7343
+ set visible(visible: boolean);
7344
+ position: Vector3;
7345
+ }
7346
+ }
7347
+
7348
+ declare module '@mappedin/mappedin-js/geojson/src/entities' {
7349
+ export { updateInteractivity } from '@mappedin/mappedin-js/geojson/src/entities/utils';
7350
+ export { Geometry2D, Geometry2DComponents } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
7351
+ export { Geometry3D, Geometry3DComponents } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
7352
+ }
7353
+
6190
7354
  declare module '@mappedin/mappedin-js/geojson/src/types/options' {
6191
7355
  import type { Position } from '@mappedin/mappedin-js/geojson/src/types/geometry';
6192
7356
  import type { Map as MapLibreMap } from '@mappedin/mappedin-js/packages/outdoor-context-v4';
@@ -6227,15 +7391,28 @@ declare module '@mappedin/mappedin-js/geojson/src/types/constants' {
6227
7391
  declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/batched-material' {
6228
7392
  import { MeshLambertMaterial, type Color, type Texture, type MeshLambertMaterialParameters } from 'three';
6229
7393
  export class BatchedStandardMaterial extends MeshLambertMaterial {
6230
- constructor(params: MeshLambertMaterialParameters, geometryCount: number);
7394
+ constructor(params: MeshLambertMaterialParameters, geometryCount: number, scaleFactor?: number);
7395
+ /**
7396
+ * These control the repeat factor of the texture in the Y direction.
7397
+ * So when we scale a geometry, it needs to scale the texture as well.
7398
+ * For now this only applies to detached geometries.
7399
+ */
7400
+ get repeatYFactor(): number;
7401
+ set repeatYFactor(value: number);
6231
7402
  get texture(): Texture;
6232
7403
  set texture(texture: Texture);
6233
7404
  get topTexture(): Texture;
6234
7405
  set topTexture(texture: Texture);
6235
7406
  setGradientShading(start: number, end: number, intensity: number): void;
6236
7407
  setColor(batchId: number, color: Color, topColor: Color): void;
7408
+ getColor(batchId: number): {
7409
+ color: Color;
7410
+ topColor: Color;
7411
+ };
6237
7412
  showTextures: (batchId: number) => void;
6238
7413
  hideTextures(batchId: number): void;
7414
+ removeSideTexture(batchId: number): void;
7415
+ removeTopTexture(batchId: number): void;
6239
7416
  dispose(): void;
6240
7417
  }
6241
7418
  }
@@ -6310,6 +7487,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
6310
7487
  import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
6311
7488
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
6312
7489
  import type { TSerializedCollider, TSerializedColliderResponse } from '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor';
7490
+ import { WatermarkPosition } from '@mappedin/mappedin-js/geojson/src/systems/watermark/system';
6313
7491
  export type TMessageEvent = MessageEvent<{
6314
7492
  msgId: string;
6315
7493
  colliders: TSerializedColliderResponse[];
@@ -6326,6 +7504,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
6326
7504
  totalHeight: number;
6327
7505
  watermarkWidth: number;
6328
7506
  watermarkHeight: number;
7507
+ watermarkPosition: WatermarkPosition;
6329
7508
  colliders: TSerializedCollider[];
6330
7509
  devicePixelRatio: number;
6331
7510
  };
@@ -6341,7 +7520,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
6341
7520
  totalHeight: number,
6342
7521
  totalWidth: number,
6343
7522
  watermarkWidth: number,
6344
- watermarkHeight: number
7523
+ watermarkHeight: number,
7524
+ watermarkPosition: WatermarkPosition
6345
7525
  ];
6346
7526
  export class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
6347
7527
  dirty: boolean;
@@ -6360,8 +7540,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/system' {
6360
7540
  currentMsgId: string;
6361
7541
  working: boolean;
6362
7542
  componentArray: (MarkerComponent | LabelComponent)[];
6363
- update: (watermarkWidth: number, watermarkHeight: number) => void;
6364
- resize(watermarkWidth: number, watermarkHeight: number): void;
7543
+ update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition) => void;
7544
+ resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
6365
7545
  /**
6366
7546
  * Resolve collisions
6367
7547
  */
@@ -6402,7 +7582,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/zoom-interpolation/zoo
6402
7582
  declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-creation-and-optimization/system' {
6403
7583
  import type { BufferGeometry } from 'three';
6404
7584
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
6405
- import { Geometry3D, Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
7585
+ import { Geometry3D, Geometry3DObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
6406
7586
  import type { Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
6407
7587
  import type { LineStyle, ModelProperties, ModelStyle, PaintStyle } from '@mappedin/mappedin-js/geojson/src/types';
6408
7588
  import type { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
@@ -6498,13 +7678,18 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/2d-draw/system' {
6498
7678
 
6499
7679
  declare module '@mappedin/mappedin-js/geojson/src/systems/draw/system' {
6500
7680
  import { PubSub } from '@packages/internal/common';
7681
+ import { MeshComponent } from '@mappedin/mappedin-js/geojson/src/components/mesh';
7682
+ import { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
6501
7683
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
7684
+ import { InteractionComponent } from '@mappedin/mappedin-js/geojson/src/components/interaction';
7685
+ import type { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
6502
7686
  export class DrawSystem extends PubSub<{
6503
7687
  'texture-loaded': void;
6504
7688
  }> {
6505
7689
  #private;
6506
7690
  state: RendererState;
6507
7691
  constructor(state: RendererState);
7692
+ processTextures(component: MeshComponent, styleComponent: StyleComponent | GeometryGroupStyleComponent, interactionComponent?: InteractionComponent): void;
6508
7693
  update(): void;
6509
7694
  destroy(): void;
6510
7695
  }
@@ -6783,11 +7968,13 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/custom-geometry/system
6783
7968
  declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/system' {
6784
7969
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
6785
7970
  export class OutlineInterpolationSystem {
7971
+ #private;
6786
7972
  /**
6787
7973
  * Set to true when we need to update the outline color of all entities, regardless of zoom level.
6788
7974
  */
6789
7975
  dirty: boolean;
6790
- geometries3DDirty: boolean;
7976
+ get geometries3DDirty(): boolean;
7977
+ set geometries3DDirty(value: boolean);
6791
7978
  constructor(rendererState: RendererState);
6792
7979
  /**
6793
7980
  * Update the outline color of all entities with an outline component.
@@ -6798,6 +7985,21 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/outline-interpolation/
6798
7985
  }
6799
7986
  }
6800
7987
 
7988
+ declare module '@mappedin/mappedin-js/geojson/src/systems/image/system' {
7989
+ import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
7990
+ import { type Texture } from 'three';
7991
+ import type { RendererCore } from '@mappedin/mappedin-js/geojson/src';
7992
+ import { PubSub } from '@packages/internal/common';
7993
+ export const DEFAULT_VERTICAL_OFFSET = 0.01;
7994
+ export class ImageSystem extends PubSub<{
7995
+ 'image-loaded': void;
7996
+ }> {
7997
+ constructor(rendererState: RendererState, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']);
7998
+ imageLoadingCache: Map<string, Promise<Texture>>;
7999
+ update(cameraRotationRadians: number): void;
8000
+ }
8001
+ }
8002
+
6801
8003
  declare module '@mappedin/mappedin-js/geojson/src/systems/geometry-in-focus/system' {
6802
8004
  import { PubSub } from '@packages/internal/common';
6803
8005
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
@@ -6831,6 +8033,45 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/path' {
6831
8033
  export { PathSystem } from '@mappedin/mappedin-js/geojson/src/systems/path/system';
6832
8034
  }
6833
8035
 
8036
+ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-detachment/system' {
8037
+ import { type Geometry3DTypes, type RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
8038
+ /**
8039
+ * This system is responsible for updating the opacity of the mesh, which results in the mesh
8040
+ * being detached from the parent's optimized geometry group and rendered as a separate mesh.
8041
+ */
8042
+ export class MeshDetachmentSystem {
8043
+ #private;
8044
+ rendererState: RendererState;
8045
+ dirty: boolean;
8046
+ constructor(rendererState: RendererState);
8047
+ updateOne(geometry: Geometry3DTypes | undefined): void;
8048
+ update(): void;
8049
+ }
8050
+ }
8051
+
8052
+ declare module '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system' {
8053
+ import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
8054
+ import type { GeometryGroupObject3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
8055
+ import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
8056
+ import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
8057
+ /**
8058
+ * Any physical changes to geometry should go in here. This includes height changes, etc.
8059
+ * This is to ensure that physical changes apply before any other systems need to do their work,
8060
+ * such as the outline system.
8061
+ *
8062
+ * TODO: For now, this piggybacks of style.dirty, but we may want to create a flag indicating geometry dirty.
8063
+ */
8064
+ export class MeshModificationSystem {
8065
+ #private;
8066
+ rendererState: RendererState;
8067
+ dirty: boolean;
8068
+ constructor(rendererState: RendererState);
8069
+ updateOne(entity: Geometry3D | GeometryGroupObject3D | GroupContainerObject3D | undefined): void;
8070
+ update(): void;
8071
+ cleanup(): void;
8072
+ }
8073
+ }
8074
+
6834
8075
  declare module '@mappedin/mappedin-js/packages/geojson-navigator/src' {
6835
8076
  export { Navigator } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator';
6836
8077
  export type { SimplifyDirectionsOptions } from '@mappedin/mappedin-js/packages/geojson-navigator/src/navigator/navigator';
@@ -6897,10 +8138,13 @@ declare module '@mappedin/mappedin-js/geojson/src/utils/fp' {
6897
8138
  export function noop(): void;
6898
8139
  }
6899
8140
 
6900
- declare module '@mappedin/mappedin-js/geojson/src/entities' {
6901
- export { updateInteractivity } from '@mappedin/mappedin-js/geojson/src/entities/utils';
6902
- export { Geometry2D, TWOD_COMPONENTS } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
6903
- export { Geometry3D, ThreeDComponents } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
8141
+ declare module '@mappedin/mappedin-js/geojson/src/utils/tranform-request' {
8142
+ export const transformRequest: (headers: {
8143
+ "x-mappedin-tiles-key": string;
8144
+ }) => (url: string) => {
8145
+ url: string;
8146
+ headers: {};
8147
+ };
6904
8148
  }
6905
8149
 
6906
8150
  declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
@@ -6936,15 +8180,21 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/exporter/exporter' {
6936
8180
  declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
6937
8181
  import { Coordinate } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
6938
8182
  import type { Position, EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf';
6939
- import type { MultiLineString } from 'geojson';
8183
+ import type { WithPolygonImage } from '@packages/internal/mvf-utils';
8184
+ import type { FeatureCollection, MultiLineString } from 'geojson';
6940
8185
  import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle } from '@mappedin/core-sdk';
6941
8186
  import type { TGeometryState, TLabelState, TDirectionInstructionAction, TShow3DMapOptions } from '@mappedin/mappedin-js/mappedin-js/src';
6942
- import type { TMarkerState } from '@mappedin/mappedin-js/mappedin-js/src/types';
8187
+ import type { TDoorsState, TMarkerState, TWallsState } from '@mappedin/mappedin-js/mappedin-js/src/types';
6943
8188
  export function convertCoordinateToPosition(coord: Coordinate): Position;
6944
8189
  export function convertPositionToCoordinate(coord: Position): Coordinate;
6945
- export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => Feature<MultiLineString, any>;
8190
+ export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
8191
+ entrances: FeatureCollection<LineString, any>;
8192
+ walls: Feature<MultiLineString, any>;
8193
+ };
6946
8194
  export function translateLabelStateToGeojsonCore(state: Partial<TLabelState>, currentState: Partial<LabelState>): Partial<LabelState>;
6947
8195
  export function translateMarkerStateToGeojsonCore(state: Partial<TMarkerState>, currentState: Partial<MarkerState>): Partial<MarkerState>;
8196
+ export function translateDoorsStateToGeojsonCore(state: Partial<TDoorsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
8197
+ export function translateWallsStateToGeojsonCore(state: Partial<TWallsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
6948
8198
  export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
6949
8199
  export function differenceBetweenAngles(a: number, b: number): number;
6950
8200
  export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
@@ -6959,12 +8209,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
6959
8209
  export type WithId<T> = T & {
6960
8210
  id?: string;
6961
8211
  };
6962
- export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, ObstructionProperties | SpaceProperties>[]>;
8212
+ export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, WithPolygonImage<SpaceProperties> | WithPolygonImage<ObstructionProperties>>[]>;
6963
8213
  export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
6964
8214
  }
6965
8215
 
6966
8216
  declare module '@mappedin/mappedin-js/geojson/src/components/style' {
6967
- import type { Cap, Join } from '@mappedin/mappedin-js/geojson/src/types';
8217
+ import type { LineStyle } from '@mappedin/mappedin-js/geojson/src/renderer';
8218
+ export const DEFAULT_COLOR = "#ffffff";
8219
+ export const DEFAULT_HEIGHT = 0.1;
6968
8220
  type Style = {
6969
8221
  color: string;
6970
8222
  width: number;
@@ -6972,12 +8224,15 @@ declare module '@mappedin/mappedin-js/geojson/src/components/style' {
6972
8224
  visible: boolean;
6973
8225
  height: number;
6974
8226
  altitude: number;
6975
- join: Join;
6976
- cap: Cap;
8227
+ join: LineStyle['join'];
8228
+ cap: LineStyle['cap'];
6977
8229
  topColor?: string;
6978
8230
  texture?: string;
6979
8231
  topTexture?: string;
6980
8232
  outline: boolean;
8233
+ showImage: boolean;
8234
+ flipImageToFaceCamera: boolean;
8235
+ url?: string;
6981
8236
  };
6982
8237
  export class StyleComponent implements Style {
6983
8238
  initialColor: string;
@@ -6991,15 +8246,53 @@ declare module '@mappedin/mappedin-js/geojson/src/components/style' {
6991
8246
  opacity: number;
6992
8247
  width: number;
6993
8248
  height: number;
8249
+ initialHeight: number;
6994
8250
  altitude: number;
6995
- join: Join;
6996
- cap: Cap;
8251
+ join: LineStyle['join'];
8252
+ cap: LineStyle['cap'];
6997
8253
  outline: boolean;
8254
+ showImage: boolean;
8255
+ flipImageToFaceCamera: boolean;
8256
+ url?: string;
6998
8257
  constructor(style?: Partial<Style>);
6999
8258
  }
7000
8259
  export {};
7001
8260
  }
7002
8261
 
8262
+ declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
8263
+ import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
8264
+ import { type MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
8265
+ import type { Geometry3DTypes, Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
8266
+ import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/geometry-group';
8267
+ import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
8268
+ import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
8269
+ import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
8270
+ import type { StyleComponent } from '@mappedin/mappedin-js/geojson/src/components/style';
8271
+ import type { GeometryGroupStyleComponent } from '@mappedin/mappedin-js/geojson/src/components/geometry-group-style';
8272
+ export function updateInteractivity(entity: Geometry3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
8273
+ export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update: Partial<Pick<GeometryGroupState, 'color' | 'topColor'>>): boolean | undefined;
8274
+ export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
8275
+ export function updateImageProps(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
8276
+ export function updateHeight(entity: Geometry3D, update?: number): boolean;
8277
+ export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
8278
+ export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
8279
+ export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
8280
+ export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
8281
+ export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
8282
+ export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined, state: RendererState): boolean;
8283
+ export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
8284
+ export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined, state: RendererState): void;
8285
+ export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
8286
+ export function updateFlipImageToFaceCamera(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): void;
8287
+ export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
8288
+ export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
8289
+ export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
8290
+ export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
8291
+ export function updateIndividualGeometryOpacity(entity: Geometry3D, update?: number): boolean;
8292
+ export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
8293
+ export function updateOutline(entity: Geometry3DTypes, update?: boolean): boolean;
8294
+ }
8295
+
7003
8296
  declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-processor' {
7004
8297
  import { Rectangle } from '@packages/internal/quad-tree';
7005
8298
  export type TSerializedCollider = {
@@ -7015,7 +8308,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-pr
7015
8308
  shouldCollideWithScreenEdges?: boolean;
7016
8309
  };
7017
8310
  export type TSerializedColliderResponse = [number, boolean, Rectangle?];
7018
- export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, msgId?: string): {
8311
+ export function processColliders(colliders: TSerializedCollider[], totalWidth: any, totalHeight: any, watermarkWidth: any, watermarkHeight: any, watermarkPosition: any, msgId?: string): {
7019
8312
  msgId: string;
7020
8313
  colliders: TSerializedColliderResponse[];
7021
8314
  debug: {
@@ -7030,16 +8323,16 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/collisions/collider-pr
7030
8323
  declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
7031
8324
  import type { PerspectiveCamera, Vector3, Object3D, Mesh } from 'three';
7032
8325
  import { Raycaster } from 'three';
7033
- import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
8326
+ import type { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/geometry2d';
7034
8327
  import { QuadTree } from '@packages/internal/quad-tree';
7035
- import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
8328
+ import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/geometry3d';
7036
8329
  import { PubSub } from '@mappedin/mappedin-js/packages/common/pubsub';
7037
8330
  import type { EntityMesh } from '@mappedin/mappedin-js/geojson/src/types';
7038
8331
  import { TapsController } from '@mappedin/mappedin-js/geojson/src/systems/interactions/tap-controller';
7039
8332
  import type { RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
7040
8333
  import 'style.scss';
7041
8334
  import type { EntityBatchedMesh } from '@mappedin/mappedin-js/geojson/src/components/mesh';
7042
- import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
8335
+ import type { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/group-container';
7043
8336
  type InteractionPayload = {
7044
8337
  entity2D?: Geometry2D;
7045
8338
  entity3D?: Geometry3D;
@@ -7065,8 +8358,8 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
7065
8358
  } | undefined;
7066
8359
  };
7067
8360
  export type InteractionRequiredCoreStateProps = {
7068
- twoDEntities: Geometry2D[];
7069
- threeDEntities: Geometry3D[];
8361
+ geometry2DIdsInScene: Set<Geometry2D['id']>;
8362
+ geometry3DIdsInScene: Set<Geometry3D['id']>;
7070
8363
  };
7071
8364
  /**
7072
8365
  * TODO: touch support
@@ -7108,6 +8401,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/system' {
7108
8401
  * Get the current cursor type determined by the interaction.
7109
8402
  */
7110
8403
  getCursor(): CursorTypes;
8404
+ resize: () => void;
7111
8405
  }
7112
8406
  export {};
7113
8407
  }
@@ -15801,32 +17095,6 @@ declare module '@mappedin/mappedin-js/packages/geojson-navigator/src/types/coord
15801
17095
  export type CoordinateFeature = Feature<Point, CoordinateProperties>;
15802
17096
  }
15803
17097
 
15804
- declare module '@mappedin/mappedin-js/geojson/src/entities/utils' {
15805
- import type { CollisionRankingTier, GeometryState, LabelState, PathState, RendererCore } from '@mappedin/mappedin-js/geojson/src';
15806
- import type { MarkerState } from '@mappedin/mappedin-js/geojson/src/components/marker';
15807
- import type { Entity3DTypes, Position, RendererState } from '@mappedin/mappedin-js/geojson/src/renderer';
15808
- import { GeometryGroupObject3D, type GeometryGroupState } from '@mappedin/mappedin-js/geojson/src/entities/entity-group';
15809
- import { GroupContainerObject3D } from '@mappedin/mappedin-js/geojson/src/entities/entity-group-container';
15810
- import { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities/three-d';
15811
- import { Geometry2D } from '@mappedin/mappedin-js/geojson/src/entities/two-d';
15812
- export function updateInteractivity(entity: Entity3DTypes | Geometry2D, update: boolean | undefined, state: RendererState): boolean;
15813
- export function updateGroupColor(entity: GeometryGroupObject3D, state: RendererState, update?: Partial<GeometryGroupState>): boolean;
15814
- export function updateGroupShading(entity: GeometryGroupObject3D, update?: GeometryGroupState['shading']): boolean;
15815
- export function updateColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Partial<GeometryState>): void;
15816
- export function updatePosition(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Position | undefined, convertTo3DMapPosition: RendererCore['convertTo3DMapPosition']): void;
15817
- export function updateParent(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: GroupContainerObject3D | undefined): boolean;
15818
- export function updateEnabled(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: boolean | undefined): void;
15819
- export function updatePath(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<PathState> | undefined): void;
15820
- export function updateMarker(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<MarkerState> | undefined): boolean;
15821
- export function updateRank(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: CollisionRankingTier | undefined): boolean;
15822
- export function updateLabel(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update: Partial<LabelState> | undefined): void;
15823
- export function updateHoverColor(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: string): void;
15824
- export function updateVisibility(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: boolean): boolean;
15825
- export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): void;
15826
- export function updateAltitude(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: number): void;
15827
- export function updateOutline(entity: Entity3DTypes, update?: boolean): boolean;
15828
- }
15829
-
15830
17098
  declare module '@mappedin/mappedin-js/geojson/src/systems/interactions/tap-controller' {
15831
17099
  export enum TapType {
15832
17100
  onefinger = 0,