From 745afeece5f0630000aa01f3ef84359f3160e6e5 Mon Sep 17 00:00:00 2001 From: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com> Date: Wed, 2 Mar 2022 00:14:27 +0530 Subject: [PATCH] feat(ts): add `.d.ts` using `vue-tsc` --- types/controls/VControlAttribution.vue.d.ts | 62 +++++++++++++++ types/controls/VControlFullscreen.vue.d.ts | 49 ++++++++++++ types/controls/VControlGeolocate.vue.d.ts | 67 ++++++++++++++++ types/controls/VControlNavigation.vue.d.ts | 59 ++++++++++++++ types/controls/VControlScale.vue.d.ts | 56 +++++++++++++ types/events/geolocate.d.ts | 1 + types/events/index.d.ts | 4 + types/events/layer.d.ts | 3 + types/events/map.d.ts | 3 + types/events/marker.d.ts | 2 + types/events/popup.d.ts | 1 + types/index.d.ts | 45 +++++++---- types/map/VMap.vue.d.ts | 42 ++++++++++ types/mapbox/VLayerMapboxCanvas.vue.d.ts | 88 +++++++++++++++++++++ types/mapbox/VLayerMapboxGeojson.vue.d.ts | 88 +++++++++++++++++++++ types/mapbox/VLayerMapboxImage.vue.d.ts | 77 ++++++++++++++++++ types/mapbox/VLayerMapboxRaster.vue.d.ts | 88 +++++++++++++++++++++ types/mapbox/VLayerMapboxVector.vue.d.ts | 77 ++++++++++++++++++ types/mapbox/VLayerMapboxVideo.vue.d.ts | 77 ++++++++++++++++++ types/markers/VMarker.vue.d.ts | 72 +++++++++++++++++ types/popups/VPopup.vue.d.ts | 60 ++++++++++++++ types/utils/index.d.ts | 9 +++ 22 files changed, 1016 insertions(+), 14 deletions(-) create mode 100644 types/controls/VControlAttribution.vue.d.ts create mode 100644 types/controls/VControlFullscreen.vue.d.ts create mode 100644 types/controls/VControlGeolocate.vue.d.ts create mode 100644 types/controls/VControlNavigation.vue.d.ts create mode 100644 types/controls/VControlScale.vue.d.ts create mode 100644 types/events/geolocate.d.ts create mode 100644 types/events/index.d.ts create mode 100644 types/events/layer.d.ts create mode 100644 types/events/map.d.ts create mode 100644 types/events/marker.d.ts create mode 100644 types/events/popup.d.ts create mode 100644 types/map/VMap.vue.d.ts create mode 100644 types/mapbox/VLayerMapboxCanvas.vue.d.ts create mode 100644 types/mapbox/VLayerMapboxGeojson.vue.d.ts create mode 100644 types/mapbox/VLayerMapboxImage.vue.d.ts create mode 100644 types/mapbox/VLayerMapboxRaster.vue.d.ts create mode 100644 types/mapbox/VLayerMapboxVector.vue.d.ts create mode 100644 types/mapbox/VLayerMapboxVideo.vue.d.ts create mode 100644 types/markers/VMarker.vue.d.ts create mode 100644 types/popups/VPopup.vue.d.ts create mode 100644 types/utils/index.d.ts diff --git a/types/controls/VControlAttribution.vue.d.ts b/types/controls/VControlAttribution.vue.d.ts new file mode 100644 index 00000000..9c2272cd --- /dev/null +++ b/types/controls/VControlAttribution.vue.d.ts @@ -0,0 +1,62 @@ +import type { PropType } from 'vue'; +declare const _default: import('vue').DefineComponent< + { + options: { + type: PropType<{ + compact?: boolean | undefined; + customAttribution?: string | string[] | undefined; + }>; + default: () => { + compact: boolean; + customAttribution: string; + }; + required: true; + }; + position: { + type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>; + default: () => string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + Record, + string, + import('vue').VNodeProps & + import('vue').AllowedComponentProps & + import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + options: { + type: PropType<{ + compact?: boolean | undefined; + customAttribution?: string | string[] | undefined; + }>; + default: () => { + compact: boolean; + customAttribution: string; + }; + required: true; + }; + position: { + type: PropType< + 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' + >; + default: () => string; + required: false; + }; + }> + >, + { + options: { + compact?: boolean | undefined; + customAttribution?: string | string[] | undefined; + }; + position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + } +>; +export default _default; diff --git a/types/controls/VControlFullscreen.vue.d.ts b/types/controls/VControlFullscreen.vue.d.ts new file mode 100644 index 00000000..5e8cabfe --- /dev/null +++ b/types/controls/VControlFullscreen.vue.d.ts @@ -0,0 +1,49 @@ +/// +import type { FullscreenControlOptions } from 'mapbox-gl'; +import type { PropType } from 'vue'; +declare const _default: import('vue').DefineComponent< + { + options: { + type: PropType; + default: () => {}; + required: true; + }; + position: { + type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>; + default: () => string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + Record, + string, + import('vue').VNodeProps & + import('vue').AllowedComponentProps & + import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + options: { + type: PropType; + default: () => {}; + required: true; + }; + position: { + type: PropType< + 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' + >; + default: () => string; + required: false; + }; + }> + >, + { + options: FullscreenControlOptions; + position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + } +>; +export default _default; diff --git a/types/controls/VControlGeolocate.vue.d.ts b/types/controls/VControlGeolocate.vue.d.ts new file mode 100644 index 00000000..f3d0413d --- /dev/null +++ b/types/controls/VControlGeolocate.vue.d.ts @@ -0,0 +1,67 @@ +/// +import type { FitBoundsOptions, PositionOptions } from 'mapbox-gl'; +import type { PropType } from 'vue'; +declare const _default: import('vue').DefineComponent< + { + options: { + type: PropType<{ + positionOptions?: PositionOptions | undefined; + fitBoundsOptions?: FitBoundsOptions | undefined; + trackUserLocation?: boolean | undefined; + showAccuracyCircle?: boolean | undefined; + showUserLocation?: boolean | undefined; + }>; + default: () => {}; + required: true; + }; + position: { + type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>; + default: () => string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + Record, + string, + import('vue').VNodeProps & + import('vue').AllowedComponentProps & + import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + options: { + type: PropType<{ + positionOptions?: PositionOptions | undefined; + fitBoundsOptions?: FitBoundsOptions | undefined; + trackUserLocation?: boolean | undefined; + showAccuracyCircle?: boolean | undefined; + showUserLocation?: boolean | undefined; + }>; + default: () => {}; + required: true; + }; + position: { + type: PropType< + 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' + >; + default: () => string; + required: false; + }; + }> + >, + { + options: { + positionOptions?: PositionOptions | undefined; + fitBoundsOptions?: FitBoundsOptions | undefined; + trackUserLocation?: boolean | undefined; + showAccuracyCircle?: boolean | undefined; + showUserLocation?: boolean | undefined; + }; + position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + } +>; +export default _default; diff --git a/types/controls/VControlNavigation.vue.d.ts b/types/controls/VControlNavigation.vue.d.ts new file mode 100644 index 00000000..30d0e712 --- /dev/null +++ b/types/controls/VControlNavigation.vue.d.ts @@ -0,0 +1,59 @@ +import type { PropType } from 'vue'; +declare const _default: import('vue').DefineComponent< + { + options: { + type: PropType<{ + showCompass?: boolean | undefined; + showZoom?: boolean | undefined; + visualizePitch?: boolean | undefined; + }>; + default: () => {}; + required: true; + }; + position: { + type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>; + default: () => string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + Record, + string, + import('vue').VNodeProps & + import('vue').AllowedComponentProps & + import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + options: { + type: PropType<{ + showCompass?: boolean | undefined; + showZoom?: boolean | undefined; + visualizePitch?: boolean | undefined; + }>; + default: () => {}; + required: true; + }; + position: { + type: PropType< + 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' + >; + default: () => string; + required: false; + }; + }> + >, + { + options: { + showCompass?: boolean | undefined; + showZoom?: boolean | undefined; + visualizePitch?: boolean | undefined; + }; + position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + } +>; +export default _default; diff --git a/types/controls/VControlScale.vue.d.ts b/types/controls/VControlScale.vue.d.ts new file mode 100644 index 00000000..e8874e93 --- /dev/null +++ b/types/controls/VControlScale.vue.d.ts @@ -0,0 +1,56 @@ +import type { PropType } from 'vue'; +declare const _default: import('vue').DefineComponent< + { + options: { + type: PropType<{ + maxWidth?: number | undefined; + unit?: string | undefined; + }>; + default: () => {}; + required: true; + }; + position: { + type: PropType<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'>; + default: () => string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue').ComponentOptionsMixin, + import('vue').ComponentOptionsMixin, + Record, + string, + import('vue').VNodeProps & + import('vue').AllowedComponentProps & + import('vue').ComponentCustomProps, + Readonly< + import('vue').ExtractPropTypes<{ + options: { + type: PropType<{ + maxWidth?: number | undefined; + unit?: string | undefined; + }>; + default: () => {}; + required: true; + }; + position: { + type: PropType< + 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' + >; + default: () => string; + required: false; + }; + }> + >, + { + options: { + maxWidth?: number | undefined; + unit?: string | undefined; + }; + position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + } +>; +export default _default; diff --git a/types/events/geolocate.d.ts b/types/events/geolocate.d.ts new file mode 100644 index 00000000..86896db8 --- /dev/null +++ b/types/events/geolocate.d.ts @@ -0,0 +1 @@ +export declare const geolocateControlEvents: string[]; diff --git a/types/events/index.d.ts b/types/events/index.d.ts new file mode 100644 index 00000000..e0c45080 --- /dev/null +++ b/types/events/index.d.ts @@ -0,0 +1,4 @@ +export { mapLayerEvents } from './layer'; +export { mapEvents } from './map'; +export { markerDOMEvents, markerMapEvents } from './marker'; +export { popupEvents } from './popup'; diff --git a/types/events/layer.d.ts b/types/events/layer.d.ts new file mode 100644 index 00000000..0377a2ad --- /dev/null +++ b/types/events/layer.d.ts @@ -0,0 +1,3 @@ +/// +import { MapLayerEventType } from 'mapbox-gl'; +export declare const mapLayerEvents: Array; diff --git a/types/events/map.d.ts b/types/events/map.d.ts new file mode 100644 index 00000000..f282b971 --- /dev/null +++ b/types/events/map.d.ts @@ -0,0 +1,3 @@ +/// +import { MapEventType } from 'mapbox-gl'; +export declare const mapEvents: Array; diff --git a/types/events/marker.d.ts b/types/events/marker.d.ts new file mode 100644 index 00000000..525a75dc --- /dev/null +++ b/types/events/marker.d.ts @@ -0,0 +1,2 @@ +export declare const markerMapEvents: string[]; +export declare const markerDOMEvents: string[]; diff --git a/types/events/popup.d.ts b/types/events/popup.d.ts new file mode 100644 index 00000000..b381b9ab --- /dev/null +++ b/types/events/popup.d.ts @@ -0,0 +1 @@ +export declare const popupEvents: string[]; diff --git a/types/index.d.ts b/types/index.d.ts index 3c890b98..6338e7bc 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,15 +1,32 @@ -import Vue, { VueConstructor } from 'vue'; +import VControlAttribution from './controls/VControlAttribution.vue'; +import VControlFullscreen from './controls/VControlFullscreen.vue'; +import VControlGeolocate from './controls/VControlGeolocate.vue'; +import VControlNavigation from './controls/VControlNavigation.vue'; +import VControlScale from './controls/VControlScale.vue'; +import VLayerMapboxCanvas from './layers/mapbox/VLayerMapboxCanvas.vue'; +import VLayerMapboxGeojson from './layers/mapbox/VLayerMapboxGeojson.vue'; +import VLayerMapboxImage from './layers/mapbox/VLayerMapboxImage.vue'; +import VLayerMapboxRaster from './layers/mapbox/VLayerMapboxRaster.vue'; +import VLayerMapboxVector from './layers/mapbox/VLayerMapboxVector.vue'; +import VLayerMapboxVideo from './layers/mapbox/VLayerMapboxVideo.vue'; +import VMap from './map/VMap.vue'; +import VMarker from './markers/VMarker.vue'; +import VPopup from './popups/VPopup.vue'; -export const MglMap: VueConstructor; -export const MglNavigationControl: VueConstructor; -export const MglGeolocateControl: VueConstructor; -export const MglFullscreenControl: VueConstructor; -export const MglAttributionControl: VueConstructor; -export const MglScaleControl: VueConstructor; -export const MglGeojsonLayer: VueConstructor; -export const MglImageLayer: VueConstructor; -export const MglVideoLayer: VueConstructor; -export const MglVectorLayer: VueConstructor; -export const MglRasterLayer: VueConstructor; -export const MglMarker: VueConstructor; -export const MglPopup: VueConstructor; +export { + VMap, + VMarker, + VPopup, + VLayerMapboxCanvas, + VLayerMapboxGeojson, + VLayerMapboxImage, + VLayerMapboxRaster, + VLayerMapboxVector, + VLayerMapboxVideo, + VControlAttribution, + VControlFullscreen, + VControlGeolocate, + VControlNavigation, + VControlScale, +}; +export default VMap; diff --git a/types/map/VMap.vue.d.ts b/types/map/VMap.vue.d.ts new file mode 100644 index 00000000..663e3a73 --- /dev/null +++ b/types/map/VMap.vue.d.ts @@ -0,0 +1,42 @@ +/// +import type { MapboxOptions } from 'mapbox-gl'; +import type { PropType } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + options: { + type: PropType; + required: true; + default: () => {}; + }; + }, + () => import('vue-demi').VNode< + import('vue-demi').RendererNode, + import('vue-demi').RendererElement, + { + [key: string]: any; + } + >, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').EmitsOptions, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + options: { + type: PropType; + required: true; + default: () => {}; + }; + }> + >, + { + options: MapboxOptions; + } +>; +export default _default; diff --git a/types/mapbox/VLayerMapboxCanvas.vue.d.ts b/types/mapbox/VLayerMapboxCanvas.vue.d.ts new file mode 100644 index 00000000..382c0bef --- /dev/null +++ b/types/mapbox/VLayerMapboxCanvas.vue.d.ts @@ -0,0 +1,88 @@ +/// +import type { FeatureCollection } from 'geojson'; +import type { AnyLayer } from 'mapbox-gl'; +import type { PropType } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType< + FeatureCollection< + import('geojson').Geometry, + import('geojson').GeoJsonProperties + > + >; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + Record, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType< + FeatureCollection< + import('geojson').Geometry, + import('geojson').GeoJsonProperties + > + >; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }> + >, + { + sourceId: string; + layerId: string; + layer: AnyLayer; + before: string; + } +>; +export default _default; diff --git a/types/mapbox/VLayerMapboxGeojson.vue.d.ts b/types/mapbox/VLayerMapboxGeojson.vue.d.ts new file mode 100644 index 00000000..382c0bef --- /dev/null +++ b/types/mapbox/VLayerMapboxGeojson.vue.d.ts @@ -0,0 +1,88 @@ +/// +import type { FeatureCollection } from 'geojson'; +import type { AnyLayer } from 'mapbox-gl'; +import type { PropType } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType< + FeatureCollection< + import('geojson').Geometry, + import('geojson').GeoJsonProperties + > + >; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + Record, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType< + FeatureCollection< + import('geojson').Geometry, + import('geojson').GeoJsonProperties + > + >; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }> + >, + { + sourceId: string; + layerId: string; + layer: AnyLayer; + before: string; + } +>; +export default _default; diff --git a/types/mapbox/VLayerMapboxImage.vue.d.ts b/types/mapbox/VLayerMapboxImage.vue.d.ts new file mode 100644 index 00000000..1373d087 --- /dev/null +++ b/types/mapbox/VLayerMapboxImage.vue.d.ts @@ -0,0 +1,77 @@ +/// +import type { AnyLayer, ImageSourceRaw } from 'mapbox-gl'; +import type { PropType } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + Record, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }> + >, + { + sourceId: string; + layerId: string; + layer: AnyLayer; + before: string; + } +>; +export default _default; diff --git a/types/mapbox/VLayerMapboxRaster.vue.d.ts b/types/mapbox/VLayerMapboxRaster.vue.d.ts new file mode 100644 index 00000000..382c0bef --- /dev/null +++ b/types/mapbox/VLayerMapboxRaster.vue.d.ts @@ -0,0 +1,88 @@ +/// +import type { FeatureCollection } from 'geojson'; +import type { AnyLayer } from 'mapbox-gl'; +import type { PropType } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType< + FeatureCollection< + import('geojson').Geometry, + import('geojson').GeoJsonProperties + > + >; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + Record, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType< + FeatureCollection< + import('geojson').Geometry, + import('geojson').GeoJsonProperties + > + >; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }> + >, + { + sourceId: string; + layerId: string; + layer: AnyLayer; + before: string; + } +>; +export default _default; diff --git a/types/mapbox/VLayerMapboxVector.vue.d.ts b/types/mapbox/VLayerMapboxVector.vue.d.ts new file mode 100644 index 00000000..a4d7a9a3 --- /dev/null +++ b/types/mapbox/VLayerMapboxVector.vue.d.ts @@ -0,0 +1,77 @@ +/// +import type { AnyLayer, VectorSource } from 'mapbox-gl'; +import type { PropType } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + Record, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }> + >, + { + sourceId: string; + layerId: string; + layer: AnyLayer; + before: string; + } +>; +export default _default; diff --git a/types/mapbox/VLayerMapboxVideo.vue.d.ts b/types/mapbox/VLayerMapboxVideo.vue.d.ts new file mode 100644 index 00000000..a4d7a9a3 --- /dev/null +++ b/types/mapbox/VLayerMapboxVideo.vue.d.ts @@ -0,0 +1,77 @@ +/// +import type { AnyLayer, VectorSource } from 'mapbox-gl'; +import type { PropType } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }, + void, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + Record, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + sourceId: { + type: PropType; + default: string; + required: true; + }; + layerId: { + type: PropType; + default: string; + required: true; + }; + source: { + type: PropType; + required: true; + }; + layer: { + type: PropType; + default: () => {}; + required: true; + }; + before: { + type: PropType; + default: string; + required: false; + }; + }> + >, + { + sourceId: string; + layerId: string; + layer: AnyLayer; + before: string; + } +>; +export default _default; diff --git a/types/markers/VMarker.vue.d.ts b/types/markers/VMarker.vue.d.ts new file mode 100644 index 00000000..4a725338 --- /dev/null +++ b/types/markers/VMarker.vue.d.ts @@ -0,0 +1,72 @@ +/// +import type { LngLatLike, MarkerOptions, PopupOptions } from 'mapbox-gl'; +import { Marker } from 'mapbox-gl'; +import type { PropType } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + options: { + type: PropType; + default: () => MarkerOptions; + required: true; + }; + popupOptions: { + type: PropType; + default: () => PopupOptions; + required: true; + }; + coordinates: { + type: PropType; + default: () => {}; + required: true; + }; + cursor: { + type: PropType; + default: string; + required: false; + }; + }, + { + marker: Marker; + }, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').EmitsOptions, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + options: { + type: PropType; + default: () => MarkerOptions; + required: true; + }; + popupOptions: { + type: PropType; + default: () => PopupOptions; + required: true; + }; + coordinates: { + type: PropType; + default: () => {}; + required: true; + }; + cursor: { + type: PropType; + default: string; + required: false; + }; + }> + >, + { + options: MarkerOptions; + coordinates: LngLatLike; + popupOptions: PopupOptions; + cursor: string; + } +>; +export default _default; diff --git a/types/popups/VPopup.vue.d.ts b/types/popups/VPopup.vue.d.ts new file mode 100644 index 00000000..b0f1f6c8 --- /dev/null +++ b/types/popups/VPopup.vue.d.ts @@ -0,0 +1,60 @@ +/// +import type { LngLatLike, Marker, PopupOptions } from 'mapbox-gl'; +import type { PropType, Ref } from 'vue-demi'; +declare const _default: import('vue-demi').DefineComponent< + { + marker: { + type: PropType; + default: () => Marker; + required: false; + }; + options: { + type: PropType; + default: () => PopupOptions; + required: true; + }; + coordinates: { + type: PropType; + default: () => {}; + required: true; + }; + }, + { + content: Ref; + }, + unknown, + {}, + {}, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').ComponentOptionsMixin, + import('vue-demi').EmitsOptions, + string, + import('vue-demi').VNodeProps & + import('vue-demi').AllowedComponentProps & + import('vue-demi').ComponentCustomProps, + Readonly< + import('vue-demi').ExtractPropTypes<{ + marker: { + type: PropType; + default: () => Marker; + required: false; + }; + options: { + type: PropType; + default: () => PopupOptions; + required: true; + }; + coordinates: { + type: PropType; + default: () => {}; + required: true; + }; + }> + >, + { + options: PopupOptions; + marker: Marker; + coordinates: LngLatLike; + } +>; +export default _default; diff --git a/types/utils/index.d.ts b/types/utils/index.d.ts new file mode 100644 index 00000000..99b19613 --- /dev/null +++ b/types/utils/index.d.ts @@ -0,0 +1,9 @@ +import type { InjectionKey } from 'vue-demi'; +/** + * Dependency injection 🥳 + * + * @param {InjectionKey} key - The key to inject + * @param {string | undefined} fallback - The fallback value + * @returns {undefined} - The value + */ +export declare function injectStrict(key: InjectionKey, fallback?: T): T;