From fd49b6d96a90014c3d97f1791b5ce4a4d82dcf03 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 22 Jun 2026 12:37:06 +0200 Subject: [PATCH 01/12] Add repro --- mock-sveltekit/src/routes/+page.svelte | 5 +- .../src/routes/450-repro/+page.svelte | 6 ++ .../src/routes/450-repro/Component.svelte | 66 +++++++++++++++++++ 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 mock-sveltekit/src/routes/450-repro/+page.svelte create mode 100644 mock-sveltekit/src/routes/450-repro/Component.svelte diff --git a/mock-sveltekit/src/routes/+page.svelte b/mock-sveltekit/src/routes/+page.svelte index d135853b..4bb1795c 100644 --- a/mock-sveltekit/src/routes/+page.svelte +++ b/mock-sveltekit/src/routes/+page.svelte @@ -3,9 +3,10 @@ import DesignTokens from '../../../components/src/DesignTokens/DesignTokens.svelte'; const charts = [ - { title: '348 Repro', slug: '348-repro' }, + { title: '#348 Repro', slug: '348-repro' }, { title: 'Encapsulation Test', slug: 'encapsulation-test' }, - { title: 'Hero Scrolly', slug: 'hero-scrolly' } + { title: 'Hero Scrolly', slug: 'hero-scrolly' }, + { title: '#450 Geocoder Repro', slug: '450-repro' } ]; diff --git a/mock-sveltekit/src/routes/450-repro/+page.svelte b/mock-sveltekit/src/routes/450-repro/+page.svelte new file mode 100644 index 00000000..c0914445 --- /dev/null +++ b/mock-sveltekit/src/routes/450-repro/+page.svelte @@ -0,0 +1,6 @@ + + + diff --git a/mock-sveltekit/src/routes/450-repro/Component.svelte b/mock-sveltekit/src/routes/450-repro/Component.svelte new file mode 100644 index 00000000..994570a3 --- /dev/null +++ b/mock-sveltekit/src/routes/450-repro/Component.svelte @@ -0,0 +1,66 @@ + + + + + +
+ {#if mapContext?.map} + + {/if} +
+
+ + + + + +

{status}

+
+
+ + From 661576186b34a60f0d3f3b1c10f02fd89402e51e Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 22 Jun 2026 12:37:33 +0200 Subject: [PATCH 02/12] Restore derived --- .../src/maplibre/Geocoder/Geocoder.svelte | 62 ++++++++++--------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/components/src/maplibre/Geocoder/Geocoder.svelte b/components/src/maplibre/Geocoder/Geocoder.svelte index ebacb64a..9aa50e0c 100644 --- a/components/src/maplibre/Geocoder/Geocoder.svelte +++ b/components/src/maplibre/Geocoder/Geocoder.svelte @@ -1,6 +1,9 @@ -
+
From 4df90270f86a380cc689829afe585d23f0e169bf Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 22 Jun 2026 12:53:53 +0200 Subject: [PATCH 03/12] Add workaround --- mock-sveltekit/src/routes/450-repro/Component.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mock-sveltekit/src/routes/450-repro/Component.svelte b/mock-sveltekit/src/routes/450-repro/Component.svelte index 994570a3..f36a3efd 100644 --- a/mock-sveltekit/src/routes/450-repro/Component.svelte +++ b/mock-sveltekit/src/routes/450-repro/Component.svelte @@ -1,4 +1,5 @@ - + + - + diff --git a/mock-sveltekit/src/routes/450-repro/Component.svelte b/mock-sveltekit/src/routes/450-repro/Component.svelte index f36a3efd..4c39fbeb 100644 --- a/mock-sveltekit/src/routes/450-repro/Component.svelte +++ b/mock-sveltekit/src/routes/450-repro/Component.svelte @@ -1,8 +1,14 @@ - - + -
- {#if mapContext?.map} +
+
+ {#if mapContext?.map} - {/if} -
-
- - - - - -

{status}

-
+ {/if} +
+
+ + + + + +

{status}

+
+
From 9fb92967b53ccf0ba62ccba75e82dc1d82807918 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 29 Jun 2026 11:41:21 +0200 Subject: [PATCH 06/12] add id prop --- components/src/maplibre/Geocoder/Geocoder.svelte | 2 ++ components/src/maplibre/Geocoder/GeocoderProps.ts | 4 ++++ .../src/maplibre/Geocoder/malibre-gl-geocoder/index.ts | 6 ++++++ mock-sveltekit/src/routes/450-repro/+page.svelte | 7 ++++++- mock-sveltekit/src/routes/450-repro/Component.svelte | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/components/src/maplibre/Geocoder/Geocoder.svelte b/components/src/maplibre/Geocoder/Geocoder.svelte index 1999dfc7..213b33d5 100644 --- a/components/src/maplibre/Geocoder/Geocoder.svelte +++ b/components/src/maplibre/Geocoder/Geocoder.svelte @@ -21,6 +21,7 @@ proximity, placeholder, limit = 3, + id = '', size = 'default', map }: GeocoderProps = $props(); @@ -39,6 +40,7 @@ countries: countriesArr.join(','), types: typesArr.join(','), bbox, + id, trackProximity: !proximity, proximity, showResultsWhileTyping: true, diff --git a/components/src/maplibre/Geocoder/GeocoderProps.ts b/components/src/maplibre/Geocoder/GeocoderProps.ts index b2b430e3..07306ca8 100644 --- a/components/src/maplibre/Geocoder/GeocoderProps.ts +++ b/components/src/maplibre/Geocoder/GeocoderProps.ts @@ -41,5 +41,9 @@ export default interface GeocoderProps { * Overwrite the default input placeholder */ placeholder?: string; + /** + * Optional ID on the input element + */ + id?: string; size?: 'small' | 'default'; } diff --git a/components/src/maplibre/Geocoder/malibre-gl-geocoder/index.ts b/components/src/maplibre/Geocoder/malibre-gl-geocoder/index.ts index 12d727d0..1a3e3d2a 100644 --- a/components/src/maplibre/Geocoder/malibre-gl-geocoder/index.ts +++ b/components/src/maplibre/Geocoder/malibre-gl-geocoder/index.ts @@ -86,6 +86,11 @@ export type MaplibreGeocoderOptions = { * @default 5 */ limit?: number; + /** + * Optional ID on the input element + * @default "" + */ + id?: string; /** * Allow Maplibre to collect anonymous usage statistics from the plugin. * @default true @@ -525,6 +530,7 @@ export default class MaplibreGeocoder { this._inputEl = document.createElement('input'); this._inputEl.type = 'search'; this._inputEl.className = 'maplibregl-ctrl-geocoder--input'; + this._inputEl.id = this.options?.id || ''; this.setPlaceholder(); diff --git a/mock-sveltekit/src/routes/450-repro/+page.svelte b/mock-sveltekit/src/routes/450-repro/+page.svelte index 73b4a491..cfcd981c 100644 --- a/mock-sveltekit/src/routes/450-repro/+page.svelte +++ b/mock-sveltekit/src/routes/450-repro/+page.svelte @@ -1,6 +1,11 @@ - +{#if dev} + +{:else} + +{/if} diff --git a/mock-sveltekit/src/routes/450-repro/Component.svelte b/mock-sveltekit/src/routes/450-repro/Component.svelte index 4c39fbeb..249d23c9 100644 --- a/mock-sveltekit/src/routes/450-repro/Component.svelte +++ b/mock-sveltekit/src/routes/450-repro/Component.svelte @@ -34,6 +34,7 @@ placeholder={`z.b. „Sindelfingen“`} types={['region', 'county', 'municipality']} languages={['de']} + id="test" /> {/if} @@ -65,6 +66,7 @@