@guardian/interactive-component-library 0.1.0-alpha.47 → 0.1.0-alpha.49

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.
@@ -5940,7 +5940,7 @@ let Map$2 = class Map2 {
5940
5940
  get viewPort() {
5941
5941
  return this._viewport;
5942
5942
  }
5943
- get zoomLevel() {
5943
+ get zoomScale() {
5944
5944
  return this.view.transform.k;
5945
5945
  }
5946
5946
  get isTransitioning() {
@@ -5986,15 +5986,15 @@ let Map$2 = class Map2 {
5986
5986
  this.layers.splice(layerIndex, 1);
5987
5987
  }
5988
5988
  async zoomIn(options) {
5989
- return this.zoomTo(this.zoomLevel * 2, options);
5989
+ return this.zoomTo(this.zoomScale * 2, options);
5990
5990
  }
5991
5991
  async zoomOut(options) {
5992
- return this.zoomTo(this.zoomLevel * 0.5, options);
5992
+ return this.zoomTo(this.zoomScale * 0.5, options);
5993
5993
  }
5994
- async zoomTo(zoomLevel, options = {
5994
+ async zoomTo(zoomScale, options = {
5995
5995
  duration: 500
5996
5996
  }) {
5997
- return select(this._viewport).transition().duration(options.duration).call(this._zoomBehaviour.scaleTo, zoomLevel).end();
5997
+ return select(this._viewport).transition().duration(options.duration).call(this._zoomBehaviour.scaleTo, zoomScale).end();
5998
5998
  }
5999
5999
  zoomToFeature(feature, focalPoint, padding = {
6000
6000
  top: 40,
@@ -6344,6 +6344,7 @@ const Map$1 = forwardRef(({
6344
6344
  const [zoomHelpText, setZoomHelpText] = useState("");
6345
6345
  const [showHelpText, setShowHelpText] = useState(false);
6346
6346
  useEffect(() => {
6347
+ var _a;
6347
6348
  const map2 = new Map$2({
6348
6349
  view: new View(config.view),
6349
6350
  target: targetRef.current
@@ -6354,7 +6355,12 @@ const Map$1 = forwardRef(({
6354
6355
  if (ref)
6355
6356
  ref.current = map2;
6356
6357
  onLoad && onLoad(map2);
6357
- const zoomHelpText2 = navigator.userAgent.indexOf("Mac") !== -1 ? "Use ⌘ + scroll to zoom" : "Use Ctrl + scroll to zoom";
6358
+ let zoomHelpText2 = "";
6359
+ if (((_a = navigator.userAgentData) == null ? void 0 : _a.mobile) || navigator.userAgent.indexOf("Mobile") !== -1) {
6360
+ zoomHelpText2 = mobileHelpText;
6361
+ } else {
6362
+ zoomHelpText2 = navigator.userAgent.indexOf("Mac") !== -1 ? "Use ⌘ + scroll to zoom" : "Use Ctrl + scroll to zoom";
6363
+ }
6358
6364
  setZoomHelpText(zoomHelpText2);
6359
6365
  return () => {
6360
6366
  map2.destroy();
@@ -7789,10 +7795,13 @@ function Ticker({
7789
7795
  children: jsx("div", {
7790
7796
  ref: tickerScrollRef,
7791
7797
  className: styles.tickerScroll,
7792
- children: childArray.map((child, index) => jsx("div", {
7793
- className: styles.tickerItem,
7794
- children: child
7795
- }, index))
7798
+ children: childArray.map((child, index) => {
7799
+ var _a;
7800
+ return jsx("div", {
7801
+ className: styles.tickerItem,
7802
+ children: child
7803
+ }, ((_a = child == null ? void 0 : child.props) == null ? void 0 : _a.id) ?? index);
7804
+ })
7796
7805
  })
7797
7806
  }), jsxs("div", {
7798
7807
  ref: controlsRef,