Releases: innrvoice/react-atom-trigger
v.2.1.1
v.2.1.0
What's changed
v2.1.0 removes the legacy helper hooks and keeps the package focused on AtomTrigger.
Highlights
- Removed
useScrollPositionanduseViewportSizefrom the public API - Removed hook-only runtime code, tests, and compatibility smoke coverage
- Reduced the shipped bundle size
- Updated migration docs with the
v2.1breaking change
v.2.0.11
What's changed
v2.0.11 is a maintenance release.
Highlights
- Simplification and deduplication of code
- Restored Codecov bundle reporting and the Codecov bundle size badge
- Removed the temporary local
size-limitCI check
v.2.0.10
What's changed
v2.0.10 is a small maintenance release.
Highlights
- Replaced Codecov bundle reporting with a local
size-limitCI check - Updated the bundle size badge to use BundleJS
- Updated transitive
postcssresolution
v.2.0.8
What's changed
v2.0.8 is a small patch release focused on bundle-size cleanup, internal simplification and Storybook maintenance.
Highlights
- Production bundle-size cleanup
- Development-warning internals cleanup
- Storybook demo simplification
- Test-related maintenance improvements
v.2.0.7
What's changed
v2.0.7 is a small patch release focused on internal cleanup and minor stability improvements.
Highlights
- Internal code cleanup
- Small reliability polish
- Test-related maintenance improvements
v.2.0.6
What's changed
v2.0.4 is a compatibility and stability release for react-atom-trigger.
The main work here was making behavior more predictable across the supported React range, especially around SSR / hydration, child mode refs and explicit custom roots. The React 16 through 19 peer range is now also backed by dedicated compat smoke checks in CI.
On top of that, the utility hooks were tightened up so disabled listeners keep their latest snapshot and resume cleanly when re-enabled, coverage was raised again and the release pipeline got a bit stronger with package smoke checks and cleaner CI / Codecov separation.
v.2.0.3
What's changed
v2.0.3 is mostly a maintenance / quality release.
Mainly this one was about cleaning up the test side, making the suite less weird, pushing coverage higher, adding Codecov bundle analysis and fixing the recent dependency alerts around undici.
Tests and coverage
Some of the existing tests were doing the job, but a few of them were too coverage-shaped. In this release they were reworked into smaller and more behavior-based cases, especially around scheduler logic, roots, child mode and utility hooks.
Coverage was also raised quite a lot and the weaker files got proper attention instead of just adding random assertions for the sake of a better number.
Tooling
Codecov bundle analysis was added, so now the package build is tracked there too.
CI was also cleaned up a bit:
- unit coverage is uploaded separately and reflects the actual library coverage better
- browser / Storybook checks run as a separate job instead of being mixed into the main checks
Security
Fixed the recent dependency vulnerability alerts in the dev toolchain.
In particular, the vulnerable undici path coming from the Codecov plugin side was overridden.
v.2.0.2
What's changed
v2.0.2 is a small follow-up release.
Mainly this fixes a resize-related bug that could report the wrong movementDirection, adds more coverage around the internal geometry / child mode helpers and bumps vite to a patched version for the recent security alerts.
This is not a breaking release.
Bug fix
Found and fixed an issue where resize-driven layout changes could look like real movement.
Before this change, movementDirection was inferred only from rect deltas.
That worked for scroll, but it also meant window resize or root resize could produce fake "up" / "down" movement even though nothing actually scrolled.
This was especially visible in cases where consumers map trigger direction directly to state changes or animations.
Now the scheduler tracks why a sample happened:
scrollroot-changegeometry-change
If a sample came from resize / root changes or if the root bounds changed between samples, movementDirection is reported as "stationary" instead of guessing from rect movement.
Tests added:
- viewport resize causing an
enterreportsmovementDirection === "stationary" - root resize causing an
enterreportsmovementDirection === "stationary"
Coverage and tests
Raised coverage around some of the lower-level pieces that were not exercised enough before.
Added focused tests for:
- child mode helper logic
- geometry helpers
Security
vite was bumped to a patched version to address the recent advisories:
- Arbitrary File Read via Vite Dev Server WebSocket
- Path Traversal in optimized deps
.maphandling
v.2.0.0
What's changed
This is a major rewrite of react-atom-trigger.
The component still does the same thing, but the internal model is now different.
Geometry is used as the source of truth for enter / leave, while IntersectionObserver is only used to wake things up on layout shifts.
Because of that, behavior is more predictable in cases like rootMargin, resizing and non-scroll movement.
This is a breaking release.
Breaking changes
callback→ replaced withonEnter,onLeave,onEventbehavior→ removedtriggerOnce→ replaced withonce/oncePerDirection- Removed:
scrollEventdimensionsoffset
- Hooks renamed:
useWindowScroll/useContainerScroll→useScrollPositionuseWindowDimensions→useViewportSize
Behavior is not 1:1 compatible with v1, even if API looks similar.
See MIGRATION.md for details.
Other changes
- Added
fireOnInitialVisible - Added child mode (observe a real element instead of sentinel)
- Improved handling of layout shifts, resize and margin-based triggers