@mappable-world/mappable-types 0.0.19 → 0.0.21

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 (42) hide show
  1. package/common/types/bounds.d.ts +2 -2
  2. package/common/types/layer-implementation.d.ts +6 -2
  3. package/imperative/Entities.d.ts +1 -0
  4. package/imperative/MMap/index.d.ts +1 -1
  5. package/imperative/MMapContextProvider/index.d.ts +25 -0
  6. package/imperative/MMapControl/MMapControl.d.ts +2 -1
  7. package/imperative/MMapControl/MMapControlButton.d.ts +1 -1
  8. package/imperative/MMapControls/index.d.ts +1 -1
  9. package/imperative/MMapCoverage/index.d.ts +40 -5
  10. package/imperative/MMapDefaultSchemeLayer/index.d.ts +25 -2
  11. package/imperative/MMapFeature/index.d.ts +7 -9
  12. package/imperative/MMapFeature/types.d.ts +13 -4
  13. package/imperative/MMapListener/index.d.ts +3 -1
  14. package/imperative/MMapMarker/index.d.ts +5 -5
  15. package/imperative/MMapTileDataSource/index.d.ts +1 -2
  16. package/imperative/TypeContext.d.ts +6 -0
  17. package/imperative/fetchConfig.d.ts +3 -1
  18. package/imperative/index.d.ts +2 -0
  19. package/imperative/search/index.d.ts +6 -1
  20. package/imperative/utils/jsonp.d.ts +1 -1
  21. package/imperative/utils/microDebounce.d.ts +0 -0
  22. package/imperative/utils/requestCoverage.d.ts +18 -3
  23. package/imperative/utils/sphere-geo-utils.d.ts +1 -0
  24. package/modules/layers-extra/MMapCarparksLayer.d.ts +50 -0
  25. package/modules/layers-extra/MMapPanoramaLayer.d.ts +52 -0
  26. package/modules/layers-extra/MMapTrafficEventsLayer.d.ts +58 -0
  27. package/modules/layers-extra/MMapTrafficLayer.d.ts +36 -0
  28. package/modules/layers-extra/index.d.ts +4 -0
  29. package/modules/layers-extra/utils.d.ts +1 -0
  30. package/modules/ruler/EventsBlockerLayer.d.ts +10 -0
  31. package/modules/ruler/MMapRuler.d.ts +66 -0
  32. package/modules/ruler/MMapRulerCommon.d.ts +102 -0
  33. package/modules/ruler/index.d.ts +2 -0
  34. package/modules/ruler/react/MMapRuler.d.ts +11 -0
  35. package/modules/ruler/utils.d.ts +54 -0
  36. package/modules/ruler/vue/MMapRuler.d.ts +6 -0
  37. package/modules/types.d.ts +1 -0
  38. package/modules/vuefy/options/common.d.ts +2 -1
  39. package/package.json +1 -1
  40. package/packages/clusterer/MMapClusterer/MMapClusterer.d.ts +2 -2
  41. package/packages/markers/MMapDefaultMarker/index.d.ts +5 -5
  42. package/reactify/reactify.d.ts +1 -0
@@ -8,10 +8,10 @@ export type GenericBounds<T> = [
8
8
  T
9
9
  ];
10
10
  /**
11
- * Rectangle bounded by bottom-left and top-right coordinates
11
+ * Rectangle bounded by top-left and bottom-right coordinates
12
12
  */
13
13
  export type LngLatBounds = GenericBounds<LngLat>;
14
14
  /**
15
- * Rectangle bounded by bottom-left and top-right world coordinates
15
+ * Rectangle bounded by top-left and bottom-right world coordinates
16
16
  */
17
17
  export type WorldBounds = GenericBounds<WorldCoordinates>;
@@ -15,7 +15,9 @@ interface LayerImplementationRenderProps {
15
15
  size: PixelCoordinates;
16
16
  }
17
17
  interface RasterLayerImplementationRenderProps extends LayerImplementationRenderProps {
18
- camera: Camera;
18
+ camera: Camera & {
19
+ fov: number;
20
+ };
19
21
  worlds: WorldOffset[];
20
22
  }
