@maptiler/geocoding-control 2.0.0-rc.7 → 2.0.0-rc.8

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.
Files changed (51) hide show
  1. package/leaflet-controller.d.ts +1 -1
  2. package/leaflet-controller.js +1 -1
  3. package/leaflet-controller.js.map +1 -1
  4. package/leaflet-controller.umd.js +1 -1
  5. package/leaflet-controller.umd.js.map +1 -1
  6. package/leaflet.js +817 -802
  7. package/leaflet.js.map +1 -1
  8. package/leaflet.umd.js +3 -3
  9. package/leaflet.umd.js.map +1 -1
  10. package/maplibregl-controller.d.ts +1 -1
  11. package/maplibregl-controller.js +16 -16
  12. package/maplibregl-controller.js.map +1 -1
  13. package/maplibregl-controller.umd.js +1 -1
  14. package/maplibregl-controller.umd.js.map +1 -1
  15. package/maplibregl.js +1220 -1205
  16. package/maplibregl.js.map +1 -1
  17. package/maplibregl.umd.js +3 -3
  18. package/maplibregl.umd.js.map +1 -1
  19. package/maptilersdk.js +1196 -1181
  20. package/maptilersdk.js.map +1 -1
  21. package/maptilersdk.umd.js +3 -3
  22. package/maptilersdk.umd.js.map +1 -1
  23. package/openlayers-controller.d.ts +1 -1
  24. package/openlayers-controller.js +5 -5
  25. package/openlayers-controller.js.map +1 -1
  26. package/openlayers-controller.umd.js +2 -2
  27. package/openlayers-controller.umd.js.map +1 -1
  28. package/openlayers.js +1405 -1391
  29. package/openlayers.js.map +1 -1
  30. package/openlayers.umd.js +3 -3
  31. package/openlayers.umd.js.map +1 -1
  32. package/package.json +4 -4
  33. package/react.js +860 -845
  34. package/react.js.map +1 -1
  35. package/react.umd.js +1 -1
  36. package/react.umd.js.map +1 -1
  37. package/svelte/GeocodingControl.svelte +50 -25
  38. package/svelte/GeocodingControl.svelte.d.ts +1 -0
  39. package/svelte/leaflet-controller.d.ts +1 -1
  40. package/svelte/leaflet-controller.js +1 -1
  41. package/svelte/maplibregl-controller.d.ts +1 -1
  42. package/svelte/maplibregl-controller.js +1 -1
  43. package/svelte/openlayers-controller.d.ts +1 -1
  44. package/svelte/openlayers-controller.js +1 -1
  45. package/svelte/openlayers.js +2 -3
  46. package/svelte/types.d.ts +2 -1
  47. package/types.d.ts +2 -1
  48. package/vanilla.js +606 -591
  49. package/vanilla.js.map +1 -1
  50. package/vanilla.umd.js +1 -1
  51. package/vanilla.umd.js.map +1 -1
@@ -13,7 +13,7 @@ export declare function createMapLibreGlMapController(map: Map, maplibregl?: Map
13
13
  fitBounds(bbox: BBox, padding: number, maxZoom?: number): void;
14
14
  indicateReverse(reverse: boolean): void;
15
15
  setReverseMarker(coordinates?: Position): void;
16
- setMarkers(markedFeatures: Feature[] | undefined, picked: Feature | undefined, showPolygonMarker: boolean): void;
16
+ setFeatures(markedFeatures: Feature[] | undefined, picked: Feature | undefined, showPolygonMarker: boolean): void;
17
17
  setSelectedMarker(index: number): void;
18
18
  getCenterAndZoom(): [number, number, number];
19
19
  };
