map-gl-offline 0.8.4 → 0.8.5

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/dist/index.d.ts CHANGED
@@ -71,6 +71,6 @@ export * from './types';
71
71
  export * from './utils';
72
72
  export { OfflineMapManager as default } from './managers/offlineMapManager';
73
73
  export { OfflineManagerControl } from './ui/offlineManagerControl';
74
- export type { MapLibProtocol } from './ui/offlineManagerControl';
74
+ export type { MapLibProtocol, ControlMap } from './ui/offlineManagerControl';
75
75
  export { i18n, t } from './ui/translations';
76
76
  export type { SupportedLanguage, TranslationKey } from './ui/translations';
package/dist/index.esm.js CHANGED
@@ -13230,7 +13230,7 @@ const controlLogger = logger.scope('OfflineControl');
13230
13230
  /**
13231
13231
  * MapLibre GL JS control for managing offline map regions.
13232
13232
  *
13233
- * Implements the IControl interface to integrate with MapLibre GL maps.
13233
+ * Implements the IControl interface to integrate with MapLibre GL and Mapbox GL maps.
13234
13234
  * Provides a complete UI for downloading, managing, and loading offline map data.
13235
13235
  *
13236
13236
  * The control automatically intercepts fetch requests to serve offline resources
@@ -13394,10 +13394,13 @@ class OfflineManagerControl {
13394
13394
  * Called when the control is added to a map.
13395
13395
  * Implements the IControl.onAdd interface method.
13396
13396
  *
13397
- * @param map - The MapLibre GL map instance
13397
+ * @param map - The MapLibre GL or Mapbox GL map instance
13398
13398
  * @returns The control's container element
13399
13399
  */
13400
13400
  onAdd(map) {
13401
+ // Internally the control works against the MapLibre `Map` typings; the
13402
+ // structural `ControlMap` parameter is what lets it satisfy both
13403
+ // libraries' `IControl` so callers need no cast (see issue #39).
13401
13404
  this.map = map;
13402
13405
  // Detect the correct CSS prefix for the map library in use
13403
13406
  const cssPrefix = detectCssPrefix(map.getContainer());