Releases: knowledgecode/blokr
Releases · knowledgecode/blokr
v0.3.0
What's Changed
This release introduces significant API changes to Blokr v0.3.0, moving from a singleton pattern to a factory function pattern with support for element-specific event blocking.
Major Changes
- Factory Function Pattern:
blokr()now returns instances instead of being a singleton - Element-Specific Locks: Lock interactions for specific DOM elements with configurable scope
- Scope Filtering: Block events inside, outside, or on target elements only
- Options-Based API: Timeout and scope are now lock options, not global settings
- Filter-Based Event Blocking: Replaces boolean flag with Set of filter functions
Key Features
- ✅ Factory function with WeakMap-based instance caching
- ✅ Scope filtering (inside, outside, self)
- ✅ Per-lock timeout configuration
- ✅ No reference counting
- ✅ 45 tests passing (24 unit, 21 integration)
Breaking Changes
blokr.lock()→blokr().lock()blokr.unlock()→blokr().unlock()(no abort parameter)blokr.setTimeout(ms)→blokr().lock({ timeout: ms })- UMD global name:
window.Blokr→window.blokr
Migration Guide
See README.md Migration from v0.2.x section for detailed migration instructions.
Full Changelog: v0.2.1...v0.3.0
v0.2.1
v0.2.0
What's Changed
- Add abort parameter to unlock() method by @knowledgecode in #1
New Contributors
- @knowledgecode made their first contribution in #1
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Full Changelog: https://github.com/knowledgecode/blokr/commits/v0.1.0