@mappedin/maplibre-overlay 6.5.0-beta.0 → 6.7.0-beta.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, FeatureState, FilterSpecification, FormattedSection, GlobalProperties, ICanonicalTileID, IMercatorCoordinate, LayerSpecification, LightSpecification, ProjectionSpecification, PromoteIdSpecification, PropertyValueSpecification, ResolvedImage, SkySpecification, SourceExpression, SourceSpecification, SpriteSpecification, StylePropertyExpression, StylePropertySpecification, StyleSpecification, TerrainSpecification, TransitionSpecification } 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 } 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';
@@ -918,6 +918,7 @@ declare class BatchedStandardMaterial extends MeshLambertMaterial {
918
918
  removeSideTexture(batchId: number): void;
919
919
  removeTopTexture(batchId: number): void;
920
920
  dispose(): void;
921
+ clone(params?: MeshLambertMaterialParameters): this;
921
922
  }
922
923
  interface StandardSchemaV1<Input = unknown, Output = Input> {
923
924
  /** The Standard Schema properties. */
@@ -4742,6 +4743,44 @@ type PathState = {
4742
4743
  * Only applies when smoothingTension > 0.
4743
4744
  */
4744
4745
  smoothingCornerRadius: number;
4746
+ /**
4747
+ * Whether the path should be rendered as a dashed line.
4748
+ */
4749
+ dashed: boolean;
4750
+ /**
4751
+ * Length of each dash segment as fraction of path (0-1).
4752
+ */
4753
+ dashLength: number;
4754
+ /**
4755
+ * Length of each gap between dashes as fraction of path (0-1).
4756
+ */
4757
+ dashGap: number;
4758
+ /**
4759
+ * When true, dashSize and gapSize are interpreted as multiples of path width.
4760
+ * When false, dashLength and dashGap are used as fractions of path length.
4761
+ */
4762
+ dashRelativeToWidth: boolean;
4763
+ /**
4764
+ * Length of each dash as a multiple of path width. Only used when dashRelativeToWidth is true.
4765
+ */
4766
+ dashSize: number;
4767
+ /**
4768
+ * Length of each gap as a multiple of path width. Only used when dashRelativeToWidth is true.
4769
+ */
4770
+ gapSize: number;
4771
+ /**
4772
+ * When true, dashMeters and gapMeters are used as absolute sizes in meters.
4773
+ * Takes precedence over dashRelativeToWidth.
4774
+ */
4775
+ dashAbsolute: boolean;
4776
+ /**
4777
+ * Length of each dash in meters. Only used when dashAbsolute is true.
4778
+ */
4779
+ dashMeters: number;
4780
+ /**
4781
+ * Length of each gap in meters. Only used when dashAbsolute is true.
4782
+ */
4783
+ gapMeters: number;
4745
4784
  };
4746
4785
  type AddPathOptions = {
4747
4786
  /**
@@ -4813,6 +4852,48 @@ type AddPathOptions = {
4813
4852
  * @default 0.0
4814
4853
  */
4815
4854
  smoothingCornerRadius?: number;
4855
+ /**
4856
+ * Length of each dash segment as fraction of path (0-1).
4857
+ * @default 0.1
4858
+ */
4859
+ dashLength?: number;
4860
+ /**
4861
+ * Length of each gap between dashes as fraction of path (0-1).
4862
+ * @default 0.1
4863
+ */
4864
+ dashGap?: number;
4865
+ /**
4866
+ * When true, dashSize and gapSize are interpreted as multiples of path width (deck.gl style).
4867
+ * When false (default), dashLength and dashGap are used as fractions of path length.
4868
+ * @default false
4869
+ */
4870
+ dashRelativeToWidth?: boolean;
4871
+ /**
4872
+ * Length of each dash as a multiple of path width. Only used when dashRelativeToWidth is true.
4873
+ * @default 3.0
4874
+ */
4875
+ dashSize?: number;
4876
+ /**
4877
+ * Length of each gap as a multiple of path width. Only used when dashRelativeToWidth is true.
4878
+ * @default 2.0
4879
+ */
4880
+ gapSize?: number;
4881
+ /**
4882
+ * When true, dashMeters and gapMeters are used as absolute sizes in meters.
4883
+ * Takes precedence over dashRelativeToWidth.
4884
+ * @default false
4885
+ */
4886
+ dashAbsolute?: boolean;
4887
+ /**
4888
+ * Length of each dash in meters. Only used when dashAbsolute is true.
4889
+ * @default 1.0
4890
+ */
4891
+ dashMeters?: number;
4892
+ /**
4893
+ * Length of each gap in meters. Only used when dashAbsolute is true.
4894
+ * @default 0.5
4895
+ */
4896
+ gapMeters?: number;
4816
4897
  };
4817
4898
  declare class PathComponent {
4818
4899
  #private;
@@ -4841,6 +4922,14 @@ declare class PathComponent {
4841
4922
  dashed: boolean;
4842
4923
  smoothingTension: number;
4843
4924
  smoothingCornerRadius: number;
4925
+ dashLength: number;
4926
+ dashGap: number;
4927
+ dashRelativeToWidth: boolean;
4928
+ dashSize: number;
4929
+ gapSize: number;
4930
+ dashAbsolute: boolean;
4931
+ dashMeters: number;
4932
+ gapMeters: number;
4844
4933
  /**
4845
4934
  * If the path is vertical it will be rebuilt whenever altitudeDirty = true. This will be set during the first render of the path.
4846
4935
  */
@@ -5031,8 +5120,11 @@ declare class OutlineComponent implements Outline {
5031
5120
  }
5032
5121
  declare class FocusableComponent {
5033
5122
  readonly type: "focusable";
5034
- focusMesh?: Mesh;
5035
5123
  dirty: boolean;
5124
+ /**
5125
+ * Vertices of the geometry in world space
5126
+ */
5127
+ vertices?: Vector3[];
5036
5128
  }
5037
5129
  type TextureStyle = {
5038
5130
  texture?: SingleTexture;
@@ -5271,6 +5363,38 @@ interface PathUniforms {
5271
5363
  type: "f";
5272
5364
  value: number;
5273
5365
  };
5366
+ dashLength: {
5367
+ type: "f";
5368
+ value: number;
5369
+ };
5370
+ dashGap: {
5371
+ type: "f";
5372
+ value: number;
5373
+ };
5374
+ dashRelativeToWidth: {
5375
+ type: "b";
5376
+ value: boolean;
5377
+ };
5378
+ dashSize: {
5379
+ type: "f";
5380
+ value: number;
5381
+ };
5382
+ gapSize: {
5383
+ type: "f";
5384
+ value: number;
5385
+ };
5386
+ dashAbsolute: {
5387
+ type: "b";
5388
+ value: boolean;
5389
+ };
5390
+ dashMeters: {
5391
+ type: "f";
5392
+ value: number;
5393
+ };
5394
+ gapMeters: {
5395
+ type: "f";
5396
+ value: number;
5397
+ };
5274
5398
  }
5275
5399
  declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EVENT_PAYLOAD> {
5276
5400
  /**
@@ -5281,13 +5405,37 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
5281
5405
  /**
5282
5406
  * @private
5283
5407
  * @internal
5408
+ * AbortController for managing lifecycle and cleanup
5284
5409
  */
5285
- private _destroyed;
5410
+ private _abortController;
5411
+ /**
5412
+ * @protected
5413
+ * @internal
5414
+ * Tracks all cleanup functions for subscriptions made via on()
5415
+ */
5416
+ protected _cleanupFunctions: Array<() => void>;
5417
+ /**
5418
+ * Returns the AbortSignal for this PubSub instance.
5419
+ * Use this signal with APIs that support cancellation (fetch, addEventListener, etc.)
5420
+ * When the PubSub is destroyed, the signal will be aborted and all listeners using it will be automatically removed.
5421
+ *
5422
+ * @example
5423
+ * ```typescript
5424
+ * // Automatically cleaned up when PubSub is destroyed
5425
+ * pubsub.addEventListener(window, 'resize', handler, { signal: pubsub.signal });
5426
+ * ```
5427
+ */
5428
+ get signal(): AbortSignal;
5286
5429
  /**
5287
5430
  * @private
5288
5431
  * @internal
5289
5432
  */
5290
5433
  publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
5434
+ /**
5435
+ * Subscribe a function to be called when the signal is aborted.
5436
+ * @param fn The function to call when the signal is aborted.
5437
+ */
5438
+ onAbort<T extends (...args: any[]) => void>(fn: T): void;
5291
5439
  /**
5292
5440
  * Subscribe a function to an event.
5293
5441
  *
@@ -5295,6 +5443,9 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
5295
5443
  * function.
5296
5444
  * @param fn A callback that gets called when the corresponding event is fired. The
5297
5445
  * callback will get passed an argument with a type that's one of event payloads.
5446
+ * @param options Optional options object. If a signal is provided, the subscription will be
5447
+ * automatically cleaned up when that signal is aborted.
5448
+ * @returns A cleanup function that unsubscribes the event listener when called.
5298
5449
  * @example
5299
5450
  * // Subscribe to the 'click' event
5300
5451
  * const handler = (event) => {
@@ -5306,7 +5457,9 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
5306
5457
  */
5307
5458
  on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
5308
5459
  data: null;
5309
- } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
5460
+ } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void, options?: {
5461
+ signal?: AbortSignal;
5462
+ }): () => void;
5310
5463
  /**
5311
5464
  * Unsubscribe a function previously subscribed with {@link on}
5312
5465
  *
@@ -5327,6 +5480,7 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
5327
5480
  /**
5328
5481
  * @private
5329
5482
  * @internal
5483
+ * Destroys the PubSub instance and automatically unsubscribes all listeners registered via on().
5330
5484
  */
5331
5485
  destroy(): void;
5332
5486
  }
