diff --git a/package-lock.json b/package-lock.json index b5e3c482d..ba5e8704c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@mapbox/gist-map-browser": "0.2.1", "@mapbox/github-file-browser": "0.6.1", "@mapbox/maki": "^8.0.1", - "@mapbox/mapbox-gl-draw": "1.4.1", + "@mapbox/mapbox-gl-draw": "^1.5.0", "@mapbox/mapbox-gl-geocoder": "^5.0.2", "@mapbox/polyline": "^1.1.1", "@placemarkio/tokml": "^0.3.3", @@ -722,25 +722,43 @@ "integrity": "sha512-2/83/Lm1W9GiqnYHXzmpN6EtfGf01O+iLAM/3qD9Whdrqz22Nwy6RniDMAomi9uFM6W0eoeqYDIQHxb/kB/Bfg==" }, "node_modules/@mapbox/mapbox-gl-draw": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-draw/-/mapbox-gl-draw-1.4.1.tgz", - "integrity": "sha512-g6F49KZagF9269/IoF6vZJeail6qtoc5mVF3eVRikNT7UFnY0QASfe2y53mgE99s6GrHdpV+PZuFxaL71hkMhg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-draw/-/mapbox-gl-draw-1.5.0.tgz", + "integrity": "sha512-uchQbTa8wiv6GWWTbxW1g5b8H6VySz4t91SmduNH6jjWinPze7cjcmsPUEzhySXsYpYr2/50gRJLZz3bx7O88A==", + "license": "ISC", "dependencies": { "@mapbox/geojson-area": "^0.2.2", - "@mapbox/geojson-extent": "^1.0.1", "@mapbox/geojson-normalize": "^0.0.1", - "@mapbox/point-geometry": "^0.1.0", - "hat": "0.0.3", - "lodash.isequal": "^4.5.0", - "xtend": "^4.0.2" + "@mapbox/point-geometry": "^1.1.0", + "fast-deep-equal": "^3.1.3", + "nanoid": "^5.0.9" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" } }, - "node_modules/@mapbox/mapbox-gl-draw/node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "node_modules/@mapbox/mapbox-gl-draw/node_modules/@mapbox/point-geometry": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-1.1.0.tgz", + "integrity": "sha512-YGcBz1cg4ATXDCM/71L9xveh4dynfGmcLDqufR+nQQy3fKwsAZsWd/x4621/6uJaeB9mwOHE6hPeDgXz9uViUQ==", + "license": "ISC" + }, + "node_modules/@mapbox/mapbox-gl-draw/node_modules/nanoid": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.9.tgz", + "integrity": "sha512-Aooyr6MXU6HpvvWXKoVoXwKMs/KyVakWwg7xQfv5/S/RIgJMy0Ifa45H9qqYy7pTCszrHzP21Uk4PZq2HpEM8Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.js" + }, "engines": { - "node": ">=0.4" + "node": "^18 || >=20" } }, "node_modules/@mapbox/mapbox-gl-geocoder": { @@ -3802,8 +3820,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-diff": { "version": "1.2.0", @@ -4615,14 +4632,6 @@ "node": ">=0.10.0" } }, - "node_modules/hat": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/hat/-/hat-0.0.3.tgz", - "integrity": "sha512-zpImx2GoKXy42fVDSEad2BPKuSQdLcqsCYa48K3zHSzM/ugWuYjLDr8IXxpVuL7uCLHw56eaiLxCRthhOzf5ug==", - "engines": { - "node": "*" - } - }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -6086,11 +6095,6 @@ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", diff --git a/package.json b/package.json index 7e90cf89a..fee11cb0b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@mapbox/gist-map-browser": "0.2.1", "@mapbox/github-file-browser": "0.6.1", "@mapbox/maki": "^8.0.1", - "@mapbox/mapbox-gl-draw": "1.4.1", + "@mapbox/mapbox-gl-draw": "^1.5.0", "@mapbox/mapbox-gl-geocoder": "^5.0.2", "@mapbox/polyline": "^1.1.1", "@placemarkio/tokml": "^0.3.3", diff --git a/src/ui/draw/circle.js b/src/ui/draw/circle.js index 9918d641c..c9f6bc491 100644 --- a/src/ui/draw/circle.js +++ b/src/ui/draw/circle.js @@ -3,7 +3,7 @@ // forces draw.create on creation of second vertex const circle = require('@turf/circle').default; const length = require('@turf/length').default; -const MapboxDraw = require('@mapbox/mapbox-gl-draw'); +const MapboxDraw = require('@mapbox/mapbox-gl-draw').default; const { getDisplayMeasurements } = require('./util.js'); diff --git a/src/ui/draw/linestring.js b/src/ui/draw/linestring.js index 5e55beb92..a45537b07 100644 --- a/src/ui/draw/linestring.js +++ b/src/ui/draw/linestring.js @@ -1,6 +1,6 @@ // this mode extends the build-in linestring tool, displaying the current length // of the line as the user draws using a point feature and a symbol layer -const MapboxDraw = require('@mapbox/mapbox-gl-draw'); +const MapboxDraw = require('@mapbox/mapbox-gl-draw').default; const { getDisplayMeasurements } = require('./util.js'); diff --git a/src/ui/draw/simple_select.js b/src/ui/draw/simple_select.js index 9d5df6592..fb186d1ea 100644 --- a/src/ui/draw/simple_select.js +++ b/src/ui/draw/simple_select.js @@ -1,4 +1,4 @@ -const MapboxDraw = require('@mapbox/mapbox-gl-draw'); +const MapboxDraw = require('@mapbox/mapbox-gl-draw').default; const SimpleSelect = { ...MapboxDraw.modes.simple_select, diff --git a/src/ui/map/index.js b/src/ui/map/index.js index 6669ebfd7..51e72913b 100644 --- a/src/ui/map/index.js +++ b/src/ui/map/index.js @@ -2,7 +2,7 @@ const mapboxgl = require('mapbox-gl'); require('qs-hash'); const geojsonRewind = require('@mapbox/geojson-rewind'); -const MapboxDraw = require('@mapbox/mapbox-gl-draw'); +const MapboxDraw = require('@mapbox/mapbox-gl-draw').default; const MapboxGeocoder = require('@mapbox/mapbox-gl-geocoder'); const DrawLineString = require('../draw/linestring');