@mapcomponents/react-maplibre 1.3.0 → 1.3.2
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 +17 -0
- package/dist/index.cjs.js +143 -96
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +144 -97
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/MlGpxViewer/util/GeoJsonProvider.d.ts +1 -1
- package/dist/src/components/MlNavigationTools/MlNavigationTools.d.ts +1 -1
- package/dist/src/components/MlSketchTool/MlSketchTool.d.ts +8 -0
- package/dist/src/components/MlWmsLoader/MlWmsLoader.d.ts +1 -1
- package/dist/src/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +0 -28
- package/dist/src/ui_components/LayerList/LayerList.d.ts +1 -1
- package/dist/src/ui_components/LayerList/LayerListFolder.d.ts +3 -3
- package/dist/src/ui_components/LayerList/LayerListItem.d.ts +4 -4
- package/dist/src/ui_components/LayerTree/LayerTreeListItem.d.ts +1 -1
- package/dist/src/util/Instructions.d.ts +1 -1
- package/package.json +5 -2
|
@@ -21,6 +21,14 @@ export interface MlSketchToolProps {
|
|
|
21
21
|
* First parameter contains all geometries in the `geometries` prop.
|
|
22
22
|
*/
|
|
23
23
|
onChange?: (para: SketchStateType) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Determines whether the instruction text should be shown.
|
|
26
|
+
*/
|
|
27
|
+
showInstruction?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Callback function triggered when the "Show instructions" checkbox is toggled.
|
|
30
|
+
*/
|
|
31
|
+
onShowInstructionChange?: (value: boolean) => void;
|
|
24
32
|
}
|
|
25
33
|
type SketchStateType = {
|
|
26
34
|
selectedGeoJson?: Feature;
|
|
@@ -9,7 +9,6 @@ declare function featureEditorStyle(): ({
|
|
|
9
9
|
'line-color'?: undefined;
|
|
10
10
|
'line-width'?: undefined;
|
|
11
11
|
'line-dasharray'?: undefined;
|
|
12
|
-
'line-opacity'?: undefined;
|
|
13
12
|
'circle-radius'?: undefined;
|
|
14
13
|
'circle-color'?: undefined;
|
|
15
14
|
'circle-stroke-color'?: undefined;
|
|
@@ -32,7 +31,6 @@ declare function featureEditorStyle(): ({
|
|
|
32
31
|
'fill-outline-color'?: undefined;
|
|
33
32
|
'fill-opacity'?: undefined;
|
|
34
33
|
'line-dasharray'?: undefined;
|
|
35
|
-
'line-opacity'?: undefined;
|
|
36
34
|
'circle-radius'?: undefined;
|
|
37
35
|
'circle-color'?: undefined;
|
|
38
36
|
'circle-stroke-color'?: undefined;
|
|
@@ -54,29 +52,6 @@ declare function featureEditorStyle(): ({
|
|
|
54
52
|
'fill-color'?: undefined;
|
|
55
53
|
'fill-outline-color'?: undefined;
|
|
56
54
|
'fill-opacity'?: undefined;
|
|
57
|
-
'line-opacity'?: undefined;
|
|
58
|
-
'circle-radius'?: undefined;
|
|
59
|
-
'circle-color'?: undefined;
|
|
60
|
-
'circle-stroke-color'?: undefined;
|
|
61
|
-
'circle-stroke-width'?: undefined;
|
|
62
|
-
'circle-opacity'?: undefined;
|
|
63
|
-
};
|
|
64
|
-
} | {
|
|
65
|
-
id: string;
|
|
66
|
-
type: string;
|
|
67
|
-
filter: (string | string[])[];
|
|
68
|
-
layout: {
|
|
69
|
-
'line-cap': string;
|
|
70
|
-
'line-join': string;
|
|
71
|
-
};
|
|
72
|
-
paint: {
|
|
73
|
-
'line-color': string;
|
|
74
|
-
'line-width': number;
|
|
75
|
-
'line-opacity': number;
|
|
76
|
-
'fill-color'?: undefined;
|
|
77
|
-
'fill-outline-color'?: undefined;
|
|
78
|
-
'fill-opacity'?: undefined;
|
|
79
|
-
'line-dasharray'?: undefined;
|
|
80
55
|
'circle-radius'?: undefined;
|
|
81
56
|
'circle-color'?: undefined;
|
|
82
57
|
'circle-stroke-color'?: undefined;
|
|
@@ -98,7 +73,6 @@ declare function featureEditorStyle(): ({
|
|
|
98
73
|
'line-color'?: undefined;
|
|
99
74
|
'line-width'?: undefined;
|
|
100
75
|
'line-dasharray'?: undefined;
|
|
101
|
-
'line-opacity'?: undefined;
|
|
102
76
|
'circle-opacity'?: undefined;
|
|
103
77
|
};
|
|
104
78
|
layout?: undefined;
|
|
@@ -115,7 +89,6 @@ declare function featureEditorStyle(): ({
|
|
|
115
89
|
'line-color'?: undefined;
|
|
116
90
|
'line-width'?: undefined;
|
|
117
91
|
'line-dasharray'?: undefined;
|
|
118
|
-
'line-opacity'?: undefined;
|
|
119
92
|
'circle-stroke-color'?: undefined;
|
|
120
93
|
'circle-stroke-width'?: undefined;
|
|
121
94
|
'circle-opacity'?: undefined;
|
|
@@ -135,7 +108,6 @@ declare function featureEditorStyle(): ({
|
|
|
135
108
|
'line-color'?: undefined;
|
|
136
109
|
'line-width'?: undefined;
|
|
137
110
|
'line-dasharray'?: undefined;
|
|
138
|
-
'line-opacity'?: undefined;
|
|
139
111
|
'circle-stroke-color'?: undefined;
|
|
140
112
|
'circle-stroke-width'?: undefined;
|
|
141
113
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface LayerListProps {
|
|
3
3
|
mapId?: string;
|
|
4
|
-
children?: JSX.Element | JSX.Element[];
|
|
4
|
+
children?: React.JSX.Element | React.JSX.Element[];
|
|
5
5
|
}
|
|
6
6
|
declare function LayerList(props: LayerListProps): React.JSX.Element;
|
|
7
7
|
export default LayerList;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
interface LayerListFolderProps {
|
|
3
3
|
visible: boolean;
|
|
4
|
-
name?: string;
|
|
5
|
-
children: JSX.Element | JSX.Element[];
|
|
4
|
+
name?: string | ReactNode;
|
|
5
|
+
children: React.JSX.Element | React.JSX.Element[];
|
|
6
6
|
setVisible?: (visible: boolean | ((val: unknown) => boolean)) => void;
|
|
7
7
|
}
|
|
8
8
|
declare function LayerListFolder({ visible, name, children, setVisible }: LayerListFolderProps): React.JSX.Element;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { SxProps } from '@mui/material';
|
|
3
3
|
interface LayerListItemProps {
|
|
4
|
-
layerComponent: JSX.Element;
|
|
4
|
+
layerComponent: React.JSX.Element;
|
|
5
5
|
visible: boolean;
|
|
6
6
|
configurable: boolean;
|
|
7
7
|
type?: 'background' | 'background-labels' | 'layer' | 'wms-layer' | 'vector-tile-layer';
|
|
8
|
-
name: string;
|
|
8
|
+
name: string | ReactNode;
|
|
9
9
|
description?: string;
|
|
10
10
|
setLayerState?: (state: unknown) => void;
|
|
11
11
|
showDeleteButton?: boolean;
|
|
12
12
|
listItemSx?: SxProps;
|
|
13
|
-
buttons?: JSX.Element;
|
|
13
|
+
buttons?: React.JSX.Element;
|
|
14
14
|
layerId?: string;
|
|
15
15
|
sortable?: boolean;
|
|
16
16
|
}
|
|
@@ -9,7 +9,7 @@ interface LayerTreeListItemProps {
|
|
|
9
9
|
setLayerState?: (state: unknown) => void;
|
|
10
10
|
showDeleteButton?: boolean;
|
|
11
11
|
listItemSx?: SxProps;
|
|
12
|
-
buttons?: JSX.Element;
|
|
12
|
+
buttons?: React.JSX.Element;
|
|
13
13
|
sortable?: boolean;
|
|
14
14
|
mapConfigKey: string;
|
|
15
15
|
layerOrderConfig: LayerOrderItem;
|
|
@@ -3,7 +3,7 @@ import { BubbleForInstructionProps } from './BubbleForInstructions';
|
|
|
3
3
|
export interface StepObject {
|
|
4
4
|
duration: number;
|
|
5
5
|
props: BubbleForInstructionProps;
|
|
6
|
-
content: JSX.Element;
|
|
6
|
+
content: React.JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export interface InstructionProps {
|
|
9
9
|
steps: StepObject[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapcomponents/react-maplibre",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@dnd-kit/core": "^6.3.1",
|
|
25
25
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
26
26
|
"@dnd-kit/sortable": "^10.0.0",
|
|
27
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
27
28
|
"@emotion/css": "^11.13.5",
|
|
28
29
|
"@emotion/react": "^11.14.0",
|
|
29
30
|
"@emotion/styled": "^11.14.0",
|
|
@@ -33,11 +34,13 @@
|
|
|
33
34
|
"@mapbox/mapbox-gl-sync-move": "^0.3.1",
|
|
34
35
|
"@mui/icons-material": "^7.0.1",
|
|
35
36
|
"@mui/material": "^7.0.1",
|
|
37
|
+
"@mui/system": "^7.1.0",
|
|
36
38
|
"@reduxjs/toolkit": "^2.6.1",
|
|
37
39
|
"@rollup/plugin-json": "^6.1.0",
|
|
38
40
|
"@storybook/theming": "^8.6.12",
|
|
39
41
|
"@testing-library/dom": "^10.4.0",
|
|
40
42
|
"@tmcw/togeojson": "^7.0.0",
|
|
43
|
+
"@turf/helpers": "^7.2.0",
|
|
41
44
|
"@turf/turf": "^7.2.0",
|
|
42
45
|
"@types/d3": "^7.4.3",
|
|
43
46
|
"@types/geojson": "^7946.0.16",
|
|
@@ -48,7 +51,7 @@
|
|
|
48
51
|
"d3": "^7.9.0",
|
|
49
52
|
"globals": "^16.0.0",
|
|
50
53
|
"jspdf": "^3.0.1",
|
|
51
|
-
"maplibre-gl": "5.
|
|
54
|
+
"maplibre-gl": "5.5.0",
|
|
52
55
|
"osm2geojson-lite": "^1.0.3",
|
|
53
56
|
"pako": "^2.1.0",
|
|
54
57
|
"react-color": "^2.19.3",
|