@mappedin/mappedin-js 6.3.1 → 6.4.0

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.
@@ -79,19 +79,55 @@ declare class AnalyticsInternal {
79
79
  sendBlueDotEvents(event: BlueDotEvents): void | Promise<Response> | Promise<void>;
80
80
  }
81
81
  type UpdateStateParam = Partial<Pick<AnalyticState, "geolocationMode" | "context" | "logEvents" | "userPosition" | "mapId" | "sendEvents" | "logEvents" | "accessToken" | "sessionId" | "deviceId">>;
82
- type CaptureEventsPayloadMap = {
82
+ /**
83
+ * Maps reserved analytics event names to their payload structures.
84
+ *
85
+ * This type is used by the {@link Analytics.capture} method to provide type safety for reserved analytics events.
86
+ * When using these event names, the payload must match the corresponding structure.
87
+ */
88
+ export type CaptureEventsPayloadMap = {
89
+ /**
90
+ * Event fired when a location is selected.
91
+ */
83
92
  "$select-location": {
93
+ /**
94
+ * The ID of the selected location.
95
+ */
84
96
  id: string;
85
97
  };
98
+ /**
99
+ * Event fired when a category is selected.
100
+ */
86
101
  "$select-category": {
102
+ /**
103
+ * The ID of the selected category.
104
+ */
87
105
  id: string;
88
106
  };
107
+ /**
108
+ * Event fired when query suggestions are generated.
109
+ */
89
110
  "$query-suggest": {
111
+ /**
112
+ * The search query string.
113
+ */
90
114
  query: string;
115
+ /**
116
+ * Optional array of suggestion strings.
117
+ */
91
118
  suggestions?: string[];
92
119
  };
120
+ /**
121
+ * Event fired when a search query is executed.
122
+ */
93
123
  "$query-search": {
124
+ /**
125
+ * The search query string.
126
+ */
94
127
  query: string;
128
+ /**
129
+ * Optional array of result IDs (hits).
130
+ */
95
131
  hits?: string[];
96
132
  };
97
133
  };
@@ -194,7 +230,7 @@ type AnalyticState = {
194
230
  /** Flag to enable sending of events. */
195
231
  sendEvents: boolean;
196
232
  } & AnalyticsAuth;
197
- type AnalyticsOptions = Partial<Omit<AnalyticState, "version" | "analyticsBaseUrl" | "geolocationMode" | "userPosition">>;
233
+ type AnalyticsOptions = Partial<Omit<AnalyticState, "analyticsBaseUrl" | "geolocationMode" | "userPosition">>;
198
234
  type AnalyticsUpdateOptions = Omit<AnalyticsOptions, keyof AnalyticsAuth> & ((Required<Pick<AnalyticsAuth, "key" | "secret">> & Partial<Pick<AnalyticsAuth, "accessToken">>) | (Required<Pick<AnalyticsAuth, "accessToken">> & Partial<Pick<AnalyticsAuth, "key" | "secret">>));
199
235
  /**
200
236
  * Options for updating the current state of analytics.
@@ -359,16 +395,7 @@ interface FeatureCollection$1<G extends Geometry$1 | null = Geometry$1, P = GeoJ
359
395
  type: "FeatureCollection";
360
396
  features: Array<Feature$1<G, P>>;
361
397
  }
362
- /**
363
- * Represents the environment state configuration.
364
- * @example
365
- * const mapData = getMapData({
366
- * key: '',
367
- * secret: '',
368
- * environment: 'eu'
369
- * })
370
- */
371
- export type Environment = {
398
+ type Environment = {
372
399
  /**
373
400
  * The base URI for the API.
374
401
  */
@@ -388,16 +415,13 @@ export type Environment = {
388
415
  };
389
416
  type InternalServiceEnvironment = "us" | "us-enterprise" | "eu" | "us-staging-enterprise" | "us-staging-self-serve";
390
417
  type ServiceEnvironment = "us" | "eu";
391
- /**
392
- * Options for configuring search functionality.
393
- */
394
- export type TSearchOptions = {
418
+ type TSearchOptions = {
395
419
  /**
396
420
  * Indicates whether search functionality is enabled.
397
421
  */
398
422
  enabled: boolean;
399
423
  };
400
- export type TGetMapDataSharedOptions = {
424
+ type TGetMapDataSharedOptions = {
401
425
  /**
402
426
  * Mappedin map ID.
403
427
  */
@@ -473,6 +497,11 @@ export type TGetMapDataSharedOptions = {
473
497
  * @internal
474
498
  */
475
499
  context?: string;
500
+ /**
501
+ * Version override for analytics events.
502
+ * @internal
503
+ */
504
+ version?: string;
476
505
  };
477
506
  search?: TSearchOptions;
478
507
  /**
@@ -491,10 +520,7 @@ export type TGetMapDataSharedOptions = {
491
520
  */
492
521
  mvfVersion?: "2.0.0" | "2.0.0-c" | "3.0.0";
493
522
  };
494
- /**
495
- * @interface
496
- */
497
- export type TGetMapDataWithCredentialsOptions = {
523
+ type TGetMapDataWithCredentialsOptions = {
498
524
  /**
499
525
  * Mappedin auth key.
500
526
  */
@@ -504,16 +530,13 @@ export type TGetMapDataWithCredentialsOptions = {
504
530
  */
505
531
  secret: string;
506
532
  } & TGetMapDataSharedOptions;
507
- /**
508
- * @interface
509
- */
510
- export type TGetMapDataWithAccessTokenOptions = {
533
+ type TGetMapDataWithAccessTokenOptions = {
511
534
  /**
512
535
  * Mappedin access token.
513
536
  */
514
537
  accessToken: string;
515
538
  } & TGetMapDataSharedOptions;
516
- export type TGetMapDataOptions = TGetMapDataWithCredentialsOptions | TGetMapDataWithAccessTokenOptions;
539
+ type TGetMapDataOptions = TGetMapDataWithCredentialsOptions | TGetMapDataWithAccessTokenOptions;
517
540
  /**
518
541
  * @internal
519
542
  */
@@ -4775,6 +4798,11 @@ type PathState = {
4775
4798
  highlightColor: string;
4776
4799
  highlightWidthMultiplier: number;
4777
4800
  highlightCompleteFraction: number;
4801
+ /**
4802
+ * The opacity of the path when it's behind geometry (x-ray effect). Value from 0 to 1.
4803
+ * @default 0.25
4804
+ */
4805
+ xrayOpacity: number;
4778
4806
  };
4779
4807
  type AddPathOptions = {
4780
4808
  /**
@@ -4829,6 +4857,11 @@ type AddPathOptions = {
4829
4857
  highlightColor?: string;
4830
4858
  highlightWidthMultiplier?: number;
4831
4859
  highlightCompleteFraction?: number;
4860
+ /**
4861
+ * The opacity of the path when it's behind geometry (x-ray effect). Value from 0 to 1.
4862
+ * @default 0.25
4863
+ */
4864
+ xrayOpacity?: number;
4832
4865
  };
4833
4866
  declare class PathComponent {
4834
4867
  #private;
@@ -4853,6 +4886,7 @@ declare class PathComponent {
4853
4886
  highlightCompleteFraction: number;
4854
4887
  highlightWidthMultiplier: number;
4855
4888
  highlightColor: string;
4889
+ xrayOpacity: number;
4856
4890
  dashed: boolean;
4857
4891
  /**
4858
4892
  * If the path is vertical it will be rebuilt whenever altitudeDirty = true. This will be set during the first render of the path.
@@ -5133,6 +5167,7 @@ declare class Geometry3DObject3D extends Object3D {
5133
5167
  isSingleModel?: boolean;
5134
5168
  type: Geometry3DObjectTypes;
5135
5169
  };
5170
+ components: never[];
5136
5171
  /**
5137
5172
  * Custom raycast implementation for model objects only.
5138
5173
  * This selectively enables recursive raycasting just for models, which have complex hierarchies,
@@ -5188,7 +5223,7 @@ declare class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends
5188
5223
  parentId?: string | number;
5189
5224
  get object3d(): M["mesh"];
5190
5225
  get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
5191
- get type(): T;
5226
+ type: T;
5192
5227
  entities2D: Map<string | number, Geometry2D>;
5193
5228
  constructor(meshComponent: M, styleComponent: S);
5194
5229
  /** Attaching a 2D entity to the 3D entity so it will follow the style changes */
@@ -5305,13 +5340,7 @@ interface PathUniforms {
5305
5340
  value: number;
5306
5341
  };
5307
5342
  }
5308
- /**
5309
- * Generic PubSub class implementing the Publish-Subscribe pattern for event handling.
5310
- *
5311
- * @template EVENT_PAYLOAD - The type of the event payload.
5312
- * @template EVENT - The type of the event.
5313
- */
5314
- export declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
5343
+ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
5315
5344
  /**
5316
5345
  * @private
5317
5346
  * @internal
@@ -5394,6 +5423,19 @@ declare class Renderer {
5394
5423
  */
5395
5424
  destroy(): void;
5396
5425
  enabledLayers: Set<number>;
5426
+ private matricesUpdatedThisFrame;
5427
+ /**
5428
+ * Indicate that a new frame is starting, so we can reset the matrices updated flag
5429
+ */
5430
+ startFrame(): void;
5431
+ /**
5432
+ * Per frame, we can call this function many times, but it should only fire once
5433
+ */
5434
+ private updateMatricesIfNeeded;
5435
+ /**
5436
+ * Render a custom scene
5437
+ */
5438
+ renderScene(scene: Scene, sceneCamera: Camera): void;
5397
5439
  /**
5398
5440
  * Re-render the scene, depending on which parts of the scene have been
5399
5441
  * invalidated.
@@ -5403,7 +5445,7 @@ declare class Renderer {
5403
5445
  * @param scene {Scene}
5404
5446
  * @param sceneCamera {Camera}
5405
5447
  */
5406
- render(scene: Scene, sceneCamera: Camera): void;
5448
+ renderFullScene(scene: Scene, sceneCamera: Camera): void;
5407
5449
  clear(): void;
5408
5450
  /**
5409
5451
  * Set the size of the renderer, composer, and all its internal buffers.
@@ -5597,6 +5639,70 @@ export declare class MappedinError extends Error {
5597
5639
  export declare class MappedinRenderError extends MappedinError {
5598
5640
  constructor(message: string, label?: string);
5599
5641
  }
5642
+ /**
5643
+ * Generic PubSub class implementing the Publish-Subscribe pattern for event handling.
5644
+ *
5645
+ * @template EVENT_PAYLOAD - The type of the event payload.
5646
+ * @template EVENT - The type of the event.
5647
+ */
5648
+ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
5649
+ /**
5650
+ * @private
5651
+ * @internal
5652
+ */
5653
+ private _subscribers;
5654
+ /**
5655
+ * @private
5656
+ * @internal
5657
+ */
5658
+ private _destroyed;
5659
+ /**
5660
+ * @private
5661
+ * @internal
5662
+ */
5663
+ publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
5664
+ /**
5665
+ * Subscribe a function to an event.
5666
+ *
5667
+ * @param eventName An event name which, when fired, will call the provided
5668
+ * function.
5669
+ * @param fn A callback that gets called when the corresponding event is fired. The
5670
+ * callback will get passed an argument with a type that's one of event payloads.
5671
+ * @example
5672
+ * // Subscribe to the 'click' event
5673
+ * const handler = (event) => {
5674
+ * const { coordinate } = event;
5675
+ * const { latitude, longitude } = coordinate;
5676
+ * console.log(`Map was clicked at ${latitude}, ${longitude}`);
5677
+ * };
5678
+ * map.on('click', handler);
5679
+ */
5680
+ on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
5681
+ data: null;
5682
+ } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
5683
+ /**
5684
+ * Unsubscribe a function previously subscribed with {@link on}
5685
+ *
5686
+ * @param eventName An event name to which the provided function was previously
5687
+ * subscribed.
5688
+ * @param fn A function that was previously passed to {@link on}. The function must
5689
+ * have the same reference as the function that was subscribed.
5690
+ * @example
5691
+ * // Unsubscribe from the 'click' event
5692
+ * const handler = (event) => {
5693
+ * console.log('Map was clicked', event);
5694
+ * };
5695
+ * map.off('click', handler);
5696
+ */
5697
+ off<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
5698
+ data: null;
5699
+ } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
5700
+ /**
5701
+ * @private
5702
+ * @internal
5703
+ */
5704
+ destroy(): void;
5705
+ }
5600
5706
  declare const EASING_CURVES: readonly [
5601
5707
  "ease-in",
5602
5708
  "ease-out",
@@ -15062,11 +15168,6 @@ type ReadonlyObjectDeep<ObjectType extends object> = {
15062
15168
  readonly [KeyType in keyof ObjectType]: ReadonlyDeep<ObjectType[KeyType]>;
15063
15169
  };
15064
15170
  type ValueOf<ObjectType, ValueType extends keyof ObjectType = keyof ObjectType> = ObjectType[ValueType];
15065
- type PartialExcept<T, K extends string> = {
15066
- [P in keyof T as P extends K ? P : never]: T[P];
15067
- } & {
15068
- [P in keyof T as P extends K ? never : P]?: T[P] extends Primitive$1 ? T[P] : T[P] extends (infer U)[] ? PartialExcept<U, K>[] : PartialExcept<T[P], K>;
15069
- };
15070
15171
  type ExtractDeep<T, U, Depth extends readonly number[] = [
15071
15172
  ]> = Depth["length"] extends 3 ? any : {
15072
15173
  [K in keyof T as T[K] extends U ? K : T[K] extends object | undefined ? ExtractDeep<NonNullable<T[K]>, U, [
@@ -15158,7 +15259,7 @@ type WatermarkUpdateOptions = Omit<WatermarkOptions, "onClick" | "visible"> & {
15158
15259
  /** Set the interactivity of the watermark. */
15159
15260
  interactive?: boolean;
15160
15261
  };
15161
- declare class WatermarkSystem extends PubSub<{
15262
+ declare class WatermarkSystem extends PubSub$1<{
15162
15263
  "texture-loaded": void;
15163
15264
  }> {
15164
15265
  #private;
@@ -15333,8 +15434,8 @@ declare class InteractionSystem extends PubSub<InteractionEvents> {
15333
15434
  private lastPointerEvent?;
15334
15435
  private cursor;
15335
15436
  private touchesCount;
15336
- private isUserInteracting;
15337
- constructor(container: HTMLCanvasElement, coreState: RendererState, camera: PerspectiveCamera, worldPlane: Mesh, isUserInteracting: () => boolean);
15437
+ private isUserMovingCamera;
15438
+ constructor(container: HTMLCanvasElement, coreState: RendererState, camera: PerspectiveCamera, worldPlane: Mesh, isUserMovingCamera: () => boolean);
15338
15439
  updateQuadtree(takeIT: QuadTree<{
15339
15440
  entityId: Geometry2D["id"];
15340
15441
  }>): void;
@@ -15476,122 +15577,6 @@ declare const LABEL_TEXT_PLACEMENT: {
15476
15577
  declare const LABEL_LOW_PRIORITY = "low-priority";
15477
15578
  export type LabelTextPlacement = ValueOf<typeof LABEL_TEXT_PLACEMENT>;
15478
15579
  type LabelTextPlacementInternal = LabelTextPlacement | typeof LABEL_LOW_PRIORITY;
15479
- declare const labelAppearanceSchema: z.ZodPipe<z.ZodObject<{
15480
- margin: z.ZodDefault<z.ZodNumber>;
15481
- maxLines: z.ZodDefault<z.ZodNumber>;
15482
- textSize: z.ZodDefault<z.ZodNumber>;
15483
- maxWidth: z.ZodDefault<z.ZodNumber>;
15484
- lineHeight: z.ZodDefault<z.ZodNumber>;
15485
- color: z.ZodDefault<z.ZodString>;
15486
- outlineColor: z.ZodDefault<z.ZodString>;
15487
- textColor: z.ZodOptional<z.ZodString>;
15488
- textOutlineColor: z.ZodOptional<z.ZodString>;
15489
- pinColor: z.ZodOptional<z.ZodString>;
15490
- pinOutlineColor: z.ZodOptional<z.ZodString>;
15491
- pinColorInactive: z.ZodOptional<z.ZodString>;
15492
- pinOutlineColorInactive: z.ZodOptional<z.ZodString>;
15493
- icon: z.ZodOptional<z.ZodString>;
15494
- iconSize: z.ZodDefault<z.ZodNumber>;
15495
- iconScale: z.ZodDefault<z.ZodUnion<readonly [
15496
- z.ZodNumber,
15497
- z.ZodObject<{
15498
- on: z.ZodLiteral<"zoom-level">;
15499
- input: z.ZodTuple<[
15500
- z.ZodNumber
15501
- ], z.ZodNumber>;
15502
- output: z.ZodTuple<[
15503
- z.ZodNumber
15504
- ], z.ZodNumber>;
15505
- easing: z.ZodDefault<z.ZodEnum<{
15506
- "ease-in": "ease-in";
15507
- "ease-out": "ease-out";
15508
- "ease-in-out": "ease-in-out";
15509
- linear: "linear";
15510
- }>>;
15511
- }, z.core.$strip>
15512
- ]>>;
15513
- iconPadding: z.ZodDefault<z.ZodNumber>;
15514
- iconFit: z.ZodDefault<z.ZodEnum<{
15515
- fill: "fill";
15516
- contain: "contain";
15517
- cover: "cover";
15518
- }>>;
15519
- iconOverflow: z.ZodDefault<z.ZodEnum<{
15520
- visible: "visible";
15521
- hidden: "hidden";
15522
- }>>;
15523
- iconVisible: z.ZodDefault<z.ZodUnion<readonly [
15524
- z.ZodBoolean,
15525
- z.ZodNumber
15526
- ]>>;
15527
- opacity: z.ZodDefault<z.ZodNumber>;
15528
- }, z.core.$strip>, z.ZodTransform<{
15529
- textColor: string;
15530
- textOutlineColor: string;
15531
- pinColor: string;
15532
- pinOutlineColor: string;
15533
- pinColorInactive: string;
15534
- pinOutlineColorInactive: string;
15535
- margin: number;
15536
- maxLines: number;
15537
- textSize: number;
15538
- maxWidth: number;
15539
- lineHeight: number;
15540
- color: string;
15541
- outlineColor: string;
15542
- iconSize: number;
15543
- iconScale: number | {
15544
- on: "zoom-level";
15545
- input: [
15546
- number,
15547
- ...number[]
15548
- ];
15549
- output: [
15550
- number,
15551
- ...number[]
15552
- ];
15553
- easing: "ease-in" | "ease-out" | "ease-in-out" | "linear";
15554
- };
15555
- iconPadding: number;
15556
- iconFit: "fill" | "contain" | "cover";
15557
- iconOverflow: "visible" | "hidden";
15558
- iconVisible: number | boolean;
15559
- opacity: number;
15560
- icon?: string | undefined;
15561
- }, {
15562
- margin: number;
15563
- maxLines: number;
15564
- textSize: number;
15565
- maxWidth: number;
15566
- lineHeight: number;
15567
- color: string;
15568
- outlineColor: string;
15569
- iconSize: number;
15570
- iconScale: number | {
15571
- on: "zoom-level";
15572
- input: [
15573
- number,
15574
- ...number[]
15575
- ];
15576
- output: [
15577
- number,
15578
- ...number[]
15579
- ];
15580
- easing: "ease-in" | "ease-out" | "ease-in-out" | "linear";
15581
- };
15582
- iconPadding: number;
15583
- iconFit: "fill" | "contain" | "cover";
15584
- iconOverflow: "visible" | "hidden";
15585
- iconVisible: number | boolean;
15586
- opacity: number;
15587
- textColor?: string | undefined;
15588
- textOutlineColor?: string | undefined;
15589
- pinColor?: string | undefined;
15590
- pinOutlineColor?: string | undefined;
15591
- pinColorInactive?: string | undefined;
15592
- pinOutlineColorInactive?: string | undefined;
15593
- icon?: string | undefined;
15594
- }>>;
15595
15580
  declare const labelAppearanceSchemaStrict: z.ZodObject<{
15596
15581
  margin: z.ZodDefault<z.ZodNumber>;
15597
15582
  maxLines: z.ZodDefault<z.ZodNumber>;
@@ -15706,24 +15691,107 @@ declare const labelAppearanceSchemaStrict: z.ZodObject<{
15706
15691
  */
15707
15692
  export type LabelAppearance = OptionalRemap<OptionalRemap<z.input<typeof labelAppearanceSchemaStrict>, "iconScale", number | Interpolation<"zoom-level", number[]>>, "color" | "outlineColor" | "pinColor" | "pinOutlineColor" | "pinColorInactive" | "pinOutlineColorInactive", ColorString>;
15708
15693
  type LabelAppearanceWithDefaults = z.infer<typeof labelAppearanceSchema>;
15709
- declare const addLabelOptionsSchema: z.ZodObject<{
15710
- rank: z.ZodOptional<z.ZodUnion<readonly [
15711
- z.ZodEnum<{
15712
- low: "low";
15713
- medium: "medium";
15714
- high: "high";
15715
- "always-visible": "always-visible";
15716
- }>,
15717
- z.ZodNumber
15718
- ]>>;
15719
- appearance: z.ZodOptional<z.ZodPipe<z.ZodObject<{
15720
- margin: z.ZodDefault<z.ZodNumber>;
15721
- maxLines: z.ZodDefault<z.ZodNumber>;
15722
- textSize: z.ZodDefault<z.ZodNumber>;
15723
- maxWidth: z.ZodDefault<z.ZodNumber>;
15724
- lineHeight: z.ZodDefault<z.ZodNumber>;
15725
- color: z.ZodDefault<z.ZodString>;
15726
- outlineColor: z.ZodDefault<z.ZodString>;
15694
+ declare const labelAppearanceSchema: z.ZodPipe<z.ZodObject<{
15695
+ margin: z.ZodDefault<z.ZodNumber>;
15696
+ maxLines: z.ZodDefault<z.ZodNumber>;
15697
+ textSize: z.ZodDefault<z.ZodNumber>;
15698
+ maxWidth: z.ZodDefault<z.ZodNumber>;
15699
+ lineHeight: z.ZodDefault<z.ZodNumber>;
15700
+ color: z.ZodDefault<z.ZodString>;
15701
+ outlineColor: z.ZodDefault<z.ZodString>;
15702
+ textColor: z.ZodOptional<z.ZodString>;
15703
+ textOutlineColor: z.ZodOptional<z.ZodString>;
15704
+ pinColor: z.ZodOptional<z.ZodString>;
15705
+ pinOutlineColor: z.ZodOptional<z.ZodString>;
15706
+ pinColorInactive: z.ZodOptional<z.ZodString>;
15707
+ pinOutlineColorInactive: z.ZodOptional<z.ZodString>;
15708
+ icon: z.ZodOptional<z.ZodString>;
15709
+ iconSize: z.ZodDefault<z.ZodNumber>;
15710
+ iconScale: z.ZodDefault<z.ZodUnion<readonly [
15711
+ z.ZodNumber,
15712
+ z.ZodObject<{
15713
+ on: z.ZodLiteral<"zoom-level">;
15714
+ input: z.ZodTuple<[
15715
+ z.ZodNumber
15716
+ ], z.ZodNumber>;
15717
+ output: z.ZodTuple<[
15718
+ z.ZodNumber
15719
+ ], z.ZodNumber>;
15720
+ easing: z.ZodDefault<z.ZodEnum<{
15721
+ "ease-in": "ease-in";
15722
+ "ease-out": "ease-out";
15723
+ "ease-in-out": "ease-in-out";
15724
+ linear: "linear";
15725
+ }>>;
15726
+ }, z.core.$strip>
15727
+ ]>>;
15728
+ iconPadding: z.ZodDefault<z.ZodNumber>;
15729
+ iconFit: z.ZodDefault<z.ZodEnum<{
15730
+ fill: "fill";
15731
+ contain: "contain";
15732
+ cover: "cover";
15733
+ }>>;
15734
+ iconOverflow: z.ZodDefault<z.ZodEnum<{
15735
+ visible: "visible";
15736
+ hidden: "hidden";
15737
+ }>>;
15738
+ iconVisible: z.ZodDefault<z.ZodUnion<readonly [
15739
+ z.ZodBoolean,
15740
+ z.ZodNumber
15741
+ ]>>;
15742
+ opacity: z.ZodDefault<z.ZodNumber>;
15743
+ }, z.core.$strip>, z.ZodTransform<Required<LabelAppearance>, {
15744
+ margin: number;
15745
+ maxLines: number;
15746
+ textSize: number;
15747
+ maxWidth: number;
15748
+ lineHeight: number;
15749
+ color: string;
15750
+ outlineColor: string;
15751
+ iconSize: number;
15752
+ iconScale: number | {
15753
+ on: "zoom-level";
15754
+ input: [
15755
+ number,
15756
+ ...number[]
15757
+ ];
15758
+ output: [
15759
+ number,
15760
+ ...number[]
15761
+ ];
15762
+ easing: "ease-in" | "ease-out" | "ease-in-out" | "linear";
15763
+ };
15764
+ iconPadding: number;
15765
+ iconFit: "fill" | "contain" | "cover";
15766
+ iconOverflow: "visible" | "hidden";
15767
+ iconVisible: number | boolean;
15768
+ opacity: number;
15769
+ textColor?: string | undefined;
15770
+ textOutlineColor?: string | undefined;
15771
+ pinColor?: string | undefined;
15772
+ pinOutlineColor?: string | undefined;
15773
+ pinColorInactive?: string | undefined;
15774
+ pinOutlineColorInactive?: string | undefined;
15775
+ icon?: string | undefined;
15776
+ }>>;
15777
+ declare const addLabelOptionsSchema: z.ZodObject<{
15778
+ rank: z.ZodOptional<z.ZodUnion<readonly [
15779
+ z.ZodEnum<{
15780
+ low: "low";
15781
+ medium: "medium";
15782
+ high: "high";
15783
+ "always-visible": "always-visible";
15784
+ }>,
15785
+ z.ZodNumber
15786
+ ]>>;
15787
+ appearance: z.ZodOptional<z.ZodPipe<z.ZodObject<{
15788
+ margin: z.ZodDefault<z.ZodNumber>;
15789
+ maxLines: z.ZodDefault<z.ZodNumber>;
15790
+ textSize: z.ZodDefault<z.ZodNumber>;
15791
+ maxWidth: z.ZodDefault<z.ZodNumber>;
15792
+ lineHeight: z.ZodDefault<z.ZodNumber>;
15793
+ color: z.ZodDefault<z.ZodString>;
15794
+ outlineColor: z.ZodDefault<z.ZodString>;
15727
15795
  textColor: z.ZodOptional<z.ZodString>;
15728
15796
  textOutlineColor: z.ZodOptional<z.ZodString>;
15729
15797
  pinColor: z.ZodOptional<z.ZodString>;
@@ -15765,40 +15833,7 @@ declare const addLabelOptionsSchema: z.ZodObject<{
15765
15833
  z.ZodNumber
15766
15834
  ]>>;
15767
15835
  opacity: z.ZodDefault<z.ZodNumber>;
15768
- }, z.core.$strip>, z.ZodTransform<{
15769
- textColor: string;
15770
- textOutlineColor: string;
15771
- pinColor: string;
15772
- pinOutlineColor: string;
15773
- pinColorInactive: string;
15774
- pinOutlineColorInactive: string;
15775
- margin: number;
15776
- maxLines: number;
15777
- textSize: number;
15778
- maxWidth: number;
15779
- lineHeight: number;
15780
- color: string;
15781
- outlineColor: string;
15782
- iconSize: number;
15783
- iconScale: number | {
15784
- on: "zoom-level";
15785
- input: [
15786
- number,
15787
- ...number[]
15788
- ];
15789
- output: [
15790
- number,
15791
- ...number[]
15792
- ];
15793
- easing: "ease-in" | "ease-out" | "ease-in-out" | "linear";
15794
- };
15795
- iconPadding: number;
15796
- iconFit: "fill" | "contain" | "cover";
15797
- iconOverflow: "visible" | "hidden";
15798
- iconVisible: number | boolean;
15799
- opacity: number;
15800
- icon?: string | undefined;
15801
- }, {
15836
+ }, z.core.$strip>, z.ZodTransform<Required<LabelAppearance>, {
15802
15837
  margin: number;
15803
15838
  maxLines: number;
15804
15839
  textSize: number;
@@ -15849,6 +15884,7 @@ declare const addLabelOptionsSchema: z.ZodObject<{
15849
15884
  hidden: "hidden";
15850
15885
  }>>
15851
15886
  ]>>;
15887
+ occlude: z.ZodDefault<z.ZodBoolean>;
15852
15888
  }, z.core.$strip>;
15853
15889
  type AddLabelOptionsInternal = z.input<typeof addLabelOptionsSchema> & {
15854
15890
  appearance?: LabelAppearance;
@@ -15878,7 +15914,7 @@ type AddLabelOptionsInternal = z.input<typeof addLabelOptionsSchema> & {
15878
15914
  */
15879
15915
  textPlacement?: LabelTextPlacement | LabelTextPlacement[];
15880
15916
  };
15881
- declare class MeshCreationAndOptimizationSystem extends PubSub<{
15917
+ declare class MeshCreationAndOptimizationSystem extends PubSub$1<{
15882
15918
  "model-loaded": void;
15883
15919
  "geometry-2d-added": void;
15884
15920
  "geometry-group-added": void;
@@ -15924,7 +15960,7 @@ declare enum TEXTALIGN {
15924
15960
  CENTER = "center",
15925
15961
  RIGHT = "right"
15926
15962
  }
15927
- declare class TwoDDrawSystem extends PubSub<{
15963
+ declare class TwoDDrawSystem extends PubSub$1<{
15928
15964
  "img:loaded": undefined;
15929
15965
  }> {
15930
15966
  dirty: boolean;
@@ -16000,7 +16036,7 @@ declare class TwoDVisibilitySystem extends PubSub<{
16000
16036
  playAnimations: () => void;
16001
16037
  _playAnimations(): void;
16002
16038
  }
16003
- declare class RenderSystem extends PubSub<{
16039
+ declare class RenderSystem extends PubSub$1<{
16004
16040
  "measure-canvas": undefined;
16005
16041
  "pre-render": undefined;
16006
16042
  "post-render": undefined;
@@ -16691,7 +16727,7 @@ declare class DOMDrawSystem {
16691
16727
  constructor(state: RendererState);
16692
16728
  update(isUserInteracting: boolean): void;
16693
16729
  }
16694
- declare class DOMResizeSystem extends PubSub<{
16730
+ declare class DOMResizeSystem extends PubSub$1<{
16695
16731
  "dimensions-update": void;
16696
16732
  }> {
16697
16733
  state: RendererState;
@@ -16891,7 +16927,7 @@ declare class Camera$2 {
16891
16927
  */
16892
16928
  focusOn(target: (Position | Position$1 | string)[], options?: FocusOnOptions): Promise<void>;
16893
16929
  }
16894
- declare class PanBoundsSystem extends PubSub<{
16930
+ declare class PanBoundsSystem extends PubSub$1<{
16895
16931
  update: void;
16896
16932
  }> {
16897
16933
  private currentTotalBoundingBox?;
@@ -16982,7 +17018,7 @@ declare class IdleQueue {
16982
17018
  */
16983
17019
  clearAll(): void;
16984
17020
  }
16985
- declare class OutlineInterpolationSystem extends PubSub<{
17021
+ declare class OutlineInterpolationSystem extends PubSub$1<{
16986
17022
  "needs-render": void;
16987
17023
  }> {
16988
17024
  #private;
@@ -17017,7 +17053,7 @@ declare class OutlineInterpolationSystem extends PubSub<{
17017
17053
  update(zoomLevel: number, isCameraZoomDirty?: boolean): void;
17018
17054
  destroy(): void;
17019
17055
  }
17020
- declare class ImageSystem extends PubSub<{
17056
+ declare class ImageSystem extends PubSub$1<{
17021
17057
  "image-loaded": void;
17022
17058
  }> {
17023
17059
  private rendererState;
@@ -17045,7 +17081,7 @@ declare class ImageSystem extends PubSub<{
17045
17081
  update(cameraRotationRadians: number): void;
17046
17082
  updateImageScreenBBoxes(meshComponent: MeshComponent | ImageComponent): void;
17047
17083
  }
17048
- declare class GeometryInFocusSystem extends PubSub<{
17084
+ declare class GeometryInFocusSystem extends PubSub$1<{
17049
17085
  /**
17050
17086
  * Returns the list of entities that are likely in focus, sorted by the weight of the raycast.
17051
17087
  */
@@ -17080,7 +17116,7 @@ declare class GeometryInFocusSystem extends PubSub<{
17080
17116
  declare class OutdoorLayers {
17081
17117
  #private;
17082
17118
  idleQueue: IdleQueue;
17083
- hideLayersIntersectingPolygons(bbox: BBox, polygons: Feature$1<Polygon$1 | MultiPolygon$1, any>[], layers: string[]): void;
17119
+ hideLayersIntersectingPolygons(polygons: Feature$1<Polygon$1 | MultiPolygon$1, any>[], layers: string[]): void;
17084
17120
  constructor(map?: Map);
17085
17121
  destroy(): void;
17086
17122
  }
@@ -17149,7 +17185,7 @@ declare class GeometryDisposalSystem {
17149
17185
  constructor(state: RendererState);
17150
17186
  update(): void;
17151
17187
  }
17152
- declare class TextureSystem extends PubSub<{
17188
+ declare class TextureSystem extends PubSub$1<{
17153
17189
  "texture-added": void;
17154
17190
  }> {
17155
17191
  dirty: boolean;
@@ -17469,11 +17505,10 @@ declare class Core extends PubSub<MapEvent> {
17469
17505
  getMetersPerPixel: () => number;
17470
17506
  /**
17471
17507
  * 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.
17472
- * @param bbox The bounding box to filter layers under.
17473
17508
  * @param polygons The polygons to filter layers under.
17474
17509
  * @param layers The layers to filter out.
17475
17510
  */
17476
- hideOutdoorLayersIntersectingPolygons: (bbox: BBox, polygons: Feature$1<Polygon$1 | MultiPolygon$1, any>[], layers: string[]) => void;
17511
+ hideOutdoorLayersIntersectingPolygons: (polygons: Feature$1<Polygon$1 | MultiPolygon$1, any>[], layers: string[]) => void;
17477
17512
  /**
17478
17513
  * Get the center of a geometry or bounding box.
17479
17514
  * @param geometryOrBoundingBox Geometry, geometry id, or bounding box to get the center of.
@@ -17781,25 +17816,39 @@ declare class LabelComponent {
17781
17816
  toPackedMessage(isPanning?: boolean): PackedJsonMessage;
17782
17817
  destroy(): void;
17783
17818
  }
17819
+ type Occlusion2D = {
17820
+ enabled: boolean;
17821
+ id: number;
17822
+ };
17823
+ declare class Occlusion2DComponent implements Occlusion2D {
17824
+ readonly type: "occlusion2d";
17825
+ enabled: boolean;
17826
+ /**
17827
+ * Id of the occluder
17828
+ */
17829
+ id: number;
17830
+ constructor(id: number);
17831
+ }
17784
17832
  declare class Geometry2DObject3D extends Object3D {
17785
17833
  }
17786
17834
  type ComponentTypeMap$1 = {
17787
17835
  interaction: InteractionComponent;
17788
17836
  marker: MarkerComponent;
17789
17837
  label: LabelComponent;
17838
+ occlusion2d: Occlusion2DComponent;
17790
17839
  };
17791
17840
  declare class Geometry2D {
17792
17841
  id: string | number;
17793
- get type(): "label" | "marker";
17842
+ type: "label" | "marker";
17794
17843
  get parentObject3D(): GroupContainerObject3D | GeometryGroupObject3D | null;
17795
17844
  /** The geometry3D that this 2D entity is attached to */
17796
17845
  get attachedTo(): string | number | undefined;
17797
17846
  verticalOffset: number;
17798
- occluderId?: number;
17799
17847
  object3d: Geometry2DObject3D;
17800
17848
  components: [
17801
17849
  MarkerComponent | LabelComponent,
17802
- InteractionComponent?
17850
+ InteractionComponent?,
17851
+ Occlusion2DComponent?
17803
17852
  ];
17804
17853
  getComponent<T extends keyof ComponentTypeMap$1>(type: T): ComponentTypeMap$1[T] | undefined;
17805
17854
  disposed: boolean;
@@ -18029,15 +18078,7 @@ type ClickPayload = {
18029
18078
  /**
18030
18079
  * Details about the pointer event which triggered the interaction.
18031
18080
  */
18032
- pointerEvent: {
18033
- /**
18034
- * The button which was clicked. 0 is the left mouse button and 2 is the right mouse button.
18035
- * On touch devices a tap will have a button of 0.
18036
- *
18037
- * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
18038
- */
18039
- button: number;
18040
- };
18081
+ pointerEvent: Pick<PointerEvent, "button">;
18041
18082
  /**
18042
18083
  * An array of group container IDs which the user interaction passed through. Will be empty if no group containers were interacted with.
18043
18084
  */
@@ -18133,12 +18174,22 @@ type RendererState = {
18133
18174
  readonly geometry2DMap: Map<string | number, Geometry2D>;
18134
18175
  /**
18135
18176
  * A set of all 2D geometry IDs in the scene. This is updated when objects' visiblity changes.
18177
+ * @deprecated Use geometry2DsInScene instead.
18136
18178
  */
18137
18179
  readonly geometry2DIdsInScene: Set<Geometry2D["id"]>;
18138
18180
  /**
18139
18181
  * A set of all 3D geometry IDs in the scene. This is updated when objects' visiblity changes.
18182
+ * @deprecated Use geometry3DsInScene instead.
18140
18183
  */
18141
18184
  readonly geometry3DIdsInScene: Set<All3DTypes["id"]>;
18185
+ /**
18186
+ * A set of all 3D geometries in the scene. This is updated when objects' visiblity changes.
18187
+ */
18188
+ readonly geometry3DsInScene: Set<All3DTypes>;
18189
+ /**
18190
+ * A set of all 2D geometries in the scene. This is updated when objects' visiblity changes.
18191
+ */
18192
+ readonly geometry2DsInScene: Set<Geometry2D>;
18142
18193
  /**
18143
18194
  * IDs of geometry groups that need to be loaded, including preloaded geometry groups that are not in the scene yet
18144
18195
  */
@@ -18305,6 +18356,11 @@ type AddMarkerOptions = {
18305
18356
  * Dynamic resize of the marker. If set to true, the marker will resize based on the content.
18306
18357
  */
18307
18358
  dynamicResize?: boolean;
18359
+ /**
18360
+ * Whether the marker can be occluded by 3D geometry
18361
+ * @default true
18362
+ */
18363
+ occlude?: boolean;
18308
18364
  /**
18309
18365
  * @internal
18310
18366
  */
@@ -18395,320 +18451,48 @@ declare class MarkerComponent {
18395
18451
  get lowPriorityPinStrategyIndex(): number;
18396
18452
  destroy(): void;
18397
18453
  }
18398
- type NodeNeighbor = {
18399
- id: string;
18400
- weight: number;
18401
- };
18402
- type NodeProperties = {
18454
+ export declare function enableTestMode(): void;
18455
+ /**
18456
+ * Class representing a label on the {@link MapView}.
18457
+ *
18458
+ * Labels contain text and an image that are anchored to a specific point on the map. They automatically rotate and show and hide based on priority and zoom level.
18459
+ * Use them to inform users about location names, points of interest and more!
18460
+ *
18461
+ * Effective use of labels allows an app to convey additional information to the user.
18462
+ * For example labels can be used to show room names, important points of interest, main entrances or any other piece of contextual information that is useful to the user.
18463
+ *
18464
+ * Refer to the [Labels Guide](https://developer.mappedin.com/web-sdk/labels) for more information and interactive examples.
18465
+ */
18466
+ export declare class Label implements IFocusable {
18403
18467
  /**
18404
- * Unique identifier for the node.
18468
+ * The label's id
18405
18469
  */
18406
- id: string;
18470
+ readonly id: string;
18407
18471
  /**
18408
- * An array of neighboring nodes with associated weights.
18472
+ * The label's text
18409
18473
  */
18410
- neighbors: NodeNeighbor[];
18474
+ readonly text: string;
18411
18475
  /**
18412
- * Additional property specific to the navigator based on the 'groupBy' option.
18413
- * */
18414
- [name: string]: any;
18415
- };
18416
- type NodeCollection$1 = FeatureCollection$1<Point$1, NodeProperties>;
18417
- type NodeFeature = Feature$1<Point$1, NodeProperties>;
18418
- declare class Edge {
18419
- /** The originating node of the edge */
18420
- origin: NodeFeature;
18421
- /** The destination node of the edge */
18422
- destination: NodeFeature;
18423
- /** The distance between the origin and the destination nodes */
18424
- distance: number;
18425
- /** The angle of the edge with respect to some reference, in degrees */
18426
- angle: number;
18427
- /** A composite weight of the edge, combining distance and a custom path weight */
18428
- weight: number;
18476
+ * The target object where the label is anchored.
18477
+ */
18478
+ readonly target: IAnchorable;
18429
18479
  /**
18430
- * Constructs a new Edge instance.
18431
- * @param {NodeFeature} origin - The originating node of the edge.
18432
- * @param {NodeFeature} destination - The destination node of the edge.
18433
- * @param {number} [distance=0] - The physical distance between the origin and destination.
18434
- * @param {number} [angle=0] - The angle of the edge in degrees.
18435
- * @param {number} [pathWeight=0] - An additional weight factor for the path.
18480
+ * @internal
18436
18481
  */
18437
- constructor({ origin, destination, distance, angle, pathWeight, multiplicativeDistanceWeightScaling, }: {
18438
- origin: NodeFeature;
18439
- destination: NodeFeature;
18440
- distance?: number;
18441
- angle?: number;
18442
- pathWeight?: number;
18443
- multiplicativeDistanceWeightScaling?: boolean;
18444
- });
18445
- }
18446
- declare class NavigationGraph {
18447
- #private;
18448
- readonly edges: {
18449
- [propName: string]: Edge[];
18450
- };
18451
- readonly nodesById: {
18452
- [propName: string]: NodeFeature;
18453
- };
18454
- readonly nodesByGroup: Map<string, NodeFeature[]>;
18455
- constructor({ nodes, groupBy, multiplicativeDistanceWeightScaling, }: {
18456
- nodes: NodeCollection$1;
18457
- groupBy: string;
18458
- multiplicativeDistanceWeightScaling?: boolean;
18459
- });
18482
+ static readonly __type = "label";
18460
18483
  /**
18461
- * Calculates the shortest Euclidean distance from the origin node to any of the destination nodes.
18462
- *
18463
- * @param origin - The origin node.
18464
- * @param destinations - An array of destination nodes.
18465
- * @returns The shortest Euclidean distance.
18484
+ * @internal
18466
18485
  */
18467
- getShortestEuclideanDistance(origin: NodeFeature, destinations: NodeFeature[]): number;
18468
- hasLineOfSight: (origin: Position, destination: Position, edges?: Position[][], bufferRadius?: number) => boolean;
18486
+ readonly __type = "label";
18469
18487
  /**
18470
- * Performs a Dijkstra search to find nodes within a given travel distance that satisfy a goal function, sorted by distance.
18488
+ * Checks if the provided instance is of type Label.
18471
18489
  *
18472
- * @param originId - Origin node ID.
18473
- * @param maxTravelDistance - The maximum travel distance.
18474
- * @param includedNodeIds - Array of node IDs to include in the search.
18475
- * @param obstructionEdges - Array of obstruction edges for line of sight calculations.
18476
- * @param useLineOfSight - Whether to use line of sight checking.
18477
- * @returns An Array of nodes within the travel distance that satisfy the goal function.
18478
- * - feature: The node feature.
18479
- * - distance: The distance to the node.
18480
- * - edges: The edges to the node.
18490
+ * @param instance The instance to check.
18491
+ * @returns {boolean} True if the instance is a Label, false otherwise.
18481
18492
  */
18482
- dijkstraFindWithinTravelDistance(originId: string, maxTravelDistance: number, includedNodeIds: string[], obstructionEdges: Position[][], useLineOfSight: boolean, limitNumberOfResults: number): {
18483
- feature: NodeFeature;
18484
- distance: number;
18485
- }[];
18486
- /**
18487
- * Performs A* pathfinding from specified origins to destinations, considering optional constraints like accessibility.
18488
- *
18489
- * @param {string[]} originIds - Array of origin node IDs.
18490
- * @param {string[]} destinationNodeIds - Array of destination node IDs.
18491
- * @param {Set<string>} [disabledConnectionNodeIds] - Optional set of connection node IDs that are disabled (ie. act as regular nodes).
18492
- * @param {Set<string>} [disabledNodeIds] - Optional set of node IDs which are ignored during pathfinding.
18493
- * @returns {Edge[]} An array of edges representing the shortest path, or an empty array if no path is found.
18494
- */
18495
- aStar({ originIds, destinationNodeIds, disabledConnectionNodeIds, zones, overrideEdgeWeights, disabledNodeIds, }: {
18496
- originIds: string[];
18497
- destinationNodeIds: string[];
18498
- zones: DirectionsZone[];
18499
- disabledConnectionNodeIds?: Set<string>;
18500
- overrideEdgeWeights?: Map<Edge, number>;
18501
- disabledNodeIds?: Set<string>;
18502
- }): Edge[];
18503
- }
18504
- type DirectionProperties = {
18505
- /**
18506
- * Unique identifier for the direction.
18507
- */
18508
- id: string;
18509
- /**
18510
- * An angle between this point and the destination, in radians.
18511
- */
18512
- angle?: number;
18513
- /**
18514
- * Distance to the next point, in meters.
18515
- */
18516
- distance?: number;
18517
- /**
18518
- * Group id which the direction belongs to (e.g. floor, building, etc).
18519
- * It's based on the groupBy property of the navigator.
18520
- */
18521
- groupBy?: string;
18522
- destination?: string;
18523
- edges: Edge[];
18524
- };
18525
- type DirectionFeature = Feature$1<Point$1, DirectionProperties>;
18526
- type DirectionsCollection = FeatureCollection$1<Point$1, DirectionProperties>;
18527
- type SimplifyDirectionsOptions = {
18528
- /**
18529
- * Enable or disable simplifying.
18530
- */
18531
- enabled: boolean;
18532
- /**
18533
- * The radius of the buffer around the path to consider when simplifying, in meters.
18534
- * @default 0.7
18535
- */
18536
- bufferRadius?: number;
18537
- };
18538
- type DirectionsZone = {
18539
- geometry: Feature$1<MultiPolygon$1 | Polygon$1>;
18540
- /**
18541
- * The additional cost for navigation through the zone.
18542
- */
18543
- cost: number;
18544
- /**
18545
- *
18546
- * Additional property specific to the navigator based on the 'groupBy' option.
18547
- */
18548
- [index: string]: any;
18549
- };
18550
- declare class Navigator$1 {
18551
- private groupBy;
18552
- graph: NavigationGraph;
18553
- private geometryEdgesByMapId;
18554
- private flagDeclarations;
18555
- private disabledNodeIds;
18556
- /**
18557
- * Constructs a Navigator instance to manage pathfinding with optional obstructions and grouping features.
18558
- *
18559
- * @param {NodeCollection} nodes - Collection of nodes for the navigation graph.
18560
- * @param {ObstructionCollection} [obstructions] - Optional collection of obstructions that could block paths.
18561
- * @param {SpaceCollection} [spaces] - Optional collection of spaces that could block paths.
18562
- * @param {string} [groupBy] - Optional property name to group nodes and paths for differentiated processing.
18563
- */
18564
- constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, }: {
18565
- nodes: NodeCollection$1;
18566
- geojsonCollection?: ObstructionCollection | SpaceCollection;
18567
- groupBy?: string;
18568
- multiplicativeDistanceWeightScaling?: boolean;
18569
- flagDeclarations?: NavigationFlagDeclarations;
18570
- });
18571
- private getDisabledNodeIds;
18572
- /**
18573
- * Calculates and returns a set of directions from origin nodes to destination nodes, including detailed properties.
18574
- *
18575
- * @param {DirectionsZone[]} zones - special zones for navigation operations.
18576
- * @param {string[]} originIds - IDs of origin nodes.
18577
- * @param {string[]} destinationNodeIds - IDs of destination nodes.
18578
- * @param {string[]} [disabledConnectionNodeIds] - IDs of connection nodes that are disabled (ie. act as regular nodes).
18579
- * @param {SimplifyDirectionsOptions} [simplify] - Options to simplify the pathfinding result.
18580
- * @returns {DirectionsCollection} A collection of directional features representing the path.
18581
- */
18582
- getDirections({ zones: directionsZones, originIds, destinationNodeIds, disabledConnectionNodeIds, simplify, multiplicativeDistanceWeightScaling, overrideEdgeWeights, }: {
18583
- originIds: string[];
18584
- destinationNodeIds: string[];
18585
- zones?: DirectionsZone[];
18586
- disabledConnectionNodeIds?: string[];
18587
- simplify?: SimplifyDirectionsOptions;
18588
- multiplicativeDistanceWeightScaling?: boolean;
18589
- overrideEdgeWeights?: Map<Edge, number>;
18590
- }): DirectionsCollection;
18591
- /**
18592
- * Generates a path from a series of edges, constructing a feature collection of directional steps.
18593
- *
18594
- * @param {Edge[]} steps - An array of edges representing the path.
18595
- * @returns {DirectionsCollection} A collection of directional features.
18596
- */
18597
- private generatePath;
18598
- /**
18599
- * Simplifies a sequence of steps by reducing unnecessary nodes using a buffer radius to check for obstructions.
18600
- *
18601
- * @param {Edge[]} steps - The steps to simplify.
18602
- * @param {number} bufferRadius - The buffer radius to use
18603
- * for simplification.
18604
- * @returns {Edge[]} An array of simplified edges representing a more direct path.
18605
- */
18606
- private simplifyAllSteps;
18607
- /**
18608
- * Finds the nearest nodes on the graph within a given travel distance.
18609
- *
18610
- * @param originId - The ID of the origin node.
18611
- * @param maxDistance - The maximum distance to search.
18612
- * @param floorId - The ID of the floor.
18613
- * @param includedNodeIds - The IDs of the nodes to include.
18614
- * @param useLineOfSight - Whether to use line of sight.
18615
- * @returns An array of nodes within the travel distance that satisfy the goal function.
18616
- */
18617
- findNearestNodesOnGraph: (originId: string, maxDistance: number, floorId: string, includedNodeIds: string[], useLineOfSight?: boolean, limitNumberOfResults?: number) => {
18618
- feature: NodeFeature;
18619
- distance: number;
18620
- }[];
18621
- /**
18622
- * Checks if there is a line of sight between two points on the map.
18623
- *
18624
- * @param origin - The origin point.
18625
- * @param destination - The destination point.
18626
- * @param floorId - The ID of the floor.
18627
- * @param bufferRadius - The buffer radius to use when checking for line of sight.
18628
- * @returns True if there is a line of sight, false otherwise.
18629
- */
18630
- hasLineOfSight: (origin: [
18631
- number,
18632
- number
18633
- ], destination: [
18634
- number,
18635
- number
18636
- ], floorId: string, bufferRadius?: number) => boolean;
18637
- /**
18638
- * Simplifies a section of steps by checking direct lines of sight between steps and eliminating intermediate nodes if unobstructed.
18639
- *
18640
- * @param {Edge[]} steps - The steps to potentially simplify.
18641
- * @param {[number, number][][]} geometryEdges - The geometrical edges of the map used to check for line of sight.
18642
- * @param {number} bufferRadius - The buffer radius to use when simplifying.
18643
- * @returns {Edge[]} An array of simplified edges.
18644
- */
18645
- private simplifySteps;
18646
- /**
18647
- * Calculates the approximate distance between two geographic coordinates on Earth's surface.
18648
- *
18649
- * This function uses the equirectangular approximation method to compute the distance, which simplifies
18650
- * the math and speeds up calculations, but is less accurate over long distances compared to other methods
18651
- * like the haversine formula.
18652
- *
18653
- * @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
18654
- * @param {Position} point2 - The second point's longitude and latitude as [longitude, latitude].
18655
- * @return
18656
- * @return {number} The approximate distance between the two points in meters.
18657
- */
18658
- getDistance: (point1: Position, point2: Position) => number;
18659
- /**
18660
- * Calculates the angle between two geographic coordinates.
18661
- *
18662
- * @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
18663
- * @param {Position} point2 - The second point's longitude and latitude as [longitude, latitude].
18664
- * @hidden
18665
- *
18666
- * @return {number} The angle in radians, calculated clockwise from the north between the two points specified.
18667
- */
18668
- getAngle: (point1: Position, point2: Position) => number;
18669
- }
18670
- export declare function enableTestMode(): void;
18671
- /**
18672
- * Class representing a label on the {@link MapView}.
18673
- *
18674
- * Labels contain text and an image that are anchored to a specific point on the map. They automatically rotate and show and hide based on priority and zoom level.
18675
- * Use them to inform users about location names, points of interest and more!
18676
- *
18677
- * Effective use of labels allows an app to convey additional information to the user.
18678
- * For example labels can be used to show room names, important points of interest, main entrances or any other piece of contextual information that is useful to the user.
18679
- *
18680
- * Refer to the [Labels Guide](https://developer.mappedin.com/web-sdk/labels) for more information and interactive examples.
18681
- */
18682
- export declare class Label implements IFocusable {
18683
- /**
18684
- * The label's id
18685
- */
18686
- readonly id: string;
18687
- /**
18688
- * The label's text
18689
- */
18690
- readonly text: string;
18691
- /**
18692
- * The target object where the label is anchored.
18693
- */
18694
- readonly target: IAnchorable;
18695
- /**
18696
- * @internal
18697
- */
18698
- static readonly __type = "label";
18699
- /**
18700
- * @internal
18701
- */
18702
- readonly __type = "label";
18703
- /**
18704
- * Checks if the provided instance is of type Label.
18705
- *
18706
- * @param instance The instance to check.
18707
- * @returns {boolean} True if the instance is a Label, false otherwise.
18708
- */
18709
- static is(instance: object): instance is Label;
18710
- /** @internal */
18711
- get focusTarget(): Coordinate;
18493
+ static is(instance: object): instance is Label;
18494
+ /** @internal */
18495
+ get focusTarget(): Coordinate;
18712
18496
  /**
18713
18497
  * @internal
18714
18498
  */
@@ -18782,10 +18566,10 @@ export declare class Image3DView {
18782
18566
  */
18783
18567
  readonly __type = "image-3d";
18784
18568
  /**
18785
- * Checks if the provided instance is of type Image"
18569
+ * Checks if the provided instance is of type Image3DView.
18786
18570
  *
18787
18571
  * @param instance The instance to check.
18788
- * @returns {boolean} True if the instance is a Image, false otherwise.
18572
+ * @returns {boolean} True if the instance is an Image3DView, false otherwise.
18789
18573
  */
18790
18574
  static is(instance: object): instance is Image3DView;
18791
18575
  /**
@@ -18951,7 +18735,30 @@ export declare class Path implements IFocusable {
18951
18735
  segments: PathSegment[];
18952
18736
  };
18953
18737
  }
18954
- type TCreateMarker = boolean | ((instruction: TDirectionInstruction) => Marker);
18738
+ /**
18739
+ * Controls marker creation for navigation points.
18740
+ *
18741
+ * - If `true`, a default marker is created.
18742
+ * - If `false`, no marker is created.
18743
+ * - If a function is provided, it will be called with the direction instruction and should return a custom {@link Marker} instance.
18744
+ *
18745
+ * @example
18746
+ * ```ts
18747
+ * // Use default markers
18748
+ * createMarkers: { departure: true, destination: true }
18749
+ *
18750
+ * // Disable markers
18751
+ * createMarkers: { departure: false }
18752
+ *
18753
+ * // Create custom markers
18754
+ * createMarkers: {
18755
+ * departure: (instruction) => {
18756
+ * return mapView.Markers.add(instruction.coordinate, '<div>Custom</div>');
18757
+ * }
18758
+ * }
18759
+ * ```
18760
+ */
18761
+ export type TCreateMarker = boolean | ((instruction: TDirectionInstruction) => Marker);
18955
18762
  /**
18956
18763
  * Options for navigation.
18957
18764
  */
@@ -19221,7 +19028,7 @@ declare class FloorStackObject implements Omit<MVFFloorStack, "maps" | "floors"
19221
19028
  addFloor(floor: FloorObject): void;
19222
19029
  loadAllFloors(): void;
19223
19030
  }
19224
- declare class GeojsonApiMapObject extends PubSub<{
19031
+ declare class GeojsonApiMapObject extends PubSub$1<{
19225
19032
  "floor-change": {
19226
19033
  reason?: TFloorChangeReason;
19227
19034
  floorId: string;
@@ -20145,7 +19952,7 @@ export declare class MapView {
20145
19952
  *
20146
19953
  * Provides turn-by-turn navigation instructions and route visualization. This method delegates to the MapData instance.
20147
19954
  *
20148
- * @note In enterprise mode, path smoothing is disabled by default. Use the `smoothing` option to explicitly enable it if needed.
19955
+ * @remarks In enterprise mode, path smoothing is disabled by default. Use the `smoothing` option to explicitly enable it if needed.
20149
19956
  *
20150
19957
  * @param from The starting location(s).
20151
19958
  * @param to The destination location(s).
@@ -20204,7 +20011,7 @@ export declare class MapView {
20204
20011
  *
20205
20012
  * Provides routes from a single starting point to multiple destinations. This method delegates to the MapData instance.
20206
20013
  *
20207
- * @note In enterprise mode, path smoothing is disabled by default. Use the `smoothing` option to explicitly enable it if needed.
20014
+ * @remarks In enterprise mode, path smoothing is disabled by default. Use the `smoothing` option to explicitly enable it if needed.
20208
20015
  *
20209
20016
  * @param from The starting location.
20210
20017
  * @param to An array of destination locations or arrays of destinations.
@@ -20502,6 +20309,7 @@ declare class Camera$3 {
20502
20309
  * Controls which camera interactions are enabled/disabled.
20503
20310
  *
20504
20311
  * @example
20312
+ * ```ts
20505
20313
  * // Disable zoom and rotation
20506
20314
  * mapView.Camera.interactions.set({ zoom: false, bearingAndPitch: false });
20507
20315
  *
@@ -20510,6 +20318,7 @@ declare class Camera$3 {
20510
20318
  *
20511
20319
  * // Disable all interactions
20512
20320
  * mapView.Camera.interactions.disable();
20321
+ * ```
20513
20322
  */
20514
20323
  interactions: {
20515
20324
  set: (options: TCameraInteractionsSetOptions) => void;
@@ -21025,10 +20834,10 @@ type CurrentMapGetter$3 = () => GeojsonApiMapObject | undefined;
21025
20834
  * });
21026
20835
  *
21027
20836
  * // Remove an image
21028
- * mapView.Images.remove(image);
20837
+ * mapView.Image3D.remove(image);
21029
20838
  *
21030
20839
  * // Remove all images
21031
- * mapView.Images.removeAll();
20840
+ * mapView.Image3D.removeAll();
21032
20841
  * ```
21033
20842
  *
21034
20843
  * ### Advanced
@@ -21071,7 +20880,7 @@ export declare class Image3D {
21071
20880
  * @param target The target object ({@link IAnchorable}) for the image (e.g., {@link Space}, {@link Door}, or {@link Coordinate}).
21072
20881
  * @param url The URL of the image (JPEG or PNG format).
21073
20882
  * @param options Configuration options for the image (see {@link TAddImageOptions}).
21074
- * @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
20883
+ * @returns The created {@link Image3DView} instance.
21075
20884
  *
21076
20885
  * @example Add a simple image
21077
20886
  * ```ts
@@ -21103,17 +20912,21 @@ export declare class Image3D {
21103
20912
  /**
21104
20913
  * Removes an image from the map.
21105
20914
  *
21106
- * @param image {Image} The {@link Image} which should be removed.
20915
+ * @param image The {@link Image3DView} instance to remove.
21107
20916
  * @example
21108
- * mapView.Images.remove(image);
20917
+ * ```ts
20918
+ * mapView.Image3D.remove(image);
20919
+ * ```
21109
20920
  */
21110
20921
  remove(image: Image3DView): void;
21111
20922
  /**
21112
20923
  * Remove all the images from the map.
21113
20924
  *
21114
- * @returns An array of all removed {@link Image} instances.
20925
+ * @returns An array of all removed {@link Image3DView} instances.
21115
20926
  * @example
21116
- * const removedImages = mapView.Images.removeAll();
20927
+ * ```ts
20928
+ * const removedImages = mapView.Image3D.removeAll();
20929
+ * ```
21117
20930
  */
21118
20931
  removeAll(): Image3DView[];
21119
20932
  }
@@ -21395,7 +21208,6 @@ declare class Style$2 {
21395
21208
  }
21396
21209
  type CurrentMapGetter$7 = () => GeojsonApiMapObject | undefined;
21397
21210
  type HiddenOutdoorGeometry = [
21398
- BBox,
21399
21211
  polygons: Feature$1<Polygon$1 | MultiPolygon$1, any>[],
21400
21212
  layers: string[]
21401
21213
  ];
@@ -21840,6 +21652,7 @@ declare const labelStateSchema: z.ZodObject<{
21840
21652
  center: "center";
21841
21653
  }>>
21842
21654
  ]>>;
21655
+ occlude: z.ZodDefault<z.ZodBoolean>;
21843
21656
  }, z.core.$strip>;
21844
21657
  declare const labelStateSchemaPartial: z.ZodObject<{
21845
21658
  type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"label">>>;
@@ -21864,6 +21677,7 @@ declare const labelStateSchemaPartial: z.ZodObject<{
21864
21677
  center: "center";
21865
21678
  }>>
21866
21679
  ]>>>;
21680
+ occlude: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
21867
21681
  }, z.core.$strip>;
21868
21682
  export type TLabelState = z.infer<typeof labelStateSchema>;
21869
21683
  export type TLabelUpdateState = z.infer<typeof labelStateSchemaPartial>;
@@ -21910,6 +21724,7 @@ declare const markerStateSchema: z.ZodObject<{
21910
21724
  }, z.core.$strip>>;
21911
21725
  element: z.ZodCustom<HTMLElement, HTMLElement>;
21912
21726
  contentHTML: z.ZodString;
21727
+ occlude: z.ZodDefault<z.ZodBoolean>;
21913
21728
  }, z.core.$strip>;
21914
21729
  declare const markerStateSchemaPartial: z.ZodObject<{
21915
21730
  type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"marker">>>;
@@ -21919,6 +21734,7 @@ declare const markerStateSchemaPartial: z.ZodObject<{
21919
21734
  z.ZodLiteral<"pointer-events-auto">
21920
21735
  ]>>>;
21921
21736
  rank: z.ZodOptional<z.ZodCustom<TCollisionRankingTier | "initial", TCollisionRankingTier | "initial">>;
21737
+ occlude: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
21922
21738
  placement: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [
21923
21739
  z.ZodEnum<{
21924
21740
  "top-left": "top-left";
@@ -21968,6 +21784,7 @@ declare const pathStateSchemaPartial: z.ZodObject<{
21968
21784
  highlightColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
21969
21785
  highlightWidthMultiplier: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
21970
21786
  highlightCompleteFraction: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
21787
+ xrayOpacity: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
21971
21788
  }, z.core.$strip>;
21972
21789
  declare const pathStateSchemaStrict: z.ZodObject<{
21973
21790
  type: z.ZodDefault<z.ZodLiteral<"path">>;
@@ -21981,6 +21798,7 @@ declare const pathStateSchemaStrict: z.ZodObject<{
21981
21798
  highlightColor: z.ZodDefault<z.ZodString>;
21982
21799
  highlightWidthMultiplier: z.ZodDefault<z.ZodNumber>;
21983
21800
  highlightCompleteFraction: z.ZodDefault<z.ZodNumber>;
21801
+ xrayOpacity: z.ZodDefault<z.ZodNumber>;
21984
21802
  }, z.core.$strict>;
21985
21803
  export type TPathState = z.infer<typeof pathStateSchemaStrict>;
21986
21804
  export type TPathUpdateState = z.infer<typeof pathStateSchemaPartial>;
@@ -22268,7 +22086,7 @@ export type MapElementToUpdateState = {
22268
22086
  [DOORS.Exterior]: TDoorsUpdateState;
22269
22087
  [DOORS.Interior]: TDoorsUpdateState;
22270
22088
  };
22271
- declare class GeoJsonApi extends PubSub<TNavigationEvents> {
22089
+ declare class GeoJsonApi extends PubSub$1<TNavigationEvents> {
22272
22090
  #private;
22273
22091
  core: Core;
22274
22092
  mapObjects: GeojsonApiMapObject[];
@@ -22280,7 +22098,6 @@ declare class GeoJsonApi extends PubSub<TNavigationEvents> {
22280
22098
  mapData?: MapData;
22281
22099
  currentMap: GeojsonApiMapObject;
22282
22100
  hiddenOutdoorGeometries: [
22283
- BBox,
22284
22101
  polygons: Feature$1<Polygon$1 | MultiPolygon$1, any>[],
22285
22102
  layers: string[]
22286
22103
  ][];
@@ -22292,7 +22109,7 @@ declare class GeoJsonApi extends PubSub<TNavigationEvents> {
22292
22109
  * Internal systems publish events here which are then exposed to developers via
22293
22110
  * MapView.on() and MapView.off().
22294
22111
  */
22295
- externalPubSub: PubSub<TEvents>;
22112
+ externalPubSub: PubSub$1<TEvents>;
22296
22113
  get manualFloorVisibility(): boolean;
22297
22114
  set manualFloorVisibility(value: boolean);
22298
22115
  get hidePathsNotOnCurrentFloor(): boolean;
@@ -22309,7 +22126,7 @@ declare class GeoJsonApi extends PubSub<TNavigationEvents> {
22309
22126
  Shapes: Shapes;
22310
22127
  Style: Style$2;
22311
22128
  Image3D: Image3D;
22312
- constructor(rendererCore: Core, mapView: MapView, externalPubSub: PubSub<TEvents>);
22129
+ constructor(rendererCore: Core, mapView: MapView, externalPubSub: PubSub$1<TEvents>);
22313
22130
  preloadFloors(floors: Floor[]): void;
22314
22131
  updateState<T extends MapElementsWithState>(target: T, state: TUpdateState<T>): void;
22315
22132
  updateState<T extends string & NonNullable<unknown>>(target: T, state: ValueOf<MapElementToUpdateState>): void;
@@ -22371,49 +22188,321 @@ declare class GeoJsonApi extends PubSub<TNavigationEvents> {
22371
22188
  manualFloorVisibility: boolean;
22372
22189
  }>;
22373
22190
  /**
22374
- * Publish all current state information
22375
- * @internal
22191
+ * Publish all current state information
22192
+ * @internal
22193
+ */
22194
+ publishAllState(): void;
22195
+ clear(): void;
22196
+ destroy(): void;
22197
+ getOptimalVisualDistanceBetweenFloors(floors: Floor[], debug?: boolean): number | undefined;
22198
+ }
22199
+ /**
22200
+ * Sets the base URL directory where worker scripts are hosted for CSP compatibility.
22201
+ *
22202
+ * This function configures both the MapLibre and collision system workers to load from
22203
+ * external URLs instead of using inline blob URLs. The SDK expects two specific worker
22204
+ * files to be available in the provided directory:
22205
+ * - `maplibre-worker.csp.js` - For MapLibre map rendering
22206
+ * - `collision-worker.csp.js` - For the collision detection system
22207
+ *
22208
+ * Using this approach enables compatibility with strict Content Security Policies
22209
+ * that block unsafe-eval and blob: URLs.
22210
+ *
22211
+ * @param baseUrl - Base URL directory where worker scripts are hosted (without trailing slash)
22212
+ * Example: "https://cdn.example.com/workers"
22213
+ *
22214
+ * @example
22215
+ * ```typescript
22216
+ * import { setWorkersUrl } from '@mappedin/mappedin-js';
22217
+ *
22218
+ * // Call before initializing any maps
22219
+ * setWorkersUrl('https://cdn.example.com/workers');
22220
+ * // This will load:
22221
+ * // - https://cdn.example.com/workers/maplibre-worker.csp.js
22222
+ * // - https://cdn.example.com/workers/collision-worker.csp.js
22223
+ * ```
22224
+ *
22225
+ * @remarks
22226
+ * - The worker files can be found in the published package at:
22227
+ * `node_modules/@mappedin/mappedin-js/lib/esm/workers/`
22228
+ * - For deployment, copy these files to your web server or CDN
22229
+ * - A better approach is to add these files to your build process to ensure
22230
+ * they're always in sync with your application
22231
+ * - Call this function before creating any map instances
22232
+ */
22233
+ export declare function setWorkersUrl(baseUrl: string): void;
22234
+ type NodeNeighbor = {
22235
+ id: string;
22236
+ weight: number;
22237
+ };
22238
+ type NodeProperties = {
22239
+ /**
22240
+ * Unique identifier for the node.
22241
+ */
22242
+ id: string;
22243
+ /**
22244
+ * An array of neighboring nodes with associated weights.
22245
+ */
22246
+ neighbors: NodeNeighbor[];
22247
+ /**
22248
+ * Additional property specific to the navigator based on the 'groupBy' option.
22249
+ * */
22250
+ [name: string]: any;
22251
+ };
22252
+ type NodeCollection$1 = FeatureCollection$1<Point$1, NodeProperties>;
22253
+ type NodeFeature = Feature$1<Point$1, NodeProperties>;
22254
+ declare class Edge {
22255
+ /** The originating node of the edge */
22256
+ origin: NodeFeature;
22257
+ /** The destination node of the edge */
22258
+ destination: NodeFeature;
22259
+ /** The distance between the origin and the destination nodes */
22260
+ distance: number;
22261
+ /** The angle of the edge with respect to some reference, in degrees */
22262
+ angle: number;
22263
+ /** A composite weight of the edge, combining distance and a custom path weight */
22264
+ weight: number;
22265
+ /**
22266
+ * Constructs a new Edge instance.
22267
+ * @param {NodeFeature} origin - The originating node of the edge.
22268
+ * @param {NodeFeature} destination - The destination node of the edge.
22269
+ * @param {number} [distance=0] - The physical distance between the origin and destination.
22270
+ * @param {number} [angle=0] - The angle of the edge in degrees.
22271
+ * @param {number} [pathWeight=0] - An additional weight factor for the path.
22272
+ */
22273
+ constructor({ origin, destination, distance, angle, pathWeight, multiplicativeDistanceWeightScaling, }: {
22274
+ origin: NodeFeature;
22275
+ destination: NodeFeature;
22276
+ distance?: number;
22277
+ angle?: number;
22278
+ pathWeight?: number;
22279
+ multiplicativeDistanceWeightScaling?: boolean;
22280
+ });
22281
+ }
22282
+ declare class NavigationGraph {
22283
+ #private;
22284
+ readonly edges: {
22285
+ [propName: string]: Edge[];
22286
+ };
22287
+ readonly nodesById: {
22288
+ [propName: string]: NodeFeature;
22289
+ };
22290
+ readonly nodesByGroup: Map<string, NodeFeature[]>;
22291
+ constructor({ nodes, groupBy, multiplicativeDistanceWeightScaling, }: {
22292
+ nodes: NodeCollection$1;
22293
+ groupBy: string;
22294
+ multiplicativeDistanceWeightScaling?: boolean;
22295
+ });
22296
+ /**
22297
+ * Calculates the shortest Euclidean distance from the origin node to any of the destination nodes.
22298
+ *
22299
+ * @param origin - The origin node.
22300
+ * @param destinations - An array of destination nodes.
22301
+ * @returns The shortest Euclidean distance.
22302
+ */
22303
+ getShortestEuclideanDistance(origin: NodeFeature, destinations: NodeFeature[]): number;
22304
+ hasLineOfSight: (origin: Position, destination: Position, edges?: Position[][], bufferRadius?: number) => boolean;
22305
+ /**
22306
+ * Performs a Dijkstra search to find nodes within a given travel distance that satisfy a goal function, sorted by distance.
22307
+ *
22308
+ * @param originId - Origin node ID.
22309
+ * @param maxTravelDistance - The maximum travel distance.
22310
+ * @param includedNodeIds - Array of node IDs to include in the search.
22311
+ * @param obstructionEdges - Array of obstruction edges for line of sight calculations.
22312
+ * @param useLineOfSight - Whether to use line of sight checking.
22313
+ * @returns An Array of nodes within the travel distance that satisfy the goal function.
22314
+ * - feature: The node feature.
22315
+ * - distance: The distance to the node.
22316
+ * - edges: The edges to the node.
22317
+ */
22318
+ dijkstraFindWithinTravelDistance(originId: string, maxTravelDistance: number, includedNodeIds: string[], obstructionEdges: Position[][], useLineOfSight: boolean, limitNumberOfResults: number): {
22319
+ feature: NodeFeature;
22320
+ distance: number;
22321
+ }[];
22322
+ /**
22323
+ * Performs A* pathfinding from specified origins to destinations, considering optional constraints like accessibility.
22324
+ *
22325
+ * @param {string[]} originIds - Array of origin node IDs.
22326
+ * @param {string[]} destinationNodeIds - Array of destination node IDs.
22327
+ * @param {Set<string>} [disabledConnectionNodeIds] - Optional set of connection node IDs that are disabled (ie. act as regular nodes).
22328
+ * @param {Set<string>} [disabledNodeIds] - Optional set of node IDs which are ignored during pathfinding.
22329
+ * @returns {Edge[]} An array of edges representing the shortest path, or an empty array if no path is found.
22330
+ */
22331
+ aStar({ originIds, destinationNodeIds, disabledConnectionNodeIds, zones, overrideEdgeWeights, disabledNodeIds, }: {
22332
+ originIds: string[];
22333
+ destinationNodeIds: string[];
22334
+ zones: DirectionsZone[];
22335
+ disabledConnectionNodeIds?: Set<string>;
22336
+ overrideEdgeWeights?: Map<Edge, number>;
22337
+ disabledNodeIds?: Set<string>;
22338
+ }): Edge[];
22339
+ }
22340
+ type DirectionProperties = {
22341
+ /**
22342
+ * Unique identifier for the direction.
22343
+ */
22344
+ id: string;
22345
+ /**
22346
+ * An angle between this point and the destination, in radians.
22347
+ */
22348
+ angle?: number;
22349
+ /**
22350
+ * Distance to the next point, in meters.
22351
+ */
22352
+ distance?: number;
22353
+ /**
22354
+ * Group id which the direction belongs to (e.g. floor, building, etc).
22355
+ * It's based on the groupBy property of the navigator.
22356
+ */
22357
+ groupBy?: string;
22358
+ destination?: string;
22359
+ edges: Edge[];
22360
+ };
22361
+ type DirectionFeature = Feature$1<Point$1, DirectionProperties>;
22362
+ type DirectionsCollection = FeatureCollection$1<Point$1, DirectionProperties>;
22363
+ type SimplifyDirectionsOptions = {
22364
+ /**
22365
+ * Enable or disable simplifying.
22366
+ */
22367
+ enabled: boolean;
22368
+ /**
22369
+ * The radius of the buffer around the path to consider when simplifying, in meters.
22370
+ * @default 0.7
22371
+ */
22372
+ bufferRadius?: number;
22373
+ };
22374
+ type DirectionsZone = {
22375
+ geometry: Feature$1<MultiPolygon$1 | Polygon$1>;
22376
+ /**
22377
+ * The additional cost for navigation through the zone.
22378
+ */
22379
+ cost: number;
22380
+ /**
22381
+ *
22382
+ * Additional property specific to the navigator based on the 'groupBy' option.
22383
+ */
22384
+ [index: string]: any;
22385
+ };
22386
+ declare class Navigator$1 {
22387
+ private groupBy;
22388
+ graph: NavigationGraph;
22389
+ private geometryEdgesByMapId;
22390
+ private flagDeclarations;
22391
+ private disabledNodeIds;
22392
+ /**
22393
+ * Constructs a Navigator instance to manage pathfinding with optional obstructions and grouping features.
22394
+ *
22395
+ * @param {NodeCollection} nodes - Collection of nodes for the navigation graph.
22396
+ * @param {ObstructionCollection} [obstructions] - Optional collection of obstructions that could block paths.
22397
+ * @param {SpaceCollection} [spaces] - Optional collection of spaces that could block paths.
22398
+ * @param {string} [groupBy] - Optional property name to group nodes and paths for differentiated processing.
22399
+ */
22400
+ constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, }: {
22401
+ nodes: NodeCollection$1;
22402
+ geojsonCollection?: ObstructionCollection | SpaceCollection;
22403
+ groupBy?: string;
22404
+ multiplicativeDistanceWeightScaling?: boolean;
22405
+ flagDeclarations?: NavigationFlagDeclarations;
22406
+ });
22407
+ private getDisabledNodeIds;
22408
+ /**
22409
+ * Calculates and returns a set of directions from origin nodes to destination nodes, including detailed properties.
22410
+ *
22411
+ * @param {DirectionsZone[]} zones - special zones for navigation operations.
22412
+ * @param {string[]} originIds - IDs of origin nodes.
22413
+ * @param {string[]} destinationNodeIds - IDs of destination nodes.
22414
+ * @param {string[]} [disabledConnectionNodeIds] - IDs of connection nodes that are disabled (ie. act as regular nodes).
22415
+ * @param {SimplifyDirectionsOptions} [simplify] - Options to simplify the pathfinding result.
22416
+ * @returns {DirectionsCollection} A collection of directional features representing the path.
22417
+ */
22418
+ getDirections({ zones: directionsZones, originIds, destinationNodeIds, disabledConnectionNodeIds, simplify, multiplicativeDistanceWeightScaling, overrideEdgeWeights, }: {
22419
+ originIds: string[];
22420
+ destinationNodeIds: string[];
22421
+ zones?: DirectionsZone[];
22422
+ disabledConnectionNodeIds?: string[];
22423
+ simplify?: SimplifyDirectionsOptions;
22424
+ multiplicativeDistanceWeightScaling?: boolean;
22425
+ overrideEdgeWeights?: Map<Edge, number>;
22426
+ }): DirectionsCollection;
22427
+ /**
22428
+ * Generates a path from a series of edges, constructing a feature collection of directional steps.
22429
+ *
22430
+ * @param {Edge[]} steps - An array of edges representing the path.
22431
+ * @returns {DirectionsCollection} A collection of directional features.
22432
+ */
22433
+ private generatePath;
22434
+ /**
22435
+ * Simplifies a sequence of steps by reducing unnecessary nodes using a buffer radius to check for obstructions.
22436
+ *
22437
+ * @param {Edge[]} steps - The steps to simplify.
22438
+ * @param {number} bufferRadius - The buffer radius to use
22439
+ * for simplification.
22440
+ * @returns {Edge[]} An array of simplified edges representing a more direct path.
22441
+ */
22442
+ private simplifyAllSteps;
22443
+ /**
22444
+ * Finds the nearest nodes on the graph within a given travel distance.
22445
+ *
22446
+ * @param originId - The ID of the origin node.
22447
+ * @param maxDistance - The maximum distance to search.
22448
+ * @param floorId - The ID of the floor.
22449
+ * @param includedNodeIds - The IDs of the nodes to include.
22450
+ * @param useLineOfSight - Whether to use line of sight.
22451
+ * @returns An array of nodes within the travel distance that satisfy the goal function.
22452
+ */
22453
+ findNearestNodesOnGraph: (originId: string, maxDistance: number, floorId: string, includedNodeIds: string[], useLineOfSight?: boolean, limitNumberOfResults?: number) => {
22454
+ feature: NodeFeature;
22455
+ distance: number;
22456
+ }[];
22457
+ /**
22458
+ * Checks if there is a line of sight between two points on the map.
22459
+ *
22460
+ * @param origin - The origin point.
22461
+ * @param destination - The destination point.
22462
+ * @param floorId - The ID of the floor.
22463
+ * @param bufferRadius - The buffer radius to use when checking for line of sight.
22464
+ * @returns True if there is a line of sight, false otherwise.
22465
+ */
22466
+ hasLineOfSight: (origin: [
22467
+ number,
22468
+ number
22469
+ ], destination: [
22470
+ number,
22471
+ number
22472
+ ], floorId: string, bufferRadius?: number) => boolean;
22473
+ /**
22474
+ * Simplifies a section of steps by checking direct lines of sight between steps and eliminating intermediate nodes if unobstructed.
22475
+ *
22476
+ * @param {Edge[]} steps - The steps to potentially simplify.
22477
+ * @param {[number, number][][]} geometryEdges - The geometrical edges of the map used to check for line of sight.
22478
+ * @param {number} bufferRadius - The buffer radius to use when simplifying.
22479
+ * @returns {Edge[]} An array of simplified edges.
22480
+ */
22481
+ private simplifySteps;
22482
+ /**
22483
+ * Calculates the approximate distance between two geographic coordinates on Earth's surface.
22484
+ *
22485
+ * This function uses the equirectangular approximation method to compute the distance, which simplifies
22486
+ * the math and speeds up calculations, but is less accurate over long distances compared to other methods
22487
+ * like the haversine formula.
22488
+ *
22489
+ * @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
22490
+ * @param {Position} point2 - The second point's longitude and latitude as [longitude, latitude].
22491
+ * @return
22492
+ * @return {number} The approximate distance between the two points in meters.
22493
+ */
22494
+ getDistance: (point1: Position, point2: Position) => number;
22495
+ /**
22496
+ * Calculates the angle between two geographic coordinates.
22497
+ *
22498
+ * @param {Position} point1 - The first point's longitude and latitude as [longitude, latitude].
22499
+ * @param {Position} point2 - The second point's longitude and latitude as [longitude, latitude].
22500
+ * @hidden
22501
+ *
22502
+ * @return {number} The angle in radians, calculated clockwise from the north between the two points specified.
22376
22503
  */
22377
- publishAllState(): void;
22378
- clear(): void;
22379
- destroy(): void;
22380
- getOptimalVisualDistanceBetweenFloors(floors: Floor[], debug?: boolean): number | undefined;
22504
+ getAngle: (point1: Position, point2: Position) => number;
22381
22505
  }
22382
- /**
22383
- * Sets the base URL directory where worker scripts are hosted for CSP compatibility.
22384
- *
22385
- * This function configures both the MapLibre and collision system workers to load from
22386
- * external URLs instead of using inline blob URLs. The SDK expects two specific worker
22387
- * files to be available in the provided directory:
22388
- * - `maplibre-worker.csp.js` - For MapLibre map rendering
22389
- * - `collision-worker.csp.js` - For the collision detection system
22390
- *
22391
- * Using this approach enables compatibility with strict Content Security Policies
22392
- * that block unsafe-eval and blob: URLs.
22393
- *
22394
- * @param baseUrl - Base URL directory where worker scripts are hosted (without trailing slash)
22395
- * Example: "https://cdn.example.com/workers"
22396
- *
22397
- * @example
22398
- * ```typescript
22399
- * import { setWorkersUrl } from '@mappedin/mappedin-js';
22400
- *
22401
- * // Call before initializing any maps
22402
- * setWorkersUrl('https://cdn.example.com/workers');
22403
- * // This will load:
22404
- * // - https://cdn.example.com/workers/maplibre-worker.csp.js
22405
- * // - https://cdn.example.com/workers/collision-worker.csp.js
22406
- * ```
22407
- *
22408
- * @remarks
22409
- * - The worker files can be found in the published package at:
22410
- * `node_modules/@mappedin/mappedin-js/lib/esm/workers/`
22411
- * - For deployment, copy these files to your web server or CDN
22412
- * - A better approach is to add these files to your build process to ensure
22413
- * they're always in sync with your application
22414
- * - Call this function before creating any map instances
22415
- */
22416
- export declare function setWorkersUrl(baseUrl: string): void;
22417
22506
  /**
22418
22507
  * Represents a set of directions between two points.
22419
22508
  *
@@ -22465,6 +22554,9 @@ export declare class Directions {
22465
22554
  __type: string;
22466
22555
  from: TNavigationTarget;
22467
22556
  to: TNavigationTarget;
22557
+ coordinates: Coordinate[];
22558
+ distance: number;
22559
+ instructions: TDirectionInstruction[];
22468
22560
  };
22469
22561
  }
22470
22562
  declare class DirectionsInternal {
@@ -22659,57 +22751,72 @@ export declare class Text3DView {
22659
22751
  */
22660
22752
  static is(instance: object): instance is Text3DView;
22661
22753
  }
22662
- export type TFloorChangeReason = "blue-dot-floor-change" | "navigation-connection-click" | string;
22754
+ export type TFloorChangeReason = string;
22755
+ /**
22756
+ * The payload for a user click event on the map.
22757
+ *
22758
+ * Contains detailed information about all visible interactive map elements that were under the pointer
22759
+ * at the time of the event.
22760
+ *
22761
+ * Properties are optional and included only when corresponding objects are present at the pointer location.
22762
+ */
22663
22763
  export type TClickPayload = {
22664
22764
  /**
22665
- * The coordinate of the interaction.
22765
+ * The geographic {@link Coordinate} of the pointer event.
22666
22766
  */
22667
22767
  coordinate: Coordinate;
22668
22768
  /**
22669
- * The interactive paths which the user interaction passed through.
22769
+ * Interactive {@link Path}s under the pointer.
22670
22770
  */
22671
22771
  paths?: Path[];
22672
22772
  /**
22673
- * The interactive spaces which the user interaction passed through.
22773
+ * Interactive {@link Space}s under the pointer.
22674
22774
  */
22675
22775
  spaces?: Space[];
22676
22776
  /**
22677
- * The interactive objects which the user interaction passed through.
22777
+ * Interactive {@link MapObject | Object}s under the pointer.
22678
22778
  */
22679
22779
  objects?: MapObject[];
22680
22780
  /**
22681
- * The interactive areas which the user interaction passed through.
22781
+ * Interactive {@link Area}s under the pointer.
22682
22782
  */
22683
22783
  areas?: Area[];
22684
22784
  /**
22685
- * The markers which the user interaction passed through.
22785
+ * Interactive {@link Marker}s under the pointer.
22686
22786
  */
22687
22787
  markers?: Marker[];
22688
22788
  /**
22689
- * The models which the user interaction passed through.
22789
+ * Interactive {@link Model}s under the pointer.
22690
22790
  */
22691
22791
  models?: Model[];
22692
22792
  /**
22693
- * The interactive labels which the user interaction passed through.
22793
+ * Interactive {@link Label}s under the pointer.
22694
22794
  */
22695
22795
  labels?: Label[];
22696
22796
  /**
22697
- * The interactive floors which the user interaction passed through.
22797
+ * Interactive {@link Floor}s under the pointer.
22698
22798
  */
22699
22799
  floors?: Floor[];
22700
22800
  /**
22701
- * Details about the pointer event which triggered the interaction.
22801
+ * Details about the pointer event triggering this click, containing only the pointer button.
22702
22802
  */
22703
- pointerEvent: ClickPayload["pointerEvent"];
22803
+ pointerEvent: Pick<PointerEvent, "button">;
22704
22804
  /**
22705
- * The interactive facades which the user interaction passed through.
22805
+ * Interactive {@link Facade}s under the pointer.
22706
22806
  */
22707
22807
  facades?: Facade[];
22708
22808
  /**
22709
- * The interactive shapes which the user interaction passed through.
22809
+ * Interactive {@link Shape}s under the pointer.
22710
22810
  */
22711
22811
  shapes?: Shape[];
22712
22812
  };
22813
+ /**
22814
+ * Represents the payload for a hover event on the map.
22815
+ * This contains the interactive objects that the user's pointer is over,
22816
+ * but omits the `pointerEvent` property from {@link TClickPayload}.
22817
+ *
22818
+ * @see {@link TClickPayload}
22819
+ */
22713
22820
  export type THoverPayload = Omit<TClickPayload, "pointerEvent">;
22714
22821
  type TCameraStateChangePayload = CameraSystemState & {
22715
22822
  autoMinZoomLevel: Core["camera"]["autoMinZoomLevel"];
@@ -22727,13 +22834,20 @@ export type TStateChangedInternalPayload = Partial<{
22727
22834
  Navigation: NavigationState;
22728
22835
  manualFloorVisibility: boolean;
22729
22836
  }>;
22730
- type TFloorChangePayload = {
22837
+ /**
22838
+ * Describes the payload delivered with floor change events.
22839
+ *
22840
+ * This type provides context when a floor change occurs within the map,
22841
+ * such as user-initiated level switches, programmatic navigation, or automatic changes.
22842
+ * It specifies both the current and previous floors for the transition, as well as an optional reason.
22843
+ */
22844
+ export type TFloorChangePayload = {
22731
22845
  /**
22732
- * The floor that is being changed to.
22846
+ * The {@link Floor} which the map is changing to.
22733
22847
  */
22734
22848
  floor: Floor;
22735
22849
  /**
22736
- * The floor that is being changed from.
22850
+ * The {@link Floor} that was active before the change.
22737
22851
  */
22738
22852
  previousFloor: Floor;
22739
22853
  /**
@@ -22765,7 +22879,7 @@ export type TEvents = {
22765
22879
  /**
22766
22880
  * Emitted when the map is hovered over with a mouse.
22767
22881
  */
22768
- hover: Omit<THoverPayload, "pointerEvent">;
22882
+ hover: THoverPayload;
22769
22883
  /**
22770
22884
  * Emitted when the camera's view changes.
22771
22885
  */
@@ -23238,6 +23352,12 @@ export type TAddPathOptions = {
23238
23352
  * @defaultValue false
23239
23353
  */
23240
23354
  visibleThroughGeometry?: boolean;
23355
+ /**
23356
+ * The opacity of the path when it's behind geometry (x-ray effect). Value from 0 to 1.
23357
+ *
23358
+ * @defaultValue 0.25
23359
+ */
23360
+ xrayOpacity?: number;
23241
23361
  };
23242
23362
  /**
23243
23363
  * Defines the priority levels for collider collision handling, allowing customization of collider visibility in congested areas.
@@ -23394,7 +23514,7 @@ export type TAddModelOptions = Omit<InitializeModelState, "scale" | "url"> & {
23394
23514
  };
23395
23515
  type TAddText3DOptions = AddText3DOptions;
23396
23516
  /**
23397
- * Options for controlling the behavior of an {@link Image}.
23517
+ * Options for controlling the behavior of an {@link Image3DView}.
23398
23518
  */
23399
23519
  export type TAddImageOptions = {
23400
23520
  /**
@@ -23422,7 +23542,7 @@ export type TAddImageOptions = {
23422
23542
  */
23423
23543
  verticalOffset?: number;
23424
23544
  /**
23425
- * Attempt to keep the image facing the camera as much as possible
23545
+ * If true, the image will automatically rotate to face the camera, creating a billboard effect.
23426
23546
  *
23427
23547
  * @default false
23428
23548
  */
@@ -23482,6 +23602,7 @@ export type TAddMarkerOptions = {
23482
23602
  /**
23483
23603
  * Whether to enable low priority pin strategy when all anchor positions have collisions.
23484
23604
  * @default true
23605
+ * @deprecated add 'hidden' to the placement array instead
23485
23606
  */
23486
23607
  enabled?: boolean;
23487
23608
  /**
@@ -23495,6 +23616,11 @@ export type TAddMarkerOptions = {
23495
23616
  */
23496
23617
  color?: string;
23497
23618
  };
23619
+ /**
23620
+ * Whether the marker should be occluded by 3D geometry.
23621
+ * @default true
23622
+ */
23623
+ occlude?: boolean;
23498
23624
  };
23499
23625
  /**
23500
23626
  * Options for creating a new {@link Label} with {@link Labels.add}.
@@ -23526,6 +23652,11 @@ export type TAddLabelOptions = {
23526
23652
  * The placement of the text relative to the pin.
23527
23653
  */
23528
23654
  textPlacement?: LabelTextPlacement[];
23655
+ /**
23656
+ * Whether the label should be occluded by 3D geometry.
23657
+ * @default true
23658
+ */
23659
+ occlude?: boolean;
23529
23660
  };
23530
23661
  type LanguagePackHydrationItem = {
23531
23662
  language: Language;
@@ -23535,7 +23666,10 @@ type LanguagePackHydrationItem = {
23535
23666
  * All map elements which have state.
23536
23667
  */
23537
23668
  export type MapElementsWithState = WithState<MapDataElements | MapViewElements | DOORS | WALLS>;
23538
- type WithState<T> = T extends {
23669
+ /**
23670
+ * Filter type that extracts only elements which have state.
23671
+ */
23672
+ export type WithState<T> = T extends {
23539
23673
  __type: infer U;
23540
23674
  } ? U extends keyof MapElementToGetState ? T : never : T extends string ? T extends keyof MapElementToGetState ? T : never : never;
23541
23675
  /**
@@ -23606,7 +23740,10 @@ export type TMapDataObjectTypes = {
23606
23740
  [Area.__type]: Area;
23607
23741
  [Facade.__type]: Facade;
23608
23742
  };
23609
- type TMapViewObjectTypes = {
23743
+ /**
23744
+ * Associates MapView type strings with their corresponding classes.
23745
+ */
23746
+ export type TMapViewObjectTypes = {
23610
23747
  [Label.__type]: Label;
23611
23748
  [Marker.__type]: Marker;
23612
23749
  [Model.__type]: Model;
@@ -23616,20 +23753,34 @@ type TMapViewObjectTypes = {
23616
23753
  [Image3DView.__type]: Image3DView;
23617
23754
  [Text3DView.__type]: Text3DView;
23618
23755
  };
23619
- type TMapFeatureTypes = TMapDataObjectTypes & TMapViewObjectTypes;
23620
- type MapFeatureOfType<T extends string> = T extends keyof TMapFeatureTypes ? TMapFeatureTypes[T] : never;
23756
+ /**
23757
+ * Associates MapData and MapView type strings with their corresponding classes.
23758
+ *
23759
+ * This is a union of {@link TMapDataObjectTypes} and {@link TMapViewObjectTypes}, providing
23760
+ * a complete mapping of all map feature type strings to their class types.
23761
+ */
23762
+ export type TMapFeatureTypes = TMapDataObjectTypes & TMapViewObjectTypes;
23763
+ /**
23764
+ * Returns the class type for a given type string.
23765
+ */
23766
+ export type MapFeatureOfType<T extends string> = T extends keyof TMapFeatureTypes ? TMapFeatureTypes[T] : never;
23621
23767
  type TImagePlacementOptions = ImagePlacementOptions;
23622
- type TCameraInteractionsSetOptions = {
23768
+ /**
23769
+ * Options to control which camera interactions are enabled in the MapView.
23770
+ *
23771
+ * All values are optional; if omitted, the corresponding interaction will not be changed.
23772
+ */
23773
+ export type TCameraInteractionsSetOptions = {
23623
23774
  /**
23624
- * Whether to enable panning.
23775
+ * Whether to enable panning (dragging the map).
23625
23776
  */
23626
23777
  pan?: boolean;
23627
23778
  /**
23628
- * Whether to enable zooming.
23779
+ * Whether to enable zooming (scroll or pinch).
23629
23780
  */
23630
23781
  zoom?: boolean;
23631
23782
  /**
23632
- * Whether to enable bearing and pitch.
23783
+ * Whether to enable bearing (rotation) and pitch (tilting).
23633
23784
  */
23634
23785
  bearingAndPitch?: boolean;
23635
23786
  };
@@ -23670,17 +23821,25 @@ type TGetInViewOptions = Partial<{
23670
23821
  screenOffsets: Partial<InsetPadding>;
23671
23822
  fullyContains: boolean;
23672
23823
  }>;
23673
- type TPathSectionHighlightOptions = {
23824
+ /**
23825
+ * Configuration options for highlighting a specific section of a path on the map.
23826
+ * These options allow you to visually emphasize a segment of a path using custom color, width,
23827
+ * and animation duration for user interaction or navigation purposes.
23828
+ */
23829
+ export type TPathSectionHighlightOptions = {
23674
23830
  /**
23675
- * The color of the highlight.
23831
+ * The highlight color for the path section (CSS color string).
23832
+ * @default 'red'
23676
23833
  */
23677
23834
  color?: string;
23678
23835
  /**
23679
- * The width multiplier of the highlight.
23836
+ * Multiplies the base path width by this factor for the duration of the highlight.
23837
+ * @default 1
23680
23838
  */
23681
23839
  widthMultiplier?: number;
23682
23840
  /**
23683
- * The duration of the highlight animation.
23841
+ * Duration of the highlight animation in milliseconds.
23842
+ * @default 1500
23684
23843
  */
23685
23844
  animationDuration?: number;
23686
23845
  };
@@ -23694,21 +23853,26 @@ export type TTakeScreenshotOptions = {
23694
23853
  */
23695
23854
  withOutdoorContext?: boolean;
23696
23855
  };
23697
- type TCoordinateParams = {
23856
+ /**
23857
+ * Parameters for creating a {@link Coordinate}.
23858
+ *
23859
+ * Used with the {@link Coordinate} constructor or {@link MapView.createCoordinate} method to create a coordinate on the map.
23860
+ */
23861
+ export type TCoordinateParams = {
23698
23862
  /**
23699
- * The latitude of the coordinate in decimal degrees.
23863
+ * The latitude of the {@link Coordinate}.
23700
23864
  */
23701
23865
  latitude: number;
23702
23866
  /**
23703
- * The longitude of the coordinate in decimal degrees.
23867
+ * The longitude of the {@link Coordinate}.
23704
23868
  */
23705
23869
  longitude: number;
23706
23870
  /**
23707
- * Optional ID of the floor this coordinate is on.
23871
+ * Optional ID of the {@link Floor} this {@link Coordinate} is on.
23708
23872
  */
23709
23873
  floorId?: string;
23710
23874
  /**
23711
- * Optional vertical offset from the floor in meters.
23875
+ * Optional vertical offset from the {@link Floor} in meters.
23712
23876
  */
23713
23877
  verticalOffset?: number;
23714
23878
  };
@@ -23997,6 +24161,7 @@ export declare class LocationProfile extends BaseMetaData implements LocationDat
23997
24161
  * @format uri
23998
24162
  */
23999
24163
  icon?: ImageMetaData;
24164
+ /** @internal */
24000
24165
  constructor(data: MapDataInternal, options: {
24001
24166
  mvfData: MVFLocation;
24002
24167
  });
@@ -24081,13 +24246,15 @@ declare abstract class BaseMapData {
24081
24246
  get geoJSONBoundingBox(): BBox | undefined;
24082
24247
  get geoJSON(): Feature$1<Polygon$1 | MultiPolygon$1 | LineString | Point$1, null>;
24083
24248
  }
24084
- type PropertiesWithDetails = {
24249
+ export declare abstract class DetailedMapData<MVFData extends MVFFeature<Geometry, {
24085
24250
  id: string;
24086
24251
  externalId?: string;
24087
24252
  details?: Details;
24088
- };
24089
- declare abstract class DetailedMapData<MVFData extends MVFFeature<Geometry, PropertiesWithDetails>> extends BaseMapData {
24253
+ }>> extends BaseMapData {
24090
24254
  #private;
24255
+ /**
24256
+ * @internal
24257
+ */
24091
24258
  constructor(data: MapDataInternal, mvfData: MVFData);
24092
24259
  /**
24093
24260
  * Gets the external identifier of the map feature.
@@ -24131,6 +24298,20 @@ declare abstract class DetailedMapData<MVFData extends MVFFeature<Geometry, Prop
24131
24298
  * @returns {LocationProfile[]} An array of location profiles.
24132
24299
  */
24133
24300
  get locationProfiles(): LocationProfile[];
24301
+ /**
24302
+ * Serializes DetailedMapData fields to a plain object.
24303
+ * Internal method for use by bridge serialization.
24304
+ *
24305
+ * @internal
24306
+ */
24307
+ _serializeDetailedMapData(): {
24308
+ externalId: string;
24309
+ name: string;
24310
+ description: string;
24311
+ images: ImageMetaData[];
24312
+ links: Hyperlink[];
24313
+ locationProfiles: LocationProfile[];
24314
+ };
24134
24315
  }
24135
24316
  /**
24136
24317
  * An Area represents some grouping of multiple pieces of geometry, not
@@ -24793,6 +24974,11 @@ export declare class MapObject extends DetailedMapData<ObstructionFeature> imple
24793
24974
  */
24794
24975
  destroy(): void;
24795
24976
  }
24977
+ type PartialExcept<T, K extends string> = {
24978
+ [P in keyof T as P extends K ? P : never]: T[P];
24979
+ } & {
24980
+ [P in keyof T as P extends K ? never : P]?: T[P] extends Primitive$1 ? T[P] : T[P] extends (infer U)[] ? PartialExcept<U, K>[] : PartialExcept<T[P], K>;
24981
+ };
24796
24982
  type TokenWithExpiration = {
24797
24983
  token: string;
24798
24984
  expires?: number;
@@ -24814,7 +25000,7 @@ type TokenManagerEvents = {
24814
25000
  sasTokens: Record<string, TokenWithExpiration>;
24815
25001
  };
24816
25002
  };
24817
- type TokenManagerPubSub = PubSub<TokenManagerEvents>;
25003
+ type TokenManagerPubSub = PubSub$1<TokenManagerEvents>;
24818
25004
  declare class TokenManager {
24819
25005
  #private;
24820
25006
  constructor(mapIds: string[], options: TokenManagerOptions);
@@ -25778,7 +25964,7 @@ export declare class EnterpriseVenue extends BaseMetaData implements MVFEnterpri
25778
25964
  */
25779
25965
  destroy(): void;
25780
25966
  }
25781
- export type TQueriables = PointOfInterest | Door | Annotation | Node$1 | Space;
25967
+ export type TQueriables = PointOfInterest | Door | Annotation | Node$1 | Space | EnterpriseLocation;
25782
25968
  /**
25783
25969
  * Query allows users to query for nodes, locations, categories, and other points of interest within the venue.
25784
25970
  */
@@ -25862,6 +26048,7 @@ export declare class LocationCategory extends BaseMetaData implements Omit<MVFCa
25862
26048
  * @format uri
25863
26049
  */
25864
26050
  icon: string;
26051
+ /** @internal */
25865
26052
  constructor(data: MapDataInternal, options: {
25866
26053
  mvfData: MVFCategory;
25867
26054
  });
@@ -25907,7 +26094,7 @@ export type TFindPreferredLanguageInVenueOptions = {
25907
26094
  * @returns An object containing the selected language code and name, or undefined if no language is found
25908
26095
  */
25909
26096
  export declare function findPreferredLanguageInVenue(venue: EnterpriseVenue, options?: TFindPreferredLanguageInVenueOptions): Language;
25910
- declare class MapDataInternal extends PubSub<{
26097
+ declare class MapDataInternal extends PubSub$1<{
25911
26098
  "language-change": {
25912
26099
  code: string;
25913
26100
  name: string;
@@ -26332,6 +26519,165 @@ export declare class Search {
26332
26519
  */
26333
26520
  enable(): Promise<void>;
26334
26521
  }
26522
+ /**
26523
+ * Represents the environment state configuration.
26524
+ * @example
26525
+ * const mapData = getMapData({
26526
+ * key: '',
26527
+ * secret: '',
26528
+ * environment: 'eu'
26529
+ * })
26530
+ */
26531
+ type Environment$1 = {
26532
+ /**
26533
+ * The base URI for the API.
26534
+ */
26535
+ baseUri: string;
26536
+ /**
26537
+ * The base URI for authentication.
26538
+ */
26539
+ baseAuthUri: string;
26540
+ /**
26541
+ * The base URI for analytics.
26542
+ */
26543
+ analyticsBaseUri: string;
26544
+ /**
26545
+ * The URI for the tile server.
26546
+ */
26547
+ tileServerUri: string;
26548
+ };
26549
+ type ServiceEnvironment$1 = "us" | "eu";
26550
+ /**
26551
+ * Options for configuring search functionality.
26552
+ */
26553
+ type TSearchOptions$1 = {
26554
+ /**
26555
+ * Indicates whether search functionality is enabled.
26556
+ */
26557
+ enabled: boolean;
26558
+ };
26559
+ type TGetMapDataSharedOptions$1 = {
26560
+ /**
26561
+ * Mappedin map ID.
26562
+ */
26563
+ mapId: string;
26564
+ /**
26565
+ * Optionally provide a custom base URL for the Mappedin API request.
26566
+ * Use the {@link Environment | `environment`} setting to switch environments
26567
+ */
26568
+ baseUri?: string;
26569
+ /**
26570
+ * Optionally provide a custom base URL for authentication when obtaining an access token.
26571
+ * Use the {@link Environment | `environment`} setting to switch environments.
26572
+ */
26573
+ baseAuthUri?: string;
26574
+ /**
26575
+ * Optionally provide an entirely custom URL for authentication when obtaining an access token.
26576
+ * @hidden
26577
+ * @internal
26578
+ */
26579
+ customAuthUri?: string;
26580
+ /**
26581
+ * Callback for when the Mappedin map data has been fetched and parsed as Mappedin Venue Format (MVF) data.
26582
+ * @param mvf Parsed MVF data.
26583
+ */
26584
+ onMVFParsed?: (mvf: ParsedMVF) => void;
26585
+ /**
26586
+ * Load different view of mvf data based on configId
26587
+ */
26588
+ viewId?: string;
26589
+ /**
26590
+ * set the target SDK environment
26591
+ * @default 'us'
26592
+ * @example
26593
+ * const mapData = getMapData({
26594
+ * key: '',
26595
+ * secret: '',
26596
+ * environment: 'eu'
26597
+ * })
26598
+ */
26599
+ environment?: ServiceEnvironment$1;
26600
+ /**
26601
+ * The language of the map data.
26602
+ * The ISO 639-1 language code to change to (e.g., 'en' for English, 'fr' for French). Check ({@link EnterpriseVenue.languages}) for available languages
26603
+ */
26604
+ language?: string;
26605
+ /**
26606
+ * Whether to use browser's language settings as fallback if the supplied language code is not available.
26607
+ * @default true
26608
+ * */
26609
+ fallbackToNavigatorLanguage?: boolean;
26610
+ /**
26611
+ * Analytics configuration.
26612
+ */
26613
+ analytics?: {
26614
+ /**
26615
+ * Whether to log analytics events.
26616
+ * @default false
26617
+ */
26618
+ logEvents?: boolean;
26619
+ /**
26620
+ * Whether to send analytics events to the server.
26621
+ * @default false
26622
+ */
26623
+ sendEvents?: boolean;
26624
+ /**
26625
+ * Custom base URI for analytics requests. If not provided, the default analytics endpoint will be used.
26626
+ * Use the {@link Environment | `environment`} setting to switch environments.
26627
+ */
26628
+ baseUri?: string;
26629
+ /**
26630
+ * Context for analytics events.
26631
+ * @default 'websdk'
26632
+ * @internal
26633
+ */
26634
+ context?: string;
26635
+ /**
26636
+ * Version override for analytics events.
26637
+ * @internal
26638
+ */
26639
+ version?: string;
26640
+ };
26641
+ search?: TSearchOptions$1;
26642
+ /**
26643
+ * Fetch bearer and SAS tokens for the map ahead of time and keep them up to date in the background.
26644
+ * @default true
26645
+ */
26646
+ prefetchTokens?: boolean;
26647
+ /**
26648
+ * @hidden
26649
+ * @internal
26650
+ */
26651
+ layoutId?: "draft";
26652
+ /**
26653
+ * @hidden
26654
+ * @internal
26655
+ */
26656
+ mvfVersion?: "2.0.0" | "2.0.0-c" | "3.0.0";
26657
+ };
26658
+ /**
26659
+ * @interface
26660
+ */
26661
+ type TGetMapDataWithCredentialsOptions$1 = {
26662
+ /**
26663
+ * Mappedin auth key.
26664
+ */
26665
+ key: string;
26666
+ /**
26667
+ * Mappedin auth secret.
26668
+ */
26669
+ secret: string;
26670
+ } & TGetMapDataSharedOptions$1;
26671
+ /**
26672
+ * @interface
26673
+ */
26674
+ type TGetMapDataWithAccessTokenOptions$1 = {
26675
+ /**
26676
+ * Mappedin access token.
26677
+ */
26678
+ accessToken: string;
26679
+ } & TGetMapDataSharedOptions$1;
26680
+ type TGetMapDataOptions$1 = TGetMapDataWithCredentialsOptions$1 | TGetMapDataWithAccessTokenOptions$1;
26335
26681
  export type THydrateMapDataBundle = {
26336
26682
  type: "binary";
26337
26683
  options?: {
@@ -26364,7 +26710,7 @@ export type THydrateMapDataBundle = {
26364
26710
  /**
26365
26711
  * Load a MapData instance from a backup including language packs. Pass in userOptions to ensure outdoor view is available.
26366
26712
  */
26367
- export declare const hydrateMapData: (backup: THydrateMapDataBundle | TMVF, userOptions?: TGetMapDataOptions) => Promise<MapData>;
26713
+ export declare const hydrateMapData: (backup: THydrateMapDataBundle | TMVF, userOptions?: TGetMapDataOptions$1) => Promise<MapData>;
26368
26714
  /**
26369
26715
  * ## MapData in Mappedin JS
26370
26716
  *
@@ -27086,13 +27432,13 @@ export declare const MAPPEDIN_COLORS: {
27086
27432
  lightTeal: string;
27087
27433
  };
27088
27434
  export type VisibilityState = {
27089
- outdoorOpacity: number;
27435
+ outdoorOpacity: number | "initial";
27090
27436
  floorStates: {
27091
27437
  floor?: Floor;
27092
27438
  state: TFloorState;
27093
27439
  }[];
27094
27440
  };
27095
- export declare function getMultiFloorState(floors: Floor[], currentFloor: Floor, floorGap: (number | "auto") | undefined, floorIdsInNavigation: Floor["id"][], floorsVisualHeightMap?: Map<number, {
27441
+ export declare function getMultiFloorState(floors: Floor[], currentFloor: Floor, floorGap: number | "auto" | undefined, floorIdsInNavigation: Floor["id"][], floorsVisualHeightMap?: Map<number, {
27096
27442
  altitude: number;
27097
27443
  effectiveHeight: number;
27098
27444
  }>): VisibilityState;
@@ -27355,7 +27701,7 @@ export type TShow3DMapOptions = {
27355
27701
  *
27356
27702
  * Returns a {@link MapData} instance from a parsed MVF object.
27357
27703
  */
27358
- export declare const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions & {
27704
+ export declare const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCredentialsOptions$1 & {
27359
27705
  languagePacks?: LanguagePackHydrationItem[];
27360
27706
  }) => Promise<MapData>;
27361
27707
  /**
@@ -27387,12 +27733,12 @@ export declare function shouldForceEnterpriseLocations(): boolean;
27387
27733
  * @example
27388
27734
  * const data = await getMapData({ key: 'api_key', secret: 'api_secret', mapId: 'id' });
27389
27735
  */
27390
- export declare const getMapData: (userOptions: TGetMapDataOptions) => Promise<MapData>;
27736
+ export declare const getMapData: (userOptions: TGetMapDataOptions$1) => Promise<MapData>;
27391
27737
  /**
27392
27738
  * @internal
27393
27739
  * @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
27394
27740
  */
27395
- export declare const getMapDataEnterprise: (userOptions: TGetMapDataOptions) => Promise<MapData>;
27741
+ export declare const getMapDataEnterprise: (userOptions: TGetMapDataOptions$1) => Promise<MapData>;
27396
27742
  /**
27397
27743
  * @internal
27398
27744
  *
@@ -27450,19 +27796,26 @@ declare namespace z {
27450
27796
 
27451
27797
  export {
27452
27798
  Camera$3 as Camera,
27799
+ Environment$1 as Environment,
27453
27800
  Feature$1 as Feature,
27454
27801
  FeatureCollection$1 as FeatureCollection,
27455
27802
  GeoJSON$1 as GeoJSON,
27456
27803
  Geometry$1 as Geometry,
27804
+ LocationSocial,
27457
27805
  LocationState,
27458
27806
  MultiPolygon$1 as MultiPolygon,
27459
27807
  Node$1 as Node,
27460
27808
  OperationHours,
27461
27809
  Point$1 as Point,
27462
27810
  Polygon$1 as Polygon,
27811
+ PubSub$1 as PubSub,
27463
27812
  RendererState as TRendererState,
27464
27813
  SiblingGroup,
27465
27814
  Style$2 as Style,
27815
+ TGetMapDataOptions$1 as TGetMapDataOptions,
27816
+ TGetMapDataSharedOptions$1 as TGetMapDataSharedOptions,
27817
+ TGetMapDataWithAccessTokenOptions$1 as TGetMapDataWithAccessTokenOptions,
27818
+ TGetMapDataWithCredentialsOptions$1 as TGetMapDataWithCredentialsOptions,
27466
27819
  TImage3DState as TImageState,
27467
27820
  TImage3DUpdateState as TImageUpdateState,
27468
27821
  TMVF,
@@ -27471,6 +27824,7 @@ export {
27471
27824
  TMVFPolygonStyle,
27472
27825
  TMVFStyle,
27473
27826
  TMVFStyleCollection,
27827
+ TSearchOptions$1 as TSearchOptions,
27474
27828
  parseMVFv2 as parseMVF,
27475
27829
  unzipMVFv2 as unzipMVF,
27476
27830
  };