import type { Placemark, Clusterer, IMapPanOptions, IMapBoundsOptions, IMapState, IEvent, geoObject } from "yandex-maps"; import type ymaps from "yandex-maps"; import type { TCoords, TZoom, TConstructorInstance, TObjectUserProp, TFactoryCallback, TMapInstance, TAPI, TClusterOptions, TMapContext, TCluster } from "../config/types/index.d.mts"; type TMapEventHandler = { bivarianceHack: (event: IEvent) => void | Promise; }["bivarianceHack"]; /** * Проверяет валидность массива координат * @returns {boolean} */ declare const isCoordsValid: (coords?: number[]) => boolean; /** * Проверяет валидность полей * @returns {boolean} */ declare const isMarginValid: (margin?: number[] | number[][]) => boolean; /** * Проверяет валидность зума * @param zoom{TZoom} * @returns {boolean} */ declare const isZoomValid: (zoom: TZoom | undefined) => boolean; /** * Проверяет валидность верстки элементов * @param layout{*} * @returns {boolean} */ declare const isValidLayout: (layout: unknown) => boolean; /** * Получает экземляр вызова `ymaps.templateLayoutFactory` * @returns {TConstructorInstance} */ declare const getLayoutConstructor: (instance: TAPI, html?: string, callback?: TFactoryCallback, props?: Record | null, methods?: { [key: string]: Function; }) => TConstructorInstance; /** * Получает значение пользовательского поля, которое может быть функцией * @returns {Promise} */ declare const getUserField: (prop: TObjectUserProp, userFnArg: TArg) => Promise; /** * Добавляет или удаляет обработчик события на экземпляр вызова элемента карты * @param instance * @param events * @param isBind */ declare const bindEvents: (instance: Placemark | TMapInstance | Clusterer, events: { event: string; handler: TMapEventHandler; }[], isBind: boolean) => void; /** * Добавляет или удаляет классы у экземпляра вызова GeoObject * @param node{HTMLElement|null} * @param className{String} * @param isAdd{Boolean=} * @param callback{Function=} * @returns void; */ declare const manageGeoObjectClass: ((node: HTMLElement | null, className?: string, isAdd?: boolean, callback?: Function) => void); /** * Получает DOM-элемент из дочернего элемента экземпляра вызова Placemark * @returns {Promise} */ declare const getNodeFromElementInstance: ((instance: ymaps.IGeoObject & { options: TClusterOptions & { _name: string; }; } | geoObject.Hint | geoObject.Balloon) => Promise); /** * Получает результат сдвига карты на заданное число пикселей * @returns {Promise} */ declare const getMapMoveWithPx: (map: TMapInstance, coords: TCoords, xPx: number, yPx: number, options?: IMapPanOptions) => Promise; /** * Получает результат обновления границ карты * @param instance{TMapInstance} * @param options{IMapBoundsOptions} * @returns {Promise} */ declare const getUpdateBounds: (instance: TMapInstance, options?: IMapBoundsOptions) => Promise; /** * Получает начальное состояние карты * @param props{IMapState} * @returns {IMapState} */ declare const getDefaultState: (props: IMapState) => { zoom: number | undefined; center: number[] | undefined; margin: number[] | number[][] | undefined; }; /** * Обновляет CSS-переменную вычисляемого размера карты * @param container{HTMLElement | null} */ declare const setComputedWidth: (container: HTMLElement | null) => void; /** * Обновляет CSS-переменные для слоя балунов. */ declare const managePaneVariables: (containerRef: TMapContext["containerRef"], isAdd: boolean, paneNode: HTMLElement | null) => void; /** * Проверяет, обновились ли кластеры (по ID или по составу точек, исключая поле state) * @returns {Boolean} true если кластеры изменились, false если изменился только state точек */ declare const isClustersUpdated: (current: TCluster[], prev: TCluster[]) => boolean; export { bindEvents, getDefaultState, getLayoutConstructor, getMapMoveWithPx, getNodeFromElementInstance, getUpdateBounds, getUserField, isClustersUpdated, isCoordsValid, isMarginValid, isValidLayout, isZoomValid, manageGeoObjectClass, managePaneVariables, setComputedWidth, };