nuxt-maplibre-gl 1.0.3 → 2.0.0

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
@@ -28,8 +28,8 @@ export default defineNuxtConfig({
28
28
 
29
29
  // Optional configuration
30
30
  maplibre: {
31
- css: true, // auto-import CSS (default: true)
32
- prefix: '', // composable prefix (default: none)
31
+ css: true, // auto-import CSS (default: true)
32
+ prefix: '', // composable prefix (default: none)
33
33
  },
34
34
  });
35
35
  ```
@@ -70,24 +70,35 @@ const circleStyle = ref({ 'circle-radius': 6, 'circle-color': '#007cbf' });
70
70
 
71
71
  ## Auto-imported Components
72
72
 
73
- | Component | Description |
74
- |---|---|
75
- | `Maplibre` | Main map container |
76
- | `GeoJsonSource` | GeoJSON data source |
77
- | `FillLayer` | Fill polygons |
78
- | `CircleLayer` | Circle points |
79
- | `LineLayer` | Line features |
80
- | `SymbolLayer` | Icons and text |
81
- | `Marker` | HTML markers |
82
- | `PopUp` | Popup windows |
83
- | `Image` | Map images |
84
- | `GeolocateControls` | Geolocation |
73
+ | Component | Description |
74
+ | ------------------- | ------------------- |
75
+ | `Maplibre` | Main map container |
76
+ | `GeoJsonSource` | GeoJSON data source |
77
+ | `FillLayer` | Fill polygons |
78
+ | `CircleLayer` | Circle points |
79
+ | `LineLayer` | Line features |
80
+ | `SymbolLayer` | Icons and text |
81
+ | `Marker` | HTML markers |
82
+ | `PopUp` | Popup windows |
83
+ | `Image` | Map images |
84
+ | `GeolocateControls` | Geolocation |
85
85
 
86
86
  ## Auto-imported Composables
87
87
 
88
- All 15+ composables from vue3-maplibre-gl are auto-imported:
88
+ All 38 composables from vue3-maplibre-gl are auto-imported:
89
89
  `useCreateMaplibre`, `useFlyTo`, `useEaseTo`, `useJumpTo`, `useMapEventListener`, etc.
90
90
 
91
+ ## Releasing
92
+
93
+ This module depends on `vue3-maplibre-gl` by version range, and both are published from the same repository. Release them in this order, from the repository root:
94
+
95
+ 1. `bun run publish:vue` — publishes the root package.
96
+ 2. `bun run publish:nuxt` — refuses to run until the `vue3-maplibre-gl` range in `nuxt/package.json` resolves on npm, then refreshes `nuxt/bun.lock`, builds, and publishes.
97
+
98
+ Neither script picks a version. Set `version` in the manifest yourself before releasing, so the bump reflects what actually changed — this module tracks `vue3-maplibre-gl` by major, so a new major there is a new major here.
99
+
100
+ Commit the refreshed `nuxt/bun.lock` afterwards.
101
+
91
102
  ## License
92
103
 
93
104
  MIT
package/dist/module.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
- /** Auto-import vue3-maplibre-gl CSS (default: true) */
4
+ /** Auto-import the MapLibre GL and vue3-maplibre-gl stylesheets (default: true) */
5
5
  css?: boolean;
6
6
  /** Prefix for auto-imported composables (default: none) */
7
7
  prefix?: string;
package/dist/module.json CHANGED
@@ -2,14 +2,15 @@
2
2
  "name": "nuxt-maplibre-gl",
3
3
  "configKey": "maplibre",
4
4
  "description": "Nuxt module for vue3-maplibre-gl with auto-import, SSR support, and full TypeScript",
5
+ "docs": "https://vue-maplibre-gl.pages.dev/",
5
6
  "links": {
6
- "documentation": "https://github.com/danh121097/vue-maplibre-gl",
7
+ "documentation": "https://vue-maplibre-gl.pages.dev/",
7
8
  "repository": "https://github.com/danh121097/vue-maplibre-gl"
8
9
  },
9
10
  "compatibility": {
10
11
  "nuxt": ">=3.0.0"
11
12
  },
12
- "version": "1.0.3",
13
+ "version": "2.0.0",
13
14
  "builder": {
14
15
  "@nuxt/module-builder": "1.0.2",
15
16
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -5,8 +5,12 @@ const module$1 = defineNuxtModule({
5
5
  name: "nuxt-maplibre-gl",
6
6
  configKey: "maplibre",
7
7
  description: "Nuxt module for vue3-maplibre-gl with auto-import, SSR support, and full TypeScript",
8
+ // `docs` is what nuxt.com/modules reads out of the published
9
+ // dist/module.json to link the listing at the documentation site; without
10
+ // it the listing falls back to the GitHub repository.
11
+ docs: "https://vue-maplibre-gl.pages.dev/",
8
12
  links: {
9
- documentation: "https://github.com/danh121097/vue-maplibre-gl",
13
+ documentation: "https://vue-maplibre-gl.pages.dev/",
10
14
  repository: "https://github.com/danh121097/vue-maplibre-gl"
11
15
  },
12
16
  compatibility: {
@@ -17,10 +21,13 @@ const module$1 = defineNuxtModule({
17
21
  css: true,
18
22
  prefix: ""
19
23
  },
20
- setup(options, nuxt) {
21
- const { resolve } = createResolver(import.meta.url);
24
+ async setup(options, nuxt) {
25
+ const { resolve, resolvePath } = createResolver(import.meta.url);
22
26
  if (options.css) {
23
- nuxt.options.css.push("vue3-maplibre-gl/dist/style.css");
27
+ nuxt.options.css.push(
28
+ await resolvePath("maplibre-gl/dist/maplibre-gl.css"),
29
+ await resolvePath("vue3-maplibre-gl/dist/style.css")
30
+ );
24
31
  }
25
32
  nuxt.options.build.transpile.push("vue3-maplibre-gl");
26
33
  nuxt.options.vite.optimizeDeps ??= {};
@@ -33,21 +40,37 @@ const module$1 = defineNuxtModule({
33
40
  mode: "client"
34
41
  });
35
42
  const composables = [
43
+ // Map instance
36
44
  "useCreateMaplibre",
37
45
  "useMaplibre",
46
+ "useMaplibreConfig",
47
+ // Layers
48
+ "useCreateLayer",
38
49
  "useCreateFillLayer",
39
50
  "useCreateCircleLayer",
40
51
  "useCreateLineLayer",
41
52
  "useCreateSymbolLayer",
53
+ "useLayer",
54
+ // Sources
42
55
  "useCreateGeoJsonSource",
43
56
  "useGeoJsonSource",
57
+ // Map objects
58
+ "useCreateMarker",
59
+ "useCreatePopup",
60
+ "useCreateImage",
61
+ // Controls
62
+ "useGeolocateControl",
63
+ // Events
44
64
  "useMapEventListener",
45
65
  "useLayerEventListener",
46
66
  "useGeolocateEventListener",
67
+ "useMapReloadEvent",
68
+ // Camera
47
69
  "useFlyTo",
48
70
  "useEaseTo",
49
71
  "useJumpTo",
50
72
  "useFitBounds",
73
+ "useFitScreenCoordinates",
51
74
  "useCameraForBounds",
52
75
  "useZoomTo",
53
76
  "useZoomIn",
@@ -57,7 +80,12 @@ const module$1 = defineNuxtModule({
57
80
  "useRotateTo",
58
81
  "useResetNorth",
59
82
  "useResetNorthPitch",
60
- "useSnapToNorth"
83
+ "useSnapToNorth",
84
+ // Utilities
85
+ "useDebounce",
86
+ "useDebouncedRef",
87
+ "useDebouncedWatch",
88
+ "useLogger"
61
89
  ];
62
90
  addImports(
63
91
  composables.map((name) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-maplibre-gl",
3
- "version": "1.0.3",
3
+ "version": "2.0.0",
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",
@@ -29,6 +29,7 @@
29
29
  "webgl",
30
30
  "gis"
31
31
  ],
32
+ "nuxt": "./dist/module.mjs",
32
33
  "exports": {
33
34
  ".": {
34
35
  "types": "./dist/types.d.mts",
@@ -45,14 +46,12 @@
45
46
  "dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
46
47
  "dev": "nuxi dev playground",
47
48
  "build": "nuxt-module-build build",
48
- "prepack": "nuxt-module-build build",
49
- "test": "vitest run",
50
- "publish:manual": "npm publish --provenance --access public",
51
- "publish:manual:otp": "npm publish --provenance --access public --otp=$NPM_OTP"
49
+ "prepack": "nuxt-module-build build"
52
50
  },
53
51
  "dependencies": {
54
52
  "@nuxt/kit": "^3.15.0",
55
- "vue3-maplibre-gl": "^5.0.0"
53
+ "maplibre-gl": "^5.6.1",
54
+ "vue3-maplibre-gl": "^6.0.0"
56
55
  },
57
56
  "devDependencies": {
58
57
  "@nuxt/module-builder": "^1.0.2",