@yandex/ymaps3-types
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -1,5 +0,10 @@ | ||
export class Config { | ||
interface Apikeys { | ||
suggest?: string; | ||
router?: string; | ||
} | ||
export declare class Config { | ||
readonly description: string; | ||
setExperiments(experiments: Record<string, boolean>): void; | ||
setApikeys(apikeys: Apikeys): void; | ||
} | ||
export function getDefaultConfig(): Config; | ||
export declare function getDefaultConfig(): Config; |
@@ -1,8 +0,7 @@ | ||
import { EncodedRouteFeatureCollection } from "./utils"; | ||
import type { BaseRouteResponse, RouteFeature, RouteOptions } from "."; | ||
import type { BaseRouteResponse, RouteFeature, RouteOptions, RawRoute } from "./interface"; | ||
export declare class DrivingRouteResponse implements BaseRouteResponse { | ||
#private; | ||
private _options?; | ||
constructor(data: EncodedRouteFeatureCollection, options?: RouteOptions); | ||
constructor(data: RawRoute, options?: RouteOptions); | ||
toRoute(): RouteFeature; | ||
} |
@@ -1,56 +0,4 @@ | ||
import type { GenericFeature, LineStringGeometry, LngLat, LngLatBounds } from "../../common/types"; | ||
import { Config } from "../config"; | ||
export declare enum YMapJamType { | ||
UNKNOWN = 1, | ||
CLOSED = 2, | ||
FREE = 3, | ||
LIGHT = 4, | ||
HARD = 5, | ||
VERY_HARD = 6 | ||
} | ||
export type YMapJamSegment = { | ||
/** | ||
* Traffic jam type, one of {@link YMapJamType YMapJamType} | ||
* */ | ||
type: YMapJamType; | ||
/** | ||
* How many items of the {@link RouteFeature.coordinates RouteFeature.coordinates} | ||
* array this {@link JamSegment JamSegment} spans across | ||
* Use these values to build palettes for a {@link YMapFeature YMapFeature} stroke style | ||
* */ | ||
count: number; | ||
}; | ||
export interface RouteFeature extends GenericFeature<LngLat> { | ||
geometry: LineStringGeometry; | ||
properties: { | ||
jams?: YMapJamSegment[]; | ||
bounds?: LngLatBounds; | ||
}; | ||
} | ||
export interface RoutePoint { | ||
type: 'way' | 'via'; | ||
coordinates: LngLat; | ||
} | ||
export interface RouteOptions { | ||
/** | ||
* Route points represented by {@link LngLat LngLat} coordinates. | ||
* Its may be array of {@link LngLat LngLat} or array of {type, coordinates} objects. | ||
* {@link LngLat LngLat}[] is a shorthand for {type: 'way', coordinates: {@link LngLat LngLat}}[]. | ||
**/ | ||
points: (RoutePoint | LngLat)[]; | ||
/** Route type. Only 'driving' type is available at this moment. */ | ||
type: 'driving'; | ||
/** Maximum amount of returned routes. Only one result is available at this moment. */ | ||
results?: 1; | ||
/** Traffic jams requesting flag. If specified, jams will be returned in properties. Default is `false`. */ | ||
jams?: boolean; | ||
/** If specified, bounding box of the route will be returned in properties. Default is `false`. */ | ||
bounds?: boolean; | ||
/** Avoid roads with tolls. Default is `false`. */ | ||
avoidTolls?: boolean; | ||
} | ||
export interface BaseRouteResponse { | ||
/** Return requested route as {@link RouteFeature RouteFeature}. */ | ||
toRoute(): RouteFeature; | ||
} | ||
import type { BaseRouteResponse, RouteOptions } from "./interface"; | ||
export declare function route(options: RouteOptions, config?: Config | undefined): Promise<BaseRouteResponse[]>; | ||
export { RouteOptions, BaseRouteResponse }; |
import { DomEntity } from "../DomContext"; | ||
import { YMapComplexEntity } from "../YMapEnities"; | ||
import { reactify } from "../../reactify"; | ||
/** | ||
@@ -4,0 +5,0 @@ * YMapControlButton props |
@@ -14,2 +14,4 @@ import type { DrawingStyle, GenericGeometry, LngLat } from "../../common/types"; | ||
properties?: Record<string, unknown>; | ||
/** Do not round coordinates */ | ||
disableRoundCoordinates?: boolean; | ||
} & DraggableProps<YMapFeatureEventHandler> & FeatureClickEvents; | ||
@@ -57,3 +59,3 @@ declare const defaultProps: Readonly<{ | ||
protected _onDetach(): void; | ||
protected _onUpdate({ style, id, source }: Partial<YMapFeatureProps>): void; | ||
protected _onUpdate({ style, id, source, disableRoundCoordinates }: Partial<YMapFeatureProps>): void; | ||
private __onDragStart; | ||
@@ -60,0 +62,0 @@ private __onDragMove; |
import type { LngLat } from "../../common/types"; | ||
import type { DraggableProps, FeatureClickEvents } from "../YMapFeature/types"; | ||
import { YMapGroupEntity } from "../YMapEnities"; | ||
import { reactify } from "../../reactify"; | ||
import { YMapGroupEntity } from "../YMapEnities"; | ||
/** | ||
@@ -20,2 +20,4 @@ * YMapMarker events handler | ||
id?: string; | ||
/** Do not round coordinates */ | ||
disableRoundCoordinates?: boolean; | ||
} & DraggableProps<YMapMarkerEventHandler> & FeatureClickEvents; | ||
@@ -22,0 +24,0 @@ declare const defaultProps: Readonly<{ |
@@ -24,2 +24,5 @@ import type TReact from "react"; | ||
}; | ||
static [overrideKeyReactify]: import("../../reactify/reactify").CustomReactify<YMapReactContainer, TReact.FC<YMapReactContainerProps<unknown> & { | ||
children?: TReact.ReactNode; | ||
}>>; | ||
element?: Element; | ||
@@ -26,0 +29,0 @@ private _detachDom?; |
{ | ||
"name": "@yandex/ymaps3-types", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "Types for ymaps3 maps library", | ||
@@ -5,0 +5,0 @@ "main": "", |
@@ -53,2 +53,9 @@ import type { YMapEntity } from "../../.."; | ||
}>; | ||
static [ymaps3.overrideKeyReactify]: import("../../../reactify/reactify").CustomReactify<YMapClusterer, import("react").ForwardRefExoticComponent<Pick<YMapClustererProps, "tickTimeout" | "features" | "method" | "onRender"> & { | ||
marker: (feature: Feature) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; | ||
cluster: (coordinates: LngLat, features: Feature[]) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; | ||
} & import("react").RefAttributes<YMapEntity<Pick<YMapClustererProps, "tickTimeout" | "features" | "method" | "onRender"> & { | ||
marker: (feature: Feature) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; | ||
cluster: (coordinates: LngLat, features: Feature[]) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>; | ||
}, {}>>>>; | ||
/** All created entities with cluster id*/ | ||
@@ -55,0 +62,0 @@ private _entitiesCache; |
@@ -46,2 +46,12 @@ import type { LngLat } from "../../../common/types"; | ||
}>; | ||
static [ymaps3.overrideKeyReactify]: import("../../../reactify/reactify").CustomReactify<YMapDefaultMarker, import("react").ForwardRefExoticComponent<{ | ||
coordinates: LngLat; | ||
source?: string | undefined; | ||
zIndex?: number | undefined; | ||
properties?: Record<string, unknown> | undefined; | ||
id?: string | undefined; | ||
disableRoundCoordinates?: boolean | undefined; | ||
} & import("../../../imperative/YMapFeature/types").DraggableProps<import("../../../imperative/YMapMarker").YMapMarkerEventHandler> & import("../../../imperative/YMapFeature/types").FeatureClickEvents & DefaultMarkerCustomProps & { | ||
children?: import("react").ReactNode; | ||
} & import("react").RefAttributes<import("../../../imperative/YMapEnities").YMapEntity<YMapDefaultMarkerProps, {}>>>>; | ||
private _marker; | ||
@@ -48,0 +58,0 @@ private _container; |
@@ -5,1 +5,2 @@ export * from "./YMap"; | ||
export * from "./YMapReactContainer"; | ||
export * from "./YMapControlButton"; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114868
130
3078