Repository navigation
Releases
Releases · 66HEX/hasta
v0.6.1
Added
- Unit, browser, and framework regression tests covering every fix below.
Changed
- Updated
@66hex/hasta/solidand itssolid-jspeer dependency (>=2.0 <3) for Solid 2.0 (onSettled, splitcreateEffect, andrunWithOwner-deferred ref cleanup). - Replacing only a predicate function through a controller target binding (
binding.update()) now schedules a re-evaluation only while pointer input is active and no longer invalidates the target's cached geometry. - Improved Kalman predictor performance by caching the shared projection for multiple horizons at the same timestamp and precomputing the measurement standard deviation.
- Improved
GridIndexperformance with packed numeric cell keys instead of string keys and queries that run without temporary arrays. - Reduced per-frame allocations in the frame loop: there is no
Mapof forecasts for a single horizon, noObject.values().every(), no temporary query rectangles, no intersection caches for targets with a single rule, and no ShadowRoot set for pure light DOM. Intersection events are now built and frozen only when a callback actually fires (Subscription.prepare()/commit()). - With
bounds: 'cached'and no active rules, frames now evaluate only the targets returned by the spatial query instead of scanning every registered target. - The debug overlay now compares cache keys structurally instead of using
JSON.stringify, reuses a persistentmotionlayer, and only updates SVG/DOM attributes when their values change. GeometryCache.consume()andobserveRoots()now skip allocations when there are no animations or shadow roots.
Fixed
- A predicate that throws now aborts the active callback with
AbortSignal.reason === 'error'instead of'miss'. createHasta([])and subscription options passed asnull, arrays, or primitives now throw aTypeErrorinstead of being silently accepted or failing later.- A pointer switch rejected by the sample filter (unsupported
pointerType, stale timestamp) no longer leaves the engine bound to the rejectedpointerId. - Synchronous nested frames (for example, a predicate dispatching input and flushing a frame) now track nesting depth, so the inner frame no longer flushes queued samples into the predictor while the outer frame is still evaluating.
untrack()no longer invalidates all cached geometry (withbounds: 'cached', the remaining targets are not re-measured), and scroll listeners on shadow roots that are no longer used are removed.- Exhausted
onceintersection rules no longer widen the frame's maximum horizon and margin, and release hysteresis is reset when a target loses its bounds or forecast. - The debug overlay no longer rewrites
data-hasta-statuson every frame; previously this triggeredMutationObserverand invalidated cached geometry while debugging. - React refs roll back
node.currentwhen the binding rejects an element. Vue refs throw a cleanTypeErrorforundefinedand primitive values. Solid no longer attaches a replacement binding early while a deferred attach is pending.
v0.6.0
Added
- Exposed descriptive cancellation reasons on
AbortSignal.reason('miss','expired','hidden','paused','untracked','destroyed','disposed','error'). - Added
SVGElementtarget support across the core engine, controller, and React, Vue, Svelte, and Solid adapters (TrackedElement = HTMLElement | SVGElement). - Added
pointerTypes?: readonly ('mouse' | 'pen')[]toHastaOptions(defaulting to['mouse']) to optionally track hover-capable pen input. - Added
minSpeedPxPerMs?: numbertoIntersectsConditionto gate speculative intersection triggers on minimum forecast speed.
v0.5.0
Fixed
- Guarded
IntersectionHysteresis.retain()against zero prior or current speed so stationary forecasts reset cleanly withoutNaNarithmetic. - Preserved
rule.debugeligibility metadata ingetDebugSnapshot()while an intersection rule is held by release hysteresis. - Saturated
expand()bounds to finite limits so hugemarginPxvalues cannot overflow rectangle coordinates or abort active subscriptions. - Separated dirty-marking (
markDirty()) from frame scheduling (invalidate()) inGeometryCacheso idle input resets no longer schedule and immediately cancel a redundantrequestAnimationFrame. - Guarded optional
document.fontsandgetAnimations()calls so restricted or partial DOM environments do not throw during initialization or frame evaluation. - Prevented
NaNinObservedPath.take()when clipping segments whose coordinate difference overflows.
Added
- Unit and browser regression tests covering zero-speed hysteresis retention, debug eligibility during retention, huge
marginPxsaturation, idle reset frame scheduling, missingdocument.fonts/getAnimations()APIs, and overflowing observed-path clipping.
Hasta 0.4.0
Added
- Cached geometry tracking with automatic invalidation for DOM changes, resize, scrolling, and animations, including tracked shadow roots.
hasta.invalidate()andcontroller.invalidate()to refresh all target bounds after changes such as CSSOM edits.target.invalidate()refreshes one target.- Regression tests for geometry caching, spatial queries, active rules, and shared prediction misses.
- GitHub repository link in the documentation header.
Changed
- Geometry is cached by default. Set
bounds: 'frame'to retain the per-frame measurement policy of 0.3.0. Cached bounds preserve their actualmeasuredAttimestamp. - Reduced runtime work with a spatial grid, reused target and rule snapshots, and shared miss bookkeeping while preserving callback stability and cancellation behavior.
- Demo controls use colored inset shadows for hover, focus, and prediction highlights.
Fixed
- Limited documentation tests to essential behavior: framework selection, copying, navigation, preferences, demo callbacks, and social metadata. Removed visual and contrast checks; library coverage is unchanged.
Hasta 0.3.0
Added
- Solid 1.9 support through
@66hex/hasta/solid, with reactive options, controller switching, automatic target cleanup, SSR, and hydration. - Solid documentation and examples, with browser, lifecycle, type, and packaged-consumer tests.
- Reproducible cursor-stability and CPU benchmarks covering noisy motion, maneuvers, and shared target queries.
Changed
- Active speculative intersection callbacks can retain their signal through near-boundary prediction misses for up to 32 ms, using an additional 6 px release margin and direction and speed checks. Confirmed contact departure, expired input, target removal, and pause or disconnection still cancel immediately. Custom predicates still cancel on their first false result.
- Reduced repeated predictor work by reusing adaptation buffers, validated samples, and projections shared by queries with the same time and horizon.
- The documentation header now reads the library version from its package manifest.
- Updated the interactive demo's card animations and darkened the secondary and muted colors in the light theme.
Fixed
- Reduced velocity and trajectory jitter during steady pointer movement while preserving responsiveness to turns, braking, and reversals.
- Kept the demo's reset button inside its settings column at narrow viewport widths across platforms.
- Made table resize tests independent of documentation text width while retaining checks for scrolling, keyboard access, masks, and scrollbar removal.
- Extended publication verification retries to allow npm package and provenance metadata to propagate after publishing.
Full changelog: v0.2.0...v0.3.0
Hasta 0.2.0
Added
- Demo controls for prediction timing, target margins, current contact, stability, cooldown, and one-shot callbacks, arranged in two columns.
- Reproducible prediction and callback benchmarks covering sampling frequency, input noise, turns, reversals, and precise pointer movement.
Changed
- New forecast callbacks require a fresh measurement timestamp. Animation frames, corrections with the same timestamp, and cooldown expiry alone no longer start or restart callbacks. This also applies to custom predicates.
stableForMsmeasures the span of matching observations for forecasts. Confirmed current contact can still complete the delay while the pointer remains still whenincludeCurrentis enabled.- Reduced CPU cost for sparse pointer updates by skipping redundant magnitude calculations when a conservative comparison proves the same result, preserving prediction and intersection outputs.
Fixed
- Reduced the influence of isolated pointer outliers on Kalman position and velocity estimates for both dense and sparse input, while allowing consistent changes in motion through.
- Preserved genuine acceleration after turns by considering recent measured speed when checking sparse samples for outliers.
- Corrected release consumer checks to install registry versions as version ranges rather than local paths.