@mcp-b/geo-maplibre 0.2.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.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/dist/circle-CFH3gDcY.js +146 -0
  3. package/dist/components/circle/circle.d.ts +51 -0
  4. package/dist/components/circle/circle.js +2 -0
  5. package/dist/components/control/control.d.ts +42 -0
  6. package/dist/components/control/control.js +2 -0
  7. package/dist/components/geojson/geojson.d.ts +74 -0
  8. package/dist/components/geojson/geojson.js +2 -0
  9. package/dist/components/layer/layer.d.ts +35 -0
  10. package/dist/components/layer/layer.js +2 -0
  11. package/dist/components/map/map.d.ts +43 -0
  12. package/dist/components/map/map.js +2 -0
  13. package/dist/components/marker/marker.d.ts +42 -0
  14. package/dist/components/marker/marker.js +2 -0
  15. package/dist/components/polygon/polygon.d.ts +46 -0
  16. package/dist/components/polygon/polygon.js +2 -0
  17. package/dist/components/polyline/polyline.d.ts +44 -0
  18. package/dist/components/polyline/polyline.js +2 -0
  19. package/dist/components/popup/popup.d.ts +27 -0
  20. package/dist/components/popup/popup.js +2 -0
  21. package/dist/components/scale-control/scale-control.d.ts +33 -0
  22. package/dist/components/scale-control/scale-control.js +2 -0
  23. package/dist/components/tilelayer/tilelayer.d.ts +65 -0
  24. package/dist/components/tilelayer/tilelayer.js +2 -0
  25. package/dist/control-Bka68vGo.js +61 -0
  26. package/dist/decorate-DcF3lt7P.js +9 -0
  27. package/dist/docs/custom-elements.json +1596 -0
  28. package/dist/geojson-BW9JQxtv.js +240 -0
  29. package/dist/index.d.ts +12 -0
  30. package/dist/index.js +12 -0
  31. package/dist/layer-COvBRP1h.js +61 -0
  32. package/dist/map-CYqh-osb.js +135 -0
  33. package/dist/marker-DzWveHNW.js +79 -0
  34. package/dist/polygon-BJ-z1X7p.js +119 -0
  35. package/dist/polyline-Dt4yBInz.js +98 -0
  36. package/dist/popup-BNRD9rNd.js +30 -0
  37. package/dist/scale-control-DPWq0EHU.js +58 -0
  38. package/dist/tilelayer-CCmClbSv.js +85 -0
  39. package/package.json +75 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MCP-B contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,146 @@
