@mappedin/mappedin-js 6.1.2 → 6.3.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.
Files changed (49) hide show
  1. package/THIRD_PARTY_LICENSES.txt +19 -17
  2. package/lib/esm/GLTFExporter-ZVF3Y5DX.js +1 -0
  3. package/lib/esm/{GLTFLoader-TLLNLQ5Y.js → GLTFLoader-3QTALUTA.js} +1 -2
  4. package/lib/esm/chunk-2DEFE4C2.js +1 -0
  5. package/lib/esm/chunk-5W2UDR4H.js +1 -0
  6. package/lib/esm/chunk-66DYOCZO.js +1 -0
  7. package/lib/esm/chunk-Q56Y72HB.js +1 -0
  8. package/lib/esm/{chunk-MLCPE7I2.js → chunk-YB4VFXKF.js} +1 -2
  9. package/lib/esm/index.css +1 -2
  10. package/lib/esm/index.d.ts +180 -54
  11. package/lib/esm/index.js +1 -2
  12. package/lib/esm/inspector-B32KFAD4.js +1 -0
  13. package/lib/esm/inspector-Z5ATF4CD.css +1 -0
  14. package/lib/esm/internal-OFWBS2NI.css +1 -0
  15. package/lib/esm/internal-RK6SZERV.js +1 -0
  16. package/lib/esm/{roboto-regular-R5KXKW73.js → roboto-regular-ERMR6E6W.js} +1 -2
  17. package/lib/esm/text3d-DIUCQLOC.js +1 -0
  18. package/lib/esm/{text3d-AXM5ZHCS.css → text3d-M57DIX3E.css} +0 -1
  19. package/lib/esm/workers/collision-worker.csp.js +1 -23
  20. package/lib/esm/workers/maplibre-worker.csp.js +1 -2
  21. package/lib/index.css +1 -2
  22. package/package.json +6 -4
  23. package/lib/esm/GLTFExporter-O4OUZTHE.js +0 -2
  24. package/lib/esm/GLTFExporter-O4OUZTHE.js.map +0 -7
  25. package/lib/esm/GLTFLoader-TLLNLQ5Y.js.map +0 -7
  26. package/lib/esm/chunk-3PM6GKGK.js +0 -2048
  27. package/lib/esm/chunk-3PM6GKGK.js.map +0 -7
  28. package/lib/esm/chunk-3U5JJXJA.js +0 -3820
  29. package/lib/esm/chunk-3U5JJXJA.js.map +0 -7
  30. package/lib/esm/chunk-MLCPE7I2.js.map +0 -7
  31. package/lib/esm/chunk-ROCNZJLL.js +0 -2
  32. package/lib/esm/chunk-ROCNZJLL.js.map +0 -7
  33. package/lib/esm/chunk-UOCWYBVK.js +0 -938
  34. package/lib/esm/chunk-UOCWYBVK.js.map +0 -7
  35. package/lib/esm/index.css.map +0 -7
  36. package/lib/esm/index.js.map +0 -7
  37. package/lib/esm/inspector-2XETNHYZ.css +0 -2
  38. package/lib/esm/inspector-2XETNHYZ.css.map +0 -7
  39. package/lib/esm/inspector-66PSYVJU.js +0 -483
  40. package/lib/esm/inspector-66PSYVJU.js.map +0 -7
  41. package/lib/esm/internal-R5XTRV7Q.css +0 -2
  42. package/lib/esm/internal-R5XTRV7Q.css.map +0 -7
  43. package/lib/esm/internal-WJZVXVL6.js +0 -2
  44. package/lib/esm/internal-WJZVXVL6.js.map +0 -7
  45. package/lib/esm/roboto-regular-R5KXKW73.js.map +0 -7
  46. package/lib/esm/text3d-AXM5ZHCS.css.map +0 -7
  47. package/lib/esm/text3d-EZBY7L7A.js +0 -253
  48. package/lib/esm/text3d-EZBY7L7A.js.map +0 -7
  49. package/lib/index-rn.js +0 -4306
@@ -1,8 +1,8 @@
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, 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, 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
- import { BatchedMesh, BatchedMeshGeometryRange, BufferAttribute, BufferGeometry, Camera, Camera as ThreeCamera, Color, Group, Intersection, LineSegments, Mesh, MeshLambertMaterial, MeshLambertMaterialParameters, Object3D, Object3DEventMap, PerspectiveCamera, Plane, PlaneGeometry, Raycaster, Scene, ShaderMaterial, Texture, TubeGeometry, Vector2, Vector3, WebGLRenderer } from 'three';
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';
6
6
  import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
7
7
 
