maplibre-gl-layer-control 0.17.0 → 0.17.2

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.
@@ -280,6 +280,8 @@ export declare class LayerControl implements IControl {
280
280
  private onLayerRename?;
281
281
  private onLayerReorder?;
282
282
  private onLayerRemove?;
283
+ private onBackgroundVisibilityChange?;
284
+ private onBackgroundOpacityChange?;
283
285
  private enableBackgroundPresets;
284
286
  private backgroundPresetStorageKey;
285
287
  private onBackgroundPresetsChange?;
@@ -818,6 +820,18 @@ export declare interface LayerControlOptions {
818
820
  onLayerReorder?: (layerOrder: string[]) => void;
819
821
  /** Callback when a layer is removed via context menu */
820
822
  onLayerRemove?: (layerId: string) => void;
823
+ /**
824
+ * Callback fired when the Background (basemap) group visibility is toggled
825
+ * via the control's checkbox. Lets consumers mirror the new state into their
826
+ * own store so external basemap UI (e.g. a separate layer panel) stays in sync.
827
+ */
828
+ onBackgroundVisibilityChange?: (visible: boolean) => void;
829
+ /**
830
+ * Callback fired when the Background (basemap) group opacity is changed via
831
+ * the control's slider. Lets consumers mirror the new opacity into their own
832
+ * store so external basemap UI stays in sync.
833
+ */
834
+ onBackgroundOpacityChange?: (opacity: number) => void;
821
835
  /**
822
836
  * Whether to show the "Saved configurations" controls in the Background Layers
823
837
  * panel, letting users save the current basemap element visibility as a named
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maplibre-gl-layer-control",
3
- "version": "0.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "A comprehensive layer control for MapLibre GL with advanced styling capabilities",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",