Skip to content

Commit

Permalink
chore(plugins): add click-outside & v-mapbox plugins
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
  • Loading branch information
vinayakkulkarni committed Mar 13, 2023
1 parent 6dbf0da commit 2313f6e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/v-click-outside.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import vClickOutside from 'click-outside-vue3';

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(vClickOutside);
});
46 changes: 46 additions & 0 deletions plugins/v-mapbox.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Controls
import { VControlAttribution } from '~/lib/v-mapbox';
import { VControlFullscreen } from '~/lib/v-mapbox';
import { VControlGeolocate } from '~/lib/v-mapbox';
import { VControlNavigation } from '~/lib/v-mapbox';
import { VControlScale } from '~/lib/v-mapbox';
// Layers – Deck.gl
import VLayerDeckArc from '~/lib/v-mapbox';
import VLayerDeckGeojson from '~/lib/v-mapbox';
// Layers – Mapbox
import { VLayerMapboxCanvas } from '~/lib/v-mapbox';
import { VLayerMapboxGeojson } from '~/lib/v-mapbox';
import { VLayerMapboxImage } from '~/lib/v-mapbox';
import { VLayerMapboxRaster } from '~/lib/v-mapbox';
import { VLayerMapboxVector } from '~/lib/v-mapbox';
import { VLayerMapboxVideo } from '~/lib/v-mapbox';
// Map
import VMap from '~/lib/v-mapbox';
// Marker
import VMarker from '~/lib/v-mapbox';
// Popup
import VPopup from '~/lib/v-mapbox';

export default defineNuxtPlugin((nuxtApp) => {
// Map
nuxtApp.vueApp.component('VMap', VMap);
// Marker
nuxtApp.vueApp.component('VMarker', VMarker);
// Popup
nuxtApp.vueApp.component('VPopup', VPopup);
// Layers
nuxtApp.vueApp.component('VLayerMapboxCanvas', VLayerMapboxCanvas);
nuxtApp.vueApp.component('VLayerMapboxGeojson', VLayerMapboxGeojson);
nuxtApp.vueApp.component('VLayerMapboxImage', VLayerMapboxImage);
nuxtApp.vueApp.component('VLayerMapboxRaster', VLayerMapboxRaster);
nuxtApp.vueApp.component('VLayerMapboxVector', VLayerMapboxVector);
nuxtApp.vueApp.component('VLayerMapboxVideo', VLayerMapboxVideo);
nuxtApp.vueApp.component('VLayerDeckArc', VLayerDeckArc);
nuxtApp.vueApp.component('VLayerDeckGeojson', VLayerDeckGeojson);
// Controls
nuxtApp.vueApp.component('VControlAttribution', VControlAttribution);
nuxtApp.vueApp.component('VControlFullscreen', VControlFullscreen);
nuxtApp.vueApp.component('VControlGeolocate', VControlGeolocate);
nuxtApp.vueApp.component('VControlNavigation', VControlNavigation);
nuxtApp.vueApp.component('VControlScale', VControlScale);
});

0 comments on commit 2313f6e

Please sign in to comment.