@sanity/google-maps-input 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # @sanity/google-maps-input
2
2
 
3
- >T his is a **Sanity Studio v3** plugin.
4
- > For the v2 version, please refer to the [v2-branch](https://github.com/sanity-io/sanity/tree/next/packages/%40sanity/google-maps-input).
3
+ > This is a **Sanity Studio v3** plugin.
4
+ > For the v2 version, please refer to the [v2-branch](https://github.com/sanity-io/google-maps-input/tree/studio-v2).
5
+
6
+ ## What is it?
5
7
 
6
- ## What is it?
7
8
  Plugin for [Sanity Studio](https://www.sanity.io) providing input handlers for geo-related input types using Google Maps.
8
9
 
9
10
  This plugin will replace the default `geopoint` input component.
@@ -12,7 +13,7 @@ This plugin will replace the default `geopoint` input component.
12
13
 
13
14
  ## Know issues in Studio V3
14
15
 
15
- * Diff-preview is not implemented.
16
+ - Diff-preview is not implemented.
16
17
 
17
18
  These will be re-added well before Studio V3 GA.
18
19
 
@@ -35,23 +36,25 @@ yarn add @sanity/google-maps-input
35
36
  Add it as a plugin in sanity.config.ts (or .js), with a valid [Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key):
36
37
 
37
38
  ```js
38
- import { googleMapsInput } from "@sanity/google-maps-input";
39
+ import {googleMapsInput} from '@sanity/google-maps-input'
39
40
 
40
41
  export default defineConfig({
41
42
  // ...
42
43
  plugins: [
43
- googleMapsInput({
44
- apiKey: "my-api-key"
45
- })
46
- ]
44
+ googleMapsInput({
45
+ apiKey: 'my-api-key',
46
+ }),
47
+ ],
47
48
  })
48
49
  ```
50
+
49
51
  Ensure that the key has access to:
50
- * Google Maps JavaScript API
51
- * Google Places API Web Service
52
- * Google Static Maps API
53
52
 
54
- And that the key allows web-access from the Studio URL(s) you are using the plugin in.
53
+ - Google Maps JavaScript API
54
+ - Google Places API Web Service
55
+ - Google Static Maps API
56
+
57
+ And that the key allows web-access from the Studio URL(s) you are using the plugin in.
55
58
 
56
59
  Note: This plugin will replace the default `geopoint` input component.
57
60
 
@@ -0,0 +1,7 @@
1
+ import cjs from './index.js';
2
+
3
+ export const GeopointArrayDiff = cjs.GeopointArrayDiff;
4
+ export const GeopointFieldDiff = cjs.GeopointFieldDiff;
5
+ export const GeopointInput = cjs.GeopointInput;
6
+ export const googleMapsInput = cjs.googleMapsInput;
7
+
@@ -4,6 +4,7 @@ import {ArrayDiff} from 'sanity'
4
4
  import {DiffComponent} from 'sanity'
5
5
  import {DiffComponentOptions} from 'sanity'
6
6
  import {DiffProps} from 'sanity'
7
+ import {JSX as JSX_2} from 'react/jsx-runtime'
7
8
  import {ObjectDiff} from 'sanity'
8
9
  import {ObjectInputProps} from 'sanity'
9
10
  import {ObjectSchemaType} from 'sanity'
@@ -38,7 +39,7 @@ export declare class GeopointInput extends React_2.PureComponent<GeopointInputPr
38
39
  handleCloseModal: () => void
39
40
  handleChange: (latLng: google.maps.LatLng) => void
40
41
  handleClear: () => void
41
- render(): JSX.Element
42
+ render(): JSX_2.Element
42
43
  }
43
44
 
44
45
  export declare type GeopointInputProps = ObjectInputProps<Geopoint, GeopointSchemaType> & {