@trackunit/react-map 0.2.211 → 0.2.212

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
@@ -5888,11 +5888,12 @@ const useFitToContent = (api, handles, options) => {
5888
5888
  };
5889
5889
 
5890
5890
  /**
5891
- * Single dev-warning channel for `useHeatmap` (invalid data, invalid style, unhandled render errors).
5891
+ * Single dev-warning channel for react-map hooks (invalid data, invalid style, unhandled render errors).
5892
+ * Messages are prefixed with the emitting hook, e.g. `[useHeatmap]`.
5892
5893
  */
5893
- const warnHeatmap = (message, ...details) => {
5894
- // eslint-disable-next-line no-console -- Intentional: the one heatmap warning channel; invalid input is dropped or defaulted and render errors without onError must stay visible
5895
- console.warn(`[useHeatmap] ${message}`, ...details);
5894
+ const consoleWarnMap = (source, message, ...details) => {
5895
+ // eslint-disable-next-line no-console -- Intentional: the one react-map warning channel; invalid input is dropped or defaulted and render errors without onError must stay visible
5896
+ console.warn(`[${source}] ${message}`, ...details);
5896
5897
  };
5897
5898
 
5898
5899
  /**
@@ -5930,7 +5931,7 @@ const normalizeHeatmapData = ({ data, getPosition, getWeight, }) => {
5930
5931
  });
5931
5932
  }
5932
5933
  if (invalidPositionCount > 0 || invalidWeightCount > 0) {
5933
- warnHeatmap(`Filtered ${invalidPositionCount} item(s) with invalid position and ${invalidWeightCount} item(s) with invalid weight. Expected [longitude, latitude] with longitude between -180 and 180, latitude between -90 and 90, and a finite weight >= 0.`);
5934
+ consoleWarnMap("useHeatmap", `Filtered ${invalidPositionCount} item(s) with invalid position and ${invalidWeightCount} item(s) with invalid weight. Expected [longitude, latitude] with longitude between -180 and 180, latitude between -90 and 90, and a finite weight >= 0.`);
5934
5935
  }
5935
5936
  return {
5936
5937
  features: { type: "FeatureCollection", features },
@@ -5993,7 +5994,7 @@ const resolveColorRange = (colorRange) => {
5993
5994
  const valid = parsed.filter(sharedUtils.nonNullable);
5994
5995
  if (colorRange.length >= 2 && valid.length === parsed.length)
5995
5996
  return valid;
5996
- warnHeatmap("colorRange needs at least two supported colours (#rgb, #rrggbb, #rrggbbaa, rgb(), rgba()); using the default.", colorRange);
5997
+ consoleWarnMap("useHeatmap", "colorRange needs at least two supported colours (#rgb, #rrggbb, #rrggbbaa, rgb(), rgba()); using the default.", colorRange);
5997
5998
  return DEFAULT_PARSED_COLOR_RANGE;
5998
5999
  };
5999
6000
  const HEATMAP_STYLE_RULES = {
@@ -6026,7 +6027,7 @@ const resolveHeatmapStyle = (style) => {
6026
6027
  colorRange: resolveColorRange(style?.colorRange),
6027
6028
  };
6028
6029
  if (nonFiniteKeys.length > 0) {
6029
- warnHeatmap(`Non-finite style value(s) for ${nonFiniteKeys.join(", ")} replaced with defaults.`);
6030
+ consoleWarnMap("useHeatmap", `Non-finite style value(s) for ${nonFiniteKeys.join(", ")} replaced with defaults.`);
6030
6031
  }
6031
6032
  return resolved;
6032
6033
  };
@@ -6068,12 +6069,12 @@ const useHeatmap = (options) => {
6068
6069
  handler(error);
6069
6070
  }
6070
6071
  catch (handlerError) {
6071
- warnHeatmap(`onError for heatmap "${error.layerId}" threw.`, handlerError, error.cause);
6072
+ consoleWarnMap("useHeatmap", `onError for heatmap "${error.layerId}" threw.`, handlerError, error.cause);
6072
6073
  captureOnce(`${error.layerId}:on-error-threw`, `Heatmap onError threw: ${payload}`, handlerError, "on-error-threw");
6073
6074
  }
6074
6075
  return;
6075
6076
  }
6076
- warnHeatmap(`Heatmap "${error.layerId}" failed to render (${error.code}).`, error.cause);
6077
+ consoleWarnMap("useHeatmap", `Heatmap "${error.layerId}" failed to render (${error.code}).`, error.cause);
6077
6078
  }, [captureOnce]);
6078
6079
  // Keyed on `data` (adjust-state-during-render + isEqual) so inline accessors
6079
6080
  // don't re-normalize the whole dataset on every render. Accessor changes
package/index.esm.js CHANGED
@@ -5887,11 +5887,12 @@ const useFitToContent = (api, handles, options) => {
5887
5887
  };
5888
5888
 
5889
5889
  /**
5890
- * Single dev-warning channel for `useHeatmap` (invalid data, invalid style, unhandled render errors).
5890
+ * Single dev-warning channel for react-map hooks (invalid data, invalid style, unhandled render errors).
5891
+ * Messages are prefixed with the emitting hook, e.g. `[useHeatmap]`.
5891
5892
  */
5892
- const warnHeatmap = (message, ...details) => {
5893
- // eslint-disable-next-line no-console -- Intentional: the one heatmap warning channel; invalid input is dropped or defaulted and render errors without onError must stay visible
5894
- console.warn(`[useHeatmap] ${message}`, ...details);
5893
+ const consoleWarnMap = (source, message, ...details) => {
5894
+ // eslint-disable-next-line no-console -- Intentional: the one react-map warning channel; invalid input is dropped or defaulted and render errors without onError must stay visible
5895
+ console.warn(`[${source}] ${message}`, ...details);
5895
5896
  };
5896
5897
 
5897
5898
  /**
@@ -5929,7 +5930,7 @@ const normalizeHeatmapData = ({ data, getPosition, getWeight, }) => {
5929
5930
  });
5930
5931
  }
5931
5932
  if (invalidPositionCount > 0 || invalidWeightCount > 0) {
5932
- warnHeatmap(`Filtered ${invalidPositionCount} item(s) with invalid position and ${invalidWeightCount} item(s) with invalid weight. Expected [longitude, latitude] with longitude between -180 and 180, latitude between -90 and 90, and a finite weight >= 0.`);
5933
+ consoleWarnMap("useHeatmap", `Filtered ${invalidPositionCount} item(s) with invalid position and ${invalidWeightCount} item(s) with invalid weight. Expected [longitude, latitude] with longitude between -180 and 180, latitude between -90 and 90, and a finite weight >= 0.`);
5933
5934
  }
5934
5935
  return {
5935
5936
  features: { type: "FeatureCollection", features },
@@ -5992,7 +5993,7 @@ const resolveColorRange = (colorRange) => {
5992
5993
  const valid = parsed.filter(nonNullable);
5993
5994
  if (colorRange.length >= 2 && valid.length === parsed.length)
5994
5995
  return valid;
5995
- warnHeatmap("colorRange needs at least two supported colours (#rgb, #rrggbb, #rrggbbaa, rgb(), rgba()); using the default.", colorRange);
5996
+ consoleWarnMap("useHeatmap", "colorRange needs at least two supported colours (#rgb, #rrggbb, #rrggbbaa, rgb(), rgba()); using the default.", colorRange);
5996
5997
  return DEFAULT_PARSED_COLOR_RANGE;
5997
5998
  };
5998
5999
  const HEATMAP_STYLE_RULES = {
@@ -6025,7 +6026,7 @@ const resolveHeatmapStyle = (style) => {
6025
6026
  colorRange: resolveColorRange(style?.colorRange),
6026
6027
  };
6027
6028
  if (nonFiniteKeys.length > 0) {
6028
- warnHeatmap(`Non-finite style value(s) for ${nonFiniteKeys.join(", ")} replaced with defaults.`);
6029
+ consoleWarnMap("useHeatmap", `Non-finite style value(s) for ${nonFiniteKeys.join(", ")} replaced with defaults.`);
6029
6030
  }
6030
6031
  return resolved;
6031
6032
  };
@@ -6067,12 +6068,12 @@ const useHeatmap = (options) => {
6067
6068
  handler(error);
6068
6069
  }
6069
6070
  catch (handlerError) {
6070
- warnHeatmap(`onError for heatmap "${error.layerId}" threw.`, handlerError, error.cause);
6071
+ consoleWarnMap("useHeatmap", `onError for heatmap "${error.layerId}" threw.`, handlerError, error.cause);
6071
6072
  captureOnce(`${error.layerId}:on-error-threw`, `Heatmap onError threw: ${payload}`, handlerError, "on-error-threw");
6072
6073
  }
6073
6074
  return;
6074
6075
  }
6075
- warnHeatmap(`Heatmap "${error.layerId}" failed to render (${error.code}).`, error.cause);
6076
+ consoleWarnMap("useHeatmap", `Heatmap "${error.layerId}" failed to render (${error.code}).`, error.cause);
6076
6077
  }, [captureOnce]);
6077
6078
  // Keyed on `data` (adjust-state-during-render + isEqual) so inline accessors
6078
6079
  // don't re-normalize the whole dataset on every render. Accessor changes
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@trackunit/react-map",
3
- "version": "0.2.211",
3
+ "version": "0.2.212",
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-components": "3.8.4",
10
+ "@trackunit/react-components": "3.8.5",
11
11
  "@trackunit/css-class-variance-utilities": "2.3.6",
12
- "@trackunit/react-form-components": "2.10.11",
13
- "@trackunit/react-core-hooks": "1.25.6",
12
+ "@trackunit/react-form-components": "2.10.12",
13
+ "@trackunit/react-core-hooks": "1.25.7",
14
14
  "@trackunit/geo-json-utils": "1.18.6",
15
- "@trackunit/i18n-library-translation": "2.8.6",
15
+ "@trackunit/i18n-library-translation": "2.8.7",
16
16
  "react-minimal-pie-chart": "^8.4.0",
17
17
  "@trackunit/react-map-adapter-shared": "0.0.158",
18
18
  "@trackunit/react-map-color-utils": "0.0.132",
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Single dev-warning channel for react-map hooks (invalid data, invalid style, unhandled render errors).
3
+ * Messages are prefixed with the emitting hook, e.g. `[useHeatmap]`.
4
+ */
5
+ export declare const consoleWarnMap: (source: string, message: string, ...details: ReadonlyArray<unknown>) => void;
@@ -1,4 +0,0 @@
1
- /**
2
- * Single dev-warning channel for `useHeatmap` (invalid data, invalid style, unhandled render errors).
3
- */
4
- export declare const warnHeatmap: (message: string, ...details: ReadonlyArray<unknown>) => void;