@mappedin/viewer 0.8.4-3bb4c0d.0 → 0.8.4-c09a299.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.
@@ -3,6 +3,7 @@ type TDirectionsButtonProps = {
3
3
  onClick?: () => void;
4
4
  visible?: boolean;
5
5
  disabled?: boolean;
6
+ disabledHoverText?: string;
6
7
  };
7
8
  declare const DirectionsButton: React.FC<TDirectionsButtonProps>;
8
9
  export default DirectionsButton;
@@ -7,6 +7,7 @@ type TMainUIProps = {
7
7
  query?: string;
8
8
  onQueryChange?: (query: string) => void;
9
9
  searchResults: TSearchResult[];
10
+ isMakerPreview?: boolean;
10
11
  categories: TCategory[];
11
12
  onResultSelected?: (result: TSearchResult) => void;
12
13
  onSearchBarFocus?: ComponentProps<typeof SearchBar>['onFocus'];
@@ -1,4 +1,3 @@
1
1
  import type { Story } from '@ladle/react';
2
- export declare const Fallback: Story;
3
2
  export declare const Default: Story;
4
3
  export declare const Alternate: Story;
@@ -5,6 +5,8 @@ type TSearchResultsProps = {
5
5
  onResultClick?: (result: TSearchResult) => void;
6
6
  visible?: boolean;
7
7
  maxHeight?: number;
8
+ fallbackTitle?: string;
9
+ fallbackText?: string;
8
10
  };
9
11
  declare const SearchResults: React.FC<TSearchResultsProps>;
10
12
  export default SearchResults;
@@ -1,4 +1,7 @@
1
1
  /// <reference types="react" />
2
- export declare const SEARCH_FALLBACK_HEIGHT: 146;
3
- declare const SearchFallback: React.FC;
2
+ type TSearchFallbackProps = {
3
+ title?: string;
4
+ text?: string;
5
+ };
6
+ declare const SearchFallback: React.FC<TSearchFallbackProps>;
4
7
  export default SearchFallback;
@@ -1,2 +1,3 @@
1
1
  import type { Story } from '@ladle/react';
2
2
  export declare const Default: Story;
3
+ export declare const Fallback: Story;
@@ -9,6 +9,7 @@ export type TStartViewerCommonOptions = {
9
9
  overrideShareButtonHandler?: () => void;
10
10
  disableAnalytics?: boolean;
11
11
  outdoorMapsKey?: string;
12
+ isMakerPreview?: boolean;
12
13
  };
13
14
  export type TStartViewerOptions = {
14
15
  venue?: string;
@@ -3,7 +3,6 @@ export type TTheme = {
3
3
  accent: {
4
4
  primary: string;
5
5
  neutral: string;
6
- navigation: string;
7
6
  success: string;
8
7
  };
9
8
  background: string;
@@ -13,10 +12,21 @@ export type TTheme = {
13
12
  placeholder: string;
14
13
  };
15
14
  map: {
16
- highlight: string;
17
- departure: string;
15
+ labels: {
16
+ default: string;
17
+ };
18
+ markers: {
19
+ default: string;
20
+ connection: string;
21
+ departure: string;
22
+ destination: string;
23
+ };
24
+ polygons: {
25
+ departure: string;
26
+ hover: string;
27
+ highlight: string;
28
+ };
18
29
  path: string;
19
- hover: string;
20
30
  background: string;
21
31
  };
22
32
  };
@@ -11,14 +11,17 @@ import { TStartViewerOptions, TStartViewerWithLocalDataOptions } from '../../lib
11
11
  export declare const RootStoreContext: import("react").Context<RootStore>;
12
12
  declare class RootStore {
13
13
  private reactionDisposers;
14
- private currentMapId;
15
14
  /**
16
15
  * This should not be exposed outside the root store. Root store observables, derived from the router
17
16
  * should be the source of truth for the rest of the application.
18
17
  */
19
18
  private routerStore;
19
+ /**
20
+ * Simple caching for a MappedinCoordinate so we aren't recreating the same coordinate every time.
21
+ */
22
+ private cachedCoordinate;
20
23
  readonly data: Mappedin;
21
- __startupOptions: TStartViewerOptions | TStartViewerWithLocalDataOptions;
24
+ readonly startupOptions: TStartViewerOptions | TStartViewerWithLocalDataOptions;
22
25
  /**
23
26
  * This is only populated if the viewer is hydrated with local data (i.e. in Maker's preview).
24
27
  */
@@ -39,12 +42,14 @@ declare class RootStore {
39
42
  private syncState;
40
43
  private syncCurrentMap;
41
44
  get __mvfFeaturesByExternalId(): Record<string, import("@mappedin/mvf").Feature<import("@mappedin/mvf").Polygon | import("@mappedin/mvf").LineString | import("@mappedin/mvf").Point, import("@mappedin/mvf").SpaceProperties> | import("@mappedin/mvf").Feature<import("@mappedin/mvf").Polygon | import("@mappedin/mvf").LineString, import("@mappedin/mvf").ObstructionProperties>>;
45
+ get isMakerPreview(): boolean;
42
46
  get mapClosestToGroundLevel(): MappedinMap;
43
47
  get mapsSortedByElevation(): MappedinMap[];
44
48
  get areNodesAvailable(): boolean;
45
49
  get exteriorEntrancesLocation(): MappedinLocation | undefined;
46
50
  get selectedLocation(): MappedinLocation | undefined;
47
51
  get departure(): MappedinLocation | MappedinCoordinate | undefined;
52
+ get currentMapName(): string | undefined;
48
53
  get currentMap(): MappedinMap | undefined;
49
54
  get interactivePolygons(): MappedinPolygon[];
50
55
  get departureAndSelectedLocationSharedNodes(): MappedinNode[];
@@ -57,7 +62,7 @@ declare class RootStore {
57
62
  clearDeparture(): void;
58
63
  setDepartureLocationId(id: string): void;
59
64
  setDepartureCoordinate(coordinate: MappedinCoordinate): void;
60
- setCurrentMapId(id: string | undefined): void;
65
+ setCurrentMap(map: MappedinMap | undefined): void;
61
66
  setDepartureMode(mode: E_DEPARTURE_MODE): void;
62
67
  setIsAppMobile(isMobile: boolean): void;
63
68
  cleanup(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.8.4-3bb4c0d.0",
3
+ "version": "0.8.4-c09a299.0",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",