@gamecrafters/base-ui 0.0.17 → 0.0.18

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.
Files changed (44) hide show
  1. package/build/components/index.d.ts +1 -0
  2. package/build/components/map/Map.d.ts +19 -0
  3. package/build/components/map/Map.types.d.ts +15 -0
  4. package/build/components/map/index.d.ts +43 -0
  5. package/build/lib/react-openlayers/Map.d.ts +7 -0
  6. package/build/lib/react-openlayers/MapContext.d.ts +2 -0
  7. package/build/lib/react-openlayers/MapMarker.d.ts +6 -0
  8. package/build/lib/react-openlayers/MapOverlay.d.ts +7 -0
  9. package/build/lib/react-openlayers/MapView.d.ts +6 -0
  10. package/build/lib/react-openlayers/controls/MapAttributionControl.d.ts +6 -0
  11. package/build/lib/react-openlayers/controls/MapDrawControl.d.ts +7 -0
  12. package/build/lib/react-openlayers/controls/MapFullScreenControl.d.ts +6 -0
  13. package/build/lib/react-openlayers/controls/MapLayersControl.d.ts +7 -0
  14. package/build/lib/react-openlayers/controls/MapMousePositionControl.d.ts +6 -0
  15. package/build/lib/react-openlayers/controls/MapOverviewMapControl.d.ts +6 -0
  16. package/build/lib/react-openlayers/controls/MapScaleLineControl.d.ts +6 -0
  17. package/build/lib/react-openlayers/controls/MapSearchControl.d.ts +7 -0
  18. package/build/lib/react-openlayers/controls/useMapControl.d.ts +2 -0
  19. package/build/lib/react-openlayers/controls/useMapCustomControl.d.ts +1 -0
  20. package/build/lib/react-openlayers/geocoding.d.ts +3 -0
  21. package/build/lib/react-openlayers/index.d.ts +38 -0
  22. package/build/lib/react-openlayers/interactions/MapDragRotateAndZoomInteraction.d.ts +6 -0
  23. package/build/lib/react-openlayers/interactions/MapLinkInteraction.d.ts +6 -0
  24. package/build/lib/react-openlayers/interactions/MapPointerInteraction.d.ts +6 -0
  25. package/build/lib/react-openlayers/interactions/MapSelectInteraction.d.ts +6 -0
  26. package/build/lib/react-openlayers/interactions/MapTranslateInteraction.d.ts +6 -0
  27. package/build/lib/react-openlayers/interactions/useMapInteraction.d.ts +2 -0
  28. package/build/lib/react-openlayers/layers/MapGraticuleLayer.d.ts +6 -0
  29. package/build/lib/react-openlayers/layers/MapHeatmapLayer.d.ts +6 -0
  30. package/build/lib/react-openlayers/layers/MapImageLayer.d.ts +6 -0
  31. package/build/lib/react-openlayers/layers/MapLayerGroup.d.ts +6 -0
  32. package/build/lib/react-openlayers/layers/MapLayerGroupContext.d.ts +2 -0
  33. package/build/lib/react-openlayers/layers/MapTileLayer.d.ts +6 -0
  34. package/build/lib/react-openlayers/layers/MapVectorLayer.d.ts +6 -0
  35. package/build/lib/react-openlayers/layers/MapWebGLTileLayer.d.ts +6 -0
  36. package/build/lib/react-openlayers/layers/useMapLayer.d.ts +2 -0
  37. package/build/lib/react-openlayers/layers/useMapLayerGroup.d.ts +1 -0
  38. package/build/lib/react-openlayers/marker.d.ts +11 -0
  39. package/build/lib/react-openlayers/types/index.d.ts +89 -0
  40. package/build/lib/react-openlayers/useMap.d.ts +1 -0
  41. package/build/main.cjs.js +796 -7
  42. package/build/main.esm.js +793 -4
  43. package/build/styles/main.css +1 -1
  44. package/package.json +2 -1
@@ -57,6 +57,7 @@ export * from "./label-group";
57
57
  export * from "./link";
