@sanity/google-maps-input
Version:
Sanity plugin providing input handlers for geo-related input types using Google Maps
55 lines (42 loc) • 1.49 kB
text/typescript
import type {ArrayDiff} from 'sanity'
import {DiffComponent} from 'sanity'
import type {DiffComponentOptions} from 'sanity'
import {DiffProps} from 'sanity'
import {JSX as JSX_2} from 'react'
import {ObjectDiff} from 'sanity'
import {ObjectInputProps} from 'sanity'
import type {ObjectSchemaType} from 'sanity'
import {Plugin as Plugin_2} from 'sanity'
export declare interface Geopoint {
_type: 'geopoint'
_key?: string
lat: number
lng: number
alt?: number
}
export declare const GeopointArrayDiff: DiffComponent<ArrayDiff<Geopoint>>
export declare type GeopointArrayDiffProps = DiffProps<ArrayDiff<Geopoint>>
export declare const GeopointFieldDiff: DiffComponent<ObjectDiff<Geopoint>>
export declare type GeopointFieldDiffProps = DiffProps<ObjectDiff<Geopoint>>
export declare function GeopointInput(props: GeopointInputProps): JSX_2.Element
export declare type GeopointInputProps = ObjectInputProps<Geopoint, GeopointSchemaType> & {
geoConfig: GoogleMapsInputConfig
}
export declare interface GeopointSchemaType extends ObjectSchemaType {
diffComponent?: DiffComponent<ObjectDiff<Geopoint>> | DiffComponentOptions<ObjectDiff<Geopoint>>
}
export declare const googleMapsInput: Plugin_2<GoogleMapsInputConfig>
export declare interface GoogleMapsInputConfig {
apiKey: string
defaultZoom?: number
defaultLocale?: string
defaultLocation?: {
lat: number
lng: number
}
}
export declare interface LatLng {
lat: number
lng: number
}
export {}