From e8392535f07054ea9715b17ab4edef48131bb4d3 Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 23 Oct 2026 11:34:31 +0100 Subject: [PATCH 1/4] Refactor map configuration to use getDefaultConfig function and update dataset plugin initialization --- src/client/javascripts/geospatial-map.js | 6 +++--- src/client/javascripts/location-map.js | 8 +++++--- src/client/javascripts/map.js | 13 +++++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/client/javascripts/geospatial-map.js b/src/client/javascripts/geospatial-map.js index b85d1a16b..2a7eed7b6 100644 --- a/src/client/javascripts/geospatial-map.js +++ b/src/client/javascripts/geospatial-map.js @@ -12,9 +12,9 @@ import { import { EVENTS, createMap, - defaultConfig, getCentroidGridRef, getCoordinateGridRef, + getDefaultConfig, getMapCountryLayers, getMapLayers } from '~/src/client/javascripts/map.js' @@ -219,11 +219,11 @@ export function processGeospatial(config, geospatial, index) { // Create a map dataset plugin if there are any present if (datasets.length) { - plugins.push(createDatasetsPlugin({ datasets })) + plugins.push(createDatasetsPlugin({ id: `datasets_${mapId}`, datasets })) } const initConfig = { - ...defaultConfig, + ...getDefaultConfig(), bounds, plugins } diff --git a/src/client/javascripts/location-map.js b/src/client/javascripts/location-map.js index 0996fd6f5..9886d3879 100644 --- a/src/client/javascripts/location-map.js +++ b/src/client/javascripts/location-map.js @@ -10,8 +10,8 @@ import { EVENTS, centerMap, createMap, - defaultConfig, eastingNorthingToLatLong, + getDefaultConfig, getMapCountryLayers, getMapLayers, latLongToEastingNorthing, @@ -446,7 +446,7 @@ export function processLocation(config, location, index) { mapContainer.setAttribute('id', mapId) mapContainer.setAttribute('class', 'map-container') - const initConfig = getInitMapConfig(location) ?? defaultConfig + const initConfig = getInitMapConfig(location) ?? getDefaultConfig() locationInputs.after(mapContainer) @@ -460,7 +460,9 @@ export function processLocation(config, location, index) { // Create a map dataset plugin if there are any present if (datasets.length) { - initConfig.plugins = [createDatasetsPlugin({ datasets })] + initConfig.plugins = [ + createDatasetsPlugin({ id: `datasets_${mapId}`, datasets }) + ] } const lang = /** @type {LanguageCode} */ ( diff --git a/src/client/javascripts/map.js b/src/client/javascripts/map.js index 98d9fefca..3fd43006e 100644 --- a/src/client/javascripts/map.js +++ b/src/client/javascripts/map.js @@ -122,10 +122,15 @@ export function getCentroidGridRef(feature) { } } -/** @type {InteractiveMapInitConfig} */ -export const defaultConfig = { - zoom: '6', - center: [DEFAULT_LONG, DEFAULT_LAT] +/** + * Get the default config for a map + * @returns {InteractiveMapInitConfig} + */ +export const getDefaultConfig = () => { + return { + zoom: '6', + center: [DEFAULT_LONG, DEFAULT_LAT] + } } export const EVENTS = { From cfab77607a51b5e369e3c9ee875e88c4c2bdd7e9 Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 23 Oct 2026 16:34:42 +0100 Subject: [PATCH 2/4] chore: update interactive-map dependency and refactor map integration - Updated @defra/interactive-map from 0.0.33-alpha to ^0.0.56-alpha in package.json. - Changed import for createDrawPlugin from draw-ml to draw in geospatial-map.js and map.test.js. - Added workerPath configuration for maplibre-gl worker in map.js. - Updated map creation logic to include workerPath in createMap function. - Added ignoreWarnings for maplibre-gl in webpack.config.js to suppress critical dependency warnings. --- package-lock.json | 407 ++++++++++++----------- package.json | 2 +- src/client/javascripts/geospatial-map.js | 2 +- src/client/javascripts/map.js | 14 +- test/client/javascripts/map.test.js | 2 +- webpack.config.js | 6 + 6 files changed, 226 insertions(+), 207 deletions(-) diff --git a/package-lock.json b/package-lock.json index eaae5bd67..36c4ca79d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "dependencies": { "@defra/forms-model": "^4.0.0", "@defra/hapi-tracing": "^1.29.0", - "@defra/interactive-map": "0.0.33-alpha", + "@defra/interactive-map": "^0.0.56-alpha", "@elastic/ecs-pino-format": "^1.5.0", "@hapi/boom": "^10.0.1", "@hapi/bourne": "^3.0.0", @@ -3727,9 +3727,9 @@ } }, "node_modules/@defra/interactive-map": { - "version": "0.0.33-alpha", - "resolved": "https://registry.npmjs.org/@defra/interactive-map/-/interactive-map-0.0.33-alpha.tgz", - "integrity": "sha512-ooeuXBJnYCoFFoNhZAef5YZkDSU3wxISc6+hgNDVf64+VxcOBXGxNMPHkzNXwTYJHTiAW81q02bdnSGc9SkbRA==", + "version": "0.0.56-alpha", + "resolved": "https://registry.npmjs.org/@defra/interactive-map/-/interactive-map-0.0.56-alpha.tgz", + "integrity": "sha512-+mFxYJU3gAV44oZfV5dZ8T2yvQAv3OhLGj/UWPRXWvifF4Q9Ffshc67OpdjRMPGdTSR80/ZaAeKSc30W1drmTQ==", "dependencies": { "@babel/runtime": "^7.28.6", "@turf/area": "^7.2.0", @@ -3739,19 +3739,17 @@ "@turf/boolean-valid": "^7.2.0", "@turf/destination": "^7.3.3", "@turf/helpers": "^7.2.0", - "@turf/line-intersect": "^7.3.3", - "@turf/point-to-line-distance": "^7.3.3", - "@turf/polygon-to-line": "^7.3.3", + "@turf/union": "^7.3.5", "accessible-autocomplete": "^3.0.1", "govuk-frontend": "^5.13.0", - "maplibre-gl": "^5.23.0", + "maplibre-gl": "^6.14.0", "polygon-splitter": "^0.0.11", "preact": "^10.27.2", "tslib": "^2.8.1" }, "peerDependencies": { "@arcgis/core": "^5.0.9", - "ol": "^10.9.0", + "ol": "^10.10.0", "proj4": "^2.20.8" }, "peerDependenciesMeta": { @@ -3766,6 +3764,87 @@ } } }, + "node_modules/@defra/interactive-map/node_modules/@mapbox/unitbezier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-1.0.0.tgz", + "integrity": "sha512-fqd515fjBmANKGGsQ286E2Wvj/XvDFpGzwJxq4CI6jMQue6Oy04uCKp+JWKF00xRTmk6cEu1jPJ9p3xqH8YWqQ==", + "license": "BSD-2-Clause" + }, + "node_modules/@defra/interactive-map/node_modules/@mapbox/vector-tile": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-3.0.0.tgz", + "integrity": "sha512-Qf10S1uIHMk20ri/IVBnpS+esUEkVaR5Hftmz88jTInrpmWgPGJfPe3LVjjlE77trLx8tH6qjTG7uWH9hIq/0Q==", + "license": "BSD-3-Clause", + "dependencies": { + "@mapbox/point-geometry": "~1.1.0", + "@types/geojson": "^7946.0.16", + "pbf": "^5.0.0" + } + }, + "node_modules/@defra/interactive-map/node_modules/@maplibre/maplibre-gl-style-spec": { + "version": "26.4.4", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-26.4.4.tgz", + "integrity": "sha512-hG4RZR4PBd/+6A3ODdZ3AnQRF106ZQk1y3bhwDg8bH/A4Oz2tnRUJVVWs9BZa6gXZ1d3UKe89C+Mm+olGBELvA==", + "license": "ISC", + "dependencies": { + "@mapbox/jsonlint-lines-primitives": "^2.0.3", + "@mapbox/unitbezier": "^1.0.0", + "json-stringify-pretty-compact": "^4.0.0", + "minimist": "^1.2.8", + "quickselect": "^3.0.0", + "tinyqueue": "^3.0.0" + }, + "bin": { + "gl-style-format": "dist/gl-style-format.mjs", + "gl-style-migrate": "dist/gl-style-migrate.mjs", + "gl-style-validate": "dist/gl-style-validate.mjs" + } + }, + "node_modules/@defra/interactive-map/node_modules/maplibre-gl": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-6.15.0.tgz", + "integrity": "sha512-kxFetbvUHDOVaAP1CYb226Mdk2QhzIPddqM0xJTFD35wu78Mpd6NM7+H68ALjc6Oa0kAOX5EAdMKyvD2u3qfcg==", + "license": "BSD-3-Clause", + "dependencies": { + "@mapbox/point-geometry": "^1.1.0", + "@mapbox/tiny-sdf": "^2.3.0", + "@mapbox/unitbezier": "^1.0.0", + "@mapbox/vector-tile": "^3.0.0", + "@maplibre/geojson-vt": "^6.3.0", + "@maplibre/maplibre-gl-style-spec": "^26.4.4", + "@maplibre/mlt": "^1.3.0", + "@maplibre/vt-pbf": "^4.3.2", + "@types/geojson": "^7946.0.16", + "bidi-js": "^1.1.0", + "earcut": "^3.2.4", + "gl-matrix": "^3.4.4", + "kdbush": "^4.1.0", + "murmurhash-js": "^1.0.0", + "pbf": "^5.1.2", + "potpack": "^2.1.0", + "quickselect": "^3.0.0", + "tinyqueue": "^3.0.0" + }, + "engines": { + "node": ">=16.14.0", + "npm": ">=8.1.0" + }, + "funding": { + "url": "https://github.com/maplibre/maplibre-gl-js?sponsor=1" + } + }, + "node_modules/@defra/interactive-map/node_modules/pbf": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-5.1.2.tgz", + "integrity": "sha512-mnvGdvOrIvJOBGUEdGkrVXjN8E/VkIJCkf2eS1DH2yv82ORUlLttmDt0rWY38yYZmVwciZwBUvHM20qxBZf40w==", + "license": "BSD-3-Clause", + "dependencies": { + "resolve-protobuf-schema": "^2.1.0" + }, + "bin": { + "pbf": "bin/pbf" + } + }, "node_modules/@defra/interactive-map/node_modules/preact": { "version": "10.28.4", "resolved": "https://registry.npmjs.org/preact/-/preact-10.28.4.tgz", @@ -7665,11 +7744,12 @@ "license": "MIT" }, "node_modules/@mapbox/jsonlint-lines-primitives": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", - "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.3.tgz", + "integrity": "sha512-0SElaV0uMxEnxzBhhX9WTuPyUeMsAN/SS0i16tjuba4/mio63MG9khjC1a0JAiPGXAwvwm4UfHJURCN7nyudQg==", + "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 22" } }, "node_modules/@mapbox/point-geometry": { @@ -7679,9 +7759,9 @@ "license": "ISC" }, "node_modules/@mapbox/tiny-sdf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.1.0.tgz", - "integrity": "sha512-uFJhNh36BR4OCuWIEiWaEix9CA2WzT6CAIcqVjWYpnx8+QDtS+oC4QehRrx5cX4mgWs37MmKnwUejeHxVymzNg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.3.0.tgz", + "integrity": "sha512-gBvcNDBBB66bgQYvnaJ6Jk+VCaMmVq5+IZR2kWPisT88Z8s0kBQt6hfVi8QgRW8Vpg0UWZzBA4ZSyzHHC+VeRA==", "license": "BSD-2-Clause" }, "node_modules/@mapbox/unitbezier": { @@ -7711,12 +7791,12 @@ } }, "node_modules/@maplibre/geojson-vt": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-6.1.0.tgz", - "integrity": "sha512-2eIY4gZxeKIVOZVNkAMb+5NgXhgsMQpOveTQAvnp53LYqHGJZDidk7Ew0Tged9PThidpbS+NFTh0g4zivhPDzQ==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-6.3.0.tgz", + "integrity": "sha512-3Zw2jsU9pIJG3G2CQFbLjWj2MlAHodhD7cSY+15iywUuLmmkgzcKRnueVRZ4AcC/5wOtfhidcJAAzBpoBNs3Xg==", "license": "ISC", "dependencies": { - "kdbush": "^4.0.2" + "kdbush": "^4.1.0" } }, "node_modules/@maplibre/maplibre-gl-style-spec": { @@ -7740,34 +7820,36 @@ } }, "node_modules/@maplibre/mlt": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/@maplibre/mlt/-/mlt-1.1.8.tgz", - "integrity": "sha512-8vtfYGidr1rNkv5IwIoU2lfe3Oy+Wa8HluzQYcQi9cveU9K3pweAal/poQj4GJ0K/EW4bTQp2wVAs09g2yDRZg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@maplibre/mlt/-/mlt-1.3.0.tgz", + "integrity": "sha512-7M2O7ABM80Oi8XPkfkrjKB8mOBIxGoVgkA52Mu4RMWoBvvMdagQ522+WxVYujZsMpqIr3BpzrTbXrm4k8lCzCQ==", "license": "(MIT OR Apache-2.0)", "dependencies": { "@mapbox/point-geometry": "^1.1.0" } }, "node_modules/@maplibre/vt-pbf": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@maplibre/vt-pbf/-/vt-pbf-4.3.0.tgz", - "integrity": "sha512-jIvp8F5hQCcreqOOpEt42TJMUlsrEcpf/kI1T2v85YrQRV6PPXUcEXUg5karKtH6oh47XJZ4kHu56pUkOuqA7w==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@maplibre/vt-pbf/-/vt-pbf-4.3.2.tgz", + "integrity": "sha512-j6p0AdjvAR19Z3XaCysle7A4ZSo08tYOzxD0Y9NQylwPAkwJJeYub5b2eVucdeDh7erhv69DahoLOevDRERRUw==", "license": "MIT", "dependencies": { "@mapbox/point-geometry": "^1.1.0", - "@mapbox/vector-tile": "^2.0.4", - "@maplibre/geojson-vt": "^5.0.4", "@types/geojson": "^7946.0.16", - "@types/supercluster": "^7.1.3", - "pbf": "^4.0.1", - "supercluster": "^8.0.1" + "pbf": "^5.1.0" } }, - "node_modules/@maplibre/vt-pbf/node_modules/@maplibre/geojson-vt": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-5.0.4.tgz", - "integrity": "sha512-KGg9sma45S+stfH9vPCJk1J0lSDLWZgCT9Y8u8qWZJyjFlP8MNP1WGTxIMYJZjDvVT3PDn05kN1C95Sut1HpgQ==", - "license": "ISC" + "node_modules/@maplibre/vt-pbf/node_modules/pbf": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-5.1.2.tgz", + "integrity": "sha512-mnvGdvOrIvJOBGUEdGkrVXjN8E/VkIJCkf2eS1DH2yv82ORUlLttmDt0rWY38yYZmVwciZwBUvHM20qxBZf40w==", + "license": "BSD-3-Clause", + "dependencies": { + "resolve-protobuf-schema": "^2.1.0" + }, + "bin": { + "pbf": "bin/pbf" + } }, "node_modules/@mdx-js/mdx": { "version": "3.1.1", @@ -10373,13 +10455,13 @@ } }, "node_modules/@turf/bearing": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-7.3.4.tgz", - "integrity": "sha512-zvFjapyFaOrM8nBtAND7f4yb0BJV0jyj6cyoXyTYqLY+3Hn0eHgL0M8lwxDLbTom5KfqYDHDVDQC3+VSfypoEA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-7.4.0.tgz", + "integrity": "sha512-utMyjTU5U3QfHWLRIKUAvJerCMmC6NLI7X6cmL6PA5+KYdzul/ymxL6CQrwJugrf9zt4Hnzvipwz0j5H1Yo87w==", "license": "MIT", "dependencies": { - "@turf/helpers": "7.3.4", - "@turf/invariant": "7.3.4", + "@turf/helpers": "7.4.0", + "@turf/invariant": "7.4.0", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" }, @@ -10388,11 +10470,25 @@ } }, "node_modules/@turf/bearing/node_modules/@turf/helpers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.3.4.tgz", - "integrity": "sha512-U/S5qyqgx3WTvg4twaH0WxF3EixoTCfDsmk98g1E3/5e2YKp7JKYZdz0vivsS5/UZLJeZDEElOSFH4pUgp+l7g==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.4.0.tgz", + "integrity": "sha512-7PAwLZqOdRzTI5g9bHvUwlloAXPDH/mlajtryk0tw4ZwGMtmXsAyF4QundsAMfy4u48Fyd3AUqMXY0SMxqJGWg==", + "license": "MIT", + "dependencies": { + "@types/geojson": "^7946.0.10", + "tslib": "^2.8.1" + }, + "funding": { + "url": "https://opencollective.com/turf" + } + }, + "node_modules/@turf/bearing/node_modules/@turf/invariant": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-7.4.0.tgz", + "integrity": "sha512-OAsc3qdNx+tRqzWmMNFMnVlWWACIqnYqIejZKvb2oKkKPYJJrURPXZ6OdrGD58ljJMolLoqwIZGSx3VndaEjxg==", "license": "MIT", "dependencies": { + "@turf/helpers": "7.4.0", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" }, @@ -10835,33 +10931,6 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/clone": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-7.3.4.tgz", - "integrity": "sha512-pwQ+RyQw986uu7IulY/18NRAebwZZScb084bvVqVkTrllwLSv4oVBqUxmUMiwtp+PNdiRGRFOvNyZqtRsiD+Jw==", - "license": "MIT", - "dependencies": { - "@turf/helpers": "7.3.4", - "@types/geojson": "^7946.0.10", - "tslib": "^2.8.1" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/clone/node_modules/@turf/helpers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.3.4.tgz", - "integrity": "sha512-U/S5qyqgx3WTvg4twaH0WxF3EixoTCfDsmk98g1E3/5e2YKp7JKYZdz0vivsS5/UZLJeZDEElOSFH4pUgp+l7g==", - "license": "MIT", - "dependencies": { - "@types/geojson": "^7946.0.10", - "tslib": "^2.8.1" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/destination": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-7.3.4.tgz", @@ -11281,41 +11350,6 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/point-to-line-distance": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/point-to-line-distance/-/point-to-line-distance-7.3.4.tgz", - "integrity": "sha512-IdPAxlAQZj7FCZg+ObyVHlNdqwLL/oxYoQjpxMNJ511gNxokCtEv0aeRZQjYOYIxr9Ss97v3yo3ILJaF9V2kPw==", - "license": "MIT", - "dependencies": { - "@turf/bearing": "7.3.4", - "@turf/distance": "7.3.4", - "@turf/helpers": "7.3.4", - "@turf/invariant": "7.3.4", - "@turf/meta": "7.3.4", - "@turf/nearest-point-on-line": "7.3.4", - "@turf/projection": "7.3.4", - "@turf/rhumb-bearing": "7.3.4", - "@turf/rhumb-distance": "7.3.4", - "@types/geojson": "^7946.0.10", - "tslib": "^2.8.1" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/point-to-line-distance/node_modules/@turf/helpers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.3.4.tgz", - "integrity": "sha512-U/S5qyqgx3WTvg4twaH0WxF3EixoTCfDsmk98g1E3/5e2YKp7JKYZdz0vivsS5/UZLJeZDEElOSFH4pUgp+l7g==", - "license": "MIT", - "dependencies": { - "@types/geojson": "^7946.0.10", - "tslib": "^2.8.1" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/polygon-to-line": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/@turf/polygon-to-line/-/polygon-to-line-7.3.4.tgz", @@ -11344,35 +11378,6 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/projection": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-7.3.4.tgz", - "integrity": "sha512-p91zOaLmzoBHzU/2H6Ot1tOhTmAom85n1P7I4Oo0V9xU8hmJXWfNnomLFf/6rnkKDIFZkncLQIBz4iIecZ61sA==", - "license": "MIT", - "dependencies": { - "@turf/clone": "7.3.4", - "@turf/helpers": "7.3.4", - "@turf/meta": "7.3.4", - "@types/geojson": "^7946.0.10", - "tslib": "^2.8.1" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/projection/node_modules/@turf/helpers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.3.4.tgz", - "integrity": "sha512-U/S5qyqgx3WTvg4twaH0WxF3EixoTCfDsmk98g1E3/5e2YKp7JKYZdz0vivsS5/UZLJeZDEElOSFH4pUgp+l7g==", - "license": "MIT", - "dependencies": { - "@types/geojson": "^7946.0.10", - "tslib": "^2.8.1" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, "node_modules/@turf/rewind": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-6.5.0.tgz", @@ -11434,27 +11439,14 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/rhumb-bearing": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-7.3.4.tgz", - "integrity": "sha512-tvX1toSo80q0iL0cUMMXpSKsCCfOjRqDGCmOdR6B9shhk6xP1ZM2PLQDr+MFPBFeGyQuyY4CNFkV2+3DF49vYw==", - "license": "MIT", - "dependencies": { - "@turf/helpers": "7.3.4", - "@turf/invariant": "7.3.4", - "@types/geojson": "^7946.0.10", - "tslib": "^2.8.1" - }, - "funding": { - "url": "https://opencollective.com/turf" - } - }, - "node_modules/@turf/rhumb-bearing/node_modules/@turf/helpers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.3.4.tgz", - "integrity": "sha512-U/S5qyqgx3WTvg4twaH0WxF3EixoTCfDsmk98g1E3/5e2YKp7JKYZdz0vivsS5/UZLJeZDEElOSFH4pUgp+l7g==", + "node_modules/@turf/truncate": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-7.3.5.tgz", + "integrity": "sha512-Qx2iv3KIqKuDAUduMfaJ5fFegEWBeRve5zePalRevS16bMUqEX+jnKPK9fWGyUuPqT61qP1Kybz0PTWPbUbljQ==", "license": "MIT", "dependencies": { + "@turf/helpers": "7.3.5", + "@turf/meta": "7.3.5", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" }, @@ -11462,14 +11454,13 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/rhumb-distance": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-7.3.4.tgz", - "integrity": "sha512-phwskeijdgYMsR3qDQmytfsg2iZcp3uWK7UFc76wKTEpxozbDGFI4enX5gXvZPpyI1iD7gsktGqHsO33AjnFDA==", + "node_modules/@turf/truncate/node_modules/@turf/meta": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.3.5.tgz", + "integrity": "sha512-r+ohqxoyqeigFB0oFrQx/YEHIkOKqcKpCjvZkvZs7Tkv+IFco5MezAd2zd4rzK+0DfFgDP3KpJc7HqrYjvEjhg==", "license": "MIT", "dependencies": { - "@turf/helpers": "7.3.4", - "@turf/invariant": "7.3.4", + "@turf/helpers": "7.3.5", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" }, @@ -11477,27 +11468,28 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/rhumb-distance/node_modules/@turf/helpers": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.3.4.tgz", - "integrity": "sha512-U/S5qyqgx3WTvg4twaH0WxF3EixoTCfDsmk98g1E3/5e2YKp7JKYZdz0vivsS5/UZLJeZDEElOSFH4pUgp+l7g==", + "node_modules/@turf/union": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/union/-/union-7.4.0.tgz", + "integrity": "sha512-SYVtsCW9IznTyKlcGWxssRrf90p/hdpch1UeIcZc31pkSVdmeLOyuzPx0ef3UPmaF//fgXAphMph6JWA/FpKbA==", "license": "MIT", "dependencies": { + "@turf/helpers": "7.4.0", + "@turf/meta": "7.4.0", "@types/geojson": "^7946.0.10", + "polyclip-ts": "^0.16.8", "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/truncate": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-7.3.5.tgz", - "integrity": "sha512-Qx2iv3KIqKuDAUduMfaJ5fFegEWBeRve5zePalRevS16bMUqEX+jnKPK9fWGyUuPqT61qP1Kybz0PTWPbUbljQ==", + "node_modules/@turf/union/node_modules/@turf/helpers": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.4.0.tgz", + "integrity": "sha512-7PAwLZqOdRzTI5g9bHvUwlloAXPDH/mlajtryk0tw4ZwGMtmXsAyF4QundsAMfy4u48Fyd3AUqMXY0SMxqJGWg==", "license": "MIT", "dependencies": { - "@turf/helpers": "7.3.5", - "@turf/meta": "7.3.5", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" }, @@ -11505,13 +11497,13 @@ "url": "https://opencollective.com/turf" } }, - "node_modules/@turf/truncate/node_modules/@turf/meta": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.3.5.tgz", - "integrity": "sha512-r+ohqxoyqeigFB0oFrQx/YEHIkOKqcKpCjvZkvZs7Tkv+IFco5MezAd2zd4rzK+0DfFgDP3KpJc7HqrYjvEjhg==", + "node_modules/@turf/union/node_modules/@turf/meta": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.4.0.tgz", + "integrity": "sha512-3cLUvlEyDuSnMSzrjhaLAEiYR8xhbfWyTVQlrlEw40xL81d4KF4PqUWbjTXKpXZStdYbet2GCurl79KMypNw6g==", "license": "MIT", "dependencies": { - "@turf/helpers": "7.3.5", + "@turf/helpers": "7.4.0", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" }, @@ -12376,15 +12368,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/supercluster": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.3.tgz", - "integrity": "sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA==", - "license": "MIT", - "dependencies": { - "@types/geojson": "*" - } - }, "node_modules/@types/tough-cookie": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", @@ -14270,6 +14253,15 @@ "dev": true, "license": "MIT" }, + "node_modules/bidi-js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.1.0.tgz", + "integrity": "sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==", + "license": "MIT", + "dependencies": { + "require-from-string": "^2.0.2" + } + }, "node_modules/big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -14280,6 +14272,15 @@ "node": "*" } }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -18043,9 +18044,9 @@ "license": "MIT" }, "node_modules/earcut": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.2.tgz", - "integrity": "sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.2.4.tgz", + "integrity": "sha512-FHc6yNpnTORB0tM5kmZ03iD2mDuNakDE2lvf4Hw1XkfxtEHIGVi01B/GqUSwx+NcC1WGjidAfpTXzeALtPtfpg==", "license": "ISC" }, "node_modules/eastasianwidth": { @@ -24246,9 +24247,9 @@ } }, "node_modules/kdbush": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", - "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.1.0.tgz", + "integrity": "sha512-e9vurzrXJQrFX6ckpHP3bvj5l+9CnYzkxDNnNQ1h2QTqdWsUAJgXiKdGNcOa1EY85dU8KbQ+z/FdQdB7P+9yfQ==", "license": "ISC" }, "node_modules/keyv": { @@ -29143,6 +29144,16 @@ "robust-predicates": "^3.0.2" } }, + "node_modules/polyclip-ts": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/polyclip-ts/-/polyclip-ts-0.16.8.tgz", + "integrity": "sha512-JPtKbDRuPEuAjuTdhR62Gph7Is2BS1Szx69CFOO3g71lpJDFo78k4tFyi+qFOMVPePEzdSKkpGU3NBXPHHjvKQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.1.0", + "splaytree-ts": "^1.0.2" + } + }, "node_modules/polygon-splitter": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/polygon-splitter/-/polygon-splitter-0.0.11.tgz", @@ -32056,7 +32067,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -33754,6 +33764,12 @@ "wbuf": "^1.7.3" } }, + "node_modules/splaytree-ts": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/splaytree-ts/-/splaytree-ts-1.0.2.tgz", + "integrity": "sha512-0kGecIZNIReCSiznK3uheYB8sbstLjCZLiwcQwbmLhgHJj2gz6OnSPkVzJQCMnmEz1BQ4gPK59ylhBoEWOhGNA==", + "license": "BDS-3-Clause" + }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -34537,15 +34553,6 @@ "node": ">=8" } }, - "node_modules/supercluster": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", - "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", - "license": "ISC", - "dependencies": { - "kdbush": "^4.0.2" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", diff --git a/package.json b/package.json index 61d25e3a7..7fb90bc92 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "dependencies": { "@defra/forms-model": "^4.0.0", "@defra/hapi-tracing": "^1.29.0", - "@defra/interactive-map": "0.0.33-alpha", + "@defra/interactive-map": "^0.0.56-alpha", "@elastic/ecs-pino-format": "^1.5.0", "@hapi/boom": "^10.0.1", "@hapi/bourne": "^3.0.0", diff --git a/src/client/javascripts/geospatial-map.js b/src/client/javascripts/geospatial-map.js index 2a7eed7b6..890f24fc1 100644 --- a/src/client/javascripts/geospatial-map.js +++ b/src/client/javascripts/geospatial-map.js @@ -1,7 +1,7 @@ // @ts-expect-error - no types import createDatasetsPlugin from '@defra/interactive-map/plugins/datasets' // @ts-expect-error - no types -import createDrawPlugin from '@defra/interactive-map/plugins/draw-ml' +import createDrawPlugin from '@defra/interactive-map/plugins/draw' import { bbox } from '@turf/bbox' import { diff --git a/src/client/javascripts/map.js b/src/client/javascripts/map.js index 3fd43006e..70ced178a 100644 --- a/src/client/javascripts/map.js +++ b/src/client/javascripts/map.js @@ -171,6 +171,7 @@ export function initMaps(config = {}) { const { assetPath = '/assets', apiPath = '/form/api', + workerPath = '/assets/interactive-map/maplibre-gl-worker.mjs', data = defaultData } = config const locations = document.querySelectorAll('.app-location-field') @@ -202,11 +203,15 @@ export function initMaps(config = {}) { } locations.forEach((location, index) => { - processLocation({ assetPath, apiPath, data }, location, index) + processLocation({ assetPath, apiPath, workerPath, data }, location, index) }) geospatials.forEach((geospatial, index) => { - processGeospatial({ assetPath, apiPath, data }, geospatial, index) + processGeospatial( + { assetPath, apiPath, workerPath, data }, + geospatial, + index + ) }) } @@ -263,7 +268,7 @@ export function makeTileRequestTransformer(apiPath) { * @param {MapsEnvironmentConfig} mapsConfig - the map environment params */ export function createMap(mapId, initConfig, mapsConfig) { - const { assetPath, apiPath, data = defaultData } = mapsConfig + const { assetPath, apiPath, workerPath, data = defaultData } = mapsConfig const logoAltText = 'Ordnance survey logo' const interactPlugin = createInteractPlugin({ markerColor: { outdoor: '#ff0000', dark: '#00ff00' }, @@ -275,7 +280,7 @@ export function createMap(mapId, initConfig, mapsConfig) { const map = new InteractiveMap(mapId, { enableFullscreen: true, autoColorScheme: false, - mapProvider: maplibreProvider(), + mapProvider: maplibreProvider({ workerUrl: workerPath }), behaviour: 'inline', minZoom: 6, maxZoom: 18, @@ -453,6 +458,7 @@ export function getMapCountryLayers(apiPath, country) { * @typedef {object} MapsEnvironmentConfig * @property {string} assetPath - the root asset path * @property {string} apiPath - the root API path + * @property {string} workerPath - the maplibre worker path * @property {TileData} data - the tile data config */ diff --git a/test/client/javascripts/map.test.js b/test/client/javascripts/map.test.js index 95f8b3edf..6fcb54296 100644 --- a/test/client/javascripts/map.test.js +++ b/test/client/javascripts/map.test.js @@ -4,7 +4,7 @@ import InteractiveMap from '@defra/interactive-map' // @ts-expect-error - no types import createDatasetsPlugin from '@defra/interactive-map/plugins/datasets' // @ts-expect-error - no types -import createDrawPlugin from '@defra/interactive-map/plugins/draw-ml' +import createDrawPlugin from '@defra/interactive-map/plugins/draw' // @ts-expect-error - no types import createInteractPlugin from '@defra/interactive-map/plugins/interact' // @ts-expect-error - no types diff --git a/webpack.config.js b/webpack.config.js index 95cd995fe..8c2b9c388 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,6 +4,7 @@ import { dirname, join } from 'node:path' import { CleanWebpackPlugin } from 'clean-webpack-plugin' import CopyPlugin from 'copy-webpack-plugin' import TerserPlugin from 'terser-webpack-plugin' +import webpack from 'webpack' import { WebpackAssetsManifest } from 'webpack-assets-manifest' const { NODE_ENV = 'development' } = process.env @@ -54,6 +55,8 @@ export default { '/assets': join(govukFrontendPath, 'dist/govuk/assets') } }, + // maplibre-gl builds a URL from an expression when its worker is cross-origin; harmless + ignoreWarnings: [{ module: /maplibre-gl/, message: /Critical dependency/ }], module: { rules: [ { @@ -190,6 +193,9 @@ export default { plugins: [ new CleanWebpackPlugin(), new WebpackAssetsManifest(), + new webpack.IgnorePlugin({ + resourceRegExp: /^(ol|proj4|@arcgis\/core)(\/|$)/ + }), new CopyPlugin({ patterns: [ { From f747ea4695634eed3558155efc541b9e4f631d36 Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 23 Oct 2026 16:50:48 +0100 Subject: [PATCH 3/4] fix: simplify dataset plugin creation in geospatial and location map processing --- src/client/javascripts/geospatial-map.js | 2 +- src/client/javascripts/location-map.js | 4 +--- .../@defra/interactive-map/plugins/{draw-ml.js => draw.js} | 0 3 files changed, 2 insertions(+), 4 deletions(-) rename test/__mocks__/@defra/interactive-map/plugins/{draw-ml.js => draw.js} (100%) diff --git a/src/client/javascripts/geospatial-map.js b/src/client/javascripts/geospatial-map.js index 890f24fc1..df28eeaa1 100644 --- a/src/client/javascripts/geospatial-map.js +++ b/src/client/javascripts/geospatial-map.js @@ -219,7 +219,7 @@ export function processGeospatial(config, geospatial, index) { // Create a map dataset plugin if there are any present if (datasets.length) { - plugins.push(createDatasetsPlugin({ id: `datasets_${mapId}`, datasets })) + plugins.push(createDatasetsPlugin({ datasets })) } const initConfig = { diff --git a/src/client/javascripts/location-map.js b/src/client/javascripts/location-map.js index 9886d3879..b00f7023a 100644 --- a/src/client/javascripts/location-map.js +++ b/src/client/javascripts/location-map.js @@ -460,9 +460,7 @@ export function processLocation(config, location, index) { // Create a map dataset plugin if there are any present if (datasets.length) { - initConfig.plugins = [ - createDatasetsPlugin({ id: `datasets_${mapId}`, datasets }) - ] + initConfig.plugins = [createDatasetsPlugin({ datasets })] } const lang = /** @type {LanguageCode} */ ( diff --git a/test/__mocks__/@defra/interactive-map/plugins/draw-ml.js b/test/__mocks__/@defra/interactive-map/plugins/draw.js similarity index 100% rename from test/__mocks__/@defra/interactive-map/plugins/draw-ml.js rename to test/__mocks__/@defra/interactive-map/plugins/draw.js From 98b5007d377792a58fea216088dfe086684b838b Mon Sep 17 00:00:00 2001 From: David Stone Date: Mon, 26 Oct 2026 10:18:36 +0000 Subject: [PATCH 4/4] Remove maplibre-gl dependency as it is now bundled with IM --- package-lock.json | 99 ----------------------------------------------- package.json | 1 - 2 files changed, 100 deletions(-) diff --git a/package-lock.json b/package-lock.json index e39e21cb0..1c0b87a3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,7 +56,6 @@ "liquidjs": "^10.24.0", "lodash": "^4.17.21", "lru-cache": "^11.5.1", - "maplibre-gl": "^5.24.0", "marked": "^15.0.12", "nunjucks": "^3.2.4", "obscenity": "^0.4.5", @@ -7782,32 +7781,6 @@ "integrity": "sha512-gBvcNDBBB66bgQYvnaJ6Jk+VCaMmVq5+IZR2kWPisT88Z8s0kBQt6hfVi8QgRW8Vpg0UWZzBA4ZSyzHHC+VeRA==", "license": "BSD-2-Clause" }, - "node_modules/@mapbox/unitbezier": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", - "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==", - "license": "BSD-2-Clause" - }, - "node_modules/@mapbox/vector-tile": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-2.0.4.tgz", - "integrity": "sha512-AkOLcbgGTdXScosBWwmmD7cDlvOjkg/DetGva26pIRiZPdeJYjYKarIlb4uxVzi6bwHO6EWH82eZ5Nuv4T5DUg==", - "license": "BSD-3-Clause", - "dependencies": { - "@mapbox/point-geometry": "~1.1.0", - "@types/geojson": "^7946.0.16", - "pbf": "^4.0.1" - } - }, - "node_modules/@mapbox/whoots-js": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz", - "integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==", - "license": "ISC", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@maplibre/geojson-vt": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-6.3.0.tgz", @@ -7817,26 +7790,6 @@ "kdbush": "^4.1.0" } }, - "node_modules/@maplibre/maplibre-gl-style-spec": { - "version": "24.8.1", - "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-24.8.1.tgz", - "integrity": "sha512-zxa92qF96ZNojLxeAjnaRpjVCy+swoUNJvDhtpC90k7u5F0TMr4GmvNqMKvYrMoPB8d7gRSXbMG1hBbmgESIsw==", - "license": "ISC", - "dependencies": { - "@mapbox/jsonlint-lines-primitives": "~2.0.2", - "@mapbox/unitbezier": "^0.0.1", - "json-stringify-pretty-compact": "^4.0.0", - "minimist": "^1.2.8", - "quickselect": "^3.0.0", - "rw": "^1.3.3", - "tinyqueue": "^3.0.0" - }, - "bin": { - "gl-style-format": "dist/gl-style-format.mjs", - "gl-style-migrate": "dist/gl-style-migrate.mjs", - "gl-style-validate": "dist/gl-style-validate.mjs" - } - }, "node_modules/@maplibre/mlt": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@maplibre/mlt/-/mlt-1.3.0.tgz", @@ -25029,40 +24982,6 @@ "tmpl": "1.0.5" } }, - "node_modules/maplibre-gl": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-5.24.0.tgz", - "integrity": "sha512-ALyFxgtd5R+65UqZ/++lOqwWcC0SNho9c27fYSyLmG7AfnAul2o46F05aDJGPbFU57wos9dgcIySHs0Xe6ia3A==", - "license": "BSD-3-Clause", - "dependencies": { - "@mapbox/jsonlint-lines-primitives": "^2.0.2", - "@mapbox/point-geometry": "^1.1.0", - "@mapbox/tiny-sdf": "^2.1.0", - "@mapbox/unitbezier": "^0.0.1", - "@mapbox/vector-tile": "^2.0.4", - "@mapbox/whoots-js": "^3.1.0", - "@maplibre/geojson-vt": "^6.1.0", - "@maplibre/maplibre-gl-style-spec": "^24.8.1", - "@maplibre/mlt": "^1.1.8", - "@maplibre/vt-pbf": "^4.3.0", - "@types/geojson": "^7946.0.16", - "earcut": "^3.0.2", - "gl-matrix": "^3.4.4", - "kdbush": "^4.0.2", - "murmurhash-js": "^1.0.0", - "pbf": "^4.0.1", - "potpack": "^2.1.0", - "quickselect": "^3.0.0", - "tinyqueue": "^3.0.0" - }, - "engines": { - "node": ">=16.14.0", - "npm": ">=8.1.0" - }, - "funding": { - "url": "https://github.com/maplibre/maplibre-gl-js?sponsor=1" - } - }, "node_modules/mark.js": { "version": "8.11.1", "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", @@ -28794,18 +28713,6 @@ "node": ">=8" } }, - "node_modules/pbf": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz", - "integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==", - "license": "BSD-3-Clause", - "dependencies": { - "resolve-protobuf-schema": "^2.1.0" - }, - "bin": { - "pbf": "bin/pbf" - } - }, "node_modules/peowly": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/peowly/-/peowly-1.3.3.tgz", @@ -32353,12 +32260,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", - "license": "BSD-3-Clause" - }, "node_modules/rxjs": { "version": "7.8.2", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", diff --git a/package.json b/package.json index 9301bb099..ebe4f5ad6 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,6 @@ "liquidjs": "^10.24.0", "lodash": "^4.17.21", "lru-cache": "^11.5.1", - "maplibre-gl": "^5.24.0", "marked": "^15.0.12", "nunjucks": "^3.2.4", "obscenity": "^0.4.5",