@mappedin/viewer 0.0.0-alpha → 0.3.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.
Files changed (158) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +54 -18
  3. package/assets/fonts/Roboto-400.ttf +0 -0
  4. package/assets/fonts/Roboto-500.ttf +0 -0
  5. package/assets/fonts/Roboto-700.ttf +0 -0
  6. package/dist/browser-35S22BS6-756afc48.js +229 -0
  7. package/dist/index-7cb8f3c5.js +89817 -0
  8. package/dist/index.js +4 -2
  9. package/dist/outdoor-context-XG4VPE4D-ab82b7cf.js +17268 -0
  10. package/dist/types/src/App.d.ts +9 -0
  11. package/dist/types/src/components/animations/animated-resize.d.ts +13 -0
  12. package/dist/types/src/components/animations/animation-context.d.ts +22 -0
  13. package/dist/types/src/components/animations/animation.stories.d.ts +2 -0
  14. package/dist/types/src/components/animations/utils.d.ts +1 -0
  15. package/dist/types/src/components/button/button.stories.d.ts +3 -0
  16. package/dist/types/src/components/button/index.d.ts +8 -0
  17. package/dist/types/src/components/caret/caret.stories.d.ts +2 -0
  18. package/dist/types/src/components/caret/index.d.ts +7 -0
  19. package/dist/types/src/components/categories/categories.stories.d.ts +3 -0
  20. package/dist/types/src/components/categories/category.d.ts +9 -0
  21. package/dist/types/src/components/categories/index.d.ts +11 -0
  22. package/dist/types/src/components/common/theme-provider.d.ts +6 -0
  23. package/dist/types/src/components/common/typography.d.ts +10 -0
  24. package/dist/types/src/components/common/utils.d.ts +1 -0
  25. package/dist/types/src/components/connection-marker/connection-marker.stories.d.ts +3 -0
  26. package/dist/types/src/components/connection-marker/index.d.ts +9 -0
  27. package/dist/types/src/components/directions/departure-modes.d.ts +8 -0
  28. package/dist/types/src/components/directions/directions-button.d.ts +8 -0
  29. package/dist/types/src/components/directions/directions-search-bar.d.ts +11 -0
  30. package/dist/types/src/components/directions/directions.stories.d.ts +5 -0
  31. package/dist/types/src/components/directions/index.d.ts +17 -0
  32. package/dist/types/src/components/dropped-pin-marker/dropped-pin-hover.d.ts +7 -0
  33. package/dist/types/src/components/dropped-pin-marker/dropped-pin-marker.stories.d.ts +3 -0
  34. package/dist/types/src/components/dropped-pin-marker/index.d.ts +6 -0
  35. package/dist/types/src/components/dropped-pin-marker/use-follow-cursor.d.ts +17 -0
  36. package/dist/types/src/components/dropped-pin-marker/utils.d.ts +8 -0
  37. package/dist/types/src/components/hint/hint.stories.d.ts +2 -0
  38. package/dist/types/src/components/hint/index.d.ts +6 -0
  39. package/dist/types/src/components/hover/hover-element-with-arrow.d.ts +7 -0
  40. package/dist/types/src/components/hover/hover.stories.d.ts +2 -0
  41. package/dist/types/src/components/hover/index.d.ts +16 -0
  42. package/dist/types/src/components/hover/use-hover-element.d.ts +14 -0
  43. package/dist/types/src/components/hover/utils.d.ts +20 -0
  44. package/dist/types/src/components/hover/utils.test.d.ts +1 -0
  45. package/dist/types/src/components/icon/icon.stories.d.ts +2 -0
  46. package/dist/types/src/components/icon/index.d.ts +9 -0
  47. package/dist/types/src/components/input/index.d.ts +6 -0
  48. package/dist/types/src/components/input/input.stories.d.ts +2 -0
  49. package/dist/types/src/components/level-change-notification/index.d.ts +8 -0
  50. package/dist/types/src/components/level-change-notification/level-change-notification.stories.d.ts +2 -0
  51. package/dist/types/src/components/level-selector/index.d.ts +9 -0
  52. package/dist/types/src/components/level-selector/level-selector-menu.d.ts +10 -0
  53. package/dist/types/src/components/level-selector/level-selector.stories.d.ts +3 -0
  54. package/dist/types/src/components/level-selector/utils.d.ts +4 -0
  55. package/dist/types/src/components/main/index.d.ts +28 -0
  56. package/dist/types/src/components/main/main.stories.d.ts +3 -0
  57. package/dist/types/src/components/map-controls/index.d.ts +12 -0
  58. package/dist/types/src/components/map-controls/map-controls.stories.d.ts +2 -0
  59. package/dist/types/src/components/open-app-button/index.d.ts +6 -0
  60. package/dist/types/src/components/open-app-button/open-app-button.stories.d.ts +2 -0
  61. package/dist/types/src/components/panel/index.d.ts +8 -0
  62. package/dist/types/src/components/positioner/index.d.ts +274 -0
  63. package/dist/types/src/components/search-bar/index.d.ts +19 -0
  64. package/dist/types/src/components/search-bar/search.stories.d.ts +4 -0
  65. package/dist/types/src/components/search-bar/use-search-bar.d.ts +11 -0
  66. package/dist/types/src/components/search-bar/use-search-bar.test.d.ts +1 -0
  67. package/dist/types/src/components/search-bar/utils.d.ts +0 -0
  68. package/dist/types/src/components/search-results/index.d.ts +10 -0
  69. package/dist/types/src/components/search-results/search-fallback.d.ts +4 -0
  70. package/dist/types/src/components/search-results/search-results.stories.d.ts +2 -0
  71. package/dist/types/src/components/search-results/use-search-results.d.ts +12 -0
  72. package/dist/types/src/components/search-results/use-search-results.test.d.ts +1 -0
  73. package/dist/types/src/components/share/index.d.ts +7 -0
  74. package/dist/types/src/components/share/share.stories.d.ts +2 -0
  75. package/dist/types/src/components/share/use-share.d.ts +8 -0
  76. package/dist/types/src/components/share/use-share.test.d.ts +1 -0
  77. package/dist/types/src/components/spinner/index.d.ts +8 -0
  78. package/dist/types/src/components/spinner/spinner.stories.d.ts +2 -0
  79. package/dist/types/src/components/tilt-controls/index.d.ts +9 -0
  80. package/dist/types/src/components/tilt-controls/tilt-axes.d.ts +3 -0
  81. package/dist/types/src/components/tilt-controls/tilt-controls.stories.d.ts +2 -0
  82. package/dist/types/src/components/tilt-controls/use-drag-tilt.d.ts +16 -0
  83. package/dist/types/src/components/tilt-controls/utils.d.ts +4 -0
  84. package/dist/types/src/components/title/index.d.ts +7 -0
  85. package/dist/types/src/components/title/title.stories.d.ts +2 -0
  86. package/dist/types/src/components/zoom-controls/index.d.ts +8 -0
  87. package/dist/types/src/components/zoom-controls/zoom-controls.stories.d.ts +2 -0
  88. package/dist/types/src/icons.d.ts +3 -0
  89. package/dist/types/src/index.d.ts +4 -0
  90. package/dist/types/src/lib/canvas/drag-physics.d.ts +27 -0
  91. package/dist/types/src/lib/canvas/drag-physics.test.d.ts +1 -0
  92. package/dist/types/src/lib/canvas/hi-res-canvas.d.ts +33 -0
  93. package/dist/types/src/lib/canvas/hi-res-canvas.test.d.ts +1 -0
  94. package/dist/types/src/lib/hooks/use-app-data.d.ts +8 -0
  95. package/dist/types/src/lib/hooks/use-app-data.test.d.ts +1 -0
  96. package/dist/types/src/lib/hooks/use-callback-ref.d.ts +2 -0
  97. package/dist/types/src/lib/hooks/use-deep-focus.d.ts +13 -0
  98. package/dist/types/src/lib/hooks/use-venue-mvf.d.ts +6 -0
  99. package/dist/types/src/lib/i18n.d.ts +2 -0
  100. package/dist/types/src/lib/logger.d.ts +17 -0
  101. package/dist/types/src/lib/logger.test.d.ts +1 -0
  102. package/dist/types/src/lib/types/directions.d.ts +5 -0
  103. package/dist/types/src/lib/types/map.d.ts +4 -0
  104. package/dist/types/src/lib/types/options.d.ts +18 -0
  105. package/dist/types/src/lib/types/search.d.ts +12 -0
  106. package/dist/types/src/lib/types/state.d.ts +4 -0
  107. package/dist/types/src/lib/types/theme.d.ts +35 -0
  108. package/dist/types/src/lib/types/utils.d.ts +3 -0
  109. package/dist/types/src/lib/utils/color-utils.d.ts +3 -0
  110. package/dist/types/src/lib/utils/color-utils.test.d.ts +1 -0
  111. package/dist/types/src/lib/utils/number-utils.d.ts +1 -0
  112. package/dist/types/src/lib/utils/search-utils.d.ts +1 -0
  113. package/dist/types/src/lib/utils/url-parsing.d.ts +7 -0
  114. package/dist/types/src/lib/utils/url-parsing.test.d.ts +1 -0
  115. package/dist/types/src/states/global.d.ts +5 -0
  116. package/dist/types/src/states/loading.d.ts +6 -0
  117. package/dist/types/src/states/map.d.ts +3 -0
  118. package/dist/types/src/states/not-found.d.ts +3 -0
  119. package/dist/types/src/stores/analytics-store/analytics-store.test.d.ts +1 -0
  120. package/dist/types/src/stores/analytics-store/index.d.ts +9 -0
  121. package/dist/types/src/stores/map-store/controllers/camera.d.ts +27 -0
  122. package/dist/types/src/stores/map-store/controllers/directions.d.ts +17 -0
  123. package/dist/types/src/stores/map-store/controllers/hover.d.ts +25 -0
  124. package/dist/types/src/stores/map-store/controllers/labels.d.ts +16 -0
  125. package/dist/types/src/stores/map-store/controllers/map.d.ts +14 -0
  126. package/dist/types/src/stores/map-store/controllers/markers.d.ts +19 -0
  127. package/dist/types/src/stores/map-store/controllers/polygons.d.ts +17 -0
  128. package/dist/types/src/stores/map-store/index.d.ts +32 -0
  129. package/dist/types/src/stores/map-store/map-store.test.d.ts +1 -0
  130. package/dist/types/src/stores/root-store/index.d.ts +60 -0
  131. package/dist/types/src/stores/root-store/root-store.test.d.ts +1 -0
  132. package/dist/types/src/stores/router-store/index.d.ts +27 -0
  133. package/dist/types/src/stores/router-store/router-store.test.d.ts +1 -0
  134. package/dist/types/src/stores/ui-store/index.d.ts +49 -0
  135. package/dist/types/src/stores/ui-store/ui-store.test.d.ts +1 -0
  136. package/dist/types/src/test-utils/test-setup.d.ts +1 -0
  137. package/dist/types/src/theme.d.ts +3 -0
  138. package/package.json +23 -10
  139. package/tsconfig.build.json +4 -0
  140. package/dist/browser-42K2OAVV-5c10d96e.js +0 -1214
  141. package/dist/index-eb1e9c14.js +0 -72347
  142. package/dist/index.umd.cjs +0 -5116
  143. package/types/src/App.d.ts +0 -4
  144. package/types/src/hooks/useMapView.d.ts +0 -4
  145. package/types/src/hooks/useVenueMVF.d.ts +0 -4
  146. package/types/src/index.d.ts +0 -3
  147. package/types/src/types.d.ts +0 -4
  148. package/types/vite.config.d.ts +0 -2
  149. /package/dist/{Arrival-7GULGCVJ-80c3f73a.js → Arrival-QPP25QX7-80c3f73a.js} +0 -0
  150. /package/dist/{Chalet-4E7PX7WT-42db0054.js → Chalet-IPOAT24L-42db0054.js} +0 -0
  151. /package/dist/{HelveticaNeue-UEVLJKVU-fe724012.js → HelveticaNeue-KPKR5RFE-fe724012.js} +0 -0
  152. /package/dist/{Helvetiker-SNVJCSDR-166d1e4d.js → Helvetiker-UCLF3OSY-166d1e4d.js} +0 -0
  153. /package/dist/{Lato-FDCJ5GCG-c22f98b3.js → Lato-EVVL3OTB-c22f98b3.js} +0 -0
  154. /package/dist/{MyriadPro-NQ2DCXFB-4794df78.js → MyriadPro-ROUUJ4QH-4794df78.js} +0 -0
  155. /package/dist/{ProximaNova-MIBCMRZX-e1c5fad4.js → ProximaNova-QLMZHWWE-e1c5fad4.js} +0 -0
  156. /package/dist/{SimonCircular-B2HEOOJY-12a4d531.js → SimonCircular-POYFCICM-12a4d531.js} +0 -0
  157. /package/{types/src/globalStyles.d.ts → dist/types/src/components/common/global-styles.d.ts} +0 -0
  158. /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,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Height: Story;
