@longline/aqua-ui 1.0.159 → 1.0.161
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/containers/Dock/Dockable.js +1 -1
- package/map/Map/Map.d.ts +7 -3
- package/map/Map/Map.js +1 -1
- package/map/PositionsManager/PositionsManager.js +6 -3
- package/map/controls/CompassButton/CompassButton.js +1 -1
- package/map/controls/FullscreenButton/FullscreenButton.js +1 -1
- package/map/controls/Geocoder/Geocoder.js +1 -1
- package/map/controls/Graticule/Graticule.js +1 -1
- package/map/controls/ZoomInButton/ZoomInButton.js +1 -1
- package/map/controls/ZoomOutButton/ZoomOutButton.js +1 -1
- package/map/layers/ClusterLayer/ClusterLayer.js +1 -1
- package/map/layers/HtmlMarkerLayer/HtmlMarkerLayer.js +1 -1
- package/map/layers/InterpolationLayer/InterpolationLayer.js +2 -6
- package/map/layers/ParticlesLayer/ParticlesLayer.js +2 -6
- package/package.json +4 -4
|
@@ -25,7 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
27
|
import * as React from 'react';
|
|
28
|
-
import { useMap } from 'react-map-gl';
|
|
28
|
+
import { useMap } from 'react-map-gl/mapbox';
|
|
29
29
|
import styled, { css } from 'styled-components';
|
|
30
30
|
import { useViewState } from '../../map/Map';
|
|
31
31
|
var DockableBase = function (props) {
|
package/map/Map/Map.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MapMouseEvent, Map as OriginalMap } from 'mapbox-gl';
|
|
3
|
-
import { ViewState } from 'react-map-gl';
|
|
4
|
-
import { PaddingOptions } from 'react-map-gl/dist/esm/types';
|
|
3
|
+
import { ViewState } from 'react-map-gl/mapbox';
|
|
5
4
|
interface IProps {
|
|
6
5
|
/** @ignore */
|
|
7
6
|
children?: React.ReactNode;
|
|
@@ -42,7 +41,12 @@ interface IProps {
|
|
|
42
41
|
* Initial padding.
|
|
43
42
|
* @default 0,0,0,0
|
|
44
43
|
*/
|
|
45
|
-
padding?:
|
|
44
|
+
padding?: {
|
|
45
|
+
readonly top?: number;
|
|
46
|
+
readonly bottom?: number;
|
|
47
|
+
readonly right?: number;
|
|
48
|
+
readonly left?: number;
|
|
49
|
+
};
|
|
46
50
|
/**
|
|
47
51
|
* If set, water is clipped at given elevation.
|
|
48
52
|
* A value of `1` generally works.
|
package/map/Map/Map.js
CHANGED
|
@@ -62,7 +62,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
62
62
|
};
|
|
63
63
|
import * as React from 'react';
|
|
64
64
|
import styled, { useTheme } from "styled-components";
|
|
65
|
-
import { Map as GLMap, Layer, Source } from 'react-map-gl';
|
|
65
|
+
import { Map as GLMap, Layer, Source } from 'react-map-gl/mapbox';
|
|
66
66
|
var ViewStateContext = React.createContext(null);
|
|
67
67
|
var useViewState = function () {
|
|
68
68
|
return React.useContext(ViewStateContext);
|
|
@@ -19,7 +19,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
21
|
import * as React from 'react';
|
|
22
|
-
import { useMap } from 'react-map-gl';
|
|
22
|
+
import { useMap } from 'react-map-gl/mapbox';
|
|
23
23
|
import { PositionBox } from './PositionBox';
|
|
24
24
|
// Storage key for saving and restoring positions.
|
|
25
25
|
var STORAGE_KEY = 'positions';
|
|
@@ -52,6 +52,9 @@ var PositionsManager = function (_a) {
|
|
|
52
52
|
// Positions are restored from storage, if any were saved.
|
|
53
53
|
var _d = React.useState(loadPositionsFromStorage()), positions = _d[0], setPositions = _d[1];
|
|
54
54
|
var handleRegisterCoordinate = function (ev) {
|
|
55
|
+
// Ctrl key must be held down.
|
|
56
|
+
if (!ev.originalEvent.ctrlKey)
|
|
57
|
+
return;
|
|
55
58
|
// Add click coordinates to positions list.
|
|
56
59
|
setPositions(function (positions) {
|
|
57
60
|
// Allow no more than 3 saved positions.
|
|
@@ -65,10 +68,10 @@ var PositionsManager = function (_a) {
|
|
|
65
68
|
return newPositions;
|
|
66
69
|
});
|
|
67
70
|
};
|
|
68
|
-
// Add a
|
|
71
|
+
// Add a CTRL+click handler to the map, and removes
|
|
69
72
|
// it on unmount.
|
|
70
73
|
React.useEffect(function () {
|
|
71
|
-
map.current.on('
|
|
74
|
+
map.current.on('click', handleRegisterCoordinate);
|
|
72
75
|
return function () { map.current.off('contextmenu', handleRegisterCoordinate); };
|
|
73
76
|
}, []);
|
|
74
77
|
var handleMovePosition = function (idx, x, y) {
|
|
@@ -25,7 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
27
|
import * as React from 'react';
|
|
28
|
-
import { useMap } from 'react-map-gl';
|
|
28
|
+
import { useMap } from 'react-map-gl/mapbox';
|
|
29
29
|
import styled, { css } from 'styled-components';
|
|
30
30
|
import { MapButton } from '../base/MapButton';
|
|
31
31
|
import { useViewState } from '../../Map';
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
|
-
import { useMap } from 'react-map-gl';
|
|
24
|
+
import { useMap } from 'react-map-gl/mapbox';
|
|
25
25
|
import { MapButton } from '../base/MapButton';
|
|
26
26
|
/**
|
|
27
27
|
* The `FullscreenButton` toggles the map full-screen when clicked.
|
|
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
26
26
|
};
|
|
27
27
|
import * as React from 'react';
|
|
28
28
|
import styled from 'styled-components';
|
|
29
|
-
import { useMap } from 'react-map-gl';
|
|
29
|
+
import { useMap } from 'react-map-gl/mapbox';
|
|
30
30
|
import { GeocoderApi } from './GeocoderApi';
|
|
31
31
|
import { GeocoderEntry } from './GeocoderEntry';
|
|
32
32
|
import { GeocoderList } from './GeocoderList';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Layer, Source, useMap } from 'react-map-gl';
|
|
2
|
+
import { Layer, Source, useMap } from 'react-map-gl/mapbox';
|
|
3
3
|
import { useViewState } from '../../Map';
|
|
4
4
|
/**
|
|
5
5
|
* The `Graticule` component draws a graticule over the map. The caller
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
|
-
import { useMap } from 'react-map-gl';
|
|
24
|
+
import { useMap } from 'react-map-gl/mapbox';
|
|
25
25
|
import { MapButton } from '../base/MapButton';
|
|
26
26
|
import { useViewState } from '../../Map';
|
|
27
27
|
import { Mouse } from '../../../controls/Mouse';
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
|
-
import { useMap } from 'react-map-gl';
|
|
24
|
+
import { useMap } from 'react-map-gl/mapbox';
|
|
25
25
|
import { MapButton } from '../base/MapButton';
|
|
26
26
|
import { useViewState } from '../../Map';
|
|
27
27
|
import { Mouse } from '../../../controls/Mouse';
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
|
-
import { Source, useMap } from 'react-map-gl';
|
|
24
|
+
import { Source, useMap } from 'react-map-gl/mapbox';
|
|
25
25
|
import { HtmlMarkerLayer } from '../HtmlMarkerLayer/HtmlMarkerLayer';
|
|
26
26
|
import { ClusterMarker } from '../../markers/ClusterMarker';
|
|
27
27
|
function uuidv4() {
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import * as React from 'react';
|
|
24
24
|
import * as ReactDOM from 'react-dom/client';
|
|
25
|
-
import { Layer, useMap } from 'react-map-gl';
|
|
25
|
+
import { Layer, useMap } from 'react-map-gl/mapbox';
|
|
26
26
|
import { Marker } from 'mapbox-gl';
|
|
27
27
|
/**
|
|
28
28
|
* The `HtmlMarkerLayer` manages HTML markers on a map. HTML markers are far slower
|
|
@@ -32,7 +32,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
32
32
|
import * as React from 'react';
|
|
33
33
|
import { featureCollection, point } from '@turf/helpers';
|
|
34
34
|
import { MercatorCoordinate } from 'mapbox-gl';
|
|
35
|
-
import { Layer, useMap } from 'react-map-gl';
|
|
35
|
+
import { Layer, useMap } from 'react-map-gl/mapbox';
|
|
36
36
|
import tin from '@turf/tin';
|
|
37
37
|
import { RgbColor } from '../../../helper/RgbColor';
|
|
38
38
|
import { LevelsVertexShader } from './LevelsVertexShader';
|
|
@@ -239,11 +239,7 @@ var InterpolationLayerBase = function (props) {
|
|
|
239
239
|
gl.viewport(0, 0, width * window.devicePixelRatio, height * window.devicePixelRatio);
|
|
240
240
|
renderContours(gl, matrix, width, height);
|
|
241
241
|
};
|
|
242
|
-
return (React.createElement(Layer
|
|
243
|
-
// @ts-ignore
|
|
244
|
-
, {
|
|
245
|
-
// @ts-ignore
|
|
246
|
-
type: "custom", beforeId: "overlay", key: time, onAdd: onAddLayer, render: function (gl, matrix) { return onRender(gl, matrix, map.current.getZoom(), map.current.getContainer().clientWidth, map.current.getContainer().clientHeight); } }));
|
|
242
|
+
return (React.createElement(Layer, { id: null, type: "custom", beforeId: "overlay", key: time, onAdd: onAddLayer, render: function (gl, matrix) { return onRender(gl, matrix, map.current.getZoom(), map.current.getContainer().clientWidth, map.current.getContainer().clientHeight); } }));
|
|
247
243
|
};
|
|
248
244
|
/**
|
|
249
245
|
* An `InterpolationLayer` takes a data array of the form `{ latitude, longitude, value }`. It performs triangulation
|
|
@@ -33,7 +33,7 @@ import * as React from 'react';
|
|
|
33
33
|
import { featureCollection, point } from '@turf/helpers';
|
|
34
34
|
import tin from '@turf/tin';
|
|
35
35
|
import { MercatorCoordinate } from 'mapbox-gl';
|
|
36
|
-
import { Layer, useMap } from 'react-map-gl';
|
|
36
|
+
import { Layer, useMap } from 'react-map-gl/mapbox';
|
|
37
37
|
import { UVVertexShader } from './UVVertexShader';
|
|
38
38
|
import { UVFragmentShader } from './UVFragmentShader';
|
|
39
39
|
import { ParticlesFragmentShader } from './ParticlesFragmentShader';
|
|
@@ -328,11 +328,7 @@ var ParticlesLayerBase = function (props) {
|
|
|
328
328
|
// Render particles:
|
|
329
329
|
renderParticles(gl, matrix);
|
|
330
330
|
};
|
|
331
|
-
return (React.createElement(Layer
|
|
332
|
-
// @ts-ignore
|
|
333
|
-
, {
|
|
334
|
-
// @ts-ignore
|
|
335
|
-
type: "custom", beforeId: "overlay", key: time, onAdd: onAddLayer, render: function (gl, matrix) { return onRender(gl, matrix, map.current.getZoom(), map.current.getContainer().clientWidth, map.current.getContainer().clientHeight); } }));
|
|
331
|
+
return (React.createElement(Layer, { id: null, type: "custom", beforeId: "overlay", key: time, onAdd: onAddLayer, render: function (gl, matrix) { return onRender(gl, matrix, map.current.getZoom(), map.current.getContainer().clientWidth, map.current.getContainer().clientHeight); } }));
|
|
336
332
|
};
|
|
337
333
|
var ParticlesLayer = function (_a) {
|
|
338
334
|
var _b = _a.particles, particles = _b === void 0 ? 80 : _b, _c = _a.density, density = _c === void 0 ? 40 : _c, _d = _a.delay, delay = _d === void 0 ? 0 : _d, _e = _a.gradientStops, gradientStops = _e === void 0 ? [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longline/aqua-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.161",
|
|
4
4
|
"description": "AquaUI",
|
|
5
5
|
"author": "Alexander van Oostenrijk / Longline Environment",
|
|
6
6
|
"license": "Commercial",
|
|
@@ -51,17 +51,17 @@
|
|
|
51
51
|
"@turf/helpers": "^7.1.0",
|
|
52
52
|
"@turf/tin": "^7.1.0",
|
|
53
53
|
"@types/geojson": "^7946.0.14",
|
|
54
|
-
"@types/mapbox-gl": "^3.4.
|
|
54
|
+
"@types/mapbox-gl": "^3.4.1",
|
|
55
55
|
"@types/react": "^18.3.10",
|
|
56
56
|
"@types/react-dom": "^18.3.0",
|
|
57
57
|
"awesome-debounce-promise": "^2.1.0",
|
|
58
58
|
"date-fns": "^4.1.0",
|
|
59
59
|
"gl-matrix": "^3.4.3",
|
|
60
|
-
"mapbox-gl": "^3.
|
|
60
|
+
"mapbox-gl": "^3.9.4",
|
|
61
61
|
"overlayscrollbars-react": "^0.5.6",
|
|
62
62
|
"react": "^18.3.1",
|
|
63
63
|
"react-dom": "^18.3.1",
|
|
64
|
-
"react-map-gl": "^
|
|
64
|
+
"react-map-gl": "^8.0.1",
|
|
65
65
|
"react-popper": "^2.3.0",
|
|
66
66
|
"react-router-dom": "^6.26.2",
|
|
67
67
|
"react-transition-state": "^2.2.0",
|