@mappedin/mappedin-js 6.5.0 → 6.7.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.
@@ -1,5 +1,5 @@
1
1
  import { Color as Color$1, CompositeExpression, DiffCommand, DiffOperations, Feature as Feature$2, FeatureFilter, FeatureState, FilterSpecification, Formatted, FormattedSection, GlobalProperties, ICanonicalTileID, IMercatorCoordinate, InterpolationType, LayerSpecification, LightSpecification, Padding, ProjectionSpecification, PromoteIdSpecification, PropertyValueSpecification, ResolvedImage, SkySpecification, SourceExpression, SourceSpecification, SpriteSpecification, StylePropertyExpression, StylePropertySpecification, StyleSpecification, TerrainSpecification, TransitionSpecification, VariableAnchorOffsetCollection } from '@maplibre/maplibre-gl-style-spec';
2
- import { AnnotationCollection, AnnotationSymbol, AreaCollection, AreaId, BaseTextAreaProperties, Category as MVFCategory, CategoryId, Connection as MVFConnection, Details, EnterpriseCategory as MVFEnterpriseCategory, EnterpriseCategory as MvfEnterpriseCategory, EnterpriseCategoryId as MVFEnterpriseCategoryId, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseLocation as MvfEnterpriseLocation, EnterpriseLocationId as MVFEnterpriseLocationId, EnterpriseLocationInstance, EnterpriseTexture, EnterpriseVenue as MVFEnterpriseVenue, EntranceCollection, EntranceFeature, Facade as MVFFacade, Feature, Feature as MVFFeature, FeatureCollection, FloatingFloorTextProperties, FloorCollection, FloorId, FloorProperties as MVFFloor, FloorProperties as MvfFloor, FloorStack as MVFFloorStack, FloorStack as MvfFloorStack, FloorTextCommonProperties, Geometry, Hyperlink as MVFHyperlink, Image as MVFImage, Language, LineStringStyle, LineStringStyle as TMVFLineStringStyle, Location as MVFLocation, LocationId, LocationLink, LocationSocial, LocationState, MultiPolygon, NavigationFlagDeclarations, NodeCollection, NodeCollection as MVFNodeCollection, NodeId, ObstructionCollection, ObstructionFeature, ObstructionId, ObstructionProperties, OpeningHoursSpecification, OperationHours, ParsedMVF, ParsedMVF as TMVF, ParsedMVFLocalePack, Point, PointStyle, PointStyle as TMVFPointStyle, Polygon, PolygonStyle, PolygonStyle as TMVFPolygonStyle, SiblingGroup, SpaceCollection, SpaceFeature, SpaceId, SpaceProperties, Style as TMVFStyle, StyleCollection, StyleCollection as TMVFStyleCollection, TilesetStyle } from '@mappedin/mvf-v2';
2
+ import { AnnotationCollection, AnnotationSymbol, AreaCollection, AreaId, BaseTextAreaProperties, Category as MVFCategory, CategoryId, Connection as MVFConnection, Details, EnterpriseCategory as MVFEnterpriseCategory, EnterpriseCategory as MvfEnterpriseCategory, EnterpriseCategoryId as MVFEnterpriseCategoryId, EnterpriseLocation as MVFEnterpriseLocation, EnterpriseLocation as MvfEnterpriseLocation, EnterpriseLocationId as MVFEnterpriseLocationId, EnterpriseLocationInstance, EnterpriseTexture, EnterpriseVenue as MVFEnterpriseVenue, EnterpriseVenueType, EntranceCollection, EntranceFeature, Facade as MVFFacade, Feature, Feature as MVFFeature, FeatureCollection, FloatingFloorTextProperties, FloorCollection, FloorId, FloorProperties as MVFFloor, FloorProperties as MvfFloor, FloorStack as MVFFloorStack, FloorStack as MvfFloorStack, FloorTextCommonProperties, Geometry, Hyperlink as MVFHyperlink, Image as MVFImage, Language, LineStringStyle, LineStringStyle as TMVFLineStringStyle, Location as MVFLocation, LocationId, LocationLink, LocationSocial, LocationState, MultiPolygon, NavigationFlagDeclarations, NodeCollection, NodeCollection as MVFNodeCollection, NodeId, ObstructionCollection, ObstructionFeature, ObstructionId, ObstructionProperties, OpeningHoursSpecification, OperationHours, ParsedMVF, ParsedMVF as TMVF, ParsedMVFLocalePack, Point, PointStyle, PointStyle as TMVFPointStyle, Polygon, PolygonStyle, PolygonStyle as TMVFPolygonStyle, SiblingGroup, SpaceCollection, SpaceFeature, SpaceId, SpaceProperties, Style as TMVFStyle, StyleCollection, StyleCollection as TMVFStyleCollection, TilesetStyle } from '@mappedin/mvf-v2';
3
3
  import { ParsedMVF, RawMVF } from '@mappedin/mvf-v2/no-validator';
4
4
  import { Group as TweenGroup, Tween } from '@tweenjs/tween.js';
5
5
  import { AmbientLight, BatchedMesh, BatchedMeshGeometryRange, BufferAttribute, BufferGeometry, Camera, Camera as ThreeCamera, Color, DirectionalLight, Group, Intersection, LineSegments, Mesh, MeshLambertMaterial, MeshLambertMaterialParameters, Object3D, Object3DEventMap, PerspectiveCamera, Plane, PlaneGeometry, Raycaster, Scene, ShaderMaterial, Texture, TubeGeometry, Vector2, Vector3, WebGLRenderer } from 'three';
@@ -1009,6 +1009,7 @@ declare class BatchedStandardMaterial extends MeshLambertMaterial {
1009
1009
  removeSideTexture(batchId: number): void;
1010
1010
  removeTopTexture(batchId: number): void;
1011
1011
  dispose(): void;
1012
+ clone(params?: MeshLambertMaterialParameters): this;
1012
1013
  }
