@opensystemslab/map 0.7.4 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opensystemslab/map",
3
- "version": "0.7.4",
4
- "license": "OGL-UK-3.0",
3
+ "version": "0.7.6",
4
+ "license": "MPL-2.0",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
@@ -29,44 +29,41 @@
29
29
  "@turf/union": "^6.5.0",
30
30
  "accessible-autocomplete": "^2.0.4",
31
31
  "file-saver": "^2.0.5",
32
- "govuk-frontend": "^4.0.1",
32
+ "govuk-frontend": "^4.7.0",
33
33
  "jspdf": "^2.5.1",
34
- "lit": "^2.3.1",
35
- "ol": "^7.0.0",
36
- "ol-ext": "^4.0.4",
37
- "ol-mapbox-style": "^9.0.0",
34
+ "lit": "^2.7.6",
35
+ "ol": "^7.5.1",
36
+ "ol-ext": "^4.0.11",
37
+ "ol-mapbox-style": "^11.0.3",
38
38
  "postcode": "^5.1.0",
39
- "proj4": "^2.8.0",
40
- "rambda": "^7.0.1"
39
+ "proj4": "^2.9.0",
40
+ "rambda": "^8.3.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@glorious/pitsby": "^1.30.16",
44
- "@testing-library/dom": "^9.0.0",
43
+ "@glorious/pitsby": "^1.36.1",
44
+ "@testing-library/dom": "^9.3.1",
45
45
  "@testing-library/user-event": "^14.4.3",
46
46
  "@types/file-saver": "^2.0.5",
47
- "@types/node": "^18.6.3",
47
+ "@types/node": "^20.4.4",
48
48
  "@types/ol-ext": "npm:@siedlerchr/types-ol-ext@^3.0.9",
49
49
  "@types/proj4": "^2.5.2",
50
- "@vitest/ui": "^0.29.2",
51
- "happy-dom": "^8.1.0",
52
- "husky": "^8.0.1",
53
- "lint-staged": "^13.0.3",
54
- "prettier": "^2.3.2",
55
- "rollup-plugin-postcss-lit": "^2.0.0",
56
- "sass": "^1.44.0",
57
- "typescript": "^4.3.5",
58
- "vite": "^4.0.0",
59
- "vitest": "0.29.2",
50
+ "@vitest/ui": "^0.34.3",
51
+ "happy-dom": "^9.1.9",
52
+ "husky": "^8.0.3",
53
+ "lint-staged": "^13.2.3",
54
+ "prettier": "^3.0.2",
55
+ "rollup-plugin-postcss-lit": "^2.1.0",
56
+ "sass": "^1.64.2",
57
+ "typescript": "^5.1.6",
58
+ "vite": "^4.4.9",
59
+ "vitest": "0.34.1",
60
60
  "wait-for-expect": "^3.0.2"
61
61
  },
62
- "engines": {
63
- "node": "^16",
64
- "pnpm": "^7.8.0"
65
- },
66
62
  "lint-staged": {
67
63
  "src/**/*.{js,jsx,ts,tsx,json,css,scss,md,html}": "prettier --write"
68
64
  },
69
65
  "stackblitz": {
70
66
  "startCommand": "npm run test:ui"
71
- }
67
+ },
68
+ "packageManager": "pnpm@7.13.4"
72
69
  }
@@ -1,9 +1,9 @@
1
1
  import { LitElement, TemplateResult } from "lit";
