@sanity/google-maps-input 4.2.1 → 5.0.0
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/LICENSE +1 -1
- package/assets/google-maps-input.png +0 -0
- package/assets/google-maps-radius-input.png +0 -0
- package/dist/index.d.ts +54 -84
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +736 -652
- package/dist/index.js.map +1 -1
- package/package.json +35 -79
- package/dist/index.cjs +0 -1014
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -85
- package/sanity.json +0 -8
- package/src/diff/GeopointArrayDiff.tsx +0 -86
- package/src/diff/GeopointFieldDiff.styles.tsx +0 -20
- package/src/diff/GeopointFieldDiff.tsx +0 -97
- package/src/diff/GeopointMove.tsx +0 -48
- package/src/diff/GeopointRadiusFieldDiff.tsx +0 -136
- package/src/diff/GeopointRadiusMove.tsx +0 -92
- package/src/diff/resolver.ts +0 -26
- package/src/global-workaround.ts +0 -11
- package/src/index.ts +0 -20
- package/src/input/GeopointInput.styles.tsx +0 -11
- package/src/input/GeopointInput.tsx +0 -179
- package/src/input/GeopointRadiusInput.tsx +0 -258
- package/src/input/GeopointRadiusSelect.tsx +0 -193
- package/src/input/GeopointSelect.tsx +0 -79
- package/src/loader/GoogleMapsLoadProxy.tsx +0 -62
- package/src/loader/LoadError.tsx +0 -43
- package/src/loader/loadGoogleMapsApi.ts +0 -77
- package/src/map/Arrow.tsx +0 -76
- package/src/map/Map.styles.tsx +0 -10
- package/src/map/Map.tsx +0 -125
- package/src/map/Marker.tsx +0 -130
- package/src/map/SearchInput.styles.tsx +0 -8
- package/src/map/SearchInput.tsx +0 -56
- package/src/map/util.ts +0 -14
- package/src/plugin.tsx +0 -92
- package/src/types.ts +0 -46
- package/v2-incompatible.js +0 -10
package/LICENSE
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,85 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export declare interface GeopointRadius {
|
|
35
|
-
_type: 'geopointRadius'
|
|
36
|
-
_key?: string
|
|
37
|
-
lat: number
|
|
38
|
-
lng: number
|
|
39
|
-
alt?: number
|
|
40
|
-
radius: number
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export declare const GeopointRadiusFieldDiff: DiffComponent<ObjectDiff<GeopointRadius>>
|
|
44
|
-
|
|
45
|
-
export declare type GeopointRadiusFieldDiffProps = DiffProps<ObjectDiff<GeopointRadius>>
|
|
46
|
-
|
|
47
|
-
export declare function GeopointRadiusInput(props: GeopointRadiusInputProps): React_2.JSX.Element
|
|
48
|
-
|
|
49
|
-
export declare type GeopointRadiusInputProps = ObjectInputProps<
|
|
50
|
-
GeopointRadius,
|
|
51
|
-
GeopointRadiusSchemaType
|
|
52
|
-
> & {
|
|
53
|
-
geoConfig: GoogleMapsInputConfig
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export declare interface GeopointRadiusSchemaType extends ObjectSchemaType {
|
|
57
|
-
diffComponent?:
|
|
58
|
-
| DiffComponent<ObjectDiff<GeopointRadius>>
|
|
59
|
-
| DiffComponentOptions<ObjectDiff<GeopointRadius>>
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export declare interface GeopointSchemaType extends ObjectSchemaType {
|
|
63
|
-
diffComponent?: DiffComponent<ObjectDiff<Geopoint>> | DiffComponentOptions<ObjectDiff<Geopoint>>
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export declare const googleMapsInput: Plugin_2<GoogleMapsInputConfig>
|
|
67
|
-
|
|
68
|
-
export declare interface GoogleMapsInputConfig {
|
|
69
|
-
apiKey: string
|
|
70
|
-
defaultZoom?: number
|
|
71
|
-
defaultLocale?: string
|
|
1
|
+
import { ArrayDiff, DiffComponent, DiffComponentOptions, DiffProps as DiffProps$3, ObjectDiff, ObjectInputProps, ObjectSchemaType } from "sanity";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface LatLng {
|
|
4
|
+
lat: number;
|
|
5
|
+
lng: number;
|
|
6
|
+
}
|
|
7
|
+
interface Geopoint {
|
|
8
|
+
_type: 'geopoint';
|
|
9
|
+
_key?: string;
|
|
10
|
+
lat: number;
|
|
11
|
+
lng: number;
|
|
12
|
+
alt?: number;
|
|
13
|
+
}
|
|
14
|
+
interface GeopointRadius {
|
|
15
|
+
_type: 'geopointRadius';
|
|
16
|
+
_key?: string;
|
|
17
|
+
lat: number;
|
|
18
|
+
lng: number;
|
|
19
|
+
alt?: number;
|
|
20
|
+
radius: number;
|
|
21
|
+
}
|
|
22
|
+
interface GeopointSchemaType extends ObjectSchemaType {
|
|
23
|
+
diffComponent?: DiffComponent<ObjectDiff<Geopoint>> | DiffComponentOptions<ObjectDiff<Geopoint>>;
|
|
24
|
+
}
|
|
25
|
+
interface GeopointRadiusSchemaType extends ObjectSchemaType {
|
|
26
|
+
diffComponent?: DiffComponent<ObjectDiff<GeopointRadius>> | DiffComponentOptions<ObjectDiff<GeopointRadius>>;
|
|
27
|
+
}
|
|
28
|
+
interface GoogleMapsInputConfig {
|
|
29
|
+
apiKey: string;
|
|
30
|
+
defaultZoom?: number;
|
|
31
|
+
defaultLocale?: string;
|
|
72
32
|
defaultLocation?: {
|
|
73
|
-
lat: number
|
|
74
|
-
lng: number
|
|
75
|
-
}
|
|
76
|
-
defaultRadiusZoom?: number
|
|
77
|
-
defaultRadius?: number
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
33
|
+
lat: number;
|
|
34
|
+
lng: number;
|
|
35
|
+
};
|
|
36
|
+
defaultRadiusZoom?: number;
|
|
37
|
+
defaultRadius?: number;
|
|
38
|
+
}
|
|
39
|
+
type GeopointInputProps = ObjectInputProps<Geopoint, GeopointSchemaType> & {
|
|
40
|
+
geoConfig: GoogleMapsInputConfig;
|
|
41
|
+
};
|
|
42
|
+
declare function GeopointInput(props: GeopointInputProps): import("react").JSX.Element;
|
|
43
|
+
type GeopointRadiusInputProps = ObjectInputProps<GeopointRadius, GeopointRadiusSchemaType> & {
|
|
44
|
+
geoConfig: GoogleMapsInputConfig;
|
|
45
|
+
};
|
|
46
|
+
declare function GeopointRadiusInput(props: GeopointRadiusInputProps): React.JSX.Element;
|
|
47
|
+
type DiffProps = DiffProps$3<ArrayDiff<Geopoint>>;
|
|
48
|
+
declare const GeopointArrayDiff: DiffComponent<ArrayDiff<Geopoint>>;
|
|
49
|
+
type DiffProps$1 = DiffProps$3<ObjectDiff<Geopoint>>;
|
|
50
|
+
declare const GeopointFieldDiff: DiffComponent<ObjectDiff<Geopoint>>;
|
|
51
|
+
type DiffProps$2 = DiffProps$3<ObjectDiff<GeopointRadius>>;
|
|
52
|
+
declare const GeopointRadiusFieldDiff: DiffComponent<ObjectDiff<GeopointRadius>>;
|
|
53
|
+
declare const googleMapsInput: import("sanity").Plugin<GoogleMapsInputConfig>;
|
|
54
|
+
export { type Geopoint, GeopointArrayDiff, type DiffProps as GeopointArrayDiffProps, GeopointFieldDiff, type DiffProps$1 as GeopointFieldDiffProps, GeopointInput, type GeopointInputProps, type GeopointRadius, GeopointRadiusFieldDiff, type DiffProps$2 as GeopointRadiusFieldDiffProps, GeopointRadiusInput, type GeopointRadiusInputProps, type GeopointRadiusSchemaType, type GeopointSchemaType, type GoogleMapsInputConfig, type LatLng, googleMapsInput };
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/input/GeopointInput.tsx","../src/input/GeopointRadiusInput.tsx","../src/diff/GeopointArrayDiff.tsx","../src/diff/GeopointFieldDiff.tsx","../src/diff/GeopointRadiusFieldDiff.tsx","../src/plugin.tsx"],"mappings":";;UAIiB,MAAA;EACf,GAAA;EACA,GAAG;AAAA;AAAA,UAGY,QAAA;EACf,KAAA;EACA,IAAA;EACA,GAAA;EACA,GAAA;EACA,GAAA;AAAA;AAAA,UAGe,cAAA;EACf,KAAA;EACA,IAAA;EACA,GAAA;EACA,GAAA;EACA,GAAA;EACA,MAAA;AAAA;AAAA,UAGe,kBAAA,SAA2B,gBAAA;EAC1C,aAAA,GAAgB,aAAA,CAAc,UAAA,CAAW,QAAA,KAAa,oBAAA,CAAqB,UAAA,CAAW,QAAA;AAAA;AAAA,UAGvE,wBAAA,SAAiC,gBAAA;EAChD,aAAA,GACI,aAAA,CAAc,UAAA,CAAW,cAAA,KACzB,oBAAA,CAAqB,UAAA,CAAW,cAAA;AAAA;AAAA,UAGrB,qBAAA;EACf,MAAA;EACA,WAAA;EACA,aAAA;EACA,eAAA;IACE,GAAA;IACA,GAAA;EAAA;EAEF,iBAAA;EACA,aAAA;AAAA;AAAA,KClBU,kBAAA,GAAqB,gBAAA,CAAiB,QAAA,EAAU,kBAAA;EAC1D,SAAA,EAAW,qBAAA;AAAA;AAAA,iBAGG,aAAA,CAAc,KAAA,EAAO,kBAAkB,mBAAA,GAAA,CAAA,OAAA;AAAA,KC6C3C,wBAAA,GAA2B,gBAAA,CACrC,cAAA,EACA,wBAAA;EAEA,SAAA,EAAW,qBAAA;AAAA;AAAA,iBAGG,mBAAA,CAAoB,KAAA,EAAO,wBAAA,GAAwB,KAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KCpEvD,SAAA,GAAY,WAAA,CAAiB,SAAA,CAAU,QAAA;AAAA,cAEtC,iBAAA,EAAmB,aAAA,CAAc,SAAA,CAAU,QAAA;AAAA,KCF5C,WAAA,GAAY,WAAA,CAAiB,UAAA,CAAW,QAAA;AAAA,cAEvC,iBAAA,EAAmB,aAAA,CAAc,UAAA,CAAW,QAAA;AAAA,KCF7C,WAAA,GAAY,WAAA,CAAiB,UAAA,CAAW,cAAA;AAAA,cAEvC,uBAAA,EAAyB,aAAA,CAAc,UAAA,CAAW,cAAA;AAAA,cCVlD,eAAA,mBAAe,MAAA,CAAA,qBAAA"}
|