@maplibre-yaml/core 0.1.0-alpha.0 → 0.1.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,87 +1,8 @@
1
- import { M as MapRenderer } from '../map-renderer-RQc5_bdo.js';
1
+ export { MLMap, registerMLMap } from '../register.js';
2
2
  import 'maplibre-gl';
3
+ import '../map-renderer-DOLO9y-3.js';
4
+ import '../page.schema-CzdCyPFI.js';
3
5
  import 'zod';
4
- import '../map.schema-EnZRrtIh.js';
5
-
6
- /**
7
- * @file Custom HTML element for declarative map creation
8
- * @module @maplibre-yaml/core/components
9
- */
10
-
11
- /**
12
- * Custom HTML element for creating maps declaratively
13
- *
14
- * @example
15
- * ```html
16
- * <!-- Using JSON attribute -->
17
- * <ml-map config='{"config": {...}, "layers": [...]}'></ml-map>
18
- *
19
- * <!-- Using inline YAML -->
20
- * <ml-map>
21
- * <script type="application/yaml">
22
- * config:
23
- * mapStyle: https://demotiles.maplibre.org/style.json
24
- * center: [-74.5, 40]
25
- * zoom: 9
26
- * layers:
27
- * - id: points
28
- * type: circle
29
- * </script>
30
- * </ml-map>
31
- *
32
- * <!-- Using inline JSON -->
33
- * <ml-map>
34
- * <script type="application/json">
35
- * {
36
- * "config": {
37
- * "mapStyle": "https://demotiles.maplibre.org/style.json",
38
- * "center": [-74.5, 40],
39
- * "zoom": 9
40
- * }
41
- * }
42
- * </script>
43
- * </ml-map>
44
- * ```
45
- */
46
- declare class MLMap extends HTMLElement {
47
- private renderer;
48
- private container;
49
- /**
50
- * Observed attributes that trigger attributeChangedCallback
51
- */
52
- static get observedAttributes(): string[];
53
- /**
54
- * Called when element is added to the DOM
55
- */
56
- connectedCallback(): void;
57
- /**
58
- * Called when element is removed from the DOM
59
- */
60
- disconnectedCallback(): void;
61
- /**
62
- * Called when an observed attribute changes
63
- */
64
- attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
65
- /**
66
- * Get configuration from one of three sources:
67
- * 1. 'config' attribute (JSON string)
68
- * 2. Inline <script type="application/yaml">
69
- * 3. Inline <script type="application/json">
70
- */
71
- private getConfig;
72
- /**
73
- * Render the map with the given configuration
74
- */
75
- private render;
76
- /**
77
- * Get the underlying MapRenderer instance
78
- */
79
- getRenderer(): MapRenderer | null;
80
- /**
81
- * Get the underlying MapLibre Map instance
82
- */
83
- getMap(): any;
84
- }
85
6
 
86
7
  /**
87
8
  * @file Default CSS styles for ml-map web component
@@ -103,4 +24,4 @@ declare const defaultStyles = "\n ml-map {\n display: block;\n position:
103
24
  */
104
25
  declare function injectStyles(): void;
105
26
 
106
- export { MLMap, defaultStyles, injectStyles };
27
+ export { defaultStyles, injectStyles };