@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.
@@ -1,6 +1,6 @@
1
1
  import { ComponentType, ReactNode } from 'react';
2
2
  import { CustomMarkerMapProps } from '../utils/loadMarkers.tsx';
3
- export interface MarkerProps {
3
+ export interface MarkerProps<T = Record<string, unknown>> {
4
4
  /**
5
5
  * Optional unique identifier for the marker.
6
6
  */
@@ -52,7 +52,7 @@ export interface MarkerProps {
52
52
  /**
53
53
  * Optional props to pass to the IconComponent.
54
54
  */
55
- iconProps?: Record<string, any>;
55
+ iconProps?: T;
56
56
  /**
57
57
  * Optional custom React component to use as the marker icon.
58
58
  * Overrides iconImage if provided.
@@ -1,9 +1,9 @@
1
- import { Popup, Map } from 'mapbox-gl';
2
- import { RefObject, ReactNode } from 'react';
1
+ import { Map as MapboxMap, Popup } from 'mapbox-gl';
2
+ import { ReactNode, RefObject } from 'react';
3
3
  interface AddPopupProps {
4
4
  coordinates?: [number, number];
5
5
  tooltip?: ReactNode;
6
- map: RefObject<Map | null>;
6
+ map: RefObject<MapboxMap | null>;
7
7
  }
8
8
  /**
9
9
  * Adds a React-based popup to a Mapbox map
@@ -1,8 +1,8 @@
1
- import { Map } from 'mapbox-gl';
1
+ import { Map as MapboxMap, PointLike } from 'mapbox-gl';
2
2
  import { RefObject } from 'react';
3
3
  interface GetFeatureProps {
4
- map: RefObject<Map | null>;
5
- point: any;
4
+ map: RefObject<MapboxMap | null>;
5
+ point: PointLike;
6
6
  }
7
7
  /**
8
8
  * Handles map click events to display popups
@@ -1,5 +1,5 @@
1
1
  import { Palette } from '@tracktor/design-system';
2
- import { Map } from 'mapbox-gl';
2
+ import { Map as MapboxMap } from 'mapbox-gl';
3
3
  import { ComponentType, RefObject } from 'react';
4
4
  import { MarkerProps } from '../types/MarkerProps.ts';
5
5
  export interface CustomMarkerMapProps {
@@ -14,9 +14,9 @@ export interface CustomMarkerMapProps {
14
14
  zIndex: number;
15
15
  pointerEvents?: string;
16
16
  name?: string;
17
- iconProps?: Record<string, any>;
17
+ iconProps?: Record<string, unknown>;
18
18
  onClick?: (markerData?: CustomMarkerMapProps) => void;
19
- IconComponent?: ComponentType<any>;
19
+ IconComponent?: ComponentType<unknown>;
20
20
  };
21
21
  type: string;
22
22
  }
@@ -25,7 +25,7 @@ interface GenerateMarkersProps {
25
25
  type?: string;
26
26
  }
27
27
  interface LoadMarkersProps {
28
- map: RefObject<Map | null>;
28
+ map: RefObject<MapboxMap | null>;
29
29
  palette: Palette;
30
30
  markers: MarkerProps[];
31
31
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@tracktor/map",
3
- "description": "A react library to easily display map with multiple tools",
3
+ "description": "A React library to easily display map with multiple tools",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
- "version": "1.0.5",
6
+ "version": "1.1.1",
7
7
  "type": "module",
8
8
  "main": "dist/main.umd.cjs",
9
9
  "module": "dist/main.js",
@@ -16,15 +16,21 @@
16
16
  }
17
17
  },
18
18
  "scripts": {
19
- "example": "vite",
20
- "build": "tsc && vite build",
21
- "lint": "eslint .",
22
- "prepublishOnly": "yarn build",
23
- "preview": "vite preview"
19
+ "example": "bunx vite",
20
+ "build": "bunx tsc && bunx vite build",
21
+ "lint": "bunx biome check --diagnostic-level=error . && bunx tsc --noEmit --incremental",
22
+ "lint:fix": "bunx biome check . --write",
23
+ "prepublishOnly": "bun run build",
24
+ "preview": "bunx vite preview",
25
+ "release": "bun run build && bun publish --access public",
26
+ "version": "bunx standard-version"
24
27
  },
25
28
  "files": [
26
29
  "dist"
27
30
  ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
28
34
  "dependencies": {
29
35
  "@mui/icons-material": "^5.17.1",
30
36
  "@mui/x-license": "^8.6.0",
@@ -33,14 +39,15 @@
33
39
  "mapbox-gl": "^3.12.0"
34
40
  },
35
41
  "devDependencies": {
42
+ "@tracktor/biome-config-react": "^1.1.1",
36
43
  "@types/mapbox-gl": "^3.4.1",
37
44
  "@types/node": "^22.14.0",
38
45
  "@types/react": "^19.0.0",
39
46
  "@types/react-dom": "^19.0.0",
40
47
  "@vitejs/plugin-react": "^4.6.0",
41
- "eslint-config-react-tracktor": "^1.10.0",
42
48
  "react": "^19.0.0",
43
49
  "react-dom": "^19.0.0",
50
+ "standard-version": "^9.5.0",
44
51
  "typescript": "~5.8.3",
45
52
  "vite": "^7.0.0",
46
53
  "vite-plugin-css-injected-by-js": "^3.5.2",
@@ -53,5 +60,9 @@
53
60
  "mapbox-gl": ">=3.0.0",
54
61
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
55
62
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
56
- }
63
+ },
64
+ "engines": {
65
+ "bun": ">=1.1.0"
66
+ },
67
+ "packageManager": "bun@1.1.34"
57
68
  }