@@ -5561,13 +5715,37 @@ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof
5561
5715
  /**
5562
5716
  * @private
5563
5717
  * @internal
5718
+ * AbortController for managing lifecycle and cleanup
5719
+ */
5720
+ private _abortController;
5721
+ /**
5722
+ * @protected
5723
+ * @internal
5724
+ * Tracks all cleanup functions for subscriptions made via on()
5725
+ */
5726
+ protected _cleanupFunctions: Array<() => void>;
5727
+ /**
5728
+ * Returns the AbortSignal for this PubSub instance.
5729
+ * Use this signal with APIs that support cancellation (fetch, addEventListener, etc.)
5730
+ * When the PubSub is destroyed, the signal will be aborted and all listeners using it will be automatically removed.
5731
+ *
5732
+ * @example
5733
+ * ```typescript
5734
+ * // Automatically cleaned up when PubSub is destroyed
5735
+ * pubsub.addEventListener(window, 'resize', handler, { signal: pubsub.signal });
5736
+ * ```
5564
5737
  */
5565
- private _destroyed;
5738
+ get signal(): AbortSignal;
5566
5739
  /**
5567
5740
  * @private
5568
5741
  * @internal
5569
5742
  */
5570
5743
  publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
5744
+ /**
5745
+ * Subscribe a function to be called when the signal is aborted.
5746
+ * @param fn The function to call when the signal is aborted.
5747
+ */
5748
+ onAbort<T extends (...args: any[]) => void>(fn: T): void;
5571
5749
  /**
5572
5750
  * Subscribe a function to an event.
5573
5751
  *
@@ -5575,6 +5753,9 @@ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof
5575
5753
  * function.
5576
5754
  * @param fn A callback that gets called when the corresponding event is fired. The
5577
5755
  * callback will get passed an argument with a type that's one of event payloads.
5756
+ * @param options Optional options object. If a signal is provided, the subscription will be
5757
+ * automatically cleaned up when that signal is aborted.
5758
+ * @returns A cleanup function that unsubscribes the event listener when called.
5578
5759
  * @example
5579
5760
  * // Subscribe to the 'click' event
5580
5761
  * const handler = (event) => {
@@ -5586,7 +5767,9 @@ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof
5586
5767
  */
5587
5768
  on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
5588
5769
  data: null;
5589
- } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
5770
+ } ? EVENT_PAYLOAD[EVENT_NAME]["data"] : EVENT_PAYLOAD[EVENT_NAME]) => void, options?: {
5771
+ signal?: AbortSignal;
5772
+ }): () => void;
5590
5773
  /**
5591
5774
  * Unsubscribe a function previously subscribed with {@link on}
5592
5775
  *
@@ -5607,6 +5790,7 @@ declare class PubSub$1<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof
5607
5790
  /**
5608
5791
  * @private
5609
5792
  * @internal
5793
+ * Destroys the PubSub instance and automatically unsubscribes all listeners registered via on().
5610
5794
  */
5611
5795
  destroy(): void;
5612
5796
  }
@@ -13739,12 +13923,6 @@ declare class DOMVisibilitySystem {
13739
13923
  constructor(state: RendererState, domTree: Entity2DHTMLDivElementContainer);
13740
13924
  update(): void;
13741
13925
  }
