@opensystemslab/map 1.0.0-alpha.11 → 1.0.0-alpha.13

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensystemslab/map",
3
- "version": "1.0.0-alpha.11",
3
+ "version": "1.0.0-alpha.13",
4
4
  "license": "MPL-2.0",
5
5
  "private": false,
6
6
  "repository": {
@@ -22,43 +22,44 @@
22
22
  "prepare": "husky install",
23
23
  "test": "vitest",
24
24
  "test:ui": "vitest --ui",
25
- "docs": "NODE_ENV=development pitsby build --watch --port=7007",
26
- "docsPublish": "pitsby build"
25
+ "storybook": "storybook dev -p 7007",
26
+ "storybook:build": "storybook build -o storybook-static"
27
27
  },
28
28
  "dependencies": {
29
- "@turf/helpers": "^7.2.0",
30
- "@turf/union": "^7.1.0",
31
- "@types/geojson": "^7946.0.14",
29
+ "@turf/helpers": "^7.3.4",
30
+ "@turf/union": "^7.3.4",
31
+ "@types/geojson": "^7946.0.16",
32
32
  "accessible-autocomplete": "^3.0.1",
33
33
  "file-saver": "^2.0.5",
34
- "govuk-frontend": "^5.11.0",
35
- "jspdf": "^4.0.0",
36
- "lit": "^3.0.1",
37
- "ol": "^10.6.1",
38
- "ol-ext": "^4.0.33",
39
- "ol-mapbox-style": "^12.6.0",
34
+ "govuk-frontend": "^6.1.0",
35
+ "jspdf": "^4.2.1",
36
+ "lit": "^3.3.2",
37
+ "ol": "^10.9.0",
38
+ "ol-ext": "^4.0.38",
39
+ "ol-mapbox-style": "^13.4.1",
40
40
  "postcode": "^5.1.0",
41
- "proj4": "^2.19.5",
42
- "rambda": "^10.3.2"
41
+ "proj4": "^2.20.8",
42
+ "rambda": "^11.2.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@glorious/pitsby": "^1.37.2",
46
- "@testing-library/dom": "^10.4.0",
45
+ "@storybook/addon-docs": "^10.4.5",
46
+ "@storybook/web-components-vite": "^10.4.5",
47
+ "@testing-library/dom": "^10.4.1",
47
48
  "@testing-library/user-event": "^14.6.1",
48
49
  "@types/file-saver": "^2.0.7",
49
- "@types/node": "22.0.3",
50
+ "@types/node": "~25.6.0",
50
51
  "@types/ol-ext": "npm:@siedlerchr/types-ol-ext@^3.6.3",
51
- "@types/proj4": "^2.5.6",
52
- "@vitest/ui": "^3.0.7",
53
- "happy-dom": "^9.1.9",
52
+ "@vitest/ui": "^3.2.4",
53
+ "happy-dom": "^20.9.0",
54
54
  "husky": "^8.0.3",
55
55
  "lint-staged": "^15.5.2",
56
- "prettier": "^3.6.2",
56
+ "prettier": "^3.8.3",
57
57
  "rollup-plugin-postcss-lit": "^2.2.0",
58
- "sass": "^1.89.2",
58
+ "sass": "^1.99.0",
59
+ "storybook": "^10.4.4",
59
60
  "typescript": "^5.8.3",
60
- "vite": "^6.4.1",
61
- "vitest": "3.0.7",
61
+ "vite": "^6.4.3",
62
+ "vitest": "3.2.6",
62
63
  "wait-for-expect": "^3.0.2"
63
64
  },
64
65
  "lint-staged": {
@@ -67,10 +68,6 @@
67
68
  "stackblitz": {
68
69
  "startCommand": "npm run test:ui"
69
70
  },
70
- "packageManager": "pnpm@8.6.6",
71
- "pnpm": {
72
- "overrides": {
73
- "braces@<3.0.3": ">=3.0.3"
74
- }
75
- }
71
+ "packageManager": "pnpm@10.30.2",
72
+ "customElements": "custom-elements.json"
76
73
  }
