Repository navigation
Releases
Releases · k37z3r/jBase-2
v2.4.1 - Fixed effects & Add options
[2.4.1] - 2026-05-09
🚀 Features & Enhancements
- Effects (Global Easing): Added support for custom
easingproperties (e.g.,'linear','cubic-bezier') across all animation modules (Fade, Slide, Vertical), giving developers full control over transition timing. - Effects (Global Bounce): Introduced a new
bounce: trueoption across all effects.- Fade: Applies a snappy scale-spring effect.
- Slide: Applies a
back-in/back-outcubic-bezier curve, making menus physically hit the edge. - Vertical: Intelligently utilizes specific curves for a smooth accordion-spring effect.
- Developer Experience (Shorthand Syntax): All effect methods (
fadeIn,fadeOut,fadeToggle,show,hide,toggle,slideIn,slideOut,slideToggle,slideDown,slideUp,slideToggleBox) now accept a primitivenumber(duration in ms) as a direct argument (e.g.,$('main').hide(500)). This restores classic, rapid-prototyping shorthand syntax while maintaining full configuration object support. - Types: Expanded
FadeOptions,SlideOptions, andSlideVerticalOptionsinterfaces to support the neweasingandbounceproperties safely.
🐛 Bug Fixes
- Effects (Core Architecture): Fixed a critical
TypeError: Failed to construct 'HTMLElement': Illegal constructorexception across all toggle methods (fadeToggle,slideToggle,slideToggleBox). This was resolved by adopting modern ES6 arrow functions to ensure properthiscontext binding within iteration loops. - Effects (Race Conditions): Resolved the notorious "ghost timer" bug. Rapidly overlapping animation calls (e.g., fast toggling of menus or dropdowns) caused elements to unexpectedly revert to
display: noneor stutter. Animation timers are now strictly tracked and cleared on a per-element basis across all modules. - Effects (Slide): Fixed a logical bug in
slideInwhere thedirectionparameter was completely ignored. Elements are now correctly pre-positioned off-canvas (-100%or100%) before the slide transition begins. - Effects (Vertical): Resolved an issue where interrupting an active vertical slide caused the framework to incorrectly bail out due to static
displaystate checks. Animations can now be smoothly reversed mid-flight.
v2.3.0 - Added (Upload Method)
[2.3.0] - 2026-04-20
🚀 Added (Upload Method)
- HTTP Module: Added
$.http.upload()method. This introduces a modern, Promise-based wrapper aroundXMLHttpRequestspecifically designed for file uploads. It solves the native limitation of thefetchAPI by allowing real-time upload progress tracking via anonProgresscallback, while maintaining the same elegantasync/awaitsyntax as the rest of the HTTP module.
v2.2.0 - The Performance & Event Upgrade 🚀
This major update brings a massive overhaul to the event system, introducing full event delegation, custom data passing, and new mobile touch gestures. Under the hood, the core iteration engine has been completely rewritten to maximize performance and reduce CPU overhead.
🚀 New Features
- Advanced Event System:
.on()and.off()now fully support Event Delegation (e.g.,$('ul').on('click', 'li', handler)) and passing custom event data to the handler. - One-Time Events: Added the
.once()method to execute a handler at most once per element and event type. - Programmatic Triggers: Added
.trigger(eventName, data)to manually dispatch native or custom events. - Touch Gestures: Built-in mobile support with
.swipeLeft(),.swipeRight(),.swipeUp(), and.swipeDown()helpers. - Mouse Helpers: Added
.hover(handlerIn, handlerOut)for quick and easy mouseenter/mouseleave chaining. - Global Utilities:
$.each(),$.throttle, and$.debounceare now globally exposed on the$object for easy access.
⚡ Performance
- High-Performance Iteration: Replaced native
.forEachwith a custom, breakable$.each()loop across the entire framework. This significantly reduces CPU overhead during DOM, CSS, and Event manipulations and allows for early loop termination.
🛡️ Bug Fixes & Architecture
- SSR Safety: Fixed a critical bug where string selectors would fall back to the global
documentinstead of the passed isolatedcontext. Node.js and Server-Side environments are now completely safe. - Event Delegation Fix: Fixed a potential
TypeErrorcrash when a user clicked on a pureTextNode(which lacks the.closest()method) during event delegation. - Typings: Fixed a TypeScript signature mismatch for
.prop()to correctly handle getter and setter overloads. - Leaner Installation: Moved
jsdomandtslibfrom standard dependencies topeerDependencies/devDependencies. This drastically reduces the installation size for browser-only users via npm.
v2.1.2 - Fixed http and data
🛡️ Fixed (Core & Browser Scope)
- Core (
src/index.ts): Fixed an architectural bug where thehttpanddatamodules were not accessible via the main$wrapper (e.g.,$.httpor$.data) as documented in the wiki. They are now properly attached to theinitfactory function usingObject.assign(). - Browser Module (
src/browser.ts): Removed the unintended globalwindow.httpexport to prevent global namespace pollution. The HTTP module must now be accessed exclusively through the framework instance (e.g.,$.httporjBase.http).
v2.1.1 - Fixed css and get / add prop and removeAttr
🚀 Added (DOM Attributes)
- Attributes Module (
dom/attributes.ts): AddedremoveAttr()method to safely remove HTML attributes from all elements in a selection. - Attributes Module (
dom/attributes.ts): Addedprop()method for getting and setting underlying DOM properties (e.g.,checked,disabled,selectedIndex) that don't directly map to standard HTML attributes.
🛡️ Fixed (CSS & HTTP)
- CSS Module (
css/styles.ts): Enhanced thecss()method to support passing an object (Record<string, string | number>) for setting multiple CSS properties simultaneously (e.g.,css({'background-color': 'blue', 'font-size': '14px'})). - CSS Module (
css/styles.ts): Improved handling of kebab-case property names inside thecss()method by utilizingstyle.setProperty()for greater robustness. - HTTP Module (
http/get.ts): Fixed a critical bug ingetText()where it incorrectly attempted to parse the response withJSON.parse()instead of returning the raw text. It now safely returns the raw string/HTML as intended.
v2.0.3 - Fixed post and get
[2.0.3] - 2026-02-13
🛡️ Fixed (http)
- HTTP Module (
http/get.ts): Enforce GET method in get() and getText() utility. Overrides method to 'GET' if 'POST' is passed in options. - HTTP Module (
http/post.ts): Enforce POST method in post() utility. Overrides method to 'POST' if 'GET' is passed in options.
v2.0.2 - Performance Boost & SSR Support
Full Changelog: https://github.com/k37z3r/jBase-2.0/commits/v2.0.2