@mailwoman/spatial 5.9.0 → 5.10.0

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.
Files changed (48) hide show
  1. package/bbox.ts +3 -3
  2. package/coordinate-formats.test.ts +1 -1
  3. package/countries/codes.ts +255 -252
  4. package/countries/index.ts +2 -2
  5. package/feature.ts +1 -1
  6. package/geometries/collection.ts +4 -4
  7. package/geometries/index.ts +4 -4
  8. package/geometries/line-string.ts +2 -2
  9. package/geometries/point.ts +4 -4
  10. package/geometries/polygon.test.ts +1 -1
  11. package/geometries/polygon.ts +21 -19
  12. package/google/index.ts +1 -1
  13. package/h3/index.ts +1 -1
  14. package/index.ts +11 -11
  15. package/objects.ts +1 -1
  16. package/out/bbox.d.ts +2 -2
  17. package/out/countries/codes.d.ts +252 -251
  18. package/out/countries/codes.d.ts.map +1 -1
  19. package/out/countries/codes.js +251 -252
  20. package/out/countries/codes.js.map +1 -1
  21. package/out/countries/index.d.ts +2 -2
  22. package/out/feature.d.ts +1 -1
  23. package/out/geometries/collection.d.ts +4 -4
  24. package/out/geometries/index.d.ts +4 -4
  25. package/out/geometries/line-string.d.ts +2 -2
  26. package/out/geometries/point.d.ts +5 -5
  27. package/out/geometries/polygon.d.ts +20 -19
  28. package/out/geometries/polygon.d.ts.map +1 -1
  29. package/out/geometries/polygon.js +17 -18
  30. package/out/geometries/polygon.js.map +1 -1
  31. package/out/google/index.d.ts +1 -1
  32. package/out/h3/index.d.ts +1 -1
  33. package/out/index.d.ts +11 -11
  34. package/out/objects.d.ts +1 -1
  35. package/out/projection.d.ts +5 -4
  36. package/out/projection.d.ts.map +1 -1
  37. package/out/projection.js +4 -5
  38. package/out/projection.js.map +1 -1
  39. package/out/regions/index.d.ts +2 -2
  40. package/out/sdk/index.d.ts +1 -1
  41. package/out/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +23 -5
  43. package/projection.ts +6 -4
  44. package/regions/codes.ts +1 -1
  45. package/regions/index.ts +2 -2
  46. package/sdk/index.ts +1 -1
  47. package/sdk/well-known-text.test.ts +1 -1
  48. package/tsconfig.json +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/spatial",
3
- "version": "5.9.0",
3
+ "version": "5.10.0",
4
4
  "description": "Spatial analysis, geocoding, and other geo-related utilities.",
5
5
  "keywords": [
6
6
  "geo",
@@ -22,21 +22,39 @@
22
22
  "exports": {
23
23
  "./package.json": "./package.json",
24
24
  "./schema/*.json": "./dist/schema/*.json",
25
- "./sdk": "./out/sdk/index.js",
26
- ".": "./out/index.js"
25
+ "./sdk": {
26
+ "types": "./out/sdk/index.d.ts",
27
+ "default": "./out/sdk/index.js"
28
+ },
29
+ ".": {
30
+ "types": "./out/index.d.ts",
31
+ "default": "./out/index.js"
32
+ }
27
33
  },
28
34
  "publishConfig": {
35
+ "exports": {
36
+ "./package.json": "./package.json",
37
+ "./schema/*.json": "./dist/schema/*.json",
38
+ "./sdk": {
39
+ "types": "./out/sdk/index.d.ts",
40
+ "default": "./out/sdk/index.js"
41
+ },
42
+ ".": {
43
+ "types": "./out/index.d.ts",
44
+ "default": "./out/index.js"
45
+ }
46
+ },
29
47
  "access": "public"
30
48
  },
31
49
  "dependencies": {
32
- "@mailwoman/core": "5.9.0",
50
+ "@mailwoman/core": "5.10.0",
33
51
  "geo-coordinates-parser": "^1.7.4",
34
52
  "h3-js": "^4.4.0",
35
53
  "wkx": "^0.5.0"
36
54
  },
37
55
  "devDependencies": {
38
56
  "@googlemaps/google-maps-services-js": "^3.4.2",
39
- "@mailwoman/annotations": "5.9.0",
57
+ "@mailwoman/annotations": "5.10.0",
40
58
  "@types/google.maps": "^3.65.1",
41
59
  "type-fest": "^5.7.0"
42
60
  },
package/projection.ts CHANGED
@@ -9,15 +9,17 @@
9
9
  *
10
10
  * @category Geo
11
11
  */
12
- export enum CoordinateProjection {
12
+ export const CoordinateProjection = {
13
13
  /**
14
14
  * Coordinate system used in Google Earth and GSP systems.
15
15
  *
16
16
  * It represents Earth as a three-dimensional ellipsoid.
17
17
  */
18
- WGS84 = "4326",
18
+ WGS84: "4326",
19
19
  /**
20
20
  * North American Datum 1983, a geodetic reference system used in the TIGER/Line data.
21
21
  */
22
- NAD83 = "4269",
23
- }
22
+ NAD83: "4269",
23
+ } as const
24
+
25
+ export type CoordinateProjection = (typeof CoordinateProjection)[keyof typeof CoordinateProjection]
package/regions/codes.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
6
 
7
- import type { RegionName } from "./names.js"
7
+ import type { RegionName } from "./names.ts"
8
8
 
9
9
  /**
10
10
  * M.49 region codes for continents.
package/regions/index.ts CHANGED
@@ -4,5 +4,5 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
6
 
7
- export * from "./codes.js"
8
- export * from "./names.js"
7
+ export * from "./codes.ts"
8
+ export * from "./names.ts"
package/sdk/index.ts CHANGED
@@ -4,4 +4,4 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
6
 
7
- export * from "./well-known-text.js"
7
+ export * from "./well-known-text.ts"
@@ -15,7 +15,7 @@ import {
15
15
  geometryToWKB,
16
16
  geometryToWKT,
17
17
  wellKnownGeometryToGeoJSON,
18
- } from "./well-known-text.js"
18
+ } from "./well-known-text.ts"
19
19
 
20
20
  const POINT: GeometryLiteral = { type: "Point", coordinates: [30, 10] }
21
21
 
package/tsconfig.json CHANGED
@@ -5,7 +5,8 @@
5
5
  "emitDecoratorMetadata": true,
6
6
  "experimentalDecorators": true,
7
7
  "emitDeclarationOnly": false,
8
- "allowImportingTsExtensions": false
8
+ "rewriteRelativeImportExtensions": true,
9
+ "erasableSyntaxOnly": true
9
10
  },
10
11
  "exclude": ["./out/**/*", "./**/*.test.ts", "./**/*.test.tsx"],
11
12
  "references": [