maplair 4.0.0-alpha.2 → 4.1.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/CHANGELOG.md +140 -38
- package/LICENSE +1 -1
- package/README.md +10 -9
- package/dist/esm/Maplair.js +14 -14
- package/dist/esm/control/AttributionControl.js +24 -14
- package/dist/esm/control/AttributionControl.js.map +1 -1
- package/dist/esm/control/ButtonControl.js +9 -11
- package/dist/esm/control/ButtonControl.js.map +1 -1
- package/dist/esm/control/ContextMenu.js +1 -3
- package/dist/esm/control/ContextMenu.js.map +1 -1
- package/dist/esm/control/Control.js +9 -16
- package/dist/esm/control/Control.js.map +1 -1
- package/dist/esm/control/FullscreenControl.js +5 -7
- package/dist/esm/control/FullscreenControl.js.map +1 -1
- package/dist/esm/control/LayersControl.js +144 -35
- package/dist/esm/control/LayersControl.js.map +1 -1
- package/dist/esm/control/LegendControl.js +7 -9
- package/dist/esm/control/LegendControl.js.map +1 -1
- package/dist/esm/control/MiniMapControl.js +14 -16
- package/dist/esm/control/MiniMapControl.js.map +1 -1
- package/dist/esm/control/RotateControl.js +1 -3
- package/dist/esm/control/RotateControl.js.map +1 -1
- package/dist/esm/control/ScaleControl.js +7 -9
- package/dist/esm/control/ScaleControl.js.map +1 -1
- package/dist/esm/control/SearchControl.js +100 -18
- package/dist/esm/control/SearchControl.js.map +1 -1
- package/dist/esm/control/SideBySideControl.js +1 -3
- package/dist/esm/control/SideBySideControl.js.map +1 -1
- package/dist/esm/control/TextControl.js +5 -7
- package/dist/esm/control/TextControl.js.map +1 -1
- package/dist/esm/control/TimeControl.js +408 -0
- package/dist/esm/control/TimeControl.js.map +1 -0
- package/dist/esm/control/ZoomControl.js +5 -7
- package/dist/esm/control/ZoomControl.js.map +1 -1
- package/dist/esm/core/Class.js +28 -37
- package/dist/esm/core/Class.js.map +1 -1
- package/dist/esm/core/Events.js +21 -8
- package/dist/esm/core/Events.js.map +1 -1
- package/dist/esm/core/Handler.js +13 -11
- package/dist/esm/core/Handler.js.map +1 -1
- package/dist/esm/core/Util.js +13 -1
- package/dist/esm/core/Util.js.map +1 -1
- package/dist/esm/dom/DomEvent.DoubleTap.js +25 -22
- package/dist/esm/dom/DomEvent.DoubleTap.js.map +1 -1
- package/dist/esm/dom/DomEvent.PointerEvents.js +2 -16
- package/dist/esm/dom/DomEvent.PointerEvents.js.map +1 -1
- package/dist/esm/dom/DomEvent.js +8 -42
- package/dist/esm/dom/DomEvent.js.map +1 -1
- package/dist/esm/dom/DomUtil.js +14 -68
- package/dist/esm/dom/DomUtil.js.map +1 -1
- package/dist/esm/dom/Draggable.js +17 -18
- package/dist/esm/dom/Draggable.js.map +1 -1
- package/dist/esm/dom/PosAnimation.js +3 -25
- package/dist/esm/dom/PosAnimation.js.map +1 -1
- package/dist/esm/geo/LatLng.js +34 -6
- package/dist/esm/geo/LatLng.js.map +1 -1
- package/dist/esm/geo/LatLngBounds.js +19 -7
- package/dist/esm/geo/LatLngBounds.js.map +1 -1
- package/dist/esm/geo/crs/CRS.js +4 -3
- package/dist/esm/geo/crs/CRS.js.map +1 -1
- package/dist/esm/geo/crs/EPSG3395.js +1 -1
- package/dist/esm/geo/crs/EPSG3395.js.map +1 -1
- package/dist/esm/geo/crs/EPSG3857.js +1 -1
- package/dist/esm/geo/crs/EPSG3857.js.map +1 -1
- package/dist/esm/geo/crs/EPSG4326.js +1 -1
- package/dist/esm/geo/crs/EPSG4326.js.map +1 -1
- package/dist/esm/geo/crs/EarthCRS.js +2 -2
- package/dist/esm/geo/crs/EarthCRS.js.map +1 -1
- package/dist/esm/geo/crs/SimpleCRS.js +1 -1
- package/dist/esm/geo/crs/SimpleCRS.js.map +1 -1
- package/dist/esm/geo/projection/Projection.LonLat.js +3 -3
- package/dist/esm/geo/projection/Projection.LonLat.js.map +1 -1
- package/dist/esm/geo/projection/Projection.Mercator.js +3 -3
- package/dist/esm/geo/projection/Projection.Mercator.js.map +1 -1
- package/dist/esm/geo/projection/Projection.SphericalMercator.js +3 -3
- package/dist/esm/geo/projection/Projection.SphericalMercator.js.map +1 -1
- package/dist/esm/geometry/Bounds.js +19 -7
- package/dist/esm/geometry/Bounds.js.map +1 -1
- package/dist/esm/geometry/LineUtil.js +36 -30
- package/dist/esm/geometry/LineUtil.js.map +1 -1
- package/dist/esm/geometry/Point.js +23 -5
- package/dist/esm/geometry/Point.js.map +1 -1
- package/dist/esm/geometry/PolyUtil.js +9 -28
- package/dist/esm/geometry/PolyUtil.js.map +1 -1
- package/dist/esm/layer/BlanketOverlay.js +6 -8
- package/dist/esm/layer/BlanketOverlay.js.map +1 -1
- package/dist/esm/layer/DivOverlay.js +15 -20
- package/dist/esm/layer/DivOverlay.js.map +1 -1
- package/dist/esm/layer/GeoJSON.js +9 -145
- package/dist/esm/layer/GeoJSON.js.map +1 -1
- package/dist/esm/layer/GeoJSONUtil.js +75 -0
- package/dist/esm/layer/GeoJSONUtil.js.map +1 -0
- package/dist/esm/layer/HeatLayer.js +15 -17
- package/dist/esm/layer/HeatLayer.js.map +1 -1
- package/dist/esm/layer/ImageOverlay.js +20 -26
- package/dist/esm/layer/ImageOverlay.js.map +1 -1
- package/dist/esm/layer/Layer.js +8 -10
- package/dist/esm/layer/Layer.js.map +1 -1
- package/dist/esm/layer/LayerGroup.js +51 -0
- package/dist/esm/layer/LayerGroup.js.map +1 -1
- package/dist/esm/layer/Popup.js +27 -43
- package/dist/esm/layer/Popup.js.map +1 -1
- package/dist/esm/layer/SVGOverlay.js +2 -5
- package/dist/esm/layer/SVGOverlay.js.map +1 -1
- package/dist/esm/layer/Tooltip.js +15 -17
- package/dist/esm/layer/Tooltip.js.map +1 -1
- package/dist/esm/layer/VideoOverlay.js +12 -15
- package/dist/esm/layer/VideoOverlay.js.map +1 -1
- package/dist/esm/layer/marker/DefaultIcon.js +15 -48
- package/dist/esm/layer/marker/DefaultIcon.js.map +1 -1
- package/dist/esm/layer/marker/DivIcon.js +8 -10
- package/dist/esm/layer/marker/DivIcon.js.map +1 -1
- package/dist/esm/layer/marker/Icon.js +9 -12
- package/dist/esm/layer/marker/Icon.js.map +1 -1
- package/dist/esm/layer/marker/Marker.Drag.js +1 -1
- package/dist/esm/layer/marker/Marker.Drag.js.map +1 -1
- package/dist/esm/layer/marker/Marker.Move.js +2 -3
- package/dist/esm/layer/marker/Marker.Move.js.map +1 -1
- package/dist/esm/layer/marker/Marker.js +63 -35
- package/dist/esm/layer/marker/Marker.js.map +1 -1
- package/dist/esm/layer/marker/MarkerClusterGroup.js +302 -0
- package/dist/esm/layer/marker/MarkerClusterGroup.js.map +1 -0
- package/dist/esm/layer/marker/SvgIcon.js +6 -8
- package/dist/esm/layer/marker/SvgIcon.js.map +1 -1
- package/dist/esm/layer/tile/GridLayer.js +86 -98
- package/dist/esm/layer/tile/GridLayer.js.map +1 -1
- package/dist/esm/layer/tile/TileLayer.js +28 -36
- package/dist/esm/layer/tile/TileLayer.js.map +1 -1
- package/dist/esm/layer/tile/WMSTileLayer.js +28 -23
- package/dist/esm/layer/tile/WMSTileLayer.js.map +1 -1
- package/dist/esm/layer/vector/Canvas.js +1 -3
- package/dist/esm/layer/vector/Canvas.js.map +1 -1
- package/dist/esm/layer/vector/Circle.js +2 -2
- package/dist/esm/layer/vector/Circle.js.map +1 -1
- package/dist/esm/layer/vector/CircleMarker.js +17 -7
- package/dist/esm/layer/vector/CircleMarker.js.map +1 -1
- package/dist/esm/layer/vector/Path.DashAnimation.js +2 -3
- package/dist/esm/layer/vector/Path.DashAnimation.js.map +1 -1
- package/dist/esm/layer/vector/Path.js +27 -20
- package/dist/esm/layer/vector/Path.js.map +1 -1
- package/dist/esm/layer/vector/Polygon.js +20 -4
- package/dist/esm/layer/vector/Polygon.js.map +1 -1
- package/dist/esm/layer/vector/Polyline.Decorations.js +2 -2
- package/dist/esm/layer/vector/Polyline.js +24 -8
- package/dist/esm/layer/vector/Polyline.js.map +1 -1
- package/dist/esm/layer/vector/Renderer.getRenderer.js +14 -13
- package/dist/esm/layer/vector/Renderer.getRenderer.js.map +1 -1
- package/dist/esm/layer/vector/SVG.js +5 -5
- package/dist/esm/layer/vector/SVG.js.map +1 -1
- package/dist/esm/map/Map.Rotation.js +15 -11
- package/dist/esm/map/Map.Rotation.js.map +1 -1
- package/dist/esm/map/Map.js +135 -129
- package/dist/esm/map/Map.js.map +1 -1
- package/dist/esm/map/handler/BoxZoomHandler.js +5 -7
- package/dist/esm/map/handler/BoxZoomHandler.js.map +1 -1
- package/dist/esm/map/handler/DisplaceHandler.js +6 -8
- package/dist/esm/map/handler/DisplaceHandler.js.map +1 -1
- package/dist/esm/map/handler/DragHandler.js +20 -20
- package/dist/esm/map/handler/DragHandler.js.map +1 -1
- package/dist/esm/map/handler/KeyboardHandler.js +37 -37
- package/dist/esm/map/handler/KeyboardHandler.js.map +1 -1
- package/dist/esm/map/handler/PinchZoomHandler.js +12 -3
- package/dist/esm/map/handler/PinchZoomHandler.js.map +1 -1
- package/dist/esm/map/handler/ScrollWheelZoomHandler.js +3 -4
- package/dist/esm/map/handler/ScrollWheelZoomHandler.js.map +1 -1
- package/dist/esm/map/handler/TapHoldHandler.js +12 -5
- package/dist/esm/map/handler/TapHoldHandler.js.map +1 -1
- package/dist/esm/package.js +1 -1
- package/dist/maplair-global-src.js +6326 -5625
- package/dist/maplair-global-src.js.map +1 -1
- package/dist/maplair-global.js +3 -3
- package/dist/maplair-global.js.map +1 -1
- package/dist/maplair-src.js +9010 -8290
- package/dist/maplair-src.js.map +1 -1
- package/dist/maplair.css +148 -98
- package/dist/maplair.js +3 -3
- package/dist/maplair.js.map +1 -1
- package/i18n/cs.json +6 -0
- package/i18n/de.json +6 -0
- package/i18n/en.json +6 -0
- package/i18n/es.json +6 -0
- package/i18n/fr.json +6 -0
- package/i18n/hu.json +6 -0
- package/i18n/it.json +6 -0
- package/i18n/rm.json +6 -0
- package/i18n/sk.json +6 -0
- package/i18n/sl.json +6 -0
- package/package.json +12 -14
- package/src/control/AttributionControl.js +25 -18
- package/src/control/ButtonControl.js +9 -11
- package/src/control/ContextMenu.js +3 -5
- package/src/control/Control.js +9 -19
- package/src/control/FullscreenControl.js +5 -7
- package/src/control/LayersControl.js +159 -36
- package/src/control/LegendControl.js +7 -9
- package/src/control/MiniMapControl.js +9 -11
- package/src/control/RotateControl.js +3 -5
- package/src/control/ScaleControl.js +7 -9
- package/src/control/SearchControl.js +104 -21
- package/src/control/SideBySideControl.js +3 -5
- package/src/control/TextControl.js +5 -7
- package/src/control/TimeControl.js +471 -0
- package/src/control/ZoomControl.js +5 -7
- package/src/control/index.js +1 -0
- package/src/core/Class.js +35 -34
- package/src/core/Events.js +22 -3
- package/src/core/Handler.js +14 -12
- package/src/core/Util.js +19 -1
- package/src/core/index.js +0 -1
- package/src/dom/DomEvent.DoubleTap.js +18 -10
- package/src/dom/DomEvent.PointerEvents.js +3 -26
- package/src/dom/DomEvent.js +8 -66
- package/src/dom/DomUtil.js +22 -78
- package/src/dom/Draggable.js +27 -22
- package/src/dom/PosAnimation.js +3 -25
- package/src/dom/index.js +0 -1
- package/src/geo/LatLng.js +40 -4
- package/src/geo/LatLngBounds.js +20 -7
- package/src/geo/crs/CRS.js +4 -3
- package/src/geo/crs/EPSG3395.js +1 -1
- package/src/geo/crs/EPSG3857.js +1 -1
- package/src/geo/crs/EPSG4326.js +1 -1
- package/src/geo/crs/EarthCRS.js +2 -8
- package/src/geo/crs/SimpleCRS.js +1 -1
- package/src/geo/projection/Projection.LonLat.js +3 -3
- package/src/geo/projection/Projection.Mercator.js +3 -3
- package/src/geo/projection/Projection.SphericalMercator.js +3 -3
- package/src/geometry/Bounds.js +20 -7
- package/src/geometry/LineUtil.js +47 -48
- package/src/geometry/Point.js +24 -5
- package/src/geometry/PolyUtil.js +15 -44
- package/src/layer/BlanketOverlay.js +6 -10
- package/src/layer/DivOverlay.js +15 -26
- package/src/layer/GeoJSON.js +7 -205
- package/src/layer/GeoJSONUtil.js +85 -0
- package/src/layer/HeatLayer.js +9 -11
- package/src/layer/ImageOverlay.js +19 -30
- package/src/layer/Layer.js +8 -10
- package/src/layer/LayerGroup.js +71 -0
- package/src/layer/Popup.js +31 -46
- package/src/layer/SVGOverlay.js +1 -5
- package/src/layer/Tooltip.js +15 -19
- package/src/layer/VideoOverlay.js +12 -15
- package/src/layer/marker/DefaultIcon.js +15 -61
- package/src/layer/marker/DivIcon.js +10 -12
- package/src/layer/marker/Icon.js +9 -12
- package/src/layer/marker/Marker.Drag.js +1 -1
- package/src/layer/marker/Marker.Move.js +2 -3
- package/src/layer/marker/Marker.js +83 -41
- package/src/layer/marker/MarkerClusterGroup.js +370 -0
- package/src/layer/marker/SvgIcon.js +7 -9
- package/src/layer/marker/index.js +1 -0
- package/src/layer/tile/GridLayer.js +104 -134
- package/src/layer/tile/TileLayer.js +35 -43
- package/src/layer/tile/WMSTileLayer.js +26 -24
- package/src/layer/vector/Canvas.js +3 -5
- package/src/layer/vector/Circle.js +5 -2
- package/src/layer/vector/CircleMarker.js +17 -6
- package/src/layer/vector/Path.DashAnimation.js +1 -2
- package/src/layer/vector/Path.js +30 -21
- package/src/layer/vector/Polygon.js +28 -5
- package/src/layer/vector/Polyline.js +26 -7
- package/src/layer/vector/Renderer.getRenderer.js +17 -17
- package/src/layer/vector/SVG.js +5 -5
- package/src/map/Map.Rotation.js +19 -11
- package/src/map/Map.js +163 -154
- package/src/map/handler/BoxZoomHandler.js +9 -8
- package/src/map/handler/DisplaceHandler.js +6 -8
- package/src/map/handler/DragHandler.js +26 -29
- package/src/map/handler/KeyboardHandler.js +44 -50
- package/src/map/handler/PinchZoomHandler.js +16 -5
- package/src/map/handler/ScrollWheelZoomHandler.js +6 -4
- package/src/map/handler/TapHoldHandler.js +15 -4
- package/src/map/index.js +1 -1
- package/src/maplair.css +148 -98
- package/dist/esm/core/Browser.js +0 -100
- package/dist/esm/core/Browser.js.map +0 -1
- package/dist/images/layers.svg +0 -1
- package/dist/images/marker-icon.svg +0 -1
- package/dist/images/marker-shadow.svg +0 -1
- package/src/core/Browser.js +0 -110
- package/src/images/layers.svg +0 -1
- package/src/images/marker-icon.svg +0 -1
- package/src/images/marker-shadow.svg +0 -1
package/src/maplair.css
CHANGED
|
@@ -49,8 +49,7 @@
|
|
|
49
49
|
--maplair-spacing-100: 16px;
|
|
50
50
|
|
|
51
51
|
/* sizes */
|
|
52
|
-
--maplair-size-control:
|
|
53
|
-
--maplair-size-control-touch: 30px;
|
|
52
|
+
--maplair-size-control: 30px;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
/* required styles */
|
|
@@ -68,7 +67,7 @@
|
|
|
68
67
|
position: absolute;
|
|
69
68
|
left: 0;
|
|
70
69
|
top: 0;
|
|
71
|
-
width:100%;
|
|
70
|
+
width: 100%;
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
/* wraps the map pane of a rotated map, see setBearing() */
|
|
@@ -77,36 +76,35 @@
|
|
|
77
76
|
inset: 0;
|
|
78
77
|
}
|
|
79
78
|
|
|
79
|
+
/* without this, a long press on the map selects the nearest page text on iOS, and a drag leaving the map selects
|
|
80
|
+
page text in Firefox; popups and controls stop pointerdown from reaching the map, so their text stays selectable */
|
|
81
|
+
.maplair-container,
|
|
82
|
+
.maplair-dragging,
|
|
83
|
+
.maplair-control-zoom-in,
|
|
84
|
+
.maplair-control-zoom-out {
|
|
85
|
+
-webkit-user-select: none;
|
|
86
|
+
user-select: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.maplair-popup-pane,
|
|
90
|
+
.maplair-control-container {
|
|
91
|
+
-webkit-user-select: text;
|
|
92
|
+
user-select: text;
|
|
93
|
+
}
|
|
94
|
+
|
|
80
95
|
.maplair-tile,
|
|
81
96
|
.maplair-marker-icon,
|
|
82
97
|
.maplair-marker-shadow {
|
|
83
|
-
user-select: none;
|
|
84
98
|
-webkit-user-drag: none;
|
|
85
99
|
-webkit-touch-callout: none;
|
|
86
100
|
}
|
|
87
101
|
|
|
88
|
-
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
|
89
|
-
|
|
90
|
-
.maplair-safari {
|
|
91
|
-
.maplair-tile {
|
|
92
|
-
image-rendering: -webkit-optimize-contrast;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* hack that prevents hw layers "stretching" when loading new tiles */
|
|
96
|
-
.maplair-tile-container {
|
|
97
|
-
width: 1600px;
|
|
98
|
-
height: 1600px;
|
|
99
|
-
-webkit-transform-origin: 0 0;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
102
|
.maplair-marker-icon,
|
|
104
103
|
.maplair-marker-shadow {
|
|
105
104
|
display: block;
|
|
106
105
|
}
|
|
107
106
|
|
|
108
|
-
/*
|
|
109
|
-
/* .maplair-container img: map is broken in FF if you have max-width: 100% on tiles */
|
|
107
|
+
/* !important to survive host-page resets like `img, svg { max-width: 100% }`, which break the map */
|
|
110
108
|
|
|
111
109
|
.maplair-container {
|
|
112
110
|
overflow: hidden;
|
|
@@ -130,6 +128,10 @@
|
|
|
130
128
|
img.maplair-tile {
|
|
131
129
|
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
|
|
132
130
|
mix-blend-mode: plus-lighter;
|
|
131
|
+
|
|
132
|
+
&.maplair-tile-fading {
|
|
133
|
+
mix-blend-mode: normal;
|
|
134
|
+
}
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
&.maplair-touch-zoom {
|
|
@@ -137,8 +139,6 @@
|
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
&.maplair-touch-drag {
|
|
140
|
-
/* Fallback for FF which doesn't support pinch-zoom */
|
|
141
|
-
touch-action: none;
|
|
142
142
|
touch-action: pinch-zoom;
|
|
143
143
|
|
|
144
144
|
&.maplair-touch-zoom {
|
|
@@ -300,10 +300,6 @@
|
|
|
300
300
|
.maplair-popup {
|
|
301
301
|
opacity: 0;
|
|
302
302
|
transition: opacity 0.2s linear;
|
|
303
|
-
|
|
304
|
-
@media (prefers-reduced-motion: reduce) {
|
|
305
|
-
transition: none;
|
|
306
|
-
}
|
|
307
303
|
}
|
|
308
304
|
|
|
309
305
|
.maplair-map-pane .maplair-popup {
|
|
@@ -321,14 +317,6 @@
|
|
|
321
317
|
.maplair-zoom-anim {
|
|
322
318
|
.maplair-zoom-animated {
|
|
323
319
|
transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1);
|
|
324
|
-
|
|
325
|
-
@media (prefers-reduced-motion: reduce) {
|
|
326
|
-
transition: none;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.maplair-tile {
|
|
331
|
-
transition: none;
|
|
332
320
|
}
|
|
333
321
|
|
|
334
322
|
.maplair-zoom-hide {
|
|
@@ -336,10 +324,6 @@
|
|
|
336
324
|
}
|
|
337
325
|
}
|
|
338
326
|
|
|
339
|
-
.maplair-pan-anim .maplair-tile {
|
|
340
|
-
transition: none;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
327
|
/* cursors */
|
|
344
328
|
|
|
345
329
|
.maplair-interactive {
|
|
@@ -364,7 +348,7 @@
|
|
|
364
348
|
}
|
|
365
349
|
|
|
366
350
|
.maplair-dragging {
|
|
367
|
-
|
|
351
|
+
&.maplair-grab {
|
|
368
352
|
cursor: grabbing;
|
|
369
353
|
|
|
370
354
|
.maplair-interactive {
|
|
@@ -424,7 +408,6 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
424
408
|
}
|
|
425
409
|
|
|
426
410
|
.maplair-bar {
|
|
427
|
-
box-shadow: var(--maplair-box-shadow-medium);
|
|
428
411
|
border-radius: var(--maplair-border-radius-base);
|
|
429
412
|
|
|
430
413
|
a,
|
|
@@ -446,13 +429,13 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
446
429
|
}
|
|
447
430
|
|
|
448
431
|
&:first-child {
|
|
449
|
-
border-top-left-radius: var(--maplair-border-radius-
|
|
450
|
-
border-top-right-radius: var(--maplair-border-radius-
|
|
432
|
+
border-top-left-radius: var(--maplair-border-radius-small);
|
|
433
|
+
border-top-right-radius: var(--maplair-border-radius-small);
|
|
451
434
|
}
|
|
452
435
|
|
|
453
436
|
&:last-child {
|
|
454
|
-
border-bottom-left-radius: var(--maplair-border-radius-
|
|
455
|
-
border-bottom-right-radius: var(--maplair-border-radius-
|
|
437
|
+
border-bottom-left-radius: var(--maplair-border-radius-small);
|
|
438
|
+
border-bottom-right-radius: var(--maplair-border-radius-small);
|
|
456
439
|
border-bottom: none;
|
|
457
440
|
}
|
|
458
441
|
|
|
@@ -461,22 +444,6 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
461
444
|
background-color: var(--maplair-background-color-disabled-subtle);
|
|
462
445
|
color: var(--maplair-color-disabled);
|
|
463
446
|
}
|
|
464
|
-
|
|
465
|
-
.maplair-touch & {
|
|
466
|
-
width: var(--maplair-size-control-touch);
|
|
467
|
-
height: var(--maplair-size-control-touch);
|
|
468
|
-
line-height: var(--maplair-size-control-touch);
|
|
469
|
-
|
|
470
|
-
&:first-child {
|
|
471
|
-
border-top-left-radius: var(--maplair-border-radius-small);
|
|
472
|
-
border-top-right-radius: var(--maplair-border-radius-small);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
&:last-child {
|
|
476
|
-
border-bottom-left-radius: var(--maplair-border-radius-small);
|
|
477
|
-
border-bottom-right-radius: var(--maplair-border-radius-small);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
447
|
}
|
|
481
448
|
}
|
|
482
449
|
|
|
@@ -498,18 +465,14 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
498
465
|
|
|
499
466
|
.maplair-control-zoom-in,
|
|
500
467
|
.maplair-control-zoom-out {
|
|
501
|
-
font: bold var(--maplair-font-size-large) var(--maplair-font-family-monospace);
|
|
468
|
+
font: bold var(--maplair-font-size-x-large) var(--maplair-font-family-monospace);
|
|
502
469
|
text-indent: 1px;
|
|
503
|
-
.maplair-touch & {
|
|
504
|
-
font-size: var(--maplair-font-size-x-large);
|
|
505
|
-
}
|
|
506
470
|
}
|
|
507
471
|
|
|
508
472
|
|
|
509
473
|
/* layers control */
|
|
510
474
|
|
|
511
475
|
.maplair-control-layers {
|
|
512
|
-
box-shadow: var(--maplair-box-shadow-medium);
|
|
513
476
|
background: var(--maplair-background-color-base);
|
|
514
477
|
border-radius: var(--maplair-border-radius-base);
|
|
515
478
|
|
|
@@ -525,7 +488,7 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
525
488
|
|
|
526
489
|
.maplair-control-layers-toggle {
|
|
527
490
|
display: block;
|
|
528
|
-
background-image: url(
|
|
491
|
+
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='26'><path fill='%23b9b9b9' d='m.032 17.056 13-8 13 8-13 8z'/><path fill='%23737373' d='m.032 17.056-.032.93 13 8 13-8 .032-.93-13 8z'/><path fill='%23cdcdcd' d='m0 13.076 13-8 13 8-13 8z'/><path fill='%23737373' d='M0 13.076v.91l13 8 13-8v-.91l-13 8z'/><path fill='%23e9e9e9' fill-opacity='.585' stroke='%23797979' stroke-width='.1' d='m0 8.986 13-8 13 8-13 8-13-8'/><path fill='%23737373' d='M0 8.986v1l13 8 13-8v-1l-13 8z'/></svg>");
|
|
529
492
|
background-position: 50% 50%;
|
|
530
493
|
background-repeat: no-repeat;
|
|
531
494
|
/* reset the user agent styles of buttons */
|
|
@@ -533,12 +496,15 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
533
496
|
padding: 0;
|
|
534
497
|
border: 0;
|
|
535
498
|
cursor: pointer;
|
|
536
|
-
width:
|
|
537
|
-
height:
|
|
499
|
+
width: 44px;
|
|
500
|
+
height: 44px;
|
|
538
501
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
502
|
+
/* custom content (option toggleContent) instead of the icon */
|
|
503
|
+
&:not(:empty) {
|
|
504
|
+
background-image: none;
|
|
505
|
+
color: var(--maplair-color-base);
|
|
506
|
+
font: inherit;
|
|
507
|
+
font-size: var(--maplair-font-size-large);
|
|
542
508
|
}
|
|
543
509
|
}
|
|
544
510
|
|
|
@@ -581,10 +547,45 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
581
547
|
margin: var(--maplair-spacing-25) calc(-1 * var(--maplair-spacing-50));
|
|
582
548
|
}
|
|
583
549
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
550
|
+
.maplair-control-layers-group-name {
|
|
551
|
+
font-size: var(--maplair-font-size-small);
|
|
552
|
+
font-weight: bold;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/* inline layers control, laid out like the attribution control */
|
|
556
|
+
|
|
557
|
+
.maplair-control-layers-inline {
|
|
558
|
+
&.maplair-control-layers-expanded {
|
|
559
|
+
padding: 0 var(--maplair-spacing-25);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.maplair-control-layers-list {
|
|
563
|
+
display: flex;
|
|
564
|
+
flex-wrap: wrap;
|
|
565
|
+
align-items: center;
|
|
566
|
+
column-gap: var(--maplair-spacing-50);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.maplair-control-layers-base,
|
|
570
|
+
.maplair-control-layers-overlays {
|
|
571
|
+
display: contents;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.maplair-control-layers-separator {
|
|
575
|
+
display: none;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.maplair-control-layers-group {
|
|
579
|
+
display: flex;
|
|
580
|
+
flex-wrap: wrap;
|
|
581
|
+
align-items: center;
|
|
582
|
+
column-gap: var(--maplair-spacing-50);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
label {
|
|
586
|
+
/* keep an entry together with its radio button or checkbox */
|
|
587
|
+
white-space: nowrap;
|
|
588
|
+
}
|
|
588
589
|
}
|
|
589
590
|
|
|
590
591
|
/* text control */
|
|
@@ -655,10 +656,6 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
655
656
|
&:focus {
|
|
656
657
|
outline: none;
|
|
657
658
|
}
|
|
658
|
-
|
|
659
|
-
.maplair-touch & {
|
|
660
|
-
height: var(--maplair-size-control-touch);
|
|
661
|
-
}
|
|
662
659
|
}
|
|
663
660
|
|
|
664
661
|
.maplair-control-search:not(.maplair-control-search-expanded) {
|
|
@@ -717,6 +714,44 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
717
714
|
}
|
|
718
715
|
}
|
|
719
716
|
|
|
717
|
+
/* time control */
|
|
718
|
+
|
|
719
|
+
.maplair-bar.maplair-control-time {
|
|
720
|
+
display: flex;
|
|
721
|
+
align-items: center;
|
|
722
|
+
background-color: var(--maplair-background-color-base);
|
|
723
|
+
font-size: var(--maplair-font-size-small);
|
|
724
|
+
|
|
725
|
+
/* the buttons in a row */
|
|
726
|
+
button {
|
|
727
|
+
flex: none;
|
|
728
|
+
border-bottom: none;
|
|
729
|
+
border-right: var(--maplair-border-width-base) solid var(--maplair-border-color-subtle);
|
|
730
|
+
border-radius: 0;
|
|
731
|
+
|
|
732
|
+
&:first-child {
|
|
733
|
+
border-radius: var(--maplair-border-radius-base) 0 0 var(--maplair-border-radius-base);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
svg {
|
|
738
|
+
vertical-align: middle;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.maplair-control-time-slider {
|
|
743
|
+
width: 160px;
|
|
744
|
+
max-width: calc(100vw - 260px);
|
|
745
|
+
margin: 0 var(--maplair-spacing-50);
|
|
746
|
+
accent-color: var(--maplair-color-progressive);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.maplair-control-time-label {
|
|
750
|
+
padding-right: var(--maplair-spacing-50);
|
|
751
|
+
white-space: nowrap;
|
|
752
|
+
font-variant-numeric: tabular-nums;
|
|
753
|
+
}
|
|
754
|
+
|
|
720
755
|
/* legend control */
|
|
721
756
|
|
|
722
757
|
.maplair-control-legend {
|
|
@@ -841,18 +876,10 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
841
876
|
}
|
|
842
877
|
}
|
|
843
878
|
|
|
844
|
-
.maplair-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
box-shadow: none;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
.maplair-control-layers,
|
|
852
|
-
.maplair-bar {
|
|
853
|
-
border: var(--maplair-border-width-thick) solid var(--maplair-border-color-muted);
|
|
854
|
-
background-clip: padding-box;
|
|
855
|
-
}
|
|
879
|
+
.maplair-control-layers,
|
|
880
|
+
.maplair-bar {
|
|
881
|
+
border: var(--maplair-border-width-thick) solid var(--maplair-border-color-muted);
|
|
882
|
+
background-clip: padding-box;
|
|
856
883
|
}
|
|
857
884
|
|
|
858
885
|
/* overview map */
|
|
@@ -865,8 +892,8 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
865
892
|
box-shadow: var(--maplair-box-shadow-medium);
|
|
866
893
|
|
|
867
894
|
&.maplair-control-minimap-collapsed {
|
|
868
|
-
width: var(--maplair-size-control
|
|
869
|
-
height: var(--maplair-size-control
|
|
895
|
+
width: var(--maplair-size-control) !important;
|
|
896
|
+
height: var(--maplair-size-control) !important;
|
|
870
897
|
|
|
871
898
|
.maplair-control-minimap-map {
|
|
872
899
|
display: none;
|
|
@@ -889,14 +916,14 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
889
916
|
right: 0;
|
|
890
917
|
bottom: 0;
|
|
891
918
|
z-index: 1000;
|
|
892
|
-
width: var(--maplair-size-control
|
|
893
|
-
height: var(--maplair-size-control
|
|
919
|
+
width: var(--maplair-size-control);
|
|
920
|
+
height: var(--maplair-size-control);
|
|
894
921
|
padding: 0;
|
|
895
922
|
border: 0;
|
|
896
923
|
border-radius: var(--maplair-border-radius-small);
|
|
897
924
|
background: var(--maplair-background-color-base);
|
|
898
925
|
color: var(--maplair-color-base);
|
|
899
|
-
font: bold var(--maplair-font-size-medium)/var(--maplair-size-control
|
|
926
|
+
font: bold var(--maplair-font-size-medium)/var(--maplair-size-control) var(--maplair-font-family-base);
|
|
900
927
|
cursor: pointer;
|
|
901
928
|
transform: rotate(180deg);
|
|
902
929
|
|
|
@@ -1111,6 +1138,30 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
1111
1138
|
border: var(--maplair-border-width-base) solid var(--maplair-border-color-base);
|
|
1112
1139
|
}
|
|
1113
1140
|
|
|
1141
|
+
/* MarkerClusterGroup */
|
|
1142
|
+
|
|
1143
|
+
.maplair-cluster {
|
|
1144
|
+
--maplair-cluster-color: #6ecc39;
|
|
1145
|
+
display: flex;
|
|
1146
|
+
align-items: center;
|
|
1147
|
+
justify-content: center;
|
|
1148
|
+
border-radius: 50%;
|
|
1149
|
+
background: var(--maplair-cluster-color);
|
|
1150
|
+
box-shadow: 0 0 0 5px color-mix(in srgb, var(--maplair-cluster-color) 40%, transparent);
|
|
1151
|
+
color: #000;
|
|
1152
|
+
font: bold var(--maplair-font-size-x-small) / 1 var(--maplair-font-family-base);
|
|
1153
|
+
}
|
|
1154
|
+
.maplair-cluster-medium {
|
|
1155
|
+
--maplair-cluster-color: #f0c20c;
|
|
1156
|
+
}
|
|
1157
|
+
.maplair-cluster-large {
|
|
1158
|
+
--maplair-cluster-color: #f18017;
|
|
1159
|
+
}
|
|
1160
|
+
.maplair-cluster-leg {
|
|
1161
|
+
stroke: var(--maplair-color-base);
|
|
1162
|
+
stroke-opacity: 0.5;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1114
1165
|
/* Tooltip */
|
|
1115
1166
|
/* Base styles for the element that has a tooltip */
|
|
1116
1167
|
.maplair-tooltip {
|
|
@@ -1121,7 +1172,6 @@ path.maplair-interactive:focus:not(:focus-visible) {
|
|
|
1121
1172
|
border-radius: var(--maplair-border-radius-base);
|
|
1122
1173
|
color: var(--maplair-color-base);
|
|
1123
1174
|
white-space: nowrap;
|
|
1124
|
-
user-select: none;
|
|
1125
1175
|
pointer-events: none;
|
|
1126
1176
|
box-shadow: var(--maplair-box-shadow-medium);
|
|
1127
1177
|
|
package/dist/esm/core/Browser.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
//#region src/core/Browser.js
|
|
2
|
-
const chrome = userAgentContains("chrome");
|
|
3
|
-
const safari = !chrome && userAgentContains("safari");
|
|
4
|
-
const mobile = typeof orientation !== "undefined";
|
|
5
|
-
const reducedMotion = navigator.preferences?.reducedMotion?.value ? navigator.preferences.reducedMotion.value === "reduce" : typeof window === "undefined" ? true : window?.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
6
|
-
const pointer = typeof window === "undefined" ? false : !!window.PointerEvent;
|
|
7
|
-
const touchNative = typeof window === "undefined" ? false : "ontouchstart" in window || !!window.TouchEvent;
|
|
8
|
-
const touch = touchNative || pointer;
|
|
9
|
-
function isRetina() {
|
|
10
|
-
return typeof window === "undefined" || typeof window.devicePixelRatio === "undefined" ? false : window.devicePixelRatio > 1;
|
|
11
|
-
}
|
|
12
|
-
const mac = typeof navigator === "undefined" || typeof navigator.platform === "undefined" ? false : navigator.platform.startsWith("Mac");
|
|
13
|
-
const linux = typeof navigator === "undefined" || typeof navigator.platform === "undefined" ? false : navigator.platform.startsWith("Linux");
|
|
14
|
-
function userAgentContains(str) {
|
|
15
|
-
if (typeof navigator === "undefined" || typeof navigator.userAgent === "undefined") return false;
|
|
16
|
-
return navigator.userAgent.toLowerCase().includes(str);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* A namespace with static properties for browser/feature detection used by Maplair
|
|
20
|
-
* internally.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```js
|
|
24
|
-
* if (Browser.chrome) {
|
|
25
|
-
* alert('You are running Chrome!');
|
|
26
|
-
* }
|
|
27
|
-
* ```
|
|
28
|
-
* @type {Readonly<Record<string, boolean>>}
|
|
29
|
-
*/
|
|
30
|
-
var Browser_default = {
|
|
31
|
-
/**
|
|
32
|
-
* `true` for the Chrome browser.
|
|
33
|
-
* @type {boolean}
|
|
34
|
-
*/
|
|
35
|
-
chrome,
|
|
36
|
-
/**
|
|
37
|
-
* `true` for the Safari browser.
|
|
38
|
-
* @type {boolean}
|
|
39
|
-
*/
|
|
40
|
-
safari,
|
|
41
|
-
/**
|
|
42
|
-
* `true` for all browsers running in a mobile device.
|
|
43
|
-
* @type {boolean}
|
|
44
|
-
*/
|
|
45
|
-
mobile,
|
|
46
|
-
/**
|
|
47
|
-
* `true` if the user has
|
|
48
|
-
* [configured their environment for reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion#user_preferences).
|
|
49
|
-
* Determines whether animations should play or not.
|
|
50
|
-
* @type {boolean}
|
|
51
|
-
*/
|
|
52
|
-
reducedMotion,
|
|
53
|
-
/**
|
|
54
|
-
* `true` for all browsers supporting
|
|
55
|
-
* [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).
|
|
56
|
-
* @type {boolean}
|
|
57
|
-
*/
|
|
58
|
-
pointer,
|
|
59
|
-
/**
|
|
60
|
-
* `true` for all browsers supporting either [touch](#browser-touch) or
|
|
61
|
-
* [pointer](#browser-pointer) events.
|
|
62
|
-
* Note: pointer events will be preferred (if available), and processed for all
|
|
63
|
-
* `touch*` listeners.
|
|
64
|
-
* @type {boolean}
|
|
65
|
-
*/
|
|
66
|
-
touch,
|
|
67
|
-
/**
|
|
68
|
-
* `true` for all browsers supporting
|
|
69
|
-
* [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).
|
|
70
|
-
* **This does not necessarily mean** that the browser is running in a computer with
|
|
71
|
-
* a touchscreen, it only means that the browser is capable of understanding
|
|
72
|
-
* touch events.
|
|
73
|
-
* @type {boolean}
|
|
74
|
-
*/
|
|
75
|
-
touchNative,
|
|
76
|
-
/**
|
|
77
|
-
* `true` for browsers on a high-resolution "retina" screen or on any screen when
|
|
78
|
-
* browser's display zoom is more than 100%. Follows changes of the
|
|
79
|
-
* `devicePixelRatio`, e.g. when moving the window to another screen (see the map's
|
|
80
|
-
* `pixelratiochange` event).
|
|
81
|
-
* @type {boolean}
|
|
82
|
-
*/
|
|
83
|
-
get retina() {
|
|
84
|
-
return isRetina();
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* `true` when the browser is running in a Mac platform.
|
|
88
|
-
* @type {boolean}
|
|
89
|
-
*/
|
|
90
|
-
mac,
|
|
91
|
-
/**
|
|
92
|
-
* `true` when the browser is running in a Linux platform.
|
|
93
|
-
* @type {boolean}
|
|
94
|
-
*/
|
|
95
|
-
linux
|
|
96
|
-
};
|
|
97
|
-
//#endregion
|
|
98
|
-
export { Browser_default as default };
|
|
99
|
-
|
|
100
|
-
//# sourceMappingURL=Browser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Browser.js","names":[],"sources":["../../../src/core/Browser.js"],"sourcesContent":["const chrome = userAgentContains('chrome');\n\nconst safari = !chrome && userAgentContains('safari');\n\nconst mobile = typeof orientation !== 'undefined';\n\nconst reducedMotion = navigator.preferences?.reducedMotion?.value ?\n\tnavigator.preferences.reducedMotion.value === 'reduce' :\n\ttypeof window === 'undefined' ? true : window?.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\nconst pointer = typeof window === 'undefined' ? false : !!window.PointerEvent;\n\nconst touchNative = typeof window === 'undefined' ? false : 'ontouchstart' in window || !!(window.TouchEvent);\n\nconst touch = touchNative || pointer;\n\nfunction isRetina() {\n\treturn typeof window === 'undefined' || typeof window.devicePixelRatio === 'undefined' ? false : window.devicePixelRatio > 1;\n}\n\nconst mac = typeof navigator === 'undefined' || typeof navigator.platform === 'undefined' ? false : navigator.platform.startsWith('Mac');\n\nconst linux = typeof navigator === 'undefined' || typeof navigator.platform === 'undefined' ? false : navigator.platform.startsWith('Linux');\n\nfunction userAgentContains(str) {\n\tif (typeof navigator === 'undefined' || typeof navigator.userAgent === 'undefined') {\n\t\treturn false;\n\t}\n\treturn navigator.userAgent.toLowerCase().includes(str);\n}\n\n/**\n * A namespace with static properties for browser/feature detection used by Maplair\n * internally.\n *\n * @example\n * ```js\n * if (Browser.chrome) {\n * alert('You are running Chrome!');\n * }\n * ```\n * @type {Readonly<Record<string, boolean>>}\n */\nexport default {\n\t/**\n\t * `true` for the Chrome browser.\n\t * @type {boolean}\n\t */\n\tchrome,\n\t/**\n\t * `true` for the Safari browser.\n\t * @type {boolean}\n\t */\n\tsafari,\n\t/**\n\t * `true` for all browsers running in a mobile device.\n\t * @type {boolean}\n\t */\n\tmobile,\n\t/**\n\t * `true` if the user has\n\t * [configured their environment for reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion#user_preferences).\n\t * Determines whether animations should play or not.\n\t * @type {boolean}\n\t */\n\treducedMotion,\n\t/**\n\t * `true` for all browsers supporting\n\t * [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).\n\t * @type {boolean}\n\t */\n\tpointer,\n\t/**\n\t * `true` for all browsers supporting either [touch](#browser-touch) or\n\t * [pointer](#browser-pointer) events.\n\t * Note: pointer events will be preferred (if available), and processed for all\n\t * `touch*` listeners.\n\t * @type {boolean}\n\t */\n\ttouch,\n\t/**\n\t * `true` for all browsers supporting\n\t * [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).\n\t * **This does not necessarily mean** that the browser is running in a computer with\n\t * a touchscreen, it only means that the browser is capable of understanding\n\t * touch events.\n\t * @type {boolean}\n\t */\n\ttouchNative,\n\t/**\n\t * `true` for browsers on a high-resolution \"retina\" screen or on any screen when\n\t * browser's display zoom is more than 100%. Follows changes of the\n\t * `devicePixelRatio`, e.g. when moving the window to another screen (see the map's\n\t * `pixelratiochange` event).\n\t * @type {boolean}\n\t */\n\tget retina() {\n\t\treturn isRetina();\n\t},\n\t/**\n\t * `true` when the browser is running in a Mac platform.\n\t * @type {boolean}\n\t */\n\tmac,\n\t/**\n\t * `true` when the browser is running in a Linux platform.\n\t * @type {boolean}\n\t */\n\tlinux\n};\n"],"mappings":";AAAA,MAAM,SAAS,kBAAkB,QAAQ;AAEzC,MAAM,SAAS,CAAC,UAAU,kBAAkB,QAAQ;AAEpD,MAAM,SAAS,OAAO,gBAAgB;AAEtC,MAAM,gBAAgB,UAAU,aAAa,eAAe,QAC3D,UAAU,YAAY,cAAc,UAAU,WAC9C,OAAO,WAAW,cAAc,OAAO,QAAQ,WAAW,kCAAkC,CAAC,CAAC;AAE/F,MAAM,UAAU,OAAO,WAAW,cAAc,QAAQ,CAAC,CAAC,OAAO;AAEjE,MAAM,cAAc,OAAO,WAAW,cAAc,QAAQ,kBAAkB,UAAU,CAAC,CAAE,OAAO;AAElG,MAAM,QAAQ,eAAe;AAE7B,SAAS,WAAW;CACnB,OAAO,OAAO,WAAW,eAAe,OAAO,OAAO,qBAAqB,cAAc,QAAQ,OAAO,mBAAmB;AAC5H;AAEA,MAAM,MAAM,OAAO,cAAc,eAAe,OAAO,UAAU,aAAa,cAAc,QAAQ,UAAU,SAAS,WAAW,KAAK;AAEvI,MAAM,QAAQ,OAAO,cAAc,eAAe,OAAO,UAAU,aAAa,cAAc,QAAQ,UAAU,SAAS,WAAW,OAAO;AAE3I,SAAS,kBAAkB,KAAK;CAC/B,IAAI,OAAO,cAAc,eAAe,OAAO,UAAU,cAAc,aACtE,OAAO;CAER,OAAO,UAAU,UAAU,YAAY,CAAC,CAAC,SAAS,GAAG;AACtD;;;;;;;;;;;;;AAcA,IAAA,kBAAe;;;;;CAKd;;;;;CAKA;;;;;CAKA;;;;;;;CAOA;;;;;;CAMA;;;;;;;;CAQA;;;;;;;;;CASA;;;;;;;;CAQA,IAAI,SAAS;EACZ,OAAO,SAAS;CACjB;;;;;CAKA;;;;;CAKA;AACD"}
|
package/dist/images/layers.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26"><path fill="#b9b9b9" d="m.032 17.056 13-8 13 8-13 8z"/><path fill="#737373" d="m.032 17.056-.032.93 13 8 13-8 .032-.93-13 8z"/><path fill="#cdcdcd" d="m0 13.076 13-8 13 8-13 8z"/><path fill="#737373" d="M0 13.076v.91l13 8 13-8v-.91l-13 8z"/><path fill="#e9e9e9" fill-opacity=".585" stroke="#797979" stroke-width=".1" d="m0 8.986 13-8 13 8-13 8-13-8"/><path fill="#737373" d="M0 8.986v1l13 8 13-8v-1l-13 8z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round" viewBox="0 0 500 820"><defs><linearGradient id="a" x1="0" x2="1" y1="0" y2="0" gradientTransform="rotate(-90 478.727 62.272)scale(37.566)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#C2331B"/><stop offset="1" stop-color="#E2603F"/></linearGradient><linearGradient id="b" x1="0" x2="1" y1="0" y2="0" gradientTransform="rotate(-90 468.484 54.002)scale(19.053)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8F2D20"/><stop offset="1" stop-color="#B23A27"/></linearGradient></defs><path fill="url(#a)" stroke="url(#b)" stroke-width="1.1" stroke-linejoin="miter" stroke-miterlimit="10" d="M416.500 542.096L420.919 533.569L422.024 531.437L424.460 529.996L424.233 527.174L426.670 525.732L426.382 522.881L428.720 521.213L428.075 518.393L429.979 516.125L428.342 513.639L429.080 510.777L426.581 509.207L426.168 506.292L423.266 505.773L421.781 503.221L418.898 503.859L416.511 502.112L414.131 503.870L411.248 503.241L409.766 505.793L406.865 506.302L406.439 509.216L403.933 510.775L404.661 513.641L403.023 516.136L404.935 518.393L404.271 521.204L406.590 522.896L406.299 525.752L408.738 527.189L408.516 530.011L410.956 531.448L412.065 533.578Z" transform="translate(-7889.1 -9807.44)scale(19.5417)"/><path fill="#FFF" d="m-90 2030 45-863a95 95 0 0 0-111-98l-859 151 116-320a65 65 0 0 0-20-73l-941-762 212-99a65 65 0 0 0 34-79l-186-572 542 115a65 65 0 0 0 73-38l105-247 423 454a65 65 0 0 0 111-57l-204-1052 327 189a65 65 0 0 0 91-27l332-652 332 652a65 65 0 0 0 91 27l327-189-204 1052a65 65 0 0 0 111 57l423-454 105 247a65 65 0 0 0 73 38l542-115-186 572a65 65 0 0 0 34 79l212 99-941 762a65 65 0 0 0-20 73l116 320-859-151a95 95 0 0 0-111 98l45 863z" transform="translate(250 258)scale(.068)"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 817.2 820"><radialGradient id="a" cx="526.6" cy="486.836" r="478.154" fx="275.876" fy="893.983" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#5c5c5c;stop-opacity:.9477"/><stop offset=".112" style="stop-color:#474747;stop-opacity:.7805"/><stop offset=".34" style="stop-color:#202020;stop-opacity:.4413"/><stop offset=".523" style="stop-color:#090909;stop-opacity:.1692"/><stop offset=".637" style="stop-color:#000;stop-opacity:0"/></radialGradient><path d="M254.7 820.0L430.1 664.9L473.9 626.1L541.3 599.9L561.5 548.6L629.0 522.4L648.1 470.5L715.4 440.2L726.3 388.9L789.2 347.6L774.9 302.4L817.1 250.3L775.4 221.8L792.3 168.8L732.1 159.3L721.8 112.9L651.7 124.5L614.0 92.7L545.0 124.7L486.2 113.3L430.2 159.7L360.8 169.0L325.1 222.0L255.1 250.3L245.6 302.4L186.6 347.8L209.1 388.9L169.0 440.0L205.6 470.8L173.5 522.7L215.1 548.9L184.8 600.2L226.4 626.3L232.1 665.1Z" style="fill-rule:evenodd;clip-rule:evenodd;fill:url(#a);fill-opacity:.7;filter:blur(15px)"/></svg>
|
package/src/core/Browser.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
const chrome = userAgentContains('chrome');
|
|
2
|
-
|
|
3
|
-
const safari = !chrome && userAgentContains('safari');
|
|
4
|
-
|
|
5
|
-
const mobile = typeof orientation !== 'undefined';
|
|
6
|
-
|
|
7
|
-
const reducedMotion = navigator.preferences?.reducedMotion?.value ?
|
|
8
|
-
navigator.preferences.reducedMotion.value === 'reduce' :
|
|
9
|
-
typeof window === 'undefined' ? true : window?.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
10
|
-
|
|
11
|
-
const pointer = typeof window === 'undefined' ? false : !!window.PointerEvent;
|
|
12
|
-
|
|
13
|
-
const touchNative = typeof window === 'undefined' ? false : 'ontouchstart' in window || !!(window.TouchEvent);
|
|
14
|
-
|
|
15
|
-
const touch = touchNative || pointer;
|
|
16
|
-
|
|
17
|
-
function isRetina() {
|
|
18
|
-
return typeof window === 'undefined' || typeof window.devicePixelRatio === 'undefined' ? false : window.devicePixelRatio > 1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const mac = typeof navigator === 'undefined' || typeof navigator.platform === 'undefined' ? false : navigator.platform.startsWith('Mac');
|
|
22
|
-
|
|
23
|
-
const linux = typeof navigator === 'undefined' || typeof navigator.platform === 'undefined' ? false : navigator.platform.startsWith('Linux');
|
|
24
|
-
|
|
25
|
-
function userAgentContains(str) {
|
|
26
|
-
if (typeof navigator === 'undefined' || typeof navigator.userAgent === 'undefined') {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return navigator.userAgent.toLowerCase().includes(str);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* A namespace with static properties for browser/feature detection used by Maplair
|
|
34
|
-
* internally.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```js
|
|
38
|
-
* if (Browser.chrome) {
|
|
39
|
-
* alert('You are running Chrome!');
|
|
40
|
-
* }
|
|
41
|
-
* ```
|
|
42
|
-
* @type {Readonly<Record<string, boolean>>}
|
|
43
|
-
*/
|
|
44
|
-
export default {
|
|
45
|
-
/**
|
|
46
|
-
* `true` for the Chrome browser.
|
|
47
|
-
* @type {boolean}
|
|
48
|
-
*/
|
|
49
|
-
chrome,
|
|
50
|
-
/**
|
|
51
|
-
* `true` for the Safari browser.
|
|
52
|
-
* @type {boolean}
|
|
53
|
-
*/
|
|
54
|
-
safari,
|
|
55
|
-
/**
|
|
56
|
-
* `true` for all browsers running in a mobile device.
|
|
57
|
-
* @type {boolean}
|
|
58
|
-
*/
|
|
59
|
-
mobile,
|
|
60
|
-
/**
|
|
61
|
-
* `true` if the user has
|
|
62
|
-
* [configured their environment for reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion#user_preferences).
|
|
63
|
-
* Determines whether animations should play or not.
|
|
64
|
-
* @type {boolean}
|
|
65
|
-
*/
|
|
66
|
-
reducedMotion,
|
|
67
|
-
/**
|
|
68
|
-
* `true` for all browsers supporting
|
|
69
|
-
* [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).
|
|
70
|
-
* @type {boolean}
|
|
71
|
-
*/
|
|
72
|
-
pointer,
|
|
73
|
-
/**
|
|
74
|
-
* `true` for all browsers supporting either [touch](#browser-touch) or
|
|
75
|
-
* [pointer](#browser-pointer) events.
|
|
76
|
-
* Note: pointer events will be preferred (if available), and processed for all
|
|
77
|
-
* `touch*` listeners.
|
|
78
|
-
* @type {boolean}
|
|
79
|
-
*/
|
|
80
|
-
touch,
|
|
81
|
-
/**
|
|
82
|
-
* `true` for all browsers supporting
|
|
83
|
-
* [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).
|
|
84
|
-
* **This does not necessarily mean** that the browser is running in a computer with
|
|
85
|
-
* a touchscreen, it only means that the browser is capable of understanding
|
|
86
|
-
* touch events.
|
|
87
|
-
* @type {boolean}
|
|
88
|
-
*/
|
|
89
|
-
touchNative,
|
|
90
|
-
/**
|
|
91
|
-
* `true` for browsers on a high-resolution "retina" screen or on any screen when
|
|
92
|
-
* browser's display zoom is more than 100%. Follows changes of the
|
|
93
|
-
* `devicePixelRatio`, e.g. when moving the window to another screen (see the map's
|
|
94
|
-
* `pixelratiochange` event).
|
|
95
|
-
* @type {boolean}
|
|
96
|
-
*/
|
|
97
|
-
get retina() {
|
|
98
|
-
return isRetina();
|
|
99
|
-
},
|
|
100
|
-
/**
|
|
101
|
-
* `true` when the browser is running in a Mac platform.
|
|
102
|
-
* @type {boolean}
|
|
103
|
-
*/
|
|
104
|
-
mac,
|
|
105
|
-
/**
|
|
106
|
-
* `true` when the browser is running in a Linux platform.
|
|
107
|
-
* @type {boolean}
|
|
108
|
-
*/
|
|
109
|
-
linux
|
|
110
|
-
};
|
package/src/images/layers.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26"><path fill="#b9b9b9" d="m.032 17.056 13-8 13 8-13 8z"/><path fill="#737373" d="m.032 17.056-.032.93 13 8 13-8 .032-.93-13 8z"/><path fill="#cdcdcd" d="m0 13.076 13-8 13 8-13 8z"/><path fill="#737373" d="M0 13.076v.91l13 8 13-8v-.91l-13 8z"/><path fill="#e9e9e9" fill-opacity=".585" stroke="#797979" stroke-width=".1" d="m0 8.986 13-8 13 8-13 8-13-8"/><path fill="#737373" d="M0 8.986v1l13 8 13-8v-1l-13 8z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round" viewBox="0 0 500 820"><defs><linearGradient id="a" x1="0" x2="1" y1="0" y2="0" gradientTransform="rotate(-90 478.727 62.272)scale(37.566)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#C2331B"/><stop offset="1" stop-color="#E2603F"/></linearGradient><linearGradient id="b" x1="0" x2="1" y1="0" y2="0" gradientTransform="rotate(-90 468.484 54.002)scale(19.053)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8F2D20"/><stop offset="1" stop-color="#B23A27"/></linearGradient></defs><path fill="url(#a)" stroke="url(#b)" stroke-width="1.1" stroke-linejoin="miter" stroke-miterlimit="10" d="M416.500 542.096L420.919 533.569L422.024 531.437L424.460 529.996L424.233 527.174L426.670 525.732L426.382 522.881L428.720 521.213L428.075 518.393L429.979 516.125L428.342 513.639L429.080 510.777L426.581 509.207L426.168 506.292L423.266 505.773L421.781 503.221L418.898 503.859L416.511 502.112L414.131 503.870L411.248 503.241L409.766 505.793L406.865 506.302L406.439 509.216L403.933 510.775L404.661 513.641L403.023 516.136L404.935 518.393L404.271 521.204L406.590 522.896L406.299 525.752L408.738 527.189L408.516 530.011L410.956 531.448L412.065 533.578Z" transform="translate(-7889.1 -9807.44)scale(19.5417)"/><path fill="#FFF" d="m-90 2030 45-863a95 95 0 0 0-111-98l-859 151 116-320a65 65 0 0 0-20-73l-941-762 212-99a65 65 0 0 0 34-79l-186-572 542 115a65 65 0 0 0 73-38l105-247 423 454a65 65 0 0 0 111-57l-204-1052 327 189a65 65 0 0 0 91-27l332-652 332 652a65 65 0 0 0 91 27l327-189-204 1052a65 65 0 0 0 111 57l423-454 105 247a65 65 0 0 0 73 38l542-115-186 572a65 65 0 0 0 34 79l212 99-941 762a65 65 0 0 0-20 73l116 320-859-151a95 95 0 0 0-111 98l45 863z" transform="translate(250 258)scale(.068)"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 817.2 820"><radialGradient id="a" cx="526.6" cy="486.836" r="478.154" fx="275.876" fy="893.983" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#5c5c5c;stop-opacity:.9477"/><stop offset=".112" style="stop-color:#474747;stop-opacity:.7805"/><stop offset=".34" style="stop-color:#202020;stop-opacity:.4413"/><stop offset=".523" style="stop-color:#090909;stop-opacity:.1692"/><stop offset=".637" style="stop-color:#000;stop-opacity:0"/></radialGradient><path d="M254.7 820.0L430.1 664.9L473.9 626.1L541.3 599.9L561.5 548.6L629.0 522.4L648.1 470.5L715.4 440.2L726.3 388.9L789.2 347.6L774.9 302.4L817.1 250.3L775.4 221.8L792.3 168.8L732.1 159.3L721.8 112.9L651.7 124.5L614.0 92.7L545.0 124.7L486.2 113.3L430.2 159.7L360.8 169.0L325.1 222.0L255.1 250.3L245.6 302.4L186.6 347.8L209.1 388.9L169.0 440.0L205.6 470.8L173.5 522.7L215.1 548.9L184.8 600.2L226.4 626.3L232.1 665.1Z" style="fill-rule:evenodd;clip-rule:evenodd;fill:url(#a);fill-opacity:.7;filter:blur(15px)"/></svg>
|