Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yandex/ymaps3-types

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yandex/ymaps3-types - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

common/index.d.ts

2

common/types/behavior.d.ts

@@ -1,1 +0,1 @@

export declare type BehaviorType = 'drag' | 'pinchZoom' | 'scrollZoom' | 'dblClick' | 'magnifier' | 'oneFingerZoom' | 'mouseRotate' | 'mouseTilt' | 'pinchRotate' | 'panTilt';
export type BehaviorType = 'drag' | 'pinchZoom' | 'scrollZoom' | 'dblClick' | 'magnifier' | 'oneFingerZoom' | 'mouseRotate' | 'mouseTilt' | 'pinchRotate' | 'panTilt';

@@ -1,14 +0,17 @@

import type { LngLat } from './lng-lat';
import type { WorldCoordinates } from './coordinates';
import type { LngLat } from "./lng-lat";
import type { WorldCoordinates } from "./coordinates";
/**
* Generic for rectangle bounded by bottom-left and top-right coordinates
*/
export declare type GenericBounds<T> = [T, T];
export type GenericBounds<T> = [
T,
T
];
/**
* Rectangle bounded by bottom-left and top-right coordinates
*/
export declare type LngLatBounds = GenericBounds<LngLat>;
export type LngLatBounds = GenericBounds<LngLat>;
/**
* Rectangle bounded by bottom-left and top-right world coordinates
*/
export declare type WorldBounds = GenericBounds<WorldCoordinates>;
export type WorldBounds = GenericBounds<WorldCoordinates>;

@@ -1,2 +0,2 @@

