@mappedin/mappedin-js 5.27.0 → 5.27.1

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.
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-ZRT45YCM.js";var e,c=a((()=>{e={env:{NODE_ENV:"production",npm_package_version:"5.27.1"}}}));export{c as a,e as b};
@@ -6528,7 +6528,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/outdoor-context/Mappedin
6528
6528
  declare module '@mappedin/mappedin-js/renderer/private/Core.interface' {
6529
6529
  import { Color, Vector2, Vector3, Mesh } from 'three';
6530
6530
  import type { TPadding, TGetPolygonsAtCoordinateOptions, TMapViewOptions, TileManager, BillboardManager, StackedMapsController, SmartCollisionEngine, OutdoorViewController, LayerController } from '@mappedin/mappedin-js/renderer/internal';
6531
- import { BlueDotController, CameraController, STATE, MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, changeListenerFn, RENDER, INTERNAL_EVENT_PAYLOAD, INTERNAL_EVENT, TaskScheduler, SceneManager, PubSub, FlatLabel, MapObject, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, ExportController, EventSystem, Element } from '@mappedin/mappedin-js/renderer/internal';
6531
+ import { BlueDotController, CameraController, STATE, MappedinMap, Mappedin, MappedinCoordinate, MappedinPolygon, MappedinNode, changeListenerFn, RENDER, INTERNAL_EVENT_PAYLOAD, INTERNAL_EVENT, TaskScheduler, SceneManager, PubSub, FlatLabel, MapObject, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, ExportController, EventSystem } from '@mappedin/mappedin-js/renderer/internal';
6532
6532
  import Tween, { Easing } from '@tweenjs/tween.js';
6533
6533
  import WatermarkController from '@mappedin/mappedin-js/renderer/private/controllers/WatermarkController';
6534
6534
  import PolygonHoverColorsController from '@mappedin/mappedin-js/renderer/private/controllers/PolygonHoverColorsController';
@@ -6631,7 +6631,6 @@ declare module '@mappedin/mappedin-js/renderer/private/Core.interface' {
6631
6631
  cachedPadding: TPadding;
6632
6632
  getCameraFrameForPoints: any;
6633
6633
  polygonMeshesById: Record<string, Mesh>;
6634
- renderedElementsById: Record<string, Element>;
6635
6634
  textLabelsByPolygonId: Record<string, FlatLabel>;
6636
6635
  renderer: any;
6637
6636
  scene: any;
@@ -7451,21 +7450,60 @@ declare module '@mappedin/mappedin-js/renderer/private/scene-manager/MapView.Dyn
7451
7450
  }
7452
7451
 
7453
7452
  declare module '@mappedin/mappedin-js/get-venue/pub-sub.typed' {
7453
+ /**
7454
+ * Generic PubSub class implementing the Publish-Subscribe pattern for event handling.
7455
+ *
7456
+ * @template EVENT_PAYLOAD - The type of the event payload.
7457
+ * @template EVENT - The type of the event.
7458
+ */
7454
7459
  export class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD> {
7455
7460
  /**
7456
7461
  * @private
7462
+ * @internal
7457
7463
  */
7458
7464
  _subscribers: any;
7459
7465
  /**
7460
7466
  * @private
7467
+ * @internal
7461
7468
  */
7462
7469
  publish<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, data?: EVENT_PAYLOAD[EVENT_NAME]): void;
7470
+ /**
7471
+ * Subscribe a function to an event.
7472
+ *
7473
+ * @param eventName An event name which, when fired, will call the provided
7474
+ * function.
7475
+ * @param fn A callback that gets called when the corresponding event is fired. The
7476
+ * callback will get passed an argument with a type that's one of event payloads.
7477
+ * @example
7478
+ * // Subscribe to the 'click' event
7479
+ * const handler = (event) => {
7480
+ * const { coordinate } = event;
7481
+ * const { latitude, longitude } = coordinate;
7482
+ * console.log(`Map was clicked at ${latitude}, ${longitude}`);
7483
+ * };
7484
+ * map.on('click', handler);
7485
+ */
7463
7486
  on<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME] extends {
7464
7487
  data: null;
7465
7488
  } ? EVENT_PAYLOAD[EVENT_NAME]['data'] : EVENT_PAYLOAD[EVENT_NAME]) => void): void;