58
58
  export * from "./link-button";
59
59
  export * from "./list";
60
+ export * from "./map";
60
61
  export * from "./mark";
61
62
  export * from "./markdown";
62
63
  export * from "./marquee";
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import type { MapControl } from "./Map.types";
3
+ export declare const DEFAULT_MAP_LATITUDE = 37.7649804;
4
+ export declare const DEFAULT_MAP_LONGITUDE = -122.4323829;
5
+ export declare const DEFAULT_MAP_ZOOM = 16;
6
+ declare const _default: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
+ latitude?: number;
8
+ longitude?: number;
9
+ zoom?: number;
10
+ width?: number | string;
11
+ height?: number | string;
12
+ controls?: readonly MapControl[];
13
+ marker?: boolean;
14
+ markerColor?: string;
15
+ markerLabel?: string;
16
+ children?: React.ReactNode;
17
+ className?: string;
18
+ } & React.RefAttributes<any>) => React.ReactNode;
19
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import type * as React from "react";
2
+ export type MapControl = "draw" | "fullScreen" | "layers" | "scaleLine" | "search";
3
+ export type MapProps = React.ComponentPropsWithoutRef<"div"> & {
4
+ latitude?: number;
5
+ longitude?: number;
6
+ zoom?: number;
7
+ width?: number | string;
8
+ height?: number | string;
9
+ controls?: readonly MapControl[];
10
+ marker?: boolean;
11
+ markerColor?: string;
12
+ markerLabel?: string;
13
+ children?: React.ReactNode;
14
+ className?: string;
15
+ };
@@ -0,0 +1,43 @@
1
+ import { MapAttributionControl, MapDragRotateAndZoomInteraction, MapDrawControl, MapFullScreenControl, MapGraticuleLayer, MapHeatmapLayer, MapImageLayer, MapLayerGroup, MapLayersControl, MapLinkInteraction, MapMarker, MapMousePositionControl, MapOverlay, MapOverviewMapControl, MapPointerInteraction, MapScaleLineControl, MapSearchControl, MapSelectInteraction, MapTileLayer, MapTranslateInteraction, MapVectorLayer, MapView, MapWebGLTileLayer } from "../../lib/react-openlayers";
2
+ export declare const Map: ((props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ latitude?: number;
4
+ longitude?: number;
5
+ zoom?: number;
6
+ width?: number | string;
7
+ height?: number | string;
8
+ controls?: readonly import("./Map.types").MapControl[];
9
+ marker?: boolean;
10
+ markerColor?: string;
11
+ markerLabel?: string;
12
+ children?: React.ReactNode;
13
+ className?: string;
14
+ } & import("react").RefAttributes<any>) => React.ReactNode) & {
15
+ View: typeof MapView;
16
+ Marker: typeof MapMarker;
17
+ Overlay: typeof MapOverlay;
18
+ LayerGroup: typeof MapLayerGroup;
19
+ TileLayer: typeof MapTileLayer;
20
+ ImageLayer: typeof MapImageLayer;
21
+ VectorLayer: typeof MapVectorLayer;
22
+ GraticuleLayer: typeof MapGraticuleLayer;
23
+ HeatmapLayer: typeof MapHeatmapLayer;
24
+ WebGLTileLayer: typeof MapWebGLTileLayer;
25
+ AttributionControl: typeof MapAttributionControl;
26
+ DrawControl: typeof MapDrawControl;
27
+ FullScreenControl: typeof MapFullScreenControl;
28
+ LayersControl: typeof MapLayersControl;
29
+ MousePositionControl: typeof MapMousePositionControl;
30
+ OverviewMapControl: typeof MapOverviewMapControl;
31
+ ScaleLineControl: typeof MapScaleLineControl;
32
+ SearchControl: typeof MapSearchControl;
33
+ DragRotateAndZoomInteraction: typeof MapDragRotateAndZoomInteraction;
34
+ LinkInteraction: typeof MapLinkInteraction;
35
+ PointerInteraction: typeof MapPointerInteraction;
36
+ SelectInteraction: typeof MapSelectInteraction;
37
+ TranslateInteraction: typeof MapTranslateInteraction;
38
+ };
39
+ export { MapView, MapMarker, MapOverlay, MapLayerGroup, MapTileLayer, MapImageLayer, MapVectorLayer, MapGraticuleLayer, MapHeatmapLayer, MapWebGLTileLayer, MapAttributionControl, MapDrawControl, MapFullScreenControl, MapLayersControl, MapMousePositionControl, MapOverviewMapControl, MapScaleLineControl, MapSearchControl, MapDragRotateAndZoomInteraction, MapLinkInteraction, MapPointerInteraction, MapSelectInteraction, MapTranslateInteraction, };
40
+ export { DEFAULT_MAP_LATITUDE, DEFAULT_MAP_LONGITUDE, DEFAULT_MAP_ZOOM } from "./Map";
41
+ export { useMap, getAddress, getLonLat, DEFAULT_MARKER_COLOR } from "../../lib/react-openlayers";
42
+ export type { MapViewProps, MapMarkerProps, MapOverlayProps, MapOverlayContent, MapLayerProps, MapLayerGroupProps, MapTileLayerProps, MapImageLayerProps, MapVectorLayerProps, MapGraticuleLayerProps, MapHeatmapLayerProps, MapWebGLTileLayerProps, MapAttributionControlProps, MapCustomControlProps, MapDrawControlProps, MapDrawShape, MapFullScreenControlProps, MapLayersControlProps, MapMousePositionControlProps, MapOverviewMapControlProps, MapScaleLineControlProps, MapSearchControlProps, MapSearchResult, MapDragRotateAndZoomInteractionProps, MapLinkInteractionProps, MapPointerInteractionProps, MapSelectInteractionProps, MapTranslateInteractionProps, } from "../../lib/react-openlayers";
43
+ export * from "./Map.types";
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import type { MapProps } from "./types";
3
+ declare function Map({ children, className, style, ...options }: MapProps): React.JSX.Element;
4
+ declare namespace Map {
5
+ var displayName: string;
6
+ }
7
+ export { Map };
@@ -0,0 +1,2 @@
1
+ import type { Map as OlMap } from "ol";
2
+ export declare const MapContext: import("react").Context<OlMap | undefined>;
@@ -0,0 +1,6 @@
1
+ import type { MapMarkerProps } from "./types";
2
+ declare function MapMarker({ lonLat, address, color, label, addOnClick, removeOnClick, }: MapMarkerProps): null;
3
+ declare namespace MapMarker {
4
+ var displayName: string;
5
+ }
6
+ export { MapMarker };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import type { MapOverlayProps } from "./types";
3
+ declare function MapOverlay({ children, ...options }: MapOverlayProps): React.ReactPortal;
4
+ declare namespace MapOverlay {
5
+ var displayName: string;
6
+ }
7
+ export { MapOverlay };
@@ -0,0 +1,6 @@
1
+ import type { MapViewProps } from "./types";
2
+ declare function MapView(props: MapViewProps): null;
3
+ declare namespace MapView {
4
+ var displayName: string;
5
+ }
6
+ export { MapView };
@@ -0,0 +1,6 @@
1
+ import type { MapAttributionControlProps } from "../types";
2
+ declare function MapAttributionControl(props: MapAttributionControlProps): null;
3
+ declare namespace MapAttributionControl {
4
+ var displayName: string;
5
+ }
6
+ export { MapAttributionControl };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import type { MapDrawControlProps } from "../types";
3
+ declare function MapDrawControl({ target, className, fileName }: MapDrawControlProps): React.ReactPortal;
4
+ declare namespace MapDrawControl {
5
+ var displayName: string;
6
+ }
7
+ export { MapDrawControl };
@@ -0,0 +1,6 @@
1
+ import type { MapFullScreenControlProps } from "../types";
2
+ declare function MapFullScreenControl(props: MapFullScreenControlProps): null;
3
+ declare namespace MapFullScreenControl {
4
+ var displayName: string;
5
+ }
6
+ export { MapFullScreenControl };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import type { MapLayersControlProps } from "../types";
3
+ declare function MapLayersControl({ target, className }: MapLayersControlProps): React.ReactPortal;
4
+ declare namespace MapLayersControl {
5
+ var displayName: string;
6
+ }
7
+ export { MapLayersControl };
@@ -0,0 +1,6 @@
1
+ import type { MapMousePositionControlProps } from "../types";
2
+ declare function MapMousePositionControl(props: MapMousePositionControlProps): null;
3
+ declare namespace MapMousePositionControl {
4
+ var displayName: string;
5
+ }
6
+ export { MapMousePositionControl };
@@ -0,0 +1,6 @@
1
+ import type { MapOverviewMapControlProps } from "../types";
2
+ declare function MapOverviewMapControl(props: MapOverviewMapControlProps): null;
3
+ declare namespace MapOverviewMapControl {
4
+ var displayName: string;
5
+ }
6
+ export { MapOverviewMapControl };
@@ -0,0 +1,6 @@
1
+ import type { MapScaleLineControlProps } from "../types";
2
+ declare function MapScaleLineControl(props: MapScaleLineControlProps): null;
3
+ declare namespace MapScaleLineControl {
4
+ var displayName: string;
5
+ }
6
+ export { MapScaleLineControl };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import type { MapSearchControlProps } from "../types";
3
+ declare function MapSearchControl({ target, className, zoom, color, placeholder, }: MapSearchControlProps): React.ReactPortal;
4
+ declare namespace MapSearchControl {
5
+ var displayName: string;
6
+ }
7
+ export { MapSearchControl };
@@ -0,0 +1,2 @@
1
+ import type Control from "ol/control/Control";
2
+ export declare const useMapControl: <TControl extends Control>(create: () => TControl) => TControl;
@@ -0,0 +1 @@
1
+ export declare const useMapCustomControl: (component: string, className: string, target?: HTMLElement | string) => HTMLDivElement;
@@ -0,0 +1,3 @@
1
+ import type { MapSearchResult } from "./types";
2
+ export declare function getAddress(lon: number, lat: number, zoom?: number, language?: string): Promise<string>;
3
+ export declare function getLonLat(query: string, limit?: number, countryCodes?: string, language?: string): Promise<MapSearchResult[]>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * React OpenLayers library
3
+ */
4
+ export { Map } from "./Map";
5
+ export { MapContext } from "./MapContext";
6
+ export { useMap } from "./useMap";
7
+ export { MapView } from "./MapView";
8
+ export { MapMarker } from "./MapMarker";
9
+ export { MapOverlay } from "./MapOverlay";
10
+ export { getAddress, getLonLat } from "./geocoding";
11
+ export { addMarker, removeMarker, getMarkerImage, DEFAULT_MARKER_COLOR } from "./marker";
12
+ export { MapLayerGroup } from "./layers/MapLayerGroup";
13
+ export { MapLayerGroupContext } from "./layers/MapLayerGroupContext";
14
+ export { useMapLayerGroup } from "./layers/useMapLayerGroup";
15
+ export { useMapLayer } from "./layers/useMapLayer";
16
+ export { MapTileLayer } from "./layers/MapTileLayer";
17
+ export { MapImageLayer } from "./layers/MapImageLayer";
18
+ export { MapVectorLayer } from "./layers/MapVectorLayer";
19
+ export { MapGraticuleLayer } from "./layers/MapGraticuleLayer";
20
+ export { MapHeatmapLayer } from "./layers/MapHeatmapLayer";
21
+ export { MapWebGLTileLayer } from "./layers/MapWebGLTileLayer";
22
+ export { useMapControl } from "./controls/useMapControl";
23
+ export { useMapCustomControl } from "./controls/useMapCustomControl";
24
+ export { MapAttributionControl } from "./controls/MapAttributionControl";
25
+ export { MapFullScreenControl } from "./controls/MapFullScreenControl";
26
+ export { MapScaleLineControl } from "./controls/MapScaleLineControl";
27
+ export { MapMousePositionControl } from "./controls/MapMousePositionControl";
28
+ export { MapOverviewMapControl } from "./controls/MapOverviewMapControl";
29
+ export { MapDrawControl } from "./controls/MapDrawControl";
30
+ export { MapLayersControl } from "./controls/MapLayersControl";
31
+ export { MapSearchControl } from "./controls/MapSearchControl";
32
+ export { useMapInteraction } from "./interactions/useMapInteraction";
33
+ export { MapDragRotateAndZoomInteraction } from "./interactions/MapDragRotateAndZoomInteraction";
34
+ export { MapTranslateInteraction } from "./interactions/MapTranslateInteraction";
35
+ export { MapPointerInteraction } from "./interactions/MapPointerInteraction";
36
+ export { MapSelectInteraction } from "./interactions/MapSelectInteraction";
37
+ export { MapLinkInteraction } from "./interactions/MapLinkInteraction";
38
+ export type { MapProps, MapViewProps, MapMarkerProps, MapOverlayProps, MapOverlayContent, MapLayerProps, MapLayerGroupProps, MapTileLayerProps, MapImageLayerProps, MapVectorLayerProps, MapGraticuleLayerProps, MapHeatmapLayerProps, MapWebGLTileLayerProps, MapAttributionControlProps, MapFullScreenControlProps, MapMousePositionControlProps, MapOverviewMapControlProps, MapScaleLineControlProps, MapCustomControlProps, MapDrawControlProps, MapDrawShape, MapLayersControlProps, MapSearchControlProps, MapDragRotateAndZoomInteractionProps, MapLinkInteractionProps, MapPointerInteractionProps, MapSelectInteractionProps, MapTranslateInteractionProps, MapSearchResult, } from "./types";
@@ -0,0 +1,6 @@
1
+ import type { MapDragRotateAndZoomInteractionProps } from "../types";
2
+ declare function MapDragRotateAndZoomInteraction(props: MapDragRotateAndZoomInteractionProps): null;
3
+ declare namespace MapDragRotateAndZoomInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapDragRotateAndZoomInteraction };
@@ -0,0 +1,6 @@
1
+ import type { MapLinkInteractionProps } from "../types";
2
+ declare function MapLinkInteraction(props: MapLinkInteractionProps): null;
3
+ declare namespace MapLinkInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapLinkInteraction };
@@ -0,0 +1,6 @@
1
+ import type { MapPointerInteractionProps } from "../types";
2
+ declare function MapPointerInteraction(props: MapPointerInteractionProps): null;
3
+ declare namespace MapPointerInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapPointerInteraction };
@@ -0,0 +1,6 @@
1
+ import type { MapSelectInteractionProps } from "../types";
2
+ declare function MapSelectInteraction({ onSelect, style, ...options }: MapSelectInteractionProps): null;
3
+ declare namespace MapSelectInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapSelectInteraction };
@@ -0,0 +1,6 @@
1
+ import type { MapTranslateInteractionProps } from "../types";
2
+ declare function MapTranslateInteraction(props: MapTranslateInteractionProps): null;
3
+ declare namespace MapTranslateInteraction {
4
+ var displayName: string;
5
+ }
6
+ export { MapTranslateInteraction };
@@ -0,0 +1,2 @@
1
+ import type Interaction from "ol/interaction/Interaction";
2
+ export declare const useMapInteraction: <TInteraction extends Interaction>(create: () => TInteraction) => TInteraction;
@@ -0,0 +1,6 @@
1
+ import type { MapGraticuleLayerProps } from "../types";
2
+ declare function MapGraticuleLayer({ name, ...options }: MapGraticuleLayerProps): null;
3
+ declare namespace MapGraticuleLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapGraticuleLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapHeatmapLayerProps } from "../types";
2
+ declare function MapHeatmapLayer({ name, ...options }: MapHeatmapLayerProps): null;
3
+ declare namespace MapHeatmapLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapHeatmapLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapImageLayerProps } from "../types";
2
+ declare function MapImageLayer({ name, ...options }: MapImageLayerProps): null;
3
+ declare namespace MapImageLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapImageLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapLayerGroupProps } from "../types";
2
+ declare function MapLayerGroup({ children, name, ...options }: MapLayerGroupProps): import("react").JSX.Element;
3
+ declare namespace MapLayerGroup {
4
+ var displayName: string;
5
+ }
6
+ export { MapLayerGroup };
@@ -0,0 +1,2 @@
1
+ import type LayerGroup from "ol/layer/Group";
2
+ export declare const MapLayerGroupContext: import("react").Context<LayerGroup | undefined>;
@@ -0,0 +1,6 @@
1
+ import type { MapTileLayerProps } from "../types";
2
+ declare function MapTileLayer({ name, ...options }: MapTileLayerProps): null;
3
+ declare namespace MapTileLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapTileLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapVectorLayerProps } from "../types";
2
+ declare function MapVectorLayer({ name, ...options }: MapVectorLayerProps): null;
3
+ declare namespace MapVectorLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapVectorLayer };
@@ -0,0 +1,6 @@
1
+ import type { MapWebGLTileLayerProps } from "../types";
2
+ declare function MapWebGLTileLayer({ name, ...options }: MapWebGLTileLayerProps): null;
3
+ declare namespace MapWebGLTileLayer {
4
+ var displayName: string;
5
+ }
6
+ export { MapWebGLTileLayer };
@@ -0,0 +1,2 @@
1
+ import type BaseLayer from "ol/layer/Base";
2
+ export declare const useMapLayer: <TLayer extends BaseLayer>(create: () => TLayer, name?: string) => TLayer;
@@ -0,0 +1 @@
1
+ export declare const useMapLayerGroup: () => import("ol/layer/Group").default | undefined;
@@ -0,0 +1,11 @@
1
+ import Feature from "ol/Feature";
2
+ import Point from "ol/geom/Point";
3
+ import type { Map as OlMap } from "ol";
4
+ import type { FeatureLike } from "ol/Feature";
5
+ import type { Coordinate } from "ol/coordinate";
6
+ export declare const DEFAULT_MARKER_COLOR = "#257ECA";
7
+ export declare function getMarkerImage(color?: string, label?: string): string;
8
+ export declare function addMarker(map: OlMap, lonLat: Coordinate, color?: string, label?: string): Feature<Point, {
9
+ [x: string]: any;
10
+ }>;
11
+ export declare function removeMarker(map: OlMap, marker: FeatureLike): void;
@@ -0,0 +1,89 @@
1
+ import type * as React from "react";
2
+ import type { Coordinate } from "ol/coordinate";
3
+ import type { MapOptions } from "ol/Map";
4
+ import type { ViewOptions } from "ol/View";
5
+ import type { Options as OverlayOptions } from "ol/Overlay";
6
+ import type { Options as ControlOptions } from "ol/control/Control";
7
+ import type { Options as AttributionControlOptions } from "ol/control/Attribution";
8
+ import type { Options as FullScreenControlOptions } from "ol/control/FullScreen";
9
+ import type { Options as MousePositionControlOptions } from "ol/control/MousePosition";
10
+ import type { Options as OverviewMapControlOptions } from "ol/control/OverviewMap";
11
+ import type { Options as ScaleLineControlOptions } from "ol/control/ScaleLine";
12
+ import type { Options as LayerGroupOptions } from "ol/layer/Group";
13
+ import type { Options as TileLayerOptions } from "ol/layer/BaseTile";
14
+ import type { Options as ImageLayerOptions } from "ol/layer/BaseImage";
15
+ import type { Options as VectorLayerOptions } from "ol/layer/Vector";
16
+ import type { Options as GraticuleLayerOptions } from "ol/layer/Graticule";
17
+ import type { Options as HeatmapLayerOptions } from "ol/layer/Heatmap";
18
+ import type { Options as WebGLTileLayerOptions } from "ol/layer/WebGLTile";
19
+ import type ImageSource from "ol/source/Image";
20
+ import type TileSource from "ol/source/Tile";
21
+ import type { Options as DragRotateAndZoomOptions } from "ol/interaction/DragRotateAndZoom";
22
+ import type { Options as LinkOptions } from "ol/interaction/Link";
23
+ import type { Options as PointerOptions } from "ol/interaction/Pointer";
24
+ import type { Options as SelectOptions, SelectEvent } from "ol/interaction/Select";
25
+ import type { Options as TranslateOptions } from "ol/interaction/Translate";
26
+ export type MapProps = Omit<MapOptions, "target"> & {
27
+ children?: React.ReactNode;
28
+ className?: string;
29
+ style?: React.CSSProperties;
30
+ };
31
+ export type MapViewProps = ViewOptions;
32
+ export type MapMarkerProps = {
33
+ lonLat?: Coordinate;
34
+ address?: string;
35
+ color?: string;
36
+ label?: string;
37
+ addOnClick?: boolean;
38
+ removeOnClick?: boolean;
39
+ };
40
+ export type MapOverlayContent = {
41
+ coordinate: Coordinate;
42
+ lonLat: Coordinate;
43
+ address: string;
44
+ };
45
+ export type MapOverlayProps = Omit<OverlayOptions, "element"> & {
46
+ children?: React.ReactNode | ((content: MapOverlayContent) => React.ReactNode);
47
+ };
48
+ export type MapLayerProps = {
49
+ name?: string;
50
+ };
51
+ export type MapLayerGroupProps = LayerGroupOptions & MapLayerProps & {
52
+ children?: React.ReactNode;
53
+ };
54
+ export type MapTileLayerProps = TileLayerOptions<TileSource> & MapLayerProps;
55
+ export type MapImageLayerProps = ImageLayerOptions<ImageSource> & MapLayerProps;
56
+ export type MapVectorLayerProps = VectorLayerOptions & MapLayerProps;
57
+ export type MapGraticuleLayerProps = GraticuleLayerOptions & MapLayerProps;
58
+ export type MapHeatmapLayerProps = HeatmapLayerOptions & MapLayerProps;
59
+ export type MapWebGLTileLayerProps = WebGLTileLayerOptions & MapLayerProps;
60
+ export type MapAttributionControlProps = AttributionControlOptions;
61
+ export type MapFullScreenControlProps = FullScreenControlOptions;
62
+ export type MapMousePositionControlProps = MousePositionControlOptions;
63
+ export type MapOverviewMapControlProps = OverviewMapControlOptions;
64
+ export type MapScaleLineControlProps = ScaleLineControlOptions;
65
+ export type MapCustomControlProps = Pick<ControlOptions, "target"> & {
66
+ className?: string;
67
+ };
68
+ export type MapDrawShape = "Point" | "LineString" | "Circle";
69
+ export type MapDrawControlProps = MapCustomControlProps & {
70
+ fileName?: string;
71
+ };
72
+ export type MapLayersControlProps = MapCustomControlProps;
73
+ export type MapSearchControlProps = MapCustomControlProps & {
74
+ zoom?: number;
75
+ color?: string;
76
+ placeholder?: string;
77
+ };
78
+ export type MapDragRotateAndZoomInteractionProps = DragRotateAndZoomOptions;
79
+ export type MapLinkInteractionProps = LinkOptions;
80
+ export type MapPointerInteractionProps = PointerOptions;
81
+ export type MapSelectInteractionProps = SelectOptions & {
82
+ onSelect?: (event: SelectEvent) => void;
83
+ };
84
+ export type MapTranslateInteractionProps = TranslateOptions;
85
+ export type MapSearchResult = {
86
+ lat: string;
87
+ lon: string;
88
+ display_name: string;
89
+ };
@@ -0,0 +1 @@
1
+ export declare const useMap: () => import("ol").Map | undefined;