@maplibre-yaml/core 0.1.3 → 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,6 +1,6 @@
1
- import { R as RootSchema, M as MapBlockSchema, S as ScrollytellingBlockSchema, L as LayerSchema, a as LegendConfigSchema, b as MapConfigSchema, C as ControlsConfigSchema } from './page.schema-EBT_0Ojm.js';
1
+ import { R as RootSchema, M as MapBlockSchema, S as ScrollytellingBlockSchema, L as LayerSchema, a as LegendConfigSchema, b as MapConfigSchema, c as LayerSourceSchema, C as ControlsConfigSchema } from './page.schema-Cad2FFqh.js';
2
2
  import { z } from 'zod';
3
- import maplibregl, { Map } from 'maplibre-gl';
3
+ import { Map, LngLat } from 'maplibre-gl';
4
4
 
5
5
  /**
6
6
  * @file YAML parser for MapLibre configuration files
@@ -481,6 +481,7 @@ declare class LegendBuilder {
481
481
 
482
482
  type MapConfig = z.infer<typeof MapConfigSchema>;
483
483
  type Layer = z.infer<typeof LayerSchema>;
484
+ type LayerSource = z.infer<typeof LayerSourceSchema>;
484
485
  type ControlsConfig = z.infer<typeof ControlsConfigSchema>;
485
486
  type LegendConfig = z.infer<typeof LegendConfigSchema>;
486
487
  /**
@@ -515,12 +516,12 @@ interface MapRendererEvents {
515
516
  'layer:click': {
516
517
  layerId: string;
517
518
  feature: any;
518
- lngLat: maplibregl.LngLat;
519
+ lngLat: LngLat;
519
520
  };
520
521
  'layer:hover': {
521
522
  layerId: string;
522
523
  feature: any;
523
- lngLat: maplibregl.LngLat;
524
+ lngLat: LngLat;
524
525
  };
525
526
  }
526
527
  /**
@@ -534,7 +535,7 @@ declare class MapRenderer {
534
535
  private controlsManager;
535
536
  private eventListeners;
536
537
  private isLoaded;
537
- constructor(container: string | HTMLElement, config: MapConfig, layers?: Layer[], options?: MapRendererOptions);
538
+ constructor(container: string | HTMLElement, config: MapConfig, layers?: Layer[], options?: MapRendererOptions, sources?: Record<string, LayerSource>);
538
539
  /**
539
540
  * Get the underlying MapLibre map instance
540
541
  */