7489
+ /**
7490
+ * Unsubscribe a function previously subscribed with {@link on}
7491
+ *
7492
+ * @param eventName An event name to which the provided function was previously
7493
+ * subscribed.
7494
+ * @param fn A function that was previously passed to {@link on}. The function must
7495
+ * have the same reference as the function that was subscribed.
7496
+ * @example
7497
+ * // Unsubscribe from the 'click' event
7498
+ * const handler = (event) => {
7499
+ * console.log('Map was clicked', event);
7500
+ * };
7501
+ * map.off('click', handler);
7502
+ */
7466
7503
  off<EVENT_NAME extends EVENT>(eventName: EVENT_NAME, fn: (payload: EVENT_PAYLOAD[EVENT_NAME]) => void): void;
7467
7504
  /**
7468
7505
  * @private
7506
+ * @internal
7469
7507
  */
7470
7508
  destroy(): void;
7471
7509
  }
@@ -9811,7 +9849,7 @@ declare module '@mappedin/mappedin-js/renderer/private/Core' {
9811
9849
  import { Color, Mesh, PerspectiveCamera, Scene, Vector2 } from 'three';
9812
9850
  import '../internal/object3D.destroy';
9813
9851
  import type { TGetPolygonsAtCoordinateOptions, TMapViewOptions, TPadding, MappedinPolygon } from '@mappedin/mappedin-js/renderer/internal';
9814
- import { Renderer, TaskScheduler, MapManager, FlatLabel, SmartCollisionEngine, PubSub, INTERNAL_EVENT, INTERNAL_EVENT_PAYLOAD, MapView, STATE, MapObject, SceneManager, TileManager, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, EventSystem, BlueDotController, CameraController, Element, BillboardManager, StackedMapsController, OutdoorViewController, WatermarkController, PolygonHoverColorsController, ExportController, LayerController } from '@mappedin/mappedin-js/renderer/internal';
9852
+ import { Renderer, TaskScheduler, MapManager, FlatLabel, SmartCollisionEngine, PubSub, INTERNAL_EVENT, INTERNAL_EVENT_PAYLOAD, MapView, STATE, MapObject, SceneManager, TileManager, PathsController, FloatingLabelsController, FlatLabelsController, PolygonColorsController, MarkersController, PolygonInteractionController, TooltipsController, PolygonStatesController, PolygonImagesController, ThreeDMarkersController, EventSystem, BlueDotController, CameraController, BillboardManager, StackedMapsController, OutdoorViewController, WatermarkController, PolygonHoverColorsController, ExportController, LayerController } from '@mappedin/mappedin-js/renderer/internal';
9815
9853
  import { Mappedin as IMappedin, MappedinCoordinate, MappedinMap, MappedinNode } from '@mappedin/mappedin-js/get-venue';
9816
9854
  import { E_MAP_CHANGED_REASON } from '@mappedin/mappedin-js/renderer/MapView.enums';
9817
9855
  import type { PerformanceController } from '@mappedin/mappedin-js/renderer/private/controllers/PerformanceController';
@@ -9882,7 +9920,6 @@ declare module '@mappedin/mappedin-js/renderer/private/Core' {
9882
9920
  focusZoomFactor: number;
9883
9921
  cameraObject: PerspectiveCamera;
9884
9922
  polygonMeshesById: Record<string, Mesh>;
9885
- renderedElementsById: Record<string, Element>;
9886
9923
  textLabelsByPolygonId: Record<string, FlatLabel>;
9887
9924
  labelOrientationDelay: number;
9888
9925
  isWebGL2: boolean;