nuxt-maplibre-gl 2.0.0 → 2.0.2

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 CHANGED
@@ -6,21 +6,43 @@
6
6
 
7
7
  ## Features
8
8
 
9
- - Auto-import 10+ map components (Maplibre, GeoJsonSource, FillLayer, etc.)
10
- - Auto-import 15+ composables (useFlyTo, useMapEventListener, etc.)
11
- - Auto-import CSS — no manual style import needed
12
- - SSR-safe — components register client-only, composables have browser guards
9
+ - Auto-imports all 10 map components (Maplibre, GeoJsonSource, FillLayer, etc.)
10
+ - Auto-imports all 38 composables (useFlyTo, useMapEventListener, etc.)
11
+ - Auto-imports CSS — both `maplibre-gl/dist/maplibre-gl.css` and `vue3-maplibre-gl/dist/style.css`
12
+ - SSR-safe — components register client-only, `maplibre-gl` is kept out of the server bundle
13
13
  - Zero configuration required
14
14
 
15
+ `vue3-maplibre-gl` and `maplibre-gl` are dependencies of this module, so installing it is enough — there is nothing else to add to your app.
16
+
15
17
  ## Installation
16
18
 
19
+ ### Using Bun (Recommended)
20
+
17
21
  ```bash
18
22
  bun add nuxt-maplibre-gl
19
23
  ```
20
24
 
25
+ ### Using npm
26
+
27
+ ```bash
28
+ npm install nuxt-maplibre-gl
29
+ ```
30
+
31
+ ### Using Yarn
32
+
33
+ ```bash
34
+ yarn add nuxt-maplibre-gl
35
+ ```
36
+
37
+ ### Using pnpm
38
+
39
+ ```bash
40
+ pnpm add nuxt-maplibre-gl
41
+ ```
42
+
21
43
  ## Setup
22
44
 
23
- Add to `nuxt.config.ts`:
45
+ Add to `nuxt.config.ts`. The config key is `maplibre`, not the module name:
24
46
 
25
47
  ```typescript
26
48
  export default defineNuxtConfig({
@@ -79,14 +101,27 @@ const circleStyle = ref({ 'circle-radius': 6, 'circle-color': '#007cbf' });
79
101
  | `LineLayer` | Line features |
80
102
  | `SymbolLayer` | Icons and text |
81
103
  | `Marker` | HTML markers |
82
- | `PopUp` | Popup windows |
104
+ | `Popup` | Popup windows |
83
105
  | `Image` | Map images |
84
106
  | `GeolocateControls` | Geolocation |
85
107
 
86
108
  ## Auto-imported Composables
87
109
 
88
- All 38 composables from vue3-maplibre-gl are auto-imported:
89
- `useCreateMaplibre`, `useFlyTo`, `useEaseTo`, `useJumpTo`, `useMapEventListener`, etc.
110
+ All 38 composables from vue3-maplibre-gl are auto-imported — `useCreateMaplibre`,
111
+ `useMaplibre`, `useFlyTo`, `useEaseTo`, `useJumpTo`, `useMapEventListener`,
112
+ `useCreateGeoJsonSource` and the rest. Set `prefix` to namespace them: with
113
+ `prefix: 'map'` they are imported as `mapUseFlyTo`, `mapUseMapEventListener`, and
114
+ so on.
115
+
116
+ The full reference lives at
117
+ [vue-maplibre-gl.pages.dev/api/composables](https://vue-maplibre-gl.pages.dev/api/composables).
118
+
119
+ ## Documentation
120
+
121
+ - [SSR / Nuxt guide](https://vue-maplibre-gl.pages.dev/guide/ssr-nuxt) — what this module configures, and how to use it without the module
122
+ - [Components API](https://vue-maplibre-gl.pages.dev/api/components)
123
+ - [Composables API](https://vue-maplibre-gl.pages.dev/api/composables)
124
+ - [Examples](https://vue-maplibre-gl.pages.dev/examples/)
90
125
 
91
126
  ## Releasing
92
127
 
package/dist/module.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "compatibility": {
11
11
  "nuxt": ">=3.0.0"
12
12
  },
13
- "version": "2.0.0",
13
+ "version": "2.0.2",
14
14
  "builder": {
15
15
  "@nuxt/module-builder": "1.0.2",
16
16
  "unbuild": "3.6.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-maplibre-gl",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Nuxt module for vue3-maplibre-gl — auto-import components, composables, CSS, and SSR configuration",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -8,13 +8,13 @@
8
8
  "name": "Danh Nguyen",
9
9
  "url": "https://harrynguyen.work"
10
10
  },
11
- "homepage": "https://github.com/danh121097/vue-maplibre-gl#readme",
11
+ "homepage": "https://vue-maplibre-gl.pages.dev/",
12
12
  "bugs": {
13
13
  "url": "https://github.com/danh121097/vue-maplibre-gl/issues"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://github.com/danh121097/vue-maplibre-gl",
17
+ "url": "git+https://github.com/danh121097/vue-maplibre-gl.git",
18
18
  "directory": "nuxt"
19
19
  },
20
20
  "keywords": [
@@ -45,8 +45,8 @@
45
45
  "scripts": {
46
46
  "dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
47
47
  "dev": "nuxi dev playground",
48
- "build": "nuxt-module-build build",
49
- "prepack": "nuxt-module-build build"
48
+ "build": "nuxt-module-build build --stub && nuxi prepare playground && nuxt-module-build build",
49
+ "prepack": "npm run build"
50
50
  },
51
51
  "dependencies": {
52
52
  "@nuxt/kit": "^3.15.0",