@maptiler/geocoding-control 2.0.0 → 2.0.1

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 (74) hide show
  1. package/MapLibreBasedGeocodingControl.d.ts +2616 -27
  2. package/leaflet-controller.d.ts +1 -1
  3. package/leaflet-controller.js +97 -95
  4. package/leaflet-controller.js.map +1 -1
  5. package/leaflet-controller.umd.js +2 -2
  6. package/leaflet-controller.umd.js.map +1 -1
  7. package/leaflet.d.ts +26 -4
  8. package/leaflet.js +906 -909
  9. package/leaflet.js.map +1 -1
  10. package/leaflet.umd.js +3 -3
  11. package/leaflet.umd.js.map +1 -1
  12. package/maplibregl-controller.d.ts +1 -1
  13. package/maplibregl-controller.js +480 -466
  14. package/maplibregl-controller.js.map +1 -1
  15. package/maplibregl-controller.umd.js +3 -3
  16. package/maplibregl-controller.umd.js.map +1 -1
  17. package/maplibregl.d.ts +2594 -9
  18. package/maplibregl.js +2094 -1969
  19. package/maplibregl.js.map +1 -1
  20. package/maplibregl.umd.js +3 -3
  21. package/maplibregl.umd.js.map +1 -1
  22. package/maptilersdk.d.ts +2594 -9
  23. package/maptilersdk.js +2086 -1964
  24. package/maptilersdk.js.map +1 -1
  25. package/maptilersdk.umd.js +3 -3
  26. package/maptilersdk.umd.js.map +1 -1
  27. package/openlayers-controller.d.ts +1 -1
  28. package/openlayers-controller.js +62 -60
  29. package/openlayers-controller.js.map +1 -1
  30. package/openlayers-controller.umd.js +2 -2
  31. package/openlayers-controller.umd.js.map +1 -1
  32. package/openlayers.d.ts +21 -0
  33. package/openlayers.js +754 -786
  34. package/openlayers.js.map +1 -1
  35. package/openlayers.umd.js +3 -3
  36. package/openlayers.umd.js.map +1 -1
  37. package/package.json +18 -18
  38. package/react.d.ts +4 -4
  39. package/react.js +619 -619
  40. package/react.js.map +1 -1
  41. package/react.umd.js +1 -1
  42. package/react.umd.js.map +1 -1
  43. package/style.css +1 -1
  44. package/svelte/FeatureItem.svelte +1 -1
  45. package/svelte/FeatureItem.svelte.d.ts +2 -2
  46. package/svelte/GeocodingControl.svelte +31 -32
  47. package/svelte/GeocodingControl.svelte.d.ts +26 -13
  48. package/svelte/MapLibreBasedGeocodingControl.d.ts +2616 -27
  49. package/svelte/MapLibreBasedGeocodingControl.js +120 -17
  50. package/svelte/leaflet-controller.d.ts +1 -1
  51. package/svelte/leaflet-controller.js +4 -1
  52. package/svelte/leaflet.d.ts +26 -4
  53. package/svelte/leaflet.js +17 -19
  54. package/svelte/maplibregl-controller.d.ts +1 -1
  55. package/svelte/maplibregl-controller.js +45 -36
  56. package/svelte/maplibregl.d.ts +2594 -9
  57. package/svelte/maplibregl.js +11 -3
  58. package/svelte/maptilersdk.d.ts +2594 -9
  59. package/svelte/maptilersdk.js +11 -3
  60. package/svelte/openlayers-controller.d.ts +1 -1
  61. package/svelte/openlayers-controller.js +4 -1
  62. package/svelte/openlayers.d.ts +21 -0
  63. package/svelte/openlayers.js +30 -45
  64. package/svelte/react.d.ts +4 -4
  65. package/svelte/react.js +5 -5
  66. package/svelte/types.d.ts +84 -35
  67. package/svelte/vanilla.d.ts +14 -1
  68. package/svelte/vanilla.js +31 -8
  69. package/types.d.ts +84 -35
  70. package/vanilla.d.ts +14 -1
  71. package/vanilla.js +929 -901
  72. package/vanilla.js.map +1 -1
  73. package/vanilla.umd.js +1 -1
  74. package/vanilla.umd.js.map +1 -1
package/openlayers.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import type { Map } from "ol";
2
+ import type { ObjectEvent } from "ol/Object";
3
+ import type { CombinedOnSignature, EventTypes } from "ol/Observable";
2
4
  import type { AnimationOptions, FitOptions } from "ol/View";
3
5
  import { Control } from "ol/control";
4
6
  import type { Options } from "ol/control/Control";
7
+ import type { EventsKey } from "ol/events";
5
8
  import BaseEvent from "ol/events/Event";
6
9
  import type { StyleLike } from "ol/style/Style";
7
10
  import type { FlatStyleLike } from "ol/style/flat";
@@ -11,8 +14,26 @@ type OpenLayersControlOptions = ControlOptions & Options & {
11
14
  flyTo?: boolean | (AnimationOptions & FitOptions);
12
15
  fullGeometryStyle?: StyleLike | FlatStyleLike;
13
16
  };
17
+ type CustomEventMap = {
18
+ select: SelectEvent;
19
+ featureslisted: FeaturesListedEvent;
20
+ featuresmarked: FeaturesMarkedEvent;
21
+ optionsvisibilitychange: OptionsVisibilityChangeEvent;
22
+ pick: PickEvent;
23
+ querychange: QueryChangeEvent;
24
+ response: ResponseEvent;
25
+ reversetoggle: ReverseToggleEvent;
26
+ };
27
+ type CustomObjectOnSignature<ReturnType> = {
28
+ <K extends keyof CustomEventMap>(type: K, listener: (evt: CustomEventMap[K]) => void): ReturnType;
29
+ } & {
30
+ (type: "propertychange", listener: (evt: ObjectEvent) => void): ReturnType;
31
+ } & CombinedOnSignature<EventTypes | "propertychange" | keyof CustomEventMap, ReturnType>;
14
32
  export declare class GeocodingControl extends Control {
15
33
  #private;
34
+ on: CustomObjectOnSignature<EventsKey>;
35
+ once: CustomObjectOnSignature<EventsKey>;
36
+ un: CustomObjectOnSignature<EventsKey>;
16
37
  constructor(options: OpenLayersControlOptions);
17
38
  setMap(map: Map | null): void;
18
39
  setOptions(options: OpenLayersControlOptions): void;