13742
- declare class TwoDProjectionSystem {
13743
- state: RendererState;
13744
- project: (projection: Vector2, position: Vector3) => void;
13745
- constructor(state: RendererState, project: (projection: Vector2, position: Vector3) => void);
13746
- update(): void;
13747
- }
13748
13926
  declare enum PINVISIBILITY {
13749
13927
  /** The pin is visible. */
13750
13928
  ACTIVE = 1,
@@ -13897,7 +14075,11 @@ type AnimateToOptions = AnimationOptions$1 & {
13897
14075
  elevation?: number;
13898
14076
  interruptible?: boolean;
13899
14077
  };
13900
- declare class Camera$2 {
14078
+ declare class Camera$2 extends PubSub$1<{
14079
+ "padding-change": {
14080
+ padding: InsetPadding;
14081
+ };
14082
+ }> {
13901
14083
  #private;
13902
14084
  /**
13903
14085
  * @internal
@@ -14164,39 +14346,7 @@ declare class OutlineInterpolationSystem extends PubSub$1<{
14164
14346
  update(zoomLevel: number, isCameraZoomDirty?: boolean): void;
14165
14347
  destroy(): void;
14166
14348
  }
14167
- declare class GeometryInFocusSystem extends PubSub$1<{
14168
- /**
14169
- * Returns the list of entities that are likely in focus, sorted by the weight of the raycast.
14170
- */
14171
- "geometry-in-focus": string[];
14172
- }> {
14173
- #private;
14174
- cameraDirty: boolean;
14175
- focusablesDirty: boolean;
14176
- private state;
14177
- private camera;
14178
- private debugEl;
14179
- private raycasters;
14180
- private collisions;
14181
- private focusableEntities;
14182
- private debugRaycasters;
14183
- constructor(state: RendererState, camera: PerspectiveCamera);
14184
- resize(): void;
14185
- /**
14186
- * Build 5 raycasters, one for the center of the screen, and one for each corner of the screen.
14187
- * the center one has the highest weight, and the corners have the lowest weight.
14188
- * this allows us to detect focus closer to the center of the screen more easily.
14189
- */
14190
- private buildRaycasters;
14191
- private updateFocusableEntities;
14192
- update: (cameraIsMoving?: boolean, cameraStoppedMovingTime?: number) => void;
14193
- updateRaf(): void;
14194
- raycast(): void;
14195
- showRaycasters(): void;
14196
- hideRaycasters(): void;
14197
- destroy(): void;
14198
- }
14199
- declare class OutdoorLayers {
14349
+ declare class OutdoorLayers extends PubSub<{}> {
14200
14350
  #private;
14201
14351
  idleQueue: IdleQueue;
14202
14352
  hideLayersIntersectingPolygons(polygons: Feature$1<Polygon$1 | MultiPolygon$1, any>[], layers: string[]): void;
@@ -14395,6 +14545,12 @@ declare class Core extends PubSub<MapEvent> {
14395
14545
  * @internal
14396
14546
  */
14397
14547
  constructor(container: HTMLElement, options?: RendererCoreOptions);
14548
+ /**
14549
+ * Projects a position into screen space. If a Vector3 is provided, the z-coordinate will include the depth from the camera.
14550
+ * @param projectVector - The vector to project the position into
14551
+ * @param position - The position to project
14552
+ */
14553
+ private project;
14398
14554
  /**
14399
14555
  * Add a container that can hold other containers, geometry groups, markers, labels and paths. Use this to group entities together.
14400
14556
  */
@@ -14513,6 +14669,12 @@ declare class Core extends PubSub<MapEvent> {
14513
14669
  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;
14514
14670
  getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
14515
14671
  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;
14672
+ /**
14673
+ * Get rendered state for an entity (e.g., runtime rendering state that changes frequently)
14674
+ * @param entity The entity to get rendered state for
14675
+ * @returns Object with all available rendered state properties, or undefined if not found
14676
+ */
14677
+ getRenderedState(entity: EntityId<LabelState> | string | number): LabelRenderedState | undefined;
14516
14678
  /**
14517
14679
  * Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
14518
14680
  */
@@ -14642,16 +14804,7 @@ declare class Core extends PubSub<MapEvent> {
14642
14804
  /**
14643
14805
  * Remove a MapLibre event listener
14644
14806
  */
14645
- offMapLibreEvent(event: keyof MapEventType, handler: (...args: any[]) => void): void;
14646
- /**
14647
- * Returns true if the renderer has been aborted.
14648
- */
14649
- get aborted(): boolean;
14650
- /**
14651
- * Register a handler once to be called when the renderer is aborted.
14652
- * The handler will be removed after it is called.
14653
- */
14654
- onAbort(handler: () => void): void;
14807
+ offMapLibreEvent(event: LiteralUnion<keyof MapEventType, string>, handler: (...args: any[]) => void): void;
14655
14808
  /**
14656
14809
  * @internal for testing
14657
14810
  */
@@ -14680,7 +14833,7 @@ declare class Core extends PubSub<MapEvent> {
14680
14833
  * };
14681
14834
  * map.on('click', handler);
14682
14835
  */
14683
- on: <EventName extends keyof MapEvent>(eventName: EventName, fn: (payload: MapEventPayload<EventName>) => void) => void;
14836
+ on: PubSub<MapEvent>["on"];
14684
14837
  /**
14685
14838
  * Unsubscribe a function previously subscribed with {@link on}
14686
14839
  *
@@ -14695,7 +14848,7 @@ declare class Core extends PubSub<MapEvent> {
14695
14848
  * };
14696
14849
  * map.off('click', handler);
14697
14850
  */
14698
- off: <EventName extends keyof MapEvent>(eventName: EventName, fn: (payload: MapEventPayload<EventName>) => void) => void;
14851
+ off: PubSub<MapEvent>["off"];
14699
14852
  /**
14700
14853
  * @hidden
14701
14854
  * Returns the current cursor decided by Mappedin. This is useful when integrating with other overlays to show the correct user interaction.
@@ -14865,6 +15018,7 @@ declare class LabelComponent {
14865
15018
  get scaledPinSize(): number;
14866
15019
  iconPadding: number;
14867
15020
  get scaledIconPadding(): number;
15021
+ get textVisible(): boolean;
14868
15022
  dirty: boolean;
14869
15023
  textDirty: boolean;
14870
15024
  pinDirty: boolean;
@@ -15226,6 +15380,12 @@ type MapEvent = {
15226
15380
  * If outdoor view is enabled, this is fired when the style first loads or changes.
15227
15381
  */
15228
15382
  "outdoor-style-loaded": undefined;
15383
+ /**
15384
+ * Fired when outdoor style loading fails. The map will fall back to indoor-only rendering.
15385
+ */
15386
+ "outdoor-style-error": {
15387
+ error: unknown;
15388
+ };
15229
15389
  /**
15230
15390
  * Fired when the user starts interacting with the map.
15231
15391
  */
@@ -15256,9 +15416,6 @@ type MapEvent = {
15256
15416
  resize: undefined;
15257
15417
  "pan-bounds-change": PanBounds;
15258
15418
  };
15259
- type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] extends {
15260
- data: null;
15261
- } ? MapEvent[EventName]["data"] : MapEvent[EventName];
15262
15419
  type All3DTypes = Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D;
15263
15420
  type RendererState = {
15264
15421
  /**
@@ -15356,6 +15513,12 @@ type ImagePlacementOptions = {
15356
15513
  */
15357
15514
  minimumSizeRatio?: number;
15358
15515
  };
15516
+ type LabelRenderedState = {
15517
+ /**
15518
+ * whether the text is visible
15519
+ */
15520
+ textVisible: boolean;
15521
+ };
15359
15522
  declare const collisionRankingTierSchema: z.ZodUnion<readonly [
15360
15523
  z.ZodEnum<{
15361
15524
  low: "low";
@@ -15999,7 +16162,10 @@ declare class FloorObject implements MVFFloor {
15999
16162
  facadesByStyleId: Map<string, string[]>;
16000
16163
  get geoJSONBoundingBox(): BBox | undefined;
16001
16164
  constructor(parentId: string, floor: MVFFloor, mapObject: GeojsonApiMapObject, multiFloorView: Required<TShow3DMapOptions["multiFloorView"]>, options: TShow3DMapOptions, mvf?: ParsedMVF, styleMap?: AggregatedStyleMap, mapDataInternal?: MapDataInternal);
16002
- load: () => this;
16165
+ /**
16166
+ * @param focusable - Whether the floor is part of a building and should be focusable. This will be set on the geometry layer.
16167
+ */
16168
+ load: (focusable?: boolean) => this;
16003
16169
  /**
16004
16170
  * Add an occluder to the floor if it has a footprint.
16005
16171
  */
@@ -16010,6 +16176,7 @@ declare class FloorObject implements MVFFloor {
16010
16176
  get hasFacadeGeometry(): boolean;
16011
16177
  get visible(): boolean;
16012
16178
  setVisible(visible: boolean): void;
16179
+ setBatchedTextVisible(visible: boolean): void;
16013
16180
  }
16014
16181
  declare class FloorStackObject implements Omit<MVFFloorStack, "maps" | "floors" | "defaultFloor" | "footprint"> {
16015
16182
  #private;
@@ -16025,7 +16192,6 @@ declare class FloorStackObject implements Omit<MVFFloorStack, "maps" | "floors"
16025
16192
  metadata?: MVFFloorStack["metadata"];
16026
16193
  containerId: string;
16027
16194
  facade?: MVFFacade;
16028
- private renderer;
16029
16195
  constructor(floorStack: MVFFloorStack, parentId: string, renderer: Core, facade?: MVFFacade);
16030
16196
  get defaultFloor(): FloorObject;
16031
16197
  /**
@@ -16760,6 +16926,22 @@ declare class MapView {
16760
16926
  * ```
16761
16927
  */
16762
16928
  getState<T extends MapElementsWithState>(target: T): TGetState<T>;
16929
+ /**
16930
+ * Gets the rendered state of a map element.
16931
+ *
16932
+ * Retrieves runtime rendering state that changes frequently, such as text visibility for labels.
16933
+ *
16934
+ * @param target The map element to get the rendered state for.
16935
+ * @returns An object containing the requested rendered state keys, or undefined if not found.
16936
+ *
16937
+ * @example Get label text visibility
16938
+ * ```ts
16939
+ * const label = mapView.Labels.add(space, 'Hello');
16940
+ * const renderedState = mapView.__EXPERIMENTAL__getRenderedState(label);
16941
+ * console.log('Text visible:', renderedState?.textVisible);
16942
+ * ```
16943
+ */
16944
+ __EXPERIMENTAL__getRenderedState<T extends MapElementWithRenderedState>(target: T): TGetRenderedState<T> | undefined;
16763
16945
  /**
16764
16946
  * Sets the hover color for map elements.
16765
16947
  *
@@ -17816,6 +17998,9 @@ declare const floorStateSchemaPartial: z.ZodObject<{
17816
17998
  type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"floor.areas">>>;
17817
17999
  visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
17818
18000
  }, z.core.$strip>>;
18001
+ text3d: z.ZodOptional<z.ZodObject<{
18002
+ visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
18003
+ }, z.core.$strip>>;
17819
18004
  type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"floor">>>;
17820
18005
  visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
17821
18006
  altitude: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
@@ -17863,6 +18048,9 @@ declare const floorStateSchemaStrict: z.ZodObject<{
17863
18048
  type: z.ZodDefault<z.ZodLiteral<"floor.areas">>;
17864
18049
  visible: z.ZodDefault<z.ZodBoolean>;
17865
18050
  }, z.core.$strict>;
18051
+ text3d: z.ZodObject<{
18052
+ visible: z.ZodDefault<z.ZodBoolean>;
18053
+ }, z.core.$strict>;
17866
18054
  type: z.ZodDefault<z.ZodLiteral<"floor">>;
17867
18055
  visible: z.ZodDefault<z.ZodBoolean>;
17868
18056
  altitude: z.ZodDefault<z.ZodNumber>;
@@ -18091,6 +18279,24 @@ declare const pathStateSchemaPartial: z.ZodObject<{
18091
18279
  xrayOpacity: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
18092
18280
  __EXPERIMENTAL_SMOOTHING_TENSION: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
18093
18281
  __EXPERIMENTAL_SMOOTHING_CORNER_RADIUS: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
18282
+ dashed: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
18283
+ __EXPERIMENTAL_DASH_OPTIONS: z.ZodOptional<z.ZodOptional<z.ZodDiscriminatedUnion<[
18284
+ z.ZodObject<{
18285
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"length-scaling">;
18286
+ __EXPERIMENTAL_DASH_LENGTH: z.ZodDefault<z.ZodNumber>;
18287
+ __EXPERIMENTAL_DASH_GAP: z.ZodDefault<z.ZodNumber>;
18288
+ }, z.core.$strip>,
18289
+ z.ZodObject<{
18290
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"width-scaling">;
18291
+ __EXPERIMENTAL_DASH_SIZE: z.ZodDefault<z.ZodNumber>;
18292
+ __EXPERIMENTAL_GAP_SIZE: z.ZodDefault<z.ZodNumber>;
18293
+ }, z.core.$strip>,
18294
+ z.ZodObject<{
18295
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"absolute">;
18296
+ __EXPERIMENTAL_DASH_METERS: z.ZodDefault<z.ZodNumber>;
18297
+ __EXPERIMENTAL_GAP_METERS: z.ZodDefault<z.ZodNumber>;
18298
+ }, z.core.$strip>
18299
+ ], "__EXPERIMENTAL_DASH_MODE">>>;
18094
18300
  }, z.core.$strip>;
18095
18301
  declare const pathStateSchemaStrict: z.ZodObject<{
18096
18302
  type: z.ZodDefault<z.ZodLiteral<"path">>;
@@ -18107,9 +18313,27 @@ declare const pathStateSchemaStrict: z.ZodObject<{
18107
18313
  xrayOpacity: z.ZodDefault<z.ZodNumber>;
18108
18314
  __EXPERIMENTAL_SMOOTHING_TENSION: z.ZodDefault<z.ZodNumber>;
18109
18315
  __EXPERIMENTAL_SMOOTHING_CORNER_RADIUS: z.ZodDefault<z.ZodNumber>;
18316
+ dashed: z.ZodDefault<z.ZodBoolean>;
18317
+ __EXPERIMENTAL_DASH_OPTIONS: z.ZodOptional<z.ZodDiscriminatedUnion<[
18318
+ z.ZodObject<{
18319
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"length-scaling">;
18320
+ __EXPERIMENTAL_DASH_LENGTH: z.ZodDefault<z.ZodNumber>;
18321
+ __EXPERIMENTAL_DASH_GAP: z.ZodDefault<z.ZodNumber>;
18322
+ }, z.core.$strip>,
18323
+ z.ZodObject<{
18324
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"width-scaling">;
18325
+ __EXPERIMENTAL_DASH_SIZE: z.ZodDefault<z.ZodNumber>;
18326
+ __EXPERIMENTAL_GAP_SIZE: z.ZodDefault<z.ZodNumber>;
18327
+ }, z.core.$strip>,
18328
+ z.ZodObject<{
18329
+ __EXPERIMENTAL_DASH_MODE: z.ZodLiteral<"absolute">;
18330
+ __EXPERIMENTAL_DASH_METERS: z.ZodDefault<z.ZodNumber>;
18331
+ __EXPERIMENTAL_GAP_METERS: z.ZodDefault<z.ZodNumber>;
18332
+ }, z.core.$strip>
18333
+ ], "__EXPERIMENTAL_DASH_MODE">>;
18110
18334
  }, z.core.$strict>;
18111
18335
  type TPathState = z.infer<typeof pathStateSchemaStrict>;
18112
- type TPathUpdateState = z.infer<typeof pathStateSchemaPartial>;
18336
+ type TPathUpdateState = z.input<typeof pathStateSchemaPartial>;
18113
18337
  declare const shapeStateSchemaPartial: z.ZodObject<{
18114
18338
  type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"shape">>>;
18115
18339
  visible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
@@ -18438,6 +18662,7 @@ declare class GeoJsonApi extends PubSub$1<TNavigationEvents> {
18438
18662
  get currentFloorStack(): FloorStack;
18439
18663
  get currentFloor(): Floor;
18440
18664
  getState<T extends MapElementsWithState | string>(target: T): TGetState<T>;
18665
+ __EXPERIMENTAL__getRenderedState<T extends MapElementWithRenderedState>(target: T): TGetRenderedState<T> | undefined;
18441
18666
  setHoverColor(c: string): void;
18442
18667
  getHoverColor(): string | undefined;
18443
18668
  /**
@@ -18621,17 +18846,55 @@ type DirectionProperties = {
18621
18846
  };
18622
18847
  type DirectionFeature = Feature$1<Point$1, DirectionProperties>;
18623
18848
  type DirectionsCollection = FeatureCollection$1<Point$1, DirectionProperties>;
18624
- type SimplifyDirectionsOptions = {
18849
+ interface DoorGeometry {
18850
+ geoJSON: {
18851
+ geometry: {
18852
+ coordinates: [
18853
+ [
18854
+ number,
18855
+ number
18856
+ ],
18857
+ [
18858
+ number,
18859
+ number
18860
+ ]
18861
+ ];
18862
+ };
18863
+ };
18864
+ }
18865
+ type BaseSimplifyOptions = {
18625
18866
  /**
18626
18867
  * Enable or disable simplifying.
18627
18868
  */
18628
18869
  enabled: boolean;
18629
18870
  /**
18630
18871
  * The radius of the buffer around the path to consider when simplifying, in meters.
18631
- * @default 0.7
18872
+ * @default 0.4
18873
+ */
18874
+ radius?: number;
18875
+ };
18876
+ type GreedyLosOptions = BaseSimplifyOptions & {
18877
+ __EXPERIMENTAL_METHOD?: "greedy-los";
18878
+ };
18879
+ type RdpOptions = BaseSimplifyOptions & {
18880
+ __EXPERIMENTAL_METHOD: "rdp";
18881
+ /**
18882
+ * Whether to include door-adjacent nodes (predecessor/successor of doors) in the must-include set.
18883
+ * When true, nodes immediately before and after doors are preserved during simplification.
18884
+ * @default true
18885
+ */
18886
+ mustIncludeDoorBufferNodes?: boolean;
18887
+ };
18888
+ type DpOptimalOptions = BaseSimplifyOptions & {
18889
+ __EXPERIMENTAL_METHOD: "dp-optimal";
18890
+ /**
18891
+ * Whether to include door buffer nodes in DP simplification.
18892
+ * When true, predecessor and successor nodes of doors are marked with preventSmoothing.
18893
+ * @default false
18632
18894
  */
18633
- bufferRadius?: number;
18895
+ includeDoorBufferNodes?: boolean;
18634
18896
  };
18897
+ type SimplifyDirectionsOptions = GreedyLosOptions | RdpOptions | DpOptimalOptions;
18635
18898
  type DirectionsZone = {
18636
18899
  geometry: Feature$1<MultiPolygon$1 | Polygon$1>;
18637
18900
  /**
@@ -18649,6 +18912,7 @@ declare class Navigator$1 {
18649
18912
  graph: NavigationGraph;
18650
18913
  private geometryEdgesByMapId;
18651
18914
  private flagDeclarations;
18915
+ private getDoorByNodeId;
18652
18916
  private disabledNodeIds;
18653
18917
  /**
18654
18918
  * Constructs a Navigator instance to manage pathfinding with optional obstructions and grouping features.
@@ -18657,13 +18921,15 @@ declare class Navigator$1 {
18657
18921
  * @param {ObstructionCollection} [obstructions] - Optional collection of obstructions that could block paths.
18658
18922
  * @param {SpaceCollection} [spaces] - Optional collection of spaces that could block paths.
18659
18923
  * @param {string} [groupBy] - Optional property name to group nodes and paths for differentiated processing.
18924
+ * @param {Function} getDoorByNodeId - Function to get door object by node ID.
18660
18925
  */
18661
- constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, }: {
18926
+ constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, getDoorByNodeId, }: {
18662
18927
  nodes: NodeCollection$1;
18663
18928
  geojsonCollection?: ObstructionCollection | SpaceCollection;
18664
18929
  groupBy?: string;
18665
18930
  multiplicativeDistanceWeightScaling?: boolean;
18666
18931
  flagDeclarations?: NavigationFlagDeclarations;
18932
+ getDoorByNodeId: (nodeId: string) => DoorGeometry | undefined;
18667
18933
  });
18668
18934
  private getDisabledNodeIds;
18669
18935
  /**
@@ -18676,9 +18942,11 @@ declare class Navigator$1 {
18676
18942
  * @param {SimplifyDirectionsOptions} [simplify] - Options to simplify the pathfinding result.
18677
18943
  * @returns {DirectionsCollection} A collection of directional features representing the path.
18678
18944
  */
18679
- getDirections({ zones: directionsZones, originIds, destinationNodeIds, disabledConnectionNodeIds, simplify, multiplicativeDistanceWeightScaling, overrideEdgeWeights, }: {
18945
+ getDirections({ zones: directionsZones, originIds, from, to, destinationNodeIds, disabledConnectionNodeIds, simplify, multiplicativeDistanceWeightScaling, overrideEdgeWeights, }: {
18680
18946
  originIds: string[];
18681
18947
  destinationNodeIds: string[];
18948
+ from: NodeFeature[];
18949
+ to: NodeFeature[];
18682
18950
  zones?: DirectionsZone[];
18683
18951
  disabledConnectionNodeIds?: string[];
18684
18952
  simplify?: SimplifyDirectionsOptions;
@@ -18693,11 +18961,21 @@ declare class Navigator$1 {
18693
18961
  */
18694
18962
  private generatePath;
18695
18963
  /**
18696
- * Simplifies a sequence of steps by reducing unnecessary nodes using a buffer radius to check for obstructions.
18964
+ * Simplifies a sequence of steps by reducing unnecessary nodes using line-of-sight checks.
18965
+ *
18966
+ * Method Selection:
18967
+ * - 'greedy-los': Greedy forward scan with line-of-sight validation. Fastest, O(n) time complexity. Good default choice.
18968
+ * - 'rdp': Uses Ramer-Douglas-Peucker preprocessing + line-of-sight validation + door buffer nodes.
18969
+ * Better for paths with doors and complex geometry. Medium speed.
18970
+ * - 'dp-optimal': Dynamic Programming for globally optimal simplification. Slowest but highest quality, O(n²) complexity.
18971
+ * Best when path quality is critical (e.g., indoor navigation with many turns).
18972
+ *
18973
+ * Performance: greedy-los < rdp < dp-optimal
18974
+ * Quality: greedy-los < rdp < dp-optimal
18697
18975
  *
18698
18976
  * @param {Edge[]} steps - The steps to simplify.
18699
- * @param {number} bufferRadius - The buffer radius to use
18700
- * for simplification.
18977
+ * @param {SimplifyDirectionsOptions} options - Simplification options.
18978
+ * @param {boolean} multiplicativeDistanceWeightScaling - Distance weight scaling option.
18701
18979
  * @returns {Edge[]} An array of simplified edges representing a more direct path.
18702
18980
  */
18703
18981
  private simplifyAllSteps;
@@ -18740,6 +19018,8 @@ declare class Navigator$1 {
18740
19018
  * @returns {Edge[]} An array of simplified edges.
18741
19019
  */
18742
19020
  private simplifySteps;
19021
+ private simplifyStepsImprovedWithSimplifyBeforeLoSChecks;
19022
+ private simplifyStepsWithDPMethod;
18743
19023
  /**
18744
19024
  * Calculates the approximate distance between two geographic coordinates on Earth's surface.
18745
19025
  *
@@ -18821,13 +19101,14 @@ declare class DirectionsInternal {
18821
19101
  /**
18822
19102
  * @hidden
18823
19103
  */
18824
- constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, }: {
19104
+ constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, getDoorByNodeId, }: {
18825
19105
  nodes: ParsedMVF["node.geojson"];
18826
19106
  geojsonCollection: ParsedMVF["obstruction"] | ParsedMVF["space"];
18827
19107
  connections: ParsedMVF["connection.json"];
18828
19108
  groupBy?: string;
18829
19109
  multiplicativeDistanceWeightScaling?: boolean;
18830
19110
  flagDeclarations?: ParsedMVF["navigationFlags.json"];
19111
+ getDoorByNodeId: (nodeId: string) => DoorGeometry | undefined;
18831
19112
  });
18832
19113
  processTargets(fromNodesByTarget: Map<TNavigationTarget, string[]>, toNodesByTarget: Map<TNavigationTarget, string[]>, mapData: MapDataInternal): {
18833
19114
  originIds: string[];
@@ -18836,10 +19117,7 @@ declare class DirectionsInternal {
18836
19117
  };
18837
19118
  getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
18838
19119
  accessible: boolean;
18839
- smoothing: {
18840
- enabled: boolean;
18841
- radius: number;
18842
- };
19120
+ smoothing: SimplifyDirectionsOptions;
18843
19121
  zones: TDirectionZone[];
18844
19122
  excludedConnections: Connection[];
18845
19123
  connectionIdWeightMap: Record<string, number>;
@@ -18847,10 +19125,7 @@ declare class DirectionsInternal {
18847
19125
  /** @deprecated use getDirections instead */
18848
19126
  getDirectionsSync: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
18849
19127
  accessible: boolean;
18850
- smoothing: {
18851
- enabled: boolean;
18852
- radius: number;
18853
- };
19128
+ smoothing: SimplifyDirectionsOptions;
18854
19129
  zones: TDirectionZone[];
18855
19130
  excludedConnections: Connection[];
18856
19131
  connectionIdWeightMap: Record<string, number>;
@@ -19104,6 +19379,52 @@ type TDirectionZone = {
19104
19379
  */
19105
19380
  floor?: Floor;
19106
19381
  };
19382
+ type TExperimentalDashOptions = {
19383
+ /**
19384
+ * Length-scaling mode: dash/gap as fractions of path length (0-1)
19385
+ */
19386
+ __EXPERIMENTAL_DASH_MODE: "length-scaling";
19387
+ /**
19388
+ * Dash length as fraction of path (0-1).
19389
+ * @default 0.1
19390
+ */
19391
+ __EXPERIMENTAL_DASH_LENGTH?: number;
19392
+ /**
19393
+ * Gap length as fraction of path (0-1).
19394
+ * @default 0.1
19395
+ */
19396
+ __EXPERIMENTAL_DASH_GAP?: number;
19397
+ } | {
19398
+ /**
19399
+ * Width-scaling mode: dash/gap as multiples of path width (deck.gl style)
19400
+ */
19401
+ __EXPERIMENTAL_DASH_MODE: "width-scaling";
19402
+ /**
19403
+ * Dash size as multiple of path width.
19404
+ * @default 3.0
19405
+ */
19406
+ __EXPERIMENTAL_DASH_SIZE?: number;
19407
+ /**
19408
+ * Gap size as multiple of path width.
19409
+ * @default 2.0
19410
+ */
19411
+ __EXPERIMENTAL_GAP_SIZE?: number;
19412
+ } | {
19413
+ /**
19414
+ * Absolute mode: dash/gap in meters (deterministic regardless of path length)
19415
+ */
19416
+ __EXPERIMENTAL_DASH_MODE: "absolute";
19417
+ /**
19418
+ * Dash length in meters.
19419
+ * @default 1.0
19420
+ */
19421
+ __EXPERIMENTAL_DASH_METERS?: number;
19422
+ /**
19423
+ * Gap length in meters.
19424
+ * @default 0.5
19425
+ */
19426
+ __EXPERIMENTAL_GAP_METERS?: number;
19427
+ };
19107
19428
  type TAddPathOptions = {
19108
19429
  /**
19109
19430
  * Path Colour. Color can be set using CSS colors names `DarkGoldenRod`, as Hex strings `#0000FF` or the rgb values `rgb(255,0,0)`.
@@ -19223,6 +19544,13 @@ type TAddPathOptions = {
19223
19544
  * @defaultValue 0.5
19224
19545
  */
19225
19546
  __EXPERIMENTAL_SMOOTHING_CORNER_RADIUS?: number;
19547
+ /**
19548
+ * @experimental
19549
+ * Dash configuration. When dashed=true, controls dash/gap sizing.
19550
+ * Uses discriminated union - mode determines which properties are valid.
19551
+ * @see TExperimentalDashOptions
19552
+ */
19553
+ __EXPERIMENTAL_DASH_OPTIONS?: TExperimentalDashOptions;
19226
19554
  };
19227
19555
  type TCollisionRankingTier = "low" | "medium" | "high" | "always-visible";
19228
19556
  type TMarkerPlacement = MarkerPlacement;
@@ -19234,31 +19562,128 @@ type TGetDirectionsOptions = {
19234
19562
  */
19235
19563
  accessible?: boolean;
19236
19564
  /**
19237
- * Enable or disable line-of-sight directions smoothing.
19238
- * With this option enabled, the directions will be simplified to provide a more visually appealing path and shorter instructions.
19565
+ * Enable or disable path smoothing for directions.
19566
+ * When enabled, the path is simplified using line-of-sight checks to provide a more visually appealing route and shorter instructions.
19567
+ *
19568
+ * Can be a boolean to enable or disable smoothing, or an object with configuration options.
19239
19569
  *
19240
- * 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.
19570
+ * **Available methods:**
19571
+ * - `'greedy-los'` (default): Greedy forward scan with line-of-sight validation. Fastest, O(n) time complexity. Good default choice.
19572
+ * - `'rdp'`: Uses Ramer-Douglas-Peucker preprocessing + line-of-sight validation + door buffer nodes. Better for paths with doors and complex geometry. Medium speed.
19573
+ * - `'dp-optimal'`: Dynamic Programming for globally optimal simplification. Slowest but highest quality, O(n²) complexity. Best when path quality is critical.
19241
19574
  *
19242
19575
  * @default true for non-enterprise mode, false for enterprise mode
19243
19576
  *
19244
19577
  * @example
19245
19578
  * ```ts
19246
- * // Enable smoothing with a radius of 3 metres
19579
+ * // Enable smoothing with default settings
19247
19580
  * mapView.getDirections(firstSpace, secondSpace, {
19248
- * smoothing: {
19249
- * radius: 3,
19581
+ * smoothing: true
19582
+ * })
19583
+ *
19584
+ * // Enable smoothing with custom radius (in meters)
19585
+ * mapView.getDirections(firstSpace, secondSpace, {
19586
+ * smoothing: {
19587
+ * radius: 1.5,
19250
19588
  * }
19251
19589
  * })
19252
19590
  *
19253
- * // Explicitly enable smoothing in enterprise mode
19591
+ * // Use greedy line-of-sight method (default, explicit)
19254
19592
  * mapView.getDirections(firstSpace, secondSpace, {
19255
- * smoothing: true
19593
+ * smoothing: {
19594
+ * enabled: true,
19595
+ * __EXPERIMENTAL_METHOD: 'greedy-los',
19596
+ * radius: 0.4,
19597
+ * }
19598
+ * })
19599
+ *
19600
+ * // Use RDP method (always uses line-of-sight)
19601
+ * mapView.getDirections(firstSpace, secondSpace, {
19602
+ * smoothing: {
19603
+ * enabled: true,
19604
+ * __EXPERIMENTAL_METHOD: 'rdp',
19605
+ * radius: 0.4,
19606
+ * }
19607
+ * })
19608
+ *
19609
+ * // Use DP-optimal method with door buffer nodes
19610
+ * mapView.getDirections(firstSpace, secondSpace, {
19611
+ * smoothing: {
19612
+ * enabled: true,
19613
+ * __EXPERIMENTAL_METHOD: 'dp-optimal',
19614
+ * __EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES: true,
19615
+ * radius: 0.4,
19616
+ * }
19256
19617
  * })
19257
19618
  * ```
19258
19619
  */
19259
19620
  smoothing?: boolean | {
19621
+ /**
19622
+ * Enable or disable path smoothing.
19623
+ * @default true for non-enterprise mode, false for enterprise mode
19624
+ */
19625
+ enabled?: boolean;
19626
+ /**
19627
+ * The radius of the buffer around the path to consider when simplifying, in meters.
19628
+ * @default 0.75
19629
+ */
19630
+ radius?: number;
19631
+ /**
19632
+ * @experimental
19633
+ * Path smoothing method using greedy line-of-sight algorithm.
19634
+ * Fastest method with O(n) time complexity. Good default choice.
19635
+ * @default 'greedy-los'
19636
+ */
19637
+ __EXPERIMENTAL_METHOD?: "greedy-los";
19638
+ } | {
19639
+ /**
19640
+ * Enable or disable path smoothing.
19641
+ * @default true for non-enterprise mode, false for enterprise mode
19642
+ */
19260
19643
  enabled?: boolean;
19261
- radius: number;
19644
+ /**
19645
+ * The radius of the buffer around the path to consider when simplifying, in meters.
19646
+ * @default 0.75
19647
+ */
19648
+ radius?: number;
19649
+ /**
19650
+ * @experimental
19651
+ * Path smoothing method using Ramer-Douglas-Peucker preprocessing with line-of-sight validation.
19652
+ * Better for paths with doors and complex geometry. Medium speed.
19653
+ * Always uses line-of-sight validation (cannot be disabled).
19654
+ */
19655
+ __EXPERIMENTAL_METHOD: "rdp";
19656
+ /**
19657
+ * @experimental
19658
+ * Whether to include door-adjacent nodes (predecessor/successor of doors) in the must-include set.
19659
+ * When true (default), nodes immediately before and after doors are preserved during simplification.
19660
+ * @default true
19661
+ */
19662
+ __EXPERIMENTAL_MUST_INCLUDE_DOOR_BUFFER_NODES?: boolean;
19663
+ } | {
19664
+ /**
19665
+ * Enable or disable path smoothing.
19666
+ * @default true for non-enterprise mode, false for enterprise mode
19667
+ */
19668
+ enabled?: boolean;
19669
+ /**
19670
+ * The radius of the buffer around the path to consider when simplifying, in meters.
19671
+ * @default 0.75
19672
+ */
19673
+ radius?: number;
19674
+ /**
19675
+ * @experimental
19676
+ * Path smoothing method using Dynamic Programming for globally optimal simplification.
19677
+ * Slowest but highest quality, O(n²) complexity. Best when path quality is critical.
19678
+ */
19679
+ __EXPERIMENTAL_METHOD: "dp-optimal";
19680
+ /**
19681
+ * @experimental
19682
+ * Whether to include 0.5m buffer nodes perpendicular to doors in DP simplification.
19683
+ * When true, predecessor and successor nodes of doors are marked with preventSmoothing.
19684
+ * @default false
19685
+ */
19686
+ __EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES?: boolean;
19262
19687
  };
19263
19688
  /**
19264
19689
  * Defines the special zones for navigation operations.
@@ -19450,9 +19875,16 @@ type WithState<T> = T extends {
19450
19875
  type TUpdateState<T extends MapElementsWithState | string> = T extends {
19451
19876
  __type: infer U;
19452
19877
  } ? U extends keyof MapElementToUpdateState ? MapElementToUpdateState[U] : never : T extends string ? T extends keyof MapElementToUpdateState ? MapElementToUpdateState[T] : Record<string, any> : never;
19878
+ type MapElementToGetRenderedState = {
19879
+ [Label.__type]: ReadonlyDeep<LabelRenderedState>;
19880
+ };
19453
19881
  type TGetState<T extends MapElementsWithState | string> = T extends {
19454
19882
  __type: infer U;
19455
19883
  } ? U extends keyof MapElementToGetState ? MapElementToGetState[U] : never : T extends string ? T extends keyof MapElementToGetState ? MapElementToGetState[T] : Record<string, any> : never;
19884
+ type MapElementWithRenderedState = WithState<Label>;
19885
+ type TGetRenderedState<T extends MapElementWithRenderedState | string> = T extends {
19886
+ __type: infer U;
19887
+ } ? U extends keyof MapElementToGetRenderedState ? MapElementToGetRenderedState[U] : never : T extends string ? T extends keyof MapElementToGetRenderedState ? MapElementToGetRenderedState[T] : Record<string, any> : never;
19456
19888
  type GlobalState = {
19457
19889
  /**
19458
19890
  * The color of the background, in hex format(#000000).
@@ -20438,8 +20870,7 @@ declare class Connection extends DetailedMapData<Feature<Point, SpaceProperties>
20438
20870
  * @internal
20439
20871
  */
20440
20872
  constructor(data: MapDataInternal, options: {
20441
- mvfDataByFloorId: Record<string, FeatureCollection<Point, SpaceProperties>["features"][number]> | Record<string, Feature<Point, MVFConnection>>;
20442
- accessible?: boolean;
20873
+ mvfData: MVFConnection;
20443
20874
  });
20444
20875
  /**
20445
20876
  * Whether the connection is accessible. For example elevators are accessible while stairs are not.
@@ -20475,10 +20906,6 @@ declare class Connection extends DetailedMapData<Feature<Point, SpaceProperties>
20475
20906
  * @returns {Floor[]} An array of floors for the connection.
20476
20907
  */
20477
20908
  get floors(): Floor[];
20478
- /**
20479
- * Gets the location profiles ({@link LocationProfile}) associated with the connection.
20480
- */
20481
- get locationProfiles(): LocationProfile[];
20482
20909
  /** @internal */
20483
20910
  get focusTarget(): Coordinate[];
20484
20911
  /**
@@ -21108,8 +21535,6 @@ type MapDataRecords = {
21108
21535
  locationProfilesByExternalId: Record<string, LocationProfile[]>;
21109
21536
  objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
21110
21537
  obstructionIdByEntranceId: Record<string, string>;
21111
- connectionIdsByLatLon: Record<string, string[]>;
21112
- mvfConnectionIdsByLatLon: Record<string, string[]>;
21113
21538
  locationProfilesByAttachedFeatureId: Record<string, LocationProfile[]>;
21114
21539
  mvfSpacesById: Record<string, SpaceCollection["features"][number]>;
21115
21540
  mvfNodesById: Record<string, NodeCollection["features"][number]>;
@@ -21515,6 +21940,10 @@ declare class EnterpriseVenue extends BaseMetaData implements MVFEnterpriseVenue
21515
21940
  * The default map of the venue.
21516
21941
  */
21517
21942
  get defaultMap(): string;
21943
+ /**
21944
+ * The enterprise venue type.
21945
+ */
21946
+ get enterpriseType(): EnterpriseVenueType | undefined;
21518
21947
  /**
21519
21948
  * Serializes the EnterpriseVenue data to JSON.
21520
21949
  *
@@ -21698,7 +22127,6 @@ declare class MapDataInternal extends PubSub$1<{
21698
22127
  mvfAnnotationsById: MapDataRecords["mvfAnnotationsById"];
21699
22128
  mvfConnectionsById: MapDataRecords["mvfConnectionsById"];
21700
22129
  mvfConnectionsByNodeId: MapDataRecords["mvfConnectionsByNodeId"];
21701
- mvfConnectionIdsByLatLon: MapDataRecords["mvfConnectionIdsByLatLon"];
21702
22130
  mvfEntrancesById: MapDataRecords["mvfEntrancesById"];
21703
22131
  mvfNodesById: MapDataRecords["mvfNodesById"];
21704
22132
  mvfObstructionById: MapDataRecords["mvfObstructionById"];
@@ -21714,7 +22142,6 @@ declare class MapDataInternal extends PubSub$1<{
21714
22142
  floorStacksByExternalId: MapDataRecords["floorStacksByExternalId"];
21715
22143
  doorsByExternalId: MapDataRecords["doorsByExternalId"];
21716
22144
  areasByExternalId: MapDataRecords["areasByExternalId"];
21717
- connectionSpaceIdsByLatLon: MapDataRecords["connectionIdsByLatLon"];
21718
22145
  locationProfilesByAttachedFeatureId: MapDataRecords["locationProfilesByAttachedFeatureId"];
21719
22146
  entranceNodeIdsBySpaceId?: MapDataRecords["entranceNodeIdsBySpaceId"];
21720
22147
  locationsById: EnterpriseMapDataRecords["locationsById"];
@@ -21913,6 +22340,13 @@ declare class MapDataInternal extends PubSub$1<{
21913
22340
  getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], opt?: TGetDirectionsOptions) => Promise<Directions | undefined>;
21914
22341
  getDirectionsMultiDestination: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | (TNavigationTarget | TNavigationTarget[])[], opt?: TGetDirectionsOptions) => Promise<Directions[] | undefined>;
21915
22342
  getDistance(from: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node$1 | EnterpriseLocation | Area, to: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node$1 | EnterpriseLocation | Area): number;
22343
+ /**
22344
+ * Gets the door associated with a node.
22345
+ *
22346
+ * @param nodeId The ID of the node to check
22347
+ * @returns The door object if the node is associated with a door, undefined otherwise
22348
+ */
22349
+ getDoorByNodeId: (nodeId: string) => Door | undefined;
21916
22350
  transformImageRequest: (url: string) => Promise<{
21917
22351
  url: string;
21918
22352
  }>;