@carto/ps-react-maps 3.11.2 → 3.11.4

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.js CHANGED
@@ -459,10 +459,14 @@ const oe = /* @__PURE__ */ vt(Cs), Os = (r) => {
459
459
  const a = s();
460
460
  if (!a.maps?.[n]?.isLoaded) return;
461
461
  const c = a.getViewState(n);
462
- return c ? {
463
- ...new pt(c).fitBounds(o, i?.boundsOptions),
462
+ if (!c) return;
463
+ const y = new pt(c).fitBounds(o, i?.boundsOptions);
464
+ return {
465
+ latitude: y.latitude,
466
+ longitude: y.longitude,
467
+ zoom: y.zoom,
464
468
  ...i?.viewStateOptions
465
- } : void 0;
469
+ };
466
470
  },
467
471
  addLayers: (n, o) => t((i) => {
468
472
  const a = {
@@ -2796,21 +2800,16 @@ const Ee = ft()(fs((r, e) => ({
2796
2800
  return delete o[t], {
2797
2801
  sources: o
2798
2802
  };
2799
- const a = o[t], {
2800
- apiBaseUrl: c = ze,
2801
- clientId: l = Vn,
2802
- apiVersion: y = Ke,
2803
- ...h
2804
- } = s, g = {
2803
+ const a = o[t], c = {
2804
+ apiBaseUrl: ze,
2805
+ clientId: Vn,
2806
+ apiVersion: Ke,
2805
2807
  ...a,
2806
- ...h,
2807
- apiBaseUrl: c,
2808
- apiVersion: y,
2809
- clientId: l
2810
- }, p = Yn({
2811
- source: g
2808
+ ...s
2809
+ }, l = Yn({
2810
+ source: c
2812
2811
  });
2813
- return g.widgets = p, o[t] = g, {
2812
+ return c.widgets = l, o[t] = c, {
2814
2813
  sources: o
2815
2814
  };
2816
2815
  }, void 0, "setSource"),