1013
1014
  interface StandardSchemaV1<Input = unknown, Output = Input> {
1014
1015
  /** The Standard Schema properties. */
@@ -4837,6 +4838,44 @@ type PathState = {
4837
4838
  * Only applies when smoothingTension > 0.
4838
4839
  */
4839
4840
  smoothingCornerRadius: number;
4841
+ /**
4842
+ * Whether the path should be rendered as a dashed line.
4843
+ */
4844
+ dashed: boolean;
4845
+ /**
4846
+ * Length of each dash segment as fraction of path (0-1).
4847
+ */
4848
+ dashLength: number;
4849
+ /**
4850
+ * Length of each gap between dashes as fraction of path (0-1).
4851
+ */
4852
+ dashGap: number;
4853
+ /**
4854
+ * When true, dashSize and gapSize are interpreted as multiples of path width.
4855
+ * When false, dashLength and dashGap are used as fractions of path length.
4856
+ */
4857
+ dashRelativeToWidth: boolean;
4858
+ /**
4859
+ * Length of each dash as a multiple of path width. Only used when dashRelativeToWidth is true.
4860
+ */
4861
+ dashSize: number;
4862
+ /**
4863
+ * Length of each gap as a multiple of path width. Only used when dashRelativeToWidth is true.
4864
+ */
4865
+ gapSize: number;
4866
+ /**
4867
+ * When true, dashMeters and gapMeters are used as absolute sizes in meters.
4868
+ * Takes precedence over dashRelativeToWidth.
4869
+ */
4870
+ dashAbsolute: boolean;
4871
+ /**
4872
+ * Length of each dash in meters. Only used when dashAbsolute is true.
4873
+ */
4874
+ dashMeters: number;
4875
+ /**
4876
+ * Length of each gap in meters. Only used when dashAbsolute is true.
4877
+ */
4878
+ gapMeters: number;
4840
4879
  };
4841
4880
  type AddPathOptions = {
4842
4881
  /**
@@ -4908,6 +4947,48 @@ type AddPathOptions = {
4908
4947
  * @default 0.0
4909
4948
  */
4910
4949
  smoothingCornerRadius?: number;
4950
+ /**
4951
+ * Length of each dash segment as fraction of path (0-1).
4952
+ * @default 0.1
4953
+ */
4954
+ dashLength?: number;
4955
+ /**
4956
+ * Length of each gap between dashes as fraction of path (0-1).
4957
+ * @default 0.1
4958
+ */
4959
+ dashGap?: number;
4960
+ /**
4961
+ * When true, dashSize and gapSize are interpreted as multiples of path width (deck.gl style).
4962
+ * When false (default), dashLength and dashGap are used as fractions of path length.
4963
+ * @default false
4964
+ */
4965
+ dashRelativeToWidth?: boolean;
4966
+ /**
4967
+ * Length of each dash as a multiple of path width. Only used when dashRelativeToWidth is true.
4968
+ * @default 3.0
4969
+ */
4970
+ dashSize?: number;
4971
+ /**
4972
+ * Length of each gap as a multiple of path width. Only used when dashRelativeToWidth is true.
4973
+ * @default 2.0
4974
+ */
4975
+ gapSize?: number;
4976
+ /**
4977
+ * When true, dashMeters and gapMeters are used as absolute sizes in meters.
4978
+ * Takes precedence over dashRelativeToWidth.
4979
+ * @default false
4980
+ */
4981
+ dashAbsolute?: boolean;
4982
+ /**
4983
+ * Length of each dash in meters. Only used when dashAbsolute is true.
4984
+ * @default 1.0
4985
+ */
4986
+ dashMeters?: number;
4987
+ /**
4988
+ * Length of each gap in meters. Only used when dashAbsolute is true.
4989
+ * @default 0.5
4990
+ */
4991
+ gapMeters?: number;
4911
4992
  };
4912
4993
  declare class PathComponent {
4913
4994
  #private;
@@ -4936,6 +5017,14 @@ declare class PathComponent {
4936
5017
  dashed: boolean;
4937
5018
  smoothingTension: number;
4938
5019
  smoothingCornerRadius: number;
5020
+ dashLength: number;
5021
+ dashGap: number;
5022
+ dashRelativeToWidth: boolean;
5023
+ dashSize: number;
5024
+ gapSize: number;
5025
+ dashAbsolute: boolean;
5026
+ dashMeters: number;
5027
+ gapMeters: number;
4939
5028
  /**
4940
5029
  * If the path is vertical it will be rebuilt whenever altitudeDirty = true. This will be set during the first render of the path.
4941
5030
  */
@@ -5129,8 +5218,11 @@ declare class OutlineComponent implements Outline {
5129
5218
  }
5130
5219
  declare class FocusableComponent {
5131
5220
  readonly type: "focusable";
5132
- focusMesh?: Mesh;
5133
5221
  dirty: boolean;
5222
+ /**
5223
+ * Vertices of the geometry in world space
5224
+ */
5225
+ vertices?: Vector3[];
5134
5226
  }
5135
5227
  type TextureStyle = {
5136
5228
  texture?: SingleTexture;
@@ -5387,6 +5479,38 @@ interface PathUniforms {
5387
5479
  type: "f";
5388
5480
  value: number;
5389
5481
  };
5482
+ dashLength: {
5483
+ type: "f";
5484
+ value: number;
5485
+ };
5486
+ dashGap: {
5487
+ type: "f";
5488
+ value: number;
5489
+ };
5490
+ dashRelativeToWidth: {
5491
+ type: "b";
5492
+ value: boolean;
5493
+ };
5494
+ dashSize: {
5495
+ type: "f";
5496
+ value: number;
5497
+ };
5498
+ gapSize: {
5499
+ type: "f";
5500
+ value: number;
5501
+ };
5502
+ dashAbsolute: {
5503
+ type: "b";
5504
+ value: boolean;
5505
+ };
5506
+ dashMeters: {
5507
+ type: "f";
5508
+ value: number;
5509
+ };
5510
+ gapMeters: {
5511
+ type: "f";
5512
+ value: number;
5513
+ };
5390
5514
  }
5391
5515
  declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
5392
5516
  /**
@@ -5397,13 +5521,37 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
5397
5521
  /**
5398
5522
  * @private
5399
5523
  * @internal
5524
+ * AbortController for managing lifecycle and cleanup
5525
+ */
5526
+ private _abortController;
5527
+ /**
5528
+ * @protected
5529
+ * @internal
5530
+ * Tracks all cleanup functions for subscriptions made via on()
5400
5531
  */
5401
- private _destroyed;
5532
+ protected _cleanupFunctions: Array<() => void>;
5533
+ /**
5534
+ * Returns the AbortSignal for this PubSub instance.
5535
+ * Use this signal with APIs that support cancellation (fetch, addEventListener, etc.)
5536
+ * When the PubSub is destroyed, the signal will be aborted and all listeners using it will be automatically removed.
5537
+ *
5538
+ * @example
5539
+ * ```typescript
5540
+ * // Automatically cleaned up when PubSub is destroyed
5541
+ * pubsub.addEventListener(window, 'resize', handler, { signal: pubsub.signal });
5542
+ * ```
5543
+ */
5544
+ get signal(): AbortSignal;
5402
5545
  /**
5403
5546
  * @private
5404
5547
  * @internal
5405
5548
  */
5406
5549
  publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
5550
+ /**
5551
+ * Subscribe a function to be called when the signal is aborted.
5552
+ * @param fn The function to call when the signal is aborted.
5553
+ */
5554
+ onAbort<T extends (...args: any[]) => void>(fn: T): void;
5407
5555
  /**
5408
5556
  * Subscribe a function to an event.
5409
5557
  *
@@ -5411,6 +5559,9 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
5411
5559
  * function.
5412
5560
  * @param fn A callback that gets called when the corresponding event is fired. The
5413
5561
  * callback will get passed an argument with a type that's one of event payloads.
5562
+ * @param options Optional options object. If a signal is provided, the subscription will be
5563
+ * automatically cleaned up when that signal is aborted.
5564
+ * @returns A cleanup function that unsubscribes the event listener when called.
5414
5565
  * @example
5415
5566
  * // Subscribe to the 'click' event
5416
5567
  * const handler = (event) => {
@@ -5422,7 +5573,9 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
5422
5573
  */
5423
5574
  on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
5424
5575
  data: null;
5425
- } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
5576
+ } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void, options?: {
5577
+ signal?: AbortSignal;
5578
+ }): () => void;
5426
5579
  /**
5427
5580
  * Unsubscribe a function previously subscribed with {@link on}
5428
5581
  *
@@ -5443,6 +5596,7 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
5443
5596
  /**
5444
5597
  * @private
5445
5598
  * @internal
5599
+ * Destroys the PubSub instance and automatically unsubscribes all listeners registered via on().
5446
5600
  */
5447
5601
  destroy(): void;
5448
5602
  }
@@ -5702,13 +5856,37 @@ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof
5702
5856
  /**
5703
5857
  * @private
5704
5858
  * @internal
5859
+ * AbortController for managing lifecycle and cleanup
5705
5860
  */
5706
- private _destroyed;
5861
+ private _abortController;
5862
+ /**
5863
+ * @protected
5864
+ * @internal
5865
+ * Tracks all cleanup functions for subscriptions made via on()
5866
+ */
5867
+ protected _cleanupFunctions: Array<() => void>;
5868
+ /**
5869
+ * Returns the AbortSignal for this PubSub instance.
5870
+ * Use this signal with APIs that support cancellation (fetch, addEventListener, etc.)
5871
+ * When the PubSub is destroyed, the signal will be aborted and all listeners using it will be automatically removed.
5872
+ *
5873
+ * @example
5874
+ * ```typescript
5875
+ * // Automatically cleaned up when PubSub is destroyed
5876
+ * pubsub.addEventListener(window, 'resize', handler, { signal: pubsub.signal });
5877
+ * ```
5878
+ */
5879
+ get signal(): AbortSignal;
5707
5880
  /**
5708
5881
  * @private
5709
5882
  * @internal
5710
5883
  */
