import { Ref } from 'vue'; import { OverloadParameters } from './types/overload-extract.ts'; import { Apikeys } from '@yandex/ymaps3-types/imperative/config'; import { YMapEntity } from '@yandex/ymaps3-types'; export interface IYandexMapTrafficLayerProps { visible: boolean; [key: string]: any; } export declare class IYandexMapTrafficLayer extends YMapEntity { } export interface IYandexMapTrafficEventsLayerProps extends IYandexMapTrafficLayerProps { } export declare class IYandexMapTrafficEventsLayer extends YMapEntity { } export declare namespace VueYandexMaps { const settings: Ref; /** * @description True when `createYmapsOptions` was called and settings were set * @note Useful if there's a change your map may be initialized earlier than you will set settings */ const isReadyToInit: import("vue").ComputedRef; const ymaps: () => typeof import("@yandex/ymaps3-types"); class YandexMapException extends Error { constructor(message: string); } type LoadStatus = 'pending' | 'loading' | 'loaded' | 'error'; const loadStatus: Ref; const isLoaded: import("vue").ComputedRef; const loadError: Ref void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; } | null; readonly defaultPrevented: boolean; readonly eventPhase: number; readonly isTrusted: boolean; returnValue: boolean; readonly srcElement: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; } | null; readonly target: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; } | null; readonly timeStamp: DOMHighResTimeStamp; readonly type: string; composedPath: () => EventTarget[]; initEvent: (type: string, bubbles?: boolean, cancelable?: boolean) => void; preventDefault: () => void; stopImmediatePropagation: () => void; stopPropagation: () => void; readonly NONE: 0; readonly CAPTURING_PHASE: 1; readonly AT_TARGET: 2; readonly BUBBLING_PHASE: 3; } | null, string | Error | { readonly bubbles: boolean; cancelBubble: boolean; readonly cancelable: boolean; readonly composed: boolean; readonly currentTarget: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; } | null; readonly defaultPrevented: boolean; readonly eventPhase: number; readonly isTrusted: boolean; returnValue: boolean; readonly srcElement: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; } | null; readonly target: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; } | null; readonly timeStamp: DOMHighResTimeStamp; readonly type: string; composedPath: () => EventTarget[]; initEvent: (type: string, bubbles?: boolean, cancelable?: boolean) => void; preventDefault: () => void; stopImmediatePropagation: () => void; stopPropagation: () => void; readonly NONE: 0; readonly CAPTURING_PHASE: 1; readonly AT_TARGET: 2; readonly BUBBLING_PHASE: 3; } | null>; interface LayersExtra { YMapTrafficLayer: typeof IYandexMapTrafficLayer; YMapTrafficEventsLayer: typeof IYandexMapTrafficEventsLayer; } /** * @description type-safe import for layers-extra module * @internal */ function importLayersExtra(): Promise; interface PluginSettings { /** * @see https://yandex.ru/dev/maps/jsapi/doc/3.0/dg/concepts/load.html#parms * @see https://yandex.com/dev/maps/jsapi/doc/3.0/dg/concepts/load.html#parms */ apikey: string; /** * @description Allows to set apikeys for Yandex Services. * * @note You should only set those on first setup. Will have no effect afterward. * @example router for `ymaps3.route` and `suggest` for `ymaps3.suggest` */ servicesApikeys?: Apikeys | null; /** * @see https://yandex.ru/dev/maps/jsapi/doc/3.0/dg/concepts/load.html#parms * @see https://yandex.com/dev/maps/jsapi/doc/3.0/dg/concepts/load.html#parms * @default ru_RU */ lang?: string; /** * @default v3 */ version?: string; /** * @see https://yandex.ru/dev/maps/jsapi/doc/3.0/dg/concepts/general.html#strict-mode * @see https://yandex.com/dev/maps/jsapi/doc/3.0/dg/concepts/general.html#strict-mode * @default false */ strictMode?: boolean; /** * @default https://api-maps.yandex.ru */ domain?: string; /** * @description You can choose where to initialize Yandex Maps library * * - onPluginInit will load maps on `vue-yandex-maps` plugin init (Client Side only) * - onComponentMount will load maps as soon as you load component (lazy option, default) * - never will require you to call initYmaps by yourself * * @default onComponentMount */ initializeOn?: 'onPluginInit' | 'onComponentMount' | 'never'; /** * @description You can preload modules in initYmaps, note you will still have to import them later to use * @see https://yandex.ru/dev/maps/jsapi/doc/3.0/ref/modules/index.html * @see https://yandex.com/dev/maps/jsapi/doc/3.0/ref/modules/index.html */ importModules?: OverloadParameters[0][]; /** * @description Amount of time in milliseconds library will wait for Yandex script full load. * * Set this to false, to disable this behavior and make library wait forever. * @default true (5000) */ mapsScriptWaitDuration?: number | boolean; /** * @description Amount of time in milliseconds library will wait for all components render after Yandex script was loaded. * * Set this to false, to disable this behavior and make library wait forever. * @note If you disable this behavior completely, any fatal error inside components will not lead to exception and library will never load. * @default true (5000) */ mapsRenderWaitDuration?: number | boolean; /** * @description Sets script tag attributes * @default async defer referrerpolicy=strict-origin-when-cross-origin type=text/javascript * @note src will be ignored */ scriptAttributes?: Record, string | false>; } /** * @description Strict-typed version of PluginSettings with all keys required */ type DefProductSettings = { [T in keyof PluginSettings]-?: PluginSettings[T]; }; }