@mappable-world/mappable-types 0.0.9 → 0.0.11
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/imperative/MMap/index.d.ts +5 -0
- package/imperative/MMapContainer/index.d.ts +35 -0
- package/imperative/MMapFeature/index.d.ts +2 -2
- package/imperative/MMapListener/index.d.ts +15 -0
- package/imperative/MMapReactContainer/index.d.ts +8 -34
- package/imperative/MMapTileDataSource/index.d.ts +1 -0
- package/imperative/index.d.ts +2 -1
- package/imperative/wrappers.d.ts +2 -0
- package/modules/controls-extra/MMapOpenMapsButton/index.d.ts +2 -0
- package/modules/editors/MMapFeatureEditor/MMapFeatureEditor.d.ts +4 -2
- package/modules/utils/MMapCursor/index.d.ts +3 -1
- package/modules/vuefy/index.d.ts +10 -0
- package/modules/vuefy/options/common.d.ts +17 -0
- package/modules/vuefy/options/index.d.ts +2 -0
- package/modules/vuefy/overrides/MMap.d.ts +3 -0
- package/modules/vuefy/overrides/MMapContainer.d.ts +3 -0
- package/modules/vuefy/overrides/MMapControl.d.ts +3 -0
- package/modules/vuefy/overrides/MMapControlButton.d.ts +3 -0
- package/modules/vuefy/overrides/MMapMarker.d.ts +6 -0
- package/modules/vuefy/overrides/index.d.ts +3 -0
- package/modules/vuefy/types.d.ts +50 -0
- package/modules/vuefy/vuefy.d.ts +3 -0
- package/package.json +7 -2
- package/packages/clusterer/MMapClusterer/MMapClusterer.d.ts +2 -0
- package/packages/clusterer/MMapClusterer/vue/MMapClusterer.d.ts +4 -0
- package/packages/controls/MMapGeolocationControl/index.d.ts +2 -0
- package/packages/controls/MMapZoomControl/index.d.ts +2 -0
- package/packages/hint/MMapHint/index.d.ts +6 -3
- package/packages/markers/MMapDefaultMarker/index.d.ts +2 -0
- package/packages/markers/MMapDefaultMarker/vue/MMapDefaultMarker.d.ts +4 -0
- package/reactify/overrides/MMapContainer.d.ts +6 -0
- package/reactify/overrides/MMapReactContainer.d.ts +1 -0
- package/reactify/overrides/index.d.ts +2 -1
|
@@ -274,6 +274,11 @@ declare class MMap extends GenericRootEntity<MMapProps, DefaultProps> {
|
|
|
274
274
|
* @param {Config} config
|
|
275
275
|
*/
|
|
276
276
|
setConfig(config: Config): void;
|
|
277
|
+
/**
|
|
278
|
+
* setter for {@link MMapProps}.projection prop
|
|
279
|
+
* @param {Projection} projection
|
|
280
|
+
*/
|
|
281
|
+
setProjection(projection: Projection): void;
|
|
277
282
|
/**
|
|
278
283
|
* Destroy map and remove it from user DOM-element
|
|
279
284
|
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type TReact from "react";
|
|
2
|
+
import type { Context } from "../Entities";
|
|
3
|
+
import { MMapGroupEntity } from "../MMapEnities";
|
|
4
|
+
import { overrideKeyReactify } from "../wrappers";
|
|
5
|
+
interface MMapContainerPropsImpl<TContext> {
|
|
6
|
+
onElement: (element?: Element) => void;
|
|
7
|
+
onContext: (context?: TContext) => void;
|
|
8
|
+
}
|
|
9
|
+
interface MMapContainerProps<TContext> {
|
|
10
|
+
tagName?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: TReact.CSSProperties;
|
|
13
|
+
context?: Context<TContext>;
|
|
14
|
+
}
|
|
15
|
+
declare const defaultProps: {
|
|
16
|
+
tagName: string;
|
|
17
|
+
};
|
|
18
|
+
type DefaultProps = typeof defaultProps;
|
|
19
|
+
type ComputedMMapContainerProps<TContext> = MMapContainerProps<TContext> & MMapContainerPropsImpl<TContext>;
|
|
20
|
+
declare class MMapContainer extends MMapGroupEntity<ComputedMMapContainerProps<unknown>, DefaultProps> {
|
|
21
|
+
static defaultProps: {
|
|
22
|
+
tagName: string;
|
|
23
|
+
};
|
|
24
|
+
static [overrideKeyReactify]: import("../../reactify/reactify").CustomReactify<import("../MMapReactContainer").MMapReactContainer, TReact.FC<import("../MMapReactContainer").MMapReactContainerProps<unknown> & {
|
|
25
|
+
children?: TReact.ReactNode;
|
|
26
|
+
}>>;
|
|
27
|
+
element?: Element;
|
|
28
|
+
private _detachDom?;
|
|
29
|
+
private _disposeWatch?;
|
|
30
|
+
protected _onAttach(): void;
|
|
31
|
+
private _adjustContext;
|
|
32
|
+
protected _onDetach(): void;
|
|
33
|
+
protected _onUpdate(props: Partial<ComputedMMapContainerProps<unknown>>): void;
|
|
34
|
+
}
|
|
35
|
+
export { MMapContainer, MMapContainerProps, MMapContainerPropsImpl, ComputedMMapContainerProps };
|
|
@@ -51,13 +51,13 @@ declare class MMapFeature extends MMapEntity<MMapFeatureProps, DefaultProps> {
|
|
|
51
51
|
private static _uid;
|
|
52
52
|
private _id;
|
|
53
53
|
private _source;
|
|
54
|
-
private
|
|
54
|
+
private _defaultPropsId?;
|
|
55
55
|
constructor(props: MMapFeatureProps);
|
|
56
56
|
get properties(): Record<string, unknown> | undefined;
|
|
57
57
|
get geometry(): GenericGeometry<LngLat>;
|
|
58
58
|
protected _onAttach(): void;
|
|
59
59
|
protected _onDetach(): void;
|
|
60
|
-
protected _onUpdate({
|
|
60
|
+
protected _onUpdate({ id, source }: Partial<MMapFeatureProps>): void;
|
|
61
61
|
private __onDragStart;
|
|
62
62
|
private __onDragMove;
|
|
63
63
|
private __onDragEnd;
|
|
@@ -17,6 +17,18 @@ type HandlerEntity<TType extends string, TEntity> = {
|
|
|
17
17
|
entity: TEntity;
|
|
18
18
|
};
|
|
19
19
|
export type DomEventHandlerObject = HandlerEntity<"feature", MMapFeature> | HandlerEntity<"marker", MMapMarker> | HandlerEntity<"hotspot", MMapHotspot> | undefined;
|
|
20
|
+
interface TileLayerState {
|
|
21
|
+
/** Number of tiles loaded from the server. */
|
|
22
|
+
tilesLoaded: number;
|
|
23
|
+
/** Number of tiles ready to be displayed. */
|
|
24
|
+
tilesReady: number;
|
|
25
|
+
/** Total number of tiles in the visible area. */
|
|
26
|
+
tilesTotal: number;
|
|
27
|
+
}
|
|
28
|
+
interface MapState {
|
|
29
|
+
getLayerState(layerId: string, type: string, effectiveMode?: "raster" | "vector"): Record<string, unknown> | undefined;
|
|
30
|
+
getLayerState(layerId: string, type: "tile", effectiveMode?: "raster" | "vector"): TileLayerState | undefined;
|
|
31
|
+
}
|
|
20
32
|
export type DomEventHandler = (object: DomEventHandlerObject, event: DomEvent) => void;
|
|
21
33
|
type Location = Required<MMapLocation>;
|
|
22
34
|
interface UpdateObject {
|
|
@@ -33,6 +45,7 @@ interface ResizeObject {
|
|
|
33
45
|
type MapEventHandler<TObject> = (object: TObject) => void;
|
|
34
46
|
export type MapEventUpdateHandler = MapEventHandler<UpdateObject>;
|
|
35
47
|
export type MapEventResizeHandler = MapEventHandler<ResizeObject>;
|
|
48
|
+
export type MapEventReadyStateChangeHandler = MapEventHandler<MapState>;
|
|
36
49
|
export type IndoorPlansHandler = (object: {
|
|
37
50
|
type: IndoorPlanType;
|
|
38
51
|
indoorPlans: readonly IndoorPlan[] | null;
|
|
@@ -65,6 +78,7 @@ export type DomEvents = {
|
|
|
65
78
|
export type MapEvents = {
|
|
66
79
|
onUpdate: MapEventUpdateHandler;
|
|
67
80
|
onResize: MapEventResizeHandler;
|
|
81
|
+
onStateChanged: MapEventReadyStateChangeHandler;
|
|
68
82
|
};
|
|
69
83
|
export type BehaviorEvents = {
|
|
70
84
|
onActionStart: BehaviorMapEventHandler;
|
|
@@ -100,6 +114,7 @@ declare class MMapListener extends MMapEntity<MMapListenerProps> {
|
|
|
100
114
|
private _subscribeDomEvent;
|
|
101
115
|
private _subscribeMapEvent;
|
|
102
116
|
private _subscribeMapIndoorPlansEvent;
|
|
117
|
+
private _subscribeMapStateChanged;
|
|
103
118
|
private _subscribeActionEvent;
|
|
104
119
|
private _subscribe;
|
|
105
120
|
private _unsubscribe;
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { MMapContainer, MMapContainerProps, MMapContainerPropsImpl } from "../MMapContainer";
|
|
2
|
+
/** @deprecated Use MMapContainerPropsImpl instead */
|
|
3
|
+
type MMapReactContainerPropsImpl<TContext> = MMapContainerPropsImpl<TContext>;
|
|
4
|
+
/** @deprecated Use MMapContainerProps instead */
|
|
5
|
+
type MMapReactContainerProps<TContext> = MMapContainerProps<TContext>;
|
|
6
|
+
/** @deprecated Use MMapContainer instead */
|
|
7
|
+
declare class MMapReactContainer extends MMapContainer {
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
tagName?: string;
|
|
11
|
-
className?: string;
|
|
12
|
-
style?: TReact.CSSProperties;
|
|
13
|
-
context?: Context<TContext>;
|
|
14
|
-
}
|
|
15
|
-
declare const defaultProps: {
|
|
16
|
-
tagName: string;
|
|
17
|
-
};
|
|
18
|
-
type DefaultProps = typeof defaultProps;
|
|
19
|
-
type ComputedMMapReactContainerProps<TContext> = MMapReactContainerProps<TContext> & MMapReactContainerPropsImpl<TContext>;
|
|
20
|
-
declare class MMapReactContainer extends MMapGroupEntity<ComputedMMapReactContainerProps<unknown>, DefaultProps> {
|
|
21
|
-
static defaultProps: {
|
|
22
|
-
tagName: string;
|
|
23
|
-
};
|
|
24
|
-
static [overrideKeyReactify]: import("../../reactify/reactify").CustomReactify<MMapReactContainer, TReact.FC<MMapReactContainerProps<unknown> & {
|
|
25
|
-
children?: TReact.ReactNode;
|
|
26
|
-
}>>;
|
|
27
|
-
element?: Element;
|
|
28
|
-
private _detachDom?;
|
|
29
|
-
private _disposeWatch?;
|
|
30
|
-
protected _onAttach(): void;
|
|
31
|
-
private _adjustContext;
|
|
32
|
-
protected _onDetach(): void;
|
|
33
|
-
protected _onUpdate(props: Partial<ComputedMMapReactContainerProps<unknown>>): void;
|
|
34
|
-
}
|
|
35
|
-
export { MMapReactContainer, MMapReactContainerProps, MMapReactContainerPropsImpl };
|
|
9
|
+
export { MMapReactContainer, MMapReactContainerPropsImpl, MMapReactContainerProps };
|
|
@@ -53,5 +53,6 @@ declare class MMapTileDataSource extends MMapEntity<MMapTileDataSourceProps> {
|
|
|
53
53
|
protected _onAttach(): void;
|
|
54
54
|
protected _onDetach(): void;
|
|
55
55
|
protected _onUpdate(props: Partial<MMapTileDataSourceProps>): void;
|
|
56
|
+
private _validateVectorSource;
|
|
56
57
|
}
|
|
57
58
|
export { MMapTileDataSource, MMapTileDataSourceProps };
|
package/imperative/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MMap, MMapProps, MMapCenterLocation, MMapZoomLocation, MMapBoundsLocation, MMapCenterZoomLocation, MMapLocationRequest } from "./MMap";
|
|
1
|
+
export { MMap, MMapProps, MMapCenterLocation, MMapZoomLocation, MMapBoundsLocation, MMapCenterZoomLocation, MMapLocationRequest, MMapCameraRequest } from "./MMap";
|
|
2
2
|
export { MMapCopyrightsPosition } from "./MMapCopyrights";
|
|
3
3
|
export { MMapEntity, MMapComplexEntity, MMapGroupEntity, MMapContext } from "./MMapEnities";
|
|
4
4
|
export { MMapDefaultFeaturesLayer, MMapDefaultFeaturesLayerProps } from "./MMapDefaultFeaturesLayer";
|
|
@@ -14,6 +14,7 @@ export { MMapTileDataSource, MMapTileDataSourceProps } from "./MMapTileDataSourc
|
|
|
14
14
|
export { MMapControls, MMapControlsProps } from "./MMapControls";
|
|
15
15
|
export { MMapControl, MMapControlProps, MMapControlButton, MMapControlButtonProps, MMapControlCommonButton } from "./MMapControl";
|
|
16
16
|
export { MMapCollection } from "./MMapCollection";
|
|
17
|
+
export { MMapContainer, MMapContainerProps, MMapContainerPropsImpl, ComputedMMapContainerProps } from "./MMapContainer";
|
|
17
18
|
export * from "./mappable-worldMaps";
|
|
18
19
|
export * from "./search";
|
|
19
20
|
export * from "./suggest";
|
package/imperative/wrappers.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MMapEntity } from "../../../imperative/MMapEnities";
|
|
2
|
+
import type { CustomVuefyOptions } from "../../vuefy";
|
|
2
3
|
/**
|
|
3
4
|
* MMapOpenMapsButton props
|
|
4
5
|
*/
|
|
@@ -7,5 +8,6 @@ type MMapOpenMapsButtonProps = {
|
|
|
7
8
|
title?: string;
|
|
8
9
|
};
|
|
9
10
|
declare class MMapOpenMapsButton extends MMapEntity<MMapOpenMapsButtonProps> {
|
|
11
|
+
static [mappable.optionsKeyVuefy]: CustomVuefyOptions<MMapOpenMapsButton>;
|
|
10
12
|
}
|
|
11
13
|
export { MMapOpenMapsButton, MMapOpenMapsButtonProps };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MMapComplexEntity } from "../../../imperative/MMapEnities";
|
|
2
|
-
import type {
|
|
3
|
-
import { MMapFeatureEditorDefaultPreviewPoint } from "./MMapFeatureEditorDefaultPreviewPoint";
|
|
2
|
+
import type { CustomVuefyOptions } from "../../vuefy";
|
|
4
3
|
import { MMapFeatureEditorDefaultPoint } from "./MMapFeatureEditorDefaultPoint";
|
|
4
|
+
import { MMapFeatureEditorDefaultPreviewPoint } from "./MMapFeatureEditorDefaultPreviewPoint";
|
|
5
|
+
import type { MMapFeatureEditorProps } from "./interface";
|
|
5
6
|
declare const defaultProps: Readonly<{
|
|
6
7
|
isActive: true;
|
|
7
8
|
featureStyle: {};
|
|
@@ -24,6 +25,7 @@ declare class MMapFeatureEditor extends MMapComplexEntity<MMapFeatureEditorProps
|
|
|
24
25
|
previewPointElement: MMapFeatureEditorDefaultPreviewPoint;
|
|
25
26
|
renderPoint: () => MMapFeatureEditorDefaultPoint;
|
|
26
27
|
}>;
|
|
28
|
+
static [mappable.optionsKeyVuefy]: CustomVuefyOptions<MMapFeatureEditor>;
|
|
27
29
|
private _previewPoint;
|
|
28
30
|
private _draggingPoint;
|
|
29
31
|
private _getName;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MMapComplexEntity, MMapEntity } from "../../../imperative/MMapEnities";
|
|
2
2
|
import type { MMapHotspot } from "../../../imperative/MMapHotspot";
|
|
3
|
+
import type { CustomVuefyOptions } from "../../vuefy";
|
|
3
4
|
type MMapCursorProps = {
|
|
4
5
|
/** Layer to follow */
|
|
5
6
|
layer?: string;
|
|
@@ -20,8 +21,9 @@ declare class MMapCursor extends MMapComplexEntity<MMapCursorProps, DefaultProps
|
|
|
20
21
|
cursor: "pointer";
|
|
21
22
|
isActive: (object: MMapEntity<unknown, {}> | MMapHotspot) => boolean;
|
|
22
23
|
}>;
|
|
24
|
+
static [mappable.optionsKeyVuefy]: CustomVuefyOptions<MMapCursor>;
|
|
23
25
|
constructor(props: MMapCursorProps);
|
|
24
26
|
private _onMouseMove;
|
|
25
27
|
private _onMouseLeave;
|
|
26
28
|
}
|
|
27
|
-
export {
|
|
29
|
+
export { MMapCursor, MMapCursorProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { optionsKeyVuefy, overrideKeyVuefy } from "../../imperative/wrappers";
|
|
2
|
+
import type { CustomVuefyFn, CustomVuefyOptions, Vuefy } from "./types";
|
|
3
|
+
import type TVue from "@vue/runtime-core";
|
|
4
|
+
export type GenericVuefy = {
|
|
5
|
+
readonly overrideKey: typeof overrideKeyVuefy;
|
|
6
|
+
readonly optionsKey: typeof optionsKeyVuefy;
|
|
7
|
+
bindTo(Vue: typeof TVue): Vuefy;
|
|
8
|
+
};
|
|
9
|
+
export declare const vuefy: Readonly<GenericVuefy>;
|
|
10
|
+
export type { CustomVuefyFn, CustomVuefyOptions, Vuefy };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CustomVuefyOptions } from "..";
|
|
2
|
+
import { MMap, MMapContainer, MMapControlButton, MMapControls, MMapDefaultFeaturesLayer, MMapDefaultSchemeLayer, MMapFeature, MMapFeatureDataSource, MMapLayer, MMapMarker, MMapTileDataSource } from "../../../imperative";
|
|
3
|
+
import { type EntityConstructor, type GenericEntity } from "../../../imperative/Entities";
|
|
4
|
+
import type { ComputedMMapMarkerContainerProps } from "../overrides/MMapMarker";
|
|
5
|
+
export declare const MMapVuefyOptions: CustomVuefyOptions<MMap>;
|
|
6
|
+
export declare const MMapControlButtonVuefyOptions: CustomVuefyOptions<MMapControlButton>;
|
|
7
|
+
export declare const MMapControlsVuefyOptions: CustomVuefyOptions<MMapControls>;
|
|
8
|
+
export declare const MMapDefaultFeaturesLayerVuefyOptions: CustomVuefyOptions<MMapDefaultFeaturesLayer>;
|
|
9
|
+
export declare const MMapDefaultSchemeLayerVuefyOptions: CustomVuefyOptions<MMapDefaultSchemeLayer>;
|
|
10
|
+
export declare const MMapFeatureVuefyOptions: CustomVuefyOptions<MMapFeature>;
|
|
11
|
+
export declare const MMapFeatureDataSourceVuefyOptions: CustomVuefyOptions<MMapFeatureDataSource>;
|
|
12
|
+
export declare const MMapLayerVuefyOptions: CustomVuefyOptions<MMapLayer>;
|
|
13
|
+
export declare const MMapMarkerVuefyOptions: CustomVuefyOptions<MMapMarker, ComputedMMapMarkerContainerProps>;
|
|
14
|
+
export declare const MMapTileDataSourceVuefyOptions: CustomVuefyOptions<MMapTileDataSource>;
|
|
15
|
+
export declare const MMapContainerVuefyOptions: CustomVuefyOptions<MMapContainer>;
|
|
16
|
+
declare const _default: Map<EntityConstructor<GenericEntity<unknown, {}, import("../../../imperative/Entities").GenericRootEntity<unknown, {}>>>, CustomVuefyOptions<GenericEntity<unknown, {}, import("../../../imperative/Entities").GenericRootEntity<unknown, {}>>>>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MMapMarker as MMapMarkerI, MMapMarkerProps } from "../../../imperative/MMapMarker";
|
|
2
|
+
import type { CustomVuefyFn } from "../types";
|
|
3
|
+
export type ComputedMMapMarkerContainerProps = MMapMarkerProps & {
|
|
4
|
+
markerElement: HTMLElement;
|
|
5
|
+
};
|
|
6
|
+
export declare const MMapMarkerVuefyOverride: CustomVuefyFn<MMapMarkerI, ComputedMMapMarkerContainerProps>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type TVue from "@vue/runtime-core";
|
|
2
|
+
import type { Context, EntityConstructor, EntityProps, GenericEntity } from "../../imperative/Entities";
|
|
3
|
+
import type { optionsKeyVuefy, overrideKeyVuefy } from "../../imperative/wrappers";
|
|
4
|
+
export type BaseModule = Record<string | symbol, unknown>;
|
|
5
|
+
export type DefaultEntity = GenericEntity<unknown>;
|
|
6
|
+
export type DefaultContext = Context<unknown>;
|
|
7
|
+
export type DefaultCtor = EntityConstructor<DefaultEntity>;
|
|
8
|
+
export type PropsFromCtor<TCtor extends DefaultCtor> = EntityProps<InstanceType<TCtor>>;
|
|
9
|
+
export type VuefyPropsModule<TModule extends BaseModule> = {
|
|
10
|
+
[Key in keyof TModule]: TModule[Key] extends GenericEntity<infer Props> ? VuefyPropsObject<Props> | VuefyPropsArray<Props> : unknown;
|
|
11
|
+
};
|
|
12
|
+
export type VuefyPropsObject<RawProps> = {
|
|
13
|
+
[K in keyof RawProps]-?: TVue.PropType<RawProps[K]> | TVue.Prop<RawProps[K]>;
|
|
14
|
+
};
|
|
15
|
+
export type VuefyPropsNullObject<RawProps> = {
|
|
16
|
+
[K in keyof RawProps]-?: null;
|
|
17
|
+
};
|
|
18
|
+
export type VuefyPropsArray<RawProps> = Array<keyof RawProps>;
|
|
19
|
+
export type Vuefy = {
|
|
20
|
+
module: VuefyModuleFn;
|
|
21
|
+
entity: VuefyEntityFn;
|
|
22
|
+
};
|
|
23
|
+
export interface VuefyModuleFn {
|
|
24
|
+
<TModule extends BaseModule = BaseModule>(module: TModule, props?: VuefyPropsModule<TModule>): VuefiedModule<TModule>;
|
|
25
|
+
}
|
|
26
|
+
export type VuefyEntityFn = <TCtor extends DefaultCtor, TProps = PropsFromCtor<TCtor>>(...args: Parameters<VuefyEntityFnGen<TCtor, TProps>>) => ReturnType<VuefyEntityFnGen<TCtor, TProps>>;
|
|
27
|
+
export type VuefyEntityFnGen<TCtor extends DefaultCtor, TProps = PropsFromCtor<TCtor>> = (ctor: TCtor, props?: VuefyPropsObject<TProps> | VuefyPropsArray<TProps>, displayName?: string) => TVue.Component<TProps>;
|
|
28
|
+
export type VuefyContextFn = <TContext extends DefaultContext>(context?: TContext) => symbol;
|
|
29
|
+
export type InternalVuefyEntityFn = <TCtor extends DefaultCtor, TProps = PropsFromCtor<TCtor>>(...args: Parameters<InternalVuefyEntityFnGen<TCtor, TProps>>) => ReturnType<InternalVuefyEntityFnGen<TCtor, TProps>>;
|
|
30
|
+
export type InternalVuefyEntityFnGen<TCtor extends DefaultCtor, TProps = PropsFromCtor<TCtor>> = (ctor: TCtor, props: VuefyPropsObject<TProps>, displayName: string) => TVue.Component<TProps>;
|
|
31
|
+
export type VuefiedModule<TModule extends BaseModule> = {
|
|
32
|
+
[Property in keyof TModule]: TModule[Property] extends DefaultCtor ? ReturnType<VuefyEntityFnGen<TModule[Property]>> : TModule[Property] extends typeof Context ? ReturnType<VuefyContextFn> : TModule[Property];
|
|
33
|
+
};
|
|
34
|
+
export type Overrided<TCtor extends DefaultCtor, TVueProps> = {
|
|
35
|
+
[overrideKeyVuefy]: CustomVuefyFn<InstanceType<TCtor>, TVueProps>;
|
|
36
|
+
};
|
|
37
|
+
export type Options<TCtor extends DefaultCtor, TVueProps> = {
|
|
38
|
+
[optionsKeyVuefy]: CustomVuefyOptions<InstanceType<TCtor>, TVueProps>;
|
|
39
|
+
};
|
|
40
|
+
export type CustomVuefyFn<TEntity extends DefaultEntity, TExternalProps = EntityProps<TEntity>> = (ctor: EntityConstructor<TEntity>, props: VuefyPropsObject<TExternalProps>, params: {
|
|
41
|
+
vuefy: {
|
|
42
|
+
module: VuefyModuleFn;
|
|
43
|
+
entity: VuefyEntityFn;
|
|
44
|
+
context: VuefyContextFn;
|
|
45
|
+
};
|
|
46
|
+
Vue: typeof TVue;
|
|
47
|
+
}) => TVue.Component<TExternalProps>;
|
|
48
|
+
export type CustomVuefyOptions<TEntity extends DefaultEntity, TExternalProps = EntityProps<TEntity>> = {
|
|
49
|
+
props: VuefyPropsObject<TExternalProps> | VuefyPropsArray<TExternalProps>;
|
|
50
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappable-world/mappable-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Types for mappable maps library",
|
|
5
5
|
"main": "",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -16,5 +16,10 @@
|
|
|
16
16
|
"registry": "https://registry.npmjs.org"
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://mappable.world",
|
|
19
|
-
"license": "Apache-2.0"
|
|
19
|
+
"license": "Apache-2.0",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@types/react": "*",
|
|
22
|
+
"@types/react-dom": "*",
|
|
23
|
+
"@vue/runtime-core": "*"
|
|
24
|
+
}
|
|
20
25
|
}
|
|
@@ -67,6 +67,8 @@ declare class MMapClusterer extends mappable.MMapComplexEntity<MMapClustererProp
|
|
|
67
67
|
}, {}>> | undefined;
|
|
68
68
|
key?: import("react").Key | null | undefined;
|
|
69
69
|
}>>;
|
|
70
|
+
static [mappable.overrideKeyVuefy]: import("../../../modules/vuefy").CustomVuefyFn<MMapClusterer>;
|
|
71
|
+
static [mappable.optionsKeyVuefy]: import("../../../modules/vuefy").CustomVuefyOptions<MMapClusterer>;
|
|
70
72
|
/** All created entities with cluster id*/
|
|
71
73
|
private _entitiesCache;
|
|
72
74
|
/** Viewport entities with cluster id */
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CustomVuefyFn, CustomVuefyOptions } from "../../../../modules/vuefy";
|
|
2
|
+
import type { MMapClusterer } from "..";
|
|
3
|
+
export declare const MMapClustererVuefyOptions: CustomVuefyOptions<MMapClusterer>;
|
|
4
|
+
export declare const MMapClustererVuefyOverride: CustomVuefyFn<MMapClusterer>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EasingFunctionDescription, LngLat } from "../../../common/types";
|
|
2
|
+
import type { CustomVuefyOptions } from "../../../modules/vuefy";
|
|
2
3
|
/**
|
|
3
4
|
* MMapGeolocationControl props
|
|
4
5
|
*/
|
|
@@ -31,6 +32,7 @@ declare class MMapGeolocationControl extends mappable.MMapGroupEntity<MMapGeoloc
|
|
|
31
32
|
static defaultProps: Readonly<{
|
|
32
33
|
duration: 500;
|
|
33
34
|
}>;
|
|
35
|
+
static [mappable.optionsKeyVuefy]: CustomVuefyOptions<MMapGeolocationControl>;
|
|
34
36
|
private _control;
|
|
35
37
|
private _button;
|
|
36
38
|
private _spinner;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EasingFunctionDescription } from "../../../common/types";
|
|
2
2
|
import type { MMapControlCommonButton } from "../../../imperative/MMapControl";
|
|
3
3
|
import type { MMapListener } from "../../../imperative/MMapListener";
|
|
4
|
+
import type { CustomVuefyOptions } from "../../../modules/vuefy";
|
|
4
5
|
/**
|
|
5
6
|
* MMapZoomControl props
|
|
6
7
|
*/
|
|
@@ -30,6 +31,7 @@ declare class MMapZoomControl extends mappable.MMapControl<MMapZoomControlProps>
|
|
|
30
31
|
static defaultProps: Readonly<{
|
|
31
32
|
duration: 200;
|
|
32
33
|
}>;
|
|
34
|
+
static [mappable.optionsKeyVuefy]: CustomVuefyOptions<MMapZoomControl>;
|
|
33
35
|
protected _zoomIn: MMapControlCommonButton;
|
|
34
36
|
protected _zoomOut: MMapControlCommonButton;
|
|
35
37
|
protected _listener: MMapListener;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
1
|
+
import type { MMapFeature, MMapHotspot, MMapMarker } from "../../../imperative";
|
|
2
|
+
import type { CustomVuefyFn, CustomVuefyOptions } from "../../../modules/vuefy";
|
|
3
3
|
import type { CustomReactify } from "../../../reactify/reactify";
|
|
4
|
-
import
|
|
4
|
+
import type TReact from "react";
|
|
5
|
+
import { optionsKeyVuefy, overrideKeyReactify, overrideKeyVuefy } from "../../../imperative/wrappers";
|
|
5
6
|
type MMapHintProps = {
|
|
6
7
|
hint: (object: MMapFeature | MMapMarker | MMapHotspot | undefined) => unknown;
|
|
7
8
|
};
|
|
@@ -40,6 +41,8 @@ declare const MMapHintContext: import("../../../imperative/Entities").Context<un
|
|
|
40
41
|
*/
|
|
41
42
|
declare class MMapHint extends mappable.MMapGroupEntity<MMapHintProps> {
|
|
42
43
|
static [overrideKeyReactify]: CustomReactify<MMapHint, TReact.FC<MMapHintProps>>;
|
|
44
|
+
static [overrideKeyVuefy]: CustomVuefyFn<MMapHint>;
|
|
45
|
+
static [optionsKeyVuefy]: CustomVuefyOptions<MMapHint>;
|
|
43
46
|
private _destroyDomContext;
|
|
44
47
|
private _detachDom;
|
|
45
48
|
private _element;
|
|
@@ -80,6 +80,8 @@ declare class MMapDefaultMarker extends mappable.MMapComplexEntity<MMapDefaultMa
|
|
|
80
80
|
ref?: import("react").Ref<import("../../../imperative/MMapEnities").MMapEntity<MMapDefaultMarkerProps, {}>> | undefined;
|
|
81
81
|
key?: import("react").Key | null | undefined;
|
|
82
82
|
}>>;
|
|
83
|
+
static [mappable.overrideKeyVuefy]: import("../../../modules/vuefy").CustomVuefyFn<MMapDefaultMarker>;
|
|
84
|
+
static [mappable.optionsKeyVuefy]: import("../../../modules/vuefy").CustomVuefyOptions<MMapDefaultMarker>;
|
|
83
85
|
private _marker;
|
|
84
86
|
private _container;
|
|
85
87
|
private _popup;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CustomVuefyFn, CustomVuefyOptions } from "../../../../modules/vuefy";
|
|
2
|
+
import type { MMapDefaultMarker } from "..";
|
|
3
|
+
export declare const MMapDefaultMarkerVuefyOptions: CustomVuefyOptions<MMapDefaultMarker>;
|
|
4
|
+
export declare const MMapDefaultMarkerVuefyOverride: CustomVuefyFn<MMapDefaultMarker>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type TReact from "react";
|
|
2
|
+
import type { CustomReactify } from "../reactify";
|
|
3
|
+
import type { MMapContainer, MMapContainerProps } from "../../imperative/MMapContainer";
|
|
4
|
+
type ReactProps<T> = TReact.PropsWithChildren<MMapContainerProps<T>>;
|
|
5
|
+
export declare const MMapContainerReactifyOverride: CustomReactify<MMapContainer, TReact.FC<ReactProps<unknown>>>;
|
|
6
|
+
export {};
|
|
@@ -2,5 +2,6 @@ import type TReact from "react";
|
|
|
2
2
|
import type { CustomReactify } from "../reactify";
|
|
3
3
|
import type { MMapReactContainer, MMapReactContainerProps } from "../../imperative/MMapReactContainer";
|
|
4
4
|
type ReactProps<T> = TReact.PropsWithChildren<MMapReactContainerProps<T>>;
|
|
5
|
+
/** @deprecated Use MMapContainerReactifyOverride instead */
|
|
5
6
|
export declare const MMapReactContainerReactifyOverride: CustomReactify<MMapReactContainer, TReact.FC<ReactProps<unknown>>>;
|
|
6
7
|
export {};
|