@hpcc-js/map 3.1.1 → 3.2.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/package.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "@hpcc-js/map",
3
- "version": "3.1.1",
3
+ "version": "3.2.1",
4
4
  "description": "hpcc-js - Viz Map",
5
5
  "type": "module",
6
+ "main": "./dist/index.umd.cjs",
7
+ "module": "./dist/index.js",
6
8
  "exports": {
7
9
  ".": {
8
10
  "types": "./types/index.d.ts",
9
- "default": "./dist/index.js"
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.umd.cjs"
10
13
  },
11
14
  "./dist/*": "./dist/*"
12
15
  },
13
- "module": "./dist/index.js",
14
- "browser": "./dist/index.js",
16
+ "browser": "./dist/index.umd.cjs",
15
17
  "types": "./types/index.d.ts",
16
18
  "files": [
17
19
  "dist/*",
@@ -20,8 +22,8 @@
20
22
  ],
21
23
  "scripts": {
22
24
  "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
23
- "bundle": "node esbuild.js",
24
- "bundle-watch": "npm run bundle -- --development --watch",
25
+ "bundle": "vite build",
26
+ "bundle-watch": "vite --port 5512",
25
27
  "gen-types": "tsc --project tsconfig.json",
26
28
  "gen-types-watch": "npm run gen-types -- --watch",
27
29
  "build": "run-p gen-types bundle",
@@ -35,18 +37,18 @@
35
37
  "update-major": "npx --yes npm-check-updates -u"
36
38
  },
37
39
  "dependencies": {
38
- "@hpcc-js/api": "^3.2.0",
39
- "@hpcc-js/common": "^3.2.0",
40
- "@hpcc-js/graph": "^3.1.1",
41
- "@hpcc-js/layout": "^3.1.1",
42
- "@hpcc-js/other": "^3.1.1",
43
- "@hpcc-js/util": "^3.2.0"
40
+ "@hpcc-js/api": "^3.3.0",
41
+ "@hpcc-js/common": "^3.3.0",
42
+ "@hpcc-js/graph": "^3.2.1",
43
+ "@hpcc-js/layout": "^3.2.0",
44
+ "@hpcc-js/other": "^3.2.0",
45
+ "@hpcc-js/util": "^3.3.0"
44
46
  },
45
47
  "devDependencies": {
46
- "@hpcc-js/esbuild-plugins": "^1.3.0",
48
+ "@hpcc-js/esbuild-plugins": "^1.4.0",
47
49
  "@types/leaflet-draw": "1.0.11",
48
50
  "@types/leaflet.heat": "0.2.4",
49
- "@types/leaflet.markercluster": "1.5.4",
51
+ "@types/leaflet.markercluster": "1.5.5",
50
52
  "d3-collection": "^1",
51
53
  "d3-color": "3.1.0",
52
54
  "d3-format": "^1",
@@ -73,5 +75,5 @@
73
75
  "url": "https://github.com/hpcc-systems/Visualization/issues"
74
76
  },
75
77
  "homepage": "https://github.com/hpcc-systems/Visualization",
76
- "gitHead": "b4f63e027feea45ebdfc578ef9c85d107bd97322"
78
+ "gitHead": "ed4453ec6a4a8af9c0beb11b46c7f4365bc0669e"
77
79
  }
package/src/Utility.ts CHANGED
@@ -324,10 +324,11 @@ export class Geohash {
324
324
 
325
325
  calculateWidthDegrees(n) {
326
326
  let a;
327
- if (n % 2 === 0)
327
+ if (n % 2 === 0) {
328
328
  a = -1;
329
- else
329
+ } else {
330
330
  a = -0.5;
331
+ }
331
332
  const result = 180 / Math.pow(2, 2.5 * n + a);
332
333
  return result;
333
334
  }
@@ -389,10 +390,11 @@ export function albersUsaPr() {
389
390
  const x = coordinates[0];
390
391
  const y = coordinates[1];
391
392
  point = null;
393
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
392
394
  (lower48Point.point(x, y), point) ||
393
395
  (alaskaPoint.point(x, y), point) ||
394
396
  (hawaiiPoint.point(x, y), point) ||
395
- (puertoRicoPoint.point(x, y), point); // jshint ignore:line
397
+ (puertoRicoPoint.point(x, y), point);
396
398
  return point;
397
399
  };
398
400
 
@@ -16,4 +16,4 @@ export { HeatLayer as LHeatLayer } from "./plugins/HeatLayer.ts";
16
16
  export type MarkerClusterGroup = L.MarkerClusterGroup;
17
17
  export const MarkerClusterGroup = L.MarkerClusterGroup;
18
18
 
19
- export { L, Circle, Control, CRS, Direction, DivIcon, Draw, FeatureGroup, GeoJSON, Icon, LatLng, LatLngBounds, LatLngExpression, LeafletEvent, Map, Marker, point, Point, Polygon, Polyline, Rectangle, TileLayer, Transformation, Util };
19
+ export { L, Circle, Control, CRS, type Direction, DivIcon, Draw, FeatureGroup, GeoJSON, Icon, LatLng, LatLngBounds, type LatLngExpression, type LeafletEvent, Map, Marker, point, Point, Polygon, Polyline, Rectangle, TileLayer, Transformation, Util };
@@ -11,4 +11,4 @@ export { D3SvgOverlay } from "./plugins/D3SvgOverlay.ts";
11
11
  export { HeatLayer as LHeatLayer } from "./plugins/HeatLayer.ts";
12
12
  export type MarkerClusterGroup = L.MarkerClusterGroup;
13
13
  export declare const MarkerClusterGroup: typeof L.MarkerClusterGroup;
14
- export { L, Circle, Control, CRS, Direction, DivIcon, Draw, FeatureGroup, GeoJSON, Icon, LatLng, LatLngBounds, LatLngExpression, LeafletEvent, Map, Marker, point, Point, Polygon, Polyline, Rectangle, TileLayer, Transformation, Util };
14
+ export { L, Circle, Control, CRS, type Direction, DivIcon, Draw, FeatureGroup, GeoJSON, Icon, LatLng, LatLngBounds, type LatLngExpression, type LeafletEvent, Map, Marker, point, Point, Polygon, Polyline, Rectangle, TileLayer, Transformation, Util };