@mapcomponents/react-maplibre 0.1.86 → 0.1.87

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 CHANGED
@@ -1,4 +1,13 @@
1
1
  # Change Log
2
+ ## [v0.1.87] - 2023-10-25
3
+
4
+ ### Changed
5
+ - 27f1cb2: show measured value in m and in units if measured value is < 0.1km or 0.1mi
6
+ - e606c7c: add catalogue specific demo storybook stories to be able to also provide more useful stories for developers not shown in the catalogue
7
+
8
+ ### Added
9
+ - cb3057f: make layerlist items in layerlistitemfactory sortable via drag & drop
10
+
2
11
  ## [v0.1.86] - 2023-09-13
3
12
 
4
13
  ### Fixed
@@ -13,3 +13,4 @@ export declare const EditLinestring: any;
13
13
  export declare const DrawPolygon: any;
14
14
  export declare const DrawPoint: any;
15
15
  export declare const DrawLinestring: any;
16
+ export declare const catalogueDemo: any;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- interface MlFillExtrusionLayerProps {
2
+ export interface MlFillExtrusionLayerProps {
3
3
  /**
4
4
  * Id of the target MapLibre instance in mapContext
5
5
  */
@@ -1,10 +1,27 @@
1
+ /// <reference types="react" />
2
+ import { MlFillExtrusionLayerProps } from './MlFillExtrusionLayer';
3
+ declare const storyoptions: {
4
+ title: string;
5
+ component: {
6
+ (props: MlFillExtrusionLayerProps): JSX.Element;
7
+ defaultProps: {
8
+ mapId: undefined;
9
+ paint: {
10
+ "fill-extrusion-color": string;
11
+ "fill-extrusion-height": {
12
+ property: string;
13
+ type: string;
14
+ };
15
+ "fill-extrusion-base": {
16
+ property: string;
17
+ type: string;
18
+ };
19
+ "fill-extrusion-opacity": number;
20
+ };
21
+ };
22
+ };
23
+ argTypes: {};
24
+ decorators: ((Story: any, context: any) => JSX.Element)[];
25
+ };
1
26
  export default storyoptions;
2
- export const ExampleConfig: any;
3
- declare namespace storyoptions {
4
- export const title: string;
5
- export { MlFillExtrusionLayer as component };
6
- export const argTypes: {};
7
- export { mapContextDecorator as decorators };
8
- }
9
- import MlFillExtrusionLayer from "./MlFillExtrusionLayer";
10
- import mapContextDecorator from "../../decorators/MapContextDecorator";
27
+ export declare const ExampleConfig: any;
@@ -13,3 +13,4 @@ export declare const Polygon: any;
13
13
  export declare const HeatMap: any;
14
14
  export declare const Symbol: any;
15
15
  export declare const DefaultPaintOverrides: any;
16
+ export declare const catalogueDemo: any;
@@ -1,14 +1,24 @@
1
1
  /// <reference types="react" />
2
- import * as turf from "@turf/turf";
2
+ import * as turf from '@turf/turf';
3
+ import { GeoJSONObject } from '@turf/turf';
3
4
  interface MlMeasureToolProps {
4
5
  /**
5
6
  * String that specify if the Tool measures an area ("polygon") or length ("line")
6
7
  */
7
- measureType?: string;
8
+ measureType?: 'polygon' | 'line';
8
9
  /**
9
10
  * String that dictates which unit of measurement is used
10
11
  */
11
12
  unit?: turf.Units;
13
+ /**
14
+ * Callback function that is called each time measurment geometry within has changed within MlMeasureTool.
15
+ * First parameter is the new GeoJson feature.
16
+ */
17
+ onChange?: (options: {
18
+ value: number;
19
+ unit: string | undefined;
20
+ geojson: GeoJSONObject;
21
+ }) => void;
12
22
  }
13
23
  declare const MlMeasureTool: {
14
24
  (props: MlMeasureToolProps): JSX.Element;
@@ -1,6 +1,7 @@
1
1
  export default storyoptions;
2
2
  export const MeasureLine: any;
3
3
  export const MeasurePolygon: any;
4
+ export const catalogueDemo: any;
4
5
  declare namespace storyoptions {
5
6
  export const title: string;
6
7
  export { MlMeasureTool as component };
@@ -1,5 +1,5 @@
1
1
  export default storyoptions;
2
- export const Standard: any;
2
+ export const catalogueDemo: any;
3
3
  export const StyleExample: any;
4
4
  declare namespace storyoptions {
5
5
  export const title: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { MlNavigationToolsProps } from "./MlNavigationTools";
2
+ import { MlNavigationToolsProps } from './MlNavigationTools';
3
3
  declare const storyoptions: {
4
4
  title: string;
5
5
  component: {
@@ -26,3 +26,4 @@ export declare const AlternativePosition: any;
26
26
  export declare const NoZoomButtons: any;
27
27
  export declare const NoFollowGpsButton: any;
28
28
  export declare const CustomButton: any;
29
+ export declare const catalogueDemo: any;
@@ -10,5 +10,5 @@ declare const storyoptions: {
10
10
  decorators: ((Story: any, context: any) => JSX.Element)[];
11
11
  };
12
12
  export default storyoptions;
13
- export declare const Toolbar: any;
13
+ export declare const catalogueDemo: any;
14
14
  export declare const Overlay: any;
@@ -31,3 +31,4 @@ export default storyoptions;
31
31
  export declare const FillConfig: any;
32
32
  export declare const CircleConfig: any;
33
33
  export declare const LineConfig: any;
34
+ export declare const catalogueDemo: any;
@@ -37,6 +37,7 @@ export interface MlWmsLoaderProps {
37
37
  * Id of the target MapLibre instance in mapContext
38
38
  */
39
39
  mapId?: string;
40
+ layerId?: string;
40
41
  insertBeforeLayer?: string;
41
42
  /**
42
43
  * URL parameters that will be used in the getCapabilities request
@@ -88,6 +89,7 @@ export interface MlWmsLoaderProps {
88
89
  * Custom buttons to display for the WMSLoader
89
90
  */
90
91
  buttons?: JSX.Element;
92
+ sortable?: boolean;
91
93
  }
92
94
  export type LayerType = {
93
95
  visible: boolean;
@@ -38,6 +38,7 @@ export interface LayerContextType {
38
38
  tileUrl: string;
39
39
  moveUp: (layerId: string) => void;
40
40
  moveDown: (layerId: string) => void;
41
+ moveLayer: (layerId: string, getNewPos: (oldPos: number) => number) => void;
41
42
  }
42
43
  declare const LayerContext: React.Context<LayerContextType>;
43
44
  declare function LayerContextProvider(props: LayerContextProps): JSX.Element;
package/dist/index.d.ts CHANGED
@@ -35,6 +35,7 @@ export { default as MlTemporalController } from "./components/MlTemporalControll
35
35
  export { default as MlBasicComponent } from "./components/MlBasicComponent.js";
36
36
  export { default as MlOrderLayers } from "./components/MlOrderLayers/MlOrderLayers";
37
37
  export { default as MlTerrainLayer } from "./components/MlTerrainLayer/MlTerrainLayer";
38
+ export { default as MlSketchTool } from './components/MlSketchTool/MlSketchTool';
38
39
  export { default as useCameraFollowPath } from "./hooks/useCameraFollowPath/useCameraFollowPath";
39
40
  export { default as useExportMap } from "./hooks/useExportMap";
40
41
  export { default as useGpx } from "./hooks/useGpx/useGpx";