@overmap-ai/core 1.0.65-mapbox.1 → 1.0.65

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,8 +1,8 @@
1
- export type Position = [number, number];
2
- export type Bounds = [Position, Position];
1
+ export type Coordinates = [number, number];
2
+ export type Bounds = [Coordinates, Coordinates];
3
3
  export interface PointGeometry {
4
4
  type: "Point";
5
- coordinates: Position;
5
+ coordinates: Coordinates;
6
6
  }
7
7
  export interface MultiPointGeometry {
8
8
  type: "MultiPoint";
@@ -1,4 +1,18 @@
1
- import type { Bounds, MultiPointGeometry, PointGeometry, Position } from "../typings";
2
- export declare const createPointGeometry: (position: Position) => PointGeometry;
3
- export declare const createMultiPointGeometry: (coordinates: Bounds) => MultiPointGeometry;
4
- export declare const coordinatesAreEqual: (a: Position, b: Position) => boolean;
1
+ import L from "leaflet";
2
+ import { Bounds, Coordinates, MultiPointGeometry, PointGeometry } from "../typings";
3
+ export declare const coordinatesToLiteral: (coordinates: Coordinates) => L.LatLngLiteral;
4
+ export declare const literalToCoordinates: (literal: L.LatLngLiteral) => Coordinates;
5
+ /**
6
+ * Flip coordinates from [lng, lat] to [lat, lng]
7
+ */
8
+ export declare const flipCoordinates: (coordinates: L.LatLngTuple) => Coordinates;
9
+ export declare const flipBounds: (bounds: Bounds) => Bounds;
10
+ export declare function offsetPositionByMeters(originalPosition: L.LatLng, latMeters: number, lngMeters: number): L.LatLngLiteral;
11
+ export declare const createPointGeometry: (coordinates: Coordinates) => PointGeometry;
12
+ export declare const coordinatesAreEqual: (a: Coordinates, b: Coordinates) => boolean;
13
+ export declare const coordinatesToText: (coordinates: Coordinates | null | undefined, decimalPlaces?: number) => string;
14
+ export declare const coordinatesToUrlText: (coordinates: Coordinates) => string;
15
+ export declare const openCoordsInGoogleMaps: (coordinates: Coordinates) => void;
16
+ export declare const openDirectionsInGoogleMaps: (startingPoint: Coordinates, destination: Coordinates) => void;
17
+ export declare const worldBounds: MultiPointGeometry;
18
+ export declare const createMultiPointGeometry: (coordinates: [Coordinates, Coordinates]) => MultiPointGeometry;
@@ -1,7 +1,13 @@
1
- import type { IssueAttachment, OfflineModel, OvermapRootState } from "../typings";
1
+ import { Coordinates, IssueAttachment, OfflineModel, OvermapRootState } from "../typings";
2
2
  type MemoizedSelectorWithArgs<TArgs, TRet> = (state: OvermapRootState, args: TArgs) => TRet;
3
3
  export declare const restructureCreateSelectorWithArgs: <TArgs, TRet>(selector: MemoizedSelectorWithArgs<TArgs, TRet>) => (args: TArgs) => (state: OvermapRootState) => TRet;
4
4
  export declare function onlyUniqueOfflineIds(value: OfflineModel, index: number, self: OfflineModel[]): boolean;
5
5
  export declare function onlyUniqueHashes(value: IssueAttachment, index: number, self: IssueAttachment[]): boolean;
6
+ /**
7
+ *
8
+ * @param bounds order: [northEast, southWest]
9
+ * @param coordinates
10
+ */
11
+ export declare function boundsContainPoint(bounds: [Coordinates, Coordinates], coordinates: Coordinates): boolean;
6
12
  export declare const emailRegex: RegExp;
7
13
  export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core functionality for Overmap",
4
4
  "author": "Wôrdn Inc.",
5
5
  "license": "UNLICENSED",
6
- "version": "1.0.65-mapbox.1",
6
+ "version": "1.0.65",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",
@@ -22,12 +22,16 @@
22
22
  "@radix-ui/colors": "^3.0.0",
23
23
  "@redux-offline/redux-offline": "^2.6.0",
24
24
  "@reduxjs/toolkit": "^1.9.5",
25
+ "@types/file-saver": "^2.0.7",
25
26
  "color": "^4.2.3",
26
27
  "dependency-graph": "^1.0.0",
27
28
  "file-saver": "^2.0.5",
28
29
  "idb": "^7.1.1",
29
30
  "jwt-decode": "^3.1.2",
31
+ "leaflet-draw": "^1.0.4",
32
+ "leaflet.markercluster": "^1.5.3",
30
33
  "localforage": "^1.10.0",
34
+ "react-leaflet": "^4.2.1",
31
35
  "redux-persist-migrate": "^5.0.0",
32
36
  "superagent": "^8.1.2",
33
37
  "uuid": "^9.0.0"
@@ -50,7 +54,6 @@
50
54
  "@types/react-redux": "^7.1.26",
51
55
  "@types/superagent": "^4.1.18",
52
56
  "@types/uuid": "^9.0.3",
53
- "@types/file-saver": "^2.0.7",
54
57
  "@typescript-eslint/eslint-plugin": "^6.4.1",
55
58
  "@typescript-eslint/parser": "^6.4.1",
56
59
  "@vitejs/plugin-react-swc": "^3.3.2",