@@ -1,6 +1 @@
1
- import type { IWindow } from "happy-dom";
2
1
  import "./index";
3
- declare global {
4
- interface Window extends IWindow {
5
- }
6
- }
@@ -1,6 +1 @@
1
- import type { IWindow } from "happy-dom";
2
1
  import "./index";
3
- declare global {
4
- interface Window extends IWindow {
5
- }
6
- }
@@ -4,8 +4,14 @@ import { Vector as VectorLayer } from "ol/layer";
4
4
  import { Vector as VectorSource } from "ol/source";
5
5
  export type DrawTypeEnum = Extract<Type, "Polygon" | "Point" | "Circle">;
6
6
  export type DrawPointerEnum = "crosshair" | "dot";
7
- export declare const drawingSource: VectorSource<import("ol/Feature").default<import("ol/geom").Geometry>>;
8
- export declare function configureDrawingLayer(drawType: DrawTypeEnum, drawColor: string, drawMany: boolean, hideDrawLabels: boolean): VectorLayer<VectorSource<import("ol/Feature").default<import("ol/geom").Geometry>>, import("ol/Feature").default<import("ol/geom").Geometry>>;
7
+ export declare const drawingSource: VectorSource<import("ol/Feature").default<import("ol/geom").Geometry, {
8
+ [x: string]: any;
9
+ }>>;
10
+ export declare function configureDrawingLayer(drawType: DrawTypeEnum, drawColor: string, drawMany: boolean, hideDrawLabels: boolean): VectorLayer<VectorSource<import("ol/Feature").default<import("ol/geom").Geometry, {
11
+ [x: string]: any;
12
+ }>>, import("ol/Feature").default<import("ol/geom").Geometry, {
13
+ [x: string]: any;
14
+ }>>;
9
15
  export declare function configureDraw(drawType: DrawTypeEnum, drawPointer: DrawPointerEnum, drawColor: string): Draw;
10
16
  export declare const snap: Snap;
11
17
  export declare function configureModify(drawPointer: DrawPointerEnum, drawColor: string): Modify;
@@ -1,15 +1,16 @@
1
1
  import { LitElement } from "lit";
2
+ import { GeoJSONFeature, GeoJSONFeatureCollection } from "ol/format/GeoJSON";
2
3
  import Map from "ol/Map";
3
4
  import { DrawPointerEnum, DrawTypeEnum } from "./drawing";
4
5
  import { BasemapEnum } from "./layers";
5
6
  import { ProjectionEnum } from "./projections";
6
7
  import { AreaUnitEnum } from "./utils";
7
- import { GeoJSONFeatureCollection } from "ol/format/GeoJSON";
8
8
  type MarkerImageEnum = "circle" | "pin";
9
9
  type ResetControlImageEnum = "unicode" | "trash";
