@maptiler/geocoding-control 1.4.2-dev.1 → 1.4.2-dev.2

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/style.css CHANGED
@@ -1 +1 @@
1
- svg.svelte-d2loi5{display:block;fill:#e15042}li.svelte-ltkwvy.svelte-ltkwvy{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content}li.svelte-ltkwvy.svelte-ltkwvy:first-child{padding-top:10px}li.svelte-ltkwvy.svelte-ltkwvy:last-child{padding-bottom:10px}li.selected.svelte-ltkwvy.svelte-ltkwvy{background-color:#f3f6ff}li.selected.svelte-ltkwvy.svelte-ltkwvy{animation:svelte-ltkwvy-backAndForth 5s linear infinite}li.selected.svelte-ltkwvy .primary.svelte-ltkwvy{color:#2b8bfb}li.svelte-ltkwvy>img.svelte-ltkwvy{align-self:center;justify-self:center;opacity:.75}.texts.svelte-ltkwvy.svelte-ltkwvy{padding:0 17px 0 0}.texts.svelte-ltkwvy>.svelte-ltkwvy{white-space:nowrap;display:block;min-width:fit-content}.primary.svelte-ltkwvy.svelte-ltkwvy{font-weight:600}.secondary.svelte-ltkwvy.svelte-ltkwvy{color:#aeb6c7;padding-left:4px}.line2.svelte-ltkwvy.svelte-ltkwvy{color:#aeb6c7}@keyframes svelte-ltkwvy-backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}div.svelte-7cmwmc{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;display:flex;align-items:center}svg.svelte-7cmwmc{animation:svelte-7cmwmc-rotate .8s infinite cubic-bezier(.45,.05,.55,.95)}@keyframes svelte-7cmwmc-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}svg.svelte-gzo3ar.svelte-gzo3ar{display:block;fill:#6b7c93;stroke:#6b7c93}.list-icon.svelte-gzo3ar.svelte-gzo3ar{grid-row:1/3;align-self:center;margin:8px}.in-map.svelte-gzo3ar.svelte-gzo3ar{height:30px}.maplibregl-canvas-container .marker-selected{z-index:1}.maplibregl-canvas-container svg.svelte-gzo3ar path.svelte-gzo3ar,.leaflet-map-pane svg.svelte-gzo3ar path.svelte-gzo3ar{fill:#3170fe;stroke:#3170fe}.marker-selected svg.svelte-gzo3ar path.svelte-gzo3ar{fill:#98b7ff;stroke:#3170fe}.marker-reverse svg.svelte-gzo3ar path.svelte-gzo3ar{fill:silver;stroke:gray}.marker-interactive{cursor:pointer!important}.maptiler-gc-popup>.maplibregl-popup-content{padding:2px 8px}svg.svelte-en2qvf{display:block;fill:var(--color-icon-button)}circle.svelte-1aq105l{stroke-width:1.875;fill:none}path.svelte-1aq105l{stroke-width:1.875;stroke-linecap:round}svg.svelte-1aq105l{display:block;stroke:var(--color-icon-button)}form.svelte-qnu791.svelte-qnu791{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text:#444952;--color-icon-button:#444952}form.svelte-qnu791.svelte-qnu791,form.svelte-qnu791 .svelte-qnu791,form.svelte-qnu791 .svelte-qnu791:after,form.svelte-qnu791 .svelte-qnu791:before{box-sizing:border-box}form.can-collapse.svelte-qnu791.svelte-qnu791{max-width:29px}form.can-collapse.svelte-qnu791 input.svelte-qnu791::placeholder{transition:opacity .25s;opacity:0}form.svelte-qnu791.svelte-qnu791,form.svelte-qnu791.svelte-qnu791:focus-within,form.svelte-qnu791.svelte-qnu791:hover{width:270px;max-width:270px}form.svelte-qnu791 input.svelte-qnu791::placeholder,form.svelte-qnu791:focus-within input.svelte-qnu791::placeholder,form.svelte-qnu791:hover input.svelte-qnu791::placeholder{opacity:1}input.svelte-qnu791.svelte-qnu791{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input.svelte-qnu791.svelte-qnu791:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul.svelte-qnu791.svelte-qnu791,div.error.svelte-qnu791.svelte-qnu791,div.no-results.svelte-qnu791.svelte-qnu791{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul.svelte-qnu791.svelte-qnu791{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error.svelte-qnu791.svelte-qnu791,div.no-results.svelte-qnu791.svelte-qnu791{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error.svelte-qnu791.svelte-qnu791{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error.svelte-qnu791 div.svelte-qnu791{flex-grow:1}div.error.svelte-qnu791 svg{flex-shrink:0;width:20px;height:20px}div.error.svelte-qnu791 button.svelte-qnu791{flex-shrink:0}div.error.svelte-qnu791 button.svelte-qnu791>svg{width:13px;fill:#e25041}div.error.svelte-qnu791 button.svelte-qnu791:hover svg,div.error.svelte-qnu791 button.svelte-qnu791:active svg{fill:#444952}div.no-results.svelte-qnu791.svelte-qnu791{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results.svelte-qnu791 svg{margin-top:4px;flex-shrink:0;width:20px;height:20px;width:30px;height:30px}.maplibregl-ctrl-bottom-left ul.svelte-qnu791.svelte-qnu791,.maplibregl-ctrl-bottom-right ul.svelte-qnu791.svelte-qnu791{top:auto;bottom:100%}button.svelte-qnu791.svelte-qnu791{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button.svelte-qnu791.svelte-qnu791:hover{background-color:transparent}button.svelte-qnu791:hover svg,button.svelte-qnu791:active svg{fill:#2b8bfb}.input-group.svelte-qnu791.svelte-qnu791{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group.svelte-qnu791.svelte-qnu791:focus-within{outline:#2b8bfb solid 2px}.search-button.svelte-qnu791.svelte-qnu791{flex-shrink:0}.maplibregl-ctrl-geocoder:not(.maptiler-ctrl) .search-button svg{width:12px!important;transform:translate(.5px)}.clear-button-container.svelte-qnu791.svelte-qnu791{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable.svelte-qnu791.svelte-qnu791{display:flex;flex-shrink:0}.maplibregl-ctrl-geocoder{position:relative;z-index:3}.maptiler-ctrl:not(:empty){box-shadow:none}.maptiler-ctrl .input-group.svelte-qnu791.svelte-qnu791{padding-inline:8px;border:white solid 2px}.maptiler-ctrl .input-group.svelte-qnu791.svelte-qnu791:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}.maptiler-ctrl form.can-collapse.svelte-qnu791.svelte-qnu791{max-width:33px}.maptiler-ctrl form.svelte-qnu791.svelte-qnu791,.maptiler-ctrl form.svelte-qnu791.svelte-qnu791:focus-within,.maptiler-ctrl form.svelte-qnu791.svelte-qnu791:hover{width:270px;max-width:270px}
1
+ svg.svelte-d2loi5{display:block;fill:#e15042}li.svelte-ltkwvy.svelte-ltkwvy{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content}li.svelte-ltkwvy.svelte-ltkwvy:first-child{padding-top:10px}li.svelte-ltkwvy.svelte-ltkwvy:last-child{padding-bottom:10px}li.selected.svelte-ltkwvy.svelte-ltkwvy{background-color:#f3f6ff}li.selected.svelte-ltkwvy.svelte-ltkwvy{animation:svelte-ltkwvy-backAndForth 5s linear infinite}li.selected.svelte-ltkwvy .primary.svelte-ltkwvy{color:#2b8bfb}li.svelte-ltkwvy>img.svelte-ltkwvy{align-self:center;justify-self:center;opacity:.75}.texts.svelte-ltkwvy.svelte-ltkwvy{padding:0 17px 0 0}.texts.svelte-ltkwvy>.svelte-ltkwvy{white-space:nowrap;display:block;min-width:fit-content}.primary.svelte-ltkwvy.svelte-ltkwvy{font-weight:600}.secondary.svelte-ltkwvy.svelte-ltkwvy{color:#aeb6c7;padding-left:4px}.line2.svelte-ltkwvy.svelte-ltkwvy{color:#aeb6c7}@keyframes svelte-ltkwvy-backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}div.svelte-7cmwmc{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;display:flex;align-items:center}svg.svelte-7cmwmc{animation:svelte-7cmwmc-rotate .8s infinite cubic-bezier(.45,.05,.55,.95)}@keyframes svelte-7cmwmc-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}svg.svelte-gzo3ar.svelte-gzo3ar{display:block;fill:#6b7c93;stroke:#6b7c93}.list-icon.svelte-gzo3ar.svelte-gzo3ar{grid-row:1/3;align-self:center;margin:8px}.in-map.svelte-gzo3ar.svelte-gzo3ar{height:30px}.maplibregl-canvas-container .marker-selected{z-index:1}.maplibregl-canvas-container svg.svelte-gzo3ar path.svelte-gzo3ar,.leaflet-map-pane svg.svelte-gzo3ar path.svelte-gzo3ar{fill:#3170fe;stroke:#3170fe}.marker-selected svg.svelte-gzo3ar path.svelte-gzo3ar{fill:#98b7ff;stroke:#3170fe}.marker-reverse svg.svelte-gzo3ar path.svelte-gzo3ar{fill:silver;stroke:gray}.marker-interactive{cursor:pointer!important}.maptiler-gc-popup>.maplibregl-popup-content{padding:2px 8px}svg.svelte-en2qvf{display:block;fill:var(--color-icon-button)}circle.svelte-1aq105l{stroke-width:1.875;fill:none}path.svelte-1aq105l{stroke-width:1.875;stroke-linecap:round}svg.svelte-1aq105l{display:block;stroke:var(--color-icon-button)}form.svelte-1uvos7g.svelte-1uvos7g{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text:#444952;--color-icon-button:#444952}form.svelte-1uvos7g.svelte-1uvos7g,form.svelte-1uvos7g .svelte-1uvos7g,form.svelte-1uvos7g .svelte-1uvos7g:after,form.svelte-1uvos7g .svelte-1uvos7g:before{box-sizing:border-box}form.can-collapse.svelte-1uvos7g.svelte-1uvos7g{max-width:29px}form.can-collapse.svelte-1uvos7g input.svelte-1uvos7g::placeholder{transition:opacity .25s;opacity:0}form.svelte-1uvos7g.svelte-1uvos7g,form.svelte-1uvos7g.svelte-1uvos7g:focus-within,form.svelte-1uvos7g.svelte-1uvos7g:hover{width:270px;max-width:270px}form.svelte-1uvos7g input.svelte-1uvos7g::placeholder,form.svelte-1uvos7g:focus-within input.svelte-1uvos7g::placeholder,form.svelte-1uvos7g:hover input.svelte-1uvos7g::placeholder{opacity:1}input.svelte-1uvos7g.svelte-1uvos7g{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input.svelte-1uvos7g.svelte-1uvos7g:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul.svelte-1uvos7g.svelte-1uvos7g,div.error.svelte-1uvos7g.svelte-1uvos7g,div.no-results.svelte-1uvos7g.svelte-1uvos7g{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul.svelte-1uvos7g.svelte-1uvos7g{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error.svelte-1uvos7g.svelte-1uvos7g,div.no-results.svelte-1uvos7g.svelte-1uvos7g{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error.svelte-1uvos7g.svelte-1uvos7g{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error.svelte-1uvos7g div.svelte-1uvos7g{flex-grow:1}div.error.svelte-1uvos7g svg{flex-shrink:0;width:20px;height:20px}div.error.svelte-1uvos7g button.svelte-1uvos7g{flex-shrink:0}div.error.svelte-1uvos7g button.svelte-1uvos7g>svg{width:13px;fill:#e25041}div.error.svelte-1uvos7g button.svelte-1uvos7g:hover svg,div.error.svelte-1uvos7g button.svelte-1uvos7g:active svg{fill:#444952}div.no-results.svelte-1uvos7g.svelte-1uvos7g{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results.svelte-1uvos7g svg{margin-top:4px;flex-shrink:0;width:20px;height:20px;width:30px;height:30px}.maplibregl-ctrl-bottom-left ul.svelte-1uvos7g.svelte-1uvos7g,.maplibregl-ctrl-bottom-right ul.svelte-1uvos7g.svelte-1uvos7g{top:auto;bottom:100%}button.svelte-1uvos7g.svelte-1uvos7g{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button.svelte-1uvos7g.svelte-1uvos7g:hover{background-color:transparent}button.svelte-1uvos7g:hover svg,button.svelte-1uvos7g:active svg{fill:#2b8bfb}.input-group.svelte-1uvos7g.svelte-1uvos7g{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group.svelte-1uvos7g.svelte-1uvos7g:focus-within{outline:#2b8bfb solid 2px}.search-button.svelte-1uvos7g.svelte-1uvos7g{flex-shrink:0}.maplibregl-ctrl-geocoder:not(.maptiler-ctrl) .search-button svg{width:12px!important;transform:translate(.5px)}.clear-button-container.svelte-1uvos7g.svelte-1uvos7g{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable.svelte-1uvos7g.svelte-1uvos7g{display:flex;flex-shrink:0}.maplibregl-ctrl-geocoder{position:relative;z-index:3}.maptiler-ctrl:not(:empty){box-shadow:none}.maptiler-ctrl .input-group.svelte-1uvos7g.svelte-1uvos7g{padding-inline:8px;border:white solid 2px}.maptiler-ctrl .input-group.svelte-1uvos7g.svelte-1uvos7g:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}.maptiler-ctrl form.can-collapse.svelte-1uvos7g.svelte-1uvos7g{max-width:33px}.maptiler-ctrl form.svelte-1uvos7g.svelte-1uvos7g,.maptiler-ctrl form.svelte-1uvos7g.svelte-1uvos7g:focus-within,.maptiler-ctrl form.svelte-1uvos7g.svelte-1uvos7g:hover{width:270px;max-width:270px}
@@ -73,7 +73,7 @@ export let maxZoom = undefined;
73
73
  export let apiUrl = "https://api.maptiler.com/geocoding";
74
74
  export let fetchParameters = {};
75
75
  export let iconsBaseUrl = "https://cdn.maptiler.com/maptiler-geocoding-control/v" +
76
- "1.4.2-dev.1" +
76
+ "1.4.2-dev.2" +
77
77
  "/icons/";
78
78
  export let adjustUrlQuery = () => { };
79
79
  export function focus() {
@@ -183,7 +183,7 @@ $: if (selectFirst && listFeatures?.length) {
183
183
  selectedItemIndex = 0;
184
184
  }
185
185
  // clear selection on edit
186
- $: if (!selectFirst) {
186
+ $: {
187
187
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
188
188
  searchValue;
189
189
  selectedItemIndex = -1;
@@ -312,7 +312,7 @@ async function search(searchValue, { byId = false, exact = false, } = {}) {
312
312
  }
313
313
  sp.set("fuzzyMatch", String(fuzzyMatch));
314
314
  }
315
- if (limit !== undefined && (!isReverse || types?.length === 1)) {
315
+ if (limit !== undefined) {
316
316
  sp.set("limit", String(limit));
317
317
  }
318
318
  sp.set("key", apiKey);
@@ -610,6 +610,7 @@ function pick(feature) {
610
610
  background-color: #fff;
611
611
  z-index: 10;
612
612
  border-radius: 4px;
613
+ margin: 0;
613
614
  transition: max-width 0.25s;
614
615
  box-shadow: 0px 2px 5px rgba(51, 51, 89, 0.15);
615
616
  --color-text: #444952;
package/svelte/types.d.ts CHANGED
@@ -73,10 +73,10 @@ export type ControlOptions = {
73
73
  debounceSearch?: number;
74
74
  /**
75
75
  * Search results closer to the proximity point will be given higher priority. First matching rule from the array will be used.
76
- * Set to `undefined` or `null` to disable proximity.
76
+ * Set to `null` to disable the proximity.
77
77
  * Default value is `[{ type: "server-geolocation" }]`.
78
78
  */
79
- proximity?: ProximityRule[] | null | undefined;
79
+ proximity?: ProximityRule[] | null;
80
80
  /**
81
81
  * Override the default placeholder attribute value.
82
82
  * Default value is `"Search"`.
package/types.d.ts CHANGED
@@ -73,10 +73,10 @@ export type ControlOptions = {
73
73
  debounceSearch?: number;
74
74
  /**
75
75
  * Search results closer to the proximity point will be given higher priority. First matching rule from the array will be used.
76
- * Set to `undefined` or `null` to disable proximity.
76
+ * Set to `null` to disable the proximity.
77
77
  * Default value is `[{ type: "server-geolocation" }]`.
78
78
  */
79
- proximity?: ProximityRule[] | null | undefined;
79
+ proximity?: ProximityRule[] | null;
80
80
  /**
81
81
  * Override the default placeholder attribute value.
82
82
  * Default value is `"Search"`.