5711
5884
  publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
5885
+ /**
5886
+ * Subscribe a function to be called when the signal is aborted.
5887
+ * @param fn The function to call when the signal is aborted.
5888
+ */
5889
+ onAbort<T extends (...args: any[]) => void>(fn: T): void;
5712
5890
  /**
5713
5891
  * Subscribe a function to an event.
5714
5892
  *
@@ -5716,6 +5894,9 @@ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof
5716
5894
  * function.
5717
5895
  * @param fn A callback that gets called when the corresponding event is fired. The
5718
5896
  * callback will get passed an argument with a type that's one of event payloads.
5897
+ * @param options Optional options object. If a signal is provided, the subscription will be
5898
+ * automatically cleaned up when that signal is aborted.
5899
+ * @returns A cleanup function that unsubscribes the event listener when called.
5719
5900
  * @example
5720
5901
  * // Subscribe to the 'click' event
5721
5902
  * const handler = (event) => {
@@ -5727,7 +5908,9 @@ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof
5727
5908
  */
5728
5909
  on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
5729
5910
  data: null;
5730
- } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
5911
+ } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void, options?: {
5912
+ signal?: AbortSignal;
5913
+ }): () => void;
5731
5914
  /**
5732
5915
  * Unsubscribe a function previously subscribed with {@link on}
5733
5916
  *
@@ -5748,6 +5931,7 @@ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof
5748
5931
  /**
5749
5932
  * @private
5750
5933
  * @internal
5934
+ * Destroys the PubSub instance and automatically unsubscribes all listeners registered via on().
5751
5935
  */
5752
5936
  destroy(): void;
5753
5937
  }
@@ -15989,12 +16173,6 @@ declare class DOMVisibilitySystem {
15989
16173
  constructor(state: RendererState, domTree: Entity2DHTMLDivElementContainer);
15990
16174
  update(): void;
15991
16175
  }
