@mappedin/viewer 0.52.3-e96fd64.0 → 0.53.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.
@@ -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;
@@ -5,7 +5,7 @@ import { E_APP_STATE } from '../../lib/types/state';
5
5
  import RouterStore from '../router-store';
6
6
  import { TStartViewerOptions, TStartViewerWithLocalDataOptions } from '../../lib/types/options';
7
7
  import FeatureFlagStore from '../feature-flag-store';
8
- import { MapData, Place, Floor, Coordinate, Geometry, Area, LocationCategory, LocationProfile, FloorStack, Facade } from '../../lib/sdk';
8
+ import { MapData, Place, Floor, Coordinate, Geometry, Area, LocationCategory, FloorStack, Facade } from '../../lib/sdk';
9
9
  import { processPlaces } from '../../lib/utils/process-places';
10
10
  import SearchStore from '../search-store';
11
11
  import { Feature, ParsedMVF, Point, SpaceProperties } from '@mappedin/mvf';
@@ -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;
@@ -138,71 +139,7 @@ declare class RootStore {
138
139
  */
139
140
  get initialBearing(): number | undefined;
140
141
  get cameraMode(): TCameraMode;
141
- get exteriorDoors(): {
142
- "__#17@#private": any;
143
- readonly __type: "door";
144
- readonly floor: Floor;
145
- readonly center: Coordinate;
146
- readonly isExterior: boolean;
147
- readonly geoJSON: {
148
- properties: null;
149
- type: import("@mappedin/mvf-v2").FeatureType;
150
- geometry: import("@mappedin/mvf-v2").LineString;
151
- };
152
- readonly focusTarget: Coordinate;
153
- readonly anchorTarget: Coordinate;
154
- toJSON(): {
155
- __type: string;
156
- id: string;
157
- name: string;
158
- floor: string;
159
- center: {
160
- __type: string;
161
- latitude: number;
162
- longitude: number;
163
- floorId: string | undefined;
164
- verticalOffset: number;
165
- };
166
- };
167
- destroy(): void;
168
- "__#61@#private": any;
169
- readonly externalId: string;
170
- readonly name: string;
171
- readonly description: string;
172
- readonly images: {
173
- "__#25@#private": any;
174
- readonly __type: "image";
175
- readonly url: string | undefined;
176
- readonly name: string | undefined;
177
- readonly altText: string | undefined;
178
- toJSON(): {
179
- __type: string;
180
- id: string;
181
- url: string | undefined;
182
- name: string | undefined;
183
- };
184
- destroy(): void;
185
- readonly id: string;
186
- }[];
187
- readonly links: {
188
- "__#24@#private": any;
189
- readonly __type: "hyperlink";
190
- readonly url: string;
191
- readonly name: string | undefined;
192
- toJSON(): {
193
- __type: string;
194
- id: string;
195
- url: string;
196
- name: string | undefined;
197
- };
198
- destroy(): void;
199
- readonly id: string;
200
- }[];
201
- readonly locationProfiles: LocationProfile[];
202
- "__#62@#private": any;
203
- readonly id: string;
204
- readonly geoJSONBoundingBox: import("geojson").BBox | undefined;
205
- }[];
142
+ get exteriorDoors(): import("@mappedin/mappedin-js").Door[];
206
143
  get nonEmptyFloors(): Floor[];
207
144
  get nonEmptyFloorStacks(): FloorStack[];
208
145
  get currentFloorStack(): FloorStack | undefined;
@@ -33,104 +33,104 @@ declare class UIStore {
33
33
  private syncDepartureSearchQueryWithDepartureLocation;
34
34
  private syncDroppedPinNotification;
35
35
  get rootClassNames(): string;
36
- get theme(): TTheme & Partial<{
37
- name: string;
38
- isDark: Partial<boolean>;
39
- colors: Partial<{
40
- accent: Partial<{
41
- primary: string;
42
- secondary: string;
43
- neutral: string;
44
- neutral2: string;
45
- success: string;
46
- error: string;
47
- }>;
48
- background: Partial<{
49
- primary: string;
50
- secondary: string;
51
- tertiary: string;
52
- inverted: string;
53
- }>;
54
- text: Partial<{
55
- primary: string;
56
- secondary: string;
57
- tertiary: string;
58
- quaternary: string;
59
- highlight: string;
60
- placeholder: string;
61
- inverted: string;
62
- link: string;
63
- error: string;
64
- error2: string;
65
- }>;
66
- map: Partial<{
67
- labels: Partial<{
68
- background: string;
69
- default: string;
70
- connection: string;
71
- washroom: string;
72
- parking: string;
73
- point: string;
74
- door: string;
75
- }>;
76
- markers: Partial<{
77
- text: string;
78
- icon: string;
79
- background: string;
80
- default: string;
81
- parachute: string;
82
- highlight: string;
83
- departure: string;
84
- destination: string;
85
- youAreHere: string;
86
- }>;
87
- geometry: Partial<{
88
- wallTops: string;
89
- departure: string;
90
- hover: string;
91
- highlight: string;
92
- }>;
93
- path: string;
94
- background: string;
95
- }>;
96
- }>;
97
- font: string;
98
- borderRadius: Partial<{
99
- primary: number;
100
- large: number;
101
- small: number;
102
- }>;
103
- fontSize: Partial<{
104
- xsmall: number;
105
- small: number;
106
- normal: number;
107
- large: number;
108
- xlarge: number;
109
- title: number;
110
- }>;
111
- fontWeight: Partial<{
112
- light: number;
113
- normal: number;
114
- medium: number;
115
- semiBold: number;
116
- bold: number;
117
- }>;
118
- map: Partial<{
119
- tiles: string;
120
- initialPitch: number;
121
- initialBearing: number;
122
- minZoom: number;
123
- maxZoom: number;
124
- pathSize: number;
125
- streetMapVisible: Partial<boolean>;
126
- watermarkVisible: Partial<boolean>;
127
- mvfOverrides: Partial<{
128
- [x: string]: Partial<{
129
- color: string;
130
- }>;
131
- }>;
132
- }>;
133
- }>;
36
+ get theme(): TTheme & {
37
+ name?: string | undefined;
38
+ isDark?: boolean | undefined;
39
+ colors?: {
40
+ accent?: {
41
+ primary?: string | undefined;
42
+ secondary?: string | undefined;
43
+ neutral?: string | undefined;
44
+ neutral2?: string | undefined;
45
+ success?: string | undefined;
46
+ error?: string | undefined;
47
+ } | undefined;
48
+ background?: {
49
+ primary?: string | undefined;
50
+ secondary?: string | undefined;
51
+ tertiary?: string | undefined;
52
+ inverted?: string | undefined;
53
+ } | undefined;
54
+ text?: {
55
+ primary?: string | undefined;
56
+ secondary?: string | undefined;
57
+ tertiary?: string | undefined;
58
+ quaternary?: string | undefined;
59
+ highlight?: string | undefined;
60
+ placeholder?: string | undefined;
61
+ inverted?: string | undefined;
62
+ link?: string | undefined;
63
+ error?: string | undefined;
64
+ error2?: string | undefined;
65
+ } | undefined;
66
+ map?: {
67
+ labels?: {
68
+ background?: string | undefined;
69
+ default?: string | undefined;
70
+ connection?: string | undefined;
71
+ washroom?: string | undefined;
72
+ parking?: string | undefined;
73
+ point?: string | undefined;
74
+ door?: string | undefined;
75
+ } | undefined;
76
+ markers?: {
77
+ text?: string | undefined;
78
+ icon?: string | undefined;
79
+ background?: string | undefined;
80
+ default?: string | undefined;
81
+ parachute?: string | undefined;
82
+ highlight?: string | undefined;
83
+ departure?: string | undefined;
84
+ destination?: string | undefined;
85
+ youAreHere?: string | undefined;
86
+ } | undefined;
87
+ geometry?: {
88
+ wallTops?: string | undefined;
89
+ departure?: string | undefined;
90
+ hover?: string | undefined;
91
+ highlight?: string | undefined;
92
+ } | undefined;
93
+ path?: string | undefined;
94
+ background?: string | undefined;
95
+ } | undefined;
96
+ } | undefined;
97
+ font?: string | undefined;
98
+ borderRadius?: {
99
+ primary?: number | undefined;
100
+ large?: number | undefined;
101
+ small?: number | undefined;
102
+ } | undefined;
103
+ fontSize?: {
104
+ xsmall?: number | undefined;
105
+ small?: number | undefined;
106
+ normal?: number | undefined;
107
+ large?: number | undefined;
108
+ xlarge?: number | undefined;
109
+ title?: number | undefined;
110
+ } | undefined;
111
+ fontWeight?: {
112
+ light?: number | undefined;
113
+ normal?: number | undefined;
114
+ medium?: number | undefined;
115
+ semiBold?: number | undefined;
116
+ bold?: number | undefined;
117
+ } | undefined;
118
+ map?: {
119
+ tiles?: string | undefined;
120
+ initialPitch?: number | undefined;
121
+ initialBearing?: number | undefined;
122
+ minZoom?: number | undefined;
123
+ maxZoom?: number | undefined;
124
+ pathSize?: number | undefined;
125
+ streetMapVisible?: boolean | undefined;
126
+ watermarkVisible?: boolean | undefined;
127
+ mvfOverrides?: {
128
+ [x: string]: {
129
+ color?: string | undefined;
130
+ } | undefined;
131
+ } | undefined;
132
+ } | undefined;
133
+ };
134
134
  get themeId(): string;
135
135
  get defaultSearchResults(): TSearchResult[];
136
136
  get searchResults(): TSearchResult[];
@@ -1,8 +1,9 @@
1
1
  import { DynamicFocus, DynamicFocusEventPayload, DynamicFocusEvents } from '@mappedin/dynamic-focus';
2
2
  import { type MapView } from '../lib/sdk';
3
- import * as SDK from '../lib/sdk';
4
- import { CameraTransform } from '../lib/sdk/types';
5
- type TPublishFn = <E extends keyof SDK.TEvents>(event: E, payload?: SDK.TEventPayload<E>) => void;
3
+ import * as SDK from '../lib/sdk/mappedin-js';
4
+ import type { CameraTransform } from '../lib/sdk/types';
5
+ import { BlueDot, BlueDotEventPayloads } from '@mappedin/blue-dot';
6
+ type TPublishFn = <E extends keyof SDK.TEvents>(event: E, payload?: SDK.TEventPayload<E> extends SDK.CameraTransform ? CameraTransform : SDK.TEventPayload<E>) => void;
6
7
  export type TMapViewWithTestUtilities = MapView & {
7
8
  __test: {
8
9
  subscribers: Record<string, ((...args: any[]) => void)[]>;
@@ -21,4 +22,11 @@ export type TDynamicFocusWithTestUtilities = DynamicFocus & {
21
22
  };
22
23
  publish: <E extends keyof DynamicFocusEvents>(event: E, payload?: DynamicFocusEventPayload<E>) => void;
23
24
  };
25
+ export type TBlueDotWithTestUtilities = BlueDot & {
26
+ __test: {
27
+ subscribers: Record<string, ((...args: any[]) => void)[]>;
28
+ state: Map<any, any>;
29
+ };
30
+ publish: <E extends keyof BlueDotEventPayloads>(event: E, payload?: BlueDotEventPayloads[E]) => void;
31
+ };
24
32
  export {};
@@ -3,7 +3,7 @@ import RouterStore from '../stores/router-store';
3
3
  import { ParsedMVF } from '@mappedin/mvf';
4
4
  import { MapData } from '../lib/sdk';
5
5
  import { TStartViewerOptions, TStartViewerWithLocalDataOptions } from '../lib/types/options';
6
- import { TDynamicFocusWithTestUtilities, TMapViewWithTestUtilities } from './test-mocks';
6
+ import { TBlueDotWithTestUtilities, TDynamicFocusWithTestUtilities, TMapViewWithTestUtilities } from './test-mocks';
7
7
  export declare const loadTestVenueData: (venueFileName?: string) => Promise<ParsedMVF>;
8
8
  export declare const hydrateTestData: (mvf: ParsedMVF) => Promise<MapData>;
9
9
  export type TTestWithMapOptions = {
@@ -17,6 +17,7 @@ type TTestWithMapResult<MV = TMapViewWithTestUtilities> = {
17
17
  history: RouterStore['history'];
18
18
  mapView: MV;
19
19
  dynamicFocus: TDynamicFocusWithTestUtilities;
20
+ blueDot: TBlueDotWithTestUtilities;
20
21
  mapViewTestUtilities: MV extends TMapViewWithTestUtilities ? MV['__test'] : undefined;
21
22
  mapEl: HTMLDivElement;
22
23
  data: MapData;
@@ -27,6 +28,7 @@ type TTestWithMapResult<MV = TMapViewWithTestUtilities> = {
27
28
  waitForCameraSettled: () => Promise<void>;
28
29
  setNextCameraState: TMapViewWithTestUtilities['__test']['setNextCameraState'];
29
30
  waitForPinDrop: () => Promise<void>;
31
+ waitForDirectionsReady: () => Promise<void>;
30
32
  };
31
33
  export declare const testWithMap: <MV = TMapViewWithTestUtilities>(venueFileName?: string, options?: TTestWithMapOptions) => Promise<TTestWithMapResult<MV>>;
32
34
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.52.3-e96fd64.0",
3
+ "version": "0.53.0",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",
@@ -18,8 +18,9 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@ladle/react": "^2.17.2",
21
- "@mappedin/dynamic-focus": "6.0.1-canary-v6-viewer-internal-release-perf.1.819c3c5e.733",
22
- "@mappedin/mappedin-js": "6.0.1-canary-v6-539c11a2.731",
21
+ "@mappedin/dynamic-focus": "6.0.1-canary-v6-beeafaee.0",
22
+ "@mappedin/mappedin-js": "6.0.1-canary-v6-beeafaee.0",
23
+ "@mappedin/blue-dot": "6.0.1-canary-v6-899786eb.871",
23
24
  "@mappedin/mvf": "3.0.0-69b7308.0",
24
25
  "@mappedin/self-serve-icons": "1.105.0-alpha.SRV-2719-add-bleed-kit-annotation.1754600609",
25
26
  "@testing-library/jest-dom": "^6.6.2",