@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.
- package/dist/index.js +1219 -1153
- package/dist/types/src/components/directions/directions-button.d.ts +1 -0
- package/dist/types/src/components/main/index.d.ts +1 -0
- package/dist/types/src/components/search-bar/{search.stories.d.ts → search-bar.stories.d.ts} +0 -1
- package/dist/types/src/components/search-results/index.d.ts +2 -0
- package/dist/types/src/components/search-results/search-fallback.d.ts +5 -2
- package/dist/types/src/components/search-results/search-results.stories.d.ts +1 -0
- package/dist/types/src/lib/types/options.d.ts +1 -0
- package/dist/types/src/lib/types/theme.d.ts +14 -4
- package/dist/types/src/stores/root-store/index.d.ts +8 -3
- package/package.json +1 -1
|
@@ -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'];
|
|
@@ -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
|
-
|
|
3
|
-
|
|
2
|
+
type TSearchFallbackProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const SearchFallback: React.FC<TSearchFallbackProps>;
|
|
4
7
|
export default SearchFallback;
|
|
@@ -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
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
65
|
+
setCurrentMap(map: MappedinMap | undefined): void;
|
|
61
66
|
setDepartureMode(mode: E_DEPARTURE_MODE): void;
|
|
62
67
|
setIsAppMobile(isMobile: boolean): void;
|
|
63
68
|
cleanup(): void;
|