@ttoss/google-maps 1.21.2 → 1.22.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.
- package/dist/esm/index.js +1 -4
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -4
- package/package.json +5 -5
package/dist/esm/index.js
CHANGED
|
@@ -46,10 +46,7 @@ var GoogleMapsProvider = ({
|
|
|
46
46
|
googleMaps: null
|
|
47
47
|
};
|
|
48
48
|
}, [googleMaps, status]);
|
|
49
|
-
return /* @__PURE__ */ jsx(GoogleMapsContext.Provider, {
|
|
50
|
-
value,
|
|
51
|
-
children
|
|
52
|
-
});
|
|
49
|
+
return /* @__PURE__ */ jsx(GoogleMapsContext.Provider, { value, children });
|
|
53
50
|
};
|
|
54
51
|
var useGoogleMaps = () => React2.useContext(GoogleMapsContext);
|
|
55
52
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ScriptStatus } from '@ttoss/hooks';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
type Extends<T, U extends T> = U;
|
|
5
|
+
type GoogleMaps = typeof google.maps;
|
|
6
|
+
type LoadedMapsStatus = Extends<ScriptStatus, 'ready'>;
|
|
7
|
+
type NotLoadedMapStatus = Extends<ScriptStatus, 'idle' | 'error' | 'loading'>;
|
|
8
|
+
type Libraries = 'places' | 'visualization' | 'drawing' | 'geometry';
|
|
9
9
|
declare const GoogleMapsProvider: ({ children, apiKey, libraries, language, }: {
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
apiKey: string;
|
|
@@ -53,8 +53,8 @@ interface HookArgs {
|
|
|
53
53
|
defaultValue?: string;
|
|
54
54
|
initOnMount?: boolean;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
type Suggestion = google.maps.places.AutocompletePrediction;
|
|
57
|
+
type Status = `${google.maps.places.PlacesServiceStatus}` | '';
|
|
58
58
|
interface Suggestions {
|
|
59
59
|
readonly loading: boolean;
|
|
60
60
|
readonly status: Status;
|
package/dist/index.js
CHANGED
|
@@ -81,10 +81,7 @@ var GoogleMapsProvider = ({
|
|
|
81
81
|
googleMaps: null
|
|
82
82
|
};
|
|
83
83
|
}, [googleMaps, status]);
|
|
84
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GoogleMapsContext.Provider, {
|
|
85
|
-
value,
|
|
86
|
-
children
|
|
87
|
-
});
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GoogleMapsContext.Provider, { value, children });
|
|
88
85
|
};
|
|
89
86
|
var useGoogleMaps = () => React2.useContext(GoogleMapsContext);
|
|
90
87
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/google-maps",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"typings": "dist/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@ttoss/hooks": "^1.
|
|
22
|
+
"@ttoss/hooks": "^1.21.1",
|
|
23
23
|
"@types/google.maps": "^3.49.2",
|
|
24
24
|
"use-callback-ref": "^1.3.0"
|
|
25
25
|
},
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"react-dom": ">=16.8.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@ttoss/config": "^1.
|
|
32
|
-
"@ttoss/test-utils": "^1.
|
|
31
|
+
"@ttoss/config": "^1.26.0",
|
|
32
|
+
"@ttoss/test-utils": "^1.20.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "4b7a4d3035f4b4d43b02069df62fcc9ca57c2bc6"
|
|
38
38
|
}
|