@mappedin/maplibre-overlay 6.5.0-beta.0 → 6.6.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 +1 @@
1
- import{a as A,ca as y,da as B,w,x,y as b}from"./chunk-PS4IVNPZ.js";import{c as g}from"./chunk-LUJQR5EH.js";A();function R(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new B,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=T(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=T(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}g(R,"mergeGeometries");function T(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new y(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}g(T,"mergeAttributes");function X(o,l){if(l===w)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===b||l===x){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===b)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}g(X,"toTrianglesDrawMode");export{R as a,X as b};
1
+ import{a as A,ca as y,da as B,w,x,y as b}from"./chunk-OJT7FRHD.js";import{c as g}from"./chunk-LUJQR5EH.js";A();function R(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new B,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=T(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=T(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}g(R,"mergeGeometries");function T(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new y(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}g(T,"mergeAttributes");function X(o,l){if(l===w)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===b||l===x){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===b)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}g(X,"toTrianglesDrawMode");export{R as a,X as b};
@@ -14513,6 +14513,12 @@ declare class Core extends PubSub<MapEvent> {
14513
14513
  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
14514
  getState(geometryOrGeometryId?: Record<string | number, any> | string | number): EntityState;
14515
14515
  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;
14516
+ /**
14517
+ * Get rendered state for an entity (e.g., runtime rendering state that changes frequently)
14518
+ * @param entity The entity to get rendered state for
14519
+ * @returns Object with all available rendered state properties, or undefined if not found
14520
+ */
14521
+ getRenderedState(entity: EntityId<LabelState> | string | number): LabelRenderedState | undefined;
14516
14522
  /**
14517
14523
  * Set the state of the map view or any entity that was added, regardless of whether it is visible in the scene.
14518
14524
  */
@@ -14865,6 +14871,7 @@ declare class LabelComponent {
14865
14871
  get scaledPinSize(): number;
14866
14872
  iconPadding: number;
14867
14873
  get scaledIconPadding(): number;
14874
+ get textVisible(): boolean;
14868
14875
  dirty: boolean;
14869
14876
  textDirty: boolean;
14870
14877
  pinDirty: boolean;
@@ -15356,6 +15363,12 @@ type ImagePlacementOptions = {
15356
15363
  */
15357
15364
  minimumSizeRatio?: number;
15358
15365
  };
15366
+ type LabelRenderedState = {
15367
+ /**
15368
+ * whether the text is visible
15369
+ */
15370
+ textVisible: boolean;
15371
+ };
15359
15372
  declare const collisionRankingTierSchema: z.ZodUnion<readonly [
15360
15373
  z.ZodEnum<{
15361
15374
  low: "low";
@@ -16760,6 +16773,22 @@ declare class MapView {
16760
16773
  * ```
16761
16774
  */
16762
16775
  getState<T extends MapElementsWithState>(target: T): TGetState<T>;
16776
+ /**
16777
+ * Gets the rendered state of a map element.
16778
+ *
16779
+ * Retrieves runtime rendering state that changes frequently, such as text visibility for labels.
16780
+ *
16781
+ * @param target The map element to get the rendered state for.
16782
+ * @returns An object containing the requested rendered state keys, or undefined if not found.
16783
+ *
16784
+ * @example Get label text visibility
16785
+ * ```ts
16786
+ * const label = mapView.Labels.add(space, 'Hello');
16787
+ * const renderedState = mapView.__EXPERIMENTAL__getRenderedState(label);
16788
+ * console.log('Text visible:', renderedState?.textVisible);
16789
+ * ```
16790
+ */
16791
+ __EXPERIMENTAL__getRenderedState<T extends MapElementWithRenderedState>(target: T): TGetRenderedState<T> | undefined;
16763
16792
  /**
16764
16793
  * Sets the hover color for map elements.
16765
16794
  *
@@ -18438,6 +18467,7 @@ declare class GeoJsonApi extends PubSub$1<TNavigationEvents> {
18438
18467
  get currentFloorStack(): FloorStack;
18439
18468
  get currentFloor(): Floor;
18440
18469
  getState<T extends MapElementsWithState | string>(target: T): TGetState<T>;
18470
+ __EXPERIMENTAL__getRenderedState<T extends MapElementWithRenderedState>(target: T): TGetRenderedState<T> | undefined;
18441
18471
  setHoverColor(c: string): void;
18442
18472
  getHoverColor(): string | undefined;
18443
18473
  /**
@@ -18621,17 +18651,49 @@ type DirectionProperties = {
18621
18651
  };
18622
18652
  type DirectionFeature = Feature$1<Point$1, DirectionProperties>;
18623
18653
  type DirectionsCollection = FeatureCollection$1<Point$1, DirectionProperties>;
18624
- type SimplifyDirectionsOptions = {
18654
+ interface DoorGeometry {
18655
+ geoJSON: {
18656
+ geometry: {
18657
+ coordinates: [
18658
+ [
18659
+ number,
18660
+ number
18661
+ ],
18662
+ [
18663
+ number,
18664
+ number
18665
+ ]
18666
+ ];
18667
+ };
18668
+ };
18669
+ }
18670
+ type BaseSimplifyOptions = {
18625
18671
  /**
18626
18672
  * Enable or disable simplifying.
18627
18673
  */
18628
18674
  enabled: boolean;
18629
18675
  /**
18630
18676
  * The radius of the buffer around the path to consider when simplifying, in meters.
18631
- * @default 0.7
18677
+ * @default 0.4
18678
+ */
18679
+ radius?: number;
18680
+ };
18681
+ type GreedyLosOptions = BaseSimplifyOptions & {
18682
+ __EXPERIMENTAL_METHOD?: "greedy-los";
18683
+ };
18684
+ type RdpOptions = BaseSimplifyOptions & {
18685
+ __EXPERIMENTAL_METHOD: "rdp";
18686
+ };
18687
+ type DpOptimalOptions = BaseSimplifyOptions & {
18688
+ __EXPERIMENTAL_METHOD: "dp-optimal";
18689
+ /**
18690
+ * Whether to include door buffer nodes in DP simplification.
18691
+ * When true, predecessor and successor nodes of doors are marked with preventSmoothing.
18692
+ * @default false
18632
18693
  */
18633
- bufferRadius?: number;
18694
+ includeDoorBufferNodes?: boolean;
18634
18695
  };
18696
+ type SimplifyDirectionsOptions = GreedyLosOptions | RdpOptions | DpOptimalOptions;
18635
18697
  type DirectionsZone = {
18636
18698
  geometry: Feature$1<MultiPolygon$1 | Polygon$1>;
18637
18699
  /**
@@ -18649,6 +18711,7 @@ declare class Navigator$1 {
18649
18711
  graph: NavigationGraph;
18650
18712
  private geometryEdgesByMapId;
18651
18713
  private flagDeclarations;
18714
+ private getDoorByNodeId;
18652
18715
  private disabledNodeIds;
18653
18716
  /**
18654
18717
  * Constructs a Navigator instance to manage pathfinding with optional obstructions and grouping features.
@@ -18657,13 +18720,15 @@ declare class Navigator$1 {
18657
18720
  * @param {ObstructionCollection} [obstructions] - Optional collection of obstructions that could block paths.
18658
18721
  * @param {SpaceCollection} [spaces] - Optional collection of spaces that could block paths.
18659
18722
  * @param {string} [groupBy] - Optional property name to group nodes and paths for differentiated processing.
18723
+ * @param {Function} getDoorByNodeId - Function to get door object by node ID.
18660
18724
  */
18661
- constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, }: {
18725
+ constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, getDoorByNodeId, }: {
18662
18726
  nodes: NodeCollection$1;
18663
18727
  geojsonCollection?: ObstructionCollection | SpaceCollection;
18664
18728
  groupBy?: string;
18665
18729
  multiplicativeDistanceWeightScaling?: boolean;
18666
18730
  flagDeclarations?: NavigationFlagDeclarations;
18731
+ getDoorByNodeId: (nodeId: string) => DoorGeometry | undefined;
18667
18732
  });
18668
18733
  private getDisabledNodeIds;
18669
18734
  /**
@@ -18676,9 +18741,11 @@ declare class Navigator$1 {
18676
18741
  * @param {SimplifyDirectionsOptions} [simplify] - Options to simplify the pathfinding result.
18677
18742
  * @returns {DirectionsCollection} A collection of directional features representing the path.
18678
18743
  */
18679
- getDirections({ zones: directionsZones, originIds, destinationNodeIds, disabledConnectionNodeIds, simplify, multiplicativeDistanceWeightScaling, overrideEdgeWeights, }: {
18744
+ getDirections({ zones: directionsZones, originIds, from, to, destinationNodeIds, disabledConnectionNodeIds, simplify, multiplicativeDistanceWeightScaling, overrideEdgeWeights, }: {
18680
18745
  originIds: string[];
18681
18746
  destinationNodeIds: string[];
18747
+ from: NodeFeature[];
18748
+ to: NodeFeature[];
18682
18749
  zones?: DirectionsZone[];
18683
18750
  disabledConnectionNodeIds?: string[];
18684
18751
  simplify?: SimplifyDirectionsOptions;
@@ -18693,11 +18760,21 @@ declare class Navigator$1 {
18693
18760
  */
18694
18761
  private generatePath;
18695
18762
  /**
18696
- * Simplifies a sequence of steps by reducing unnecessary nodes using a buffer radius to check for obstructions.
18763
+ * Simplifies a sequence of steps by reducing unnecessary nodes using line-of-sight checks.
18764
+ *
18765
+ * Method Selection:
18766
+ * - 'greedy-los': Greedy forward scan with line-of-sight validation. Fastest, O(n) time complexity. Good default choice.
18767
+ * - 'rdp': Uses Ramer-Douglas-Peucker preprocessing + line-of-sight validation + door buffer nodes.
18768
+ * Better for paths with doors and complex geometry. Medium speed.
18769
+ * - 'dp-optimal': Dynamic Programming for globally optimal simplification. Slowest but highest quality, O(n²) complexity.
18770
+ * Best when path quality is critical (e.g., indoor navigation with many turns).
18771
+ *
18772
+ * Performance: greedy-los < rdp < dp-optimal
18773
+ * Quality: greedy-los < rdp < dp-optimal
18697
18774
  *
18698
18775
  * @param {Edge[]} steps - The steps to simplify.
18699
- * @param {number} bufferRadius - The buffer radius to use
18700
- * for simplification.
18776
+ * @param {SimplifyDirectionsOptions} options - Simplification options.
18777
+ * @param {boolean} multiplicativeDistanceWeightScaling - Distance weight scaling option.
18701
18778
  * @returns {Edge[]} An array of simplified edges representing a more direct path.
18702
18779
  */
18703
18780
  private simplifyAllSteps;
@@ -18740,6 +18817,8 @@ declare class Navigator$1 {
18740
18817
  * @returns {Edge[]} An array of simplified edges.
18741
18818
  */
18742
18819
  private simplifySteps;
18820
+ private simplifyStepsImprovedWithSimplifyBeforeLoSChecks;
18821
+ private simplifyStepsWithDPMethod;
18743
18822
  /**
18744
18823
  * Calculates the approximate distance between two geographic coordinates on Earth's surface.
18745
18824
  *
@@ -18821,13 +18900,14 @@ declare class DirectionsInternal {
18821
18900
  /**
18822
18901
  * @hidden
18823
18902
  */
18824
- constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, }: {
18903
+ constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, flagDeclarations, getDoorByNodeId, }: {
18825
18904
  nodes: ParsedMVF["node.geojson"];
18826
18905
  geojsonCollection: ParsedMVF["obstruction"] | ParsedMVF["space"];
18827
18906
  connections: ParsedMVF["connection.json"];
18828
18907
  groupBy?: string;
18829
18908
  multiplicativeDistanceWeightScaling?: boolean;
18830
18909
  flagDeclarations?: ParsedMVF["navigationFlags.json"];
18910
+ getDoorByNodeId: (nodeId: string) => DoorGeometry | undefined;
18831
18911
  });
18832
18912
  processTargets(fromNodesByTarget: Map<TNavigationTarget, string[]>, toNodesByTarget: Map<TNavigationTarget, string[]>, mapData: MapDataInternal): {
18833
18913
  originIds: string[];
@@ -18836,10 +18916,7 @@ declare class DirectionsInternal {
18836
18916
  };
18837
18917
  getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
18838
18918
  accessible: boolean;
18839
- smoothing: {
18840
- enabled: boolean;
18841
- radius: number;
18842
- };
18919
+ smoothing: SimplifyDirectionsOptions;
18843
18920
  zones: TDirectionZone[];
18844
18921
  excludedConnections: Connection[];
18845
18922
  connectionIdWeightMap: Record<string, number>;
@@ -18847,10 +18924,7 @@ declare class DirectionsInternal {
18847
18924
  /** @deprecated use getDirections instead */
18848
18925
  getDirectionsSync: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
18849
18926
  accessible: boolean;
18850
- smoothing: {
18851
- enabled: boolean;
18852
- radius: number;
18853
- };
18927
+ smoothing: SimplifyDirectionsOptions;
18854
18928
  zones: TDirectionZone[];
18855
18929
  excludedConnections: Connection[];
18856
18930
  connectionIdWeightMap: Record<string, number>;
@@ -19234,31 +19308,121 @@ type TGetDirectionsOptions = {
19234
19308
  */
19235
19309
  accessible?: boolean;
19236
19310
  /**
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.
19311
+ * Enable or disable path smoothing for directions.
19312
+ * When enabled, the path is simplified using line-of-sight checks to provide a more visually appealing route and shorter instructions.
19313
+ *
19314
+ * Can be a boolean to enable or disable smoothing, or an object with configuration options.
19239
19315
  *
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.
19316
+ * **Available methods:**
19317
+ * - `'greedy-los'` (default): Greedy forward scan with line-of-sight validation. Fastest, O(n) time complexity. Good default choice.
19318
+ * - `'rdp'`: Uses Ramer-Douglas-Peucker preprocessing + line-of-sight validation + door buffer nodes. Better for paths with doors and complex geometry. Medium speed.
19319
+ * - `'dp-optimal'`: Dynamic Programming for globally optimal simplification. Slowest but highest quality, O(n²) complexity. Best when path quality is critical.
19241
19320
  *
19242
19321
  * @default true for non-enterprise mode, false for enterprise mode
19243
19322
  *
19244
19323
  * @example
19245
19324
  * ```ts
19246
- * // Enable smoothing with a radius of 3 metres
19325
+ * // Enable smoothing with default settings
19247
19326
  * mapView.getDirections(firstSpace, secondSpace, {
19248
- * smoothing: {
19249
- * radius: 3,
19327
+ * smoothing: true
19328
+ * })
19329
+ *
19330
+ * // Enable smoothing with custom radius (in meters)
19331
+ * mapView.getDirections(firstSpace, secondSpace, {
19332
+ * smoothing: {
19333
+ * radius: 1.5,
19250
19334
  * }
19251
19335
  * })
19252
19336
  *
19253
- * // Explicitly enable smoothing in enterprise mode
19337
+ * // Use greedy line-of-sight method (default, explicit)
19254
19338
  * mapView.getDirections(firstSpace, secondSpace, {
19255
- * smoothing: true
19339
+ * smoothing: {
19340
+ * enabled: true,
19341
+ * __EXPERIMENTAL_METHOD: 'greedy-los',
19342
+ * radius: 0.4,
19343
+ * }
19344
+ * })
19345
+ *
19346
+ * // Use RDP method (always uses line-of-sight)
19347
+ * mapView.getDirections(firstSpace, secondSpace, {
19348
+ * smoothing: {
19349
+ * enabled: true,
19350
+ * __EXPERIMENTAL_METHOD: 'rdp',
19351
+ * radius: 0.4,
19352
+ * }
19353
+ * })
19354
+ *
19355
+ * // Use DP-optimal method with door buffer nodes
19356
+ * mapView.getDirections(firstSpace, secondSpace, {
19357
+ * smoothing: {
19358
+ * enabled: true,
19359
+ * __EXPERIMENTAL_METHOD: 'dp-optimal',
19360
+ * __EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES: true,
19361
+ * radius: 0.4,
19362
+ * }
19256
19363
  * })
19257
19364
  * ```
19258
19365
  */
19259
19366
  smoothing?: boolean | {
19367
+ /**
19368
+ * Enable or disable path smoothing.
19369
+ * @default true for non-enterprise mode, false for enterprise mode
19370
+ */
19371
+ enabled?: boolean;
19372
+ /**
19373
+ * The radius of the buffer around the path to consider when simplifying, in meters.
19374
+ * @default 0.75
19375
+ */
19376
+ radius?: number;
19377
+ /**
19378
+ * @experimental
19379
+ * Path smoothing method using greedy line-of-sight algorithm.
19380
+ * Fastest method with O(n) time complexity. Good default choice.
19381
+ * @default 'greedy-los'
19382
+ */
19383
+ __EXPERIMENTAL_METHOD?: "greedy-los";
19384
+ } | {
19385
+ /**
19386
+ * Enable or disable path smoothing.
19387
+ * @default true for non-enterprise mode, false for enterprise mode
19388
+ */
19389
+ enabled?: boolean;
19390
+ /**
19391
+ * The radius of the buffer around the path to consider when simplifying, in meters.
19392
+ * @default 0.75
19393
+ */
19394
+ radius?: number;
19395
+ /**
19396
+ * @experimental
19397
+ * Path smoothing method using Ramer-Douglas-Peucker preprocessing with line-of-sight validation.
19398
+ * Better for paths with doors and complex geometry. Medium speed.
19399
+ * Always uses line-of-sight validation (cannot be disabled).
19400
+ */
19401
+ __EXPERIMENTAL_METHOD: "rdp";
19402
+ } | {
19403
+ /**
19404
+ * Enable or disable path smoothing.
19405
+ * @default true for non-enterprise mode, false for enterprise mode
19406
+ */
19260
19407
  enabled?: boolean;
19261
- radius: number;
19408
+ /**
19409
+ * The radius of the buffer around the path to consider when simplifying, in meters.
19410
+ * @default 0.75
19411
+ */
19412
+ radius?: number;
19413
+ /**
19414
+ * @experimental
19415
+ * Path smoothing method using Dynamic Programming for globally optimal simplification.
19416
+ * Slowest but highest quality, O(n²) complexity. Best when path quality is critical.
19417
+ */
19418
+ __EXPERIMENTAL_METHOD: "dp-optimal";
19419
+ /**
19420
+ * @experimental
19421
+ * Whether to include 0.5m buffer nodes perpendicular to doors in DP simplification.
19422
+ * When true, predecessor and successor nodes of doors are marked with preventSmoothing.
19423
+ * @default false
19424
+ */
19425
+ __EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES?: boolean;
19262
19426
  };
19263
19427
  /**
19264
19428
  * Defines the special zones for navigation operations.
@@ -19450,9 +19614,16 @@ type WithState<T> = T extends {
19450
19614
  type TUpdateState<T extends MapElementsWithState | string> = T extends {
19451
19615
  __type: infer U;
19452
19616
  } ? U extends keyof MapElementToUpdateState ? MapElementToUpdateState[U] : never : T extends string ? T extends keyof MapElementToUpdateState ? MapElementToUpdateState[T] : Record<string, any> : never;
19617
+ type MapElementToGetRenderedState = {
19618
+ [Label.__type]: ReadonlyDeep<LabelRenderedState>;
19619
+ };
19453
19620
  type TGetState<T extends MapElementsWithState | string> = T extends {
19454
19621
  __type: infer U;
19455
19622
  } ? U extends keyof MapElementToGetState ? MapElementToGetState[U] : never : T extends string ? T extends keyof MapElementToGetState ? MapElementToGetState[T] : Record<string, any> : never;
19623
+ type MapElementWithRenderedState = WithState<Label>;
19624
+ type TGetRenderedState<T extends MapElementWithRenderedState | string> = T extends {
19625
+ __type: infer U;
19626
+ } ? U extends keyof MapElementToGetRenderedState ? MapElementToGetRenderedState[U] : never : T extends string ? T extends keyof MapElementToGetRenderedState ? MapElementToGetRenderedState[T] : Record<string, any> : never;
19456
19627
  type GlobalState = {
19457
19628
  /**
19458
19629
  * The color of the background, in hex format(#000000).
@@ -20438,8 +20609,7 @@ declare class Connection extends DetailedMapData<Feature<Point, SpaceProperties>
20438
20609
  * @internal
20439
20610
  */
20440
20611
  constructor(data: MapDataInternal, options: {
20441
- mvfDataByFloorId: Record<string, FeatureCollection<Point, SpaceProperties>["features"][number]> | Record<string, Feature<Point, MVFConnection>>;
20442
- accessible?: boolean;
20612
+ mvfData: MVFConnection;
20443
20613
  });
20444
20614
  /**
20445
20615
  * Whether the connection is accessible. For example elevators are accessible while stairs are not.
@@ -20475,10 +20645,6 @@ declare class Connection extends DetailedMapData<Feature<Point, SpaceProperties>
20475
20645
  * @returns {Floor[]} An array of floors for the connection.
20476
20646
  */
20477
20647
  get floors(): Floor[];
20478
- /**
20479
- * Gets the location profiles ({@link LocationProfile}) associated with the connection.
20480
- */
20481
- get locationProfiles(): LocationProfile[];
20482
20648
  /** @internal */
20483
20649
  get focusTarget(): Coordinate[];
20484
20650
  /**
@@ -21108,8 +21274,6 @@ type MapDataRecords = {
21108
21274
  locationProfilesByExternalId: Record<string, LocationProfile[]>;
21109
21275
  objectEntranceNodeIdsByObstructionId: Record<string, string[]>;
21110
21276
  obstructionIdByEntranceId: Record<string, string>;
21111
- connectionIdsByLatLon: Record<string, string[]>;
21112
- mvfConnectionIdsByLatLon: Record<string, string[]>;
21113
21277
  locationProfilesByAttachedFeatureId: Record<string, LocationProfile[]>;
21114
21278
  mvfSpacesById: Record<string, SpaceCollection["features"][number]>;
21115
21279
  mvfNodesById: Record<string, NodeCollection["features"][number]>;
@@ -21698,7 +21862,6 @@ declare class MapDataInternal extends PubSub$1<{
21698
21862
  mvfAnnotationsById: MapDataRecords["mvfAnnotationsById"];
21699
21863
  mvfConnectionsById: MapDataRecords["mvfConnectionsById"];
21700
21864
  mvfConnectionsByNodeId: MapDataRecords["mvfConnectionsByNodeId"];
21701
- mvfConnectionIdsByLatLon: MapDataRecords["mvfConnectionIdsByLatLon"];
21702
21865
  mvfEntrancesById: MapDataRecords["mvfEntrancesById"];
21703
21866
  mvfNodesById: MapDataRecords["mvfNodesById"];
21704
21867
  mvfObstructionById: MapDataRecords["mvfObstructionById"];
@@ -21714,7 +21877,6 @@ declare class MapDataInternal extends PubSub$1<{
21714
21877
  floorStacksByExternalId: MapDataRecords["floorStacksByExternalId"];
21715
21878
  doorsByExternalId: MapDataRecords["doorsByExternalId"];
21716
21879
  areasByExternalId: MapDataRecords["areasByExternalId"];
21717
- connectionSpaceIdsByLatLon: MapDataRecords["connectionIdsByLatLon"];
21718
21880
  locationProfilesByAttachedFeatureId: MapDataRecords["locationProfilesByAttachedFeatureId"];
21719
21881
  entranceNodeIdsBySpaceId?: MapDataRecords["entranceNodeIdsBySpaceId"];
21720
21882
  locationsById: EnterpriseMapDataRecords["locationsById"];
@@ -21913,6 +22075,13 @@ declare class MapDataInternal extends PubSub$1<{
21913
22075
  getDirections: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | TNavigationTarget[], opt?: TGetDirectionsOptions) => Promise<Directions | undefined>;
21914
22076
  getDirectionsMultiDestination: (from: TNavigationTarget | TNavigationTarget[], to: TNavigationTarget | (TNavigationTarget | TNavigationTarget[])[], opt?: TGetDirectionsOptions) => Promise<Directions[] | undefined>;
21915
22077
  getDistance(from: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node$1 | EnterpriseLocation | Area, to: Space | Door | Coordinate | MapObject | PointOfInterest | Annotation | Node$1 | EnterpriseLocation | Area): number;
22078
+ /**
22079
+ * Gets the door associated with a node.
22080
+ *
22081
+ * @param nodeId The ID of the node to check
22082
+ * @returns The door object if the node is associated with a door, undefined otherwise
22083
+ */
22084
+ getDoorByNodeId: (nodeId: string) => Door | undefined;
21916
22085
  transformImageRequest: (url: string) => Promise<{
21917
22086
  url: string;
21918
22087
  }>;