@maptiler/geocoding-control 0.0.86 → 0.0.87

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.
@@ -597,7 +597,7 @@ button:hover {
597
597
 
598
598
  button:hover :global(svg),
599
599
  button.active :global(svg) {
600
- fill: #3588d4;
600
+ fill: #2b8bfb;
601
601
  }
602
602
 
603
603
  .input-group {
@@ -4,11 +4,7 @@ import type { SvelteComponentTyped } from "svelte";
4
4
  import GeocodingControlComponent from "./GeocodingControl.svelte";
5
5
  import type { ControlOptions } from "./types";
6
6
  export { createMapLibreGlMapController } from "./maplibreglMapController";
7
- type MapLibreControlOptions = Omit<ControlOptions, "apiKey"> & {
8
- /**
9
- * Maptiler API key. Optional if used with MapTiler SDK.
10
- */
11
- apiKey?: string;
7
+ export type MapLibreBaseControlOptions = Omit<ControlOptions, "apiKey"> & {
12
8
  /**
13
9
  * If `true`, a [Marker](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) will be added to the map at the location of the user-selected result using a default set of Marker options.
14
10
  * If the value is an object, the marker will be constructed using these options.
@@ -44,13 +40,13 @@ type MapLibreControlOptions = Omit<ControlOptions, "apiKey"> & {
44
40
  };
45
41
  };
46
42
  export type Props<T> = T extends SvelteComponentTyped<infer P, any, any> ? P : never;
47
- export declare abstract class MapLibreBasedGeocodingControl extends EventTarget implements IControl {
43
+ export declare abstract class MapLibreBasedGeocodingControl<T extends MapLibreBaseControlOptions> extends EventTarget implements IControl {
48
44
  #private;
49
- constructor(options?: MapLibreControlOptions);
45
+ constructor(options: T);
50
46
  abstract getExtraProps(map: Map, div: HTMLElement): Partial<Props<GeocodingControlComponent>>;
51
47
  onAdd(map: Map): HTMLDivElement;
52
- abstract getMapLibre(): typeof maplibregl;
53
- setOptions(options: MapLibreControlOptions): void;
48
+ abstract getMapLibreGl(): typeof maplibregl;
49
+ setOptions(options: T): void;
54
50
  setQuery(value: string, submit?: boolean): void;
55
51
  setReverseMode(value: boolean): void;
56
52
  focus(): void;
@@ -1,8 +1,8 @@
1
1
  import type * as maplibregl from "maplibre-gl";
2
2
  import type { Map } from "maplibre-gl";
3
3
  import type GeocodingControlComponent from "./GeocodingControl.svelte";
4
- import { MapLibreBasedGeocodingControl, type Props } from "./MapLibreBasedGeocodingControl";
5
- export declare class GeocodingControl extends MapLibreBasedGeocodingControl {
6
- getMapLibre(): typeof maplibregl;
4
+ import { MapLibreBasedGeocodingControl, type MapLibreBaseControlOptions, type Props } from "./MapLibreBasedGeocodingControl";
5
+ export declare class GeocodingControl extends MapLibreBasedGeocodingControl<MapLibreBaseControlOptions> {
6
+ getMapLibreGl(): typeof maplibregl;
7
7
  getExtraProps(map: Map, div: HTMLElement): Partial<Props<GeocodingControlComponent>>;
8
8
  }
package/leaflet.js CHANGED
@@ -420,7 +420,7 @@ function ua(r) {
420
420
  "title",
421
421
  /*reverseButtonTitle*/
422
422
  r[9]
423
- ), B(t, "class", "svelte-15dr9yr"), en(
423
+ ), B(t, "class", "svelte-p509gh"), en(
424
424
  t,
425
425
  "active",
426
426
  /*reverseActive*/
@@ -473,7 +473,7 @@ function Rl(r) {
473
473
  t = oe("ul");
474
474
  for (let s = 0; s < o.length; s += 1)
475
475
  o[s].c();
476
- B(t, "class", "svelte-15dr9yr");
476
+ B(t, "class", "svelte-p509gh");
477
477
  },
478
478
  m(s, a) {
479
479
  We(s, t, a);
@@ -521,7 +521,7 @@ function Ol(r) {
521
521
  t = oe("div"), e = Ur(
522
522
  /*noResultsMessage*/
523
523
  r[7]
524
- ), B(t, "class", "no-results svelte-15dr9yr");
524
+ ), B(t, "class", "no-results svelte-p509gh");
525
525
  },
526
526
  m(n, i) {
527
527
  We(n, t, i), ct(t, e);
@@ -561,7 +561,7 @@ function Tl(r) {
561
561
  t = oe("div"), e = Ur(
562
562
  /*errorMessage*/
563
563
  r[6]
564
- ), B(t, "class", "error svelte-15dr9yr");
564
+ ), B(t, "class", "error svelte-p509gh");
565
565
  },
566
566
  m(n, i) {
567
567
  We(n, t, i), ct(t, e);
@@ -588,7 +588,7 @@ function la(r) {
588
588
  ), n;
589
589
  return {
590
590
  c() {
591
- t = oe("span"), n = Ur(e), B(t, "class", "line2 svelte-15dr9yr");
591
+ t = oe("span"), n = Ur(e), B(t, "class", "line2 svelte-p509gh");
592
592
  },
593
593
  m(s, a) {
594
594
  We(s, t, a), ct(t, n);
@@ -636,9 +636,9 @@ function ca(r) {
636
636
  }
637
637
  return {
638
638
  c() {
639
- t = oe("li"), e = oe("span"), n = oe("span"), i = oe("span"), s = Ur(o), a = er(), u = oe("span"), c = Ur(l), f = er(), d && d.c(), h = er(), B(i, "class", "primary svelte-15dr9yr"), B(u, "class", "secondary svelte-15dr9yr"), B(n, "class", "line1 svelte-15dr9yr"), B(e, "class", "texts svelte-15dr9yr"), B(t, "tabindex", "0"), B(t, "data-selected", g = /*selectedItemIndex*/
639
+ t = oe("li"), e = oe("span"), n = oe("span"), i = oe("span"), s = Ur(o), a = er(), u = oe("span"), c = Ur(l), f = er(), d && d.c(), h = er(), B(i, "class", "primary svelte-p509gh"), B(u, "class", "secondary svelte-p509gh"), B(n, "class", "line1 svelte-p509gh"), B(e, "class", "texts svelte-p509gh"), B(t, "tabindex", "0"), B(t, "data-selected", g = /*selectedItemIndex*/
640
640
  r[13] === /*i*/
641
- r[71]), B(t, "class", "svelte-15dr9yr"), en(
641
+ r[71]), B(t, "class", "svelte-p509gh"), en(
642
642
  t,
643
643
  "selected",
644
644
  /*selectedItemIndex*/
@@ -720,7 +720,7 @@ function Ml(r) {
720
720
  let F = A(r), D = F && F(r);
721
721
  return {
722
722
  c() {
723
- t = oe("form"), e = oe("div"), n = oe("button"), Do(i.$$.fragment), o = er(), s = oe("input"), a = er(), u = oe("div"), l = oe("button"), Do(c.$$.fragment), f = er(), E && E.c(), h = er(), N && N.c(), g = er(), b && b.c(), p = er(), D && D.c(), B(n, "type", "button"), B(n, "class", "svelte-15dr9yr"), B(
723
+ t = oe("form"), e = oe("div"), n = oe("button"), Do(i.$$.fragment), o = er(), s = oe("input"), a = er(), u = oe("div"), l = oe("button"), Do(c.$$.fragment), f = er(), E && E.c(), h = er(), N && N.c(), g = er(), b && b.c(), p = er(), D && D.c(), B(n, "type", "button"), B(n, "class", "svelte-p509gh"), B(
724
724
  s,
725
725
  "placeholder",
726
726
  /*placeholder*/
@@ -730,20 +730,20 @@ function Ml(r) {
730
730
  "aria-label",
731
731
  /*placeholder*/
732
732
  r[8]
733
- ), B(s, "class", "svelte-15dr9yr"), B(l, "type", "button"), B(
733
+ ), B(s, "class", "svelte-p509gh"), B(l, "type", "button"), B(
734
734
  l,
735
735
  "title",
736
736
  /*clearButtonTitle*/
737
737
  r[3]
738
- ), B(l, "class", "svelte-15dr9yr"), B(u, "class", "clear-button-container svelte-15dr9yr"), en(
738
+ ), B(l, "class", "svelte-p509gh"), B(u, "class", "clear-button-container svelte-p509gh"), en(
739
739
  u,
740
740
  "displayable",
741
741
  /*searchValue*/
742
742
  r[1] !== ""
743
- ), B(e, "class", "input-group svelte-15dr9yr"), B(t, "tabindex", "0"), B(t, "class", _ = ea(
743
+ ), B(e, "class", "input-group svelte-p509gh"), B(t, "tabindex", "0"), B(t, "class", _ = ea(
744
744
  /*className*/
745
745
  r[2]
746
- ) + " svelte-15dr9yr"), en(
746
+ ) + " svelte-p509gh"), en(
747
747
  t,
748
748
  "can-collapse",
749
749
  /*collapsed*/
@@ -866,7 +866,7 @@ function Ml(r) {
866
866
  4 && _ !== (_ = ea(
867
867
  /*className*/
868
868
  R[2]
869
- ) + " svelte-15dr9yr")) && B(t, "class", _), (!d || z[0] & /*className, collapsed, searchValue*/
869
+ ) + " svelte-p509gh")) && B(t, "class", _), (!d || z[0] & /*className, collapsed, searchValue*/
870
870
  22) && en(
871
871
  t,
872
872
  "can-collapse",