Roadmap
kenspeckle’s utilities take the shapes Svelte uses for its own APIs: singletons with current for global browser state, classes with current for configured or following values, attachments for element behavior, and nothing Svelte, Kit or the platform already handles. This is where that lands. Directions, not promises.
Shipped
Available now.
- FiniteStateMachine class typed FSM with reactive context
- PersistedState class a value synced to localStorage or sessionStorage
- Countdown class milliseconds left until a deadline
- scrollEdges attachment which scroll edges an element has reached
- viewTransition function a view transition around a DOM update
- enableViewTransitions function a view transition on every SvelteKit navigation
- viewTransitionName attachment name an element for the transition it takes part in
- retreat function which navigations animate in reverse
- debounce function debounce any function, with a shared promise
- throttle function throttle any function, leading and trailing
Planned
Shaped like Svelte's own APIs: singletons for global browser state, classes with current for configured or following values, attachments for element behavior.
- StateHistory class undo/redo over a getter and setter
- Idle class has the user gone idle, after a set time
- AsyncPersistedState class a value in IndexedDB, awaitable like a remote query
- CurrentPosition class reactive geolocation
- pressedKeys value currently held keys, read like a set
- shortcut attachment keyboard shortcuts on an element
- dragScroll attachment drag to scroll
Exploring
On the backlog — ported on demand, or waiting on a clearer fit.
- movable attachment drag to reposition an element
- swipeable attachment swipe gestures
- inlineSvg attachment inline an external SVG
- toc attachment table-of-contents extraction
- qr function QR code generation
- searchParams value typed search params — Kit's page.url and goto cover it for now
- resource value server data — likely covered by Kit remote functions