@mapcomponents/react-maplibre 0.1.78 → 0.1.79
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 +22 -2
- package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +3 -40
- package/dist/components/MlTerrainLayer/MlTerrainLayer.cy.d.ts +1 -0
- package/dist/components/MlTerrainLayer/MlTerrainLayer.d.ts +28 -0
- package/dist/components/MlTerrainLayer/MlTerrainLayer.stories.d.ts +14 -0
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +24 -9
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +1 -1
- package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +49 -3
- package/dist/contexts/LayerContext.d.ts +2 -0
- package/dist/hooks/useFeatureEditor.d.ts +46 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +270 -1383
- package/dist/index.esm.js.map +1 -1
- package/dist/ui_components/LayerList/LayerListItem.d.ts +4 -0
- package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +0 -1
- package/dist/ui_components/SpeedDial/SpeedDial.d.ts +14 -0
- package/dist/ui_components/SpeedDial/SpeedDial.stories.d.ts +21 -0
- package/package.json +5 -5
- package/dist/components/MlFeatureEditor/custom-direct-select-mode.d.ts +0 -37
- package/dist/components/MlFeatureEditor/custom-polygon-mode.d.ts +0 -16
- package/dist/components/MlFeatureEditor/custom-select-mode.d.ts +0 -37
- package/dist/components/MlFeatureEditor/lib/common_selectors.d.ts +0 -11
- package/dist/components/MlFeatureEditor/lib/constants.d.ts +0 -85
- package/dist/components/MlFeatureEditor/lib/constrain_feature_movement.d.ts +0 -2
- package/dist/components/MlFeatureEditor/lib/create_midpoint.d.ts +0 -15
- package/dist/components/MlFeatureEditor/lib/create_supplementary_points.d.ts +0 -2
- package/dist/components/MlFeatureEditor/lib/create_vertex.d.ts +0 -13
- package/dist/components/MlFeatureEditor/lib/double_click_zoom.d.ts +0 -5
- package/dist/components/MlFeatureEditor/lib/euclidean_distance.d.ts +0 -5
- package/dist/components/MlFeatureEditor/lib/features_at.d.ts +0 -7
- package/dist/components/MlFeatureEditor/lib/get_features_and_set_cursor.d.ts +0 -1
- package/dist/components/MlFeatureEditor/lib/is_click.d.ts +0 -1
- package/dist/components/MlFeatureEditor/lib/is_event_at_coordinates.d.ts +0 -6
- package/dist/components/MlFeatureEditor/lib/is_tap.d.ts +0 -3
- package/dist/components/MlFeatureEditor/lib/map_event_to_bounding_box.d.ts +0 -12
- package/dist/components/MlFeatureEditor/lib/mode_handler.d.ts +0 -24
- package/dist/components/MlFeatureEditor/lib/mouse_event_point.d.ts +0 -11
- package/dist/components/MlFeatureEditor/lib/move_features.d.ts +0 -2
- package/dist/components/MlFeatureEditor/lib/sort_features.d.ts +0 -2
- package/dist/components/MlFeatureEditor/lib/string_set.d.ts +0 -21
- package/dist/components/MlFeatureEditor/lib/string_sets_are_equal.d.ts +0 -5
- package/dist/components/MlFeatureEditor/lib/theme.d.ts +0 -88
- package/dist/components/MlFeatureEditor/lib/to_dense_array.d.ts +0 -12
- package/dist/components/MlFeatureEditor/lib/utils.d.ts +0 -10
- package/dist/components/MlSketchTool/LayerList/ColorPicker.d.ts +0 -10
- package/dist/components/MlSketchTool/LayerList/LayerList.d.ts +0 -6
- package/dist/components/MlSketchTool/LayerList/LayerListItem.d.ts +0 -12
- package/dist/components/MlSketchTool/LayerList/LayerPropertyForm.d.ts +0 -10
- package/dist/components/MlThreeJsLayer/MlThreejsLayer.d.ts +0 -30
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { SxProps } from '@mui/material';
|
|
2
3
|
type Props = {
|
|
3
4
|
layerComponent: JSX.Element;
|
|
4
5
|
visible: boolean;
|
|
@@ -8,6 +9,8 @@ type Props = {
|
|
|
8
9
|
description?: string;
|
|
9
10
|
setLayerState?: (state: unknown) => void;
|
|
10
11
|
showDeleteButton?: boolean;
|
|
12
|
+
listItemSx?: SxProps;
|
|
13
|
+
buttons?: JSX.Element;
|
|
11
14
|
};
|
|
12
15
|
declare function LayerListItem({ layerComponent, visible, type, name, description, configurable, setLayerState, ...props }: Props): JSX.Element;
|
|
13
16
|
declare namespace LayerListItem {
|
|
@@ -15,6 +18,7 @@ declare namespace LayerListItem {
|
|
|
15
18
|
type: string;
|
|
16
19
|
visible: boolean;
|
|
17
20
|
showDeleteButton: boolean;
|
|
21
|
+
buttons: JSX.Element;
|
|
18
22
|
};
|
|
19
23
|
}
|
|
20
24
|
export default LayerListItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface SpeedDialProps {
|
|
3
|
+
/**
|
|
4
|
+
* Id of the target MapLibre instance in mapContext
|
|
5
|
+
*/
|
|
6
|
+
mapId?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const SpeedDial: {
|
|
9
|
+
(): JSX.Element;
|
|
10
|
+
defaultProps: {
|
|
11
|
+
mapId: undefined;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default SpeedDial;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const storyoptions: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
(): JSX.Element;
|
|
6
|
+
defaultProps: {
|
|
7
|
+
mapId: undefined;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
argTypes: {};
|
|
11
|
+
decorators: ((Story: any, context: any) => JSX.Element)[];
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
source: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default storyoptions;
|
|
21
|
+
export declare const ExampleConfig: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapcomponents/react-maplibre",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.79",
|
|
4
4
|
"main": "dist/index.esm.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@emotion/css": "^11.10.5",
|
|
23
|
-
"@emotion/react": "^11.10.
|
|
24
|
-
"@emotion/styled": "^11.10.
|
|
23
|
+
"@emotion/react": "^11.10.8",
|
|
24
|
+
"@emotion/styled": "^11.10.8",
|
|
25
25
|
"@mapbox/mapbox-gl-draw": "^1.4.0",
|
|
26
26
|
"@mapbox/mapbox-gl-sync-move": "^0.3.1",
|
|
27
27
|
"@mui/icons-material": "^5.11.0",
|
|
28
|
-
"@mui/material": "^5.
|
|
28
|
+
"@mui/material": "^5.12.3",
|
|
29
29
|
"@turf/turf": "^6.5.0",
|
|
30
30
|
"@types/react-color": "^3.0.6",
|
|
31
31
|
"d3": "^7.8.2",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
83
83
|
"babel-plugin-styled-components": "^2.0.7",
|
|
84
84
|
"babel-preset-react-app": "^10.0.1",
|
|
85
|
-
"cypress": "^12.
|
|
85
|
+
"cypress": "^12.11.0",
|
|
86
86
|
"enzyme": "^3.11.0",
|
|
87
87
|
"eslint": "^8.32.0",
|
|
88
88
|
"eslint-config-prettier": "^8.6.0",
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export default DirectSelect;
|
|
2
|
-
declare namespace DirectSelect {
|
|
3
|
-
function fireUpdate(): void;
|
|
4
|
-
function fireActionable(state: any): void;
|
|
5
|
-
function startDragging(state: any, e: any): void;
|
|
6
|
-
function stopDragging(state: any): void;
|
|
7
|
-
function onVertex(state: any, e: any): void;
|
|
8
|
-
function onMidpoint(state: any, e: any): void;
|
|
9
|
-
function pathsToCoordinates(featureId: any, paths: any): any;
|
|
10
|
-
function onFeature(state: any, e: any): void;
|
|
11
|
-
function dragFeature(state: any, e: any, delta: any): void;
|
|
12
|
-
function dragVertex(state: any, e: any, delta: any): void;
|
|
13
|
-
function clickNoTarget(): void;
|
|
14
|
-
function clickInactive(): void;
|
|
15
|
-
function clickActiveFeature(state: any): void;
|
|
16
|
-
function onSetup(opts: any): {
|
|
17
|
-
featureId: any;
|
|
18
|
-
feature: any;
|
|
19
|
-
dragMoveLocation: any;
|
|
20
|
-
dragMoving: boolean;
|
|
21
|
-
canDragMove: boolean;
|
|
22
|
-
selectedCoordPaths: any[];
|
|
23
|
-
groupMove_vertices: any;
|
|
24
|
-
};
|
|
25
|
-
function onStop(): void;
|
|
26
|
-
function toDisplayFeatures(state: any, geojson: any, push: any): void;
|
|
27
|
-
function onTrash(state: any): void;
|
|
28
|
-
function onMouseMove(state: any, e: any): void;
|
|
29
|
-
function onMouseOut(state: any): void;
|
|
30
|
-
function onTouchStart(state: any, e: any): void;
|
|
31
|
-
function onMouseDown(state: any, e: any): void;
|
|
32
|
-
function onDrag(state: any, e: any): void;
|
|
33
|
-
function onClick(state: any, e: any): void;
|
|
34
|
-
function onTap(state: any, e: any): void;
|
|
35
|
-
function onTouchEnd(state: any): void;
|
|
36
|
-
function onMouseUp(state: any): void;
|
|
37
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export default CustomPolygonMode;
|
|
2
|
-
declare namespace CustomPolygonMode {
|
|
3
|
-
function onSetup(): {
|
|
4
|
-
polygon: any;
|
|
5
|
-
currentVertexPosition: number;
|
|
6
|
-
};
|
|
7
|
-
function clickAnywhere(state: any, e: any): any;
|
|
8
|
-
function clickOnVertex(state: any): any;
|
|
9
|
-
function onMouseMove(state: any, e: any): void;
|
|
10
|
-
function onTap(state: any, e: any): any;
|
|
11
|
-
function onClick(state: any, e: any): any;
|
|
12
|
-
function onKeyUp(state: any, e: any): void;
|
|
13
|
-
function onStop(state: any): void;
|
|
14
|
-
function toDisplayFeatures(state: any, geojson: any, display: any): any;
|
|
15
|
-
function onTrash(state: any): void;
|
|
16
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export default CustomSelectMode;
|
|
2
|
-
declare namespace CustomSelectMode {
|
|
3
|
-
function onSetup(opts: any): {
|
|
4
|
-
dragMoveLocation: null;
|
|
5
|
-
boxSelectStartLocation: null;
|
|
6
|
-
boxSelectElement: undefined;
|
|
7
|
-
boxSelecting: boolean;
|
|
8
|
-
canBoxSelect: boolean;
|
|
9
|
-
dragMoving: boolean;
|
|
10
|
-
canDragMove: boolean;
|
|
11
|
-
initiallySelectedFeatureIds: any;
|
|
12
|
-
};
|
|
13
|
-
function fireUpdate(): void;
|
|
14
|
-
function fireActionable(): void;
|
|
15
|
-
function getUniqueIds(allFeatures: any): any;
|
|
16
|
-
function stopExtendedInteractions(state: any): void;
|
|
17
|
-
function onStop(): void;
|
|
18
|
-
function onMouseMove(state: any): void;
|
|
19
|
-
function onMouseOut(state: any): void;
|
|
20
|
-
function onTap(state: any, e: any): any;
|
|
21
|
-
function onClick(state: any, e: any): any;
|
|
22
|
-
function clickAnywhere(state: any): void;
|
|
23
|
-
function clickOnVertex(state: any, e: any): void;
|
|
24
|
-
function startOnActiveFeature(state: any, e: any): void;
|
|
25
|
-
function clickOnFeature(state: any, e: any): any;
|
|
26
|
-
function onMouseDown(state: any, e: any): void;
|
|
27
|
-
function startBoxSelect(state: any, e: any): void;
|
|
28
|
-
function onTouchStart(state: any, e: any): void;
|
|
29
|
-
function onDrag(state: any, e: any): void;
|
|
30
|
-
function whileBoxSelect(state: any, e: any): void;
|
|
31
|
-
function dragMove(state: any, e: any): void;
|
|
32
|
-
function onMouseUp(state: any, e: any): void;
|
|
33
|
-
function toDisplayFeatures(state: any, geojson: any, display: any): void;
|
|
34
|
-
function onTrash(): void;
|
|
35
|
-
function onCombineFeatures(): void;
|
|
36
|
-
function onUncombineFeatures(): void;
|
|
37
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export function isOfMetaType(type: any): (e: any) => boolean;
|
|
2
|
-
export function isShiftMousedown(e: any): boolean;
|
|
3
|
-
export function isActiveFeature(e: any): boolean;
|
|
4
|
-
export function isInactiveFeature(e: any): boolean;
|
|
5
|
-
export function noTarget(e: any): boolean;
|
|
6
|
-
export function isFeature(e: any): boolean;
|
|
7
|
-
export function isVertex(e: any): boolean;
|
|
8
|
-
export function isShiftDown(e: any): boolean;
|
|
9
|
-
export function isEscapeKey(e: any): boolean;
|
|
10
|
-
export function isEnterKey(e: any): boolean;
|
|
11
|
-
export function isTrue(): boolean;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export namespace classes {
|
|
2
|
-
const CONTROL_BASE: string;
|
|
3
|
-
const CONTROL_PREFIX: string;
|
|
4
|
-
const CONTROL_BUTTON: string;
|
|
5
|
-
const CONTROL_BUTTON_LINE: string;
|
|
6
|
-
const CONTROL_BUTTON_POLYGON: string;
|
|
7
|
-
const CONTROL_BUTTON_POINT: string;
|
|
8
|
-
const CONTROL_BUTTON_TRASH: string;
|
|
9
|
-
const CONTROL_BUTTON_COMBINE_FEATURES: string;
|
|
10
|
-
const CONTROL_BUTTON_UNCOMBINE_FEATURES: string;
|
|
11
|
-
const CONTROL_GROUP: string;
|
|
12
|
-
const ATTRIBUTION: string;
|
|
13
|
-
const ACTIVE_BUTTON: string;
|
|
14
|
-
const BOX_SELECT: string;
|
|
15
|
-
}
|
|
16
|
-
export namespace sources {
|
|
17
|
-
const HOT: string;
|
|
18
|
-
const COLD: string;
|
|
19
|
-
}
|
|
20
|
-
export namespace cursors {
|
|
21
|
-
const ADD: string;
|
|
22
|
-
const MOVE: string;
|
|
23
|
-
const DRAG: string;
|
|
24
|
-
const POINTER: string;
|
|
25
|
-
const NONE: string;
|
|
26
|
-
}
|
|
27
|
-
export namespace types {
|
|
28
|
-
const POLYGON: string;
|
|
29
|
-
const LINE: string;
|
|
30
|
-
const POINT: string;
|
|
31
|
-
}
|
|
32
|
-
export namespace geojsonTypes {
|
|
33
|
-
export const FEATURE: string;
|
|
34
|
-
const POLYGON_1: string;
|
|
35
|
-
export { POLYGON_1 as POLYGON };
|
|
36
|
-
export const LINE_STRING: string;
|
|
37
|
-
const POINT_1: string;
|
|
38
|
-
export { POINT_1 as POINT };
|
|
39
|
-
export const FEATURE_COLLECTION: string;
|
|
40
|
-
export const MULTI_PREFIX: string;
|
|
41
|
-
export const MULTI_POINT: string;
|
|
42
|
-
export const MULTI_LINE_STRING: string;
|
|
43
|
-
export const MULTI_POLYGON: string;
|
|
44
|
-
}
|
|
45
|
-
export namespace modes {
|
|
46
|
-
const DRAW_LINE_STRING: string;
|
|
47
|
-
const DRAW_POLYGON: string;
|
|
48
|
-
const DRAW_POINT: string;
|
|
49
|
-
const SIMPLE_SELECT: string;
|
|
50
|
-
const DIRECT_SELECT: string;
|
|
51
|
-
const STATIC: string;
|
|
52
|
-
}
|
|
53
|
-
export namespace events {
|
|
54
|
-
const CREATE: string;
|
|
55
|
-
const DELETE: string;
|
|
56
|
-
const UPDATE: string;
|
|
57
|
-
const SELECTION_CHANGE: string;
|
|
58
|
-
const MODE_CHANGE: string;
|
|
59
|
-
const ACTIONABLE: string;
|
|
60
|
-
const RENDER: string;
|
|
61
|
-
const COMBINE_FEATURES: string;
|
|
62
|
-
const UNCOMBINE_FEATURES: string;
|
|
63
|
-
}
|
|
64
|
-
export namespace updateActions {
|
|
65
|
-
const MOVE_1: string;
|
|
66
|
-
export { MOVE_1 as MOVE };
|
|
67
|
-
export const CHANGE_COORDINATES: string;
|
|
68
|
-
}
|
|
69
|
-
export namespace meta {
|
|
70
|
-
const FEATURE_1: string;
|
|
71
|
-
export { FEATURE_1 as FEATURE };
|
|
72
|
-
export const MIDPOINT: string;
|
|
73
|
-
export const VERTEX: string;
|
|
74
|
-
}
|
|
75
|
-
export namespace activeStates {
|
|
76
|
-
const ACTIVE: string;
|
|
77
|
-
const INACTIVE: string;
|
|
78
|
-
}
|
|
79
|
-
export const interactions: string[];
|
|
80
|
-
export const LAT_MIN: -90;
|
|
81
|
-
export const LAT_RENDERED_MIN: -85;
|
|
82
|
-
export const LAT_MAX: 90;
|
|
83
|
-
export const LAT_RENDERED_MAX: 85;
|
|
84
|
-
export const LNG_MIN: -270;
|
|
85
|
-
export const LNG_MAX: 270;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export default create_midpoint;
|
|
2
|
-
declare function create_midpoint(parent: any, startVertex: any, endVertex: any): {
|
|
3
|
-
type: string;
|
|
4
|
-
properties: {
|
|
5
|
-
meta: string;
|
|
6
|
-
parent: any;
|
|
7
|
-
lng: number;
|
|
8
|
-
lat: number;
|
|
9
|
-
coord_path: any;
|
|
10
|
-
};
|
|
11
|
-
geometry: {
|
|
12
|
-
type: string;
|
|
13
|
-
coordinates: number[];
|
|
14
|
-
};
|
|
15
|
-
} | null;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default create_vertex;
|
|
2
|
-
/**
|
|
3
|
-
* Returns GeoJSON for a Point representing the
|
|
4
|
-
* vertex of another feature.
|
|
5
|
-
*
|
|
6
|
-
* @param {string} parentId
|
|
7
|
-
* @param {Array<number>} coordinates
|
|
8
|
-
* @param {string} path - Dot-separated numbers indicating exactly
|
|
9
|
-
* where the point exists within its parent feature's coordinates.
|
|
10
|
-
* @param {boolean} selected
|
|
11
|
-
* @return {GeoJSON} Point
|
|
12
|
-
*/
|
|
13
|
-
declare function create_vertex(parentId: string, coordinates: Array<number>, path: string, selected: boolean): typeof import("geojson");
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
export { featuresAtClick as click };
|
|
3
|
-
export { featuresAtTouch as touch };
|
|
4
|
-
}
|
|
5
|
-
export default _default;
|
|
6
|
-
declare function featuresAtClick(event: any, bbox: any, ctx: any): any;
|
|
7
|
-
declare function featuresAtTouch(event: any, bbox: any, ctx: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function getFeatureAtAndSetCursors(event: any, ctx: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function isClick(start: any, end: any, options?: {}): boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default mapEventToBoundingBox;
|
|
2
|
-
/**
|
|
3
|
-
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
4
|
-
* and licensed under ISC
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Returns a bounding box representing the event's location.
|
|
8
|
-
*
|
|
9
|
-
* @param {Event} mapEvent - Mapbox GL JS map event, with a point properties.
|
|
10
|
-
* @return {Array<Array<number>>} Bounding box.
|
|
11
|
-
*/
|
|
12
|
-
declare function mapEventToBoundingBox(mapEvent: Event, buffer?: number): Array<Array<number>>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export default ModeHandler;
|
|
2
|
-
/**
|
|
3
|
-
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
4
|
-
* and licensed under ISC
|
|
5
|
-
*/
|
|
6
|
-
declare function ModeHandler(mode: any, DrawContext: any): {
|
|
7
|
-
render: any;
|
|
8
|
-
stop(): void;
|
|
9
|
-
trash(): void;
|
|
10
|
-
combineFeatures(): void;
|
|
11
|
-
uncombineFeatures(): void;
|
|
12
|
-
drag(event: any): void;
|
|
13
|
-
click(event: any): void;
|
|
14
|
-
mousemove(event: any): void;
|
|
15
|
-
mousedown(event: any): void;
|
|
16
|
-
mouseup(event: any): void;
|
|
17
|
-
mouseout(event: any): void;
|
|
18
|
-
keydown(event: any): void;
|
|
19
|
-
keyup(event: any): void;
|
|
20
|
-
touchstart(event: any): void;
|
|
21
|
-
touchmove(event: any): void;
|
|
22
|
-
touchend(event: any): void;
|
|
23
|
-
tap(event: any): void;
|
|
24
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export default mouseEventPoint;
|
|
2
|
-
/**
|
|
3
|
-
* Returns a Point representing a mouse event's position
|
|
4
|
-
* relative to a containing element.
|
|
5
|
-
*
|
|
6
|
-
* @param {MouseEvent} mouseEvent
|
|
7
|
-
* @param {Node} container
|
|
8
|
-
* @returns {Point}
|
|
9
|
-
*/
|
|
10
|
-
declare function mouseEventPoint(mouseEvent: MouseEvent, container: Node): Point;
|
|
11
|
-
import Point from "@mapbox/point-geometry";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export default StringSet;
|
|
2
|
-
/**
|
|
3
|
-
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
4
|
-
* and licensed under ISC
|
|
5
|
-
*/
|
|
6
|
-
declare function StringSet(items: any): void;
|
|
7
|
-
declare class StringSet {
|
|
8
|
-
/**
|
|
9
|
-
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
10
|
-
* and licensed under ISC
|
|
11
|
-
*/
|
|
12
|
-
constructor(items: any);
|
|
13
|
-
_items: {};
|
|
14
|
-
_nums: {};
|
|
15
|
-
_length: any;
|
|
16
|
-
add(x: any): StringSet;
|
|
17
|
-
delete(x: any): StringSet;
|
|
18
|
-
has(x: any): boolean;
|
|
19
|
-
values(): any[];
|
|
20
|
-
clear(): StringSet;
|
|
21
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
declare const _default: ({
|
|
2
|
-
id: string;
|
|
3
|
-
type: string;
|
|
4
|
-
filter: (string | string[])[];
|
|
5
|
-
paint: {
|
|
6
|
-
"fill-color": string;
|
|
7
|
-
"fill-outline-color": string;
|
|
8
|
-
"fill-opacity": number;
|
|
9
|
-
"circle-radius"?: undefined;
|
|
10
|
-
"circle-color"?: undefined;
|
|
11
|
-
"line-color"?: undefined;
|
|
12
|
-
"line-width"?: undefined;
|
|
13
|
-
"line-dasharray"?: undefined;
|
|
14
|
-
"circle-opacity"?: undefined;
|
|
15
|
-
};
|
|
16
|
-
layout?: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
id: string;
|
|
19
|
-
type: string;
|
|
20
|
-
filter: (string | string[])[];
|
|
21
|
-
paint: {
|
|
22
|
-
"circle-radius": number;
|
|
23
|
-
"circle-color": string;
|
|
24
|
-
"fill-color"?: undefined;
|
|
25
|
-
"fill-outline-color"?: undefined;
|
|
26
|
-
"fill-opacity"?: undefined;
|
|
27
|
-
"line-color"?: undefined;
|
|
28
|
-
"line-width"?: undefined;
|
|
29
|
-
"line-dasharray"?: undefined;
|
|
30
|
-
"circle-opacity"?: undefined;
|
|
31
|
-
};
|
|
32
|
-
layout?: undefined;
|
|
33
|
-
} | {
|
|
34
|
-
id: string;
|
|
35
|
-
type: string;
|
|
36
|
-
filter: (string | string[])[];
|
|
37
|
-
layout: {
|
|
38
|
-
"line-cap": string;
|
|
39
|
-
"line-join": string;
|
|
40
|
-
};
|
|
41
|
-
paint: {
|
|
42
|
-
"line-color": string;
|
|
43
|
-
"line-width": number;
|
|
44
|
-
"fill-color"?: undefined;
|
|
45
|
-
"fill-outline-color"?: undefined;
|
|
46
|
-
"fill-opacity"?: undefined;
|
|
47
|
-
"circle-radius"?: undefined;
|
|
48
|
-
"circle-color"?: undefined;
|
|
49
|
-
"line-dasharray"?: undefined;
|
|
50
|
-
"circle-opacity"?: undefined;
|
|
51
|
-
};
|
|
52
|
-
} | {
|
|
53
|
-
id: string;
|
|
54
|
-
type: string;
|
|
55
|
-
filter: (string | string[])[];
|
|
56
|
-
layout: {
|
|
57
|
-
"line-cap": string;
|
|
58
|
-
"line-join": string;
|
|
59
|
-
};
|
|
60
|
-
paint: {
|
|
61
|
-
"line-color": string;
|
|
62
|
-
"line-dasharray": number[];
|
|
63
|
-
"line-width": number;
|
|
64
|
-
"fill-color"?: undefined;
|
|
65
|
-
"fill-outline-color"?: undefined;
|
|
66
|
-
"fill-opacity"?: undefined;
|
|
67
|
-
"circle-radius"?: undefined;
|
|
68
|
-
"circle-color"?: undefined;
|
|
69
|
-
"circle-opacity"?: undefined;
|
|
70
|
-
};
|
|
71
|
-
} | {
|
|
72
|
-
id: string;
|
|
73
|
-
type: string;
|
|
74
|
-
filter: (string | string[])[];
|
|
75
|
-
paint: {
|
|
76
|
-
"circle-radius": number;
|
|
77
|
-
"circle-opacity": number;
|
|
78
|
-
"circle-color": string;
|
|
79
|
-
"fill-color"?: undefined;
|
|
80
|
-
"fill-outline-color"?: undefined;
|
|
81
|
-
"fill-opacity"?: undefined;
|
|
82
|
-
"line-color"?: undefined;
|
|
83
|
-
"line-width"?: undefined;
|
|
84
|
-
"line-dasharray"?: undefined;
|
|
85
|
-
};
|
|
86
|
-
layout?: undefined;
|
|
87
|
-
})[];
|
|
88
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default toDenseArray;
|
|
2
|
-
/**
|
|
3
|
-
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
4
|
-
* and licensed under ISC
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Derive a dense array (no `undefined`s) from a single value or array.
|
|
8
|
-
*
|
|
9
|
-
* @param {any} x
|
|
10
|
-
* @return {Array<any>}
|
|
11
|
-
*/
|
|
12
|
-
declare function toDenseArray(x: any): Array<any>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default drawUtils;
|
|
2
|
-
declare namespace drawUtils {
|
|
3
|
-
function getMatchingVertices(vertex: any, featureId: any, allFeatures: any, map: any): {
|
|
4
|
-
featureId: any;
|
|
5
|
-
coord_path: string;
|
|
6
|
-
lng: any;
|
|
7
|
-
lat: any;
|
|
8
|
-
}[];
|
|
9
|
-
function getDrawInstance(map: any): any;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { paintPropsType } from '../../../ui_components/LayerList/util/LayerPropertyForm';
|
|
3
|
-
type Props = {
|
|
4
|
-
key: string;
|
|
5
|
-
value: string;
|
|
6
|
-
propKey: string;
|
|
7
|
-
setPaintProps: (paintProps: paintPropsType | ((current: paintPropsType) => paintPropsType)) => void;
|
|
8
|
-
};
|
|
9
|
-
export default function PaintPropsColorPicker({ propKey, value, setPaintProps }: Props): JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type Props = {
|
|
3
|
-
layerComponent: JSX.Element;
|
|
4
|
-
visible: boolean;
|
|
5
|
-
configurable: boolean;
|
|
6
|
-
type?: 'background' | 'background-labels' | 'layer' | 'wms-layer' | 'vector-tile-layer';
|
|
7
|
-
name: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
additionalButtons?: JSX.Element;
|
|
10
|
-
};
|
|
11
|
-
declare function LayerListItem({ layerComponent, visible, type, name, description, configurable, }: Props): JSX.Element;
|
|
12
|
-
export default LayerListItem;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CircleLayerSpecification, FillLayerSpecification, LineLayerSpecification } from 'maplibre-gl';
|
|
3
|
-
export type paintPropsType = CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
|
|
4
|
-
type Props = {
|
|
5
|
-
paintProps: paintPropsType;
|
|
6
|
-
setPaintProps: (paintProps: paintPropsType | ((current: paintPropsType) => paintPropsType)) => void;
|
|
7
|
-
layerType: string;
|
|
8
|
-
};
|
|
9
|
-
export default function LayerPropertyForm({ paintProps, setPaintProps }: Props): JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
/**
|
|
4
|
-
* Renders obj or gltf 3D Models on the MapLibreMap referenced by props.mapId
|
|
5
|
-
*
|
|
6
|
-
* @component
|
|
7
|
-
*/
|
|
8
|
-
export interface MlThreeJsLayerProps {
|
|
9
|
-
mapId?: string;
|
|
10
|
-
init?: object;
|
|
11
|
-
onDone?: () => void;
|
|
12
|
-
}
|
|
13
|
-
declare const MlThreeJsLayer: {
|
|
14
|
-
(props: MlThreeJsLayerProps): JSX.Element;
|
|
15
|
-
propTypes: {
|
|
16
|
-
/**
|
|
17
|
-
* Id of the target MapLibre instance in mapContext
|
|
18
|
-
*/
|
|
19
|
-
mapId: PropTypes.Requireable<string>;
|
|
20
|
-
/**
|
|
21
|
-
* function that gets called when initialized
|
|
22
|
-
*/
|
|
23
|
-
init: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
-
/**
|
|
25
|
-
* function that gets called when models are loaded
|
|
26
|
-
*/
|
|
27
|
-
onDone: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export default MlThreeJsLayer;
|