@mapcomponents/react-maplibre 1.0.10 → 1.1.0-1
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 +6 -0
- package/dist/index.cjs.js +71 -61
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +71 -61
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/MapLibreMap/MapLibreMap.d.ts +4 -1
- package/dist/src/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +1 -1
- package/dist/src/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +1 -1
- package/dist/src/components/MlSpatialElevationProfile/util/getElevationData.d.ts +2 -1
- package/dist/src/components/MlTemporalController/utils/paintPicker.d.ts +29 -29
- package/dist/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +2 -2
- package/dist/src/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +5 -2
- package/dist/src/contexts/MapContext.d.ts +3 -1
- package/dist/src/decorators/MapContextDecorator.d.ts +1 -1
- package/dist/src/decorators/MapContextReduxStoreDecorator.d.ts +1 -1
- package/dist/src/hooks/useExportMap/index.d.ts +1 -1
- package/dist/src/hooks/useFeatureEditor/useFeatureEditor.d.ts +1 -1
- package/dist/src/protocol_handlers/mbtiles.d.ts +42 -1
- package/dist/src/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +1 -3
- package/dist/src/ui_components/MapcomponentsTheme.d.ts +1 -1
- package/eslint.config.mjs +73 -0
- package/package.json +75 -67
|
@@ -17,6 +17,9 @@ export type MapLibreMapProps = {
|
|
|
17
17
|
*/
|
|
18
18
|
style?: object;
|
|
19
19
|
};
|
|
20
|
+
type MapLibreMapComponent = FC<MapLibreMapProps> & {
|
|
21
|
+
defaultProps: MapLibreMapProps;
|
|
22
|
+
};
|
|
20
23
|
/**
|
|
21
24
|
* Creates a MapLibreGlWrapper instance and registers it in MapContext
|
|
22
25
|
* after the MapLibre-gl load event has fired.
|
|
@@ -27,5 +30,5 @@ export type MapLibreMapProps = {
|
|
|
27
30
|
*
|
|
28
31
|
* @category Map components
|
|
29
32
|
*/
|
|
30
|
-
declare const MapLibreMap:
|
|
33
|
+
declare const MapLibreMap: MapLibreMapComponent;
|
|
31
34
|
export default MapLibreMap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Feature, FeatureCollection } from "geojson";
|
|
2
2
|
import { LayerSpecification } from "maplibre-gl";
|
|
3
|
-
declare const getDefaulLayerTypeByGeometry: (geojson: Feature | FeatureCollection | undefined) => LayerSpecification[
|
|
3
|
+
declare const getDefaulLayerTypeByGeometry: (geojson: Feature | FeatureCollection | undefined) => LayerSpecification["type"];
|
|
4
4
|
export default getDefaulLayerTypeByGeometry;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LayerSpecification, RasterLayerSpecification } from 'maplibre-gl';
|
|
2
2
|
declare const getDefaultPaintPropsByType: (type: string, defaultPaintOverrides?: {
|
|
3
3
|
[key: string]: unknown;
|
|
4
|
-
}
|
|
4
|
+
}) => Exclude<LayerSpecification["paint"], RasterLayerSpecification["paint"]>;
|
|
5
5
|
export default getDefaultPaintPropsByType;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FeatureCollection } from 'geojson';
|
|
1
2
|
interface geometry {
|
|
2
3
|
coordinates: Array<number>;
|
|
3
4
|
}
|
|
@@ -8,5 +9,5 @@ interface _geojsonInfo {
|
|
|
8
9
|
line: line;
|
|
9
10
|
min: number;
|
|
10
11
|
}
|
|
11
|
-
export default function getElevationData(_geojsonInfo: _geojsonInfo, elevationFactor: number):
|
|
12
|
+
export default function getElevationData(_geojsonInfo: _geojsonInfo, elevationFactor: number): FeatureCollection;
|
|
12
13
|
export {};
|
|
@@ -13,37 +13,37 @@ interface paintPickerProps {
|
|
|
13
13
|
userPaint: CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
|
|
14
14
|
}
|
|
15
15
|
export default function paintPicker(props: paintPickerProps): {
|
|
16
|
-
"circle-radius"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
17
|
-
"circle-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<
|
|
18
|
-
"circle-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
19
|
-
"circle-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
20
|
-
"circle-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]
|
|
21
|
-
"circle-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"
|
|
22
|
-
"circle-pitch-scale"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"
|
|
23
|
-
"circle-pitch-alignment"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"
|
|
24
|
-
"circle-stroke-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
25
|
-
"circle-stroke-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<
|
|
26
|
-
"circle-stroke-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
16
|
+
"circle-radius"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
17
|
+
"circle-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<import("maplibre-gl").ColorSpecification>;
|
|
18
|
+
"circle-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
19
|
+
"circle-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
20
|
+
"circle-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]>;
|
|
21
|
+
"circle-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport">;
|
|
22
|
+
"circle-pitch-scale"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport">;
|
|
23
|
+
"circle-pitch-alignment"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport">;
|
|
24
|
+
"circle-stroke-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
25
|
+
"circle-stroke-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<import("maplibre-gl").ColorSpecification>;
|
|
26
|
+
"circle-stroke-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
27
27
|
} | {
|
|
28
|
-
"fill-antialias"?: import("maplibre-gl").PropertyValueSpecification<boolean
|
|
29
|
-
"fill-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
30
|
-
"fill-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<
|
|
31
|
-
"fill-outline-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<
|
|
32
|
-
"fill-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]
|
|
33
|
-
"fill-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"
|
|
34
|
-
"fill-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<
|
|
28
|
+
"fill-antialias"?: import("maplibre-gl").PropertyValueSpecification<boolean>;
|
|
29
|
+
"fill-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
30
|
+
"fill-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<import("maplibre-gl").ColorSpecification>;
|
|
31
|
+
"fill-outline-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<import("maplibre-gl").ColorSpecification>;
|
|
32
|
+
"fill-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]>;
|
|
33
|
+
"fill-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport">;
|
|
34
|
+
"fill-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<import("maplibre-gl").ResolvedImageSpecification>;
|
|
35
35
|
} | {
|
|
36
|
-
"line-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
37
|
-
"line-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<
|
|
38
|
-
"line-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]
|
|
39
|
-
"line-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"
|
|
40
|
-
"line-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
41
|
-
"line-gap-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
42
|
-
"line-offset"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
43
|
-
"line-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number
|
|
44
|
-
"line-dasharray"?: import("maplibre-gl").PropertyValueSpecification<number
|
|
45
|
-
"line-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<
|
|
46
|
-
"line-gradient"?: import("maplibre-gl").ExpressionSpecification
|
|
36
|
+
"line-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
37
|
+
"line-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<import("maplibre-gl").ColorSpecification>;
|
|
38
|
+
"line-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]>;
|
|
39
|
+
"line-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport">;
|
|
40
|
+
"line-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
41
|
+
"line-gap-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
42
|
+
"line-offset"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
43
|
+
"line-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number>;
|
|
44
|
+
"line-dasharray"?: import("maplibre-gl").PropertyValueSpecification<Array<number>>;
|
|
45
|
+
"line-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<import("maplibre-gl").ResolvedImageSpecification>;
|
|
46
|
+
"line-gradient"?: import("maplibre-gl").ExpressionSpecification;
|
|
47
47
|
} | {
|
|
48
48
|
'circle-color': string;
|
|
49
49
|
} | {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Feature } from 'geojson';
|
|
2
|
+
import { Feature, FeatureCollection } from 'geojson';
|
|
3
3
|
import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer/MlGeoJsonLayer';
|
|
4
4
|
export type MlTransitionGeoJsonLayerProps = MlGeoJsonLayerProps & {
|
|
5
5
|
transitionTime?: number;
|
|
6
|
-
geojson?: Feature;
|
|
6
|
+
geojson?: Feature | FeatureCollection | null;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Adds source and layer of types "line", "fill" or "circle" to display GeoJSON data on the map.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
export interface MlUseMapDebuggerProps {
|
|
3
3
|
mapId?: string;
|
|
4
4
|
watch?: string[];
|
|
@@ -6,6 +6,9 @@ export interface MlUseMapDebuggerProps {
|
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
+
type MlUseMapDebuggerComponent = FC<MlUseMapDebuggerProps> & {
|
|
10
|
+
defaultProps: MlUseMapDebuggerProps;
|
|
11
|
+
};
|
|
9
12
|
/**
|
|
10
13
|
* Renders a collapsible top-drawer containing live map debug information
|
|
11
14
|
*
|
|
@@ -14,5 +17,5 @@ export interface MlUseMapDebuggerProps {
|
|
|
14
17
|
*
|
|
15
18
|
* @component
|
|
16
19
|
*/
|
|
17
|
-
declare const MlUseMapDebugger:
|
|
20
|
+
declare const MlUseMapDebugger: MlUseMapDebuggerComponent;
|
|
18
21
|
export default MlUseMapDebugger;
|
|
@@ -3,7 +3,9 @@ import MapLibreGlWrapper from '../components/MapLibreMap/lib/MapLibreGlWrapper';
|
|
|
3
3
|
export interface MapContextType {
|
|
4
4
|
mapIds: string[];
|
|
5
5
|
mapExists: (map_id: string | undefined) => boolean;
|
|
6
|
-
maps:
|
|
6
|
+
maps: {
|
|
7
|
+
[key: string]: MapLibreGlWrapper;
|
|
8
|
+
};
|
|
7
9
|
map: MapLibreGlWrapper | undefined;
|
|
8
10
|
getMap: (map_id: string | undefined) => MapLibreGlWrapper;
|
|
9
11
|
setMap: (map: MapLibreGlWrapper) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MapLibreMapProps } from '../components/MapLibreMap/MapLibreMap';
|
|
2
2
|
import './style.css';
|
|
3
3
|
import { Decorator } from '@storybook/react';
|
|
4
|
-
declare const makeMapContextDecorators: (options: MapLibreMapProps[
|
|
4
|
+
declare const makeMapContextDecorators: (options: MapLibreMapProps["options"]) => Decorator[];
|
|
5
5
|
declare const _default: Decorator[];
|
|
6
6
|
export default _default;
|
|
7
7
|
export { makeMapContextDecorators };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MapLibreMapProps } from '../components/MapLibreMap/MapLibreMap';
|
|
2
2
|
import './style.css';
|
|
3
3
|
import { Decorator } from '@storybook/react';
|
|
4
|
-
declare const makeMapContextDecorators: (options: MapLibreMapProps[
|
|
4
|
+
declare const makeMapContextDecorators: (options: MapLibreMapProps["options"]) => Decorator[];
|
|
5
5
|
declare const _default: Decorator[];
|
|
6
6
|
export default _default;
|
|
7
7
|
export { makeMapContextDecorators };
|
|
@@ -6,6 +6,6 @@ interface exportMapProps {
|
|
|
6
6
|
mapId?: string;
|
|
7
7
|
}
|
|
8
8
|
export default function useExportMap(props: exportMapProps): {
|
|
9
|
-
createExport: ((options: Omit<createExportOptions,
|
|
9
|
+
createExport: ((options: Omit<createExportOptions, "map"> & Partial<Pick<createExportOptions, "map">>) => Promise<import("./lib").createExportResolverParams>) | undefined;
|
|
10
10
|
};
|
|
11
11
|
export {};
|
|
@@ -41,6 +41,6 @@ export interface useFeatureEditorProps {
|
|
|
41
41
|
declare const useFeatureEditor: (props: useFeatureEditorProps) => {
|
|
42
42
|
feature: Feature<import("geojson").Geometry, import("geojson").GeoJsonProperties>[] | undefined;
|
|
43
43
|
drawToolsReady: boolean;
|
|
44
|
-
draw: MapboxDraw |
|
|
44
|
+
draw: MapboxDraw | null;
|
|
45
45
|
};
|
|
46
46
|
export default useFeatureEditor;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import initSqlJs from 'sql.js';
|
|
1
2
|
import { RequestParameters } from 'maplibre-gl';
|
|
2
3
|
declare const parseTileParams: (url: string) => {
|
|
3
4
|
filename: string;
|
|
@@ -7,7 +8,47 @@ declare const parseTileParams: (url: string) => {
|
|
|
7
8
|
};
|
|
8
9
|
declare const getMbtilesDbHandler: ({ filename }: {
|
|
9
10
|
filename: string;
|
|
10
|
-
}) => Promise<
|
|
11
|
+
}) => Promise<{
|
|
12
|
+
close(): void;
|
|
13
|
+
create_function(name: string, func: (...args: any[]) => any): /*elided*/ any;
|
|
14
|
+
each(sql: string, params: initSqlJs.BindParams, callback: initSqlJs.ParamsCallback, done: () => void): /*elided*/ any;
|
|
15
|
+
each(sql: string, callback: initSqlJs.ParamsCallback, done: () => void): /*elided*/ any;
|
|
16
|
+
exec(sql: string, params?: initSqlJs.BindParams): initSqlJs.QueryExecResult[];
|
|
17
|
+
export(): Uint8Array;
|
|
18
|
+
getRowsModified(): number;
|
|
19
|
+
handleError(): null | never;
|
|
20
|
+
iterateStatements(sql: string): {
|
|
21
|
+
getRemainingSQL(): string;
|
|
22
|
+
next(): initSqlJs.StatementIteratorResult;
|
|
23
|
+
[Symbol.iterator](): Iterator<{
|
|
24
|
+
bind(values?: initSqlJs.BindParams): boolean;
|
|
25
|
+
free(): boolean;
|
|
26
|
+
freemem(): void;
|
|
27
|
+
get(params?: initSqlJs.BindParams): initSqlJs.SqlValue[];
|
|
28
|
+
getAsObject(params?: initSqlJs.BindParams): initSqlJs.ParamsObject;
|
|
29
|
+
getColumnNames(): string[];
|
|
30
|
+
getNormalizedSQL(): string;
|
|
31
|
+
getSQL(): string;
|
|
32
|
+
reset(): void;
|
|
33
|
+
run(values?: initSqlJs.BindParams): void;
|
|
34
|
+
step(): boolean;
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
prepare(sql: string, params?: initSqlJs.BindParams): {
|
|
38
|
+
bind(values?: initSqlJs.BindParams): boolean;
|
|
39
|
+
free(): boolean;
|
|
40
|
+
freemem(): void;
|
|
41
|
+
get(params?: initSqlJs.BindParams): initSqlJs.SqlValue[];
|
|
42
|
+
getAsObject(params?: initSqlJs.BindParams): initSqlJs.ParamsObject;
|
|
43
|
+
getColumnNames(): string[];
|
|
44
|
+
getNormalizedSQL(): string;
|
|
45
|
+
getSQL(): string;
|
|
46
|
+
reset(): void;
|
|
47
|
+
run(values?: initSqlJs.BindParams): void;
|
|
48
|
+
step(): boolean;
|
|
49
|
+
};
|
|
50
|
+
run(sql: string, params?: initSqlJs.BindParams): /*elided*/ any;
|
|
51
|
+
}>;
|
|
11
52
|
/**
|
|
12
53
|
* Example usage:
|
|
13
54
|
* getBufferFromMbtiles({ filename: 'mbtiles/countries.mbtiles', z: '0', x: '0', y: '0' }).then(
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MlVectorTileLayerProps } from '../../../components/MlVectorTileLayer/MlVectorTileLayer';
|
|
3
|
-
export declare const ListItemStyled: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
4
|
-
ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
|
|
5
|
-
}, "className" | "style" | "classes" | "children" | "components" | "componentsProps" | "slotProps" | "slots" | "alignItems" | "ContainerComponent" | "ContainerProps" | "dense" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
|
+
export declare const ListItemStyled: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "className" | "style" | "classes" | "components" | "componentsProps" | "slotProps" | "slots" | "alignItems" | "children" | "ContainerComponent" | "ContainerProps" | "dense" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
6
4
|
export declare const CheckboxListItemIcon: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemIconProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
7
5
|
export declare const CheckboxStyled: import("@emotion/styled").StyledComponent<import("@mui/material").CheckboxProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
6
|
interface LayerListItemVectorLayerProps {
|
|
@@ -31,5 +31,5 @@ declare module '@mui/material' {
|
|
|
31
31
|
variant?: 'layerlist';
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
declare const getTheme: (mode:
|
|
34
|
+
declare const getTheme: (mode: "light" | "dark" | undefined) => import("@mui/material").Theme;
|
|
35
35
|
export default getTheme;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import react from 'eslint-plugin-react';
|
|
2
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
3
|
+
import globals from 'globals';
|
|
4
|
+
import tsParser from '@typescript-eslint/parser';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import js from '@eslint/js';
|
|
8
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = path.dirname(__filename);
|
|
12
|
+
const compat = new FlatCompat({
|
|
13
|
+
baseDirectory: __dirname,
|
|
14
|
+
recommendedConfig: js.configs.recommended,
|
|
15
|
+
allConfig: js.configs.all,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export default [
|
|
19
|
+
{
|
|
20
|
+
ignores: [
|
|
21
|
+
'**/.cache',
|
|
22
|
+
'**/.github',
|
|
23
|
+
'**/.storybook',
|
|
24
|
+
'**/.vscode',
|
|
25
|
+
'**/coverage',
|
|
26
|
+
'**/dist',
|
|
27
|
+
'**/docs',
|
|
28
|
+
'**/docs-build',
|
|
29
|
+
'**/js-docs',
|
|
30
|
+
'**/node_modules',
|
|
31
|
+
'**/storybook-static',
|
|
32
|
+
'**/scripts',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
...compat.extends(
|
|
36
|
+
'eslint:recommended',
|
|
37
|
+
'plugin:react/recommended',
|
|
38
|
+
'plugin:@typescript-eslint/recommended',
|
|
39
|
+
'prettier',
|
|
40
|
+
'plugin:storybook/recommended'
|
|
41
|
+
),
|
|
42
|
+
{
|
|
43
|
+
plugins: {
|
|
44
|
+
react,
|
|
45
|
+
'@typescript-eslint': typescriptEslint,
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
languageOptions: {
|
|
49
|
+
globals: {
|
|
50
|
+
...globals.browser,
|
|
51
|
+
...globals.node,
|
|
52
|
+
...globals.jest,
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
parser: tsParser,
|
|
56
|
+
ecmaVersion: 'latest',
|
|
57
|
+
sourceType: 'module',
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
settings: {
|
|
61
|
+
react: {
|
|
62
|
+
version: 'detect',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
rules: {
|
|
67
|
+
'react/prop-types': 'off',
|
|
68
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
69
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
70
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
];
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapcomponents/react-maplibre",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0-1",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"source": "src/index.ts",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
8
|
+
"types": "dist/src/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "rollup -c",
|
|
11
11
|
"start": "storybook dev",
|
|
@@ -20,90 +20,97 @@
|
|
|
20
20
|
"create-component": "./scripts/create-map-component.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dnd-kit/core": "^6.1
|
|
24
|
-
"@dnd-kit/modifiers": "^
|
|
25
|
-
"@dnd-kit/sortable": "^
|
|
26
|
-
"@emotion/css": "^11.13.
|
|
27
|
-
"@emotion/react": "^11.
|
|
28
|
-
"@emotion/styled": "^11.
|
|
29
|
-
"@
|
|
23
|
+
"@dnd-kit/core": "^6.3.1",
|
|
24
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
25
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
26
|
+
"@emotion/css": "^11.13.5",
|
|
27
|
+
"@emotion/react": "^11.14.0",
|
|
28
|
+
"@emotion/styled": "^11.14.0",
|
|
29
|
+
"@eslint/eslintrc": "^3.3.0",
|
|
30
|
+
"@eslint/js": "^9.22.0",
|
|
31
|
+
"@mapbox/mapbox-gl-draw": "1.4.3",
|
|
30
32
|
"@mapbox/mapbox-gl-sync-move": "^0.3.1",
|
|
31
|
-
"@mui/icons-material": "^6.
|
|
32
|
-
"@mui/material": "^6.
|
|
33
|
-
"@reduxjs/toolkit": "^2.
|
|
33
|
+
"@mui/icons-material": "^6.4.7",
|
|
34
|
+
"@mui/material": "^6.4.7",
|
|
35
|
+
"@reduxjs/toolkit": "^2.6.1",
|
|
34
36
|
"@rollup/plugin-json": "^6.1.0",
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
+
"@testing-library/dom": "^10.4.0",
|
|
38
|
+
"@tmcw/togeojson": "^7.0.0",
|
|
39
|
+
"@turf/turf": "^7.2.0",
|
|
37
40
|
"@types/d3": "^7.4.3",
|
|
38
|
-
"@types/geojson": "^7946.0.
|
|
39
|
-
"@types/react-color": "^3.0.
|
|
40
|
-
"@types/topojson-client": "^3.1.
|
|
41
|
-
"@xmldom/xmldom": "^0.8
|
|
41
|
+
"@types/geojson": "^7946.0.16",
|
|
42
|
+
"@types/react-color": "^3.0.13",
|
|
43
|
+
"@types/topojson-client": "^3.1.5",
|
|
44
|
+
"@xmldom/xmldom": "^0.9.8",
|
|
42
45
|
"csv2geojson": "^5.1.2",
|
|
43
|
-
"d3": "^7.
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
46
|
+
"d3": "^7.9.0",
|
|
47
|
+
"globals": "^16.0.0",
|
|
48
|
+
"jspdf": "^3.0.0",
|
|
49
|
+
"maplibre-gl": "5.2.0",
|
|
50
|
+
"osm2geojson-lite": "^1.0.2",
|
|
47
51
|
"pako": "^2.1.0",
|
|
48
52
|
"react-color": "^2.19.3",
|
|
49
53
|
"react-moveable": "^0.56.0",
|
|
50
|
-
"react-redux": "^9.
|
|
54
|
+
"react-redux": "^9.2.0",
|
|
51
55
|
"redux": "^5.0.1",
|
|
52
56
|
"redux-thunk": "^3.1.0",
|
|
53
|
-
"three": "^0.
|
|
57
|
+
"three": "^0.174.0",
|
|
54
58
|
"topojson-client": "^3.1.0",
|
|
55
|
-
"uuid": "^
|
|
59
|
+
"uuid": "^11.1.0",
|
|
56
60
|
"wms-capabilities": "^0.6.0"
|
|
57
61
|
},
|
|
58
62
|
"devDependencies": {
|
|
59
63
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
60
|
-
"@babel/preset-react": "^7.
|
|
64
|
+
"@babel/preset-react": "^7.26.3",
|
|
65
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
61
66
|
"@bahmutov/cy-rollup": "^2.0.0",
|
|
62
|
-
"@cfaester/enzyme-adapter-react-18": "^0.
|
|
67
|
+
"@cfaester/enzyme-adapter-react-18": "^0.8.0",
|
|
63
68
|
"@cypress/react18": "^2.0.1",
|
|
64
69
|
"@rollup/plugin-babel": "^6.0.4",
|
|
65
|
-
"@rollup/plugin-commonjs": "^
|
|
70
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
66
71
|
"@rollup/plugin-url": "^8.0.2",
|
|
67
|
-
"@storybook/addon-actions": "^
|
|
68
|
-
"@storybook/addon-docs": "^
|
|
69
|
-
"@storybook/addon-essentials": "^
|
|
70
|
-
"@storybook/addon-links": "^
|
|
71
|
-
"@storybook/addons": "^7.6.
|
|
72
|
-
"@storybook/node-logger": "^
|
|
73
|
-
"@storybook/react": "^
|
|
74
|
-
"@storybook/react-webpack5": "^
|
|
72
|
+
"@storybook/addon-actions": "^8.6.4",
|
|
73
|
+
"@storybook/addon-docs": "^8.6.4",
|
|
74
|
+
"@storybook/addon-essentials": "^8.6.4",
|
|
75
|
+
"@storybook/addon-links": "^8.6.4",
|
|
76
|
+
"@storybook/addons": "^7.6.17",
|
|
77
|
+
"@storybook/node-logger": "^8.6.4",
|
|
78
|
+
"@storybook/react": "^8.6.4",
|
|
79
|
+
"@storybook/react-webpack5": "^8.6.4",
|
|
80
|
+
"@storybook/test": "^8.6.4",
|
|
75
81
|
"@storybook/testing-react": "^2.0.1",
|
|
76
|
-
"@storybook/theming": "^
|
|
82
|
+
"@storybook/theming": "^8.6.4",
|
|
77
83
|
"@svgr/rollup": "^8.1.0",
|
|
78
|
-
"@testing-library/react": "^
|
|
84
|
+
"@testing-library/react": "^16.2.0",
|
|
79
85
|
"@types/elasticlunr": "^0.9.5",
|
|
80
86
|
"@types/enzyme": "^3.10.18",
|
|
81
|
-
"@types/expect": "^24.3.
|
|
82
|
-
"@types/jest": "^29.5.
|
|
83
|
-
"@types/mapbox__mapbox-gl-draw": "^1.4.
|
|
87
|
+
"@types/expect": "^24.3.2",
|
|
88
|
+
"@types/jest": "^29.5.14",
|
|
89
|
+
"@types/mapbox__mapbox-gl-draw": "^1.4.8",
|
|
84
90
|
"@types/mapbox__point-geometry": "^0.1.4",
|
|
85
|
-
"@types/mapbox__vector-tile": "^
|
|
91
|
+
"@types/mapbox__vector-tile": "^2.0.0",
|
|
86
92
|
"@types/pako": "^2.0.3",
|
|
87
|
-
"@types/react": "^
|
|
88
|
-
"@types/react-dom": "^
|
|
93
|
+
"@types/react": "^19.0.10",
|
|
94
|
+
"@types/react-dom": "^19.0.4",
|
|
89
95
|
"@types/sql.js": "^1.4.9",
|
|
90
|
-
"@types/three": "^0.
|
|
91
|
-
"@types/uuid": "^
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
93
|
-
"@typescript-eslint/parser": "^
|
|
96
|
+
"@types/three": "^0.174.0",
|
|
97
|
+
"@types/uuid": "^10.0.0",
|
|
98
|
+
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
|
99
|
+
"@typescript-eslint/parser": "^8.26.1",
|
|
94
100
|
"avj": "^0.0.0",
|
|
95
101
|
"babel-jest": "^29.7.0",
|
|
102
|
+
"babel-loader": "^10.0.0",
|
|
96
103
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
97
104
|
"babel-plugin-styled-components": "^2.1.4",
|
|
98
|
-
"babel-preset-react-app": "^10.0
|
|
99
|
-
"cypress": "^
|
|
105
|
+
"babel-preset-react-app": "^10.1.0",
|
|
106
|
+
"cypress": "^14.2.0",
|
|
100
107
|
"elasticlunr": "^0.9.5",
|
|
101
108
|
"enzyme": "^3.11.0",
|
|
102
|
-
"eslint": "^
|
|
103
|
-
"eslint-config-prettier": "^
|
|
104
|
-
"eslint-plugin-react": "^7.
|
|
105
|
-
"eslint-plugin-storybook": "^0.
|
|
106
|
-
"glob": "^
|
|
109
|
+
"eslint": "^9.22.0",
|
|
110
|
+
"eslint-config-prettier": "^10.1.1",
|
|
111
|
+
"eslint-plugin-react": "^7.37.4",
|
|
112
|
+
"eslint-plugin-storybook": "^0.11.4",
|
|
113
|
+
"glob": "^11.0.1",
|
|
107
114
|
"jest": "29.7.0",
|
|
108
115
|
"jest-circus": "29.7.0",
|
|
109
116
|
"jest-environment-jsdom": "^29.7.0",
|
|
@@ -111,25 +118,26 @@
|
|
|
111
118
|
"jest-resolve": "29.7.0",
|
|
112
119
|
"jest-watch-typeahead": "2.2.2",
|
|
113
120
|
"node-fetch": "^3.3.2",
|
|
114
|
-
"postcss": "^8.
|
|
115
|
-
"prettier": "3.
|
|
121
|
+
"postcss": "^8.5.3",
|
|
122
|
+
"prettier": "3.5.3",
|
|
116
123
|
"react": "^18.2.0",
|
|
117
124
|
"react-app-polyfill": "^3.0.0",
|
|
118
125
|
"react-dev-utils": "^12.0.1",
|
|
119
126
|
"react-dom": "^18.2.0",
|
|
120
127
|
"react-draggable": "^4.4.6",
|
|
121
|
-
"react-i18next": "^
|
|
122
|
-
"rollup": "^4.
|
|
123
|
-
"rollup-plugin-delete": "^
|
|
124
|
-
"rollup-plugin-import-css": "^3.
|
|
125
|
-
"rollup-plugin-node-externals": "^
|
|
128
|
+
"react-i18next": "^15.4.1",
|
|
129
|
+
"rollup": "^4.35.0",
|
|
130
|
+
"rollup-plugin-delete": "^3.0.1",
|
|
131
|
+
"rollup-plugin-import-css": "^3.5.8",
|
|
132
|
+
"rollup-plugin-node-externals": "^8.0.0",
|
|
126
133
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
127
134
|
"showdown": "^2.1.0",
|
|
128
|
-
"sql.js": "^1.
|
|
129
|
-
"storybook": "^
|
|
135
|
+
"sql.js": "^1.12.0",
|
|
136
|
+
"storybook": "^8.6.4",
|
|
130
137
|
"storybook-source-link": "^4.0.1",
|
|
131
|
-
"ts-jest": "^29.
|
|
132
|
-
"
|
|
138
|
+
"ts-jest": "^29.2.6",
|
|
139
|
+
"ts-loader": "^9.5.2",
|
|
140
|
+
"typescript": "^5.8.2"
|
|
133
141
|
},
|
|
134
142
|
"jest": {
|
|
135
143
|
"roots": [
|
|
@@ -215,6 +223,6 @@
|
|
|
215
223
|
]
|
|
216
224
|
},
|
|
217
225
|
"resolutions": {
|
|
218
|
-
"jackspeak": "
|
|
226
|
+
"jackspeak": "4.1.0"
|
|
219
227
|
}
|
|
220
228
|
}
|