@mcp-b/geo-leaflet 0.3.12 → 0.4.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/dist/components/choropleth/choropleth.d.ts +5 -4
- package/dist/components/choropleth/choropleth.js +11 -11
- package/dist/components/circle/circle.d.ts +2 -4
- package/dist/components/circle/circle.js +2 -2
- package/dist/components/control/control.d.ts +2 -4
- package/dist/components/control/control.js +2 -2
- package/dist/components/geojson/geojson.d.ts +2 -4
- package/dist/components/geojson/geojson.js +2 -2
- package/dist/components/map/map.d.ts +2 -4
- package/dist/components/map/map.js +1 -1
- package/dist/components/marker/marker.d.ts +2 -4
- package/dist/components/marker/marker.js +2 -2
- package/dist/components/polygon/polygon.d.ts +2 -4
- package/dist/components/polygon/polygon.js +2 -2
- package/dist/components/polyline/polyline.d.ts +2 -4
- package/dist/components/polyline/polyline.js +2 -2
- package/dist/components/popup/popup.d.ts +2 -4
- package/dist/components/popup/popup.js +1 -1
- package/dist/components/scale-control/scale-control.d.ts +2 -4
- package/dist/components/scale-control/scale-control.js +2 -2
- package/dist/components/tilelayer/tilelayer.d.ts +2 -4
- package/dist/components/tilelayer/tilelayer.js +2 -2
- package/dist/{decorate-DcF3lt7P.js → decorate-BkO8ArQg.js} +1 -1
- package/dist/default-icon-CaxrMD1A.d.ts +1 -0
- package/dist/default-icon.d.ts +1 -1
- package/dist/default-icon.js +1 -1
- package/dist/docs/custom-elements.json +1 -1
- package/dist/index.js +1 -1
- package/dist/{leaflet-src-DkjKLRUt.js → leaflet-src-Dd019lFU.js} +33 -30
- package/dist/{map-ChMH_5_A.js → map-Dlp2kjAp.js} +6 -6
- package/package.json +14 -14
- package/dist/default-icon-BVVgDSdq.d.ts +0 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import "../control/control.js";
|
|
2
|
+
import "../geojson/geojson.js";
|
|
1
3
|
import { PropertyValues } from "lit";
|
|
4
|
+
import "@mcp-b/geo-support/components/legend/legend";
|
|
2
5
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
6
|
import { ClassificationMethod, GeoJsonFeatureCollection } from "@mcp-b/geo-support/types";
|
|
4
|
-
|
|
5
7
|
//#region src/components/choropleth/choropleth.d.ts
|
|
6
8
|
type ChoroplethRow = Readonly<Record<string, string | number | boolean | null>>;
|
|
7
9
|
/**
|
|
@@ -10,7 +12,7 @@ type ChoroplethRow = Readonly<Record<string, string | number | boolean | null>>;
|
|
|
10
12
|
*
|
|
11
13
|
* @tag sigvelo-leaflet-choropleth
|
|
12
14
|
*/
|
|
13
|
-
declare class SigveloLeafletChoropleth extends SigveloElement {
|
|
15
|
+
export declare class SigveloLeafletChoropleth extends SigveloElement {
|
|
14
16
|
static styles: import("lit").CSSResult;
|
|
15
17
|
/** Trusted GeoJSON supplied by the host application. */
|
|
16
18
|
data: GeoJsonFeatureCollection;
|
|
@@ -64,5 +66,4 @@ declare global {
|
|
|
64
66
|
"sigvelo-leaflet-choropleth": SigveloLeafletChoropleth;
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
|
-
//#endregion
|
|
68
|
-
export { SigveloLeafletChoropleth };
|
|
69
|
+
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
2
2
|
import "../geojson/geojson.js";
|
|
3
3
|
import "../control/control.js";
|
|
4
4
|
import { css, html, nothing } from "lit";
|
|
@@ -152,17 +152,17 @@ let SigveloLeafletChoropleth = class SigveloLeafletChoropleth extends SigveloEle
|
|
|
152
152
|
stroke-width="1"
|
|
153
153
|
></sigvelo-leaflet-geojson>
|
|
154
154
|
${this.sourceLoading || this.sourceError ? html`<sigvelo-leaflet-control position="top-left">
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
<div class="status" role=${this.sourceError ? "alert" : "status"}>
|
|
156
|
+
${this.sourceError || "Loading geography…"}
|
|
157
|
+
</div>
|
|
158
|
+
</sigvelo-leaflet-control>` : nothing}
|
|
159
159
|
${result.colors.length > 0 ? html`<sigvelo-leaflet-control position=${this.legendPosition}>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
<sigvelo-geo-legend
|
|
161
|
+
title=${this.legendTitle || this.property}
|
|
162
|
+
.breaks=${result.breaks}
|
|
163
|
+
.colors=${result.colors}
|
|
164
|
+
></sigvelo-geo-legend>
|
|
165
|
+
</sigvelo-leaflet-control>` : nothing}
|
|
166
166
|
`;
|
|
167
167
|
}
|
|
168
168
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
|
-
|
|
3
2
|
//#region src/components/circle/circle.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A circle overlay on a Leaflet map. Must be a child of `<sigvelo-leaflet-map>`.
|
|
6
5
|
*
|
|
7
6
|
* @tag sigvelo-leaflet-circle
|
|
8
7
|
*/
|
|
9
|
-
declare class SigveloLeafletCircle extends LitElement {
|
|
8
|
+
export declare class SigveloLeafletCircle extends LitElement {
|
|
10
9
|
/** @internal */
|
|
11
10
|
static styles: import("lit").CSSResult[];
|
|
12
11
|
/** Center latitude. */
|
|
@@ -39,5 +38,4 @@ declare global {
|
|
|
39
38
|
"sigvelo-leaflet-circle": SigveloLeafletCircle;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { SigveloLeafletCircle };
|
|
41
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-
|
|
2
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-Dd019lFU.js";
|
|
2
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
3
3
|
import { LitElement, html } from "lit";
|
|
4
4
|
import { customElement, property } from "lit/decorators.js";
|
|
5
5
|
import { findMapElement } from "@mcp-b/geo-support/base/find-map-element";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
2
|
import { ControlPosition } from "@mcp-b/geo-support/types";
|
|
3
|
-
|
|
4
3
|
//#region src/components/control/control.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* A generic control container for a Leaflet map. Wraps arbitrary content
|
|
@@ -20,7 +19,7 @@ import { ControlPosition } from "@mcp-b/geo-support/types";
|
|
|
20
19
|
* </sigvelo-leaflet-map>
|
|
21
20
|
* ```
|
|
22
21
|
*/
|
|
23
|
-
declare class SigveloLeafletControl extends LitElement {
|
|
22
|
+
export declare class SigveloLeafletControl extends LitElement {
|
|
24
23
|
/** @internal */
|
|
25
24
|
static styles: import("lit").CSSResult[];
|
|
26
25
|
/** Position of the control on the map. */
|
|
@@ -45,5 +44,4 @@ declare global {
|
|
|
45
44
|
"sigvelo-leaflet-control": SigveloLeafletControl;
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
//#endregion
|
|
49
|
-
export { SigveloLeafletControl };
|
|
47
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-
|
|
2
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-Dd019lFU.js";
|
|
2
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
3
3
|
import { LitElement, html } from "lit";
|
|
4
4
|
import { customElement, property } from "lit/decorators.js";
|
|
5
5
|
import { findMapElement } from "@mcp-b/geo-support/base/find-map-element";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
2
|
import { GeoJsonData, StyleFunction } from "@mcp-b/geo-support/types";
|
|
3
3
|
import * as L from "leaflet";
|
|
4
|
-
|
|
5
4
|
//#region src/components/geojson/geojson.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Renders GeoJSON data on a Leaflet map. Must be a child of `<sigvelo-leaflet-map>`.
|
|
@@ -10,7 +9,7 @@ import * as L from "leaflet";
|
|
|
10
9
|
*
|
|
11
10
|
* @event sigvelo-feature-click - Fired when a GeoJSON feature is clicked.
|
|
12
11
|
*/
|
|
13
|
-
declare class SigveloLeafletGeojson extends LitElement {
|
|
12
|
+
export declare class SigveloLeafletGeojson extends LitElement {
|
|
14
13
|
/** @internal */
|
|
15
14
|
static styles: import("lit").CSSResult[];
|
|
16
15
|
/** GeoJSON data (Feature or FeatureCollection). Set via property, not attribute. */
|
|
@@ -76,5 +75,4 @@ declare global {
|
|
|
76
75
|
"sigvelo-leaflet-geojson": SigveloLeafletGeojson;
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
|
-
//#endregion
|
|
80
|
-
export { SigveloLeafletGeojson };
|
|
78
|
+
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-Dd019lFU.js";
|
|
2
2
|
import "../../default-icon.js";
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
3
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
4
4
|
import { LitElement, html } from "lit";
|
|
5
5
|
import { customElement, property } from "lit/decorators.js";
|
|
6
6
|
import { SigveloFeatureClickEvent } from "@mcp-b/geo-support/events";
|
|
@@ -2,7 +2,6 @@ import { PropertyValues } from "lit";
|
|
|
2
2
|
import { GeoMapElement } from "@mcp-b/geo-support/base/geo-map-element";
|
|
3
3
|
import { FitBoundsOptions, FlyToOptions } from "@mcp-b/geo-support/types";
|
|
4
4
|
import * as L from "leaflet";
|
|
5
|
-
|
|
6
5
|
//#region src/components/map/map.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* A Leaflet map component. Wrap tile layers, markers, and other geo elements
|
|
@@ -17,7 +16,7 @@ import * as L from "leaflet";
|
|
|
17
16
|
* @event sigvelo-map-zoomend - Fired when zooming ends.
|
|
18
17
|
* @event sigvelo-map-load - Fired when the map finishes loading.
|
|
19
18
|
*/
|
|
20
|
-
declare class SigveloLeafletMap extends GeoMapElement {
|
|
19
|
+
export declare class SigveloLeafletMap extends GeoMapElement {
|
|
21
20
|
/** @internal */
|
|
22
21
|
static styles: import("lit").CSSResult[];
|
|
23
22
|
/** Whether to show default zoom controls. */
|
|
@@ -43,5 +42,4 @@ declare global {
|
|
|
43
42
|
"sigvelo-leaflet-map": SigveloLeafletMap;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
//#endregion
|
|
47
|
-
export { SigveloLeafletMap };
|
|
45
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SigveloLeafletMap } from "../../map-
|
|
1
|
+
import { t as SigveloLeafletMap } from "../../map-Dlp2kjAp.js";
|
|
2
2
|
export { SigveloLeafletMap };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import * as L from "leaflet";
|
|
3
|
-
|
|
4
3
|
//#region src/components/marker/marker.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* A marker on a Leaflet map. Must be a child of `<sigvelo-leaflet-map>`.
|
|
@@ -8,7 +7,7 @@ import * as L from "leaflet";
|
|
|
8
7
|
*
|
|
9
8
|
* @tag sigvelo-leaflet-marker
|
|
10
9
|
*/
|
|
11
|
-
declare class SigveloLeafletMarker extends LitElement {
|
|
10
|
+
export declare class SigveloLeafletMarker extends LitElement {
|
|
12
11
|
/** @internal */
|
|
13
12
|
static styles: import("lit").CSSResult[];
|
|
14
13
|
/** Marker latitude. */
|
|
@@ -49,5 +48,4 @@ declare global {
|
|
|
49
48
|
"sigvelo-leaflet-marker": SigveloLeafletMarker;
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
|
-
//#endregion
|
|
53
|
-
export { SigveloLeafletMarker };
|
|
51
|
+
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-Dd019lFU.js";
|
|
2
2
|
import "../../default-icon.js";
|
|
3
|
-
import { t as __decorate } from "../../decorate-
|
|
3
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
4
4
|
import { LitElement, html } from "lit";
|
|
5
5
|
import { customElement, property } from "lit/decorators.js";
|
|
6
6
|
import { findMapElement } from "@mcp-b/geo-support/base/find-map-element";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
|
-
|
|
3
2
|
//#region src/components/polygon/polygon.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A polygon overlay on a Leaflet map. Must be a child of `<sigvelo-leaflet-map>`.
|
|
6
5
|
*
|
|
7
6
|
* @tag sigvelo-leaflet-polygon
|
|
8
7
|
*/
|
|
9
|
-
declare class SigveloLeafletPolygon extends LitElement {
|
|
8
|
+
export declare class SigveloLeafletPolygon extends LitElement {
|
|
10
9
|
/** @internal */
|
|
11
10
|
static styles: import("lit").CSSResult[];
|
|
12
11
|
/** Array of [lat, lng] coordinate pairs forming the polygon. Set via property. */
|
|
@@ -35,5 +34,4 @@ declare global {
|
|
|
35
34
|
"sigvelo-leaflet-polygon": SigveloLeafletPolygon;
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
//#endregion
|
|
39
|
-
export { SigveloLeafletPolygon };
|
|
37
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-
|
|
2
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-Dd019lFU.js";
|
|
2
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
3
3
|
import { LitElement, html } from "lit";
|
|
4
4
|
import { customElement, property } from "lit/decorators.js";
|
|
5
5
|
import { findMapElement } from "@mcp-b/geo-support/base/find-map-element";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
|
-
|
|
3
2
|
//#region src/components/polyline/polyline.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A polyline overlay on a Leaflet map. Must be a child of `<sigvelo-leaflet-map>`.
|
|
6
5
|
*
|
|
7
6
|
* @tag sigvelo-leaflet-polyline
|
|
8
7
|
*/
|
|
9
|
-
declare class SigveloLeafletPolyline extends LitElement {
|
|
8
|
+
export declare class SigveloLeafletPolyline extends LitElement {
|
|
10
9
|
/** @internal */
|
|
11
10
|
static styles: import("lit").CSSResult[];
|
|
12
11
|
/** Array of [lat, lng] coordinate pairs. Set via property. */
|
|
@@ -35,5 +34,4 @@ declare global {
|
|
|
35
34
|
"sigvelo-leaflet-polyline": SigveloLeafletPolyline;
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
//#endregion
|
|
39
|
-
export { SigveloLeafletPolyline };
|
|
37
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-
|
|
2
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-Dd019lFU.js";
|
|
2
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
3
3
|
import { LitElement, html } from "lit";
|
|
4
4
|
import { customElement, property } from "lit/decorators.js";
|
|
5
5
|
import { findMapElement } from "@mcp-b/geo-support/base/find-map-element";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
|
|
3
2
|
//#region src/components/popup/popup.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Popup content for a Leaflet marker or map. Nest inside a
|
|
@@ -12,7 +11,7 @@ import { LitElement } from "lit";
|
|
|
12
11
|
* @tag sigvelo-leaflet-popup
|
|
13
12
|
* @slot - Popup content.
|
|
14
13
|
*/
|
|
15
|
-
declare class SigveloLeafletPopup extends LitElement {
|
|
14
|
+
export declare class SigveloLeafletPopup extends LitElement {
|
|
16
15
|
/** @internal */
|
|
17
16
|
static styles: import("lit").CSSResult[];
|
|
18
17
|
/** Maximum width of the popup in pixels. */
|
|
@@ -26,5 +25,4 @@ declare global {
|
|
|
26
25
|
"sigvelo-leaflet-popup": SigveloLeafletPopup;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { SigveloLeafletPopup };
|
|
28
|
+
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
2
2
|
import { LitElement, html } from "lit";
|
|
3
3
|
import { customElement, property } from "lit/decorators.js";
|
|
4
4
|
import styles from "@mcp-b/geo-support/styles/map-child.styles";
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import * as L from "leaflet";
|
|
3
|
-
|
|
4
3
|
//#region src/components/scale-control/scale-control.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* A scale bar control for a Leaflet map. Must be a child of `<sigvelo-leaflet-map>`.
|
|
7
6
|
*
|
|
8
7
|
* @tag sigvelo-leaflet-scale-control
|
|
9
8
|
*/
|
|
10
|
-
declare class SigveloLeafletScaleControl extends LitElement {
|
|
9
|
+
export declare class SigveloLeafletScaleControl extends LitElement {
|
|
11
10
|
/** @internal */
|
|
12
11
|
static styles: import("lit").CSSResult[];
|
|
13
12
|
/** Position of the control on the map. */
|
|
@@ -33,5 +32,4 @@ declare global {
|
|
|
33
32
|
"sigvelo-leaflet-scale-control": SigveloLeafletScaleControl;
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
|
-
//#endregion
|
|
37
|
-
export { SigveloLeafletScaleControl };
|
|
35
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-
|
|
2
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-Dd019lFU.js";
|
|
2
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
3
3
|
import { LitElement, html } from "lit";
|
|
4
4
|
import { customElement, property } from "lit/decorators.js";
|
|
5
5
|
import { findMapElement } from "@mcp-b/geo-support/base/find-map-element";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
|
-
|
|
3
2
|
//#region src/components/tilelayer/tilelayer.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A tile layer for a Leaflet map. Must be a child of `<sigvelo-leaflet-map>`.
|
|
6
5
|
*
|
|
7
6
|
* @tag sigvelo-leaflet-tilelayer
|
|
8
7
|
*/
|
|
9
|
-
declare class SigveloLeafletTilelayer extends LitElement {
|
|
8
|
+
export declare class SigveloLeafletTilelayer extends LitElement {
|
|
10
9
|
/** @internal */
|
|
11
10
|
static styles: import("lit").CSSResult[];
|
|
12
11
|
/** URL template for tiles (e.g. `https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`). */
|
|
@@ -39,5 +38,4 @@ declare global {
|
|
|
39
38
|
"sigvelo-leaflet-tilelayer": SigveloLeafletTilelayer;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { SigveloLeafletTilelayer };
|
|
41
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-
|
|
2
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "../../leaflet-src-Dd019lFU.js";
|
|
2
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
3
3
|
import { LitElement, html } from "lit";
|
|
4
4
|
import { customElement, property } from "lit/decorators.js";
|
|
5
5
|
import { findMapElement } from "@mcp-b/geo-support/base/find-map-element";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.148.0/helpers/esm/decorate.js
|
|
2
2
|
function __decorate(decorators, target, key, desc) {
|
|
3
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/default-icon.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./default-icon-CaxrMD1A.js";
|
package/dist/default-icon.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "./leaflet-src-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "./leaflet-src-Dd019lFU.js";
|
|
2
2
|
import { t as marker_icon_default } from "./marker-icon-Bv3BCQL8.js";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/default-icon.ts
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SigveloLeafletMap } from "./map-
|
|
1
|
+
import { t as SigveloLeafletMap } from "./map-Dlp2kjAp.js";
|
|
2
2
|
import { SigveloLeafletTilelayer } from "./components/tilelayer/tilelayer.js";
|
|
3
3
|
import { SigveloLeafletMarker } from "./components/marker/marker.js";
|
|
4
4
|
import { SigveloLeafletPopup } from "./components/popup/popup.js";
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
@@ -33,8 +33,8 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
33
33
|
"use strict";
|
|
34
34
|
var version = "1.9.4";
|
|
35
35
|
function extend(dest) {
|
|
36
|
-
var i, j, len, src;
|
|
37
|
-
for (
|
|
36
|
+
var i, j = 1, len = arguments.length, src;
|
|
37
|
+
for (; j < len; j++) {
|
|
38
38
|
src = arguments[j];
|
|
39
39
|
for (i in src) dest[i] = src[i];
|
|
40
40
|
}
|
|
@@ -801,8 +801,8 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
801
801
|
return document.createElementNS("http://www.w3.org/2000/svg", name);
|
|
802
802
|
}
|
|
803
803
|
function pointsToPath(rings, closed) {
|
|
804
|
-
var str = "", i, j, len, len2, points, p;
|
|
805
|
-
for (
|
|
804
|
+
var str = "", i = 0, j, len = rings.length, len2, points, p;
|
|
805
|
+
for (; i < len; i++) {
|
|
806
806
|
points = rings[i];
|
|
807
807
|
for (j = 0, len2 = points.length; j < len2; j++) {
|
|
808
808
|
p = points[j];
|
|
@@ -1282,15 +1282,16 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1282
1282
|
var originalHandler = handler;
|
|
1283
1283
|
if (!Browser.touchNative && Browser.pointer && type.indexOf("touch") === 0) handler = addPointerListener(obj, type, handler);
|
|
1284
1284
|
else if (Browser.touch && type === "dblclick") handler = addDoubleTapListener(obj, handler);
|
|
1285
|
-
else if ("addEventListener" in obj)
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1285
|
+
else if ("addEventListener" in obj) {
|
|
1286
|
+
if (type === "touchstart" || type === "touchmove" || type === "wheel" || type === "mousewheel") obj.addEventListener(mouseSubst[type] || type, handler, Browser.passiveEvents ? { passive: false } : false);
|
|
1287
|
+
else if (type === "mouseenter" || type === "mouseleave") {
|
|
1288
|
+
handler = function(e) {
|
|
1289
|
+
e = e || window.event;
|
|
1290
|
+
if (isExternalTarget(obj, e)) originalHandler(e);
|
|
1291
|
+
};
|
|
1292
|
+
obj.addEventListener(mouseSubst[type], handler, false);
|
|
1293
|
+
} else obj.addEventListener(type, originalHandler, false);
|
|
1294
|
+
} else obj.attachEvent("on" + type, handler);
|
|
1294
1295
|
obj[eventsKey] = obj[eventsKey] || {};
|
|
1295
1296
|
obj[eventsKey][id] = handler;
|
|
1296
1297
|
}
|
|
@@ -2816,8 +2817,8 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2816
2817
|
4,
|
|
2817
2818
|
2,
|
|
2818
2819
|
8
|
|
2819
|
-
], i, j, k, a, b, len, edge, p;
|
|
2820
|
-
for (
|
|
2820
|
+
], i = 0, j, k, a, b, len = points.length, edge, p;
|
|
2821
|
+
for (; i < len; i++) points[i]._code = _getBitCode(points[i], bounds);
|
|
2821
2822
|
for (k = 0; k < 4; k++) {
|
|
2822
2823
|
edge = edges[k];
|
|
2823
2824
|
clippedPoints = [];
|
|
@@ -2911,8 +2912,8 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2911
2912
|
return newPoints;
|
|
2912
2913
|
}
|
|
2913
2914
|
function _simplifyDPStep(points, markers, sqTolerance, first, last) {
|
|
2914
|
-
var maxSqDist = 0, index, i, sqDist;
|
|
2915
|
-
for (
|
|
2915
|
+
var maxSqDist = 0, index, i = first + 1, sqDist;
|
|
2916
|
+
for (; i <= last - 1; i++) {
|
|
2916
2917
|
sqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true);
|
|
2917
2918
|
if (sqDist > maxSqDist) {
|
|
2918
2919
|
index = i;
|
|
@@ -3929,8 +3930,8 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3929
3930
|
this._parts = this._rings;
|
|
3930
3931
|
return;
|
|
3931
3932
|
}
|
|
3932
|
-
var parts = this._parts, i, j, k, len, len2, segment, points;
|
|
3933
|
-
for (
|
|
3933
|
+
var parts = this._parts, i = 0, j, k = 0, len = this._rings.length, len2, segment, points;
|
|
3934
|
+
for (; i < len; i++) {
|
|
3934
3935
|
points = this._rings[i];
|
|
3935
3936
|
for (j = 0, len2 = points.length; j < len2 - 1; j++) {
|
|
3936
3937
|
segment = clipSegment(points[j], points[j + 1], bounds, j, true);
|
|
@@ -4519,10 +4520,12 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4519
4520
|
if (!source) return false;
|
|
4520
4521
|
this._source = source;
|
|
4521
4522
|
}
|
|
4522
|
-
if (!latlng)
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4523
|
+
if (!latlng) {
|
|
4524
|
+
if (source.getCenter) latlng = source.getCenter();
|
|
4525
|
+
else if (source.getLatLng) latlng = source.getLatLng();
|
|
4526
|
+
else if (source.getBounds) latlng = source.getBounds().getCenter();
|
|
4527
|
+
else throw new Error("Unable to get source layer LatLng.");
|
|
4528
|
+
}
|
|
4526
4529
|
this.setLatLng(latlng);
|
|
4527
4530
|
if (this._map) this.update();
|
|
4528
4531
|
return true;
|
|
@@ -5772,8 +5775,8 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5772
5775
|
},
|
|
5773
5776
|
_updateDashArray: function(layer) {
|
|
5774
5777
|
if (typeof layer.options.dashArray === "string") {
|
|
5775
|
-
var parts = layer.options.dashArray.split(/[, ]+/), dashArray = [], dashValue, i;
|
|
5776
|
-
for (
|
|
5778
|
+
var parts = layer.options.dashArray.split(/[, ]+/), dashArray = [], dashValue, i = 0;
|
|
5779
|
+
for (; i < parts.length; i++) {
|
|
5777
5780
|
dashValue = Number(parts[i]);
|
|
5778
5781
|
if (isNaN(dashValue)) return;
|
|
5779
5782
|
dashArray.push(dashValue);
|
|
@@ -6476,15 +6479,15 @@ var require_leaflet_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6476
6479
|
this._map.fire("blur");
|
|
6477
6480
|
},
|
|
6478
6481
|
_setPanDelta: function(panDelta) {
|
|
6479
|
-
var keys = this._panKeys = {}, codes = this.keyCodes, i, len;
|
|
6480
|
-
for (
|
|
6482
|
+
var keys = this._panKeys = {}, codes = this.keyCodes, i = 0, len = codes.left.length;
|
|
6483
|
+
for (; i < len; i++) keys[codes.left[i]] = [-1 * panDelta, 0];
|
|
6481
6484
|
for (i = 0, len = codes.right.length; i < len; i++) keys[codes.right[i]] = [panDelta, 0];
|
|
6482
6485
|
for (i = 0, len = codes.down.length; i < len; i++) keys[codes.down[i]] = [0, panDelta];
|
|
6483
6486
|
for (i = 0, len = codes.up.length; i < len; i++) keys[codes.up[i]] = [0, -1 * panDelta];
|
|
6484
6487
|
},
|
|
6485
6488
|
_setZoomDelta: function(zoomDelta) {
|
|
6486
|
-
var keys = this._zoomKeys = {}, codes = this.keyCodes, i, len;
|
|
6487
|
-
for (
|
|
6489
|
+
var keys = this._zoomKeys = {}, codes = this.keyCodes, i = 0, len = codes.zoomIn.length;
|
|
6490
|
+
for (; i < len; i++) keys[codes.zoomIn[i]] = zoomDelta;
|
|
6488
6491
|
for (i = 0, len = codes.zoomOut.length; i < len; i++) keys[codes.zoomOut[i]] = -zoomDelta;
|
|
6489
6492
|
},
|
|
6490
6493
|
_addHooks: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as __toESM, t as require_leaflet_src } from "./leaflet-src-
|
|
1
|
+
import { n as __toESM, t as require_leaflet_src } from "./leaflet-src-Dd019lFU.js";
|
|
2
2
|
import { t as marker_icon_default } from "./marker-icon-Bv3BCQL8.js";
|
|
3
|
-
import { t as __decorate } from "./decorate-
|
|
3
|
+
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
4
4
|
import { css, html, unsafeCSS } from "lit";
|
|
5
5
|
import { customElement, property, query } from "lit/decorators.js";
|
|
6
6
|
import { GeoMapElement } from "@mcp-b/geo-support/base/geo-map-element";
|
|
@@ -218,10 +218,10 @@ let SigveloLeafletMap = class SigveloLeafletMap extends GeoMapElement {
|
|
|
218
218
|
<div class="map-layout">
|
|
219
219
|
<div class="map-host" part="map"></div>
|
|
220
220
|
${this.attributionControl ? html`<footer
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
class="attribution-footer"
|
|
222
|
+
part="attribution"
|
|
223
|
+
aria-label="Map attribution"
|
|
224
|
+
></footer>` : null}
|
|
225
225
|
</div>
|
|
226
226
|
<slot></slot>
|
|
227
227
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-b/geo-leaflet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Leaflet web components for Sigvelo, built with Lit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"custom-elements",
|
|
@@ -33,29 +33,29 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@mcp-b/geo-support": "0.3.
|
|
37
|
-
"@mcp-b/wc-support": "0.3.
|
|
36
|
+
"@mcp-b/geo-support": "0.3.13",
|
|
37
|
+
"@mcp-b/wc-support": "0.3.13"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@custom-elements-manifest/analyzer": "^0.
|
|
41
|
-
"@storybook/addon-a11y": "
|
|
42
|
-
"@storybook/addon-docs": "
|
|
43
|
-
"@storybook/addon-vitest": "
|
|
40
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
41
|
+
"@storybook/addon-a11y": "10.5.7",
|
|
42
|
+
"@storybook/addon-docs": "10.5.7",
|
|
43
|
+
"@storybook/addon-vitest": "10.5.7",
|
|
44
44
|
"@storybook/web-components-vite": "10.5.7",
|
|
45
45
|
"@types/leaflet": "^1.9.22",
|
|
46
|
-
"@vitest/browser-playwright": "^4.1.
|
|
47
|
-
"@vitest/coverage-v8": "^4.1.
|
|
46
|
+
"@vitest/browser-playwright": "^4.1.11",
|
|
47
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
48
48
|
"@wc-toolkit/cem-inheritance": "^1.2.5",
|
|
49
49
|
"@wc-toolkit/cem-sorter": "^1.0.1",
|
|
50
50
|
"@wc-toolkit/type-parser": "^1.3.1",
|
|
51
51
|
"leaflet": "^1.9.4",
|
|
52
|
-
"playwright": "
|
|
53
|
-
"storybook": "
|
|
52
|
+
"playwright": "1.61.1",
|
|
53
|
+
"storybook": "10.5.7",
|
|
54
54
|
"tinyglobby": "^0.2.17",
|
|
55
55
|
"typescript": "^6.0.3",
|
|
56
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.
|
|
57
|
-
"vite-plugin-static-copy": "^
|
|
58
|
-
"vitest": "^4.1.
|
|
56
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
|
|
57
|
+
"vite-plugin-static-copy": "^4.1.1",
|
|
58
|
+
"vitest": "^4.1.11"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"leaflet": "^1.9.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|