@tracktor/map 0.5.9 → 0.5.10

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.
@@ -1,59 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { MarkerMapProps } from '../../types/MarkerMapProps.ts';
3
- /**
4
- * MarkerMap is a reusable React component that displays an interactive Mapbox map
5
- * with customizable markers and behavior.
6
- *
7
- * It supports features like:
8
- * - Auto-fitting bounds to markers
9
- * - Custom marker icons and tooltips
10
- * - Light/dark theming
11
- * - Fly animations and zooming
12
- * - Popup display (on click or hover)
13
- * - Custom styling for the map container
14
- * - Manual or automatic control of map centering and zoom
15
- *
16
- * @param {object} props - Props used to configure the map rendering.
17
- * @param {boolean} [props.fitBounds] - If true, automatically adjusts the viewport to fit all markers.
18
- * @param {number} [props.fitBoundsPadding] - Padding in pixels when fitting bounds to markers.
19
- * @param {LngLatLike | number[]} [props.center] - Initial center of the map [lng, lat].
20
- * @param {string} [props.mapStyle] - Mapbox style URL or identifier (e.g. "mapbox://styles/mapbox/streets-v11").
21
- * @param {number} [props.zoom] - Initial zoom level of the map.
22
- * @param {number} [props.zoomFlyFrom] - Zoom level to use before initiating a flyTo animation.
23
- * @param {string} [props.popupMaxWidth] - Maximum width of popups (e.g., "200px").
24
- * @param {number | string} [props.width="100%"] - Width of the map container.
25
- * @param {number | string} [props.height=300] - Height of the map container.
26
- * @param {boolean} [props.loading] - Optional flag indicating if the map is in loading state.
27
- * @param {string} [props.markerImageURL] - URL of a custom image used for default marker icons.
28
- * @param {SxProps} [props.containerStyle] - Style object (MUI `sx`) to customize the map container.
29
- * @param {boolean} [props.disableFlyTo] - If true, disables flyTo animation when focusing on a marker.
30
- * @param {number} [props.flyToDuration] - Duration of fly animation in milliseconds.
31
- * @param {number} [props.fitBoundDuration] - Duration of fitBounds animation in milliseconds.
32
- * @param {boolean} [props.square] - If true, forces the map container to be a square.
33
- * @param {number | string} [props.openPopup] - ID of the marker whose popup should be open by default.
34
- * @param {boolean} [props.openPopupOnHover] - If true, opens the popup on marker hover instead of click.
35
- * @param {MarkerProps[]} [props.markers] - Array of marker objects to render on the map.
36
- * @param {(lng: number, lat: number) => void} [props.onMapClick] - Callback triggered when the map is clicked.
37
- * @param {"light" | "dark" | ThemeOptions} [props.theme] - Optional theme override for map rendering.
38
- *
39
- * @returns {ReactElement} The rendered map component with optional markers and behavior.
40
- *
41
- * @example
42
- * ```tsx
43
- * <MarkerMap
44
- * center={[2.3488, 48.8534]}
45
- * zoom={13}
46
- * fitBounds
47
- * markers={[
48
- * { id: 1, lat: 48.8534, lng: 2.3488, name: "Marker 1" },
49
- * { id: 2, lat: 48.8566, lng: 2.3522, name: "Marker 2" },
50
- * ]}
51
- * openPopupOnHover
52
- * popupMaxWidth="250px"
53
- * mapStyle="mapbox://styles/mapbox/light-v10"
54
- * theme="light"
55
- * />
56
- * ```
57
- */
58
- declare const MarkerMap: ({ containerStyle, square, theme, height, width, ...props }: MarkerMapProps) => ReactElement;
59
- export default MarkerMap;
3
+ declare const _default: import('react').MemoExoticComponent<({ containerStyle, square, theme, height, width, ...props }: MarkerMapProps) => ReactElement>;
4
+ export default _default;