@@ -451,8 +451,8 @@ function ge(i, t, e, n, r, o, f) {
451
451
  let l, c, u, g, s, h, a, d, x, p, y, w, v, E, m, b, M, _;
452
452
  const R = i - r, I = e - r, C = t - o, k = n - o;
453
453
  E = R * k, h = S * R, a = h - (h - R), d = R - a, h = S * k, x = h - (h - k), p = k - x, m = d * p - (E - a * x - d * x - a * p), b = C * I, h = S * C, a = h - (h - C), d = C - a, h = S * I, x = h - (h - I), p = I - x, M = d * p - (b - a * x - d * x - a * p), y = m - M, s = m - y, U[0] = m - (y + s) + (s - M), w = E + y, s = w - E, v = E - (w - s) + (y - s), y = v - b, s = v - y, U[1] = v - (y + s) + (s - b), _ = w + y, s = _ - w, U[2] = w - (_ - s) + (y - s), U[3] = _;
454
- let A = fe(4, U), Q = he * f;
455
- if (A >= Q || -A >= Q || (s = i - R, l = i - (R + s) + (s - r), s = e - I, u = e - (I + s) + (s - r), s = t - C, c = t - (C + s) + (s - o), s = n - k, g = n - (k + s) + (s - o), l === 0 && c === 0 && u === 0 && g === 0) || (Q = ae * f + ue * Math.abs(A), A += R * g + k * l - (C * u + I * c), A >= Q || -A >= Q)) return A;
454
+ let A = fe(4, U), F = he * f;
455
+ if (A >= F || -A >= F || (s = i - R, l = i - (R + s) + (s - r), s = e - I, u = e - (I + s) + (s - r), s = t - C, c = t - (C + s) + (s - o), s = n - k, g = n - (k + s) + (s - o), l === 0 && c === 0 && u === 0 && g === 0) || (F = ae * f + ue * Math.abs(A), A += R * g + k * l - (C * u + I * c), A >= F || -A >= F)) return A;
456
456
  E = l * k, h = S * l, a = h - (h - l), d = l - a, h = S * k, x = h - (h - k), p = k - x, m = d * p - (E - a * x - d * x - a * p), b = c * I, h = S * c, a = h - (h - c), d = c - a, h = S * I, x = h - (h - I), p = I - x, M = d * p - (b - a * x - d * x - a * p), y = m - M, s = m - y, P[0] = m - (y + s) + (s - M), w = E + y, s = w - E, v = E - (w - s) + (y - s), y = v - b, s = v - y, P[1] = v - (y + s) + (s - b), _ = w + y, s = _ - w, P[2] = w - (_ - s) + (y - s), P[3] = _;
457
457
  const Jt = st(4, U, 4, P, mt);
458
458
  E = R * g, h = S * R, a = h - (h - R), d = R - a, h = S * g, x = h - (h - g), p = g - x, m = d * p - (E - a * x - d * x - a * p), b = C * u, h = S * C, a = h - (h - C), d = C - a, h = S * u, x = h - (h - u), p = u - x, M = d * p - (b - a * x - d * x - a * p), y = m - M, s = m - y, P[0] = m - (y + s) + (s - M), w = E + y, s = w - E, v = E - (w - s) + (y - s), y = v - b, s = v - y, P[1] = v - (y + s) + (s - b), _ = w + y, s = _ - w, P[2] = w - (_ - s) + (y - s), P[3] = _;
@@ -465,7 +465,7 @@ function pe(i, t, e, n, r, o) {
465
465
  const f = (t - o) * (e - r), l = (i - r) * (n - o), c = f - l, u = Math.abs(f + l);
466
466
  return Math.abs(c) >= ce * u ? c : -ge(i, t, e, n, r, o, u);
467
467
  }
468
- const F = (i, t) => i.ll.x <= t.x && t.x <= i.ur.x && i.ll.y <= t.y && t.y <= i.ur.y, at = (i, t) => {
468
+ const Q = (i, t) => i.ll.x <= t.x && t.x <= i.ur.x && i.ll.y <= t.y && t.y <= i.ur.y, at = (i, t) => {
469
469
  if (t.ur.x < i.ll.x || i.ur.x < t.ll.x || t.ur.y < i.ll.y || i.ur.y < t.ll.y) return null;
470
470
  const e = i.ll.x < t.ll.x ? t.ll.x : i.ll.x, n = i.ur.x < t.ur.x ? i.ur.x : t.ur.x, r = i.ll.y < t.ll.y ? t.ll.y : i.ll.y, o = i.ur.y < t.ur.y ? i.ur.y : t.ur.y;
471
471
  return {
@@ -778,7 +778,7 @@ class z {
778
778
  getIntersection(t) {
779
779
  const e = this.bbox(), n = t.bbox(), r = at(e, n);
780
780
  if (r === null) return null;
781
- const o = this.leftSE.point, f = this.rightSE.point, l = t.leftSE.point, c = t.rightSE.point, u = F(e, l) && this.comparePoint(l) === 0, g = F(n, o) && t.comparePoint(o) === 0, s = F(e, c) && this.comparePoint(c) === 0, h = F(n, f) && t.comparePoint(f) === 0;
781
+ const o = this.leftSE.point, f = this.rightSE.point, l = t.leftSE.point, c = t.rightSE.point, u = Q(e, l) && this.comparePoint(l) === 0, g = Q(n, o) && t.comparePoint(o) === 0, s = Q(e, c) && this.comparePoint(c) === 0, h = Q(n, f) && t.comparePoint(f) === 0;
782
782
  if (g && u)
783
783
  return h && !s ? f : !h && s ? c : null;
784
784
  if (g)
@@ -789,7 +789,7 @@ class z {
789
789
  if (h) return f;
790
790
  if (s) return c;
791
791
  const a = Ee(o, this.vector(), l, t.vector());
792
- return a === null || !F(r, a) ? null : Z.round(a.x, a.y);
792
+ return a === null || !Q(r, a) ? null : Z.round(a.x, a.y);
793
793
  }
794
794
  /**
795
795
  * Split the given segment into multiple segments on the given points.
@@ -1292,13 +1292,13 @@ const $ = new Pe(), Me = function(i) {
1292
1292
  e[n - 1] = arguments[n];
1293
1293
  return $.run("difference", i, e);
1294
1294
  };
1295
- var Qt = {
1295
+ var Ft = {
1296
1296
  union: Me,
1297
1297
  intersection: Le,
1298
1298
  xor: Re,
1299
1299
  difference: Ie
1300
1300
  };
1301
- function Ft(i, t, e) {
1301
+ function Qt(i, t, e) {
1302
1302
  if (i !== null)
1303
1303
  for (var n, r, o, f, l, c, u, g = 0, s = 0, h, a = i.type, d = a === "FeatureCollection", x = a === "Feature", p = d ? i.features.length : 1, y = 0; y < p; y++) {
1304
1304
  u = d ? i.features[y].geometry : x ? i.geometry : i, h = u ? u.type === "GeometryCollection" : !1, l = h ? u.geometries.length : 1;
@@ -1375,7 +1375,7 @@ function Ft(i, t, e) {
1375
1375
  break;
1376
1376
  case "GeometryCollection":
1377
1377
  for (n = 0; n < f.geometries.length; n++)
1378
- if (Ft(f.geometries[n], t) === !1)
1378
+ if (Qt(f.geometries[n], t) === !1)
1379
1379
  return !1;
1380
1380
  break;
1381
1381
  default:
@@ -1478,7 +1478,7 @@ function ke(i, t = {}) {
1478
1478
  e.push(r.coordinates);
1479
1479
  }), e.length < 2)
1480
1480
  throw new Error("Must have at least 2 geometries");
1481
- const n = Qt.union(e[0], ...e.slice(1));
1481
+ const n = Ft.union(e[0], ...e.slice(1));
1482
1482
  return n.length === 0 ? null : n.length === 1 ? yt(n[0], t.properties) : jt(n, t.properties);
1483
1483
  }
1484
1484
  var Dt = ke;
@@ -1585,11 +1585,11 @@ function Ye(i, t, e) {
1585
1585
  i.$$.on_destroy ? i.$$.on_destroy.push(...o) : it(o), i.$$.on_mount = [];
1586
1586
  }), r.forEach(pt);
1587
1587
  }
1588
- function Qe(i, t) {
1588
+ function Fe(i, t) {
1589
1589
  const e = i.$$;
1590
1590
  e.fragment !== null && (Ue(e.after_update), it(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
1591
1591
  }
1592
- function Fe(i, t) {
1592
+ function Qe(i, t) {
1593
1593
  i.$$.dirty[0] === -1 && (j.push(i), ze(), i.$$.dirty.fill(0)), i.$$.dirty[t / 31 | 0] |= 1 << t % 31;
1594
1594
  }
1595
1595
  function De(i, t, e, n, r, o, f = null, l = [-1]) {
@@ -1620,7 +1620,7 @@ function De(i, t, e, n, r, o, f = null, l = [-1]) {
1620
1620
  let g = !1;
1621
1621
  if (u.ctx = e ? e(i, t.props || {}, (s, h, ...a) => {
1622
1622
  const d = a.length ? a[0] : h;
1623
- return u.ctx && r(u.ctx[s], u.ctx[s] = d) && (!u.skip_bound && u.bound[s] && u.bound[s](d), g && Fe(i, s)), h;
1623
+ return u.ctx && r(u.ctx[s], u.ctx[s] = d) && (!u.skip_bound && u.bound[s] && u.bound[s](d), g && Qe(i, s)), h;
1624
1624
  }) : [], u.update(), g = !0, it(u.before_update), u.fragment = n ? n(u.ctx) : !1, t.target) {
1625
1625
  if (t.hydrate) {
1626
1626
  const s = Be(t.target);
@@ -1652,7 +1652,7 @@ class Xe {
1652
1652
  }
1653
1653
  /** @returns {void} */
1654
1654
  $destroy() {
1655
- Qe(this, 1), this.$destroy = W;
1655
+ Fe(this, 1), this.$destroy = W;
1656
1656
  }
1657
1657
  /**
1658
1658
  * @template {Extract<keyof Events, string>} K
@@ -1738,7 +1738,7 @@ function Ke(i, t = {}) {
1738
1738
  if (i.bbox != null && t.recompute !== !0)
1739
1739
  return i.bbox;
1740
1740
  const e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
1741
- return Ft(i, (n) => {
1741
+ return Qt(i, (n) => {
1742
1742
  e[0] > n[0] && (e[0] = n[0]), e[1] > n[1] && (e[1] = n[1]), e[2] < n[0] && (e[2] = n[0]), e[3] < n[1] && (e[3] = n[1]);
1743
1743
  }), e;
1744
1744
  }
@@ -1749,7 +1749,7 @@ function He(i) {
1749
1749
  t.push(r.coordinates);
1750
1750
  }), t.length < 2)
1751
1751
  throw new Error("Must have at least two features");
1752
- const e = i.features[0].properties || {}, n = Qt.difference(t[0], ...t.slice(1));
1752
+ const e = i.features[0].properties || {}, n = Ft.difference(t[0], ...t.slice(1));
1753
1753
  return n.length === 0 ? null : n.length === 1 ? yt(n[0], e) : jt(n, e);
1754
1754
  }
1755
1755
  var tn = He;
@@ -1903,7 +1903,7 @@ function on(i, t, e = !0, n = !0, r = {}, o = {}, f = Gt) {
1903
1903
  setReverseMarker(p) {
1904
1904
  !t || !e || (g ? p ? g.setLngLat(p) : (g.remove(), g = void 0) : p && (e instanceof Function ? g = e(i) ?? void 0 : (g = (typeof e == "object" ? new t.Marker(e) : x()).setLngLat(p).addTo(i), g.getElement().classList.add("marker-reverse"))));
1905
1905
  },
1906
- setMarkers(p, y, w) {
1906
+ setFeatures(p, y, w) {
1907
1907
  for (const v of c)
1908
1908
  v.remove();
1909
1909
  if (c.length = 0, a(void 0), !!t) {