@trackunit/react-map-adapter-google 0.0.90-alpha-62031fc7c43.0 → 0.0.90

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 CHANGED
@@ -11,6 +11,26 @@ 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
+
14
34
  /**
15
35
  * Shared Google Maps API context for multi-map layouts.
16
36
  *
@@ -32,7 +52,7 @@ var reactDeviceDetect = require('react-device-detect');
32
52
  */
33
53
  const GoogleApiProvider = ({ apiKey, language, children }) => {
34
54
  const libraries = react.useMemo(() => ["marker"], []);
35
- return (jsxRuntime.jsx(reactGoogleMaps.APIProvider, { apiKey: apiKey, language: language, libraries: libraries, children: children }));
55
+ return (jsxRuntime.jsx(reactGoogleMaps.APIProvider, { apiKey: apiKey, language: language, libraries: libraries, version: GOOGLE_MAPS_API_VERSION, children: children }));
36
56
  };
37
57
 
38
58
  /**
@@ -2963,15 +2983,6 @@ const createGoogleMapsInstance = (config) => {
2963
2983
  return new GoogleMapsAdapterInstance(config);
2964
2984
  };
2965
2985
 
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
-
2975
2986
  /**
2976
2987
  * Internal component that renders the actual Google Map
2977
2988
  * Must be inside APIProvider
@@ -3073,7 +3084,7 @@ const GoogleMapsRenderer = (props) => {
3073
3084
  if (hasExternalProvider) {
3074
3085
  return internalContent;
3075
3086
  }
3076
- return (jsxRuntime.jsx(reactGoogleMaps.APIProvider, { apiKey: apiKey, language: language, libraries: libraries, region: region, children: internalContent }));
3087
+ return (jsxRuntime.jsx(reactGoogleMaps.APIProvider, { apiKey: apiKey, language: language, libraries: libraries, region: region, version: GOOGLE_MAPS_API_VERSION, children: internalContent }));
3077
3088
  };
3078
3089
 
3079
3090
  /** Stable reference — inline objects break `useMap` Map memo equality and recreate the map every render. */
package/index.esm.js CHANGED
@@ -9,6 +9,26 @@ 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
+
12
32
  /**
13
33
  * Shared Google Maps API context for multi-map layouts.
14
34
  *
@@ -30,7 +50,7 @@ import { isDesktop } from 'react-device-detect';
30
50
  */
31
51
  const GoogleApiProvider = ({ apiKey, language, children }) => {
32
52
  const libraries = useMemo(() => ["marker"], []);
33
- return (jsx(APIProvider, { apiKey: apiKey, language: language, libraries: libraries, children: children }));
53
+ return (jsx(APIProvider, { apiKey: apiKey, language: language, libraries: libraries, version: GOOGLE_MAPS_API_VERSION, children: children }));
34
54
  };
35
55
 
36
56
  /**
@@ -2961,15 +2981,6 @@ const createGoogleMapsInstance = (config) => {
2961
2981
  return new GoogleMapsAdapterInstance(config);
2962
2982
  };
2963
2983
 
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
-
2973
2984
  /**
2974
2985
  * Internal component that renders the actual Google Map
2975
2986
  * Must be inside APIProvider
@@ -3071,7 +3082,7 @@ const GoogleMapsRenderer = (props) => {
3071
3082
  if (hasExternalProvider) {
3072
3083
  return internalContent;
3073
3084
  }
3074
- return (jsx(APIProvider, { apiKey: apiKey, language: language, libraries: libraries, region: region, children: internalContent }));
3085
+ return (jsx(APIProvider, { apiKey: apiKey, language: language, libraries: libraries, region: region, version: GOOGLE_MAPS_API_VERSION, children: internalContent }));
3075
3086
  };
3076
3087
 
3077
3088
  /** Stable reference — inline objects break `useMap` Map memo equality and recreate the map every render. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/react/map-adapter-google/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@trackunit/react-map-adapter-google",
3
- "version": "0.0.90-alpha-62031fc7c43.0",
3
+ "version": "0.0.90",
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.101-alpha-62031fc7c43.0",
11
- "@trackunit/react-map-color-utils": "0.0.82-alpha-62031fc7c43.0",
12
- "@trackunit/geo-json-utils": "1.15.21-alpha-62031fc7c43.0",
10
+ "@trackunit/react-map-adapter-shared": "0.0.101",
11
+ "@trackunit/react-map-color-utils": "0.0.82",
12
+ "@trackunit/geo-json-utils": "1.15.21",
13
13
  "@googlemaps/markerclusterer": "^2.6.2",
14
14
  "@vis.gl/react-google-maps": "^1.7.1",
15
15
  "es-toolkit": "^1.39.10",
@@ -6,3 +6,14 @@ 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";