@sanity/google-maps-input 4.2.1 → 5.0.1

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.
Files changed (39) hide show
  1. package/LICENSE +1 -1
  2. package/assets/google-maps-input.png +0 -0
  3. package/assets/google-maps-radius-input.png +0 -0
  4. package/dist/index.d.ts +54 -84
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +736 -652
  7. package/dist/index.js.map +1 -1
  8. package/package.json +36 -80
  9. package/dist/index.cjs +0 -1014
  10. package/dist/index.cjs.map +0 -1
  11. package/dist/index.d.cts +0 -85
  12. package/sanity.json +0 -8
  13. package/src/diff/GeopointArrayDiff.tsx +0 -86
  14. package/src/diff/GeopointFieldDiff.styles.tsx +0 -20
  15. package/src/diff/GeopointFieldDiff.tsx +0 -97
  16. package/src/diff/GeopointMove.tsx +0 -48
  17. package/src/diff/GeopointRadiusFieldDiff.tsx +0 -136
  18. package/src/diff/GeopointRadiusMove.tsx +0 -92
  19. package/src/diff/resolver.ts +0 -26
  20. package/src/global-workaround.ts +0 -11
  21. package/src/index.ts +0 -20
  22. package/src/input/GeopointInput.styles.tsx +0 -11
  23. package/src/input/GeopointInput.tsx +0 -179
  24. package/src/input/GeopointRadiusInput.tsx +0 -258
  25. package/src/input/GeopointRadiusSelect.tsx +0 -193
  26. package/src/input/GeopointSelect.tsx +0 -79
  27. package/src/loader/GoogleMapsLoadProxy.tsx +0 -62
  28. package/src/loader/LoadError.tsx +0 -43
  29. package/src/loader/loadGoogleMapsApi.ts +0 -77
  30. package/src/map/Arrow.tsx +0 -76
  31. package/src/map/Map.styles.tsx +0 -10
  32. package/src/map/Map.tsx +0 -125
  33. package/src/map/Marker.tsx +0 -130
  34. package/src/map/SearchInput.styles.tsx +0 -8
  35. package/src/map/SearchInput.tsx +0 -56
  36. package/src/map/util.ts +0 -14
  37. package/src/plugin.tsx +0 -92
  38. package/src/types.ts +0 -46
  39. package/v2-incompatible.js +0 -10
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Sanity.io
3
+ Copyright (c) 2026 Sanity.io
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
Binary file
package/dist/index.d.ts CHANGED
@@ -1,85 +1,55 @@
1
- import type {ArrayDiff} from 'sanity'
2
- import {DiffComponent} from 'sanity'
3
- import type {DiffComponentOptions} from 'sanity'
4
- import {DiffProps} from 'sanity'
5
- import {JSX} from 'react'
6
- import {ObjectDiff} from 'sanity'
7
- import {ObjectInputProps} from 'sanity'
8
- import type {ObjectSchemaType} from 'sanity'
9
- import {Plugin as Plugin_2} from 'sanity'
10
- import {default as React_2} from 'react'
11
-
12
- export declare interface Geopoint {
13
- _type: 'geopoint'
14
- _key?: string
15
- lat: number
16
- lng: number
17
- alt?: number
18
- }
19
-
20
- export declare const GeopointArrayDiff: DiffComponent<ArrayDiff<Geopoint>>
21
-
22
- export declare type GeopointArrayDiffProps = DiffProps<ArrayDiff<Geopoint>>
23
-
24
- export declare const GeopointFieldDiff: DiffComponent<ObjectDiff<Geopoint>>
25
-
26
- export declare type GeopointFieldDiffProps = DiffProps<ObjectDiff<Geopoint>>
27
-
28
- export declare function GeopointInput(props: GeopointInputProps): JSX.Element
29
-
30
- export declare type GeopointInputProps = ObjectInputProps<Geopoint, GeopointSchemaType> & {
31
- geoConfig: GoogleMapsInputConfig
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
- export declare interface LatLng {
81
- lat: number
82
- lng: number
83
- }
84
-
85
- export {}
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/GeopointRadiusFieldDi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