@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/README.md +5 -3
- package/dist/component-lib.es.js +1 -1
- package/dist/component-lib.umd.js +233 -194
- package/dist/index-aQ20bCrP.mjs +61036 -0
- package/dist/{index.es-DjHXgkDI.mjs → index.es-DXLK9lmo.mjs} +1134 -1116
- package/dist/index.html +2 -1
- package/dist/map.css +1 -1
- package/dist/purify.es-_9WAe1aK.mjs +830 -0
- package/package.json +27 -30
- package/types/components/address-autocomplete/main.test.d.ts +0 -5
- package/types/components/geocode-autocomplete/main.test.d.ts +0 -5
- package/types/components/my-map/drawing.d.ts +8 -2
- package/types/components/my-map/index.d.ts +7 -8
- package/types/components/my-map/layers.test.d.ts +0 -9
- package/types/components/my-map/main.test.d.ts +0 -5
- package/types/components/my-map/os-features.d.ts +8 -2
- package/types/components/my-map/snapping.d.ts +10 -3
- package/types/components/postcode-search/main.test.d.ts +0 -5
- package/types/test-utils.d.ts +1 -0
- package/dist/index-PCyWSA0Z.mjs +0 -58825
- package/dist/purify.es-DHbHSKL1.mjs +0 -528
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensystemslab/map",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
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
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"storybook": "storybook dev -p 7007",
|
|
26
|
+
"storybook:build": "storybook build -o storybook-static"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@turf/helpers": "^7.
|
|
30
|
-
"@turf/union": "^7.
|
|
31
|
-
"@types/geojson": "^7946.0.
|
|
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": "^
|
|
35
|
-
"jspdf": "^4.
|
|
36
|
-
"lit": "^3.
|
|
37
|
-
"ol": "^10.
|
|
38
|
-
"ol-ext": "^4.0.
|
|
39
|
-
"ol-mapbox-style": "^
|
|
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.
|
|
42
|
-
"rambda": "^
|
|
41
|
+
"proj4": "^2.20.8",
|
|
42
|
+
"rambda": "^11.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
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": "
|
|
50
|
+
"@types/node": "~25.6.0",
|
|
50
51
|
"@types/ol-ext": "npm:@siedlerchr/types-ol-ext@^3.6.3",
|
|
51
|
-
"@
|
|
52
|
-
"
|
|
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.
|
|
56
|
+
"prettier": "^3.8.3",
|
|
57
57
|
"rollup-plugin-postcss-lit": "^2.2.0",
|
|
58
|
-
"sass": "^1.
|
|
58
|
+
"sass": "^1.99.0",
|
|
59
|
+
"storybook": "^10.4.4",
|
|
59
60
|
"typescript": "^5.8.3",
|
|
60
|
-
"vite": "^6.4.
|
|
61
|
-
"vitest": "3.
|
|
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@
|
|
71
|
-
"
|
|
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
|
}
|
|
@@ -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
|
-
|
|
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,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
|
-
|
|
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
|
-
|
|
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:
|
|
21
|
+
export declare function getSnapPointsFromVectorTiles(basemap: VectorTileLayer, extent: Extent): void;
|
package/types/test-utils.d.ts
CHANGED
|
@@ -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>;
|