@longline/aqua-ui 1.0.59 → 1.0.60

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/map/Map/Map.d.ts CHANGED
@@ -38,10 +38,11 @@ interface IProps {
38
38
  */
39
39
  bearing?: number;
40
40
  /**
41
- * Is water clipped?
41
+ * If set, water is clipped at given elevation.
42
+ * A value of `1` generally works.
42
43
  * @default false
43
44
  */
44
- clipped?: boolean;
45
+ clipped?: number;
45
46
  /**
46
47
  * Optional Mapbox logo position.
47
48
  * @default top-right
@@ -77,5 +78,5 @@ interface IProps {
77
78
  onClick?: (e: MapMouseEvent) => void;
78
79
  }
79
80
  declare const useViewState: () => ViewState;
80
- declare const Map: ({ longitude, latitude, zoom, pitch, bearing, clipped, logoPosition, interactiveLayerIDs, noRotate, minZoom, maxZoom, ...props }: IProps) => React.JSX.Element;
81
+ declare const Map: ({ longitude, latitude, zoom, pitch, bearing, logoPosition, interactiveLayerIDs, noRotate, minZoom, maxZoom, ...props }: IProps) => React.JSX.Element;
81
82
  export { Map, useViewState };
package/map/Map/Map.js CHANGED
@@ -148,7 +148,7 @@ var MapBase = function (props) {
148
148
  // Pixels with no elevation (i.e. water) will be transparent:
149
149
  // < 1: some of sober island's water clipped
150
150
  // < 0: nothing is transparent
151
- if (elevation < 0.5) {
151
+ if (elevation < props.clipped) {
152
152
  satImageData.data[p] = 0;
153
153
  satImageData.data[p + 1] = 0;
154
154
  satImageData.data[p + 2] = 0;
@@ -227,8 +227,8 @@ var MapBase = function (props) {
227
227
  };
228
228
  var Controls = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n & > * {\n pointer-events: all;\n }\n\n ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n & > * {\n pointer-events: all;\n }\n\n ", ";\n"])), function (p) { return p.theme.font.bodyMedium; });
229
229
  var Map = function (_a) {
230
- var _b = _a.longitude, longitude = _b === void 0 ? -64.6 : _b, _c = _a.latitude, latitude = _c === void 0 ? 44.02 : _c, _d = _a.zoom, zoom = _d === void 0 ? 11 : _d, _e = _a.pitch, pitch = _e === void 0 ? 0 : _e, _f = _a.bearing, bearing = _f === void 0 ? 0 : _f, _g = _a.clipped, clipped = _g === void 0 ? false : _g, _h = _a.logoPosition, logoPosition = _h === void 0 ? 'top-right' : _h, _j = _a.interactiveLayerIDs, interactiveLayerIDs = _j === void 0 ? [] : _j, _k = _a.noRotate, noRotate = _k === void 0 ? false : _k, _l = _a.minZoom, minZoom = _l === void 0 ? 1 : _l, _m = _a.maxZoom, maxZoom = _m === void 0 ? 20 : _m, props = __rest(_a, ["longitude", "latitude", "zoom", "pitch", "bearing", "clipped", "logoPosition", "interactiveLayerIDs", "noRotate", "minZoom", "maxZoom"]);
231
- return React.createElement(MapBase, __assign({ longitude: longitude, latitude: latitude, zoom: zoom, pitch: pitch, bearing: bearing, clipped: clipped, logoPosition: logoPosition, interactiveLayerIDs: interactiveLayerIDs, noRotate: noRotate, minZoom: minZoom, maxZoom: maxZoom }, props));
230
+ var _b = _a.longitude, longitude = _b === void 0 ? -64.6 : _b, _c = _a.latitude, latitude = _c === void 0 ? 44.02 : _c, _d = _a.zoom, zoom = _d === void 0 ? 11 : _d, _e = _a.pitch, pitch = _e === void 0 ? 0 : _e, _f = _a.bearing, bearing = _f === void 0 ? 0 : _f, _g = _a.logoPosition, logoPosition = _g === void 0 ? 'top-right' : _g, _h = _a.interactiveLayerIDs, interactiveLayerIDs = _h === void 0 ? [] : _h, _j = _a.noRotate, noRotate = _j === void 0 ? false : _j, _k = _a.minZoom, minZoom = _k === void 0 ? 1 : _k, _l = _a.maxZoom, maxZoom = _l === void 0 ? 20 : _l, props = __rest(_a, ["longitude", "latitude", "zoom", "pitch", "bearing", "logoPosition", "interactiveLayerIDs", "noRotate", "minZoom", "maxZoom"]);
231
+ return React.createElement(MapBase, __assign({ longitude: longitude, latitude: latitude, zoom: zoom, pitch: pitch, bearing: bearing, logoPosition: logoPosition, interactiveLayerIDs: interactiveLayerIDs, noRotate: noRotate, minZoom: minZoom, maxZoom: maxZoom }, props));
232
232
  };
233
233
  export { Map, useViewState };
234
234
  var templateObject_1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",