8
8
  declare const VALID_CONTEXTS: readonly [
@@ -517,11 +517,11 @@ export type TGetMapDataOptions = TGetMapDataWithCredentialsOptions | TGetMapData
517
517
  /**
518
518
  * @internal
519
519
  */
520
- export declare function parseMVF(raw: RawMVF): ParsedMVF;
520
+ declare function parseMVFv2(raw: RawMVF): ParsedMVF;
521
521
  /**
522
522
  * @internal
523
523
  */
524
- export declare function unzipMVF(data: Uint8Array): Promise<RawMVF>;
524
+ declare function unzipMVFv2(data: Uint8Array): Promise<RawMVF>;
525
525
  type LocalePackUrls = {
526
526
  [key: string]: string;
527
527
  };
@@ -580,6 +580,7 @@ type Style = {
580
580
  };
581
581
  declare class StyleComponent implements Style {
582
582
  #private;
583
+ readonly type: "style";
583
584
  initialColor: string;
584
585
  set color(color: string);
585
586
  get color(): string;
@@ -611,6 +612,7 @@ declare class StyleComponent implements Style {
611
612
  constructor(style?: Partial<Style>);
612
613
  }
613
614
  declare class Text3DStyleComponent implements Partial<Text3DStyle> {
615
+ readonly type: "text3dStyle";
614
616
  visible?: boolean;
615
617
  altitude?: number;
616
618
  color?: string;
@@ -839,6 +841,7 @@ type ModelStyle = {
839
841
  clippingPlaneTopVisible: boolean;
840
842
  };
841
843
  declare class ModelStyleComponnet implements Partial<ModelStyle> {
844
+ readonly type: "modelStyle";
842
845
  dirty: boolean;
843
846
  visible: boolean;
844
847
  opacity: number;
@@ -902,6 +905,7 @@ declare class GeometryGroupObject3D extends Object3D {
902
905
  visible: boolean;
903
906
  readonly type: "geometry-group";
904
907
  components: never[];
908
+ getComponent(): void;
905
909
  userData: {
906
910
  entityId: string | number;
907
911
  entities3D: Set<string | number>;
@@ -919,6 +923,7 @@ declare class GeometryGroupObject3D extends Object3D {
919
923
  getfirstChildEntityId(): string | number | undefined;
920
924
  }
921
925
  declare class InteractionComponent {
926
+ type: "interaction";
922
927
  hover: boolean | "user-interaction";
923
928
  dirty: boolean;
924
929
  }
@@ -2003,10 +2008,10 @@ interface $ZodLiteral<T extends util.Literal = util.Literal> extends $ZodType {
2003
2008
  _zod: $ZodLiteralInternals<T>;
2004
2009
  }
2005
2010
  declare const $ZodLiteral: $constructor<$ZodLiteral>;
2006
- type _File = typeof globalThis extends {
2011
+ type _File$1 = typeof globalThis extends {
2007
2012
  File: infer F extends new (...args: any[]) => any;
2008
2013
  } ? InstanceType<F> : {};
2009
- interface File$1 extends _File {
2014
+ interface File$1 extends _File$1 {
2010
2015
  readonly type: string;
2011
2016
  readonly size: number;
2012
2017
  }
@@ -4679,6 +4684,10 @@ declare class ModelComponent {
4679
4684
  color: Color;
4680
4685
  setColor(): void;
4681
4686
  clippingPlane?: Plane;
4687
+ /**
4688
+ * The model scene that was loaded from GLB, minus the hole-fill-mesh business.
4689
+ */
4690
+ get modelScene(): Object3D<import("three").Object3DEventMap> | Geometry3DObject3D | undefined;
4682
4691
  position: Vector3;
4683
4692
  get altitude(): number;
4684
4693
  set altitude(value: number);
@@ -5007,6 +5016,7 @@ type Outline = {
5007
5016
  };
5008
5017
  declare class OutlineComponent implements Outline {
5009
5018
  #private;
5019
+ readonly type: "outline";
5010
5020
  color: string;
5011
5021
  dirty: boolean;
5012
5022
  /** Controls whether the outline should be updated in the renderer */
@@ -5036,6 +5046,7 @@ declare class OutlineComponent implements Outline {
5036
5046
  constructor(color: string);
5037
5047
  }
5038
5048
  declare class FocusableComponent {
5049
+ readonly type: "focusable";
5039
5050
  focusMesh?: Mesh;
5040
5051
  dirty: boolean;
5041
5052
  }
@@ -5068,6 +5079,7 @@ type SingleTexture = {
5068
5079
  ];
5069
5080
  };
5070
5081
  declare class TextureComponent implements TextureStyle {
5082
+ readonly type: "texture";
5071
5083
  texture?: SingleTexture;
5072
5084
  topTexture?: SingleTexture;
5073
5085
  showTexture: boolean;
@@ -5084,6 +5096,7 @@ type Border = {
5084
5096
  needsRebuild: boolean;
5085
5097
  };
5086
5098
  declare class BorderComponent implements Border {
5099
+ readonly type: "border";
5087
5100
  dirty: boolean;
5088
5101
  needsRebuild: boolean;
5089
5102
  set visible(visible: boolean);
@@ -5100,6 +5113,7 @@ type ClippingPlane = {
5100
5113
  topVisible?: boolean;
5101
5114
  };
5102
5115
  declare class ClippingPlaneComponent implements ClippingPlane {
5116
+ readonly type: "clippingPlane";
5103
5117
  dirty: boolean;
5104
5118
  needsRebuild: boolean;
5105
5119
  verticalOffset: number;
@@ -5138,6 +5152,23 @@ declare class PatMeshContainer extends Geometry3DObject3D {
5138
5152
  }
5139
5153
  type MeshComponentTypes = MeshComponent | PathComponent | ModelComponent | CustomGeometryComponent | Text3DComponent | ImageComponent;
5140
5154
  type MappedComponentType<M> = M extends MeshComponent ? "geometry" : M extends PathComponent ? "path" : M extends ModelComponent ? "model" : M extends CustomGeometryComponent ? "custom-geometry" : M extends ImageComponent ? "image" : M extends Text3DComponent ? "text3d" : never;
5155
+ type ComponentTypeMap = {
5156
+ interaction: InteractionComponent;
5157
+ geometry: MeshComponent;
5158
+ path: PathComponent;
5159
+ model: ModelComponent;
5160
+ "custom-geometry": CustomGeometryComponent;
5161
+ image: ImageComponent;
5162
+ text3d: Text3DComponent;
5163
+ style: StyleComponent;
5164
+ text3dStyle: Text3DStyleComponent;
5165
+ modelStyle: ModelStyleComponnet;
5166
+ outline: OutlineComponent;
5167
+ focusable: FocusableComponent;
5168
+ texture: TextureComponent;
5169
+ border: BorderComponent;
5170
+ clippingPlane: ClippingPlaneComponent;
5171
+ };
5141
5172
  declare class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T extends MappedComponentType<M> = MappedComponentType<M>, O extends OutlineComponent | undefined = OutlineComponent | undefined, F extends FocusableComponent | undefined = FocusableComponent | undefined, TX extends TextureComponent | undefined = TextureComponent | undefined, B extends BorderComponent | undefined = BorderComponent | undefined, C extends ClippingPlaneComponent | undefined = ClippingPlaneComponent | undefined> {
5142
5173
  id: string | number;
5143
5174
  components: [
@@ -5150,6 +5181,7 @@ declare class Geometry3D<M extends MeshComponentTypes = MeshComponent, S extends
5150
5181
  TX?,
5151
5182
  C?
5152
5183
  ];
5184
+ getComponent<K extends keyof ComponentTypeMap>(type: K): ComponentTypeMap[K] | undefined;
5153
5185
  /**
5154
5186
  * Parent geometry group ID
5155
5187
  */
@@ -15227,7 +15259,7 @@ declare class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TColli
15227
15259
  working: boolean;
15228
15260
  private _postMessage;
15229
15261
  componentArray: (MarkerComponent | LabelComponent)[];
15230
- update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, isPanning?: boolean, staticColliders?: Rectangle[]) => void;
15262
+ update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition, lockStrategies?: boolean, staticColliders?: Rectangle[]) => void;
15231
15263
  resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition): void;
15232
15264
  /**
15233
15265
  * Resolve collisions
@@ -15265,7 +15297,7 @@ declare class TapsController {
15265
15297
  destroy(): void;
15266
15298
  }
15267
15299
  type InteractionPayload = {
15268
- entity2D?: Geometry2D;
15300
+ entity2D: Geometry2D[];
15269
15301
  entity3D?: Geometry3D;
15270
15302
  position?: Vector3;
15271
15303
  groupContainers?: GroupContainerObject3D[];
@@ -15284,12 +15316,11 @@ type InteractionState = {
15284
15316
  mouseDownStart: {
15285
15317
  time: number;
15286
15318
  timestamp: number;
15287
- offsetX: number;
15288
- offsetY: number;
15319
+ clientX: number;
15320
+ clientY: number;
15289
15321
  } | undefined;
15290
15322
  };
15291
15323
  declare class InteractionSystem extends PubSub<InteractionEvents> {
15292
- #private;
15293
15324
  raycaster: Raycaster;
15294
15325
  private state;
15295
15326
  private coreState;
@@ -15309,7 +15340,6 @@ declare class InteractionSystem extends PubSub<InteractionEvents> {
15309
15340
  }>): void;
15310
15341
  setHovered3DEntityInteractionComponentDirty(): void;
15311
15342
  hasTouched: boolean;
15312
- onPointerMoveRaf: (event: PointerEvent) => void;
15313
15343
  private onPointerMove;
15314
15344
  tapsControl: TapsController;
15315
15345
  getThreeDIntersectsFromXY(point: Vector2): Intersection<Object3D<Object3DEventMap>>[];
@@ -15338,7 +15368,7 @@ declare class InteractionSystem extends PubSub<InteractionEvents> {
15338
15368
  enableDebug(): void;
15339
15369
  get _state(): {
15340
15370
  hovered3DEntity: Geometry3D | undefined;
15341
- hovered2DEntity: Geometry2D | undefined;
15371
+ hovered2DEntities: Set<string | number>;
15342
15372
  hovered3DContainers: GroupContainerObject3D[] | undefined;
15343
15373
  lastHover: Geometry3D | undefined;
15344
15374
  interaction: InteractionState;
@@ -15991,6 +16021,7 @@ declare class RenderSystem extends PubSub<{
15991
16021
  private twoDFrameId;
15992
16022
  private animationFrameId;
15993
16023
  private nextFrame;
16024
+ private updateEntitiesFrameId;
15994
16025
  update: (sync?: boolean) => Promise<any>;
15995
16026
  /**
15996
16027
  * Paint to screen
@@ -17167,6 +17198,19 @@ declare class ClippingPlaneSystem {
17167
17198
  private process;
17168
17199
  private createHoleFillGeometry;
17169
17200
  }
17201
+ export interface ISystemPlugin {
17202
+ /**
17203
+ *
17204
+ * @param state - The current state of the renderer.
17205
+ */
17206
+ update(state: RendererState): void;
17207
+ }
17208
+ declare class PluginSystem {
17209
+ private plugins;
17210
+ registerPlugin(plugin: ISystemPlugin): void;
17211
+ unregisterPlugin(plugin: ISystemPlugin): void;
17212
+ update(state: RendererState): void;
17213
+ }
17170
17214
  type Systems = {
17171
17215
  cameraSystem: CameraSystem;
17172
17216
  panBoundsSystem: PanBoundsSystem;
@@ -17199,6 +17243,7 @@ type Systems = {
17199
17243
  borderSystem: BorderSystem;
17200
17244
  renderOrderSystem: RenderOrderSystem;
17201
17245
  clippingPlaneSystem: ClippingPlaneSystem;
17246
+ pluginSystem: PluginSystem;
17202
17247
  };
17203
17248
  export type MapViewState = {
17204
17249
  readonly type: "map-view";
@@ -17252,10 +17297,12 @@ declare class Core extends PubSub<MapEvent> {
17252
17297
  altitude?: number;
17253
17298
  interactive?: boolean;
17254
17299
  }, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<ShapeState>;
17300
+ registerPlugin(plugin: ISystemPlugin): void;
17301
+ unregisterPlugin(plugin: ISystemPlugin): void;
17255
17302
  /**
17256
17303
  * Add a geometry group from GeoJSON data
17257
17304
  */
17258
- addGeometryGroup<T extends FeatureCollection$1<Polygon$1 | MultiPolygon$1 | LineString, any>>(id: string, geometry: T, style?: T extends FeatureCollection$1<LineString, any> ? LineStyle : PaintStyle, parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
17305
+ addGeometryGroup<T extends FeatureCollection$1<Polygon$1 | MultiPolygon$1 | LineString, any>>(id: string, geometry: T, style?: (T extends FeatureCollection$1<LineString, any> ? LineStyle : PaintStyle) | ((feature: Feature$1<Polygon$1 | MultiPolygon$1 | LineString, any>) => T extends FeatureCollection$1<LineString, any> ? LineStyle : PaintStyle), parent?: EntityId<GroupContainerState> | string | number | null): EntityId<GeometryGroupState>;
17259
17306
  addOccluder<T extends Feature$1<Polygon$1 | MultiPolygon$1, any>>(feature: T, parent?: EntityId<GroupContainerState> | string | number | null): number;
17260
17307
  addImage(id: string, geometry: Feature$1<Point$1, ImageProperties>, style: ImageStyle, parent?: EntityId<GroupContainerState> | string | null): EntityId<ImageState> | undefined;
17261
17308
  /**
@@ -17571,6 +17618,7 @@ type GroupContainerState = {
17571
17618
  declare class GroupContainerObject3D extends Object3D {
17572
17619
  childrenIds: Set<string | number>;
17573
17620
  children: (GroupContainerObject3D | GeometryGroupObject3D | BatchedText | Geometry2D["object3d"] | NonNullable<Geometry3D["object3d"]>)[];
17621
+ getComponent(): void;
17574
17622
  readonly type: "group-container";
17575
17623
  userData: {
17576
17624
  entityId: string | number;
@@ -17735,6 +17783,11 @@ declare class LabelComponent {
17735
17783
  }
17736
17784
  declare class Geometry2DObject3D extends Object3D {
17737
17785
  }
17786
+ type ComponentTypeMap$1 = {
17787
+ interaction: InteractionComponent;
17788
+ marker: MarkerComponent;
17789
+ label: LabelComponent;
17790
+ };
17738
17791
  declare class Geometry2D {
17739
17792
  id: string | number;
17740
17793
  get type(): "label" | "marker";
@@ -17748,6 +17801,7 @@ declare class Geometry2D {
17748
17801
  MarkerComponent | LabelComponent,
17749
17802
  InteractionComponent?
17750
17803
  ];
17804
+ getComponent<T extends keyof ComponentTypeMap$1>(type: T): ComponentTypeMap$1[T] | undefined;
17751
17805
  disposed: boolean;
17752
17806
  constructor(ui: MarkerComponent | LabelComponent, position: Vector3, verticalOffset?: number);
17753
17807
  private worldPosition;
@@ -18069,15 +18123,27 @@ type MapEventPayload<EventName extends keyof MapEvent> = MapEvent[EventName] ext
18069
18123
  } ? MapEvent[EventName]["data"] : MapEvent[EventName];
18070
18124
  type All3DTypes = Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D;
18071
18125
  type RendererState = {
18072
- geometry3DMap: Map<string | number, All3DTypes>;
18073
- geometry2DMap: Map<string | number, Geometry2D>;
18074
- geometry2DIdsInScene: Set<Geometry2D["id"]>;
18075
- geometry3DIdsInScene: Set<All3DTypes["id"]>;
18126
+ /**
18127
+ * A map of all 3D geometries in the world.
18128
+ */
18129
+ readonly geometry3DMap: Map<string | number, All3DTypes>;
18130
+ /**
18131
+ * A map of all 2D geometries in the world.
18132
+ */
18133
+ readonly geometry2DMap: Map<string | number, Geometry2D>;
18134
+ /**
18135
+ * A set of all 2D geometry IDs in the scene. This is updated when objects' visiblity changes.
18136
+ */
18137
+ readonly geometry2DIdsInScene: Set<Geometry2D["id"]>;
18138
+ /**
18139
+ * A set of all 3D geometry IDs in the scene. This is updated when objects' visiblity changes.
18140
+ */
18141
+ readonly geometry3DIdsInScene: Set<All3DTypes["id"]>;
18076
18142
  /**
18077
18143
  * IDs of geometry groups that need to be loaded, including preloaded geometry groups that are not in the scene yet
18078
18144
  */
18079
- geometryGroupIdsToLoad: Set<GeometryGroupObject3D["userData"]["entityId"]>;
18080
- entityScene: GroupContainerObject3D;
18145
+ readonly geometryGroupIdsToLoad: Set<GeometryGroupObject3D["userData"]["entityId"]>;
18146
+ readonly geometryScene: GroupContainerObject3D;
18081
18147
  hoverColor: string;
18082
18148
  text3dHoverColor: string;
18083
18149
  center?: Position$1;
@@ -18100,6 +18166,10 @@ type RendererState = {
18100
18166
  number
18101
18167
  ];
18102
18168
  useStandaloneCamera: boolean;
18169
+ directionalLight: DirectionalLight;
18170
+ ambientLight: AmbientLight;
18171
+ renderer: WebGLRenderer;
18172
+ threeJSScene: Scene;
18103
18173
  };
18104
18174
  type EntityTypes = Geometry3DTypes | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D;
18105
18175
  type TransformImageRequest = (url: string) => Promise<{
@@ -18311,6 +18381,7 @@ declare class MarkerComponent {
18311
18381
  collisionDirty: boolean;
18312
18382
  visibilityNeedsUpdate: "show" | "hide" | false;
18313
18383
  constructor(contentHtml: string, options?: AddMarkerOptions);
18384
+ updateDimensionsIfZeroWidthHeight(width?: number, height?: number): void;
18314
18385
  updateDimensions(width?: number, height?: number): void;
18315
18386
  animation: Animation | null;
18316
18387
  currentStrategyIndex: number;
@@ -19436,6 +19507,10 @@ export declare class Debug {
19436
19507
  constructor(core: Core);
19437
19508
  update: Core["Debug"]["update"];
19438
19509
  }
19510
+ export type AutoElements = {
19511
+ labels: Label[];
19512
+ markers: Marker[];
19513
+ };
19439
19514
  /**
19440
19515
  * ## MapView in Mappedin JS
19441
19516
  *
@@ -20241,20 +20316,18 @@ export declare class MapView {
20241
20316
  };
20242
20317
  /**
20243
20318
  * @experimental
20244
- * @warning **EXPERIMENTAL FEATURE UNDER CONSTRUCTION**
20245
20319
  *
20246
20320
  * This is an experimental feature that may undergo significant changes,
20247
20321
  * including breaking changes, renaming, or complete removal in future versions.
20248
20322
  * Do not rely on this API in production environments.
20249
20323
  *
20250
- * Currently provides basic auto-labeling functionality for map elements.
20251
- * Future versions may include comprehensive theming and auto-setup features.
20324
+ * Automatically creates labels, markers, and updates state of map elements provided with default settings.
20325
+ * @param mapElements - A custom array of map elements to automatically create labels, markers, and update state of.
20326
+ * If not provided, all map elements will be used.
20252
20327
  *
20253
- * @returns An object containing auto-created labels
20328
+ * @returns An object containing auto-created labels and markers.
20254
20329
  */
20255
- __EXPERIMENTAL__auto(): Promise<{
20256
- labels: Label[];
20257
- }>;
20330
+ __EXPERIMENTAL__auto(mapElements?: MapDataElements[]): Promise<AutoElements>;
20258
20331
  /**
20259
20332
  * Subscribe a function to an event.
20260
20333
  *
@@ -20371,6 +20444,16 @@ export declare class MapView {
20371
20444
  * @default false
20372
20445
  */
20373
20446
  set __INTERNAL__hidePathsNotOnCurrentFloor(value: boolean);
20447
+ /**
20448
+ * @internal
20449
+ * @experimental
20450
+ */
20451
+ registerPlugin(plugin: ISystemPlugin): void;
20452
+ /**
20453
+ * @internal
20454
+ * @experimental
20455
+ */
20456
+ unregisterPlugin(plugin: ISystemPlugin): void;
20374
20457
  }
20375
20458
  /**
20376
20459
  * ## Camera in Mappedin JS
@@ -22258,9 +22341,7 @@ declare class GeoJsonApi extends PubSub<TNavigationEvents> {
22258
22341
  };
22259
22342
  isInView(target: Space | MapObject | Label | Marker | string): boolean;
22260
22343
  getInView<T extends string>(type: T, options?: TGetInViewOptions): MapFeatureOfType<T>[];
22261
- __EXPERIMENTAL__auto(): Promise<{
22262
- labels: Label[];
22263
- }>;
22344
+ __EXPERIMENTAL__auto(mapElements?: MapDataElements[]): Promise<AutoElements>;
22264
22345
  tween<T extends Record<string, unknown>>(object: T): Tween<T>;
22265
22346
  removeTween(tween: Tween<any>): void;
22266
22347
  tweenGroup(): import("@tweenjs/tween.js").Group;
@@ -22405,10 +22486,6 @@ declare class DirectionsInternal {
22405
22486
  originIds: string[];
22406
22487
  destinationNodeIds: string[];
22407
22488
  featureToNodeIdsMap: Map<TNavigationTarget, string[]>;
22408
- /**
22409
- * Node ID for early return when origin and destination share same space.
22410
- */
22411
- earlyReturnNodeId?: string;
22412
22489
  };
22413
22490
  getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
22414
22491
  accessible: boolean;
@@ -22785,6 +22862,31 @@ export type TMapDataEvents = {
22785
22862
  name: string;
22786
22863
  };
22787
22864
  };
22865
+ /**
22866
+ * A class that implements IAnchorable can have 2D elements like {@link Label}s and {@link Marker}s anchored to it.
22867
+ */
22868
+ export interface IAnchorable {
22869
+ get anchorTarget(): Coordinate;
22870
+ }
22871
+ /**
22872
+ * A class that implements IFocusable can be focused on by the camera.
22873
+ */
22874
+ export interface IFocusable {
22875
+ get focusTarget(): TFocusTarget | TFocusTarget[];
22876
+ }
22877
+ /**
22878
+ * A class that implements INavigatable can be navigated to via directions.
22879
+ */
22880
+ export interface INavigatable {
22881
+ get navigationTarget(): TNavigationTarget | TNavigationTarget[];
22882
+ }
22883
+ /**
22884
+ * A class that implements IGeoJSONData has a underlying GeoJSON datathat can be accessed.
22885
+ */
22886
+ export interface IGeoJSONData {
22887
+ /** Gets the underlying GeoJSON Feature representation of this object. */
22888
+ geoJSON: Feature$1<any, null>;
22889
+ }
22788
22890
  export type TAnimateStateResult = {
22789
22891
  result: "completed" | "cancelled";
22790
22892
  };
@@ -23483,21 +23585,6 @@ type UpdateGlobalState = PartialDeep<GlobalState>;
23483
23585
  * A map element that can be focused on by the camera.
23484
23586
  */
23485
23587
  export type TFocusTarget = Coordinate | Space | Area | MapObject | Floor | Shape;
23486
- /**
23487
- * A class that implements IFocusable can be focused on by the camera.
23488
- */
23489
- export interface IFocusable {
23490
- get focusTarget(): TFocusTarget | TFocusTarget[];
23491
- }
23492
- interface INavigatable {
23493
- get navigationTarget(): TNavigationTarget | TNavigationTarget[];
23494
- }
23495
- /**
23496
- * A class that implements IAnchorable can have 2D elements like {@link Label}s and {@link Marker}s anchored to it.
23497
- */
23498
- export interface IAnchorable {
23499
- get anchorTarget(): Coordinate;
23500
- }
23501
23588
  /**
23502
23589
  * Associates MapData type strings with their corresponding classes.
23503
23590
  */
@@ -24014,6 +24101,12 @@ declare abstract class DetailedMapData<MVFData extends MVFFeature<Geometry, Prop
24014
24101
  * @returns {string} The name of the map feature.
24015
24102
  */
24016
24103
  get name(): string;
24104
+ /**
24105
+ * Gets the URL of the icon for the map feature.
24106
+ *
24107
+ * @returns {ImageMetaData | undefined} The icon of the map feature.
24108
+ */
24109
+ get icon(): ImageMetaData | undefined;
24017
24110
  /**
24018
24111
  * Gets the description of the map feature.
24019
24112
  *
@@ -24434,6 +24527,7 @@ export declare class Annotation extends DetailedMapData<AnnotationCollection["fe
24434
24527
  constructor(data: MapDataInternal, options: {
24435
24528
  floorId: string;
24436
24529
  mvfData: AnnotationCollection["features"][number];
24530
+ symbol?: AnnotationSymbol;
24437
24531
  });
24438
24532
  /**
24439
24533
  * Gets the group of the annotation.
@@ -24460,6 +24554,18 @@ export declare class Annotation extends DetailedMapData<AnnotationCollection["fe
24460
24554
  * @throws Will throw an error if the floor is not found.
24461
24555
  */
24462
24556
  get floor(): Floor;
24557
+ /**
24558
+ * Gets the name of the annotation.
24559
+ *
24560
+ * @returns {string} The annotation's name.
24561
+ */
24562
+ get name(): string;
24563
+ /**
24564
+ * Gets the icon for the annotation.
24565
+ *
24566
+ * @returns {ImageMetaData | undefined} The icon of the annotation.
24567
+ */
24568
+ get icon(): ImageMetaData | undefined;
24463
24569
  /**
24464
24570
  * Gets the underlying GeoJSON Feature representation of this Annotation.
24465
24571
  */
@@ -24575,7 +24681,7 @@ export declare class Connection extends DetailedMapData<Feature<Point, SpaceProp
24575
24681
  __type: string;
24576
24682
  id: string;
24577
24683
  name: string;
24578
- type: "stairs" | "door" | "elevator" | "escalator" | "ramp" | "slide" | "portal" | "security" | "shuttle" | "ladder";
24684
+ type: "door" | "stairs" | "elevator" | "escalator" | "ramp" | "slide" | "portal" | "security" | "shuttle" | "ladder";
24579
24685
  externalId: string;
24580
24686
  coordinates: {
24581
24687
  __type: string;
@@ -24799,10 +24905,6 @@ type TMapDataInternalOptions = {
24799
24905
  tokenManager?: TokenManager;
24800
24906
  getMapDataOptions?: TGetMapDataOptions;
24801
24907
  };
24802
- interface IGeoJSONData {
24803
- /** Gets the underlying GeoJSON Feature representation of this object. */
24804
- geoJSON: Feature<any, null>;
24805
- }
24806
24908
  type MVFNodeFeature = MVFNodeCollection["features"][number];
24807
24909
  type MVFFloorFeature = FloorCollection["features"][number];
24808
24910
  /**
@@ -25999,6 +26101,18 @@ declare class MapDataInternal extends PubSub<{
25999
26101
  getByType(type: "enterprise-category"): EnterpriseCategory[];
26000
26102
  getByType(type: "enterprise-venue"): EnterpriseVenue | undefined;
26001
26103
  getByType(type: "facade"): Facade[];
26104
+ /**
26105
+ * Retrieves all map data objects that match any of the specified types.
26106
+ * If a list of elements is provided, it filters only those elements by type.
26107
+ * Otherwise, it retrieves all objects for the specified types from this dataset.
26108
+ *
26109
+ * @param types - A set of type names to filter/retrieve
26110
+ * @param elements - Optional. A list of elements to filter by the provided types
26111
+ * @returns An array of map data objects matching any of the specified types
26112
+ */
26113
+ getAllOfTypes<T extends MapDataElements["__type"]>(types: ReadonlySet<T> | readonly T[], elements?: readonly MapDataElements[]): Extract<MapDataElements, {
26114
+ __type: T;
26115
+ }>[];
26002
26116
  /**
26003
26117
  * Retrieves an object by its type and ID.
26004
26118
  *
@@ -27225,6 +27339,15 @@ export type TShow3DMapOptions = {
27225
27339
  * @default false
27226
27340
  */
27227
27341
  disableWorkers?: boolean;
27342
+ /**
27343
+ * @experimental
27344
+ * @internal
27345
+ *
27346
+ * If true, updateState calls will not be validated. This allows for faster updates and should likely only be used for production environment where the input
27347
+ * is predictable and has been validated by the developer.
27348
+ * @default false
27349
+ */
27350
+ disableUpdateStateValidation?: boolean;
27228
27351
  };
27229
27352
  /**
27230
27353
  * @internal
@@ -27337,6 +27460,7 @@ export {
27337
27460
  OperationHours,
27338
27461
  Point$1 as Point,
27339
27462
  Polygon$1 as Polygon,
27463
+ RendererState as TRendererState,
27340
27464
  SiblingGroup,
27341
27465
  Style$2 as Style,
27342
27466
  TImage3DState as TImageState,
@@ -27347,6 +27471,8 @@ export {
27347
27471
  TMVFPolygonStyle,
27348
27472
  TMVFStyle,
27349
27473
  TMVFStyleCollection,
27474
+ parseMVFv2 as parseMVF,
27475
+ unzipMVFv2 as unzipMVF,
27350
27476
  };
27351
27477
 
27352
27478
  export {};
package/lib/esm/index.js CHANGED
@@ -1,2 +1 @@
1
- import{A as C,B as D,C as E,D as G,E as H,G as I,H as J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p,o as q,p as r,q as s,r as t,s as u,t as v,u as w,v as x,w as y,x as z,y as A,z as B}from"./chunk-3PM6GKGK.js";import{_a as F,a,b}from"./chunk-UOCWYBVK.js";import"./chunk-MLCPE7I2.js";import"./chunk-3U5JJXJA.js";import"./chunk-ROCNZJLL.js";export{x as ACTION_TYPE,H as ANIMATION_TWEENS,o as Annotation,g as Area,y as BEARING_TYPE,z as CONNECTION_TYPE,l as Connection,c as Coordinate,B as DOORS,C as Directions,h as Door,a as E_SDK_LOG_LEVEL,s as EnterpriseCategory,r as EnterpriseLocation,t as EnterpriseVenue,q as Facade,j as Floor,p as FloorStack,e as Hyperlink,f as ImageMetaData,E as LocationCategory,D as LocationProfile,k as MAPPEDIN_COLORS,m as MapObject,L as MapView,d as Node,n as PointOfInterest,i as Space,A as WALLS,O as __setWatermarkOnClickFn,V as checkWorkerUrls,J as disableText3DWorker,G as enableTestMode,N as findPreferredLanguageInVenue,R as forceEnterpriseLocations,T as getMapData,U as getMapDataEnterprise,I as getMultiFloorState,X as getVersion,M as hydrateMapData,P as hydrateMapDataFromMVF,u as parseMVF,F as preloadFont,b as setLoggerLevel,Q as setUseEnterpriseAPI,K as setWorkersUrl,S as shouldForceEnterpriseLocations,W as show3dMap,Y as show3dMapGeojson,w as unzipAndParseMVFv2,v as unzipMVF};
2
- //# sourceMappingURL=index.js.map
1
+ import{A as C,B as D,C as E,D as G,E as H,G as I,H as J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p,o as q,p as r,q as s,r as t,s as u,t as v,u as w,v as x,w as y,x as z,y as A,z as B}from"./chunk-2DEFE4C2.js";import{a,ab as F,b}from"./chunk-Q56Y72HB.js";import"./chunk-YB4VFXKF.js";import"./chunk-66DYOCZO.js";import"./chunk-5W2UDR4H.js";export{x as ACTION_TYPE,H as ANIMATION_TWEENS,o as Annotation,g as Area,y as BEARING_TYPE,z as CONNECTION_TYPE,l as Connection,c as Coordinate,B as DOORS,C as Directions,h as Door,a as E_SDK_LOG_LEVEL,s as EnterpriseCategory,r as EnterpriseLocation,t as EnterpriseVenue,q as Facade,j as Floor,p as FloorStack,e as Hyperlink,f as ImageMetaData,E as LocationCategory,D as LocationProfile,k as MAPPEDIN_COLORS,m as MapObject,L as MapView,d as Node,n as PointOfInterest,i as Space,A as WALLS,O as __setWatermarkOnClickFn,V as checkWorkerUrls,J as disableText3DWorker,G as enableTestMode,N as findPreferredLanguageInVenue,R as forceEnterpriseLocations,T as getMapData,U as getMapDataEnterprise,I as getMultiFloorState,X as getVersion,M as hydrateMapData,P as hydrateMapDataFromMVF,u as parseMVF,F as preloadFont,b as setLoggerLevel,Q as setUseEnterpriseAPI,K as setWorkersUrl,S as shouldForceEnterpriseLocations,W as show3dMap,Y as show3dMapGeojson,w as unzipAndParseMVFv2,v as unzipMVF};