@trackunit/react-map-adapter-google 0.0.91 → 0.0.92-alpha-3e7014314a8.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/index.cjs.js +11 -22
- package/index.esm.js +11 -22
- package/package.json +4 -4
- package/src/constants.d.ts +0 -11
- package/migrations/entry.js.map +0 -1
package/index.cjs.js
CHANGED
|
@@ -11,26 +11,6 @@ var esToolkit = require('es-toolkit');
|
|
|
11
11
|
var zod = require('zod');
|
|
12
12
|
var reactDeviceDetect = require('react-device-detect');
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* Google Cloud Map IDs for different themes
|
|
16
|
-
* These are configured in Google Cloud Console for custom styling
|
|
17
|
-
*/
|
|
18
|
-
const GOOGLE_MAP_IDS = {
|
|
19
|
-
light: "462dc96a2b3709ee",
|
|
20
|
-
dark: "8676e1fb4a115a8a",
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Maps JS API version to load.
|
|
24
|
-
*
|
|
25
|
-
* Pinned to 3.64 because 3.65 decommissioned the Heatmap Layer (May 2026) and the
|
|
26
|
-
* Drawing Library (June 2026), both still used by map features. The Maps JS script is
|
|
27
|
-
* loaded once per page, so every `APIProvider` in the app must request the same version.
|
|
28
|
-
*
|
|
29
|
-
* Temporary: Google deletes numbered versions after ~3 quarters. Remove the pin once
|
|
30
|
-
* `HeatmapLayer` and `DrawingManager` usages are migrated to replacements.
|
|
31
|
-
*/
|
|
32
|
-
const GOOGLE_MAPS_API_VERSION = "3.64";
|
|
33
|
-
|
|
34
14
|
/**
|
|
35
15
|
* Shared Google Maps API context for multi-map layouts.
|
|
36
16
|
*
|
|
@@ -52,7 +32,7 @@ const GOOGLE_MAPS_API_VERSION = "3.64";
|
|
|
52
32
|
*/
|
|
53
33
|
const GoogleApiProvider = ({ apiKey, language, children }) => {
|
|
54
34
|
const libraries = react.useMemo(() => ["marker"], []);
|
|
55
|
-
return (jsxRuntime.jsx(reactGoogleMaps.APIProvider, { apiKey: apiKey, language: language, libraries: libraries,
|
|
35
|
+
return (jsxRuntime.jsx(reactGoogleMaps.APIProvider, { apiKey: apiKey, language: language, libraries: libraries, children: children }));
|
|
56
36
|
};
|
|
57
37
|
|
|
58
38
|
/**
|
|
@@ -2983,6 +2963,15 @@ const createGoogleMapsInstance = (config) => {
|
|
|
2983
2963
|
return new GoogleMapsAdapterInstance(config);
|
|
2984
2964
|
};
|
|
2985
2965
|
|
|
2966
|
+
/**
|
|
2967
|
+
* Google Cloud Map IDs for different themes
|
|
2968
|
+
* These are configured in Google Cloud Console for custom styling
|
|
2969
|
+
*/
|
|
2970
|
+
const GOOGLE_MAP_IDS = {
|
|
2971
|
+
light: "462dc96a2b3709ee",
|
|
2972
|
+
dark: "8676e1fb4a115a8a",
|
|
2973
|
+
};
|
|
2974
|
+
|
|
2986
2975
|
/**
|
|
2987
2976
|
* Internal component that renders the actual Google Map
|
|
2988
2977
|
* Must be inside APIProvider
|
|
@@ -3084,7 +3073,7 @@ const GoogleMapsRenderer = (props) => {
|
|
|
3084
3073
|
if (hasExternalProvider) {
|
|
3085
3074
|
return internalContent;
|
|
3086
3075
|
}
|
|
3087
|
-
return (jsxRuntime.jsx(reactGoogleMaps.APIProvider, { apiKey: apiKey, language: language, libraries: libraries, region: region,
|
|
3076
|
+
return (jsxRuntime.jsx(reactGoogleMaps.APIProvider, { apiKey: apiKey, language: language, libraries: libraries, region: region, children: internalContent }));
|
|
3088
3077
|
};
|
|
3089
3078
|
|
|
3090
3079
|
/** Stable reference — inline objects break `useMap` Map memo equality and recreate the map every render. */
|
package/index.esm.js
CHANGED
|
@@ -9,26 +9,6 @@ import { isEqual } from 'es-toolkit';
|
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { isDesktop } from 'react-device-detect';
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* Google Cloud Map IDs for different themes
|
|
14
|
-
* These are configured in Google Cloud Console for custom styling
|
|
15
|
-
*/
|
|
16
|
-
const GOOGLE_MAP_IDS = {
|
|
17
|
-
light: "462dc96a2b3709ee",
|
|
18
|
-
dark: "8676e1fb4a115a8a",
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Maps JS API version to load.
|
|
22
|
-
*
|
|
23
|
-
* Pinned to 3.64 because 3.65 decommissioned the Heatmap Layer (May 2026) and the
|
|
24
|
-
* Drawing Library (June 2026), both still used by map features. The Maps JS script is
|
|
25
|
-
* loaded once per page, so every `APIProvider` in the app must request the same version.
|
|
26
|
-
*
|
|
27
|
-
* Temporary: Google deletes numbered versions after ~3 quarters. Remove the pin once
|
|
28
|
-
* `HeatmapLayer` and `DrawingManager` usages are migrated to replacements.
|
|
29
|
-
*/
|
|
30
|
-
const GOOGLE_MAPS_API_VERSION = "3.64";
|
|
31
|
-
|
|
32
12
|
/**
|
|
33
13
|
* Shared Google Maps API context for multi-map layouts.
|
|
34
14
|
*
|
|
@@ -50,7 +30,7 @@ const GOOGLE_MAPS_API_VERSION = "3.64";
|
|
|
50
30
|
*/
|
|
51
31
|
const GoogleApiProvider = ({ apiKey, language, children }) => {
|
|
52
32
|
const libraries = useMemo(() => ["marker"], []);
|
|
53
|
-
return (jsx(APIProvider, { apiKey: apiKey, language: language, libraries: libraries,
|
|
33
|
+
return (jsx(APIProvider, { apiKey: apiKey, language: language, libraries: libraries, children: children }));
|
|
54
34
|
};
|
|
55
35
|
|
|
56
36
|
/**
|
|
@@ -2981,6 +2961,15 @@ const createGoogleMapsInstance = (config) => {
|
|
|
2981
2961
|
return new GoogleMapsAdapterInstance(config);
|
|
2982
2962
|
};
|
|
2983
2963
|
|
|
2964
|
+
/**
|
|
2965
|
+
* Google Cloud Map IDs for different themes
|
|
2966
|
+
* These are configured in Google Cloud Console for custom styling
|
|
2967
|
+
*/
|
|
2968
|
+
const GOOGLE_MAP_IDS = {
|
|
2969
|
+
light: "462dc96a2b3709ee",
|
|
2970
|
+
dark: "8676e1fb4a115a8a",
|
|
2971
|
+
};
|
|
2972
|
+
|
|
2984
2973
|
/**
|
|
2985
2974
|
* Internal component that renders the actual Google Map
|
|
2986
2975
|
* Must be inside APIProvider
|
|
@@ -3082,7 +3071,7 @@ const GoogleMapsRenderer = (props) => {
|
|
|
3082
3071
|
if (hasExternalProvider) {
|
|
3083
3072
|
return internalContent;
|
|
3084
3073
|
}
|
|
3085
|
-
return (jsx(APIProvider, { apiKey: apiKey, language: language, libraries: libraries, region: region,
|
|
3074
|
+
return (jsx(APIProvider, { apiKey: apiKey, language: language, libraries: libraries, region: region, children: internalContent }));
|
|
3086
3075
|
};
|
|
3087
3076
|
|
|
3088
3077
|
/** Stable reference — inline objects break `useMap` Map memo equality and recreate the map every render. */
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-map-adapter-google",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.92-alpha-3e7014314a8.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/react-map-adapter-shared": "0.0.
|
|
11
|
-
"@trackunit/react-map-color-utils": "0.0.
|
|
12
|
-
"@trackunit/geo-json-utils": "1.15.
|
|
10
|
+
"@trackunit/react-map-adapter-shared": "0.0.103-alpha-3e7014314a8.0",
|
|
11
|
+
"@trackunit/react-map-color-utils": "0.0.83-alpha-3e7014314a8.0",
|
|
12
|
+
"@trackunit/geo-json-utils": "1.15.22-alpha-3e7014314a8.0",
|
|
13
13
|
"@googlemaps/markerclusterer": "^2.6.2",
|
|
14
14
|
"@vis.gl/react-google-maps": "^1.7.1",
|
|
15
15
|
"es-toolkit": "^1.39.10",
|
package/src/constants.d.ts
CHANGED
|
@@ -6,14 +6,3 @@ export declare const GOOGLE_MAP_IDS: {
|
|
|
6
6
|
readonly light: "462dc96a2b3709ee";
|
|
7
7
|
readonly dark: "8676e1fb4a115a8a";
|
|
8
8
|
};
|
|
9
|
-
/**
|
|
10
|
-
* Maps JS API version to load.
|
|
11
|
-
*
|
|
12
|
-
* Pinned to 3.64 because 3.65 decommissioned the Heatmap Layer (May 2026) and the
|
|
13
|
-
* Drawing Library (June 2026), both still used by map features. The Maps JS script is
|
|
14
|
-
* loaded once per page, so every `APIProvider` in the app must request the same version.
|
|
15
|
-
*
|
|
16
|
-
* Temporary: Google deletes numbered versions after ~3 quarters. Remove the pin once
|
|
17
|
-
* `HeatmapLayer` and `DrawingManager` usages are migrated to replacements.
|
|
18
|
-
*/
|
|
19
|
-
export declare const GOOGLE_MAPS_API_VERSION = "3.64";
|
package/migrations/entry.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/react/map-adapter-google/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
|