10
10
  export declare class MyMap extends LitElement {
11
11
  static styles: import("lit").CSSResult;
12
12
  id: string;
13
+ showOSSearch: boolean;
13
14
  dataTestId: string;
14
15
  latitude: number;
15
16
  longitude: number;
@@ -92,16 +93,14 @@ export declare class MyMap extends LitElement {
92
93
  showNorthArrow: boolean;
93
94
  showPrint: boolean;
94
95
  collapseAttributions: boolean;
95
- clipGeojsonData: {
96
- type: string;
97
- geometry: {
98
- coordinates: never[];
99
- };
100
- };
96
+ clipGeojsonData: GeoJSONFeature | undefined;
101
97
  ariaLabelOlFixedOverlay: string;
98
+ private _showSearch;
99
+ private _searchError;
102
100
  map?: Map;
103
101
  constructor();
104
- firstUpdated(): void;
102
+ firstUpdated(): Promise<void>;
103
+ _showSearchError(): void;
105
104
  render(): import("lit").TemplateResult<1>;
106
105
  disconnectedCallback(): void;
107
106
  /**
@@ -1,10 +1 @@
1
1
  import "./index";
2
- import type { IWindow } from "happy-dom";
3
- declare global {
4
- interface Window extends IWindow {
5
- }
6
- }
7
- declare global {
8
- interface Window extends IWindow {
9
- }
10
- }
@@ -1,6 +1 @@
1
- import type { IWindow } from "happy-dom";
2
1
  import "./index";
3
- declare global {
4
- interface Window extends IWindow {
5
- }
6
- }
@@ -1,7 +1,13 @@
1
1
  import { Vector as VectorLayer } from "ol/layer";
2
2
  import { Vector as VectorSource } from "ol/source";
3
- export declare const outlineSource: VectorSource<import("ol").Feature<import("ol/geom").Geometry>>;
4
- export declare function makeFeatureLayer(color: string, featureFill: boolean): VectorLayer<VectorSource<import("ol").Feature<import("ol/geom").Geometry>>, import("ol").Feature<import("ol/geom").Geometry>>;
3
+ export declare const outlineSource: VectorSource<import("ol").Feature<import("ol/geom").Geometry, {
4
+ [x: string]: any;
5
+ }>>;
6
+ export declare function makeFeatureLayer(color: string, featureFill: boolean): VectorLayer<VectorSource<import("ol").Feature<import("ol/geom").Geometry, {
7
+ [x: string]: any;
8
+ }>>, import("ol").Feature<import("ol/geom").Geometry, {
9
+ [x: string]: any;
10
+ }>>;
5
11
  /**
6
12
  * Create an OGC XML filter parameter value which will select the TopographicArea
7
13
  * features containing the coordinates of the provided point
@@ -1,14 +1,21 @@
1
1
  import { Feature } from "ol";
2
+ import { Extent } from "ol/extent";
2
3
  import { Geometry } from "ol/geom";
3
4
  import { Vector as VectorLayer } from "ol/layer";
4
5
  import VectorTileLayer from "ol/layer/VectorTile";
5
6
  import VectorSource from "ol/source/Vector";
6
- export declare const pointsSource: VectorSource<Feature<Geometry>>;
7
- export declare const pointsLayer: VectorLayer<VectorSource<Feature<Geometry>>, Feature<Geometry>>;
7
+ export declare const pointsSource: VectorSource<Feature<Geometry, {
8
+ [x: string]: any;
9
+ }>>;
10
+ export declare const pointsLayer: VectorLayer<VectorSource<Feature<Geometry, {
11
+ [x: string]: any;
12
+ }>>, Feature<Geometry, {
13
+ [x: string]: any;
14
+ }>>;
8
15
  /**
9
16
  * Extract points that are available to snap to when a VectorTileLayer basemap is displayed
10
17
  * @param basemap - a VectorTileLayer
11
18
  * @param extent - an array of 4 points
12
19
  * @returns - a VectorSource populated with points within the extent
13
20
  */
14
- export declare function getSnapPointsFromVectorTiles(basemap: VectorTileLayer, extent: number[]): void;
21
+ export declare function getSnapPointsFromVectorTiles(basemap: VectorTileLayer, extent: Extent): void;
@@ -1,6 +1 @@
1
- import type { IWindow } from "happy-dom";
2
1
  import "./index";
3
- declare global {
4
- interface Window extends IWindow {
5
- }
6
- }
@@ -1,3 +1,4 @@
1
1
  export declare function getShadowRoot(customEl: string): ShadowRoot | null | undefined;
2
2
  export declare function getShadowRootEl(customEl: string, el: string): Element | null | undefined;
3
+ export declare function waitForElement(customEl: string): Promise<void>;
3
4
  export declare function setupMap(mapElement: any): Promise<void>;