@maplibre-yaml/core 0.2.0 → 0.2.1

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.
@@ -1,5 +1,5 @@
1
1
  import { Map } from 'maplibre-gl';
2
- import { d as MapBlock, M as MapRenderer } from './map-renderer-8-c51Ww7.js';
2
+ import { d as MapBlock, M as MapRenderer } from './map-renderer-SjO3KQmx.js';
3
3
  import './page.schema-Cad2FFqh.js';
4
4
  import 'zod';
5
5
 
package/dist/register.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { parse } from 'yaml';
2
2
  import { z, ZodError } from 'zod';
3
- import maplibregl2 from 'maplibre-gl';
3
+ import { Map as Map$1, Popup, NavigationControl, GeolocateControl, ScaleControl, FullscreenControl } from 'maplibre-gl';
4
4
 
5
5
  // @maplibre-yaml/core - Declarative web maps with YAML
6
6
 
@@ -4037,7 +4037,7 @@ var EventHandler = class {
4037
4037
  showPopup(content, feature, lngLat) {
4038
4038
  this.activePopup?.remove();
4039
4039
  const html = this.popupBuilder.build(content, feature.properties);
4040
- this.activePopup = new maplibregl2.Popup().setLngLat(lngLat).setHTML(html).addTo(this.map);
4040
+ this.activePopup = new Popup().setLngLat(lngLat).setHTML(html).addTo(this.map);
4041
4041
  }
4042
4042
  /**
4043
4043
  * Detach events for a layer
@@ -4142,14 +4142,14 @@ var ControlsManager = class {
4142
4142
  if (config.navigation) {
4143
4143
  const options = typeof config.navigation === "object" ? config.navigation : {};
4144
4144
  const position = options.position || "top-right";
4145
- const control = new maplibregl2.NavigationControl();
4145
+ const control = new NavigationControl();
4146
4146
  this.map.addControl(control, position);
4147
4147
  this.addedControls.push(control);
4148
4148
  }
4149
4149
  if (config.geolocate) {
4150
4150
  const options = typeof config.geolocate === "object" ? config.geolocate : {};
4151
4151
  const position = options.position || "top-right";
4152
- const control = new maplibregl2.GeolocateControl({
4152
+ const control = new GeolocateControl({
4153
4153
  positionOptions: { enableHighAccuracy: true },
4154
4154
  trackUserLocation: true
4155
4155
  });
@@ -4159,14 +4159,14 @@ var ControlsManager = class {
4159
4159
  if (config.scale) {
4160
4160
  const options = typeof config.scale === "object" ? config.scale : {};
4161
4161
  const position = options.position || "bottom-left";
4162
- const control = new maplibregl2.ScaleControl();
4162
+ const control = new ScaleControl();
4163
4163
  this.map.addControl(control, position);
4164
4164
  this.addedControls.push(control);
4165
4165
  }
4166
4166
  if (config.fullscreen) {
4167
4167
  const options = typeof config.fullscreen === "object" ? config.fullscreen : {};
4168
4168
  const position = options.position || "top-right";
4169
- const control = new maplibregl2.FullscreenControl();
4169
+ const control = new FullscreenControl();
4170
4170
  this.map.addControl(control, position);
4171
4171
  this.addedControls.push(control);
4172
4172
  }
@@ -4194,7 +4194,7 @@ var MapRenderer = class {
4194
4194
  constructor(container, config, layers = [], options = {}, sources) {
4195
4195
  this.eventListeners = /* @__PURE__ */ new Map();
4196
4196
  this.isLoaded = false;
4197
- this.map = new maplibregl2.Map({
4197
+ this.map = new Map$1({
4198
4198
  ...config,
4199
4199
  container: typeof container === "string" ? container : container,
4200
4200
  style: config.mapStyle,