Changelog

Changelog

1.0.4

Mar 17, 2025

✨ Features

  • Add precision property to control units configuration, allowing control over decimal precision for each valid unit type.
  • Add useUnitDisplay hook to better encapsulate converting and formatting numeric values based on unit configuration and unit settings.

🛠 Improvements

  • Reworked internal unit handling with improved types, constants, mappings, and utilities.
  • Updated unit symbols to follow SI notation (mm/h, °C, μg/m³).
  • Improve type safety and consistency across settings and unit-related components.
  • Improve default result formatting behavior in SearchProvider for easier customization.
  • Add valueFormatter support to UnitButton for custom value formatting.
  • Add automatic handling of scale conversion (°C°F) for temperature-based color interval settings.

🐞 Bug Fixes

  • Fix incorrect initial handling of unit conversions in layers and controls.
  • Add missing border styling to ThumbnailButton when selected white background is applied.
  • Fix layout issues in ScrollableArea.
  • Fix inconsistent unit handling during add/update layer events.

1.0.3

Feb 14, 2025

✨ Features

  • Rename Slider to DataSlider and add support for dynamic units with the units prop, and custom value formatting with the valueFormatter prop.

🛠 Improvements

  • Rework library distribution to reduce bundle size (MapsGL is now a peer dependency; ensure it is installed separately.)
  • Add useMapController hook for better flexibility in cases where the MapsGLMapControllerProvider is not needed.
  • Update DataSlider and Select components to use Radix UI primitives for improved accessibility.
  • Update default layer style settings to match MapsGL layer configuration.
  • Enhance unit handling and value formatting across control components.
  • Improve className handling across control components to ensure consistent application of styles when using the compound component pattern.

🐞 Bug Fixes

  • Fix incorrect default opacity values in LayerDataSchema.
  • Use dBZ as the default radar layer unit instead of the default for rate measurement type (mm/s).
  • Fix incorrect handling of default color scale settings for layers.
  • Add missing groupId to child layers.
  • Fix cursor styling in DataSlider to ensure clickable area covers the full slider.

1.0.2

Jan 31, 2025

✨ Features

  • Add Slot component to support asChild composition for improved flexibility.
  • Add Field component to encapsulate layout and accessible label association.
  • Add new control components RadioGroup and ToggleGroup for managing radio and toggle style selection.
  • Add Control component for dynamically rendering controls based on layer settings.

🛠 Improvements

  • Add toggleDataInspector to MapsGLMapControllerProvider to enable toggling the data inspector.
  • Add MapsGLLayerSettingsView to replace ControlView, using Control and Field components.
  • Improve Select and Slider by removing unnecessary state context and using forwardRef.
  • Standardize event handling across Select, Slider, and other controls by switching from onChange to onValueChange.
  • Improve grid layout handling for better responsiveness and composability.
  • Update Tooltip to use Slot, improving composability.
  • Enhance MapsGLSearchControl structure, improving animations, styling, and UX.

🐞 Bug Fixes

  • Fix postal code queries not returning results correctly in SearchProvider.
  • Fix styling inconsistencies in ThumbnailButton.
  • Improve accessibility in Slider and Select by ensuring elements have an id and aria-labelledby.
  • Fix an issue in MapsGLSearchControl where search results do not always display.
  • Fix runtime errors in DataViewer when cards return no data.
  • Prevent unintended closure of search results when clicking the border of SearchDivider.
  • Fix a stale state issue in MapsGLMapControllerProvider affecting callbacks (e.g. onLoad).
  • Improve visibility handling on mobile in SearchResults by addressing issues with isFocused.
  • Fix a styling issue in TimelineSettingsControl where a missing xw- style prefix affects UI consistency.
  • Fix event handling in ListButtonBase to correctly pass the correct parameter to onClick.
  • Fix event handling in SearchClear to prevent early blur firing when clearing input.
  • Prevent unnecessary re-renders in LoadingProvider.
  • Fix double-click detection logic in MapsGLMapControllerProvider to prevent unintended interactions.
  • Fix handling of aborted fetch requests in WeatherApiDataFetcher.
  • Fix focus issues in ScrollableArea.

1.0.1

Nov 07, 2024

  • Initial release