2
- declare type Address = {
2
+ type Address = {
3
3
  LPI: any;
4
4
  };
5
- declare type ArrowStyleEnum = "default" | "light";
6
- declare type LabelStyleEnum = "responsive" | "static";
5
+ type ArrowStyleEnum = "default" | "light";
6
+ type LabelStyleEnum = "responsive" | "static";
7
7
  export declare class AddressAutocomplete extends LitElement {
8
8
  static styles: import("lit").CSSResult;
9
9
  id: string;
@@ -1,10 +1,10 @@
1
1
  import { Draw, Modify, Snap } from "ol/interaction";
2
2
  import { Vector as VectorLayer } from "ol/layer";
3
3
  import { Vector as VectorSource } from "ol/source";
4
- export declare type DrawTypeEnum = "Polygon" | "Point";
5
- export declare type DrawPointerEnum = "crosshair" | "dot";
4
+ export type DrawTypeEnum = "Polygon" | "Point";
5
+ export type DrawPointerEnum = "crosshair" | "dot";
6
6
  export declare const drawingSource: VectorSource<import("ol/geom/Geometry").default>;
7
- export declare function configureDrawingLayer(drawType: DrawTypeEnum, pointColor: string): VectorLayer<VectorSource<import("ol/geom/Geometry").default>>;
8
- export declare function configureDraw(drawType: DrawTypeEnum, pointerStyle: DrawPointerEnum, pointColor: string): Draw;
7
+ export declare function configureDrawingLayer(drawType: DrawTypeEnum, pointColor: string, drawColor: string, drawFillColor: string): VectorLayer<VectorSource<import("ol/geom/Geometry").default>>;
8
+ export declare function configureDraw(drawType: DrawTypeEnum, pointerStyle: DrawPointerEnum, pointColor: string, drawColor: string, drawFillColor: string): Draw;
9
9
  export declare const snap: Snap;
10
- export declare function configureModify(pointerStyle: DrawPointerEnum): Modify;
10
+ export declare function configureModify(pointerStyle: DrawPointerEnum, drawColor: string): Modify;
@@ -3,8 +3,8 @@ import Map from "ol/Map";
3
3
  import { DrawPointerEnum, DrawTypeEnum } from "./drawing";
4
4
  import { ProjectionEnum } from "./projections";
5
5
  import { AreaUnitEnum } from "./utils";
6
- declare type MarkerImageEnum = "circle" | "pin";
7
- declare type ResetControlImageEnum = "unicode" | "trash";
6
+ type MarkerImageEnum = "circle" | "pin";
7
+ type ResetControlImageEnum = "unicode" | "trash";
8
8
  export declare class MyMap extends LitElement {
9
9
  static styles: import("lit").CSSResult;
10
10
  id: string;
@@ -25,6 +25,8 @@ export declare class MyMap extends LitElement {
25
25
  drawPointer: DrawPointerEnum;
26
26
  showFeaturesAtPoint: boolean;
27
27
  clickFeatures: boolean;
28
+ drawColor: string;
29
+ drawFillColor: string;
28
30
  featureColor: string;
29
31
  featureFill: boolean;
30
32
  featureBorderNone: boolean;
@@ -54,6 +56,12 @@ export declare class MyMap extends LitElement {
54
56
  useScaleBarStyle: boolean;
55
57
  showNorthArrow: boolean;
56
58
  showPrint: boolean;
59
+ clipGeojsonData: {
60
+ type: string;
61
+ geometry: {
62
+ coordinates: never[];
63
+ };
64
+ };
57
65
  map?: Map;
58
66
  constructor();
59
67
  firstUpdated(): void;
@@ -1,3 +1,3 @@
1
1
  import { Projection } from "ol/proj";
2
- export declare type ProjectionEnum = "EPSG:4326" | "EPSG:3857" | "EPSG:27700";
2
+ export type ProjectionEnum = "EPSG:4326" | "EPSG:3857" | "EPSG:27700";
3
3
  export declare const proj27700: Projection | null;
@@ -5,7 +5,7 @@ import Map from "ol/Map";
5
5
  import { Vector } from "ol/source";
6
6
  import VectorSource from "ol/source/Vector";
7
7
  import { ProjectionEnum } from "./projections";
8
- export declare type AreaUnitEnum = "m2" | "ha";
8
+ export type AreaUnitEnum = "m2" | "ha";
9
9
  /**
10
10
  * Calculate & format the area of a polygon
11
11
  * @param polygon
@@ -1,4 +1,4 @@
1
- declare type OSServices = "xyz" | "vectorTile" | "vectorTileStyle" | "places" | "features";
1
+ type OSServices = "xyz" | "vectorTile" | "vectorTileStyle" | "places" | "features";
2
2
  interface ServiceOptions {
3
3
  service: OSServices;
4
4
  apiKey: string;