Skip to content

Commit adcc6ae

Browse files
committed
v11.0.0
1 parent 83f9850 commit adcc6ae

File tree

19 files changed

+34
-23
lines changed

19 files changed

+34
-23
lines changed

.github/workflows/link-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- name: Discover broken links
1717
uses: lycheeverse/lychee-action@v2
1818
with:
19-
args: --exclude '%7B' --accept 100..=103,200..=299,403,429 -- ./**/*.{md,svelte,ts}
19+
args: --exclude '%7B' --exclude '/' --accept 100..=103,200..=299,403,429 -- ./**/*.{md,svelte,ts}
2020
env:
2121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22

33
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
44

5+
### [v11.0.0](https://github.com/janosh/svelte-multiselect/compare/v11.0.0-rc.1...v11.0.0)
6+
7+
> 15 May 2025
8+
9+
- Prevent empty style attributes on `ul.selected > li` and `ul.options > li` [`#304`](https://github.com/janosh/svelte-multiselect/pull/304)
10+
- Breaking: Svelte 5 [`#295`](https://github.com/janosh/svelte-multiselect/pull/295)
11+
- update and fix linting, fix 2 dead readme links [`91f22d0`](https://github.com/janosh/svelte-multiselect/commit/91f22d0cafdf931607288d18c5268badd358d83b)
12+
513
#### [v11.0.0-rc.1](https://github.com/janosh/svelte-multiselect/compare/v10.3.0...v11.0.0-rc.1)
614

15+
> 24 October 2024
16+
717
- update `MultiSelect.svelte` for Svelte5 compatibility [`#293`](https://github.com/janosh/svelte-multiselect/pull/293)
818

919
#### [v10.3.0](https://github.com/janosh/svelte-multiselect/compare/v10.2.0...v10.3.0)

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "https://janosh.github.io/svelte-multiselect",
66
"repository": "https://github.com/janosh/svelte-multiselect",
77
"license": "MIT",
8-
"version": "11.0.0-rc.1",
8+
"version": "11.0.0",
99
"type": "module",
1010
"svelte": "./dist/index.js",
1111
"bugs": "https://github.com/janosh/svelte-multiselect/issues",
@@ -44,16 +44,16 @@
4444
"mdsvex": "^0.12.6",
4545
"mdsvexamples": "^0.5.0",
4646
"prettier": "^3.5.3",
47-
"prettier-plugin-svelte": "^3.3.3",
47+
"prettier-plugin-svelte": "^3.4.0",
4848
"rehype-autolink-headings": "^7.1.0",
4949
"rehype-slug": "^6.0.0",
50-
"svelte": "^5.28.6",
51-
"svelte-check": "^4.1.7",
50+
"svelte": "^5.30.1",
51+
"svelte-check": "^4.2.1",
5252
"svelte-multiselect": "11.0.0-rc.1",
5353
"svelte-preprocess": "^6.0.3",
5454
"svelte-toc": "^0.6.0",
5555
"svelte-zoo": "^0.4.18",
56-
"svelte2tsx": "^0.7.37",
56+
"svelte2tsx": "^0.7.39",
5757
"typescript": "5.8.3",
5858
"typescript-eslint": "^8.32.1",
5959
"vite": "^6.3.5",

src/lib/MultiSelect.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@
683683
bind:this={ul_options}
684684
style={ulOptionsStyle}
685685
>
686-
{#each matchingOptions.slice(0, Math.max(0, maxOptions ?? 0) || Infinity) as optionItem, idx (key(optionItem))}
686+
{#each matchingOptions.slice(0, Math.max(0, maxOptions ?? 0) || Infinity) as optionItem, idx (duplicates ? [key(optionItem), idx] : key(optionItem))}
687687
{@const {
688688
label,
689689
disabled = null,

src/routes/(demos)/form/+page.svx renamed to src/routes/(demos)/form/+page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## How to acquire form data in submission handler
22

3-
This example shows the JavaScript way of handling MultiSelect fields in form submission events. If you're using SvelteKit, you may want check out [this example](kit-form-actions) on to use [form actions](https://kit.svelte.dev/docs/form-actions) instead (which works even in browsers with JS disabled).
3+
This example shows the JavaScript way of handling MultiSelect fields in form submission events. If you're using SvelteKit, you may want check out [this example](/kit-form-actions) on to use [form actions](https://kit.svelte.dev/docs/form-actions) instead (which works even in browsers with JS disabled).
44

55
> Hint: Use<code>JSON.parse()</code> to convert the string value passed to form submit handler back to array.
66

src/routes/(demos)/kit-form-actions/+page.svx renamed to src/routes/(demos)/kit-form-actions/+page.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
This example shows the SvelteKit form action way of handling MultiSelect fields in form submission events. If you're not interested in [progressively enhanced forms](https://kit.svelte.dev/docs/form-actions#progressive-enhancement) (i.e. supporting no-JS browsers) take a look at the [JS form example](form) instead.
1010

1111
> Note that this example will only work when running the dev server locally since it needs
12-
a server to respond to the form's POST request and this documentation site is only static
13-
HTML.
12+
> a server to respond to the form's POST request and this documentation site is only static
13+
> HTML.
1414
1515
```svelte example stackblitz
1616
<script lang="ts">

src/routes/(demos)/min-max-select/+page.svx renamed to src/routes/(demos)/min-max-select/+page.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { FileDetails } from 'svelte-zoo'
3-
import language_slot_src from '$site/LanguageSnippet.svelte?raw'
3+
import language_snippet_src from '$site/LanguageSnippet.svelte?raw'
44
import options_src from '$site/options.ts?raw'
55
</script>
66

@@ -27,8 +27,8 @@
2727
```
2828

2929
<FileDetails files={[
30-
{ title: `LanguageSnippet.svelte`, content: language_slot_src },
31-
{ title: `options.ts`, content: options_src },
30+
{ title: `LanguageSnippet.svelte`, content: language_snippet_src },
31+
{ title: `options.ts`, content: options_src },
3232
]} />
3333

3434
When setting an integer value for `maxSelect` Multiselect will

src/routes/(demos)/persistent/+page.svx renamed to src/routes/(demos)/persistent/+page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Page-Reload Persistent MultiSelect
88

9-
`language_store` is a Svelte [`writable`](https://svelte.dev/tutorial/writable-stores) that's bound to the browser's `sessionStorage`. This example shows how MultiSelect retains its `selected` state on page reload.
9+
`language_store` is a Svelte [`writable`](https://svelte.dev/docs/svelte/svelte-store#writable) that's bound to the browser's `sessionStorage`. This example shows how MultiSelect retains its `selected` state on page reload.
1010

1111
<br />
1212

File renamed without changes.

src/site/Examples.svx renamed to src/site/Examples.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<label for="fav-languages">Favorite programming languages? <span>multi select</span></label>
44

5-
```svelte example collapsible repl="https://svelte.dev/repl/e3b88f59f62b498d943ecf7756ab75d7" stackblitz="src/site/Examples.svx"
5+
```svelte example collapsible repl="https://svelte.dev/repl/e3b88f59f62b498d943ecf7756ab75d7" stackblitz="src/site/Examples.md"
66
<script lang="ts">
77
import MultiSelect from '$lib'
88
import { languages } from '$site/options'
@@ -27,7 +27,7 @@ selected = {JSON.stringify(selected) || `[]`}
2727

2828
<label for="fav-ml-tool">Favorite machine learning tool? <span>single select with loading indicator on text input</span></label>
2929

30-
```svelte example collapsible repl="https://svelte.dev/repl/79e22e1905c94456aa21564b4d5f8759" stackblitz="src/site/Examples.svx"
30+
```svelte example collapsible repl="https://svelte.dev/repl/79e22e1905c94456aa21564b4d5f8759" stackblitz="src/site/Examples.md"
3131
<script lang="ts">
3232
import MultiSelect from '$lib'
3333
import { ml_libs } from '$site/options'
@@ -59,7 +59,7 @@ value = {JSON.stringify(value) || `null`}
5959

6060
<label for="confetti-select">Chance of Confetti <span>max select with custom filter function and callback on item selection</span></label>
6161

62-
```svelte example collapsible repl="https://svelte.dev/repl/516279bd62ec424986115263c2cdc169" stackblitz="src/site/Examples.svx"
62+
```svelte example collapsible repl="https://svelte.dev/repl/516279bd62ec424986115263c2cdc169" stackblitz="src/site/Examples.md"
6363
<script lang="ts">
6464
import MultiSelect from '$lib'
6565
import { frontend_libs } from '$site/options'
@@ -102,7 +102,7 @@ value = {JSON.stringify(value) || `null`}
102102

103103
<label for="color-select">Color select <span>with form submission</span></label>
104104

105-
```svelte example collapsible repl="https://svelte.dev/repl/3a217c39932047a09f61d6425b04a7c3" stackblitz="src/site/Examples.svx"
105+
```svelte example collapsible repl="https://svelte.dev/repl/3a217c39932047a09f61d6425b04a7c3" stackblitz="src/site/Examples.md"
106106
<script lang="ts">
107107
import MultiSelect from '$lib'
108108
import { colors } from '$site/options'
@@ -141,7 +141,7 @@ value = {JSON.stringify(value) || `null`}
141141

142142
<label for="countries">What country are you from? <span><code>minSelect=1</code> means no <code>x</code> button to remove the selected option</span></label>
143143

144-
```svelte example collapsible repl="https://svelte.dev/repl/4ff40862436e4bfbb2bd55d234352bb1" stackblitz="src/site/Examples.svx"
144+
```svelte example collapsible repl="https://svelte.dev/repl/4ff40862436e4bfbb2bd55d234352bb1" stackblitz="src/site/Examples.md"
145145
<script lang="ts">
146146
import MultiSelect from '$lib'
147147
import { countries } from '$site/options'

src/site/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export { default as ColorSnippet } from './ColorSnippet.svelte'
22
export { default as DemoNav } from './DemoNav.svelte'
3-
export { default as Examples } from './Examples.svx'
3+
export { default as Examples } from './Examples.md'
44
export { default as Footer } from './Footer.svelte'
55
export { default as LanguageSnippet } from './LanguageSnippet.svelte'
66
export { default as MinusIcon } from './MinusIcon.svelte'

tests/MultiSelect.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ test.describe(`disabled multiselect`, () => {
188188
).toHaveLength(0)
189189
})
190190

191-
test(`renders disabled slot`, async ({ page }) => {
191+
test(`renders disabled snippet`, async ({ page }) => {
192192
const span = await page.locator(
193193
`span:has-text('This component is disabled. It won't even open.')`,
194194
)
@@ -293,6 +293,8 @@ test.describe(`multiselect`, () => {
293293
page,
294294
}) => {
295295
await page.goto(`/ui`, { waitUntil: `networkidle` })
296+
// reload page
297+
await page.reload()
296298

297299
await page.click(`#foods input[autocomplete]`)
298300

@@ -567,8 +569,7 @@ test.describe(`snippets`, () => {
567569
`custom expand icon snippet is not rendered`,
568570
).toHaveCount(1)
569571

570-
// make sure, rendering different expand-icon slot depending on open=true/false works
571-
// for that, first get d attribute of path inside svg
572+
// make sure, rendering different expandIcon snippet depending on open=true/false works
572573
const expand_icon_path = await expand_icon_locator
573574
.locator(`path`)
574575
.first()

0 commit comments

Comments
 (0)