@tracktor/map 0.1.5 → 0.2.2

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.
@@ -5,6 +5,7 @@ interface MapBoxProps {
5
5
  loading?: boolean;
6
6
  containerStyle?: SxProps;
7
7
  square?: boolean;
8
+ error?: string | boolean;
8
9
  }
9
10
  declare const _default: import('react').ForwardRefExoticComponent<MapBoxProps & import('react').RefAttributes<HTMLElement>>;
10
11
  export default _default;
@@ -1,4 +1,4 @@
1
- import { MarkerMapProps } from '../../types/MarkerMap.tsx';
1
+ import { MarkerMapProps } from '../../types/MarkerMapProps.ts';
2
2
  /**
3
3
  * MarkerMap is a reusable React component that displays an interactive Mapbox map
4
4
  * with customizable markers and behavior.
@@ -1,5 +1,5 @@
1
1
  import { Map } from 'mapbox-gl';
2
- import { MarkerMapProps } from '../../types/MarkerMap.tsx';
2
+ import { MarkerMapProps } from '../../types/MarkerMapProps.ts';
3
3
  export declare const DEFAULT_CENTER_LNG = 2.333;
4
4
  export declare const DEFAULT_CENTER_LAT = 46.8677;
5
5
  /**
@@ -14,10 +14,11 @@ export declare const DEFAULT_CENTER_LAT = 46.8677;
14
14
  * - Handles map click events with a provided callback
15
15
  * - Supports customizable flyTo behavior, zoom levels, and map style
16
16
  */
17
- declare const useMarkerMap: ({ markers, loading, center, flyToDuration, fitBoundDuration, fitBounds, disableFlyTo, fitBoundsPadding, mapStyle, zoom, zoomFlyFrom, openPopup, onMapClick, }: MarkerMapProps) => {
17
+ declare const useMarkerMap: ({ markers, loading, center, openPopup, onMapClick, flyToDuration, fitBoundDuration, fitBounds, disableFlyTo, fitBoundsPadding, mapStyle, zoom, zoomFlyFrom, }: MarkerMapProps) => {
18
18
  loading: boolean | undefined;
19
19
  map: import('react').RefObject<Map | null>;
20
20
  mapContainer: import('react').RefObject<HTMLDivElement | null>;
21
- markers: import('../../main').MarkerProps[] | undefined;
21
+ markers: import('../../main.ts').MarkerProps[] | undefined;
22
+ webGLSupported: boolean;
22
23
  };
23
24
  export default useMarkerMap;
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_CENTER_LNG = 2.333;
2
+ export declare const DEFAULT_CENTER_LAT = 46.8677;
package/dist/main.d.ts CHANGED
@@ -1,6 +1,12 @@
1
- export { default as MarkerMap } from './components/MarkerMap/MarkerMap';
2
- export * from './components/MarkerMap/MarkerMap';
1
+ export { DEFAULT_CENTER_LNG } from './constants/coordinates.ts';
2
+ export { DEFAULT_CENTER_LAT } from './constants/coordinates.ts';
3
3
  export { default as MapProvider } from './context/MapProvider';
4
4
  export * from './context/MapProvider';
5
- export * from './types/Markers';
6
- export * from './types/MarkerMap';
5
+ export { default as MarkerMap } from './components/MarkerMap/MarkerMap';
6
+ export * from './components/MarkerMap/MarkerMap';
7
+ export { default as isValidLatLng } from './utils/isValidLatLng';
8
+ export * from './utils/isValidLatLng';
9
+ export { default as isWebGLSupported } from './utils/isWebGLSupported';
10
+ export * from './utils/isWebGLSupported';
11
+ export * from './types/MarkerProps';
12
+ export * from './types/MarkerMapProps';