@longline/aqua-ui 1.0.347 → 1.0.348

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/map/Map/Map.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MapMouseEvent, Map as OriginalMap } from 'mapbox-gl';
3
- import { ViewState, ViewStateChangeEvent } from 'react-map-gl/mapbox';
3
+ import { Map as GLMap, ViewState, ViewStateChangeEvent } from 'react-map-gl/mapbox';
4
4
  import { ITestable } from '../../Types';
5
5
  interface IMapProps extends ITestable {
6
6
  /** @ignore */
@@ -127,6 +127,12 @@ interface IMapProps extends ITestable {
127
127
  * Fired when mouse leaves map.
128
128
  */
129
129
  onMouseLeave?: (e: MapMouseEvent) => void;
130
+ /**
131
+ * Optional hook to rewrite outgoing map resource requests (tiles, style, glyphs,
132
+ * …) — e.g. to attach an `Authorization` header to authenticated tile requests.
133
+ * Forwarded verbatim to the underlying react-map-gl map (init-time only).
134
+ */
135
+ transformRequest?: React.ComponentProps<typeof GLMap>['transformRequest'];
130
136
  }
131
137
  declare const ViewStateContext: React.Context<ViewState | null>;
132
138
  declare const useViewState: () => ViewState | null;
package/map/Map/Map.js CHANGED
@@ -224,7 +224,7 @@ var MapBase = function (props) {
224
224
  if (props.onMove)
225
225
  props.onMove(e);
226
226
  };
227
- return (React.createElement(GLMap, __assign({ "data-testid": props['data-testid'] || "Map" }, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: props.minZoom, maxZoom: props.maxZoom, interactiveLayerIds: props.interactiveLayerIds, doubleClickZoom: props.doubleClickZoom, cursor: props.cursor, preserveDrawingBuffer: props.preserveDrawingBuffer, fadeDuration: props.fadeDuration, onMove: handleMove, onMoveEnd: props.onMoveEnd, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, onLoad: handleLoad, onClick: props.onClick, onDblClick: props.onDblClick }),
227
+ return (React.createElement(GLMap, __assign({ "data-testid": props['data-testid'] || "Map" }, viewState, { mapboxAccessToken: props.token, transformRequest: props.transformRequest, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: props.minZoom, maxZoom: props.maxZoom, interactiveLayerIds: props.interactiveLayerIds, doubleClickZoom: props.doubleClickZoom, cursor: props.cursor, preserveDrawingBuffer: props.preserveDrawingBuffer, fadeDuration: props.fadeDuration, onMove: handleMove, onMoveEnd: props.onMoveEnd, onMouseMove: props.onMouseMove, onMouseLeave: props.onMouseLeave, onLoad: handleLoad, onClick: props.onClick, onDblClick: props.onDblClick }),
228
228
  props.clipped && React.createElement(React.Fragment, null,
229
229
  React.createElement(Source, { type: "raster", tiles: ["https://api.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/{z}/{x}/{y}.webp?access_token=".concat(props.token)] },
230
230
  React.createElement(Layer, { id: "overlay", type: "raster" })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.347",
3
+ "version": "1.0.348",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",