21
23
  interface RasterLayerImplementation {
@@ -39,7 +41,9 @@ interface RasterLayerImplementationConstructor {
39
41
  new (props: RasterLayerImplementationConstructorProps): RasterLayerImplementation;
40
42
  }
41
43
  interface VectorLayerImplementationRenderProps extends LayerImplementationRenderProps {
42
- camera: Camera;
44
+ camera: Camera & {
45
+ fov: number;
46
+ };
43
47
  worlds: {
44
48
  lookAt: Vec2;
45
49
  viewProjMatrix: Matrix4;
@@ -9,6 +9,7 @@ declare class ContextProvider<T> {
9
9
  consume(): T | undefined;
10
10
  provide(nextContext: T): void;
11
11
  }
12
+ export declare const __implEntityKeepOldPropValue: {};
12
13
  type WithDefaults<Props, DefaultProps extends Partial<Props>> = Props & {
13
14
  [K in keyof DefaultProps]: K extends keyof Props ? NonNullable<Props[K]> : never;
14
15
  };
@@ -200,8 +200,8 @@ declare class MMap extends GenericRootEntity<MMapProps, DefaultProps> {
200
200
  private __abortVectorLoad?;
201
201
  private _layers;
202
202
  private _copyrights;
203
- private _coverage;
204
203
  private _isDestroyed;
204
+ private _isVectorLoading;
205
205
  constructor(rootContainer: HTMLElement, props: MMapProps, children?: MMapEntity<unknown>[]);
206
206
  readonly children: MMapEntity<unknown>[];
207
207
  addChild(child: MMapEntity<unknown>, index?: number): this;
@@ -0,0 +1,25 @@
1
+ import { MMapGroupEntity } from "../MMapEnities";
2
+ import type { Context } from "../Entities";
3
+ /**
4
+ * MMapContextProvider props
5
+ */
6
+ export type MMapContextProviderProps<T> = {
7
+ /** Context that will receive the provided value */
8
+ context: Context<T>;
9
+ /** Value to be provided in the context. */
10
+ value: T;
11
+ };
12
+ /**
13
+ * Context provider for MMap, allowing to inject a context and its value.
14
+ * @example
15
+ * ```javascript
16
+ * const mapContextProvider = new MMapContextProvider({context: SomeMapContext, value: {your: 'value'}});
17
+ * mapContextProvider.addChild(new MMapDefaultSchemeLayer({}));
18
+ * map.addChild(mapContextProvider);
19
+ * ```
20
+ * `MMapDefaultSchemeLayer` will receive the context `SomeMapContext` with the value `{ your: 'value' }`
21
+ */
22
+ export declare class MMapContextProvider<T> extends MMapGroupEntity<MMapContextProviderProps<T>> {
23
+ protected _onAttach(): void;
24
+ protected _onUpdate({ value }: Partial<MMapContextProviderProps<T>>): void;
25
+ }
@@ -50,9 +50,10 @@ export declare class MMapControl extends MMapGroupEntity<MMapControlProps, Defau
50
50
  key?: import("react").Key | null | undefined;
51
51
  }>>;
52
52
  private _element?;
53
+ private _innerElement?;
53
54
  private _detachDom?;
54
55
  private _unwatchThemeContext?;
55
- constructor(props?: MMapControlProps);
56
+ constructor(props?: MMapControlProps, element?: HTMLElement);
56
57
  protected _createDom(): HTMLElement;
57
58
  protected _onAttach(): void;
58
59
  protected _onUpdate(props: Partial<MMapControlProps>): void;
@@ -48,7 +48,7 @@ export declare class MMapControlCommonButton extends MMapGroupEntity<MMapControl
48
48
  * map.addChild(controls);
49
49
  * ```
50
50
  *
51
- * @see https://mappable.world/docs/jsapi/dg/concepts/controls/about.html
51
+ * @see <https://mappable.world/docs/js-api/dg/concepts/controls/index.html>
52
52
  */
53
53
  export declare class MMapControlButton extends MMapComplexEntity<MMapControlButtonProps> {
54
54
  static [overrideKeyReactify]: import("../../reactify/reactify").CustomReactify<MMapControlButton, import("react").ForwardRefExoticComponent<{
@@ -49,7 +49,7 @@ export declare class MMapControls extends MMapGroupEntity<MMapControlsProps> {
49
49
  private _detachDom?;
50
50
  constructor(props: MMapControlsProps, children?: MMapEntity<unknown>[]);
51
51
  protected _onAttach(): void;
52
- protected _onUpdate(): void;
52
+ protected _onUpdate(diffProps: Partial<MMapControlsProps>): void;
53
53
  protected _onDetach(): void;
54
54
  }
55
55
  export {};
@@ -1,20 +1,55 @@
1
+ import type { ZoomRange } from "../../common/types";
1
2
  import { MMapComplexEntity } from "../MMapEnities";
3
+ import { Context } from "../Entities";
2
4
  interface MMapCoverageProps {
3
5
  onError?: (e: Error) => void;
4
6
  }
5
- export declare const COVERAGE_LAYERS_TO_SOURCES: Map<string, string>;
7
+ export interface CoverageContext {
8
+ subscribe(args: CoverageSubscriptionArgs): CoverageSubscription;
9
+ }
10
+ export declare const CoverageContext: Context<CoverageContext>;
6
11
  /**
7
12
  * The component of loading data on copyrights on the map and the zoom range for
8
13
  * the area where the center of the map is located
9
14
  */
10
15
  declare class MMapCoverage extends MMapComplexEntity<MMapCoverageProps, {}> {
11
16
  private _abortController?;
12
- private _prevMeta;
13
- private _unwatchMapContext?;
17
+ private _coverageArgs?;
18
+ private _subscriptions;
19
+ private readonly _queueRequest;
20
+ private readonly _queueRequestStamps;
21
+ private _stampsRequestsInterval?;
22
+ private _currentIntervalMs;
23
+ private _stampsAbortController?;
14
24
  constructor(props?: MMapCoverageProps);
25
+ subscribe(args: CoverageSubscriptionArgs): CoverageSubscription;
15
26
  protected _onAttach(): void;
16
27
  protected _onDetach(): void;
17
- private _compareIfMetaDiffers;
18
- private _attemptCoverageRequest;
28
+ protected _scheduleStampsRequests(): void;
29
+ private _onMapContextChange;
30
+ private _request;
31
+ _requestStamps(): void;
32
+ }
33
+ export interface CoverageSubscriptionArgs {
34
+ layer: string;
35
+ maptype: string | undefined;
36
+ versioned?: {
37
+ interval: number;
38
+ };
39
+ onUpdate: () => void;
40
+ }
41
+ export declare class CoverageSubscription {
42
+ private readonly _onDestroy;
43
+ readonly layer: string;
44
+ readonly maptype: string | undefined;
45
+ readonly onUpdate: () => void;
46
+ readonly versioned?: {
47
+ interval: number;
48
+ };
49
+ copyrights?: string[];
50
+ zoomRange?: ZoomRange;
51
+ version?: string;
52
+ constructor(args: CoverageSubscriptionArgs, _onDestroy: () => void);
53
+ destroy(): void;
19
54
  }
20
55
  export { MMapCoverage, MMapCoverageProps };
@@ -22,6 +22,18 @@ type MMapDefaultSchemeLayerProps = {
22
22
  source?: string;
23
23
  /** Layers parameters */
24
24
  layers?: Partial<Record<MMapDefaultSchemeLayerType, Partial<MMapLayerProps>>>;
25
+ /**
26
+ * Allow to clamp map zoom. If you want the layer to not lock zoom when it reaches
27
+ * its maximum value, you can set this field to false.
28
+ * This may be necessary, for example, when your own layers are working at scales greater than 21.
29
+ * ```js
30
+ * const defaultSchemeLayer = new MMapDefaultSchemeLayer({clampMapZoom: false});
31
+ * map.addChild(defaultSchemeLayer);
32
+ * ```
33
+ * See example https://mappable.world/docs/jsapi/examples/cases/over-zoom
34
+ * @default true
35
+ */
36
+ clampMapZoom?: boolean;
25
37
  };
26
38
  declare const defaultProps: {
27
39
  visible: boolean;
@@ -45,8 +57,17 @@ declare const defaultProps: {
45
57
  type: string;
46
58
  zIndex: number;
47
59
  }>;
60
+ clampMapZoom: boolean;
48
61
  };
49
62
  type DefaultProps = typeof defaultProps;
63
+ declare const MAP_TYPES: {
64
+ map: string;
65
+ admin: string;
66
+ driving: string;
67
+ transit: string;
68
+ "future-map": string;
69
+ "legacy-map": string;
70
+ };
50
71
  /**
51
72
  * Map default layer to show mappable-world scheme on map.
52
73
  *
@@ -82,15 +103,17 @@ declare class MMapDefaultSchemeLayer extends MMapComplexEntity<MMapDefaultScheme
82
103
  type: string;
83
104
  zIndex: number;
84
105
  }>;
106
+ clampMapZoom: boolean;
85
107
  };
86
108
  private _dataSource?;
87
109
  private _layers;
88
110
  private _unwatchMapContext?;
89
111
  private _unwatchThemeContext?;
112
+ private _coverageSubscription?;
90
113
  protected _onAttach(): void;
91
114
  protected _onDetach(): void;
92
115
  protected _onUpdate(propsDiff: Partial<MMapDefaultSchemeLayerProps>): void;
93
- private _getDataSourceDescription;
116
+ private _getTileDataSourceProps;
94
117
  private _updateTheme;
95
118
  }
96
- export { MMapDefaultSchemeLayer, MMapDefaultSchemeLayerProps };
119
+ export { MMapDefaultSchemeLayer, MMapDefaultSchemeLayerProps, MAP_TYPES };
@@ -58,15 +58,13 @@ declare class MMapFeature extends MMapEntity<MMapFeatureProps, DefaultProps> {
58
58
  get geometry(): GenericGeometry<LngLat>;
59
59
  protected _onAttach(): void;
60
60
  protected _onDetach(): void;
61
- protected _onUpdate({ id, source }: Partial<MMapFeatureProps>): void;
61
+ protected _onUpdate({ id, source, geometry }: Partial<MMapFeatureProps>): void;
62
62
  protected _getDefaultProps(): DefaultProps;
63
- private __onDragStart;
64
- private __onDragMove;
65
- private __onDragEnd;
66
- private __onClick;
67
- private __onDoubleClick;
68
- private __onFastClick;
69
- private __isMySomeObject;
70
- private __isMyDraggableObject;
63
+ private static _onDragStart;
64
+ private static _onDragMove;
65
+ private static _onDragEnd;
66
+ private static _onClick;
67
+ private static _onFastClick;
68
+ private static _onDoubleClick;
71
69
  }
72
70
  export { MMapFeature, MMapFeatureProps };
@@ -1,4 +1,4 @@
1
- import type { LineStringGeometry, Margin, MultiLineStringGeometry, MultiPolygonGeometry, PointGeometry, PolygonGeometry } from "../../common/types";
1
+ import type { LineStringGeometry, Margin, MultiLineStringGeometry, MultiPolygonGeometry, PointGeometry, PolygonGeometry, LngLat } from "../../common/types";
2
2
  export interface DraggableProps<Callback> {
3
3
  /** Feature can be draggable */
4
4
  draggable?: boolean;
@@ -32,13 +32,22 @@ export interface BlockingProps {
32
32
  */
33
33
  blockBehaviors?: boolean;
34
34
  }
35
+ export interface MapEvent {
36
+ /** [x, y] */
37
+ screenCoordinates: [
38
+ number,
39
+ number
40
+ ];
41
+ coordinates: LngLat;
42
+ stopPropagation: () => void;
43
+ }
35
44
  export interface FeatureClickEvents {
36
45
  /** Double click handler */
37
- onDoubleClick?: (event: MouseEvent) => void;
46
+ onDoubleClick?: (event: MouseEvent, mapEvent: MapEvent) => void;
38
47
  /** Click handler */
39
- onClick?: (event: MouseEvent) => void;
48
+ onClick?: (event: MouseEvent, mapEvent: MapEvent) => void;
40
49
  /** Fast click handler */
41
- onFastClick?: (event: MouseEvent) => void;
50
+ onFastClick?: (event: MouseEvent, mapEvent: MapEvent) => void;
42
51
  }
43
52
  export type Geometry = PolygonGeometry | MultiPolygonGeometry | LineStringGeometry | MultiLineStringGeometry | PointGeometry;
44
53
  export type MMapFeatureEventHandler = (coordinates: Geometry['coordinates']) => void | false;
@@ -15,6 +15,8 @@ export interface DomEvent {
15
15
  type HandlerEntity<TType extends string, TEntity> = {
16
16
  type: TType;
17
17
  entity: TEntity;
18
+ layer: string;
19
+ source: string;
18
20
  };
19
21
  export type DomEventHandlerObject = HandlerEntity<"feature", MMapFeature> | HandlerEntity<"marker", MMapMarker> | HandlerEntity<"hotspot", MMapHotspot> | undefined;
20
22
  interface TileLayerState {
@@ -105,7 +107,7 @@ type MMapListenerProps = DomEventsProps | NullablePartial<MapEvents> | NullableP
105
107
  *
106
108
  * map.addChild(mapListener);
107
109
  * ```
108
- * @see [More about events](https://mappable.world/docs/jsapi/dg/concepts/events.html)
110
+ * @see [More about events](https://mappable.world/docs/js-api/dg/concepts/events.html)
109
111
  */
110
112
  declare class MMapListener extends MMapEntity<MMapListenerProps> {
111
113
  private _domHandlers;
@@ -98,9 +98,9 @@ declare class MMapMarker extends MMapGroupEntity<MMapMarkerProps, DefaultProps>
98
98
  onDragMove?: MMapMarkerEventHandler | undefined;
99
99
  blockEvents?: boolean | undefined;
100
100
  blockBehaviors?: boolean | undefined;
101
- onDoubleClick?: ((event: MouseEvent) => void) | undefined;
102
- onClick?: ((event: MouseEvent) => void) | undefined;
103
- onFastClick?: ((event: MouseEvent) => void) | undefined;
101
+ onDoubleClick?: ((event: MouseEvent, mapEvent: import("../MMapFeature/types").MapEvent) => void) | undefined;
102
+ onClick?: ((event: MouseEvent, mapEvent: import("../MMapFeature/types").MapEvent) => void) | undefined;
103
+ onFastClick?: ((event: MouseEvent, mapEvent: import("../MMapFeature/types").MapEvent) => void) | undefined;
104
104
  markerElement?: HTMLElement | undefined;
105
105
  children?: import("react").ReactNode;
106
106
  ref?: import("react").Ref<import("../Entities").GenericEntity<{
@@ -144,10 +144,10 @@ declare class MMapMarker extends MMapGroupEntity<MMapMarkerProps, DefaultProps>
144
144
  }>>;
145
145
  readonly element: HTMLElement;
146
146
  private _destroyDomCtx?;
147
- constructor(props: MMapMarkerProps, element?: HTMLElement);
148
- private __feature;
147
+ private __feature?;
149
148
  get properties(): Record<string, unknown> | undefined;
150
149
  get coordinates(): LngLat;
150
+ constructor(props: MMapMarkerProps, element?: HTMLElement);
151
151
  _onAttach(): void;
152
152
  _onDetach(): void;
153
153
  protected _onUpdate({ coordinates, zIndex, ...props }: Partial<MMapMarkerProps>): void;
@@ -1,4 +1,4 @@
1
- import type { RasterTileDataSourceDescription, ZoomRange } from "../../common/types";
1
+ import type { RasterTileDataSourceDescription, VectorTileDataSourceDescription, ZoomRange } from "../../common/types";
2
2
  import { MMapEntity } from "../MMapEnities";
3
3
  /**
4
4
  * MMapTileDataSource props
@@ -50,7 +50,6 @@ type MMapTileDataSourceProps = {
50
50
  */
51
51
  declare class MMapTileDataSource extends MMapEntity<MMapTileDataSourceProps> {
52
52
  private _id;
53
- private _unwatchVectorContext?;
54
53
  protected _onAttach(): void;
55
54
  protected _onDetach(): void;
56
55
  protected _onUpdate(props: Partial<MMapTileDataSourceProps>): void;
@@ -0,0 +1,6 @@
1
+ import { Context } from "./Entities";
2
+ export type MMapType = string;
3
+ export type MMapTypeContext = {
4
+ type?: MMapType;
5
+ };
6
+ export declare const TypeContext: Context<MMapTypeContext>;
@@ -5,6 +5,8 @@ import { Config } from "./config";
5
5
  export type FetchConfigOptions = {
6
6
  /** Language */
7
7
  lang: string;
8
+ /** Data provider */
9
+ dataProvider?: string;
8
10
  /** Signal to abort request */
9
11
  signal?: AbortSignal;
10
12
  };
@@ -13,6 +15,6 @@ export type FetchConfigOptions = {
13
15
  *
14
16
  * @param {FetchConfigOptions} options Request options
15
17
  * @param {Config} config Current config
16
- * @returns {Promise<Config>} config for map construction
18
+ * @returns {Promise<Config>} Config for map construction
17
19
  */
18
20
  export declare function fetchConfig(options: FetchConfigOptions, config?: Config | undefined): Promise<Config>;
@@ -1,6 +1,8 @@
1
1
  import * as projections_ from "./utils/projections";
2
2
  export { MMap, MMapProps, MMapCenterLocation, MMapZoomLocation, MMapBoundsLocation, MMapCenterZoomLocation, MMapLocationRequest, MMapCameraRequest } from "./MMap";
3
3
  export { MMapThemeContext, ThemeContext, MMapTheme } from "./ThemeContext";
4
+ export { MMapTypeContext, TypeContext, MMapType } from "./TypeContext";
5
+ export { MMapContextProvider, MMapContextProviderProps } from "./MMapContextProvider";
4
6
  export { MMapCopyrightsPosition } from "./MMapCopyrights";
5
7
  export { MMapEntity, MMapComplexEntity, MMapGroupEntity, MMapContext } from "./MMapEnities";
6
8
  export { MMapDefaultFeaturesLayer, MMapDefaultFeaturesLayerProps } from "./MMapDefaultFeaturesLayer";
@@ -3,7 +3,12 @@ import { Config } from "../config";
3
3
  export type SearchType = "businesses" | "toponyms";
4
4
  export type SearchOptions = {
5
5
  /** Request string represented by a text or {@link LngLat LngLat} point. */
6
- text: string;
6
+ text?: string;
7
+ /**
8
+ * Additional information about the object.
9
+ * The parameter value is returned in the Geosuggest response.
10
+ * To use it in a request, specify a value instead of text. */
11
+ uri?: string;
7
12
  /**
8
13
  * {@link type `type`} parameter specifies the type of
9
14
  * objects that are being searched (and the order of objects
@@ -5,5 +5,5 @@ type JsonpRequest = {
5
5
  };
6
6
  declare function boolToFlag(value: undefined | boolean): undefined | BooleanFlag;
7
7
  declare function composeUrl(baseUrl: string, params: Record<string, string | number | undefined>): string;
8
- declare function jsonp<JsonpResponse>({ url, callbackName }: JsonpRequest): Promise<JsonpResponse>;
8
+ declare function jsonp<JsonpResponse>({ url, callbackName }: JsonpRequest, signal?: AbortSignal): Promise<JsonpResponse>;
9
9
  export { jsonp, composeUrl, boolToFlag };
File without changes
@@ -4,7 +4,22 @@ export type LayerInfo = {
4
4
  zoomRange?: ZoomRange;
5
5
  copyrights?: string[];
6
6
  LayerMetaData?: unknown[];
7
+ version?: string;
7
8
  };
8
- export type Coverage = LayerInfo[];
9
- declare function requestCoverage(host: string, layers: string[], coordinates: ReadonlyLngLat, zoom: number, lang: string, signal?: AbortSignal): Promise<Coverage>;
10
- export { requestCoverage };
9
+ export type Coverage = Map<string, LayerInfo>;
10
+ export interface CoverageArgs {
11
+ host: string;
12
+ layers: string[];
13
+ coordinates: ReadonlyLngLat;
14
+ zoom: number;
15
+ lang: string;
16
+ maptype?: string | undefined;
17
+ }
18
+ declare function requestCoverage(args: CoverageArgs, signal?: AbortSignal): Promise<Coverage>;
19
+ interface RequestStampsArgs {
20
+ host: string;
21
+ layers: string[];
22
+ lang: string;
23
+ }
24
+ declare function requestStamps(args: RequestStampsArgs, signal?: AbortSignal): Promise<Coverage>;
25
+ export { requestCoverage, requestStamps };
@@ -0,0 +1 @@
1
+ import type { LngLat } from "../../common/types";
@@ -0,0 +1,50 @@
1
+ import { optionsKeyVuefy, MMapComplexEntity, MMapLayerProps } from "../../imperative";
2
+ import type { CustomVuefyOptions } from "../vuefy";
3
+ type MMapCarparksLayerType = "ground" | "icons";
4
+ type MMapCarparksLayerProps = {
5
+ /** Should show layer. Default is true */
6
+ visible?: boolean;
7
+ /** Name for source */
8
+ source?: string;
9
+ /** Layers parameters */
10
+ layers?: Partial<Record<MMapCarparksLayerType, Partial<MMapLayerProps>>>;
11
+ };
12
+ declare const defaultProps: {
13
+ visible: boolean;
14
+ source: string;
15
+ updateTime: number;
16
+ layers: {
17
+ ground: {
18
+ zIndex: number;
19
+ };
20
+ icons: {
21
+ zIndex: number;
22
+ };
23
+ };
24
+ };
25
+ type DefaultProps = typeof defaultProps;
26
+ declare class MMapCarparksLayer extends MMapComplexEntity<MMapCarparksLayerProps, DefaultProps> {
27
+ static defaultProps: {
28
+ visible: boolean;
29
+ source: string;
30
+ updateTime: number;
31
+ layers: {
32
+ ground: {
33
+ zIndex: number;
34
+ };
35
+ icons: {
36
+ zIndex: number;
37
+ };
38
+ };
39
+ };
40
+ static [optionsKeyVuefy]: CustomVuefyOptions<MMapCarparksLayer>;
41
+ private _coverageSubscription?;
42
+ private _unwatchThemeContext?;
43
+ private _dataSource?;
44
+ private _layers;
45
+ protected _onAttach(): void;
46
+ private _getTileDataSourceProps;
47
+ protected _onUpdate(): void;
48
+ protected _onDetach(): void;
49
+ }
50
+ export { MMapCarparksLayer, MMapCarparksLayerProps };
@@ -0,0 +1,52 @@
1
+ import type { CustomVuefyOptions } from "../vuefy";
2
+ import { optionsKeyVuefy } from "../../imperative/wrappers";
3
+ import { MMapComplexEntity } from "../../imperative/MMapEnities";
4
+ import { MMapLayerProps } from "../../imperative/MMapLayer";
5
+ type MMapPanoramaLayerType = "ground" | "icons";
6
+ type MMapPanoramaLayerProps = {
7
+ /** Should show layer. Default is true */
8
+ visible?: boolean;
9
+ /** Name for source */
10
+ source?: string;
11
+ /** Layers parameters */
12
+ layers?: Partial<Record<MMapPanoramaLayerType, Partial<MMapLayerProps>>>;
13
+ };
14
+ declare const defaultProps: {
15
+ visible: boolean;
16
+ source: string;
17
+ layers: {
18
+ ground: {
19
+ zIndex: number;
20
+ };
21
+ icons: {
22
+ zIndex: number;
23
+ };
24
+ };
25
+ updateTime: number;
26
+ };
27
+ type DefaultProps = typeof defaultProps;
28
+ declare class MMapPanoramaLayer extends MMapComplexEntity<MMapPanoramaLayerProps, DefaultProps> {
29
+ static defaultProps: {
30
+ visible: boolean;
31
+ source: string;
32
+ layers: {
33
+ ground: {
34
+ zIndex: number;
35
+ };
36
+ icons: {
37
+ zIndex: number;
38
+ };
39
+ };
40
+ updateTime: number;
41
+ };
42
+ private _dataSource?;
43
+ private _layers;
44
+ private _coverageSubscription?;
45
+ private _unwatchThemeContext?;
46
+ static [optionsKeyVuefy]: CustomVuefyOptions<MMapPanoramaLayer>;
47
+ protected _onAttach(): void;
48
+ private _getTileDataSourceProps;
49
+ protected _onDetach(): void;
50
+ protected _onUpdate(): void;
51
+ }
52
+ export { MMapPanoramaLayer, MMapPanoramaLayerProps };
@@ -0,0 +1,58 @@
1
+ import { MMapComplexEntity } from "../../imperative/MMapEnities";
2
+ import { MMapLayerProps } from "../../imperative/MMapLayer";
3
+ import type { CustomVuefyOptions } from "../vuefy";
4
+ import { optionsKeyVuefy } from "../../imperative/wrappers";
5
+ type MMapTrafficEventsLayerType = "ground" | "icons" | "labels";
6
+ type MMapTrafficEventsLayerProps = {
7
+ /** Should show layer. Default is true */
8
+ visible?: boolean;
9
+ /** Name for source */
10
+ source?: string;
11
+ /** Layers parameters */
12
+ layers?: Partial<Record<MMapTrafficEventsLayerType, Partial<MMapLayerProps>>>;
13
+ };
14
+ declare const defaultProps: {
15
+ visible: boolean;
16
+ source: string;
17
+ updateTime: number;
18
+ layers: {
19
+ ground: {
20
+ zIndex: number;
21
+ };
22
+ icons: {
23
+ zIndex: number;
24
+ };
25
+ labels: {
26
+ zIndex: number;
27
+ };
28
+ };
29
+ };
30
+ type DefaultProps = typeof defaultProps;
31
+ declare class MMapTrafficEventsLayer extends MMapComplexEntity<MMapTrafficEventsLayerProps, DefaultProps> {
32
+ static defaultProps: {
33
+ visible: boolean;
34
+ source: string;
35
+ updateTime: number;
36
+ layers: {
37
+ ground: {
38
+ zIndex: number;
39
+ };
40
+ icons: {
41
+ zIndex: number;
42
+ };
43
+ labels: {
44
+ zIndex: number;
45
+ };
46
+ };
47
+ };
48
+ private _dataSource?;
49
+ private _layers;
50
+ private _coverageSubscription?;
51
+ private _unwatchThemeContext?;
52
+ static [optionsKeyVuefy]: CustomVuefyOptions<MMapTrafficEventsLayer>;
53
+ protected _onAttach(): void;
54
+ private _getTileDataSourceProps;
55
+ protected _onUpdate(): void;
56
+ protected _onDetach(): void;
57
+ }
58
+ export { MMapTrafficEventsLayer, MMapTrafficEventsLayerProps };
@@ -0,0 +1,36 @@
1
+ import { MMapComplexEntity } from "../../imperative/MMapEnities";
2
+ import type { CustomVuefyOptions } from "../vuefy";
3
+ import { optionsKeyVuefy } from "../../imperative/wrappers";
4
+ type MMapTrafficLayerProps = {
5
+ /** Should show layer. Default is true */
6
+ visible?: boolean;
7
+ /** Layer z-index */
8
+ zIndex?: number;
9
+ /** Name for source */
10
+ source?: string;
11
+ };
12
+ declare const defaultProps: Readonly<{
13
+ visible: true;
14
+ source: "mappable-traffic-layer";
15
+ zIndex: 1000;
16
+ updateTime: number;
17
+ }>;
18
+ type DefaultProps = typeof defaultProps;
19
+ declare class MMapTrafficLayer extends MMapComplexEntity<MMapTrafficLayerProps, DefaultProps> {
20
+ static defaultProps: Readonly<{
21
+ visible: true;
22
+ source: "mappable-traffic-layer";
23
+ zIndex: 1000;
24
+ updateTime: number;
25
+ }>;
26
+ private _dataSource?;
27
+ private _layer?;
28
+ private _coverageSubscription?;
29
+ private _unwatchThemeContext?;
30
+ static [optionsKeyVuefy]: CustomVuefyOptions<MMapTrafficLayer>;
31
+ protected _onAttach(): void;
32
+ private _getTileDataSourceProps;
33
+ protected _onUpdate(props: Partial<MMapTrafficLayerProps>): void;
34
+ protected _onDetach(): void;
35
+ }
36
+ export { MMapTrafficLayer, MMapTrafficLayerProps };
@@ -0,0 +1,4 @@
1
+ export * from "./MMapTrafficLayer";
2
+ export * from "./MMapTrafficEventsLayer";
3
+ export * from "./MMapCarparksLayer";
4
+ export * from "./MMapPanoramaLayer";
@@ -0,0 +1 @@
1
+ export declare function transformUrlTemplate(urlTemplate: string, locale: string, version?: string): string;
@@ -0,0 +1,10 @@
1
+ import { MMapComplexEntity } from "../../imperative/MMapEnities";
2
+ type EventBlockerLayerProps = {
3
+ zIndex: number;
4
+ };
5
+ declare class EventBlockerLayer extends MMapComplexEntity<EventBlockerLayerProps> {
6
+ private _layer;
7
+ constructor(props: EventBlockerLayerProps);
8
+ protected _onUpdate(props: Partial<EventBlockerLayerProps>): void;
9
+ }
10
+ export { EventBlockerLayer, EventBlockerLayerProps };
@@ -0,0 +1,66 @@
1
+ import { MMapComplexEntity, MMapEntity } from "../../imperative";
2
+ import { optionsKeyVuefy, overrideKeyReactify, overrideKeyVuefy } from "../../imperative/wrappers";
3
+ import { RenderPointCommonArgs, MMapRulerCommon, MMapRulerCommonProps } from "./MMapRulerCommon";
4
+ export type MMapRulerProps = Omit<MMapRulerCommonProps, "point"> & {
5
+ point: (params: RenderPointArgs) => MMapEntity<RenderPointArgs>;
6
+ };
7
+ export type RenderPointArgs = RenderPointCommonArgs;
8
+ declare const defaultProps: Readonly<{}>;
9
+ export declare class MMapRuler extends MMapComplexEntity<MMapRulerProps, typeof defaultProps> {
10
+ static defaultProps: Readonly<{}>;
11
+ static [optionsKeyVuefy]: import("../vuefy").CustomVuefyOptions<MMapRulerCommon, {
12
+ type: import("./MMapRulerCommon").RulerType;
13
+ source?: string | undefined;
14
+ geometry: import("./MMapRulerCommon").RulerGeometry;
15
+ zIndex?: number | undefined;
16
+ onUpdate?: import("./MMapRulerCommon").UpdateCommonFn | undefined;
17
+ points: import("../../common/types/lng-lat").LngLat[];
18
+ editable?: boolean | undefined;
19
+ onUpdateStart?: import("./MMapRulerCommon").UpdateStartFn | undefined;
20
+ onUpdateEnd?: import("./MMapRulerCommon").UpdateEndFn | undefined;
21
+ }>;
22
+ static [overrideKeyReactify]: import("../../reactify/reactify").CustomReactify<MMapRulerCommon, import("react").ForwardRefExoticComponent<{
23
+ type: import("./MMapRulerCommon").RulerType;
24
+ source?: string | undefined;
25
+ geometry: import("./MMapRulerCommon").RulerGeometry;
26
+ zIndex?: number | undefined;
27
+ onUpdate?: import("./MMapRulerCommon").UpdateCommonFn | undefined;
28
+ points: import("../../common/types/lng-lat").LngLat[];
29
+ editable?: boolean | undefined;
30
+ onUpdateStart?: import("./MMapRulerCommon").UpdateStartFn | undefined;
31
+ onUpdateEnd?: import("./MMapRulerCommon").UpdateEndFn | undefined;
32
+ point: (params: RenderPointCommonArgs) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
33
+ previewPoint: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
34
+ ref?: import("react").Ref<MMapEntity<{
35
+ type: import("./MMapRulerCommon").RulerType;
36
+ source?: string | undefined;
37
+ geometry: import("./MMapRulerCommon").RulerGeometry;
38
+ zIndex?: number | undefined;
39
+ onUpdate?: import("./MMapRulerCommon").UpdateCommonFn | undefined;
40
+ points: import("../../common/types/lng-lat").LngLat[];
41
+ editable?: boolean | undefined;
42
+ onUpdateStart?: import("./MMapRulerCommon").UpdateStartFn | undefined;
43
+ onUpdateEnd?: import("./MMapRulerCommon").UpdateEndFn | undefined;
44
+ point: (params: RenderPointCommonArgs) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
45
+ previewPoint: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
46
+ }, {}>> | undefined;
47
+ key?: import("react").Key | null | undefined;
48
+ }>>;
49
+ static [overrideKeyVuefy]: import("../vuefy").CustomVuefyFn<MMapRulerCommon, {
50
+ type: import("./MMapRulerCommon").RulerType;
51
+ source?: string | undefined;
52
+ geometry: import("./MMapRulerCommon").RulerGeometry;
53
+ zIndex?: number | undefined;
54
+ onUpdate?: import("./MMapRulerCommon").UpdateCommonFn | undefined;
55
+ points: import("../../common/types/lng-lat").LngLat[];
56
+ editable?: boolean | undefined;
57
+ onUpdateStart?: import("./MMapRulerCommon").UpdateStartFn | undefined;
58
+ onUpdateEnd?: import("./MMapRulerCommon").UpdateEndFn | undefined;
59
+ }>;
60
+ private _rulerCommon;
61
+ private _previewPointWrapper;
62
+ constructor(props: MMapRulerProps);
63
+ protected _onUpdate(): void;
64
+ private _renderPoints;
65
+ }
66
+ export {};
@@ -0,0 +1,102 @@
1
+ import { DrawingStyle, LngLat, MMapComplexEntity, MMapMarkerEventHandler } from "../../imperative";
2
+ export declare const TYPE_RULER = "ruler";
3
+ export declare const TYPE_PLANIMETER = "planimeter";
4
+ export type RulerType = typeof TYPE_RULER | typeof TYPE_PLANIMETER;
5
+ export type Measurements = RulerMeasurements | PlanimeterMeasurements;
6
+ export type RulerMeasurements = {
7
+ type: typeof TYPE_RULER;
8
+ /** the distance in meters from the first point of the line */
9
+ distance: number;
10
+ /** the distance in meters from the previous point of the line */
11
+ segmentDistance: number;
12
+ /** the total distance of the line in meters */
13
+ totalDistance: number;
14
+ };
15
+ export type PlanimeterMeasurements = {
16
+ type: typeof TYPE_PLANIMETER;
17
+ /** the area of the closed line shape in square meters */
18
+ area: number;
19
+ };
20
+ export type CommonMeasurements = Omit<RulerMeasurements, "distance" | "segmentDistance"> | PlanimeterMeasurements;
21
+ export type RulerPointState = {
22
+ index: number;
23
+ totalCount: number;
24
+ coordinates: LngLat;
25
+ measurements: Measurements;
26
+ editable: boolean;
27
+ source: string;
28
+ };
29
+ export type RulerCommonState = {
30
+ measurements: CommonMeasurements;
31
+ points: LngLat[];
32
+ };
33
+ export type RenderPointCommon = (params: RenderPointCommonArgs) => RenderPointCommonResult;
34
+ export type RenderPointCommonArgs = {
35
+ state: RulerPointState;
36
+ onDragMove: MMapMarkerEventHandler;
37
+ onDragStart: MMapMarkerEventHandler;
38
+ onDragEnd: MMapMarkerEventHandler;
39
+ onDelete: () => void;
40
+ };
41
+ export type RenderPointCommonResult = {
42
+ update: (state: RulerPointState) => void;
43
+ remove: (index: number) => void;
44
+ };
45
+ export type UpdateCommonFn = (commonState: RulerCommonState) => void;
46
+ export type UpdateStartFn = (commonState: {}) => void;
47
+ export type UpdateEndFn = (commonState: {}) => void;
48
+ export type RulerGeometry = {
49
+ style: DrawingStyle;
50
+ };
51
+ export type MMapRulerCommonProps = {
52
+ type: RulerType;
53
+ points: LngLat[];
54
+ editable?: boolean;
55
+ geometry: RulerGeometry;
56
+ source?: string;
57
+ zIndex?: number;
58
+ previewPoint: HTMLElement;
59
+ point: RenderPointCommon;
60
+ onUpdate?: UpdateCommonFn;
61
+ onUpdateStart?: UpdateStartFn;
62
+ onUpdateEnd?: UpdateEndFn;
63
+ };
64
+ export declare const defaultProps: Readonly<{
65
+ editable: true;
66
+ zIndex: 2600;
67
+ source: "mappable-ruler";
68
+ }>;
69
+ export declare class MMapRulerCommon extends MMapComplexEntity<MMapRulerCommonProps, typeof defaultProps> {
70
+ static defaultProps: Readonly<{
71
+ editable: true;
72
+ zIndex: 2600;
73
+ source: "mappable-ruler";
74
+ }>;
75
+ private _lineFeature;
76
+ private _polygonFeature;
77
+ private _listener;
78
+ private _previewPointMarker?;
79
+ private _dataSource;
80
+ private _markersLayer;
81
+ private _featuresLayer;
82
+ private _blockerLayer;
83
+ private _rulerPoints;
84
+ private _measurements;
85
+ private _totalDistance;
86
+ private _area;
87
+ constructor(props: MMapRulerCommonProps);
88
+ protected _onAttach(): void;
89
+ protected _onDetach(): void;
90
+ protected _onUpdate(props: Partial<MMapRulerCommonProps>): void;
91
+ private _commonUpdate;
92
+ private _updateRulerCoordinates;
93
+ private _updateRulerGeometry;
94
+ private _onMouseMoveHandler;
95
+ private _onMouseMoveOnPreviewMarker;
96
+ private _onClickHandler;
97
+ private _createPreviewPointMarker;
98
+ private _updateMeasurements;
99
+ private _getFeaturesCoordinates;
100
+ private _createNewRulerPoint;
101
+ private _removeRulerPoint;
102
+ }
@@ -0,0 +1,2 @@
1
+ export { MMapRuler, MMapRulerProps, RenderPointArgs } from "./MMapRuler";
2
+ export { RulerGeometry, RulerType, RulerPointState, RulerCommonState, Measurements } from "./MMapRulerCommon";
@@ -0,0 +1,11 @@
1
+ import type TReact from "react";
2
+ import type { MMapEntity } from "../../../imperative";
3
+ import type { CustomReactify, OverrideProps, Prettify } from "../../../reactify/reactify";
4
+ import { RenderPointCommonArgs, MMapRulerCommonProps, MMapRulerCommon as MMapRulerI } from "../MMapRulerCommon";
5
+ type MMapRulerReactifiedProps = Prettify<OverrideProps<MMapRulerCommonProps, {
6
+ point: (params: RenderPointCommonArgs) => TReact.ReactElement;
7
+ previewPoint: TReact.ReactElement;
8
+ }>>;
9
+ type MMapRulerR = TReact.ForwardRefExoticComponent<Prettify<MMapRulerReactifiedProps & React.RefAttributes<MMapEntity<MMapRulerReactifiedProps>>>>;
10
+ export declare const MMapRulerReactifyOverride: CustomReactify<MMapRulerI, MMapRulerR>;
11
+ export {};
@@ -0,0 +1,54 @@
1
+ import type { LngLat } from "../../imperative";
2
+ import { RulerMeasurements, RulerType } from "./MMapRulerCommon";
3
+ /**
4
+ * Creates a geodesic line at several points
5
+ * @param points - Points where the geodesic line is created
6
+ * @param type - If the type is a `ruler`, then the line is not closed. If the type is a `planimeter`, then it creates a closed line
7
+ * @param projectionType – Map projection type
8
+ * @returns Geodesic line coordinates
9
+ */
10
+ export declare function createGeodesicGeometry(points: LngLat[], type: RulerType): LngLat[];
11
+ /**
12
+ * Returns a great circle segment between two coordinates
13
+ * @param firstCoordinates - First coordinate
14
+ * @param secondCoordinates - Second coordinate
15
+ * @param npoints - Number of points on the great circle segment
16
+ * @returns Great circle segment
17
+ */
18
+ export declare function getGreatCircleSegment(firstCoordinates: LngLat, secondCoordinates: LngLat, npoints?: number): LngLat[];
19
+ /**
20
+ * Calculates the area of a geodesic figure in square metres.
21
+ * @param coordinates - Geodesic geometry coordinates
22
+ * @returns Area in square metres
23
+ */
24
+ export declare function calcArea(coordinates: LngLat[]): number;
25
+ type DistanceMeasurements = Omit<RulerMeasurements, "type" | "totalDistance">;
26
+ /**
27
+ * Calculates measurements for each point of the line
28
+ * @param points - Coordinates of the points on the line
29
+ * @param projectionType – Map projection type
30
+ * @returns Array of measurements for each point of the line
31
+ */
32
+ export declare function calcDistance(points: LngLat[]): DistanceMeasurements[];
33
+ /**
34
+ * Fixes the line display when crossing the border of the "world".
35
+ * To do this, it transfers values outside the range (-180, 180) to another "world".
36
+ * @param lineStringCoordinates - Coordinates of the points on the line
37
+ * @returns Array of fixed coordinates
38
+ */
39
+ export declare function unfoldLineStringByShorterDistances(lineStringCoordinates: LngLat[]): LngLat[];
40
+ export declare function getNearestPointOnLine(lineCoordinates: LngLat[], point: LngLat): {
41
+ index: number;
42
+ coordinates: LngLat;
43
+ };
44
+ /**
45
+ * Finds the index of the segment at points, by the index of the segment in the geometry
46
+ * @param geometry - Geometry coordinates
47
+ * @param points - Points that lie on the geometry
48
+ * @param geometrySegmentIndex - Index of segment in geometry
49
+ * @returns The segment index found in points
50
+ */
51
+ export declare function findIndexInGeometry(geometry: LngLat[], points: LngLat[], geometrySegmentIndex: number): number;
52
+ export declare function areLngLatFuzzyEqual(a: LngLat, b: LngLat, tolerance?: number): boolean;
53
+ export declare function areLngLatEqual(a: LngLat, b: LngLat): boolean;
54
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { CustomVuefyFn, CustomVuefyOptions } from "../../vuefy";
2
+ import { MMapRulerCommonProps, MMapRulerCommon as MMapRulerI } from "../MMapRulerCommon";
3
+ type MMapRulerVuefyProps = Omit<MMapRulerCommonProps, "point" | "previewPoint">;
4
+ export declare const MMapRulerVuefyOptions: CustomVuefyOptions<MMapRulerI, MMapRulerVuefyProps>;
5
+ export declare const MMapRulerVuefyOverride: CustomVuefyFn<MMapRulerI, MMapRulerVuefyProps>;
6
+ export {};
@@ -1,6 +1,7 @@
1
1
  import "../import";
2
2
  declare module "../import" {
3
3
  interface Import {
4
+ (pkg: "@mappable-world/mappable-ruler"): Promise<typeof import("./ruler")>;
4
5
  (pkg: "@mappable-world/mappable-controls-extra"): Promise<typeof import("./controls-extra")>;
5
6
  (pkg: "@mappable-world/mappable-reactify"): Promise<typeof import("../reactify")>;
6
7
  (pkg: "@mappable-world/mappable-vuefy"): Promise<typeof import("./vuefy")>;
@@ -1,5 +1,5 @@
1
1
  import type { CustomVuefyOptions } from "..";
2
- import { MMap, MMapContainer, MMapControlButton, MMapControls, MMapDefaultFeaturesLayer, MMapDefaultSchemeLayer, MMapFeature, MMapFeatureDataSource, MMapLayer, MMapMarker, MMapTileDataSource } from "../../../imperative";
2
+ import { MMap, MMapContainer, MMapControlButton, MMapControls, MMapDefaultFeaturesLayer, MMapDefaultSchemeLayer, MMapFeature, MMapFeatureDataSource, MMapLayer, MMapMarker, MMapTileDataSource, MMapContextProvider } from "../../../imperative";
3
3
  import { type EntityConstructor, type GenericEntity } from "../../../imperative/Entities";
4
4
  import type { ComputedMMapMarkerContainerProps } from "../overrides/MMapMarker";
5
5
  export declare const MMapVuefyOptions: CustomVuefyOptions<MMap>;
@@ -13,5 +13,6 @@ export declare const MMapLayerVuefyOptions: CustomVuefyOptions<MMapLayer>;
13
13
  export declare const MMapMarkerVuefyOptions: CustomVuefyOptions<MMapMarker, ComputedMMapMarkerContainerProps>;
14
14
  export declare const MMapTileDataSourceVuefyOptions: CustomVuefyOptions<MMapTileDataSource>;
15
15
  export declare const MMapContainerVuefyOptions: CustomVuefyOptions<MMapContainer>;
16
+ export declare const MMapContextProviderVuefyOptions: CustomVuefyOptions<MMapContextProvider<unknown>>;
16
17
  declare const _default: Map<EntityConstructor<GenericEntity<unknown, {}, import("../../../imperative/Entities").GenericRootEntity<unknown, {}>>>, CustomVuefyOptions<GenericEntity<unknown, {}, import("../../../imperative/Entities").GenericRootEntity<unknown, {}>>>>;
17
18
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappable-world/mappable-types",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "Types for mappable maps library",
5
5
  "main": "",
6
6
  "types": "index.d.ts",
@@ -58,16 +58,16 @@ declare class MMapClusterer extends mappable.MMapComplexEntity<MMapClustererProp
58
58
  static [mappable.overrideKeyReactify]: import("../../../reactify/reactify").CustomReactify<MMapClusterer, import("react").ForwardRefExoticComponent<{
59
59
  features: Feature[];
60
60
  maxZoom?: number | undefined;
61
- tickTimeout?: number | undefined;
62
61
  method: IClusterMethod;
62
+ tickTimeout?: number | undefined;
63
63
  onRender?: ((clusters: ClustererObject[]) => false | void) | undefined;
64
64
  marker: (feature: Feature) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
65
65
  cluster: (coordinates: LngLat, features: Feature[]) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
66
66
  ref?: import("react").Ref<MMapEntity<{
67
67
  features: Feature[];
68
68
  maxZoom?: number | undefined;
69
- tickTimeout?: number | undefined;
70
69
  method: IClusterMethod;
70
+ tickTimeout?: number | undefined;
71
71
  onRender?: ((clusters: ClustererObject[]) => false | void) | undefined;
72
72
  marker: (feature: Feature) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
73
73
  cluster: (coordinates: LngLat, features: Feature[]) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -1,9 +1,9 @@
1
1
  import type { LngLat } from "../../../common/types";
2
2
  import type { MMapMarkerProps } from "../../../imperative/MMapMarker";
3
3
  type DefaultMarkerCustomProps = {
4
- /** Marker title */
4
+ /** Marker title HTML */
5
5
  title?: string;
6
- /** Marker subtitle */
6
+ /** Marker subtitle HTML */
7
7
  subtitle?: string;
8
8
  /** Marker icon color */
9
9
  color?: string;
@@ -62,9 +62,9 @@ declare class MMapDefaultMarker extends mappable.MMapComplexEntity<MMapDefaultMa
62
62
  onDragMove?: import("../../../imperative/MMapMarker").MMapMarkerEventHandler | undefined;
63
63
  blockEvents?: boolean | undefined;
64
64
  blockBehaviors?: boolean | undefined;
65
- onDoubleClick?: ((event: MouseEvent) => void) | undefined;
66
- onClick?: ((event: MouseEvent) => void) | undefined;
67
- onFastClick?: ((event: MouseEvent) => void) | undefined;
65
+ onDoubleClick?: ((event: MouseEvent, mapEvent: import("../../../imperative/MMapFeature/types").MapEvent) => void) | undefined;
66
+ onClick?: ((event: MouseEvent, mapEvent: import("../../../imperative/MMapFeature/types").MapEvent) => void) | undefined;
67
+ onFastClick?: ((event: MouseEvent, mapEvent: import("../../../imperative/MMapFeature/types").MapEvent) => void) | undefined;
68
68
  title?: string | undefined;
69
69
  subtitle?: string | undefined;
70
70
  color?: string | undefined;
@@ -14,6 +14,7 @@ export declare let ReactParent: React.Context<[
14
14
  export type Reactify = {
15
15
  module: ReactifyModule;
16
16
  entity: ReactifyEntity;
17
+ useDefault: <T>(value: T, dependencies?: unknown[]) => T;
17
18
  };
18
19
  export type CustomReactify<TEntity extends GenericEntity<unknown>, TResult> = (ctor: EntityConstructor<TEntity>, params: {
19
20
  reactify: {