15992
- declare class TwoDProjectionSystem {
15993
- state: RendererState;
15994
- project: (projection: Vector2, position: Vector3) => void;
15995
- constructor(state: RendererState, project: (projection: Vector2, position: Vector3) => void);
15996
- update(): void;
15997
- }
15998
16176
  declare enum PINVISIBILITY {
15999
16177
  /** The pin is visible. */
16000
16178
  ACTIVE = 1,
@@ -16697,7 +16875,6 @@ declare class CameraSystem extends PubSub<CameraEvents> {
16697
16875
  private addMouseEventListeners;
16698
16876
  private addMouseMoveEventListeners;
16699
16877
  private removeMouseMoveEventListeners;
16700
- private removeEventListeners;
16701
16878
  private removeMouseUpEventListeners;
16702
16879
  private onContextMenu;
16703
16880
  private onMouseUp;
@@ -16818,7 +16995,11 @@ export declare const ANIMATION_TWEENS: {
16818
16995
  "ease-out": (amount: number) => number;
16819
16996
  "ease-in-out": (amount: number) => number;
16820
16997
  };
16821
- declare class Camera$2 {
16998
+ declare class Camera$2 extends PubSub$1<{
16999
+ "padding-change": {
17000
+ padding: InsetPadding;
17001
+ };
17002
+ }> {
16822
17003
  #private;
16823
17004
  /**
16824
17005
  * @internal
@@ -17111,7 +17292,7 @@ declare class ImageSystem extends PubSub$1<{
17111
17292
  private naturalBearing;
17112
17293
  private imagePlacementOptions;
17113
17294
  private cameraFrustum;
17114
- constructor(rendererState: RendererState, convertTo3DMapPosition: Core["convertTo3DMapPosition"], projectToScreen: (projectVector: Vector2, position: Vector3) => void, initialBearing?: number, naturalBearing?: number, imagePlacementOptions?: ImagePlacementOptions);
17295
+ constructor(rendererState: RendererState, convertTo3DMapPosition: Core["convertTo3DMapPosition"], projectToScreen: Core["project"], initialBearing?: number, naturalBearing?: number, imagePlacementOptions?: ImagePlacementOptions);
17115
17296
  private createImageMesh;
17116
17297
  private getOrDownloadImage;
17117
17298
  /**
@@ -17140,28 +17321,59 @@ declare class GeometryInFocusSystem extends PubSub$1<{
17140
17321
  focusablesDirty: boolean;
17141
17322
  private state;
17142
17323
  private camera;
17324
+ private projectToScreen;
17325
+ private cameraFrustum;
17326
+ private viewProjectionMatrix;
17327
+ private tempScreenPos;
17143
17328
  private debugEl;
17144
- private raycasters;
17145
17329
  private collisions;
17146
17330
  private focusableEntities;
17147
- private debugRaycasters;
17148
- constructor(state: RendererState, camera: PerspectiveCamera);
17331
+ private debug;
17332
+ private debugBBoxElements;
17333
+ private debugVertexDots;
17334
+ private viewfinder;
17335
+ private screenBoundsMap;
17336
+ private screenDiagonal;
17337
+ constructor(state: RendererState, camera: PerspectiveCamera, projectToScreen: Core["project"]);
17149
17338
  resize(): void;
17150
17339
  /**
17151
- * Build 5 raycasters, one for the center of the screen, and one for each corner of the screen.
17152
- * the center one has the highest weight, and the corners have the lowest weight.
17153
- * this allows us to detect focus closer to the center of the screen more easily.
17340
+ * Everything within this square is considered "in focus" and ranked based on proximity to center.
17341
+ */
17342
+ private createViewfinder;
17343
+ /**
17344
+ * Filters vertices to keep only those on the perimeter (convex hull)
17345
+ * @param vertices - Array of all vertices in world space
17346
+ * @returns Array of perimeter vertices in world space
17154
17347
  */
17155
- private buildRaycasters;
17348
+ private simplifyVertices;
17349
+ /**
17350
+ * Projects a 3D vertex from world space to screen coordinates
17351
+ * @param worldPosition - Position in world space
17352
+ */
17353
+ private projectVertexToScreen;
17354
+ /**
17355
+ * Computes screen-space bounding box and depth info from world-space vertices
17356
+ * Projects all vertices to screen space and finds the bounding box
17357
+ * Only culls if ALL vertices are outside the camera frustum
17358
+ */
17359
+ private computeScreenSpaceBounds;
17156
17360
  private updateFocusableEntities;
17157
17361
  update: (cameraIsMoving?: boolean, cameraStoppedMovingTime?: number) => void;
17158
17362
  updateRaf(): void;
17159
- raycast(): void;
17160
- showRaycasters(): void;
17161
- hideRaycasters(): void;
17363
+ /**
17364
+ * Updates debug visualization for screen-space bounding boxes
17365
+ */
17366
+ private updateDebugBBoxes;
17367
+ /**
17368
+ * Updates debug visualization for vertex dots on screen
17369
+ */
17370
+ private updateDebugVertexDots;
17371
+ compute(): void;
17372
+ showDebug(): void;
17373
+ hideDebug(): void;
17162
17374
  destroy(): void;
17163
17375
  }
17164
- declare class OutdoorLayers {
17376
+ declare class OutdoorLayers extends PubSub<{}> {
17165
17377
  #private;
17166
17378
  idleQueue: IdleQueue;
17167
17379
  hideLayersIntersectingPolygons(polygons: Feature$1<Polygon$1 | MultiPolygon$1, any>[], layers: string[]): void;
@@ -17371,6 +17583,12 @@ declare class Core extends PubSub<MapEvent> {
17371
17583
  * @internal
17372
17584
  */
17373
17585
  constructor(container: HTMLElement, options?: RendererCoreOptions);
17586
+ /**
17587
+ * Projects a position into screen space. If a Vector3 is provided, the z-coordinate will include the depth from the camera.
17588
+ * @param projectVector - The vector to project the position into
17589
+ * @param position - The position to project
17590
+ */
17591
+ private project;
17374
17592
  /**
17375
17593
  * Add a container that can hold other containers, geometry groups, markers, labels and paths. Use this to group entities together.
17376
17594
  */
@@ -17489,6 +17707,12 @@ declare class Core extends PubSub<MapEvent> {
17489
17707
  getState<T extends EntityId<EntityState>>(geometryOrGeometryId: T): T extends EntityId<LabelState> ? LabelState : T extends EntityId<GeometryState> ? GeometryState : T extends EntityId<MarkerState> ? MarkerState : T extends EntityId<GeometryGroupState> ? GeometryGroupState : T extends EntityId<GroupContainerState> ? GroupContainerState : T extends EntityId<ModelState> ? ModelState : T extends EntityId<PathState> ? PathState : T extends EntityId<ShapeState> ? ShapeState : T extends EntityId<ImageState> ? ImageState : T extends EntityId<Text3DState> ? Text3DState : EntityState;
17490
17708
  getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
17491
17709
  getState<T extends EntityState>(geometryOrGeometryId: T["id"]): T extends LabelState ? LabelState : T extends GeometryState ? GeometryState : T extends MarkerState ? MarkerState : T extends GeometryGroupState ? GeometryGroupState : T extends GroupContainerState ? GroupContainerState : T extends ModelState ? ModelState : T extends PathState ? PathState : T extends ShapeState ? ShapeState : T extends ImageState ? ImageState : EntityState;
17710
+ /**
17711
+ * Get rendered state for an entity (e.g., runtime rendering state that changes frequently)
17712
+ * @param entity The entity to get rendered state for
17713
+ * @returns Object with all available rendered state properties, or undefined if not found
17714
+ */
17715
+ getRenderedState(entity: EntityId<LabelState> | string | number): LabelRenderedState | undefined;
17492
17716
  /**
17493
17717
  * Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
17494
17718
  */
@@ -17618,16 +17842,7 @@ declare class Core extends PubSub<MapEvent> {
17618
17842
  /**
17619
17843
  * Remove a MapLibre event listener
17620
17844
  */
17621
- offMapLibreEvent(event: keyof MapEventType, handler: (...args: any[]) => void): void;
17622
- /**
17623
- * Returns true if the renderer has been aborted.
17624
- */
17625
- get aborted(): boolean;
17626
- /**
17627
- * Register a handler once to be called when the renderer is aborted.
17628
- * The handler will be removed after it is called.
17629
- */
17630
- onAbort(handler: () => void): void;
17845
+ offMapLibreEvent(event: LiteralUnion<keyof MapEventType, string>, handler: (...args: any[]) => void): void;
17631
17846
  /**
17632
17847
  * @internal for testing
17633
17848
  */
@@ -17656,7 +17871,7 @@ declare class Core extends PubSub<MapEvent> {
17656
17871
  * };
17657
17872
  * map.on('click', handler);
17658
17873
  */
17659
- on: <EventName extends keyof MapEvent>(eventName: EventName, fn: (payload: MapEventPayload<EventName>) => void) => void;
17874
+ on: PubSub<MapEvent>["on"];
17660
17875
  /**
17661
17876
  * Unsubscribe a function previously subscribed with {@link on}
17662
17877
  *
@@ -17671,7 +17886,7 @@ declare class Core extends PubSub<MapEvent> {
17671
17886
  * };
17672
17887
  * map.off('click', handler);
17673
17888
  */
17674
- off: <EventName extends keyof MapEvent>(eventName: EventName, fn: (payload: MapEventPayload<EventName>) => void) => void;
17889
+ off: PubSub<MapEvent>["off"];
17675
17890
  /**
17676
17891
  * @hidden
17677
17892
  * Returns the current cursor decided by Mappedin. This is useful when integrating with other overlays to show the correct user interaction.
@@ -17841,6 +18056,7 @@ declare class LabelComponent {
17841
18056
  get scaledPinSize(): number;
17842
18057
  iconPadding: number;
17843
18058
  get scaledIconPadding(): number;
18059
+ get textVisible(): boolean;
17844
18060
  dirty: boolean;
17845
18061
  textDirty: boolean;
17846
18062
  pinDirty: boolean;
@@ -18212,6 +18428,12 @@ type MapEvent = {
18212
18428
  * If outdoor view is enabled, this is fired when the style first loads or changes.
18213
18429
  */
18214
18430
  "outdoor-style-loaded": undefined;
18431
+ /**
18432
+ * Fired when outdoor style loading fails. The map will fall back to indoor-only rendering.
18433
+ */
18434
+ "outdoor-style-error": {
18435
+ error: unknown;
18436
+ };
18215
18437
  /**
18216
18438
  * Fired when the user starts interacting with the map.
18217
18439
  */
@@ -18242,9 +18464,6 @@ type MapEvent = {
18242
18464
  resize: undefined;
18243
18465
  "pan-bounds-change": PanBounds;
18244
18466
  };
18245
- type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] extends {
18246
- data: null;
18247
- } ? MapEvent[EventName]["data"] : MapEvent[EventName];
18248
18467
  type All3DTypes = Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D;
18249
18468
  type RendererState = {
18250
18469
  /**
@@ -18342,6 +18561,12 @@ type ImagePlacementOptions = {
18342
18561
  */
18343
18562
  minimumSizeRatio?: number;
18344
18563
  };
18564
+ type LabelRenderedState = {
18565
+ /**
18566
+ * whether the text is visible
18567
+ */
18568
+ textVisible: boolean;
18569
+ };
18345
18570
  declare const collisionRankingTierSchema: z.ZodUnion<readonly [
18346
18571
  z.ZodEnum<{
18347
18572
  low: "low";
@@ -19069,7 +19294,10 @@ declare class FloorObject implements MVFFloor {
19069
19294
  facadesByStyleId: Map<string, string[]>;
19070
19295
  get geoJSONBoundingBox(): BBox | undefined;
19071
19296
  constructor(parentId: string, floor: MVFFloor, mapObject: GeojsonApiMapObject, multiFloorView: Required<TShow3DMapOptions["multiFloorView"]>, options: TShow3DMapOptions, mvf?: ParsedMVF, styleMap?: AggregatedStyleMap, mapDataInternal?: MapDataInternal);
19072
- load: () => this;
19297
+ /**
19298
+ * @param focusable - Whether the floor is part of a building and should be focusable. This will be set on the geometry layer.
19299
+ */
19300
+ load: (focusable?: boolean) => this;
19073
19301
  /**
19074
19302
  * Add an occluder to the floor if it has a footprint.
19075
19303
  */
@@ -19080,6 +19308,7 @@ declare class FloorObject implements MVFFloor {
19080
19308
  get hasFacadeGeometry(): boolean;
19081
19309
  get visible(): boolean;
19082
19310
  setVisible(visible: boolean): void;
19311
+ setBatchedTextVisible(visible: boolean): void;
19083
19312
  }
19084
19313
  declare class FloorStackObject implements Omit<MVFFloorStack, "maps" | "floors" | "defaultFloor" | "footprint"> {
19085
19314
  #private;
@@ -19095,7 +19324,6 @@ declare class FloorStackObject implements Omit<MVFFloorStack, "maps" | "floors"
19095
19324
  metadata?: MVFFloorStack["metadata"];
19096
19325
  containerId: string;
19097
19326
  facade?: MVFFacade;
19098
- private renderer;
19099
19327
  constructor(floorStack: MVFFloorStack, parentId: string, renderer: Core, facade?: MVFFacade);
19100
19328
  get defaultFloor(): FloorObject;
19101
19329
  /**
@@ -19967,6 +20195,22 @@ export declare class MapView {
19967
20195
  * ```
19968
20196
  */
19969
20197
  getState<T extends MapElementsWithState>(target: T): TGetState<T>;
20198
+ /**
20199
+ * Gets the rendered state of a map element.
20200
+ *
20201
+ * Retrieves runtime rendering state that changes frequently, such as text visibility for labels.
20202
+ *
20203
+ * @param target The map element to get the rendered state for.
20204
+ * @returns An object containing the requested rendered state keys, or undefined if not found.
20205
+ *
20206
+ * @example Get label text visibility
20207
+ * ```ts
20208
+ * const label = mapView.Labels.add(space, 'Hello');
20209
+ * const renderedState = mapView.__EXPERIMENTAL__getRenderedState(label);
20210
+ * console.log('Text visible:', renderedState?.textVisible);
20211
+ * ```
20212
+ */
20213
+ __EXPERIMENTAL__getRenderedState<T extends MapElementWithRenderedState>(target: T): TGetRenderedState<T> | undefined;
19970
20214
  /**
19971
20215
  * Sets the hover color for map elements.
19972
20216
  *
@@ -21592,6 +21836,9 @@ declare const floorStateSchemaPartial: z.ZodObject<{
21592
21836
  type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"floor.areas">>>;
21593
21837
  visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
21594
21838
  }, z.core.$strip>>;
21839
+ text3d: z.ZodOptional<z.ZodObject<{
21840
+ visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
21841
+ }, z.core.$strip>>;
21595
21842
  type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"floor">>>;
21596
21843
  visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
21597
21844
  altitude: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
@@ -21639,6 +21886,9 @@ declare const floorStateSchemaStrict: z.ZodObject<{
21639
21886
  type: z.ZodDefault<z.ZodLiteral<"floor.areas">>;
21640
21887
  visible: z.ZodDefault<z.ZodBoolean>;
21641
21888
  }, z.core.$strict>;
21889
+ text3d: z.ZodObject<{
21890
+ visible: z.ZodDefault<z.ZodBoolean>;
21891
+ }, z.core.$strict>;
21642
21892
  type: z.ZodDefault<z.ZodLiteral<"floor">>;
21643
21893
  visible: z.ZodDefault<z.ZodBoolean>;
21644
21894
  altitude: z.ZodDefault<z.ZodNumber>;
@@ -21870,6 +22120,24 @@ declare const pathStateSchemaPartial: z.ZodObject<{
21870
22120
  xrayOpacity: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
21871
22121
  __EXPERIMENTAL_SMOOTHING_TENSION: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
21872
22122
  __EXPERIMENTAL_SMOOTHING_CORNER_RADIUS: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
22123
+ dashed: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
22124
+ __EXPERIMENTAL_DASH_OPTIONS: z.ZodOptional<z.ZodOptional<z.ZodDiscriminatedUnion<[
22125
+ z.ZodObject<{
22126
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"length-scaling">;
22127
+ __EXPERIMENTAL_DASH_LENGTH: z.ZodDefault<z.ZodNumber>;
22128
+ __EXPERIMENTAL_DASH_GAP: z.ZodDefault<z.ZodNumber>;
22129
+ }, z.core.$strip>,
22130
+ z.ZodObject<{
22131
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"width-scaling">;
22132
+ __EXPERIMENTAL_DASH_SIZE: z.ZodDefault<z.ZodNumber>;
22133
+ __EXPERIMENTAL_GAP_SIZE: z.ZodDefault<z.ZodNumber>;
22134
+ }, z.core.$strip>,
22135
+ z.ZodObject<{
22136
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"absolute">;
22137
+ __EXPERIMENTAL_DASH_METERS: z.ZodDefault<z.ZodNumber>;
22138
+ __EXPERIMENTAL_GAP_METERS: z.ZodDefault<z.ZodNumber>;
22139
+ }, z.core.$strip>
22140
+ ], "__EXPERIMENTAL_DASH_MODE">>>;
21873
22141
  }, z.core.$strip>;
21874
22142
  declare const pathStateSchemaStrict: z.ZodObject<{
21875
22143
  type: z.ZodDefault<z.ZodLiteral<"path">>;
@@ -21886,9 +22154,27 @@ declare const pathStateSchemaStrict: z.ZodObject<{
21886
22154
  xrayOpacity: z.ZodDefault<z.ZodNumber>;
21887
22155
  __EXPERIMENTAL_SMOOTHING_TENSION: z.ZodDefault<z.ZodNumber>;
21888
22156
  __EXPERIMENTAL_SMOOTHING_CORNER_RADIUS: z.ZodDefault<z.ZodNumber>;
22157
+ dashed: z.ZodDefault<z.ZodBoolean>;
22158
+ __EXPERIMENTAL_DASH_OPTIONS: z.ZodOptional<z.ZodDiscriminatedUnion<[
22159
+ z.ZodObject<{
22160
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"length-scaling">;
22161
+ __EXPERIMENTAL_DASH_LENGTH: z.ZodDefault<z.ZodNumber>;
22162
+ __EXPERIMENTAL_DASH_GAP: z.ZodDefault<z.ZodNumber>;
22163
+ }, z.core.$strip>,
22164
+ z.ZodObject<{
22165
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"width-scaling">;
22166
+ __EXPERIMENTAL_DASH_SIZE: z.ZodDefault<z.ZodNumber>;
22167
+ __EXPERIMENTAL_GAP_SIZE: z.ZodDefault<z.ZodNumber>;
22168
+ }, z.core.$strip>,
22169
+ z.ZodObject<{
22170
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"absolute">;
22171
+ __EXPERIMENTAL_DASH_METERS: z.ZodDefault<z.ZodNumber>;
22172
+ __EXPERIMENTAL_GAP_METERS: z.ZodDefault<z.ZodNumber>;
22173
+ }, z.core.$strip>
22174
+ ], "__EXPERIMENTAL_DASH_MODE">>;
21889
22175
  }, z.core.$strict>;
21890
22176
  export type TPathState = z.infer<typeof pathStateSchemaStrict>;
21891
- export type TPathUpdateState = z.infer<typeof pathStateSchemaPartial>;
22177
+ export type TPathUpdateState = z.input<typeof pathStateSchemaPartial>;
21892
22178
  declare const shapeStateSchemaPartial: z.ZodObject<{
21893
22179
  type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"shape">>>;
21894
22180
  visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
@@ -22229,6 +22515,7 @@ declare class GeoJsonApi extends PubSub$1<TNavigationEvents> {
22229
22515
  get currentFloorStack(): FloorStack;
22230
22516
  get currentFloor(): Floor;
22231
22517
  getState<T extends MapElementsWithState | string>(target: T): TGetState<T>;
22518
+ __EXPERIMENTAL__getRenderedState<T extends MapElementWithRenderedState>(target: T): TGetRenderedState<T> | undefined;
22232
22519
  setHoverColor(c: string): void;
22233
22520
  getHoverColor(): string | undefined;
22234
22521
  /**
@@ -22447,17 +22734,55 @@ type DirectionProperties = {
22447
22734
  };
22448
22735
  type DirectionFeature = Feature$1<Point$1, DirectionProperties>;
22449
22736
  type DirectionsCollection = FeatureCollection$1<Point$1, DirectionProperties>;
22450
- type SimplifyDirectionsOptions = {
22737
+ interface DoorGeometry {
22738
+ geoJSON: {
22739
+ geometry: {
22740
+ coordinates: [
22741
+ [
22742
+ number,
22743
+ number
22744
+ ],
22745
+ [
22746
+ number,
22747
+ number
22748
+ ]
22749
+ ];
22750
+ };
22751
+ };
22752
+ }
22753
+ type BaseSimplifyOptions = {
22451
22754
  /**
22452
22755
  * Enable or disable simplifying.
22453
22756
  */
22454
22757
  enabled: boolean;
22455
22758
  /**
22456
22759
  * The radius of the buffer around the path to consider when simplifying, in meters.
22457
- * @default 0.7
22760
+ * @default 0.4
22761
+ */
22762
+ radius?: number;
22763
+ };
22764
+ type GreedyLosOptions = BaseSimplifyOptions & {
22765
+ __EXPERIMENTAL_METHOD?: "greedy-los";
22766
+ };
22767
+ type RdpOptions = BaseSimplifyOptions & {
22768
+ __EXPERIMENTAL_METHOD: "rdp";
22769
+ /**
22770
+ * Whether to include door-adjacent nodes (predecessor/successor of doors) in the must-include set.
22771
+ * When true, nodes immediately before and after doors are preserved during simplification.
22772
+ * @default true
22458
22773
  */
22459
- bufferRadius?: number;
22774
+ mustIncludeDoorBufferNodes?: boolean;
22460
22775
  };
22776
+ type DpOptimalOptions = BaseSimplifyOptions & {
22777
+ __EXPERIMENTAL_METHOD: "dp-optimal";
22778
+ /**
22779
+ * Whether to include door buffer nodes in DP simplification.
22780
+ * When true, predecessor and successor nodes of doors are marked with preventSmoothing.
22781
+ * @default false
22782
+ */
22783
+ includeDoorBufferNodes?: boolean;
22784
+ };
22785
+ type SimplifyDirectionsOptions = GreedyLosOptions | RdpOptions | DpOptimalOptions;
22461
22786
  type DirectionsZone = {
22462
22787
  geometry: Feature$1<MultiPolygon$1 | Polygon$1>;
22463
22788
  /**
@@ -22475,6 +22800,7 @@ declare class Navigator$1 {
22475
22800
  graph: NavigationGraph;
22476
22801
  private geometryEdgesByMapId;
22477
22802
  private flagDeclarations;
22803
+ private getDoorByNodeId;
22478
22804
  private disabledNodeIds;
22479
22805
  /**
22480
22806
  * Constructs a Navigator instance to manage pathfinding with optional obstructions and grouping features.
@@ -22483,13 +22809,15 @@ declare class Navigator$1 {
22483
22809
  * @param {ObstructionCollection} [obstructions] - Optional collection of obstructions that could block paths.
22484
22810
  * @param {SpaceCollection} [spaces] - Optional collection of spaces that could block paths.
22485
22811
  * @param {string} [groupBy] - Optional property name to group nodes and paths for differentiated processing.
22812
+ * @param {Function} getDoorByNodeId - Function to get door object by node ID.
22486
22813
  */
22487
- constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, }: {
22814
+ constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, getDoorByNodeId, }: {
22488
22815
  nodes: NodeCollection$1;
22489
22816
  geojsonCollection?: ObstructionCollection | SpaceCollection;
22490
22817
  groupBy?: string;
22491
22818
  multiplicativeDistanceWeightScaling?: boolean;
22492
22819
  flagDeclarations?: NavigationFlagDeclarations;
22820
+ getDoorByNodeId: (nodeId: string) => DoorGeometry | undefined;
22493
22821
  });
22494
22822
  private getDisabledNodeIds;
22495
22823
  /**
@@ -22502,9 +22830,11 @@ declare class Navigator$1 {
22502
22830
  * @param {SimplifyDirectionsOptions} [simplify] - Options to simplify the pathfinding result.
22503
22831
  * @returns {DirectionsCollection} A collection of directional features representing the path.
22504
22832
  */
22505
- getDirections({ zones: directionsZones, originIds, destinationNodeIds, disabledConnectionNodeIds, simplify, multiplicativeDistanceWeightScaling, overrideEdgeWeights, }: {
22833
+ getDirections({ zones: directionsZones, originIds, from, to, destinationNodeIds, disabledConnectionNodeIds, simplify, multiplicativeDistanceWeightScaling, overrideEdgeWeights, }: {
22506
22834
  originIds: string[];
22507
22835
  destinationNodeIds: string[];
22836
+ from: NodeFeature[];
22837
+ to: NodeFeature[];
22508
22838
  zones?: DirectionsZone[];
22509
22839
  disabledConnectionNodeIds?: string[];
22510
22840
  simplify?: SimplifyDirectionsOptions;
@@ -22519,11 +22849,21 @@ declare class Navigator$1 {
22519
22849
  */
22520
22850
  private generatePath;
22521
22851
  /**
22522
- * Simplifies a sequence of steps by reducing unnecessary nodes using a buffer radius to check for obstructions.
22852
+ * Simplifies a sequence of steps by reducing unnecessary nodes using line-of-sight checks.
22853
+ *
22854
+ * Method Selection:
22855
+ * - 'greedy-los': Greedy forward scan with line-of-sight validation. Fastest, O(n) time complexity. Good default choice.
22856
+ * - 'rdp': Uses Ramer-Douglas-Peucker preprocessing + line-of-sight validation + door buffer nodes.
22857
+ * Better for paths with doors and complex geometry. Medium speed.
22858
+ * - 'dp-optimal': Dynamic Programming for globally optimal simplification. Slowest but highest quality, O(n²) complexity.
22859
+ * Best when path quality is critical (e.g., indoor navigation with many turns).
22860
+ *
22861
+ * Performance: greedy-los < rdp < dp-optimal
22862
+ * Quality: greedy-los < rdp < dp-optimal
22523
22863
  *
22524
22864
  * @param {Edge[]} steps - The steps to simplify.
22525
- * @param {number} bufferRadius - The buffer radius to use
22526
- * for simplification.
22865
+ * @param {SimplifyDirectionsOptions} options - Simplification options.
22866
+ * @param {boolean} multiplicativeDistanceWeightScaling - Distance weight scaling option.
22527
22867
  * @returns {Edge[]} An array of simplified edges representing a more direct path.
22528
22868
  */
22529
22869
  private simplifyAllSteps;
@@ -22566,6 +22906,8 @@ declare class Navigator$1 {
22566
22906
  * @returns {Edge[]} An array of simplified edges.
22567
22907
  */
22568
22908
  private simplifySteps;
22909
+ private simplifyStepsImprovedWithSimplifyBeforeLoSChecks;
22910
+ private simplifyStepsWithDPMethod;
22569
22911
  /**
22570
22912
  * Calculates the approximate distance between two geographic coordinates on Earth's surface.
22571
22913
  *
@@ -22653,13 +22995,14 @@ declare class DirectionsInternal {
22653
22995
  /**
22654
22996
  * @hidden
22655
22997
  */
22656
- constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, }: {
22998
+ constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, getDoorByNodeId, }: {
22657
22999
  nodes: ParsedMVF["node.geojson"];
22658
23000
  geojsonCollection: ParsedMVF["obstruction"] | ParsedMVF["space"];
22659
23001
  connections: ParsedMVF["connection.json"];
22660
23002
  groupBy?: string;
22661
23003
  multiplicativeDistanceWeightScaling?: boolean;
22662
23004
  flagDeclarations?: ParsedMVF["navigationFlags.json"];
23005
+ getDoorByNodeId: (nodeId: string) => DoorGeometry | undefined;
22663
23006
  });
22664
23007
  processTargets(fromNodesByTarget: Map<TNavigationTarget, string[]>, toNodesByTarget: Map<TNavigationTarget, string[]>, mapData: MapDataInternal): {
22665
23008
  originIds: string[];
@@ -22668,10 +23011,7 @@ declare class DirectionsInternal {
22668
23011
  };
22669
23012
  getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
22670
23013
  accessible: boolean;
22671
- smoothing: {
22672
- enabled: boolean;
22673
- radius: number;
22674
- };
23014
+ smoothing: SimplifyDirectionsOptions;
22675
23015
  zones: TDirectionZone[];
22676
23016
  excludedConnections: Connection[];
22677
23017
  connectionIdWeightMap: Record<string, number>;
@@ -22679,10 +23019,7 @@ declare class DirectionsInternal {
22679
23019
  /** @deprecated use getDirections instead */
22680
23020
  getDirectionsSync: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
22681
23021
  accessible: boolean;
22682
- smoothing: {
22683
- enabled: boolean;
22684
- radius: number;
22685
- };
23022
+ smoothing: SimplifyDirectionsOptions;
22686
23023
  zones: TDirectionZone[];
22687
23024
  excludedConnections: Connection[];
22688
23025
  connectionIdWeightMap: Record<string, number>;
@@ -23337,6 +23674,52 @@ export type TDirectionZone = {
23337
23674
  */
23338
23675
  floor?: Floor;
23339
23676
  };
23677
+ type TExperimentalDashOptions = {
23678
+ /**
23679
+ * Length-scaling mode: dash/gap as fractions of path length (0-1)
23680
+ */
23681
+ __EXPERIMENTAL_DASH_MODE: "length-scaling";
23682
+ /**
23683
+ * Dash length as fraction of path (0-1).
23684
+ * @default 0.1
23685
+ */
23686
+ __EXPERIMENTAL_DASH_LENGTH?: number;
23687
+ /**
23688
+ * Gap length as fraction of path (0-1).
23689
+ * @default 0.1
23690
+ */
23691
+ __EXPERIMENTAL_DASH_GAP?: number;
23692
+ } | {
23693
+ /**
23694
+ * Width-scaling mode: dash/gap as multiples of path width (deck.gl style)
23695
+ */
23696
+ __EXPERIMENTAL_DASH_MODE: "width-scaling";
23697
+ /**
23698
+ * Dash size as multiple of path width.
23699
+ * @default 3.0
23700
+ */
23701
+ __EXPERIMENTAL_DASH_SIZE?: number;
23702
+ /**
23703
+ * Gap size as multiple of path width.
23704
+ * @default 2.0
23705
+ */
23706
+ __EXPERIMENTAL_GAP_SIZE?: number;
23707
+ } | {
23708
+ /**
23709
+ * Absolute mode: dash/gap in meters (deterministic regardless of path length)
23710
+ */
23711
+ __EXPERIMENTAL_DASH_MODE: "absolute";
23712
+ /**
23713
+ * Dash length in meters.
23714
+ * @default 1.0
23715
+ */
23716
+ __EXPERIMENTAL_DASH_METERS?: number;
23717
+ /**
23718
+ * Gap length in meters.
23719
+ * @default 0.5
23720
+ */
23721
+ __EXPERIMENTAL_GAP_METERS?: number;
23722
+ };
23340
23723
  /**
23341
23724
  * Options for controlling the behavior of a {@link Path}.
23342
23725
  */
@@ -23459,6 +23842,13 @@ export type TAddPathOptions = {
23459
23842
  * @defaultValue 0.5
23460
23843
  */
23461
23844
  __EXPERIMENTAL_SMOOTHING_CORNER_RADIUS?: number;
23845
+ /**
23846
+ * @experimental
23847
+ * Dash configuration. When dashed=true, controls dash/gap sizing.
23848
+ * Uses discriminated union - mode determines which properties are valid.
23849
+ * @see TExperimentalDashOptions
23850
+ */
23851
+ __EXPERIMENTAL_DASH_OPTIONS?: TExperimentalDashOptions;
23462
23852
  };
23463
23853
  /**
23464
23854
  * Defines the priority levels for collider collision handling, allowing customization of collider visibility in congested areas.
@@ -23500,31 +23890,128 @@ export type TGetDirectionsOptions = {
23500
23890
  */
23501
23891
  accessible?: boolean;
23502
23892
  /**
23503
- * Enable or disable line-of-sight directions smoothing.
23504
- * With this option enabled, the directions will be simplified to provide a more visually appealing path and shorter instructions.
23893
+ * Enable or disable path smoothing for directions.
23894
+ * When enabled, the path is simplified using line-of-sight checks to provide a more visually appealing route and shorter instructions.
23505
23895
  *
23506
- * Can be a boolean to enable or disable smoothing, or an object with a radius property to specify the line of sight radius in metres.
23896
+ * Can be a boolean to enable or disable smoothing, or an object with configuration options.
23897
+ *
23898
+ * **Available methods:**
23899
+ * - `'greedy-los'` (default): Greedy forward scan with line-of-sight validation. Fastest, O(n) time complexity. Good default choice.
23900
+ * - `'rdp'`: Uses Ramer-Douglas-Peucker preprocessing + line-of-sight validation + door buffer nodes. Better for paths with doors and complex geometry. Medium speed.
23901
+ * - `'dp-optimal'`: Dynamic Programming for globally optimal simplification. Slowest but highest quality, O(n²) complexity. Best when path quality is critical.
23507
23902
  *
23508
23903
  * @default true for non-enterprise mode, false for enterprise mode
23509
23904
  *
23510
23905
  * @example
23511
23906
  * ```ts
23512
- * // Enable smoothing with a radius of 3 metres
23907
+ * // Enable smoothing with default settings
23513
23908
  * mapView.getDirections(firstSpace, secondSpace, {
23514
- * smoothing: {
23515
- * radius: 3,
23909
+ * smoothing: true
23910
+ * })
23911
+ *
23912
+ * // Enable smoothing with custom radius (in meters)
23913
+ * mapView.getDirections(firstSpace, secondSpace, {
23914
+ * smoothing: {
23915
+ * radius: 1.5,
23516
23916
  * }
23517
23917
  * })
23518
23918
  *
23519
- * // Explicitly enable smoothing in enterprise mode
23919
+ * // Use greedy line-of-sight method (default, explicit)
23520
23920
  * mapView.getDirections(firstSpace, secondSpace, {
23521
- * smoothing: true
23921
+ * smoothing: {
23922
+ * enabled: true,
23923
+ * __EXPERIMENTAL_METHOD: 'greedy-los',
23924
+ * radius: 0.4,
23925
+ * }
23926
+ * })
23927
+ *
23928
+ * // Use RDP method (always uses line-of-sight)
23929
+ * mapView.getDirections(firstSpace, secondSpace, {
23930
+ * smoothing: {
23931
+ * enabled: true,
23932
+ * __EXPERIMENTAL_METHOD: 'rdp',
23933
+ * radius: 0.4,
23934
+ * }
23935
+ * })
23936
+ *
23937
+ * // Use DP-optimal method with door buffer nodes
23938
+ * mapView.getDirections(firstSpace, secondSpace, {
23939
+ * smoothing: {
23940
+ * enabled: true,
23941
+ * __EXPERIMENTAL_METHOD: 'dp-optimal',
23942
+ * __EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES: true,
23943
+ * radius: 0.4,
23944
+ * }
23522
23945
  * })
23523
23946
  * ```
23524
23947
  */
23525
23948
  smoothing?: boolean | {
23949
+ /**
23950
+ * Enable or disable path smoothing.
23951
+ * @default true for non-enterprise mode, false for enterprise mode
23952
+ */
23526
23953
  enabled?: boolean;
23527
- radius: number;
23954
+ /**
23955
+ * The radius of the buffer around the path to consider when simplifying, in meters.
23956
+ * @default 0.75
23957
+ */
23958
+ radius?: number;
23959
+ /**
23960
+ * @experimental
23961
+ * Path smoothing method using greedy line-of-sight algorithm.
23962
+ * Fastest method with O(n) time complexity. Good default choice.
23963
+ * @default 'greedy-los'
23964
+ */
23965
+ __EXPERIMENTAL_METHOD?: "greedy-los";
23966
+ } | {
23967
+ /**
23968
+ * Enable or disable path smoothing.
23969
+ * @default true for non-enterprise mode, false for enterprise mode
23970
+ */
23971
+ enabled?: boolean;
23972
+ /**
23973
+ * The radius of the buffer around the path to consider when simplifying, in meters.
23974
+ * @default 0.75
23975
+ */
23976
+ radius?: number;
23977
+ /**
23978
+ * @experimental
23979
+ * Path smoothing method using Ramer-Douglas-Peucker preprocessing with line-of-sight validation.
23980
+ * Better for paths with doors and complex geometry. Medium speed.
23981
+ * Always uses line-of-sight validation (cannot be disabled).
23982
+ */
23983
+ __EXPERIMENTAL_METHOD: "rdp";
23984
+ /**
23985
+ * @experimental
23986
+ * Whether to include door-adjacent nodes (predecessor/successor of doors) in the must-include set.
23987
+ * When true (default), nodes immediately before and after doors are preserved during simplification.
23988
+ * @default true
23989
+ */
23990
+ __EXPERIMENTAL_MUST_INCLUDE_DOOR_BUFFER_NODES?: boolean;
23991
+ } | {
23992
+ /**
23993
+ * Enable or disable path smoothing.
23994
+ * @default true for non-enterprise mode, false for enterprise mode
23995
+ */
23996
+ enabled?: boolean;
23997
+ /**
23998
+ * The radius of the buffer around the path to consider when simplifying, in meters.
23999
+ * @default 0.75
24000
+ */
24001
+ radius?: number;
24002
+ /**
24003
+ * @experimental
24004
+ * Path smoothing method using Dynamic Programming for globally optimal simplification.
24005
+ * Slowest but highest quality, O(n²) complexity. Best when path quality is critical.
24006
+ */
24007
+ __EXPERIMENTAL_METHOD: "dp-optimal";
24008
+ /**
24009
+ * @experimental
24010
+ * Whether to include 0.5m buffer nodes perpendicular to doors in DP simplification.
24011
+ * When true, predecessor and successor nodes of doors are marked with preventSmoothing.
24012
+ * @default false
24013
+ */
24014
+ __EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES?: boolean;
23528
24015
  };
23529
24016
  /**
23530
24017
  * Defines the special zones for navigation operations.
@@ -23780,6 +24267,9 @@ export type WithState<T> = T extends {
23780
24267
  export type TUpdateState<T extends MapElementsWithState | string> = T extends {
23781
24268
  __type: infer U;
23782
24269
  } ? U extends keyof MapElementToUpdateState ? MapElementToUpdateState[U] : never : T extends string ? T extends keyof MapElementToUpdateState ? MapElementToUpdateState[T] : Record<string, any> : never;
24270
+ export type MapElementToGetRenderedState = {
24271
+ [Label.__type]: ReadonlyDeep<LabelRenderedState>;
24272
+ };
23783
24273
  /**
23784
24274
  * The type for getting the state of map elements.
23785
24275
  * Returns the full state type for all element types.
@@ -23787,6 +24277,10 @@ export type TUpdateState<T extends MapElementsWithState | string> = T extends {
23787
24277
  export type TGetState<T extends MapElementsWithState | string> = T extends {
23788
24278
  __type: infer U;
23789
24279
  } ? U extends keyof MapElementToGetState ? MapElementToGetState[U] : never : T extends string ? T extends keyof MapElementToGetState ? MapElementToGetState[T] : Record<string, any> : never;
24280
+ type MapElementWithRenderedState = WithState<Label>;
24281
+ type TGetRenderedState<T extends MapElementWithRenderedState | string> = T extends {
24282
+ __type: infer U;
24283
+ } ? U extends keyof MapElementToGetRenderedState ? MapElementToGetRenderedState[U] : never : T extends string ? T extends keyof MapElementToGetRenderedState ? MapElementToGetRenderedState[T] : Record<string, any> : never;
23790
24284
  export type GlobalState = {
23791
24285
  /**
23792
24286
  * The color of the background, in hex format(#000000).
@@ -24911,8 +25405,7 @@ export declare class Connection extends DetailedMapData<Feature<Point, SpaceProp
24911
25405
  * @internal
24912
25406
  */
24913
25407
  constructor(data: MapDataInternal, options: {
24914
- mvfDataByFloorId: Record<string, FeatureCollection<Point, SpaceProperties>["features"][number]> | Record<string, Feature<Point, MVFConnection>>;
24915
- accessible?: boolean;
25408
+ mvfData: MVFConnection;
24916
25409
  });
24917
25410
  /**
24918
25411
  * Whether the connection is accessible. For example elevators are accessible while stairs are not.
@@ -24948,10 +25441,6 @@ export declare class Connection extends DetailedMapData<Feature<Point, SpaceProp
24948
25441
  * @returns {Floor[]} An array of floors for the connection.
24949
25442
  */
24950
25443
  get floors(): Floor[];
24951
- /**
24952
- * Gets the location profiles ({@link LocationProfile}) associated with the connection.
24953
- */
24954
- get locationProfiles(): LocationProfile[];
24955
25444
  /** @internal */
24956
25445
  get focusTarget(): Coordinate[];
24957
25446
  /**
@@ -25611,8 +26100,6 @@ type MapDataRecords = {
25611
26100
  locationProfilesByExternalId: Record<string, LocationProfile[]>;
25612
26101
  objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
25613
26102
  obstructionIdByEntranceId: Record<string, string>;
25614
- connectionIdsByLatLon: Record<string, string[]>;
25615
- mvfConnectionIdsByLatLon: Record<string, string[]>;
25616
26103
  locationProfilesByAttachedFeatureId: Record<string, LocationProfile[]>;
25617
26104
  mvfSpacesById: Record<string, SpaceCollection["features"][number]>;
25618
26105
  mvfNodesById: Record<string, NodeCollection["features"][number]>;
@@ -26048,6 +26535,10 @@ export declare class EnterpriseVenue extends BaseMetaData implements MVFEnterpri
26048
26535
  * The default map of the venue.
26049
26536
  */
26050
26537
  get defaultMap(): string;
26538
+ /**
26539
+ * The enterprise venue type.
26540
+ */
26541
+ get enterpriseType(): EnterpriseVenueType | undefined;
26051
26542
  /**
26052
26543
  * Serializes the EnterpriseVenue data to JSON.
26053
26544
  *
@@ -26245,7 +26736,6 @@ declare class MapDataInternal extends PubSub$1<{
26245
26736
  mvfAnnotationsById: MapDataRecords["mvfAnnotationsById"];
26246
26737
  mvfConnectionsById: MapDataRecords["mvfConnectionsById"];
26247
26738
  mvfConnectionsByNodeId: MapDataRecords["mvfConnectionsByNodeId"];
26248
- mvfConnectionIdsByLatLon: MapDataRecords["mvfConnectionIdsByLatLon"];
26249
26739
  mvfEntrancesById: MapDataRecords["mvfEntrancesById"];
26250
26740
  mvfNodesById: MapDataRecords["mvfNodesById"];
26251
26741
  mvfObstructionById: MapDataRecords["mvfObstructionById"];
@@ -26261,7 +26751,6 @@ declare class MapDataInternal extends PubSub$1<{
26261
26751
  floorStacksByExternalId: MapDataRecords["floorStacksByExternalId"];
26262
26752
  doorsByExternalId: MapDataRecords["doorsByExternalId"];
26263
26753
  areasByExternalId: MapDataRecords["areasByExternalId"];
26264
- connectionSpaceIdsByLatLon: MapDataRecords["connectionIdsByLatLon"];
26265
26754
  locationProfilesByAttachedFeatureId: MapDataRecords["locationProfilesByAttachedFeatureId"];
26266
26755
  entranceNodeIdsBySpaceId?: MapDataRecords["entranceNodeIdsBySpaceId"];
26267
26756
  locationsById: EnterpriseMapDataRecords["locationsById"];
@@ -26460,6 +26949,13 @@ declare class MapDataInternal extends PubSub$1<{
26460
26949
  getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], opt?: TGetDirectionsOptions) => Promise<Directions | undefined>;
26461
26950
  getDirectionsMultiDestination: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | (TNavigationTarget | TNavigationTarget[])[], opt?: TGetDirectionsOptions) => Promise<Directions[] | undefined>;
26462
26951
  getDistance(from: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node$1 | EnterpriseLocation | Area, to: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node$1 | EnterpriseLocation | Area): number;
26952
+ /**
26953
+ * Gets the door associated with a node.
26954
+ *
26955
+ * @param nodeId The ID of the node to check
26956
+ * @returns The door object if the node is associated with a door, undefined otherwise
26957
+ */
26958
+ getDoorByNodeId: (nodeId: string) => Door | undefined;
26463
26959
  transformImageRequest: (url: string) => Promise<{
26464
26960
  url: string;
26465
26961
  }>;