Skip to content

Commit ca2da93

Browse files
committedFeb 23, 2024··
Merge branch 'release/2.4.0'
2 parents 7aba13d + f362416 commit ca2da93

File tree

17 files changed

+20285
-12851
lines changed

17 files changed

+20285
-12851
lines changed
 

‎.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v2
1717
with:
18-
node-version: 16
18+
node-version: 20
1919
cache: npm
2020
registry-url: https://registry.npmjs.org/
2121

‎.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v2
1616
with:
17-
node-version: 16
17+
node-version: 20
1818
cache: npm
1919
- name: Install modules
2020
run: npm install
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v2
2828
- uses: actions/setup-node@v2
2929
with:
30-
node-version: 16
30+
node-version: 20
3131
cache: npm
3232
- name: Install modules
3333
run: npm install

‎.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
20

‎CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@ All notable changes to this project will be documented in this file. The format
44

55
## [Unreleased]
66

7+
## [v2.4.0](https://github.com/studiometa/vue-mapbox-gl/compare/2.3.4...2.4.0) (2024-02-23)
8+
9+
### Added
10+
11+
- Add support for mapbox-gl ^3.0.0 ([f8a9b21](https://github.com/studiometa/vue-mapbox-gl/commit/f8a9b21))
12+
13+
### Fixed
14+
15+
- Fix a warning when using MapboxGeocoder outside MapboxMap ([e4202ea](https://github.com/studiometa/vue-mapbox-gl/commit/e4202ea))
16+
717
## [v2.3.4](https://github.com/studiometa/vue-mapbox-gl/compare/2.3.3...2.3.4) (2024-01-30)
818

919
### Fixed
20+
1021
- Fix Geocoder proximity props default ([#133](https://github.com/studiometa/vue-mapbox-gl/pull/133))
1122

1223
## [v2.3.3](https://github.com/studiometa/vue-mapbox-gl/compare/2.3.2...2.3.3) (2024-01-12)

‎package-lock.json

+20,234-12,815
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-workspace",
33
"private": true,
4-
"version": "2.3.4",
4+
"version": "2.4.0",
55
"workspaces": [
66
"packages/*"
77
],
@@ -10,7 +10,7 @@
1010
"docs:build": "npm run build -w @studiometa/vue-mapbox-gl-docs",
1111
"demo:dev": "npm run dev -w @studiometa/vue-mapbox-gl-demo",
1212
"demo:build": "npm run build -w @studiometa/vue-mapbox-gl-demo",
13-
"lint": "eslint packages/vue-mapbox-gl --ext=.js,.vue",
13+
"lint": "eslint packages/{vue-mapbox-gl,demo} --ext=.js,.vue",
1414
"fix": "npm run lint -- --fix",
1515
"build": "rm -rf dist && npm run build:esbuild && npm run build:cp",
1616
"build:esbuild": "node scripts/build.mjs",

‎packages/demo/package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-demo",
3-
"version": "2.3.4",
3+
"version": "2.4.0",
44
"scripts": {
55
"dev": "nuxt dev",
66
"build": "nuxt build"
77
},
88
"dependencies": {
9-
"@studiometa/vue-mapbox-gl": "file:../vue-mapbox-gl",
10-
"mapbox-gl": "^2.14.1",
11-
"nuxt": "^3.5.1",
12-
"vue": "^3.3.4"
9+
"@mapbox/mapbox-gl-geocoder": "^5.0.2",
10+
"@studiometa/vue-mapbox-gl": "*",
11+
"mapbox-gl": "^3.1.2",
12+
"nuxt": "^3.10.3",
13+
"vue": "^3.4.19"
1314
}
1415
}

‎packages/demo/pages/index.vue

+8-11
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,19 @@
7777
<div>
7878
<ClientOnly>
7979
<MapboxMap
80-
@mb-created="createdHandler"
81-
@mb-click="eventHandler"
8280
style="height: 400px"
8381
:access-token="accessToken"
8482
map-style="mapbox://styles/mapbox/streets-v11"
8583
:center="mapCenter"
8684
:zoom="zoom"
87-
>
85+
@mb-created="createdHandler"
86+
@mb-click="eventHandler">
8887
<MapboxImages :sources="iconSources">
8988
<MapboxLayer id="pois" :options="layerOptions" />
9089
</MapboxImages>
9190
<MapboxImage
92-
src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/400px-Cat_silhouette.svg.png"
9391
id="cat"
94-
>
92+
src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/400px-Cat_silhouette.svg.png">
9593
<MapboxCluster
9694
data="/earthquakes.json"
9795
unclustered-point-layer-type="symbol"
@@ -123,13 +121,12 @@
123121
'icon-image': 'cat',
124122
'icon-size': 0.25,
125123
},
126-
}"
127-
/>
124+
}" />
128125
</MapboxImage>
129126
<MapboxGeolocateControl position="top-left" />
130127
<MapboxNavigationControl position="bottom-right" />
131128
<MapboxGeocoder @mb-result="eventHandler" />
132-
<MapboxMarker @mb-click="eventHandler" :lng-lat="[lng - 30, lat]" />
129+
<MapboxMarker :lng-lat="[lng - 30, lat]" @mb-click="eventHandler" />
133130
<MapboxPopup :lng-lat="[lng, lat]">
134131
<p>Hello world !</p>
135132
</MapboxPopup>
@@ -140,17 +137,17 @@
140137
<fieldset class="controls__group">
141138
<legend>Longitude</legend>
142139
<input type="text" readonly="readonly" :value="lng" />
143-
<input type="range" step="1" min="-100" max="100" v-model="lng" />
140+
<input v-model="lng" type="range" step="1" min="-100" max="100" />
144141
</fieldset>
145142
<fieldset class="controls__group">
146143
<legend>Latitude</legend>
147144
<input type="text" readonly="readonly" :value="lat" />
148-
<input type="range" step="1" min="-90" max="90" v-model="lat" />
145+
<input v-model="lat" type="range" step="1" min="-90" max="90" />
149146
</fieldset>
150147
<fieldset class="controls__group">
151148
<legend>Zoom</legend>
152149
<input type="text" readonly="readonly" :value="zoom" />
153-
<input type="range" step="0.1" min="0" max="15" v-model.number="zoom" />
150+
<input v-model.number="zoom" type="range" step="0.1" min="0" max="15" />
154151
</fieldset>
155152
</div>
156153
</div>

‎packages/demo/plugins/errorHandler.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// eslint-disable-next-line import/no-unresolved
2+
import { defineNuxtPlugin } from '#imports';
3+
14
export default defineNuxtPlugin((nuxtApp) => {
25
nuxtApp.vueApp.config.errorHandler = console.error;
36
nuxtApp.vueApp.config.warnHandler = console.warn;

‎packages/docs/components/MapboxMap/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ A map style definition, can be a JSON object following the [Mapbox Style specifi
316316
- Type: `Boolean`
317317
- Default: `true`
318318

319+
::: warning
320+
The `optimizeForTerrain` prop will only work with `mapbox-gl@2`, as it has been removed in v3.0.0 of the package (see [release notes](https://github.com/mapbox/mapbox-gl-js/releases/tag/v3.0.0)).
321+
:::
322+
319323
### `performanceMetricsCollection`
320324

321325
- Type: `Boolean`

‎packages/docs/components/MapboxMarker/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Display a marker on the map.
8282
### `anchor`
8383

8484
- Type `String`
85-
- Default: `center'`
85+
- Default: `'center'`
8686

8787
### `color`
8888

‎packages/docs/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl-docs",
33
"private": true,
4-
"version": "2.3.4",
4+
"type": "module",
5+
"version": "2.4.0",
56
"scripts": {
67
"dev": "vitepress",
78
"build": "vitepress build"
89
},
910
"devDependencies": {
10-
"sass": "^1.62.0",
11-
"tailwindcss": "^3.3.1",
12-
"vitepress": "^1.0.0-alpha.71"
11+
"sass": "^1.71.1",
12+
"tailwindcss": "^3.4.1",
13+
"vitepress": "^1.0.0-rc.44"
1314
}
1415
}

‎packages/docs/postcss.config.cjs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
plugins: [require('tailwindcss')],
3+
};

‎packages/docs/postcss.config.js

-5
This file was deleted.

‎packages/docs/tailwind.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
content: [
33
'./.vitepress/**/*.js',
44
'./.vitepress/**/*.vue',

‎packages/vue-mapbox-gl/composables/useMap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { inject } from 'vue';
99
* @returns {{ map: Ref<any> }}
1010
*/
1111
export function useMap() {
12-
const map = inject('mapbox-map');
12+
const map = inject('mapbox-map', null);
1313

1414
return {
1515
map,

‎packages/vue-mapbox-gl/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@studiometa/vue-mapbox-gl",
3-
"version": "2.3.4",
3+
"version": "2.4.0",
44
"description": "A small components library to use Mapbox GL in Vue 3.",
55
"homepage": "https://github.com/studiometa/vue-mapbox-gl#readme",
66
"bugs": {
@@ -46,7 +46,7 @@
4646
},
4747
"peerDependencies": {
4848
"@mapbox/mapbox-gl-geocoder": "^5.0.1",
49-
"mapbox-gl": "^2.8.2",
49+
"mapbox-gl": "^2.8.2 || ^3.0.0",
5050
"vue": "^3.2.37"
5151
}
5252
}

0 commit comments

Comments
 (0)