UNPKG

vue3-maplibre-gl

Version:

Vue 3 components and composables for MapLibre GL JS - Build interactive maps with ease

112 lines (111 loc) 4.58 kB
import { CreateGeoJsonSourceActions } from '../composables'; import { GeoJSONSource, GeoJSONSourceSpecification } from 'maplibre-gl'; /** * Enhanced GeoJsonSource component props with comprehensive configuration options */ interface GeoJsonSourceProps { /** Unique identifier for the source */ id?: string; /** GeoJSON data for the source */ data?: GeoJSONSourceSpecification['data']; /** Additional source configuration options */ options?: Partial<GeoJSONSourceSpecification>; /** Callback for registering source actions */ register?: (actions: CreateGeoJsonSourceActions) => void; /** Enable debug logging */ debug?: boolean; /** Automatically cleanup resources on unmount */ autoCleanup?: boolean; /** Error handling callback */ onError?: (error: any) => void; /** Source load success callback */ onLoad?: (source: GeoJSONSource) => void; /** Data update callback */ onDataUpdate?: (data: GeoJSONSourceSpecification['data']) => void; /** Debounce delay for data updates in milliseconds (default: 100) */ debounceDelay?: number; } /** * Enhanced data setter with validation and error handling * @param newData - New GeoJSON data to set */ declare function handleSetData(newData: GeoJSONSourceSpecification['data']): void; /** * Enhanced cleanup function for disposing resources */ declare function cleanup(): void; declare function __VLS_template(): { default?(_: {}): any; }; declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<GeoJsonSourceProps>, { data: () => { type: string; features: never[]; }; options: () => {}; debug: boolean; autoCleanup: boolean; debounceDelay: number; }>>, { sourceId: string; getSource: import('vue').ShallowRef<import('..').Nullable<GeoJSONSource>>; setData: typeof handleSetData; removeSource: () => void; refreshSource: () => void; sourceStatus: Readonly<import('../composables').SourceStatus>; isSourceReady: boolean; isSourceRegistered: import('vue').Ref<boolean, boolean>; isDataValid: import('vue').ComputedRef<boolean>; lastDataUpdate: import('vue').Ref<string | import('geojson').GeoJSON<import('geojson').Geometry, import('geojson').GeoJsonProperties> | undefined, string | import('geojson').GeoJSON<import('geojson').Geometry, import('geojson').GeoJsonProperties> | undefined>; cleanup: typeof cleanup; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { register: (actions: CreateGeoJsonSourceActions) => void; error: (error: any) => void; load: (source: any) => void; "data-update": (data: string | import('geojson').GeoJSON<import('geojson').Geometry, import('geojson').GeoJsonProperties>) => void; }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<GeoJsonSourceProps>, { data: () => { type: string; features: never[]; }; options: () => {}; debug: boolean; autoCleanup: boolean; debounceDelay: number; }>>> & Readonly<{ onError?: ((error: any) => any) | undefined; onLoad?: ((source: any) => any) | undefined; onRegister?: ((actions: CreateGeoJsonSourceActions) => any) | undefined; "onData-update"?: ((data: string | import('geojson').GeoJSON<import('geojson').Geometry, import('geojson').GeoJsonProperties>) => any) | undefined; }>, { data: GeoJSONSourceSpecification["data"]; debug: boolean; autoCleanup: boolean; options: Partial<GeoJSONSourceSpecification>; debounceDelay: number; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>; export default _default; type __VLS_NonUndefinedable<T> = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? { type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>; } : { type: import('vue').PropType<T[K]>; required: true; }; }; type __VLS_WithDefaults<P, D> = { [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & { default: D[K]; }> : P[K]; }; type __VLS_Prettify<T> = { [K in keyof T]: T[K]; } & {}; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; }; //# sourceMappingURL=GeoJsonSource.vue.d.ts.map