@mappable-world/mappable-types 0.0.20 → 0.0.22
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/common/types/bounds.d.ts +2 -2
- package/common/types/data-source-description.d.ts +8 -0
- package/common/types/layer-implementation.d.ts +6 -2
- package/imperative/DomContext.d.ts +2 -2
- package/imperative/Entities.d.ts +1 -0
- package/imperative/MMap/index.d.ts +78 -8
- package/imperative/MMap/projection.d.ts +1 -1
- package/imperative/MMapCollection/index.d.ts +18 -0
- package/imperative/MMapContainer/index.d.ts +14 -0
- package/imperative/MMapContextProvider/index.d.ts +50 -0
- package/imperative/MMapControl/MMapControl.d.ts +2 -1
- package/imperative/MMapControl/MMapControlButton.d.ts +26 -3
- package/imperative/MMapControls/index.d.ts +1 -1
- package/imperative/MMapCopyrights/index.d.ts +15 -16
- package/imperative/MMapDefaultSchemeLayer/index.d.ts +33 -2
- package/imperative/MMapEnities.d.ts +48 -1
- package/imperative/MMapFeature/index.d.ts +23 -11
- package/imperative/MMapFeature/types.d.ts +28 -4
- package/imperative/MMapHotspot/index.d.ts +14 -0
- package/imperative/MMapListener/index.d.ts +3 -1
- package/imperative/MMapMarker/index.d.ts +5 -5
- package/imperative/MMapReactContainer/index.d.ts +12 -3
- package/imperative/MMapScaleControl/index.d.ts +22 -0
- package/imperative/MMapTileDataSource/index.d.ts +2 -3
- package/imperative/ThemeContext.d.ts +7 -1
- package/imperative/TypeContext.d.ts +9 -0
- package/imperative/config.d.ts +25 -0
- package/imperative/fetchConfig.d.ts +3 -1
- package/imperative/index.d.ts +3 -1
- package/imperative/{utils/projections → projections}/web-mercator.d.ts +5 -7
- package/modules/layers-extra/MMapCarparksLayer.d.ts +50 -0
- package/modules/layers-extra/MMapPanoramaLayer.d.ts +52 -0
- package/modules/layers-extra/MMapTrafficEventsLayer.d.ts +58 -0
- package/modules/layers-extra/MMapTrafficLayer.d.ts +36 -0
- package/modules/layers-extra/index.d.ts +4 -0
- package/modules/layers-extra/utils.d.ts +1 -0
- package/modules/ruler/EventsBlockerLayer.d.ts +10 -0
- package/modules/ruler/MMapRuler.d.ts +66 -0
- package/modules/ruler/MMapRulerCommon.d.ts +102 -0
- package/modules/ruler/index.d.ts +2 -0
- package/modules/ruler/react/MMapRuler.d.ts +11 -0
- package/modules/ruler/utils.d.ts +54 -0
- package/modules/ruler/vue/MMapRuler.d.ts +6 -0
- package/modules/types.d.ts +1 -0
- package/modules/vuefy/options/common.d.ts +2 -1
- package/package.json +1 -1
- package/packages/clusterer/MMapClusterer/MMapClusterer.d.ts +2 -2
- package/packages/hint/MMapHint/index.d.ts +1 -1
- package/packages/markers/MMapDefaultMarker/index.d.ts +5 -5
- package/reactify/reactify.d.ts +1 -0
- package/imperative/MMapCoverage/index.d.ts +0 -20
- package/imperative/utils/allowed-custom-layer-implementations.d.ts +0 -1
- package/imperative/utils/deepFreeze.d.ts +0 -2
- package/imperative/utils/errorLogger.d.ts +0 -29
- package/imperative/utils/id.d.ts +0 -2
- package/imperative/utils/index.d.ts +0 -3
- package/imperative/utils/jsonp.d.ts +0 -9
- package/imperative/utils/metrics.d.ts +0 -12
- package/imperative/utils/pEachChunk.d.ts +0 -2
- package/imperative/utils/removeUndefined.d.ts +0 -1
- package/imperative/utils/requestCoverage.d.ts +0 -10
- /package/imperative/{utils/projections → projections}/index.d.ts +0 -0
|
@@ -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,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 {};
|
package/modules/types.d.ts
CHANGED
|
@@ -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
|
@@ -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>>;
|
|
@@ -6,7 +6,7 @@ import { optionsKeyVuefy, overrideKeyReactify, overrideKeyVuefy } from "../../..
|
|
|
6
6
|
type MMapHintProps = {
|
|
7
7
|
hint: (object: MMapFeature | MMapMarker | MMapHotspot | undefined) => unknown;
|
|
8
8
|
};
|
|
9
|
-
declare const MMapHintContext: import("../../../imperative/
|
|
9
|
+
declare const MMapHintContext: import("../../../imperative/MMapEnities").MMapContext<unknown>;
|
|
10
10
|
/**
|
|
11
11
|
* Display hint on map elements.
|
|
12
12
|
*
|
|
@@ -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;
|
package/reactify/reactify.d.ts
CHANGED
|
@@ -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: {
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { MMapComplexEntity } from "../MMapEnities";
|
|
2
|
-
interface MMapCoverageProps {
|
|
3
|
-
onError?: (e: Error) => void;
|
|
4
|
-
}
|
|
5
|
-
export declare const COVERAGE_LAYERS_TO_SOURCES: Map<string, string>;
|
|
6
|
-
/**
|
|
7
|
-
* The component of loading data on copyrights on the map and the zoom range for
|
|
8
|
-
* the area where the center of the map is located
|
|
9
|
-
*/
|
|
10
|
-
declare class MMapCoverage extends MMapComplexEntity<MMapCoverageProps, {}> {
|
|
11
|
-
private _abortController?;
|
|
12
|
-
private _prevMeta;
|
|
13
|
-
private _unwatchMapContext?;
|
|
14
|
-
constructor(props?: MMapCoverageProps);
|
|
15
|
-
protected _onAttach(): void;
|
|
16
|
-
protected _onDetach(): void;
|
|
17
|
-
private _compareIfMetaDiffers;
|
|
18
|
-
private _attemptCoverageRequest;
|
|
19
|
-
}
|
|
20
|
-
export { MMapCoverage, MMapCoverageProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import type { LayerImplementationClasses } from "../../common/types/layer-implementation";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
interface MappableError extends Error {
|
|
2
|
-
additionalInfo?: Additional;
|
|
3
|
-
logged?: boolean;
|
|
4
|
-
}
|
|
5
|
-
type Additional = Record<string, unknown>;
|
|
6
|
-
interface LogErrorOptions {
|
|
7
|
-
message?: string;
|
|
8
|
-
service?: string;
|
|
9
|
-
source?: string;
|
|
10
|
-
sourceMethod?: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
block?: string;
|
|
13
|
-
method?: string;
|
|
14
|
-
page?: string;
|
|
15
|
-
additional?: Additional;
|
|
16
|
-
level?: "info" | "debug" | "warn" | "error" | "critical" | "trace";
|
|
17
|
-
}
|
|
18
|
-
interface LogErrorInitSettings {
|
|
19
|
-
project?: string;
|
|
20
|
-
unhandledRejection?: boolean;
|
|
21
|
-
uncaughtException?: boolean;
|
|
22
|
-
}
|
|
23
|
-
type ErrorLoggerInitFunction = (settings: LogErrorInitSettings) => ErrorLoggerFunction;
|
|
24
|
-
type ErrorLoggerFunction = (options: LogErrorOptions, error?: MappableError) => void;
|
|
25
|
-
export type MappableReactError = Omit<MappableError, "logged">;
|
|
26
|
-
export { ErrorLoggerInitFunction };
|
|
27
|
-
export declare function errorLoggerFactory(initLogger: ErrorLoggerInitFunction): void;
|
|
28
|
-
export declare function logError(error: MappableReactError, options?: Record<string, unknown>): void;
|
|
29
|
-
export declare function throwError(error: MappableReactError): never;
|
package/imperative/utils/id.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type BooleanFlag = 0 | 1;
|
|
2
|
-
type JsonpRequest = {
|
|
3
|
-
url: string;
|
|
4
|
-
callbackName: string;
|
|
5
|
-
};
|
|
6
|
-
declare function boolToFlag(value: undefined | boolean): undefined | BooleanFlag;
|
|
7
|
-
declare function composeUrl(baseUrl: string, params: Record<string, string | number | undefined>): string;
|
|
8
|
-
declare function jsonp<JsonpResponse>({ url, callbackName }: JsonpRequest): Promise<JsonpResponse>;
|
|
9
|
-
export { jsonp, composeUrl, boolToFlag };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type Metrics = {};
|
|
2
|
-
type TransportOptions = {
|
|
3
|
-
share?: number;
|
|
4
|
-
};
|
|
5
|
-
type MetricsTransport<T> = (metrics: T, options?: TransportOptions) => void;
|
|
6
|
-
type CreateTransportOptions = {
|
|
7
|
-
prefix?: string;
|
|
8
|
-
/** Events with share (if defined) less than this value will not be sent, should be in [0, 1] range */
|
|
9
|
-
sendBoundary?: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const SEND_BOUNDARY: number;
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function removeUndefined<T extends {}>(obj: T, recursive?: boolean): T;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ReadonlyLngLat, ZoomRange } from "../../common/types";
|
|
2
|
-
export type LayerInfo = {
|
|
3
|
-
id: string;
|
|
4
|
-
zoomRange?: ZoomRange;
|
|
5
|
-
copyrights?: string[];
|
|
6
|
-
LayerMetaData?: unknown[];
|
|
7
|
-
};
|
|
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 };
|
|
File without changes
|