@mappable-world/mappable-types 1.0.16966980 → 1.0.17084091

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.
@@ -29,8 +29,12 @@ type CustomizationItem = {
29
29
  elements?: CustomizationElements | CustomizationElements[];
30
30
  stylers?: CustomizationStyler | CustomizationStyler[];
31
31
  };
32
- type CustomizationConfig = ReadonlyArray<CustomizationItem>;
33
- type Customization = CustomizationConfig;
32
+ type CustomizationConfig = CustomizationItem[];
33
+ type CustomizationOptions = {
34
+ style: CustomizationConfig;
35
+ 'render-3d'?: 'off';
36
+ };
37
+ type Customization = CustomizationConfig | CustomizationOptions;
34
38
  interface WorldHotspot {
35
39
  readonly type: 'world';
36
40
  readonly feature: HotspotFeature<unknown>;
@@ -164,5 +168,5 @@ type VectorCustomizationElements = CustomizationElements;
164
168
  /** @deprecated Use CustomizationItem instead */
165
169
  type VectorCustomizationItem = CustomizationItem;
166
170
  /** @deprecated Use Customization instead */
167
- type VectorCustomization = Customization;
168
- export { VectorCustomizationTypes, VectorCustomizationElements, VectorCustomizationItem, VectorCustomization, CustomizationTypes, CustomizationElements, CustomizationItem, Customization, RasterTileDataSourceDescription, FetchHotspotsFunction, VectorTileDataSourceDescription, VectorTileSize, VectorObjectsCollisionPriority, VectorDataSourcePriority, VectorMapType, HotspotsOptions, FetchTileFunction, ComposeTileUrlFunction, Hotspot, WorldHotspot, RenderedHotspot, FetchedRasterTile, FetchedTile, FetchedCommonTile, MapTheme };
171
+ type VectorCustomization = CustomizationConfig;
172
+ export { VectorCustomizationTypes, VectorCustomizationElements, VectorCustomizationItem, VectorCustomization, CustomizationTypes, CustomizationElements, CustomizationItem, Customization, CustomizationConfig, CustomizationOptions, RasterTileDataSourceDescription, FetchHotspotsFunction, VectorTileDataSourceDescription, VectorTileSize, VectorObjectsCollisionPriority, VectorDataSourcePriority, VectorMapType, HotspotsOptions, FetchTileFunction, ComposeTileUrlFunction, Hotspot, WorldHotspot, RenderedHotspot, FetchedRasterTile, FetchedTile, FetchedCommonTile, MapTheme };
@@ -1,5 +1,5 @@
1
1
  import type { DrawingStyle, GenericGeometry, LngLat, HideOutsideRule } from "../../common/types";
2
- import type { BlockingProps, DraggableProps, FeatureClickEvents } from "./types";
2
+ import type { BlockingProps, DraggableProps, FeatureClickEvents, FeatureMouseEvents } from "./types";
3
3
  import { MMapEntity } from "../MMapEnities";
4
4
  import type { Geometry, MMapFeatureEventHandler } from "./types";
5
5
  /**
@@ -15,7 +15,7 @@ type MMapFeatureProps = {
15
15
  disableRoundCoordinates?: boolean;
16
16
  /** Hide the marker if it goes beyond the edge of the viewport */
17
17
  hideOutsideViewport?: HideOutsideRule;
18
- } & DraggableProps<MMapFeatureEventHandler> & BlockingProps & FeatureClickEvents;
18
+ } & DraggableProps<MMapFeatureEventHandler> & BlockingProps & FeatureClickEvents & FeatureMouseEvents;
19
19
  declare const defaultProps: Readonly<{
20
20
  source: "mappable-default-feature";
21
21
  }>;
@@ -80,5 +80,7 @@ declare class MMapFeature extends MMapEntity<MMapFeatureProps, DefaultProps> {
80
80
  private static _onClick;
81
81
  private static _onFastClick;
82
82
  private static _onDoubleClick;
83
+ private static _onMouseEnter;
84
+ private static _onMouseLeave;
83
85
  }
84
86
  export { MMapFeature, MMapFeatureProps };
@@ -50,6 +50,10 @@ export interface FeatureClickEvents {
50
50
  /** Fast click handler */
51
51
  onFastClick?: (event: MouseEvent, mapEvent: MapEvent) => void;
52
52
  }
53
+ export interface FeatureMouseEvents {
54
+ onMouseEnter?: (event: MouseEvent, mapEvent: MapEvent) => void;
55
+ onMouseLeave?: (event: MouseEvent, mapEvent: MapEvent) => void;
56
+ }
53
57
  export type Geometry = PolygonGeometry | MultiPolygonGeometry | LineStringGeometry | MultiLineStringGeometry | PointGeometry;
54
58
  /**
55
59
  * Feature drag event handler.
@@ -1,5 +1,5 @@
1
1
  import type { HideOutsideRule, LngLat } from "../../common/types";
2
- import type { BlockingProps, DraggableProps, FeatureClickEvents } from "../MMapFeature/types";
2
+ import type { BlockingProps, DraggableProps, FeatureClickEvents, FeatureMouseEvents } from "../MMapFeature/types";
3
3
  import { MMapGroupEntity } from "../MMapEnities";
4
4
  import { overrideKeyReactify } from "../wrappers";
5
5
  /**
@@ -43,7 +43,7 @@ type MMapMarkerProps = {
43
43
  * A point will be removed from the map if its coordinates are 1000px outside the visible area of the map.
44
44
  */
