@tracktor/map 1.0.5 → 1.1.1
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/components/MarkerMap/useMarkerMap.d.ts +3 -3
- package/dist/hooks/useFitBounds.d.ts +2 -2
- package/dist/hooks/useMarkers.d.ts +2 -2
- package/dist/hooks/useOnMapClick.d.ts +2 -2
- package/dist/hooks/usePopups.d.ts +2 -2
- package/dist/main.d.ts +7 -8
- package/dist/main.js +15674 -13544
- package/dist/main.umd.cjs +115 -111
- package/dist/types/MarkerProps.d.ts +2 -2
- package/dist/utils/addPopup.d.ts +3 -3
- package/dist/utils/getFeature.d.ts +3 -3
- package/dist/utils/loadMarkers.d.ts +4 -4
- package/package.json +20 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Map } from 'mapbox-gl';
|
|
1
|
+
import { Map as MapboxMap } from 'mapbox-gl';
|
|
2
2
|
import { MarkerMapProps } from '../../types/MarkerMapProps';
|
|
3
3
|
export declare const DEFAULT_CENTER_LNG = 2.333;
|
|
4
4
|
export declare const DEFAULT_CENTER_LAT = 46.8677;
|
|
@@ -17,7 +17,7 @@ declare const useMarkerMap: ({ markers, center, disableAnimation, openPopup, onM
|
|
|
17
17
|
containerRef: import('react').RefObject<string | HTMLDivElement>;
|
|
18
18
|
currentTheme: import('@tracktor/design-system').PaletteMode;
|
|
19
19
|
isMapInitialized: boolean;
|
|
20
|
-
map: import('react').RefObject<
|
|
21
|
-
markers: import('../../main').MarkerProps[];
|
|
20
|
+
map: import('react').RefObject<MapboxMap | null>;
|
|
21
|
+
markers: import('../../main').MarkerProps<Record<string, unknown>>[];
|
|
22
22
|
};
|
|
23
23
|
export default useMarkerMap;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Map } from 'mapbox-gl';
|
|
1
|
+
import { Map as MapboxMap } from 'mapbox-gl';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
import { MarkerProps } from '../types/MarkerProps.ts';
|
|
4
4
|
type useFitBoundsProps = {
|
|
5
|
-
map: RefObject<
|
|
5
|
+
map: RefObject<MapboxMap | null>;
|
|
6
6
|
disableAnimation: boolean | undefined;
|
|
7
7
|
fitBounds?: boolean;
|
|
8
8
|
fitBoundDuration?: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Palette } from '@tracktor/design-system';
|
|
2
|
-
import { LngLatLike, Map } from 'mapbox-gl';
|
|
2
|
+
import { LngLatLike, Map as MapboxMap } from 'mapbox-gl';
|
|
3
3
|
import { RefObject } from 'react';
|
|
4
4
|
import { MarkerProps } from '../types/MarkerProps.ts';
|
|
5
5
|
type UseInitializeMapProps = {
|
|
6
|
-
map: RefObject<
|
|
6
|
+
map: RefObject<MapboxMap | null>;
|
|
7
7
|
markers?: MarkerProps[];
|
|
8
8
|
palette: Palette;
|
|
9
9
|
isMapInitialized: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Map } from 'mapbox-gl';
|
|
1
|
+
import { Map as MapboxMap } from 'mapbox-gl';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
type UseCorrectedMapClickProps = {
|
|
4
|
-
map: RefObject<
|
|
4
|
+
map: RefObject<MapboxMap | null>;
|
|
5
5
|
onMapClick?: (lng: number, lat: number) => void;
|
|
6
6
|
isMapInitialized?: boolean;
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Map } from 'mapbox-gl';
|
|
1
|
+
import { Map as MapboxMap } from 'mapbox-gl';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
import { MarkerProps } from '../types/MarkerProps';
|
|
4
4
|
type UsePopupsProps = {
|
|
5
|
-
map: RefObject<
|
|
5
|
+
map: RefObject<MapboxMap | null>;
|
|
6
6
|
markers?: MarkerProps[];
|
|
7
7
|
openPopup: string | number | undefined;
|
|
8
8
|
isMapInitialized: boolean;
|
package/dist/main.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export { DEFAULT_CENTER_LNG } from './constants/coordinates.ts';
|
|
2
|
-
export { DEFAULT_CENTER_LAT } from './constants/coordinates.ts';
|
|
3
|
-
export { default as MapProvider } from './context/MapProvider';
|
|
4
|
-
export * from './context/MapProvider';
|
|
5
|
-
export { default as MarkerMap } from './components/MarkerMap/MarkerMap';
|
|
6
1
|
export * from './components/MarkerMap/MarkerMap';
|
|
7
|
-
export { default as
|
|
8
|
-
export
|
|
9
|
-
export * from './
|
|
2
|
+
export { default as MarkerMap } from './components/MarkerMap/MarkerMap';
|
|
3
|
+
export { DEFAULT_CENTER_LAT, DEFAULT_CENTER_LNG } from './constants/coordinates.ts';
|
|
4
|
+
export * from './context/MapProvider';
|
|
5
|
+
export { default as MapProvider } from './context/MapProvider';
|
|
10
6
|
export * from './types/MarkerMapProps';
|
|
7
|
+
export * from './types/MarkerProps';
|
|
8
|
+
export * from './utils/isValidLatLng';
|
|
9
|
+
export { default as isValidLatLng } from './utils/isValidLatLng';
|