@mappedin/viewer 0.0.0-alpha → 0.2.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/CHANGELOG.md +18 -0
- package/assets/fonts/Roboto-400.ttf +0 -0
- package/assets/fonts/Roboto-500.ttf +0 -0
- package/assets/fonts/Roboto-700.ttf +0 -0
- package/dist/browser-35S22BS6-60f2b2c3.js +229 -0
- package/dist/index-7278efbe.js +86669 -0
- package/dist/index.js +4 -2
- package/dist/outdoor-context-XG4VPE4D-26915a8c.js +17268 -0
- package/dist/types/src/App.d.ts +9 -0
- package/dist/types/src/components/animations/animated-resize.d.ts +13 -0
- package/dist/types/src/components/animations/animation-context.d.ts +22 -0
- package/dist/types/src/components/animations/animation.stories.d.ts +2 -0
- package/dist/types/src/components/animations/utils.d.ts +1 -0
- package/dist/types/src/components/button/button.stories.d.ts +3 -0
- package/dist/types/src/components/button/index.d.ts +8 -0
- package/dist/types/src/components/caret/caret.stories.d.ts +2 -0
- package/dist/types/src/components/caret/index.d.ts +7 -0
- package/dist/types/src/components/categories/categories.stories.d.ts +3 -0
- package/dist/types/src/components/categories/category.d.ts +9 -0
- package/dist/types/src/components/categories/index.d.ts +11 -0
- package/dist/types/src/components/common/theme-provider.d.ts +6 -0
- package/dist/types/src/components/common/typography.d.ts +10 -0
- package/dist/types/src/components/common/utils.d.ts +1 -0
- package/dist/types/src/components/connection-marker/connection-marker.stories.d.ts +3 -0
- package/dist/types/src/components/connection-marker/index.d.ts +10 -0
- package/dist/types/src/components/directions/departure-modes.d.ts +8 -0
- package/dist/types/src/components/directions/directions-button.d.ts +8 -0
- package/dist/types/src/components/directions/directions-search-bar.d.ts +11 -0
- package/dist/types/src/components/directions/directions.stories.d.ts +5 -0
- package/dist/types/src/components/directions/index.d.ts +17 -0
- package/dist/types/src/components/dropped-pin-marker/dropped-pin-hover.d.ts +7 -0
- package/dist/types/src/components/dropped-pin-marker/dropped-pin-marker.stories.d.ts +3 -0
- package/dist/types/src/components/dropped-pin-marker/index.d.ts +6 -0
- package/dist/types/src/components/dropped-pin-marker/use-follow-cursor.d.ts +17 -0
- package/dist/types/src/components/dropped-pin-marker/utils.d.ts +8 -0
- package/dist/types/src/components/hint/hint.stories.d.ts +2 -0
- package/dist/types/src/components/hint/index.d.ts +6 -0
- package/dist/types/src/components/hover/hover-element-with-arrow.d.ts +7 -0
- package/dist/types/src/components/hover/hover.stories.d.ts +2 -0
- package/dist/types/src/components/hover/index.d.ts +16 -0
- package/dist/types/src/components/hover/use-hover-element.d.ts +14 -0
- package/dist/types/src/components/hover/utils.d.ts +20 -0
- package/dist/types/src/components/hover/utils.test.d.ts +1 -0
- package/dist/types/src/components/icon/icon.stories.d.ts +2 -0
- package/dist/types/src/components/icon/index.d.ts +9 -0
- package/dist/types/src/components/input/index.d.ts +6 -0
- package/dist/types/src/components/input/input.stories.d.ts +2 -0
- package/dist/types/src/components/level-change-notification/index.d.ts +8 -0
- package/dist/types/src/components/level-change-notification/level-change-notification.stories.d.ts +2 -0
- package/dist/types/src/components/level-selector/index.d.ts +9 -0
- package/dist/types/src/components/level-selector/level-selector-menu.d.ts +10 -0
- package/dist/types/src/components/level-selector/level-selector.stories.d.ts +3 -0
- package/dist/types/src/components/level-selector/utils.d.ts +4 -0
- package/dist/types/src/components/main/index.d.ts +28 -0
- package/dist/types/src/components/main/main.stories.d.ts +3 -0
- package/dist/types/src/components/map-controls/index.d.ts +11 -0
- package/dist/types/src/components/map-controls/map-controls.stories.d.ts +2 -0
- package/dist/types/src/components/panel/index.d.ts +8 -0
- package/dist/types/src/components/positioner/index.d.ts +274 -0
- package/dist/types/src/components/search-bar/index.d.ts +19 -0
- package/dist/types/src/components/search-bar/search.stories.d.ts +4 -0
- package/dist/types/src/components/search-bar/use-search-bar.d.ts +11 -0
- package/dist/types/src/components/search-bar/use-search-bar.test.d.ts +1 -0
- package/dist/types/src/components/search-bar/utils.d.ts +0 -0
- package/dist/types/src/components/search-results/index.d.ts +10 -0
- package/dist/types/src/components/search-results/search-fallback.d.ts +4 -0
- package/dist/types/src/components/search-results/search-results.stories.d.ts +2 -0
- package/dist/types/src/components/search-results/use-search-results.d.ts +12 -0
- package/dist/types/src/components/search-results/use-search-results.test.d.ts +1 -0
- package/dist/types/src/components/share/index.d.ts +7 -0
- package/dist/types/src/components/share/share.stories.d.ts +2 -0
- package/dist/types/src/components/share/use-share.d.ts +8 -0
- package/dist/types/src/components/share/use-share.test.d.ts +1 -0
- package/dist/types/src/components/spinner/index.d.ts +8 -0
- package/dist/types/src/components/spinner/spinner.stories.d.ts +2 -0
- package/dist/types/src/components/tilt-controls/index.d.ts +9 -0
- package/dist/types/src/components/tilt-controls/tilt-axes.d.ts +3 -0
- package/dist/types/src/components/tilt-controls/tilt-controls.stories.d.ts +2 -0
- package/dist/types/src/components/tilt-controls/use-drag-tilt.d.ts +16 -0
- package/dist/types/src/components/tilt-controls/utils.d.ts +4 -0
- package/dist/types/src/components/title/index.d.ts +6 -0
- package/dist/types/src/components/title/title.stories.d.ts +2 -0
- package/dist/types/src/components/zoom-controls/index.d.ts +8 -0
- package/dist/types/src/components/zoom-controls/zoom-controls.stories.d.ts +2 -0
- package/dist/types/src/icons.d.ts +3 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/lib/canvas/drag-physics.d.ts +27 -0
- package/dist/types/src/lib/canvas/drag-physics.test.d.ts +1 -0
- package/dist/types/src/lib/canvas/hi-res-canvas.d.ts +33 -0
- package/dist/types/src/lib/canvas/hi-res-canvas.test.d.ts +1 -0
- package/dist/types/src/lib/hooks/use-app-data.d.ts +8 -0
- package/dist/types/src/lib/hooks/use-app-data.test.d.ts +1 -0
- package/dist/types/src/lib/hooks/use-callback-ref.d.ts +2 -0
- package/dist/types/src/lib/hooks/use-deep-focus.d.ts +13 -0
- package/dist/types/src/lib/hooks/use-venue-mvf.d.ts +6 -0
- package/dist/types/src/lib/i18n.d.ts +2 -0
- package/dist/types/src/lib/logger.d.ts +17 -0
- package/dist/types/src/lib/logger.test.d.ts +1 -0
- package/dist/types/src/lib/types/directions.d.ts +5 -0
- package/dist/types/src/lib/types/map.d.ts +4 -0
- package/dist/types/src/lib/types/options.d.ts +17 -0
- package/dist/types/src/lib/types/search.d.ts +12 -0
- package/dist/types/src/lib/types/state.d.ts +4 -0
- package/dist/types/src/lib/types/theme.d.ts +29 -0
- package/dist/types/src/lib/types/utils.d.ts +3 -0
- package/dist/types/src/lib/utils/color-utils.d.ts +3 -0
- package/dist/types/src/lib/utils/color-utils.test.d.ts +1 -0
- package/dist/types/src/lib/utils/number-utils.d.ts +1 -0
- package/dist/types/src/lib/utils/search-utils.d.ts +1 -0
- package/dist/types/src/lib/utils/url-parsing.d.ts +7 -0
- package/dist/types/src/lib/utils/url-parsing.test.d.ts +1 -0
- package/dist/types/src/states/global.d.ts +5 -0
- package/dist/types/src/states/loading.d.ts +6 -0
- package/dist/types/src/states/map.d.ts +3 -0
- package/dist/types/src/states/not-found.d.ts +3 -0
- package/dist/types/src/stores/map-store/controllers/camera.d.ts +27 -0
- package/dist/types/src/stores/map-store/controllers/directions.d.ts +17 -0
- package/dist/types/src/stores/map-store/controllers/hover.d.ts +25 -0
- package/dist/types/src/stores/map-store/controllers/labels.d.ts +16 -0
- package/dist/types/src/stores/map-store/controllers/map.d.ts +14 -0
- package/dist/types/src/stores/map-store/controllers/markers.d.ts +19 -0
- package/dist/types/src/stores/map-store/controllers/polygons.d.ts +17 -0
- package/dist/types/src/stores/map-store/index.d.ts +32 -0
- package/dist/types/src/stores/map-store/map-store.test.d.ts +1 -0
- package/dist/types/src/stores/root-store/index.d.ts +54 -0
- package/dist/types/src/stores/root-store/root-store.test.d.ts +1 -0
- package/dist/types/src/stores/router-store/index.d.ts +23 -0
- package/dist/types/src/stores/router-store/router-store.test.d.ts +1 -0
- package/dist/types/src/stores/ui-store/index.d.ts +42 -0
- package/dist/types/src/stores/ui-store/ui-store.test.d.ts +1 -0
- package/dist/types/src/test-utils/test-setup.d.ts +1 -0
- package/dist/types/src/theme.d.ts +2 -0
- package/package.json +23 -12
- package/tsconfig.build.json +4 -0
- package/dist/browser-42K2OAVV-5c10d96e.js +0 -1214
- package/dist/index-eb1e9c14.js +0 -72347
- package/dist/index.umd.cjs +0 -5116
- package/types/src/App.d.ts +0 -4
- package/types/src/hooks/useMapView.d.ts +0 -4
- package/types/src/hooks/useVenueMVF.d.ts +0 -4
- package/types/src/index.d.ts +0 -3
- package/types/src/types.d.ts +0 -4
- package/types/vite.config.d.ts +0 -2
- /package/dist/{Arrival-7GULGCVJ-80c3f73a.js → Arrival-QPP25QX7-80c3f73a.js} +0 -0
- /package/dist/{Chalet-4E7PX7WT-42db0054.js → Chalet-IPOAT24L-42db0054.js} +0 -0
- /package/dist/{HelveticaNeue-UEVLJKVU-fe724012.js → HelveticaNeue-KPKR5RFE-fe724012.js} +0 -0
- /package/dist/{Helvetiker-SNVJCSDR-166d1e4d.js → Helvetiker-UCLF3OSY-166d1e4d.js} +0 -0
- /package/dist/{Lato-FDCJ5GCG-c22f98b3.js → Lato-EVVL3OTB-c22f98b3.js} +0 -0
- /package/dist/{MyriadPro-NQ2DCXFB-4794df78.js → MyriadPro-ROUUJ4QH-4794df78.js} +0 -0
- /package/dist/{ProximaNova-MIBCMRZX-e1c5fad4.js → ProximaNova-QLMZHWWE-e1c5fad4.js} +0 -0
- /package/dist/{SimonCircular-B2HEOOJY-12a4d531.js → SimonCircular-POYFCICM-12a4d531.js} +0 -0
- /package/{types/src/globalStyles.d.ts → dist/types/src/components/common/global-styles.d.ts} +0 -0
- /package/{types/src/hooks/useMapView.test.d.ts → dist/types/src/components/hover/use-hover-element.test.d.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './lib/i18n';
|
|
3
|
+
import './fonts.css';
|
|
4
|
+
import { TStartViewerOptions, TStartViewerWithLocalDataOptions } from './lib/types/options';
|
|
5
|
+
import '@mappedin/mappedin-js/lib/mappedin.css';
|
|
6
|
+
declare const App: ((options: TStartViewerOptions | TStartViewerWithLocalDataOptions) => import("react").JSX.Element) & {
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export default App;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
type TAnimateResizeProps = {
|
|
3
|
+
maxHeight?: number;
|
|
4
|
+
maxWidth?: number;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
contentStyle?: React.CSSProperties;
|
|
7
|
+
animateHeight?: boolean;
|
|
8
|
+
animateWidth?: boolean;
|
|
9
|
+
debug?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const _AnimatedResize: React.FC<PropsWithChildren<TAnimateResizeProps>>;
|
|
12
|
+
declare const AnimatedResize: typeof _AnimatedResize;
|
|
13
|
+
export default AnimatedResize;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MutableRefObject, ReactNode } from 'react';
|
|
2
|
+
type TAnimationContext = {
|
|
3
|
+
/**
|
|
4
|
+
* The element that is currently animating. This is useful for stateful reactions.
|
|
5
|
+
* Use animatingElementRef to if you don't care about reactions.
|
|
6
|
+
*/
|
|
7
|
+
animatingElement: HTMLElement | null;
|
|
8
|
+
/**
|
|
9
|
+
* A ref to the element that is currently animating. Use animatingElement if you care
|
|
10
|
+
* about reacting to state.
|
|
11
|
+
*/
|
|
12
|
+
animatingElementRef: MutableRefObject<HTMLElement | null>;
|
|
13
|
+
/**
|
|
14
|
+
* Update the currently animating element.
|
|
15
|
+
*/
|
|
16
|
+
setIsElementAnimating: (element: HTMLElement, isAnimating: boolean) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const AnimationContext: import("react").Context<TAnimationContext>;
|
|
19
|
+
export declare const EnsureAnimationContext: React.FC<{
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ANIMATION_DURATION_MS = 125;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TTheme } from 'lib/types/theme';
|
|
3
|
+
export declare const clickableStyle: import("styled-components").RuleSet<object>;
|
|
4
|
+
declare const Button: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
5
|
+
theme?: TTheme | undefined;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
}>>;
|
|
8
|
+
export default Button;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TSearchResult } from 'lib/types/search';
|
|
3
|
+
type TCategoryProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
results: TSearchResult[];
|
|
6
|
+
onResultClick?: (result: TSearchResult) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const Category: React.FC<TCategoryProps>;
|
|
9
|
+
export default Category;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { TCategory } from 'lib/types/search';
|
|
3
|
+
import Category from './category';
|
|
4
|
+
type TCategoriesProps = {
|
|
5
|
+
categories: TCategory[];
|
|
6
|
+
onResultClick?: ComponentProps<typeof Category>['onResultClick'];
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
maxHeight?: number;
|
|
9
|
+
};
|
|
10
|
+
declare const Categories: React.FC<TCategoriesProps>;
|
|
11
|
+
export default Categories;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TTheme } from '../../lib/types/theme';
|
|
3
|
+
type TFontProps = {
|
|
4
|
+
theme?: TTheme;
|
|
5
|
+
strokeWidth?: number;
|
|
6
|
+
strokeColor?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const fontStyle: import("styled-components").RuleSet<TFontProps>;
|
|
9
|
+
export declare const Text: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, TFontProps>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const id: (...values: string[]) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type TConnectionMarkerProps = {
|
|
3
|
+
type?: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
direction?: 'up' | 'down';
|
|
6
|
+
size?: number;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const ConnectionMarker: React.FC<TConnectionMarkerProps>;
|
|
10
|
+
export default ConnectionMarker;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { E_DEPARTURE_MODE } from '../../lib/types/directions';
|
|
3
|
+
type TDepartureModes = {
|
|
4
|
+
mode: E_DEPARTURE_MODE;
|
|
5
|
+
onModeClick?: (mode: E_DEPARTURE_MODE) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const DepartureModes: React.FC<TDepartureModes>;
|
|
8
|
+
export default DepartureModes;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TSearchResult } from 'lib/types/search';
|
|
3
|
+
type TDirectionsSearchBarProps = {
|
|
4
|
+
query?: string;
|
|
5
|
+
onQueryChange?: (query: string) => void;
|
|
6
|
+
results: TSearchResult[];
|
|
7
|
+
onResultSelected?: (result: TSearchResult) => void;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const DirectionsSearchBar: React.FC<TDirectionsSearchBarProps>;
|
|
11
|
+
export default DirectionsSearchBar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { E_DEPARTURE_MODE } from '../../lib/types/directions';
|
|
2
|
+
import DepartureModes from './departure-modes';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
import DirectionsSearchBar from './directions-search-bar';
|
|
5
|
+
type TDirectionsProps = {
|
|
6
|
+
departureMode?: ComponentProps<typeof DepartureModes>['mode'];
|
|
7
|
+
departureQuery?: ComponentProps<typeof DirectionsSearchBar>['query'];
|
|
8
|
+
onDepartureQueryChange?: ComponentProps<typeof DirectionsSearchBar>['onQueryChange'];
|
|
9
|
+
onDepartureModeChange?: (mode: E_DEPARTURE_MODE) => void;
|
|
10
|
+
departureSearchResults: ComponentProps<typeof DirectionsSearchBar>['results'];
|
|
11
|
+
onDepartureResultSelected?: ComponentProps<typeof DirectionsSearchBar>['onResultSelected'];
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
warningVisible?: boolean;
|
|
14
|
+
maxHeight?: number;
|
|
15
|
+
};
|
|
16
|
+
declare const Directions: React.FC<TDirectionsProps>;
|
|
17
|
+
export default Directions;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
type TUseFollowCursorCanvasProps = {
|
|
3
|
+
icon: ReactElement<SVGSVGElement>;
|
|
4
|
+
iconFillColor?: string;
|
|
5
|
+
iconStrokeColor?: string;
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
translate?: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
hoverHeight?: number;
|
|
12
|
+
getIsValid?: () => boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const useFollowCursorCanvas: ({ icon, iconFillColor, iconStrokeColor, visible, translate, hoverHeight, getIsValid, }: TUseFollowCursorCanvasProps) => {
|
|
15
|
+
containerRef: (ref: unknown) => void;
|
|
16
|
+
};
|
|
17
|
+
export default useFollowCursorCanvas;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const HOVER_PIN_ALTITUDE = 50;
|
|
2
|
+
export declare const PIN_SHADOW_WIDTH = 12;
|
|
3
|
+
export declare const PIN_SHADOW_HEIGHT = 5;
|
|
4
|
+
export declare const PIN_SHADOW_HOVER_SCALE = 0.9;
|
|
5
|
+
export declare const DESTINATION_PIN_COLOR = "#722ED1";
|
|
6
|
+
export declare const HOVER_PIN_COLOR = "#D46B08";
|
|
7
|
+
export declare const PIN_SHADOW_OPACITY = 0.35;
|
|
8
|
+
export declare const PIN_DROP_ANIMATION_DURATION_MS = 250;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TTheme } from 'lib/types/theme';
|
|
3
|
+
declare const HoverElementWithArrow: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
backgroundColor?: string | undefined;
|
|
5
|
+
theme?: TTheme | undefined;
|
|
6
|
+
}>>;
|
|
7
|
+
export default HoverElementWithArrow;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { TDirection, THoverAnimation } from './utils';
|
|
3
|
+
export type THoverPlacement = TDirection;
|
|
4
|
+
type THoverProps = {
|
|
5
|
+
element: React.ReactElement;
|
|
6
|
+
elementPadding?: number;
|
|
7
|
+
elementPersistOnElementHover?: boolean;
|
|
8
|
+
elementHidesOnElementClick?: boolean;
|
|
9
|
+
elementArrow?: boolean;
|
|
10
|
+
expandToFillPerpendicular?: boolean;
|
|
11
|
+
placement?: THoverPlacement;
|
|
12
|
+
animation?: THoverAnimation;
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const Hover: React.FC<PropsWithChildren<THoverProps>>;
|
|
16
|
+
export default Hover;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type TUseHoverElementProps = {
|
|
2
|
+
delay?: number;
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const useHoverElement: ({ delay, visible }: TUseHoverElementProps) => {
|
|
6
|
+
onContainerMouseEnter: () => void;
|
|
7
|
+
onContainerMouseLeave: () => void;
|
|
8
|
+
onHoverElementMouseEnter: () => void;
|
|
9
|
+
onHoverElementMouseLeave: () => void;
|
|
10
|
+
hideHoverElement: () => void;
|
|
11
|
+
isAnimating: boolean;
|
|
12
|
+
isHoverElementVisible: boolean;
|
|
13
|
+
};
|
|
14
|
+
export default useHoverElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FocusEvent } from 'react';
|
|
2
|
+
export type TPrimaryDirection = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export type TDirection = 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom';
|
|
4
|
+
export type THoverAnimation = 'expand' | 'fade' | 'fade-expand' | 'none';
|
|
5
|
+
export declare const ARROW_SIZE: 6;
|
|
6
|
+
export declare const getPrimaryDirection: (direction: TDirection) => TPrimaryDirection;
|
|
7
|
+
export declare const getMaxDimension: (visible: boolean, animation: THoverAnimation, value?: number) => any;
|
|
8
|
+
export declare const useElementDimensions: () => {
|
|
9
|
+
onRef: (ref: unknown) => void;
|
|
10
|
+
height: number;
|
|
11
|
+
width: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Hook for controlling hover visibility outside the component
|
|
15
|
+
*/
|
|
16
|
+
export declare const useHoverExternal: () => {
|
|
17
|
+
visible: boolean;
|
|
18
|
+
onTriggerClick: () => void;
|
|
19
|
+
onContainerBlur: (event: FocusEvent<HTMLDivElement>) => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TTheme } from 'lib/types/theme';
|
|
3
|
+
declare const Input: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
4
|
+
theme: TTheme;
|
|
5
|
+
}>>;
|
|
6
|
+
export default Input;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const PERSIST_DURATION_MS: number;
|
|
3
|
+
type TLevelChangeNotificationProps = {
|
|
4
|
+
levelName: string;
|
|
5
|
+
elevation: number;
|
|
6
|
+
};
|
|
7
|
+
declare const LevelChangeNotification: React.FC<TLevelChangeNotificationProps>;
|
|
8
|
+
export default LevelChangeNotification;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import LevelSelectorMenu from './level-selector-menu';
|
|
3
|
+
type TLevelSelectorProps = {
|
|
4
|
+
levels: ComponentProps<typeof LevelSelectorMenu>['levels'];
|
|
5
|
+
selectedLevelId: ComponentProps<typeof LevelSelectorMenu>['selectedLevelId'];
|
|
6
|
+
onLevelClick?: ComponentProps<typeof LevelSelectorMenu>['onLevelClick'];
|
|
7
|
+
};
|
|
8
|
+
declare const LevelSelector: React.FC<TLevelSelectorProps>;
|
|
9
|
+
export default LevelSelector;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TLevelSelectorLevel } from './utils';
|
|
3
|
+
type TLevelSelectorMenuProps = {
|
|
4
|
+
levels: TLevelSelectorLevel[];
|
|
5
|
+
selectedLevelId?: string;
|
|
6
|
+
onLevelClick?: (level: TLevelSelectorLevel) => void;
|
|
7
|
+
maxItemsToShow?: number;
|
|
8
|
+
};
|
|
9
|
+
declare const LevelSelectorMenu: React.FC<TLevelSelectorMenuProps>;
|
|
10
|
+
export default LevelSelectorMenu;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import SearchBar from '../search-bar';
|
|
2
|
+
import Directions from '../directions';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
import { TCategory, TSearchResult } from '../../lib/types/search';
|
|
5
|
+
type TMainUIProps = {
|
|
6
|
+
onBlur?: () => void;
|
|
7
|
+
query?: string;
|
|
8
|
+
onQueryChange?: (query: string) => void;
|
|
9
|
+
searchResults: TSearchResult[];
|
|
10
|
+
categories: TCategory[];
|
|
11
|
+
onResultSelected?: (result: TSearchResult) => void;
|
|
12
|
+
onSearchBarFocus?: ComponentProps<typeof SearchBar>['onFocus'];
|
|
13
|
+
onSearchBarBlur?: ComponentProps<typeof SearchBar>['onBlur'];
|
|
14
|
+
maxHeight?: number;
|
|
15
|
+
departureMode?: ComponentProps<typeof Directions>['departureMode'];
|
|
16
|
+
onDepartureModeChange?: ComponentProps<typeof Directions>['onDepartureModeChange'];
|
|
17
|
+
departureQuery?: ComponentProps<typeof Directions>['departureQuery'];
|
|
18
|
+
onDepartureQueryChange?: ComponentProps<typeof Directions>['onDepartureQueryChange'];
|
|
19
|
+
onDepartureResultSelected?: ComponentProps<typeof Directions>['onDepartureResultSelected'];
|
|
20
|
+
departureSearchResults?: ComponentProps<typeof Directions>['departureSearchResults'];
|
|
21
|
+
directionsVisible?: boolean;
|
|
22
|
+
directionsWarningVisible?: boolean;
|
|
23
|
+
directionsButtonVisible?: boolean;
|
|
24
|
+
directionsButtonDisabled?: boolean;
|
|
25
|
+
onDirectionsButtonClick?: () => void;
|
|
26
|
+
};
|
|
27
|
+
declare const MainUI: React.FC<TMainUIProps>;
|
|
28
|
+
export default MainUI;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import TiltControls from '../tilt-controls';
|
|
3
|
+
import ZoomControls from '../zoom-controls';
|
|
4
|
+
type TMapControlsProps = {
|
|
5
|
+
onTiltChange?: ComponentProps<typeof TiltControls>['onChange'];
|
|
6
|
+
onZoomInClick?: ComponentProps<typeof ZoomControls>['onZoomInClick'];
|
|
7
|
+
onZoomOutClick?: ComponentProps<typeof ZoomControls>['onZoomOutClick'];
|
|
8
|
+
onZoomAllClick?: ComponentProps<typeof ZoomControls>['onZoomAllClick'];
|
|
9
|
+
};
|
|
10
|
+
declare const MapControls: React.FC<TMapControlsProps>;
|
|
11
|
+
export default MapControls;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TTheme } from 'lib/types/theme';
|
|
3
|
+
declare const Panel: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
direction?: "row" | "column" | undefined;
|
|
5
|
+
spacing?: number | undefined;
|
|
6
|
+
theme?: TTheme | undefined;
|
|
7
|
+
}>>;
|
|
8
|
+
export default Panel;
|