45
45
  hideOutsideViewport?: HideOutsideRule;
46
- } & DraggableProps<MMapMarkerEventHandler> & BlockingProps & FeatureClickEvents;
46
+ } & DraggableProps<MMapMarkerEventHandler> & BlockingProps & FeatureClickEvents & FeatureMouseEvents;
47
47
  declare const defaultProps: Readonly<{
48
48
  draggable: false;
49
49
  mapFollowsOnDrag: false;
@@ -101,6 +101,8 @@ declare class MMapMarker extends MMapGroupEntity<MMapMarkerProps, DefaultProps>
101
101
  onDoubleClick?: ((event: MouseEvent, mapEvent: import("../MMapFeature/types").MapEvent) => void) | undefined;
102
102
  onClick?: ((event: MouseEvent, mapEvent: import("../MMapFeature/types").MapEvent) => void) | undefined;
103
103
  onFastClick?: ((event: MouseEvent, mapEvent: import("../MMapFeature/types").MapEvent) => void) | undefined;
104
+ onMouseEnter?: ((event: MouseEvent, mapEvent: import("../MMapFeature/types").MapEvent) => void) | undefined;
105
+ onMouseLeave?: ((event: MouseEvent, mapEvent: import("../MMapFeature/types").MapEvent) => void) | undefined;
104
106
  markerElement?: HTMLElement | undefined;
105
107
  children?: import("react").ReactNode;
106
108
  ref?: import("react").Ref<import("../Entities").GenericEntity<{
@@ -137,7 +139,7 @@ declare class MMapMarker extends MMapGroupEntity<MMapMarkerProps, DefaultProps>
137
139
  * A point will be removed from the map if its coordinates are 1000px outside the visible area of the map.
138
140
  */
139
141
  hideOutsideViewport?: HideOutsideRule | undefined;
140
- } & DraggableProps<MMapMarkerEventHandler> & BlockingProps & FeatureClickEvents & {
142
+ } & DraggableProps<MMapMarkerEventHandler> & BlockingProps & FeatureClickEvents & FeatureMouseEvents & {
141
143
  markerElement?: HTMLElement | undefined;
142
144
  }, {}, import("../Entities").GenericRootEntity<unknown, {}>>> | undefined;
143
145
  key?: import("react").Key | null | undefined;
@@ -41,6 +41,18 @@ export type SuggestResponseItem = {
41
41
  uri?: string;
42
42
  /** Object tags. Possible values: business, street, metro, district, locality, area, province, country, hydro, railway, station, route, vegetation, airport, other, house */
43
43
  tags?: string[];
44
+ /** Object's address. */
45
+ address?: {
46
+ /** Object's address. */
47
+ formattedAddress?: string;
48
+ /** Address components. */
49
+ component: {
50
+ /** Address component name. */
51
+ name: string;
52
+ /** Address component type. Two components with the same `kind` values but different `name` may be returned. */
53
+ kind: string[];
54
+ }[];
55
+ };
44
56
  /** @deprecated Use uri instead */
45
57
  value: string;
46
58
  /** @deprecated Use tags instead */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappable-world/mappable-types",
3
- "version": "1.0.16966980",
3
+ "version": "1.0.17084091",
4
4
  "description": "Types for mappable maps library",
5
5
  "main": "",
6
6
  "types": "index.d.ts",
@@ -18,8 +18,8 @@
18
18
  "homepage": "https://mappable.world",
19
19
  "license": "Apache-2.0",
20
20
  "peerDependencies": {
21
- "@types/react": "16-18",
22
- "@types/react-dom": "16-18",
21
+ "@types/react": "16-19",
22
+ "@types/react-dom": "16-19",
23
23
  "@vue/runtime-core": "3"
24
24
  },
25
25
  "peerDependenciesMeta": {
@@ -65,6 +65,8 @@ declare class MMapDefaultMarker extends mappable.MMapComplexEntity<MMapDefaultMa
65
65
  onDoubleClick?: ((event: MouseEvent, mapEvent: import("../../../imperative/MMapFeature/types").MapEvent) => void) | undefined;
66
66
  onClick?: ((event: MouseEvent, mapEvent: import("../../../imperative/MMapFeature/types").MapEvent) => void) | undefined;
67
67
  onFastClick?: ((event: MouseEvent, mapEvent: import("../../../imperative/MMapFeature/types").MapEvent) => void) | undefined;
68
+ onMouseEnter?: ((event: MouseEvent, mapEvent: import("../../../imperative/MMapFeature/types").MapEvent) => void) | undefined;
69
+ onMouseLeave?: ((event: MouseEvent, mapEvent: import("../../../imperative/MMapFeature/types").MapEvent) => void) | undefined;
68
70
  title?: string | undefined;
69
71
  subtitle?: string | undefined;
70
72
  color?: string | undefined;