@orioro/react-maplibre-util 0.0.2 → 0.2.0

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.
@@ -1,18 +1,19 @@
1
- import { MapMouseEvent } from 'maplibre-gl';
1
+ import { Map, MapGeoJSONFeature, MapMouseEvent } from 'maplibre-gl';
2
2
  import React from 'react';
3
3
  type DefaultHoverInfo = {
4
4
  point: [number, number];
5
5
  coordinates: [number, number];
6
- features: GeoJSON.Feature[];
6
+ features: MapGeoJSONFeature[];
7
7
  };
8
8
  export declare function hoverParseEvent(event: MapMouseEvent): DefaultHoverInfo;
9
9
  export type UseHoverProps<DataT = DefaultHoverInfo> = {
10
10
  parseEvent?: (event: MapMouseEvent) => DataT;
11
11
  tooltip?: (data: DataT) => React.ReactNode;
12
12
  };
13
- export declare function useHover<InfoT = any>(props: UseHoverProps<DefaultHoverInfo> | undefined, deps: any[]): (boolean | InfoT | {
13
+ export declare function mapSetFeaturesState(map: Map, features: MapGeoJSONFeature[] | undefined, state: any): void;
14
+ export declare function useHover<InfoT = any>(props: UseHoverProps | undefined, deps: any[]): (boolean | InfoT | {
14
15
  onMouseMove: (event: MapMouseEvent) => void;
15
- onMouseOut: () => void;
16
+ onMouseOut: (event: any) => void;
16
17
  onDragStart: () => void;
17
18
  onDragEnd: () => void;
18
19
  cursor: string;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare function applyReactStyle(element: HTMLElement, styles: React.CSSProperties): void;
@@ -1 +1,3 @@
1
1
  export * from './fitGeometry';
2
+ export * from './applyReactStyle';
3
+ export * from './misc';
@@ -0,0 +1,5 @@
1
+ import type { LayerSpecification, Map, SourceSpecification } from 'maplibre-gl';
2
+ export declare function ensureAddLayer(map: Map, layerId: string, layer: LayerSpecification): void;
3
+ export declare function ensureRemoveLayer(map: Map, layerId: string): void;
4
+ export declare function ensureAddSource(map: Map, sourceId: string, sourceSpec: SourceSpecification): void;
5
+ export declare function ensureRemoveSource(map: Map, sourceId: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orioro/react-maplibre-util",
3
- "version": "0.0.2",
3
+ "version": "0.2.0",
4
4
  "packageManager": "yarn@4.0.2",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -18,37 +18,45 @@
18
18
  "license": "ISC",
19
19
  "scripts": {
20
20
  "build": "rm -rf dist && rollup --config ./rollup.config.mjs",
21
- "storybook": "storybook dev -p 6006",
21
+ "dev": "storybook dev -p 6006",
22
22
  "build-storybook": "storybook build"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@orioro/dev": "^0.0.5",
26
26
  "@tanstack/react-query": "^5.66.0",
27
+ "next": "14.1.0",
27
28
  "rollup": "^4.13.0",
28
29
  "storybook": "^8.0.0"
29
30
  },
30
31
  "dependencies": {
31
- "@orioro/react-chart-util": "^0.0.2",
32
+ "@mdi/js": "^7.4.47",
33
+ "@mdi/react": "^1.6.1",
34
+ "@orioro/react-chart-util": "^0.1.0",
32
35
  "@orioro/react-select": "^3.0.2",
33
36
  "@orioro/react-ui-core": "^0.0.6",
34
37
  "@orioro/resolve": "^0.1.2",
35
38
  "@orioro/scale-util": "^0.0.2",
39
+ "@radix-ui/themes": "^3.2.1",
36
40
  "@turf/turf": "^7.2.0",
37
41
  "@types/d3": "^7.4.3",
38
42
  "@types/d3-scale-chromatic": "^3.1.0",
39
43
  "@types/geojson": "^7946.0.16",
44
+ "@types/react-dom": "^19.1.3",
40
45
  "d3": "^7.9.0",
41
46
  "d3-scale-chromatic": "^3.1.0",
42
47
  "greenlet": "^1.1.0",
43
48
  "lodash-es": "^4.17.21",
49
+ "maplibre-contour": "^0.1.0",
44
50
  "maplibre-gl": "^5.1.0",
45
51
  "query-string": "^9.1.1",
46
52
  "react": "^18.2.0",
53
+ "react-dom": "^19.1.0",
47
54
  "react-map-gl": "^8.0.0",
48
55
  "react-merge-refs": "^2.1.1",
49
56
  "react-use": "^17.5.0",
50
57
  "simple-statistics": "^7.8.7",
51
58
  "styled-components": "^6.1.8",
52
- "tslib": "^2.8.1"
59
+ "tslib": "^2.8.1",
60
+ "type-fest": "^4.40.1"
53
61
  }
54
62
  }
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { MapViewProps } from '../types';
3
- export declare function MapView({ sources, layers }: MapViewProps): React.JSX.Element;