@@ -0,0 +1 @@
1
+ export declare const ANIMATION_DURATION_MS = 125;
@@ -0,0 +1,3 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const WithIcon: Story;
3
+ export declare const WithText: Story;
@@ -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,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ type TChevronProps = {
3
+ size?: number;
4
+ direction?: 'up' | 'down' | 'left' | 'right';
5
+ };
6
+ declare const Caret: React.FC<TChevronProps>;
7
+ export default Caret;
@@ -0,0 +1,3 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Item: Story;
3
+ export declare const Default: Story;
@@ -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,6 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { TTheme } from '../../lib/types/theme';
3
+ declare const ThemeProvider: React.FC<PropsWithChildren<{
4
+ theme?: TTheme;
5
+ }>>;
6
+ export default ThemeProvider;
@@ -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,3 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
3
+ export declare const WithDirection: Story;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type TConnectionMarkerProps = {
3
+ type?: string;
4
+ state?: 'default' | 'selection' | 'navigation';
5
+ direction?: 'up' | 'down';
6
+ onClick?: () => void;
7
+ };
8
+ declare const ConnectionMarker: React.FC<TConnectionMarkerProps>;
9
+ 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,8 @@
1
+ /// <reference types="react" />
2
+ type TDirectionsButtonProps = {
3
+ onClick?: () => void;
4
+ visible?: boolean;
5
+ disabled?: boolean;
6
+ };
7
+ declare const DirectionsButton: React.FC<TDirectionsButtonProps>;
8
+ export default DirectionsButton;
@@ -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,5 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
3
+ export declare const Modes: Story;
4
+ export declare const Search: Story;
5
+ export declare const MainButton: Story;
@@ -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,7 @@
1
+ /// <reference types="react" />
2
+ type TDroppedPinHoverProps = {
3
+ visible?: boolean;
4
+ getIsValid?: () => boolean;
5
+ };
6
+ declare const DroppedPinHover: React.FC<TDroppedPinHoverProps>;
7
+ export default DroppedPinHover;
@@ -0,0 +1,3 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
3
+ export declare const Hover: Story;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type TDroppedPinProps = {
3
+ type?: 'departure' | 'destination';
4
+ };
5
+ declare const DroppedPin: React.FC<TDroppedPinProps>;
6
+ export default DroppedPin;
@@ -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,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type THintProps = {
3
+ text: string;
4
+ };
5
+ declare const Hint: React.FC<THintProps>;
6
+ export default Hint;
@@ -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,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
@@ -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,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ type TIconProps = {
3
+ icon: string;
4
+ width: number;
5
+ height: number;
6
+ color?: string;
7
+ };
8
+ declare const Icon: React.FC<TIconProps>;
9
+ export default Icon;
@@ -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,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
@@ -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,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
@@ -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,3 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Menu: Story;
3
+ export declare const Default: Story;
@@ -0,0 +1,4 @@
1
+ export type TLevelSelectorLevel = {
2
+ id: string;
3
+ name: string;
4
+ };
@@ -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,3 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const NoLabels: Story;
3
+ export declare const Default: Story;
@@ -0,0 +1,12 @@
1
+ import { ComponentProps } from 'react';
2
+ import TiltControls from '../tilt-controls';
3
+ import ZoomControls from '../zoom-controls';
4
+ type TMapControlsProps = {
5
+ tiltControlsVisible?: boolean;
6
+ onTiltChange?: ComponentProps<typeof TiltControls>['onChange'];
7
+ onZoomInClick?: ComponentProps<typeof ZoomControls>['onZoomInClick'];
8
+ onZoomOutClick?: ComponentProps<typeof ZoomControls>['onZoomOutClick'];
9
+ onZoomAllClick?: ComponentProps<typeof ZoomControls>['onZoomAllClick'];
10
+ };
11
+ declare const MapControls: React.FC<TMapControlsProps>;
12
+ export default MapControls;
@@ -0,0 +1,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type TOpenAppButtonProps = {
3
+ link: string;
4
+ };
5
+ declare const OpenAppButton: React.FC<TOpenAppButtonProps>;
6
+ export default OpenAppButton;
@@ -0,0 +1,2 @@
1
+ import type { Story } from '@ladle/react';
2
+ export declare const Default: Story;
@@ -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;