@mappedin/viewer 0.52.2-5cfeb2a.0 → 0.52.3-22c63f4.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,6 +1,16 @@
1
1
  import { Area } from '../../lib/sdk';
2
2
  type TAreaMarkerProps = {
3
3
  area: Area;
4
+ icon?: string;
5
+ /**
6
+ * Avoid this if you can help it, otherwise make sure to sanitize the HTML.
7
+ * This let's us render stringified SVGs into the marker without using
8
+ * `react-inlinesvg`, because `react-inlinesvg` is async and thus not compatible
9
+ * with `renderToString`.
10
+ */
11
+ dangerouslySetInnerHTML?: {
12
+ __html: string;
13
+ };
4
14
  };
5
15
  declare const AreaMarker: React.FC<TAreaMarkerProps>;
6
16
  export default AreaMarker;
@@ -26,8 +26,9 @@ type TGenerateGlobalClassNamesOptions = {
26
26
  darkMode: boolean;
27
27
  departureMode: E_DEPARTURE_MODE;
28
28
  safetyMode: boolean;
29
+ areaZoomed: boolean;
29
30
  };
30
- export declare const generateGlobalClassNames: ({ state, selectedPlaces, departures, droppedPinHoverVisible, darkMode, departureMode, safetyMode, }: TGenerateGlobalClassNamesOptions) => string;
31
+ export declare const generateGlobalClassNames: ({ state, selectedPlaces, departures, droppedPinHoverVisible, darkMode, departureMode, safetyMode, areaZoomed, }: TGenerateGlobalClassNamesOptions) => string;
31
32
  /**
32
33
  * Low level utility to generate class name selectors. Do not use this directly.
33
34
  */
@@ -129,4 +130,10 @@ export declare const isDepartureMode: (mode: E_DEPARTURE_MODE) => ((...args: any
129
130
  * {@link generateGlobalClassNames} to be used to apply the correct class names to the root element.
130
131
  */
131
132
  export declare const isSafetyMode: (safetyMode: boolean) => ((...args: any) => string);
133
+ /**
134
+ * A utility function returning css that only applies when the camera is zoomed in past the area zoom
135
+ * threshold. Requires {@link generateGlobalClassNames} to be used to apply the correct class names
136
+ * to the root element.
137
+ */
138
+ export declare const isAreaZoomed: (zoomed: boolean) => ((...args: any) => string);
132
139
  export {};
@@ -1,4 +1,4 @@
1
- import { Annotation, Place, Coordinate, TNavigationTarget, Floor, LocationProfile, IFocusable, Geometry } from '../sdk';
1
+ import { Annotation, Place, Coordinate, TNavigationTarget, Floor, LocationProfile, IFocusable, Geometry, LocationCategory } from '../sdk';
2
2
  import OpeningHours from '../time/opening-hours';
3
3
  /**
4
4
  * Whether the location can be assumed to be a washroom
@@ -66,3 +66,5 @@ export declare const isOnFloor: (place: Place, floor: Floor | string | undefined
66
66
  export declare const convertHours: (hours: LocationProfile["openingHours"], tz?: string) => OpeningHours;
67
67
  export declare const isGeometry: (place: object) => place is Geometry;
68
68
  export declare const isPlace: (place: object) => place is Place;
69
+ export declare const flattenCategories: (categories: LocationCategory[]) => LocationCategory[];
70
+ export declare const filterPlacesByCategories: <T extends Place>(places: T[], categories: LocationCategory[]) => T[];
@@ -38,7 +38,7 @@ declare class LabelsController {
38
38
  private getVisibilityForPlaceLabel;
39
39
  private updateLabelsInAreas;
40
40
  private updateFloorStackLabels;
41
- private updateLabelsFromLabelState;
41
+ private updateAllLabels;
42
42
  cleanup(): void;
43
43
  }
44
44
  export default LabelsController;
@@ -4,6 +4,7 @@ import { ReactNode } from 'react';
4
4
  import { Coordinate, Place, TAddMarkerOptions } from '../../../lib/sdk';
5
5
  type TMarker = {
6
6
  key: string;
7
+ type: string;
7
8
  text?: string;
8
9
  elementFn: () => ReactNode | Promise<ReactNode>;
9
10
  onPointerDown?: () => void;
@@ -20,7 +21,7 @@ declare class MarkersController {
20
21
  private reactionDisposers;
21
22
  private markersVisible;
22
23
  private sdkMarkersByKey;
23
- areasVisible: boolean;
24
+ hideLabelsInAreas: boolean;
24
25
  constructor({ rootStore, mapStore }: {
25
26
  rootStore: RootStore;
26
27
  mapStore: MapStore;
@@ -105,6 +105,7 @@ declare class RootStore {
105
105
  private inferDepartureMode;
106
106
  private checkForEmbeddedMode;
107
107
  private syncState;
108
+ private syncSelectedCategory;
108
109
  private syncCurrentFloor;
109
110
  private syncDeparture;
110
111
  private getMVFConnectionFeatureById;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.52.2-5cfeb2a.0",
3
+ "version": "0.52.3-22c63f4.0",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",