Releases: janosh/svelte-widgets
Releases · janosh/svelte-widgets
Release list
v1.2.0
30 July 2026
- Add three accessible components:
Sheetfor portalled edge panels, snippet-drivenTabswith automatic/manual activation andAccordionwith single/multiple expansion - Add
file_dropattachment with accept filtering, directory expansion and explicit drop errors - Add hover/focus triggers and open/close delays to
Popover - Add rich snippet bodies and validated
ask_prompt()requests to the queued dialog API - Extract headless theme helpers (
apply_theme_mode,resolve_theme_mode,system_preference, sharedthemestate) tosvelte-widgets/theme, so CommandMenu / PageSearch actions can set the theme without duplicating ThemeToggle's localStorage +data-themelogic, and the toggle icon stays in sync - Add
svelte-widgets/katexwithkatex_preprocess(), a before/after preprocessor pair that hides rendered KaTeX behind collision-safe placeholders around mdsvex so markdown cannot mangle the math HTML - Drive
draggable/resizablewith pointer events (pointerIdfiltering,pointercancel,setPointerCapture) so touch works and a gesture over an iframe or stolen focus still ends cleanly; resize hit-testing is now edge strips that cover the border box - Harden
dismiss_on: 'release': ignore clicks whose primary press started inside, and addbackdrop_dismissfor modal::backdropvs padding. Wiredismiss_onthrough MultiSelect / Popover / DraggablePane (pane defaults torelease, plus an element-onlyinsideprop) - Add
FullscreenButtonplacement="corner"and optional per-page icons onSubpageGrid - Make text search match NFC/NFD-equivalent Unicode and skip hidden form-control text
- Breaking: Unify build-time heading IDs, runtime heading anchors and
Tocon the same Unicode-preserving slugger and collision allocator, and make heading parsing tolerate>inside quoted attributes while ignoring comments and code/script/style containers. This changes generated IDs containing punctuation or non-ASCII text and changes duplicate suffixes from the oldTocslugger - Document every headless subpath and attachment, including the lower-level backdrop and outside-press dismissal primitives
Full Changelog: v1.1.0...v1.2.0
v1.1.0
27 July 2026
- Add eight components consolidated from downstream repos:
ButtonGroup(a segmented control, generalized from the hand-rolled ones those repos each grew),Toast,ConfirmDialog,DraggablePane,FullscreenButton,Footer,ContributorListandLiteYouTubeEmbed - Add
portal,contrast_colorandforward_window_keydownattachments, bringing the total to thirteen - Add headless modules behind their own subpaths:
svelte-widgets/toast-queue,/dialogs,/fullscreen,/clipboard,/print,/file-dropand/text-search, the last matching across inline markup wherehighlight_matcheswalks text nodes one at a time. It skipsscript,styleandnoscriptso a find-in-page never steps onto text that renders nowhere, and treats text either side of one as continuous - Add shortcut rebinding for "customize shortcuts" UIs:
event_to_combo,normalize_comboandsanitize_shortcut_overridesturn a keydown into a canonical combo and resolve collisions - Add sections to
ContextMenu:actionsacceptsCmdSectionentries rendered as an ARIAgroupofmenuitemradioitems with a selected value per section - Add a
create_highlighter(grammars)factory and asvelte-widgets/live-examples/create-highlightersubpath, so consumers can pick their own grammars without the barrel's eager top-level await of 34 grammars - Consolidate
icon_datafrom 25 to 143 entries using matterviz's curated paths.Iconnow supports fill/stroke glyphs and multi-element SVG markup. The name lookup still ships the full 56 kB raw map with any icon, so tree-shaking remains worth revisiting - Add a
togglesnippet toDraggablePane, so a consumer can put any icon in the toggle button while the component keeps the button and its anchor geometry.open_icon/closed_iconare typed to the bundledIconNames, which left no route to an icon this package doesn't ship, andicon_stylesizes the bundled one without reaching for the snippet at all. The pane carriestoc-excludenow, keeping headings in floating chrome out of a page'sToc, andpane-openwhile it is open, which is what a page needs to style around a pane it does not own - Add an
option_suffixsnippet toButtonGroup, rendered as a sibling of each button rather than inside it, so an option can carry a trailing link without nesting interactive content in a<button>. The wrapper element only appears when the snippet is supplied, so existing.options > buttonselectors keep matching. Adds--btn-group-justify-content,--btn-group-btn-cursor,--btn-group-btn-hover-color,--btn-group-btn-hover-transformand--btn-group-btn-transition, andtooltip_optionsfor consumers whose option tooltips are rich text - Add
dismissandtriggertoContextMenu.dismissmerges over the default{ escape: true }and reaches the wholeclick_outsideconfig, so a trigger that toggles can ask fordismiss_on: 'release'instead of being closed by its own press.trigger: 'none'installs no right-click handler at all, for a consumer drivingatitself - Add
root,on_escapeandrecapturetofocus_trap.rootfollowsclick_outside'sscopeshape and is resolved per keystroke, so a trap can cover an inner dialog while a sibling backdrop stays out of the Tab cycle.on_escaperegisters on the existing layer stack, so a trap inside a modal closes only itself. All three are opt-in - Add a configurable priority ladder to the toast queue:
create_toast_queue({ priorities })takes an ordered list and every type is generic over it, so a consumer's own tiers rank correctly instead of falling below everything. An unknown priority now throws rather than ranking-1, andcreate_toast_queuetakes an options object instead of a baremax_pending - Add
sideEffectsto the manifest, listing onlydist/index.js, which patchesElement.prototype.scrollIntoViewIfNeededon import. Every other module is pure, so a bundler can now drop the components a consumer never imports instead of keeping the whole barrel - Add an
svelte-widgets/iconssubpath and re-exporticon_dataandIconNamefrom the root.IconNametypes the public props ofIcon,ButtonGroup,DraggablePaneandFullscreenButton, but no export let a consumer name it - Drop
vite-plusfrompeerDependencies. It appears in no emitted JavaScript, only as twoimport typelines invite-config.d.ts, and the sole thing referencing it issvelte-widgets/vite-config, which nobody can use without already depending on vite-plus - Fix
parse_shortcutnever resolving themodtoken, which madematches_shortcut(event, 'mod+z')match a barezwith no modifier held. Onlyrun_hotkeyswas unaffected, since it pre-resolved at the call site. This also makesspacematchable for the first time - Fix
highlight_matchesandhighlight_rangesoverwriting each other when they share a CSS highlight name. They keep one store now, so the name holds the union of their ranges until the last owner releases - Fix
svelte-widgets/Toast.sveltefailing to resolve its store when installed from npm: the packaging step rewrote.tsimport specifiers in.jsand.d.tsfiles but not in.sveltefiles - Fix
MultiSelect,Masonry,Popover,ContextMenu,LiteYouTubeEmbedandNavrenderingclass="[object Object]"when handed a class. Svelte types the attribute as aClassValue, so an array or a{ active: true }object is legal, but these interpolated it into a string. They pass it to Svelte's own clsx pass now - Fix
Masonrysilently dropping its virtualization when a consumer passesonscroll: the prop spread sat after the component's own handler and replaced it, leaving the rendered window frozen at the top of the list however far down the user scrolled.LiteYouTubeEmbedhad the mirror image, spreading first and so discarding a consumer'sonclick. Both chain the two handlers now - Full Changelog: v1.0.0...v1.1.0
v1.0.0
27 July 2026
- Breaking: Deprecate
svelte-tocandsvelte-bricks. Replaceimport Toc from 'svelte-toc'withimport { Toc } from 'svelte-widgets'andimport Masonry from 'svelte-bricks'withimport { Masonry } from 'svelte-widgets'. Their console warnings now name the component (Toc received invalid …,Masonry: …) rather than the old package - Breaking: Rename
CmdPalettetoCommandMenuandPagefindPalettetoPageSearch. The old names are removed#428 - Breaking:
click_outsidedismisses onpointerdownrather thanclick,exclude/includemerge intoinside,triggerbecomesdismiss_on: press | release, theoutside-clickevent becomesdismiss, andcallbackgains a{ focus_inside, via, event }detail#431 - Add
PopoverandContextMenucomponents plusfloat,focus_trapandhotkeyattachments, with Escape closing one layer at a time#431 - Absorb
svelte-tocandsvelte-bricks:TocandMasonryship here now, with their test suites andsvelte-widgets/Toc.svelte/svelte-widgets/Masonry.sveltesubpath exports - Add Pagefind-powered
PageSearchand expandCommandMenuwith async action loading, navigation and match highlighting#428 - Add
rangeSelectfor Shift-click and Shift+Arrow range selection, anonrangeSelectevent and aselectAllScopeofvisibleormatching#429 - Pass an
AbortSignaltoloadOptionsand abort superseded searches#429 - Speed up hot paths: 2.4x option filtering on 2000 labels, 7.0x hotkey matching on 500 actions, 3.9x syntax-highlight HTML
#430 - Chain consumer event handlers instead of letting props clobber them, so
onclick/onkeydown/oncloseno longer disableCopyButton,ThemeToggle,FileDetails,CodeExample,CommandMenuandNavinternals#429 - Ignore modifier-free
CommandMenuhotkeys while focus sits in a text field#430 - Fix the dropdown portal refusing to activate inside a shadow root and throwing
NotFoundErroron teardown#429 - Validate
OptionStyleobjects even when no style key is passed#429 - Add a
svelte-widgets/typessubpath export#428 - Strengthen tests that could not fail across the vitest suite
79625e0 - Breaking: Rename the package from
svelte-multiselecttosvelte-widgets, restarting versioning at v1.0.0.MultiSelectis now one of 19 components, so imports becomesvelte-widgetsand subpaths likesvelte-widgets/attachments. Everything below v1.0.0 in this changelog was released assvelte-multiselect
Full Changelog: v11.8.0...v1.0.0
v11.8.0
What's Changed
- Add async
oncreatesupport: return a Promise (or thenable) to persist user-created options before they're added; spinner +aria-busywhile pending, rejections abort the add#427 - Add
virtualListprop for windowed dropdown rendering of large flat option lists (tunableitemHeight/overscan)#427 - Add portal
placementparam:auto(new default) flips the dropdown above the input when it would overflow the viewport bottom#427 - Fix 19 bugs across
MultiSelect, attachments,CmdPalette,CodeExample, and heading-anchors, incl. falsy options (0) unselectable via keyboard, foreign drag-drops corruptingselected, keyboard nav escapingmaxOptions, group deselect bypassingminSelect, missing IME composition guard, duplicate options crashing the keyed each,sortabledestroying header markup, cross-instance tooltip clearing, and Unicode highlight offsets#427 - Give tooltips a visible theme-aware default border and audit the test suite (~58 redundant tests removed, ~50 regression tests added)
#427 - Fix schemeless-page tooltip readability and support partial
OptionStyleobjects#426 - Fix tooltip, focus, and shortcut edge cases
#425 - Fix retain-focus dropdown behavior
#424 - Clean up Svelte formatting, types, and low-value tests
#422 - Simplify Vite/Svelte setup and tighten tests
#421
Full Changelog: v11.7.2...v11.8.0
v11.7.2
What's Changed
- Harden components, add CmdPalette frecency feature, and expand test coverage
#418 - Add
expandIconPositionprop,beforeInputsnippet, and expand icon dropdown toggle#420 - Fix command palette dialog positioning
2fa2ade - Tighten lint rules and fix violations
d081170
Full Changelog: v11.7.1...v11.7.2
v11.7.1
What's Changed
- Add editable input dropdown mode
#416 - Fix
loadOptionsscrollbar absence with smallbatchSize#413 - Improve
MultiSelect,CmdPalette, andNavaccessibility; add package smoke coverage in CI#417 - Breaking: Remove attachments from the main package export. Import them from
svelte-multiselect/attachmentsinsteadc50fb7f - Breaking: Make tooltip HTML rendering opt-in via
allow_html: trueand treat tooltip content as plain text by default#417
Full Changelog: v11.7.0...v11.7.1
v11.7.0
What's Changed
- Add
parse_pasteprop, fix shortcut defaults and select-all UX#407 - Add
oncreatereject/transform,onparsed_pasteevent,selectAllDisabledTitlei18n#408 - Reject whitespace-only input in
allowUserOptionsmode#410 - Fix whitespace guards, falsy value sync, paste reporting, sortable bugs, and type safety
#411 - Block option creation during
loadOptionsdebounce window#404 - Fix tooltip background not inheriting page theme
#405
Full Changelog: v11.6.4...v11.7.0
v11.6.4
What's Changed
- Suppress user messages during async loading
#403 - Add left/right arrow key navigation between selected items
#402 - Replace pre-commit/prek with vp staged, enable pedantic linting category
6317a47 - Enable type-aware linting and fix all 168 errors
3fd9b2c - Migrate project tooling to vite-plus and align CI/test commands
9bfac33 - Fix spurious onopen/onclose events and vite plugin HMR reload
0ad83f8 - Add theme toggle and demo overview navigation pages
351baf9 - Replace svelte-preprocess with acorn, update deps, harden test assertions
6fe18c2
Full Changelog: v11.6.3...v11.6.4