1
+ import { t as __decorate } from "./decorate-DcF3lt7P.js";
2
+ import { LitElement, css, html } from "lit";
3
+ import { customElement, property } from "lit/decorators.js";
4
+ //#region src/components/circle/circle.styles.ts
5
+ var circle_styles_default = css`
6
+ :host {
7
+ display: none;
8
+ }
9
+ `;
10
+ //#endregion
11
+ //#region src/components/circle/circle.ts
12
+ let circleCounter = 0;
13
+ /**
14
+ * Creates a GeoJSON polygon approximation of a circle on the map.
15
+ * @param lng - Center longitude
16
+ * @param lat - Center latitude
17
+ * @param radiusMeters - Radius in meters
18
+ * @param steps - Number of polygon vertices
19
+ */
20
+ function createCirclePolygon(lng, lat, radiusMeters, steps = 64) {
21
+ const coords = [];
22
+ const earthRadius = 6371008.8;
23
+ const latRad = lat * Math.PI / 180;
24
+ for (let i = 0; i <= steps; i++) {
25
+ const angle = i * 2 * Math.PI / steps;
26
+ const dLat = radiusMeters / earthRadius * Math.cos(angle);
27
+ const dLng = radiusMeters / (earthRadius * Math.cos(latRad)) * Math.sin(angle);
28
+ coords.push([lng + dLng * 180 / Math.PI, lat + dLat * 180 / Math.PI]);
29
+ }
30
+ return {
31
+ type: "Feature",
32
+ geometry: {
33
+ type: "Polygon",
34
+ coordinates: [coords]
35
+ },
36
+ properties: {}
37
+ };
38
+ }
39
+ let SigveloMaplibreCircle = class SigveloMaplibreCircle extends LitElement {
40
+ static {
41
+ this.styles = [circle_styles_default];
42
+ }
43
+ constructor() {
44
+ super();
45
+ this.latitude = 0;
46
+ this.longitude = 0;
47
+ this.radius = 100;
48
+ this.fillColor = "#3388ff";
49
+ this.fillOpacity = .2;
50
+ this.strokeColor = "#3388ff";
51
+ this.strokeWidth = 2;
52
+ this._mapEl = null;
53
+ const id = ++circleCounter;
54
+ this._sourceId = `sigvelo-circle-source-${id}`;
55
+ this._fillLayerId = `sigvelo-circle-fill-${id}`;
56
+ this._strokeLayerId = `sigvelo-circle-stroke-${id}`;
57
+ }
58
+ async connectedCallback() {
59
+ super.connectedCallback();
60
+ this._mapEl = this.closest("sigvelo-maplibre-map");
61
+ if (this._mapEl) {
62
+ await this._mapEl.mapReady;
63
+ this._addCircle();
64
+ }
65
+ }
66
+ disconnectedCallback() {
67
+ super.disconnectedCallback();
68
+ this._removeCircle();
69
+ }
70
+ _buildGeoJSON() {
71
+ return createCirclePolygon(this.longitude, this.latitude, this.radius);
72
+ }
73
+ _addCircle() {
74
+ const map = this._mapEl?.map;
75
+ if (!map) return;
76
+ map.addSource(this._sourceId, {
77
+ type: "geojson",
78
+ data: this._buildGeoJSON()
79
+ });
80
+ map.addLayer({
81
+ id: this._fillLayerId,
82
+ type: "fill",
83
+ source: this._sourceId,
84
+ paint: {
85
+ "fill-color": this.fillColor,
86
+ "fill-opacity": this.fillOpacity
87
+ }
88
+ });
89
+ map.addLayer({
90
+ id: this._strokeLayerId,
91
+ type: "line",
92
+ source: this._sourceId,
93
+ paint: {
94
+ "line-color": this.strokeColor,
95
+ "line-width": this.strokeWidth
96
+ }
97
+ });
98
+ }
99
+ _removeCircle() {
100
+ const map = this._mapEl?.map;
101
+ if (!map) return;
102
+ for (const id of [this._fillLayerId, this._strokeLayerId]) if (map.getLayer(id)) map.removeLayer(id);
103
+ if (map.getSource(this._sourceId)) map.removeSource(this._sourceId);
104
+ }
105
+ _updateSource() {
106
+ const map = this._mapEl?.map;
107
+ if (!map) return;
108
+ const source = map.getSource(this._sourceId);
109
+ if (source) source.setData(this._buildGeoJSON());
110
+ }
111
+ updated(changed) {
112
+ if (!this._mapEl?.map) return;
113
+ if (changed.has("latitude") || changed.has("longitude") || changed.has("radius")) this._updateSource();
114
+ if (changed.has("fillColor") || changed.has("fillOpacity")) {
115
+ if (this._mapEl.map.getLayer(this._fillLayerId)) {
116
+ this._mapEl.map.setPaintProperty(this._fillLayerId, "fill-color", this.fillColor);
117
+ this._mapEl.map.setPaintProperty(this._fillLayerId, "fill-opacity", this.fillOpacity);
118
+ }
119
+ }
120
+ if (changed.has("strokeColor") || changed.has("strokeWidth")) {
121
+ if (this._mapEl.map.getLayer(this._strokeLayerId)) {
122
+ this._mapEl.map.setPaintProperty(this._strokeLayerId, "line-color", this.strokeColor);
123
+ this._mapEl.map.setPaintProperty(this._strokeLayerId, "line-width", this.strokeWidth);
124
+ }
125
+ }
126
+ }
127
+ render() {
128
+ return html``;
129
+ }
130
+ };
131
+ __decorate([property({ type: Number })], SigveloMaplibreCircle.prototype, "latitude", void 0);
132
+ __decorate([property({ type: Number })], SigveloMaplibreCircle.prototype, "longitude", void 0);
133
+ __decorate([property({ type: Number })], SigveloMaplibreCircle.prototype, "radius", void 0);
134
+ __decorate([property({ attribute: "fill-color" })], SigveloMaplibreCircle.prototype, "fillColor", void 0);
135
+ __decorate([property({
136
+ attribute: "fill-opacity",
137
+ type: Number
138
+ })], SigveloMaplibreCircle.prototype, "fillOpacity", void 0);
139
+ __decorate([property({ attribute: "stroke-color" })], SigveloMaplibreCircle.prototype, "strokeColor", void 0);
140
+ __decorate([property({
141
+ attribute: "stroke-width",
142
+ type: Number
143
+ })], SigveloMaplibreCircle.prototype, "strokeWidth", void 0);
144
+ SigveloMaplibreCircle = __decorate([customElement("sigvelo-maplibre-circle")], SigveloMaplibreCircle);
145
+ //#endregion
146
+ export { SigveloMaplibreCircle as t };
@@ -0,0 +1,51 @@
1
+ import { LitElement, PropertyValues } from "lit";
2
+
3
+ //#region src/components/circle/circle.d.ts
4
+ /**
5
+ * A circle overlay on a MapLibre map, rendered as a GeoJSON polygon
6
+ * approximation. Must be a child of `<sigvelo-maplibre-map>`.
7
+ *
8
+ * @tag sigvelo-maplibre-circle
9
+ */
10
+ declare class SigveloMaplibreCircle extends LitElement {
11
+ /** @internal */
12
+ static styles: import("lit").CSSResult[];
13
+ /** Center latitude. */
14
+ latitude: number;
15
+ /** Center longitude. */
16
+ longitude: number;
17
+ /** Radius in meters. */
18
+ radius: number;
19
+ /** Fill color (CSS color string). */
20
+ fillColor: string;
21
+ /** Fill opacity (0-1). */
22
+ fillOpacity: number;
23
+ /** Stroke color (CSS color string). */
24
+ strokeColor: string;
25
+ /** Stroke width in pixels. */
26
+ strokeWidth: number;
27
+ /** @internal */
28
+ private _sourceId;
29
+ /** @internal */
30
+ private _fillLayerId;
31
+ /** @internal */
32
+ private _strokeLayerId;
33
+ /** @internal */
34
+ private _mapEl;
35
+ constructor();
36
+ connectedCallback(): Promise<void>;
37
+ disconnectedCallback(): void;
38
+ private _buildGeoJSON;
39
+ private _addCircle;
40
+ private _removeCircle;
41
+ private _updateSource;
42
+ protected updated(changed: PropertyValues): void;
43
+ render(): import("lit-html").TemplateResult<1>;
44
+ }
45
+ declare global {
46
+ interface HTMLElementTagNameMap {
47
+ "sigvelo-maplibre-circle": SigveloMaplibreCircle;
48
+ }
49
+ }
50
+ //#endregion
51
+ export { SigveloMaplibreCircle };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibreCircle } from "../../circle-CFH3gDcY.js";
2
+ export { SigveloMaplibreCircle };
@@ -0,0 +1,42 @@
1
+ import { LitElement } from "lit";
2
+
3
+ //#region src/components/control/control.d.ts
4
+ type ControlPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
5
+ /**
6
+ * A generic control container for a MapLibre map. Wraps arbitrary content
7
+ * and places it in one of MapLibre's four control corners, stacking properly
8
+ * with navigation, attribution, and other controls.
9
+ *
10
+ * @tag sigvelo-maplibre-control
11
+ *
12
+ * @example
13
+ * ```html
14
+ * <sigvelo-maplibre-map>
15
+ * <sigvelo-maplibre-control position="bottom-left">
16
+ * <sigvelo-geo-legend title="Density" ...></sigvelo-geo-legend>
17
+ * </sigvelo-maplibre-control>
18
+ * </sigvelo-maplibre-map>
19
+ * ```
20
+ */
21
+ declare class SigveloMaplibreControl extends LitElement {
22
+ /** @internal */
23
+ static styles: import("lit").CSSResult[];
24
+ /** Position of the control on the map. */
25
+ position: ControlPosition;
26
+ /** @internal */
27
+ private _control;
28
+ /** @internal */
29
+ private _mapEl;
30
+ connectedCallback(): Promise<void>;
31
+ disconnectedCallback(): void;
32
+ /** @internal */
33
+ private _addControl;
34
+ render(): import("lit-html").TemplateResult<1>;
35
+ }
36
+ declare global {
37
+ interface HTMLElementTagNameMap {
38
+ "sigvelo-maplibre-control": SigveloMaplibreControl;
39
+ }
40
+ }
41
+ //#endregion
42
+ export { SigveloMaplibreControl };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibreControl } from "../../control-Bka68vGo.js";
2
+ export { SigveloMaplibreControl };
@@ -0,0 +1,74 @@
1
+ import { LitElement, PropertyValues } from "lit";
2
+ import { GeoJsonData, StyleFunction } from "@mcp-b/geo-support/types";
3
+
4
+ //#region src/components/geojson/geojson.d.ts
5
+ /**
6
+ * Renders GeoJSON data on a MapLibre map as a source + layer.
7
+ * Must be a child of `<sigvelo-maplibre-map>`.
8
+ *
9
+ * @tag sigvelo-maplibre-geojson
10
+ *
11
+ * @event sigvelo-feature-click - Fired when a GeoJSON feature is clicked.
12
+ */
13
+ declare class SigveloMaplibreGeojson extends LitElement {
14
+ /** @internal */
15
+ static styles: import("lit").CSSResult[];
16
+ /** GeoJSON data. Set via property. */
17
+ data: GeoJsonData | null;
18
+ /**
19
+ * Per-feature style function for choropleth / thematic maps.
20
+ * When set, styles are pre-computed into feature properties and rendered
21
+ * via MapLibre data-driven expressions.
22
+ */
23
+ styleFunction: StyleFunction | null;
24
+ /** Fill color for polygon features. */
25
+ fillColor: string;
26
+ /** Fill opacity (0-1). */
27
+ fillOpacity: number;
28
+ /** Stroke/line color. */
29
+ strokeColor: string;
30
+ /** Stroke/line width in pixels. */
31
+ strokeWidth: number;
32
+ /** Circle radius for point features (in pixels). */
33
+ circleRadius: number;
34
+ /** Whether features respond to click events. */
35
+ interactive: boolean;
36
+ /** Channel name for auto-syncing with a classify panel. */
37
+ channel: string;
38
+ /** @internal */
39
+ private _sourceId;
40
+ /** @internal */
41
+ private _fillLayerId;
42
+ /** @internal */
43
+ private _lineLayerId;
44
+ /** @internal */
45
+ private _circleLayerId;
46
+ /** @internal */
47
+ private _mapEl;
48
+ /** @internal */
49
+ private _onStyleLoad;
50
+ /** @internal */
51
+ private _unsubscribeChannel;
52
+ constructor();
53
+ connectedCallback(): Promise<void>;
54
+ disconnectedCallback(): void;
55
+ /** @internal */
56
+ private _subscribeChannel;
57
+ /**
58
+ * When styleFunction is set, clone the data and inject computed style
59
+ * properties into each feature so MapLibre can use data-driven expressions.
60
+ * @internal
61
+ */
62
+ private _prepareData;
63
+ private _addSource;
64
+ private _removeSource;
65
+ protected updated(changed: PropertyValues): void;
66
+ render(): import("lit-html").TemplateResult<1>;
67
+ }
68
+ declare global {
69
+ interface HTMLElementTagNameMap {
70
+ "sigvelo-maplibre-geojson": SigveloMaplibreGeojson;
71
+ }
72
+ }
73
+ //#endregion
74
+ export { SigveloMaplibreGeojson };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibreGeojson } from "../../geojson-BW9JQxtv.js";
2
+ export { SigveloMaplibreGeojson };
@@ -0,0 +1,35 @@
1
+ import { LitElement, PropertyValues } from "lit";
2
+ import maplibregl from "maplibre-gl";
3
+
4
+ //#region src/components/layer/layer.d.ts
5
+ /**
6
+ * A generic MapLibre style layer. Allows adding custom layers to the map
7
+ * using MapLibre's layer specification. Must be a child of `<sigvelo-maplibre-map>`.
8
+ *
9
+ * @tag sigvelo-maplibre-layer
10
+ */
11
+ declare class SigveloMaplibreLayer extends LitElement {
12
+ /** @internal */
13
+ static styles: import("lit").CSSResult[];
14
+ /** The layer specification object. Set via property. */
15
+ spec: maplibregl.LayerSpecification | null;
16
+ /** Insert this layer before the specified layer ID. */
17
+ beforeId: string;
18
+ /** @internal */
19
+ private _mapEl;
20
+ /** @internal */
21
+ private _addedLayerId;
22
+ connectedCallback(): Promise<void>;
23
+ disconnectedCallback(): void;
24
+ private _addLayer;
25
+ private _removeLayer;
26
+ protected updated(changed: PropertyValues): void;
27
+ render(): import("lit-html").TemplateResult<1>;
28
+ }
29
+ declare global {
30
+ interface HTMLElementTagNameMap {
31
+ "sigvelo-maplibre-layer": SigveloMaplibreLayer;
32
+ }
33
+ }
34
+ //#endregion
35
+ export { SigveloMaplibreLayer };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibreLayer } from "../../layer-COvBRP1h.js";
2
+ export { SigveloMaplibreLayer };
@@ -0,0 +1,43 @@
1
+ import { PropertyValues } from "lit";
2
+ import { GeoMapElement } from "@mcp-b/geo-support/base/geo-map-element";
3
+ import maplibregl from "maplibre-gl";
4
+ import { FitBoundsOptions, FlyToOptions } from "@mcp-b/geo-support/types";
5
+
6
+ //#region src/components/map/map.d.ts
7
+ /**
8
+ * A MapLibre GL JS map component. Add a `<sigvelo-maplibre-tilelayer>` child
9
+ * to configure the basemap. Other child elements (markers, popups, layers)
10
+ * also register with this map.
11
+ *
12
+ * @tag sigvelo-maplibre-map
13
+ *
14
+ * @event sigvelo-map-click - Fired when the map is clicked.
15
+ * @event sigvelo-map-move - Fired while the map center is changing.
16
+ * @event sigvelo-map-moveend - Fired when map movement ends.
17
+ * @event sigvelo-map-zoom - Fired while the zoom level is changing.
18
+ * @event sigvelo-map-zoomend - Fired when zooming ends.
19
+ * @event sigvelo-map-load - Fired when the map finishes loading.
20
+ */
21
+ declare class SigveloMaplibreMap extends GeoMapElement {
22
+ /** @internal */
23
+ static styles: import("lit").CSSResult[];
24
+ /** Whether to show navigation controls (zoom + compass). */
25
+ navControl: boolean;
26
+ /** @internal */
27
+ private _map;
28
+ /** Access the underlying MapLibre map instance (after mapReady resolves). */
29
+ get map(): maplibregl.Map | null;
30
+ protected createMap(container: HTMLElement): void;
31
+ protected destroyMap(): void;
32
+ protected updateView(changed: PropertyValues): void;
33
+ protected invalidateSize(): void;
34
+ flyTo(options: FlyToOptions): void;
35
+ fitBounds(options: FitBoundsOptions): void;
36
+ }
37
+ declare global {
38
+ interface HTMLElementTagNameMap {
39
+ "sigvelo-maplibre-map": SigveloMaplibreMap;
40
+ }
41
+ }
42
+ //#endregion
43
+ export { SigveloMaplibreMap };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibreMap } from "../../map-CYqh-osb.js";
2
+ export { SigveloMaplibreMap };
@@ -0,0 +1,42 @@
1
+ import { LitElement } from "lit";
2
+ import maplibregl from "maplibre-gl";
3
+
4
+ //#region src/components/marker/marker.d.ts
5
+ /**
6
+ * A marker on a MapLibre map. Must be a child of `<sigvelo-maplibre-map>`.
7
+ * Nest a `<sigvelo-maplibre-popup>` inside for popup content.
8
+ *
9
+ * @tag sigvelo-maplibre-marker
10
+ */
11
+ declare class SigveloMaplibreMarker extends LitElement {
12
+ /** @internal */
13
+ static styles: import("lit").CSSResult[];
14
+ /** Center latitude. */
15
+ latitude: number;
16
+ /** Center longitude. */
17
+ longitude: number;
18
+ /** Marker color (CSS color string). */
19
+ color: string;
20
+ /** Whether the marker is draggable. */
21
+ draggable: boolean;
22
+ /** Scale factor for the default marker. */
23
+ scale: number;
24
+ /** @internal */
25
+ private _marker;
26
+ /** @internal */
27
+ private _mapEl;
28
+ /** Access the underlying MapLibre marker instance. */
29
+ get marker(): maplibregl.Marker | null;
30
+ connectedCallback(): Promise<void>;
31
+ disconnectedCallback(): void;
32
+ private _addMarker;
33
+ protected updated(): void;
34
+ render(): import("lit-html").TemplateResult<1>;
35
+ }
36
+ declare global {
37
+ interface HTMLElementTagNameMap {
38
+ "sigvelo-maplibre-marker": SigveloMaplibreMarker;
39
+ }
40
+ }
41
+ //#endregion
42
+ export { SigveloMaplibreMarker };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibreMarker } from "../../marker-DzWveHNW.js";
2
+ export { SigveloMaplibreMarker };
@@ -0,0 +1,46 @@
1
+ import { LitElement, PropertyValues } from "lit";
2
+
3
+ //#region src/components/polygon/polygon.d.ts
4
+ /**
5
+ * A polygon overlay on a MapLibre map. Must be a child of
6
+ * `<sigvelo-maplibre-map>`.
7
+ *
8
+ * @tag sigvelo-maplibre-polygon
9
+ */
10
+ declare class SigveloMaplibrePolygon extends LitElement {
11
+ /** @internal */
12
+ static styles: import("lit").CSSResult[];
13
+ /** Array of [lat, lng] coordinate pairs forming the polygon. Set via property. */
14
+ positions: Array<[number, number]>;
15
+ /** Fill color (CSS color string). */
16
+ fillColor: string;
17
+ /** Fill opacity (0-1). */
18
+ fillOpacity: number;
19
+ /** Stroke color (CSS color string). */
20
+ strokeColor: string;
21
+ /** Stroke width in pixels. */
22
+ strokeWidth: number;
23
+ /** @internal */
24
+ private _sourceId;
25
+ /** @internal */
26
+ private _fillLayerId;
27
+ /** @internal */
28
+ private _strokeLayerId;
29
+ /** @internal */
30
+ private _mapEl;
31
+ constructor();
32
+ connectedCallback(): Promise<void>;
33
+ disconnectedCallback(): void;
34
+ private _toGeoJSON;
35
+ private _addPolygon;
36
+ private _removePolygon;
37
+ protected updated(changed: PropertyValues): void;
38
+ render(): import("lit-html").TemplateResult<1>;
39
+ }
40
+ declare global {
41
+ interface HTMLElementTagNameMap {
42
+ "sigvelo-maplibre-polygon": SigveloMaplibrePolygon;
43
+ }
44
+ }
45
+ //#endregion
46
+ export { SigveloMaplibrePolygon };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibrePolygon } from "../../polygon-BJ-z1X7p.js";
2
+ export { SigveloMaplibrePolygon };
@@ -0,0 +1,44 @@
1
+ import { LitElement, PropertyValues } from "lit";
2
+
3
+ //#region src/components/polyline/polyline.d.ts
4
+ /**
5
+ * A polyline (line string) on a MapLibre map. Must be a child of
6
+ * `<sigvelo-maplibre-map>`.
7
+ *
8
+ * @tag sigvelo-maplibre-polyline
9
+ */
10
+ declare class SigveloMaplibrePolyline extends LitElement {
11
+ /** @internal */
12
+ static styles: import("lit").CSSResult[];
13
+ /** Array of [lat, lng] coordinate pairs. Set via property. */
14
+ positions: Array<[number, number]>;
15
+ /** Line color (CSS color string). */
16
+ color: string;
17
+ /** Line width in pixels. */
18
+ width: number;
19
+ /** Opacity (0-1). */
20
+ opacity: number;
21
+ /** Dash pattern (e.g. [5, 10]). Set via property. */
22
+ dashArray: number[];
23
+ /** @internal */
24
+ private _sourceId;
25
+ /** @internal */
26
+ private _layerId;
27
+ /** @internal */
28
+ private _mapEl;
29
+ constructor();
30
+ connectedCallback(): Promise<void>;
31
+ disconnectedCallback(): void;
32
+ private _toGeoJSON;
33
+ private _addLine;
34
+ private _removeLine;
35
+ protected updated(changed: PropertyValues): void;
36
+ render(): import("lit-html").TemplateResult<1>;
37
+ }
38
+ declare global {
39
+ interface HTMLElementTagNameMap {
40
+ "sigvelo-maplibre-polyline": SigveloMaplibrePolyline;
41
+ }
42
+ }
43
+ //#endregion
44
+ export { SigveloMaplibrePolyline };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibrePolyline } from "../../polyline-Dt4yBInz.js";
2
+ export { SigveloMaplibrePolyline };
@@ -0,0 +1,27 @@
1
+ import { LitElement } from "lit";
2
+
3
+ //#region src/components/popup/popup.d.ts
4
+ /**
5
+ * Popup content for a MapLibre marker. Nest inside a
6
+ * `<sigvelo-maplibre-marker>` to attach to a marker.
7
+ *
8
+ * Content is provided via the default slot (Light DOM) so Sigvelo design
9
+ * tokens and components render correctly.
10
+ *
11
+ * @tag sigvelo-maplibre-popup
12
+ * @slot - Popup content.
13
+ */
14
+ declare class SigveloMaplibrePopup extends LitElement {
15
+ /** @internal */
16
+ static styles: import("lit").CSSResult[];
17
+ /** Maximum width of the popup in pixels. */
18
+ maxWidth: number;
19
+ render(): import("lit-html").TemplateResult<1>;
20
+ }
21
+ declare global {
22
+ interface HTMLElementTagNameMap {
23
+ "sigvelo-maplibre-popup": SigveloMaplibrePopup;
24
+ }
25
+ }
26
+ //#endregion
27
+ export { SigveloMaplibrePopup };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibrePopup } from "../../popup-BNRD9rNd.js";
2
+ export { SigveloMaplibrePopup };
@@ -0,0 +1,33 @@
1
+ import { LitElement } from "lit";
2
+
3
+ //#region src/components/scale-control/scale-control.d.ts
4
+ /**
5
+ * A scale control for a MapLibre map. Must be a child of `<sigvelo-maplibre-map>`.
6
+ *
7
+ * @tag sigvelo-maplibre-scale-control
8
+ */
9
+ declare class SigveloMaplibreScaleControl extends LitElement {
10
+ /** @internal */
11
+ static styles: import("lit").CSSResult[];
12
+ /** Position of the control on the map. */
13
+ position: "top-left" | "top-right" | "bottom-left" | "bottom-right";
14
+ /** Unit system for the scale bar. */
15
+ unit: "imperial" | "metric" | "nautical";
16
+ /** Maximum width of the scale bar in pixels. */
17
+ maxWidth: number;
18
+ /** @internal */
19
+ private _control;
20
+ /** @internal */
21
+ private _mapEl;
22
+ connectedCallback(): Promise<void>;
23
+ disconnectedCallback(): void;
24
+ private _addControl;
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ "sigvelo-maplibre-scale-control": SigveloMaplibreScaleControl;
30
+ }
31
+ }
32
+ //#endregion
33
+ export { SigveloMaplibreScaleControl };
@@ -0,0 +1,2 @@
1
+ import { t as SigveloMaplibreScaleControl } from "../../scale-control-DPWq0EHU.js";
2
+ export { SigveloMaplibreScaleControl };