Releases: bfiessinger/scrollToSmooth
Releases · bfiessinger/scrollToSmooth
4.0.2
4.0.1
Chores
- Removed outdated "unreleased" notice from README.
- Removed browser support table from README as version-specific figures are no longer accurate.
- Added .npmignore to exclude demo assets, source files, and dev tooling from the published package (reduced tarball from ~5.6 MB to ~41 kB).
4.0.0
Features
- [NEW] Core build now tree‑shakeable: only
lineareasing is included by
default. Additional easing functions must be imported individually from
scrolltosmooth/easings/...or resolved withgetEasing(). - [NEW] Plugin architecture —
ScrollToSmoothnow supports registering plugins
that hook into the scroll lifecycle for extensibility. - [NEW]
HorizontalScrollPlugin— enables horizontal scrolling with draggable
expander elements. - [NEW]
SnapPlugin— snap-to-nearest scrolling with configurable debounce
delay and target element selector. - [NEW]
TouchMomentumPlugin— momentum-based touch scrolling for enhanced
mobile experience. - [NEW] Multi-axis scrolling —
scrollTonow accepts aScrollPointobject to
target both x and y axes simultaneously. - [NEW] Scroll queue —
queueScroll()andclearQueue()methods allow
sequential scroll animations to be scheduled and cancelled. - [NEW] Progress tracking — scroll update callbacks now receive a
progress
value (0–1) representing animation completion. - [NEW] Native smooth scrolling fallback — optional
nativeFallbacksetting
delegates to the browser's nativescroll-behavior: smooth, with a
configurabledispatchEventsoption. - [NEW] Percentage and viewport-height offsets — scroll target offsets can now
be expressed as CSS-style strings such as"10%"or"50vh"in addition to
plain pixel numbers. - [NEW]
getEasing(name)helper — resolves an easing function by name at
runtime, with a fallback tolinear. - [NEW] Packaged (IIFE) plugin builds — self-contained bundles for plugins,
including auto-registration ofHorizontalScrollPluginin thepkgdbuild.
Enhancements
- Snapping and touch momentum removed from core — use
SnapPluginand
TouchMomentumPlugininstead. - Easings no longer re-exported from the main package entry point to keep the
core bundle small and tree-shakeable. - Improved TypeScript type definitions and declaration output.
validateSelectorindom.tsmade stricter and more reliable.HorizontalScrollPluginexpander element styles consolidated into a single
style object for consistency.- Considerable rewrite and TypeScript conversion to support modular builds.
- Documentation updated for new import patterns, API, architecture, easings,
and plugins.
Bug Fixes
- Demo header title and
dat.GUIversion corrected.
Code Quality
- Complete structural overhaul and separation of concerns.
- Easing function handling moved out of a central lookup object, reducing bundle
size. - Extensive type upgrades throughout the codebase.
3.0.2
3.0.1
3.0.1 (Hotfix release)
- ScrollToSmooth stopped working in version 3.0.0 when the selector to be validated would fail
3.0.0
Features
- Allow custom easing functions
- Allow a custom amount of pixels to use as an offset (#3)
- Animated scrolling links at the very top or bottom can now exceed the actual document so that easing functions like for example
easeInOutBouncedon't stop animating while exceeding the document. - Introduced
scrollBymethod scrollTonow accepts numeric values
Enhancements
- Make imports of easings optional to enhance filesize control
- Import linear only per default (see Important Notes)
- Enhanced easing patterns
Bug Fixes
- Fixed a bug where the final position was calculated wrong in some situations
- Bundled browser file was not transpiled to es5
Code Quality
- Created a seperate file for each easing function
- Create Typescript declaration files
- Various minor bug fixes and structural improvements
- Add esm bundle
- Add cjs bundle
Important Notes
Version 3.0.0 is a major update and comes with some breaking changes:
- Easings are no longer imported by default, you have to import individual easings like
import { easeInQuad, easeOutQuad } from 'scrolltosmooth'; - The
fixedHeaderoption has been renamed tooffsetand accepts a fixed amount of pixels now
2.2.1
v2.2.1 Bump Library version to 2.2.1
2.2.0
v2.2.0 Bugfixes
2.1.5
2.1.4
v2.1.4 Add files via upload