import type { WorldCoordinates } from './coordinates';
import type { WorldCoordinates } from "./coordinates";
interface Camera {

@@ -3,0 +3,0 @@ readonly worldCenter: WorldCoordinates;

@@ -1,2 +0,2 @@

import type { Vec2 } from './vec2';
import type { Vec2 } from "./vec2";
/**

@@ -3,0 +3,0 @@ * Coordinates in [-1 ... +1].

@@ -1,25 +0,31 @@

import type { WorldCoordinates } from './coordinates';
import type { GenericGeometry } from './geojson';
import type { PixelCoordinates } from './coordinates';
import type { HotspotFeature } from './hotspot';
declare type VectorCustomization = {
import type { WorldCoordinates } from "./coordinates";
import type { GenericGeometry } from "./geojson";
import type { PixelCoordinates } from "./coordinates";
import type { HotspotFeature } from "./hotspot";
type VectorCustomizationStyler = {
zoom?: number | [
number,
number
];
visibility?: 'off';
hue?: string;
saturation?: number;
lightness?: number;
color?: string;
'secondary-color'?: string;
'tertiary-color'?: string;
opacity?: number;
scale?: number;
};
type VectorCustomizationTypes = 'point' | 'polyline' | 'polygon';
type VectorCustomizationElements = 'geometry' | 'geometry.fill' | 'geometry.fill.pattern' | 'geometry.outline' | 'label' | 'label.icon' | 'label.text' | 'label.text.fill' | 'label.text.outline';
type VectorCustomization = {
tags?: {
all?: string[];
any?: string[];
none?: string[];
};
types?: ('point' | 'polyline' | 'polygon')[];
elements?: 'geometry' | 'geometry.fill' | 'geometry.fill.pattern' | 'geometry.outline' | 'label' | 'label.icon' | 'label.text' | 'label.text.fill' | 'label.text.outline';
stylers?: {
zoom?: number | [number, number];
visibility?: 'off';
hue?: string;
saturation?: number;
lightness?: number;
color?: string;
'secondary-color'?: string;
'tertiary-color'?: string;
opacity?: number;
scale?: number;
};
all?: string | string[];
any?: string | string[];
none?: string | string[];
} | string;
types?: VectorCustomizationTypes | VectorCustomizationTypes[];
elements?: VectorCustomizationElements | VectorCustomizationElements[];
stylers?: VectorCustomizationStyler | VectorCustomizationStyler[];
}[];

@@ -36,8 +42,8 @@ interface WorldHotspot {

}
declare type Hotspot = WorldHotspot | RenderedHotspot;
type Hotspot = WorldHotspot | RenderedHotspot;
interface FetchedTile {
image: HTMLImageElement | HTMLCanvasElement | ImageBitmap;
}
declare type FetchTileFunction = (x: number, y: number, z: number, scale: number, signal: AbortSignal) => Promise<FetchedTile>;
declare type ComposeTileUrlFunction = (x: number, y: number, z: number, scale: number, signal: AbortSignal) => string;
type FetchTileFunction = (x: number, y: number, z: number, scale: number, signal: AbortSignal) => Promise<FetchedTile>;
type ComposeTileUrlFunction = (x: number, y: number, z: number, scale: number, signal: AbortSignal) => string;
/**

@@ -50,3 +56,3 @@ * Provides hotspots for given tile coordinates and zoom.

*/
declare type FetchHotspotsFunction = (x: number, y: number, z: number, signal: AbortSignal) => Promise<Hotspot[]>;
type FetchHotspotsFunction = (x: number, y: number, z: number, signal: AbortSignal) => Promise<Hotspot[]>;
interface RasterTileDataSourceDescription {

@@ -91,6 +97,6 @@ /**

}
declare type MapTheme = 'dark';
declare type VectorTileSize = 'X1' | 'X4' | 'X16';
declare type VectorDataSourcePriority = 'low' | 'medium' | 'high';
declare type VectorObjectsCollisionPriority = 'low' | 'medium' | 'high' | 'ultra';
type MapTheme = 'dark';
type VectorTileSize = 'X1' | 'X4' | 'X16';
type VectorDataSourcePriority = 'low' | 'medium' | 'high';
type VectorObjectsCollisionPriority = 'low' | 'medium' | 'high' | 'ultra';
interface VectorTileDataSourceDescription {

@@ -106,2 +112,6 @@ tileUrl: string;

glyphRequestWithCredentials?: boolean;
tileRequestHeaders?: Record<string, string>;
iconRequestHeaders?: Record<string, string>;
glyphRequestHeaders?: Record<string, string>;
meshRequestHeaders?: Record<string, string>;
priority: VectorDataSourcePriority;

@@ -108,0 +118,0 @@ collisionPriority?: VectorObjectsCollisionPriority;

@@ -1,9 +0,9 @@

import type { Vec2 } from './vec2';
declare type EasingBezierPreset = {
import type { Vec2 } from "./vec2";
type EasingBezierPreset = {
p1: Vec2;
p2: Vec2;
};
declare type EasingFunction = (x: number) => number;
declare type EasingPresetName = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';
declare type EasingFunctionDescription = EasingPresetName | EasingBezierPreset | EasingFunction;
type EasingFunction = (x: number) => number;
type EasingPresetName = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';
type EasingFunctionDescription = EasingPresetName | EasingBezierPreset | EasingFunction;
export { EasingFunctionDescription, EasingPresetName, EasingBezierPreset, EasingFunction };

@@ -1,2 +0,2 @@

import type { LngLat } from './lng-lat';
import type { LngLat } from "./lng-lat";
interface GenericPolygonGeometry<TCoordinates> {

@@ -9,3 +9,3 @@ type: 'Polygon';

* Inner rings may extend beyond outer ring.
* GeoJSON doesn't allow this, but there's a lot of data like this in Yandex.
* GeoJSON doesn't allow this, but there's a lot of data like this in this JS API.
*/

@@ -31,3 +31,3 @@ coordinates: TCoordinates[][];

}
declare type GenericGeometry<TCoordinates> = GenericPolygonGeometry<TCoordinates> | GenericMultiPolygonGeometry<TCoordinates> | GenericLineStringGeometry<TCoordinates> | GenericMultiLineStringGeometry<TCoordinates> | GenericPointGeometry<TCoordinates>;
type GenericGeometry<TCoordinates> = GenericPolygonGeometry<TCoordinates> | GenericMultiPolygonGeometry<TCoordinates> | GenericLineStringGeometry<TCoordinates> | GenericMultiLineStringGeometry<TCoordinates> | GenericPointGeometry<TCoordinates>;
interface GenericFeature<TCoordinates> {

@@ -55,7 +55,7 @@ type: 'Feature';

}
declare type LineStringGeometry = GenericLineStringGeometry<LngLat>;
declare type MultiLineStringGeometry = GenericMultiLineStringGeometry<LngLat>;
declare type MultiPolygonGeometry = GenericMultiPolygonGeometry<LngLat>;
declare type PointGeometry = GenericPointGeometry<LngLat>;
declare type PolygonGeometry = GenericPolygonGeometry<LngLat>;
type LineStringGeometry = GenericLineStringGeometry<LngLat>;
type MultiLineStringGeometry = GenericMultiLineStringGeometry<LngLat>;
type MultiPolygonGeometry = GenericMultiPolygonGeometry<LngLat>;
type PointGeometry = GenericPointGeometry<LngLat>;
type PolygonGeometry = GenericPolygonGeometry<LngLat>;
export { GenericPolygonGeometry, GenericMultiPolygonGeometry, GenericLineStringGeometry, GenericMultiLineStringGeometry, GenericPointGeometry, GenericGeometry, GenericFeature, GenericPointFeature, GenericFeatureCollection, GenericYandexFeatureCollection, LineStringGeometry, MultiLineStringGeometry, MultiPolygonGeometry, PointGeometry, PolygonGeometry };

@@ -1,2 +0,2 @@

declare type FillRule = 'evenodd' | 'nonzero';
type FillRule = 'evenodd' | 'nonzero';
interface PaletteEntry {

@@ -6,3 +6,3 @@ count: number;

}
declare type Palette = PaletteEntry[];
type Palette = PaletteEntry[];
interface StrokeStyle {

@@ -16,6 +16,9 @@ width?: number;

}
declare type Stroke = StrokeStyle[];
type Stroke = StrokeStyle[];
interface DrawingStyleIcon {
readonly url: string;
readonly offset?: [number, number];
readonly offset?: [
number,
number
];
readonly scale?: number;

@@ -22,0 +25,0 @@ }

@@ -1,3 +0,3 @@

import type { GenericGeometry } from './geojson';
import type { LngLat } from './lng-lat';
import type { GenericGeometry } from "./geojson";
import type { LngLat } from "./lng-lat";
interface HotspotFeature<TCoordinates> {

@@ -4,0 +4,0 @@ type: 'Feature';

@@ -1,20 +0,20 @@

export * from './coordinates';
export * from './lng-lat';
export * from './bounds';
export * from './behavior';
export * from './projection';
export * from './map';
export * from './margin';
export * from './zoom';
export * from './zoom-strategy';
export * from './geojson';
export * from './layer-description';
export * from './indoor';
export * from './vec2';
export * from './camera';
export * from './easing-function';
export * from './graphics';
export * from './hotspot';
export * from './utils';
export * from './world-options';
export * from './data-source-description';
export * from "./coordinates";
export * from "./lng-lat";
export * from "./bounds";
export * from "./behavior";
export * from "./projection";
export * from "./map";
export * from "./margin";
export * from "./zoom";
export * from "./zoom-strategy";
export * from "./geojson";
export * from "./layer-description";
export * from "./indoor";
export * from "./vec2";
export * from "./camera";
export * from "./easing-function";
export * from "./graphics";
export * from "./hotspot";
export * from "./utils";
export * from "./world-options";
export * from "./data-source-description";

@@ -10,3 +10,12 @@ interface IndoorLevel {

/** Returns bounds of indoor plan in [[lng, lat], [lng, lat]]. */
getBounds(): [[number, number], [number, number]];
getBounds(): [
[
number,
number
],
[
number,
number
]
];
isVisible(): boolean;

@@ -13,0 +22,0 @@ setVisible(value: boolean): void;

@@ -7,3 +7,3 @@ interface VectorObjectsInteractiveArea {

}
declare type RasterLayerOptions = Record<string, unknown> & {
type RasterLayerOptions = Record<string, unknown> & {
opacity?: number;

@@ -21,3 +21,3 @@ /**

};
declare type VectorLayerOptions = Record<string, unknown> & {
type VectorLayerOptions = Record<string, unknown> & {
modelsAppearingAnimation?: {

@@ -24,0 +24,0 @@ transitionZoom: number;

@@ -5,7 +5,11 @@ /**

*/
declare type LngLat = [lon: number, lat: number, alt?: number];
type LngLat = [
lon: number,
lat: number,
alt?: number
];
/**
* Readonly version of {@link LngLat}
*/
declare type ReadonlyLngLat = Readonly<LngLat>;
type ReadonlyLngLat = Readonly<LngLat>;
export { LngLat, ReadonlyLngLat };

@@ -1,1 +0,1 @@

export declare type MapMode = 'raster' | 'vector' | 'auto';
export type MapMode = 'raster' | 'vector' | 'auto';
/** Map margins in pixels. Order is top, right, bottom, left. */
declare type Margin = [number, number, number, number];
type Margin = [
number,
number,
number,
number
];
export { Margin };

@@ -1,3 +0,3 @@

import type { LngLat } from './lng-lat';
import type { WorldCoordinates } from './coordinates';
import type { LngLat } from "./lng-lat";
import type { WorldCoordinates } from "./coordinates";
interface GenericProjection<TSource> {

@@ -7,3 +7,3 @@ toWorldCoordinates(point: TSource): WorldCoordinates;

}
declare type Projection = GenericProjection<LngLat>;
type Projection = GenericProjection<LngLat>;
export { Projection, GenericProjection };

@@ -1,15 +0,15 @@

declare type DeepReadonly<T> = T extends (infer R)[] ? DeepReadonlyArray<R> : T extends Function ? T : T extends object ? DeepReadonlyObject<T> : T;
type DeepReadonly<T> = T extends (infer R)[] ? DeepReadonlyArray<R> : T extends Function ? T : T extends object ? DeepReadonlyObject<T> : T;
interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {
}
declare type DeepReadonlyObject<T> = {
type DeepReadonlyObject<T> = {
readonly [P in keyof T]: DeepReadonly<T[P]>;
};
declare type Nullable<T> = T | null;
declare type Change<T> = {
type Nullable<T> = T | null;
type Change<T> = {
old: T;
new: T;
} | null;
declare type Changes<T> = {
type Changes<T> = {
readonly [TKey in keyof T]: Change<T[TKey]>;
};
export { DeepReadonly, DeepReadonlyArray, DeepReadonlyObject, Nullable, Change, Changes };

@@ -1,1 +0,1 @@

export declare type ZoomStrategy = 'zoomToCenter' | 'zoomToPointer';
export type ZoomStrategy = 'zoomToCenter' | 'zoomToPointer';

@@ -10,3 +10,3 @@ interface ZoomRange {

*/
declare type ZoomRounding = 'snap' | 'smooth' | 'auto';
type ZoomRounding = 'snap' | 'smooth' | 'auto';
export { ZoomRange, ZoomRounding };

@@ -1,1 +0,6 @@

export class Config {}
export class Config {
}
export type ConfigMeta = {
hosts: {};
};
export type ConfigMetaMetrics = {};

@@ -1,9 +0,9 @@

import type { YMap } from './YMap';
import { Context, GenericComplexEntity, GenericEntity, GenericGroupEntity } from './Entities';
export declare type DomDetach = () => void;
declare type DomContext = {
import { Context, GenericComplexEntity, GenericEntity } from "./Entities";
import { YMapEntity, YMapGroupEntity } from "./YMapEnities";
export type DomDetach = () => void;
type DomContext = {
attach(entity: GenericEntity<unknown>, element: Element): DomDetach;
};
export declare const DomContext: Context<DomContext>;
export declare type DomContextDestroy = () => void;
export type DomContextDestroy = () => void;
/**

@@ -14,9 +14,12 @@ * @ignore

*/
export declare function createDomContext(containerEntity: GenericComplexEntity<unknown>, containerElement: Element, containerEndElement?: Element): [DomContext, DomContextDestroy];
export declare function createDomContext(containerEntity: GenericComplexEntity<unknown>, containerElement: Element, containerEndElement?: Element): [
DomContext,
DomContextDestroy
];
export declare function useDomContext(entity: GenericComplexEntity<unknown>, element: Element, container: Element | null): () => void;
export declare abstract class DomEntity<TProps, TElement extends Element = HTMLElement, DefaultProps = {}> extends GenericGroupEntity<TProps, DefaultProps, YMap> {
export declare abstract class DomEntity<TProps, TElement extends Element = HTMLElement, DefaultProps extends {} = {}> extends YMapGroupEntity<TProps, DefaultProps> {
protected _element?: TElement;
private _detachDom?;
private _destroyDomCtx?;
constructor(props: TProps, children?: GenericEntity<unknown>[]);
constructor(props: TProps, children?: YMapEntity<unknown>[]);
protected _onAttach(): void;

@@ -23,0 +26,0 @@ protected _onDetach(): void;

@@ -1,2 +0,2 @@

declare type ContextWatcherFn = () => void;
type ContextWatcherFn = () => void;
declare class Context<_T> {

@@ -31,7 +31,7 @@ readonly name: string;

};
declare type WithDefaults<Props, DefaultProps extends Partial<Props>> = Props & {
type WithDefaults<Props, DefaultProps extends Partial<Props>> = Props & {
[K in keyof DefaultProps]: K extends keyof Props ? NonNullable<Props[K]> : never;
};
/** @internal */
declare abstract class GenericEntity<Props, DefaultProps = {}, Root extends GenericRootEntity<unknown> = GenericRootEntity<unknown>> {
declare abstract class GenericEntity<Props, DefaultProps extends {} = {}, Root extends GenericRootEntity<unknown> = GenericRootEntity<unknown>> {
protected _props: WithDefaults<Props, DefaultProps>;

@@ -83,20 +83,20 @@ private __implRoot;

}
interface ComplexOptions {
children?: GenericEntity<unknown>[];
interface ComplexOptions<Root extends GenericRootEntity<unknown> = GenericRootEntity<unknown>> {
children?: GenericEntity<unknown, {}, Root>[];
container?: boolean;
}
/** @internal */
declare class GenericComplexEntity<Props, DefaultProps = {}, Root extends GenericRootEntity<unknown> = GenericRootEntity<unknown>> extends GenericEntity<Props, DefaultProps, Root> {
declare class GenericComplexEntity<Props, DefaultProps extends {} = {}, Root extends GenericRootEntity<unknown> = GenericRootEntity<unknown>> extends GenericEntity<Props, DefaultProps, Root> {
private __implChildren;
protected readonly children: readonly GenericEntity<unknown>[];
protected readonly _childContainer: GenericComplexEntity<unknown>;
constructor(props: Props, options?: ComplexOptions);
protected __makeProxyContainer(): GenericComplexEntity<unknown>;
protected readonly children: readonly GenericEntity<unknown, {}, Root>[];
protected readonly _childContainer: GenericComplexEntity<unknown, {}, Root>;
constructor(props: Props, options?: ComplexOptions<Root>);
protected __makeProxyContainer(): GenericComplexEntity<unknown, {}, Root>;
/**
* Adds a child directly to __implChildren, without _childContainer
*/
protected _addDirectChild(child: GenericEntity<unknown>, index?: number): void;
protected addChild(child: GenericEntity<unknown>, index?: number): this;
protected _removeDirectChild(child: GenericEntity<unknown>): void;
protected removeChild(child: GenericEntity<unknown>): this;
protected _addDirectChild(child: GenericEntity<unknown, {}, Root>, index?: number): void;
protected addChild(child: GenericEntity<unknown, {}, Root>, index?: number): this;
protected _removeDirectChild(child: GenericEntity<unknown, {}, Root>): void;
protected removeChild(child: GenericEntity<unknown, {}, Root>): this;
protected __implAttachExtra(): void;

@@ -106,11 +106,12 @@ protected __implDetachExtra(): void;

/** @internal */
declare class GenericGroupEntity<Props, DefaultProps = {}, Root extends GenericRootEntity<unknown> = GenericRootEntity<unknown>> extends GenericComplexEntity<Props, DefaultProps, Root> {
readonly children: readonly GenericEntity<unknown>[];
protected readonly _childContainer: GenericGroupEntity<unknown>;
protected __makeProxyContainer(): GenericGroupEntity<unknown>;
addChild(child: GenericEntity<unknown>, index?: number): this;
removeChild(child: GenericEntity<unknown>): this;
declare class GenericGroupEntity<Props, DefaultProps extends {} = {}, Root extends GenericRootEntity<unknown> = GenericRootEntity<unknown>> extends GenericComplexEntity<Props, DefaultProps, Root> {
readonly children: readonly GenericEntity<unknown, {}, Root>[];
protected readonly _childContainer: GenericGroupEntity<unknown, {}, Root>;
protected __makeProxyContainer(): GenericGroupEntity<unknown, {}, Root>;
addChild(child: GenericEntity<unknown, {}, Root>, index?: number): this;
removeChild(child: GenericEntity<unknown, {}, Root>): this;
}
/** @internal */
declare abstract class GenericRootEntity<Props, DefaultProps = {}> extends GenericGroupEntity<Props, DefaultProps> {
declare abstract class GenericRootEntity<Props, DefaultProps extends {} = {}> extends GenericGroupEntity<Props, DefaultProps> {
get root(): this;
protected _onAttach: undefined;

@@ -120,4 +121,4 @@ protected _onDetach: undefined;

}
declare type EntityProps<T extends GenericEntity<unknown>> = T extends GenericEntity<infer P> ? P : never;
declare type EntityConstructor<TEntity extends GenericEntity<unknown>> = new (...args: any[]) => TEntity;
type EntityProps<T extends GenericEntity<unknown>> = T extends GenericEntity<infer P> ? P : never;
type EntityConstructor<TEntity extends GenericEntity<unknown>> = new (...args: any[]) => TEntity;
export { GenericEntity, GenericComplexEntity, GenericGroupEntity, GenericRootEntity, Context, ContextProvider, EntityConstructor, EntityProps };
import type { LngLat } from "../common/types";
import { Config } from "./config";
declare const geolocation: {
getPosition: typeof getPosition;
};
export declare function getPosition(options?: PositionOptions): Promise<{
export declare function getPosition(options?: PositionOptions, config?: Config | undefined): Promise<{
coords: LngLat;

@@ -7,0 +8,0 @@ accuracy?: number;

@@ -1,5 +0,7 @@

export { YMap, YMapProps, YMapCenterLocation, YMapZoomLocation, YMapBoundsLocation, YMapCenterZoomLocation, YMapLocationRequest, YMapCopyrightsPosition } from "./YMap";
export { YMap, YMapProps, YMapCenterLocation, YMapZoomLocation, YMapBoundsLocation, YMapCenterZoomLocation, YMapLocationRequest } from "./YMap";
export { YMapCopyrightsPosition } from "./YMapCopyrights";
export { YMapEntity, YMapComplexEntity, YMapGroupEntity, YMapContext } from "./YMapEnities";
export { YMapDefaultFeaturesLayer, YMapDefaultFeaturesLayerProps } from "./YMapDefaultFeaturesLayer";
export { YMapDefaultSchemeLayer, YMapDefaultSchemeLayerProps } from "./YMapDefaultSchemeLayer";
export { YMapDefaultSatelliteLayer, YMapDefaultSatelliteLayerProps } from "./YMapDefaultSatelliteLayer";
export * from "./YMapFeature";

@@ -15,7 +17,11 @@ export { YMapFeatureDataSource, YMapFeatureDataSourceProps } from "./YMapFeatureDataSource";

export { YMapCollection } from "./YMapCollection";
export { yandexMaps } from "./yandexMaps";
export { search, SearchOptions, SearchResponse } from "./search";
export { suggest, SuggestOptions, SuggestResponse } from "./suggest";
export * from "./yandexMaps";
export * from "./search";
export * from "./suggest";
export * from "./route";
export { geolocation } from "./geolocation";
export { useDomContext } from "./DomContext";
export type { LngLat, ReadonlyLngLat, LngLatBounds, BehaviorType, MapMode, Margin, ZoomRange, ZoomStrategy, ZoomRounding, VectorCustomization, RasterTileDataSourceDescription, VectorTileDataSourceDescription, RasterLayerOptions, EasingFunctionDescription, EasingPresetName, EasingBezierPreset, EasingFunction, DrawingStyle, DrawingStyleIcon, VectorTileSize, VectorObjectsCollisionPriority, VectorDataSourcePriority } from "@yandex/ymaps3-types/common/types";
export { Config } from "./config";
export { fetchConfig, FetchConfigOptions } from "./fetchConfig";
export * as projections from "./utils/projections";
export type { LngLat, ReadonlyLngLat, LngLatBounds, BehaviorType, MapMode, Margin, ZoomRange, ZoomStrategy, ZoomRounding, VectorCustomization, RasterTileDataSourceDescription, VectorTileDataSourceDescription, RasterLayerOptions, EasingFunctionDescription, EasingPresetName, EasingBezierPreset, EasingFunction, DrawingStyle, DrawingStyleIcon, VectorTileSize, VectorObjectsCollisionPriority, VectorDataSourcePriority } from "../common/types";
import type { LngLat, LngLatBounds } from "../common/types";
import { Config } from "./config";
declare const geocoderSearchTypes: {

@@ -6,4 +7,4 @@ businesses: string;

};
declare type GeocoderSearchType = keyof typeof geocoderSearchTypes;
declare type SearchOptions = {
type GeocoderSearchType = keyof typeof geocoderSearchTypes;
type SearchOptions = {
/** Request string represented by a text or {@link LngLat LngLat} point. */

@@ -69,3 +70,3 @@ text: string;

};
declare type RawFeature = {
type RawFeature = {
properties: {

@@ -76,10 +77,10 @@ name: string;

geometry?: {
type: "Point";
type: 'Point';
coordinates: LngLat;
};
};
declare type Feature = RawFeature;
declare type SearchResponse = Feature[];
declare function search(options: SearchOptions): Promise<SearchResponse>;
type Feature = RawFeature;
type SearchResponse = Feature[];
declare function search(options: SearchOptions, config?: Config | undefined): Promise<SearchResponse>;
export { search };
export type { SearchOptions, SearchResponse };
import type { LngLat, LngLatBounds } from "../common/types";
declare const geoSuggestTypes: {
all: string;
toponyms: string;
addresses: string;
organizations: string;
};
declare type SuggestOptions = {
import { Config } from "./config";
type GeoSuggestType = 'all' | 'toponyms' | 'addresses' | 'organizations';
export type SuggestOptions = {
text: string;

@@ -14,3 +10,3 @@ center?: LngLat;

countries?: string;
type?: keyof typeof geoSuggestTypes;
type?: GeoSuggestType;
limit?: number;

@@ -20,21 +16,24 @@ localOnly?: number;

};
declare type ObjectType = "unknown" | "toponym" | "business" | "transit";
type ObjectType = 'unknown' | 'toponym' | 'business' | 'transit';
/** Positions of chars to highlight between */
declare type Highlight = [
type Highlight = [
number,
number
];
declare type TextWithHighlight = {
type TextWithHighlight = {
text: string;
hl: Highlight[];
};
declare type RawSuggestResponseItem = {
export type SuggestResponseItem = {
/** Type of suggested object */
type?: ObjectType;
/** Human-readable object title with matching highlighting */
title: TextWithHighlight;
/** Human-readable object subtitle with matching highlighting */
subtitle?: TextWithHighlight;
/** Object value. Useful for next substitution in ymaps3.search function */
value: string;
};
declare type SuggestResponseItem = RawSuggestResponseItem;
declare type SuggestResponse = SuggestResponseItem[];
declare function suggest(options: SuggestOptions): Promise<SuggestResponse>;
export { suggest };
export type { SuggestOptions, SuggestResponse };
export type SuggestResponse = SuggestResponseItem[];
export declare function suggest(options: SuggestOptions, config?: Config | undefined): Promise<SuggestResponse>;
export {};

@@ -1,2 +0,2 @@

import { GenericComplexEntity, GenericEntity } from './Entities';
import { GenericComplexEntity, GenericEntity } from "./Entities";
export declare const enum TraverseOrder {

@@ -6,7 +6,7 @@ PREORDER = 1,

}
export declare type TraverseOptions = {
export type TraverseOptions = {
readonly order: TraverseOrder;
readonly recurse: (node: GenericComplexEntity<unknown>) => boolean;
};
export declare type TraverseState = TraverseOptions & {
export type TraverseState = TraverseOptions & {
path: {

@@ -13,0 +13,0 @@ node: GenericComplexEntity<unknown>;

@@ -5,3 +5,3 @@ interface Ymaps3Error extends Error {

}
declare type Additional = Record<string, unknown>;
type Additional = Record<string, unknown>;
interface LogErrorOptions {

@@ -24,5 +24,5 @@ message?: string;

}
declare type ErrorLoggerInitFunction = (settings: LogErrorInitSettings) => ErrorLoggerFunction;
declare type ErrorLoggerFunction = (options: LogErrorOptions, error?: Ymaps3Error) => void;
export declare type Ymaps3ReactError = Omit<Ymaps3Error, 'logged'>;
type ErrorLoggerInitFunction = (settings: LogErrorInitSettings) => ErrorLoggerFunction;
type ErrorLoggerFunction = (options: LogErrorOptions, error?: Ymaps3Error) => void;
export type Ymaps3ReactError = Omit<Ymaps3Error, 'logged'>;
export { ErrorLoggerInitFunction };

@@ -29,0 +29,0 @@ export declare function errorLoggerFactory(initLogger: ErrorLoggerInitFunction): void;

@@ -1,4 +0,3 @@

export * from './errorLogger';
export * from './metrics';
export * from './requestCoverage';
export * from './requestMeta';
export * from "./errorLogger";
export * from "./metrics";
export * from "./requestCoverage";

@@ -1,3 +0,3 @@

declare type BooleanFlag = 0 | 1;
declare type JsonpRequest = {
type BooleanFlag = 0 | 1;
type JsonpRequest = {
url: string;

@@ -4,0 +4,0 @@ callbackName: string;

@@ -1,2 +0,2 @@

import type { MetricsConfig } from './requestMeta';
import type { ConfigMetaMetrics } from "../config";
/**

@@ -7,8 +7,8 @@ * @ignore

*/
declare type Metrics = {};
declare type TransportOptions = {
type Metrics = {};
type TransportOptions = {
share?: number;
};
declare type MetricsTransport<T> = (metrics: T, options?: TransportOptions) => void;
declare type CreateTransportOptions = {
type MetricsTransport<T> = (metrics: T, options?: TransportOptions) => void;
type CreateTransportOptions = {
prefix?: string;

@@ -18,6 +18,6 @@ /** Events with share (if defined) less than this value will not be sent, should be in [0, 1] range */

};
export declare function createMetricsTransport<T extends Record<string, unknown>>({ counterId, pageUrl, allowSending }: MetricsConfig, options?: CreateTransportOptions): MetricsTransport<T>;
export declare function createMetricsTransport<T extends Record<string, unknown>>(configMetaMetrics: ConfigMetaMetrics, options?: CreateTransportOptions): MetricsTransport<T>;
export declare const SEND_BOUNDARY: number;
export declare function initMetrics(config: MetricsConfig): void;
export declare function initMetrics(config: ConfigMetaMetrics): void;
export declare function sendMetrics(data: Metrics, options?: TransportOptions): void;
export {};

@@ -1,1 +0,1 @@

export declare function removeUndefined<T>(obj: T, recursive?: boolean): T;
export declare function removeUndefined<T extends {}>(obj: T, recursive?: boolean): T;
import type { ReadonlyLngLat, ZoomRange } from "../../common/types";
export declare type LayerInfo = {
export type LayerInfo = {
id: string;

@@ -8,4 +8,4 @@ zoomRange?: ZoomRange;

};
export declare type Coverage = LayerInfo[];
export type Coverage = LayerInfo[];
declare function requestCoverage(host: string, layers: string[], coordinates: ReadonlyLngLat, zoom: number, lang: string, signal?: AbortSignal): Promise<Coverage>;
export { requestCoverage };

@@ -1,3 +0,3 @@

import type { YMap } from './YMap';
declare type YandexMaps = {
import type { YMap } from "./YMap";
type YandexMaps = {
getLink: (map: YMap) => string;

@@ -4,0 +4,0 @@ open: (map: YMap) => void;

import type { BehaviorType, LngLat, MapMode, Margin, PixelCoordinates, Projection, ReadonlyLngLat, LngLatBounds, ZoomRange, ZoomRounding, WorldOptions, ZoomStrategy, EasingFunctionDescription } from "../../common/types";
import { GenericRootEntity, GenericEntity } from "../Entities";
import type { YMapEntity } from "../YMapEnities";
import { GenericRootEntity } from "../Entities";
import { YMapCopyrightsPosition } from "../YMapCopyrights";

@@ -9,3 +10,3 @@ import { Config } from "../config";

*/
export declare type YMapCenterLocation = {
export type YMapCenterLocation = {
center: LngLat;

@@ -16,3 +17,3 @@ };

*/
export declare type YMapZoomLocation = {
export type YMapZoomLocation = {
zoom: number;

@@ -23,3 +24,3 @@ };

*/
export declare type YMapBoundsLocation = {
export type YMapBoundsLocation = {
bounds: LngLatBounds;

@@ -30,11 +31,11 @@ };

*/
export declare type YMapCenterZoomLocation = YMapCenterLocation & YMapZoomLocation;
export type YMapCenterZoomLocation = YMapCenterLocation & YMapZoomLocation;
/**
* Sets map center and zoom or bounds. Combination of @mixes YMapZoomLocation and YMapBoundsLocation
*/
export declare type YMapLocation = YMapCenterZoomLocation & Partial<YMapBoundsLocation>;
export type YMapLocation = YMapCenterZoomLocation & Partial<YMapBoundsLocation>;
/**
* Observer camera position
*/
export declare type YMapCamera = {
export type YMapCamera = {
/** Map tilt in radians. Can take values from 0 to 45 degrees (degrees * (Math.PI / 180)) */

@@ -48,3 +49,3 @@ tilt?: number;

*/
export declare type YMapLocationRequest = (YMapBoundsLocation | YMapCenterLocation | YMapZoomLocation | YMapCenterZoomLocation) & {
export type YMapLocationRequest = (YMapBoundsLocation | YMapCenterLocation | YMapZoomLocation | YMapCenterZoomLocation) & {
/** Animation duration */

@@ -55,3 +56,3 @@ duration?: number;

};
export declare type YMapCameraRequest = YMapCamera & {
export type YMapCameraRequest = YMapCamera & {
/** Animation duration */

@@ -65,3 +66,3 @@ duration?: number;

*/
export declare type YMapProps = {
export type YMapProps = {
/** Map container css class name */

@@ -83,10 +84,10 @@ className?: string;

zoomStrategy?: ZoomStrategy;
/** Zoom strategy describes if map center is bound to the zoom point or not */
/** Set rounding for zoom. If `auto` is selected, zoom will be `snap` for `raster` and `smooth` for `vector` `MapMode`. Default is `auto`.*/
zoomRounding?: ZoomRounding;
/** Map margins */
margin?: Margin;
/** @internal Other configs */
/** Other configs */
config?: Config;
/** Strategy for fetching hotspots, for whole viewport or for tiles that pointer is hovering at */
hotspotsStrategy?: "forViewport" | "forPointerPosition";
hotspotsStrategy?: 'forViewport' | 'forPointerPosition';
/**

@@ -133,4 +134,5 @@ * Whether to show map copyrights.

readonly config: Config | undefined;
projection: Projection;
}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
/**

@@ -178,3 +180,5 @@ * Main API class. Create a map container.

readonly config: Config | undefined;
projection: Projection;
}>;
/** @internal */
static [reactify.overrideKey]: import("../../reactify/reactify").CustomReactify<YMap, import("react").ForwardRefExoticComponent<YMapProps & {

@@ -191,6 +195,8 @@ children?: import("react").ReactNode;

private _layers;
private _mapCtx;
private _copyrights;
private _coverage;
constructor(rootContainer: HTMLElement, props: YMapProps, children?: GenericEntity<unknown>[]);
constructor(rootContainer: HTMLElement, props: YMapProps, children?: YMapEntity<unknown>[]);
readonly children: YMapEntity<unknown>[];
addChild(child: YMapEntity<unknown>, index?: number): this;
removeChild(child: YMapEntity<unknown>): this;
protected __implGetDefaultProps(): DefaultProps;

@@ -203,2 +209,6 @@ private _canBeMainLayer;

/**
* Main map container
*/
get container(): HTMLElement;
/**
* getter for {@link YMapProps}.location.center prop

@@ -234,2 +244,6 @@ */

/**
* getter for {@link YMapProps}.config prop
*/
get config(): Readonly<Config>;
/**
* setter for {@link YMapProps}.location prop

@@ -266,2 +280,7 @@ * @param location

/**
* setter for {@link YMapProps}.config prop
* @param {Config} config
*/
setConfig(config: Config): void;
/**
* Destroy map and remove it from user DOM-element

@@ -271,8 +290,9 @@ */

private _createMap;
private _correctMode;
private get _correctMode();
protected _onUpdate(propsDiff: Partial<YMapProps>): void;
private _loadVector;
private __onVectorInitFailed;
private __loadVectorEngine;
private __toggleCopyrights;
}
export { YMap, YMapCopyrightsPosition };
export { YMap };

@@ -1,3 +0,3 @@

import { YMapGroupEntity } from '../YMapEnities';
import { YMapGroupEntity } from "../YMapEnities";
export declare class YMapCollection extends YMapGroupEntity<{}> {
}

@@ -1,2 +0,2 @@

export * from './YMapControl';
export * from './YMapControlButton';
export * from "./YMapControl";
export * from "./YMapControlButton";

@@ -1,8 +0,7 @@

import { DomEntity } from '../DomContext';
import { reactify } from '../../reactify';
import { DomEntity } from "../DomContext";
import { reactify } from "../../reactify";
/**
* YMapControl props
*/
export declare type YMapControlProps = {};
export type YMapControlProps = {};
/**

@@ -35,2 +34,3 @@ * DOM wrapper for creating custom controls. Connects the styles required by the control.

export declare class YMapControl<T extends YMapControlProps = YMapControlProps> extends DomEntity<T> {
/** @internal */
static [reactify.overrideKey]: import("../../reactify/reactify").CustomReactify<YMapControl<YMapControlProps>, import("react").ForwardRefExoticComponent<{

@@ -37,0 +37,0 @@ children?: import("react").ReactNode;

@@ -1,8 +0,7 @@

import { DomEntity } from '../DomContext';
import { YMapComplexEntity } from '../YMapEnities';
import { DomEntity } from "../DomContext";
import { YMapComplexEntity } from "../YMapEnities";
/**
* YMapControlButton props
*/
export declare type YMapControlCommonButtonProps = {
export type YMapControlCommonButtonProps = {
/** On click handler */

@@ -21,3 +20,3 @@ onClick?: () => void;

};
export declare type YMapControlButtonProps = YMapControlCommonButtonProps;
export type YMapControlButtonProps = YMapControlCommonButtonProps;
/** @module YMapControlButton */

@@ -56,4 +55,4 @@ /**

constructor(props: YMapControlButtonProps);
update(props: Partial<YMapControlButtonProps>): void;
protected _onUpdate(props: Partial<YMapControlButtonProps>): void;
get text(): string | undefined;
}

@@ -1,14 +0,13 @@

import { DomEntity } from '../DomContext';
declare type VerlicalPosition = 'top' | 'bottom';
declare type HorizontalPosition = 'left' | 'right';
declare type Orientation = 'horizontal' | 'vertical';
import { DomEntity } from "../DomContext";
type VerlicalPosition = 'top' | 'bottom';
type HorizontalPosition = 'left' | 'right';
type Orientation = 'horizontal' | 'vertical';
/**
* Describes controls position.
*/
declare type Position = VerlicalPosition | HorizontalPosition | `${VerlicalPosition} ${HorizontalPosition}` | `${HorizontalPosition} ${VerlicalPosition}`;
type Position = VerlicalPosition | HorizontalPosition | `${VerlicalPosition} ${HorizontalPosition}` | `${HorizontalPosition} ${VerlicalPosition}`;
/**
* YMapControls props
*/
export declare type YMapControlsProps = {
export type YMapControlsProps = {
/** Controls position. */

@@ -15,0 +14,0 @@ position: Position;

@@ -1,6 +0,4 @@

import { DomEntity } from '../DomContext';
declare type YMapCopyrightsPosition = 'top left' | 'top right' | 'bottom left' | 'bottom right';
declare type YMapCopyrightsProps = {
import { DomEntity } from "../DomContext";
type YMapCopyrightsPosition = 'top left' | 'top right' | 'bottom left' | 'bottom right';
type YMapCopyrightsProps = {
/** Position of copyright on the map */

@@ -12,3 +10,3 @@ position?: YMapCopyrightsPosition;

}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
/**

@@ -31,3 +29,3 @@ * The copyright display component on the map.

private _userAgreementState;
private _unwatchUserAgreementChange?;
private _unwatchMapContext?;
constructor(props?: YMapCopyrightsProps);

@@ -34,0 +32,0 @@ protected __implGetDefaultProps(): DefaultProps;

@@ -1,2 +0,2 @@

import { YMapComplexEntity } from '../YMapEnities';
import { YMapComplexEntity } from "../YMapEnities";
interface YMapCoverageProps {

@@ -12,3 +12,3 @@ onError?: (e: Error) => void;

private _prevMeta;
private _unwatchMeta;
private _unwatchMapContext?;
constructor(props?: YMapCoverageProps);

@@ -15,0 +15,0 @@ protected _onAttach(): void;

@@ -1,6 +0,6 @@

import { YMapComplexEntity } from '../YMapEnities';
import { YMapComplexEntity } from "../YMapEnities";
/**
* YMapDefaultFeaturesLayer props
*/
declare type YMapDefaultFeaturesLayerProps = {
type YMapDefaultFeaturesLayerProps = {
/** Should show layer. Default is true */

@@ -15,3 +15,3 @@ visible?: boolean;

}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
/**

@@ -18,0 +18,0 @@ * Map defaults layer to show features on map.

@@ -6,3 +6,3 @@ import type { VectorCustomization } from "../../common/types";

*/
declare type YMapDefaultSchemeLayerProps = {
type YMapDefaultSchemeLayerProps = {
/** Should show layer */

@@ -18,3 +18,3 @@ visible?: boolean;

/** Theme applied to the scheme */
theme?: "dark" | "light";
theme?: 'dark' | 'light';
};

@@ -45,3 +45,3 @@ declare const defaultProps: {

};
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
/**

@@ -86,2 +86,3 @@ * Map default layer to show yandex scheme on map.

private _layers;
private _unwatchMapContext?;
protected __implGetDefaultProps(): DefaultProps;

@@ -92,4 +93,5 @@ protected _onAttach(): void;

private _createTileUrl;
private _getProjectionQuery;
private _getDataSourceDescription;
}
export { YMapDefaultSchemeLayer, YMapDefaultSchemeLayerProps };

@@ -1,9 +0,18 @@

import type { YMap } from './YMap';
import { GenericComplexEntity, GenericEntity, GenericGroupEntity, Context } from './Entities';
declare abstract class YMapEntity<Props, DefaultProps = {}> extends GenericEntity<Props, DefaultProps, YMap> {
import type { YMap } from "./YMap";
import { GenericComplexEntity, GenericEntity, GenericGroupEntity, Context } from "./Entities";
declare abstract class YMapEntity<Props, DefaultProps extends {} = {}> extends GenericEntity<Props, DefaultProps, YMap> {
get root(): null | YMap;
get parent(): null | YMapComplexEntity<unknown>;
}
declare abstract class YMapComplexEntity<Props, DefaultProps = {}> extends GenericComplexEntity<Props, DefaultProps, YMap> implements YMapEntity<Props, DefaultProps> {
declare abstract class YMapComplexEntity<Props, DefaultProps extends {} = {}> extends GenericComplexEntity<Props, DefaultProps, YMap> implements YMapEntity<Props, DefaultProps> {
get root(): null | YMap;
get parent(): null | YMapComplexEntity<unknown>;
}
declare abstract class YMapGroupEntity<Props, DefaultProps = {}> extends GenericGroupEntity<Props, DefaultProps, YMap> implements YMapComplexEntity<Props, DefaultProps> {
declare abstract class YMapGroupEntity<Props, DefaultProps extends {} = {}> extends GenericGroupEntity<Props, DefaultProps, YMap> implements YMapComplexEntity<Props, DefaultProps> {
get root(): null | YMap;
get parent(): null | YMapComplexEntity<unknown>;
readonly children: readonly YMapEntity<unknown>[];
addChild(child: YMapEntity<unknown>, index?: number): this;
removeChild(child: YMapEntity<unknown>): this;
}
export { YMapEntity, YMapComplexEntity, YMapGroupEntity, Context as YMapContext };

@@ -1,2 +0,2 @@

import type { DrawingStyle } from "../../common/types";
import type { DrawingStyle, GenericGeometry, LngLat } from "../../common/types";
import type { DraggableProps, FeatureClickEvents } from "./types";

@@ -8,3 +8,3 @@ import { YMapEntity } from "../YMapEnities";

*/
declare type YMapFeatureProps = {
type YMapFeatureProps = {
id?: string;

@@ -19,3 +19,3 @@ geometry: Geometry;

}>;
declare type DefaultProps = typeof defaultProps & {
type DefaultProps = typeof defaultProps & {
id: string;

@@ -55,2 +55,3 @@ };

get properties(): Record<string, unknown> | undefined;
get geometry(): GenericGeometry<LngLat>;
protected _onAttach(): void;

@@ -57,0 +58,0 @@ protected _onDetach(): void;

@@ -33,6 +33,3 @@ import type { LineStringGeometry, Margin, MultiLineStringGeometry, MultiPolygonGeometry, PointGeometry, PolygonGeometry } from "../../common/types";

}
export declare type Geometry = PolygonGeometry | MultiPolygonGeometry | LineStringGeometry | MultiLineStringGeometry | PointGeometry;
/**
* YMapFeature events handler
*/
export declare type YMapFeatureEventHandler = (coordinates: Geometry["coordinates"]) => void | false;
export type Geometry = PolygonGeometry | MultiPolygonGeometry | LineStringGeometry | MultiLineStringGeometry | PointGeometry;
export type YMapFeatureEventHandler = (coordinates: Geometry['coordinates']) => void | false;

@@ -1,6 +0,6 @@

import { YMapEntity } from '../YMapEnities';
import { YMapEntity } from "../YMapEnities";
/**
* YMapFeatureDataSource props
*/
declare type YMapFeatureDataSourceProps = {
type YMapFeatureDataSourceProps = {
/** Data source id */

@@ -7,0 +7,0 @@ id: string;

@@ -6,3 +6,3 @@ import type { RasterLayerOptions } from "../../common/types";

*/
declare type YMapLayerProps = {
type YMapLayerProps = {
/** Layer id */

@@ -24,3 +24,3 @@ id?: string;

}>;
declare type DefaultProps = typeof defaultProps & {
type DefaultProps = typeof defaultProps & {
id: string;

@@ -27,0 +27,0 @@ };

@@ -15,11 +15,11 @@ import type { IndoorPlan, PixelCoordinates } from "../../common/types";

}
declare type HandlerEntity<TType extends string, TEntity> = {
type HandlerEntity<TType extends string, TEntity> = {
type: TType;
entity: TEntity;
};
export declare type DomEventHandlerObject = HandlerEntity<"feature", YMapFeature> | HandlerEntity<"marker", YMapMarker> | HandlerEntity<"hotspot", YMapHotspot> | undefined;
export declare type DomEventHandler = (object: DomEventHandlerObject, event: DomEvent) => void;
declare type Location = Required<YMapLocation>;
export type DomEventHandlerObject = HandlerEntity<'feature', YMapFeature> | HandlerEntity<'marker', YMapMarker> | HandlerEntity<'hotspot', YMapHotspot> | undefined;
export type DomEventHandler = (object: DomEventHandlerObject, event: DomEvent) => void;
type Location = Required<YMapLocation>;
interface UpdateObject {
type: "update";
type: 'update';
location: Location;

@@ -30,14 +30,14 @@ camera: YMapCamera;

interface ResizeObject {
type: "resize";
type: 'resize';
size: Readonly<PixelCoordinates>;
mapInAction: boolean;
}
declare type MapEventHandler<TObject> = (object: TObject) => void;
export declare type MapEventUpdateHandler = MapEventHandler<UpdateObject>;
export declare type MapEventResizeHandler = MapEventHandler<ResizeObject>;
export declare type IndoorPlansHandler = (object: {
type MapEventHandler<TObject> = (object: TObject) => void;
export type MapEventUpdateHandler = MapEventHandler<UpdateObject>;
export type MapEventResizeHandler = MapEventHandler<ResizeObject>;
export type IndoorPlansHandler = (object: {
type: IndoorPlanType;
indoorPlans: readonly IndoorPlan[] | null;
}) => void;
export declare type BehaviorMapEventHandler = (object: {
export type BehaviorMapEventHandler = (object: {
type: BehaviorType;

@@ -47,3 +47,3 @@ location: Location;

}) => void;
export declare type DomEvents = {
export type DomEvents = {
onTouchStart: DomEventHandler;

@@ -68,3 +68,3 @@ onTouchMove: DomEventHandler;

};
export declare type MapEvents = {
export type MapEvents = {
onUpdate: MapEventUpdateHandler;

@@ -75,14 +75,14 @@ onResize: MapEventResizeHandler;

};
export declare type BehaviorEvents = {
export type BehaviorEvents = {
onActionStart: BehaviorMapEventHandler;
onActionEnd: BehaviorMapEventHandler;
};
declare type IndoorPlanType = "indoorPlansChanged";
export declare type NullablePartial<T> = {
type IndoorPlanType = 'indoorPlansChanged';
export type NullablePartial<T> = {
[P in keyof T]?: T[P] | null;
};
declare type DomEventsProps = Partial<DomEvents> & {
type DomEventsProps = Partial<DomEvents> & {
layer?: string;
};
declare type YMapListenerProps = DomEventsProps | NullablePartial<MapEvents> | NullablePartial<BehaviorEvents>;
type YMapListenerProps = DomEventsProps | NullablePartial<MapEvents> | NullablePartial<BehaviorEvents>;
/**

@@ -89,0 +89,0 @@ * A component for handling events of the map and its child elements. DOM events are also hung through this component.

@@ -8,7 +8,7 @@ import type { LngLat } from "../../common/types";

*/
declare type YMapMarkerEventHandler = (coordinates: LngLat) => void | false;
type YMapMarkerEventHandler = (coordinates: LngLat) => void | false;
/**
* YMapMarker props
*/
declare type YMapMarkerProps = {
type YMapMarkerProps = {
/** Coordinates of the marker */

@@ -30,3 +30,3 @@ coordinates: LngLat;

}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
/**

@@ -42,3 +42,3 @@ * The marker component on the map. Allows you to insert your own DOM implementation of the marker.

* map.addChild(new YMapMarker({
* coordinates: [54, 34],
* coordinates: [37, 55],
* draggable: true

@@ -59,2 +59,3 @@ * }, content));

}>;
/** @internal */
static [reactify.overrideKey]: import("../../reactify/reactify").CustomReactify<YMapMarker, import("react").ForwardRefExoticComponent<{

@@ -96,6 +97,7 @@ /** Coordinates of the marker */

get properties(): Record<string, unknown> | undefined;
get coordinates(): LngLat;
_onAttach(): void;
_onDetach(): void;
protected _onUpdate({ coordinates, ...props }: Partial<YMapMarkerProps>): void;
protected _onUpdate({ coordinates, zIndex, ...props }: Partial<YMapMarkerProps>): void;
}
export { YMapMarker, YMapMarkerProps, YMapMarkerEventHandler };

@@ -1,5 +0,5 @@

import type TReact from 'react';
import type { Context } from '../Entities';
import { reactify } from '../../reactify';
import { YMapGroupEntity } from '../YMapEnities';
import type TReact from "react";
import type { Context } from "../Entities";
import { reactify } from "../../reactify";
import { YMapGroupEntity } from "../YMapEnities";
interface YMapReactContainerPropsImpl<TContext> {

@@ -18,4 +18,4 @@ onElement: (element?: Element) => void;

};
declare type DefaultProps = typeof defaultProps;
declare type ComputedYMapReactContainerProps<TContext> = YMapReactContainerProps<TContext> & YMapReactContainerPropsImpl<TContext>;
type DefaultProps = typeof defaultProps;
type ComputedYMapReactContainerProps<TContext> = YMapReactContainerProps<TContext> & YMapReactContainerPropsImpl<TContext>;
declare class YMapReactContainer extends YMapGroupEntity<ComputedYMapReactContainerProps<unknown>, DefaultProps> {

@@ -25,2 +25,3 @@ static defaultProps: {

};
/** @internal */
static [reactify.overrideKey]: import("../../reactify/reactify").CustomReactify<YMapReactContainer, TReact.FC<YMapReactContainerProps<unknown> & {

@@ -27,0 +28,0 @@ children?: TReact.ReactNode;

@@ -6,3 +6,3 @@ import type { RasterTileDataSourceDescription, ZoomRange } from "../../common/types";

*/
declare type YMapTileDataSourceProps = {
type YMapTileDataSourceProps = {
/** Data source id */

@@ -9,0 +9,0 @@ id: string;

@@ -1,7 +0,7 @@

import './modules/types';
import './packages/types';
export declare type Module = Function | null | {
import "./modules/types";
import "./packages/types";
export type Module = Function | null | {
[key: string]: Function | object;
};
export declare type Loader = (pkg: string) => Promise<Module> | Module;
export type Loader = (pkg: string) => Promise<Module> | Module;
export interface Import {

@@ -23,4 +23,7 @@ /** @internal */

const __PACKAGES__: string[];
const __VENDOR__: 'yandex' | 'mappable';
const __NAMESPACE__: 'ymaps3' | 'mappable';
const __LOGO_WIDHT__: `${number}px`;
}
declare const ymaps3Import: Import;
export { ymaps3Import };

@@ -1,12 +0,10 @@

import './modules/types';
import './packages/types';
export * from './imperative';
import "./modules/types";
import "./packages/types";
export * from "./imperative";
export * from "./common/types";
export const ready: Promise<void>;
declare const import_: import('./import').Import;
export {import_ as import};
declare const import_: import("./import").Import;
export { import_ as import };
declare global {
const ymaps3: typeof import('./index');
const ymaps3: typeof import("./index");
}

@@ -1,4 +0,4 @@

export * from './imperative';
export * from "./imperative";
/** Toggle this to enable/disable strict mode. */
export declare let strictMode: boolean;
export declare const __DTS_HIDDEN_BEGIN__: unknown;

@@ -1,1 +0,1 @@

export * from './YMapOpenMapsButton';
export * from "./YMapOpenMapsButton";

@@ -1,7 +0,6 @@

import { YMapGroupEntity } from '../../../imperative/YMapEnities';
import { YMapGroupEntity } from "../../../imperative/YMapEnities";
/**
* YMapOpenMapsButton props
*/
declare type YMapOpenMapsButtonProps = {
type YMapOpenMapsButtonProps = {
/** Button title */

@@ -19,2 +18,3 @@ title?: string;

* const controls = new YMapControls({position: 'bottom left'});
* const {YMapOpenMapsButton} = await ymaps3.import('@yandex/ymaps3-controls-extra');
* const openMapsButton = new YMapOpenMapsButton({});

@@ -21,0 +21,0 @@ * controls.addChild(openMapsButton);

@@ -1,1 +0,1 @@

export * from './YMapFeatureEditor';
export * from "./YMapFeatureEditor";

@@ -1,3 +0,2 @@

export * from './defaults';
export * from './YMapFeatureEditor';
export * from "./defaults";
export * from "./YMapFeatureEditor";
import type { LngLat, DrawingStyle, GenericLineStringGeometry, GenericPolygonGeometry } from "../../../common/types";
import type { DomEntity } from "../../../imperative/DomContext";
export declare type Geometry = GenericPolygonGeometry<LngLat> | GenericLineStringGeometry<LngLat>;
export type Geometry = GenericPolygonGeometry<LngLat> | GenericLineStringGeometry<LngLat>;
export interface DraggingPoint {

@@ -12,3 +12,3 @@ point: LngLat;

}
export declare type YMapFeatureEditorProps = {
export type YMapFeatureEditorProps = {
isActive?: boolean;

@@ -15,0 +15,0 @@ points: LngLat[];

@@ -1,3 +0,3 @@

import { YMapComplexEntity } from '../../../imperative/YMapEnities';
declare type YMapCustomDomLayerProps = {
import { YMapComplexEntity } from "../../../imperative/YMapEnities";
type YMapCustomDomLayerProps = {
id: string;

@@ -4,0 +4,0 @@ zIndex: number;

@@ -1,5 +0,5 @@

import { YMapComplexEntity } from '../../../imperative/YMapEnities';
import type { YMapFeatureEditorProps } from './interface';
import { YMapFeatureEditorDefaultPreviewPoint } from './YMapFeatureEditorDefaultPreviewPoint';
import { YMapFeatureEditorDefaultPoint } from './YMapFeatureEditorDefaultPoint';
import { YMapComplexEntity } from "../../../imperative/YMapEnities";
import type { YMapFeatureEditorProps } from "./interface";
import { YMapFeatureEditorDefaultPreviewPoint } from "./YMapFeatureEditorDefaultPreviewPoint";
import { YMapFeatureEditorDefaultPoint } from "./YMapFeatureEditorDefaultPoint";
declare const defaultProps: Readonly<{

@@ -15,3 +15,3 @@ isActive: true;

}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
declare class YMapFeatureEditor extends YMapComplexEntity<YMapFeatureEditorProps, DefaultProps> {

@@ -18,0 +18,0 @@ static defaultProps: Readonly<{

@@ -1,2 +0,2 @@

import { DomEntity } from '../../../imperative/DomContext';
import { DomEntity } from "../../../imperative/DomContext";
declare class YMapFeatureEditorDefaultPoint extends DomEntity<{}> {

@@ -3,0 +3,0 @@ protected _createDom(): {

@@ -1,3 +0,2 @@

import { DomEntity } from '../../../imperative/DomContext';
import { DomEntity } from "../../../imperative/DomContext";
declare class YMapFeatureEditorDefaultPreviewPoint extends DomEntity<{}> {

@@ -4,0 +3,0 @@ protected _createDom(): HTMLElement;

@@ -1,9 +0,7 @@

import '../import';
import "../import";
declare module '../import' {
interface Import {
(pkg: '@yandex/ymaps3-utils'): Promise<typeof import('./utils')>;
(pkg: '@yandex/ymaps3-editors'): Promise<typeof import('./editors')>;
(pkg: '@yandex/ymaps3-controls-extra'): Promise<typeof import('./controls-extra')>;
(pkg: '@yandex/ymaps3-reactify'): Promise<typeof import('../reactify')>;
(pkg: '@yandex/ymaps3-controls-extra'): Promise<typeof import("./controls-extra")>;
(pkg: '@yandex/ymaps3-reactify'): Promise<typeof import("../reactify")>;
}
}

@@ -1,1 +0,1 @@

export * from './YMapCursor';
export * from "./YMapCursor";

@@ -1,4 +0,4 @@

import { YMapComplexEntity, YMapEntity } from '../../../imperative/YMapEnities';
import type { YMapHotspot } from '../../../imperative/YMapHotspot';
declare type YMapCursorProps = {
import { YMapComplexEntity, YMapEntity } from "../../../imperative/YMapEnities";
import type { YMapHotspot } from "../../../imperative/YMapHotspot";
type YMapCursorProps = {
/** Layer to follow */

@@ -16,3 +16,3 @@ layer?: string;

}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
declare class YMapCursor extends YMapComplexEntity<YMapCursorProps, DefaultProps> {

@@ -22,3 +22,3 @@ static defaultProps: Readonly<{

cursor: "pointer";
isActive: (object: YMapHotspot | YMapEntity<unknown, {}>) => boolean;
isActive: (object: YMapEntity<unknown, {}> | YMapHotspot) => boolean;
}>;

@@ -25,0 +25,0 @@ constructor(props: YMapCursorProps);

{
"name": "@yandex/ymaps3-types",
"version": "0.0.5",
"version": "0.0.6",
"description": "Types for ymaps3 maps library",

@@ -5,0 +5,0 @@ "main": "",

import type { Projection, LngLat, WorldCoordinates } from "../../common/types";
/**
* Создает проекцию прямоугольной координатной области в мировые координаты.
* Размер области в пикселях всегда 2*2.
* Creates a projection of a rectangular coordinate area into world coordinates.
* The area size in pixels is always 2*2.
*
* @name Cartesian
* @class Декартова проекция прямоугольной области.
* @class Cartesian projection of a rectangular area.
* @augments Projection
* @param {[[Number, Number], [Number, Number]]} bounds Массив из двух точек -
* координат левого нижнего и правого верхнего углов прямоугольной координатной области.
* @param {Boolean[]} [cycled=[false, false]] Массив из признаков зацикленности карты по x и y.
* @param {[[Number, Number], [Number, Number]]} bounds An array of two points -
* coordinates of the lower left and upper right corners of the rectangular coordinate area.
* @param {Boolean[]} [cycled=[false, false]] An array of signs of map looping by x and y.
* @example

@@ -16,3 +16,3 @@ * ```js

* const {YMaps} = ymaps3;
* // Вычисляем размер всех тайлов на максимальном зуме.
* // Calculate the size of all tiles at the maximum zoom.
* const worldSize = Math.pow(2, MAX_ZOOM) * 256;

@@ -23,3 +23,3 @@ * const PIC_WIDTH = 2526;

* const {Cartesian} = await ymaps3.import('@yandex/ymaps3-cartesian-projection@0.0.1');
* // Задаем в качестве проекции Декартову. При данном расчёте центр изображения будет лежать в координатах [0, 0].
* // We set as a projection Cartesian. With this calculation, the center of the image will lie in the coordinates [0, 0].
* const projection = new Cartesian([

@@ -26,0 +26,0 @@ * [-PIC_WIDTH / 2, PIC_HEIGHT / 2 - worldSize],

@@ -1,1 +0,1 @@

export * from './YMapClusterer/index';
export * from "./YMapClusterer/index";

@@ -1,3 +0,3 @@

type Module = import('../../../reactify').ReactifiedModule<typeof import('../index')>;
type Module = import("../../../reactify").ReactifiedModule<typeof import("../index")>;
declare const module: Module;
export = module;

@@ -1,3 +0,3 @@

export * from './interface';
export * from './YMapClusterer';
export * from './methods';
export * from "./interface";
export * from "./YMapClusterer";
export * from "./methods";
import type { YMap, YMapEntity } from "../../..";
import type { LngLat, WorldCoordinates, GenericPointFeature } from "../../../common/types";
/** Represents object on a map (either cluster or feature) */
declare type ClustererObject = {
type ClustererObject = {
world: WorldCoordinates;

@@ -11,5 +11,5 @@ lnglat: LngLat;

/** Feature to clusterize on a map */
declare type Feature = GenericPointFeature<LngLat>;
type Feature = GenericPointFeature<LngLat>;
/** Cluster that contains cluster or feature and its sum of coordinates */
declare type Cluster = {
type Cluster = {
sumX: number;

@@ -20,5 +20,5 @@ sumY: number;

};
declare type ClustersCollection = Map<string, Cluster>;
type ClustersCollection = Map<string, Cluster>;
/** Props for rendering */
declare type RenderProps = {
type RenderProps = {
map: YMap;

@@ -28,3 +28,3 @@ features: Feature[];

/** Represents map of entities with its id */
declare type EntitiesMap = Record<string, YMapEntity<unknown> | undefined>;
type EntitiesMap = Record<string, YMapEntity<unknown> | undefined>;
/** Interface of method class*/

@@ -31,0 +31,0 @@ interface IClusterMethod {

@@ -1,4 +0,4 @@

import type { IClusterMethod } from '../interface';
import type { IClusterMethod } from "../interface";
export declare function clusterByGrid({ gridSize }: {
gridSize: number;
}): IClusterMethod;

@@ -1,1 +0,1 @@

export { clusterByGrid } from './clusterByGrid';
export { clusterByGrid } from "./clusterByGrid";

@@ -36,3 +36,3 @@ import type TReact from "react";

*/
declare type YMapClustererReactifiedProps = YMapClustererProps & {
type YMapClustererReactifiedProps = YMapClustererProps & {
/** Function that returns YMapMarker react component to render marker*/

@@ -43,4 +43,4 @@ marker: (feature: Feature) => TReact.ReactElement;

};
declare type YMapClustererR = TReact.ForwardRefExoticComponent<YMapClustererReactifiedProps & React.RefAttributes<YMapEntity<YMapClustererReactifiedProps>>>;
type YMapClustererR = TReact.ForwardRefExoticComponent<YMapClustererReactifiedProps & React.RefAttributes<YMapEntity<YMapClustererReactifiedProps>>>;
export declare const YMapClustererReactifyOverride: CustomReactify<YMapClustererI, YMapClustererR>;
export {};

@@ -8,3 +8,3 @@ import type { YMapEntity } from "../../..";

*/
declare type YMapClustererProps = {
type YMapClustererProps = {
/** Clusterisation method */

@@ -23,3 +23,3 @@ method: IClusterMethod;

};
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
declare const defaultProps: Readonly<{

@@ -56,2 +56,3 @@ tickTimeout: 100;

}>;
/** @internal */
static [reactify.overrideKey]: import("../../../reactify/reactify").CustomReactify<YMapClusterer, import("react").ForwardRefExoticComponent<YMapClustererProps & {

@@ -58,0 +59,0 @@ marker: (feature: Feature) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;

@@ -1,2 +0,2 @@

export { YMapZoomControl, YMapZoomControlProps } from './YMapZoomControl';
export { YMapGeolocationControl, YMapGeolocationControlProps } from './YMapGeolocationControl';
export { YMapZoomControl, YMapZoomControlProps } from "./YMapZoomControl";
export { YMapGeolocationControl, YMapGeolocationControlProps } from "./YMapGeolocationControl";

@@ -1,3 +0,3 @@

type Module = import('../../../reactify').ReactifiedModule<typeof import('../index')>;
type Module = import("../../../reactify").ReactifiedModule<typeof import("../index")>;
declare const module: Module;
export = module;

@@ -5,3 +5,3 @@ import type { EasingFunctionDescription, LngLat } from "../../../common/types";

*/
declare type YMapGeolocationControlProps = {
type YMapGeolocationControlProps = {
/** Geolocation request callback */

@@ -19,3 +19,3 @@ onGeolocatePosition?: (position: LngLat) => void;

}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
/**

@@ -42,2 +42,3 @@ * Display geolocation control on a map.

private _element;
private _unwatchMapContext?;
constructor(props: YMapGeolocationControlProps);

@@ -51,2 +52,3 @@ protected __implGetDefaultProps(): DefaultProps;

protected _onAttach(): void;
protected _onDetach(): void;
protected _onUpdate(props: Partial<YMapGeolocationControlProps>): void;

@@ -53,0 +55,0 @@ private _initMarker;

@@ -1,2 +0,1 @@

declare class YMapControlSpinner extends ymaps3.YMapComplexEntity<{}> {

@@ -3,0 +2,0 @@ private _detachDom?;

@@ -7,3 +7,3 @@ import type { EasingFunctionDescription } from "../../../common/types";

*/
declare type YMapZoomControlProps = {
type YMapZoomControlProps = {
/** Easing function for map location animation */

@@ -17,3 +17,3 @@ easing?: EasingFunctionDescription;

}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
/**

@@ -25,2 +25,3 @@ * Display zoom control on a map.

* const controls = new YMapControls({position: 'right'});
* const {YMapZoomControl} = await ymaps3.import('@yandex/ymaps3-controls@0.0.1');
* const zoomControl = new YMapZoomControl();

@@ -27,0 +28,0 @@ * controls.addChild(zoomControl);

@@ -1,3 +0,2 @@

import * as ymaps3 from '../imperative';
import { packConfig } from '../imperative/config';
export { packConfig, ymaps3 };
import * as ymaps3 from "../imperative";
export { ymaps3 };

@@ -1,1 +0,1 @@

export { YMapHint, YMapHintContext } from './YMapHint';
export { YMapHint, YMapHintContext } from "./YMapHint";

@@ -1,3 +0,3 @@

type Module = import('../../../reactify').ReactifiedModule<typeof import('../index')>;
type Module = import("../../../reactify").ReactifiedModule<typeof import("../index")>;
declare const module: Module;
export = module;

@@ -5,7 +5,40 @@ import type TReact from "react";

import { reactify } from "../../../reactify";
declare type YMapHintProps = {
type YMapHintProps = {
hint: (object: YMapFeature | YMapMarker | YMapHotspot | undefined) => unknown;
};
declare const YMapHintContext: import("../../../imperative/Entities").Context<unknown>;
/**
* Display hint on map elements.
*
* @example
* ```javascript
* const {YMapHint, YMapHintContext} = await ymaps3.import('@yandex/ymaps3-hint@0.0.1');
* map.addChild(defaultFeatures = new YMapDefaultFeaturesLayer());
* map.addChild(hint = YMapHint({
* layers: [defaultFeatures.layer],
* hint: object => object?.properties?.hint
* }));
*
* const {YMapDefaultMarker} = await ymaps3.import('@yandex/ymaps3-markers@0.0.1');
* map.addChild(new YMapDefaultMarker({coordinates: [37, 55], properties: {hint: 'Hello world!'}}));
*
* hint.addChild(new class MyHint extends ymaps3.YMapEntity {
* _onAttach() {
* this._element = document.createElement('div');
* this._element.className = 'my-hint';
*
* this._detachDom = ymaps3.useDomContext(this, this._element);
* this._watchContext(YMapHintContext, () => {
* this._element.textContent = this._consumeContext(YMapHintContext)?.hint;
* }, {immediate: true});
* }
*
* _onDetach() {
* this._detachDom();
* }
* });
* ```
*/
declare class YMapHint extends ymaps3.YMapGroupEntity<YMapHintProps> {
/** @internal */
static [reactify.overrideKey]: CustomReactify<YMapHint, TReact.FC<YMapHintProps>>;

@@ -17,10 +50,10 @@ private _destroyDomContext;

constructor(props: YMapHintProps);
_positionHintElement([x, y]: [
protected _positionHintElement(screenCoordinates: [
number,
number
]): void;
_toggleHint(add: boolean): void;
_onAttach(): void;
_onDetach(): void;
protected _toggleHint(add: boolean): void;
protected _onAttach(): void;
protected _onDetach(): void;
}
export { YMapHint, YMapHintContext };

@@ -1,1 +0,1 @@

export { YMapDefaultMarker, YMapDefaultMarkerProps } from './YMapDefaultMarker';
export { YMapDefaultMarker, YMapDefaultMarkerProps } from "./YMapDefaultMarker";

@@ -1,3 +0,3 @@

type Module = import('../../../reactify').ReactifiedModule<typeof import('../index')>;
type Module = import("../../../reactify").ReactifiedModule<typeof import("../index")>;
declare const module: Module;
export = module;

@@ -0,4 +1,5 @@

import type { LngLat } from "../../../common/types";
import type { YMapMarkerProps } from "../../../imperative/YMapMarker";
import { reactify } from "../../../reactify";
declare type DefaultMarkerCustomProps = {
type DefaultMarkerCustomProps = {
/** Marker title */

@@ -15,3 +16,3 @@ title?: string;

/** Popup position */
position: "left" | "right" | "top";
position: 'left' | 'right' | 'top';
/** Should popup hide marker. Default is false */

@@ -24,7 +25,7 @@ hidesMarker?: boolean;

*/
declare type YMapDefaultMarkerProps = YMapMarkerProps & DefaultMarkerCustomProps;
type YMapDefaultMarkerProps = YMapMarkerProps & DefaultMarkerCustomProps;
declare const defaultProps: Readonly<{
color: "#f33";
}>;
declare type DefaultProps = typeof defaultProps;
type DefaultProps = typeof defaultProps;
/**

@@ -35,2 +36,3 @@ * Default marker.

* ```javascript
* const {YMapDefaultMarker} = await ymaps3.import('@yandex/ymaps3-markers@0.0.1');
* map.addChild(new YMapDefaultMarker({

@@ -45,4 +47,8 @@ * coordinates: [34, 54],

declare class YMapDefaultMarker extends ymaps3.YMapComplexEntity<YMapDefaultMarkerProps, DefaultProps> {
static defaultProps: Readonly<{
color: "#f33";
}>;
/** @internal */
static [reactify.overrideKey]: import("../../../reactify/reactify").CustomReactify<YMapDefaultMarker, import("react").ForwardRefExoticComponent<{
coordinates: import("../../../common/types/lng-lat").LngLat;
coordinates: LngLat;
source?: string | undefined;

@@ -52,8 +58,5 @@ zIndex?: number | undefined;

id?: string | undefined;
} & import("../../../imperative/YMapFeature/types").DraggableProps<import("@yandex/ymaps3-types/imperative/YMapMarker").YMapMarkerEventHandler> & import("../../../imperative/YMapFeature/types").FeatureClickEvents & DefaultMarkerCustomProps & {
} & 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, {}>>>>;
static defaultProps: Readonly<{
color: "#f33";
}>;
private _marker;

@@ -64,4 +67,6 @@ private _container;

private _popupProps;
get coordinates(): LngLat;
constructor(props: YMapDefaultMarkerProps);
private _createMarker;
private __onElementClick;
protected __implGetDefaultProps(): DefaultProps;

@@ -68,0 +73,0 @@ private _togglePopup;

@@ -5,5 +5,5 @@ import type TReactNamespace from "react";

import { YMapDefaultMarker, YMapDefaultMarkerProps } from "../index";
declare type YMapDefaultMarkerContainerProps = TReactNamespace.PropsWithChildren<YMapDefaultMarkerProps>;
declare type YMapDefaultMarkerR = TReactNamespace.ForwardRefExoticComponent<YMapDefaultMarkerContainerProps & React.RefAttributes<YMapEntity<YMapDefaultMarkerProps>>>;
type YMapDefaultMarkerContainerProps = TReactNamespace.PropsWithChildren<YMapDefaultMarkerProps>;
type YMapDefaultMarkerR = TReactNamespace.ForwardRefExoticComponent<YMapDefaultMarkerContainerProps & React.RefAttributes<YMapEntity<YMapDefaultMarkerProps>>>;
export declare const YMapDefaultMarkerReactifyOverride: CustomReactify<YMapDefaultMarker, YMapDefaultMarkerR>;
export {};

@@ -1,31 +0,38 @@

import type { Projection, LngLat, WorldCoordinates } from "../../common/types";
export declare class SphericalMercator implements Projection {
private _subequator;
private _halfEquator;
private _pixelsPerMeter;
private _e;
private _e2;
private _e4;
private _e6;
private _e8;
private _subradius;
private _d2;
private _d4;
private _d6;
private _d8;
private _radius;
constructor(options?: {
radius: number;
});
toWorldCoordinates(coords: LngLat): WorldCoordinates;
fromWorldCoordinates(point: WorldCoordinates): LngLat;
private _globalPixelXToGeo;
private _geoToMercator;
private _longitudeToX;
private _latitudeToY;
/**
* Converts altitude to z coordinate by applying mercator distortion.
*/
private _altitudeToZ;
private _yToLatitude;
}
import type { Projection } from "../../common/types";
/**
* @class Mercator projection onto a sphere.
* Used by many mapping services, in particular OpenStreetMap.
* @name projection.sphericalMercator
* @augments Projection
* @static
* @example
* ```js
* const { SphericalMercator } = await ymaps3.import('@yandex/ymaps3-spherical-mercator-projection@0.0.1');
* // Create a map in the spherical Mercator projection
* const map = new ymaps3.YMap(document.getElementById('YMapsID'), {
* location: {
* center: [37, 55],
* zoom: 6
* },
* projection: new SphericalMercator()
* });
* const dataSourceProps = {
* raster: {
* type: 'ground',
* fetchTile: "https://tile.openstreetmap.org/{{z}}/{{y}}/{{x}}"
* }
* };
* // Add osm tiles
* const dataSource = new ymaps3.YMapTileDataSource({
* id: "osmSource",
* ...dataSourceProps,
* });
*
* const layer = new ymaps3.YMapLayer({
* id: "osm",
* source: "osmSource",
* type: "ground",
* });
* ```
*/
export declare const SphericalMercator: new () => Projection;

@@ -1,11 +0,11 @@

import '../import';
import "../import";
declare module '../import' {
interface Import {
(pkg: '@yandex/ymaps3-cartesian-projection@0.0.1'): Promise<typeof import('./cartesian-projection')>;
(pkg: '@yandex/ymaps3-spherical-mercator-projection@0.0.1'): Promise<typeof import('./spherical-mercator-projection')>;
(pkg: '@yandex/ymaps3-controls@0.0.1'): Promise<typeof import('./controls')>;
(pkg: '@yandex/ymaps3-markers@0.0.1'): Promise<typeof import('./markers')>;
(pkg: '@yandex/ymaps3-hint@0.0.1'): Promise<typeof import('./hint')>;
(pkg: '@yandex/ymaps3-clusterer@0.0.1'): Promise<typeof import('./clusterer')>;
(pkg: '@yandex/ymaps3-cartesian-projection@0.0.1'): Promise<typeof import("./cartesian-projection")>;
(pkg: '@yandex/ymaps3-spherical-mercator-projection@0.0.1'): Promise<typeof import("./spherical-mercator-projection")>;
(pkg: '@yandex/ymaps3-controls@0.0.1'): Promise<typeof import("./controls")>;
(pkg: '@yandex/ymaps3-markers@0.0.1'): Promise<typeof import("./markers")>;
(pkg: '@yandex/ymaps3-hint@0.0.1'): Promise<typeof import("./hint")>;
(pkg: '@yandex/ymaps3-clusterer@0.0.1'): Promise<typeof import("./clusterer")>;
}
}

@@ -1,9 +0,7 @@

import {Reactify, ReactifiedEntity, ReactifiedModule} from '../reactify';
type Module = ReactifiedModule<typeof import('../main')>;
import { Reactify, ReactifiedEntity, ReactifiedModule } from "../reactify";
type Module = ReactifiedModule<typeof import("../main")>;
declare const module: Module & {
reactify: Reactify;
YMapReactContainer: ReactifiedEntity<typeof import('../imperative/YMapReactContainer').YMapReactContainer>;
YMapReactContainer: ReactifiedEntity<typeof import("../imperative/YMapReactContainer").YMapReactContainer>;
};
export = module;

@@ -1,7 +0,7 @@

import type { Reactify, ReactifyEntity, ReactifiedEntity, ReactifyModule, ReactifiedModule } from './reactify';
import { overrideKey } from './reactify';
declare type TReact = typeof import('react');
declare type TReactDOM = typeof import('react-dom');
import type { Reactify, ReactifyEntity, ReactifiedEntity, ReactifyModule, ReactifiedModule } from "./reactify";
import { overrideKey } from "./reactify";
type TReact = typeof import("react");
type TReactDOM = typeof import("react-dom");
export type { Reactify, ReactifyEntity, ReactifiedEntity, ReactifyModule, ReactifiedModule };
export declare type GenericReactify = {
export type GenericReactify = {
readonly overrideKey: typeof overrideKey;

@@ -8,0 +8,0 @@ bindTo(React: TReact, ReactDOM: TReactDOM): Reactify;

@@ -1,4 +0,4 @@

export * from './YMap';
export * from './YMapControl';
export * from './YMapMarker';
export * from './YMapReactContainer';
export * from "./YMap";
export * from "./YMapControl";
export * from "./YMapMarker";
export * from "./YMapReactContainer";

@@ -1,5 +0,5 @@

import type TReact from 'react';
import type { CustomReactify } from '../reactify';
import type { GenericRootEntity } from '../../imperative/Entities';
import type { YMap as YMapI, YMapProps } from '../../imperative/YMap';
import type TReact from "react";
import type { CustomReactify } from "../reactify";
import type { GenericRootEntity } from "../../imperative/Entities";
import type { YMap as YMapI, YMapProps } from "../../imperative/YMap";
declare global {

@@ -12,8 +12,8 @@ namespace JSX {

}
declare type ComputedYMapProps = YMapProps & {
type ComputedYMapProps = YMapProps & {
container: HTMLElement;
};
declare type YMapContainerProps = TReact.PropsWithChildren<YMapProps>;
declare type YMapR = TReact.ForwardRefExoticComponent<YMapContainerProps & TReact.RefAttributes<GenericRootEntity<ComputedYMapProps>>>;
type YMapContainerProps = TReact.PropsWithChildren<YMapProps>;
type YMapR = TReact.ForwardRefExoticComponent<YMapContainerProps & TReact.RefAttributes<GenericRootEntity<ComputedYMapProps>>>;
export declare const YMapReactifyOverride: CustomReactify<YMapI, YMapR>;
export {};

@@ -1,11 +0,11 @@

import type TReact from 'react';
import type { CustomReactify } from '../reactify';
import type { GenericEntity } from '../../imperative/Entities';
import type { YMapControl as YMapControlI, YMapControlProps } from '../../imperative/YMapControl';
declare type ComputedYMapControlProps = YMapControlProps & {
import type TReact from "react";
import type { CustomReactify } from "../reactify";
import type { GenericEntity } from "../../imperative/Entities";
import type { YMapControl as YMapControlI, YMapControlProps } from "../../imperative/YMapControl";
type ComputedYMapControlProps = YMapControlProps & {
controlElement: HTMLElement;
};
declare type YMapControlContainerProps = TReact.PropsWithChildren<YMapControlProps>;
declare type YMapControlR = TReact.ForwardRefExoticComponent<YMapControlContainerProps & React.RefAttributes<GenericEntity<ComputedYMapControlProps>>>;
type YMapControlContainerProps = TReact.PropsWithChildren<YMapControlProps>;
type YMapControlR = TReact.ForwardRefExoticComponent<YMapControlContainerProps & React.RefAttributes<GenericEntity<ComputedYMapControlProps>>>;
export declare const YMapControlReactifyOverride: CustomReactify<YMapControlI, YMapControlR>;
export {};

@@ -1,11 +0,11 @@

import type TReactNamespace from 'react';
import type { CustomReactify } from '../reactify';
import type { GenericEntity } from '../../imperative/Entities';
import type { YMapMarker as YMapMarkerI, YMapMarkerProps } from '../../imperative/YMapMarker';
declare type ComputedYMapMarkerProps = YMapMarkerProps & {
import type TReactNamespace from "react";
import type { CustomReactify } from "../reactify";
import type { GenericEntity } from "../../imperative/Entities";
import type { YMapMarker as YMapMarkerI, YMapMarkerProps } from "../../imperative/YMapMarker";
type ComputedYMapMarkerProps = YMapMarkerProps & {
markerElement?: HTMLElement;
};
declare type YMapMarkerContainerProps = TReactNamespace.PropsWithChildren<ComputedYMapMarkerProps>;
declare type YMapMarkerR = TReactNamespace.ForwardRefExoticComponent<YMapMarkerContainerProps & React.RefAttributes<GenericEntity<ComputedYMapMarkerProps>>>;
type YMapMarkerContainerProps = TReactNamespace.PropsWithChildren<ComputedYMapMarkerProps>;
type YMapMarkerR = TReactNamespace.ForwardRefExoticComponent<YMapMarkerContainerProps & React.RefAttributes<GenericEntity<ComputedYMapMarkerProps>>>;
export declare const YMapMarkerReactifyOverride: CustomReactify<YMapMarkerI, YMapMarkerR>;
export {};

@@ -1,6 +0,6 @@

import type TReact from 'react';
import type { CustomReactify } from '../reactify';
import type { YMapReactContainer, YMapReactContainerProps } from '../../imperative/YMapReactContainer';
declare type ReactProps<T> = TReact.PropsWithChildren<YMapReactContainerProps<T>>;
import type TReact from "react";
import type { CustomReactify } from "../reactify";
import type { YMapReactContainer, YMapReactContainerProps } from "../../imperative/YMapReactContainer";
type ReactProps<T> = TReact.PropsWithChildren<YMapReactContainerProps<T>>;
export declare const YMapReactContainerReactifyOverride: CustomReactify<YMapReactContainer, TReact.FC<ReactProps<unknown>>>;
export {};

@@ -1,18 +0,20 @@

import type TReact from 'react';
import type TReactDOM from 'react-dom';
import { GenericEntity, GenericGroupEntity, Context, EntityConstructor, EntityProps } from '../imperative/Entities';
declare type ParentRef = React.MutableRefObject<GenericGroupEntity<unknown> | undefined>;
import type TReact from "react";
import type TReactDOM from "react-dom";
import { GenericEntity, Context, EntityConstructor, EntityProps } from "../imperative/Entities";
type RefInstance<TEntity extends GenericEntity<unknown>> = React.MutableRefObject<TEntity | undefined>;
interface ReactParent {
entityRef: ParentRef;
entityRef: RefInstance<GenericEntity<unknown>>;
requestReposition(): void;
positionChild(entity: GenericEntity<unknown>): number;
positionChild(entity: RefInstance<GenericEntity<unknown>>): number;
}
export declare type Reactify = {
export declare let ReactParent: React.Context<[
ReactParent
] | undefined>;
export type Reactify = {
module: ReactifyModule;
entity: ReactifyEntity;
};
export declare let ReactParent: React.Context<[ReactParent, number] | undefined>;
export declare const moduleOverrideExport: string;
export declare const overrideKey: unique symbol;
export declare type CustomReactify<TEntity extends GenericEntity<unknown>, TResult> = (ctor: EntityConstructor<TEntity>, params: {
export type CustomReactify<TEntity extends GenericEntity<unknown>, TResult> = (ctor: EntityConstructor<TEntity>, params: {
reactify: {

@@ -27,16 +29,16 @@ module: <TModule extends BaseModule>(module: TModule) => ReactifiedModule<TModule>;

}) => TResult;
export declare type Overrided<TReactResult> = {
export type Overrided<TReactResult> = {
[overrideKey]: CustomReactify<GenericEntity<unknown>, TReactResult>;
};
declare type InternalReactify<TEntity extends GenericEntity<unknown>> = (ctor: EntityConstructor<TEntity>, displayName?: string) => TReact.ForwardRefExoticComponent<TReact.PropsWithoutRef<TReact.PropsWithChildren<EntityProps<TEntity>>> & React.RefAttributes<TEntity | undefined>>;
declare type InternalReactifyEntity<TCtor extends EntityConstructor<GenericEntity<unknown>>> = (ctor: TCtor, displayName?: string) => TCtor extends Overrided<infer TResult> ? TResult : ReturnType<InternalReactify<InstanceType<TCtor>>>;
export declare type ReactifyEntity = <TCtor extends EntityConstructor<GenericEntity<unknown>>>(...args: Parameters<InternalReactifyEntity<TCtor>>) => ReturnType<InternalReactifyEntity<TCtor>>;
export declare type ReactifiedEntity<TCtor extends EntityConstructor<GenericEntity<unknown>>> = ReturnType<InternalReactifyEntity<TCtor>>;
export declare type ReactifyModule = <TModule extends BaseModule>(module: TModule) => ReactifiedModule<TModule>;
export declare type GetReactContext<TContext extends Context<unknown>> = (context?: TContext | undefined) => React.Context<unknown>;
export declare type ReactifiedModule<TModule extends BaseModule> = {
type InternalReactify<TEntity extends GenericEntity<unknown>> = (ctor: EntityConstructor<TEntity>, displayName?: string) => TReact.ForwardRefExoticComponent<TReact.PropsWithoutRef<TReact.PropsWithChildren<EntityProps<TEntity>>> & React.RefAttributes<TEntity | undefined>>;
type InternalReactifyEntity<TCtor extends EntityConstructor<GenericEntity<unknown>>> = (ctor: TCtor, displayName?: string) => TCtor extends Overrided<infer TResult> ? TResult : ReturnType<InternalReactify<InstanceType<TCtor>>>;
export type ReactifyEntity = <TCtor extends EntityConstructor<GenericEntity<unknown>>>(...args: Parameters<InternalReactifyEntity<TCtor>>) => ReturnType<InternalReactifyEntity<TCtor>>;
export type ReactifiedEntity<TCtor extends EntityConstructor<GenericEntity<unknown>>> = ReturnType<InternalReactifyEntity<TCtor>>;
export type ReactifyModule = <TModule extends BaseModule>(module: TModule) => ReactifiedModule<TModule>;
export type GetReactContext<TContext extends Context<unknown>> = (context?: TContext | undefined) => React.Context<unknown>;
export type ReactifiedModule<TModule extends BaseModule> = {
[Property in keyof TModule]: TModule[Property] extends EntityConstructor<GenericEntity<unknown>> ? ReturnType<InternalReactifyEntity<TModule[Property]>> : TModule[Property] extends typeof Context ? ReturnType<GetReactContext<TModule[Property]>> : TModule[Property];
};
export declare type BaseModule = Record<string | symbol, unknown>;
export type BaseModule = Record<string | symbol, unknown>;
export default function createReactify(React: typeof TReact, ReactDOM: typeof TReactDOM): Reactify;
export {};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc