@mappedin/viewer 0.59.6-901149a.0 → 0.59.7

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.
@@ -153,7 +153,7 @@
153
153
  },
154
154
  {
155
155
  "name": "fast-uri",
156
- "version": "3.1.2",
156
+ "version": "3.1.5",
157
157
  "license": "BSD-3-Clause",
158
158
  "homepage": "https://github.com/fastify/fast-uri",
159
159
  "author": "Vincent Le Goff",
@@ -6,7 +6,6 @@ export type TLoadDataOptions = Partial<{
6
6
  onMVFParsed: (mvf: ParsedMVF) => void;
7
7
  featureFlagStore: FeatureFlagStore;
8
8
  omitNodes?: boolean;
9
- workerNodeGraph?: boolean;
10
9
  }> & THydrateDataOptions;
11
10
  /**
12
11
  * Load a public MVF while bypassing the need for API keys.
@@ -79,10 +79,6 @@ export type TStartViewerCommonOptions = {
79
79
  * Option to get directions from an online directions service.
80
80
  */
81
81
  onlineDirections?: boolean;
82
- /**
83
- * Option that uses SDKS's experimental node graph worker that should reduce map loading time
84
- */
85
- workerNodeGraph?: boolean;
86
82
  /**
87
83
  * Show the debug panel.
88
84
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Any utilities that work on MapData from the SDK should be in this file.
3
3
  */
4
- import { Annotation, Place, Coordinate, TNavigationTarget, Floor, LocationProfile, IFocusable, Geometry, LocationCategory, Area } from '../sdk';
4
+ import { Annotation, Place, Coordinate, TNavigationTarget, Floor, LocationProfile, IFocusable, Geometry, LocationCategory, Area, TFindNearestOptions, TFindNearestResult, TQueriables } from '../sdk';
5
5
  import OpeningHours from '../time/opening-hours';
6
6
  /**
7
7
  * Whether the location can be assumed to be a washroom
@@ -49,6 +49,25 @@ export declare const isValidPlace: (place: Place) => boolean;
49
49
  * yield better results.
50
50
  */
51
51
  export declare const getNavigationTargetForPlaces: (places: Place[]) => TNavigationTarget | TNavigationTarget[];
52
+ /**
53
+ * The shape of the SDK's `Query.nearest` method. Kept as a standalone type so it can be injected (and faked) for
54
+ * testability without importing the `Query` class.
55
+ */
56
+ export type TNearestQuery = <T extends TQueriables>(origin: Coordinate, include: T[], options?: TFindNearestOptions) => Promise<TFindNearestResult<T> | undefined>;
57
+ /**
58
+ * Resolve the single nearest {@link TNavigationTarget} to an origin, selecting the nearest destination by travel
59
+ * distance across all floors (`Query.nearest` with `mode: 'travel-distance'` and `limit: 'all-floors'`). Used when
60
+ * a search/category resolves to multiple destination places so we route to only one.
61
+ *
62
+ * `Coordinate` entries are filtered out of `destinations` before querying because they are not valid
63
+ * `include` members for `Query.nearest`.
64
+ */
65
+ export declare const getNearestNavigationTarget: (origin: Coordinate, destinations: TNavigationTarget[], nearest: TNearestQuery) => Promise<TNavigationTarget | undefined>;
66
+ /**
67
+ * Derive an origin {@link Coordinate} from a departure navigation target. Departures are usually a dropped-pin
68
+ * {@link Coordinate}; otherwise the first coordinate of the (first) place is used.
69
+ */
70
+ export declare const getNavigationOriginCoordinate: (departure: TNavigationTarget | TNavigationTarget[]) => Coordinate | undefined;
52
71
  /**
53
72
  * Abstraction for getting camera targets for places. Any place should technically be fine to use
54
73
  * as a camera target, but sometimes the SDK types are stale, and sometimes certain behaviours
@@ -22,7 +22,6 @@ export declare enum E_FEATURE_FLAGS {
22
22
  DEFAULT_LANGUAGE = "default-language",
23
23
  DYNAMIC_FOCUS_BUILDING_CHANGE_MODE = "dynamic-focus-building-change-mode",
24
24
  ONLINE_DIRECTIONS = "online-directions",
25
- WORKER_NODE_GRAPH = "worker-node-graph",
26
25
  PATH_SMOOTHING_ALGORITHM = "path-smoothing-algorithm"
27
26
  }
28
27
  type TFeatureFlagPayloads = {
@@ -39,7 +38,6 @@ type TFeatureFlagPayloads = {
39
38
  [E_FEATURE_FLAGS.DEFAULT_LANGUAGE]: Record<string, string>;
40
39
  [E_FEATURE_FLAGS.DYNAMIC_FOCUS_BUILDING_CHANGE_MODE]: Record<string, DynamicFocusMode>;
41
40
  [E_FEATURE_FLAGS.ONLINE_DIRECTIONS]: boolean;
42
- [E_FEATURE_FLAGS.WORKER_NODE_GRAPH]: boolean;
43
41
  [E_FEATURE_FLAGS.PATH_SMOOTHING_ALGORITHM]: string;
44
42
  };
45
43
  type TFeatureFlag<Key extends E_FEATURE_FLAGS> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.59.6-901149a.0",
3
+ "version": "0.59.7",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",
@@ -18,9 +18,9 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@ladle/react": "^5.0.3",
21
- "@mappedin/blue-dot": "6.24.1-pr-1669-sdk-room-1-66093a60.0",
22
- "@mappedin/dynamic-focus": "6.24.1-pr-1669-sdk-room-1-66093a60.0",
23
- "@mappedin/mappedin-js": "6.24.2-pr-1669-sdk-room-1-66093a60.0",
21
+ "@mappedin/blue-dot": "6.25.0-v6-a60b2a5d6.0",
22
+ "@mappedin/dynamic-focus": "6.25.0-v6-a60b2a5d6.0",
23
+ "@mappedin/mappedin-js": "6.25.1-v6-a60b2a5d6.0",
24
24
  "@mappedin/mvf": "3.0.0-69b7308.0",
25
25
  "@mappedin/self-serve-icons": "1.105.0-alpha.SRV-2719-add-bleed-kit-annotation.1754600609",
26
26
  "@napi-rs/canvas": "^0.1.89",